.
This commit is contained in:
@@ -8,7 +8,7 @@ find_package(catkin REQUIRED COMPONENTS
|
||||
hos_celix
|
||||
roscpp
|
||||
hos_cpp_utils
|
||||
hos_libvariant
|
||||
hos_deps
|
||||
)
|
||||
|
||||
## System dependencies are found with CMake's conventions
|
||||
|
||||
@@ -43,11 +43,11 @@
|
||||
<build_depend>hos_celix</build_depend>
|
||||
<build_depend>roscpp</build_depend>
|
||||
<build_depend>hos_cpp_utils</build_depend>
|
||||
<build_depend>hos_libvariant</build_depend>
|
||||
<build_depend>hos_deps</build_depend>
|
||||
<run_depend>hos_celix</run_depend>
|
||||
<run_depend>roscpp</run_depend>
|
||||
<run_depend>hos_cpp_utils</run_depend>
|
||||
<run_depend>hos_libvariant</run_depend>
|
||||
<run_depend>hos_deps</run_depend>
|
||||
|
||||
|
||||
<!-- The export tag contains other, unspecified, tags -->
|
||||
|
||||
@@ -8,7 +8,7 @@ find_package(catkin REQUIRED COMPONENTS
|
||||
hos_celix
|
||||
hos_core_msgs
|
||||
hos_cosgi_core
|
||||
hos_libvariant
|
||||
hos_deps
|
||||
hos_cpp_utils
|
||||
roscpp
|
||||
)
|
||||
@@ -25,6 +25,7 @@ find_package(catkin REQUIRED COMPONENTS
|
||||
find_package(APR REQUIRED)
|
||||
find_package(CELIX REQUIRED)
|
||||
find_package(Boost REQUIRED)
|
||||
find_package(libvariant REQUIRED)
|
||||
|
||||
|
||||
################################################
|
||||
@@ -90,7 +91,7 @@ find_package(Boost REQUIRED)
|
||||
catkin_package(
|
||||
INCLUDE_DIRS include/${PROJECT_NAME}/
|
||||
# LIBRARIES hos_cosgi_devicerepository
|
||||
CATKIN_DEPENDS hos_celix hos_core_msgs hos_cosgi_core roscpp hos_libvariant hos_cpp_utils
|
||||
CATKIN_DEPENDS hos_celix hos_core_msgs hos_cosgi_core roscpp hos_deps hos_cpp_utils
|
||||
# DEPENDS system_lib
|
||||
)
|
||||
|
||||
@@ -110,7 +111,7 @@ include_directories(
|
||||
${APR_INCLUDE_DIR}
|
||||
${APR_INCLUDE_DIR}/apr-1.0
|
||||
include/${PROJECT_NAME}/
|
||||
${hos_libvariant_INCLUDE_DIRS}/hos_libvariant
|
||||
${libvariant_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set(BUNDLE_SYMBOLICNAME "hos.hos_devicerepository")
|
||||
@@ -125,6 +126,7 @@ bundle(hos_cosgi_devicerepository
|
||||
target_link_libraries(hos_cosgi_devicerepository
|
||||
${catkin_LIBRARIES}
|
||||
${APR_LIBRARIES}
|
||||
${libvariant_LIBRARY}
|
||||
)
|
||||
|
||||
## Declare a cpp library
|
||||
|
||||
-1
@@ -3,7 +3,6 @@
|
||||
|
||||
|
||||
#include <hos/cosgi/service/Interface.h>
|
||||
#include <hos/utils/observable.h>
|
||||
#include <Variant/Variant.h>
|
||||
#include <string>
|
||||
#include <set>
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
<build_depend>hos_core_msgs</build_depend>
|
||||
<build_depend>hos_cosgi_core</build_depend>
|
||||
<build_depend>roscpp</build_depend>
|
||||
<build_depend>hos_libvariant</build_depend>
|
||||
<build_depend>hos_deps</build_depend>
|
||||
<build_depend>hos_cpp_utils</build_depend>
|
||||
<run_depend>hos_celix</run_depend>
|
||||
<run_depend>hos_core_msgs</run_depend>
|
||||
<run_depend>hos_cosgi_core</run_depend>
|
||||
<run_depend>roscpp</run_depend>
|
||||
<run_depend>hos_libvariant</run_depend>
|
||||
<run_depend>hos_deps</run_depend>
|
||||
<run_depend>hos_cpp_utils</run_depend>
|
||||
|
||||
|
||||
|
||||
@@ -14,7 +14,6 @@ extern "C" {
|
||||
#include <hos/cosgi/service/core/CoreService.h>
|
||||
#include "hos/cosgi/service/devicerepository/devicerepository_serviceimpl.h"
|
||||
|
||||
#include <hos/utils/observable.h>
|
||||
#include <iostream>
|
||||
#include <memory>
|
||||
|
||||
|
||||
+1
-1
@@ -84,7 +84,7 @@ void DeviceRepositoryServiceImpl::init() {
|
||||
}
|
||||
}
|
||||
hosStatusSub = nodehandle->subscribe(hosStatusTopic, 1000, &DeviceRepositoryServiceImpl::hosStatusMsgCallback, this);
|
||||
schemaLoader.reset(new libvariant::HosSchemaLoader());
|
||||
schemaLoader.reset(new utils::SchemaLoader());
|
||||
initialized = true;
|
||||
ROS_INFO_STREAM("DeviceRepositoryService: Initialized and Ready.");
|
||||
}
|
||||
|
||||
+3
-3
@@ -9,7 +9,7 @@
|
||||
#define SRC_HOS_COSGI_SERVICE_DEVICEREPOSITORY_DEVICEREPOSITORY_SERVICEIMPL_H_
|
||||
|
||||
#include <Variant/Variant.h>
|
||||
#include <HosSchemaLoader/HosSchemaLoader.h>
|
||||
#include <hos/utils/SchemaLoader.h>
|
||||
#include <mutex>
|
||||
#include <map>
|
||||
#include <set>
|
||||
@@ -113,7 +113,7 @@ private:
|
||||
long sequenceNumber = 0;
|
||||
ros::Subscriber hosStatusSub;
|
||||
|
||||
std::unique_ptr<libvariant::HosSchemaLoader> schemaLoader;
|
||||
std::unique_ptr<utils::SchemaLoader> schemaLoader;
|
||||
|
||||
bool initialized = false;
|
||||
|
||||
@@ -144,7 +144,7 @@ public:
|
||||
/* Internal Stuff */
|
||||
|
||||
bool isInitialized() { return initialized; }
|
||||
libvariant::HosSchemaLoader* getHosSchemaLoader() { return schemaLoader.get(); }
|
||||
utils::SchemaLoader* getHosSchemaLoader() { return schemaLoader.get(); }
|
||||
void sendDeviceCommand(Device* device, const Variant& cmd);
|
||||
};
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ find_package(catkin REQUIRED COMPONENTS
|
||||
hos_cosgi_core
|
||||
hos_cosgi_scripting
|
||||
hos_cpp_utils
|
||||
hos_libvariant
|
||||
hos_deps
|
||||
roscpp
|
||||
hos_cpp_cron
|
||||
)
|
||||
@@ -27,6 +27,7 @@ find_package(catkin REQUIRED COMPONENTS
|
||||
find_package(APR REQUIRED)
|
||||
find_package(CELIX REQUIRED)
|
||||
find_package(Boost REQUIRED)
|
||||
find_package(libvariant REQUIRED)
|
||||
|
||||
################################################
|
||||
## Declare ROS messages, services and actions ##
|
||||
@@ -90,7 +91,7 @@ find_package(Boost REQUIRED)
|
||||
catkin_package(
|
||||
INCLUDE_DIRS include/${PROJECT_NAME}/
|
||||
# LIBRARIES hos_cosgi_ruleengine
|
||||
CATKIN_DEPENDS hos_celix hos_cosgi_devicerepository hos_cosgi_core hos_cpp_utils hos_libvariant roscpp hos_cpp_cron hos_cosgi_scripting
|
||||
CATKIN_DEPENDS hos_celix hos_cosgi_devicerepository hos_cosgi_core hos_cpp_utils hos_deps roscpp hos_cpp_cron hos_cosgi_scripting
|
||||
# DEPENDS system_lib
|
||||
)
|
||||
|
||||
@@ -110,7 +111,7 @@ include_directories(
|
||||
${APR_INCLUDE_DIR}
|
||||
${APR_INCLUDE_DIR}/apr-1.0
|
||||
include/${PROJECT_NAME}/
|
||||
${hos_libvariant_INCLUDE_DIRS}/hos_libvariant
|
||||
${libvariant_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set(BUNDLE_SYMBOLICNAME "hos.hos_ruleengine")
|
||||
@@ -128,6 +129,7 @@ bundle(hos_cosgi_ruleengine
|
||||
target_link_libraries(hos_cosgi_ruleengine
|
||||
${catkin_LIBRARIES}
|
||||
${APR_LIBRARIES}
|
||||
${libvariant_LIBRARY}
|
||||
)
|
||||
|
||||
## Declare a cpp library
|
||||
|
||||
+3
-3
@@ -37,8 +37,8 @@ class Script;
|
||||
}
|
||||
}
|
||||
}
|
||||
namespace libvariant {
|
||||
class HosSchemaLoader;
|
||||
namespace utils {
|
||||
class SchemaLoader;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
|
||||
std::shared_ptr<RuleCondition> createRuleCondition(Variant raw);
|
||||
|
||||
libvariant::HosSchemaLoader* getHOSSchemaLoader();
|
||||
utils::SchemaLoader* getHOSSchemaLoader();
|
||||
devicerepository::DeviceRepositoryService* getDeviceRepository();
|
||||
};
|
||||
|
||||
|
||||
-1
@@ -10,7 +10,6 @@
|
||||
|
||||
|
||||
#include <hos/cosgi/service/Interface.h>
|
||||
#include <hos/utils/observable.h>
|
||||
#include <memory>
|
||||
#include <Variant/Variant.h>
|
||||
|
||||
|
||||
@@ -45,14 +45,14 @@
|
||||
<build_depend>hos_cosgi_core</build_depend>
|
||||
<build_depend>hos_cosgi_scripting</build_depend>
|
||||
<build_depend>hos_cpp_utils</build_depend>
|
||||
<build_depend>hos_libvariant</build_depend>
|
||||
<build_depend>hos_deps</build_depend>
|
||||
<build_depend>roscpp</build_depend>
|
||||
<build_depend>hos_cpp_cron</build_depend>
|
||||
<run_depend>hos_celix</run_depend>
|
||||
<run_depend>hos_cosgi_devicerepository</run_depend>
|
||||
<run_depend>hos_cosgi_core</run_depend>
|
||||
<run_depend>hos_cpp_utils</run_depend>
|
||||
<run_depend>hos_libvariant</run_depend>
|
||||
<run_depend>hos_deps</run_depend>
|
||||
<run_depend>roscpp</run_depend>
|
||||
<run_depend>hos_cpp_cron</run_depend>
|
||||
<run_depend>hos_cosgi_scripting</run_depend>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
#include "RulePackage.h"
|
||||
#include <hos/cosgi/service/ruleengine/ruleengine_service.h>
|
||||
#include <hos/cosgi/service/devicerepository/devicerepository_service.h>
|
||||
#include <HosSchemaLoader/HosSchemaLoader.h>
|
||||
#include <hos/utils/SchemaLoader.h>
|
||||
#include "../ruleengine_serviceimpl.h"
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ Rule::Rule(RulePackage* parent, std::string name)
|
||||
: parent(parent), name(name) {}
|
||||
|
||||
|
||||
libvariant::HosSchemaLoader* Rule::getHOSSchemaLoader() {
|
||||
utils::SchemaLoader* Rule::getHOSSchemaLoader() {
|
||||
return parent->parent->getHOSSchemaLoader();
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -61,7 +61,7 @@ void RuleEngineServiceImpl::init() {
|
||||
nodehandle->getParam("ruleengine_prefix", ruleEnginePrefix);
|
||||
XmlRpc::XmlRpcValue rawValue;
|
||||
nodehandle->getParam(ruleEnginePrefix, rawValue);
|
||||
schemaLoader.reset(new libvariant::HosSchemaLoader());
|
||||
schemaLoader.reset(new utils::SchemaLoader());
|
||||
registerRuleConditionFactory("logical_or", std::make_shared<rule::LogicalOrConditionFactory>());
|
||||
registerRuleConditionFactory("logical_and", std::make_shared<rule::LogicalAndConditionFactory>());
|
||||
registerRuleConditionFactory("devicestatusmsg", std::make_shared<rule::DeviceStatusMsgConditionFactory>());
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
#include <hos_core_msgs/DeviceCommand.h>
|
||||
#include <hos_core_msgs/DeviceStatusUpdate.h>
|
||||
#include <hos_core_msgs/HosStatusUpdate.h>
|
||||
#include <HosSchemaLoader/HosSchemaLoader.h>
|
||||
#include <hos/utils/SchemaLoader.h>
|
||||
#include <hos/cosgi/service/ruleengine/ruleengine_service.h>
|
||||
#include <hos/cosgi/service/scripting/scripting_service.h>
|
||||
#include <hos/cosgi/service/devicerepository/devicerepository_service.h>
|
||||
@@ -72,7 +72,7 @@ private:
|
||||
execServiceMap_t execServices;
|
||||
condFactoryMap_t condFactories;
|
||||
|
||||
std::unique_ptr<libvariant::HosSchemaLoader> schemaLoader;
|
||||
std::unique_ptr<utils::SchemaLoader> schemaLoader;
|
||||
|
||||
bool initialized = false;
|
||||
|
||||
@@ -106,7 +106,7 @@ public:
|
||||
|
||||
std::shared_ptr<RuleConditionFactory> getRuleConditionFactory(std::string type) { return condFactories[type]; }
|
||||
|
||||
libvariant::HosSchemaLoader* getHOSSchemaLoader() { return schemaLoader.get(); }
|
||||
utils::SchemaLoader* getHOSSchemaLoader() { return schemaLoader.get(); }
|
||||
|
||||
devicerepository::DeviceRepositoryService* getDeviceRepository() { return repoService; }
|
||||
|
||||
|
||||
@@ -6,9 +6,13 @@ project(hos_cosgi_scripting)
|
||||
## is used, also find other catkin packages
|
||||
find_package(catkin REQUIRED COMPONENTS
|
||||
hos_cosgi_core
|
||||
hos_libvariant
|
||||
hos_deps
|
||||
)
|
||||
|
||||
|
||||
find_package(libvariant REQUIRED)
|
||||
|
||||
|
||||
## System dependencies are found with CMake's conventions
|
||||
# find_package(Boost REQUIRED COMPONENTS system)
|
||||
|
||||
@@ -81,7 +85,7 @@ find_package(catkin REQUIRED COMPONENTS
|
||||
catkin_package(
|
||||
INCLUDE_DIRS include/${PROJECT_NAME}/
|
||||
# LIBRARIES hos_cosgi_scripting
|
||||
CATKIN_DEPENDS hos_cosgi_core hos_libvariant
|
||||
CATKIN_DEPENDS hos_cosgi_core hos_deps
|
||||
# DEPENDS system_lib
|
||||
)
|
||||
|
||||
@@ -92,9 +96,6 @@ catkin_package(
|
||||
## Specify additional locations of header files
|
||||
## Your package locations should be listed before other locations
|
||||
# include_directories(include)
|
||||
include_directories(
|
||||
${catkin_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
## Declare a cpp library
|
||||
# add_library(hos_cosgi_scripting
|
||||
|
||||
@@ -41,9 +41,9 @@
|
||||
<!-- <test_depend>gtest</test_depend> -->
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
<build_depend>hos_cosgi_core</build_depend>
|
||||
<build_depend>hos_libvariant</build_depend>
|
||||
<build_depend>hos_deps</build_depend>
|
||||
<run_depend>hos_cosgi_core</run_depend>
|
||||
<run_depend>hos_libvariant</run_depend>
|
||||
<run_depend>hos_deps</run_depend>
|
||||
|
||||
|
||||
<!-- The export tag contains other, unspecified, tags -->
|
||||
|
||||
@@ -10,7 +10,7 @@ find_package(catkin REQUIRED COMPONENTS
|
||||
hos_cosgi_scripting
|
||||
hos_cosgi_devicerepository
|
||||
hos_cpp_utils
|
||||
hos_libvariant
|
||||
hos_deps
|
||||
)
|
||||
|
||||
## System dependencies are found with CMake's conventions
|
||||
@@ -25,6 +25,7 @@ find_package(catkin REQUIRED COMPONENTS
|
||||
find_package(APR REQUIRED)
|
||||
find_package(CELIX REQUIRED)
|
||||
find_package(Boost REQUIRED COMPONENTS python)
|
||||
find_package(libvariant REQUIRED)
|
||||
|
||||
|
||||
################################################
|
||||
@@ -90,7 +91,7 @@ find_package(Boost REQUIRED COMPONENTS python)
|
||||
catkin_package(
|
||||
# INCLUDE_DIRS include
|
||||
# LIBRARIES hos_cosgi_ruleexecution_python
|
||||
CATKIN_DEPENDS hos_celix hos_cosgi_core hos_cosgi_scripting hos_cpp_utils hos_libvariant hos_cosgi_devicerepository
|
||||
CATKIN_DEPENDS hos_celix hos_cosgi_core hos_cosgi_scripting hos_cpp_utils hos_deps hos_cosgi_devicerepository
|
||||
# DEPENDS system_lib
|
||||
)
|
||||
|
||||
@@ -110,7 +111,7 @@ include_directories(
|
||||
${APR_INCLUDE_DIR}
|
||||
${APR_INCLUDE_DIR}/apr-1.0
|
||||
include
|
||||
${hos_libvariant_INCLUDE_DIRS}/hos_libvariant
|
||||
${libvariant_INCLUDE_DIR}
|
||||
/usr/include/python2.7
|
||||
)
|
||||
|
||||
@@ -128,6 +129,7 @@ target_link_libraries(hos_cosgi_scripting_python
|
||||
${catkin_LIBRARIES}
|
||||
${APR_LIBRARIES}
|
||||
${Boost_LIBRARIES}
|
||||
${libvariant_LIBRARY}
|
||||
python2.7
|
||||
)
|
||||
|
||||
|
||||
@@ -44,13 +44,13 @@
|
||||
<build_depend>hos_cosgi_core</build_depend>
|
||||
<build_depend>hos_cosgi_scripting</build_depend>
|
||||
<build_depend>hos_cpp_utils</build_depend>
|
||||
<build_depend>hos_libvariant</build_depend>
|
||||
<build_depend>hos_deps</build_depend>
|
||||
<build_depend>hos_cosgi_devicerepository</build_depend>
|
||||
<run_depend>hos_celix</run_depend>
|
||||
<run_depend>hos_cosgi_core</run_depend>
|
||||
<run_depend>hos_cosgi_scripting</run_depend>
|
||||
<run_depend>hos_cpp_utils</run_depend>
|
||||
<run_depend>hos_libvariant</run_depend>
|
||||
<run_depend>hos_deps</run_depend>
|
||||
<run_depend>hos_cosgi_devicerepository</run_depend>
|
||||
|
||||
|
||||
|
||||
@@ -9,8 +9,7 @@ find_package(catkin REQUIRED COMPONENTS
|
||||
hos_cosgi_devicerepository
|
||||
hos_cosgi_core
|
||||
hos_cpp_utils
|
||||
hos_libhttpserver
|
||||
hos_libvariant
|
||||
hos_deps
|
||||
roscpp
|
||||
)
|
||||
|
||||
@@ -26,6 +25,8 @@ find_package(catkin REQUIRED COMPONENTS
|
||||
find_package(APR REQUIRED)
|
||||
find_package(CELIX REQUIRED)
|
||||
find_package(Boost REQUIRED)
|
||||
find_package(libvariant REQUIRED)
|
||||
find_package(libhttpserver REQUIRED)
|
||||
|
||||
################################################
|
||||
## Declare ROS messages, services and actions ##
|
||||
@@ -110,7 +111,8 @@ include_directories(
|
||||
${APR_INCLUDE_DIR}
|
||||
${APR_INCLUDE_DIR}/apr-1.0
|
||||
include/${PROJECT_NAME}/
|
||||
${hos_libvariant_INCLUDE_DIRS}/hos_libvariant
|
||||
${libvariant_INCLUDE_DIR}
|
||||
${libhttpserver_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(BUNDLE_SYMBOLICNAME "hos.hos_webserver")
|
||||
@@ -127,6 +129,8 @@ bundle(hos_cosgi_webserver
|
||||
target_link_libraries(hos_cosgi_webserver
|
||||
${catkin_LIBRARIES}
|
||||
${APR_LIBRARIES}
|
||||
${libvariant_LIBRARY}
|
||||
${libhttpserver_LIBRARY}
|
||||
)
|
||||
|
||||
|
||||
|
||||
-2
@@ -7,8 +7,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
|
||||
#include <hos/common/observable.h>
|
||||
#include <hos/cosgi/service/Interface.h>
|
||||
#include <memory>
|
||||
#include <Variant/Variant.h>
|
||||
|
||||
@@ -44,15 +44,13 @@
|
||||
<build_depend>hos_cosgi_devicerepository</build_depend>
|
||||
<build_depend>hos_cosgi_core</build_depend>
|
||||
<build_depend>hos_cpp_utils</build_depend>
|
||||
<build_depend>hos_libhttpserver</build_depend>
|
||||
<build_depend>hos_libvariant</build_depend>
|
||||
<build_depend>hos_deps</build_depend>
|
||||
<build_depend>roscpp</build_depend>
|
||||
<run_depend>hos_celix</run_depend>
|
||||
<run_depend>hos_cosgi_devicerepository</run_depend>
|
||||
<run_depend>hos_cosgi_core</run_depend>
|
||||
<run_depend>hos_cpp_utils</run_depend>
|
||||
<run_depend>hos_libhttpserver</run_depend>
|
||||
<run_depend>hos_libvariant</run_depend>
|
||||
<run_depend>hos_deps</run_depend>
|
||||
<run_depend>roscpp</run_depend>
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -11,14 +11,14 @@ namespace webserver {
|
||||
namespace resources {
|
||||
|
||||
using namespace httpserver;
|
||||
using namespace ::libvariant;
|
||||
using namespace libvariant;
|
||||
|
||||
|
||||
SchemaHTTPResource::SchemaHTTPResource(ros::NodeHandle* nodehandle, size_t prefixPathPieces)
|
||||
: nodehandle(nodehandle), prefixPathPieces(prefixPathPieces) {
|
||||
disallow_all();
|
||||
set_allowing(MHD_HTTP_METHOD_GET, true);
|
||||
schemaLoader.reset(new libvariant::HosSchemaLoader());
|
||||
schemaLoader.reset(new utils::SchemaLoader());
|
||||
}
|
||||
|
||||
|
||||
|
||||
+2
-2
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <ros/ros.h>
|
||||
#include <httpserver.hpp>
|
||||
#include <HosSchemaLoader/HosSchemaLoader.h>
|
||||
#include <hos/utils/SchemaLoader.h>
|
||||
|
||||
// Service Namespace
|
||||
namespace hos {
|
||||
@@ -18,7 +18,7 @@ namespace resources {
|
||||
class SchemaHTTPResource : public httpserver::http_resource<SchemaHTTPResource> {
|
||||
private:
|
||||
ros::NodeHandle* nodehandle = nullptr;
|
||||
std::unique_ptr<libvariant::HosSchemaLoader> schemaLoader;
|
||||
std::unique_ptr<utils::SchemaLoader> schemaLoader;
|
||||
size_t prefixPathPieces;
|
||||
public:
|
||||
SchemaHTTPResource(ros::NodeHandle* nodehandle, size_t prefixPathPieces);
|
||||
|
||||
@@ -5,10 +5,15 @@ project(hos_cpp_utils)
|
||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
||||
## is used, also find other catkin packages
|
||||
find_package(catkin REQUIRED COMPONENTS
|
||||
hos_libvariant
|
||||
roscpp
|
||||
hos_deps
|
||||
)
|
||||
|
||||
message("CMAKE_MODULE_PATH: ${CMAKE_MODULE_PATH}")
|
||||
find_package(libvariant REQUIRED)
|
||||
message("libvariant_INCLUDE_DIR: ${libvariant_INCLUDE_DIR}")
|
||||
message("libvariant_LIBRARY: ${libvariant_LIBRARY}")
|
||||
|
||||
## System dependencies are found with CMake's conventions
|
||||
# find_package(Boost REQUIRED COMPONENTS system)
|
||||
|
||||
@@ -81,8 +86,6 @@ find_package(catkin REQUIRED COMPONENTS
|
||||
catkin_package(
|
||||
INCLUDE_DIRS include/${PROJECT_NAME}/
|
||||
LIBRARIES hos_cpp_utils
|
||||
CATKIN_DEPENDS roscpp
|
||||
# DEPENDS system_lib
|
||||
)
|
||||
|
||||
###########
|
||||
@@ -96,16 +99,17 @@ add_definitions(
|
||||
|
||||
include_directories(
|
||||
${catkin_INCLUDE_DIRS}
|
||||
include
|
||||
include/hos_libvariant
|
||||
${libvariant_INCLUDE_DIR}
|
||||
include/hos_cpp_utils
|
||||
)
|
||||
|
||||
## Declare a cpp library
|
||||
add_library(hos_cpp_utils STATIC
|
||||
src/HosSchemaLoader/HosSchemaLoader.cpp
|
||||
src/hos/utils/SchemaLoader.cpp
|
||||
)
|
||||
target_link_libraries(hos_cpp_utils
|
||||
${catkin_LIBRARIES}
|
||||
${libvariant_LIBRARY}
|
||||
)
|
||||
|
||||
## Specify additional locations of header files
|
||||
|
||||
+9
-13
@@ -1,37 +1,33 @@
|
||||
/*
|
||||
* HosSchemaLoader.h
|
||||
*
|
||||
* Created on: 24.04.2015
|
||||
* Author: matzman
|
||||
*/
|
||||
|
||||
#ifndef SRC_HOSSCHEMALOADER_H_
|
||||
#define SRC_HOSSCHEMALOADER_H_
|
||||
#pragma once
|
||||
|
||||
|
||||
|
||||
#include <Variant/Schema.h>
|
||||
#include <ros/ros.h>
|
||||
#include <string>
|
||||
|
||||
|
||||
|
||||
namespace hos {
|
||||
namespace libvariant {
|
||||
namespace utils {
|
||||
|
||||
|
||||
class HosSchemaLoader: public ::libvariant::SchemaLoader {
|
||||
|
||||
class SchemaLoader: public libvariant::SchemaLoader {
|
||||
private:
|
||||
std::string ros_param_ns;
|
||||
std::string prefix;
|
||||
ros::NodeHandle nodeHandle;
|
||||
bool loadTypeSchema(std::string schema);
|
||||
public:
|
||||
HosSchemaLoader(std::string ns = "/hos/types/repository", std::string prefix = "hos:schema://")
|
||||
SchemaLoader(std::string ns = "/hos/types/repository", std::string prefix = "hos:schema://")
|
||||
: ros_param_ns(ns), prefix(prefix), nodeHandle("~") {}
|
||||
virtual bool HandleMissing(const std::string &uri, LoaderError &error);
|
||||
};
|
||||
|
||||
|
||||
|
||||
} // namespace libvariant
|
||||
} // namespace hos
|
||||
|
||||
|
||||
#endif /* SRC_HOSSCHEMALOADER_H_ */
|
||||
@@ -33,7 +33,7 @@
|
||||
<!-- Examples: -->
|
||||
<!-- Use build_depend for packages you need at compile time: -->
|
||||
<!-- <build_depend>message_generation</build_depend> -->
|
||||
<!-- <build_depend>message_generation</build_depend>
|
||||
<!-- <build_depend>message_generation</build_depend> -->
|
||||
<!-- Use buildtool_depend for build tool packages: -->
|
||||
<!-- <buildtool_depend>catkin</buildtool_depend> -->
|
||||
<!-- Use run_depend for packages you need at runtime: -->
|
||||
@@ -43,7 +43,11 @@
|
||||
<!-- <test_depend>gtest</test_depend> -->
|
||||
<buildtool_depend>catkin</buildtool_depend>
|
||||
<build_depend>hos_libvariant</build_depend>
|
||||
<build_depend>roscpp</build_depend>
|
||||
<build_depend>hos_deps</build_depend>
|
||||
<run_depend>hos_libvariant</run_depend>
|
||||
<run_depend>roscpp</run_depend>
|
||||
<run_depend>hos_deps</run_depend>
|
||||
|
||||
|
||||
<!-- The export tag contains other, unspecified, tags -->
|
||||
@@ -51,4 +55,4 @@
|
||||
<!-- Other tools can request additional information be placed here -->
|
||||
|
||||
</export>
|
||||
</package>
|
||||
</package>
|
||||
|
||||
+6
-10
@@ -1,18 +1,14 @@
|
||||
/*
|
||||
* HosSchemaLoader.cpp
|
||||
*
|
||||
* Created on: 24.04.2015
|
||||
* Author: matzman
|
||||
*/
|
||||
|
||||
#include <HosSchemaLoader/HosSchemaLoader.h>
|
||||
|
||||
#include <hos/utils/SchemaLoader.h>
|
||||
|
||||
|
||||
|
||||
namespace hos {
|
||||
namespace libvariant {
|
||||
namespace utils {
|
||||
|
||||
|
||||
bool HosSchemaLoader::HandleMissing(const std::string &uri, LoaderError &error) {
|
||||
bool SchemaLoader::HandleMissing(const std::string &uri, LoaderError &error) {
|
||||
if (uri.compare(0, prefix.size(), prefix) == 0) {
|
||||
return loadTypeSchema(uri.substr(prefix.size()));
|
||||
} else {
|
||||
@@ -20,7 +16,7 @@ bool HosSchemaLoader::HandleMissing(const std::string &uri, LoaderError &error)
|
||||
}
|
||||
}
|
||||
|
||||
bool HosSchemaLoader::loadTypeSchema(std::string schema) {
|
||||
bool SchemaLoader::loadTypeSchema(std::string schema) {
|
||||
std::string pkey = std::string(ros_param_ns).append("/").append(schema);
|
||||
std::string pvalue;
|
||||
nodeHandle.getParam(pkey, pvalue);
|
||||
@@ -0,0 +1,24 @@
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(hos_deps)
|
||||
|
||||
|
||||
find_package(catkin REQUIRED)
|
||||
|
||||
|
||||
###################################
|
||||
## catkin specific configuration ##
|
||||
###################################
|
||||
|
||||
catkin_package(
|
||||
CFG_EXTRAS hos_deps.cmake
|
||||
)
|
||||
|
||||
|
||||
#############
|
||||
## Install ##
|
||||
#############
|
||||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules
|
||||
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/cmake/
|
||||
# FILES_MATCHING PATTERN "*.cmake"
|
||||
)
|
||||
@@ -0,0 +1,23 @@
|
||||
|
||||
find_path(libhttpserver_INCLUDE_DIR httpserver.hpp
|
||||
PATHS $ENV{HOS_PREFIX}/libhttpserver
|
||||
PATH_SUFFIXES include
|
||||
)
|
||||
|
||||
find_path(libmicrohttpd_INCLUDE_DIR microhttpd.h
|
||||
PATHS $ENV{HOS_PREFIX}/libmicrohttpd
|
||||
PATH_SUFFIXES include
|
||||
)
|
||||
|
||||
find_library(libhttpserver_LIBRARY httpserver
|
||||
PATHS $ENV{HOS_PREFIX}/libhttpserver
|
||||
PATH_SUFFIXES lib lib64
|
||||
)
|
||||
|
||||
find_library(libmicrohttpd_LIBRARY microhttpd
|
||||
PATHS $ENV{HOS_PREFIX}/libmicrohttpd
|
||||
PATH_SUFFIXES lib lib64
|
||||
)
|
||||
|
||||
set(libhttpserver_INCLUDE_DIRS "${libhttpserver_INCLUDE_DIR}" "${libmicrohttpd_INCLUDE_DIR}")
|
||||
set(libhttpserver_LIBRARIES "${libhttpserver_LIBRARY}" "${libmicrohttpd_LIBRARY}")
|
||||
@@ -0,0 +1,10 @@
|
||||
|
||||
find_path(libvariant_INCLUDE_DIR Variant/Variant.h
|
||||
PATHS $ENV{HOS_PREFIX}/libvariant
|
||||
PATH_SUFFIXES include
|
||||
)
|
||||
|
||||
find_library(libvariant_LIBRARY Variant
|
||||
PATHS $ENV{HOS_PREFIX}/libvariant
|
||||
PATH_SUFFIXES lib lib64
|
||||
)
|
||||
@@ -0,0 +1,2 @@
|
||||
# Append cmake modules from source directory to the cmake module path
|
||||
list(APPEND CMAKE_MODULE_PATH "@CMAKE_CURRENT_SOURCE_DIR@/cmake/Modules")
|
||||
@@ -0,0 +1,2 @@
|
||||
# Append the installed cmake modules to the cmake module path
|
||||
list(APPEND CMAKE_MODULE_PATH "${hos_deps_DIR}/Modules")
|
||||
Executable
+16
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
|
||||
CWD=`dirname "$0"`/scripts
|
||||
cd $CWD
|
||||
|
||||
echo "Installing libvariant"
|
||||
./libvariant_install.sh
|
||||
|
||||
echo "Installing libgcrypt"
|
||||
./libgcrypt_install.sh
|
||||
|
||||
echo "Installing libmicrohttpd"
|
||||
./libmicrohttpd_install.sh
|
||||
|
||||
echo "Installing libhttpserver"
|
||||
./libhttpserver_install.sh
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0"?>
|
||||
<package>
|
||||
<name>hos_libhttpserver</name>
|
||||
<name>hos_deps</name>
|
||||
<version>0.0.0</version>
|
||||
<description>The hos_libhttpserver package</description>
|
||||
<description>The hos_deps package</description>
|
||||
|
||||
<!-- One maintainer tag required, multiple allowed, one person per tag -->
|
||||
<!-- Example: -->
|
||||
@@ -19,7 +19,7 @@
|
||||
<!-- Url tags are optional, but mutiple are allowed, one per tag -->
|
||||
<!-- Optional attribute type can be: website, bugtracker, or repository -->
|
||||
<!-- Example: -->
|
||||
<!-- <url type="website">http://wiki.ros.org/hos_libhttpserver</url> -->
|
||||
<!-- <url type="website">http://wiki.ros.org/hos_deps</url> -->
|
||||
|
||||
|
||||
<!-- Author tags are optional, mutiple are allowed, one per tag -->
|
||||
@@ -0,0 +1,20 @@
|
||||
#
|
||||
# This script should be included by all installation scripts to set up environment parameters.
|
||||
#
|
||||
|
||||
# determine working directory
|
||||
CWD=${1:-`dirname "$0"`}
|
||||
export CWD=`realpath "$CWD"`
|
||||
|
||||
# determine installation directory
|
||||
export PREFIX=${PREFIX:-${CWD}/../deps-install}
|
||||
|
||||
# determine temporary directory
|
||||
export TMP=${TMP:-${CWD}/../deps-tmp}
|
||||
|
||||
# determine number of cores to be used for compiling code (default = all)
|
||||
export SLOTS=${SLOTS:-`grep 'processor' /proc/cpuinfo | sort -u | wc -l`}
|
||||
|
||||
# using default system compiler
|
||||
export CC=${CC:-gcc}
|
||||
export CXX=${CXX:-g++}
|
||||
Executable
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
. ./environment.setup
|
||||
|
||||
|
||||
NAME=libgcrypt
|
||||
VERSION=1.6.3
|
||||
PACKAGE=$NAME-$VERSION
|
||||
FILE=$PACKAGE.tar.bz2
|
||||
URL=ftp://ftp.gnupg.org/gcrypt/libgcrypt/$FILE
|
||||
|
||||
|
||||
# Download
|
||||
if [ -f $TMP/$FILE ]; then
|
||||
echo "$TMP/$FILE already exists"
|
||||
else
|
||||
wget -nd $URL -O $TMP/$FILE
|
||||
RET=$?
|
||||
if [ $RET -ne 0 ]; then
|
||||
exit $RET
|
||||
fi
|
||||
fi
|
||||
rm -rf $TMP/$PACKAGE
|
||||
tar xf $TMP/$FILE -C $TMP
|
||||
|
||||
|
||||
# Compile
|
||||
cd ${TMP}/$PACKAGE
|
||||
mkdir build
|
||||
cd build
|
||||
CC=$CC CXX=$CXX CFLAGS=$CFLAGS ../configure --prefix $PREFIX/$NAME
|
||||
make all -j $SLOTS
|
||||
|
||||
|
||||
#Install
|
||||
make install
|
||||
|
||||
+38
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
. ./environment.setup
|
||||
|
||||
|
||||
NAME=libhttpserver
|
||||
VERSION=0.9.0
|
||||
PACKAGE=$NAME-$VERSION
|
||||
FILE=$PACKAGE.tar.gz
|
||||
DOWNLOADFILE=v$VERSION.tar.gz
|
||||
URL=https://github.com/etr/libhttpserver/archive/$DOWNLOADFILE
|
||||
|
||||
|
||||
# Download
|
||||
if [ -f $TMP/$FILE ]; then
|
||||
echo "$TMP/$FILE already exists"
|
||||
else
|
||||
wget -nd $URL -O $TMP/$FILE
|
||||
RET=$?
|
||||
if [ $RET -ne 0 ]; then
|
||||
exit $RET
|
||||
fi
|
||||
fi
|
||||
rm -rf $TMP/$PACKAGE
|
||||
tar xf $TMP/$FILE -C $TMP
|
||||
|
||||
|
||||
# Compile
|
||||
cd ${TMP}/$PACKAGE
|
||||
./bootstrap
|
||||
mkdir build
|
||||
cd build
|
||||
PKG_CONFIG_PATH=$PREFIX/libmicrohttpd/lib/pkgconfig:$PREFIX/libmicrohttpd/lib64/pkgconfig CC=$CC CXX=$CXX CFLAGS=$CFLAGS ../configure --prefix $PREFIX/$NAME --enable-cpp11
|
||||
make all -j $SLOTS
|
||||
|
||||
|
||||
#Install
|
||||
make install
|
||||
|
||||
+36
@@ -0,0 +1,36 @@
|
||||
#!/bin/bash
|
||||
. ./environment.setup
|
||||
|
||||
|
||||
NAME=libmicrohttpd
|
||||
VERSION=0.9.42
|
||||
PACKAGE=$NAME-$VERSION
|
||||
FILE=$PACKAGE.tar.gz
|
||||
URL=http://ftp.gnu.org/gnu/libmicrohttpd/$FILE
|
||||
|
||||
|
||||
# Download
|
||||
if [ -f $TMP/$FILE ]; then
|
||||
echo "$TMP/$FILE already exists"
|
||||
else
|
||||
wget -nd $URL -O $TMP/$FILE
|
||||
RET=$?
|
||||
if [ $RET -ne 0 ]; then
|
||||
exit $RET
|
||||
fi
|
||||
fi
|
||||
rm -rf $TMP/$PACKAGE
|
||||
tar xf $TMP/$FILE -C $TMP
|
||||
|
||||
|
||||
# Compile
|
||||
cd ${TMP}/$PACKAGE
|
||||
mkdir build
|
||||
cd build
|
||||
CC=$CC CXX=$CXX CFLAGS=$CFLAGS ../configure --prefix $PREFIX/$NAME --with-libgcrypt-prefix=$PREFIX/libgcrypt
|
||||
make all -j $SLOTS
|
||||
|
||||
|
||||
#Install
|
||||
make install
|
||||
|
||||
Executable
+30
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
. ./environment.setup
|
||||
|
||||
|
||||
HG_REPO_URL=https://bitbucket.org/gallen/libvariant
|
||||
|
||||
|
||||
# Download
|
||||
hg clone $HG_REPO_URL $TMP/libvariant
|
||||
|
||||
|
||||
# Compile
|
||||
cd $TMP/libvariant
|
||||
mkdir build
|
||||
cd build
|
||||
CC=$CC CXX=$CXX CFLAGS=$CFLAGS cmake .. -DCMAKE_INSTALL_PREFIX=$PREFIX/libvariant \
|
||||
-DBUILD_SHARED_LIBS=TRUE \
|
||||
-DLIBVARIANT_BUILD_EXAMPLES=FALSE \
|
||||
-DLIBVARIANT_BUILD_TESTS=FALSE \
|
||||
-DLIBVARIANT_BUILD_WALL=TRUE \
|
||||
-DLIBVARIANT_ENABLE_CURL=TRUE \
|
||||
-DLIBVARIANT_ENABLE_MSGPACK=FALSE \
|
||||
-DLIBVARIANT_ENABLE_XML=TRUE \
|
||||
-DLIBVARIANT_ENABLE_YAML=TRUE
|
||||
make all -j $SLOTS
|
||||
|
||||
|
||||
#Install
|
||||
make install
|
||||
|
||||
@@ -1,210 +0,0 @@
|
||||
cmake_minimum_required(VERSION 2.8.3)
|
||||
project(hos_libhttpserver)
|
||||
|
||||
## Find catkin macros and libraries
|
||||
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
|
||||
## is used, also find other catkin packages
|
||||
find_package(catkin REQUIRED)
|
||||
|
||||
## System dependencies are found with CMake's conventions
|
||||
# find_package(Boost REQUIRED COMPONENTS system)
|
||||
|
||||
|
||||
## Uncomment this if the package has a setup.py. This macro ensures
|
||||
## modules and global scripts declared therein get installed
|
||||
## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html
|
||||
# catkin_python_setup()
|
||||
|
||||
################################################
|
||||
## Declare ROS messages, services and actions ##
|
||||
################################################
|
||||
|
||||
## To declare and build messages, services or actions from within this
|
||||
## package, follow these steps:
|
||||
## * Let MSG_DEP_SET be the set of packages whose message types you use in
|
||||
## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...).
|
||||
## * In the file package.xml:
|
||||
## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET
|
||||
## * If MSG_DEP_SET isn't empty the following dependencies might have been
|
||||
## pulled in transitively but can be declared for certainty nonetheless:
|
||||
## * add a build_depend tag for "message_generation"
|
||||
## * add a run_depend tag for "message_runtime"
|
||||
## * In this file (CMakeLists.txt):
|
||||
## * add "message_generation" and every package in MSG_DEP_SET to
|
||||
## find_package(catkin REQUIRED COMPONENTS ...)
|
||||
## * add "message_runtime" and every package in MSG_DEP_SET to
|
||||
## catkin_package(CATKIN_DEPENDS ...)
|
||||
## * uncomment the add_*_files sections below as needed
|
||||
## and list every .msg/.srv/.action file to be processed
|
||||
## * uncomment the generate_messages entry below
|
||||
## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...)
|
||||
|
||||
## Generate messages in the 'msg' folder
|
||||
# add_message_files(
|
||||
# FILES
|
||||
# Message1.msg
|
||||
# Message2.msg
|
||||
# )
|
||||
|
||||
## Generate services in the 'srv' folder
|
||||
# add_service_files(
|
||||
# FILES
|
||||
# Service1.srv
|
||||
# Service2.srv
|
||||
# )
|
||||
|
||||
## Generate actions in the 'action' folder
|
||||
# add_action_files(
|
||||
# FILES
|
||||
# Action1.action
|
||||
# Action2.action
|
||||
# )
|
||||
|
||||
## Generate added messages and services with any dependencies listed here
|
||||
# generate_messages(
|
||||
# DEPENDENCIES
|
||||
# std_msgs # Or other packages containing msgs
|
||||
# )
|
||||
|
||||
###################################
|
||||
## catkin specific configuration ##
|
||||
###################################
|
||||
## The catkin_package macro generates cmake config files for your package
|
||||
## Declare things to be passed to dependent projects
|
||||
## INCLUDE_DIRS: uncomment this if you package contains header files
|
||||
## LIBRARIES: libraries you create in this project that dependent projects also need
|
||||
## CATKIN_DEPENDS: catkin_packages dependent projects also need
|
||||
## DEPENDS: system dependencies of this project that dependent projects also need
|
||||
catkin_package(
|
||||
INCLUDE_DIRS include/${PROJECT_NAME}/
|
||||
LIBRARIES gcrypt microhttpd httpserver
|
||||
# CATKIN_DEPENDS other_catkin_pkg
|
||||
# DEPENDS system_lib
|
||||
)
|
||||
|
||||
###########
|
||||
## Build ##
|
||||
###########
|
||||
|
||||
|
||||
include(ExternalProject)
|
||||
|
||||
ExternalProject_Add( libgcrypt_project
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/libgcrypt
|
||||
CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/src/libgcrypt/configure --prefix ${CATKIN_DEVEL_PREFIX} --libdir=${CATKIN_DEVEL_PREFIX}/lib
|
||||
BUILD_COMMAND make all
|
||||
INSTALL_COMMAND make install
|
||||
)
|
||||
|
||||
add_library( gcrypt SHARED IMPORTED )
|
||||
set_property( TARGET gcrypt PROPERTY IMPORTED_LOCATION "${CATKIN_DEVEL_PREFIX}/lib/libgcrypt.so")
|
||||
add_dependencies( gcrypt libgcrypt_project )
|
||||
|
||||
|
||||
ExternalProject_Add( libmicrohttpd_project
|
||||
DEPENDS libgcrypt_project
|
||||
SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/libmicrohttpd
|
||||
CONFIGURE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/src/libmicrohttpd/configure --prefix ${CATKIN_DEVEL_PREFIX} --with-libgcrypt-prefix=${CATKIN_DEVEL_PREFIX} --libdir=${CATKIN_DEVEL_PREFIX}/lib
|
||||
BUILD_COMMAND make all
|
||||
INSTALL_COMMAND make install
|
||||
)
|
||||
|
||||
add_library( microhttpd SHARED IMPORTED )
|
||||
set_property( TARGET microhttpd PROPERTY IMPORTED_LOCATION "${CATKIN_DEVEL_PREFIX}/lib/libmicrohttpd.so")
|
||||
add_dependencies( microhttpd libmicrohttpd_project )
|
||||
|
||||
|
||||
ExternalProject_Add( libhttpserver_project
|
||||
DEPENDS libmicrohttpd_project
|
||||
#SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/src/libhttpserver
|
||||
DOWNLOAD_COMMAND cp -rf ${CMAKE_CURRENT_SOURCE_DIR}/src/libhttpserver ${CMAKE_CURRENT_BINARY_DIR} && cd ${CMAKE_CURRENT_BINARY_DIR}/libhttpserver && ./bootstrap
|
||||
CONFIGURE_COMMAND PKG_CONFIG_PATH=${CATKIN_DEVEL_PREFIX}/lib/pkgconfig ${CMAKE_CURRENT_BINARY_DIR}/libhttpserver/configure --prefix ${CATKIN_DEVEL_PREFIX} --libdir=${CATKIN_DEVEL_PREFIX}/lib --enable-cpp11
|
||||
BUILD_COMMAND make
|
||||
INSTALL_COMMAND make install
|
||||
)
|
||||
|
||||
add_library( httpserver SHARED IMPORTED )
|
||||
set_property( TARGET httpserver PROPERTY IMPORTED_LOCATION "${CATKIN_DEVEL_PREFIX}/lib/libhttpserver.so")
|
||||
add_dependencies( httpserver libhttpserver_project )
|
||||
|
||||
|
||||
## Specify additional locations of header files
|
||||
## Your package locations should be listed before other locations
|
||||
# include_directories(include)
|
||||
|
||||
## Declare a cpp library
|
||||
# add_library(hos_libhttpserver
|
||||
# src/${PROJECT_NAME}/hos_libhttpserver.cpp
|
||||
# )
|
||||
|
||||
## Declare a cpp executable
|
||||
# add_executable(hos_libhttpserver_node src/hos_libhttpserver_node.cpp)
|
||||
|
||||
## Add cmake target dependencies of the executable/library
|
||||
## as an example, message headers may need to be generated before nodes
|
||||
# add_dependencies(hos_libhttpserver_node hos_libhttpserver_generate_messages_cpp)
|
||||
|
||||
## Specify libraries to link a library or executable target against
|
||||
# target_link_libraries(hos_libhttpserver_node
|
||||
# ${catkin_LIBRARIES}
|
||||
# )
|
||||
|
||||
#############
|
||||
## Install ##
|
||||
#############
|
||||
|
||||
|
||||
install(DIRECTORY include/${PROJECT_NAME}/
|
||||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
||||
)
|
||||
install(DIRECTORY ${CATKIN_DEVEL_PREFIX}/lib/
|
||||
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
)
|
||||
install(DIRECTORY ${CATKIN_DEVEL_PREFIX}/bin/
|
||||
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
USE_SOURCE_PERMISSIONS
|
||||
)
|
||||
|
||||
# all install targets should use catkin DESTINATION variables
|
||||
# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html
|
||||
|
||||
## Mark executable scripts (Python etc.) for installation
|
||||
## in contrast to setup.py, you can choose the destination
|
||||
# install(PROGRAMS
|
||||
# scripts/my_python_script
|
||||
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark executables and/or libraries for installation
|
||||
# install(TARGETS hos_libhttpserver hos_libhttpserver_node
|
||||
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
|
||||
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
|
||||
# )
|
||||
|
||||
## Mark cpp header files for installation
|
||||
# install(DIRECTORY include/${PROJECT_NAME}/
|
||||
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
|
||||
# FILES_MATCHING PATTERN "*.h"
|
||||
# PATTERN ".svn" EXCLUDE
|
||||
# )
|
||||
|
||||
## Mark other files for installation (e.g. launch and bag files, etc.)
|
||||
# install(FILES
|
||||
# # myfile1
|
||||
# # myfile2
|
||||
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
|
||||
# )
|
||||
|
||||
#############
|
||||
## Testing ##
|
||||
#############
|
||||
|
||||
## Add gtest based cpp test target and link libraries
|
||||
# catkin_add_gtest(${PROJECT_NAME}-test test/test_hos_libhttpserver.cpp)
|
||||
# if(TARGET ${PROJECT_NAME}-test)
|
||||
# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME})
|
||||
# endif()
|
||||
|
||||
## Add folders to be run by python nosetests
|
||||
# catkin_add_nosetests(test)
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,37 +0,0 @@
|
||||
/*
|
||||
This file is part of libhttpserver
|
||||
Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
*/
|
||||
|
||||
#ifndef _HTTPSERVER_HPP_
|
||||
#define _HTTPSERVER_HPP_
|
||||
|
||||
#define _HTTPSERVER_HPP_INSIDE_
|
||||
|
||||
#include "httpserver/http_utils.hpp"
|
||||
#include "httpserver/details/http_endpoint.hpp"
|
||||
#include "httpserver/http_resource.hpp"
|
||||
#include "httpserver/http_response.hpp"
|
||||
#include "httpserver/http_response_builder.hpp"
|
||||
#include "httpserver/http_request.hpp"
|
||||
#include "httpserver/event_supplier.hpp"
|
||||
#include "httpserver/details/event_tuple.hpp"
|
||||
#include "httpserver/details/http_resource_mirror.hpp"
|
||||
#include "httpserver/webserver.hpp"
|
||||
|
||||
#endif
|
||||
@@ -1,374 +0,0 @@
|
||||
/*
|
||||
This file is part of libhttpserver
|
||||
Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
*/
|
||||
|
||||
#if !defined (_HTTPSERVER_HPP_INSIDE_) && !defined (HTTPSERVER_COMPILATION)
|
||||
#error "Only <httpserver.hpp> or <httpserverpp> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef _BINDERS_HPP_
|
||||
#define _BINDERS_HPP_
|
||||
|
||||
namespace httpserver {
|
||||
namespace details
|
||||
{
|
||||
namespace binders
|
||||
{
|
||||
class generic_class;
|
||||
const int MEMFUNC_SIZE = sizeof(void (generic_class::*)());
|
||||
|
||||
template<int N>
|
||||
struct converter
|
||||
{
|
||||
template<typename X,
|
||||
typename func_type,
|
||||
typename generic_mem_func_type>
|
||||
inline static generic_class* convert(
|
||||
X* pmem,
|
||||
func_type func,
|
||||
generic_mem_func_type &bound
|
||||
)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
};
|
||||
|
||||
template<>
|
||||
struct converter<MEMFUNC_SIZE>
|
||||
{
|
||||
template<typename X,
|
||||
typename func_type,
|
||||
typename generic_mem_func_type>
|
||||
inline static generic_class* convert(
|
||||
X* pmem,
|
||||
func_type func,
|
||||
generic_mem_func_type &bound
|
||||
)
|
||||
{
|
||||
bound = reinterpret_cast<generic_mem_func_type>(func);
|
||||
return reinterpret_cast<generic_class*>(pmem);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename generic_mem,
|
||||
typename static_function,
|
||||
typename void_static_function>
|
||||
class binder
|
||||
{
|
||||
private:
|
||||
typedef void (generic_class::*generic_mem_fun)();
|
||||
typedef void (*generic_mem_ptr)();
|
||||
|
||||
generic_class *pmem;
|
||||
generic_mem_fun _pfunc;
|
||||
generic_mem_ptr _spfunc;
|
||||
|
||||
public:
|
||||
binder()
|
||||
{
|
||||
}
|
||||
|
||||
binder(const binder& o):
|
||||
pmem(o.pmem),
|
||||
_pfunc(o._pfunc),
|
||||
_spfunc(o._spfunc)
|
||||
{
|
||||
}
|
||||
|
||||
template<typename X, typename Y>
|
||||
binder(X* pmem, Y fun):
|
||||
pmem(converter<sizeof(fun)>::convert(pmem, fun, _pfunc)),
|
||||
_spfunc(0)
|
||||
{
|
||||
}
|
||||
|
||||
template<class DC, class parent_invoker>
|
||||
binder(DC* pp, parent_invoker invoker, static_function fun):
|
||||
pmem(converter<sizeof(invoker)>::convert(pp, invoker, _pfunc)),
|
||||
_spfunc(reinterpret_cast<generic_mem_ptr>(fun))
|
||||
{
|
||||
}
|
||||
|
||||
inline generic_class* exec() const
|
||||
{
|
||||
return pmem;
|
||||
}
|
||||
inline generic_mem get_mem_ptr() const
|
||||
{
|
||||
return reinterpret_cast<const generic_mem>(_pfunc);
|
||||
}
|
||||
inline void_static_function get_static_func() const
|
||||
{
|
||||
return reinterpret_cast<void_static_function>(_spfunc);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename RET_TYPE=void>
|
||||
class functor_zero
|
||||
{
|
||||
private:
|
||||
typedef RET_TYPE (*static_function)();
|
||||
typedef RET_TYPE (*void_static_function)();
|
||||
typedef RET_TYPE (generic_class::*generic_mem)();
|
||||
typedef binder<generic_mem,
|
||||
static_function, void_static_function> binder_type;
|
||||
binder_type _binder;
|
||||
|
||||
RET_TYPE exec_static() const
|
||||
{
|
||||
return (*(_binder.get_static_func()))();
|
||||
}
|
||||
|
||||
functor_zero& operator=(const functor_zero&)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
public:
|
||||
typedef functor_zero type;
|
||||
functor_zero() { }
|
||||
|
||||
template <typename X, typename Y>
|
||||
functor_zero(Y* pmem, RET_TYPE(X::*func)()):
|
||||
_binder(reinterpret_cast<X*>(pmem), func)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename X, typename Y>
|
||||
functor_zero(Y* pmem, RET_TYPE(X::*func)() const ):
|
||||
_binder(reinterpret_cast<X*>(pmem), func)
|
||||
{
|
||||
}
|
||||
|
||||
functor_zero(RET_TYPE(*func)() ):
|
||||
_binder(this, &functor_zero::exec_static, func)
|
||||
{
|
||||
}
|
||||
|
||||
RET_TYPE operator() () const
|
||||
{
|
||||
return (_binder.exec()->*(_binder.get_mem_ptr()))();
|
||||
}
|
||||
};
|
||||
|
||||
template<typename PAR1, typename RET_TYPE=void>
|
||||
class functor_one
|
||||
{
|
||||
private:
|
||||
typedef RET_TYPE (*static_function)(PAR1 p1);
|
||||
typedef RET_TYPE (*void_static_function)(PAR1 p1);
|
||||
typedef RET_TYPE (generic_class::*generic_mem)(PAR1 p1);
|
||||
typedef binder<generic_mem,
|
||||
static_function, void_static_function> binder_type;
|
||||
binder_type _binder;
|
||||
|
||||
RET_TYPE exec_static(PAR1 p1) const
|
||||
{
|
||||
return (*(_binder.get_static_func()))(p1);
|
||||
}
|
||||
|
||||
functor_one& operator=(const functor_one&)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
public:
|
||||
typedef functor_one type;
|
||||
functor_one() { }
|
||||
|
||||
template <typename X, typename Y>
|
||||
functor_one(Y* pmem, RET_TYPE(X::*func)(PAR1 p1) ):
|
||||
_binder(reinterpret_cast<X*>(pmem), func)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename X, typename Y>
|
||||
functor_one(Y* pmem, RET_TYPE(X::*func)(PAR1 p1) const ):
|
||||
_binder(reinterpret_cast<X*>(pmem), func)
|
||||
{
|
||||
}
|
||||
|
||||
functor_one(RET_TYPE(*func)(PAR1 p1) ):
|
||||
_binder(this, &functor_one::exec_static, func)
|
||||
{
|
||||
}
|
||||
|
||||
RET_TYPE operator() (PAR1 p1) const
|
||||
{
|
||||
return (_binder.exec()->*(_binder.get_mem_ptr()))(p1);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename PAR1, typename PAR2, typename RET_TYPE=void>
|
||||
class functor_two
|
||||
{
|
||||
private:
|
||||
typedef RET_TYPE (*static_function)(PAR1 p1, PAR2 p2);
|
||||
typedef RET_TYPE (*void_static_function)(PAR1 p1, PAR2 p2);
|
||||
|
||||
typedef RET_TYPE
|
||||
(generic_class::*generic_mem)(PAR1 p1, PAR2 p2);
|
||||
|
||||
typedef binder<
|
||||
generic_mem, static_function, void_static_function
|
||||
> binder_type;
|
||||
|
||||
binder_type _binder;
|
||||
|
||||
RET_TYPE exec_static(PAR1 p1, PAR2 p2) const
|
||||
{
|
||||
return (*(_binder.get_static_func()))(p1, p2);
|
||||
}
|
||||
public:
|
||||
typedef functor_two type;
|
||||
functor_two() { }
|
||||
|
||||
functor_two(const functor_two& o):
|
||||
_binder(o._binder)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename X, typename Y>
|
||||
functor_two(Y* pmem, RET_TYPE(X::*func)(PAR1 p1, PAR2 p2) const ):
|
||||
_binder(reinterpret_cast<X*>(pmem), func)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename X, typename Y>
|
||||
functor_two(Y* pmem, RET_TYPE(X::*func)(PAR1 p1, PAR2 p2) ):
|
||||
_binder(reinterpret_cast<X*>(pmem), func)
|
||||
{
|
||||
}
|
||||
|
||||
functor_two(RET_TYPE(*func)(PAR1 p1, PAR2 p2) ):
|
||||
_binder(this, &functor_two::exec_static, func)
|
||||
{
|
||||
}
|
||||
|
||||
RET_TYPE operator() (PAR1 p1, PAR2 p2) const
|
||||
{
|
||||
return (_binder.exec()->*(_binder.get_mem_ptr()))(p1, p2);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename PAR1, typename PAR2, typename PAR3, typename RET_TYPE=void>
|
||||
class functor_three
|
||||
{
|
||||
private:
|
||||
typedef RET_TYPE (*static_function)(PAR1 p1, PAR2 p2, PAR3 p3);
|
||||
typedef RET_TYPE (*void_static_function)(PAR1 p1, PAR2 p2, PAR3 p3);
|
||||
|
||||
typedef RET_TYPE
|
||||
(generic_class::*generic_mem)(PAR1 p1, PAR2 p2, PAR3 p3);
|
||||
|
||||
typedef binder<
|
||||
generic_mem, static_function, void_static_function
|
||||
> binder_type;
|
||||
|
||||
binder_type _binder;
|
||||
|
||||
RET_TYPE exec_static(PAR1 p1, PAR2 p2, PAR3 p3) const
|
||||
{
|
||||
return (*(_binder.get_static_func()))(p1, p2, p3);
|
||||
}
|
||||
public:
|
||||
typedef functor_three type;
|
||||
functor_three() { }
|
||||
|
||||
functor_three(const functor_three& o):
|
||||
_binder(o._binder)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename X, typename Y>
|
||||
functor_three(Y* pmem, RET_TYPE(X::*func)(PAR1 p1, PAR2 p2, PAR3 p3) const ):
|
||||
_binder(reinterpret_cast<X*>(pmem), func)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename X, typename Y>
|
||||
functor_three(Y* pmem, RET_TYPE(X::*func)(PAR1 p1, PAR2 p2, PAR3 p3) ):
|
||||
_binder(reinterpret_cast<X*>(pmem), func)
|
||||
{
|
||||
}
|
||||
|
||||
functor_three(RET_TYPE(*func)(PAR1 p1, PAR2 p2, PAR3 p3) ):
|
||||
_binder(this, &functor_three::exec_static, func)
|
||||
{
|
||||
}
|
||||
|
||||
RET_TYPE operator() (PAR1 p1, PAR2 p2, PAR3 p3) const
|
||||
{
|
||||
return (_binder.exec()->*(_binder.get_mem_ptr()))(p1, p2, p3);
|
||||
}
|
||||
};
|
||||
|
||||
template<typename PAR1, typename PAR2, typename PAR3, typename PAR4, typename RET_TYPE=void>
|
||||
class functor_four
|
||||
{
|
||||
private:
|
||||
typedef RET_TYPE (*static_function)(PAR1 p1, PAR2 p2, PAR3 p3, PAR4 p4);
|
||||
typedef RET_TYPE (*void_static_function)(PAR1 p1, PAR2 p2, PAR3 p3, PAR4 p4);
|
||||
|
||||
typedef RET_TYPE
|
||||
(generic_class::*generic_mem)(PAR1 p1, PAR2 p2, PAR3 p3, PAR4 p4);
|
||||
|
||||
typedef binder<
|
||||
generic_mem, static_function, void_static_function
|
||||
> binder_type;
|
||||
|
||||
binder_type _binder;
|
||||
|
||||
RET_TYPE exec_static(PAR1 p1, PAR2 p2, PAR3 p3, PAR4 p4) const
|
||||
{
|
||||
return (*(_binder.get_static_func()))(p1, p2, p3, p4);
|
||||
}
|
||||
public:
|
||||
typedef functor_four type;
|
||||
functor_four() { }
|
||||
|
||||
functor_four(const functor_four& o):
|
||||
_binder(o._binder)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename X, typename Y>
|
||||
functor_four(Y* pmem, RET_TYPE(X::*func)(PAR1 p1, PAR2 p2, PAR3 p3, PAR4 p4) const ):
|
||||
_binder(reinterpret_cast<X*>(pmem), func)
|
||||
{
|
||||
}
|
||||
|
||||
template <typename X, typename Y>
|
||||
functor_four(Y* pmem, RET_TYPE(X::*func)(PAR1 p1, PAR2 p2, PAR3 p3, PAR4 p4) ):
|
||||
_binder(reinterpret_cast<X*>(pmem), func)
|
||||
{
|
||||
}
|
||||
|
||||
functor_four(RET_TYPE(*func)(PAR1 p1, PAR2 p2, PAR3 p3, PAR4 p4) ):
|
||||
_binder(this, &functor_four::exec_static, func)
|
||||
{
|
||||
}
|
||||
|
||||
RET_TYPE operator() (PAR1 p1, PAR2 p2, PAR3 p3, PAR4 p4) const
|
||||
{
|
||||
return (_binder.exec()->*(_binder.get_mem_ptr()))(p1, p2, p3, p4);
|
||||
}
|
||||
};
|
||||
}
|
||||
}}
|
||||
|
||||
#endif
|
||||
@@ -1,363 +0,0 @@
|
||||
/*
|
||||
This file is part of libhttpserver
|
||||
Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
*/
|
||||
|
||||
#if !defined (_HTTPSERVER_HPP_INSIDE_) && !defined (HTTPSERVER_COMPILATION)
|
||||
#error "Only <httpserver.hpp> or <httpserverpp> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef _CREATE_WEBSERVER_HPP_
|
||||
#define _CREATE_WEBSERVER_HPP_
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "httpserver/http_utils.hpp"
|
||||
|
||||
#define DEFAULT_WS_TIMEOUT 180
|
||||
#define DEFAULT_WS_PORT 9898
|
||||
|
||||
namespace httpserver {
|
||||
|
||||
class webserver;
|
||||
class http_request;
|
||||
class http_response;
|
||||
|
||||
typedef void(*render_ptr)(const http_request&, http_response**);
|
||||
typedef bool(*validator_ptr)(const std::string&);
|
||||
typedef void(*unescaper_ptr)(char*);
|
||||
typedef void(*log_access_ptr)(const std::string&);
|
||||
typedef void(*log_error_ptr)(const std::string&);
|
||||
|
||||
class create_webserver
|
||||
{
|
||||
public:
|
||||
create_webserver():
|
||||
_port(DEFAULT_WS_PORT),
|
||||
_start_method(http::http_utils::INTERNAL_SELECT),
|
||||
_max_threads(0),
|
||||
_max_connections(0),
|
||||
_memory_limit(0),
|
||||
_connection_timeout(DEFAULT_WS_TIMEOUT),
|
||||
_per_IP_connection_limit(0),
|
||||
_log_access(0x0),
|
||||
_log_error(0x0),
|
||||
_validator(0x0),
|
||||
_unescaper(0x0),
|
||||
_bind_address(0x0),
|
||||
_bind_socket(0),
|
||||
_max_thread_stack_size(0),
|
||||
_use_ssl(false),
|
||||
_use_ipv6(false),
|
||||
_debug(false),
|
||||
_pedantic(false),
|
||||
_https_mem_key(""),
|
||||
_https_mem_cert(""),
|
||||
_https_mem_trust(""),
|
||||
_https_priorities(""),
|
||||
_cred_type(http::http_utils::NONE),
|
||||
_digest_auth_random(""),
|
||||
_nonce_nc_size(0),
|
||||
_default_policy(http::http_utils::ACCEPT),
|
||||
_basic_auth_enabled(true),
|
||||
_digest_auth_enabled(true),
|
||||
_regex_checking(true),
|
||||
_ban_system_enabled(true),
|
||||
_post_process_enabled(true),
|
||||
_single_resource(0x0),
|
||||
_not_found_resource(0x0),
|
||||
_method_not_allowed_resource(0x0),
|
||||
_method_not_acceptable_resource(0x0),
|
||||
_internal_error_resource(0x0)
|
||||
{
|
||||
}
|
||||
|
||||
explicit create_webserver(uint16_t port):
|
||||
_port(port),
|
||||
_start_method(http::http_utils::INTERNAL_SELECT),
|
||||
_max_threads(0),
|
||||
_max_connections(0),
|
||||
_memory_limit(0),
|
||||
_connection_timeout(DEFAULT_WS_TIMEOUT),
|
||||
_per_IP_connection_limit(0),
|
||||
_log_access(0x0),
|
||||
_log_error(0x0),
|
||||
_validator(0x0),
|
||||
_unescaper(0x0),
|
||||
_bind_address(0x0),
|
||||
_bind_socket(0),
|
||||
_max_thread_stack_size(0),
|
||||
_use_ssl(false),
|
||||
_use_ipv6(false),
|
||||
_debug(false),
|
||||
_pedantic(false),
|
||||
_https_mem_key(""),
|
||||
_https_mem_cert(""),
|
||||
_https_mem_trust(""),
|
||||
_https_priorities(""),
|
||||
_cred_type(http::http_utils::NONE),
|
||||
_digest_auth_random(""),
|
||||
_nonce_nc_size(0),
|
||||
_default_policy(http::http_utils::ACCEPT),
|
||||
_basic_auth_enabled(true),
|
||||
_digest_auth_enabled(true),
|
||||
_regex_checking(true),
|
||||
_ban_system_enabled(true),
|
||||
_post_process_enabled(true),
|
||||
_single_resource(0x0),
|
||||
_not_found_resource(0x0),
|
||||
_method_not_allowed_resource(0x0),
|
||||
_method_not_acceptable_resource(0x0),
|
||||
_internal_error_resource(0x0)
|
||||
{
|
||||
}
|
||||
|
||||
create_webserver& port(uint16_t port) { _port = port; return *this; }
|
||||
create_webserver& start_method(
|
||||
const http::http_utils::start_method_T& start_method
|
||||
)
|
||||
{
|
||||
_start_method = start_method; return *this;
|
||||
}
|
||||
create_webserver& max_threads(int max_threads)
|
||||
{
|
||||
_max_threads = max_threads; return *this;
|
||||
}
|
||||
create_webserver& max_connections(int max_connections)
|
||||
{
|
||||
_max_connections = max_connections; return *this;
|
||||
}
|
||||
create_webserver& memory_limit(int memory_limit)
|
||||
{
|
||||
_memory_limit = memory_limit; return *this;
|
||||
}
|
||||
create_webserver& connection_timeout(int connection_timeout)
|
||||
{
|
||||
_connection_timeout = connection_timeout; return *this;
|
||||
}
|
||||
create_webserver& per_IP_connection_limit(int per_IP_connection_limit)
|
||||
{
|
||||
_per_IP_connection_limit = per_IP_connection_limit; return *this;
|
||||
}
|
||||
create_webserver& log_access(log_access_ptr log_access)
|
||||
{
|
||||
_log_access = log_access; return *this;
|
||||
}
|
||||
create_webserver& log_error(log_error_ptr log_error)
|
||||
{
|
||||
_log_error = log_error; return *this;
|
||||
}
|
||||
create_webserver& validator(validator_ptr validator)
|
||||
{
|
||||
_validator = validator; return *this;
|
||||
}
|
||||
create_webserver& unescaper(unescaper_ptr unescaper)
|
||||
{
|
||||
_unescaper = unescaper; return *this;
|
||||
}
|
||||
create_webserver& bind_address(const struct sockaddr* bind_address)
|
||||
{
|
||||
_bind_address = bind_address; return *this;
|
||||
}
|
||||
create_webserver& bind_socket(int bind_socket)
|
||||
{
|
||||
_bind_socket = bind_socket; return *this;
|
||||
}
|
||||
create_webserver& max_thread_stack_size(int max_thread_stack_size)
|
||||
{
|
||||
_max_thread_stack_size = max_thread_stack_size; return *this;
|
||||
}
|
||||
create_webserver& use_ssl() { _use_ssl = true; return *this; }
|
||||
create_webserver& no_ssl() { _use_ssl = false; return *this; }
|
||||
create_webserver& use_ipv6() { _use_ipv6 = true; return *this; }
|
||||
create_webserver& no_ipv6() { _use_ipv6 = false; return *this; }
|
||||
create_webserver& debug() { _debug = true; return *this; }
|
||||
create_webserver& no_debug() { _debug = false; return *this; }
|
||||
create_webserver& pedantic() { _pedantic = true; return *this; }
|
||||
create_webserver& no_pedantic() { _pedantic = false; return *this; }
|
||||
create_webserver& https_mem_key(const std::string& https_mem_key)
|
||||
{
|
||||
char* _https_mem_key_pt = http::load_file(https_mem_key.c_str());
|
||||
_https_mem_key = _https_mem_key_pt;
|
||||
free(_https_mem_key_pt);
|
||||
return *this;
|
||||
}
|
||||
create_webserver& https_mem_cert(const std::string& https_mem_cert)
|
||||
{
|
||||
char* _https_mem_cert_pt = http::load_file(https_mem_cert.c_str());
|
||||
_https_mem_cert = _https_mem_cert_pt;
|
||||
free(_https_mem_cert_pt);
|
||||
return *this;
|
||||
}
|
||||
create_webserver& https_mem_trust(const std::string& https_mem_trust)
|
||||
{
|
||||
char* _https_mem_trust_pt = http::load_file(https_mem_trust.c_str());
|
||||
_https_mem_trust = _https_mem_trust_pt;
|
||||
free(_https_mem_trust_pt);
|
||||
return *this;
|
||||
}
|
||||
create_webserver& raw_https_mem_key(const std::string& https_mem_key)
|
||||
{
|
||||
_https_mem_key = https_mem_key; return *this;
|
||||
}
|
||||
create_webserver& raw_https_mem_cert(const std::string& https_mem_cert)
|
||||
{
|
||||
_https_mem_cert = https_mem_cert; return *this;
|
||||
}
|
||||
create_webserver& raw_https_mem_trust(
|
||||
const std::string& https_mem_trust
|
||||
)
|
||||
{
|
||||
_https_mem_trust = https_mem_trust; return *this;
|
||||
}
|
||||
create_webserver& https_priorities(const std::string& https_priorities)
|
||||
{
|
||||
_https_priorities = https_priorities; return *this;
|
||||
}
|
||||
create_webserver& cred_type(const http::http_utils::cred_type_T& cred_type)
|
||||
{
|
||||
_cred_type = cred_type; return *this;
|
||||
}
|
||||
create_webserver& digest_auth_random(
|
||||
const std::string& digest_auth_random
|
||||
)
|
||||
{
|
||||
_digest_auth_random = digest_auth_random; return *this;
|
||||
}
|
||||
create_webserver& nonce_nc_size(int nonce_nc_size)
|
||||
{
|
||||
_nonce_nc_size = nonce_nc_size; return *this;
|
||||
}
|
||||
create_webserver& default_policy(
|
||||
const http::http_utils::policy_T& default_policy
|
||||
)
|
||||
{
|
||||
_default_policy = default_policy; return *this;
|
||||
}
|
||||
create_webserver& basic_auth()
|
||||
{
|
||||
_basic_auth_enabled = true; return *this;
|
||||
}
|
||||
create_webserver& no_basic_auth()
|
||||
{
|
||||
_basic_auth_enabled = false; return *this;
|
||||
}
|
||||
create_webserver& digest_auth()
|
||||
{
|
||||
_digest_auth_enabled = true; return *this;
|
||||
}
|
||||
create_webserver& no_digest_auth()
|
||||
{
|
||||
_digest_auth_enabled = false; return *this;
|
||||
}
|
||||
create_webserver& regex_checking()
|
||||
{
|
||||
_regex_checking = true; return *this;
|
||||
}
|
||||
create_webserver& no_regex_checking()
|
||||
{
|
||||
_regex_checking = false; return *this;
|
||||
}
|
||||
create_webserver& ban_system()
|
||||
{
|
||||
_ban_system_enabled = true; return *this;
|
||||
}
|
||||
create_webserver& no_ban_system()
|
||||
{
|
||||
_ban_system_enabled = false; return *this;
|
||||
}
|
||||
create_webserver& post_process()
|
||||
{
|
||||
_post_process_enabled = true; return *this;
|
||||
}
|
||||
create_webserver& no_post_process()
|
||||
{
|
||||
_post_process_enabled = false; return *this;
|
||||
}
|
||||
create_webserver& single_resource(render_ptr single_resource)
|
||||
{
|
||||
_single_resource = single_resource; return *this;
|
||||
}
|
||||
create_webserver& not_found_resource(render_ptr not_found_resource)
|
||||
{
|
||||
_not_found_resource = not_found_resource; return *this;
|
||||
}
|
||||
create_webserver& method_not_allowed_resource(
|
||||
render_ptr method_not_allowed_resource
|
||||
)
|
||||
{
|
||||
_method_not_allowed_resource = method_not_allowed_resource;
|
||||
return *this;
|
||||
}
|
||||
create_webserver& method_not_acceptable_resource(
|
||||
render_ptr method_not_acceptable_resource
|
||||
)
|
||||
{
|
||||
_method_not_acceptable_resource = method_not_acceptable_resource;
|
||||
return *this;
|
||||
}
|
||||
create_webserver& internal_error_resource(
|
||||
render_ptr internal_error_resource
|
||||
)
|
||||
{
|
||||
_internal_error_resource = internal_error_resource; return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
uint16_t _port;
|
||||
http::http_utils::start_method_T _start_method;
|
||||
int _max_threads;
|
||||
int _max_connections;
|
||||
int _memory_limit;
|
||||
int _connection_timeout;
|
||||
int _per_IP_connection_limit;
|
||||
log_access_ptr _log_access;
|
||||
log_error_ptr _log_error;
|
||||
validator_ptr _validator;
|
||||
unescaper_ptr _unescaper;
|
||||
const struct sockaddr* _bind_address;
|
||||
int _bind_socket;
|
||||
int _max_thread_stack_size;
|
||||
bool _use_ssl;
|
||||
bool _use_ipv6;
|
||||
bool _debug;
|
||||
bool _pedantic;
|
||||
std::string _https_mem_key;
|
||||
std::string _https_mem_cert;
|
||||
std::string _https_mem_trust;
|
||||
std::string _https_priorities;
|
||||
http::http_utils::cred_type_T _cred_type;
|
||||
std::string _digest_auth_random;
|
||||
int _nonce_nc_size;
|
||||
http::http_utils::policy_T _default_policy;
|
||||
bool _basic_auth_enabled;
|
||||
bool _digest_auth_enabled;
|
||||
bool _regex_checking;
|
||||
bool _ban_system_enabled;
|
||||
bool _post_process_enabled;
|
||||
render_ptr _single_resource;
|
||||
render_ptr _not_found_resource;
|
||||
render_ptr _method_not_allowed_resource;
|
||||
render_ptr _method_not_acceptable_resource;
|
||||
render_ptr _internal_error_resource;
|
||||
|
||||
friend class webserver;
|
||||
};
|
||||
|
||||
} //httpserver
|
||||
|
||||
#endif //_CREATE_WEBSERVER_HPP_
|
||||
@@ -1,69 +0,0 @@
|
||||
/*
|
||||
This file is part of libhttpserver
|
||||
Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
*/
|
||||
|
||||
#if !defined (_HTTPSERVER_HPP_INSIDE_) && !defined (HTTPSERVER_COMPILATION)
|
||||
#error "Only <httpserver.hpp> or <httpserverpp> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef _EVENT_TUPLE_HPP_
|
||||
#define _EVENT_TUPLE_HPP_
|
||||
|
||||
#include "httpserver/event_supplier.hpp"
|
||||
#include "httpserver/binders.hpp"
|
||||
|
||||
namespace httpserver {
|
||||
|
||||
namespace details
|
||||
{
|
||||
class http_endpoint;
|
||||
struct modded_request;
|
||||
struct daemon_item;
|
||||
|
||||
class event_tuple
|
||||
{
|
||||
private:
|
||||
typedef void(*supply_events_ptr)(
|
||||
fd_set*,
|
||||
fd_set*,
|
||||
fd_set*,
|
||||
MHD_socket*
|
||||
);
|
||||
|
||||
binders::functor_four<fd_set*, fd_set*, fd_set*, MHD_socket*, void> supply_events;
|
||||
binders::functor_zero<struct timeval> get_timeout;
|
||||
binders::functor_zero<void> dispatch_events;
|
||||
|
||||
event_tuple();
|
||||
|
||||
friend class ::httpserver::webserver;
|
||||
public:
|
||||
template<typename T>
|
||||
event_tuple(event_supplier<T>* es):
|
||||
supply_events(binders::functor_four<fd_set*, fd_set*, fd_set*, MHD_socket*, void>(es, &T::supply_events)),
|
||||
get_timeout(binders::functor_zero<struct timeval>(es, &T::get_timeout)),
|
||||
dispatch_events(binders::functor_zero<void>(es, &T::dispatch_events))
|
||||
{
|
||||
}
|
||||
};
|
||||
} //details
|
||||
|
||||
} //httpserver
|
||||
|
||||
#endif //_EVENT_TUPLE_HPP_
|
||||
@@ -1,250 +0,0 @@
|
||||
/*
|
||||
This file is part of libhttpserver
|
||||
Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
*/
|
||||
|
||||
#if !defined (_HTTPSERVER_HPP_INSIDE_) && !defined (HTTPSERVER_COMPILATION)
|
||||
#error "Only <httpserver.hpp> or <httpserverpp> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef _HTTP_ENDPOINT_HPP_
|
||||
#define _HTTP_ENDPOINT_HPP_
|
||||
|
||||
#include <vector>
|
||||
#include <utility>
|
||||
#include <regex.h>
|
||||
#include <string>
|
||||
|
||||
namespace httpserver
|
||||
{
|
||||
|
||||
class webserver;
|
||||
|
||||
namespace details
|
||||
{
|
||||
|
||||
class http_resource_mirror;
|
||||
|
||||
/**
|
||||
* Exception class throwed when a bad formatted http url is used
|
||||
**/
|
||||
class bad_http_endpoint : public std::exception
|
||||
{
|
||||
/**
|
||||
* Method used to see error details
|
||||
* @return a const char* containing the error message
|
||||
**/
|
||||
virtual const char* what() const throw()
|
||||
{
|
||||
return "Bad url format!";
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Class representing an Http Endpoint. It is an abstraction used by the APIs.
|
||||
**/
|
||||
class http_endpoint
|
||||
{
|
||||
private:
|
||||
/**
|
||||
* Copy constructor. It is useful expecially to copy regex_t structure that contains dinamically allocated data.
|
||||
* @param h The http_endpoint to copy
|
||||
**/
|
||||
http_endpoint(const http_endpoint& h);
|
||||
/**
|
||||
* Class Destructor
|
||||
**/
|
||||
~http_endpoint(); //if inlined it causes problems during ruby wrapper compiling
|
||||
/**
|
||||
* Operator overload for "less than operator". It is used to order endpoints in maps.
|
||||
* @param b The http_endpoint to compare to
|
||||
* @return boolean indicating if this is less than b.
|
||||
**/
|
||||
bool operator <(const http_endpoint& b) const;
|
||||
/**
|
||||
* Operator overload for "assignment operator". It is used to copy endpoints to existing objects.
|
||||
* Is is functional expecially to copy regex_t structure that contains dinamically allocated data.
|
||||
* @param h The http_endpoint to copy
|
||||
* @return a reference to the http_endpoint obtained
|
||||
**/
|
||||
http_endpoint& operator =(const http_endpoint& h);
|
||||
/**
|
||||
* Method indicating if this endpoint 'matches' with the one passed. A passed endpoint matches a registered endpoint if
|
||||
* the regex represented by the registered endpoint matches the passed one.
|
||||
* @param url The endpoint to match
|
||||
* @return true if the passed endpoint matches this.
|
||||
**/
|
||||
bool match(const http_endpoint& url) const;
|
||||
/**
|
||||
* Method used to get the complete endpoint url
|
||||
* @return a string representing the url
|
||||
**/
|
||||
const std::string get_url_complete() const
|
||||
{
|
||||
return this->url_complete;
|
||||
}
|
||||
/**
|
||||
* Method used to get the complete endpoint url
|
||||
* @param result a string reference that will be filled with the url
|
||||
**/
|
||||
void get_url_complete(std::string& result) const
|
||||
{
|
||||
result = this->url_complete;
|
||||
}
|
||||
/**
|
||||
* Method used to find the size of the complete endpoint url
|
||||
* @return the size
|
||||
**/
|
||||
size_t get_url_complete_size() const
|
||||
{
|
||||
return this->url_complete.size();
|
||||
}
|
||||
/**
|
||||
* Method used to get all pars defined inside an url.
|
||||
* @return a vector of strings representing all found pars.
|
||||
**/
|
||||
const std::vector<std::string> get_url_pars() const
|
||||
{
|
||||
return this->url_pars;
|
||||
}
|
||||
size_t get_url_pars(std::vector<std::string>& result) const
|
||||
{
|
||||
result = this->url_pars;
|
||||
return result.size();
|
||||
}
|
||||
/**
|
||||
* Method used to get all pieces of an url; considering an url splitted by '/'.
|
||||
* @return a vector of strings representing all found pieces.
|
||||
**/
|
||||
const std::vector<std::string> get_url_pieces() const
|
||||
{
|
||||
return this->url_pieces;
|
||||
}
|
||||
/**
|
||||
* Method used to get all pieces of an url; considering an url splittet by '/'.
|
||||
* @param result a vector of strings to fill with url pieces.
|
||||
* @return the size of the vector in output
|
||||
**/
|
||||
size_t get_url_pieces(std::vector<std::string>& result) const
|
||||
{
|
||||
result = this->url_pieces;
|
||||
return result.size();
|
||||
}
|
||||
/**
|
||||
* Method used to get the number of pieces the url is composed of
|
||||
* @return the number of pieces
|
||||
**/
|
||||
size_t get_url_pieces_num() const
|
||||
{
|
||||
return this->url_pieces.size();
|
||||
}
|
||||
/**
|
||||
* Method used to get indexes of all parameters inside url
|
||||
* @return a vector of int indicating all positions.
|
||||
**/
|
||||
const std::vector<int> get_chunk_positions() const
|
||||
{
|
||||
return this->chunk_positions;
|
||||
}
|
||||
/**
|
||||
* Method used to get indexes of all parameters inside url
|
||||
* @param result a vector to fill with ints indicating chunk positions
|
||||
* @return the size of the vector filled
|
||||
**/
|
||||
size_t get_chunk_positions(std::vector<int>& result) const
|
||||
{
|
||||
result = this->chunk_positions;
|
||||
return result.size();
|
||||
}
|
||||
/**
|
||||
* Default constructor of the class.
|
||||
* @param family boolean that indicates if the endpoint is a family endpoint.
|
||||
* A family endpoint is an endpoint that identifies a root and all its child like the same resource.
|
||||
* For example, if I identify "/path/" like a family endpoint and I associate to it the resource "A", also
|
||||
* "/path/to/res/" is automatically associated to resource "A".
|
||||
**/
|
||||
http_endpoint(bool family = false):
|
||||
url_complete("/"),
|
||||
url_modded("/"),
|
||||
family_url(family),
|
||||
reg_compiled(false)
|
||||
{
|
||||
}
|
||||
/**
|
||||
* Constructor of the class http_endpoint. It is used to initialize an http_endpoint starting from a string form URL.
|
||||
* @param url The string representation of the endpoint. All endpoints are in the form "/path/to/resource".
|
||||
* @param family boolean that indicates if the endpoint is a family endpoint.
|
||||
* A family endpoint is an endpoint that identifies a root and all its child like the same resource.
|
||||
* For example, if I identify "/path/" like a family endpoint and I associate to it the resource "A", also
|
||||
* "/path/to/res/" is automatically associated to resource "A". Default is false.
|
||||
* @param registration boolean that indicates to the system if this is an endpoint that need to be registered to a webserver
|
||||
* or it is simply an endpoint to be used for comparisons. Default is false.
|
||||
* @param use_regex boolean that indicates if regexes are checked or not. Default is true.
|
||||
**/
|
||||
http_endpoint(const std::string& url,
|
||||
bool family = false,
|
||||
bool registration = false,
|
||||
bool use_regex = true
|
||||
);
|
||||
/**
|
||||
* The complete url extracted
|
||||
**/
|
||||
std::string url_complete;
|
||||
/**
|
||||
* The url standardized in order to use standard comparisons or regexes
|
||||
**/
|
||||
std::string url_modded;
|
||||
/**
|
||||
* Vector containing parameters extracted from url
|
||||
**/
|
||||
std::vector<std::string> url_pars;
|
||||
/**
|
||||
* Pieces the url can be splitted into (consider '/' as separator)
|
||||
**/
|
||||
std::vector<std::string> url_pieces;
|
||||
/**
|
||||
* Position of url pieces representing parameters
|
||||
**/
|
||||
std::vector<int> chunk_positions;
|
||||
/**
|
||||
* Regex used in comparisons
|
||||
**/
|
||||
regex_t re_url_modded;
|
||||
/**
|
||||
* Boolean indicating wheter the endpoint represents a family
|
||||
**/
|
||||
bool family_url;
|
||||
/**
|
||||
* Boolean indicating if the regex is compiled
|
||||
**/
|
||||
bool reg_compiled;
|
||||
friend class httpserver::webserver;
|
||||
friend void _register_resource(
|
||||
webserver*,
|
||||
const std::string&,
|
||||
details::http_resource_mirror&,
|
||||
bool
|
||||
);
|
||||
template<typename, typename> friend struct std::pair;
|
||||
template<typename> friend struct std::less;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
#endif
|
||||
-206
@@ -1,206 +0,0 @@
|
||||
/*
|
||||
This file is part of libhttpserver
|
||||
Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
*/
|
||||
|
||||
#if !defined (_HTTPSERVER_HPP_INSIDE_) && !defined (HTTPSERVER_COMPILATION)
|
||||
#error "Only <httpserver.hpp> or <httpserverpp> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef _HTTP_RESOURCE_MIRROR_HPP_
|
||||
#define _HTTP_RESOURCE_MIRROR_HPP_
|
||||
|
||||
#include "httpserver/binders.hpp"
|
||||
|
||||
#define CREATE_METHOD_DETECTOR(X) \
|
||||
template<typename T, typename RESULT, typename ARG1, typename ARG2> \
|
||||
class has_##X \
|
||||
{ \
|
||||
template <typename U, RESULT (U::*)(ARG1, ARG2)> struct Check; \
|
||||
template <typename U> static char func(Check<U, &U::X> *); \
|
||||
template <typename U> static int func(...); \
|
||||
public: \
|
||||
enum { value = sizeof(func<T>(0)) == sizeof(char) }; \
|
||||
};
|
||||
|
||||
#define HAS_METHOD(X, T, RESULT, ARG1, ARG2) \
|
||||
has_##X<T, RESULT, ARG1, ARG2>::value
|
||||
|
||||
namespace httpserver {
|
||||
|
||||
template<typename CHILD> class http_resource;
|
||||
class http_request;
|
||||
class http_response;
|
||||
class webserver;
|
||||
|
||||
namespace details
|
||||
{
|
||||
class http_endpoint;
|
||||
struct modded_request;
|
||||
struct daemon_item;
|
||||
typedef bool(*is_allowed_ptr)(const std::string&);
|
||||
|
||||
CREATE_METHOD_DETECTOR(render);
|
||||
CREATE_METHOD_DETECTOR(render_GET);
|
||||
CREATE_METHOD_DETECTOR(render_POST);
|
||||
CREATE_METHOD_DETECTOR(render_PUT);
|
||||
CREATE_METHOD_DETECTOR(render_HEAD);
|
||||
CREATE_METHOD_DETECTOR(render_DELETE);
|
||||
CREATE_METHOD_DETECTOR(render_TRACE);
|
||||
CREATE_METHOD_DETECTOR(render_OPTIONS);
|
||||
CREATE_METHOD_DETECTOR(render_CONNECT);
|
||||
CREATE_METHOD_DETECTOR(render_not_acceptable);
|
||||
|
||||
void empty_render(const http_request& r, http_response** res);
|
||||
void empty_not_acceptable_render(
|
||||
const http_request& r, http_response** res
|
||||
);
|
||||
bool empty_is_allowed(const std::string& method);
|
||||
|
||||
class http_resource_mirror
|
||||
{
|
||||
public:
|
||||
http_resource_mirror()
|
||||
{
|
||||
}
|
||||
|
||||
~http_resource_mirror()
|
||||
{
|
||||
}
|
||||
private:
|
||||
typedef binders::functor_two<const http_request&,
|
||||
http_response**, void> functor;
|
||||
|
||||
typedef binders::functor_one<const std::string&,
|
||||
bool> functor_allowed;
|
||||
|
||||
const functor render;
|
||||
const functor render_GET;
|
||||
const functor render_POST;
|
||||
const functor render_PUT;
|
||||
const functor render_HEAD;
|
||||
const functor render_DELETE;
|
||||
const functor render_TRACE;
|
||||
const functor render_OPTIONS;
|
||||
const functor render_CONNECT;
|
||||
const functor_allowed is_allowed;
|
||||
|
||||
functor method_not_acceptable_resource;
|
||||
|
||||
http_resource_mirror& operator= (const http_resource_mirror& o)
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
http_resource_mirror(http_resource<T>* res):
|
||||
render(
|
||||
HAS_METHOD(render, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render) : functor(&empty_render)
|
||||
),
|
||||
render_GET(
|
||||
HAS_METHOD(render_GET, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render_GET) :
|
||||
(
|
||||
HAS_METHOD(render, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render) : functor(&empty_render)
|
||||
)
|
||||
),
|
||||
render_POST(
|
||||
HAS_METHOD(render_POST, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render_POST) :
|
||||
(
|
||||
HAS_METHOD(render, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render) : functor(&empty_render)
|
||||
)
|
||||
),
|
||||
render_PUT(
|
||||
HAS_METHOD(render_PUT, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render_PUT) :
|
||||
(
|
||||
HAS_METHOD(render, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render) : functor(&empty_render)
|
||||
)
|
||||
),
|
||||
render_HEAD(
|
||||
HAS_METHOD(render_HEAD, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render_HEAD) :
|
||||
(
|
||||
HAS_METHOD(render, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render) : functor(&empty_render)
|
||||
)
|
||||
),
|
||||
render_DELETE(
|
||||
HAS_METHOD(render_DELETE, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render_DELETE) :
|
||||
(
|
||||
HAS_METHOD(render, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render) : functor(&empty_render)
|
||||
)
|
||||
),
|
||||
render_TRACE(
|
||||
HAS_METHOD(render_TRACE, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render_TRACE) :
|
||||
(
|
||||
HAS_METHOD(render, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render) : functor(&empty_render)
|
||||
)
|
||||
),
|
||||
render_OPTIONS(
|
||||
HAS_METHOD(render_OPTIONS, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render_OPTIONS) :
|
||||
(
|
||||
HAS_METHOD(render, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render) : functor(&empty_render)
|
||||
)
|
||||
),
|
||||
render_CONNECT(
|
||||
HAS_METHOD(render_CONNECT, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render_CONNECT) :
|
||||
(
|
||||
HAS_METHOD(render, T, void,
|
||||
const http_request&, http_response**
|
||||
) ? functor(res, &T::render) : functor(&empty_render)
|
||||
)
|
||||
),
|
||||
is_allowed(res, &T::is_allowed)
|
||||
{
|
||||
}
|
||||
|
||||
friend class ::httpserver::webserver;
|
||||
};
|
||||
} //details
|
||||
} //httpserver
|
||||
|
||||
#endif //_HTTP_RESOURCE_MIRROR_HPP_
|
||||
@@ -1,67 +0,0 @@
|
||||
/*
|
||||
This file is part of libhttpserver
|
||||
Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
*/
|
||||
|
||||
#if !defined (_HTTPSERVER_HPP_INSIDE_) && !defined (HTTPSERVER_COMPILATION)
|
||||
#error "Only <httpserver.hpp> or <httpserverpp> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef _EVENT_SUPPLIER_HPP_
|
||||
#define _EVENT_SUPPLIER_HPP_
|
||||
|
||||
namespace httpserver {
|
||||
|
||||
template <typename CHILD>
|
||||
class event_supplier
|
||||
{
|
||||
public:
|
||||
event_supplier()
|
||||
{
|
||||
}
|
||||
|
||||
~event_supplier()
|
||||
{
|
||||
}
|
||||
|
||||
void supply_events(
|
||||
fd_set* read_fdset,
|
||||
fd_set* write_fdset,
|
||||
fd_set* exc_fdset,
|
||||
MHD_socket* max
|
||||
) const
|
||||
{
|
||||
static_cast<CHILD*>(this)->supply_events(
|
||||
read_fdset, write_fdset, exc_fdset, max
|
||||
);
|
||||
}
|
||||
|
||||
struct timeval get_timeout() const
|
||||
{
|
||||
return static_cast<CHILD*>(this)->get_timeout();
|
||||
}
|
||||
|
||||
void dispatch_events() const
|
||||
{
|
||||
static_cast<CHILD*>(this)->dispatch_events();
|
||||
}
|
||||
};
|
||||
|
||||
} //event_supplier
|
||||
|
||||
#endif //_EVENT_SUPPLIER_HPP_
|
||||
@@ -1,594 +0,0 @@
|
||||
/*
|
||||
This file is part of libhttpserver
|
||||
Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
*/
|
||||
|
||||
#if !defined (_HTTPSERVER_HPP_INSIDE_) && !defined (HTTPSERVER_COMPILATION)
|
||||
#error "Only <httpserver.hpp> or <httpserverpp> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef _HTTP_REQUEST_HPP_
|
||||
#define _HTTP_REQUEST_HPP_
|
||||
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <iosfwd>
|
||||
|
||||
struct MHD_Connection;
|
||||
|
||||
namespace httpserver
|
||||
{
|
||||
|
||||
class webserver;
|
||||
|
||||
namespace http
|
||||
{
|
||||
class header_comparator;
|
||||
class arg_comparator;
|
||||
};
|
||||
|
||||
using namespace http;
|
||||
|
||||
/**
|
||||
* Class representing an abstraction for an Http Request. It is used from classes using these apis to receive information through http protocol.
|
||||
**/
|
||||
class http_request
|
||||
{
|
||||
public:
|
||||
|
||||
/**
|
||||
* Method used to get the username eventually passed through basic authentication.
|
||||
* @return string representation of the username.
|
||||
**/
|
||||
const std::string get_user() const
|
||||
{
|
||||
return this->user;
|
||||
}
|
||||
/**
|
||||
* Method used to get the username eventually passed through basic authentication.
|
||||
* @param result string that will be filled with the username
|
||||
**/
|
||||
void get_user(std::string& result) const
|
||||
{
|
||||
result = this->user;
|
||||
}
|
||||
/**
|
||||
* Method used to get the username extracted from a digest authentication
|
||||
* @return the username
|
||||
**/
|
||||
const std::string get_digested_user() const
|
||||
{
|
||||
return this->digested_user;
|
||||
}
|
||||
/**
|
||||
* Method used to get the username extracted from a digest authentication
|
||||
* @param result string that will be filled with the username
|
||||
**/
|
||||
void get_digested_user(std::string& result) const
|
||||
{
|
||||
result = this->digested_user;
|
||||
}
|
||||
/**
|
||||
* Method used to get the password eventually passed through basic authentication.
|
||||
* @return string representation of the password.
|
||||
**/
|
||||
const std::string get_pass() const
|
||||
{
|
||||
return this->pass;
|
||||
}
|
||||
/**
|
||||
* Method used to get the password eventually passed through basic authentication.
|
||||
* @param result string that will be filled with the password.
|
||||
**/
|
||||
void get_pass(std::string& result) const
|
||||
{
|
||||
result = this->pass;
|
||||
}
|
||||
/**
|
||||
* Method used to get the path requested
|
||||
* @return string representing the path requested.
|
||||
**/
|
||||
const std::string get_path() const
|
||||
{
|
||||
return this->path;
|
||||
}
|
||||
/**
|
||||
* Method used to get the path requested
|
||||
* @param result string that will be filled with the path.
|
||||
**/
|
||||
void get_path(std::string& result) const
|
||||
{
|
||||
result = this->path;
|
||||
}
|
||||
/**
|
||||
* Method used to get all pieces of the path requested; considering an url splitted by '/'.
|
||||
* @return a vector of strings containing all pieces
|
||||
**/
|
||||
const std::vector<std::string> get_path_pieces() const
|
||||
{
|
||||
return this->post_path;
|
||||
}
|
||||
/**
|
||||
* Method used to get all pieces of the path requested; considering an url splitted by '/'.
|
||||
* @param result vector of strings containing the path
|
||||
* @return the size of the vector filled
|
||||
**/
|
||||
size_t get_path_pieces(std::vector<std::string>& result) const
|
||||
{
|
||||
result = this->post_path;
|
||||
return result.size();
|
||||
}
|
||||
/**
|
||||
* Method used to obtain the size of path in terms of pieces; considering an url splitted by '/'.
|
||||
* @return an integer representing the number of pieces
|
||||
**/
|
||||
size_t get_path_pieces_size() const
|
||||
{
|
||||
return this->post_path.size();
|
||||
}
|
||||
/**
|
||||
* Method used to obtain a specified piece of the path; considering an url splitted by '/'.
|
||||
* @param index the index of the piece selected
|
||||
* @return the selected piece in form of string
|
||||
**/
|
||||
const std::string get_path_piece(int index) const
|
||||
{
|
||||
if(((int)(this->post_path.size())) > index)
|
||||
return this->post_path[index];
|
||||
return "";
|
||||
}
|
||||
/**
|
||||
* Method used to obtain a specified piece of the path; considering an url splitted by '/'.
|
||||
* @param index the index of the piece selected
|
||||
* @param result a string that will be filled with the piece found
|
||||
* @return the length of the piece found
|
||||
**/
|
||||
size_t get_path_piece(int index, std::string& result) const
|
||||
{
|
||||
if(((int)(this->post_path.size())) > index)
|
||||
{
|
||||
result = this->post_path[index];
|
||||
return result.size();
|
||||
}
|
||||
else
|
||||
{
|
||||
result = "";
|
||||
return result.size();
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Method used to get the METHOD used to make the request.
|
||||
* @return string representing the method.
|
||||
**/
|
||||
const std::string get_method() const
|
||||
{
|
||||
return this->method;
|
||||
}
|
||||
/**
|
||||
* Method used to get the METHOD used to make the request.
|
||||
* @param result string that will be filled with the method.
|
||||
**/
|
||||
void get_method(std::string& result) const
|
||||
{
|
||||
result = this->method;
|
||||
}
|
||||
/**
|
||||
* Method used to get all headers passed with the request.
|
||||
* @param result a map<string, string> > that will be filled with all headers
|
||||
* @result the size of the map
|
||||
**/
|
||||
size_t get_headers(std::map<std::string, std::string, header_comparator>& result) const;
|
||||
/**
|
||||
* Method used to get all footers passed with the request.
|
||||
* @param result a map<string, string> > that will be filled with all footers
|
||||
* @result the size of the map
|
||||
**/
|
||||
size_t get_footers(std::map<std::string, std::string, header_comparator>& result) const;
|
||||
/**
|
||||
* Method used to get all cookies passed with the request.
|
||||
* @param result a map<string, string> > that will be filled with all cookies
|
||||
* @result the size of the map
|
||||
**/
|
||||
size_t get_cookies(std::map<std::string, std::string, header_comparator>& result) const;
|
||||
/**
|
||||
* Method used to get all args passed with the request.
|
||||
* @param result a map<string, string> > that will be filled with all args
|
||||
* @result the size of the map
|
||||
**/
|
||||
size_t get_args(std::map<std::string, std::string, arg_comparator>& result) const;
|
||||
/**
|
||||
* Method used to get a specific header passed with the request.
|
||||
* @param key the specific header to get the value from
|
||||
* @return the value of the header.
|
||||
**/
|
||||
const std::string get_header(const std::string& key) const
|
||||
{
|
||||
std::map<std::string, std::string>::const_iterator it =
|
||||
this->headers.find(key);
|
||||
if(it != this->headers.end())
|
||||
return it->second;
|
||||
else
|
||||
return "";
|
||||
}
|
||||
void get_header(const std::string& key, std::string& result) const
|
||||
{
|
||||
std::map<std::string, std::string>::const_iterator it =
|
||||
this->headers.find(key);
|
||||
if(it != this->headers.end())
|
||||
result = it->second;
|
||||
else
|
||||
result = "";
|
||||
}
|
||||
const std::string get_cookie(const std::string& key) const
|
||||
{
|
||||
std::map<std::string, std::string>::const_iterator it =
|
||||
this->cookies.find(key);
|
||||
if(it != this->cookies.end())
|
||||
return it->second;
|
||||
else
|
||||
return "";
|
||||
}
|
||||
void get_cookie(const std::string& key, std::string& result) const
|
||||
{
|
||||
std::map<std::string, std::string>::const_iterator it =
|
||||
this->cookies.find(key);
|
||||
if(it != this->cookies.end())
|
||||
result = it->second;
|
||||
else
|
||||
result = "";
|
||||
}
|
||||
/**
|
||||
* Method used to get a specific footer passed with the request.
|
||||
* @param key the specific footer to get the value from
|
||||
* @return the value of the footer.
|
||||
**/
|
||||
const std::string get_footer(const std::string& key) const
|
||||
{
|
||||
std::map<std::string, std::string>::const_iterator it =
|
||||
this->footers.find(key);
|
||||
if(it != this->footers.end())
|
||||
return it->second;
|
||||
else
|
||||
return "";
|
||||
}
|
||||
void get_footer(const std::string& key, std::string& result) const
|
||||
{
|
||||
std::map<std::string, std::string>::const_iterator it =
|
||||
this->footers.find(key);
|
||||
if(it != this->footers.end())
|
||||
result = it->second;
|
||||
else
|
||||
result = "";
|
||||
}
|
||||
/**
|
||||
* Method used to get a specific argument passed with the request.
|
||||
* @param ket the specific argument to get the value from
|
||||
* @return the value of the arg.
|
||||
**/
|
||||
const std::string get_arg(const std::string& key) const
|
||||
{
|
||||
std::map<std::string, std::string>::const_iterator it =
|
||||
this->args.find(key);
|
||||
if(it != this->args.end())
|
||||
return it->second;
|
||||
else
|
||||
return "";
|
||||
}
|
||||
void get_arg(const std::string& key, std::string& result) const
|
||||
{
|
||||
std::map<std::string, std::string>::const_iterator it =
|
||||
this->args.find(key);
|
||||
if(it != this->args.end())
|
||||
result = it->second;
|
||||
else
|
||||
result = "";
|
||||
}
|
||||
/**
|
||||
* Method used to get the content of the request.
|
||||
* @return the content in string representation
|
||||
**/
|
||||
const std::string get_content() const
|
||||
{
|
||||
return this->content;
|
||||
}
|
||||
void get_content(std::string& result) const
|
||||
{
|
||||
result = this->content;
|
||||
}
|
||||
const std::string get_querystring() const
|
||||
{
|
||||
return this->querystring;
|
||||
}
|
||||
void get_querystring(std::string& result) const
|
||||
{
|
||||
result = this->querystring;
|
||||
}
|
||||
/**
|
||||
* Method used to get the version of the request.
|
||||
* @return the version in string representation
|
||||
**/
|
||||
const std::string get_version() const
|
||||
{
|
||||
return this->version;
|
||||
}
|
||||
void get_version(std::string& result) const
|
||||
{
|
||||
result = this->version;
|
||||
}
|
||||
/**
|
||||
* Method used to get the requestor.
|
||||
* @return the requestor
|
||||
**/
|
||||
const std::string get_requestor() const
|
||||
{
|
||||
return this->requestor;
|
||||
}
|
||||
void get_requestor(std::string& result) const
|
||||
{
|
||||
result = this->requestor;
|
||||
}
|
||||
/**
|
||||
* Method used to get the requestor port used.
|
||||
* @return the requestor port
|
||||
**/
|
||||
short get_requestor_port() const
|
||||
{
|
||||
return this->requestor_port;
|
||||
}
|
||||
bool check_digest_auth(const std::string& realm,
|
||||
const std::string& password,
|
||||
int nonce_timeout, bool& reload_nonce
|
||||
) const;
|
||||
|
||||
friend std::ostream &operator<< (std::ostream &os, const http_request &r);
|
||||
private:
|
||||
/**
|
||||
* Default constructor of the class. It is a specific responsibility of apis to initialize this type of objects.
|
||||
**/
|
||||
http_request():
|
||||
content("")
|
||||
{
|
||||
}
|
||||
/**
|
||||
* Copy constructor.
|
||||
* @param b http_request b to copy attributes from.
|
||||
**/
|
||||
http_request(const http_request& b):
|
||||
user(b.user),
|
||||
pass(b.pass),
|
||||
path(b.path),
|
||||
digested_user(b.digested_user),
|
||||
method(b.method),
|
||||
post_path(b.post_path),
|
||||
headers(b.headers),
|
||||
footers(b.footers),
|
||||
cookies(b.cookies),
|
||||
args(b.args),
|
||||
querystring(b.querystring),
|
||||
content(b.content),
|
||||
version(b.version),
|
||||
requestor(b.requestor),
|
||||
underlying_connection(b.underlying_connection)
|
||||
{
|
||||
}
|
||||
std::string user;
|
||||
std::string pass;
|
||||
std::string path;
|
||||
std::string digested_user;
|
||||
std::string method;
|
||||
std::vector<std::string> post_path;
|
||||
std::map<std::string, std::string, header_comparator> headers;
|
||||
std::map<std::string, std::string, header_comparator> footers;
|
||||
std::map<std::string, std::string, header_comparator> cookies;
|
||||
std::map<std::string, std::string, arg_comparator> args;
|
||||
std::string querystring;
|
||||
std::string content;
|
||||
std::string version;
|
||||
std::string requestor;
|
||||
|
||||
short requestor_port;
|
||||
struct MHD_Connection* underlying_connection;
|
||||
|
||||
void set_underlying_connection(struct MHD_Connection* conn)
|
||||
{
|
||||
this->underlying_connection = conn;
|
||||
}
|
||||
/**
|
||||
* Method used to set an header value by key.
|
||||
* @param key The name identifying the header
|
||||
* @param value The value assumed by the header
|
||||
**/
|
||||
void set_header(const std::string& key, const std::string& value)
|
||||
{
|
||||
this->headers[key] = value;
|
||||
}
|
||||
/**
|
||||
* Method used to set a footer value by key.
|
||||
* @param key The name identifying the footer
|
||||
* @param value The value assumed by the footer
|
||||
**/
|
||||
void set_footer(const std::string& key, const std::string& value)
|
||||
{
|
||||
this->footers[key] = value;
|
||||
}
|
||||
/**
|
||||
* Method used to set a cookie value by key.
|
||||
* @param key The name identifying the cookie
|
||||
* @param value The value assumed by the cookie
|
||||
**/
|
||||
void set_cookie(const std::string& key, const std::string& value)
|
||||
{
|
||||
this->cookies[key] = value;
|
||||
}
|
||||
/**
|
||||
* Method used to set an argument value by key.
|
||||
* @param key The name identifying the argument
|
||||
* @param value The value assumed by the argument
|
||||
**/
|
||||
void set_arg(const std::string& key, const std::string& value)
|
||||
{
|
||||
this->args[key] = value;
|
||||
}
|
||||
/**
|
||||
* Method used to set an argument value by key.
|
||||
* @param key The name identifying the argument
|
||||
* @param value The value assumed by the argument
|
||||
* @param size The size in number of char of the value parameter.
|
||||
**/
|
||||
void set_arg(const char* key, const char* value, size_t size)
|
||||
{
|
||||
this->args[key] = std::string(value, size);
|
||||
}
|
||||
/**
|
||||
* Method used to set the content of the request
|
||||
* @param content The content to set.
|
||||
**/
|
||||
void set_content(const std::string& content)
|
||||
{
|
||||
this->content = content;
|
||||
}
|
||||
/**
|
||||
* Method used to append content to the request preserving the previous inserted content
|
||||
* @param content The content to append.
|
||||
* @param size The size of the data to append.
|
||||
**/
|
||||
void grow_content(const char* content, size_t size)
|
||||
{
|
||||
this->content.append(content, size);
|
||||
}
|
||||
/**
|
||||
* Method used to set the path requested.
|
||||
* @param path The path searched by the request.
|
||||
**/
|
||||
void set_path(const std::string& path)
|
||||
{
|
||||
this->path = path;
|
||||
std::vector<std::string> complete_path;
|
||||
http_utils::tokenize_url(this->path, complete_path);
|
||||
for(unsigned int i = 0; i < complete_path.size(); i++)
|
||||
{
|
||||
this->post_path.push_back(complete_path[i]);
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Method used to set the request METHOD
|
||||
* @param method The method to set for the request
|
||||
**/
|
||||
void set_method(const std::string& method);
|
||||
/**
|
||||
* Method used to set the request http version (ie http 1.1)
|
||||
* @param version The version to set in form of string
|
||||
**/
|
||||
void set_version(const std::string& version)
|
||||
{
|
||||
this->version = version;
|
||||
}
|
||||
/**
|
||||
* Method used to set the requestor
|
||||
* @param requestor The requestor to set
|
||||
**/
|
||||
void set_requestor(const std::string& requestor)
|
||||
{
|
||||
this->requestor = requestor;
|
||||
}
|
||||
/**
|
||||
* Method used to set the requestor port
|
||||
* @param requestor The requestor port to set
|
||||
**/
|
||||
void set_requestor_port(short requestor_port)
|
||||
{
|
||||
this->requestor_port = requestor_port;
|
||||
}
|
||||
/**
|
||||
* Method used to remove an header previously inserted
|
||||
* @param key The key identifying the header to remove.
|
||||
**/
|
||||
void remove_header(const std::string& key)
|
||||
{
|
||||
this->headers.erase(key);
|
||||
}
|
||||
/**
|
||||
* Method used to set all headers of the request.
|
||||
* @param headers The headers key-value map to set for the request.
|
||||
**/
|
||||
void set_headers(const std::map<std::string, std::string>& headers)
|
||||
{
|
||||
std::map<std::string, std::string>::const_iterator it;
|
||||
for(it = headers.begin(); it != headers.end(); ++it)
|
||||
this->headers[it->first] = it->second;
|
||||
}
|
||||
/**
|
||||
* Method used to set all footers of the request.
|
||||
* @param footers The footers key-value map to set for the request.
|
||||
**/
|
||||
void set_footers(const std::map<std::string, std::string>& footers)
|
||||
{
|
||||
std::map<std::string, std::string>::const_iterator it;
|
||||
for(it = footers.begin(); it != footers.end(); ++it)
|
||||
this->footers[it->first] = it->second;
|
||||
}
|
||||
/**
|
||||
* Method used to set all cookies of the request.
|
||||
* @param cookies The cookies key-value map to set for the request.
|
||||
**/
|
||||
void set_cookies(const std::map<std::string, std::string>& cookies)
|
||||
{
|
||||
std::map<std::string, std::string>::const_iterator it;
|
||||
for(it = cookies.begin(); it != cookies.end(); ++it)
|
||||
this->cookies[it->first] = it->second;
|
||||
}
|
||||
/**
|
||||
* Method used to set all arguments of the request.
|
||||
* @param args The args key-value map to set for the request.
|
||||
**/
|
||||
void set_args(const std::map<std::string, std::string>& args)
|
||||
{
|
||||
std::map<std::string, std::string>::const_iterator it;
|
||||
for(it = args.begin(); it != args.end(); ++it)
|
||||
this->args[it->first] = it->second;
|
||||
}
|
||||
/**
|
||||
* Method used to set the username of the request.
|
||||
* @param user The username to set.
|
||||
**/
|
||||
void set_user(const std::string& user)
|
||||
{
|
||||
this->user = user;
|
||||
}
|
||||
void set_digested_user(const std::string& digested_user)
|
||||
{
|
||||
this->digested_user = digested_user;
|
||||
}
|
||||
/**
|
||||
* Method used to set the password of the request.
|
||||
* @param pass The password to set.
|
||||
**/
|
||||
void set_pass(const std::string& pass)
|
||||
{
|
||||
this->pass = pass;
|
||||
}
|
||||
|
||||
friend class webserver;
|
||||
};
|
||||
|
||||
std::ostream &operator<< (std::ostream &os, const http_request &r);
|
||||
|
||||
};
|
||||
#endif
|
||||
@@ -1,218 +0,0 @@
|
||||
/*
|
||||
This file is part of libhttpserver
|
||||
Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
*/
|
||||
|
||||
#if !defined (_HTTPSERVER_HPP_INSIDE_) && !defined (HTTPSERVER_COMPILATION)
|
||||
#error "Only <httpserver.hpp> or <httpserverpp> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef _http_resource_hpp_
|
||||
#define _http_resource_hpp_
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
#ifdef DEBUG
|
||||
#include <iostream>
|
||||
#endif
|
||||
|
||||
namespace httpserver
|
||||
{
|
||||
|
||||
class webserver;
|
||||
class http_request;
|
||||
class http_response;
|
||||
|
||||
/**
|
||||
* Class representing a callable http resource.
|
||||
**/
|
||||
|
||||
void resource_init(std::map<std::string, bool>& res);
|
||||
|
||||
template<typename CHILD>
|
||||
class http_resource
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* Method used to answer to a generic request
|
||||
* @param req Request passed through http
|
||||
* @return A http_response object
|
||||
**/
|
||||
void render(const http_request& r, http_response** res)
|
||||
{
|
||||
static_cast<CHILD*>(this)->render(r, res);
|
||||
}
|
||||
/**
|
||||
* Method used to answer to a GET request
|
||||
* @param req Request passed through http
|
||||
* @return A http_response object
|
||||
**/
|
||||
void render_GET(const http_request& req, http_response** res)
|
||||
{
|
||||
static_cast<CHILD*>(this)->render_GET(req, res);
|
||||
}
|
||||
/**
|
||||
* Method used to answer to a POST request
|
||||
* @param req Request passed through http
|
||||
* @return A http_response object
|
||||
**/
|
||||
void render_POST(const http_request& req, http_response** res)
|
||||
{
|
||||
static_cast<CHILD*>(this)->render_POST(req, res);
|
||||
}
|
||||
/**
|
||||
* Method used to answer to a PUT request
|
||||
* @param req Request passed through http
|
||||
* @return A http_response object
|
||||
**/
|
||||
void render_PUT(const http_request& req, http_response** res)
|
||||
{
|
||||
static_cast<CHILD*>(this)->render_PUT(req, res);
|
||||
}
|
||||
/**
|
||||
* Method used to answer to a HEAD request
|
||||
* @param req Request passed through http
|
||||
* @return A http_response object
|
||||
**/
|
||||
void render_HEAD(const http_request& req, http_response** res)
|
||||
{
|
||||
static_cast<CHILD*>(this)->render_HEAD(req, res);
|
||||
}
|
||||
/**
|
||||
* Method used to answer to a DELETE request
|
||||
* @param req Request passed through http
|
||||
* @return A http_response object
|
||||
**/
|
||||
void render_DELETE(const http_request& req, http_response** res)
|
||||
{
|
||||
static_cast<CHILD*>(this)->render_DELETE(req, res);
|
||||
}
|
||||
/**
|
||||
* Method used to answer to a TRACE request
|
||||
* @param req Request passed through http
|
||||
* @return A http_response object
|
||||
**/
|
||||
void render_TRACE(const http_request& req, http_response** res)
|
||||
{
|
||||
static_cast<CHILD*>(this)->render_TRACE(req, res);
|
||||
}
|
||||
/**
|
||||
* Method used to answer to a OPTIONS request
|
||||
* @param req Request passed through http
|
||||
* @return A http_response object
|
||||
**/
|
||||
void render_OPTIONS(const http_request& req, http_response** res)
|
||||
{
|
||||
static_cast<CHILD*>(this)->render_OPTIONS(req, res);
|
||||
}
|
||||
/**
|
||||
* Method used to answer to a CONNECT request
|
||||
* @param req Request passed through http
|
||||
* @return A http_response object
|
||||
**/
|
||||
void render_CONNECT(const http_request& req, http_response** res)
|
||||
{
|
||||
static_cast<CHILD*>(this)->render_CONNECT(req, res);
|
||||
}
|
||||
/**
|
||||
* Method used to set if a specific method is allowed or not on this request
|
||||
* @param method method to set permission on
|
||||
* @param allowed boolean indicating if the method is allowed or not
|
||||
**/
|
||||
void set_allowing(const std::string& method, bool allowed)
|
||||
{
|
||||
if(this->allowed_methods.count(method))
|
||||
{
|
||||
this->allowed_methods[method] = allowed;
|
||||
}
|
||||
}
|
||||
/**
|
||||
* Method used to implicitly allow all methods
|
||||
**/
|
||||
void allow_all()
|
||||
{
|
||||
std::map<std::string,bool>::iterator it;
|
||||
for ( it=this->allowed_methods.begin() ; it != this->allowed_methods.end(); ++it )
|
||||
this->allowed_methods[(*it).first] = true;
|
||||
}
|
||||
/**
|
||||
* Method used to implicitly disallow all methods
|
||||
**/
|
||||
void disallow_all()
|
||||
{
|
||||
std::map<std::string,bool>::iterator it;
|
||||
for ( it=this->allowed_methods.begin() ; it != this->allowed_methods.end(); ++it )
|
||||
this->allowed_methods[(*it).first] = false;
|
||||
}
|
||||
/**
|
||||
* Method used to discover if an http method is allowed or not for this resource
|
||||
* @param method Method to discover allowings
|
||||
* @return true if the method is allowed
|
||||
**/
|
||||
bool is_allowed(const std::string& method)
|
||||
{
|
||||
if(this->allowed_methods.count(method))
|
||||
{
|
||||
return this->allowed_methods[method];
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef DEBUG
|
||||
std::map<std::string, bool>::iterator it;
|
||||
for(it = allowed_methods.begin(); it != allowed_methods.end(); ++it)
|
||||
{
|
||||
std::cout << (*it).first << " -> " << (*it).second << std::endl;
|
||||
}
|
||||
#endif //DEBUG
|
||||
return false;
|
||||
}
|
||||
}
|
||||
protected:
|
||||
/**
|
||||
* Constructor of the class
|
||||
**/
|
||||
http_resource()
|
||||
{
|
||||
resource_init(allowed_methods);
|
||||
}
|
||||
/**
|
||||
* Copy constructor
|
||||
**/
|
||||
http_resource(const http_resource& b) : allowed_methods(b.allowed_methods) { }
|
||||
|
||||
http_resource& operator = (const http_resource& b)
|
||||
{
|
||||
allowed_methods = b.allowed_methods;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
/**
|
||||
* Class destructor
|
||||
**/
|
||||
~http_resource()
|
||||
{
|
||||
}
|
||||
|
||||
private:
|
||||
friend class webserver;
|
||||
friend void resource_init(std::map<std::string, bool>& res);
|
||||
std::map<std::string, bool> allowed_methods;
|
||||
};
|
||||
|
||||
};
|
||||
#endif
|
||||
@@ -1,311 +0,0 @@
|
||||
/*
|
||||
This file is part of libhttpserver
|
||||
Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
*/
|
||||
|
||||
#if !defined (_HTTPSERVER_HPP_INSIDE_) && !defined (HTTPSERVER_COMPILATION)
|
||||
#error "Only <httpserver.hpp> or <httpserverpp> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef _HTTP_RESPONSE_HPP_
|
||||
#define _HTTP_RESPONSE_HPP_
|
||||
#include <map>
|
||||
#include <utility>
|
||||
#include <string>
|
||||
#include <iosfwd>
|
||||
|
||||
#include "httpserver/details/http_resource_mirror.hpp"
|
||||
|
||||
struct MHD_Connection;
|
||||
|
||||
namespace httpserver
|
||||
{
|
||||
|
||||
class webserver;
|
||||
class http_response_builder;
|
||||
|
||||
namespace http
|
||||
{
|
||||
class header_comparator;
|
||||
class arg_comparator;
|
||||
};
|
||||
|
||||
namespace details
|
||||
{
|
||||
struct http_response_ptr;
|
||||
ssize_t cb(void*, uint64_t, char*, size_t);
|
||||
struct cache_entry;
|
||||
};
|
||||
|
||||
using namespace http;
|
||||
|
||||
class bad_caching_attempt: public std::exception
|
||||
{
|
||||
virtual const char* what() const throw()
|
||||
{
|
||||
return "You cannot pass ce = 0x0 without key!";
|
||||
}
|
||||
};
|
||||
|
||||
typedef ssize_t(*cycle_callback_ptr)(char*, size_t);
|
||||
|
||||
/**
|
||||
* Class representing an abstraction for an Http Response. It is used from classes using these apis to send information through http protocol.
|
||||
**/
|
||||
class http_response
|
||||
{
|
||||
public:
|
||||
|
||||
http_response(const http_response_builder& builder);
|
||||
|
||||
/**
|
||||
* Copy constructor
|
||||
* @param b The http_response object to copy attributes value from.
|
||||
**/
|
||||
http_response(const http_response& b):
|
||||
content(b.content),
|
||||
response_code(b.response_code),
|
||||
autodelete(b.autodelete),
|
||||
realm(b.realm),
|
||||
opaque(b.opaque),
|
||||
reload_nonce(b.reload_nonce),
|
||||
fp(b.fp),
|
||||
filename(b.filename),
|
||||
headers(b.headers),
|
||||
footers(b.footers),
|
||||
cookies(b.cookies),
|
||||
topics(b.topics),
|
||||
keepalive_secs(b.keepalive_secs),
|
||||
keepalive_msg(b.keepalive_msg),
|
||||
send_topic(b.send_topic),
|
||||
underlying_connection(b.underlying_connection),
|
||||
ca(0x0),
|
||||
closure_data(0x0),
|
||||
ce(b.ce),
|
||||
cycle_callback(b.cycle_callback),
|
||||
get_raw_response(b.get_raw_response),
|
||||
decorate_response(b.decorate_response),
|
||||
enqueue_response(b.enqueue_response),
|
||||
completed(b.completed),
|
||||
ws(b.ws),
|
||||
connection_id(b.connection_id)
|
||||
{
|
||||
}
|
||||
|
||||
~http_response();
|
||||
/**
|
||||
* Method used to get the content from the response.
|
||||
* @return the content in string form
|
||||
**/
|
||||
const std::string get_content()
|
||||
{
|
||||
return this->content;
|
||||
}
|
||||
|
||||
void get_content(std::string& result)
|
||||
{
|
||||
result = this->content;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method used to get a specified header defined for the response
|
||||
* @param key The header identification
|
||||
* @return a string representing the value assumed by the header
|
||||
**/
|
||||
const std::string get_header(const std::string& key)
|
||||
{
|
||||
return this->headers[key];
|
||||
}
|
||||
|
||||
void get_header(const std::string& key, std::string& result)
|
||||
{
|
||||
result = this->headers[key];
|
||||
}
|
||||
|
||||
/**
|
||||
* Method used to get a specified footer defined for the response
|
||||
* @param key The footer identification
|
||||
* @return a string representing the value assumed by the footer
|
||||
**/
|
||||
const std::string get_footer(const std::string& key)
|
||||
{
|
||||
return this->footers[key];
|
||||
}
|
||||
|
||||
void get_footer(const std::string& key, std::string& result)
|
||||
{
|
||||
result = this->footers[key];
|
||||
}
|
||||
|
||||
const std::string get_cookie(const std::string& key)
|
||||
{
|
||||
return this->cookies[key];
|
||||
}
|
||||
|
||||
void get_cookie(const std::string& key, std::string& result)
|
||||
{
|
||||
result = this->cookies[key];
|
||||
}
|
||||
|
||||
/**
|
||||
* Method used to get all headers passed with the request.
|
||||
* @return a map<string,string> containing all headers.
|
||||
**/
|
||||
size_t get_headers(
|
||||
std::map<std::string, std::string, header_comparator>& result
|
||||
) const;
|
||||
|
||||
/**
|
||||
* Method used to get all footers passed with the request.
|
||||
* @return a map<string,string> containing all footers.
|
||||
**/
|
||||
size_t get_footers(
|
||||
std::map<std::string, std::string, header_comparator>& result
|
||||
) const;
|
||||
|
||||
size_t get_cookies(
|
||||
std::map<std::string, std::string, header_comparator>& result
|
||||
) const;
|
||||
|
||||
/**
|
||||
* Method used to get the response code from the response
|
||||
* @return The response code
|
||||
**/
|
||||
int get_response_code()
|
||||
{
|
||||
return this->response_code;
|
||||
}
|
||||
|
||||
const std::string get_realm() const
|
||||
{
|
||||
return this->realm;
|
||||
}
|
||||
|
||||
void get_realm(std::string& result) const
|
||||
{
|
||||
result = this->realm;
|
||||
}
|
||||
|
||||
const std::string get_opaque() const
|
||||
{
|
||||
return this->opaque;
|
||||
}
|
||||
|
||||
void get_opaque(std::string& result) const
|
||||
{
|
||||
result = this->opaque;
|
||||
}
|
||||
|
||||
const bool need_nonce_reload() const
|
||||
{
|
||||
return this->reload_nonce;
|
||||
}
|
||||
|
||||
int get_switch_callback() const
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool is_autodelete() const
|
||||
{
|
||||
return autodelete;
|
||||
}
|
||||
|
||||
size_t get_topics(std::vector<std::string>& topics) const
|
||||
{
|
||||
typedef std::vector<std::string>::const_iterator topics_it;
|
||||
for(topics_it it=this->topics.begin();it != this->topics.end();++it)
|
||||
topics.push_back(*it);
|
||||
return topics.size();
|
||||
}
|
||||
protected:
|
||||
typedef details::binders::functor_two<MHD_Response**, webserver*, void> get_raw_response_t;
|
||||
|
||||
typedef details::binders::functor_one<MHD_Response*, void> decorate_response_t;
|
||||
|
||||
typedef details::binders::functor_two<MHD_Connection* ,MHD_Response*, int> enqueue_response_t;
|
||||
|
||||
std::string content;
|
||||
int response_code;
|
||||
bool autodelete;
|
||||
std::string realm;
|
||||
std::string opaque;
|
||||
bool reload_nonce;
|
||||
int fp;
|
||||
std::string filename;
|
||||
std::map<std::string, std::string, header_comparator> headers;
|
||||
std::map<std::string, std::string, header_comparator> footers;
|
||||
std::map<std::string, std::string, header_comparator> cookies;
|
||||
std::vector<std::string> topics;
|
||||
int keepalive_secs;
|
||||
std::string keepalive_msg;
|
||||
std::string send_topic;
|
||||
struct MHD_Connection* underlying_connection;
|
||||
void(*ca)(void*);
|
||||
void* closure_data;
|
||||
details::cache_entry* ce;
|
||||
cycle_callback_ptr cycle_callback;
|
||||
|
||||
const get_raw_response_t get_raw_response;
|
||||
const decorate_response_t decorate_response;
|
||||
const enqueue_response_t enqueue_response;
|
||||
|
||||
bool completed;
|
||||
|
||||
webserver* ws;
|
||||
struct httpserver_ska connection_id;
|
||||
|
||||
void get_raw_response_str(MHD_Response** res, webserver* ws = 0x0);
|
||||
void get_raw_response_file(MHD_Response** res, webserver* ws = 0x0);
|
||||
void get_raw_response_switch_r(MHD_Response** res, webserver* ws = 0x0);
|
||||
|
||||
void get_raw_response_lp_receive(MHD_Response** res,
|
||||
webserver* ws = 0x0);
|
||||
|
||||
void get_raw_response_lp_send(MHD_Response** res, webserver* ws = 0x0);
|
||||
void get_raw_response_cache(MHD_Response** res, webserver* ws = 0x0);
|
||||
void get_raw_response_deferred(MHD_Response** res, webserver* ws = 0x0);
|
||||
void decorate_response_str(MHD_Response* res);
|
||||
void decorate_response_cache(MHD_Response* res);
|
||||
void decorate_response_deferred(MHD_Response* res);
|
||||
int enqueue_response_str(MHD_Connection* connection, MHD_Response* res);
|
||||
|
||||
int enqueue_response_basic(MHD_Connection* connection,
|
||||
MHD_Response* res
|
||||
);
|
||||
|
||||
int enqueue_response_digest(MHD_Connection* connection,
|
||||
MHD_Response* res
|
||||
);
|
||||
|
||||
friend class webserver;
|
||||
friend struct details::http_response_ptr;
|
||||
friend class http_response_builder;
|
||||
friend void clone_response(const http_response& hr, http_response** dhr);
|
||||
friend ssize_t details::cb(void* cls, uint64_t pos, char* buf, size_t max);
|
||||
friend std::ostream &operator<< (std::ostream &os, const http_response &r);
|
||||
private:
|
||||
http_response& operator=(const http_response& b);
|
||||
|
||||
static ssize_t data_generator (void* cls, uint64_t pos, char* buf, size_t max);
|
||||
};
|
||||
|
||||
std::ostream &operator<< (std::ostream &os, const http_response &r);
|
||||
|
||||
};
|
||||
#endif
|
||||
@@ -1,298 +0,0 @@
|
||||
/*
|
||||
This file is part of libhttpserver
|
||||
Copyright (C) 2011, 2012, 2013, 2014 Sebastiano Merlino
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
*/
|
||||
|
||||
#if !defined (_HTTPSERVER_HPP_INSIDE_) && !defined (HTTPSERVER_COMPILATION)
|
||||
#error "Only <httpserver.hpp> or <httpserverpp> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef _HTTP_RESPONSE_BUILDER_HPP_
|
||||
#define _HTTP_RESPONSE_BUILDER_HPP_
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include "httpserver/http_response.hpp"
|
||||
|
||||
struct MHD_Connection;
|
||||
|
||||
namespace httpserver
|
||||
{
|
||||
|
||||
class webserver;
|
||||
|
||||
namespace http
|
||||
{
|
||||
class header_comparator;
|
||||
};
|
||||
|
||||
namespace details
|
||||
{
|
||||
struct cache_entry;
|
||||
};
|
||||
|
||||
using namespace http;
|
||||
|
||||
struct byte_string
|
||||
{
|
||||
public:
|
||||
byte_string(const char* content_hook, size_t content_length):
|
||||
content_hook(content_hook),
|
||||
content_length(content_length)
|
||||
{
|
||||
}
|
||||
|
||||
const char* get_content_hook() const
|
||||
{
|
||||
return content_hook;
|
||||
}
|
||||
|
||||
size_t get_content_length() const
|
||||
{
|
||||
return content_length;
|
||||
}
|
||||
|
||||
private:
|
||||
const char* content_hook;
|
||||
size_t content_length;
|
||||
};
|
||||
|
||||
class http_response_builder
|
||||
{
|
||||
public:
|
||||
explicit http_response_builder(
|
||||
const std::string& content_hook,
|
||||
int response_code = 200,
|
||||
const std::string& content_type = "text/plain",
|
||||
bool autodelete = true
|
||||
):
|
||||
_content_hook(content_hook),
|
||||
_response_code(response_code),
|
||||
_autodelete(autodelete),
|
||||
_realm(""),
|
||||
_opaque(""),
|
||||
_reload_nonce(false),
|
||||
_headers(std::map<std::string, std::string, header_comparator>()),
|
||||
_footers(std::map<std::string, std::string, header_comparator>()),
|
||||
_cookies(std::map<std::string, std::string, header_comparator>()),
|
||||
_topics(std::vector<std::string>()),
|
||||
_keepalive_secs(-1),
|
||||
_keepalive_msg(""),
|
||||
_send_topic(""),
|
||||
_ce(0x0),
|
||||
_get_raw_response(&http_response::get_raw_response_str),
|
||||
_decorate_response(&http_response::decorate_response_str),
|
||||
_enqueue_response(&http_response::enqueue_response_str)
|
||||
{
|
||||
_headers[http_utils::http_header_content_type] = content_type;
|
||||
}
|
||||
|
||||
http_response_builder(
|
||||
const byte_string& content_hook,
|
||||
int response_code = 200,
|
||||
const std::string& content_type = "text/plain",
|
||||
bool autodelete = true
|
||||
):
|
||||
_content_hook(std::string(content_hook.get_content_hook(), content_hook.get_content_length())),
|
||||
_response_code(response_code),
|
||||
_autodelete(autodelete),
|
||||
_realm(""),
|
||||
_opaque(""),
|
||||
_reload_nonce(false),
|
||||
_headers(std::map<std::string, std::string, header_comparator>()),
|
||||
_footers(std::map<std::string, std::string, header_comparator>()),
|
||||
_cookies(std::map<std::string, std::string, header_comparator>()),
|
||||
_topics(std::vector<std::string>()),
|
||||
_keepalive_secs(-1),
|
||||
_keepalive_msg(""),
|
||||
_send_topic(""),
|
||||
_ce(0x0),
|
||||
_get_raw_response(&http_response::get_raw_response_str),
|
||||
_decorate_response(&http_response::decorate_response_str),
|
||||
_enqueue_response(&http_response::enqueue_response_str)
|
||||
{
|
||||
_headers[http_utils::http_header_content_type] = content_type;
|
||||
}
|
||||
|
||||
http_response_builder(const http_response_builder& b):
|
||||
_content_hook(b._content_hook),
|
||||
_response_code(b._response_code),
|
||||
_autodelete(b._autodelete),
|
||||
_realm(b._realm),
|
||||
_opaque(b._opaque),
|
||||
_reload_nonce(b._reload_nonce),
|
||||
_headers(b._headers),
|
||||
_footers(b._footers),
|
||||
_cookies(b._cookies),
|
||||
_topics(b._topics),
|
||||
_keepalive_secs(b._keepalive_secs),
|
||||
_keepalive_msg(b._keepalive_msg),
|
||||
_send_topic(b._send_topic),
|
||||
_ce(b._ce),
|
||||
_get_raw_response(b._get_raw_response),
|
||||
_decorate_response(b._decorate_response),
|
||||
_enqueue_response(b._enqueue_response)
|
||||
{
|
||||
}
|
||||
|
||||
http_response_builder& operator=(const http_response_builder& b)
|
||||
{
|
||||
_content_hook = b._content_hook;
|
||||
_response_code = b._response_code;
|
||||
_autodelete = b._autodelete;
|
||||
_realm = b._realm;
|
||||
_opaque = b._opaque;
|
||||
_reload_nonce = b._reload_nonce;
|
||||
_headers = b._headers;
|
||||
_footers = b._footers;
|
||||
_cookies = b._cookies;
|
||||
_topics = b._topics;
|
||||
_keepalive_secs = b._keepalive_secs;
|
||||
_keepalive_msg = b._keepalive_msg;
|
||||
_send_topic = b._send_topic;
|
||||
_ce = b._ce;
|
||||
_get_raw_response = b._get_raw_response;
|
||||
_decorate_response = b._decorate_response;
|
||||
_enqueue_response = b._enqueue_response;
|
||||
return *this;
|
||||
}
|
||||
|
||||
~http_response_builder()
|
||||
{
|
||||
}
|
||||
|
||||
http_response_builder& string_response()
|
||||
{
|
||||
return *this;
|
||||
}
|
||||
|
||||
http_response_builder& file_response()
|
||||
{
|
||||
_get_raw_response = &http_response::get_raw_response_file;
|
||||
return *this;
|
||||
}
|
||||
|
||||
http_response_builder& basic_auth_fail_response(const std::string& realm = "")
|
||||
{
|
||||
_realm = realm;
|
||||
_enqueue_response = &http_response::enqueue_response_basic;
|
||||
return *this;
|
||||
}
|
||||
|
||||
http_response_builder& digest_auth_fail_response(
|
||||
const std::string& realm = "",
|
||||
const std::string& opaque = "",
|
||||
bool reload_nonce = false
|
||||
)
|
||||
{
|
||||
_realm = realm;
|
||||
_opaque = opaque;
|
||||
_reload_nonce = reload_nonce;
|
||||
_enqueue_response = &http_response::enqueue_response_digest;
|
||||
return *this;
|
||||
}
|
||||
|
||||
http_response_builder& long_polling_receive_response(
|
||||
const std::vector<std::string>& topics,
|
||||
int keepalive_secs = -1,
|
||||
std::string keepalive_msg = ""
|
||||
)
|
||||
{
|
||||
_topics = topics;
|
||||
_keepalive_secs = keepalive_secs;
|
||||
_keepalive_msg = keepalive_msg;
|
||||
_get_raw_response = &http_response::get_raw_response_lp_receive;
|
||||
return *this;
|
||||
}
|
||||
|
||||
http_response_builder& long_polling_send_response(const std::string& send_topic)
|
||||
{
|
||||
_send_topic = send_topic;
|
||||
_get_raw_response = &http_response::get_raw_response_lp_send;
|
||||
return *this;
|
||||
}
|
||||
|
||||
http_response_builder& cache_response()
|
||||
{
|
||||
_get_raw_response = &http_response::get_raw_response_cache;
|
||||
_decorate_response = &http_response::decorate_response_cache;
|
||||
return *this;
|
||||
}
|
||||
|
||||
http_response_builder& deferred_response(cycle_callback_ptr cycle_callback)
|
||||
{
|
||||
_cycle_callback = cycle_callback;
|
||||
_get_raw_response = &http_response::get_raw_response_deferred;
|
||||
_decorate_response = &http_response::decorate_response_deferred;
|
||||
return *this;
|
||||
}
|
||||
|
||||
http_response_builder& shoutCAST_response()
|
||||
{
|
||||
_response_code |= http_utils::shoutcast_response;
|
||||
return *this;
|
||||
}
|
||||
|
||||
http_response_builder& with_header(const std::string& key, const std::string& value)
|
||||
{
|
||||
_headers[key] = value; return *this;
|
||||
}
|
||||
|
||||
http_response_builder& with_footer(const std::string& key, const std::string& value)
|
||||
{
|
||||
_footers[key] = value; return *this;
|
||||
}
|
||||
|
||||
http_response_builder& with_cookie(const std::string& key, const std::string& value)
|
||||
{
|
||||
_cookies[key] = value; return *this;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string _content_hook;
|
||||
int _response_code;
|
||||
bool _autodelete;
|
||||
std::string _realm;
|
||||
std::string _opaque;
|
||||
bool _reload_nonce;
|
||||
std::map<std::string, std::string, header_comparator> _headers;
|
||||
std::map<std::string, std::string, header_comparator> _footers;
|
||||
std::map<std::string, std::string, header_comparator> _cookies;
|
||||
std::vector<std::string> _topics;
|
||||
int _keepalive_secs;
|
||||
std::string _keepalive_msg;
|
||||
std::string _send_topic;
|
||||
cycle_callback_ptr _cycle_callback;
|
||||
details::cache_entry* _ce;
|
||||
|
||||
void (http_response::*_get_raw_response)(MHD_Response**, webserver*);
|
||||
void (http_response::*_decorate_response)(MHD_Response*);
|
||||
int (http_response::*_enqueue_response)(MHD_Connection*, MHD_Response*);
|
||||
|
||||
http_response_builder& cache_response(details::cache_entry* ce)
|
||||
{
|
||||
_ce = ce;
|
||||
_get_raw_response = &http_response::get_raw_response_cache;
|
||||
_decorate_response = &http_response::decorate_response_cache;
|
||||
return *this;
|
||||
}
|
||||
|
||||
friend class http_response;
|
||||
};
|
||||
|
||||
};
|
||||
#endif //_HTTP_RESPONSE_BUILDER_HPP_
|
||||
@@ -1,422 +0,0 @@
|
||||
/*
|
||||
This file is part of libhttpserver
|
||||
Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
*/
|
||||
|
||||
#if !defined (_HTTPSERVER_HPP_INSIDE_) && !defined (HTTPSERVER_COMPILATION)
|
||||
#error "Only <httpserver.hpp> or <httpserverpp> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef _HTTPUTILS_H_
|
||||
#define _HTTPUTILS_H_
|
||||
|
||||
#include <microhttpd.h>
|
||||
#include <string>
|
||||
#include <cctype>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
#include <exception>
|
||||
#include <iosfwd>
|
||||
#ifdef HAVE_GNUTLS
|
||||
#include <gnutls/gnutls.h>
|
||||
#endif
|
||||
|
||||
#define DEFAULT_MASK_VALUE 0xFFFF
|
||||
|
||||
namespace httpserver {
|
||||
namespace http {
|
||||
|
||||
class bad_ip_format_exception: public std::exception
|
||||
{
|
||||
virtual const char* what() const throw()
|
||||
{
|
||||
return "IP is badly formatted!";
|
||||
}
|
||||
};
|
||||
|
||||
class file_access_exception: public std::exception
|
||||
{
|
||||
virtual const char* what() const throw()
|
||||
{
|
||||
return "Unable to open file!";
|
||||
}
|
||||
};
|
||||
|
||||
class http_utils
|
||||
{
|
||||
public:
|
||||
|
||||
enum cred_type_T
|
||||
{
|
||||
NONE = -1
|
||||
#ifdef HAVE_GNUTLS
|
||||
,CERTIFICATE = GNUTLS_CRD_CERTIFICATE,
|
||||
ANON = GNUTLS_CRD_ANON,
|
||||
SRP = GNUTLS_CRD_SRP,
|
||||
PSK = GNUTLS_CRD_PSK,
|
||||
IA = GNUTLS_CRD_IA
|
||||
#endif
|
||||
};
|
||||
|
||||
enum start_method_T
|
||||
{
|
||||
INTERNAL_SELECT = MHD_NO_FLAG,
|
||||
THREADS = MHD_USE_THREAD_PER_CONNECTION,
|
||||
POLL = MHD_USE_THREAD_PER_CONNECTION | MHD_USE_POLL
|
||||
};
|
||||
|
||||
enum policy_T
|
||||
{
|
||||
ACCEPT,
|
||||
REJECT
|
||||
};
|
||||
|
||||
enum IP_version_T
|
||||
{
|
||||
IPV4 = 4, IPV6 = 16
|
||||
};
|
||||
|
||||
static const short http_method_connect_code;
|
||||
static const short http_method_delete_code;
|
||||
static const short http_method_get_code;
|
||||
static const short http_method_head_code;
|
||||
static const short http_method_options_code;
|
||||
static const short http_method_post_code;
|
||||
static const short http_method_put_code;
|
||||
static const short http_method_trace_code;
|
||||
static const short http_method_unknown_code;
|
||||
|
||||
static const int http_continue;
|
||||
static const int http_switching_protocol;
|
||||
static const int http_processing;
|
||||
|
||||
static const int http_ok;
|
||||
static const int http_created;
|
||||
static const int http_accepted;
|
||||
static const int http_non_authoritative_information;
|
||||
static const int http_no_content;
|
||||
static const int http_reset_content;
|
||||
static const int http_partial_content;
|
||||
static const int http_multi_status;
|
||||
|
||||
static const int http_multiple_choices;
|
||||
static const int http_moved_permanently;
|
||||
static const int http_found;
|
||||
static const int http_see_other;
|
||||
static const int http_not_modified;
|
||||
static const int http_use_proxy;
|
||||
static const int http_switch_proxy;
|
||||
static const int http_temporary_redirect;
|
||||
|
||||
static const int http_bad_request;
|
||||
static const int http_unauthorized;
|
||||
static const int http_payment_required;
|
||||
static const int http_forbidden;
|
||||
static const int http_not_found;
|
||||
static const int http_method_not_allowed;
|
||||
static const int http_method_not_acceptable;
|
||||
static const int http_proxy_authentication_required;
|
||||
static const int http_request_timeout;
|
||||
static const int http_conflict;
|
||||
static const int http_gone;
|
||||
static const int http_length_required;
|
||||
static const int http_precondition_failed;
|
||||
static const int http_request_entity_too_large;
|
||||
static const int http_request_uri_too_long;
|
||||
static const int http_unsupported_media_type;
|
||||
static const int http_requested_range_not_satisfiable;
|
||||
static const int http_expectation_failed;
|
||||
static const int http_unprocessable_entity;
|
||||
static const int http_locked;
|
||||
static const int http_failed_dependency;
|
||||
static const int http_unordered_collection;
|
||||
static const int http_upgrade_required;
|
||||
static const int http_retry_with;
|
||||
|
||||
static const int http_internal_server_error;
|
||||
static const int http_not_implemented;
|
||||
static const int http_bad_gateway;
|
||||
static const int http_service_unavailable;
|
||||
static const int http_gateway_timeout;
|
||||
static const int http_version_not_supported;
|
||||
static const int http_variant_also_negotiated;
|
||||
static const int http_insufficient_storage;
|
||||
static const int http_bandwidth_limit_exceeded;
|
||||
static const int http_not_extended;
|
||||
|
||||
static const int shoutcast_response;
|
||||
|
||||
/* See also: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html */
|
||||
static const std::string http_header_accept;
|
||||
static const std::string http_header_accept_charset;
|
||||
static const std::string http_header_accept_encoding;
|
||||
static const std::string http_header_accept_language;
|
||||
static const std::string http_header_accept_ranges;
|
||||
static const std::string http_header_age;
|
||||
static const std::string http_header_allow;
|
||||
static const std::string http_header_authorization;
|
||||
static const std::string http_header_cache_control;
|
||||
static const std::string http_header_connection;
|
||||
static const std::string http_header_content_encoding;
|
||||
static const std::string http_header_content_language;
|
||||
static const std::string http_header_content_length;
|
||||
static const std::string http_header_content_location;
|
||||
static const std::string http_header_content_md5;
|
||||
static const std::string http_header_content_range;
|
||||
static const std::string http_header_content_type;
|
||||
static const std::string http_header_date;
|
||||
static const std::string http_header_etag;
|
||||
static const std::string http_header_expect;
|
||||
static const std::string http_header_expires;
|
||||
static const std::string http_header_from;
|
||||
static const std::string http_header_host;
|
||||
static const std::string http_header_if_match;
|
||||
static const std::string http_header_if_modified_since;
|
||||
static const std::string http_header_if_none_match;
|
||||
static const std::string http_header_if_range;
|
||||
static const std::string http_header_if_unmodified_since;
|
||||
static const std::string http_header_last_modified;
|
||||
static const std::string http_header_location;
|
||||
static const std::string http_header_max_forwards;
|
||||
static const std::string http_header_pragma;
|
||||
static const std::string http_header_proxy_authenticate;
|
||||
static const std::string http_header_proxy_authentication;
|
||||
static const std::string http_header_range;
|
||||
static const std::string http_header_referer;
|
||||
static const std::string http_header_retry_after;
|
||||
static const std::string http_header_server;
|
||||
static const std::string http_header_te;
|
||||
static const std::string http_header_trailer;
|
||||
static const std::string http_header_transfer_encoding;
|
||||
static const std::string http_header_upgrade;
|
||||
static const std::string http_header_user_agent;
|
||||
static const std::string http_header_vary;
|
||||
static const std::string http_header_via;
|
||||
static const std::string http_header_warning;
|
||||
static const std::string http_header_www_authenticate;
|
||||
|
||||
static const std::string http_version_1_0;
|
||||
static const std::string http_version_1_1;
|
||||
|
||||
static const std::string http_method_connect;
|
||||
static const std::string http_method_delete;
|
||||
static const std::string http_method_head;
|
||||
static const std::string http_method_get;
|
||||
static const std::string http_method_options;
|
||||
static const std::string http_method_post;
|
||||
static const std::string http_method_put;
|
||||
static const std::string http_method_trace;
|
||||
|
||||
static const std::string http_post_encoding_form_urlencoded;
|
||||
static const std::string http_post_encoding_multipart_formdata;
|
||||
static size_t tokenize_url(const std::string&,
|
||||
std::vector<std::string>& result, const char separator = '/'
|
||||
);
|
||||
static void standardize_url(const std::string&, std::string& result);
|
||||
};
|
||||
|
||||
#define COMPARATOR(x, y, op) \
|
||||
{ \
|
||||
size_t l1 = (x).size();\
|
||||
size_t l2 = (y).size();\
|
||||
if (l1 < l2) return true;\
|
||||
if (l1 > l2) return false;\
|
||||
\
|
||||
for (size_t n = 0; n < l1; n++)\
|
||||
{\
|
||||
int xc = op((x)[n]);\
|
||||
int yc = op((y)[n]);\
|
||||
if (xc < yc) return true;\
|
||||
if (xc > yc) return false;\
|
||||
}\
|
||||
return false;\
|
||||
}
|
||||
|
||||
class header_comparator {
|
||||
public:
|
||||
/**
|
||||
* Operator used to compare strings.
|
||||
* @param first string
|
||||
* @param second string
|
||||
**/
|
||||
bool operator()(const std::string& x,const std::string& y) const
|
||||
{
|
||||
COMPARATOR(x, y, std::toupper);
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Operator Class that is used to compare two strings. The comparison can be sensitive or insensitive.
|
||||
* The default comparison is case sensitive. To obtain insensitive comparison you have to pass in
|
||||
* compilation phase the flag CASE_INSENSITIVE to the preprocessor.
|
||||
**/
|
||||
class arg_comparator {
|
||||
public:
|
||||
/**
|
||||
* Operator used to compare strings.
|
||||
* @param first string
|
||||
* @param second string
|
||||
**/
|
||||
bool operator()(const std::string& x,const std::string& y) const
|
||||
{
|
||||
#ifdef CASE_INSENSITIVE
|
||||
COMPARATOR(x, y, std::toupper);
|
||||
#else
|
||||
COMPARATOR(x, y, );
|
||||
#endif
|
||||
}
|
||||
};
|
||||
|
||||
struct ip_representation
|
||||
{
|
||||
http_utils::IP_version_T ip_version;
|
||||
unsigned short pieces[16];
|
||||
unsigned int mask:16;
|
||||
|
||||
ip_representation(http_utils::IP_version_T ip_version) :
|
||||
ip_version(ip_version)
|
||||
{
|
||||
mask = DEFAULT_MASK_VALUE;
|
||||
std::fill(pieces, pieces + 16, 0);
|
||||
}
|
||||
|
||||
ip_representation(const std::string& ip);
|
||||
ip_representation(const struct sockaddr* ip);
|
||||
|
||||
bool operator <(const ip_representation& b) const;
|
||||
const int weight() const
|
||||
{
|
||||
//variable-precision SWAR algorithm
|
||||
unsigned int x = mask;
|
||||
x = x - ((x >> 1) & 0x55555555);
|
||||
x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
|
||||
return (((x + (x >> 4)) & 0x0F0F0F0F) * 0x01010101) >> 24;
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Method used to get an ip in form of string from a sockaddr structure
|
||||
* @param sa The sockaddr object to find the ip address from
|
||||
* @param maxlen Maxlen of the address (automatically discovered if not passed)
|
||||
* @return string containing the ip address
|
||||
**/
|
||||
void get_ip_str(const struct sockaddr *sa,
|
||||
std::string& result, socklen_t maxlen = 0
|
||||
);
|
||||
|
||||
std::string get_ip_str_new(const struct sockaddr* sa,
|
||||
socklen_t maxlen = 0
|
||||
);
|
||||
/**
|
||||
* Method used to get a port from a sockaddr
|
||||
* @param sa The sockaddr object to find the port from
|
||||
* @return short representing the port
|
||||
**/
|
||||
short get_port(const struct sockaddr* sa);
|
||||
|
||||
/**
|
||||
* Method to output the contents of a headers map to a std::ostream
|
||||
* @param os The ostream
|
||||
* @param prefix Prefix to identify the map
|
||||
* @param map
|
||||
**/
|
||||
void dump_header_map(std::ostream &os, const std::string &prefix,
|
||||
const std::map<std::string,std::string,header_comparator> &map);
|
||||
|
||||
/**
|
||||
* Method to output the contents of an arguments map to a std::ostream
|
||||
* @param os The ostream
|
||||
* @param prefix Prefix to identify the map
|
||||
* @param map
|
||||
**/
|
||||
void dump_arg_map(std::ostream &os, const std::string &prefix,
|
||||
const std::map<std::string,std::string,arg_comparator> &map);
|
||||
|
||||
/**
|
||||
* Process escape sequences ('+'=space, %HH) Updates val in place; the
|
||||
* result should be UTF-8 encoded and cannot be larger than the input.
|
||||
* The result must also still be 0-terminated.
|
||||
*
|
||||
* @param val the string to unescape
|
||||
* @return length of the resulting val (strlen(val) maybe
|
||||
* shorter afterwards due to elimination of escape sequences)
|
||||
*/
|
||||
size_t http_unescape (char *val);
|
||||
|
||||
char* load_file (const char *filename);
|
||||
|
||||
size_t load_file (const char* filename, char** content);
|
||||
|
||||
struct httpserver_ska
|
||||
{
|
||||
httpserver_ska(struct sockaddr* addr):
|
||||
addr(addr),
|
||||
ip(get_ip_str_new(addr)),
|
||||
port(get_port(addr))
|
||||
{
|
||||
}
|
||||
|
||||
httpserver_ska(): addr(0x0) { }
|
||||
|
||||
httpserver_ska(const httpserver_ska& o):
|
||||
addr(o.addr),
|
||||
ip(o.ip),
|
||||
port(o.port)
|
||||
{
|
||||
}
|
||||
|
||||
bool operator<(const httpserver_ska& o) const
|
||||
{
|
||||
if(this->ip < o.ip)
|
||||
return true;
|
||||
else if(this->ip > o.ip)
|
||||
return false;
|
||||
else if(this->port < o.port)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
httpserver_ska& operator=(const httpserver_ska& o)
|
||||
{
|
||||
this->addr = o.addr;
|
||||
this->ip = o.ip;
|
||||
this->port = o.port;
|
||||
return *this;
|
||||
}
|
||||
|
||||
httpserver_ska& operator=(struct sockaddr* addr)
|
||||
{
|
||||
this->addr = addr;
|
||||
this->ip = get_ip_str_new(addr);
|
||||
this->port = get_port(addr);
|
||||
return *this;
|
||||
}
|
||||
|
||||
struct sockaddr* addr;
|
||||
std::string ip;
|
||||
int port;
|
||||
};
|
||||
|
||||
|
||||
|
||||
};
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -1,364 +0,0 @@
|
||||
/*
|
||||
This file is part of libhttpserver
|
||||
Copyright (C) 2011, 2012, 2013, 2014, 2015 Sebastiano Merlino
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
|
||||
USA
|
||||
*/
|
||||
|
||||
#if !defined (_HTTPSERVER_HPP_INSIDE_) && !defined (HTTPSERVER_COMPILATION)
|
||||
#error "Only <httpserver.hpp> or <httpserverpp> can be included directly."
|
||||
#endif
|
||||
|
||||
#ifndef _FRAMEWORK_WEBSERVER_HPP_
|
||||
#define _FRAMEWORK_WEBSERVER_HPP_
|
||||
|
||||
#define NOT_FOUND_ERROR "Not Found"
|
||||
#define METHOD_ERROR "Method not Allowed"
|
||||
#define NOT_METHOD_ERROR "Method not Acceptable"
|
||||
#define GENERIC_ERROR "Internal Error"
|
||||
|
||||
#include <cstring>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
#include <set>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
#include <stdlib.h>
|
||||
#include <memory>
|
||||
#include <deque>
|
||||
|
||||
#include <pthread.h>
|
||||
|
||||
#include "httpserver/create_webserver.hpp"
|
||||
|
||||
namespace httpserver {
|
||||
|
||||
template<typename CHILD> class http_resource;
|
||||
class http_response;
|
||||
template<typename CHILD> class event_supplier;
|
||||
class create_webserver;
|
||||
|
||||
namespace http {
|
||||
struct ip_representation;
|
||||
struct httpserver_ska;
|
||||
};
|
||||
|
||||
namespace details {
|
||||
class http_resource_mirror;
|
||||
class event_tuple;
|
||||
class http_endpoint;
|
||||
struct daemon_item;
|
||||
struct modded_request;
|
||||
struct cache_entry;
|
||||
class comet_manager;
|
||||
}
|
||||
|
||||
/**
|
||||
* Class representing the webserver. Main class of the apis.
|
||||
**/
|
||||
class webserver
|
||||
{
|
||||
public:
|
||||
webserver(const create_webserver& params);
|
||||
/**
|
||||
* Destructor of the class
|
||||
**/
|
||||
~webserver();
|
||||
/**
|
||||
* Method used to start the webserver.
|
||||
* This method can be blocking or not.
|
||||
* @param blocking param indicating if the method is blocking or not
|
||||
* @return a boolean indicating if the webserver is running or not.
|
||||
**/
|
||||
bool start(bool blocking = false);
|
||||
/**
|
||||
* Method used to stop the webserver.
|
||||
* @return true if the webserver is stopped.
|
||||
**/
|
||||
bool stop();
|
||||
/**
|
||||
* Method used to evaluate if the server is running or not.
|
||||
* @return true if the webserver is running
|
||||
**/
|
||||
bool is_running();
|
||||
/**
|
||||
* Method used to register a resource with the webserver.
|
||||
* @param resource The url pointing to the resource. This url could be also parametrized in the form /path/to/url/{par1}/and/{par2}
|
||||
* or a regular expression.
|
||||
* @param http_resource http_resource pointer to register.
|
||||
* @param family boolean indicating whether the resource is registered for the endpoint and its child or not.
|
||||
* @return true if the resource was registered
|
||||
**/
|
||||
template <typename T>
|
||||
bool register_resource(const std::string& resource,
|
||||
http_resource<T>* res, bool family = false
|
||||
)
|
||||
{
|
||||
details::http_resource_mirror hrm(res);
|
||||
return register_resource(resource, hrm, family);
|
||||
}
|
||||
|
||||
void unregister_resource(const std::string& resource);
|
||||
void ban_ip(const std::string& ip);
|
||||
void allow_ip(const std::string& ip);
|
||||
void unban_ip(const std::string& ip);
|
||||
void disallow_ip(const std::string& ip);
|
||||
|
||||
void send_message_to_topic(const std::string& topic,
|
||||
const std::string& message
|
||||
);
|
||||
void send_message_to_consumer(const http::httpserver_ska& connection_id,
|
||||
const std::string& message, bool to_lock = true
|
||||
);
|
||||
void register_to_topics(const std::vector<std::string>& topics,
|
||||
const http::httpserver_ska& connection_id, int keepalive_secs = -1,
|
||||
std::string keepalive_msg = ""
|
||||
);
|
||||
size_t read_message(const http::httpserver_ska& connection_id,
|
||||
std::string& message
|
||||
);
|
||||
size_t get_topic_consumers(const std::string& topic,
|
||||
std::set<http::httpserver_ska>& consumers
|
||||
);
|
||||
bool pop_signaled(const http::httpserver_ska& consumer);
|
||||
|
||||
http_response* get_from_cache(const std::string& key, bool* valid,
|
||||
bool lock = false, bool write = false
|
||||
);
|
||||
http_response* get_from_cache(const std::string& key, bool* valid,
|
||||
details::cache_entry** ce, bool lock = false, bool write = false
|
||||
);
|
||||
void lock_cache_element(details::cache_entry* ce, bool write = false);
|
||||
void unlock_cache_element(details::cache_entry* ce);
|
||||
details::cache_entry* put_in_cache(const std::string& key, http_response* value,
|
||||
bool* new_elem, bool lock = false,
|
||||
bool write = false, int validity = -1
|
||||
);
|
||||
void remove_from_cache(const std::string& key);
|
||||
bool is_valid(const std::string& key);
|
||||
void clean_cache();
|
||||
|
||||
const log_access_ptr get_access_logger() const
|
||||
{
|
||||
return this->log_access;
|
||||
}
|
||||
|
||||
const log_error_ptr get_error_logger() const
|
||||
{
|
||||
return this->log_error;
|
||||
}
|
||||
|
||||
const validator_ptr get_request_validator() const
|
||||
{
|
||||
return this->validator;
|
||||
}
|
||||
|
||||
const unescaper_ptr get_unescaper() const
|
||||
{
|
||||
return this->unescaper;
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void register_event_supplier(const std::string& id,
|
||||
event_supplier<T>* ev_supplier
|
||||
)
|
||||
{
|
||||
register_event_supplier(id, details::event_tuple(ev_supplier));
|
||||
}
|
||||
|
||||
void remove_event_supplier(const std::string& id);
|
||||
|
||||
/**
|
||||
* Method used to kill the webserver waiting for it to terminate
|
||||
**/
|
||||
void sweet_kill();
|
||||
|
||||
protected:
|
||||
webserver& operator=(const webserver& other);
|
||||
|
||||
private:
|
||||
const uint16_t port;
|
||||
http::http_utils::start_method_T start_method;
|
||||
const int max_threads;
|
||||
const int max_connections;
|
||||
const int memory_limit;
|
||||
const int connection_timeout;
|
||||
const int per_IP_connection_limit;
|
||||
log_access_ptr log_access;
|
||||
log_error_ptr log_error;
|
||||
validator_ptr validator;
|
||||
unescaper_ptr unescaper;
|
||||
const struct sockaddr* bind_address;
|
||||
/* Changed type to MHD_socket because this type will always reflect the
|
||||
platform's actual socket type (e.g. SOCKET on windows, int on unixes)*/
|
||||
MHD_socket bind_socket;
|
||||
const int max_thread_stack_size;
|
||||
const bool use_ssl;
|
||||
const bool use_ipv6;
|
||||
const bool debug;
|
||||
const bool pedantic;
|
||||
const std::string https_mem_key;
|
||||
const std::string https_mem_cert;
|
||||
const std::string https_mem_trust;
|
||||
const std::string https_priorities;
|
||||
const http::http_utils::cred_type_T cred_type;
|
||||
const std::string digest_auth_random;
|
||||
const int nonce_nc_size;
|
||||
bool running;
|
||||
const http::http_utils::policy_T default_policy;
|
||||
const bool basic_auth_enabled;
|
||||
const bool digest_auth_enabled;
|
||||
const bool regex_checking;
|
||||
const bool ban_system_enabled;
|
||||
const bool post_process_enabled;
|
||||
bool single_resource;
|
||||
pthread_mutex_t mutexwait;
|
||||
pthread_rwlock_t runguard;
|
||||
pthread_cond_t mutexcond;
|
||||
render_ptr not_found_resource;
|
||||
render_ptr method_not_allowed_resource;
|
||||
render_ptr method_not_acceptable_resource;
|
||||
render_ptr internal_error_resource;
|
||||
std::map<details::http_endpoint, details::http_resource_mirror> registered_resources;
|
||||
std::map<std::string, details::http_resource_mirror*> registered_resources_str;
|
||||
|
||||
std::map<std::string, details::cache_entry*> response_cache;
|
||||
int next_to_choose;
|
||||
pthread_rwlock_t cache_guard;
|
||||
std::set<http::ip_representation> bans;
|
||||
std::set<http::ip_representation> allowances;
|
||||
|
||||
std::vector<details::daemon_item*> daemons;
|
||||
std::vector<pthread_t> threads;
|
||||
|
||||
std::map<std::string, details::event_tuple> event_suppliers;
|
||||
|
||||
details::comet_manager* internal_comet_manager;
|
||||
|
||||
static void* select(void* self);
|
||||
static void* cleaner(void* self);
|
||||
|
||||
bool register_resource(const std::string& resource,
|
||||
details::http_resource_mirror hrm, bool family = false
|
||||
);
|
||||
|
||||
void method_not_allowed_page(http_response** dhrs,
|
||||
details::modded_request* mr
|
||||
);
|
||||
void internal_error_page(http_response** dhrs,
|
||||
details::modded_request* mr, bool force_our = false
|
||||
);
|
||||
void not_found_page(http_response** dhrs, details::modded_request* mr);
|
||||
|
||||
static int method_not_acceptable_page
|
||||
(
|
||||
const void *cls,
|
||||
struct MHD_Connection *connection
|
||||
);
|
||||
static void request_completed(void *cls,
|
||||
struct MHD_Connection *connection, void **con_cls,
|
||||
enum MHD_RequestTerminationCode toe
|
||||
);
|
||||
static int build_request_header (void *cls, enum MHD_ValueKind kind,
|
||||
const char *key, const char *value
|
||||
);
|
||||
static int build_request_footer (void *cls, enum MHD_ValueKind kind,
|
||||
const char *key, const char *value
|
||||
);
|
||||
static int build_request_cookie (void *cls, enum MHD_ValueKind kind,
|
||||
const char *key, const char *value
|
||||
);
|
||||
static int build_request_args (void *cls, enum MHD_ValueKind kind,
|
||||
const char *key, const char *value
|
||||
);
|
||||
static int answer_to_connection
|
||||
(
|
||||
void* cls, MHD_Connection* connection,
|
||||
const char* url, const char* method,
|
||||
const char* version, const char* upload_data,
|
||||
size_t* upload_data_size, void** con_cls
|
||||
);
|
||||
static int post_iterator
|
||||
(
|
||||
void *cls,
|
||||
enum MHD_ValueKind kind,
|
||||
const char *key,
|
||||
const char *filename,
|
||||
const char *content_type,
|
||||
const char *transfer_encoding,
|
||||
const char *data, uint64_t off, size_t size
|
||||
);
|
||||
static void upgrade_handler
|
||||
(
|
||||
void *cls,
|
||||
struct MHD_Connection* connection,
|
||||
void **con_cls, int upgrade_socket
|
||||
);
|
||||
|
||||
static void unlock_cache_entry(details::cache_entry*);
|
||||
static void lock_cache_entry(details::cache_entry*);
|
||||
static void get_response(details::cache_entry*, http_response** res);
|
||||
|
||||
int bodyless_requests_answer(MHD_Connection* connection,
|
||||
const char* method, const char* version,
|
||||
struct details::modded_request* mr
|
||||
);
|
||||
|
||||
int bodyfull_requests_answer_first_step(MHD_Connection* connection,
|
||||
struct details::modded_request* mr
|
||||
);
|
||||
|
||||
int bodyfull_requests_answer_second_step(MHD_Connection* connection,
|
||||
const char* method, const char* version, const char* upload_data,
|
||||
size_t* upload_data_size, struct details::modded_request* mr
|
||||
);
|
||||
|
||||
void end_request_construction(MHD_Connection* connection,
|
||||
struct details::modded_request* mr, const char* version,
|
||||
const char* method, char* user, char* pass, char* digested_user
|
||||
);
|
||||
|
||||
int finalize_answer(MHD_Connection* connection,
|
||||
struct details::modded_request* mr, const char* method
|
||||
);
|
||||
|
||||
int complete_request(MHD_Connection* connection,
|
||||
struct details::modded_request* mr,
|
||||
const char* version, const char* method
|
||||
);
|
||||
|
||||
void register_event_supplier(const std::string& id, const details::event_tuple& evt);
|
||||
|
||||
bool use_internal_select()
|
||||
{
|
||||
return this->start_method == http::http_utils::INTERNAL_SELECT;
|
||||
}
|
||||
|
||||
friend int policy_callback (void *cls,
|
||||
const struct sockaddr* addr, socklen_t addrlen
|
||||
);
|
||||
friend void error_log(void* cls, const char* fmt, va_list ap);
|
||||
friend void access_log(webserver* cls, std::string uri);
|
||||
friend void* uri_log(void* cls, const char* uri);
|
||||
friend size_t unescaper_func(void * cls,
|
||||
struct MHD_Connection *c, char *s
|
||||
);
|
||||
friend size_t internal_unescaper(void * cls, char *s);
|
||||
friend class http_response;
|
||||
};
|
||||
|
||||
};
|
||||
#endif //_FRAMEWORK_WEBSERVER_HPP__
|
||||
@@ -1 +0,0 @@
|
||||
httpserver.hpp
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,3 +0,0 @@
|
||||
GNU libgcrypt: 1.6.3
|
||||
GNU libmicrohttpd: 0.9.42
|
||||
libhttpserver: https://github.com/etr/libhttpserver
|
||||
@@ -1,208 +0,0 @@
|
||||
Library: Libgcrypt
|
||||
Homepage: https://www.gnu.org/software/libgcrypt/
|
||||
Maintainer: Werner Koch <wk@gnupg.org>
|
||||
Bug reports: http://bugs.gnupg.org
|
||||
Security related bug reports: <security@gnupg.org>
|
||||
License (library): LGPLv2.1+
|
||||
License (manual and tools): GPLv2+
|
||||
|
||||
Libgcrypt is free software. See the files COPYING.LIB and COPYING for
|
||||
copying conditions, and LICENSES for notices about a few contributions
|
||||
that require these additional notices to be distributed. License
|
||||
copyright years may be listed using range notation, e.g., 2000-2013,
|
||||
indicating that every year in the range, inclusive, is a copyrightable
|
||||
year that would otherwise be listed individually.
|
||||
|
||||
|
||||
List of Copyright holders
|
||||
=========================
|
||||
|
||||
Copyright (C) 1989,1991-2015 Free Software Foundation, Inc.
|
||||
Copyright (C) 1994 X Consortium
|
||||
Copyright (C) 1996 L. Peter Deutsch
|
||||
Copyright (C) 1997 Werner Koch
|
||||
Copyright (C) 1998 The Internet Society
|
||||
Copyright (C) 1996-1999 Peter Gutmann, Paul Kendall, and Chris Wedgwood
|
||||
Copyright (C) 1996-2006 Peter Gutmann, Matt Thomlinson and Blake Coverett
|
||||
Copyright (C) 2003 Nikos Mavroyanopoulos
|
||||
Copyright (C) 2006-2007 NTT (Nippon Telegraph and Telephone Corporation)
|
||||
Copyright (C) 2012-2015 g10 Code GmbH
|
||||
Copyright (C) 2012 Simon Josefsson, Niels Möller
|
||||
Copyright (c) 2012 Intel Corporation
|
||||
Copyright (C) 2013 Christian Grothoff
|
||||
Copyright (C) 2013-2015 Jussi Kivilinna
|
||||
Copyright (C) 2013-2014 Dmitry Eremin-Solenikov
|
||||
|
||||
|
||||
Authors with a FSF copyright assignment
|
||||
=======================================
|
||||
|
||||
LIBGCRYPT Werner Koch 2001-06-07
|
||||
Assigns past and future changes.
|
||||
Assignment for future changes terminated on 2012-12-04.
|
||||
wk@gnupg.org
|
||||
Designed and implemented Libgcrypt.
|
||||
|
||||
GNUPG Matthew Skala 1998-08-10
|
||||
Disclaims changes.
|
||||
mskala@ansuz.sooke.bc.ca
|
||||
Wrote cipher/twofish.c.
|
||||
|
||||
GNUPG Natural Resources Canada 1998-08-11
|
||||
Disclaims changes by Matthew Skala.
|
||||
|
||||
GNUPG Michael Roth Germany 1998-09-17
|
||||
Assigns changes.
|
||||
mroth@nessie.de
|
||||
Wrote cipher/des.c.
|
||||
Changes and bug fixes all over the place.
|
||||
|
||||
GNUPG Niklas Hernaeus 1998-09-18
|
||||
Disclaims changes.
|
||||
nh@df.lth.se
|
||||
Weak key patches.
|
||||
|
||||
GNUPG Rémi Guyomarch 1999-05-25
|
||||
Assigns past and future changes. (g10/compress.c, g10/encr-data.c,
|
||||
g10/free-packet.c, g10/mdfilter.c, g10/plaintext.c, util/iobuf.c)
|
||||
rguyom@mail.dotcom.fr
|
||||
|
||||
ANY g10 Code GmbH 2001-06-07
|
||||
Assignment for future changes terminated on 2012-12-04.
|
||||
Code marked with ChangeLog entries of g10 Code employees.
|
||||
|
||||
LIBGCRYPT Timo Schulz 2001-08-31
|
||||
Assigns past and future changes.
|
||||
twoaday@freakmail.de
|
||||
|
||||
LIBGCRYPT Simon Josefsson 2002-10-25
|
||||
Assigns past and future changes to FSF (cipher/{md4,crc}.c, CTR mode,
|
||||
CTS/MAC flags, self test improvements)
|
||||
simon@josefsson.org
|
||||
|
||||
LIBGCRYPT Moritz Schulte 2003-04-17
|
||||
Assigns past and future changes.
|
||||
moritz@g10code.com
|
||||
|
||||
GNUTLS Nikolaos Mavrogiannopoulos 2003-11-22
|
||||
nmav@gnutls.org
|
||||
Original code for cipher/rfc2268.c.
|
||||
|
||||
LIBGCRYPT The Written Word 2005-04-15
|
||||
Assigns past and future changes. (new: src/libgcrypt.pc.in,
|
||||
src/Makefile.am, src/secmem.c, mpi/hppa1.1/mpih-mul3.S,
|
||||
mpi/hppa1.1/udiv-qrnnd.S, mpi/hppa1.1/mpih-mul2.S,
|
||||
mpi/hppa1.1/mpih-mul1.S, mpi/Makefile.am, tests/prime.c,
|
||||
tests/register.c, tests/ac.c, tests/basic.c, tests/tsexp.c,
|
||||
tests/keygen.c, tests/pubkey.c, configure.ac, acinclude.m4)
|
||||
|
||||
LIBGCRYPT Brad Hards 2006-02-09
|
||||
Assigns Past and Future Changes
|
||||
bradh@frogmouth.net
|
||||
(Added OFB mode. Changed cipher/cipher.c, test/basic.c doc/gcrypt.tex.
|
||||
added SHA-224, changed cipher/sha256.c, added HMAC tests.)
|
||||
|
||||
LIBGCRYPT Hye-Shik Chang 2006-09-07
|
||||
Assigns Past and Future Changes
|
||||
perky@freebsd.org
|
||||
(SEED cipher)
|
||||
|
||||
LIBGCRYPT Werner Dittmann 2009-05-20
|
||||
Assigns Past and Future Changes
|
||||
werner.dittmann@t-online.de
|
||||
(mpi/amd64, tests/mpitests.c)
|
||||
|
||||
GNUPG David Shaw
|
||||
Assigns past and future changes.
|
||||
dshaw@jabberwocky.com
|
||||
(cipher/camellia-glue.c and related stuff)
|
||||
|
||||
LIBGCRYPT Andrey Jivsov 2010-12-09
|
||||
Assigns Past and Future Changes
|
||||
openpgp@brainhub.org
|
||||
(cipher/ecc.c and related files)
|
||||
|
||||
LIBGCRYPT Ulrich Müller 2012-02-15
|
||||
Assigns Past and Future Changes
|
||||
ulm@gentoo.org
|
||||
(Changes to cipher/idea.c and related files)
|
||||
|
||||
LIBGCRYPT Vladimir Serbinenko 2012-04-26
|
||||
Assigns Past and Future Changes
|
||||
phcoder@gmail.com
|
||||
(cipher/serpent.c)
|
||||
|
||||
|
||||
Authors with a DCO
|
||||
==================
|
||||
|
||||
Christian Aistleitner <christian@quelltextlich.at>
|
||||
2013-02-26:20130226110144.GA12678@quelltextlich.at:
|
||||
|
||||
Christian Grothoff <christian@grothoff.org>
|
||||
2013-03-21:514B5D8A.6040705@grothoff.org:
|
||||
|
||||
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
|
||||
2013-07-13:20130713144407.GA27334@fangorn.rup.mentorg.com:
|
||||
|
||||
Dmitry Kasatkin <dmitry.kasatkin@intel.com>
|
||||
2012-12-14:50CAE2DB.80302@intel.com:
|
||||
|
||||
Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
|
||||
2012-11-15:20121115172331.150537dzb5i6jmy8@www.dalek.fi:
|
||||
|
||||
Jussi Kivilinna <jussi.kivilinna@iki.fi>
|
||||
2013-05-06:5186720A.4090101@iki.fi:
|
||||
|
||||
Rafaël Carré <funman@videolan.org>
|
||||
2012-04-20:4F91988B.1080502@videolan.org:
|
||||
|
||||
Sergey V. <sftp.mtuci@gmail.com>
|
||||
2013-11-07:2066221.5IYa7Yq760@darkstar:
|
||||
|
||||
Tomáš Mráz <tm@t8m.info>
|
||||
2012-04-16:1334571250.5056.52.camel@vespa.frost.loc:
|
||||
|
||||
Werner Koch <wk@gnupg.org> (g10 Code GmbH)
|
||||
2012-12-05:87obi8u4h2.fsf@vigenere.g10code.de:
|
||||
|
||||
|
||||
More credits
|
||||
============
|
||||
|
||||
Libgcrypt used to be part of GnuPG but has been taken out into its own
|
||||
package on 2000-12-21.
|
||||
|
||||
The ATH implementation (src/ath*) has been taken from GPGME and
|
||||
relicensed to the LGPL by the copyright holder of GPGME (g10 Code
|
||||
GmbH); it is now considered to be a part of Libgcrypt.
|
||||
|
||||
Most of the stuff in mpi has been taken from an old GMP library
|
||||
version by Torbjorn Granlund <tege@noisy.tmg.se>.
|
||||
|
||||
The files cipher/rndunix.c and cipher/rndw32.c are based on those
|
||||
files from Cryptlib. Copyright Peter Gutmann, Paul Kendall, and Chris
|
||||
Wedgwood 1996-1999.
|
||||
|
||||
The ECC code cipher/ecc.c was based on code by Sergi Blanch i Torne,
|
||||
sergi at calcurco dot org.
|
||||
|
||||
The implementation of the Camellia cipher has been been taken from the
|
||||
original NTT provided GPL source.
|
||||
|
||||
The CAVS testing program tests/cavs_driver.pl is not to be considered
|
||||
a part of libgcrypt proper. We distribute it merely for convenience.
|
||||
It has a permissive license and is copyrighted by atsec information
|
||||
security corporation. See the file for details.
|
||||
|
||||
The file salsa20.c is based on D.J. Bernstein's public domain code and
|
||||
taken from Nettle. Copyright 2012 Simon Josefsson and Niels Möller.
|
||||
|
||||
|
||||
This file is free software; as a special exception the author gives
|
||||
unlimited permission to copy and/or distribute it, with or without
|
||||
modifications, as long as this notice is preserved.
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
@@ -1,340 +0,0 @@
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 2, June 1991
|
||||
|
||||
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
License is intended to guarantee your freedom to share and change free
|
||||
software--to make sure the software is free for all its users. This
|
||||
General Public License applies to most of the Free Software
|
||||
Foundation's software and to any other program whose authors commit to
|
||||
using it. (Some other Free Software Foundation software is covered by
|
||||
the GNU Library General Public License instead.) You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
this service if you wish), that you receive source code or can get it
|
||||
if you want it, that you can change the software or use pieces of it
|
||||
in new free programs; and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
anyone to deny you these rights or to ask you to surrender the rights.
|
||||
These restrictions translate to certain responsibilities for you if you
|
||||
distribute copies of the software, or if you modify it.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must give the recipients all the rights that
|
||||
you have. You must make sure that they, too, receive or can get the
|
||||
source code. And you must show them these terms so they know their
|
||||
rights.
|
||||
|
||||
We protect your rights with two steps: (1) copyright the software, and
|
||||
(2) offer you this license which gives you legal permission to copy,
|
||||
distribute and/or modify the software.
|
||||
|
||||
Also, for each author's protection and ours, we want to make certain
|
||||
that everyone understands that there is no warranty for this free
|
||||
software. If the software is modified by someone else and passed on, we
|
||||
want its recipients to know that what they have is not the original, so
|
||||
that any problems introduced by others will not reflect on the original
|
||||
authors' reputations.
|
||||
|
||||
Finally, any free program is threatened constantly by software
|
||||
patents. We wish to avoid the danger that redistributors of a free
|
||||
program will individually obtain patent licenses, in effect making the
|
||||
program proprietary. To prevent this, we have made it clear that any
|
||||
patent must be licensed for everyone's free use or not licensed at all.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License applies to any program or other work which contains
|
||||
a notice placed by the copyright holder saying it may be distributed
|
||||
under the terms of this General Public License. The "Program", below,
|
||||
refers to any such program or work, and a "work based on the Program"
|
||||
means either the Program or any derivative work under copyright law:
|
||||
that is to say, a work containing the Program or a portion of it,
|
||||
either verbatim or with modifications and/or translated into another
|
||||
language. (Hereinafter, translation is included without limitation in
|
||||
the term "modification".) Each licensee is addressed as "you".
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running the Program is not restricted, and the output from the Program
|
||||
is covered only if its contents constitute a work based on the
|
||||
Program (independent of having been made by running the Program).
|
||||
Whether that is true depends on what the Program does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Program's
|
||||
source code as you receive it, in any medium, provided that you
|
||||
conspicuously and appropriately publish on each copy an appropriate
|
||||
copyright notice and disclaimer of warranty; keep intact all the
|
||||
notices that refer to this License and to the absence of any warranty;
|
||||
and give any other recipients of the Program a copy of this License
|
||||
along with the Program.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy, and
|
||||
you may at your option offer warranty protection in exchange for a fee.
|
||||
|
||||
2. You may modify your copy or copies of the Program or any portion
|
||||
of it, thus forming a work based on the Program, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) You must cause the modified files to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
b) You must cause any work that you distribute or publish, that in
|
||||
whole or in part contains or is derived from the Program or any
|
||||
part thereof, to be licensed as a whole at no charge to all third
|
||||
parties under the terms of this License.
|
||||
|
||||
c) If the modified program normally reads commands interactively
|
||||
when run, you must cause it, when started running for such
|
||||
interactive use in the most ordinary way, to print or display an
|
||||
announcement including an appropriate copyright notice and a
|
||||
notice that there is no warranty (or else, saying that you provide
|
||||
a warranty) and that users may redistribute the program under
|
||||
these conditions, and telling the user how to view a copy of this
|
||||
License. (Exception: if the Program itself is interactive but
|
||||
does not normally print such an announcement, your work based on
|
||||
the Program is not required to print an announcement.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Program,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Program, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Program.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Program
|
||||
with the Program (or with a work based on the Program) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may copy and distribute the Program (or a work based on it,
|
||||
under Section 2) in object code or executable form under the terms of
|
||||
Sections 1 and 2 above provided that you also do one of the following:
|
||||
|
||||
a) Accompany it with the complete corresponding machine-readable
|
||||
source code, which must be distributed under the terms of Sections
|
||||
1 and 2 above on a medium customarily used for software interchange; or,
|
||||
|
||||
b) Accompany it with a written offer, valid for at least three
|
||||
years, to give any third party, for a charge no more than your
|
||||
cost of physically performing source distribution, a complete
|
||||
machine-readable copy of the corresponding source code, to be
|
||||
distributed under the terms of Sections 1 and 2 above on a medium
|
||||
customarily used for software interchange; or,
|
||||
|
||||
c) Accompany it with the information you received as to the offer
|
||||
to distribute corresponding source code. (This alternative is
|
||||
allowed only for noncommercial distribution and only if you
|
||||
received the program in object code or executable form with such
|
||||
an offer, in accord with Subsection b above.)
|
||||
|
||||
The source code for a work means the preferred form of the work for
|
||||
making modifications to it. For an executable work, complete source
|
||||
code means all the source code for all modules it contains, plus any
|
||||
associated interface definition files, plus the scripts used to
|
||||
control compilation and installation of the executable. However, as a
|
||||
special exception, the source code distributed need not include
|
||||
anything that is normally distributed (in either source or binary
|
||||
form) with the major components (compiler, kernel, and so on) of the
|
||||
operating system on which the executable runs, unless that component
|
||||
itself accompanies the executable.
|
||||
|
||||
If distribution of executable or object code is made by offering
|
||||
access to copy from a designated place, then offering equivalent
|
||||
access to copy the source code from the same place counts as
|
||||
distribution of the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
4. You may not copy, modify, sublicense, or distribute the Program
|
||||
except as expressly provided under this License. Any attempt
|
||||
otherwise to copy, modify, sublicense or distribute the Program is
|
||||
void, and will automatically terminate your rights under this License.
|
||||
However, parties who have received copies, or rights, from you under
|
||||
this License will not have their licenses terminated so long as such
|
||||
parties remain in full compliance.
|
||||
|
||||
5. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Program or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Program (or any work based on the
|
||||
Program), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Program or works based on it.
|
||||
|
||||
6. Each time you redistribute the Program (or any work based on the
|
||||
Program), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute or modify the Program subject to
|
||||
these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties to
|
||||
this License.
|
||||
|
||||
7. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Program at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Program by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Program.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system, which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
8. If the distribution and/or use of the Program is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Program under this License
|
||||
may add an explicit geographical distribution limitation excluding
|
||||
those countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
9. The Free Software Foundation may publish revised and/or new versions
|
||||
of the General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Program
|
||||
specifies a version number of this License which applies to it and "any
|
||||
later version", you have the option of following the terms and conditions
|
||||
either of that version or of any later version published by the Free
|
||||
Software Foundation. If the Program does not specify a version number of
|
||||
this License, you may choose any version ever published by the Free Software
|
||||
Foundation.
|
||||
|
||||
10. If you wish to incorporate parts of the Program into other free
|
||||
programs whose distribution conditions are different, write to the author
|
||||
to ask for permission. For software which is copyrighted by the Free
|
||||
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||
make exceptions for this. Our decision will be guided by the two goals
|
||||
of preserving the free status of all derivatives of our free software and
|
||||
of promoting the sharing and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||
REPAIR OR CORRECTION.
|
||||
|
||||
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||
POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
convey the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program is interactive, make it output a short notice like this
|
||||
when it starts in an interactive mode:
|
||||
|
||||
Gnomovision version 69, Copyright (C) year name of author
|
||||
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, the commands you use may
|
||||
be called something other than `show w' and `show c'; they could even be
|
||||
mouse-clicks or menu items--whatever suits your program.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or your
|
||||
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||
necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1989
|
||||
Ty Coon, President of Vice
|
||||
|
||||
This General Public License does not permit incorporating your program into
|
||||
proprietary programs. If your program is a subroutine library, you may
|
||||
consider it more useful to permit linking proprietary applications with the
|
||||
library. If this is what you want to do, use the GNU Library General
|
||||
Public License instead of this License.
|
||||
@@ -1,510 +0,0 @@
|
||||
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
Version 2.1, February 1999
|
||||
|
||||
Copyright (C) 1991, 1999 Free Software Foundation, Inc.
|
||||
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
[This is the first released version of the Lesser GPL. It also counts
|
||||
as the successor of the GNU Library Public License, version 2, hence
|
||||
the version number 2.1.]
|
||||
|
||||
Preamble
|
||||
|
||||
The licenses for most software are designed to take away your
|
||||
freedom to share and change it. By contrast, the GNU General Public
|
||||
Licenses are intended to guarantee your freedom to share and change
|
||||
free software--to make sure the software is free for all its users.
|
||||
|
||||
This license, the Lesser General Public License, applies to some
|
||||
specially designated software packages--typically libraries--of the
|
||||
Free Software Foundation and other authors who decide to use it. You
|
||||
can use it too, but we suggest you first think carefully about whether
|
||||
this license or the ordinary General Public License is the better
|
||||
strategy to use in any particular case, based on the explanations
|
||||
below.
|
||||
|
||||
When we speak of free software, we are referring to freedom of use,
|
||||
not price. Our General Public Licenses are designed to make sure that
|
||||
you have the freedom to distribute copies of free software (and charge
|
||||
for this service if you wish); that you receive source code or can get
|
||||
it if you want it; that you can change the software and use pieces of
|
||||
it in new free programs; and that you are informed that you can do
|
||||
these things.
|
||||
|
||||
To protect your rights, we need to make restrictions that forbid
|
||||
distributors to deny you these rights or to ask you to surrender these
|
||||
rights. These restrictions translate to certain responsibilities for
|
||||
you if you distribute copies of the library or if you modify it.
|
||||
|
||||
For example, if you distribute copies of the library, whether gratis
|
||||
or for a fee, you must give the recipients all the rights that we gave
|
||||
you. You must make sure that they, too, receive or can get the source
|
||||
code. If you link other code with the library, you must provide
|
||||
complete object files to the recipients, so that they can relink them
|
||||
with the library after making changes to the library and recompiling
|
||||
it. And you must show them these terms so they know their rights.
|
||||
|
||||
We protect your rights with a two-step method: (1) we copyright the
|
||||
library, and (2) we offer you this license, which gives you legal
|
||||
permission to copy, distribute and/or modify the library.
|
||||
|
||||
To protect each distributor, we want to make it very clear that
|
||||
there is no warranty for the free library. Also, if the library is
|
||||
modified by someone else and passed on, the recipients should know
|
||||
that what they have is not the original version, so that the original
|
||||
author's reputation will not be affected by problems that might be
|
||||
introduced by others.
|
||||
^L
|
||||
Finally, software patents pose a constant threat to the existence of
|
||||
any free program. We wish to make sure that a company cannot
|
||||
effectively restrict the users of a free program by obtaining a
|
||||
restrictive license from a patent holder. Therefore, we insist that
|
||||
any patent license obtained for a version of the library must be
|
||||
consistent with the full freedom of use specified in this license.
|
||||
|
||||
Most GNU software, including some libraries, is covered by the
|
||||
ordinary GNU General Public License. This license, the GNU Lesser
|
||||
General Public License, applies to certain designated libraries, and
|
||||
is quite different from the ordinary General Public License. We use
|
||||
this license for certain libraries in order to permit linking those
|
||||
libraries into non-free programs.
|
||||
|
||||
When a program is linked with a library, whether statically or using
|
||||
a shared library, the combination of the two is legally speaking a
|
||||
combined work, a derivative of the original library. The ordinary
|
||||
General Public License therefore permits such linking only if the
|
||||
entire combination fits its criteria of freedom. The Lesser General
|
||||
Public License permits more lax criteria for linking other code with
|
||||
the library.
|
||||
|
||||
We call this license the "Lesser" General Public License because it
|
||||
does Less to protect the user's freedom than the ordinary General
|
||||
Public License. It also provides other free software developers Less
|
||||
of an advantage over competing non-free programs. These disadvantages
|
||||
are the reason we use the ordinary General Public License for many
|
||||
libraries. However, the Lesser license provides advantages in certain
|
||||
special circumstances.
|
||||
|
||||
For example, on rare occasions, there may be a special need to
|
||||
encourage the widest possible use of a certain library, so that it
|
||||
becomes a de-facto standard. To achieve this, non-free programs must
|
||||
be allowed to use the library. A more frequent case is that a free
|
||||
library does the same job as widely used non-free libraries. In this
|
||||
case, there is little to gain by limiting the free library to free
|
||||
software only, so we use the Lesser General Public License.
|
||||
|
||||
In other cases, permission to use a particular library in non-free
|
||||
programs enables a greater number of people to use a large body of
|
||||
free software. For example, permission to use the GNU C Library in
|
||||
non-free programs enables many more people to use the whole GNU
|
||||
operating system, as well as its variant, the GNU/Linux operating
|
||||
system.
|
||||
|
||||
Although the Lesser General Public License is Less protective of the
|
||||
users' freedom, it does ensure that the user of a program that is
|
||||
linked with the Library has the freedom and the wherewithal to run
|
||||
that program using a modified version of the Library.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow. Pay close attention to the difference between a
|
||||
"work based on the library" and a "work that uses the library". The
|
||||
former contains code derived from the library, whereas the latter must
|
||||
be combined with the library in order to run.
|
||||
^L
|
||||
GNU LESSER GENERAL PUBLIC LICENSE
|
||||
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||
|
||||
0. This License Agreement applies to any software library or other
|
||||
program which contains a notice placed by the copyright holder or
|
||||
other authorized party saying it may be distributed under the terms of
|
||||
this Lesser General Public License (also called "this License").
|
||||
Each licensee is addressed as "you".
|
||||
|
||||
A "library" means a collection of software functions and/or data
|
||||
prepared so as to be conveniently linked with application programs
|
||||
(which use some of those functions and data) to form executables.
|
||||
|
||||
The "Library", below, refers to any such software library or work
|
||||
which has been distributed under these terms. A "work based on the
|
||||
Library" means either the Library or any derivative work under
|
||||
copyright law: that is to say, a work containing the Library or a
|
||||
portion of it, either verbatim or with modifications and/or translated
|
||||
straightforwardly into another language. (Hereinafter, translation is
|
||||
included without limitation in the term "modification".)
|
||||
|
||||
"Source code" for a work means the preferred form of the work for
|
||||
making modifications to it. For a library, complete source code means
|
||||
all the source code for all modules it contains, plus any associated
|
||||
interface definition files, plus the scripts used to control
|
||||
compilation and installation of the library.
|
||||
|
||||
Activities other than copying, distribution and modification are not
|
||||
covered by this License; they are outside its scope. The act of
|
||||
running a program using the Library is not restricted, and output from
|
||||
such a program is covered only if its contents constitute a work based
|
||||
on the Library (independent of the use of the Library in a tool for
|
||||
writing it). Whether that is true depends on what the Library does
|
||||
and what the program that uses the Library does.
|
||||
|
||||
1. You may copy and distribute verbatim copies of the Library's
|
||||
complete source code as you receive it, in any medium, provided that
|
||||
you conspicuously and appropriately publish on each copy an
|
||||
appropriate copyright notice and disclaimer of warranty; keep intact
|
||||
all the notices that refer to this License and to the absence of any
|
||||
warranty; and distribute a copy of this License along with the
|
||||
Library.
|
||||
|
||||
You may charge a fee for the physical act of transferring a copy,
|
||||
and you may at your option offer warranty protection in exchange for a
|
||||
fee.
|
||||
|
||||
2. You may modify your copy or copies of the Library or any portion
|
||||
of it, thus forming a work based on the Library, and copy and
|
||||
distribute such modifications or work under the terms of Section 1
|
||||
above, provided that you also meet all of these conditions:
|
||||
|
||||
a) The modified work must itself be a software library.
|
||||
|
||||
b) You must cause the files modified to carry prominent notices
|
||||
stating that you changed the files and the date of any change.
|
||||
|
||||
c) You must cause the whole of the work to be licensed at no
|
||||
charge to all third parties under the terms of this License.
|
||||
|
||||
d) If a facility in the modified Library refers to a function or a
|
||||
table of data to be supplied by an application program that uses
|
||||
the facility, other than as an argument passed when the facility
|
||||
is invoked, then you must make a good faith effort to ensure that,
|
||||
in the event an application does not supply such function or
|
||||
table, the facility still operates, and performs whatever part of
|
||||
its purpose remains meaningful.
|
||||
|
||||
(For example, a function in a library to compute square roots has
|
||||
a purpose that is entirely well-defined independent of the
|
||||
application. Therefore, Subsection 2d requires that any
|
||||
application-supplied function or table used by this function must
|
||||
be optional: if the application does not supply it, the square
|
||||
root function must still compute square roots.)
|
||||
|
||||
These requirements apply to the modified work as a whole. If
|
||||
identifiable sections of that work are not derived from the Library,
|
||||
and can be reasonably considered independent and separate works in
|
||||
themselves, then this License, and its terms, do not apply to those
|
||||
sections when you distribute them as separate works. But when you
|
||||
distribute the same sections as part of a whole which is a work based
|
||||
on the Library, the distribution of the whole must be on the terms of
|
||||
this License, whose permissions for other licensees extend to the
|
||||
entire whole, and thus to each and every part regardless of who wrote
|
||||
it.
|
||||
|
||||
Thus, it is not the intent of this section to claim rights or contest
|
||||
your rights to work written entirely by you; rather, the intent is to
|
||||
exercise the right to control the distribution of derivative or
|
||||
collective works based on the Library.
|
||||
|
||||
In addition, mere aggregation of another work not based on the Library
|
||||
with the Library (or with a work based on the Library) on a volume of
|
||||
a storage or distribution medium does not bring the other work under
|
||||
the scope of this License.
|
||||
|
||||
3. You may opt to apply the terms of the ordinary GNU General Public
|
||||
License instead of this License to a given copy of the Library. To do
|
||||
this, you must alter all the notices that refer to this License, so
|
||||
that they refer to the ordinary GNU General Public License, version 2,
|
||||
instead of to this License. (If a newer version than version 2 of the
|
||||
ordinary GNU General Public License has appeared, then you can specify
|
||||
that version instead if you wish.) Do not make any other change in
|
||||
these notices.
|
||||
^L
|
||||
Once this change is made in a given copy, it is irreversible for
|
||||
that copy, so the ordinary GNU General Public License applies to all
|
||||
subsequent copies and derivative works made from that copy.
|
||||
|
||||
This option is useful when you wish to copy part of the code of
|
||||
the Library into a program that is not a library.
|
||||
|
||||
4. You may copy and distribute the Library (or a portion or
|
||||
derivative of it, under Section 2) in object code or executable form
|
||||
under the terms of Sections 1 and 2 above provided that you accompany
|
||||
it with the complete corresponding machine-readable source code, which
|
||||
must be distributed under the terms of Sections 1 and 2 above on a
|
||||
medium customarily used for software interchange.
|
||||
|
||||
If distribution of object code is made by offering access to copy
|
||||
from a designated place, then offering equivalent access to copy the
|
||||
source code from the same place satisfies the requirement to
|
||||
distribute the source code, even though third parties are not
|
||||
compelled to copy the source along with the object code.
|
||||
|
||||
5. A program that contains no derivative of any portion of the
|
||||
Library, but is designed to work with the Library by being compiled or
|
||||
linked with it, is called a "work that uses the Library". Such a
|
||||
work, in isolation, is not a derivative work of the Library, and
|
||||
therefore falls outside the scope of this License.
|
||||
|
||||
However, linking a "work that uses the Library" with the Library
|
||||
creates an executable that is a derivative of the Library (because it
|
||||
contains portions of the Library), rather than a "work that uses the
|
||||
library". The executable is therefore covered by this License.
|
||||
Section 6 states terms for distribution of such executables.
|
||||
|
||||
When a "work that uses the Library" uses material from a header file
|
||||
that is part of the Library, the object code for the work may be a
|
||||
derivative work of the Library even though the source code is not.
|
||||
Whether this is true is especially significant if the work can be
|
||||
linked without the Library, or if the work is itself a library. The
|
||||
threshold for this to be true is not precisely defined by law.
|
||||
|
||||
If such an object file uses only numerical parameters, data
|
||||
structure layouts and accessors, and small macros and small inline
|
||||
functions (ten lines or less in length), then the use of the object
|
||||
file is unrestricted, regardless of whether it is legally a derivative
|
||||
work. (Executables containing this object code plus portions of the
|
||||
Library will still fall under Section 6.)
|
||||
|
||||
Otherwise, if the work is a derivative of the Library, you may
|
||||
distribute the object code for the work under the terms of Section 6.
|
||||
Any executables containing that work also fall under Section 6,
|
||||
whether or not they are linked directly with the Library itself.
|
||||
^L
|
||||
6. As an exception to the Sections above, you may also combine or
|
||||
link a "work that uses the Library" with the Library to produce a
|
||||
work containing portions of the Library, and distribute that work
|
||||
under terms of your choice, provided that the terms permit
|
||||
modification of the work for the customer's own use and reverse
|
||||
engineering for debugging such modifications.
|
||||
|
||||
You must give prominent notice with each copy of the work that the
|
||||
Library is used in it and that the Library and its use are covered by
|
||||
this License. You must supply a copy of this License. If the work
|
||||
during execution displays copyright notices, you must include the
|
||||
copyright notice for the Library among them, as well as a reference
|
||||
directing the user to the copy of this License. Also, you must do one
|
||||
of these things:
|
||||
|
||||
a) Accompany the work with the complete corresponding
|
||||
machine-readable source code for the Library including whatever
|
||||
changes were used in the work (which must be distributed under
|
||||
Sections 1 and 2 above); and, if the work is an executable linked
|
||||
with the Library, with the complete machine-readable "work that
|
||||
uses the Library", as object code and/or source code, so that the
|
||||
user can modify the Library and then relink to produce a modified
|
||||
executable containing the modified Library. (It is understood
|
||||
that the user who changes the contents of definitions files in the
|
||||
Library will not necessarily be able to recompile the application
|
||||
to use the modified definitions.)
|
||||
|
||||
b) Use a suitable shared library mechanism for linking with the
|
||||
Library. A suitable mechanism is one that (1) uses at run time a
|
||||
copy of the library already present on the user's computer system,
|
||||
rather than copying library functions into the executable, and (2)
|
||||
will operate properly with a modified version of the library, if
|
||||
the user installs one, as long as the modified version is
|
||||
interface-compatible with the version that the work was made with.
|
||||
|
||||
c) Accompany the work with a written offer, valid for at least
|
||||
three years, to give the same user the materials specified in
|
||||
Subsection 6a, above, for a charge no more than the cost of
|
||||
performing this distribution.
|
||||
|
||||
d) If distribution of the work is made by offering access to copy
|
||||
from a designated place, offer equivalent access to copy the above
|
||||
specified materials from the same place.
|
||||
|
||||
e) Verify that the user has already received a copy of these
|
||||
materials or that you have already sent this user a copy.
|
||||
|
||||
For an executable, the required form of the "work that uses the
|
||||
Library" must include any data and utility programs needed for
|
||||
reproducing the executable from it. However, as a special exception,
|
||||
the materials to be distributed need not include anything that is
|
||||
normally distributed (in either source or binary form) with the major
|
||||
components (compiler, kernel, and so on) of the operating system on
|
||||
which the executable runs, unless that component itself accompanies
|
||||
the executable.
|
||||
|
||||
It may happen that this requirement contradicts the license
|
||||
restrictions of other proprietary libraries that do not normally
|
||||
accompany the operating system. Such a contradiction means you cannot
|
||||
use both them and the Library together in an executable that you
|
||||
distribute.
|
||||
^L
|
||||
7. You may place library facilities that are a work based on the
|
||||
Library side-by-side in a single library together with other library
|
||||
facilities not covered by this License, and distribute such a combined
|
||||
library, provided that the separate distribution of the work based on
|
||||
the Library and of the other library facilities is otherwise
|
||||
permitted, and provided that you do these two things:
|
||||
|
||||
a) Accompany the combined library with a copy of the same work
|
||||
based on the Library, uncombined with any other library
|
||||
facilities. This must be distributed under the terms of the
|
||||
Sections above.
|
||||
|
||||
b) Give prominent notice with the combined library of the fact
|
||||
that part of it is a work based on the Library, and explaining
|
||||
where to find the accompanying uncombined form of the same work.
|
||||
|
||||
8. You may not copy, modify, sublicense, link with, or distribute
|
||||
the Library except as expressly provided under this License. Any
|
||||
attempt otherwise to copy, modify, sublicense, link with, or
|
||||
distribute the Library is void, and will automatically terminate your
|
||||
rights under this License. However, parties who have received copies,
|
||||
or rights, from you under this License will not have their licenses
|
||||
terminated so long as such parties remain in full compliance.
|
||||
|
||||
9. You are not required to accept this License, since you have not
|
||||
signed it. However, nothing else grants you permission to modify or
|
||||
distribute the Library or its derivative works. These actions are
|
||||
prohibited by law if you do not accept this License. Therefore, by
|
||||
modifying or distributing the Library (or any work based on the
|
||||
Library), you indicate your acceptance of this License to do so, and
|
||||
all its terms and conditions for copying, distributing or modifying
|
||||
the Library or works based on it.
|
||||
|
||||
10. Each time you redistribute the Library (or any work based on the
|
||||
Library), the recipient automatically receives a license from the
|
||||
original licensor to copy, distribute, link with or modify the Library
|
||||
subject to these terms and conditions. You may not impose any further
|
||||
restrictions on the recipients' exercise of the rights granted herein.
|
||||
You are not responsible for enforcing compliance by third parties with
|
||||
this License.
|
||||
^L
|
||||
11. If, as a consequence of a court judgment or allegation of patent
|
||||
infringement or for any other reason (not limited to patent issues),
|
||||
conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot
|
||||
distribute so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you
|
||||
may not distribute the Library at all. For example, if a patent
|
||||
license would not permit royalty-free redistribution of the Library by
|
||||
all those who receive copies directly or indirectly through you, then
|
||||
the only way you could satisfy both it and this License would be to
|
||||
refrain entirely from distribution of the Library.
|
||||
|
||||
If any portion of this section is held invalid or unenforceable under
|
||||
any particular circumstance, the balance of the section is intended to
|
||||
apply, and the section as a whole is intended to apply in other
|
||||
circumstances.
|
||||
|
||||
It is not the purpose of this section to induce you to infringe any
|
||||
patents or other property right claims or to contest validity of any
|
||||
such claims; this section has the sole purpose of protecting the
|
||||
integrity of the free software distribution system which is
|
||||
implemented by public license practices. Many people have made
|
||||
generous contributions to the wide range of software distributed
|
||||
through that system in reliance on consistent application of that
|
||||
system; it is up to the author/donor to decide if he or she is willing
|
||||
to distribute software through any other system and a licensee cannot
|
||||
impose that choice.
|
||||
|
||||
This section is intended to make thoroughly clear what is believed to
|
||||
be a consequence of the rest of this License.
|
||||
|
||||
12. If the distribution and/or use of the Library is restricted in
|
||||
certain countries either by patents or by copyrighted interfaces, the
|
||||
original copyright holder who places the Library under this License
|
||||
may add an explicit geographical distribution limitation excluding those
|
||||
countries, so that distribution is permitted only in or among
|
||||
countries not thus excluded. In such case, this License incorporates
|
||||
the limitation as if written in the body of this License.
|
||||
|
||||
13. The Free Software Foundation may publish revised and/or new
|
||||
versions of the Lesser General Public License from time to time.
|
||||
Such new versions will be similar in spirit to the present version,
|
||||
but may differ in detail to address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the Library
|
||||
specifies a version number of this License which applies to it and
|
||||
"any later version", you have the option of following the terms and
|
||||
conditions either of that version or of any later version published by
|
||||
the Free Software Foundation. If the Library does not specify a
|
||||
license version number, you may choose any version ever published by
|
||||
the Free Software Foundation.
|
||||
^L
|
||||
14. If you wish to incorporate parts of the Library into other free
|
||||
programs whose distribution conditions are incompatible with these,
|
||||
write to the author to ask for permission. For software which is
|
||||
copyrighted by the Free Software Foundation, write to the Free
|
||||
Software Foundation; we sometimes make exceptions for this. Our
|
||||
decision will be guided by the two goals of preserving the free status
|
||||
of all derivatives of our free software and of promoting the sharing
|
||||
and reuse of software generally.
|
||||
|
||||
NO WARRANTY
|
||||
|
||||
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
|
||||
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
|
||||
EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
|
||||
OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY
|
||||
KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
|
||||
LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
|
||||
THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
|
||||
WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
|
||||
AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU
|
||||
FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
|
||||
CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
|
||||
LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
|
||||
RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
|
||||
FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
|
||||
SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
||||
DAMAGES.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
^L
|
||||
How to Apply These Terms to Your New Libraries
|
||||
|
||||
If you develop a new library, and you want it to be of the greatest
|
||||
possible use to the public, we recommend making it free software that
|
||||
everyone can redistribute and change. You can do so by permitting
|
||||
redistribution under these terms (or, alternatively, under the terms
|
||||
of the ordinary General Public License).
|
||||
|
||||
To apply these terms, attach the following notices to the library.
|
||||
It is safest to attach them to the start of each source file to most
|
||||
effectively convey the exclusion of warranty; and each file should
|
||||
have at least the "copyright" line and a pointer to where the full
|
||||
notice is found.
|
||||
|
||||
|
||||
<one line to give the library's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; either
|
||||
version 2.1 of the License, or (at your option) any later version.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
Lesser General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Lesser General Public
|
||||
License along with this library; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
You should also get your employer (if you work as a programmer) or
|
||||
your school, if any, to sign a "copyright disclaimer" for the library,
|
||||
if necessary. Here is a sample; alter the names:
|
||||
|
||||
Yoyodyne, Inc., hereby disclaims all copyright interest in the
|
||||
library `Frob' (a library for tweaking knobs) written by James
|
||||
Random Hacker.
|
||||
|
||||
<signature of Ty Coon>, 1 April 1990
|
||||
Ty Coon, President of Vice
|
||||
|
||||
That's all there is to it!
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,234 +0,0 @@
|
||||
Installation Instructions
|
||||
*************************
|
||||
|
||||
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||
2006 Free Software Foundation, Inc.
|
||||
|
||||
This file is free documentation; the Free Software Foundation gives
|
||||
unlimited permission to copy, distribute and modify it.
|
||||
|
||||
Basic Installation
|
||||
==================
|
||||
|
||||
Briefly, the shell commands `./configure; make; make install' should
|
||||
configure, build, and install this package. The following
|
||||
more-detailed instructions are generic; see the `README' file for
|
||||
instructions specific to this package.
|
||||
|
||||
The `configure' shell script attempts to guess correct values for
|
||||
various system-dependent variables used during compilation. It uses
|
||||
those values to create a `Makefile' in each directory of the package.
|
||||
It may also create one or more `.h' files containing system-dependent
|
||||
definitions. Finally, it creates a shell script `config.status' that
|
||||
you can run in the future to recreate the current configuration, and a
|
||||
file `config.log' containing compiler output (useful mainly for
|
||||
debugging `configure').
|
||||
|
||||
It can also use an optional file (typically called `config.cache'
|
||||
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||
the results of its tests to speed up reconfiguring. Caching is
|
||||
disabled by default to prevent problems with accidental use of stale
|
||||
cache files.
|
||||
|
||||
If you need to do unusual things to compile the package, please try
|
||||
to figure out how `configure' could check whether to do them, and mail
|
||||
diffs or instructions to the address given in the `README' so they can
|
||||
be considered for the next release. If you are using the cache, and at
|
||||
some point `config.cache' contains results you don't want to keep, you
|
||||
may remove or edit it.
|
||||
|
||||
The file `configure.ac' (or `configure.in') is used to create
|
||||
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||
you want to change it or regenerate `configure' using a newer version
|
||||
of `autoconf'.
|
||||
|
||||
The simplest way to compile this package is:
|
||||
|
||||
1. `cd' to the directory containing the package's source code and type
|
||||
`./configure' to configure the package for your system.
|
||||
|
||||
Running `configure' might take a while. While running, it prints
|
||||
some messages telling which features it is checking for.
|
||||
|
||||
2. Type `make' to compile the package.
|
||||
|
||||
3. Optionally, type `make check' to run any self-tests that come with
|
||||
the package.
|
||||
|
||||
4. Type `make install' to install the programs and any data files and
|
||||
documentation.
|
||||
|
||||
5. You can remove the program binaries and object files from the
|
||||
source code directory by typing `make clean'. To also remove the
|
||||
files that `configure' created (so you can compile the package for
|
||||
a different kind of computer), type `make distclean'. There is
|
||||
also a `make maintainer-clean' target, but that is intended mainly
|
||||
for the package's developers. If you use it, you may have to get
|
||||
all sorts of other programs in order to regenerate files that came
|
||||
with the distribution.
|
||||
|
||||
Compilers and Options
|
||||
=====================
|
||||
|
||||
Some systems require unusual options for compilation or linking that the
|
||||
`configure' script does not know about. Run `./configure --help' for
|
||||
details on some of the pertinent environment variables.
|
||||
|
||||
You can give `configure' initial values for configuration parameters
|
||||
by setting variables in the command line or in the environment. Here
|
||||
is an example:
|
||||
|
||||
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||
|
||||
*Note Defining Variables::, for more details.
|
||||
|
||||
Compiling For Multiple Architectures
|
||||
====================================
|
||||
|
||||
You can compile the package for more than one kind of computer at the
|
||||
same time, by placing the object files for each architecture in their
|
||||
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||
directory where you want the object files and executables to go and run
|
||||
the `configure' script. `configure' automatically checks for the
|
||||
source code in the directory that `configure' is in and in `..'.
|
||||
|
||||
With a non-GNU `make', it is safer to compile the package for one
|
||||
architecture at a time in the source code directory. After you have
|
||||
installed the package for one architecture, use `make distclean' before
|
||||
reconfiguring for another architecture.
|
||||
|
||||
Installation Names
|
||||
==================
|
||||
|
||||
By default, `make install' installs the package's commands under
|
||||
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||
can specify an installation prefix other than `/usr/local' by giving
|
||||
`configure' the option `--prefix=PREFIX'.
|
||||
|
||||
You can specify separate installation prefixes for
|
||||
architecture-specific files and architecture-independent files. If you
|
||||
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||
PREFIX as the prefix for installing programs and libraries.
|
||||
Documentation and other data files still use the regular prefix.
|
||||
|
||||
In addition, if you use an unusual directory layout you can give
|
||||
options like `--bindir=DIR' to specify different values for particular
|
||||
kinds of files. Run `configure --help' for a list of the directories
|
||||
you can set and what kinds of files go in them.
|
||||
|
||||
If the package supports it, you can cause programs to be installed
|
||||
with an extra prefix or suffix on their names by giving `configure' the
|
||||
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||
|
||||
Optional Features
|
||||
=================
|
||||
|
||||
Some packages pay attention to `--enable-FEATURE' options to
|
||||
`configure', where FEATURE indicates an optional part of the package.
|
||||
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||
is something like `gnu-as' or `x' (for the X Window System). The
|
||||
`README' should mention any `--enable-' and `--with-' options that the
|
||||
package recognizes.
|
||||
|
||||
For packages that use the X Window System, `configure' can usually
|
||||
find the X include and library files automatically, but if it doesn't,
|
||||
you can use the `configure' options `--x-includes=DIR' and
|
||||
`--x-libraries=DIR' to specify their locations.
|
||||
|
||||
Specifying the System Type
|
||||
==========================
|
||||
|
||||
There may be some features `configure' cannot figure out automatically,
|
||||
but needs to determine by the type of machine the package will run on.
|
||||
Usually, assuming the package is built to be run on the _same_
|
||||
architectures, `configure' can figure that out, but if it prints a
|
||||
message saying it cannot guess the machine type, give it the
|
||||
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||
type, such as `sun4', or a canonical name which has the form:
|
||||
|
||||
CPU-COMPANY-SYSTEM
|
||||
|
||||
where SYSTEM can have one of these forms:
|
||||
|
||||
OS KERNEL-OS
|
||||
|
||||
See the file `config.sub' for the possible values of each field. If
|
||||
`config.sub' isn't included in this package, then this package doesn't
|
||||
need to know the machine type.
|
||||
|
||||
If you are _building_ compiler tools for cross-compiling, you should
|
||||
use the option `--target=TYPE' to select the type of system they will
|
||||
produce code for.
|
||||
|
||||
If you want to _use_ a cross compiler, that generates code for a
|
||||
platform different from the build platform, you should specify the
|
||||
"host" platform (i.e., that on which the generated programs will
|
||||
eventually be run) with `--host=TYPE'.
|
||||
|
||||
Sharing Defaults
|
||||
================
|
||||
|
||||
If you want to set default values for `configure' scripts to share, you
|
||||
can create a site shell script called `config.site' that gives default
|
||||
values for variables like `CC', `cache_file', and `prefix'.
|
||||
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||
`CONFIG_SITE' environment variable to the location of the site script.
|
||||
A warning: not all `configure' scripts look for a site script.
|
||||
|
||||
Defining Variables
|
||||
==================
|
||||
|
||||
Variables not defined in a site shell script can be set in the
|
||||
environment passed to `configure'. However, some packages may run
|
||||
configure again during the build, and the customized values of these
|
||||
variables may be lost. In order to avoid this problem, you should set
|
||||
them in the `configure' command line, using `VAR=value'. For example:
|
||||
|
||||
./configure CC=/usr/local2/bin/gcc
|
||||
|
||||
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||
overridden in the site shell script).
|
||||
|
||||
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||
|
||||
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||
|
||||
`configure' Invocation
|
||||
======================
|
||||
|
||||
`configure' recognizes the following options to control how it operates.
|
||||
|
||||
`--help'
|
||||
`-h'
|
||||
Print a summary of the options to `configure', and exit.
|
||||
|
||||
`--version'
|
||||
`-V'
|
||||
Print the version of Autoconf used to generate the `configure'
|
||||
script, and exit.
|
||||
|
||||
`--cache-file=FILE'
|
||||
Enable the cache: use and save the results of the tests in FILE,
|
||||
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||
disable caching.
|
||||
|
||||
`--config-cache'
|
||||
`-C'
|
||||
Alias for `--cache-file=config.cache'.
|
||||
|
||||
`--quiet'
|
||||
`--silent'
|
||||
`-q'
|
||||
Do not print messages saying which checks are being made. To
|
||||
suppress all normal output, redirect it to `/dev/null' (any error
|
||||
messages will still be shown).
|
||||
|
||||
`--srcdir=DIR'
|
||||
Look for the package's source code in directory DIR. Usually
|
||||
`configure' can determine that directory automatically.
|
||||
|
||||
`configure' also accepts some other, not widely useful, options. Run
|
||||
`configure --help' for more details.
|
||||
|
||||
@@ -1,134 +0,0 @@
|
||||
Additional license notices for Libgcrypt. -*- org -*-
|
||||
|
||||
This file contains the copying permission notices for various files in
|
||||
the Libgcrypt distribution which are not covered by the GNU Lesser
|
||||
General Public License (LGPL) or the GNU General Public License (GPL).
|
||||
|
||||
These notices all require that a copy of the notice be included
|
||||
in the accompanying documentation and be distributed with binary
|
||||
distributions of the code, so be sure to include this file along
|
||||
with any binary distributions derived from the GNU C Library.
|
||||
|
||||
* BSD_3Clause
|
||||
|
||||
For files:
|
||||
- cipher/sha256-ssse3-amd64.S
|
||||
- cipher/sha512-avx-amd64.S
|
||||
- cipher/sha512-avx2-bmi2-amd64.S
|
||||
- cipher/sha512-ssse3-amd64.S
|
||||
|
||||
#+begin_quote
|
||||
Copyright (c) 2012, Intel Corporation
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions are
|
||||
met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the
|
||||
distribution.
|
||||
|
||||
* Neither the name of the Intel Corporation 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 INTEL CORPORATION "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 INTEL CORPORATION 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_quote
|
||||
|
||||
* Simple permissive licenses
|
||||
|
||||
For files:
|
||||
- cipher/crc.c
|
||||
|
||||
#+begin_quote
|
||||
Copyright (c) 1996 L. Peter Deutsch
|
||||
|
||||
Permission is granted to copy and distribute this document for
|
||||
any purpose and without charge, including translations into
|
||||
other languages and incorporation into compilations, provided
|
||||
that the copyright notice and this notice are preserved, and
|
||||
that any substantive changes or deletions from the original are
|
||||
clearly marked.
|
||||
#+end_quote
|
||||
|
||||
* IETF permissive licenses
|
||||
|
||||
For files:
|
||||
- cipher/crc.c
|
||||
|
||||
#+begin_quote
|
||||
Copyright (C) The Internet Society (1998). All Rights Reserved.
|
||||
|
||||
This document and translations of it may be copied and furnished
|
||||
to others, and derivative works that comment on or otherwise
|
||||
explain it or assist in its implementation may be prepared,
|
||||
copied, published and distributed, in whole or in part, without
|
||||
restriction of any kind, provided that the above copyright notice
|
||||
and this paragraph are included on all such copies and derivative
|
||||
works. However, this document itself may not be modified in any
|
||||
way, such as by removing the copyright notice or references to
|
||||
the Internet Society or other Internet organizations, except as
|
||||
needed for the purpose of developing Internet standards in which
|
||||
case the procedures for copyrights defined in the Internet
|
||||
Standards process must be followed, or as required to translate
|
||||
it into languages other than English.
|
||||
|
||||
The limited permissions granted above are perpetual and will not be
|
||||
revoked by the Internet Society or its successors or assigns.
|
||||
|
||||
This document and the information contained herein is provided on
|
||||
an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET
|
||||
ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE
|
||||
OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY
|
||||
IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR
|
||||
PURPOSE.
|
||||
#+end_quote
|
||||
|
||||
* X License
|
||||
|
||||
For files:
|
||||
- install.sh
|
||||
|
||||
#+begin_quote
|
||||
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.
|
||||
#+end_quote
|
||||
@@ -1,72 +0,0 @@
|
||||
## Process this file with automake to produce Makefile.in
|
||||
# Copyright (C) 1992, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of Libgcrypt.
|
||||
#
|
||||
# Libgcrypt is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as
|
||||
# published by the Free Software Foundation; either version 2.1 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# Libgcrypt is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
DISTCHECK_CONFIGURE_FLAGS = --disable-random-daemon \
|
||||
--enable-ciphers=arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia
|
||||
|
||||
# (A suitable gitlog-to-changelog script can be found in GnuPG master.)
|
||||
GITLOG_TO_CHANGELOG=gitlog-to-changelog
|
||||
|
||||
DIST_SUBDIRS = m4 compat mpi cipher random src doc tests
|
||||
SUBDIRS = compat mpi cipher random src doc tests
|
||||
|
||||
EXTRA_DIST = autogen.sh autogen.rc README.GIT LICENSES \
|
||||
ChangeLog-2011 build-aux/ChangeLog-2011 doc/ChangeLog-2011 \
|
||||
m4/ChangeLog-2011 cipher/ChangeLog-2011 src/ChangeLog-2011 \
|
||||
random/ChangeLog-2011 tests/ChangeLog-2011 mpi/ChangeLog-2011 \
|
||||
build-aux/git-log-footer build-aux/git-log-fix
|
||||
|
||||
DISTCLEANFILES =
|
||||
|
||||
|
||||
# Add all the files listed in "distfiles" files to the distribution,
|
||||
# apply version number s to some files and create a VERSION file which
|
||||
# we need for the Prereq: patch file trick.
|
||||
dist-hook: gen-ChangeLog
|
||||
@set -e; \
|
||||
for file in `cd $(top_srcdir); \
|
||||
find mpi -type f -name distfiles`; do \
|
||||
dir=`dirname $$file` ; $(mkinstalldirs) $(distdir)/$$dir ; \
|
||||
for i in distfiles `cat $(top_srcdir)/$$file` ; do \
|
||||
ln $(top_srcdir)/$$dir/$$i $(distdir)/$$dir/$$i 2> /dev/null \
|
||||
|| cp -p $(top_srcdir)/$$dir/$$i $(distdir)/$$dir/$$i; \
|
||||
done ; \
|
||||
done
|
||||
@set -e; \
|
||||
echo "$(VERSION)" > $(distdir)/VERSION
|
||||
|
||||
|
||||
gen_start_date = 2011-12-01T14:00:00
|
||||
.PHONY: gen-ChangeLog
|
||||
gen-ChangeLog:
|
||||
if test -d $(top_srcdir)/.git; then \
|
||||
(cd $(top_srcdir) && \
|
||||
$(GITLOG_TO_CHANGELOG) --append-dot --tear-off \
|
||||
--amend=build-aux/git-log-fix \
|
||||
--since=$(gen_start_date) ) > $(distdir)/cl-t; \
|
||||
cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
|
||||
rm -f $(distdir)/ChangeLog; \
|
||||
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
|
||||
fi
|
||||
|
||||
|
||||
|
||||
stowinstall:
|
||||
$(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libgcrypt
|
||||
@@ -1,924 +0,0 @@
|
||||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Copyright (C) 1992, 1999, 2000, 2002 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of Libgcrypt.
|
||||
#
|
||||
# Libgcrypt is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as
|
||||
# published by the Free Software Foundation; either version 2.1 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# Libgcrypt is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = .
|
||||
DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \
|
||||
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/configure $(am__configure_deps) \
|
||||
$(srcdir)/config.h.in COPYING COPYING.LIB THANKS TODO \
|
||||
build-aux/compile build-aux/config.guess \
|
||||
build-aux/config.rpath build-aux/config.sub build-aux/depcomp \
|
||||
build-aux/install-sh build-aux/mdate-sh build-aux/missing \
|
||||
mkinstalldirs build-aux/texinfo.tex build-aux/ltmain.sh \
|
||||
$(top_srcdir)/build-aux/compile \
|
||||
$(top_srcdir)/build-aux/config.guess \
|
||||
$(top_srcdir)/build-aux/config.sub \
|
||||
$(top_srcdir)/build-aux/install-sh \
|
||||
$(top_srcdir)/build-aux/ltmain.sh \
|
||||
$(top_srcdir)/build-aux/missing
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/gpg-error.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/lock.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/m4/noexecstack.m4 $(top_srcdir)/m4/onceonly.m4 \
|
||||
$(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/sys_socket_h.m4 \
|
||||
$(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
|
||||
configure.lineno config.status.lineno
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
SOURCES =
|
||||
DIST_SOURCES =
|
||||
RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \
|
||||
ctags-recursive dvi-recursive html-recursive info-recursive \
|
||||
install-data-recursive install-dvi-recursive \
|
||||
install-exec-recursive install-html-recursive \
|
||||
install-info-recursive install-pdf-recursive \
|
||||
install-ps-recursive install-recursive installcheck-recursive \
|
||||
installdirs-recursive pdf-recursive ps-recursive \
|
||||
tags-recursive uninstall-recursive
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \
|
||||
distclean-recursive maintainer-clean-recursive
|
||||
am__recursive_targets = \
|
||||
$(RECURSIVE_TARGETS) \
|
||||
$(RECURSIVE_CLEAN_TARGETS) \
|
||||
$(am__extra_recursive_targets)
|
||||
AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \
|
||||
cscope distdir dist dist-all distcheck
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \
|
||||
$(LISP)config.h.in
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
CSCOPE = cscope
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
distdir = $(PACKAGE)-$(VERSION)
|
||||
top_distdir = $(distdir)
|
||||
am__remove_distdir = \
|
||||
if test -d "$(distdir)"; then \
|
||||
find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
|
||||
&& rm -rf "$(distdir)" \
|
||||
|| { sleep 5 && rm -rf "$(distdir)"; }; \
|
||||
else :; fi
|
||||
am__post_remove_distdir = $(am__remove_distdir)
|
||||
am__relativize = \
|
||||
dir0=`pwd`; \
|
||||
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
|
||||
sed_rest='s,^[^/]*/*,,'; \
|
||||
sed_last='s,^.*/\([^/]*\)$$,\1,'; \
|
||||
sed_butlast='s,/*[^/]*$$,,'; \
|
||||
while test -n "$$dir1"; do \
|
||||
first=`echo "$$dir1" | sed -e "$$sed_first"`; \
|
||||
if test "$$first" != "."; then \
|
||||
if test "$$first" = ".."; then \
|
||||
dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \
|
||||
dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \
|
||||
else \
|
||||
first2=`echo "$$dir2" | sed -e "$$sed_first"`; \
|
||||
if test "$$first2" = "$$first"; then \
|
||||
dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \
|
||||
else \
|
||||
dir2="../$$dir2"; \
|
||||
fi; \
|
||||
dir0="$$dir0"/"$$first"; \
|
||||
fi; \
|
||||
fi; \
|
||||
dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \
|
||||
done; \
|
||||
reldir="$$dir2"
|
||||
DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
|
||||
GZIP_ENV = --best
|
||||
DIST_TARGETS = dist-bzip2 dist-gzip
|
||||
distuninstallcheck_listfiles = find . -type f -print
|
||||
am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
|
||||
| sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
|
||||
distcleancheck_listfiles = find . -type f -print
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_FILEVERSION = @BUILD_FILEVERSION@
|
||||
BUILD_REVISION = @BUILD_REVISION@
|
||||
BUILD_TIMESTAMP = @BUILD_TIMESTAMP@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CC_FOR_BUILD = @CC_FOR_BUILD@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DL_LIBS = @DL_LIBS@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FALLBACK_SOCKLEN_T = @FALLBACK_SOCKLEN_T@
|
||||
FGREP = @FGREP@
|
||||
GCRYPT_CIPHERS = @GCRYPT_CIPHERS@
|
||||
GCRYPT_DIGESTS = @GCRYPT_DIGESTS@
|
||||
GCRYPT_HWF_MODULES = @GCRYPT_HWF_MODULES@
|
||||
GCRYPT_KDFS = @GCRYPT_KDFS@
|
||||
GCRYPT_PUBKEY_CIPHERS = @GCRYPT_PUBKEY_CIPHERS@
|
||||
GCRYPT_RANDOM = @GCRYPT_RANDOM@
|
||||
GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@
|
||||
GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@
|
||||
GPG_ERROR_LIBS = @GPG_ERROR_LIBS@
|
||||
GREP = @GREP@
|
||||
INSERT_SYS_SELECT_H = @INSERT_SYS_SELECT_H@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBGCRYPT_CIPHERS = @LIBGCRYPT_CIPHERS@
|
||||
LIBGCRYPT_CONFIG_API_VERSION = @LIBGCRYPT_CONFIG_API_VERSION@
|
||||
LIBGCRYPT_CONFIG_CFLAGS = @LIBGCRYPT_CONFIG_CFLAGS@
|
||||
LIBGCRYPT_CONFIG_HOST = @LIBGCRYPT_CONFIG_HOST@
|
||||
LIBGCRYPT_CONFIG_LIBS = @LIBGCRYPT_CONFIG_LIBS@
|
||||
LIBGCRYPT_DIGESTS = @LIBGCRYPT_DIGESTS@
|
||||
LIBGCRYPT_LT_AGE = @LIBGCRYPT_LT_AGE@
|
||||
LIBGCRYPT_LT_CURRENT = @LIBGCRYPT_LT_CURRENT@
|
||||
LIBGCRYPT_LT_REVISION = @LIBGCRYPT_LT_REVISION@
|
||||
LIBGCRYPT_PUBKEY_CIPHERS = @LIBGCRYPT_PUBKEY_CIPHERS@
|
||||
LIBGCRYPT_THREAD_MODULES = @LIBGCRYPT_THREAD_MODULES@
|
||||
LIBMULTITHREAD = @LIBMULTITHREAD@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTHREAD = @LIBTHREAD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LTLIBTHREAD = @LTLIBTHREAD@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPI_SFLAGS = @MPI_SFLAGS@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
NOEXECSTACK_FLAGS = @NOEXECSTACK_FLAGS@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PTH_CFLAGS = @PTH_CFLAGS@
|
||||
PTH_CONFIG = @PTH_CONFIG@
|
||||
PTH_LIBS = @PTH_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
RUN_LARGE_DATA_TESTS = @RUN_LARGE_DATA_TESTS@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
SYS_SOCKET_H = @SYS_SOCKET_H@
|
||||
VERSION = @VERSION@
|
||||
VERSION_NUMBER = @VERSION_NUMBER@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
emacs_local_vars_begin = @emacs_local_vars_begin@
|
||||
emacs_local_vars_end = @emacs_local_vars_end@
|
||||
emacs_local_vars_read_only = @emacs_local_vars_read_only@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
ACLOCAL_AMFLAGS = -I m4
|
||||
DISTCHECK_CONFIGURE_FLAGS = --disable-random-daemon \
|
||||
--enable-ciphers=arcfour:blowfish:cast5:des:aes:twofish:serpent:rfc2268:seed:camellia
|
||||
|
||||
|
||||
# (A suitable gitlog-to-changelog script can be found in GnuPG master.)
|
||||
GITLOG_TO_CHANGELOG = gitlog-to-changelog
|
||||
DIST_SUBDIRS = m4 compat mpi cipher random src doc tests
|
||||
SUBDIRS = compat mpi cipher random src doc tests
|
||||
EXTRA_DIST = autogen.sh autogen.rc README.GIT LICENSES \
|
||||
ChangeLog-2011 build-aux/ChangeLog-2011 doc/ChangeLog-2011 \
|
||||
m4/ChangeLog-2011 cipher/ChangeLog-2011 src/ChangeLog-2011 \
|
||||
random/ChangeLog-2011 tests/ChangeLog-2011 mpi/ChangeLog-2011 \
|
||||
build-aux/git-log-footer build-aux/git-log-fix
|
||||
|
||||
DISTCLEANFILES =
|
||||
gen_start_date = 2011-12-01T14:00:00
|
||||
all: config.h
|
||||
$(MAKE) $(AM_MAKEFLAGS) all-recursive
|
||||
|
||||
.SUFFIXES:
|
||||
am--refresh: Makefile
|
||||
@:
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
$(SHELL) ./config.status --recheck
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
$(am__cd) $(srcdir) && $(AUTOCONF)
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
config.h: stamp-h1
|
||||
@test -f $@ || rm -f stamp-h1
|
||||
@test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1
|
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
|
||||
@rm -f stamp-h1
|
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h
|
||||
$(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER))
|
||||
rm -f stamp-h1
|
||||
touch $@
|
||||
|
||||
distclean-hdr:
|
||||
-rm -f config.h stamp-h1
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
distclean-libtool:
|
||||
-rm -f libtool config.lt
|
||||
|
||||
# This directory's subdirectories are mostly independent; you can cd
|
||||
# into them and run 'make' without going through this Makefile.
|
||||
# To change the values of 'make' variables: instead of editing Makefiles,
|
||||
# (1) if the variable is set in 'config.status', edit 'config.status'
|
||||
# (which will cause the Makefiles to be regenerated when you run 'make');
|
||||
# (2) otherwise, pass the desired values on the 'make' command line.
|
||||
$(am__recursive_targets):
|
||||
@fail=; \
|
||||
if $(am__make_keepgoing); then \
|
||||
failcom='fail=yes'; \
|
||||
else \
|
||||
failcom='exit 1'; \
|
||||
fi; \
|
||||
dot_seen=no; \
|
||||
target=`echo $@ | sed s/-recursive//`; \
|
||||
case "$@" in \
|
||||
distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \
|
||||
*) list='$(SUBDIRS)' ;; \
|
||||
esac; \
|
||||
for subdir in $$list; do \
|
||||
echo "Making $$target in $$subdir"; \
|
||||
if test "$$subdir" = "."; then \
|
||||
dot_seen=yes; \
|
||||
local_target="$$target-am"; \
|
||||
else \
|
||||
local_target="$$target"; \
|
||||
fi; \
|
||||
($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \
|
||||
|| eval $$failcom; \
|
||||
done; \
|
||||
if test "$$dot_seen" = "no"; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
|
||||
fi; test -z "$$fail"
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-recursive
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \
|
||||
include_option=--etags-include; \
|
||||
empty_fix=.; \
|
||||
else \
|
||||
include_option=--include; \
|
||||
empty_fix=; \
|
||||
fi; \
|
||||
list='$(SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
test ! -f $$subdir/TAGS || \
|
||||
set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \
|
||||
fi; \
|
||||
done; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-recursive
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscope: cscope.files
|
||||
test ! -s cscope.files \
|
||||
|| $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
|
||||
clean-cscope:
|
||||
-rm -f cscope.files
|
||||
cscope.files: clean-cscope cscopelist
|
||||
cscopelist: cscopelist-recursive
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
-rm -f cscope.out cscope.in.out cscope.po.out cscope.files
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
$(am__remove_distdir)
|
||||
test -d "$(distdir)" || mkdir "$(distdir)"
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
|
||||
if test "$$subdir" = .; then :; else \
|
||||
$(am__make_dryrun) \
|
||||
|| test -d "$(distdir)/$$subdir" \
|
||||
|| $(MKDIR_P) "$(distdir)/$$subdir" \
|
||||
|| exit 1; \
|
||||
dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
|
||||
$(am__relativize); \
|
||||
new_distdir=$$reldir; \
|
||||
dir1=$$subdir; dir2="$(top_distdir)"; \
|
||||
$(am__relativize); \
|
||||
new_top_distdir=$$reldir; \
|
||||
echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
|
||||
echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \
|
||||
($(am__cd) $$subdir && \
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$$new_top_distdir" \
|
||||
distdir="$$new_distdir" \
|
||||
am__remove_distdir=: \
|
||||
am__skip_length_check=: \
|
||||
am__skip_mode_fix=: \
|
||||
distdir) \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
$(MAKE) $(AM_MAKEFLAGS) \
|
||||
top_distdir="$(top_distdir)" distdir="$(distdir)" \
|
||||
dist-hook
|
||||
-test -n "$(am__skip_mode_fix)" \
|
||||
|| find "$(distdir)" -type d ! -perm -755 \
|
||||
-exec chmod u+rwx,go+rx {} \; -o \
|
||||
! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -400 -exec chmod a+r {} \; -o \
|
||||
! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \
|
||||
|| chmod -R a+r "$(distdir)"
|
||||
dist-gzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
|
||||
$(am__post_remove_distdir)
|
||||
dist-bzip2: distdir
|
||||
tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-lzip: distdir
|
||||
tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-xz: distdir
|
||||
tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-tarZ: distdir
|
||||
@echo WARNING: "Support for shar distribution archives is" \
|
||||
"deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-shar: distdir
|
||||
@echo WARNING: "Support for distribution archives compressed with" \
|
||||
"legacy program 'compress' is deprecated." >&2
|
||||
@echo WARNING: "It will be removed altogether in Automake 2.0" >&2
|
||||
shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist-zip: distdir
|
||||
-rm -f $(distdir).zip
|
||||
zip -rq $(distdir).zip $(distdir)
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
dist dist-all:
|
||||
$(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
|
||||
$(am__post_remove_distdir)
|
||||
|
||||
# This target untars the dist file and tries a VPATH configuration. Then
|
||||
# it guarantees that the distribution is self-contained by making another
|
||||
# tarfile.
|
||||
distcheck: dist
|
||||
case '$(DIST_ARCHIVES)' in \
|
||||
*.tar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\
|
||||
*.tar.bz2*) \
|
||||
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
|
||||
*.tar.lz*) \
|
||||
lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
|
||||
*.tar.xz*) \
|
||||
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
|
||||
*.tar.Z*) \
|
||||
uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
|
||||
*.shar.gz*) \
|
||||
GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\
|
||||
*.zip*) \
|
||||
unzip $(distdir).zip ;;\
|
||||
esac
|
||||
chmod -R a-w $(distdir)
|
||||
chmod u+w $(distdir)
|
||||
mkdir $(distdir)/_build $(distdir)/_inst
|
||||
chmod a-w $(distdir)
|
||||
test -d $(distdir)/_build || exit 0; \
|
||||
dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \
|
||||
&& dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
|
||||
&& am__cwd=`pwd` \
|
||||
&& $(am__cd) $(distdir)/_build \
|
||||
&& ../configure \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
--srcdir=.. --prefix="$$dc_install_base" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& cd "$$am__cwd" \
|
||||
|| exit 1
|
||||
$(am__post_remove_distdir)
|
||||
@(echo "$(distdir) archives ready for distribution: "; \
|
||||
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
|
||||
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
|
||||
distuninstallcheck:
|
||||
@test -n '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: trying to run $@ with an empty' \
|
||||
'$$(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
$(am__cd) '$(distuninstallcheck_dir)' || { \
|
||||
echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
|
||||
exit 1; \
|
||||
}; \
|
||||
test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left after uninstall:" ; \
|
||||
if test -n "$(DESTDIR)"; then \
|
||||
echo " (check DESTDIR support)"; \
|
||||
fi ; \
|
||||
$(distuninstallcheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
distcleancheck: distclean
|
||||
@if test '$(srcdir)' = . ; then \
|
||||
echo "ERROR: distcleancheck can only run from a VPATH build" ; \
|
||||
exit 1 ; \
|
||||
fi
|
||||
@test `$(distcleancheck_listfiles) | wc -l` -eq 0 \
|
||||
|| { echo "ERROR: files left in build directory after distclean:" ; \
|
||||
$(distcleancheck_listfiles) ; \
|
||||
exit 1; } >&2
|
||||
check-am: all-am
|
||||
check: check-recursive
|
||||
all-am: Makefile config.h
|
||||
installdirs: installdirs-recursive
|
||||
installdirs-am:
|
||||
install: install-recursive
|
||||
install-exec: install-exec-recursive
|
||||
install-data: install-data-recursive
|
||||
uninstall: uninstall-recursive
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-recursive
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-recursive
|
||||
|
||||
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||
|
||||
distclean: distclean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-generic distclean-hdr \
|
||||
distclean-libtool distclean-tags
|
||||
|
||||
dvi: dvi-recursive
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-recursive
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-recursive
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-recursive
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-recursive
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-recursive
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-recursive
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-recursive
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-recursive
|
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES)
|
||||
-rm -rf $(top_srcdir)/autom4te.cache
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-recursive
|
||||
|
||||
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||
|
||||
pdf: pdf-recursive
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-recursive
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: $(am__recursive_targets) all install-am install-strip
|
||||
|
||||
.PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \
|
||||
am--refresh check check-am clean clean-cscope clean-generic \
|
||||
clean-libtool cscope cscopelist-am ctags ctags-am dist \
|
||||
dist-all dist-bzip2 dist-gzip dist-hook dist-lzip dist-shar \
|
||||
dist-tarZ dist-xz dist-zip distcheck distclean \
|
||||
distclean-generic distclean-hdr distclean-libtool \
|
||||
distclean-tags distcleancheck distdir distuninstallcheck dvi \
|
||||
dvi-am html html-am info info-am install install-am \
|
||||
install-data install-data-am install-dvi install-dvi-am \
|
||||
install-exec install-exec-am install-html install-html-am \
|
||||
install-info install-info-am install-man install-pdf \
|
||||
install-pdf-am install-ps install-ps-am install-strip \
|
||||
installcheck installcheck-am installdirs installdirs-am \
|
||||
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am
|
||||
|
||||
|
||||
# Add all the files listed in "distfiles" files to the distribution,
|
||||
# apply version number s to some files and create a VERSION file which
|
||||
# we need for the Prereq: patch file trick.
|
||||
dist-hook: gen-ChangeLog
|
||||
@set -e; \
|
||||
for file in `cd $(top_srcdir); \
|
||||
find mpi -type f -name distfiles`; do \
|
||||
dir=`dirname $$file` ; $(mkinstalldirs) $(distdir)/$$dir ; \
|
||||
for i in distfiles `cat $(top_srcdir)/$$file` ; do \
|
||||
ln $(top_srcdir)/$$dir/$$i $(distdir)/$$dir/$$i 2> /dev/null \
|
||||
|| cp -p $(top_srcdir)/$$dir/$$i $(distdir)/$$dir/$$i; \
|
||||
done ; \
|
||||
done
|
||||
@set -e; \
|
||||
echo "$(VERSION)" > $(distdir)/VERSION
|
||||
.PHONY: gen-ChangeLog
|
||||
gen-ChangeLog:
|
||||
if test -d $(top_srcdir)/.git; then \
|
||||
(cd $(top_srcdir) && \
|
||||
$(GITLOG_TO_CHANGELOG) --append-dot --tear-off \
|
||||
--amend=build-aux/git-log-fix \
|
||||
--since=$(gen_start_date) ) > $(distdir)/cl-t; \
|
||||
cat $(top_srcdir)/build-aux/git-log-footer >> $(distdir)/cl-t;\
|
||||
rm -f $(distdir)/ChangeLog; \
|
||||
mv $(distdir)/cl-t $(distdir)/ChangeLog; \
|
||||
fi
|
||||
|
||||
stowinstall:
|
||||
$(MAKE) $(AM_MAKEFLAGS) install prefix=/usr/local/stow/libgcrypt
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -1,874 +0,0 @@
|
||||
Noteworthy changes in version 1.6.3 (2015-02-27) [C20/A0/R3]
|
||||
------------------------------------------------
|
||||
|
||||
* Use ciphertext blinding for Elgamal decryption [CVE-2014-3591].
|
||||
See http://www.cs.tau.ac.il/~tromer/radioexp/ for details.
|
||||
|
||||
* Fixed data-dependent timing variations in modular exponentiation
|
||||
[related to CVE-2015-0837, Last-Level Cache Side-Channel Attacks
|
||||
are Practical].
|
||||
|
||||
* Improved asm support for older toolchains.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.6.2 (2014-08-21) [C20/A0/R2]
|
||||
------------------------------------------------
|
||||
|
||||
* Map deprecated RSA algo number to the RSA algo number for better
|
||||
backward compatibility.
|
||||
|
||||
* Support a 0x40 compression prefix for EdDSA.
|
||||
|
||||
* Improve ARM hardware feature detection and building.
|
||||
|
||||
* Fix powerpc-apple-darwin detection
|
||||
|
||||
* Fix building for the x32 ABI platform.
|
||||
|
||||
* Support building using the latest mingw-w64 toolchain.
|
||||
|
||||
* Fix some possible NULL deref bugs.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.6.1 (2014-01-29) [C20/A0/R1]
|
||||
------------------------------------------------
|
||||
|
||||
* Added emulation for broken Whirlpool code prior to 1.6.0.
|
||||
|
||||
* Improved performance of KDF functions.
|
||||
|
||||
* Improved ECDSA compliance.
|
||||
|
||||
* Fixed locking for Windows and non-ELF Pthread systems (regression
|
||||
in 1.6.0)
|
||||
|
||||
* Fixed message digest lookup by OID (regression in 1.6.0).
|
||||
|
||||
* Fixed a build problem on NetBSD.
|
||||
|
||||
* Fixed memory leaks in ECC code.
|
||||
|
||||
* Fixed some asm build problems and feature detection bugs.
|
||||
|
||||
* Interface changes relative to the 1.6.0 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
GCRY_MD_FLAG_BUGEMU1 NEW (minor API change).
|
||||
|
||||
|
||||
Noteworthy changes in version 1.6.0 (2013-12-16) [C20/A0/R0]
|
||||
------------------------------------------------
|
||||
|
||||
* Removed the long deprecated gcry_ac interface. Thus Libgcrypt is
|
||||
not anymore ABI compatible to previous versions if they used the ac
|
||||
interface.
|
||||
|
||||
* Removed the module register subsystem.
|
||||
|
||||
* The deprecated message digest debug macros have been removed. Use
|
||||
gcry_md_debug instead.
|
||||
|
||||
* Removed deprecated control codes.
|
||||
|
||||
* Improved performance of most cipher algorithms as well as for the
|
||||
SHA family of hash functions.
|
||||
|
||||
* Added support for the IDEA cipher algorithm.
|
||||
|
||||
* Added support for the Salsa20 and reduced Salsa20/12 stream ciphers.
|
||||
|
||||
* Added limited support for the GOST 28147-89 cipher algorithm.
|
||||
|
||||
* Added support for the GOST R 34.11-94 and R 34.11-2012 (Stribog)
|
||||
hash algorithms.
|
||||
|
||||
* Added a random number generator to directly use the system's RNG.
|
||||
Also added an interface to prefer the use of a specified RNG.
|
||||
|
||||
* Added support for the SCRYPT algorithm.
|
||||
|
||||
* Mitigated the Yarom/Falkner flush+reload side-channel attack on RSA
|
||||
secret keys. See <http://eprint.iacr.org/2013/448> [CVE-2013-4242].
|
||||
|
||||
* Added support for Deterministic DSA as per RFC-6969.
|
||||
|
||||
* Added support for curve Ed25519.
|
||||
|
||||
* Added a scatter gather hash convenience function.
|
||||
|
||||
* Added several MPI amd SEXP helper functions.
|
||||
|
||||
* Added support for negative numbers to gcry_mpi_print,
|
||||
gcry_mpi_aprint and gcry_mpi_scan.
|
||||
|
||||
* The algorithm ids GCRY_PK_ECDSA and GCRY_PK_ECDH are now
|
||||
deprecated. Use GCRY_PK_ECC if you need an algorithm id.
|
||||
|
||||
* Changed gcry_pk_genkey for "ecc" to only include the curve name and
|
||||
not the parameters. The flag "param" may be used to revert this.
|
||||
|
||||
* Added a feature to globally disable selected hardware features.
|
||||
|
||||
* Added debug helper functions.
|
||||
|
||||
* Interface changes relative to the 1.5.0 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
gcry_ac_* REMOVED.
|
||||
GCRY_AC_* REMOVED.
|
||||
gcry_module_t REMOVED.
|
||||
gcry_cipher_register REMOVED.
|
||||
gcry_cipher_unregister REMOVED.
|
||||
gcry_cipher_list REMOVED.
|
||||
gcry_pk_register REMOVED.
|
||||
gcry_pk_unregister REMOVED.
|
||||
gcry_pk_list REMOVED.
|
||||
gcry_md_register REMOVED.
|
||||
gcry_md_unregister REMOVED.
|
||||
gcry_md_list REMOVED.
|
||||
gcry_md_start_debug REMOVED (macro).
|
||||
gcry_md_stop_debug REMOVED (macro).
|
||||
GCRYCTL_SET_KEY REMOVED.
|
||||
GCRYCTL_SET_IV REMOVED.
|
||||
GCRYCTL_SET_CTR REMOVED.
|
||||
GCRYCTL_DISABLE_ALGO CHANGED: Not anymore thread-safe.
|
||||
gcry_pk_genkey CHANGED: ECC curve params not returned.
|
||||
gcry_md_hash_buffers NEW.
|
||||
gcry_buffer_t NEW.
|
||||
GCRYCTL_SET_ENFORCED_FIPS_FLAG NEW.
|
||||
GCRYCTL_SET_PREFERRED_RNG_TYPE NEW.
|
||||
GCRYCTL_GET_CURRENT_RNG_TYPE NEW.
|
||||
GCRYCTL_CLOSE_RANDOM_DEVICE NEW.
|
||||
GCRY_RNG_TYPE_STANDARD NEW.
|
||||
GCRY_RNG_TYPE_FIPS NEW.
|
||||
GCRY_RNG_TYPE_SYSTEM NEW.
|
||||
gcry_mpi_is_neg NEW.
|
||||
gcry_mpi_neg NEW.
|
||||
gcry_mpi_abs NEW.
|
||||
gcry_mpi_snatch NEW.
|
||||
gcry_mpi_set_opaque_copy NEW.
|
||||
gcry_mpi_point_t NEW.
|
||||
gcry_mpi_point_new NEW.
|
||||
gcry_mpi_point_release NEW.
|
||||
gcry_mpi_point_get NEW.
|
||||
gcry_mpi_point_snatch_get NEW.
|
||||
gcry_mpi_point_set NEW.
|
||||
gcry_mpi_point_snatch_set NEW.
|
||||
gcry_ctx_t NEW.
|
||||
gcry_ctx_release NEW.
|
||||
gcry_mpi_ec_new NEW.
|
||||
gcry_mpi_ec_get_mpi NEW.
|
||||
gcry_mpi_ec_get_point NEW.
|
||||
gcry_mpi_ec_set_mpi NEW.
|
||||
gcry_mpi_ec_set_point NEW.
|
||||
gcry_mpi_ec_get_affine NEW.
|
||||
gcry_mpi_ec_dup NEW.
|
||||
gcry_mpi_ec_add NEW.
|
||||
gcry_mpi_ec_mul NEW.
|
||||
gcry_mpi_ec_curve_point NEW.
|
||||
GCRYMPI_FLAG_IMMUTABLE NEW.
|
||||
GCRYMPI_FLAG_CONST NEW.
|
||||
GCRYMPI_FLAG_USER1 NEW.
|
||||
GCRYMPI_FLAG_USER2 NEW.
|
||||
GCRYMPI_FLAG_USER3 NEW.
|
||||
GCRYMPI_FLAG_USER4 NEW.
|
||||
GCRYMPI_CONST_ONE NEW.
|
||||
GCRYMPI_CONST_TWO NEW.
|
||||
GCRYMPI_CONST_THREE NEW.
|
||||
GCRYMPI_CONST_FOUR NEW.
|
||||
GCRYMPI_CONST_EIGHT NEW.
|
||||
GCRYMPI_FMT_OPAQUE NEW.
|
||||
GCRYPT_VERSION_NUMBER NEW.
|
||||
GCRY_KDF_SCRYPT NEW.
|
||||
gcry_pubkey_get_sexp NEW.
|
||||
GCRYCTL_DISABLE_LOCKED_SECMEM NEW.
|
||||
GCRYCTL_DISABLE_PRIV_DROP NEW.
|
||||
GCRY_CIPHER_SALSA20 NEW.
|
||||
gcry_sexp_nth_buffer NEW.
|
||||
gcry_sexp_extract_param NEW.
|
||||
GCRY_CIPHER_SALSA20R12 NEW.
|
||||
GCRY_CIPHER_GOST28147 NEW.
|
||||
GCRY_MD_GOSTR3411_94 NEW.
|
||||
GCRY_MD_STRIBOG256 NEW.
|
||||
GCRY_MD_STRIBOG512 NEW.
|
||||
GCRY_PK_ECC NEW.
|
||||
gcry_log_debug NEW.
|
||||
gcry_log_debughex NEW.
|
||||
gcry_log_debugmpi NEW.
|
||||
gcry_log_debugpnt NEW.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.5.0 (2011-06-29)
|
||||
------------------------------------------------
|
||||
|
||||
* New function gcry_kdf_derive implementing OpenPGP S2K algorithms
|
||||
and PBKDF2.
|
||||
|
||||
* Support for WindowsCE.
|
||||
|
||||
* Support for ECDH.
|
||||
|
||||
* Support for OAEP and PSS methods as described by RFC-3447.
|
||||
|
||||
* Fixed PKCS v1.5 code to always return the leading zero.
|
||||
|
||||
* New format specifiers "%M" and "%u" for gcry_sexp_build.
|
||||
|
||||
* Support opaque MPIs with "%m" and "%M" in gcry_sexp_build.
|
||||
|
||||
* New functions gcry_pk_get_curve and gcry_pk_get_param to map ECC
|
||||
parameters to a curve name and to retrieve parameter values.
|
||||
|
||||
* gcry_mpi_cmp applied to opaque values has a defined semantic now.
|
||||
|
||||
* Uses the Intel AES-NI instructions if available.
|
||||
|
||||
* The use of the deprecated Alternative Public Key Interface
|
||||
(gcry_ac_*) will now print compile time warnings.
|
||||
|
||||
* The module register subsystem has been deprecated. This subsystem
|
||||
is not flexible enough and would always require ABI changes to
|
||||
extend the internal interfaces. It will eventually be removed.
|
||||
Please contact us on the gcrypt-devel mailing list to discuss
|
||||
whether you really need this feature or how it can be replaced by
|
||||
an internal plugin mechanism.
|
||||
|
||||
* CTR mode may now be used with data chunks of arbitrary length.
|
||||
|
||||
* Changes also done in 1.4.6 (2010-07-13):
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* New variants of the TIGER algorithm.
|
||||
|
||||
* New cipher algorithm mode for AES-WRAP.
|
||||
|
||||
* Changes also done in 1.4.5 (2009-12-11):
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
* Fixed minor memory leak in DSA key generation.
|
||||
|
||||
* No more switching to FIPS mode if /proc/version is not readable.
|
||||
|
||||
* Fixed sigill during Padlock detection on old CPUs.
|
||||
|
||||
* Fixed a hang on some W2000 machines.
|
||||
|
||||
* Boosted SHA-512 performance by 30% on ia32 boxes and gcc 4.3;
|
||||
SHA-256 went up by 25%.
|
||||
|
||||
* Interface changes relative to the 1.4.6 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
GCRY_PK_ECDH NEW.
|
||||
gcry_pk_get_curve NEW.
|
||||
gcry_pk_get_param NEW.
|
||||
GCRYCTL_DISABLE_HWF NEW.
|
||||
gcry_kdf_derive NEW.
|
||||
gcry_pk_encrypt EXTENDED: Support OAEP.
|
||||
gcry_pk_decrypt EXTENDED: Support OAEP.
|
||||
gcry_pk_sign EXTENDED: Support PSS.
|
||||
gcry_pk_verify EXTENDED: Support PSS.
|
||||
gcry_sexp_build EXTENDED: Add format specifiers M and u.
|
||||
|
||||
* Interface changes relative to the 1.4.2 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
GCRY_CIPHER_MODE_AESWRAP NEW.
|
||||
GCRY_MD_TIGER1 NEW.
|
||||
GCRY_MD_TIGER2 NEW.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.4.4 (2009-01-22)
|
||||
------------------------------------------------
|
||||
|
||||
* Publish GCRY_MODULE_ID_USER and GCRY_MODULE_ID_USER_LAST constants.
|
||||
This functionality has been in Libgcrypt since 1.3.0.
|
||||
|
||||
* MD5 may now be used in non-enforced fips mode.
|
||||
|
||||
* Fixed HMAC for SHA-384 and SHA-512 with keys longer than 64 bytes.
|
||||
|
||||
* In fips mode, RSA keys are now generated using the X9.31 algorithm
|
||||
and DSA keys using the FIPS 186-2 algorithm.
|
||||
|
||||
* The transient-key flag is now also supported for DSA key
|
||||
generation. DSA domain parameters may be given as well.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.4.3 (2008-09-18)
|
||||
------------------------------------------------
|
||||
|
||||
* Try to auto-initialize Libgcrypt to minimize the effect of
|
||||
applications not doing that correctly. This is not a perfect
|
||||
solution but given that many applicationion would totally fail
|
||||
without such a hack, we try to help at least with the most common
|
||||
cases. Folks, please read the manual to learn how to properly
|
||||
initialize Libgcrypt!
|
||||
|
||||
* Auto-initialize the secure memory to 32k instead of aborting the
|
||||
process.
|
||||
|
||||
* Log fatal errors via syslog.
|
||||
|
||||
* Changed the name and the semantics of the fips mode config file.
|
||||
|
||||
* Add convenience macro gcry_fips_mode_active.
|
||||
|
||||
* More self-tests.
|
||||
|
||||
* Documentation cleanups.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.4.2 (2008-09-08)
|
||||
------------------------------------------------
|
||||
|
||||
* The long missing gcry_mpi_lshift function has been added.
|
||||
|
||||
* RSA key generation now supports a "transient-key" flag.
|
||||
|
||||
* The keygrip computation for ECDSA has been implemented thus ECDSA
|
||||
is now fully supported.
|
||||
|
||||
* A few macros have been replaced by functions for better type
|
||||
checking.
|
||||
|
||||
* The thread initialization structure now carries version
|
||||
information.
|
||||
|
||||
* The manual describes more clearly how to initialize Libgcrypt.
|
||||
|
||||
* The library may now be switched into a FIPS mode.
|
||||
|
||||
* Interface changes relative to the 1.3.0 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
GCRYCTL_OPERATIONAL_P NEW.
|
||||
GCRYCTL_FIPS_MODE_P NEW.
|
||||
GCRYCTL_FORCE_FIPS_MODE NEW.
|
||||
gcry_cipher_setkey NEW: Replaces macro.
|
||||
gcry_cipher_setiv NEW: Replaces macro.
|
||||
gcry_cipher_setctr NEW: Replaces macro.
|
||||
gcry_mpi_lshift NEW.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Noteworthy changes in version 1.4.1 (2008-04-25)
|
||||
------------------------------------------------
|
||||
|
||||
* Fixed a bug introduced by 1.3.1 which led to the comsumption of far
|
||||
too much entropy for the intial seeding.
|
||||
|
||||
* Improved AES performance for CFB and CBC modes.
|
||||
|
||||
* Removed build problems for the Padlock support.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.4.0 (2007-12-10)
|
||||
------------------------------------------------
|
||||
|
||||
* New configure option --disable-padlock-support which is mostly
|
||||
useful in case of build problems.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.3.2 (2007-12-03)
|
||||
------------------------------------------------
|
||||
|
||||
* The visibility attribute is now used if supported by the toolchain.
|
||||
|
||||
* The ACE engine of VIA processors is now used for AES-128.
|
||||
|
||||
* The ASN.1 DER template for SHA-224 has been fixed.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.3.1 (2007-10-26)
|
||||
------------------------------------------------
|
||||
|
||||
* The entire library is now under the LGPL. The helper programs and
|
||||
the manual are under the GPL. Kudos to Peter Gutmann for giving
|
||||
permissions to relicense the rndw32 and rndunix modules.
|
||||
|
||||
* The Camellia cipher is now under the LGPL and included by default.
|
||||
|
||||
* Fixed a bug in the detection of symbol prefixes which inhibited the
|
||||
build of optimzied assembler code on certain systems.
|
||||
|
||||
* Updated the entropy gatherer for W32.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.3.0 (2007-05-04)
|
||||
------------------------------------------------
|
||||
|
||||
* Changed the way the RNG gets initialized. This allows to keep it
|
||||
uninitialized as long as no random numbers are used. To override
|
||||
this, the new macro gcry_fast_random_poll may be used. It is in
|
||||
general a good idea to spread this macro into the application code
|
||||
to make sure that these polls happen often enough.
|
||||
|
||||
* Made the RNG immune against fork without exec.
|
||||
|
||||
* Reading and writing the random seed file is now protected by a
|
||||
fcntl style file lock on systems that provide this function.
|
||||
|
||||
* Support for SHA-224 and HMAC using SHA-384 and SHA-512.
|
||||
|
||||
* Support for the SEED cipher.
|
||||
|
||||
* Support for the Camellia cipher. Note that Camellia is disabled by
|
||||
default, and that enabling it changes the license of libgcrypt from
|
||||
LGPL to GPL.
|
||||
|
||||
* Support for OFB encryption mode.
|
||||
|
||||
* gcry_mpi_rshift does not anymore truncate the shift count.
|
||||
|
||||
* Reserved algorithm ranges for use by applications.
|
||||
|
||||
* Support for DSA2.
|
||||
|
||||
* The new function gcry_md_debug should be used instead of the
|
||||
gcry_md_start_debug and gcry_md_stop_debug macros.
|
||||
|
||||
* New configure option --enable-random-daemon to support a system
|
||||
wide random daemon. The daemon code is experimental and not yet
|
||||
very well working. It will eventually allow to keep a global
|
||||
random pool for the sake of short living processes.
|
||||
|
||||
* Non executable stack support is now used by default on systems
|
||||
supporting it.
|
||||
|
||||
* Support for Microsoft Windows.
|
||||
|
||||
* Assembler support for the AMD64 architecture.
|
||||
|
||||
* New configure option --enable-mpi-path for optimized builds.
|
||||
|
||||
* Experimental support for ECDSA; should only be used for testing.
|
||||
|
||||
* New control code GCRYCTL_PRINT_CONFIG to print the build
|
||||
configuration.
|
||||
|
||||
* Minor changes to some function declarations. Buffer arguments are
|
||||
now typed as void pointer. This should not affect any compilation.
|
||||
Fixed two bugs in return values and clarified documentation.
|
||||
|
||||
* Interface changes relative to the 1.2.0 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
gcry_fast_random_poll NEW
|
||||
gcry_md_debug NEW
|
||||
gcry_sexp_nth_string NEW
|
||||
GCRY_MD_SHA224 NEW
|
||||
GCRY_PK_USAGE_CERT NEW
|
||||
GCRY_PK_USAGE_AUTH NEW
|
||||
GCRY_PK_USAGE_UNKN NEW
|
||||
GCRY_PK_ECDSA NEW
|
||||
GCRY_CIPHER_SEED NEW
|
||||
GCRY_CIPHER_CAMELLIA128 NEW
|
||||
GCRY_CIPHER_CAMELLIA192 NEW
|
||||
GCRY_CIPHER_CAMELLIA256 NEW
|
||||
GCRYCTL_FAKED_RANDOM_P NEW
|
||||
GCRYCTL_PRINT_CONFIG NEW
|
||||
GCRYCTL_SET_RNDEGD_SOCKET NEW.
|
||||
gcry_mpi_scan CHANGED: Argument BUFFER is now void*.
|
||||
gcry_pk_algo_name CHANGED: Returns "?" instead of NULL.
|
||||
gcry_cipher_algo_name CHANGED: Returns "?" instead of "".
|
||||
gcry_pk_spec_t CHANGED: Element ALIASES is now const ptr.
|
||||
gcry_md_write_t CHANGED: Argument BUF is now a const void*.
|
||||
gcry_md_ctl CHANGED: Argument BUFFER is now void*.
|
||||
gcry_cipher_encrypt CHANGED: Arguments IN and OUT are now void*.
|
||||
gcry_cipher_decrypt CHANGED: Arguments IN and OUT are now void*.
|
||||
gcry_sexp_sprint CHANGED: Argument BUFFER is now void*.
|
||||
gcry_create_nonce CHANGED: Argument BUFFER is now void*.
|
||||
gcry_randomize CHANGED: Argument BUFFER is now void*.
|
||||
gcry_cipher_register CHANGED: Argument ALGORITHM_ID is now int*.
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Noteworthy changes in version 1.2.0 (2004-04-15)
|
||||
------------------------------------------------
|
||||
|
||||
* First stable release.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.1.94 (2004-03-29)
|
||||
-------------------------------------------------
|
||||
|
||||
* The support for multi-threaded users goes into its third
|
||||
incarnation. We removed compile time support for thread libraries.
|
||||
To support the thread library of your choice, you have to set up
|
||||
callback handlers at initialization time. New data structures, a
|
||||
new control command, and default initializers are provided for this
|
||||
purpose.
|
||||
|
||||
* Interface changes relative to the 1.1.93 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
libgcrypt-config --thread OBSOLETE
|
||||
libgcrypt-pth.la REMOVED
|
||||
libgcrypt-pthread.la REMOVED
|
||||
GCRYCTL_SET_THREAD_CBS NEW
|
||||
struct gcrypt_thread_cbs NEW
|
||||
enum gcry_thread_option NEW
|
||||
GCRY_THREAD_OPTION_PTH_IMPL NEW
|
||||
GCRY_THREAD_OPTION_PTHREAD_IMPL NEW
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Noteworthy changes in version 1.1.93 (2004-03-06)
|
||||
-------------------------------------------------
|
||||
|
||||
* The automatic thread library detection has finally been removed.
|
||||
From now on, only linking explicitely to libgcrypt, libgcrypt-pth
|
||||
or libgcrypt-pthread is supported.
|
||||
|
||||
Noteworthy changes in version 1.1.92 (2004-02-20)
|
||||
-------------------------------------------------
|
||||
|
||||
* Minor bug fixes.
|
||||
|
||||
* Included a limited implementation of RFC2268.
|
||||
|
||||
* Changed API of the gcry_ac_ functions. Only a very few programs
|
||||
should be affected by this.
|
||||
|
||||
* Interface changes relative to the 1.1.91 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
GCRY_CIPHER_RFC2268_40 NEW.
|
||||
gcry_ac_data_set CHANGED: New argument FLAGS.
|
||||
gcry_ac_data_get_name CHANGED: New argument FLAGS.
|
||||
gcry_ac_data_get_index CHANGED: New argument FLAGS.
|
||||
gcry_ac_key_pair_generate CHANGED: New and reordered arguments.
|
||||
gcry_ac_key_test CHANGED: New argument HANDLE.
|
||||
gcry_ac_key_get_nbits CHANGED: New argument HANDLE.
|
||||
gcry_ac_key_get_grip CHANGED: New argument HANDLE.
|
||||
gcry_ac_data_search REMOVED.
|
||||
gcry_ac_data_add REMOVED.
|
||||
GCRY_AC_DATA_FLAG_NO_BLINDING REMOVED.
|
||||
GCRY_AC_FLAG_NO_BLINDING NEW: Replaces above.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.1.91 (2003-12-19)
|
||||
-------------------------------------------------
|
||||
|
||||
* Code cleanups and minor bug fixes.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.1.90 (2003-11-14)
|
||||
-------------------------------------------------
|
||||
|
||||
* The use of the GCRY_WEAK_RANDOM level is now deprecated in favor of
|
||||
the new gcry_create_nonce function.
|
||||
|
||||
* gcry_sexp_build now supports a "%b" format to include a memory buffer.
|
||||
|
||||
* Minor configuration fixes.
|
||||
|
||||
* Interface changes relative to the 1.1.44 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
gcry_create_nonce NEW
|
||||
gcry_sexp_build ENHANCED
|
||||
|
||||
|
||||
Noteworthy changes in version 1.1.44 (2003-10-31)
|
||||
-------------------------------------------------
|
||||
|
||||
* Bug fixes and more code cleanups.
|
||||
|
||||
* Enhanced the prime API.
|
||||
|
||||
* Interface changes relative to the 1.1.43 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
gcry_prime_group_generator NEW
|
||||
gcry_prime_release_factors NEW
|
||||
|
||||
|
||||
Noteworthy changes in version 1.1.43 (2003-09-04)
|
||||
-------------------------------------------------
|
||||
|
||||
* Bug fixes and internal code cleanups.
|
||||
|
||||
* Support for the Serpent cipher algorithm.
|
||||
|
||||
* Interface changes relative to the 1.1.42 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
gcry_prime_generate NEW
|
||||
gcry_prime_check NEW
|
||||
|
||||
|
||||
Noteworthy changes in version 1.1.42 (2003-07-31)
|
||||
-------------------------------------------------
|
||||
|
||||
* Major API cleanup. Applications need to be converted to the new
|
||||
API. See README.apichanges for hints on how to do that. Backward
|
||||
compatibility is provided where it was possible without too much
|
||||
effort and did not collide with the overall sanitization effort.
|
||||
However, this is only for ease of transition. NO DEPRECATED
|
||||
FUNCTION OR DATA TYPE IS CONSIDERED A PART OF THE API OR ABI AND
|
||||
WILL BE DROPPED IN THE FUTURE WITHOUT CHANGING THE SONAME OF THE
|
||||
LIBRARY.
|
||||
|
||||
* If gcrypt.h is included in sources compiled by GCC 3.1 or later,
|
||||
deprecated attributes will warn about use of obsolete functions and
|
||||
type definitions. You can suppress these warnings by passing
|
||||
-Wno-deprecated-declarations to the gcc command.
|
||||
|
||||
* gcry_check_version must be called from now on to initialize the
|
||||
library, it is not longer optional.
|
||||
|
||||
* Removed `libgcrypt errno' concept.
|
||||
|
||||
* Libgcrypt depends on libgpg-error, a library that provides error
|
||||
codes and according functions for all GnuPG components. Functions
|
||||
that used to return error codes asa `int' have been changed to
|
||||
return a code of type `gcry_error_t'. All GCRYERR_* error symbols
|
||||
have been removed, since they are now contained in libgpg-error
|
||||
(GPG_ERR_*). All functions and types in libgpg-error have also been
|
||||
wrapped in Libgcrypt. The new types are gcry_err_code_t and
|
||||
gcry_err_source_t. The new functions are gcry_err_code,
|
||||
gcry_err_source, gcry_error, gcry_err_make, gcry_error_from_errno,
|
||||
gcry_err_make_from_errno, gcry_err_code_from_errno,
|
||||
gcry_err_code_to_errno, gcry_strsource.
|
||||
|
||||
* New function gcry_mpi_dump to help in debugging.
|
||||
|
||||
* Added alternative interface for asymmetric cryptography.
|
||||
|
||||
* CRC-32, CRC-32 a'la RFC 1510, CRC-24 a'la RFC 2440 are now
|
||||
supported.
|
||||
|
||||
* SHA-256, SHA-384 and SHA-512 are now supported.
|
||||
|
||||
* 128 bit Twofish is now supported.
|
||||
|
||||
* The random module won't print the "not enough random bytes
|
||||
available" anymore. A new progress status is issued instead.
|
||||
|
||||
* CBC-MAC for block ciphers is now supported, by using a
|
||||
GCRY_CIPHER_CBC_MAC cipher flag.
|
||||
|
||||
* CTR mode for block ciphers is now supported.
|
||||
|
||||
* The public RSA exponent can now be specified in key generation.
|
||||
|
||||
* RSA blinding is now supported and is used automatically for RSA
|
||||
decryption. It can be explicitely disabled by using the
|
||||
`no-blinding' symbol in the `flags' S-Expression or by using the
|
||||
GCRY_AC_FLAG_DATA_NO_BLINDING flag when using the ac interface.
|
||||
|
||||
* gcry_sexp_canon_len does not use a `historically encoded' error
|
||||
code anymore.
|
||||
|
||||
|
||||
* Interface changes relative to the 1.1.12 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
GCRY_MPI DEPRECATED; Use: gcry_mpi_t
|
||||
GcryMPI DEPRECATED; Use: gcry_mpi_t
|
||||
GCRY_SEXP DEPRECATED; Use: gcry_sexp_t
|
||||
GcrySexp DEPRECATED; Use: gcry_sexp_t
|
||||
GCRY_CIPHER_HD DEPRECATED; Use: gcry_cipher_hd_t
|
||||
GcryCipherHd DEPRECATED; Use: gcry_cipher_hd_t
|
||||
GCRY_MD_HD DEPRECATED; Use: gcry_md_hd_t
|
||||
GcryMDHd DEPRECATED; Use: gcry_md_hd_t
|
||||
gcry_error_t NEW
|
||||
gcry_err_code_t NEW
|
||||
gcry_err_source_t NEW
|
||||
gcry_err_make NEW
|
||||
gcry_error NEW
|
||||
gcry_err_code NEW
|
||||
gcry_err_source NEW
|
||||
gcry_err_code_from_errno NEW
|
||||
gcry_err_code_to_errno NEW
|
||||
gcry_err_make_from_errno NEW
|
||||
gcry_error_from_errno NEW
|
||||
gcry_strsource NEW
|
||||
GCRYERR_{some error code} REMOVED; Use GPG_ERR_*
|
||||
from libgpg-error instead.
|
||||
gcry_errno REMOVED
|
||||
gcry_sexp_canon_len CHANGED
|
||||
gcry_sexp_build_array NEW
|
||||
gcry_mpi_scan CHANGED: New argument to separate in/out args.
|
||||
gcry_mpi_print CHANGED: Ditto.
|
||||
gcry_mpi_dump NEW
|
||||
gcry_cipher_open CHANGED
|
||||
gcry_cipher_reset NEW
|
||||
gcry_cipher_register NEW
|
||||
gcry_cipher_unregister NEW
|
||||
gcry_cipher_list NEW
|
||||
gcry_cipher_algo_keylen REPLACED macro with function.
|
||||
gcry_cipher_algo_blklen REPLACED macro with function.
|
||||
gcry_pk_register NEW
|
||||
gcry_pk_unregister NEW
|
||||
gcry_pk_list NEW
|
||||
gcry_pk_decrypt ENHANCED: Allows flag to return
|
||||
complete S-expression.
|
||||
gcry_md_open CHANGED
|
||||
gcry_md_copy CHANGED
|
||||
gcry_md_is_enabled NEW
|
||||
gcry_md_is_secure NEW
|
||||
gcry_md_register NEW
|
||||
gcry_md_unregister NEW
|
||||
gcry_md_list NEW
|
||||
gcry_ac_data_t NEW
|
||||
gcry_ac_key_t NEW
|
||||
gcry_ac_key_pair_t NEW
|
||||
gcry_ac_handle_t NEW
|
||||
gcry_ac_key_spec_rsa_t NEW
|
||||
gcry_ac_data_new NEW
|
||||
gcry_ac_data_destroy NEW
|
||||
gcry_ac_data_set NEW
|
||||
gcry_ac_data_copy NEW
|
||||
gcry_ac_data_length NEW
|
||||
gcry_ac_data_get_name NEW
|
||||
gcry_ac_data_get_index NEW
|
||||
gcry_ac_data_clear NEW
|
||||
gcry_ac_open NEW
|
||||
gcry_ac_close NEW
|
||||
gcry_ac_key_init NEW
|
||||
gcry_ac_key_pair_generate NEW
|
||||
gcry_ac_key_pair_extract NEW
|
||||
gcry_ac_key_data_get NEW
|
||||
gcry_ac_key_test NEW
|
||||
gcry_ac_key_get_nbits NEW
|
||||
gcry_ac_key_get_grip NEW
|
||||
gcry_ac_key_destroy NEW
|
||||
gcry_ac_key_pair_destroy NEW
|
||||
gcry_ac_data_encrypt NEW
|
||||
gcry_ac_data_decrypt NEW
|
||||
gcry_ac_data_sign NEW
|
||||
gcry_ac_data_verify NEW
|
||||
gcry_ac_id_to_name NEW
|
||||
gcry_ac_name_to_id NEW
|
||||
gcry_handler_progress_t NEW
|
||||
gcry_handler_alloc_t NEW
|
||||
gcry_handler_secure_check_t NEW
|
||||
gcry_handle_realloc_t NEW
|
||||
gcry_handler_free_t NEW
|
||||
gcry_handler_no_mem_t NEW
|
||||
gcry_handler_error_t NEW
|
||||
gcry_handler_log_t NEW
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Noteworthy changes in version 1.1.12 (2003-01-20)
|
||||
-------------------------------------------------
|
||||
|
||||
* gcry_pk_sign, gcry_pk_verify and gcry_pk_encrypt can now handle an
|
||||
optional pkcs1 flags parameter in the S-expression. A similar flag
|
||||
may be passed to gcry_pk_decrypt but it is only syntactically
|
||||
implemented.
|
||||
|
||||
* New convenience macro gcry_md_get_asnoid.
|
||||
|
||||
* There is now some real stuff in the manual.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.1.11 (2002-12-21)
|
||||
-------------------------------------------------
|
||||
|
||||
* Don't export internal symbols anymore (currently only for GNU systems)
|
||||
|
||||
* New algorithm: MD4
|
||||
|
||||
* Implemented ciphertext stealing.
|
||||
|
||||
* Smaller bugs fixes and a few new OIDs.
|
||||
|
||||
* Interface changes relative to the 1.1.8 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
gcry_cipher_cts NEW
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
Noteworthy changes in version 1.1.10 (2002-09-20)
|
||||
-------------------------------------------------
|
||||
|
||||
* Fixed shared library builds for i386, PPC and Sparc.
|
||||
|
||||
* Added simple benchmark tool.
|
||||
|
||||
* Replaced the internal mutexes by code which automatically adapts to
|
||||
the used threading library. Currently Pth and Pthread are
|
||||
supported. For non-ELF systems the GNU toolchain is now required..
|
||||
|
||||
* Added untested support to build Windows DLLs.
|
||||
|
||||
Noteworthy changes in version 1.1.9 (2002-08-23)
|
||||
------------------------------------------------
|
||||
|
||||
* Support for plain old DES.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.1.8 (2002-06-25)
|
||||
------------------------------------------------
|
||||
|
||||
* Minor cleanups and exported a few new functions.
|
||||
|
||||
* Interface changes relative to the 1.1.7 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
gcry_mpi_div NEW
|
||||
gcry_mpi_mod NEW
|
||||
gcry_mpi_invm NEW
|
||||
gcry_mpi_swap NEW
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Noteworthy changes in version 1.1.7 (2002-05-21)
|
||||
------------------------------------------------
|
||||
|
||||
* Libgcrypt is now distributed under the terms of the GNU Lesser
|
||||
General Public License; see the README file for details.
|
||||
|
||||
* It is possible to use libgcrypt w/o intialized secure memory.
|
||||
|
||||
* Libgcrypt should now be thread safe after the initialization.
|
||||
gcry_control (GCRYCRL_INITIALIZATION_FINISHED,NULL,0) should have
|
||||
been called before creating additional threads.
|
||||
|
||||
* Interface changes relative to the 1.1.6 release:
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
GCRYCTL_DISABLE_INTERNAL_LOCKING NEW
|
||||
GCRYCTL_DISABLE_SECMEM NEW
|
||||
GCRYCTL_INITIALIZATION_FINISHED NEW
|
||||
GCRYCTL_INITIALIZATION_FINISHED_P NEW
|
||||
GCRYCTL_ANY_INITIALIZATION_P NEW
|
||||
gcry_strdup NEW
|
||||
gcry_sexp_create NEW
|
||||
gcry_sexp_new NEW
|
||||
gcry_set_progress_handler NEW
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
Noteworthy changes in version 1.1.6 (2002-02-07)
|
||||
------------------------------------------------
|
||||
|
||||
* Enhanced the S-expression conversion functions.
|
||||
|
||||
Noteworthy changes in version 1.1.5 (2001-12-18)
|
||||
------------------------------------------------
|
||||
|
||||
* gcry_{cipher,md}_map_name are now able to map stringified object IDs.
|
||||
|
||||
* New functions gcry_sexp_canon_len and gcry_cipher_mode_from_oid.
|
||||
|
||||
* Closed some memory leaks.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.1.4 (2001-08-03)
|
||||
------------------------------------------------
|
||||
|
||||
* Arcfour does now work.
|
||||
|
||||
* Some minor fixes.
|
||||
|
||||
* Added a first test program
|
||||
|
||||
* Migrated to autoconf 2.52.
|
||||
|
||||
|
||||
Noteworthy changes in version 1.1.3 (2001-05-31)
|
||||
------------------------------------------------
|
||||
|
||||
* First release of Libgcrypt which is a result of splitting GnuPG
|
||||
into into libgcrypt and GnuPG.
|
||||
|
||||
|
||||
Copyright 2001, 2002, 2003, 2004, 2007, 2008,
|
||||
2009, 2011 Free Software Foundation, Inc.
|
||||
Copyright 2013 g10 Code GmbH
|
||||
|
||||
This file is free software; as a special exception the author gives
|
||||
unlimited permission to copy and/or distribute it, with or without
|
||||
modifications, as long as this notice is preserved.
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
@@ -1,284 +0,0 @@
|
||||
Libgcrypt - The GNU Crypto Library
|
||||
------------------------------------
|
||||
Version 1.6
|
||||
|
||||
Copyright (C) 1989,1991-2015 Free Software Foundation, Inc.
|
||||
Copyright (C) 2012-2015 g10 Code GmbH
|
||||
Copyright (C) 2013-2015 Jussi Kivilinna
|
||||
|
||||
Libgcrypt is free software. See the file AUTHORS for full copying
|
||||
notices, and LICENSES for notices about contributions that require
|
||||
these additional notices to be distributed.
|
||||
|
||||
|
||||
Overview
|
||||
--------
|
||||
|
||||
Libgcrypt is a general purpose crypto library based on the code
|
||||
used in GnuPG. Libgcrypt depends on the library `libgpg-error',
|
||||
which must be installed correctly before Libgcrypt is to be built.
|
||||
Libgcrypt is distributed under the LGPL, see the section "License"
|
||||
below for details.
|
||||
|
||||
|
||||
Build Instructions
|
||||
------------------
|
||||
|
||||
The download canonical location for libgcrypt is:
|
||||
|
||||
ftp://ftp.gnupg.org/gcrypt/libgcrypt/
|
||||
|
||||
To build libgcrypt you need libgpg-error:
|
||||
|
||||
ftp://ftp.gnupg.org/gcrypt/libgpg-error/
|
||||
|
||||
You should get the latest versions of course.
|
||||
|
||||
After building and installing the libgpg-error package, you may
|
||||
continue with Libgcrypt installation as with allmost all GNU
|
||||
packages, you just have to do
|
||||
|
||||
./configure
|
||||
make
|
||||
make check
|
||||
make install
|
||||
|
||||
The "make check" is not required but a good idea to see whether
|
||||
the library works as expected. The check takes some while and
|
||||
prints some benchmarking results. Before doing "make install" you
|
||||
probably need to become root.
|
||||
|
||||
To build libgcrypt for Microsoft Windows, you need to have the
|
||||
mingw32 cross-building toolchain installed. Instead of running a
|
||||
plain configure you use
|
||||
|
||||
./autogen.sh --build-w32
|
||||
make
|
||||
make install
|
||||
|
||||
By default this command sequences expectsd a libgpg-error
|
||||
installed below $HOME/w32root and installs libgcrypt to that
|
||||
directory too. See the autogen.sh code for details.
|
||||
|
||||
The documentation is available as an Info file (gcrypt.info). To
|
||||
build documentation in PDF, run this:
|
||||
|
||||
cd doc
|
||||
make pdf
|
||||
|
||||
|
||||
|
||||
Mailing List
|
||||
------------
|
||||
|
||||
You may want to join the developer's mailing list
|
||||
gcrypt-devel@gnupg.org by sending mail with a subject of
|
||||
"subscribe" to gcrypt-devel-request@gnupg.org. An archive of this
|
||||
list is available at http://lists.gnupg.org .
|
||||
|
||||
|
||||
Configure options
|
||||
-----------------
|
||||
Here is a list of configure options which are sometimes useful
|
||||
for installation.
|
||||
|
||||
--enable-large-data-tests
|
||||
With this option a "make check" will take really
|
||||
long due to extra checks for the hash algorithms.
|
||||
|
||||
--enable-m-guard
|
||||
Enable the integrated malloc checking code. Please
|
||||
note that this feature does not work on all CPUs
|
||||
(e.g. SunOS 5.7 on UltraSparc-2) and might give
|
||||
you a bus error.
|
||||
|
||||
--disable-asm
|
||||
Do not use assembler modules. It is not possible
|
||||
to use this on some CPU types.
|
||||
|
||||
--enable-ld-version-script
|
||||
Libgcrypt tries to build a library where internal
|
||||
symbols are not exported. This requires support
|
||||
from ld and is currently enabled for a few OSes.
|
||||
If you know that your ld supports the so called
|
||||
ELF version scripts, you can use this option to
|
||||
force its use. OTOH, if you get error message
|
||||
from the linker, you probably want to use this
|
||||
option to disable the use of version scripts.
|
||||
Note, that you should never ever use an
|
||||
undocumented symbol or one which is prefixed with
|
||||
an underscore.
|
||||
|
||||
--enable-ciphers=list
|
||||
--enable-pubkey-ciphers=list
|
||||
--enable-digests=list
|
||||
If not otherwise specified, all algorithms
|
||||
included in the libgcrypt source tree are built.
|
||||
An exception are algorithms, which depend on
|
||||
features not provided by the system, like 64bit
|
||||
data types. With these switches it is possible
|
||||
to select exactly those algorithm modules, which
|
||||
should be built. The algorithms are to be
|
||||
separated by spaces, commas or colons. To view
|
||||
the list used with the current build the program
|
||||
tests/version may be used.
|
||||
|
||||
--disable-endian-check
|
||||
Don't let configure test for the endianness but
|
||||
try to use the OS provided macros at compile
|
||||
time. This is helpful to create OS X fat binaries.
|
||||
|
||||
--enable-random-daemon
|
||||
Include support for a global random daemon and
|
||||
build the daemon. This is an experimental feature.
|
||||
|
||||
--enable-mpi-path=EXTRA_PATH
|
||||
Prepend EXTRA_PATH to list of CPU specific
|
||||
optimizations. For example, if you want to add
|
||||
optimizations forn a Intel Pentium 4 compatible
|
||||
CPU, you may use
|
||||
--enable-mpi-path=pentium4/sse2:pentium4/mmx
|
||||
Take care: The generated library may crash on
|
||||
non-compatible CPUs.
|
||||
|
||||
--enable-random=NAME
|
||||
Force the use of the random gathering module
|
||||
NAME. Default is either to use /dev/random or
|
||||
the auto mode. Possible values for NAME are:
|
||||
egd - Use the module which accesses the
|
||||
Entropy Gathering Daemon. See the webpages
|
||||
for more information about it.
|
||||
unix - Use the standard Unix module which does not
|
||||
have a very good performance.
|
||||
linux - Use the module which accesses /dev/random.
|
||||
This is the first choice and the default one
|
||||
for GNU/Linux or *BSD.
|
||||
auto - Compile linux, egd and unix in and
|
||||
automagically select at runtime.
|
||||
|
||||
--enable-hmac-binary-check
|
||||
Include support to check the binary at runtime
|
||||
against a HMAC checksum. This works only in FIPS
|
||||
mode and on systems providing the dladdr function.
|
||||
|
||||
--disable-padlock-support
|
||||
Disable support for the PadLock engine of VIA
|
||||
processors. The default is to use PadLock if
|
||||
available. Try this if you get problems with
|
||||
assembler code.
|
||||
|
||||
--disable-aesni-support
|
||||
Disable support for the AES-NI instructions of
|
||||
newer Intel CPUs. The default is to use AES-NI
|
||||
if available. Try this if you get problems with
|
||||
assembler code.
|
||||
|
||||
--disable-O-flag-munging
|
||||
Some code is too complex for some compilers while
|
||||
in higher optimization modes, thus the compiler
|
||||
invocation is modified to use a lower
|
||||
optimization level. Usually this works very well
|
||||
but on some platforms these rules break the
|
||||
invocation. This option may be used to disable
|
||||
the feature under the assumption that either good
|
||||
CFLAGS are given or the compiler can grok the code.
|
||||
|
||||
|
||||
|
||||
|
||||
Build Problems
|
||||
--------------
|
||||
|
||||
We can't check all assembler files, so if you have problems
|
||||
assembling them (or the program crashes) use --disable-asm with
|
||||
./configure. If you opt to delete individual replacement files in
|
||||
hopes of using the remaining ones, be aware that the configure
|
||||
scripts may consider several subdirectories to get all available
|
||||
assembler files; be sure to delete the correct ones. Never delete
|
||||
udiv-qrnnd.S in any CPU directory, because there may be no C
|
||||
substitute (in mpi/genereic). Don't forget to delete
|
||||
"config.cache" and run "./config.status --recheck". We got a few
|
||||
reports about problems using versions of gcc earlier than 2.96
|
||||
along with a non-GNU assembler (as). If this applies to your
|
||||
platform, you can either upgrade gcc to a more recent version, or
|
||||
use the GNU assembler.
|
||||
|
||||
Some make tools are broken - the best solution is to use GNU's
|
||||
make. Try gmake or grab the sources from a GNU archive and
|
||||
install them.
|
||||
|
||||
Specific problems on some machines:
|
||||
|
||||
* IBM RS/6000 running AIX
|
||||
|
||||
Due to a change in gcc (since version 2.8) the MPI stuff may
|
||||
not build. In this case try to run configure using:
|
||||
CFLAGS="-g -O2 -mcpu=powerpc" ./configure
|
||||
|
||||
* SVR4.2 (ESIX V4.2 cc)
|
||||
|
||||
Due to problems with the ESIX as(1), you probably want to do:
|
||||
CFLAGS="-O -K pentium" ./configure --disable-asm
|
||||
|
||||
* SunOS 4.1.4
|
||||
|
||||
./configure ac_cv_sys_symbol_underscore=yes
|
||||
|
||||
* Sparc64 CPUs
|
||||
|
||||
We have reports about failures in the AES module when
|
||||
compiling using gcc (e.g. version 4.1.2) and the option -O3;
|
||||
using -O2 solves the problem.
|
||||
|
||||
|
||||
License
|
||||
-------
|
||||
|
||||
The library is distributed under the terms of the GNU Lesser
|
||||
General Public License (LGPL); see the file COPYING.LIB for the
|
||||
actual terms. The helper programs (e.g. gcryptrnd and getrandom)
|
||||
as well as the documentation are distributed under the terms of
|
||||
the GNU General Public License (GPL); see the file COPYING for the
|
||||
actual terms. The file LICENSES has notices about contributions
|
||||
that require these additional notices are distributed.
|
||||
|
||||
This library used to be available under the GPL - this was changed
|
||||
with version 1.1.7 with the rationale that there are now many free
|
||||
crypto libraries available and many of them come with capabilities
|
||||
similar to Libcrypt. We decided that to foster the use of
|
||||
cryptography in Free Software an LGPLed library would make more
|
||||
sense because it avoids problems due to license incompatibilities
|
||||
between some Free Software licenses and the GPL.
|
||||
|
||||
Please note that in many cases it is better for a library to be
|
||||
licensed under the GPL, so that it provides an advantage for free
|
||||
software projects. The Lesser GPL is so named because it does
|
||||
less to protect the freedom of the users of the code that it
|
||||
covers. See http://www.gnu.org/philosophy/why-not-lgpl.html for
|
||||
more explanation.
|
||||
|
||||
|
||||
Contact
|
||||
-------
|
||||
|
||||
See the file AUTHORS.
|
||||
|
||||
Commercial grade support for Libgcrypt is available; please see
|
||||
http://www.gnupg.org/service.html .
|
||||
|
||||
Commercial grade support for Libgcrypt is available; for a listing
|
||||
of offers see http://www.gnupg.org/service.html . The driving
|
||||
force behind the development of Libgcrypt is the company of its
|
||||
principal author, Werner Koch. Maintenance and improvement of
|
||||
Libgcrypt takes up a lot resources. To allow him to continue his
|
||||
work, he asks to either purchase a support contract, engage them
|
||||
for custom enhancements, or to donate money. See http://g10code.com .
|
||||
|
||||
|
||||
This file is Free Software; as a special exception the authors gives
|
||||
unlimited permission to copy and/or distribute it, with or without
|
||||
modifications, as long as this notice is preserved. For conditions
|
||||
of the whole package, please see the file COPYING. This file is
|
||||
distributed in the hope that it will be useful, but WITHOUT ANY
|
||||
WARRANTY, to the extent permitted by law; without even the implied
|
||||
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
@@ -1,49 +0,0 @@
|
||||
If you are building from GIT, run the script
|
||||
|
||||
./autogen.sh
|
||||
|
||||
first, to make sure that you have all the necessary maintainer tools
|
||||
are installed and to build the actual configuration files. If you
|
||||
have just checked out from GIT, you should add the option "--force" to
|
||||
autogen.sh so that meta data is noticed by autom4te.cache. Then run
|
||||
|
||||
./configure --enable-maintainer-mode
|
||||
|
||||
followed by the usual make.
|
||||
|
||||
If autogen.sh complains about insufficient versions of the required
|
||||
tools, or the tools are not installed, you may use environment
|
||||
variables to override the default tool names:
|
||||
|
||||
AUTOMAKE_SUFFIX is used as a suffix for all tools from the automake
|
||||
package. For example
|
||||
AUTOMAKE_SUFFIX="-1.7" ./autogen.sh
|
||||
uses "automake-1.7" and "aclocal-1.7.
|
||||
AUTOMAKE_PREFIX is used as a prefix for all tools from the automake
|
||||
page and may be combined with AUTOMAKE_SUFFIX. e.g.:
|
||||
AUTOMAKE_PREFIX=/usr/foo/bin ./autogen.sh
|
||||
uses "automake" and "aclocal" in the /usr/foo/bin
|
||||
directory.
|
||||
AUTOCONF_SUFFIX is used as a suffix for all tools from the automake
|
||||
package
|
||||
AUTOCONF_PREFIX is used as a prefix for all tools from the automake
|
||||
package
|
||||
GETTEXT_SUFFIX is used as a suffix for all tools from the gettext
|
||||
package
|
||||
GETTEXT_PREFIX is used as a prefix for all tools from the gettext
|
||||
package
|
||||
|
||||
It is also possible to use the variable name AUTOMAKE, AUTOCONF,
|
||||
ACLOCAL, AUTOHEADER, GETTEXT and MSGMERGE to directly specify the name
|
||||
of the programs to run. It is however better to use the suffix and
|
||||
prefix forms as described above because that does not require
|
||||
knowledge about the actual tools used by autogen.sh.
|
||||
|
||||
|
||||
Please don't use autopoint, libtoolize or autoreconf unless you are
|
||||
the current maintainer and want to update the standard configuration
|
||||
files. All those files should be in GIT and only updated manually
|
||||
if the maintainer decides that newer versions are required. The
|
||||
maintainer should also make sure that the required version of automake
|
||||
et al. are properly indicated at the top of configure.ac and take care
|
||||
to copy the files and not merely use symlinks.
|
||||
@@ -1,168 +0,0 @@
|
||||
Libgcrypt is based on the GnuPG code. Here is a list of people, who
|
||||
helped in GnuPG and Libgcrypt development. Please help us to keep it
|
||||
complete and free of errors.
|
||||
|
||||
Albert Chin china at thewrittenword com
|
||||
Allan Clark allanc@sco.com
|
||||
Anand Kumria wildfire@progsoc.uts.edu.au
|
||||
Andreas Metzler ametzler at downhill.at.eu.org
|
||||
Ariel T Glenn ariel@columbia.edu
|
||||
Aurelien Jarno aurel32 at debian.org
|
||||
Ben Hutchings ben decadent org uk
|
||||
Bodo Moeller Bodo_Moeller@public.uni-hamburg.de
|
||||
Brenno de Winter brenno@dewinter.com
|
||||
Brian Moore bem@cmc.net
|
||||
Brian Warner warner@lothar.com
|
||||
Brieuc Jeunhomme bbp@via.ecp.fr
|
||||
Bryan Fullerton bryanf@samurai.com
|
||||
Caskey L. Dickson caskey@technocage.com
|
||||
Cees van de Griend cees-list@griend.xs4all.nl
|
||||
Charles Levert charles@comm.polymtl.ca
|
||||
Christian Biere christianbiere@gmx.de
|
||||
Christian Grothoff christian at grothoff org
|
||||
Christian von Roques roques@pond.sub.org
|
||||
Christopher Oliver oliver@fritz.traverse.net
|
||||
Christian Recktenwald chris@citecs.de
|
||||
Daiki Ueno ueno at unixuser org
|
||||
Dan Fandrich dan at coneharvesters com
|
||||
Daniel Eisenbud eisenbud@cs.swarthmore.edu
|
||||
Daniel Koening dan@mail.isis.de
|
||||
David Ellement ellement@sdd.hp.com
|
||||
Detlef Lannert lannert@lannert.rz.uni-duesseldorf.de
|
||||
Dirk Lattermann dlatt@t-online.de
|
||||
Dirk Stoecker gcrypt@dstoecker.de
|
||||
Ed Boraas ecxjo@esperanto.org
|
||||
Elie De Brauwer elie@de-brauwer.be
|
||||
Enzo Michelangeli em@MailAndNews.com
|
||||
Ernst Molitor ernst.molitor@uni-bonn.de
|
||||
Fabian Keil fk at fabiankeil de
|
||||
Fabio Coatti cova@felix.unife.it
|
||||
Felix von Leitner leitner@amdiv.de
|
||||
Frank Heckenbach heckenb@mi.uni-erlangen.de
|
||||
Frank Stajano frank.stajano@cl.cam.ac.uk
|
||||
Gabriele Monti psicus78 gmail com
|
||||
Gaël Quéri gqueri@mail.dotcom.fr
|
||||
Gregor Riepl seto-kun@freesurf.ch
|
||||
Gerlinde Klaes gk@u64.de
|
||||
Greg Louis glouis@dynamicro.on.ca
|
||||
Greg Troxel gdt@ir.bbn.com
|
||||
Gregory Steuck steuck@iname.com
|
||||
Geoff Keating geoffk@ozemail.com.au
|
||||
Harald Denker harry@hal.westfalen.de
|
||||
Hendrik Buschkamp buschkamp@rheumanet.org
|
||||
Holger Schurig holger@d.om.org
|
||||
Hugh Daniel hugh@toad.com
|
||||
Ian McKellar imckellar@harvestroad.com.au
|
||||
Ian Peters itp@ximian.com
|
||||
Janusz A. Urbanowicz alex@bofh.torun.pl
|
||||
James Troup james@nocrew.org
|
||||
Jean-loup Gailly gzip@prep.ai.mit.edu
|
||||
Jeff Johnson jbj@redhat.com
|
||||
Jens Bachem bachem@rrz.uni-koeln.de
|
||||
J Horacio MG homega@ciberia.es
|
||||
Joachim Backes backes@rhrk.uni-kl.de
|
||||
Jordi Mallach jordi@sindominio.net
|
||||
John A. Martin jam@jamux.com
|
||||
Johnny Teveßen j.tevessen@gmx.de
|
||||
Jörg Schilling schilling@fokus.gmd.de
|
||||
Jun Kuriyama kuriyama@sky.rim.or.jp
|
||||
Karl Fogel kfogel@guanabana.onshore.com
|
||||
Karsten Thygesen karthy@kom.auc.dk
|
||||
Katsuhiro Kondou kondou@nec.co.jp
|
||||
Kazu Yamamoto kazu@iijlab.net
|
||||
Lars Kellogg-Stedman lars@bu.edu
|
||||
Lee Fisher blibbet at gmail dot com
|
||||
Marco d'Itri md@linux.it
|
||||
Mark Adler madler@alumni.caltech.edu
|
||||
Mark Elbrecht snowball3@bigfoot.com
|
||||
Markus Friedl Markus.Friedl@informatik.uni-erlangen.de
|
||||
Matthias Urlichs smurf@smurf.noris.de
|
||||
Martin Kahlert martin.kahlert@provi.de
|
||||
Martin Hamilton
|
||||
Martin Schulte schulte@thp.uni-koeln.de
|
||||
Matthew Skala mskala@ansuz.sooke.bc.ca
|
||||
Max Kellermann max@duempel.org
|
||||
Max Valianskiy maxcom@maxcom.ml.org
|
||||
Michael Fischer v. Mollard mfvm@gmx.de
|
||||
Michael Roth mroth@nessie.de
|
||||
Michael Sobolev mss@despair.transas.com
|
||||
Michele Baldessari michele@pupazzo.org
|
||||
Modestas Vainius geromanas@mailas.com
|
||||
Neil Dunbar neil.dunbar at pobox.com
|
||||
Neil Spring nspring@cs.washington.edu
|
||||
Newton Hammet newton@hammet.net
|
||||
Nicolas Graner Nicolas.Graner@cri.u-psud.fr
|
||||
NIIBE Yutaka gniibe@chroot.org
|
||||
Niklas Hernaeus
|
||||
Nikolay Sturm sturm@sec.informatik.tu-darmstadt.de
|
||||
Nikos Mavroyanopoulos nmav@hellug.gr
|
||||
Nimrod Zimerman zimerman@forfree.at
|
||||
N J Doye nic@niss.ac.uk
|
||||
Oliver Haakert haakert@hsp.de
|
||||
Oskari Jääskeläinen f33003a@cc.hut.fi
|
||||
Paul D. Smith psmith@baynetworks.com
|
||||
Philippe Laliberte arsphl@oeil.qc.ca
|
||||
Peter Gutmann pgut001@cs.auckland.ac.nz
|
||||
QingLong qinglong@bolizm.ihep.su
|
||||
Rafael Ávila de Espíndola rafael.espindola@gmail.com
|
||||
Rafaël Carré funman@videolan.org
|
||||
Ralf Fassel ralf@akutech.de
|
||||
Ralf Hildebrandt Ralf.Hildebrandt@innominate.com
|
||||
Ralf Schneider ralf@tapfere-schneiderleins.de
|
||||
Ralph Gillen gillen@theochem.uni-duesseldorf.de
|
||||
Rami Lehti Rami.Lehti@finland.sun.com
|
||||
Randolph Chung tausq@debian.org
|
||||
Randy mcclellr@oit.edu
|
||||
Rat ratinox@peorth.gweep.net
|
||||
Reinhard Wobst R.Wobst@ifw-dresden.de
|
||||
Rémi Guyomarch rguyom@mail.dotcom.fr
|
||||
Reuben Sumner rasumner@wisdom.weizmann.ac.il
|
||||
Richard Outerbridge outer@interlog.com
|
||||
Roddy Strachan roddy@satlink.com.au
|
||||
Roland Rosenfeld roland@spinnaker.rhein.de
|
||||
Ross Golder rossigee@bigfoot.com
|
||||
Serge Munhoven munhoven@mema.ucl.ac.be
|
||||
Sergi Blanch i Torné sergi at calcurco cat
|
||||
Simon Josefsson jas@extundo.com
|
||||
SL Baur steve@xemacs.org
|
||||
Stephan Austermuehle au@hcsd.de
|
||||
Stephan Müller smueller at atsec com
|
||||
Stephane Corthesy stephane@sente.ch
|
||||
Stefan Karrmann S.Karrmann@gmx.net
|
||||
Stefan Keller dres@cs.tu-berlin.de
|
||||
Stefan Krüger stadtkind2 at gmx de
|
||||
Steffen Ullrich ccrlphr@xensei.com
|
||||
Steffen Zahn zahn@berlin.snafu.de
|
||||
Steven Bakker steven@icoe.att.com
|
||||
Susanne Schultz schultz@hsp.de
|
||||
Sven Bjorn
|
||||
Szakats Istvan szaki.ms@gmail.com
|
||||
Thiago Jung Bauermann jungmann@cwb.matrix.com.br
|
||||
Thomas Roessler roessler@guug.de
|
||||
Tom Holroyd tomh@po.crl.go.jp
|
||||
Tom Spindler dogcow@home.merit.edu
|
||||
Tom Zerucha tzeruch@ceddec.com
|
||||
Tomas Fasth tomas.fasth@twinspot.net
|
||||
Tommi Komulainen Tommi.Komulainen@iki.fi
|
||||
Thomas Mikkelsen tbm@image.dk
|
||||
Ulf Möller 3umoelle@informatik.uni-hamburg.de
|
||||
Umberto Salsi salsi@icosaedro.it
|
||||
Uoti Urpala
|
||||
Urko Lusa ulusa@euskalnet.net
|
||||
Victor Stinner haypo@inl.fr
|
||||
Walter Koch koch@u32.de
|
||||
Werner Koch wk@gnupg.org
|
||||
Wim Vandeputte wim@kd85.com
|
||||
nbecker@hns.com
|
||||
|
||||
|
||||
Copyright 1998, 1999, 2000, 2001, 2002, 2003,
|
||||
2009, 2011 Free Software Foundation, Inc.
|
||||
|
||||
This file is free software; as a special exception the author gives
|
||||
unlimited permission to copy and/or distribute it, with or without
|
||||
modifications, as long as this notice is preserved.
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
@@ -1,59 +0,0 @@
|
||||
# What's left to do -*- org -*-
|
||||
|
||||
* Next API break:
|
||||
** gcry_ac_io_t
|
||||
Remove use of anonymous union.
|
||||
** gcry_ac
|
||||
Consider to remove it.
|
||||
|
||||
* udiv-qrnbd.o should get build as *.lo [HPUX]
|
||||
|
||||
* Allow operation using RSA keys consisting of the OpenSSL keys.
|
||||
This requires the introduction of a parameter names (say) U which
|
||||
is calculated according to OpenSSL/PKCS#1 rules.
|
||||
|
||||
* linker script test
|
||||
Write an autoconf test to check whether the linker supports a
|
||||
version script.
|
||||
|
||||
* Add attributes to the MPI functions.
|
||||
|
||||
* cipher/pubkey.c and pubkey implementaions.
|
||||
Don't rely on the secure memory based wiping function but add an
|
||||
extra wiping.
|
||||
|
||||
* Use builtin bit functions of gcc 3.4
|
||||
|
||||
* Consider using a daemon to maintain the random pool
|
||||
[Partly done] The down side of this is that we can't assume that the
|
||||
random has has always been stored in "secure memory". And we rely
|
||||
on that sniffing of Unix domain sockets is not possible. We can
|
||||
implement this simply by detecting a special prefixed random seed
|
||||
name and divert in this case to the daemon. There are several
|
||||
benefits with such an approach: We keep the state of the RNG over
|
||||
invocations of libgcrypt based applications, don't need time
|
||||
consuming initialization of the pool and in case the entropy
|
||||
collectros need to run that bunch of Unix utilities we don't waste
|
||||
their precious results.
|
||||
|
||||
* gcryptrnd.c
|
||||
Requires a test for pth [done] as well as some other tests.
|
||||
|
||||
* secmem.c
|
||||
Check whether the memory block is valid before releasing it and
|
||||
print a diagnosic, like glibc does.
|
||||
|
||||
* threads
|
||||
** We need to document fork problems
|
||||
In particular that reinitialization is required in random.c
|
||||
However, there is no code yet to do it.
|
||||
|
||||
* Tests
|
||||
We need a lot more tests. Lets keep an ever growing list here.
|
||||
** Write tests for the progress function
|
||||
** mpitests does no real checks yet.
|
||||
** pthreads
|
||||
To catch simple errors like the one fixed on 2007-03-16.
|
||||
** C++ tests
|
||||
We have some code to allow using libgcrypt from C++, so we also
|
||||
should have a test case.
|
||||
@@ -1 +0,0 @@
|
||||
1.6.3
|
||||
@@ -1,393 +0,0 @@
|
||||
dnl macros to configure Libgcrypt
|
||||
dnl Copyright (C) 1998, 1999, 2000, 2001, 2002,
|
||||
dnl 2003 Free Software Foundation, Inc.
|
||||
dnl Copyright (C) 2013 g10 Code GmbH
|
||||
dnl
|
||||
dnl This file is part of Libgcrypt.
|
||||
dnl
|
||||
dnl Libgcrypt is free software; you can redistribute it and/or modify
|
||||
dnl it under the terms of the GNU Lesser General Public License as
|
||||
dnl published by the Free Software Foundation; either version 2.1 of
|
||||
dnl the License, or (at your option) any later version.
|
||||
dnl
|
||||
dnl Libgcrypt is distributed in the hope that it will be useful,
|
||||
dnl but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
dnl GNU Lesser General Public License for more details.
|
||||
dnl
|
||||
dnl You should have received a copy of the GNU Lesser General Public
|
||||
dnl License along with this program; if not, write to the Free Software
|
||||
dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
|
||||
dnl GCRY_MSG_SHOW(PREFIX,STRING)
|
||||
dnl Print a message with a prefix.
|
||||
dnl
|
||||
define([GCRY_MSG_SHOW],
|
||||
[
|
||||
echo " $1 $2" 1>&AS_MESSAGE_FD([])
|
||||
])
|
||||
|
||||
dnl GCRY_MSG_WRAP(PREFIX, ALGOLIST)
|
||||
dnl Print a nicely formatted list of algorithms
|
||||
dnl with an approriate line wrap.
|
||||
dnl
|
||||
define([GCRY_MSG_WRAP],
|
||||
[
|
||||
tmp=" $1"
|
||||
tmpi="abc"
|
||||
if test "${#tmpi}" -ne 3 >/dev/null 2>&1 ; then
|
||||
dnl Without a POSIX shell, we don't botter to wrap it
|
||||
echo "$tmp $2" 1>&AS_MESSAGE_FD([])
|
||||
else
|
||||
tmpi=`echo "$tmp"| sed 's/./ /g'`
|
||||
echo $2 EOF | tr ' ' '\n' | \
|
||||
while read word; do
|
||||
if test "${#tmp}" -gt 70 ; then
|
||||
echo "$tmp" 1>&AS_MESSAGE_FD([])
|
||||
tmp="$tmpi"
|
||||
fi
|
||||
if test "$word" = "EOF" ; then
|
||||
echo "$tmp" 1>&AS_MESSAGE_FD([])
|
||||
else
|
||||
tmp="$tmp $word"
|
||||
fi
|
||||
done
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl GNUPG_CHECK_TYPEDEF(TYPE, HAVE_NAME)
|
||||
dnl Check whether a typedef exists and create a #define $2 if it exists
|
||||
dnl
|
||||
AC_DEFUN([GNUPG_CHECK_TYPEDEF],
|
||||
[ AC_MSG_CHECKING(for $1 typedef)
|
||||
AC_CACHE_VAL(gnupg_cv_typedef_$1,
|
||||
[AC_TRY_COMPILE([#define _GNU_SOURCE 1
|
||||
#include <stdlib.h>
|
||||
#include <sys/types.h>], [
|
||||
#undef $1
|
||||
int a = sizeof($1);
|
||||
], gnupg_cv_typedef_$1=yes, gnupg_cv_typedef_$1=no )])
|
||||
AC_MSG_RESULT($gnupg_cv_typedef_$1)
|
||||
if test "$gnupg_cv_typedef_$1" = yes; then
|
||||
AC_DEFINE($2,1,[Defined if a `]$1[' is typedef'd])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
dnl GNUPG_CHECK_GNUMAKE
|
||||
dnl
|
||||
AC_DEFUN([GNUPG_CHECK_GNUMAKE],
|
||||
[
|
||||
if ${MAKE-make} --version 2>/dev/null | grep '^GNU ' >/dev/null 2>&1; then
|
||||
:
|
||||
else
|
||||
AC_MSG_WARN([[
|
||||
***
|
||||
*** It seems that you are not using GNU make. Some make tools have serious
|
||||
*** flaws and you may not be able to build this software at all. Before you
|
||||
*** complain, please try GNU make: GNU make is easy to build and available
|
||||
*** at all GNU archives. It is always available from ftp.gnu.org:/gnu/make.
|
||||
***]])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
#
|
||||
# GNUPG_SYS_SYMBOL_UNDERSCORE
|
||||
# Does the compiler prefix global symbols with an underscore?
|
||||
#
|
||||
# Taken from GnuPG 1.2 and modified to use the libtool macros.
|
||||
AC_DEFUN([GNUPG_SYS_SYMBOL_UNDERSCORE],
|
||||
[tmp_do_check="no"
|
||||
case "${host}" in
|
||||
*-mingw32*)
|
||||
ac_cv_sys_symbol_underscore=yes
|
||||
;;
|
||||
i386-emx-os2 | i[3456]86-pc-os2*emx | i386-pc-msdosdjgpp)
|
||||
ac_cv_sys_symbol_underscore=yes
|
||||
;;
|
||||
*)
|
||||
if test "$cross_compiling" = yes; then
|
||||
if test "x$ac_cv_sys_symbol_underscore" = x ; then
|
||||
ac_cv_sys_symbol_underscore=yes
|
||||
fi
|
||||
else
|
||||
tmp_do_check="yes"
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
if test "$tmp_do_check" = "yes"; then
|
||||
AC_REQUIRE([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])
|
||||
AC_MSG_CHECKING([for _ prefix in compiled symbols])
|
||||
AC_CACHE_VAL(ac_cv_sys_symbol_underscore,
|
||||
[ac_cv_sys_symbol_underscore=no
|
||||
cat > conftest.$ac_ext <<EOF
|
||||
void nm_test_func(){}
|
||||
int main(){nm_test_func;return 0;}
|
||||
EOF
|
||||
if AC_TRY_EVAL(ac_compile); then
|
||||
# Now try to grab the symbols.
|
||||
ac_nlist=conftest.nm
|
||||
if AC_TRY_EVAL(NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \| cut -d \' \' -f 2 \> $ac_nlist) && test -s "$ac_nlist"; then
|
||||
# See whether the symbols have a leading underscore.
|
||||
if egrep '^_nm_test_func' "$ac_nlist" >/dev/null; then
|
||||
ac_cv_sys_symbol_underscore=yes
|
||||
else
|
||||
if egrep '^nm_test_func ' "$ac_nlist" >/dev/null; then
|
||||
:
|
||||
else
|
||||
echo "configure: cannot find nm_test_func in $ac_nlist" >&AC_FD_CC
|
||||
fi
|
||||
fi
|
||||
else
|
||||
echo "configure: cannot run $lt_cv_sys_global_symbol_pipe" >&AC_FD_CC
|
||||
fi
|
||||
else
|
||||
echo "configure: failed program was:" >&AC_FD_CC
|
||||
cat conftest.c >&AC_FD_CC
|
||||
fi
|
||||
rm -rf conftest*
|
||||
])
|
||||
else
|
||||
AC_MSG_CHECKING([for _ prefix in compiled symbols])
|
||||
fi
|
||||
AC_MSG_RESULT($ac_cv_sys_symbol_underscore)
|
||||
if test x$ac_cv_sys_symbol_underscore = xyes; then
|
||||
AC_DEFINE(WITH_SYMBOL_UNDERSCORE,1,
|
||||
[Defined if compiled symbols have a leading underscore])
|
||||
fi
|
||||
])
|
||||
|
||||
|
||||
######################################################################
|
||||
# Check whether mlock is broken (hpux 10.20 raises a SIGBUS if mlock
|
||||
# is not called from uid 0 (not tested whether uid 0 works)
|
||||
# For DECs Tru64 we have also to check whether mlock is in librt
|
||||
# mlock is there a macro using memlk()
|
||||
######################################################################
|
||||
dnl GNUPG_CHECK_MLOCK
|
||||
dnl
|
||||
define(GNUPG_CHECK_MLOCK,
|
||||
[ AC_CHECK_FUNCS(mlock)
|
||||
if test "$ac_cv_func_mlock" = "no"; then
|
||||
AC_CHECK_HEADERS(sys/mman.h)
|
||||
if test "$ac_cv_header_sys_mman_h" = "yes"; then
|
||||
# Add librt to LIBS:
|
||||
AC_CHECK_LIB(rt, memlk)
|
||||
AC_CACHE_CHECK([whether mlock is in sys/mman.h],
|
||||
gnupg_cv_mlock_is_in_sys_mman,
|
||||
[AC_TRY_LINK([
|
||||
#include <assert.h>
|
||||
#ifdef HAVE_SYS_MMAN_H
|
||||
#include <sys/mman.h>
|
||||
#endif
|
||||
], [
|
||||
int i;
|
||||
|
||||
/* glibc defines this for functions which it implements
|
||||
* to always fail with ENOSYS. Some functions are actually
|
||||
* named something starting with __ and the normal name
|
||||
* is an alias. */
|
||||
#if defined (__stub_mlock) || defined (__stub___mlock)
|
||||
choke me
|
||||
#else
|
||||
mlock(&i, 4);
|
||||
#endif
|
||||
; return 0;
|
||||
],
|
||||
gnupg_cv_mlock_is_in_sys_mman=yes,
|
||||
gnupg_cv_mlock_is_in_sys_mman=no)])
|
||||
if test "$gnupg_cv_mlock_is_in_sys_mman" = "yes"; then
|
||||
AC_DEFINE(HAVE_MLOCK,1,
|
||||
[Defined if the system supports an mlock() call])
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test "$ac_cv_func_mlock" = "yes"; then
|
||||
AC_CHECK_FUNCS(sysconf getpagesize)
|
||||
AC_MSG_CHECKING(whether mlock is broken)
|
||||
AC_CACHE_VAL(gnupg_cv_have_broken_mlock,
|
||||
AC_TRY_RUN([
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#include <errno.h>
|
||||
#include <sys/mman.h>
|
||||
#include <sys/types.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
int main()
|
||||
{
|
||||
char *pool;
|
||||
int err;
|
||||
long int pgsize;
|
||||
|
||||
#if defined(HAVE_SYSCONF) && defined(_SC_PAGESIZE)
|
||||
pgsize = sysconf (_SC_PAGESIZE);
|
||||
#elif defined (HAVE_GETPAGESIZE)
|
||||
pgsize = getpagesize();
|
||||
#else
|
||||
pgsize = -1;
|
||||
#endif
|
||||
|
||||
if (pgsize == -1)
|
||||
pgsize = 4096;
|
||||
|
||||
pool = malloc( 4096 + pgsize );
|
||||
if( !pool )
|
||||
return 2;
|
||||
pool += (pgsize - ((long int)pool % pgsize));
|
||||
|
||||
err = mlock( pool, 4096 );
|
||||
if( !err || errno == EPERM )
|
||||
return 0; /* okay */
|
||||
|
||||
return 1; /* hmmm */
|
||||
}
|
||||
|
||||
],
|
||||
gnupg_cv_have_broken_mlock="no",
|
||||
gnupg_cv_have_broken_mlock="yes",
|
||||
gnupg_cv_have_broken_mlock="assume-no"
|
||||
)
|
||||
)
|
||||
if test "$gnupg_cv_have_broken_mlock" = "yes"; then
|
||||
AC_DEFINE(HAVE_BROKEN_MLOCK,1,
|
||||
[Defined if the mlock() call does not work])
|
||||
AC_MSG_RESULT(yes)
|
||||
else
|
||||
if test "$gnupg_cv_have_broken_mlock" = "no"; then
|
||||
AC_MSG_RESULT(no)
|
||||
else
|
||||
AC_MSG_RESULT(assuming no)
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
])
|
||||
|
||||
# GNUPG_SYS_LIBTOOL_CYGWIN32 - find tools needed on cygwin32
|
||||
AC_DEFUN([GNUPG_SYS_LIBTOOL_CYGWIN32],
|
||||
[AC_CHECK_TOOL(DLLTOOL, dlltool, false)
|
||||
AC_CHECK_TOOL(AS, as, false)
|
||||
])
|
||||
|
||||
dnl LIST_MEMBER()
|
||||
dnl Check wether an element ist contained in a list. Set `found' to
|
||||
dnl `1' if the element is found in the list, to `0' otherwise.
|
||||
AC_DEFUN([LIST_MEMBER],
|
||||
[
|
||||
name=$1
|
||||
list=$2
|
||||
found=0
|
||||
|
||||
for n in $list; do
|
||||
if test "x$name" = "x$n"; then
|
||||
found=1
|
||||
fi
|
||||
done
|
||||
])
|
||||
|
||||
|
||||
dnl Check for socklen_t: historically on BSD it is an int, and in
|
||||
dnl POSIX 1g it is a type of its own, but some platforms use different
|
||||
dnl types for the argument to getsockopt, getpeername, etc. So we
|
||||
dnl have to test to find something that will work.
|
||||
AC_DEFUN([TYPE_SOCKLEN_T],
|
||||
[
|
||||
AC_CHECK_TYPE([socklen_t], ,[
|
||||
AC_MSG_CHECKING([for socklen_t equivalent])
|
||||
AC_CACHE_VAL([socklen_t_equiv],
|
||||
[
|
||||
# Systems have either "struct sockaddr *" or
|
||||
# "void *" as the second argument to getpeername
|
||||
socklen_t_equiv=
|
||||
for arg2 in "struct sockaddr" void; do
|
||||
for t in int size_t unsigned long "unsigned long"; do
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/types.h>
|
||||
#include <sys/socket.h>
|
||||
|
||||
int getpeername (int, $arg2 *, $t *);
|
||||
],[
|
||||
$t len;
|
||||
getpeername(0,0,&len);
|
||||
],[
|
||||
socklen_t_equiv="$t"
|
||||
break
|
||||
])
|
||||
done
|
||||
done
|
||||
|
||||
if test "x$socklen_t_equiv" = x; then
|
||||
AC_MSG_ERROR([Cannot find a type to use in place of socklen_t])
|
||||
fi
|
||||
])
|
||||
AC_MSG_RESULT($socklen_t_equiv)
|
||||
AC_DEFINE_UNQUOTED(socklen_t, $socklen_t_equiv,
|
||||
[type to use in place of socklen_t if not defined])],
|
||||
[#include <sys/types.h>
|
||||
#include <sys/socket.h>])
|
||||
])
|
||||
|
||||
|
||||
# GNUPG_PTH_VERSION_CHECK(REQUIRED)
|
||||
#
|
||||
# If the version is sufficient, HAVE_PTH will be set to yes.
|
||||
#
|
||||
# Taken form the m4 macros which come with Pth
|
||||
AC_DEFUN([GNUPG_PTH_VERSION_CHECK],
|
||||
[
|
||||
_pth_version=`$PTH_CONFIG --version | awk 'NR==1 {print [$]3}'`
|
||||
_req_version="ifelse([$1],,1.2.0,$1)"
|
||||
|
||||
AC_MSG_CHECKING(for PTH - version >= $_req_version)
|
||||
for _var in _pth_version _req_version; do
|
||||
eval "_val=\"\$${_var}\""
|
||||
_major=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\1/'`
|
||||
_minor=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\2/'`
|
||||
_rtype=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\3/'`
|
||||
_micro=`echo $_val | sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\([[ab.]]\)\([[0-9]]*\)/\4/'`
|
||||
case $_rtype in
|
||||
"a" ) _rtype=0 ;;
|
||||
"b" ) _rtype=1 ;;
|
||||
"." ) _rtype=2 ;;
|
||||
esac
|
||||
_hex=`echo dummy | awk '{ printf("%d%02d%1d%02d", major, minor, rtype, micro); }' \
|
||||
"major=$_major" "minor=$_minor" "rtype=$_rtype" "micro=$_micro"`
|
||||
eval "${_var}_hex=\"\$_hex\""
|
||||
done
|
||||
have_pth=no
|
||||
if test ".$_pth_version_hex" != .; then
|
||||
if test ".$_req_version_hex" != .; then
|
||||
if test $_pth_version_hex -ge $_req_version_hex; then
|
||||
have_pth=yes
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
if test $have_pth = yes; then
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_MSG_CHECKING([whether PTH installation is sane])
|
||||
AC_CACHE_VAL(gnupg_cv_pth_is_sane,[
|
||||
_gnupg_pth_save_cflags=$CFLAGS
|
||||
_gnupg_pth_save_ldflags=$LDFLAGS
|
||||
_gnupg_pth_save_libs=$LIBS
|
||||
CFLAGS="$CFLAGS `$PTH_CONFIG --cflags`"
|
||||
LDFLAGS="$LDFLAGS `$PTH_CONFIG --ldflags`"
|
||||
LIBS="$LIBS `$PTH_CONFIG --libs`"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pth.h>
|
||||
],
|
||||
[[ pth_init ();]])],
|
||||
gnupg_cv_pth_is_sane=yes,
|
||||
gnupg_cv_pth_is_sane=no)
|
||||
CFLAGS=$_gnupg_pth_save_cflags
|
||||
LDFLAGS=$_gnupg_pth_save_ldflags
|
||||
LIBS=$_gnupg_pth_save_libs
|
||||
])
|
||||
if test $gnupg_cv_pth_is_sane != yes; then
|
||||
have_pth=no
|
||||
fi
|
||||
AC_MSG_RESULT($gnupg_cv_pth_is_sane)
|
||||
else
|
||||
AC_MSG_RESULT(no)
|
||||
fi
|
||||
])
|
||||
-1218
File diff suppressed because it is too large
Load Diff
@@ -1,17 +0,0 @@
|
||||
# autogen.sh configuration for Libgcrypt -*- sh -*-
|
||||
|
||||
case "$myhost" in
|
||||
w32)
|
||||
configure_opts="
|
||||
--with-gpg-error-prefix=@SYSROOT@
|
||||
"
|
||||
;;
|
||||
|
||||
amd64)
|
||||
configure_opts="
|
||||
--with-gpg-error-prefix=@SYSROOT@
|
||||
"
|
||||
;;
|
||||
esac
|
||||
|
||||
final_info="./configure --enable-maintainer-mode && make"
|
||||
@@ -1,393 +0,0 @@
|
||||
#! /bin/sh
|
||||
# autogen.sh
|
||||
# Copyright (C) 2003, 2014 g10 Code GmbH
|
||||
#
|
||||
# This file is free software; as a special exception the author gives
|
||||
# unlimited permission to copy and/or distribute it, with or without
|
||||
# modifications, as long as this notice is preserved.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful, but
|
||||
# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
#
|
||||
# This is a generic script to create the configure script and handle cross
|
||||
# build environments. It requires the presence of a autogen.rc file to
|
||||
# configure it for the respective package. It is maintained as part of
|
||||
# GnuPG and source copied by other packages.
|
||||
#
|
||||
# Version: 2014-01-10
|
||||
|
||||
configure_ac="configure.ac"
|
||||
|
||||
cvtver () {
|
||||
awk 'NR==1 {split($NF,A,".");X=1000000*A[1]+1000*A[2]+A[3];print X;exit 0}'
|
||||
}
|
||||
|
||||
check_version () {
|
||||
if [ $(( `("$1" --version || echo "0") | cvtver` >= $2 )) = 1 ]; then
|
||||
return 0
|
||||
fi
|
||||
echo "**Error**: "\`$1\'" not installed or too old." >&2
|
||||
echo ' Version '$3' or newer is required.' >&2
|
||||
[ -n "$4" ] && echo ' Note that this is part of '\`$4\''.' >&2
|
||||
DIE="yes"
|
||||
return 1
|
||||
}
|
||||
|
||||
fatal () {
|
||||
echo "autogen.sh:" "$*" >&2
|
||||
DIE=yes
|
||||
}
|
||||
|
||||
info () {
|
||||
if [ -z "${SILENT}" ]; then
|
||||
echo "autogen.sh:" "$*"
|
||||
fi
|
||||
}
|
||||
|
||||
die_p () {
|
||||
if [ "$DIE" = "yes" ]; then
|
||||
echo "autogen.sh: Stop." >&2
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
replace_sysroot () {
|
||||
configure_opts=$(echo $configure_opts | sed "s#@SYSROOT@#${w32root}#g")
|
||||
extraoptions=$(echo $extraoptions | sed "s#@SYSROOT@#${w32root}#g")
|
||||
}
|
||||
|
||||
# Allow to override the default tool names
|
||||
AUTOCONF=${AUTOCONF_PREFIX}${AUTOCONF:-autoconf}${AUTOCONF_SUFFIX}
|
||||
AUTOHEADER=${AUTOCONF_PREFIX}${AUTOHEADER:-autoheader}${AUTOCONF_SUFFIX}
|
||||
|
||||
AUTOMAKE=${AUTOMAKE_PREFIX}${AUTOMAKE:-automake}${AUTOMAKE_SUFFIX}
|
||||
ACLOCAL=${AUTOMAKE_PREFIX}${ACLOCAL:-aclocal}${AUTOMAKE_SUFFIX}
|
||||
|
||||
GETTEXT=${GETTEXT_PREFIX}${GETTEXT:-gettext}${GETTEXT_SUFFIX}
|
||||
MSGMERGE=${GETTEXT_PREFIX}${MSGMERGE:-msgmerge}${GETTEXT_SUFFIX}
|
||||
|
||||
DIE=no
|
||||
FORCE=
|
||||
SILENT=
|
||||
tmp=$(dirname "$0")
|
||||
tsdir=$(cd "${tmp}"; pwd)
|
||||
|
||||
if [ -n "${AUTOGEN_SH_SILENT}" ]; then
|
||||
SILENT=" --silent"
|
||||
fi
|
||||
if test x"$1" = x"--help"; then
|
||||
echo "usage: ./autogen.sh [--silent] [--force] [--build-TYPE] [ARGS]"
|
||||
exit 0
|
||||
fi
|
||||
if test x"$1" = x"--silent"; then
|
||||
SILENT=" --silent"
|
||||
shift
|
||||
fi
|
||||
if test x"$1" = x"--force"; then
|
||||
FORCE=" --force"
|
||||
shift
|
||||
fi
|
||||
|
||||
|
||||
# Reject unsafe characters in $HOME, $tsdir and cwd. We consider spaces
|
||||
# as unsafe because it is too easy to get scripts wrong in this regard.
|
||||
am_lf='
|
||||
'
|
||||
case `pwd` in
|
||||
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
|
||||
fatal "unsafe working directory name" ;;
|
||||
esac
|
||||
case $tsdir in
|
||||
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
|
||||
fatal "unsafe source directory: \`$tsdir'" ;;
|
||||
esac
|
||||
case $HOME in
|
||||
*[\;\\\"\#\$\&\'\`$am_lf\ \ ]*)
|
||||
fatal "unsafe home directory: \`$HOME'" ;;
|
||||
esac
|
||||
die_p
|
||||
|
||||
|
||||
# List of variables sourced from autogen.rc. The strings '@SYSROOT@' in
|
||||
# these variables are replaced by the actual system root.
|
||||
configure_opts=
|
||||
extraoptions=
|
||||
# List of optional variables sourced from autogen.rc and ~/.gnupg-autogen.rc
|
||||
w32_toolprefixes=
|
||||
w32_extraoptions=
|
||||
w32ce_toolprefixes=
|
||||
w32ce_extraoptions=
|
||||
w64_toolprefixes=
|
||||
w64_extraoptions=
|
||||
amd64_toolprefixes=
|
||||
# End list of optional variables sourced from ~/.gnupg-autogen.rc
|
||||
# What follows are variables which are sourced but default to
|
||||
# environment variables or lacking them hardcoded values.
|
||||
#w32root=
|
||||
#w32ce_root=
|
||||
#w64root=
|
||||
#amd64root=
|
||||
|
||||
# Convenience option to use certain configure options for some hosts.
|
||||
myhost=""
|
||||
myhostsub=""
|
||||
case "$1" in
|
||||
--build-w32)
|
||||
myhost="w32"
|
||||
shift
|
||||
;;
|
||||
--build-w32ce)
|
||||
myhost="w32"
|
||||
myhostsub="ce"
|
||||
shift
|
||||
;;
|
||||
--build-w64)
|
||||
myhost="w32"
|
||||
myhostsub="64"
|
||||
shift
|
||||
;;
|
||||
--build-amd64)
|
||||
myhost="amd64"
|
||||
shift
|
||||
;;
|
||||
--build*)
|
||||
fatal "**Error**: invalid build option $1"
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
die_p
|
||||
|
||||
|
||||
# Source our configuration
|
||||
if [ -f "${tsdir}/autogen.rc" ]; then
|
||||
. "${tsdir}/autogen.rc"
|
||||
fi
|
||||
|
||||
# Source optional site specific configuration
|
||||
if [ -f "$HOME/.gnupg-autogen.rc" ]; then
|
||||
info "sourcing extra definitions from $HOME/.gnupg-autogen.rc"
|
||||
. "$HOME/.gnupg-autogen.rc"
|
||||
fi
|
||||
|
||||
# ******************
|
||||
# W32 build script
|
||||
# ******************
|
||||
if [ "$myhost" = "w32" ]; then
|
||||
if [ ! -f "$tsdir/build-aux/config.guess" ]; then
|
||||
fatal "$tsdir/build-aux/config.guess not found"
|
||||
exit 1
|
||||
fi
|
||||
build=`$tsdir/build-aux/config.guess`
|
||||
|
||||
case $myhostsub in
|
||||
ce)
|
||||
w32root="$w32ce_root"
|
||||
[ -z "$w32root" ] && w32root="$HOME/w32ce_root"
|
||||
toolprefixes="$w32ce_toolprefixes arm-mingw32ce"
|
||||
extraoptions="$extraoptions $w32ce_extraoptions"
|
||||
;;
|
||||
64)
|
||||
w32root="$w64root"
|
||||
[ -z "$w32root" ] && w32root="$HOME/w64root"
|
||||
toolprefixes="$w64_toolprefixes x86_64-w64-mingw32"
|
||||
extraoptions="$extraoptions $w64_extraoptions"
|
||||
;;
|
||||
*)
|
||||
[ -z "$w32root" ] && w32root="$HOME/w32root"
|
||||
toolprefixes="$w32_toolprefixes i686-w64-mingw32 i586-mingw32msvc"
|
||||
toolprefixes="$toolprefixes i386-mingw32msvc mingw32"
|
||||
extraoptions="$extraoptions $w32_extraoptions"
|
||||
;;
|
||||
esac
|
||||
info "Using $w32root as standard install directory"
|
||||
replace_sysroot
|
||||
|
||||
# Locate the cross compiler
|
||||
crossbindir=
|
||||
for host in $toolprefixes; do
|
||||
if ${host}-gcc --version >/dev/null 2>&1 ; then
|
||||
crossbindir=/usr/${host}/bin
|
||||
conf_CC="CC=${host}-gcc"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if [ -z "$crossbindir" ]; then
|
||||
fatal "cross compiler kit not installed"
|
||||
if [ -z "$myhostsub" ]; then
|
||||
info "Under Debian GNU/Linux, you may install it using"
|
||||
info " apt-get install mingw32 mingw32-runtime mingw32-binutils"
|
||||
fi
|
||||
die_p
|
||||
fi
|
||||
|
||||
if [ -f "$tsdir/config.log" ]; then
|
||||
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
|
||||
fatal "Please run a 'make distclean' first"
|
||||
die_p
|
||||
fi
|
||||
fi
|
||||
|
||||
$tsdir/configure --enable-maintainer-mode ${SILENT} \
|
||||
--prefix=${w32root} \
|
||||
--host=${host} --build=${build} \
|
||||
${configure_opts} ${extraoptions} "$@"
|
||||
rc=$?
|
||||
exit $rc
|
||||
fi
|
||||
# ***** end W32 build script *******
|
||||
|
||||
# ***** AMD64 cross build script *******
|
||||
# Used to cross-compile for AMD64 (for testing)
|
||||
if [ "$myhost" = "amd64" ]; then
|
||||
shift
|
||||
if [ ! -f $tsdir/build-aux/config.guess ]; then
|
||||
echo "$tsdir/build-aux/config.guess not found" >&2
|
||||
exit 1
|
||||
fi
|
||||
build=`$tsdir/build-aux/config.guess`
|
||||
|
||||
[ -z "$amd64root" ] && amd64root="$HOME/amd64root"
|
||||
info "Using $amd64root as standard install directory"
|
||||
replace_sysroot
|
||||
|
||||
toolprefixes="$amd64_toolprefixes x86_64-linux-gnu amd64-linux-gnu"
|
||||
|
||||
# Locate the cross compiler
|
||||
crossbindir=
|
||||
for host in $toolprefixes ; do
|
||||
if ${host}-gcc --version >/dev/null 2>&1 ; then
|
||||
crossbindir=/usr/${host}/bin
|
||||
conf_CC="CC=${host}-gcc"
|
||||
break;
|
||||
fi
|
||||
done
|
||||
if [ -z "$crossbindir" ]; then
|
||||
echo "Cross compiler kit not installed" >&2
|
||||
echo "Stop." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -f "$tsdir/config.log" ]; then
|
||||
if ! head $tsdir/config.log | grep "$host" >/dev/null; then
|
||||
echo "Please run a 'make distclean' first" >&2
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
$tsdir/configure --enable-maintainer-mode ${SILENT} \
|
||||
--prefix=${amd64root} \
|
||||
--host=${host} --build=${build} \
|
||||
${configure_opts} ${extraoptions} "$@"
|
||||
rc=$?
|
||||
exit $rc
|
||||
fi
|
||||
# ***** end AMD64 cross build script *******
|
||||
|
||||
|
||||
# Grep the required versions from configure.ac
|
||||
autoconf_vers=`sed -n '/^AC_PREREQ(/ {
|
||||
s/^.*(\(.*\))/\1/p
|
||||
q
|
||||
}' ${configure_ac}`
|
||||
autoconf_vers_num=`echo "$autoconf_vers" | cvtver`
|
||||
|
||||
automake_vers=`sed -n '/^min_automake_version=/ {
|
||||
s/^.*="\(.*\)"/\1/p
|
||||
q
|
||||
}' ${configure_ac}`
|
||||
automake_vers_num=`echo "$automake_vers" | cvtver`
|
||||
|
||||
if [ -d "${tsdir}/po" ]; then
|
||||
gettext_vers=`sed -n '/^AM_GNU_GETTEXT_VERSION(/ {
|
||||
s/^.*\[\(.*\)])/\1/p
|
||||
q
|
||||
}' ${configure_ac}`
|
||||
gettext_vers_num=`echo "$gettext_vers" | cvtver`
|
||||
else
|
||||
gettext_vers="n/a"
|
||||
fi
|
||||
|
||||
if [ -z "$autoconf_vers" -o -z "$automake_vers" -o -z "$gettext_vers" ]
|
||||
then
|
||||
echo "**Error**: version information not found in "\`${configure_ac}\'"." >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
if check_version $AUTOCONF $autoconf_vers_num $autoconf_vers ; then
|
||||
check_version $AUTOHEADER $autoconf_vers_num $autoconf_vers autoconf
|
||||
fi
|
||||
if check_version $AUTOMAKE $automake_vers_num $automake_vers; then
|
||||
check_version $ACLOCAL $automake_vers_num $autoconf_vers automake
|
||||
fi
|
||||
if [ "$gettext_vers" != "n/a" ]; then
|
||||
if check_version $GETTEXT $gettext_vers_num $gettext_vers; then
|
||||
check_version $MSGMERGE $gettext_vers_num $gettext_vers gettext
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$DIE" = "yes" ]; then
|
||||
cat <<EOF
|
||||
|
||||
Note that you may use alternative versions of the tools by setting
|
||||
the corresponding environment variables; see README.GIT for details.
|
||||
|
||||
EOF
|
||||
die_p
|
||||
fi
|
||||
|
||||
# Check the git setup.
|
||||
if [ -d .git ]; then
|
||||
CP="cp -a"
|
||||
[ -z "${SILENT}" ] && CP="$CP -v"
|
||||
if [ -f .git/hooks/pre-commit.sample -a ! -f .git/hooks/pre-commit ] ; then
|
||||
[ -z "${SILENT}" ] && cat <<EOF
|
||||
*** Activating trailing whitespace git pre-commit hook. ***
|
||||
For more information see this thread:
|
||||
http://mail.gnome.org/archives/desktop-devel-list/2009-May/msg00084html
|
||||
To deactivate this pre-commit hook again move .git/hooks/pre-commit
|
||||
and .git/hooks/pre-commit.sample out of the way.
|
||||
EOF
|
||||
$CP .git/hooks/pre-commit.sample .git/hooks/pre-commit
|
||||
chmod +x .git/hooks/pre-commit
|
||||
fi
|
||||
|
||||
if [ "$gettext_vers" != "n/a" ]; then
|
||||
tmp=$(git config --get filter.cleanpo.clean)
|
||||
if [ "$tmp" != \
|
||||
"awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'" ]
|
||||
then
|
||||
info "*** Adding GIT filter.cleanpo.clean configuration."
|
||||
git config --add filter.cleanpo.clean \
|
||||
"awk '/^\"POT-Creation-Date:/&&!s{s=1;next};!/^#: /{print}'"
|
||||
fi
|
||||
fi
|
||||
if [ -f build-aux/git-hooks/commit-msg -a ! -f .git/hooks/commit-msg ] ; then
|
||||
[ -z "${SILENT}" ] && cat <<EOF
|
||||
*** Activating commit log message check hook. ***
|
||||
EOF
|
||||
$CP build-aux/git-hooks/commit-msg .git/hooks/commit-msg
|
||||
chmod +x .git/hooks/commit-msg
|
||||
fi
|
||||
fi
|
||||
|
||||
aclocal_flags="-I m4"
|
||||
if [ -n "${extra_aclocal_flags}" ]; then
|
||||
aclocal_flags="${aclocal_flags} ${extra_aclocal_flags}"
|
||||
fi
|
||||
if [ -n "${ACLOCAL_FLAGS}" ]; then
|
||||
aclocal_flags="${aclocal_flags} ${ACLOCAL_FLAGS}"
|
||||
fi
|
||||
info "Running $ACLOCAL ${aclocal_flags} ..."
|
||||
$ACLOCAL ${aclocal_flags}
|
||||
info "Running autoheader..."
|
||||
$AUTOHEADER
|
||||
info "Running automake --gnu ..."
|
||||
$AUTOMAKE --gnu;
|
||||
info "Running autoconf${FORCE} ..."
|
||||
$AUTOCONF${FORCE}
|
||||
|
||||
info "You may now run:${am_lf} ${final_info}"
|
||||
@@ -1,169 +0,0 @@
|
||||
2011-12-01 Werner Koch <wk@g10code.com>
|
||||
|
||||
NB: ChangeLog files are no longer manually maintained. Starting
|
||||
on December 1st, 2011 we put change information only in the GIT
|
||||
commit log, and generate a top-level ChangeLog file from logs at
|
||||
"make dist". See doc/HACKING for details.
|
||||
|
||||
2003-12-08 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* autogen.sh, config.sub, install-sh, mkinstalldirs, config.guess,
|
||||
* missing: Removed
|
||||
|
||||
2003-10-31 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* autogen.sh: Allow to override the tool name. Do not run
|
||||
libtoolize. Update required version numbers.
|
||||
|
||||
2003-07-30 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* config.guess, config.sub: Updated from ftp.gnu.org/gnu/config/
|
||||
|
||||
2003-07-07 Moritz Schulte <moritz@g10code.com>
|
||||
|
||||
* autogen.sh: Undo last change.
|
||||
* autogen.sh: Remove -a argument for automake.
|
||||
|
||||
2003-03-06 Moritz Schulte <mo@g10code.com>
|
||||
|
||||
* autogen.sh (run): New function.
|
||||
Let automake run with -a for adding missing files automatically
|
||||
|
||||
2002-11-12 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* config.sub, config.guess: Updated from ftp.gnu.org/gnu/config
|
||||
to version 2002-11-08.
|
||||
|
||||
2002-05-14 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* autogen.sh: Require version 2.53 of autoconf
|
||||
|
||||
2001-12-18 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* distfiles: Remove files which are automatically added by automake.
|
||||
|
||||
2001-08-06 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* autogen.sh: Added --build-w32 option.
|
||||
|
||||
2001-05-28 Werner Koch <wk@gnupg.org>
|
||||
|
||||
* db2html.in: Removed.
|
||||
* db2any: New. Taken from GPH
|
||||
|
||||
Mon Jul 17 16:35:47 CEST 2000 Werner Koch <wk@>
|
||||
|
||||
* config.gues, config.sub: Support for s390-ibm-linux-gnu; thanks
|
||||
to Holger Smolinski. Add support for QNX; by Sam Roberts.
|
||||
|
||||
Tue Oct 26 14:10:21 CEST 1999 Werner Koch <wk@gnupg.de>
|
||||
|
||||
* commit: Remove leading and trailing empty lines when copying
|
||||
Changes to Changelog
|
||||
|
||||
Wed Sep 15 16:22:17 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* gnupg.spec: Add Portuguese description
|
||||
|
||||
Thu Sep 2 16:40:55 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* mkdiff: changed format of diff file name and made script more
|
||||
general.
|
||||
|
||||
Wed Aug 4 10:34:18 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* config.guess: Updated from gnu/common and applied my emx patch again.
|
||||
* config.sub: Updated from gnu/common.
|
||||
|
||||
Wed Jul 14 19:42:08 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* ltmain.sh, ltconfig.sh : Updated to libtool 1.3.3
|
||||
|
||||
Mon Jul 12 14:55:34 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* autogen.sh: Run libtoolize
|
||||
|
||||
Sat May 22 22:47:26 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* autogen.sh: Fixed the error message for a missing libtool.
|
||||
|
||||
Sat May 8 19:28:08 CEST 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* mkinstalldirs, install-sh: New from GNU repository
|
||||
* config.sub, config.guess: Merged with rep version.
|
||||
|
||||
Sun Mar 14 19:34:36 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* autogen.sh: Add a check for libtool because some autoconf macros
|
||||
are needed.
|
||||
|
||||
Mon Feb 22 20:04:00 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* autogen.sh: Enhanced the version testing code (Philippe Laliberte)
|
||||
|
||||
* mkwebpage: Edits the buglist.
|
||||
|
||||
Sat Feb 13 12:04:43 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* autogen.sh: Now uses gettextize
|
||||
|
||||
Wed Feb 10 17:15:39 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* config.sub, config.guess: Support i386-emx-os2
|
||||
|
||||
Sun Jan 17 11:04:33 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* autogen.sh: Now checks for installed gettext
|
||||
|
||||
Sat Jan 16 09:27:30 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* config.guess (m68k-atari-mint): New.
|
||||
* config.sub: Add support for atarist-MiNT
|
||||
|
||||
Wed Jan 13 12:49:36 CET 1999 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* gnupg.spec.in: New
|
||||
* gnupg.spec: Removed
|
||||
|
||||
Wed Dec 23 13:18:14 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* gnupg.spec: Updated version by Fabio Coatti
|
||||
|
||||
Thu Dec 17 18:31:15 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
* gnupg.spec: New version by Reuben Sumner and did some more
|
||||
changes.
|
||||
|
||||
Fri Nov 27 12:39:29 CET 1998 Werner Koch <wk@isil.d.shuttle.de>
|
||||
|
||||
|
||||
* commit: New
|
||||
|
||||
|
||||
Fri Nov 20 12:01:57 1998 Werner Koch (wk@isil.d.shuttle.de)
|
||||
|
||||
* mkdiff: signs the patch file
|
||||
|
||||
Sat Oct 17 16:10:16 1998 Werner Koch (wk@isil.d.shuttle.de)
|
||||
|
||||
* autogen.sh: New.
|
||||
|
||||
Wed Oct 14 09:55:25 1998 Werner Koch (wk@isil.d.shuttle.de)
|
||||
|
||||
* config.guess (FreeBSD): Changes from Jun Kuriyama to support ELF
|
||||
* config.sub: (freebsd): Add to maybe_os
|
||||
|
||||
|
||||
Copyright 1998,1999,2000,2001,2002 Free Software Foundation, Inc.
|
||||
|
||||
This file is free software; as a special exception the author gives
|
||||
unlimited permission to copy and/or distribute it, with or without
|
||||
modifications, as long as this notice is preserved.
|
||||
|
||||
This file is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
|
||||
implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
|
||||
Local Variables:
|
||||
buffer-read-only: t
|
||||
End:
|
||||
@@ -1,347 +0,0 @@
|
||||
#! /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:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,690 +0,0 @@
|
||||
#! /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-2013 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 _LT_COMPILER_PIC.
|
||||
|
||||
wl=
|
||||
if test "$GCC" = yes; then
|
||||
wl='-Wl,'
|
||||
else
|
||||
case "$host_os" in
|
||||
aix*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
mingw* | cygwin* | pw32* | os2* | cegcc*)
|
||||
;;
|
||||
hpux9* | hpux10* | hpux11*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
irix5* | irix6* | nonstopux*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
linux* | k*bsd*-gnu | kopensolaris*-gnu)
|
||||
case $cc_basename in
|
||||
ecc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
icc* | ifort*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
lf95*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
nagfor*)
|
||||
wl='-Wl,-Wl,,'
|
||||
;;
|
||||
pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
ccc*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
xl* | bgxl* | bgf* | mpixl*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
como)
|
||||
wl='-lopt='
|
||||
;;
|
||||
*)
|
||||
case `$CC -V 2>&1 | sed 5q` in
|
||||
*Sun\ F* | *Sun*Fortran*)
|
||||
wl=
|
||||
;;
|
||||
*Sun\ C*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
newsos6)
|
||||
;;
|
||||
*nto* | *qnx*)
|
||||
;;
|
||||
osf3* | osf4* | osf5*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
rdos*)
|
||||
;;
|
||||
solaris*)
|
||||
case $cc_basename in
|
||||
f77* | f90* | f95* | sunf77* | sunf90* | sunf95*)
|
||||
wl='-Qoption ld '
|
||||
;;
|
||||
*)
|
||||
wl='-Wl,'
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
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 _LT_LINKER_SHLIBS.
|
||||
|
||||
hardcode_libdir_flag_spec=
|
||||
hardcode_libdir_separator=
|
||||
hardcode_direct=no
|
||||
hardcode_minus_L=no
|
||||
|
||||
case "$host_os" in
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# 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
|
||||
aix[3-9]*)
|
||||
# On AIX/PPC, the GNU linker is very broken
|
||||
if test "$host_cpu" != ia64; then
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
amigaos*)
|
||||
case "$host_cpu" in
|
||||
powerpc)
|
||||
;;
|
||||
m68k)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
beos*)
|
||||
if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# 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
|
||||
;;
|
||||
haiku*)
|
||||
;;
|
||||
interix[3-9]*)
|
||||
hardcode_direct=no
|
||||
hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
|
||||
;;
|
||||
gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-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
|
||||
;;
|
||||
aix[4-9]*)
|
||||
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].*|aix[5-9]*)
|
||||
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*)
|
||||
case "$host_cpu" in
|
||||
powerpc)
|
||||
;;
|
||||
m68k)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
hardcode_minus_L=yes
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
bsdi[45]*)
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
# 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 { case $cc_basename in ifort*) true;; *) test "$GCC" = yes;; esac; }; then
|
||||
:
|
||||
else
|
||||
ld_shlibs=no
|
||||
fi
|
||||
;;
|
||||
dgux*)
|
||||
hardcode_libdir_flag_spec='-L$libdir'
|
||||
;;
|
||||
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=:
|
||||
;;
|
||||
*nto* | *qnx*)
|
||||
;;
|
||||
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 _LT_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'
|
||||
;;
|
||||
aix[4-9]*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
amigaos*)
|
||||
case "$host_cpu" in
|
||||
powerpc*)
|
||||
library_names_spec='$libname$shrext' ;;
|
||||
m68k)
|
||||
library_names_spec='$libname.a' ;;
|
||||
esac
|
||||
;;
|
||||
beos*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
bsdi[45]*)
|
||||
library_names_spec='$libname$shrext'
|
||||
;;
|
||||
cygwin* | mingw* | pw32* | cegcc*)
|
||||
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'
|
||||
;;
|
||||
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'
|
||||
;;
|
||||
haiku*)
|
||||
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 | kopensolaris*-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'
|
||||
;;
|
||||
tpf*)
|
||||
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
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,791 +0,0 @@
|
||||
#! /bin/sh
|
||||
# depcomp - compile a program generating dependencies as side-effects
|
||||
|
||||
scriptversion=2013-05-30.07; # UTC
|
||||
|
||||
# Copyright (C) 1999-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2, or (at your option)
|
||||
# any later version.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, 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.
|
||||
|
||||
# Originally written by Alexandre Oliva <oliva@dcc.unicamp.br>.
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No command. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: depcomp [--help] [--version] PROGRAM [ARGS]
|
||||
|
||||
Run PROGRAMS ARGS to compile a file, generating dependencies
|
||||
as side-effects.
|
||||
|
||||
Environment variables:
|
||||
depmode Dependency tracking mode.
|
||||
source Source file read by 'PROGRAMS ARGS'.
|
||||
object Object file output by 'PROGRAMS ARGS'.
|
||||
DEPDIR directory where to store dependencies.
|
||||
depfile Dependency file to output.
|
||||
tmpdepfile Temporary file to use when outputting dependencies.
|
||||
libtool Whether libtool is used (yes/no).
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "depcomp $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
# Get the directory component of the given path, and save it in the
|
||||
# global variables '$dir'. Note that this directory component will
|
||||
# be either empty or ending with a '/' character. This is deliberate.
|
||||
set_dir_from ()
|
||||
{
|
||||
case $1 in
|
||||
*/*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;;
|
||||
*) dir=;;
|
||||
esac
|
||||
}
|
||||
|
||||
# Get the suffix-stripped basename of the given path, and save it the
|
||||
# global variable '$base'.
|
||||
set_base_from ()
|
||||
{
|
||||
base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'`
|
||||
}
|
||||
|
||||
# If no dependency file was actually created by the compiler invocation,
|
||||
# we still have to create a dummy depfile, to avoid errors with the
|
||||
# Makefile "include basename.Plo" scheme.
|
||||
make_dummy_depfile ()
|
||||
{
|
||||
echo "#dummy" > "$depfile"
|
||||
}
|
||||
|
||||
# Factor out some common post-processing of the generated depfile.
|
||||
# Requires the auxiliary global variable '$tmpdepfile' to be set.
|
||||
aix_post_process_depfile ()
|
||||
{
|
||||
# If the compiler actually managed to produce a dependency file,
|
||||
# post-process it.
|
||||
if test -f "$tmpdepfile"; then
|
||||
# Each line is of the form 'foo.o: dependency.h'.
|
||||
# Do two passes, one to just change these to
|
||||
# $object: dependency.h
|
||||
# and one to simply output
|
||||
# dependency.h:
|
||||
# which is needed to avoid the deleted-header problem.
|
||||
{ sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile"
|
||||
sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile"
|
||||
} > "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
}
|
||||
|
||||
# A tabulation character.
|
||||
tab=' '
|
||||
# A newline character.
|
||||
nl='
|
||||
'
|
||||
# Character ranges might be problematic outside the C locale.
|
||||
# These definitions help.
|
||||
upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ
|
||||
lower=abcdefghijklmnopqrstuvwxyz
|
||||
digits=0123456789
|
||||
alpha=${upper}${lower}
|
||||
|
||||
if test -z "$depmode" || test -z "$source" || test -z "$object"; then
|
||||
echo "depcomp: Variables source, object and depmode must be set" 1>&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po.
|
||||
depfile=${depfile-`echo "$object" |
|
||||
sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`}
|
||||
tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
|
||||
|
||||
rm -f "$tmpdepfile"
|
||||
|
||||
# Avoid interferences from the environment.
|
||||
gccflag= dashmflag=
|
||||
|
||||
# Some modes work just like other modes, but use different flags. We
|
||||
# parameterize here, but still list the modes in the big case below,
|
||||
# to make depend.m4 easier to write. Note that we *cannot* use a case
|
||||
# here, because this file can only contain one case statement.
|
||||
if test "$depmode" = hp; then
|
||||
# HP compiler uses -M and no extra arg.
|
||||
gccflag=-M
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
if test "$depmode" = dashXmstdout; then
|
||||
# This is just like dashmstdout with a different argument.
|
||||
dashmflag=-xM
|
||||
depmode=dashmstdout
|
||||
fi
|
||||
|
||||
cygpath_u="cygpath -u -f -"
|
||||
if test "$depmode" = msvcmsys; then
|
||||
# This is just like msvisualcpp but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvisualcpp
|
||||
fi
|
||||
|
||||
if test "$depmode" = msvc7msys; then
|
||||
# This is just like msvc7 but w/o cygpath translation.
|
||||
# Just convert the backslash-escaped backslashes to single forward
|
||||
# slashes to satisfy depend.m4
|
||||
cygpath_u='sed s,\\\\,/,g'
|
||||
depmode=msvc7
|
||||
fi
|
||||
|
||||
if test "$depmode" = xlc; then
|
||||
# IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information.
|
||||
gccflag=-qmakedep=gcc,-MF
|
||||
depmode=gcc
|
||||
fi
|
||||
|
||||
case "$depmode" in
|
||||
gcc3)
|
||||
## gcc 3 implements dependency tracking that does exactly what
|
||||
## we want. Yay! Note: for some reason libtool 1.4 doesn't like
|
||||
## it if -MD -MP comes after the -MF stuff. Hmm.
|
||||
## Unfortunately, FreeBSD c89 acceptance of flags depends upon
|
||||
## the command line argument order; so add the flags where they
|
||||
## appear in depend2.am. Note that the slowdown incurred here
|
||||
## affects only configure: in makefiles, %FASTDEP% shortcuts this.
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;;
|
||||
*) set fnord "$@" "$arg" ;;
|
||||
esac
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
done
|
||||
"$@"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
mv "$tmpdepfile" "$depfile"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
## Note that this doesn't just cater to obsosete pre-3.x GCC compilers.
|
||||
## but also to in-use compilers like IMB xlc/xlC and the HP C compiler.
|
||||
## (see the conditional assignment to $gccflag above).
|
||||
## There are various ways to get dependency output from gcc. Here's
|
||||
## why we pick this rather obscure method:
|
||||
## - Don't want to use -MD because we'd like the dependencies to end
|
||||
## up in a subdir. Having to rename by hand is ugly.
|
||||
## (We might end up doing this anyway to support other compilers.)
|
||||
## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
|
||||
## -MM, not -M (despite what the docs say). Also, it might not be
|
||||
## supported by the other compilers which use the 'gcc' depmode.
|
||||
## - Using -M directly means running the compiler twice (even worse
|
||||
## than renaming).
|
||||
if test -z "$gccflag"; then
|
||||
gccflag=-MD,
|
||||
fi
|
||||
"$@" -Wp,"$gccflag$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The second -e expression handles DOS-style file names with drive
|
||||
# letters.
|
||||
sed -e 's/^[^:]*: / /' \
|
||||
-e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
|
||||
## This next piece of magic avoids the "deleted header file" problem.
|
||||
## The problem is that when a header file which appears in a .P file
|
||||
## is deleted, the dependency causes make to die (because there is
|
||||
## typically no way to rebuild the header). We avoid this by adding
|
||||
## dummy dependencies for each header file. Too bad gcc doesn't do
|
||||
## this for us directly.
|
||||
## Some versions of gcc put a space before the ':'. On the theory
|
||||
## that the space means something, we add a space to the output as
|
||||
## well. hp depmode also adds that space, but also prefixes the VPATH
|
||||
## to the object. Take care to not repeat it in the output.
|
||||
## Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
## correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
sgi)
|
||||
if test "$libtool" = yes; then
|
||||
"$@" "-Wp,-MDupdate,$tmpdepfile"
|
||||
else
|
||||
"$@" -MDupdate "$tmpdepfile"
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
|
||||
if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files
|
||||
echo "$object : \\" > "$depfile"
|
||||
# Clip off the initial element (the dependent). Don't try to be
|
||||
# clever and replace this with sed code, as IRIX sed won't handle
|
||||
# lines with more than a fixed number of characters (4096 in
|
||||
# IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines;
|
||||
# the IRIX cc adds comments like '#:fec' to the end of the
|
||||
# dependency line.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \
|
||||
| tr "$nl" ' ' >> "$depfile"
|
||||
echo >> "$depfile"
|
||||
# The second pass generates a dummy entry for each header file.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
|
||||
>> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
xlc)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
aix)
|
||||
# The C for AIX Compiler uses -M and outputs the dependencies
|
||||
# in a .u file. In older versions, this file always lives in the
|
||||
# current directory. Also, the AIX compiler puts '$object:' at the
|
||||
# start of each line; $object doesn't have directory information.
|
||||
# Version 6 uses the directory in both cases.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$base.u
|
||||
tmpdepfile3=$dir.libs/$base.u
|
||||
"$@" -Wc,-M
|
||||
else
|
||||
tmpdepfile1=$dir$base.u
|
||||
tmpdepfile2=$dir$base.u
|
||||
tmpdepfile3=$dir$base.u
|
||||
"$@" -M
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
tcc)
|
||||
# tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26
|
||||
# FIXME: That version still under development at the moment of writing.
|
||||
# Make that this statement remains true also for stable, released
|
||||
# versions.
|
||||
# It will wrap lines (doesn't matter whether long or short) with a
|
||||
# trailing '\', as in:
|
||||
#
|
||||
# foo.o : \
|
||||
# foo.c \
|
||||
# foo.h \
|
||||
#
|
||||
# It will put a trailing '\' even on the last line, and will use leading
|
||||
# spaces rather than leading tabs (at least since its commit 0394caf7
|
||||
# "Emit spaces for -MD").
|
||||
"$@" -MD -MF "$tmpdepfile"
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each non-empty line is of the form 'foo.o : \' or ' dep.h \'.
|
||||
# We have to change lines of the first kind to '$object: \'.
|
||||
sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile"
|
||||
# And for each line of the second kind, we have to emit a 'dep.h:'
|
||||
# dummy dependency, to avoid the deleted-header problem.
|
||||
sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
## The order of this option in the case statement is important, since the
|
||||
## shell code in configure will try each of these formats in the order
|
||||
## listed in this file. A plain '-MD' option would be understood by many
|
||||
## compilers, so we must ensure this comes after the gcc and icc options.
|
||||
pgcc)
|
||||
# Portland's C compiler understands '-MD'.
|
||||
# Will always output deps to 'file.d' where file is the root name of the
|
||||
# source file under compilation, even if file resides in a subdirectory.
|
||||
# The object file name does not affect the name of the '.d' file.
|
||||
# pgcc 10.2 will output
|
||||
# foo.o: sub/foo.c sub/foo.h
|
||||
# and will wrap long lines using '\' :
|
||||
# foo.o: sub/foo.c ... \
|
||||
# sub/foo.h ... \
|
||||
# ...
|
||||
set_dir_from "$object"
|
||||
# Use the source, not the object, to determine the base name, since
|
||||
# that's sadly what pgcc will do too.
|
||||
set_base_from "$source"
|
||||
tmpdepfile=$base.d
|
||||
|
||||
# For projects that build the same source file twice into different object
|
||||
# files, the pgcc approach of using the *source* file root name can cause
|
||||
# problems in parallel builds. Use a locking strategy to avoid stomping on
|
||||
# the same $tmpdepfile.
|
||||
lockdir=$base.d-lock
|
||||
trap "
|
||||
echo '$0: caught signal, cleaning up...' >&2
|
||||
rmdir '$lockdir'
|
||||
exit 1
|
||||
" 1 2 13 15
|
||||
numtries=100
|
||||
i=$numtries
|
||||
while test $i -gt 0; do
|
||||
# mkdir is a portable test-and-set.
|
||||
if mkdir "$lockdir" 2>/dev/null; then
|
||||
# This process acquired the lock.
|
||||
"$@" -MD
|
||||
stat=$?
|
||||
# Release the lock.
|
||||
rmdir "$lockdir"
|
||||
break
|
||||
else
|
||||
# If the lock is being held by a different process, wait
|
||||
# until the winning process is done or we timeout.
|
||||
while test -d "$lockdir" && test $i -gt 0; do
|
||||
sleep 1
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
fi
|
||||
i=`expr $i - 1`
|
||||
done
|
||||
trap - 1 2 13 15
|
||||
if test $i -le 0; then
|
||||
echo "$0: failed to acquire lock after $numtries attempts" >&2
|
||||
echo "$0: check lockdir '$lockdir'" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
# Each line is of the form `foo.o: dependent.h',
|
||||
# or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
|
||||
# Do two passes, one to just change these to
|
||||
# `$object: dependent.h' and one to simply `dependent.h:'.
|
||||
sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
hp2)
|
||||
# The "hp" stanza above does not work with aCC (C++) and HP's ia64
|
||||
# compilers, which have integrated preprocessors. The correct option
|
||||
# to use with these is +Maked; it writes dependencies to a file named
|
||||
# 'foo.d', which lands next to the object file, wherever that
|
||||
# happens to be.
|
||||
# Much of this is similar to the tru64 case; see comments there.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
if test "$libtool" = yes; then
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir.libs/$base.d
|
||||
"$@" -Wc,+Maked
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
"$@" +Maked
|
||||
fi
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
if test -f "$tmpdepfile"; then
|
||||
sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile"
|
||||
# Add 'dependent.h:' lines.
|
||||
sed -ne '2,${
|
||||
s/^ *//
|
||||
s/ \\*$//
|
||||
s/$/:/
|
||||
p
|
||||
}' "$tmpdepfile" >> "$depfile"
|
||||
else
|
||||
make_dummy_depfile
|
||||
fi
|
||||
rm -f "$tmpdepfile" "$tmpdepfile2"
|
||||
;;
|
||||
|
||||
tru64)
|
||||
# The Tru64 compiler uses -MD to generate dependencies as a side
|
||||
# effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'.
|
||||
# At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
|
||||
# dependencies in 'foo.d' instead, so we check for that too.
|
||||
# Subdirectories are respected.
|
||||
set_dir_from "$object"
|
||||
set_base_from "$object"
|
||||
|
||||
if test "$libtool" = yes; then
|
||||
# Libtool generates 2 separate objects for the 2 libraries. These
|
||||
# two compilations output dependencies in $dir.libs/$base.o.d and
|
||||
# in $dir$base.o.d. We have to check for both files, because
|
||||
# one of the two compilations can be disabled. We should prefer
|
||||
# $dir$base.o.d over $dir.libs/$base.o.d because the latter is
|
||||
# automatically cleaned when .libs/ is deleted, while ignoring
|
||||
# the former would cause a distcleancheck panic.
|
||||
tmpdepfile1=$dir$base.o.d # libtool 1.5
|
||||
tmpdepfile2=$dir.libs/$base.o.d # Likewise.
|
||||
tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504
|
||||
"$@" -Wc,-MD
|
||||
else
|
||||
tmpdepfile1=$dir$base.d
|
||||
tmpdepfile2=$dir$base.d
|
||||
tmpdepfile3=$dir$base.d
|
||||
"$@" -MD
|
||||
fi
|
||||
|
||||
stat=$?
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
exit $stat
|
||||
fi
|
||||
|
||||
for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3"
|
||||
do
|
||||
test -f "$tmpdepfile" && break
|
||||
done
|
||||
# Same post-processing that is required for AIX mode.
|
||||
aix_post_process_depfile
|
||||
;;
|
||||
|
||||
msvc7)
|
||||
if test "$libtool" = yes; then
|
||||
showIncludes=-Wc,-showIncludes
|
||||
else
|
||||
showIncludes=-showIncludes
|
||||
fi
|
||||
"$@" $showIncludes > "$tmpdepfile"
|
||||
stat=$?
|
||||
grep -v '^Note: including file: ' "$tmpdepfile"
|
||||
if test $stat -ne 0; then
|
||||
rm -f "$tmpdepfile"
|
||||
exit $stat
|
||||
fi
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
# The first sed program below extracts the file names and escapes
|
||||
# backslashes for cygpath. The second sed program outputs the file
|
||||
# name when reading, but also accumulates all include files in the
|
||||
# hold buffer in order to output them again at the end. This only
|
||||
# works with sed implementations that can handle large buffers.
|
||||
sed < "$tmpdepfile" -n '
|
||||
/^Note: including file: *\(.*\)/ {
|
||||
s//\1/
|
||||
s/\\/\\\\/g
|
||||
p
|
||||
}' | $cygpath_u | sort -u | sed -n '
|
||||
s/ /\\ /g
|
||||
s/\(.*\)/'"$tab"'\1 \\/p
|
||||
s/.\(.*\) \\/\1:/
|
||||
H
|
||||
$ {
|
||||
s/.*/'"$tab"'/
|
||||
G
|
||||
p
|
||||
}' >> "$depfile"
|
||||
echo >> "$depfile" # make sure the fragment doesn't end with a backslash
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvc7msys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
#nosideeffect)
|
||||
# This comment above is used by automake to tell side-effect
|
||||
# dependency tracking mechanisms from slower ones.
|
||||
|
||||
dashmstdout)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout, regardless of -o.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -z "$dashmflag" && dashmflag=-M
|
||||
# Require at least two characters before searching for ':'
|
||||
# in the target name. This is to cope with DOS-style filenames:
|
||||
# a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise.
|
||||
"$@" $dashmflag |
|
||||
sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
cat < "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process this sed invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
tr ' ' "$nl" < "$tmpdepfile" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
dashXmstdout)
|
||||
# This case only exists to satisfy depend.m4. It is never actually
|
||||
# run, as this mode is specially recognized in the preamble.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
makedepend)
|
||||
"$@" || exit $?
|
||||
# Remove any Libtool call
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
# X makedepend
|
||||
shift
|
||||
cleared=no eat=no
|
||||
for arg
|
||||
do
|
||||
case $cleared in
|
||||
no)
|
||||
set ""; shift
|
||||
cleared=yes ;;
|
||||
esac
|
||||
if test $eat = yes; then
|
||||
eat=no
|
||||
continue
|
||||
fi
|
||||
case "$arg" in
|
||||
-D*|-I*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
# Strip any option that makedepend may not understand. Remove
|
||||
# the object too, otherwise makedepend will parse it as a source file.
|
||||
-arch)
|
||||
eat=yes ;;
|
||||
-*|$object)
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"; shift ;;
|
||||
esac
|
||||
done
|
||||
obj_suffix=`echo "$object" | sed 's/^.*\././'`
|
||||
touch "$tmpdepfile"
|
||||
${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
|
||||
rm -f "$depfile"
|
||||
# makedepend may prepend the VPATH from the source file name to the object.
|
||||
# No need to regex-escape $object, excess matching of '.' is harmless.
|
||||
sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile"
|
||||
# Some versions of the HPUX 10.20 sed can't process the last invocation
|
||||
# correctly. Breaking it into two sed invocations is a workaround.
|
||||
sed '1,2d' "$tmpdepfile" \
|
||||
| tr ' ' "$nl" \
|
||||
| sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \
|
||||
| sed -e 's/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile" "$tmpdepfile".bak
|
||||
;;
|
||||
|
||||
cpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
# Remove '-o $object'.
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case $arg in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift # fnord
|
||||
shift # $arg
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
"$@" -E \
|
||||
| sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
-e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \
|
||||
| sed '$ s: \\$::' > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
cat < "$tmpdepfile" >> "$depfile"
|
||||
sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvisualcpp)
|
||||
# Important note: in order to support this mode, a compiler *must*
|
||||
# always write the preprocessed file to stdout.
|
||||
"$@" || exit $?
|
||||
|
||||
# Remove the call to Libtool.
|
||||
if test "$libtool" = yes; then
|
||||
while test "X$1" != 'X--mode=compile'; do
|
||||
shift
|
||||
done
|
||||
shift
|
||||
fi
|
||||
|
||||
IFS=" "
|
||||
for arg
|
||||
do
|
||||
case "$arg" in
|
||||
-o)
|
||||
shift
|
||||
;;
|
||||
$object)
|
||||
shift
|
||||
;;
|
||||
"-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
|
||||
set fnord "$@"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
set fnord "$@" "$arg"
|
||||
shift
|
||||
shift
|
||||
;;
|
||||
esac
|
||||
done
|
||||
"$@" -E 2>/dev/null |
|
||||
sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile"
|
||||
rm -f "$depfile"
|
||||
echo "$object : \\" > "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile"
|
||||
echo "$tab" >> "$depfile"
|
||||
sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
|
||||
rm -f "$tmpdepfile"
|
||||
;;
|
||||
|
||||
msvcmsys)
|
||||
# This case exists only to let depend.m4 do its work. It works by
|
||||
# looking at the text of this script. This case will never be run,
|
||||
# since it is checked for above.
|
||||
exit 1
|
||||
;;
|
||||
|
||||
none)
|
||||
exec "$@"
|
||||
;;
|
||||
|
||||
*)
|
||||
echo "Unknown depmode $depmode" 1>&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
exit 0
|
||||
|
||||
# Local Variables:
|
||||
# mode: shell-script
|
||||
# sh-indentation: 2
|
||||
# eval: (add-hook 'write-file-hooks 'time-stamp)
|
||||
# time-stamp-start: "scriptversion="
|
||||
# time-stamp-format: "%:y-%02m-%02d.%02H"
|
||||
# time-stamp-time-zone: "UTC"
|
||||
# time-stamp-end: "; # UTC"
|
||||
# End:
|
||||
@@ -1,14 +0,0 @@
|
||||
# This file is expected to be used via gitlog-to-changelog's --amend=FILE
|
||||
# option. It specifies what changes to make to each given SHA1's commit
|
||||
# log and metadata, using Perl-eval'able expressions.
|
||||
|
||||
eb4937914db3fb7317502e97e4f0e40c1857f59d
|
||||
# Fix bad formatted entry dated 2013-05-20
|
||||
s/(?s)mpi_sub.*$/cipher: Fix segv in last ECC change.
|
||||
* cipher\/ecc.c (generate_key): Make sure R is initialized./
|
||||
|
||||
296f38a2bd2e25788643a42e4881faed00884a40
|
||||
# Fix bad formatted entry dated 2013-05-09
|
||||
s/(?s)Generate ECC.*$/cipher: Generate compliant ECC keys.
|
||||
* cipher\/ecc.c (generate_key): Make sure a key is compliant for
|
||||
using the compact representation./
|
||||
@@ -1,14 +0,0 @@
|
||||
|
||||
2011-12-01 Werner Koch <wk@gnupg.org>
|
||||
|
||||
NB: Changes done before December 1st, 2011 are described in
|
||||
per directory files named ChangeLog-2011. See doc/HACKING for
|
||||
details.
|
||||
|
||||
-----
|
||||
Copyright (C) 2011 Free Software Foundation, Inc.
|
||||
|
||||
Copying and distribution of this file and/or the original GIT
|
||||
commit log messages, with or without modification, are
|
||||
permitted provided the copyright notice and this notice are
|
||||
preserved.
|
||||
@@ -1,527 +0,0 @@
|
||||
#!/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:
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,224 +0,0 @@
|
||||
#!/bin/sh
|
||||
# Get modification time of a file or directory and pretty-print it.
|
||||
|
||||
scriptversion=2010-08-21.06; # UTC
|
||||
|
||||
# Copyright (C) 1995-2013 Free Software Foundation, Inc.
|
||||
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 1995
|
||||
#
|
||||
# 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>.
|
||||
|
||||
if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
|
||||
emulate sh
|
||||
NULLCMD=:
|
||||
# Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
|
||||
# is contrary to our usage. Disable this feature.
|
||||
alias -g '${1+"$@"}'='"$@"'
|
||||
setopt NO_GLOB_SUBST
|
||||
fi
|
||||
|
||||
case $1 in
|
||||
'')
|
||||
echo "$0: No file. Try '$0 --help' for more information." 1>&2
|
||||
exit 1;
|
||||
;;
|
||||
-h | --h*)
|
||||
cat <<\EOF
|
||||
Usage: mdate-sh [--help] [--version] FILE
|
||||
|
||||
Pretty-print the modification day of FILE, in the format:
|
||||
1 January 1970
|
||||
|
||||
Report bugs to <bug-automake@gnu.org>.
|
||||
EOF
|
||||
exit $?
|
||||
;;
|
||||
-v | --v*)
|
||||
echo "mdate-sh $scriptversion"
|
||||
exit $?
|
||||
;;
|
||||
esac
|
||||
|
||||
error ()
|
||||
{
|
||||
echo "$0: $1" >&2
|
||||
exit 1
|
||||
}
|
||||
|
||||
|
||||
# Prevent date giving response in another language.
|
||||
LANG=C
|
||||
export LANG
|
||||
LC_ALL=C
|
||||
export LC_ALL
|
||||
LC_TIME=C
|
||||
export LC_TIME
|
||||
|
||||
# GNU ls changes its time format in response to the TIME_STYLE
|
||||
# variable. Since we cannot assume 'unset' works, revert this
|
||||
# variable to its documented default.
|
||||
if test "${TIME_STYLE+set}" = set; then
|
||||
TIME_STYLE=posix-long-iso
|
||||
export TIME_STYLE
|
||||
fi
|
||||
|
||||
save_arg1=$1
|
||||
|
||||
# Find out how to get the extended ls output of a file or directory.
|
||||
if ls -L /dev/null 1>/dev/null 2>&1; then
|
||||
ls_command='ls -L -l -d'
|
||||
else
|
||||
ls_command='ls -l -d'
|
||||
fi
|
||||
# Avoid user/group names that might have spaces, when possible.
|
||||
if ls -n /dev/null 1>/dev/null 2>&1; then
|
||||
ls_command="$ls_command -n"
|
||||
fi
|
||||
|
||||
# A 'ls -l' line looks as follows on OS/2.
|
||||
# drwxrwx--- 0 Aug 11 2001 foo
|
||||
# This differs from Unix, which adds ownership information.
|
||||
# drwxrwx--- 2 root root 4096 Aug 11 2001 foo
|
||||
#
|
||||
# To find the date, we split the line on spaces and iterate on words
|
||||
# until we find a month. This cannot work with files whose owner is a
|
||||
# user named "Jan", or "Feb", etc. However, it's unlikely that '/'
|
||||
# will be owned by a user whose name is a month. So we first look at
|
||||
# the extended ls output of the root directory to decide how many
|
||||
# words should be skipped to get the date.
|
||||
|
||||
# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
|
||||
set x`$ls_command /`
|
||||
|
||||
# Find which argument is the month.
|
||||
month=
|
||||
command=
|
||||
until test $month
|
||||
do
|
||||
test $# -gt 0 || error "failed parsing '$ls_command /' output"
|
||||
shift
|
||||
# Add another shift to the command.
|
||||
command="$command shift;"
|
||||
case $1 in
|
||||
Jan) month=January; nummonth=1;;
|
||||
Feb) month=February; nummonth=2;;
|
||||
Mar) month=March; nummonth=3;;
|
||||
Apr) month=April; nummonth=4;;
|
||||
May) month=May; nummonth=5;;
|
||||
Jun) month=June; nummonth=6;;
|
||||
Jul) month=July; nummonth=7;;
|
||||
Aug) month=August; nummonth=8;;
|
||||
Sep) month=September; nummonth=9;;
|
||||
Oct) month=October; nummonth=10;;
|
||||
Nov) month=November; nummonth=11;;
|
||||
Dec) month=December; nummonth=12;;
|
||||
esac
|
||||
done
|
||||
|
||||
test -n "$month" || error "failed parsing '$ls_command /' output"
|
||||
|
||||
# Get the extended ls output of the file or directory.
|
||||
set dummy x`eval "$ls_command \"\\\$save_arg1\""`
|
||||
|
||||
# Remove all preceding arguments
|
||||
eval $command
|
||||
|
||||
# Because of the dummy argument above, month is in $2.
|
||||
#
|
||||
# On a POSIX system, we should have
|
||||
#
|
||||
# $# = 5
|
||||
# $1 = file size
|
||||
# $2 = month
|
||||
# $3 = day
|
||||
# $4 = year or time
|
||||
# $5 = filename
|
||||
#
|
||||
# On Darwin 7.7.0 and 7.6.0, we have
|
||||
#
|
||||
# $# = 4
|
||||
# $1 = day
|
||||
# $2 = month
|
||||
# $3 = year or time
|
||||
# $4 = filename
|
||||
|
||||
# Get the month.
|
||||
case $2 in
|
||||
Jan) month=January; nummonth=1;;
|
||||
Feb) month=February; nummonth=2;;
|
||||
Mar) month=March; nummonth=3;;
|
||||
Apr) month=April; nummonth=4;;
|
||||
May) month=May; nummonth=5;;
|
||||
Jun) month=June; nummonth=6;;
|
||||
Jul) month=July; nummonth=7;;
|
||||
Aug) month=August; nummonth=8;;
|
||||
Sep) month=September; nummonth=9;;
|
||||
Oct) month=October; nummonth=10;;
|
||||
Nov) month=November; nummonth=11;;
|
||||
Dec) month=December; nummonth=12;;
|
||||
esac
|
||||
|
||||
case $3 in
|
||||
???*) day=$1;;
|
||||
*) day=$3; shift;;
|
||||
esac
|
||||
|
||||
# Here we have to deal with the problem that the ls output gives either
|
||||
# the time of day or the year.
|
||||
case $3 in
|
||||
*:*) set `date`; eval year=\$$#
|
||||
case $2 in
|
||||
Jan) nummonthtod=1;;
|
||||
Feb) nummonthtod=2;;
|
||||
Mar) nummonthtod=3;;
|
||||
Apr) nummonthtod=4;;
|
||||
May) nummonthtod=5;;
|
||||
Jun) nummonthtod=6;;
|
||||
Jul) nummonthtod=7;;
|
||||
Aug) nummonthtod=8;;
|
||||
Sep) nummonthtod=9;;
|
||||
Oct) nummonthtod=10;;
|
||||
Nov) nummonthtod=11;;
|
||||
Dec) nummonthtod=12;;
|
||||
esac
|
||||
# For the first six month of the year the time notation can also
|
||||
# be used for files modified in the last year.
|
||||
if (expr $nummonth \> $nummonthtod) > /dev/null;
|
||||
then
|
||||
year=`expr $year - 1`
|
||||
fi;;
|
||||
*) year=$3;;
|
||||
esac
|
||||
|
||||
# The result.
|
||||
echo $day $month $year
|
||||
|
||||
# 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:
|
||||
@@ -1,215 +0,0 @@
|
||||
#! /bin/sh
|
||||
# Common wrapper for a few potentially missing GNU programs.
|
||||
|
||||
scriptversion=2013-10-28.13; # 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 'autom4te' 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:
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -1,104 +0,0 @@
|
||||
# Makefile for cipher modules
|
||||
# Copyright (C) 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2009 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of Libgcrypt.
|
||||
#
|
||||
# Libgcrypt is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as
|
||||
# published by the Free Software Foundation; either version 2.1 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# Libgcrypt is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Process this file with automake to produce Makefile.in
|
||||
|
||||
EXTRA_DIST = Manifest
|
||||
|
||||
# Need to include ../src in addition to top_srcdir because gcrypt.h is
|
||||
# a built header.
|
||||
AM_CPPFLAGS = -I../src -I$(top_srcdir)/src
|
||||
AM_CFLAGS = $(GPG_ERROR_CFLAGS)
|
||||
|
||||
AM_CCASFLAGS = $(NOEXECSTACK_FLAGS)
|
||||
|
||||
|
||||
noinst_LTLIBRARIES = libcipher.la
|
||||
|
||||
GCRYPT_MODULES = @GCRYPT_CIPHERS@ @GCRYPT_PUBKEY_CIPHERS@ \
|
||||
@GCRYPT_DIGESTS@ @GCRYPT_KDFS@
|
||||
|
||||
libcipher_la_DEPENDENCIES = $(GCRYPT_MODULES)
|
||||
libcipher_la_LIBADD = $(GCRYPT_MODULES)
|
||||
|
||||
libcipher_la_SOURCES = \
|
||||
cipher.c cipher-internal.h \
|
||||
cipher-cbc.c cipher-cfb.c cipher-ofb.c cipher-ctr.c cipher-aeswrap.c \
|
||||
cipher-ccm.c cipher-cmac.c cipher-gcm.c \
|
||||
cipher-selftest.c cipher-selftest.h \
|
||||
pubkey.c pubkey-internal.h pubkey-util.c \
|
||||
md.c \
|
||||
mac.c mac-internal.h \
|
||||
mac-hmac.c mac-cmac.c mac-gmac.c \
|
||||
kdf.c kdf-internal.h \
|
||||
hmac-tests.c \
|
||||
bithelp.h \
|
||||
bufhelp.h \
|
||||
primegen.c \
|
||||
hash-common.c hash-common.h \
|
||||
dsa-common.c rsa-common.c \
|
||||
rmd.h
|
||||
|
||||
EXTRA_libcipher_la_SOURCES = \
|
||||
arcfour.c \
|
||||
blowfish.c blowfish-amd64.S blowfish-arm.S \
|
||||
cast5.c cast5-amd64.S cast5-arm.S \
|
||||
crc.c \
|
||||
des.c \
|
||||
dsa.c \
|
||||
elgamal.c \
|
||||
ecc.c ecc-curves.c ecc-misc.c ecc-common.h \
|
||||
ecc-ecdsa.c ecc-eddsa.c ecc-gost.c \
|
||||
idea.c \
|
||||
gost28147.c gost.h \
|
||||
gostr3411-94.c \
|
||||
md4.c \
|
||||
md5.c \
|
||||
rijndael.c rijndael-tables.h rijndael-amd64.S rijndael-arm.S \
|
||||
rmd160.c \
|
||||
rsa.c \
|
||||
salsa20.c salsa20-amd64.S salsa20-armv7-neon.S \
|
||||
scrypt.c \
|
||||
seed.c \
|
||||
serpent.c serpent-sse2-amd64.S serpent-avx2-amd64.S serpent-armv7-neon.S \
|
||||
sha1.c sha1-ssse3-amd64.S \
|
||||
sha256.c sha256-ssse3-amd64.S \
|
||||
sha512.c sha512-ssse3-amd64.S sha512-avx-amd64.S sha512-avx2-bmi2-amd64.S \
|
||||
sha512-armv7-neon.S \
|
||||
stribog.c \
|
||||
tiger.c \
|
||||
whirlpool.c \
|
||||
twofish.c twofish-amd64.S twofish-arm.S \
|
||||
rfc2268.c \
|
||||
camellia.c camellia.h camellia-glue.c camellia-aesni-avx-amd64.S \
|
||||
camellia-aesni-avx2-amd64.S camellia-arm.S
|
||||
|
||||
if ENABLE_O_FLAG_MUNGING
|
||||
o_flag_munging = sed -e 's/-O\([2-9s][2-9s]*\)/-O1/' -e 's/-Ofast/-O1/g'
|
||||
else
|
||||
o_flag_munging = cat
|
||||
endif
|
||||
|
||||
|
||||
# We need to lower the optimization for this module.
|
||||
tiger.o: $(srcdir)/tiger.c
|
||||
`echo $(COMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) `
|
||||
|
||||
tiger.lo: $(srcdir)/tiger.c
|
||||
`echo $(LTCOMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) `
|
||||
@@ -1,830 +0,0 @@
|
||||
# Makefile.in generated by automake 1.14.1 from Makefile.am.
|
||||
# @configure_input@
|
||||
|
||||
# Copyright (C) 1994-2013 Free Software Foundation, Inc.
|
||||
|
||||
# This Makefile.in is free software; the Free Software Foundation
|
||||
# gives unlimited permission to copy and/or distribute it,
|
||||
# with or without modifications, as long as this notice is preserved.
|
||||
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||
# PARTICULAR PURPOSE.
|
||||
|
||||
@SET_MAKE@
|
||||
|
||||
# Makefile for cipher modules
|
||||
# Copyright (C) 1998, 1999, 2000, 2001, 2002,
|
||||
# 2003, 2009 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of Libgcrypt.
|
||||
#
|
||||
# Libgcrypt is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser General Public License as
|
||||
# published by the Free Software Foundation; either version 2.1 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# Libgcrypt is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
# Process this file with automake to produce Makefile.in
|
||||
|
||||
VPATH = @srcdir@
|
||||
am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)'
|
||||
am__make_running_with_option = \
|
||||
case $${target_option-} in \
|
||||
?) ;; \
|
||||
*) echo "am__make_running_with_option: internal error: invalid" \
|
||||
"target option '$${target_option-}' specified" >&2; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
has_opt=no; \
|
||||
sane_makeflags=$$MAKEFLAGS; \
|
||||
if $(am__is_gnu_make); then \
|
||||
sane_makeflags=$$MFLAGS; \
|
||||
else \
|
||||
case $$MAKEFLAGS in \
|
||||
*\\[\ \ ]*) \
|
||||
bs=\\; \
|
||||
sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \
|
||||
| sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \
|
||||
esac; \
|
||||
fi; \
|
||||
skip_next=no; \
|
||||
strip_trailopt () \
|
||||
{ \
|
||||
flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \
|
||||
}; \
|
||||
for flg in $$sane_makeflags; do \
|
||||
test $$skip_next = yes && { skip_next=no; continue; }; \
|
||||
case $$flg in \
|
||||
*=*|--*) continue;; \
|
||||
-*I) strip_trailopt 'I'; skip_next=yes;; \
|
||||
-*I?*) strip_trailopt 'I';; \
|
||||
-*O) strip_trailopt 'O'; skip_next=yes;; \
|
||||
-*O?*) strip_trailopt 'O';; \
|
||||
-*l) strip_trailopt 'l'; skip_next=yes;; \
|
||||
-*l?*) strip_trailopt 'l';; \
|
||||
-[dEDm]) skip_next=yes;; \
|
||||
-[JT]) skip_next=yes;; \
|
||||
esac; \
|
||||
case $$flg in \
|
||||
*$$target_option*) has_opt=yes; break;; \
|
||||
esac; \
|
||||
done; \
|
||||
test $$has_opt = yes
|
||||
am__make_dryrun = (target_option=n; $(am__make_running_with_option))
|
||||
am__make_keepgoing = (target_option=k; $(am__make_running_with_option))
|
||||
pkgdatadir = $(datadir)/@PACKAGE@
|
||||
pkgincludedir = $(includedir)/@PACKAGE@
|
||||
pkglibdir = $(libdir)/@PACKAGE@
|
||||
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||
install_sh_DATA = $(install_sh) -c -m 644
|
||||
install_sh_PROGRAM = $(install_sh) -c
|
||||
install_sh_SCRIPT = $(install_sh) -c
|
||||
INSTALL_HEADER = $(INSTALL_DATA)
|
||||
transform = $(program_transform_name)
|
||||
NORMAL_INSTALL = :
|
||||
PRE_INSTALL = :
|
||||
POST_INSTALL = :
|
||||
NORMAL_UNINSTALL = :
|
||||
PRE_UNINSTALL = :
|
||||
POST_UNINSTALL = :
|
||||
build_triplet = @build@
|
||||
host_triplet = @host@
|
||||
subdir = cipher
|
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/build-aux/depcomp
|
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/gpg-error.m4 \
|
||||
$(top_srcdir)/m4/libtool.m4 $(top_srcdir)/m4/lock.m4 \
|
||||
$(top_srcdir)/m4/ltoptions.m4 $(top_srcdir)/m4/ltsugar.m4 \
|
||||
$(top_srcdir)/m4/ltversion.m4 $(top_srcdir)/m4/lt~obsolete.m4 \
|
||||
$(top_srcdir)/m4/noexecstack.m4 $(top_srcdir)/m4/onceonly.m4 \
|
||||
$(top_srcdir)/m4/socklen.m4 $(top_srcdir)/m4/sys_socket_h.m4 \
|
||||
$(top_srcdir)/m4/threadlib.m4 $(top_srcdir)/acinclude.m4 \
|
||||
$(top_srcdir)/configure.ac
|
||||
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||
$(ACLOCAL_M4)
|
||||
mkinstalldirs = $(install_sh) -d
|
||||
CONFIG_HEADER = $(top_builddir)/config.h
|
||||
CONFIG_CLEAN_FILES =
|
||||
CONFIG_CLEAN_VPATH_FILES =
|
||||
LTLIBRARIES = $(noinst_LTLIBRARIES)
|
||||
am__DEPENDENCIES_1 =
|
||||
am_libcipher_la_OBJECTS = cipher.lo cipher-cbc.lo cipher-cfb.lo \
|
||||
cipher-ofb.lo cipher-ctr.lo cipher-aeswrap.lo cipher-ccm.lo \
|
||||
cipher-cmac.lo cipher-gcm.lo cipher-selftest.lo pubkey.lo \
|
||||
pubkey-util.lo md.lo mac.lo mac-hmac.lo mac-cmac.lo \
|
||||
mac-gmac.lo kdf.lo hmac-tests.lo primegen.lo hash-common.lo \
|
||||
dsa-common.lo rsa-common.lo
|
||||
libcipher_la_OBJECTS = $(am_libcipher_la_OBJECTS)
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@)
|
||||
am__v_lt_0 = --silent
|
||||
am__v_lt_1 =
|
||||
AM_V_P = $(am__v_P_@AM_V@)
|
||||
am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
|
||||
am__v_P_0 = false
|
||||
am__v_P_1 = :
|
||||
AM_V_GEN = $(am__v_GEN_@AM_V@)
|
||||
am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@)
|
||||
am__v_GEN_0 = @echo " GEN " $@;
|
||||
am__v_GEN_1 =
|
||||
AM_V_at = $(am__v_at_@AM_V@)
|
||||
am__v_at_ = $(am__v_at_@AM_DEFAULT_V@)
|
||||
am__v_at_0 = @
|
||||
am__v_at_1 =
|
||||
DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)
|
||||
depcomp = $(SHELL) $(top_srcdir)/build-aux/depcomp
|
||||
am__depfiles_maybe = depfiles
|
||||
am__mv = mv -f
|
||||
CPPASCOMPILE = $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)
|
||||
LTCPPASCOMPILE = $(LIBTOOL) $(AM_V_lt) $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CCASFLAGS) $(CCASFLAGS)
|
||||
AM_V_CPPAS = $(am__v_CPPAS_@AM_V@)
|
||||
am__v_CPPAS_ = $(am__v_CPPAS_@AM_DEFAULT_V@)
|
||||
am__v_CPPAS_0 = @echo " CPPAS " $@;
|
||||
am__v_CPPAS_1 =
|
||||
COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
|
||||
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
|
||||
LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \
|
||||
$(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
|
||||
$(AM_CFLAGS) $(CFLAGS)
|
||||
AM_V_CC = $(am__v_CC_@AM_V@)
|
||||
am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@)
|
||||
am__v_CC_0 = @echo " CC " $@;
|
||||
am__v_CC_1 =
|
||||
CCLD = $(CC)
|
||||
LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \
|
||||
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
||||
$(AM_LDFLAGS) $(LDFLAGS) -o $@
|
||||
AM_V_CCLD = $(am__v_CCLD_@AM_V@)
|
||||
am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
|
||||
am__v_CCLD_0 = @echo " CCLD " $@;
|
||||
am__v_CCLD_1 =
|
||||
SOURCES = $(libcipher_la_SOURCES) $(EXTRA_libcipher_la_SOURCES)
|
||||
DIST_SOURCES = $(libcipher_la_SOURCES) $(EXTRA_libcipher_la_SOURCES)
|
||||
am__can_run_installinfo = \
|
||||
case $$AM_UPDATE_INFO_DIR in \
|
||||
n|no|NO) false;; \
|
||||
*) (install-info --version) >/dev/null 2>&1;; \
|
||||
esac
|
||||
am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
|
||||
# Read a list of newline-separated strings from the standard input,
|
||||
# and print each of them once, without duplicates. Input order is
|
||||
# *not* preserved.
|
||||
am__uniquify_input = $(AWK) '\
|
||||
BEGIN { nonempty = 0; } \
|
||||
{ items[$$0] = 1; nonempty = 1; } \
|
||||
END { if (nonempty) { for (i in items) print i; }; } \
|
||||
'
|
||||
# Make sure the list of sources is unique. This is necessary because,
|
||||
# e.g., the same source file might be shared among _SOURCES variables
|
||||
# for different programs/libraries.
|
||||
am__define_uniq_tagged_files = \
|
||||
list='$(am__tagged_files)'; \
|
||||
unique=`for i in $$list; do \
|
||||
if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
|
||||
done | $(am__uniquify_input)`
|
||||
ETAGS = etags
|
||||
CTAGS = ctags
|
||||
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||
ACLOCAL = @ACLOCAL@
|
||||
AMTAR = @AMTAR@
|
||||
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||
AR = @AR@
|
||||
AS = @AS@
|
||||
AUTOCONF = @AUTOCONF@
|
||||
AUTOHEADER = @AUTOHEADER@
|
||||
AUTOMAKE = @AUTOMAKE@
|
||||
AWK = @AWK@
|
||||
BUILD_FILEVERSION = @BUILD_FILEVERSION@
|
||||
BUILD_REVISION = @BUILD_REVISION@
|
||||
BUILD_TIMESTAMP = @BUILD_TIMESTAMP@
|
||||
CC = @CC@
|
||||
CCAS = @CCAS@
|
||||
CCASDEPMODE = @CCASDEPMODE@
|
||||
CCASFLAGS = @CCASFLAGS@
|
||||
CCDEPMODE = @CCDEPMODE@
|
||||
CC_FOR_BUILD = @CC_FOR_BUILD@
|
||||
CFLAGS = @CFLAGS@
|
||||
CPP = @CPP@
|
||||
CPPFLAGS = @CPPFLAGS@
|
||||
CYGPATH_W = @CYGPATH_W@
|
||||
DEFS = @DEFS@
|
||||
DEPDIR = @DEPDIR@
|
||||
DLLTOOL = @DLLTOOL@
|
||||
DL_LIBS = @DL_LIBS@
|
||||
DSYMUTIL = @DSYMUTIL@
|
||||
DUMPBIN = @DUMPBIN@
|
||||
ECHO_C = @ECHO_C@
|
||||
ECHO_N = @ECHO_N@
|
||||
ECHO_T = @ECHO_T@
|
||||
EGREP = @EGREP@
|
||||
EXEEXT = @EXEEXT@
|
||||
FALLBACK_SOCKLEN_T = @FALLBACK_SOCKLEN_T@
|
||||
FGREP = @FGREP@
|
||||
GCRYPT_CIPHERS = @GCRYPT_CIPHERS@
|
||||
GCRYPT_DIGESTS = @GCRYPT_DIGESTS@
|
||||
GCRYPT_HWF_MODULES = @GCRYPT_HWF_MODULES@
|
||||
GCRYPT_KDFS = @GCRYPT_KDFS@
|
||||
GCRYPT_PUBKEY_CIPHERS = @GCRYPT_PUBKEY_CIPHERS@
|
||||
GCRYPT_RANDOM = @GCRYPT_RANDOM@
|
||||
GPG_ERROR_CFLAGS = @GPG_ERROR_CFLAGS@
|
||||
GPG_ERROR_CONFIG = @GPG_ERROR_CONFIG@
|
||||
GPG_ERROR_LIBS = @GPG_ERROR_LIBS@
|
||||
GREP = @GREP@
|
||||
INSERT_SYS_SELECT_H = @INSERT_SYS_SELECT_H@
|
||||
INSTALL = @INSTALL@
|
||||
INSTALL_DATA = @INSTALL_DATA@
|
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||
LD = @LD@
|
||||
LDFLAGS = @LDFLAGS@
|
||||
LIBGCRYPT_CIPHERS = @LIBGCRYPT_CIPHERS@
|
||||
LIBGCRYPT_CONFIG_API_VERSION = @LIBGCRYPT_CONFIG_API_VERSION@
|
||||
LIBGCRYPT_CONFIG_CFLAGS = @LIBGCRYPT_CONFIG_CFLAGS@
|
||||
LIBGCRYPT_CONFIG_HOST = @LIBGCRYPT_CONFIG_HOST@
|
||||
LIBGCRYPT_CONFIG_LIBS = @LIBGCRYPT_CONFIG_LIBS@
|
||||
LIBGCRYPT_DIGESTS = @LIBGCRYPT_DIGESTS@
|
||||
LIBGCRYPT_LT_AGE = @LIBGCRYPT_LT_AGE@
|
||||
LIBGCRYPT_LT_CURRENT = @LIBGCRYPT_LT_CURRENT@
|
||||
LIBGCRYPT_LT_REVISION = @LIBGCRYPT_LT_REVISION@
|
||||
LIBGCRYPT_PUBKEY_CIPHERS = @LIBGCRYPT_PUBKEY_CIPHERS@
|
||||
LIBGCRYPT_THREAD_MODULES = @LIBGCRYPT_THREAD_MODULES@
|
||||
LIBMULTITHREAD = @LIBMULTITHREAD@
|
||||
LIBOBJS = @LIBOBJS@
|
||||
LIBS = @LIBS@
|
||||
LIBTHREAD = @LIBTHREAD@
|
||||
LIBTOOL = @LIBTOOL@
|
||||
LIPO = @LIPO@
|
||||
LN_S = @LN_S@
|
||||
LTLIBMULTITHREAD = @LTLIBMULTITHREAD@
|
||||
LTLIBOBJS = @LTLIBOBJS@
|
||||
LTLIBTHREAD = @LTLIBTHREAD@
|
||||
MAINT = @MAINT@
|
||||
MAKEINFO = @MAKEINFO@
|
||||
MANIFEST_TOOL = @MANIFEST_TOOL@
|
||||
MKDIR_P = @MKDIR_P@
|
||||
MPI_SFLAGS = @MPI_SFLAGS@
|
||||
NM = @NM@
|
||||
NMEDIT = @NMEDIT@
|
||||
NOEXECSTACK_FLAGS = @NOEXECSTACK_FLAGS@
|
||||
OBJDUMP = @OBJDUMP@
|
||||
OBJEXT = @OBJEXT@
|
||||
OTOOL = @OTOOL@
|
||||
OTOOL64 = @OTOOL64@
|
||||
PACKAGE = @PACKAGE@
|
||||
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_STRING = @PACKAGE_STRING@
|
||||
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||
PACKAGE_URL = @PACKAGE_URL@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||
PTH_CFLAGS = @PTH_CFLAGS@
|
||||
PTH_CONFIG = @PTH_CONFIG@
|
||||
PTH_LIBS = @PTH_LIBS@
|
||||
RANLIB = @RANLIB@
|
||||
RC = @RC@
|
||||
RUN_LARGE_DATA_TESTS = @RUN_LARGE_DATA_TESTS@
|
||||
SED = @SED@
|
||||
SET_MAKE = @SET_MAKE@
|
||||
SHELL = @SHELL@
|
||||
STRIP = @STRIP@
|
||||
SYS_SOCKET_H = @SYS_SOCKET_H@
|
||||
VERSION = @VERSION@
|
||||
VERSION_NUMBER = @VERSION_NUMBER@
|
||||
abs_builddir = @abs_builddir@
|
||||
abs_srcdir = @abs_srcdir@
|
||||
abs_top_builddir = @abs_top_builddir@
|
||||
abs_top_srcdir = @abs_top_srcdir@
|
||||
ac_ct_AR = @ac_ct_AR@
|
||||
ac_ct_CC = @ac_ct_CC@
|
||||
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||
am__include = @am__include@
|
||||
am__leading_dot = @am__leading_dot@
|
||||
am__quote = @am__quote@
|
||||
am__tar = @am__tar@
|
||||
am__untar = @am__untar@
|
||||
bindir = @bindir@
|
||||
build = @build@
|
||||
build_alias = @build_alias@
|
||||
build_cpu = @build_cpu@
|
||||
build_os = @build_os@
|
||||
build_vendor = @build_vendor@
|
||||
builddir = @builddir@
|
||||
datadir = @datadir@
|
||||
datarootdir = @datarootdir@
|
||||
docdir = @docdir@
|
||||
dvidir = @dvidir@
|
||||
emacs_local_vars_begin = @emacs_local_vars_begin@
|
||||
emacs_local_vars_end = @emacs_local_vars_end@
|
||||
emacs_local_vars_read_only = @emacs_local_vars_read_only@
|
||||
exec_prefix = @exec_prefix@
|
||||
host = @host@
|
||||
host_alias = @host_alias@
|
||||
host_cpu = @host_cpu@
|
||||
host_os = @host_os@
|
||||
host_vendor = @host_vendor@
|
||||
htmldir = @htmldir@
|
||||
includedir = @includedir@
|
||||
infodir = @infodir@
|
||||
install_sh = @install_sh@
|
||||
libdir = @libdir@
|
||||
libexecdir = @libexecdir@
|
||||
localedir = @localedir@
|
||||
localstatedir = @localstatedir@
|
||||
mandir = @mandir@
|
||||
mkdir_p = @mkdir_p@
|
||||
oldincludedir = @oldincludedir@
|
||||
pdfdir = @pdfdir@
|
||||
prefix = @prefix@
|
||||
program_transform_name = @program_transform_name@
|
||||
psdir = @psdir@
|
||||
sbindir = @sbindir@
|
||||
sharedstatedir = @sharedstatedir@
|
||||
srcdir = @srcdir@
|
||||
sysconfdir = @sysconfdir@
|
||||
target_alias = @target_alias@
|
||||
top_build_prefix = @top_build_prefix@
|
||||
top_builddir = @top_builddir@
|
||||
top_srcdir = @top_srcdir@
|
||||
EXTRA_DIST = Manifest
|
||||
|
||||
# Need to include ../src in addition to top_srcdir because gcrypt.h is
|
||||
# a built header.
|
||||
AM_CPPFLAGS = -I../src -I$(top_srcdir)/src
|
||||
AM_CFLAGS = $(GPG_ERROR_CFLAGS)
|
||||
AM_CCASFLAGS = $(NOEXECSTACK_FLAGS)
|
||||
noinst_LTLIBRARIES = libcipher.la
|
||||
GCRYPT_MODULES = @GCRYPT_CIPHERS@ @GCRYPT_PUBKEY_CIPHERS@ \
|
||||
@GCRYPT_DIGESTS@ @GCRYPT_KDFS@
|
||||
|
||||
libcipher_la_DEPENDENCIES = $(GCRYPT_MODULES)
|
||||
libcipher_la_LIBADD = $(GCRYPT_MODULES)
|
||||
libcipher_la_SOURCES = \
|
||||
cipher.c cipher-internal.h \
|
||||
cipher-cbc.c cipher-cfb.c cipher-ofb.c cipher-ctr.c cipher-aeswrap.c \
|
||||
cipher-ccm.c cipher-cmac.c cipher-gcm.c \
|
||||
cipher-selftest.c cipher-selftest.h \
|
||||
pubkey.c pubkey-internal.h pubkey-util.c \
|
||||
md.c \
|
||||
mac.c mac-internal.h \
|
||||
mac-hmac.c mac-cmac.c mac-gmac.c \
|
||||
kdf.c kdf-internal.h \
|
||||
hmac-tests.c \
|
||||
bithelp.h \
|
||||
bufhelp.h \
|
||||
primegen.c \
|
||||
hash-common.c hash-common.h \
|
||||
dsa-common.c rsa-common.c \
|
||||
rmd.h
|
||||
|
||||
EXTRA_libcipher_la_SOURCES = \
|
||||
arcfour.c \
|
||||
blowfish.c blowfish-amd64.S blowfish-arm.S \
|
||||
cast5.c cast5-amd64.S cast5-arm.S \
|
||||
crc.c \
|
||||
des.c \
|
||||
dsa.c \
|
||||
elgamal.c \
|
||||
ecc.c ecc-curves.c ecc-misc.c ecc-common.h \
|
||||
ecc-ecdsa.c ecc-eddsa.c ecc-gost.c \
|
||||
idea.c \
|
||||
gost28147.c gost.h \
|
||||
gostr3411-94.c \
|
||||
md4.c \
|
||||
md5.c \
|
||||
rijndael.c rijndael-tables.h rijndael-amd64.S rijndael-arm.S \
|
||||
rmd160.c \
|
||||
rsa.c \
|
||||
salsa20.c salsa20-amd64.S salsa20-armv7-neon.S \
|
||||
scrypt.c \
|
||||
seed.c \
|
||||
serpent.c serpent-sse2-amd64.S serpent-avx2-amd64.S serpent-armv7-neon.S \
|
||||
sha1.c sha1-ssse3-amd64.S \
|
||||
sha256.c sha256-ssse3-amd64.S \
|
||||
sha512.c sha512-ssse3-amd64.S sha512-avx-amd64.S sha512-avx2-bmi2-amd64.S \
|
||||
sha512-armv7-neon.S \
|
||||
stribog.c \
|
||||
tiger.c \
|
||||
whirlpool.c \
|
||||
twofish.c twofish-amd64.S twofish-arm.S \
|
||||
rfc2268.c \
|
||||
camellia.c camellia.h camellia-glue.c camellia-aesni-avx-amd64.S \
|
||||
camellia-aesni-avx2-amd64.S camellia-arm.S
|
||||
|
||||
@ENABLE_O_FLAG_MUNGING_FALSE@o_flag_munging = cat
|
||||
@ENABLE_O_FLAG_MUNGING_TRUE@o_flag_munging = sed -e 's/-O\([2-9s][2-9s]*\)/-O1/' -e 's/-Ofast/-O1/g'
|
||||
all: all-am
|
||||
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .S .c .lo .o .obj
|
||||
$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
|
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu cipher/Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --gnu cipher/Makefile
|
||||
.PRECIOUS: Makefile
|
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||
esac;
|
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
|
||||
$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
|
||||
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||
$(am__aclocal_m4_deps):
|
||||
|
||||
clean-noinstLTLIBRARIES:
|
||||
-test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
|
||||
@list='$(noinst_LTLIBRARIES)'; \
|
||||
locs=`for p in $$list; do echo $$p; done | \
|
||||
sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
|
||||
sort -u`; \
|
||||
test -z "$$locs" || { \
|
||||
echo rm -f $${locs}; \
|
||||
rm -f $${locs}; \
|
||||
}
|
||||
|
||||
libcipher.la: $(libcipher_la_OBJECTS) $(libcipher_la_DEPENDENCIES) $(EXTRA_libcipher_la_DEPENDENCIES)
|
||||
$(AM_V_CCLD)$(LINK) $(libcipher_la_OBJECTS) $(libcipher_la_LIBADD) $(LIBS)
|
||||
|
||||
mostlyclean-compile:
|
||||
-rm -f *.$(OBJEXT)
|
||||
|
||||
distclean-compile:
|
||||
-rm -f *.tab.c
|
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arcfour.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blowfish-amd64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blowfish-arm.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/blowfish.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camellia-aesni-avx-amd64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camellia-aesni-avx2-amd64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camellia-arm.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camellia-glue.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/camellia.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cast5-amd64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cast5-arm.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cast5.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher-aeswrap.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher-cbc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher-ccm.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher-cfb.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher-cmac.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher-ctr.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher-gcm.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher-ofb.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher-selftest.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cipher.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/crc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/des.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsa-common.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/dsa.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecc-curves.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecc-ecdsa.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecc-eddsa.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecc-gost.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecc-misc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ecc.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/elgamal.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gost28147.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gostr3411-94.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hash-common.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hmac-tests.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/idea.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kdf.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mac-cmac.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mac-gmac.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mac-hmac.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mac.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md4.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/md5.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/primegen.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pubkey-util.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/pubkey.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rfc2268.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rijndael-amd64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rijndael-arm.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rijndael.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmd160.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsa-common.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rsa.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/salsa20-amd64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/salsa20-armv7-neon.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/salsa20.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scrypt.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/seed.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serpent-armv7-neon.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serpent-avx2-amd64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serpent-sse2-amd64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/serpent.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1-ssse3-amd64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha1.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha256-ssse3-amd64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha256.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha512-armv7-neon.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha512-avx-amd64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha512-avx2-bmi2-amd64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha512-ssse3-amd64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sha512.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stribog.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tiger.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twofish-amd64.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twofish-arm.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/twofish.Plo@am__quote@
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/whirlpool.Plo@am__quote@
|
||||
|
||||
.S.o:
|
||||
@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ $<
|
||||
|
||||
.S.obj:
|
||||
@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(CPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(CPPASCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.S.lo:
|
||||
@am__fastdepCCAS_TRUE@ $(AM_V_CPPAS)$(LTCPPASCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCCAS_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCCAS_FALSE@ DEPDIR=$(DEPDIR) $(CCASDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCCAS_FALSE@ $(AM_V_CPPAS@am__nodep@)$(LTCPPASCOMPILE) -c -o $@ $<
|
||||
|
||||
.c.o:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $<
|
||||
|
||||
.c.obj:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'`
|
||||
|
||||
.c.lo:
|
||||
@am__fastdepCC_TRUE@ $(AM_V_CC)$(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $<
|
||||
@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
|
||||
@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
|
||||
@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $<
|
||||
|
||||
mostlyclean-libtool:
|
||||
-rm -f *.lo
|
||||
|
||||
clean-libtool:
|
||||
-rm -rf .libs _libs
|
||||
|
||||
ID: $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); mkid -fID $$unique
|
||||
tags: tags-am
|
||||
TAGS: tags
|
||||
|
||||
tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
set x; \
|
||||
here=`pwd`; \
|
||||
$(am__define_uniq_tagged_files); \
|
||||
shift; \
|
||||
if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \
|
||||
test -n "$$unique" || unique=$$empty_fix; \
|
||||
if test $$# -gt 0; then \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
"$$@" $$unique; \
|
||||
else \
|
||||
$(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
|
||||
$$unique; \
|
||||
fi; \
|
||||
fi
|
||||
ctags: ctags-am
|
||||
|
||||
CTAGS: ctags
|
||||
ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files)
|
||||
$(am__define_uniq_tagged_files); \
|
||||
test -z "$(CTAGS_ARGS)$$unique" \
|
||||
|| $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
|
||||
$$unique
|
||||
|
||||
GTAGS:
|
||||
here=`$(am__cd) $(top_builddir) && pwd` \
|
||||
&& $(am__cd) $(top_srcdir) \
|
||||
&& gtags -i $(GTAGS_ARGS) "$$here"
|
||||
cscopelist: cscopelist-am
|
||||
|
||||
cscopelist-am: $(am__tagged_files)
|
||||
list='$(am__tagged_files)'; \
|
||||
case "$(srcdir)" in \
|
||||
[\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
|
||||
*) sdir=$(subdir)/$(srcdir) ;; \
|
||||
esac; \
|
||||
for i in $$list; do \
|
||||
if test -f "$$i"; then \
|
||||
echo "$(subdir)/$$i"; \
|
||||
else \
|
||||
echo "$$sdir/$$i"; \
|
||||
fi; \
|
||||
done >> $(top_builddir)/cscope.files
|
||||
|
||||
distclean-tags:
|
||||
-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
|
||||
|
||||
distdir: $(DISTFILES)
|
||||
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||
list='$(DISTFILES)'; \
|
||||
dist_files=`for file in $$list; do echo $$file; done | \
|
||||
sed -e "s|^$$srcdirstrip/||;t" \
|
||||
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||
case $$dist_files in \
|
||||
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||
sort -u` ;; \
|
||||
esac; \
|
||||
for file in $$dist_files; do \
|
||||
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||
if test -d $$d/$$file; then \
|
||||
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||
if test -d "$(distdir)/$$file"; then \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||
fi; \
|
||||
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||
else \
|
||||
test -f "$(distdir)/$$file" \
|
||||
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||
|| exit 1; \
|
||||
fi; \
|
||||
done
|
||||
check-am: all-am
|
||||
check: check-am
|
||||
all-am: Makefile $(LTLIBRARIES)
|
||||
installdirs:
|
||||
install: install-am
|
||||
install-exec: install-exec-am
|
||||
install-data: install-data-am
|
||||
uninstall: uninstall-am
|
||||
|
||||
install-am: all-am
|
||||
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||
|
||||
installcheck: installcheck-am
|
||||
install-strip:
|
||||
if test -z '$(STRIP)'; then \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
install; \
|
||||
else \
|
||||
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||
"INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
|
||||
fi
|
||||
mostlyclean-generic:
|
||||
|
||||
clean-generic:
|
||||
|
||||
distclean-generic:
|
||||
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||
|
||||
maintainer-clean-generic:
|
||||
@echo "This command is intended for maintainers to use"
|
||||
@echo "it deletes files that may require special tools to rebuild."
|
||||
clean: clean-am
|
||||
|
||||
clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
|
||||
mostlyclean-am
|
||||
|
||||
distclean: distclean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
distclean-am: clean-am distclean-compile distclean-generic \
|
||||
distclean-tags
|
||||
|
||||
dvi: dvi-am
|
||||
|
||||
dvi-am:
|
||||
|
||||
html: html-am
|
||||
|
||||
html-am:
|
||||
|
||||
info: info-am
|
||||
|
||||
info-am:
|
||||
|
||||
install-data-am:
|
||||
|
||||
install-dvi: install-dvi-am
|
||||
|
||||
install-dvi-am:
|
||||
|
||||
install-exec-am:
|
||||
|
||||
install-html: install-html-am
|
||||
|
||||
install-html-am:
|
||||
|
||||
install-info: install-info-am
|
||||
|
||||
install-info-am:
|
||||
|
||||
install-man:
|
||||
|
||||
install-pdf: install-pdf-am
|
||||
|
||||
install-pdf-am:
|
||||
|
||||
install-ps: install-ps-am
|
||||
|
||||
install-ps-am:
|
||||
|
||||
installcheck-am:
|
||||
|
||||
maintainer-clean: maintainer-clean-am
|
||||
-rm -rf ./$(DEPDIR)
|
||||
-rm -f Makefile
|
||||
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||
|
||||
mostlyclean: mostlyclean-am
|
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic \
|
||||
mostlyclean-libtool
|
||||
|
||||
pdf: pdf-am
|
||||
|
||||
pdf-am:
|
||||
|
||||
ps: ps-am
|
||||
|
||||
ps-am:
|
||||
|
||||
uninstall-am:
|
||||
|
||||
.MAKE: install-am install-strip
|
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
|
||||
clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \
|
||||
ctags-am distclean distclean-compile distclean-generic \
|
||||
distclean-libtool distclean-tags distdir dvi dvi-am html \
|
||||
html-am info info-am install install-am install-data \
|
||||
install-data-am install-dvi install-dvi-am install-exec \
|
||||
install-exec-am install-html install-html-am install-info \
|
||||
install-info-am install-man install-pdf install-pdf-am \
|
||||
install-ps install-ps-am install-strip installcheck \
|
||||
installcheck-am installdirs maintainer-clean \
|
||||
maintainer-clean-generic mostlyclean mostlyclean-compile \
|
||||
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||
tags tags-am uninstall uninstall-am
|
||||
|
||||
|
||||
# We need to lower the optimization for this module.
|
||||
tiger.o: $(srcdir)/tiger.c
|
||||
`echo $(COMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) `
|
||||
|
||||
tiger.lo: $(srcdir)/tiger.c
|
||||
`echo $(LTCOMPILE) -c $(srcdir)/tiger.c | $(o_flag_munging) `
|
||||
|
||||
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||
.NOEXPORT:
|
||||
@@ -1,73 +0,0 @@
|
||||
# Manifest - checksums of the cipher directory
|
||||
# Copyright 2003 Free Software Foundation, Inc.
|
||||
#
|
||||
# This file is part of Libgcrypt.
|
||||
#
|
||||
# Libgcrypt is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Lesser general Public License as
|
||||
# published by the Free Software Foundation; either version 2.1 of
|
||||
# the License, or (at your option) any later version.
|
||||
#
|
||||
# Libgcrypt is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU Lesser General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU Lesser General Public
|
||||
# License along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
|
||||
# Checksums for all source files in this directory. Format is
|
||||
# filename, blanks, base-64 part of an OpenPGP detached signature
|
||||
# without the header lines. Blank lines and lines beginning with a
|
||||
# hash mark are ignored. A tool to process this file is available by
|
||||
# cvs -d :pserver:anoncvs@cvs.gnupg.org:/cvs/wk co misc-scripts/manifest-tool
|
||||
#
|
||||
# The special entry "$names$" holds a signature over all sorted
|
||||
# filenames excluding itself.
|
||||
|
||||
|
||||
# Algorithm API
|
||||
cipher.c iQCVAwUAQDzrVjEAnp832S/7AQIPDgP+OVJ/YNWY5m7c09EBbPAzL/WsGoj6wrBNMmkRlMOqTHeh+OOtjuFHt1f9uhfM2Nzl7sJ5+h4ryZKLEZmQPRMTZTnAqkvGdsrJWJnigUA9QwYdV0ONqC9C63gpuG465gO9TZVOqlQu/FTxSRuTQYUulkaBNG71n8nZEOusBVwV2YA==58xH
|
||||
pubkey.c iQCVAwUAP9XQ3jEAnp832S/7AQJ5UgQAyHfEBvPVJ8wTRg8c7ixS2GiVmIgwIo5tvQaiQJTPWASevvYrB+2Z2qa9cATyu50ACjLzbaquGBgPzjJV3dU/qttT1gCqRuN/LCNvXFe5qnIZezejc3RAadFNTw/pOTHq0wxD1Keg66ruei9R36Nba59pEQIWIBXTfubRft2hMYk==E09t
|
||||
ac.c iQCVAwUAQDzsOzEAnp832S/7AQJCBQP/WI6EV/dsR4rmha6RVhvkjZo17kQ8z6pIl5J3cXOvqEkIFeD2HYu3HHrWST5l7yXlffhpDkVHkfMih4ruK76q6Fm0dxZ98pO4C/dVtgimlvvcy/wOQjpzsE0fYAe1BYdg81LJ09X33vW5x6C29lunfKROO2tPlV5i8ffeoFvmMF8==j26g
|
||||
md.c iQCVAwUAP+NFGjEAnp832S/7AQJs8wP/Qdk0EAKsyr3O1/pmOSN8AG4rPKbd6KDTzvoBPAN4upFwKYY4hWwvy12Q3YU9DmECrzZkRCXHR7mljVQKs6B7CRZJKjFKmOELpcJDtKvu40vTs1bOH4k9iJYZpGgRA83nkQ+ELAcphAbCA+KIpVr2K4mCJAB0FhpC2uOQ50JHAko==BeF6
|
||||
primegen.c iQCVAwUAQDzsoDEAnp832S/7AQKYRwP/TqAQBm1rHTnF0HYE05PqXfWlOqa6EosqVpaOcs/OIW6PaqX0xH1UlrukK7jNOjK3xC4o1qNQ1UKzz2dvQaq1bMvNNizeavxAh10SJZc0hIc/ofc83IbjLh8SZVWQ67JxjsUd3DOXmSmhPZ+Pqd7cUIiw8fDoF+I9EZqy3COu1wY==1ebT
|
||||
|
||||
# Algorithm implementations
|
||||
arcfour.c iQCVAwUAP9XR/TEAnp832S/7AQJcRwP6AlvYEx++fpT4mIYo0xRDqKEQeqMQvbaRhIg2eV74JxItpHa3q5YsYIl+n1yUz5g35JRWWXSWmAZBwO5wLKsHii4kRUhgrKWnSoQZoPpl49L5+N3R58ON3S0ru5lsBiEJEze3xplf2vqwrH9v1QHVD+gU7UTlfNqrIJoOUXN+1O4==Tq+x
|
||||
blowfish.c iQCVAwUAP9XTETEAnp832S/7AQJaEgQAgiqqfuO+zQtscgTB0rvOzVymIKjRKjYhFuLjVuc79G4z1RCAffvIn/YM2d7kt+Z/QF7zjcTAOgETCQL1XokpX2zz9HPAMi2tlDY5zsDufTNqj0n4WBL9nM7w6XAvsiwP1B3bqCTv9SjJV4KbxJ58vw1yQE+sqW74R/QIHFvC7mU==wZnX
|
||||
cast5.c iQCVAwUAP9XT6DEAnp832S/7AQJ3xgP/ehLjEN3GELGudbqeo91Xd+PqitHrkuBbtRIYX7Udd/fyXLN+h8rMJVyIQX2m+mpxbBxudVU3x8/DNT8B0ZHAwK6qqJmEBLLhEYPgIuF76i9LMrP1KqUPhAwRZ2OppjIIugBQ+rP74aD4eLyd/aKQHNuXML8QGWR6KwQShohXM5I==/BRh
|
||||
crc.c iQCVAwUAP7ouejEAnp832S/7AQIgwQQApg5Nm63tH5DQkbN+zPzMO9Ygoj3ukxfFTyTBPYSXYKMiTjEbESegaU40uN8jnz2vprcIQWcgZfzO4+opEJMcI35aPwzEk0vKOp0S/PrBLUY2rJfnDVkX5XgJFZa2Q7LLe826UEBzTVYW924utiCCe8oOaOEWVNpg1mqdknu3M9o==kz5D
|
||||
des.c iQCVAwUAQCN2oDEAnp832S/7AQL/jwP6Auoq6nZCDBjpgc9tDzuIRwa9DqyuM3gX94uvgEpUwdHszb2bG43dz03kVmcYxtj1MzXbyCeCZOwox0b2SKmLgxIbrNP6yGbzVdTj6592gDYuf/ZXmc1ZNJ1DDldcPQ0n9fXUipUPwyPaNWo3mSZaNcMKSWWzdK0J6ciG6nk7SWI==9k/t
|
||||
dsa.c iQCVAwUAP9XZHDEAnp832S/7AQLBRgP/XrBzTEYx5ccMj1MMb6sg37liEHdIyyy49zjvt6jUqxj4RuwVEN8S6v3u4q/QyJkHAi1E0EkREgENlyHW6PKWhYbcrd0vPIAN15yjnl2yqtrCrJImexUCoqJJewK0E4JOicGbabTil8MZjk+mbhEPnjJBqOkyP1w0i31pEDgE/8M==pC8s
|
||||
elgamal.c iQCVAwUAP9XbYzEAnp832S/7AQLXagQA3HrvspZfbTGgmUH0IqLQTJ0exUPxJv5DET2TvoIy62trDmMN6lTAj5P+a7jQ8udcu0w+mR2vXUHcxUpNA2PxLaMwGzNSY4zRDNe9r3SFTDrFm6m4y9Ko2e8XtEA+WF6P/XLpck4Jn7vMEDmVGPwkNd22kXFFE8dBGwG6i5Hk1Mk==oBUs
|
||||
md4.c iQCVAwUAP9h50DEAnp832S/7AQJhHgQAzNA/B6MWFDlCtPkIVaW8RpP1Eg0ZNMsy0s7SJkopOCBlu6CwXUOKe+8ppcSxhjYKh4i4uQr/QtfipYlBjzKJGnrafoF/NugXNCOHSTGT11TvK7mCiBuUMVgvZGAlOJImk6eTTfUjRrMfaXM/SWl8bdJ4ZpzdjEyVh89r7I5JrGk==x2UD
|
||||
md5.c iQCVAwUAP9h7LzEAnp832S/7AQJUGQP/c0cbf6WZXCzmjufHxiE9FAQBzTsA0WtaNqdFcHl7fhmikGtknlaED8n5a7eYd/C481UQW6Wgq/oZdsvgoPWPhG3fOCy2CFP9cZVXITuMSf0ucyZTFUJNO15fnZ+nDfsUv+JPdv1aSeRinAUtfAcSKfkSyR9BCPZvkx+tgU6cphU==Zv+h
|
||||
rijndael.c iQCVAwUAP9h9cTEAnp832S/7AQKF1AP+P2L/tPqDJRDg+/fwbOk8Ts0MNxnvvYEm3gE73TKuLt1S+B2+jkrZcKNvM5VGPnVMJbnS0lmIK04nmedHCOftGTOwhGulZAHHIaKGystT3Jql4iPws/JMgAjE7Fyxh5WZMtB9yEljKBpJ5XNqhrMvvxcHpnyP3+YzIXNwzk34V+c==dJ5k
|
||||
rmd160.c iQCVAwUAP9h+bTEAnp832S/7AQK1OgP+PNKF6Nzi6X93easVlksdLqKEsArCAw2QjGWDGyxTnbiJM55qAl9JxR1mn3V+oOL7izLLwTt6EYK9evhzfcxY5N5Mni85RAcsLPsuAfQDEzjI6GUWHtQUKPbM+BaorzfhQjYFSZyvum/dZYJ/WfiwwwhqqIKyVU2ZFSqA38YGC/c==9jdA
|
||||
rsa.c iQCVAwUAP9iHIzEAnp832S/7AQKAYwQAuWtnMte54QHN+Hij9t4sGuypXogajOb1vQQwGgS0fKsaBZsuSP2amze4o5diIvsQTsFQ4CzjvqoCVuBDoHM3xkSD8wGDizgvtCamAxkdbF7wmzldKFn8SpJqlVwWQMP6kk1IjXHEuYb4IDWGTbVMhfEu+eOlU8+PSK4IhZqNvt4==/3hp
|
||||
serpent.c iQCVAwUAP9h/VzEAnp832S/7AQLyCwP/d1zbmb7l/PriZNa9/Z7mo01XFe5MnAqCfIwhl9GjeaMszcoS37jECNq5nLvrTTFIIJpm3rvBePwiCG4Wwx1I18HCxaP198pcSaR+BLOJ3Aj52EZPrxtqlDKuFr38ZOP5giyUqUYVYGVdrz4kRMNWAZQK53GeJnGhXCnhxojLEgA==ck46
|
||||
sha1.c iQCVAwUAP9iATTEAnp832S/7AQKcSwQAwAs/HnNqho3lU1ZUgCPNt5P2/Brm6W21+wWWGKJkSrra/c4NYVKJGDDwlsFE0b9ln1uZt7bHReFkKXK3JnrKTmNVcx/Cy64iCMRNMhaM72Mqy7wWx5yHBAmMBxzFGnNQKbmeY52zeGih5HsNLSibc2pPuOViWo2JPJ5Ci/wIwl8==/wtO
|
||||
sha256.c iQCVAwUAP9iAtzEAnp832S/7AQJD2QP/UqvL0hhjG1wEFbGrdkV9tba1sMDXdnnK6X7HdLuRpVAgNiQiFf8JDmntd/dZ2Q71p4Uae2ctqve4WoEijPUZPjACnpuZfx0SEQL0lQBkwxzJp7lz9ujVtwQ2cM/aYexJkXcWgGcloJNLM3JbWPGIJnuYbr/IwJ6RQF9vgj0357o==UWO1
|
||||
sha512.c iQCVAwUAP9iBTDEAnp832S/7AQIPBAQA28CJSUQLiW0s2x9u8/OH2eKnxPjA4sZmb50WP7920Lem66P31C3BrOqwfBot4RLhjL+zh/+Uc4s3HPwApZuj9E4BxNMlqLv+Tqk++DAbdaOeYT4jeUt+mlhQQ6mH/RDsy32rZsNsGQ2bUGxazZmfG++PL3JyhawqCy00SUDr/o0==H+0X
|
||||
tiger.c iQCVAwUAP9iCfjEAnp832S/7AQKufwP/fryv3MqSOYY+90325DH7X3/CtekxeooN0scGsHX0fxBakWSMecTNrj33KPddLS46gU/S89zIc2N/Bw/7EVIAXVFA3/3Ip+OrFOuIMO4Py1sCdB8o2Y+5ygv8iXLcsXIq1O0av79i9g774V3uaXa2qN9ZnXe0AEhcy8FHJ2i/wro==5XVB
|
||||
twofish.c iQCVAwUAP9iD6TEAnp832S/7AQKUnQP/Rq8FaYeHTG7HbZuqAs9pbPitzjDbkdZddmInWR7NmevBkKvhsJALjVooc0KGQfo2lAAmy3Xi/4QQN8VPn51DVjDIgf7x+DQh/9TFJHMccxI9asUgi4+TNnmMqLU1k3N8S2PjyZ1sjeC8B79fKPpwCzj72WkqPkzZw3l2jArr+dU==NdJT
|
||||
rfc2268.c iQCVAwUAQCN+3jEAnp832S/7AQLv1gQA1hJh29hAjKi4uLSGxXvJ6cyYmPdmevdKrbLnuHZWtHe4xvCgy/nTdEojEpxgLp/hL/ogasuWRC1W16Wiz9ryxf7YR0uhZWayO/bQNagpfU5MIkJTLuKqqgpwYumCSQfOugXVAqcgEzj+13eeyJaFVrzwrNa67sh84nmbjOjNjvE==0zBq
|
||||
|
||||
# Random number related
|
||||
random.c iQCVAwUAP7nsITEAnp832S/7AQK4SAQAtvfUgrtGOQ2PlxGMla0qJLPHjJacMwgq0ecusiI79elPdDsFfCCk6dK1Ug2kFbNm22nCGHNcUquqbX7noi7ZVQnmPBQXzyLNZd7GmrawRZfdlRerTUDBpSnR8V8ui/5+YYp627E7kKGC0hPSgqXFql6oBMIfno0LZwFJTjIevRY==L419
|
||||
random.h iQCVAwUAP7ovKDEAnp832S/7AQJ3bQQAjnPebnyTC7sphAv2I7uIz+yPgw1ZfbVhLv+OiWDlO9ish+fRyyMpy+HELBOgZjJdgRegqhlZC6qyns5arM/VglYi+PzvdLO3hIqHE/YFfpIFPz8wBrcmlqrYyd3CsGqcYsfjocXNttCBLeSWmoJ09ltKQH8yzJf3oAgN6X1yuc4==eNoU
|
||||
rand-internal.h iQCVAwUAP7ouvDEAnp832S/7AQLYnAQAhdI7ERoJVCkV8GiV7MjaUxv1WIL7iZ+jIOvVhv4fNyhCGCGoEtTjkyput/lj7Nsh3FXEqRhypGGrCLf47x/gua5n+BwffogxVyUDqiOyyGhNTPpe3fQcNBvbPCtco8yMK4GJO5G3BqzlPyN+BMeogLymyV6Sm1mvh5LZDyAFbfQ==tZSE
|
||||
rndlinux.c iQCVAwUAP9iPYTEAnp832S/7AQL6/AP/ZDrbOkVuB9qJ7sKeX1MImZEsz3mi0xPovJzaBtBU7a0idcUKrWYOvQFWRlLUeq0iCT6+h2l5bniP7q7hepzlKa+VPY9VWaQthqeJm2l5LN6QQ5PyMfBq04QuBncw9BJnCGmEyTLt3RxIXBAPdxmiVxtcRIFUqCBtQvoUXGLvemw==t37k
|
||||
rndegd.c iQCVAwUAP9iPRDEAnp832S/7AQImBQP/WHKg+hKXcm1pQvilzML0jZpwK5PAMM4uBnnPJNIXWOYBO6I/Xg9d/tPLg8NlmmtyQCo2Eu0ybDSt+8mu+dWveAys+0LTi0MIqeP9BMzCKz8dnWH6+S8huLXwTF3m0IrqM0JLb6b71GK9SOq6sWQ22yW5vf61hXP8kH9dhIaoMZs==FaHV
|
||||
rndunix.c iQCVAwUAP9iQlzEAnp832S/7AQL/KgQA29GnvcD4Xb5qjDMBgW9THEE4+4lfex/6k+Fh0IT61OLJsWVLJ7bJpRntburw4uQm4Tf7CO8vaiDFDYhKKrzXeOF1fmdpcL8hA+fNp9I/MUOc4e9kN9+YJ9wikVa0SZj1OBfhzgcFLd1xOtulkr3ii52HLF9vhrxzkgVwvD10Bi8==2cML
|
||||
rndw32.c iQCVAwUAP9iRKDEAnp832S/7AQIuaAQA3AJr3WqnxNDsWCIdvehf8Suotthj+laX8nJsvDfFhXPKcXDpsg0wTTXSnnKgyED53+uYiMDnVRsxeWAyhKwvx1MjjlaSMMjzbH6isWTH8FaWpLgrxEkXoPeNqYf5FXpdUkcUxGX2RkQeuX/cIfiHLNE9CV0usaF2jysjBX2iERY==EEnO
|
||||
|
||||
# Helper
|
||||
bithelp.h iQCVAwUAP7ouPTEAnp832S/7AQKXggQAqjcgvihIF3WclOgw1JV2rbARw4ISIDRMFqdaNCqBRx6BwEz3UGsEIlz6+iR1sS/reqN61WvtjLb+D0+tujAkGrgQJhFLG85WtG2tB5UVoI3am1fpkwiRm+bR4rv0rGk0BYk81bC7+l4KrK9o5lVp4lCsrorlUKsd48lNmBHyAXM==mDDN
|
||||
rmd.h iQCVAwUAP7oumjEAnp832S/7AQJiJQP/V4bJwjZaYndJzV+KRnIDbl1koHuw+ZK5heMYVu8Qk4ylqv//BGyeRa3jZCcfPHI35q6HilCs2VBm8hiBMjHSqY/VPn2ZQ0yg/lt6qEvl7YjsLmyMICvjG+ncszHoq9pRvnF3vTnM18sPIioXLk8fskuM0XOCNBs0ARBAQjY9UGI==olUN
|
||||
|
||||
# Configuration
|
||||
Makefile.am iQCVAwUAQCN33TEAnp832S/7AQKFJAQAz7BDkC814q+QiuE/jnutJHR5qlgbrm3ikGbQwdRzYUscst4bCCWy3uKL/sIPGLg+JQXtF5FnsQy3s4D9BOYhp72cA9ktYK65hhi4pNm/JQ0lXkZMNfk8Go5lNzKezlWwHvkMwRXR0Fep0wPdyeaKW5BfaW2ABvgep6Bp+hHEbyg==zSyi
|
||||
$names$ iQCVAwUAQCN3EDEAnp832S/7AQJXLAP8DvHTpm5DkTF35EmzeKpi9ie59AZcZanD19ir/e/7+PaQxr2riuLHDGwFKTju+dcvvBsqrygXOC378GXVWzIF2OZwS4EdDcJ+pgojo9UpsqpKsJHouY4Ugx5cQialxba462kUn8hcihSBnMyc4LzbJ5WQ4puQuqy544d2x94+2ms==G4Ls
|
||||
@@ -1,185 +0,0 @@
|
||||
/* arcfour.c - The arcfour stream cipher
|
||||
* Copyright (C) 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of Libgcrypt.
|
||||
*
|
||||
* Libgcrypt is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser general Public License as
|
||||
* published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* Libgcrypt is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*
|
||||
* For a description of the algorithm, see:
|
||||
* Bruce Schneier: Applied Cryptography. John Wiley & Sons, 1996.
|
||||
* ISBN 0-471-11709-9. Pages 397 ff.
|
||||
*/
|
||||
|
||||
|
||||
#include <config.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include "types.h"
|
||||
#include "g10lib.h"
|
||||
#include "cipher.h"
|
||||
|
||||
static const char *selftest(void);
|
||||
|
||||
typedef struct {
|
||||
byte sbox[256];
|
||||
int idx_i, idx_j;
|
||||
} ARCFOUR_context;
|
||||
|
||||
static void
|
||||
do_encrypt_stream( ARCFOUR_context *ctx,
|
||||
byte *outbuf, const byte *inbuf, size_t length )
|
||||
{
|
||||
#ifndef __i386__
|
||||
register unsigned int i = ctx->idx_i;
|
||||
register byte j = ctx->idx_j;
|
||||
register byte *sbox = ctx->sbox;
|
||||
register byte t, u;
|
||||
|
||||
while ( length-- )
|
||||
{
|
||||
i++;
|
||||
t = sbox[(byte)i];
|
||||
j += t;
|
||||
u = sbox[j];
|
||||
sbox[(byte)i] = u;
|
||||
u += t;
|
||||
sbox[j] = t;
|
||||
*outbuf++ = sbox[u] ^ *inbuf++;
|
||||
}
|
||||
|
||||
ctx->idx_i = (byte)i;
|
||||
ctx->idx_j = (byte)j;
|
||||
#else /*__i386__*/
|
||||
/* Old implementation of arcfour is faster on i386 than the version above.
|
||||
* This is because version above increases register pressure which on i386
|
||||
* would push some of the variables to memory/stack. Therefore keep this
|
||||
* version for i386 to avoid regressing performance. */
|
||||
register int i = ctx->idx_i;
|
||||
register int j = ctx->idx_j;
|
||||
register byte *sbox = ctx->sbox;
|
||||
register int t;
|
||||
|
||||
while ( length-- )
|
||||
{
|
||||
i++;
|
||||
i = i & 255; /* The and-op seems to be faster than the mod-op. */
|
||||
j += sbox[i];
|
||||
j &= 255;
|
||||
t = sbox[i]; sbox[i] = sbox[j]; sbox[j] = t;
|
||||
*outbuf++ = *inbuf++ ^ sbox[(sbox[i] + sbox[j]) & 255];
|
||||
}
|
||||
|
||||
ctx->idx_i = i;
|
||||
ctx->idx_j = j;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void
|
||||
encrypt_stream (void *context,
|
||||
byte *outbuf, const byte *inbuf, size_t length)
|
||||
{
|
||||
ARCFOUR_context *ctx = (ARCFOUR_context *) context;
|
||||
do_encrypt_stream (ctx, outbuf, inbuf, length );
|
||||
_gcry_burn_stack (64);
|
||||
}
|
||||
|
||||
|
||||
static gcry_err_code_t
|
||||
do_arcfour_setkey (void *context, const byte *key, unsigned int keylen)
|
||||
{
|
||||
static int initialized;
|
||||
static const char* selftest_failed;
|
||||
int i, j;
|
||||
byte karr[256];
|
||||
ARCFOUR_context *ctx = (ARCFOUR_context *) context;
|
||||
|
||||
if (!initialized )
|
||||
{
|
||||
initialized = 1;
|
||||
selftest_failed = selftest();
|
||||
if( selftest_failed )
|
||||
log_error ("ARCFOUR selftest failed (%s)\n", selftest_failed );
|
||||
}
|
||||
if( selftest_failed )
|
||||
return GPG_ERR_SELFTEST_FAILED;
|
||||
|
||||
if( keylen < 40/8 ) /* we want at least 40 bits */
|
||||
return GPG_ERR_INV_KEYLEN;
|
||||
|
||||
ctx->idx_i = ctx->idx_j = 0;
|
||||
for (i=0; i < 256; i++ )
|
||||
ctx->sbox[i] = i;
|
||||
for (i=j=0; i < 256; i++,j++ )
|
||||
{
|
||||
if (j >= keylen)
|
||||
j = 0;
|
||||
karr[i] = key[j];
|
||||
}
|
||||
for (i=j=0; i < 256; i++ )
|
||||
{
|
||||
int t;
|
||||
j = (j + ctx->sbox[i] + karr[i]) & 255;
|
||||
t = ctx->sbox[i];
|
||||
ctx->sbox[i] = ctx->sbox[j];
|
||||
ctx->sbox[j] = t;
|
||||
}
|
||||
wipememory( karr, sizeof(karr) );
|
||||
|
||||
return GPG_ERR_NO_ERROR;
|
||||
}
|
||||
|
||||
static gcry_err_code_t
|
||||
arcfour_setkey ( void *context, const byte *key, unsigned int keylen )
|
||||
{
|
||||
ARCFOUR_context *ctx = (ARCFOUR_context *) context;
|
||||
gcry_err_code_t rc = do_arcfour_setkey (ctx, key, keylen );
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
static const char*
|
||||
selftest(void)
|
||||
{
|
||||
ARCFOUR_context ctx;
|
||||
byte scratch[16];
|
||||
|
||||
/* Test vector from Cryptlib labeled there: "from the
|
||||
State/Commerce Department". */
|
||||
static const byte key_1[] =
|
||||
{ 0x61, 0x8A, 0x63, 0xD2, 0xFB };
|
||||
static const byte plaintext_1[] =
|
||||
{ 0xDC, 0xEE, 0x4C, 0xF9, 0x2C };
|
||||
static const byte ciphertext_1[] =
|
||||
{ 0xF1, 0x38, 0x29, 0xC9, 0xDE };
|
||||
|
||||
arcfour_setkey( &ctx, key_1, sizeof(key_1));
|
||||
encrypt_stream( &ctx, scratch, plaintext_1, sizeof(plaintext_1));
|
||||
if ( memcmp (scratch, ciphertext_1, sizeof (ciphertext_1)))
|
||||
return "Arcfour encryption test 1 failed.";
|
||||
arcfour_setkey( &ctx, key_1, sizeof(key_1));
|
||||
encrypt_stream(&ctx, scratch, scratch, sizeof(plaintext_1)); /* decrypt */
|
||||
if ( memcmp (scratch, plaintext_1, sizeof (plaintext_1)))
|
||||
return "Arcfour decryption test 1 failed.";
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
gcry_cipher_spec_t _gcry_cipher_spec_arcfour =
|
||||
{
|
||||
GCRY_CIPHER_ARCFOUR, {0, 0},
|
||||
"ARCFOUR", NULL, NULL, 1, 128, sizeof (ARCFOUR_context),
|
||||
arcfour_setkey, NULL, NULL, encrypt_stream, encrypt_stream,
|
||||
};
|
||||
@@ -1,80 +0,0 @@
|
||||
/* bithelp.h - Some bit manipulation helpers
|
||||
* Copyright (C) 1999, 2002 Free Software Foundation, Inc.
|
||||
*
|
||||
* This file is part of Libgcrypt.
|
||||
*
|
||||
* Libgcrypt is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser general Public License as
|
||||
* published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* Libgcrypt is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
|
||||
*/
|
||||
#ifndef G10_BITHELP_H
|
||||
#define G10_BITHELP_H
|
||||
|
||||
#include "types.h"
|
||||
|
||||
|
||||
/****************
|
||||
* Rotate the 32 bit unsigned integer X by N bits left/right
|
||||
*/
|
||||
static inline u32 rol(u32 x, int n)
|
||||
{
|
||||
return ( (x << (n&(32-1))) | (x >> ((32-n)&(32-1))) );
|
||||
}
|
||||
|
||||
static inline u32 ror(u32 x, int n)
|
||||
{
|
||||
return ( (x >> (n&(32-1))) | (x << ((32-n)&(32-1))) );
|
||||
}
|
||||
|
||||
/* Byte swap for 32-bit and 64-bit integers. If available, use compiler
|
||||
provided helpers. */
|
||||
#ifdef HAVE_BUILTIN_BSWAP32
|
||||
# define _gcry_bswap32 __builtin_bswap32
|
||||
#else
|
||||
static inline u32
|
||||
_gcry_bswap32(u32 x)
|
||||
{
|
||||
return ((rol(x, 8) & 0x00ff00ffL) | (ror(x, 8) & 0xff00ff00L));
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_U64_TYPEDEF
|
||||
# ifdef HAVE_BUILTIN_BSWAP64
|
||||
# define _gcry_bswap64 __builtin_bswap64
|
||||
# else
|
||||
static inline u64
|
||||
_gcry_bswap64(u64 x)
|
||||
{
|
||||
return ((u64)_gcry_bswap32(x) << 32) | (_gcry_bswap32(x >> 32));
|
||||
}
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/* Endian dependent byte swap operations. */
|
||||
#ifdef WORDS_BIGENDIAN
|
||||
# define le_bswap32(x) _gcry_bswap32(x)
|
||||
# define be_bswap32(x) ((u32)(x))
|
||||
# ifdef HAVE_U64_TYPEDEF
|
||||
# define le_bswap64(x) _gcry_bswap64(x)
|
||||
# define be_bswap64(x) ((u64)(x))
|
||||
# endif
|
||||
#else
|
||||
# define le_bswap32(x) ((u32)(x))
|
||||
# define be_bswap32(x) _gcry_bswap32(x)
|
||||
# ifdef HAVE_U64_TYPEDEF
|
||||
# define le_bswap64(x) ((u64)(x))
|
||||
# define be_bswap64(x) _gcry_bswap64(x)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif /*G10_BITHELP_H*/
|
||||
@@ -1,533 +0,0 @@
|
||||
/* blowfish-amd64.S - AMD64 assembly implementation of Blowfish cipher
|
||||
*
|
||||
* Copyright © 2013 Jussi Kivilinna <jussi.kivilinna@iki.fi>
|
||||
*
|
||||
* This file is part of Libgcrypt.
|
||||
*
|
||||
* Libgcrypt is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU Lesser General Public License as
|
||||
* published by the Free Software Foundation; either version 2.1 of
|
||||
* the License, or (at your option) any later version.
|
||||
*
|
||||
* Libgcrypt is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
#ifdef __x86_64
|
||||
#include <config.h>
|
||||
#if defined(USE_BLOWFISH) && defined(HAVE_COMPATIBLE_GCC_AMD64_PLATFORM_AS)
|
||||
|
||||
.text
|
||||
|
||||
/* structure of BLOWFISH_context: */
|
||||
#define s0 0
|
||||
#define s1 ((s0) + 256 * 4)
|
||||
#define s2 ((s1) + 256 * 4)
|
||||
#define s3 ((s2) + 256 * 4)
|
||||
#define p ((s3) + 256 * 4)
|
||||
|
||||
/* register macros */
|
||||
#define CTX %rdi
|
||||
#define RIO %rsi
|
||||
|
||||
#define RX0 %rax
|
||||
#define RX1 %rbx
|
||||
#define RX2 %rcx
|
||||
#define RX3 %rdx
|
||||
|
||||
#define RX0d %eax
|
||||
#define RX1d %ebx
|
||||
#define RX2d %ecx
|
||||
#define RX3d %edx
|
||||
|
||||
#define RX0bl %al
|
||||
#define RX1bl %bl
|
||||
#define RX2bl %cl
|
||||
#define RX3bl %dl
|
||||
|
||||
#define RX0bh %ah
|
||||
#define RX1bh %bh
|
||||
#define RX2bh %ch
|
||||
#define RX3bh %dh
|
||||
|
||||
#define RT0 %rbp
|
||||
#define RT1 %rsi
|
||||
#define RT2 %r8
|
||||
#define RT3 %r9
|
||||
|
||||
#define RT0d %ebp
|
||||
#define RT1d %esi
|
||||
#define RT2d %r8d
|
||||
#define RT3d %r9d
|
||||
|
||||
#define RKEY %r10
|
||||
|
||||
/***********************************************************************
|
||||
* 1-way blowfish
|
||||
***********************************************************************/
|
||||
#define F() \
|
||||
movzbl RX0bh, RT1d; \
|
||||
movzbl RX0bl, RT3d; \
|
||||
rorq $16, RX0; \
|
||||
movzbl RX0bh, RT0d; \
|
||||
movzbl RX0bl, RT2d; \
|
||||
rorq $16, RX0; \
|
||||
movl s0(CTX,RT0,4), RT0d; \
|
||||
addl s1(CTX,RT2,4), RT0d; \
|
||||
xorl s2(CTX,RT1,4), RT0d; \
|
||||
addl s3(CTX,RT3,4), RT0d; \
|
||||
xorq RT0, RX0;
|
||||
|
||||
#define load_roundkey_enc(n) \
|
||||
movq p+4*(n)(CTX), RX3;
|
||||
|
||||
#define add_roundkey_enc() \
|
||||
xorq RX3, RX0;
|
||||
|
||||
#define round_enc(n) \
|
||||
add_roundkey_enc(); \
|
||||
load_roundkey_enc(n); \
|
||||
\
|
||||
F(); \
|
||||
F();
|
||||
|
||||
#define load_roundkey_dec(n) \
|
||||
movq p+4*(n-1)(CTX), RX3; \
|
||||
rorq $32, RX3;
|
||||
|
||||
#define add_roundkey_dec() \
|
||||
xorq RX3, RX0;
|
||||
|
||||
#define round_dec(n) \
|
||||
add_roundkey_dec(); \
|
||||
load_roundkey_dec(n); \
|
||||
\
|
||||
F(); \
|
||||
F();
|
||||
|
||||
#define read_block() \
|
||||
movq (RIO), RX0; \
|
||||
rorq $32, RX0; \
|
||||
bswapq RX0;
|
||||
|
||||
#define write_block() \
|
||||
bswapq RX0; \
|
||||
movq RX0, (RIO);
|
||||
|
||||
.align 8
|
||||
.type __blowfish_enc_blk1,@function;
|
||||
|
||||
__blowfish_enc_blk1:
|
||||
/* input:
|
||||
* %rdi: ctx, CTX
|
||||
* RX0: input plaintext block
|
||||
* output:
|
||||
* RX0: output plaintext block
|
||||
*/
|
||||
movq %rbp, %r11;
|
||||
|
||||
load_roundkey_enc(0);
|
||||
round_enc(2);
|
||||
round_enc(4);
|
||||
round_enc(6);
|
||||
round_enc(8);
|
||||
round_enc(10);
|
||||
round_enc(12);
|
||||
round_enc(14);
|
||||
round_enc(16);
|
||||
add_roundkey_enc();
|
||||
|
||||
movq %r11, %rbp;
|
||||
|
||||
ret;
|
||||
.size __blowfish_enc_blk1,.-__blowfish_enc_blk1;
|
||||
|
||||
.align 8
|
||||
.globl _gcry_blowfish_amd64_do_encrypt
|
||||
.type _gcry_blowfish_amd64_do_encrypt,@function;
|
||||
|
||||
_gcry_blowfish_amd64_do_encrypt:
|
||||
/* input:
|
||||
* %rdi: ctx, CTX
|
||||
* %rsi: u32 *ret_xl
|
||||
* %rdx: u32 *ret_xr
|
||||
*/
|
||||
movl (%rdx), RX0d;
|
||||
shlq $32, RX0;
|
||||
movl (%rsi), RT3d;
|
||||
movq %rdx, %r10;
|
||||
orq RT3, RX0;
|
||||
movq %rsi, RX2;
|
||||
|
||||
call __blowfish_enc_blk1;
|
||||
|
||||
movl RX0d, (%r10);
|
||||
shrq $32, RX0;
|
||||
movl RX0d, (RX2);
|
||||
|
||||
ret;
|
||||
.size _gcry_blowfish_amd64_do_encrypt,.-_gcry_blowfish_amd64_do_encrypt;
|
||||
|
||||
.align 8
|
||||
.globl _gcry_blowfish_amd64_encrypt_block
|
||||
.type _gcry_blowfish_amd64_encrypt_block,@function;
|
||||
|
||||
_gcry_blowfish_amd64_encrypt_block:
|
||||
/* input:
|
||||
* %rdi: ctx, CTX
|
||||
* %rsi: dst
|
||||
* %rdx: src
|
||||
*/
|
||||
|
||||
movq %rsi, %r10;
|
||||
|
||||
movq %rdx, RIO;
|
||||
read_block();
|
||||
|
||||
call __blowfish_enc_blk1;
|
||||
|
||||
movq %r10, RIO;
|
||||
write_block();
|
||||
|
||||
ret;
|
||||
.size _gcry_blowfish_amd64_encrypt_block,.-_gcry_blowfish_amd64_encrypt_block;
|
||||
|
||||
.align 8
|
||||
.globl _gcry_blowfish_amd64_decrypt_block
|
||||
.type _gcry_blowfish_amd64_decrypt_block,@function;
|
||||
|
||||
_gcry_blowfish_amd64_decrypt_block:
|
||||
/* input:
|
||||
* %rdi: ctx, CTX
|
||||
* %rsi: dst
|
||||
* %rdx: src
|
||||
*/
|
||||
movq %rbp, %r11;
|
||||
|
||||
movq %rsi, %r10;
|
||||
movq %rdx, RIO;
|
||||
|
||||
read_block();
|
||||
|
||||
load_roundkey_dec(17);
|
||||
round_dec(15);
|
||||
round_dec(13);
|
||||
round_dec(11);
|
||||
round_dec(9);
|
||||
round_dec(7);
|
||||
round_dec(5);
|
||||
round_dec(3);
|
||||
round_dec(1);
|
||||
add_roundkey_dec();
|
||||
|
||||
movq %r10, RIO;
|
||||
write_block();
|
||||
|
||||
movq %r11, %rbp;
|
||||
|
||||
ret;
|
||||
.size _gcry_blowfish_amd64_decrypt_block,.-_gcry_blowfish_amd64_decrypt_block;
|
||||
|
||||
/**********************************************************************
|
||||
4-way blowfish, four blocks parallel
|
||||
**********************************************************************/
|
||||
#define F4(x) \
|
||||
movzbl x ## bh, RT1d; \
|
||||
movzbl x ## bl, RT3d; \
|
||||
rorq $16, x; \
|
||||
movzbl x ## bh, RT0d; \
|
||||
movzbl x ## bl, RT2d; \
|
||||
rorq $16, x; \
|
||||
movl s0(CTX,RT0,4), RT0d; \
|
||||
addl s1(CTX,RT2,4), RT0d; \
|
||||
xorl s2(CTX,RT1,4), RT0d; \
|
||||
addl s3(CTX,RT3,4), RT0d; \
|
||||
xorq RT0, x;
|
||||
|
||||
#define add_preloaded_roundkey4() \
|
||||
xorq RKEY, RX0; \
|
||||
xorq RKEY, RX1; \
|
||||
xorq RKEY, RX2; \
|
||||
xorq RKEY, RX3;
|
||||
|
||||
#define preload_roundkey_enc(n) \
|
||||
movq p+4*(n)(CTX), RKEY;
|
||||
|
||||
#define add_roundkey_enc4(n) \
|
||||
add_preloaded_roundkey4(); \
|
||||
preload_roundkey_enc(n + 2);
|
||||
|
||||
#define round_enc4(n) \
|
||||
add_roundkey_enc4(n); \
|
||||
\
|
||||
F4(RX0); \
|
||||
F4(RX1); \
|
||||
F4(RX2); \
|
||||
F4(RX3); \
|
||||
\
|
||||
F4(RX0); \
|
||||
F4(RX1); \
|
||||
F4(RX2); \
|
||||
F4(RX3);
|
||||
|
||||
#define preload_roundkey_dec(n) \
|
||||
movq p+4*((n)-1)(CTX), RKEY; \
|
||||
rorq $32, RKEY;
|
||||
|
||||
#define add_roundkey_dec4(n) \
|
||||
add_preloaded_roundkey4(); \
|
||||
preload_roundkey_dec(n - 2);
|
||||
|
||||
#define round_dec4(n) \
|
||||
add_roundkey_dec4(n); \
|
||||
\
|
||||
F4(RX0); \
|
||||
F4(RX1); \
|
||||
F4(RX2); \
|
||||
F4(RX3); \
|
||||
\
|
||||
F4(RX0); \
|
||||
F4(RX1); \
|
||||
F4(RX2); \
|
||||
F4(RX3);
|
||||
|
||||
#define inbswap_block4() \
|
||||
rorq $32, RX0; \
|
||||
bswapq RX0; \
|
||||
rorq $32, RX1; \
|
||||
bswapq RX1; \
|
||||
rorq $32, RX2; \
|
||||
bswapq RX2; \
|
||||
rorq $32, RX3; \
|
||||
bswapq RX3;
|
||||
|
||||
#define inctrswap_block4() \
|
||||
rorq $32, RX0; \
|
||||
rorq $32, RX1; \
|
||||
rorq $32, RX2; \
|
||||
rorq $32, RX3;
|
||||
|
||||
#define outbswap_block4() \
|
||||
bswapq RX0; \
|
||||
bswapq RX1; \
|
||||
bswapq RX2; \
|
||||
bswapq RX3;
|
||||
|
||||
.align 8
|
||||
.type __blowfish_enc_blk4,@function;
|
||||
|
||||
__blowfish_enc_blk4:
|
||||
/* input:
|
||||
* %rdi: ctx, CTX
|
||||
* RX0,RX1,RX2,RX3: four input inbswapped plaintext blocks
|
||||
* output:
|
||||
* RX0,RX1,RX2,RX3: four output ciphertext blocks
|
||||
*/
|
||||
preload_roundkey_enc(0);
|
||||
|
||||
round_enc4(0);
|
||||
round_enc4(2);
|
||||
round_enc4(4);
|
||||
round_enc4(6);
|
||||
round_enc4(8);
|
||||
round_enc4(10);
|
||||
round_enc4(12);
|
||||
round_enc4(14);
|
||||
add_preloaded_roundkey4();
|
||||
|
||||
outbswap_block4();
|
||||
|
||||
ret;
|
||||
.size __blowfish_enc_blk4,.-__blowfish_enc_blk4;
|
||||
|
||||
.align 8
|
||||
.type __blowfish_dec_blk4,@function;
|
||||
|
||||
__blowfish_dec_blk4:
|
||||
/* input:
|
||||
* %rdi: ctx, CTX
|
||||
* RX0,RX1,RX2,RX3: four input ciphertext blocks
|
||||
* output:
|
||||
* RX0,RX1,RX2,RX3: four output plaintext blocks
|
||||
*/
|
||||
preload_roundkey_dec(17);
|
||||
|
||||
inbswap_block4();
|
||||
|
||||
round_dec4(17);
|
||||
round_dec4(15);
|
||||
round_dec4(13);
|
||||
round_dec4(11);
|
||||
round_dec4(9);
|
||||
round_dec4(7);
|
||||
round_dec4(5);
|
||||
round_dec4(3);
|
||||
add_preloaded_roundkey4();
|
||||
|
||||
outbswap_block4();
|
||||
|
||||
ret;
|
||||
.size __blowfish_dec_blk4,.-__blowfish_dec_blk4;
|
||||
|
||||
.align 8
|
||||
.globl _gcry_blowfish_amd64_ctr_enc
|
||||
.type _gcry_blowfish_amd64_ctr_enc,@function;
|
||||
_gcry_blowfish_amd64_ctr_enc:
|
||||
/* input:
|
||||
* %rdi: ctx, CTX
|
||||
* %rsi: dst (4 blocks)
|
||||
* %rdx: src (4 blocks)
|
||||
* %rcx: iv (big endian, 64bit)
|
||||
*/
|
||||
pushq %rbp;
|
||||
pushq %rbx;
|
||||
pushq %r12;
|
||||
pushq %r13;
|
||||
|
||||
/* %r11-%r13 are not used by __blowfish_enc_blk4 */
|
||||
movq %rcx, %r13; /*iv*/
|
||||
movq %rdx, %r12; /*src*/
|
||||
movq %rsi, %r11; /*dst*/
|
||||
|
||||
/* load IV and byteswap */
|
||||
movq (%r13), RT0;
|
||||
bswapq RT0;
|
||||
movq RT0, RX0;
|
||||
|
||||
/* construct IVs */
|
||||
leaq 1(RT0), RX1;
|
||||
leaq 2(RT0), RX2;
|
||||
leaq 3(RT0), RX3;
|
||||
leaq 4(RT0), RT0;
|
||||
bswapq RT0;
|
||||
|
||||
inctrswap_block4();
|
||||
|
||||
/* store new IV */
|
||||
movq RT0, (%r13);
|
||||
|
||||
call __blowfish_enc_blk4;
|
||||
|
||||
/* XOR key-stream with plaintext */
|
||||
xorq 0 * 8(%r12), RX0;
|
||||
xorq 1 * 8(%r12), RX1;
|
||||
xorq 2 * 8(%r12), RX2;
|
||||
xorq 3 * 8(%r12), RX3;
|
||||
movq RX0, 0 * 8(%r11);
|
||||
movq RX1, 1 * 8(%r11);
|
||||
movq RX2, 2 * 8(%r11);
|
||||
movq RX3, 3 * 8(%r11);
|
||||
|
||||
popq %r13;
|
||||
popq %r12;
|
||||
popq %rbx;
|
||||
popq %rbp;
|
||||
|
||||
ret;
|
||||
.size _gcry_blowfish_amd64_ctr_enc,.-_gcry_blowfish_amd64_ctr_enc;
|
||||
|
||||
.align 8
|
||||
.globl _gcry_blowfish_amd64_cbc_dec
|
||||
.type _gcry_blowfish_amd64_cbc_dec,@function;
|
||||
_gcry_blowfish_amd64_cbc_dec:
|
||||
/* input:
|
||||
* %rdi: ctx, CTX
|
||||
* %rsi: dst (4 blocks)
|
||||
* %rdx: src (4 blocks)
|
||||
* %rcx: iv (64bit)
|
||||
*/
|
||||
pushq %rbp;
|
||||
pushq %rbx;
|
||||
pushq %r12;
|
||||
pushq %r13;
|
||||
|
||||
/* %r11-%r13 are not used by __blowfish_dec_blk4 */
|
||||
movq %rsi, %r11; /*dst*/
|
||||
movq %rdx, %r12; /*src*/
|
||||
movq %rcx, %r13; /*iv*/
|
||||
|
||||
/* load input */
|
||||
movq 0 * 8(%r12), RX0;
|
||||
movq 1 * 8(%r12), RX1;
|
||||
movq 2 * 8(%r12), RX2;
|
||||
movq 3 * 8(%r12), RX3;
|
||||
|
||||
call __blowfish_dec_blk4;
|
||||
|
||||
movq 3 * 8(%r12), RT0;
|
||||
xorq (%r13), RX0;
|
||||
xorq 0 * 8(%r12), RX1;
|
||||
xorq 1 * 8(%r12), RX2;
|
||||
xorq 2 * 8(%r12), RX3;
|
||||
movq RT0, (%r13); /* store new IV */
|
||||
|
||||
movq RX0, 0 * 8(%r11);
|
||||
movq RX1, 1 * 8(%r11);
|
||||
movq RX2, 2 * 8(%r11);
|
||||
movq RX3, 3 * 8(%r11);
|
||||
|
||||
popq %r13;
|
||||
popq %r12;
|
||||
popq %rbx;
|
||||
popq %rbp;
|
||||
|
||||
ret;
|
||||
.size _gcry_blowfish_amd64_cbc_dec,.-_gcry_blowfish_amd64_cbc_dec;
|
||||
|
||||
.align 8
|
||||
.globl _gcry_blowfish_amd64_cfb_dec
|
||||
.type _gcry_blowfish_amd64_cfb_dec,@function;
|
||||
_gcry_blowfish_amd64_cfb_dec:
|
||||
/* input:
|
||||
* %rdi: ctx, CTX
|
||||
* %rsi: dst (4 blocks)
|
||||
* %rdx: src (4 blocks)
|
||||
* %rcx: iv (64bit)
|
||||
*/
|
||||
pushq %rbp;
|
||||
pushq %rbx;
|
||||
pushq %r12;
|
||||
pushq %r13;
|
||||
|
||||
/* %r11-%r13 are not used by __blowfish_enc_blk4 */
|
||||
movq %rcx, %r13; /*iv*/
|
||||
movq %rdx, %r12; /*src*/
|
||||
movq %rsi, %r11; /*dst*/
|
||||
|
||||
/* Load input */
|
||||
movq (%r13), RX0;
|
||||
movq 0 * 8(%r12), RX1;
|
||||
movq 1 * 8(%r12), RX2;
|
||||
movq 2 * 8(%r12), RX3;
|
||||
|
||||
inbswap_block4();
|
||||
|
||||
/* Update IV */
|
||||
movq 3 * 8(%r12), RT0;
|
||||
movq RT0, (%r13);
|
||||
|
||||
call __blowfish_enc_blk4;
|
||||
|
||||
xorq 0 * 8(%r12), RX0;
|
||||
xorq 1 * 8(%r12), RX1;
|
||||
xorq 2 * 8(%r12), RX2;
|
||||
xorq 3 * 8(%r12), RX3;
|
||||
movq RX0, 0 * 8(%r11);
|
||||
movq RX1, 1 * 8(%r11);
|
||||
movq RX2, 2 * 8(%r11);
|
||||
movq RX3, 3 * 8(%r11);
|
||||
|
||||
popq %r13;
|
||||
popq %r12;
|
||||
popq %rbx;
|
||||
popq %rbp;
|
||||
ret;
|
||||
.size _gcry_blowfish_amd64_cfb_dec,.-_gcry_blowfish_amd64_cfb_dec;
|
||||
|
||||
#endif /*defined(USE_BLOWFISH)*/
|
||||
#endif /*__x86_64*/
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user