mirror of https://github.com/PurpleI2P/i2pd.git
EinMByte
9 years ago
155 changed files with 375 additions and 20033 deletions
@ -0,0 +1,176 @@
@@ -0,0 +1,176 @@
|
||||
cmake_minimum_required ( VERSION 2.8.12 ) |
||||
project ( "i2pd" ) |
||||
|
||||
# configurale options |
||||
option(WITH_AESNI "Use AES-NI instructions set" OFF) |
||||
option(WITH_HARDENING "Use hardening compiler flags" OFF) |
||||
option(WITH_LIBRARY "Build library" ON) |
||||
option(WITH_BINARY "Build binary" ON) |
||||
option(WITH_STATIC "Static build" OFF) |
||||
option(WITH_UPNP "Include support for UPnP client" OFF) |
||||
option(WITH_TESTS "Build unit tests" OFF) |
||||
|
||||
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake_modules") |
||||
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) |
||||
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) |
||||
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}) |
||||
|
||||
# Default build is Debug |
||||
if(NOT CMAKE_BUILD_TYPE) |
||||
set(CMAKE_BUILD_TYPE Debug) |
||||
endif() |
||||
|
||||
# compiler flags customization (by vendor) |
||||
if(NOT MSVC) |
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Winvalid-pch") |
||||
set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -pedantic") |
||||
# TODO: The following is incompatible with static build and enabled hardening |
||||
# for OpenWRT. |
||||
# Multiple definitions of __stack_chk_fail (libssp & libc) |
||||
set( |
||||
CMAKE_CXX_FLAGS_MINSIZEREL |
||||
"${CMAKE_CXX_FLAGS_MINSIZEREL} -flto -s -ffunction-sections -fdata-sections" |
||||
) |
||||
# -flto is added from above |
||||
set(CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-Wl,--gc-sections") |
||||
endif() |
||||
|
||||
# Check for c++11 support |
||||
include(CheckCXXCompilerFlag) |
||||
CHECK_CXX_COMPILER_FLAG("-std=c++11" CXX11_SUPPORTED) |
||||
CHECK_CXX_COMPILER_FLAG("-std=c++0x" CXX0X_SUPPORTED) |
||||
if(CXX11_SUPPORTED) |
||||
add_definitions("-std=c++11") |
||||
elseif(CXX0X_SUPPORTED) # gcc 4.6 |
||||
add_definitions("-std=c++0x") |
||||
elseif(NOT MSVC) |
||||
message(SEND_ERROR "C++11 standard not supported by compiler. Version too old?") |
||||
endif() |
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") |
||||
if(WITH_HARDENING) |
||||
add_definitions( "-D_FORTIFY_SOURCE=2" ) |
||||
set( |
||||
CMAKE_CXX_FLAGS |
||||
"${CMAKE_CXX_FLAGS} -Wformat -Wformat-security -Werror=format-security" |
||||
) |
||||
set( |
||||
CMAKE_CXX_FLAGS |
||||
"${CMAKE_CXX_FLAGS} -fstack-protector-strong -fPIE --param ssp-buffer-size=4 -z relro -z now" |
||||
) |
||||
endif() |
||||
elseif(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") |
||||
# TODO: more tweaks |
||||
endif() |
||||
|
||||
# Compiler flags customization (by system) |
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") |
||||
# "'sleep_for' is not a member of 'std::this_thread'" in gcc 4.7/4.8 |
||||
add_definitions( "-D_GLIBCXX_USE_NANOSLEEP=1" ) |
||||
endif () |
||||
|
||||
if(WITH_UPNP) |
||||
add_definitions(-DUSE_UPNP) |
||||
if(NOT MSVC) |
||||
set(DL_LIB ${CMAKE_DL_LIBS}) |
||||
endif() |
||||
endif() |
||||
|
||||
if(WITH_AESNI) |
||||
add_definitions( "-maes -DAESNI") |
||||
endif() |
||||
|
||||
|
||||
# Libraries |
||||
# TODO: once CMake 3.1+ becomes mainstream, see e.g. |
||||
# http://stackoverflow.com/a/29871891/673826 use imported Threads::Threads |
||||
# instead |
||||
set(THREADS_PREFER_PTHREAD_FLAG ON) |
||||
find_package (Threads REQUIRED) |
||||
if(THREADS_HAVE_PTHREAD_ARG) # compile time flag |
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") |
||||
endif() |
||||
|
||||
if(WITH_STATIC) |
||||
set(Boost_USE_STATIC_LIBS ON) |
||||
set(Boost_USE_STATIC_RUNTIME ON) |
||||
if(WIN32) |
||||
# http://www.cmake.org/Wiki/CMake_FAQ#Dynamic_Replace |
||||
# Note that you might need to rebuild Crypto++ |
||||
foreach(flag_var CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE |
||||
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) |
||||
if(${flag_var} MATCHES "/MD") |
||||
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") |
||||
endif(${flag_var} MATCHES "/MD") |
||||
endforeach(flag_var) |
||||
else() |
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a) |
||||
endif() |
||||
|
||||
set(BUILD_SHARED_LIBS OFF) |
||||
if(${CMAKE_CXX_COMPILER} MATCHES ".*-openwrt-.*") |
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") |
||||
set( |
||||
CMAKE_THREAD_LIBS_INIT |
||||
"gcc_eh -Wl,-u,pthread_create,-u,pthread_once,-u,pthread_mutex_lock,-u,pthread_mutex_unlock,-u,pthread_join,-u,pthread_equal,-u,pthread_detach,-u,pthread_cond_wait,-u,pthread_cond_signal,-u,pthread_cond_destroy,-u,pthread_cond_broadcast,-u,pthread_cancel" |
||||
) |
||||
endif() |
||||
elseif(NOT WIN32) |
||||
# TODO: Consider separate compilation for COMMON_SRC for library. |
||||
# No need in -fPIC overhead for binary if not interested in library |
||||
# HINT: revert c266cff CMakeLists.txt: compilation speed up |
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") |
||||
endif() |
||||
|
||||
add_definitions(-DBOOST_ALL_DYN_LINK) |
||||
|
||||
find_package( |
||||
Boost COMPONENTS |
||||
system filesystem regex program_options date_time thread chrono REQUIRED |
||||
) |
||||
if(NOT DEFINED Boost_INCLUDE_DIRS) |
||||
message(SEND_ERROR "Boost not found, or version below 1.46. Please download Boost!") |
||||
endif() |
||||
|
||||
find_package(CryptoPP REQUIRED) |
||||
if(NOT DEFINED CRYPTO++_INCLUDE_DIR) |
||||
message(SEND_ERROR "Could not find Crypto++. Please download and install it first!") |
||||
endif() |
||||
|
||||
find_package(MiniUPnPc) |
||||
if(NOT ${MINIUPNPC_FOUND}) |
||||
set(WITH_UPNP OFF) |
||||
endif() |
||||
|
||||
# Load includes |
||||
include_directories( |
||||
${CMAKE_SOURCE_DIR} ${Boost_INCLUDE_DIRS} ${CRYPTO++_INCLUDE_DIR} |
||||
"core/" |
||||
) |
||||
|
||||
# Show summary |
||||
message(STATUS "---------------------------------------") |
||||
message(STATUS "Build type : ${CMAKE_BUILD_TYPE}") |
||||
message(STATUS "Compiler vendor : ${CMAKE_CXX_COMPILER_ID}") |
||||
message(STATUS "Compiler version : ${CMAKE_CXX_COMPILER_VERSION}") |
||||
message(STATUS "Compiler path : ${CMAKE_CXX_COMPILER}") |
||||
message(STATUS "Install prefix: : ${CMAKE_INSTALL_PREFIX}") |
||||
message(STATUS "Options:") |
||||
message(STATUS " AESNI : ${WITH_AESNI}") |
||||
message(STATUS " HARDENING : ${WITH_HARDENING}") |
||||
message(STATUS " LIBRARY : ${WITH_LIBRARY}") |
||||
message(STATUS " BINARY : ${WITH_BINARY}") |
||||
message(STATUS " STATIC BUILD : ${WITH_STATIC}") |
||||
message(STATUS " UPnP : ${WITH_UPNP}") |
||||
message(STATUS " TESTS : ${WITH_TESTS}") |
||||
message(STATUS "---------------------------------------") |
||||
|
||||
# Handle paths nicely |
||||
include(GNUInstallDirs) |
||||
|
||||
set(CORE_NAME "${PROJECT_NAME}-core") |
||||
set(CLIENT_NAME "${PROJECT_NAME}-client") |
||||
set(TESTS_NAME "${PROJECT_NAME}-tests") |
||||
add_subdirectory(core) |
||||
add_subdirectory(client) |
||||
add_subdirectory(tests) |
@ -1,100 +0,0 @@
@@ -1,100 +0,0 @@
|
||||
UNAME := $(shell uname -s) |
||||
SHLIB := libi2pd.so |
||||
I2PD := i2p |
||||
TESTS := tests/tests |
||||
GREP := fgrep |
||||
DEPS := obj/make.dep |
||||
|
||||
include filelist.mk |
||||
|
||||
USE_AESNI := yes |
||||
USE_STATIC := no |
||||
|
||||
ifeq ($(UNAME),Darwin) |
||||
DAEMON_SRC += DaemonLinux.cpp |
||||
include Makefile.osx |
||||
else ifeq ($(shell echo $(UNAME) | $(GREP) -c FreeBSD),1) |
||||
DAEMON_SRC += DaemonLinux.cpp |
||||
include Makefile.bsd |
||||
else ifeq ($(UNAME),Linux) |
||||
DAEMON_SRC += DaemonLinux.cpp |
||||
include Makefile.linux |
||||
else # win32
|
||||
DAEMON_SRC += DaemonWin32.cpp |
||||
endif |
||||
|
||||
all: mk_build_dir $(SHLIB) $(I2PD) |
||||
tests: mk_build_test_dir $(TESTS) |
||||
|
||||
mk_build_dir: |
||||
mkdir -p obj |
||||
mkdir -p obj/transport |
||||
mkdir -p obj/util |
||||
mkdir -p obj/crypto |
||||
mkdir -p obj/tunnel |
||||
mkdir -p obj/i2pcontrol |
||||
mk_build_test_dir: |
||||
mkdir -p obj/tests |
||||
|
||||
api: $(SHLIB) |
||||
|
||||
## NOTE: The NEEDED_CXXFLAGS are here so that CXXFLAGS can be specified at build time
|
||||
## **without** overwriting the CXXFLAGS which we need in order to build.
|
||||
## For example, when adding 'hardening flags' to the build
|
||||
## (e.g. -fstack-protector-strong -Wformat -Werror=format-security), we do not want to remove
|
||||
## -std=c++11. If you want to remove this variable please do so in a way that allows setting
|
||||
## custom FLAGS to work at build-time.
|
||||
|
||||
deps: |
||||
@mkdir -p obj |
||||
@mkdir -p obj/transport |
||||
@mkdir -p obj/tests |
||||
@mkdir -p obj/util |
||||
@mkdir -p obj/crypto |
||||
@mkdir -p obj/tunnel |
||||
@mkdir -p obj/i2pcontrol |
||||
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) -MM *.cpp > $(DEPS) |
||||
@sed -i -e '/\.o:/ s/^/obj\//' $(DEPS) |
||||
|
||||
obj/%.o : %.cpp |
||||
@mkdir -p obj |
||||
@mkdir -p obj/transport |
||||
@mkdir -p obj/tests |
||||
@mkdir -p obj/util |
||||
@mkdir -p obj/crypto |
||||
@mkdir -p obj/tunnel |
||||
@mkdir -p obj/i2pcontrol |
||||
$(CXX) $(CXXFLAGS) $(NEEDED_CXXFLAGS) $(INCFLAGS) $(CPU_FLAGS) -c -o $@ $< |
||||
|
||||
# '-' is 'ignore if missing' on first run
|
||||
-include $(DEPS) |
||||
|
||||
$(I2PD): $(patsubst %.cpp,obj/%.o,$(DAEMON_SRC)) |
||||
$(CXX) -o $@ $^ $(LDLIBS) $(LDFLAGS) |
||||
|
||||
$(SHLIB): $(patsubst %.cpp,obj/%.o,$(LIB_SRC)) |
||||
ifneq ($(USE_STATIC),yes) |
||||
$(CXX) $(LDFLAGS) $(LDLIBS) -shared -o $@ $^ |
||||
endif |
||||
|
||||
$(TESTS): $(patsubst %.cpp,obj/%.o,$(TESTS_SRC)) |
||||
$(CXX) -o $@ $^ $(LDLIBS) $(LDTESTLIBS) $(LDFLAGS) |
||||
|
||||
|
||||
clean: |
||||
rm -rf obj |
||||
$(RM) $(I2PD) $(SHLIB) $(TESTS) |
||||
|
||||
LATEST_TAG=$(shell git describe --tags --abbrev=0 master) |
||||
dist: |
||||
git archive --format=tar.gz -9 --worktree-attributes \
|
||||
--prefix=i2pd_$(LATEST_TAG)/ $(LATEST_TAG) -o i2pd_$(LATEST_TAG).tar.gz |
||||
|
||||
.PHONY: all |
||||
.PHONY: tests |
||||
.PHONY: clean |
||||
.PHONY: deps |
||||
.PHONY: dist |
||||
.PHONY: api |
||||
.PHONY: mk_build_dir |
||||
.PHONY: mk_build_test_dir |
@ -1,13 +0,0 @@
@@ -1,13 +0,0 @@
|
||||
CXX = g++ |
||||
CXXFLAGS = -O2 |
||||
## NOTE: NEEDED_CXXFLAGS is here so that custom CXXFLAGS can be specified at build time
|
||||
## **without** overwriting the CXXFLAGS which we need in order to build.
|
||||
## For example, when adding 'hardening flags' to the build
|
||||
## (e.g. -fstack-protector-strong -Wformat -Werror=format-security), we do not want to remove
|
||||
## -std=c++11. If you want to remove this variable please do so in a way that allows setting
|
||||
## custom FLAGS to work at build-time.
|
||||
NEEDED_CXXFLAGS = -std=c++11 |
||||
INCFLAGS = -I/usr/include/ -I/usr/local/include/ -I. |
||||
LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib |
||||
LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread |
||||
LDTESTLIBS = -lboost_unit_test_framework |
@ -1,60 +0,0 @@
@@ -1,60 +0,0 @@
|
||||
CXXFLAGS = -g -Wall |
||||
INCFLAGS = -I. |
||||
|
||||
## NOTE: The NEEDED_CXXFLAGS are here so that custom CXXFLAGS can be specified at build time
|
||||
## **without** overwriting the CXXFLAGS which we need in order to build.
|
||||
## For example, when adding 'hardening flags' to the build
|
||||
## (e.g. -fstack-protector-strong -Wformat -Werror=format-security), we do not want to remove
|
||||
## -std=c++11. If you want to remove this variable please do so in a way that allows setting
|
||||
## custom FLAGS to work at build-time.
|
||||
|
||||
# detect proper flag for c++11 support by compilers
|
||||
CXXVER := $(shell $(CXX) -dumpversion) |
||||
ifeq ($(shell expr match $(CXX) 'clang'),5) |
||||
NEEDED_CXXFLAGS += -std=c++11 |
||||
else ifeq ($(shell expr match ${CXXVER} "4\.[0-9][0-9]"),4) # gcc >= 4.10
|
||||
NEEDED_CXXFLAGS += -std=c++11 |
||||
else ifeq ($(shell expr match ${CXXVER} "4\.[7-9]"),3) # >= 4.7
|
||||
NEEDED_CXXFLAGS += -std=c++11 |
||||
else ifeq ($(shell expr match ${CXXVER} "4\.6"),3) # = 4.6
|
||||
NEEDED_CXXFLAGS += -std=c++0x |
||||
else ifeq ($(shell expr match ${CXXVER} "5\.[0-9]"),3) # gcc >= 5.0
|
||||
NEEDED_CXXFLAGS += -std=c++11 |
||||
else # not supported
|
||||
$(error Compiler too old) |
||||
endif |
||||
|
||||
NEEDED_CXXFLAGS += -fPIC |
||||
|
||||
ifeq ($(USE_STATIC),yes) |
||||
LIBDIR := /usr/lib |
||||
LDLIBS = $(LIBDIR)/libboost_system.a |
||||
LDLIBS += $(LIBDIR)/libboost_date_time.a |
||||
LDLIBS += $(LIBDIR)/libboost_filesystem.a |
||||
LDLIBS += $(LIBDIR)/libboost_regex.a |
||||
LDLIBS += $(LIBDIR)/libboost_program_options.a |
||||
LDLIBS += $(LIBDIR)/libcryptopp.a |
||||
LDLIBS += -lpthread -static-libstdc++ -static-libgcc |
||||
USE_AESNI := no |
||||
else |
||||
LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread |
||||
endif |
||||
|
||||
# Always link with test framework dynamically
|
||||
LDTESTLIBS = -lboost_unit_test_framework |
||||
|
||||
# UPNP Support (miniupnpc 1.5 or 1.6)
|
||||
ifeq ($(USE_UPNP),1) |
||||
LDFLAGS += -ldl |
||||
CXXFLAGS += -DUSE_UPNP |
||||
endif |
||||
|
||||
IS_64 := $(shell $(CXX) -dumpmachine 2>&1 | $(GREP) -c "64") |
||||
ifeq ($(USE_AESNI),yes) |
||||
ifeq ($(IS_64),1) |
||||
#check if AES-NI is supported by CPU
|
||||
ifneq ($(shell grep -c aes /proc/cpuinfo),0) |
||||
CPU_FLAGS = -maes -DAESNI |
||||
endif |
||||
endif |
||||
endif |
@ -1,26 +0,0 @@
@@ -1,26 +0,0 @@
|
||||
CXX = clang++ |
||||
CXXFLAGS = -g -Wall -std=c++11 -DCRYPTOPP_DISABLE_ASM -DMAC_OSX |
||||
#CXXFLAGS = -g -O2 -Wall -std=c++11 -DCRYPTOPP_DISABLE_ASM
|
||||
INCFLAGS = -I/usr/local/include -I. |
||||
LDFLAGS = -Wl,-rpath,/usr/local/lib -L/usr/local/lib |
||||
LDLIBS = -lcryptopp -lboost_system -lboost_date_time -lboost_filesystem -lboost_regex -lboost_program_options -lpthread |
||||
LDTESTLIBS = -lboost_unit_test_framework |
||||
|
||||
ifeq ($(USE_UPNP),1) |
||||
LDFLAGS += -ldl |
||||
CXXFLAGS += -DUSE_UPNP |
||||
endif |
||||
|
||||
# OSX Notes
|
||||
# http://www.hutsby.net/2011/08/macs-with-aes-ni.html
|
||||
# Seems like all recent Mac's have AES-NI, after firmware upgrade 2.2
|
||||
# Found no good way to detect it from command line. TODO: Might be some osx sysinfo magic
|
||||
ifeq ($(USE_AESNI),yes) |
||||
CXXFLAGS += -maes -DAESNI |
||||
endif |
||||
|
||||
# Disabled, since it will be the default make rule. I think its better
|
||||
# to define the default rule in Makefile and not Makefile.<ostype> - torkel
|
||||
#install: all
|
||||
# test -d ${PREFIX} || mkdir -p ${PREFIX}/
|
||||
# cp -r i2p ${PREFIX}/
|
@ -1,14 +0,0 @@
@@ -1,14 +0,0 @@
|
||||
* |
||||
!*/ |
||||
|
||||
!*.h |
||||
!*.cpp |
||||
|
||||
!*.bat |
||||
|
||||
!*.sln |
||||
!*.vcproj |
||||
!*.vcxproj |
||||
!*.vcxproj.filters |
||||
!*.iss |
||||
!.gitignore |
@ -1,282 +0,0 @@
@@ -1,282 +0,0 @@
|
||||
# NSIS Installer script. (Tested with NSIS 2.64 on Windows 7) |
||||
# Author: Mikal Villa (Meeh) |
||||
# Version: 1.1 |
||||
Name PurpleI2P |
||||
|
||||
RequestExecutionLevel highest |
||||
SetCompressor /SOLID lzma |
||||
ShowInstDetails show |
||||
|
||||
# General Symbol Definitions |
||||
!define REGKEY "SOFTWARE\$(^Name)" |
||||
!define VERSION 0.3.0.0 |
||||
!define COMPANY "The Privacy Solutions Project" |
||||
!define URL "https://i2p.io" |
||||
|
||||
# MUI Symbol Definitions |
||||
!define MUI_ICON "ictoopie.ico" |
||||
#!define MUI_WELCOMEFINISHPAGE_BITMAP "../share/pixmaps/nsis-wizard.bmp" |
||||
!define MUI_HEADERIMAGE |
||||
!define MUI_HEADERIMAGE_RIGHT |
||||
#!define MUI_HEADERIMAGE_BITMAP "../share/pixmaps/nsis-header.bmp" |
||||
!define MUI_FINISHPAGE_NOAUTOCLOSE |
||||
!define MUI_STARTMENUPAGE_REGISTRY_ROOT HKLM |
||||
!define MUI_STARTMENUPAGE_REGISTRY_KEY ${REGKEY} |
||||
!define MUI_STARTMENUPAGE_REGISTRY_VALUENAME StartMenuGroup |
||||
!define MUI_STARTMENUPAGE_DEFAULTFOLDER PurpleI2P |
||||
!define MUI_FINISHPAGE_RUN $INSTDIR\i2pd.exe |
||||
!define MUI_FINISHPAGE_SHOWREADME $INSTDIR\Readme.txt |
||||
|
||||
|
||||
!define MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico" |
||||
!define MUI_UNWELCOMEFINISHPAGE_BITMAP "../share/pixmaps/nsis-wizard.bmp" |
||||
!define MUI_UNFINISHPAGE_NOAUTOCLOSE |
||||
|
||||
# Included files |
||||
!include Sections.nsh |
||||
!include MUI2.nsh |
||||
!include nsDialogs.nsh |
||||
!include winmessages.nsh |
||||
!include logiclib.nsh |
||||
# Local included files |
||||
!include nsi\helper_readme.nsh |
||||
;!include nsi\servicelib.nsh |
||||
|
||||
# Variables |
||||
Var StartMenuGroup |
||||
|
||||
# Installer pages |
||||
# Execution flow of installer windows |
||||
!insertmacro MUI_PAGE_WELCOME |
||||
!insertmacro MUI_PAGE_README "../Readme.md" |
||||
!insertmacro MUI_PAGE_DIRECTORY |
||||
# Disabled for now. Use the bat |
||||
;Page custom mode_selection # Meeh's hack for installing and starting service. |
||||
!insertmacro MUI_PAGE_STARTMENU Application $StartMenuGroup |
||||
!insertmacro MUI_PAGE_INSTFILES |
||||
!insertmacro MUI_PAGE_FINISH |
||||
|
||||
# Uninstall pages |
||||
!insertmacro MUI_UNPAGE_CONFIRM |
||||
!insertmacro MUI_UNPAGE_INSTFILES |
||||
|
||||
# Installer languages |
||||
!insertmacro MUI_LANGUAGE English |
||||
|
||||
# Installer attributes |
||||
OutFile PurpleI2P-0.3.0.0-win32-setup.exe |
||||
InstallDir $PROGRAMFILES\PurpleI2P |
||||
CRCCheck on |
||||
XPStyle on |
||||
BrandingText " " |
||||
ShowInstDetails show |
||||
VIProductVersion 0.3.0.0 |
||||
VIAddVersionKey ProductName PurpleI2P |
||||
VIAddVersionKey ProductVersion "${VERSION}" |
||||
VIAddVersionKey CompanyName "${COMPANY}" |
||||
VIAddVersionKey CompanyWebsite "${URL}" |
||||
VIAddVersionKey FileVersion "${VERSION}" |
||||
VIAddVersionKey FileDescription "" |
||||
VIAddVersionKey LegalCopyright "" |
||||
InstallDirRegKey HKCU "${REGKEY}" Path |
||||
ShowUninstDetails show |
||||
|
||||
# Readme definitions |
||||
|
||||
;-------------------------------- |
||||
;Languages |
||||
;Set up install lang strings for 1st lang |
||||
${ReadmeLanguage} "${LANG_ENGLISH}" \ |
||||
"Read Me" \ |
||||
"Please review the following important information." \ |
||||
"About $(^name):" \ |
||||
"$\n Click on scrollbar arrows or press Page Down to review the entire text." |
||||
|
||||
;Add 2nd language |
||||
!insertmacro MUI_LANGUAGE "Norwegian" |
||||
|
||||
;set up install lang strings for second lang |
||||
${ReadmeLanguage} "${LANG_NORWEGIAN}" \ |
||||
"Les meg!" \ |
||||
"Vennligst les informasjonen om hvordan du skal bruke PurpleI2P." \ |
||||
"Om $(^name):" \ |
||||
"$\n Klikk på scrollbaren til høyre for å se hele innholdet." |
||||
|
||||
;-------------------------------- |
||||
|
||||
# Installer sections |
||||
Section -Main SEC0000 |
||||
SetOutPath $INSTDIR |
||||
SetOverwrite on |
||||
File /oname=i2pd.exe Release\i2pd.exe |
||||
File /oname=install_service.bat install_service.bat |
||||
File /oname=uninstall_service.bat uninstall_service.bat |
||||
File /oname=LICENSE.txt ..\LICENSE |
||||
File /oname=Readme.txt ..\README.md |
||||
SetOutPath $INSTDIR\src |
||||
File /r /x *.nsi /x *.rc /x *.exe /x *.obj /x *.nsh /x *.sln /x *.vcxproj /x *.tlog /x *.log /x *.res /x *.pdb /x *.suo /x *.opensdf /x *.filters /x *.sdf /x *.iss /x *.aps /x .gitignore /x *.o ../\*.* |
||||
SetOutPath $INSTDIR |
||||
RMDir /r /REBOOTOK $INSTDIR\src\.git # Remove git directory |
||||
RMDir /r /REBOOTOK $INSTDIR\src\Win32\Release # Removing release directory |
||||
RMDir /r /REBOOTOK $INSTDIR\src\Win32\nsi |
||||
WriteRegStr HKCU "${REGKEY}\Components" Main 1 |
||||
SectionEnd |
||||
|
||||
Section -post SEC0001 |
||||
WriteRegStr HKCU "${REGKEY}" Path $INSTDIR |
||||
SetOutPath $INSTDIR |
||||
WriteUninstaller $INSTDIR\uninstall.exe |
||||
!insertmacro MUI_STARTMENU_WRITE_BEGIN Application |
||||
CreateDirectory $SMPROGRAMS\$StartMenuGroup |
||||
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\PurpleI2P.lnk" $INSTDIR\i2pd.exe |
||||
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Install PurpleI2P Service.lnk" $INSTDIR\install_service.bat |
||||
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall PurpleI2P Service.lnk" $INSTDIR\uninstall_service.bat |
||||
CreateShortcut "$SMPROGRAMS\$StartMenuGroup\Uninstall PurpleI2P.lnk" $INSTDIR\uninstall.exe |
||||
!insertmacro MUI_STARTMENU_WRITE_END |
||||
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayName "$(^Name)" |
||||
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayVersion "${VERSION}" |
||||
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" Publisher "${COMPANY}" |
||||
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" URLInfoAbout "${URL}" |
||||
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" DisplayIcon $INSTDIR\uninstall.exe |
||||
WriteRegStr HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" UninstallString $INSTDIR\uninstall.exe |
||||
WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoModify 1 |
||||
WriteRegDWORD HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" NoRepair 1 |
||||
WriteRegStr HKCR "i2pd" "URL Protocol" "" |
||||
WriteRegStr HKCR "i2pd" "" "URL:i2pd" # TODO: if a instance of own is found, relaunch with a proxyfied browser to open webage. (e.g i2pd://meeh.i2p) |
||||
WriteRegStr HKCR "i2pd\DefaultIcon" "" $INSTDIR\i2pd.exe |
||||
WriteRegStr HKCR "i2pd\shell\open\command" "" '"$INSTDIR\i2pd.exe" "%1"' |
||||
SectionEnd |
||||
|
||||
# Macro for selecting uninstaller sections |
||||
!macro SELECT_UNSECTION SECTION_NAME UNSECTION_ID |
||||
Push $R0 |
||||
ReadRegStr $R0 HKCU "${REGKEY}\Components" "${SECTION_NAME}" |
||||
StrCmp $R0 1 0 next${UNSECTION_ID} |
||||
!insertmacro SelectSection "${UNSECTION_ID}" |
||||
GoTo done${UNSECTION_ID} |
||||
next${UNSECTION_ID}: |
||||
!insertmacro UnselectSection "${UNSECTION_ID}" |
||||
done${UNSECTION_ID}: |
||||
Pop $R0 |
||||
!macroend |
||||
|
||||
|
||||
# Uninstaller sections |
||||
Section /o -un.Main UNSEC0000 |
||||
Delete /REBOOTOK $INSTDIR\i2pd.exe |
||||
Delete /REBOOTOK $INSTDIR\LICENSE.txt |
||||
Delete /REBOOTOK $INSTDIR\Readme.txt |
||||
Delete /REBOOTOK $INSTDIR\install_service.bat |
||||
Delete /REBOOTOK $INSTDIR\uninstall_service.bat |
||||
RMDir /r /REBOOTOK $INSTDIR\src |
||||
DeleteRegValue HKCU "${REGKEY}\Components" Main |
||||
SectionEnd |
||||
|
||||
Section -un.post UNSEC0001 |
||||
DeleteRegKey HKCU "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\$(^Name)" |
||||
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Uninstall PurpleI2P.lnk" |
||||
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\PurpleI2P.lnk" |
||||
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\Install PurpleI2P Service.lnk" |
||||
Delete /REBOOTOK "$SMPROGRAMS\$StartMenuGroup\UnInstall PurpleI2P Service.lnk" |
||||
Delete /REBOOTOK "$SMSTARTUP\PurpleI2P.lnk" |
||||
Delete /REBOOTOK $INSTDIR\uninstall.exe |
||||
Delete /REBOOTOK $INSTDIR\debug.log |
||||
DeleteRegValue HKCU "${REGKEY}" StartMenuGroup |
||||
DeleteRegValue HKCU "${REGKEY}" Path |
||||
DeleteRegKey /IfEmpty HKCU "${REGKEY}\Components" |
||||
DeleteRegKey /IfEmpty HKCU "${REGKEY}" |
||||
DeleteRegKey HKCR "i2pd" |
||||
RmDir /REBOOTOK $SMPROGRAMS\$StartMenuGroup |
||||
RmDir /REBOOTOK $INSTDIR |
||||
Push $R0 |
||||
StrCpy $R0 $StartMenuGroup 1 |
||||
StrCmp $R0 ">" no_smgroup |
||||
no_smgroup: |
||||
Pop $R0 |
||||
SectionEnd |
||||
|
||||
; var hwndExecModeRadio |
||||
; var hwndRunServiceNowRadio |
||||
|
||||
; Function mode_selection |
||||
; nsDialogs::Create 1018 |
||||
; Pop $0 |
||||
; ${NSD_CreateLabel} 0 10 75% 20u "How would you like PurpleI2P (i2pd) to run?" |
||||
; Pop $0 |
||||
|
||||
; ${NSD_CreateRadioButton} 20 60 80% 25u "Service Mode" |
||||
; Pop $hwndExecModeRadio |
||||
; ${NSD_AddStyle} $hwndExecModeRadio ${WS_GROUP} |
||||
|
||||
; ${NSD_CreateRadioButton} 20 90 80% 25u "Command line Mode" |
||||
; Pop $0 |
||||
|
||||
; ${NSD_CreateButton} 20 150 -40 14u "Do it!" |
||||
; Pop $0 |
||||
; ${NSD_OnClick} $0 perform_mode |
||||
|
||||
; nsDialogs::Show |
||||
; FunctionEnd |
||||
|
||||
; Function start_now_selection |
||||
; nsDialogs::Create 1018 |
||||
; Pop $0 |
||||
; ${NSD_CreateLabel} 0 10 75% 20u "Enable the service now?" |
||||
; Pop $0 |
||||
|
||||
; ${NSD_CreateRadioButton} 20 60 80% 25u "Yes" |
||||
; Pop $hwndRunServiceNowRadio |
||||
; ${NSD_AddStyle} $hwndRunServiceNowRadio ${WS_GROUP} |
||||
|
||||
; ${NSD_CreateRadioButton} 20 90 80% 25u "No" |
||||
; Pop $0 |
||||
|
||||
; ${NSD_CreateButton} 20 150 -40 14u "Do it!" |
||||
; Pop $0 |
||||
; ${NSD_OnClick} $0 perform_mode |
||||
|
||||
; nsDialogs::Show |
||||
; FunctionEnd |
||||
|
||||
; Function perform_mode |
||||
; ${NSD_GetState} $hwndExecModeRadio $0 |
||||
; ${If} $0 = ${BST_CHECKED} |
||||
; Call service_mode |
||||
; ${EndIF} |
||||
; FunctionEnd |
||||
|
||||
; Function start_now |
||||
; ${NSD_GetState} $hwndRunServiceNowRadio $0 |
||||
; ${If} $0 = ${BST_CHECKED} |
||||
; Call start_now_selection |
||||
; ${EndIF} |
||||
; FunctionEnd |
||||
|
||||
; Function service_mode |
||||
; Push "create" |
||||
; Push "PurpleI2P Service" |
||||
; Push "$INSTDIR\i2pd.exe;autostart=1;display=PurpleI2P" |
||||
; Call Service |
||||
; Pop $0 ; Actually more to write than !insertmacro, but much more fun :D |
||||
; Push "start" |
||||
; Push "PurpleI2P Service" |
||||
; Call Service |
||||
; Pop $0 |
||||
; Call start_now |
||||
; !define MUI_FINISHPAGE_RUN_NOTCHECKED |
||||
; !define MUI_FINISHPAGE_RUN_TEXT "No need to run now since we already installed and launched it as a Windows service!" |
||||
; FunctionEnd |
||||
|
||||
# Installer functions |
||||
Function .onInit |
||||
InitPluginsDir |
||||
!insertmacro MUI_LANGDLL_DISPLAY |
||||
FunctionEnd |
||||
|
||||
# Uninstaller functions |
||||
Function un.onInit |
||||
ReadRegStr $INSTDIR HKCU "${REGKEY}" Path |
||||
!insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuGroup |
||||
!insertmacro SELECT_UNSECTION Main ${UNSEC0000} |
||||
!insertmacro MUI_UNGETLANGUAGE |
||||
FunctionEnd |
@ -1,84 +0,0 @@
@@ -1,84 +0,0 @@
|
||||
Building i2pd for Windows |
||||
========================= |
||||
|
||||
Requirements for building: |
||||
|
||||
* Visual Studio 2013 (tested with VS2013 Update 1, Update 3, and Update 4) |
||||
* Boost (tested with 1.56, 1.57, and 1.58) |
||||
* Crypto++ (tested with 5.6.2) |
||||
|
||||
|
||||
Building Boost (32-bit) |
||||
----------------------- |
||||
|
||||
Open a Visual Studio x86 command prompt and run the following: |
||||
|
||||
cd C:\path\to\boost\sources |
||||
bootstrap |
||||
b2 toolset=msvc-12.0 --build-type=complete --libdir=C:\Boost\lib\Win32 install --with-filesystem --with-program_options --with-regex --with-date_time |
||||
|
||||
|
||||
Building Boost (64-bit) |
||||
----------------------- |
||||
|
||||
Open a Visual Studio x64 command prompt and run the following: |
||||
|
||||
cd C:\path\to\boost\sources |
||||
bootstrap |
||||
b2 toolset=msvc-12.0 --build-type=complete --libdir=C:\Boost\lib\x64 architecture=x86 address-model=64 install --with-filesystem --with-program_options --with-regex --with-date_time |
||||
|
||||
After Boost is compiled, set the environment variable `BOOST` to the directory |
||||
Boost was installed to. If you followed the instructions outlined here, you |
||||
should set it to `C:\Boost`. Additionally, set the BOOSTVER variable to the |
||||
version of Boost that you're using, but instead of a '.' use a '_'. For |
||||
example, I have `BOOSTVER` set to `1_58`. |
||||
|
||||
Building Crypto++ |
||||
----------------- |
||||
|
||||
* Open the crypttest Solution in VS2013 |
||||
* Visual Studio will ask to update the Solution/Project. Allow it. |
||||
* Build the `cryptopp` project, both the Debug and Release targets and for both |
||||
Win32 and x64. |
||||
* Create a folder called `cryptopp` in the crypto++ source directory, then copy |
||||
the header files to this new directory. |
||||
* Set the `CRYPTOPP` environment variable pointing to the Crypto++ source directory. |
||||
|
||||
|
||||
Building i2pd |
||||
------------- |
||||
|
||||
## Prep work ## |
||||
|
||||
I strongly advise setting up your own `INCLUDES` and `LIBS` instead of relying |
||||
on the settings in the i2pd project file. By using your own settings, if the |
||||
i2pd devs change the paths in the project file, your builds will still work. |
||||
|
||||
To do this, create or edit the file |
||||
`%localappdata%\Microsoft\MSBuild\v4.0\Microsoft.Cpp.Win32.user`. |
||||
|
||||
For comparison, my file is reproduced below: |
||||
|
||||
<?xml version="1.0" encoding="utf-8"?> |
||||
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
||||
<ImportGroup Label="PropertySheets"> |
||||
</ImportGroup> |
||||
<PropertyGroup Label="UserMacros" /> |
||||
<PropertyGroup> |
||||
<LibraryPath>$(CRYPTOPP)\$(Platform)\Output\$(Configuration);$(BOOST)\lib\$(Platform);$(LibraryPath)</LibraryPath> |
||||
<IncludePath>$(CRYPTOPP);$(BOOST)\include\boost-$(BOOSTVER);$(IncludePath)</IncludePath> |
||||
</PropertyGroup> |
||||
<ItemDefinitionGroup /> |
||||
<ItemGroup /> |
||||
</Project> |
||||
|
||||
|
||||
If you want to build x64 binaries as well, you'll want to edit or create the |
||||
file `%localappdata%\Microsoft\MSBuild\v4.0\Microsoft.Cpp.x64.user`. If you |
||||
followed the steps outlined earlier you can copy (or link) the win32 file to |
||||
the x64 one. |
||||
|
||||
## Anti-Climatic End ## |
||||
|
||||
After following the above instructions, you'll be able to build Debug Win32, |
||||
Debug x64, Release Win32, and Release x64 i2pd binaries. |
Binary file not shown.
Before Width: | Height: | Size: 97 KiB |
@ -1,149 +0,0 @@
@@ -1,149 +0,0 @@
|
||||
|
||||
#define I2Pd_AppName "i2pd" |
||||
#define I2Pd_ver "0.2" |
||||
|
||||
[Setup] |
||||
AppName={#I2Pd_AppName} |
||||
AppVersion={#I2Pd_ver} |
||||
DefaultDirName={pf}\I2Pd |
||||
DefaultGroupName=I2Pd |
||||
UninstallDisplayIcon={app}\I2Pd.exe |
||||
Compression=lzma2 |
||||
SolidCompression=yes |
||||
OutputDir=. |
||||
LicenseFile=.\..\LICENSE |
||||
OutputBaseFilename=setup_{#I2Pd_AppName}_v{#I2Pd_ver} |
||||
ArchitecturesInstallIn64BitMode=x64 |
||||
|
||||
|
||||
[Files] |
||||
Source: "x64\Release\i2pd.exe"; DestDir: "{app}"; DestName: "i2pd.exe"; Check: Is64BitInstallMode |
||||
Source: "Release\i2pd.exe"; DestDir: "{app}"; Check: not Is64BitInstallMode |
||||
Source: "..\README.md"; DestDir: "{app}"; DestName: "Readme.txt"; AfterInstall: ConvertLineEndings |
||||
|
||||
[Icons] |
||||
Name: "{group}\I2Pd"; Filename: "{app}\i2pd.exe" |
||||
Name: "{group}\Readme"; Filename: "{app}\Readme.txt" |
||||
|
||||
|
||||
[Registry] |
||||
Root: HKCU; Subkey: "Environment"; ValueName: "Path"; ValueType: "string"; ValueData: "{app};{olddata}"; Check: NotOnPathAlready(); Flags: preservestringtype; |
||||
|
||||
[Code] |
||||
|
||||
var |
||||
DefaultTop, |
||||
DefaultLeft, |
||||
DefaultHeight, |
||||
DefaultBackTop, |
||||
DefaultNextTop, |
||||
DefaultCancelTop, |
||||
DefaultBevelTop, |
||||
DefaultOuterHeight: Integer; |
||||
|
||||
const |
||||
LicenseHeight = 400; |
||||
LF = #10; |
||||
CR = #13; |
||||
CRLF = CR + LF; |
||||
|
||||
procedure ConvertLineEndings(); |
||||
var |
||||
FilePath : String; |
||||
FileContents : String; |
||||
begin |
||||
FilePath := ExpandConstant(CurrentFileName) |
||||
LoadStringFromFile(FilePath, FileContents); |
||||
StringChangeEx(FileContents, LF, CRLF, False); |
||||
SaveStringToFile(FilePath, FileContents, False); |
||||
end; |
||||
|
||||
procedure InitializeWizard(); |
||||
begin |
||||
DefaultTop := WizardForm.Top; |
||||
DefaultLeft := WizardForm.Left; |
||||
DefaultHeight := WizardForm.Height; |
||||
DefaultBackTop := WizardForm.BackButton.Top; |
||||
DefaultNextTop := WizardForm.NextButton.Top; |
||||
DefaultCancelTop := WizardForm.CancelButton.Top; |
||||
DefaultBevelTop := WizardForm.Bevel.Top; |
||||
DefaultOuterHeight := WizardForm.OuterNotebook.Height; |
||||
|
||||
WizardForm.InnerPage.Height := WizardForm.InnerPage.Height + (LicenseHeight - DefaultHeight); |
||||
WizardForm.InnerNotebook.Height := WizardForm.InnerNotebook.Height + (LicenseHeight - DefaultHeight); |
||||
WizardForm.LicensePage.Height := WizardForm.LicensePage.Height + (LicenseHeight - DefaultHeight); |
||||
WizardForm.LicenseMemo.Height := WizardForm.LicenseMemo.Height + (LicenseHeight - DefaultHeight); |
||||
WizardForm.LicenseNotAcceptedRadio.Top := WizardForm.LicenseNotAcceptedRadio.Top + (LicenseHeight - DefaultHeight); |
||||
WizardForm.LicenseAcceptedRadio.Top := WizardForm.LicenseAcceptedRadio.Top + (LicenseHeight - DefaultHeight); |
||||
|
||||
end; |
||||
|
||||
procedure CurPageChanged(CurPageID: Integer); |
||||
begin |
||||
if CurPageID = wpLicense then |
||||
begin |
||||
WizardForm.Top := DefaultTop - (LicenseHeight - DefaultHeight) div 2; |
||||
WizardForm.Height := LicenseHeight; |
||||
WizardForm.OuterNotebook.Height := WizardForm.OuterNotebook.Height + (LicenseHeight - DefaultHeight); |
||||
WizardForm.CancelButton.Top := DefaultCancelTop + (LicenseHeight - DefaultHeight); |
||||
WizardForm.NextButton.Top := DefaultNextTop + (LicenseHeight - DefaultHeight); |
||||
WizardForm.BackButton.Top := DefaultBackTop + (LicenseHeight - DefaultHeight); |
||||
WizardForm.Bevel.Top := DefaultBevelTop + (LicenseHeight - DefaultHeight); |
||||
end |
||||
else |
||||
begin |
||||
WizardForm.Top := DefaultTop; |
||||
WizardForm.Left := DefaultLeft; |
||||
WizardForm.Height := DefaultHeight; |
||||
WizardForm.OuterNotebook.Height := DefaultOuterHeight; |
||||
WizardForm.CancelButton.Top := DefaultCancelTop; |
||||
WizardForm.NextButton.Top := DefaultNextTop; |
||||
WizardForm.BackButton.Top := DefaultBackTop; |
||||
WizardForm.Bevel.Top := DefaultBevelTop; |
||||
end; |
||||
end; |
||||
|
||||
function NotOnPathAlready(): Boolean; |
||||
var |
||||
BinDir, Path: String; |
||||
begin |
||||
Log('Checking if i2pd dir is already in the %PATH%'); |
||||
if RegQueryStringValue(HKEY_CURRENT_USER, 'Environment', 'Path', Path) then |
||||
begin // Successfully read the value |
||||
Log('HKCUEnvironmentPATH = ' + Path); |
||||
BinDir := ExpandConstant('{app}'); |
||||
Log('Looking for i2pd dir in %PATH%: ' + BinDir + ' in ' + Path); |
||||
if Pos(LowerCase(BinDir), Lowercase(Path)) = 0 then |
||||
begin |
||||
Log('Did not find i2pd dir in %PATH% so I will add it'); |
||||
Result := True; |
||||
end |
||||
else |
||||
begin |
||||
Log('Found i2pd dir in %PATH% so will not add it again'); |
||||
Result := False; |
||||
end |
||||
end |
||||
else // The key probably doesn't exist |
||||
begin |
||||
Log('Could not access HKCUEnvironmentPATH so I assume that it is OK to add it'); |
||||
Result := True; |
||||
end; |
||||
end; |
||||
|
||||
|
||||
procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); |
||||
var |
||||
BinDir, Path: String; |
||||
begin |
||||
if (CurUninstallStep = usPostUninstall) |
||||
and (RegQueryStringValue(HKEY_CURRENT_USER, 'Environment', 'PATH', Path)) then |
||||
begin |
||||
BinDir := ExpandConstant('{app}'); |
||||
if Pos(LowerCase(BinDir) + ';', Lowercase(Path)) <> 0 then |
||||
begin |
||||
StringChange(Path, BinDir + ';', ''); |
||||
RegWriteStringValue(HKEY_CURRENT_USER, 'Environment', 'PATH', Path); |
||||
end; |
||||
end; |
||||
end; |
@ -1,57 +0,0 @@
@@ -1,57 +0,0 @@
|
||||
!verbose push |
||||
!verbose 3 |
||||
|
||||
!ifndef _MUI_EXTRAPAGES_NSH |
||||
!define _MUI_EXTRAPAGES_NSH |
||||
|
||||
!ifmacrondef MUI_EXTRAPAGE_README & MUI_PAGE_README & MUI_UNPAGE_README & ReadmeLangStrings |
||||
|
||||
!macro MUI_EXTRAPAGE_README UN ReadmeFile |
||||
!verbose push |
||||
!verbose 3 |
||||
!define MUI_PAGE_HEADER_TEXT "$(${UN}ReadmeHeader)" |
||||
!define MUI_PAGE_HEADER_SUBTEXT "$(${UN}ReadmeSubHeader)" |
||||
!define MUI_LICENSEPAGE_TEXT_TOP "$(${UN}ReadmeTextTop)" |
||||
!define MUI_LICENSEPAGE_TEXT_BOTTOM "$(${UN}ReadmeTextBottom)" |
||||
!define MUI_LICENSEPAGE_BUTTON "$(^NextBtn)" |
||||
!insertmacro MUI_${UN}PAGE_LICENSE "${ReadmeFile}" |
||||
!verbose pop |
||||
!macroend |
||||
|
||||
!define ReadmeRun "!insertmacro MUI_EXTRAPAGE_README" |
||||
|
||||
|
||||
!macro MUI_PAGE_README ReadmeFile |
||||
!verbose push |
||||
!verbose 3 |
||||
${ReadmeRun} "" "${ReadmeFile}" |
||||
!verbose pop |
||||
!macroend |
||||
|
||||
|
||||
!macro MUI_UNPAGE_README ReadmeFile |
||||
!verbose push |
||||
!verbose 3 |
||||
${ReadmeRun} "UN" "${ReadmeFile}" |
||||
!verbose pop |
||||
!macroend |
||||
|
||||
|
||||
!macro ReadmeLangStrings UN MUI_LANG ReadmeHeader ReadmeSubHeader ReadmeTextTop ReadmeTextBottom |
||||
!verbose push |
||||
!verbose 3 |
||||
LangString ${UN}ReadmeHeader ${MUI_LANG} "${ReadmeHeader}" |
||||
LangString ${UN}ReadmeSubHeader ${MUI_LANG} "${ReadmeSubHeader}" |
||||
LangString ${UN}ReadmeTextTop ${MUI_LANG} "${ReadmeTextTop}" |
||||
LangString ${UN}ReadmeTextBottom ${MUI_LANG} "${ReadmeTextBottom}" |
||||
!verbose pop |
||||
!macroend |
||||
|
||||
!define ReadmeLanguage `!insertmacro ReadmeLangStrings ""` |
||||
|
||||
!define Un.ReadmeLanguage `!insertmacro ReadmeLangStrings "UN"` |
||||
|
||||
!endif |
||||
!endif |
||||
|
||||
!verbose pop |
@ -1,419 +0,0 @@
@@ -1,419 +0,0 @@
|
||||
; NSIS SERVICE LIBRARY - servicelib.nsh |
||||
; Version 1.8.1 - Jun 21th, 2013 |
||||
; Questions/Comments - dselkirk@hotmail.com |
||||
; |
||||
; Description: |
||||
; Provides an interface to window services |
||||
; |
||||
; Inputs: |
||||
; action - systemlib action ie. create, delete, start, stop, pause, |
||||
; continue, installed, running, status |
||||
; name - name of service to manipulate |
||||
; param - action parameters; usage: var1=value1;var2=value2;...etc. |
||||
; (don't forget to add a ';' after the last value!) |
||||
; |
||||
; Actions: |
||||
; create - creates a new windows service |
||||
; Parameters: |
||||
; path - path to service executable |
||||
; autostart - automatically start with system ie. 1|0 |
||||
; interact - interact with the desktop ie. 1|0 |
||||
; depend - service dependencies |
||||
; user - user that runs the service |
||||
; password - password of the above user |
||||
; display - display name in service's console |
||||
; description - Description of service |
||||
; starttype - start type (supersedes autostart) |
||||
; servicetype - service type (supersedes interact) |
||||
; |
||||
; delete - deletes a windows service |
||||
; start - start a stopped windows service |
||||
; stop - stops a running windows service |
||||
; pause - pauses a running windows service |
||||
; continue - continues a paused windows service |
||||
; installed - is the provided service installed |
||||
; Parameters: |
||||
; action - if true then invokes the specified action |
||||
; running - is the provided service running |
||||
; Parameters: |
||||
; action - if true then invokes the specified action |
||||
; status - check the status of the provided service |
||||
; |
||||
; Usage: |
||||
; Method 1: |
||||
; Push "action" |
||||
; Push "name" |
||||
; Push "param" |
||||
; Call Service |
||||
; Pop $0 ;response |
||||
; |
||||
; Method 2: |
||||
; !insertmacro SERVICE "action" "name" "param" |
||||
; |
||||
; History: |
||||
; 1.0 - 09/15/2003 - Initial release |
||||
; 1.1 - 09/16/2003 - Changed &l to i, thx brainsucker |
||||
; 1.2 - 02/29/2004 - Fixed documentation. |
||||
; 1.3 - 01/05/2006 - Fixed interactive flag and pop order (Kichik) |
||||
; 1.4 - 12/07/2006 - Added display and depend, fixed datatypes (Vitoco) |
||||
; 1.5 - 06/25/2008 - Added description of service.(DeSafe.com/liuqixing#gmail.com) |
||||
; 1.5.1 - 06/12/2009 - Added use of __UNINSTALL__ |
||||
; 1.6 - 08/02/2010 - Fixed description implementation (Anders) |
||||
; 1.7 - 04/11/2010 - Added get running service process id (Nico) |
||||
; 1.8 - 24/03/2011 - Added starttype and servicetype (Sergius) |
||||
; 1.8.1 - 21/06/2013 - Added dynamic ASCII & Unicode support (Zinthose) |
||||
|
||||
!ifndef SERVICELIB |
||||
!define SERVICELIB |
||||
|
||||
!define SC_MANAGER_ALL_ACCESS 0x3F |
||||
!define SC_STATUS_PROCESS_INFO 0x0 |
||||
!define SERVICE_ALL_ACCESS 0xF01FF |
||||
|
||||
!define SERVICE_CONTROL_STOP 1 |
||||
!define SERVICE_CONTROL_PAUSE 2 |
||||
!define SERVICE_CONTROL_CONTINUE 3 |
||||
|
||||
!define SERVICE_STOPPED 0x1 |
||||
!define SERVICE_START_PENDING 0x2 |
||||
!define SERVICE_STOP_PENDING 0x3 |
||||
!define SERVICE_RUNNING 0x4 |
||||
!define SERVICE_CONTINUE_PENDING 0x5 |
||||
!define SERVICE_PAUSE_PENDING 0x6 |
||||
!define SERVICE_PAUSED 0x7 |
||||
|
||||
!define SERVICE_KERNEL_DRIVER 0x00000001 |
||||
!define SERVICE_FILE_SYSTEM_DRIVER 0x00000002 |
||||
!define SERVICE_WIN32_OWN_PROCESS 0x00000010 |
||||
!define SERVICE_WIN32_SHARE_PROCESS 0x00000020 |
||||
!define SERVICE_INTERACTIVE_PROCESS 0x00000100 |
||||
|
||||
|
||||
!define SERVICE_BOOT_START 0x00000000 |
||||
!define SERVICE_SYSTEM_START 0x00000001 |
||||
!define SERVICE_AUTO_START 0x00000002 |
||||
!define SERVICE_DEMAND_START 0x00000003 |
||||
!define SERVICE_DISABLED 0x00000004 |
||||
|
||||
## Added by Zinthose for Native Unicode Support |
||||
!ifdef NSIS_UNICODE |
||||
!define APITAG "W" |
||||
!else |
||||
!define APITAG "A" |
||||
!endif |
||||
|
||||
!macro SERVICE ACTION NAME PARAM |
||||
Push '${ACTION}' |
||||
Push '${NAME}' |
||||
Push '${PARAM}' |
||||
!ifdef __UNINSTALL__ |
||||
Call un.Service |
||||
!else |
||||
Call Service |
||||
!endif |
||||
!macroend |
||||
|
||||
!macro FUNC_GETPARAM |
||||
Push $0 |
||||
Push $1 |
||||
Push $2 |
||||
Push $3 |
||||
Push $4 |
||||
Push $5 |
||||
Push $6 |
||||
Push $7 |
||||
Exch 8 |
||||
Pop $1 ;name |
||||
Exch 8 |
||||
Pop $2 ;source |
||||
StrCpy $0 "" |
||||
StrLen $7 $2 |
||||
StrCpy $3 0 |
||||
lbl_loop: |
||||
IntCmp $3 $7 0 0 lbl_done |
||||
StrLen $4 "$1=" |
||||
StrCpy $5 $2 $4 $3 |
||||
StrCmp $5 "$1=" 0 lbl_next |
||||
IntOp $5 $3 + $4 |
||||
StrCpy $3 $5 |
||||
lbl_loop2: |
||||
IntCmp $3 $7 0 0 lbl_done |
||||
StrCpy $6 $2 1 $3 |
||||
StrCmp $6 ";" 0 lbl_next2 |
||||
IntOp $6 $3 - $5 |
||||
StrCpy $0 $2 $6 $5 |
||||
Goto lbl_done |
||||
lbl_next2: |
||||
IntOp $3 $3 + 1 |
||||
Goto lbl_loop2 |
||||
lbl_next: |
||||
IntOp $3 $3 + 1 |
||||
Goto lbl_loop |
||||
lbl_done: |
||||
Pop $5 |
||||
Pop $4 |
||||
Pop $3 |
||||
Pop $2 |
||||
Pop $1 |
||||
Exch 2 |
||||
Pop $6 |
||||
Pop $7 |
||||
Exch $0 |
||||
!macroend |
||||
|
||||
!macro CALL_GETPARAM VAR NAME DEFAULT LABEL |
||||
Push $1 |
||||
Push ${NAME} |
||||
Call ${UN}GETPARAM |
||||
Pop $6 |
||||
StrCpy ${VAR} "${DEFAULT}" |
||||
StrCmp $6 "" "${LABEL}" 0 |
||||
StrCpy ${VAR} $6 |
||||
!macroend |
||||
|
||||
!macro FUNC_SERVICE UN |
||||
Push $0 |
||||
Push $1 |
||||
Push $2 |
||||
Push $3 |
||||
Push $4 |
||||
Push $5 |
||||
Push $6 |
||||
Push $7 |
||||
Exch 8 |
||||
Pop $1 ;param |
||||
Exch 8 |
||||
Pop $2 ;name |
||||
Exch 8 |
||||
Pop $3 ;action |
||||
;$0 return |
||||
;$4 OpenSCManager |
||||
;$5 OpenService |
||||
|
||||
StrCpy $0 "false" |
||||
System::Call 'advapi32::OpenSCManager${APITAG}(n, n, i ${SC_MANAGER_ALL_ACCESS}) i.r4' |
||||
IntCmp $4 0 lbl_done |
||||
StrCmp $3 "create" lbl_create |
||||
System::Call 'advapi32::OpenService${APITAG}(i r4, t r2, i ${SERVICE_ALL_ACCESS}) i.r5' |
||||
IntCmp $5 0 lbl_done |
||||
|
||||
lbl_select: |
||||
StrCmp $3 "delete" lbl_delete |
||||
StrCmp $3 "start" lbl_start |
||||
StrCmp $3 "stop" lbl_stop |
||||
StrCmp $3 "pause" lbl_pause |
||||
StrCmp $3 "continue" lbl_continue |
||||
StrCmp $3 "installed" lbl_installed |
||||
StrCmp $3 "running" lbl_running |
||||
StrCmp $3 "status" lbl_status |
||||
StrCmp $3 "processid" lbl_processid |
||||
Goto lbl_done |
||||
|
||||
; create service |
||||
lbl_create: |
||||
Push $R1 ;depend |
||||
Push $R2 ;user |
||||
Push $R3 ;password |
||||
Push $R4 ;servicetype/interact |
||||
Push $R5 ;starttype/autostart |
||||
Push $R6 ;path |
||||
Push $R7 ;display |
||||
Push $R8 ;description |
||||
|
||||
!insertmacro CALL_GETPARAM $R1 "depend" "n" "lbl_depend" |
||||
StrCpy $R1 't "$R1"' |
||||
lbl_depend: |
||||
StrCmp $R1 "n" 0 lbl_machine ;old name of depend param |
||||
!insertmacro CALL_GETPARAM $R1 "machine" "n" "lbl_machine" |
||||
StrCpy $R1 't "$R1"' |
||||
lbl_machine: |
||||
|
||||
!insertmacro CALL_GETPARAM $R2 "user" "n" "lbl_user" |
||||
StrCpy $R2 't "$R2"' |
||||
lbl_user: |
||||
|
||||
!insertmacro CALL_GETPARAM $R3 "password" "n" "lbl_password" |
||||
StrCpy $R3 't "$R3"' |
||||
lbl_password: |
||||
|
||||
!insertmacro CALL_GETPARAM $R4 "interact" "${SERVICE_WIN32_OWN_PROCESS}" "lbl_interact" |
||||
StrCpy $6 ${SERVICE_WIN32_OWN_PROCESS} |
||||
IntCmp $R4 0 +2 |
||||
IntOp $6 $6 | ${SERVICE_INTERACTIVE_PROCESS} |
||||
StrCpy $R4 $6 |
||||
lbl_interact: |
||||
|
||||
!insertmacro CALL_GETPARAM $R4 "servicetype" "$R4" "lbl_servicetype" |
||||
lbl_servicetype: |
||||
|
||||
!insertmacro CALL_GETPARAM $R5 "autostart" "${SERVICE_DEMAND_START}" "lbl_autostart" |
||||
StrCpy $6 ${SERVICE_DEMAND_START} |
||||
IntCmp $R5 0 +2 |
||||
StrCpy $6 ${SERVICE_AUTO_START} |
||||
StrCpy $R5 $6 |
||||
lbl_autostart: |
||||
|
||||
!insertmacro CALL_GETPARAM $R5 "starttype" "$R5" "lbl_starttype" |
||||
lbl_starttype: |
||||
|
||||
!insertmacro CALL_GETPARAM $R6 "path" "n" "lbl_path" |
||||
lbl_path: |
||||
|
||||
!insertmacro CALL_GETPARAM $R7 "display" "$2" "lbl_display" |
||||
lbl_display: |
||||
|
||||
!insertmacro CALL_GETPARAM $R8 "description" "$2" "lbl_description" |
||||
lbl_description: |
||||
|
||||
System::Call 'advapi32::CreateService${APITAG}(i r4, t r2, t R7, i ${SERVICE_ALL_ACCESS}, \ |
||||
i R4, i R5, i 0, t R6, n, n, $R1, $R2, $R3) i.r6' |
||||
|
||||
; write description of service (SERVICE_CONFIG_DESCRIPTION) |
||||
System::Call 'advapi32::ChangeServiceConfig2${APITAG}(ir6,i1,*t "$R8")i.R7' |
||||
strcmp $R7 "error" 0 lbl_descriptioncomplete |
||||
WriteRegStr HKLM "SYSTEM\CurrentControlSet\Services\$2" "Description" $R8 |
||||
lbl_descriptioncomplete: |
||||
|
||||
Pop $R8 |
||||
Pop $R7 |
||||
Pop $R6 |
||||
Pop $R5 |
||||
Pop $R4 |
||||
Pop $R3 |
||||
Pop $R2 |
||||
Pop $R1 |
||||
StrCmp $6 0 lbl_done lbl_good |
||||
|
||||
; delete service |
||||
lbl_delete: |
||||
System::Call 'advapi32::DeleteService(i r5) i.r6' |
||||
StrCmp $6 0 lbl_done lbl_good |
||||
|
||||
; start service |
||||
lbl_start: |
||||
System::Call 'advapi32::StartService${APITAG}(i r5, i 0, i 0) i.r6' |
||||
StrCmp $6 0 lbl_done lbl_good |
||||
|
||||
; stop service |
||||
lbl_stop: |
||||
Push $R1 |
||||
System::Call '*(i,i,i,i,i,i,i) i.R1' |
||||
System::Call 'advapi32::ControlService(i r5, i ${SERVICE_CONTROL_STOP}, i $R1) i' |
||||
System::Free $R1 |
||||
Pop $R1 |
||||
StrCmp $6 0 lbl_done lbl_good |
||||
|
||||
; pause service |
||||
lbl_pause: |
||||
Push $R1 |
||||
System::Call '*(i,i,i,i,i,i,i) i.R1' |
||||
System::Call 'advapi32::ControlService(i r5, i ${SERVICE_CONTROL_PAUSE}, i $R1) i' |
||||
System::Free $R1 |
||||
Pop $R1 |
||||
StrCmp $6 0 lbl_done lbl_good |
||||
|
||||
; continue service |
||||
lbl_continue: |
||||
Push $R1 |
||||
System::Call '*(i,i,i,i,i,i,i) i.R1' |
||||
System::Call 'advapi32::ControlService(i r5, i ${SERVICE_CONTROL_CONTINUE}, i $R1) i' |
||||
System::Free $R1 |
||||
Pop $R1 |
||||
StrCmp $6 0 lbl_done lbl_good |
||||
|
||||
; is installed |
||||
lbl_installed: |
||||
!insertmacro CALL_GETPARAM $7 "action" "" "lbl_good" |
||||
StrCpy $3 $7 |
||||
Goto lbl_select |
||||
|
||||
; is service running |
||||
lbl_running: |
||||
Push $R1 |
||||
System::Call '*(i,i,i,i,i,i,i) i.R1' |
||||
System::Call 'advapi32::QueryServiceStatus(i r5, i $R1) i' |
||||
System::Call '*$R1(i, i.r6)' |
||||
System::Free $R1 |
||||
Pop $R1 |
||||
IntFmt $6 "0x%X" $6 |
||||
StrCmp $6 ${SERVICE_RUNNING} 0 lbl_done |
||||
!insertmacro CALL_GETPARAM $7 "action" "" "lbl_good" |
||||
StrCpy $3 $7 |
||||
Goto lbl_select |
||||
|
||||
lbl_status: |
||||
Push $R1 |
||||
System::Call '*(i,i,i,i,i,i,i) i.R1' |
||||
System::Call 'advapi32::QueryServiceStatus(i r5, i $R1) i' |
||||
System::Call '*$R1(i, i .r6)' |
||||
System::Free $R1 |
||||
Pop $R1 |
||||
IntFmt $6 "0x%X" $6 |
||||
StrCpy $0 "running" |
||||
IntCmp $6 ${SERVICE_RUNNING} lbl_done |
||||
StrCpy $0 "stopped" |
||||
IntCmp $6 ${SERVICE_STOPPED} lbl_done |
||||
StrCpy $0 "start_pending" |
||||
IntCmp $6 ${SERVICE_START_PENDING} lbl_done |
||||
StrCpy $0 "stop_pending" |
||||
IntCmp $6 ${SERVICE_STOP_PENDING} lbl_done |
||||
StrCpy $0 "running" |
||||
IntCmp $6 ${SERVICE_RUNNING} lbl_done |
||||
StrCpy $0 "continue_pending" |
||||
IntCmp $6 ${SERVICE_CONTINUE_PENDING} lbl_done |
||||
StrCpy $0 "pause_pending" |
||||
IntCmp $6 ${SERVICE_PAUSE_PENDING} lbl_done |
||||
StrCpy $0 "paused" |
||||
IntCmp $6 ${SERVICE_PAUSED} lbl_done |
||||
StrCpy $0 "unknown" |
||||
Goto lbl_done |
||||
|
||||
lbl_processid: |
||||
Push $R1 |
||||
Push $R2 |
||||
System::Call '*(i,i,i,i,i,i,i,i,i) i.R1' |
||||
System::Call '*(i 0) i.R2' |
||||
System::Call "advapi32::QueryServiceStatusEx(i r5, i ${SC_STATUS_PROCESS_INFO}, i $R1, i 36, i $R2) i" |
||||
System::Call "*$R1(i,i,i,i,i,i,i, i .r0)" |
||||
System::Free $R2 |
||||
System::Free $R1 |
||||
Pop $R2 |
||||
Pop $R1 |
||||
Goto lbl_done |
||||
|
||||
lbl_good: |
||||
StrCpy $0 "true" |
||||
lbl_done: |
||||
IntCmp $5 0 +2 |
||||
System::Call 'advapi32::CloseServiceHandle(i r5) n' |
||||
IntCmp $4 0 +2 |
||||
System::Call 'advapi32::CloseServiceHandle(i r4) n' |
||||
Pop $4 |
||||
Pop $3 |
||||
Pop $2 |
||||
Pop $1 |
||||
Exch 3 |
||||
Pop $5 |
||||
Pop $7 |
||||
Pop $6 |
||||
Exch $0 |
||||
!macroend |
||||
|
||||
Function Service |
||||
!insertmacro FUNC_SERVICE "" |
||||
FunctionEnd |
||||
|
||||
Function un.Service |
||||
!insertmacro FUNC_SERVICE "un." |
||||
FunctionEnd |
||||
|
||||
Function GetParam |
||||
!insertmacro FUNC_GETPARAM |
||||
FunctionEnd |
||||
|
||||
Function un.GetParam |
||||
!insertmacro FUNC_GETPARAM |
||||
FunctionEnd |
||||
|
||||
!undef APITAG |
||||
!endif |
Binary file not shown.
@ -1,321 +0,0 @@
@@ -1,321 +0,0 @@
|
||||
cmake_minimum_required ( VERSION 2.8.12 ) |
||||
project ( "i2pd" ) |
||||
|
||||
# configurale options |
||||
option(WITH_AESNI "Use AES-NI instructions set" OFF) |
||||
option(WITH_HARDENING "Use hardening compiler flags" OFF) |
||||
option(WITH_LIBRARY "Build library" ON) |
||||
option(WITH_BINARY "Build binary" ON) |
||||
option(WITH_STATIC "Static build" OFF) |
||||
option(WITH_UPNP "Include support for UPnP client" OFF) |
||||
option(WITH_PCH "Use precompiled header" OFF) |
||||
option(WITH_TESTS "Build unit tests" OFF) |
||||
|
||||
# paths |
||||
set ( CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake_modules" ) |
||||
set ( CMAKE_SOURCE_DIR ".." ) |
||||
|
||||
set (COMMON_SRC |
||||
"${CMAKE_SOURCE_DIR}/transport/NTCPSession.cpp" |
||||
"${CMAKE_SOURCE_DIR}/transport/SSU.cpp" |
||||
"${CMAKE_SOURCE_DIR}/transport/SSUData.cpp" |
||||
"${CMAKE_SOURCE_DIR}/transport/SSUSession.cpp" |
||||
"${CMAKE_SOURCE_DIR}/transport/Transports.cpp" |
||||
"${CMAKE_SOURCE_DIR}/crypto/CryptoConst.cpp" |
||||
"${CMAKE_SOURCE_DIR}/crypto/aes.cpp" |
||||
"${CMAKE_SOURCE_DIR}/crypto/Signature.cpp" |
||||
"${CMAKE_SOURCE_DIR}/util/base64.cpp" |
||||
"${CMAKE_SOURCE_DIR}/util/util.cpp" |
||||
"${CMAKE_SOURCE_DIR}/util/Log.cpp" |
||||
"${CMAKE_SOURCE_DIR}/tunnel/TransitTunnel.cpp" |
||||
"${CMAKE_SOURCE_DIR}/tunnel/Tunnel.cpp" |
||||
"${CMAKE_SOURCE_DIR}/tunnel/TunnelGateway.cpp" |
||||
"${CMAKE_SOURCE_DIR}/tunnel/TunnelEndpoint.cpp" |
||||
"${CMAKE_SOURCE_DIR}/tunnel/TunnelPool.cpp" |
||||
"${CMAKE_SOURCE_DIR}/tunnel/TunnelCrypto.cpp" |
||||
"${CMAKE_SOURCE_DIR}/AddressBook.cpp" |
||||
"${CMAKE_SOURCE_DIR}/Garlic.cpp" |
||||
"${CMAKE_SOURCE_DIR}/I2NPProtocol.cpp" |
||||
"${CMAKE_SOURCE_DIR}/Identity.cpp" |
||||
"${CMAKE_SOURCE_DIR}/LeaseSet.cpp" |
||||
"${CMAKE_SOURCE_DIR}/NetDbRequests.cpp" |
||||
"${CMAKE_SOURCE_DIR}/NetDb.cpp" |
||||
"${CMAKE_SOURCE_DIR}/Profiling.cpp" |
||||
"${CMAKE_SOURCE_DIR}/Reseed.cpp" |
||||
"${CMAKE_SOURCE_DIR}/RouterContext.cpp" |
||||
"${CMAKE_SOURCE_DIR}/RouterInfo.cpp" |
||||
"${CMAKE_SOURCE_DIR}/Streaming.cpp" |
||||
"${CMAKE_SOURCE_DIR}/Destination.cpp" |
||||
"${CMAKE_SOURCE_DIR}/Datagram.cpp" |
||||
"${CMAKE_SOURCE_DIR}/UPnP.cpp" |
||||
) |
||||
|
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Windows") |
||||
list (APPEND COMMON_SRC "${CMAKE_SOURCE_DIR}/util/I2PEndian.cpp") |
||||
endif () |
||||
|
||||
add_library(common ${COMMON_SRC}) |
||||
|
||||
set (DAEMON_SRC |
||||
"${CMAKE_SOURCE_DIR}/BOB.cpp" |
||||
"${CMAKE_SOURCE_DIR}/ClientContext.cpp" |
||||
"${CMAKE_SOURCE_DIR}/Daemon.cpp" |
||||
"${CMAKE_SOURCE_DIR}/HTTPProxy.cpp" |
||||
"${CMAKE_SOURCE_DIR}/HTTPServer.cpp" |
||||
"${CMAKE_SOURCE_DIR}/I2PService.cpp" |
||||
"${CMAKE_SOURCE_DIR}/i2pcontrol/I2PControl.cpp" |
||||
"${CMAKE_SOURCE_DIR}/i2pcontrol/I2PControlServer.cpp" |
||||
"${CMAKE_SOURCE_DIR}/I2PTunnel.cpp" |
||||
"${CMAKE_SOURCE_DIR}/SAM.cpp" |
||||
"${CMAKE_SOURCE_DIR}/SOCKS.cpp" |
||||
"${CMAKE_SOURCE_DIR}/i2p.cpp" |
||||
) |
||||
|
||||
set (TESTS_SRC |
||||
"${CMAKE_SOURCE_DIR}/tests/Base64.cpp" |
||||
"${CMAKE_SOURCE_DIR}/tests/Crypto.cpp" |
||||
"${CMAKE_SOURCE_DIR}/tests/Identity.cpp" |
||||
"${CMAKE_SOURCE_DIR}/tests/Utility.cpp" |
||||
) |
||||
|
||||
if (WITH_UPNP) |
||||
add_definitions(-DUSE_UPNP) |
||||
if (NOT MSVC) |
||||
set(DL_LIB ${CMAKE_DL_LIBS}) |
||||
endif () |
||||
endif () |
||||
|
||||
set (LIBRARY_SRC |
||||
"${CMAKE_SOURCE_DIR}/api.cpp" |
||||
) |
||||
|
||||
file (GLOB HEADERS "${CMAKE_SOURCE_DIR}/*.h") |
||||
|
||||
# MSVS grouping |
||||
source_group ("Header Files" FILES ${HEADERS}) |
||||
source_group ("Source Files" FILES ${COMMON_SRC} ${DAEMON_SRC} ${LIBRARY_SRC}) |
||||
|
||||
# Default build is Debug |
||||
if (NOT CMAKE_BUILD_TYPE) |
||||
set(CMAKE_BUILD_TYPE Debug) |
||||
endif () |
||||
|
||||
# compiler flags customization (by vendor) |
||||
if (NOT MSVC) |
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Winvalid-pch" ) |
||||
set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -pedantic" ) |
||||
# TODO: The following is incompatible with static build and enabled hardening for OpenWRT. |
||||
# Multiple definitions of __stack_chk_fail (libssp & libc) |
||||
set( CMAKE_CXX_FLAGS_MINSIZEREL "${CMAKE_CXX_FLAGS_MINSIZEREL} -flto -s -ffunction-sections -fdata-sections" ) |
||||
set( CMAKE_EXE_LINKER_FLAGS_MINSIZEREL "-Wl,--gc-sections" ) # -flto is added from above |
||||
endif () |
||||
|
||||
# check for c++11 support |
||||
include(CheckCXXCompilerFlag) |
||||
CHECK_CXX_COMPILER_FLAG("-std=c++11" CXX11_SUPPORTED) |
||||
CHECK_CXX_COMPILER_FLAG("-std=c++0x" CXX0X_SUPPORTED) |
||||
if (CXX11_SUPPORTED) |
||||
add_definitions( "-std=c++11" ) |
||||
elseif (CXX0X_SUPPORTED) # gcc 4.6 |
||||
add_definitions( "-std=c++0x" ) |
||||
elseif (NOT MSVC) |
||||
message(SEND_ERROR "C++11 standard not supported by compiler. Version too old?") |
||||
endif () |
||||
|
||||
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") |
||||
if (WITH_HARDENING) |
||||
add_definitions( "-D_FORTIFY_SOURCE=2" ) |
||||
file (GLOB HEADERS "${CMAKE_SOURCE_DIR}/util/*.h") |
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wformat -Wformat-security -Werror=format-security" ) |
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector --param ssp-buffer-size=4" ) |
||||
endif () |
||||
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") |
||||
# more tweaks |
||||
endif () |
||||
|
||||
# compiler flags customization (by system) |
||||
if (CMAKE_SYSTEM_NAME STREQUAL "Linux") |
||||
list (APPEND DAEMON_SRC "${CMAKE_SOURCE_DIR}/DaemonLinux.cpp") |
||||
# "'sleep_for' is not a member of 'std::this_thread'" in gcc 4.7/4.8 |
||||
add_definitions( "-D_GLIBCXX_USE_NANOSLEEP=1" ) |
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") |
||||
list (APPEND DAEMON_SRC "${CMAKE_SOURCE_DIR}/DaemonLinux.cpp") |
||||
# "'sleep_for' is not a member of 'std::this_thread'" in gcc 4.7/4.8 |
||||
add_definitions( "-D_GLIBCXX_USE_NANOSLEEP=1" ) |
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin") |
||||
list (APPEND DAEMON_SRC "${CMAKE_SOURCE_DIR}/DaemonLinux.cpp") |
||||
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows") |
||||
list (APPEND DAEMON_SRC "${CMAKE_SOURCE_DIR}/DaemonWin32.cpp") |
||||
list (APPEND DAEMON_SRC "${CMAKE_SOURCE_DIR}/Win32/Win32Service.cpp") |
||||
endif () |
||||
|
||||
if (WITH_AESNI) |
||||
add_definitions ( "-maes -DAESNI" ) |
||||
endif() |
||||
|
||||
# libraries |
||||
# TODO: once CMake 3.1+ becomes mainstream, see e.g. http://stackoverflow.com/a/29871891/673826 |
||||
# use imported Threads::Threads instead |
||||
set(THREADS_PREFER_PTHREAD_FLAG ON) |
||||
find_package ( Threads REQUIRED ) |
||||
if(THREADS_HAVE_PTHREAD_ARG) # compile time flag |
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") |
||||
endif() |
||||
|
||||
if (WITH_STATIC) |
||||
set(Boost_USE_STATIC_LIBS ON) |
||||
set(Boost_USE_STATIC_RUNTIME ON) |
||||
if (WIN32) |
||||
# http://www.cmake.org/Wiki/CMake_FAQ#Dynamic_Replace |
||||
# Note that you might need to rebuild Crypto++ |
||||
foreach(flag_var |
||||
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE |
||||
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO) |
||||
if(${flag_var} MATCHES "/MD") |
||||
string(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}") |
||||
endif(${flag_var} MATCHES "/MD") |
||||
endforeach(flag_var) |
||||
else () |
||||
set(CMAKE_FIND_LIBRARY_SUFFIXES .a) |
||||
endif () |
||||
set(BUILD_SHARED_LIBS OFF) |
||||
if (${CMAKE_CXX_COMPILER} MATCHES ".*-openwrt-.*") |
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread" ) |
||||
# set( CMAKE_THREAD_LIBS_INIT "gcc_eh -Wl,--whole-archive -lpthread -Wl,--no-whole-archive" ) |
||||
set( CMAKE_THREAD_LIBS_INIT "gcc_eh -Wl,-u,pthread_create,-u,pthread_once,-u,pthread_mutex_lock,-u,pthread_mutex_unlock,-u,pthread_join,-u,pthread_equal,-u,pthread_detach,-u,pthread_cond_wait,-u,pthread_cond_signal,-u,pthread_cond_destroy,-u,pthread_cond_broadcast,-u,pthread_cancel" ) |
||||
endif () |
||||
else() |
||||
if (NOT WIN32) |
||||
# TODO: Consider separate compilation for COMMON_SRC for library. |
||||
# No need in -fPIC overhead for binary if not interested in library |
||||
# HINT: revert c266cff CMakeLists.txt: compilation speed up |
||||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC" ) |
||||
endif () |
||||
add_definitions(-DBOOST_ALL_DYN_LINK) |
||||
endif () |
||||
|
||||
if (WITH_PCH) |
||||
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/..) |
||||
add_library(stdafx STATIC "${CMAKE_SOURCE_DIR}/stdafx.cpp") |
||||
if(MSVC) |
||||
target_compile_options(stdafx PRIVATE /Ycstdafx.h /Zm135) |
||||
add_custom_command(TARGET stdafx POST_BUILD |
||||
COMMAND xcopy /y stdafx.dir\\$<CONFIG>\\*.pdb common.dir\\$<CONFIG>\\ |
||||
COMMAND xcopy /y stdafx.dir\\$<CONFIG>\\*.pdb i2pd-bin.dir\\$<CONFIG>\\ |
||||
COMMAND xcopy /y stdafx.dir\\$<CONFIG>\\*.pdb i2pd.dir\\$<CONFIG>\\ |
||||
WORKING_DIRECTORY ${CMAKE_BINARY_DIR} |
||||
) |
||||
target_compile_options(common PRIVATE /FIstdafx.h /Yustdafx.h /Zm135 "/Fp${CMAKE_BINARY_DIR}/stdafx.dir/$<CONFIG>/stdafx.pch") |
||||
else() |
||||
string(TOUPPER ${CMAKE_BUILD_TYPE} BTU) |
||||
get_directory_property(DEFS DEFINITIONS) |
||||
string(REPLACE " " ";" FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${BTU}} ${DEFS}") |
||||
add_custom_command(TARGET stdafx PRE_BUILD |
||||
COMMAND ${CMAKE_CXX_COMPILER} ${FLAGS} -c ${CMAKE_CURRENT_SOURCE_DIR}/../stdafx.h |
||||
) |
||||
target_compile_options(common PRIVATE -include stdafx.h) |
||||
endif() |
||||
target_link_libraries(common stdafx) |
||||
endif() |
||||
|
||||
find_package ( Boost COMPONENTS system filesystem regex program_options date_time thread chrono REQUIRED ) |
||||
if(NOT DEFINED Boost_INCLUDE_DIRS) |
||||
message(SEND_ERROR "Boost is not found, or your boost version was bellow 1.46. Please download Boost!") |
||||
endif() |
||||
|
||||
find_package ( CryptoPP REQUIRED ) |
||||
if(NOT DEFINED CRYPTO++_INCLUDE_DIR) |
||||
message(SEND_ERROR "Could not find Crypto++. Please download and install it first!") |
||||
endif() |
||||
|
||||
find_package ( MiniUPnPc ) |
||||
if (NOT ${MINIUPNPC_FOUND}) |
||||
set(WITH_UPNP OFF) |
||||
endif() |
||||
|
||||
# load includes |
||||
include_directories( ${CMAKE_SOURCE_DIR} ${Boost_INCLUDE_DIRS} ${CRYPTO++_INCLUDE_DIR} ) |
||||
|
||||
# show summary |
||||
message(STATUS "---------------------------------------") |
||||
message(STATUS "Build type : ${CMAKE_BUILD_TYPE}") |
||||
message(STATUS "Compiler vendor : ${CMAKE_CXX_COMPILER_ID}") |
||||
message(STATUS "Compiler version : ${CMAKE_CXX_COMPILER_VERSION}") |
||||
message(STATUS "Compiler path : ${CMAKE_CXX_COMPILER}") |
||||
message(STATUS "Install prefix: : ${CMAKE_INSTALL_PREFIX}") |
||||
message(STATUS "Options:") |
||||
message(STATUS " AESNI : ${WITH_AESNI}") |
||||
message(STATUS " HARDENING : ${WITH_HARDENING}") |
||||
message(STATUS " LIBRARY : ${WITH_LIBRARY}") |
||||
message(STATUS " BINARY : ${WITH_BINARY}") |
||||
message(STATUS " STATIC BUILD : ${WITH_STATIC}") |
||||
message(STATUS " UPnP : ${WITH_UPNP}") |
||||
message(STATUS " PCH : ${WITH_PCH}") |
||||
message(STATUS " TESTS : ${WITH_TESTS}") |
||||
message(STATUS "---------------------------------------") |
||||
|
||||
#Handle paths nicely |
||||
include(GNUInstallDirs) |
||||
|
||||
if (WITH_BINARY) |
||||
add_executable ( "${PROJECT_NAME}-bin" ${DAEMON_SRC} ) |
||||
if(NOT MSVC) # FIXME: incremental linker file name (.ilk) collision for dll & exe |
||||
set_target_properties("${PROJECT_NAME}-bin" PROPERTIES OUTPUT_NAME "${PROJECT_NAME}") |
||||
if (WITH_STATIC) |
||||
set_target_properties("${PROJECT_NAME}-bin" PROPERTIES LINK_FLAGS "-static" ) |
||||
endif () |
||||
endif() |
||||
|
||||
if (WITH_PCH) |
||||
if (MSVC) |
||||
target_compile_options("${PROJECT_NAME}-bin" PRIVATE /FIstdafx.h /Yustdafx.h /Zm135 "/Fp${CMAKE_BINARY_DIR}/stdafx.dir/$<CONFIG>/stdafx.pch") |
||||
else() |
||||
target_compile_options("${PROJECT_NAME}-bin" PRIVATE -include stdafx.h) |
||||
endif() |
||||
endif() |
||||
|
||||
if (WITH_HARDENING AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") |
||||
set_target_properties("${PROJECT_NAME}-bin" PROPERTIES LINK_FLAGS "-z relro -z now" ) |
||||
endif () |
||||
|
||||
# FindBoost pulls pthread for thread which is broken for static linking at least on Ubuntu 15.04 |
||||
list(GET Boost_LIBRARIES -1 LAST_Boost_LIBRARIES) |
||||
if(${LAST_Boost_LIBRARIES} MATCHES ".*pthread.*") |
||||
list(REMOVE_AT Boost_LIBRARIES -1) |
||||
endif() |
||||
target_link_libraries( "${PROJECT_NAME}-bin" common ${DL_LIB} ${Boost_LIBRARIES} ${CRYPTO++_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} ) |
||||
|
||||
install(TARGETS "${PROJECT_NAME}-bin" RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} ) |
||||
if (MSVC) |
||||
install(FILES $<TARGET_PDB_FILE:${PROJECT_NAME}-bin> DESTINATION "bin" CONFIGURATIONS DEBUG) |
||||
endif () |
||||
endif () |
||||
|
||||
if (WITH_LIBRARY) |
||||
if (MSVC) |
||||
# FIXME: DLL would not have any symbols unless we use __declspec(dllexport) through out the code |
||||
add_library(${PROJECT_NAME} STATIC ${LIBRARY_SRC}) |
||||
else () |
||||
add_library(${PROJECT_NAME} ${LIBRARY_SRC}) |
||||
target_link_libraries( ${PROJECT_NAME} common ${Boost_LIBRARIES} ${CRYPTO++_LIBRARIES}) |
||||
endif () |
||||
if (WITH_PCH) |
||||
if (MSVC) |
||||
add_dependencies(${PROJECT_NAME} stdafx) |
||||
target_compile_options(${PROJECT_NAME} PRIVATE /FIstdafx.h /Yustdafx.h /Zm135 "/Fp${CMAKE_BINARY_DIR}/stdafx.dir/$<CONFIG>/stdafx.pch") |
||||
else() |
||||
target_compile_options(${PROJECT_NAME} PRIVATE -include stdafx.h) |
||||
endif() |
||||
endif() |
||||
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}) |
||||
endif () |
||||
|
||||
if (WITH_TESTS) |
||||
find_package ( Boost COMPONENTS system filesystem regex program_options date_time thread chrono unit_test_framework REQUIRED ) |
||||
|
||||
add_executable(i2pd_tests ${TESTS_SRC}) |
||||
target_link_libraries(i2pd_tests common ${DL_LIB} ${Boost_LIBRARIES} ${CRYPTO++_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT}) |
||||
|
||||
enable_testing() |
||||
add_test(i2pdTest i2pd_tests) |
||||
endif () |
@ -1,12 +0,0 @@
@@ -1,12 +0,0 @@
|
||||
FROM ubuntu |
||||
|
||||
RUN apt-get update && apt-get install -y libboost-dev libboost-filesystem-dev \ |
||||
libboost-program-options-dev libboost-regex-dev libcrypto++-dev \ |
||||
libboost-date-time-dev git build-essential |
||||
|
||||
RUN git clone https://github.com/PurpleI2P/i2pd.git |
||||
WORKDIR /i2pd |
||||
RUN make |
||||
|
||||
CMD ./i2pd |
||||
|
@ -1,230 +0,0 @@
@@ -1,230 +0,0 @@
|
||||
# i2pd |
||||
obj/*.o |
||||
router.info |
||||
router.keys |
||||
i2p |
||||
netDb |
||||
|
||||
# Autotools |
||||
autom4te.cache |
||||
.deps |
||||
stamp-h1 |
||||
Makefile |
||||
config.h |
||||
config.h.in~ |
||||
config.log |
||||
config.status |
||||
|
||||
################# |
||||
## Eclipse |
||||
################# |
||||
|
||||
*.pydevproject |
||||
.project |
||||
.metadata |
||||
bin/ |
||||
tmp/ |
||||
*.tmp |
||||
*.bak |
||||
*.swp |
||||
*~.nib |
||||
local.properties |
||||
.classpath |
||||
.settings/ |
||||
.loadpath |
||||
|
||||
# External tool builders |
||||
.externalToolBuilders/ |
||||
|
||||
# Locally stored "Eclipse launch configurations" |
||||
*.launch |
||||
|
||||
# CDT-specific |
||||
.cproject |
||||
|
||||
# PDT-specific |
||||
.buildpath |
||||
|
||||
|
||||
################# |
||||
## Visual Studio |
||||
################# |
||||
|
||||
## Ignore Visual Studio temporary files, build results, and |
||||
## files generated by popular Visual Studio add-ons. |
||||
|
||||
# User-specific files |
||||
*.suo |
||||
*.user |
||||
*.sln.docstates |
||||
|
||||
# Build results |
||||
|
||||
[Dd]ebug/ |
||||
[Rr]elease/ |
||||
x64/ |
||||
[Bb]in/ |
||||
[Oo]bj/ |
||||
|
||||
# MSTest test Results |
||||
[Tt]est[Rr]esult*/ |
||||
[Bb]uild[Ll]og.* |
||||
|
||||
*_i.c |
||||
*_p.c |
||||
*.ilk |
||||
*.meta |
||||
*.obj |
||||
*.pch |
||||
*.pdb |
||||
*.pgc |
||||
*.pgd |
||||
*.rsp |
||||
*.sbr |
||||
*.tlb |
||||
*.tli |
||||
*.tlh |
||||
*.tmp |
||||
*.tmp_proj |
||||
*.log |
||||
*.vspscc |
||||
*.vssscc |
||||
.builds |
||||
*.pidb |
||||
*.log |
||||
*.scc |
||||
|
||||
# Visual C++ cache files |
||||
ipch/ |
||||
*.aps |
||||
*.ncb |
||||
*.opensdf |
||||
*.sdf |
||||
*.cachefile |
||||
|
||||
# Visual Studio profiler |
||||
*.psess |
||||
*.vsp |
||||
*.vspx |
||||
|
||||
# Guidance Automation Toolkit |
||||
*.gpState |
||||
|
||||
# ReSharper is a .NET coding add-in |
||||
_ReSharper*/ |
||||
*.[Rr]e[Ss]harper |
||||
|
||||
# TeamCity is a build add-in |
||||
_TeamCity* |
||||
|
||||
# DotCover is a Code Coverage Tool |
||||
*.dotCover |
||||
|
||||
# NCrunch |
||||
*.ncrunch* |
||||
.*crunch*.local.xml |
||||
|
||||
# Installshield output folder |
||||
[Ee]xpress/ |
||||
|
||||
# DocProject is a documentation generator add-in |
||||
DocProject/buildhelp/ |
||||
DocProject/Help/*.HxT |
||||
DocProject/Help/*.HxC |
||||
DocProject/Help/*.hhc |
||||
DocProject/Help/*.hhk |
||||
DocProject/Help/*.hhp |
||||
DocProject/Help/Html2 |
||||
DocProject/Help/html |
||||
|
||||
# Click-Once directory |
||||
publish/ |
||||
|
||||
# Publish Web Output |
||||
*.Publish.xml |
||||
*.pubxml |
||||
|
||||
# NuGet Packages Directory |
||||
## TODO: If you have NuGet Package Restore enabled, uncomment the next line |
||||
#packages/ |
||||
|
||||
# Windows Azure Build Output |
||||
csx |
||||
*.build.csdef |
||||
|
||||
# Windows Store app package directory |
||||
AppPackages/ |
||||
|
||||
# Others |
||||
sql/ |
||||
*.Cache |
||||
ClientBin/ |
||||
[Ss]tyle[Cc]op.* |
||||
~$* |
||||
*~ |
||||
*.dbmdl |
||||
*.[Pp]ublish.xml |
||||
*.pfx |
||||
*.publishsettings |
||||
|
||||
# RIA/Silverlight projects |
||||
Generated_Code/ |
||||
|
||||
# Backup & report files from converting an old project file to a newer |
||||
# Visual Studio version. Backup files are not needed, because we have git ;-) |
||||
_UpgradeReport_Files/ |
||||
Backup*/ |
||||
UpgradeLog*.XML |
||||
UpgradeLog*.htm |
||||
|
||||
# SQL Server files |
||||
App_Data/*.mdf |
||||
App_Data/*.ldf |
||||
|
||||
############# |
||||
## Windows detritus |
||||
############# |
||||
|
||||
# Windows image file caches |
||||
Thumbs.db |
||||
ehthumbs.db |
||||
|
||||
# Folder config file |
||||
Desktop.ini |
||||
|
||||
# Recycle Bin used on file shares |
||||
$RECYCLE.BIN/ |
||||
|
||||
# Mac crap |
||||
.DS_Store |
||||
|
||||
|
||||
############# |
||||
## Python |
||||
############# |
||||
|
||||
*.py[co] |
||||
|
||||
# Packages |
||||
*.egg |
||||
*.egg-info |
||||
dist/ |
||||
eggs/ |
||||
parts/ |
||||
var/ |
||||
sdist/ |
||||
develop-eggs/ |
||||
.installed.cfg |
||||
|
||||
# Installer logs |
||||
pip-log.txt |
||||
|
||||
# Unit test / coverage reports |
||||
.coverage |
||||
.tox |
||||
|
||||
#Translations |
||||
*.mo |
||||
|
||||
#Mr Developer |
||||
.mr.developer.cfg |
@ -1,26 +0,0 @@
@@ -1,26 +0,0 @@
|
||||
bin_PROGRAMS = i2p |
||||
i2p_SOURCES = AddressBook.cpp CryptoConst.cpp Daemon.cpp \
|
||||
DaemonLinux.cpp DaemonWin32.cpp Garlic.cpp \
|
||||
HTTPProxy.cpp HTTPServer.cpp I2NPProtocol.cpp \
|
||||
I2PTunnel.cpp Identity.cpp LeaseSet.cpp Log.cpp \
|
||||
NTCPSession.cpp NetDb.cpp Reseed.cpp \
|
||||
RouterContext.cpp RouterInfo.cpp SOCKS.cpp SSU.cpp \
|
||||
SSUData.cpp Streaming.cpp TransitTunnel.cpp \
|
||||
Transports.cpp Tunnel.cpp TunnelEndpoint.cpp \
|
||||
TunnelGateway.cpp TunnelPool.cpp UPnP.cpp aes.cpp \
|
||||
base64.cpp i2p.cpp util.cpp I2PService.cpp \
|
||||
\
|
||||
AddressBook.h CryptoConst.h Daemon.h ElGamal.h \
|
||||
Garlic.h HTTPProxy.h HTTPServer.h I2NPProtocol.h \
|
||||
I2PEndian.h I2PTunnel.h Identity.h LeaseSet.h \
|
||||
LittleBigEndian.h Log.h NTCPSession.h NetDb.h Queue.h \
|
||||
Reseed.h RouterContext.h RouterInfo.h SOCKS.h SSU.h \
|
||||
SSUData.h Signature.h Streaming.h Timestamp.h \
|
||||
TransitTunnel.h Transports.h Tunnel.h TunnelBase.h \
|
||||
TunnelConfig.h TunnelEndpoint.h TunnelGateway.h \
|
||||
TunnelPool.h UPnP.h aes.h base64.h config.h hmac.h \
|
||||
util.h version.h I2PService.h |
||||
|
||||
AM_LDFLAGS = @BOOST_DATE_TIME_LIB@ @BOOST_FILESYSTEM_LIB@ \
|
||||
@BOOST_PROGRAM_OPTIONS_LIB@ @BOOST_REGEX_LIB@ \
|
||||
@BOOST_SYSTEM_LIB@ |
@ -1,861 +0,0 @@
@@ -1,861 +0,0 @@
|
||||
# Makefile.in generated by automake 1.13.4 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@ |
||||
|
||||
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@ |
||||
bin_PROGRAMS = i2p$(EXEEXT) |
||||
subdir = . |
||||
DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \
|
||||
$(top_srcdir)/configure $(am__configure_deps) \
|
||||
$(srcdir)/config.h.in depcomp config.guess config.sub \
|
||||
install-sh missing |
||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 |
||||
am__aclocal_m4_deps = $(top_srcdir)/m4/ax_cxx_compile_stdcxx_11.m4 \
|
||||
$(top_srcdir)/m4/ax_boost_base.m4 \
|
||||
$(top_srcdir)/m4/ax_boost_date_time.m4 \
|
||||
$(top_srcdir)/m4/ax_boost_filesystem.m4 \
|
||||
$(top_srcdir)/m4/ax_boost_program_options.m4 \
|
||||
$(top_srcdir)/m4/ax_boost_regex.m4 \
|
||||
$(top_srcdir)/m4/ax_boost_system.m4 \
|
||||
$(top_srcdir)/m4/ax_pthread.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__installdirs = "$(DESTDIR)$(bindir)" |
||||
PROGRAMS = $(bin_PROGRAMS) |
||||
am_i2p_OBJECTS = AddressBook.$(OBJEXT) CryptoConst.$(OBJEXT) \
|
||||
Daemon.$(OBJEXT) DaemonLinux.$(OBJEXT) DaemonWin32.$(OBJEXT) \
|
||||
Garlic.$(OBJEXT) HTTPProxy.$(OBJEXT) HTTPServer.$(OBJEXT) \
|
||||
I2NPProtocol.$(OBJEXT) I2PTunnel.$(OBJEXT) Identity.$(OBJEXT) \
|
||||
LeaseSet.$(OBJEXT) Log.$(OBJEXT) NTCPSession.$(OBJEXT) \
|
||||
NetDb.$(OBJEXT) Reseed.$(OBJEXT) RouterContext.$(OBJEXT) \
|
||||
RouterInfo.$(OBJEXT) SOCKS.$(OBJEXT) SSU.$(OBJEXT) \
|
||||
SSUData.$(OBJEXT) Streaming.$(OBJEXT) TransitTunnel.$(OBJEXT) \
|
||||
Transports.$(OBJEXT) Tunnel.$(OBJEXT) TunnelEndpoint.$(OBJEXT) \
|
||||
TunnelGateway.$(OBJEXT) TunnelPool.$(OBJEXT) UPnP.$(OBJEXT) \
|
||||
aes.$(OBJEXT) base64.$(OBJEXT) i2p.$(OBJEXT) util.$(OBJEXT) \
|
||||
SAM.$(OBJEXT) Destination.$(OBJEXT) ClientContext.$(OBJEXT) \
|
||||
Datagram.$(OBJEXT) SSUSession.$(OBJEXT) BOB.$(OBJEXT) \
|
||||
I2PControl.$(OBJEXT) Profiling.$(OBJEXT) Signature.$(OBJEXT) |
||||
i2p_OBJECTS = $(am_i2p_OBJECTS) |
||||
i2p_LDADD = $(LDADD) |
||||
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@ |
||||
depcomp = $(SHELL) $(top_srcdir)/depcomp |
||||
am__depfiles_maybe = depfiles |
||||
am__mv = mv -f |
||||
CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
|
||||
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) |
||||
AM_V_CXX = $(am__v_CXX_@AM_V@) |
||||
am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) |
||||
am__v_CXX_0 = @echo " CXX " $@; |
||||
am__v_CXX_1 = |
||||
CXXLD = $(CXX) |
||||
CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \
|
||||
-o $@ |
||||
AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) |
||||
am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) |
||||
am__v_CXXLD_0 = @echo " CXXLD " $@; |
||||
am__v_CXXLD_1 = |
||||
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 = $(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 = $(i2p_SOURCES) |
||||
DIST_SOURCES = $(i2p_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)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 |
||||
AM_RECURSIVE_TARGETS = 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) |
||||
DIST_ARCHIVES = $(distdir).tar.gz |
||||
GZIP_ENV = --best |
||||
DIST_TARGETS = 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@ |
||||
AUTOCONF = @AUTOCONF@ |
||||
AUTOHEADER = @AUTOHEADER@ |
||||
AUTOMAKE = @AUTOMAKE@ |
||||
AWK = @AWK@ |
||||
BOOST_CPPFLAGS = @BOOST_CPPFLAGS@ |
||||
BOOST_DATE_TIME_LIB = @BOOST_DATE_TIME_LIB@ |
||||
BOOST_FILESYSTEM_LIB = @BOOST_FILESYSTEM_LIB@ |
||||
BOOST_LDFLAGS = @BOOST_LDFLAGS@ |
||||
BOOST_PROGRAM_OPTIONS_LIB = @BOOST_PROGRAM_OPTIONS_LIB@ |
||||
BOOST_REGEX_LIB = @BOOST_REGEX_LIB@ |
||||
BOOST_SYSTEM_LIB = @BOOST_SYSTEM_LIB@ |
||||
CC = @CC@ |
||||
CCDEPMODE = @CCDEPMODE@ |
||||
CFLAGS = @CFLAGS@ |
||||
CPP = @CPP@ |
||||
CPPFLAGS = @CPPFLAGS@ |
||||
CXX = @CXX@ |
||||
CXXDEPMODE = @CXXDEPMODE@ |
||||
CXXFLAGS = @CXXFLAGS@ |
||||
CYGPATH_W = @CYGPATH_W@ |
||||
DEFS = @DEFS@ |
||||
DEPDIR = @DEPDIR@ |
||||
ECHO_C = @ECHO_C@ |
||||
ECHO_N = @ECHO_N@ |
||||
ECHO_T = @ECHO_T@ |
||||
EGREP = @EGREP@ |
||||
EXEEXT = @EXEEXT@ |
||||
GREP = @GREP@ |
||||
HAVE_CXX11 = @HAVE_CXX11@ |
||||
INSTALL = @INSTALL@ |
||||
INSTALL_DATA = @INSTALL_DATA@ |
||||
INSTALL_PROGRAM = @INSTALL_PROGRAM@ |
||||
INSTALL_SCRIPT = @INSTALL_SCRIPT@ |
||||
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ |
||||
LDFLAGS = @LDFLAGS@ |
||||
LIBOBJS = @LIBOBJS@ |
||||
LIBS = @LIBS@ |
||||
LTLIBOBJS = @LTLIBOBJS@ |
||||
MAKEINFO = @MAKEINFO@ |
||||
MKDIR_P = @MKDIR_P@ |
||||
OBJEXT = @OBJEXT@ |
||||
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@ |
||||
PTHREAD_CC = @PTHREAD_CC@ |
||||
PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ |
||||
PTHREAD_LIBS = @PTHREAD_LIBS@ |
||||
SET_MAKE = @SET_MAKE@ |
||||
SHELL = @SHELL@ |
||||
STRIP = @STRIP@ |
||||
VERSION = @VERSION@ |
||||
abs_builddir = @abs_builddir@ |
||||
abs_srcdir = @abs_srcdir@ |
||||
abs_top_builddir = @abs_top_builddir@ |
||||
abs_top_srcdir = @abs_top_srcdir@ |
||||
ac_ct_CC = @ac_ct_CC@ |
||||
ac_ct_CXX = @ac_ct_CXX@ |
||||
am__include = @am__include@ |
||||
am__leading_dot = @am__leading_dot@ |
||||
am__quote = @am__quote@ |
||||
am__tar = @am__tar@ |
||||
am__untar = @am__untar@ |
||||
ax_pthread_config = @ax_pthread_config@ |
||||
bindir = @bindir@ |
||||
build = @build@ |
||||
build_alias = @build_alias@ |
||||
build_cpu = @build_cpu@ |
||||
build_os = @build_os@ |
||||
build_vendor = @build_vendor@ |
||||
builddir = @builddir@ |
||||
datadir = @datadir@ |
||||
datarootdir = @datarootdir@ |
||||
docdir = @docdir@ |
||||
dvidir = @dvidir@ |
||||
exec_prefix = @exec_prefix@ |
||||
host = @host@ |
||||
host_alias = @host_alias@ |
||||
host_cpu = @host_cpu@ |
||||
host_os = @host_os@ |
||||
host_vendor = @host_vendor@ |
||||
htmldir = @htmldir@ |
||||
includedir = @includedir@ |
||||
infodir = @infodir@ |
||||
install_sh = @install_sh@ |
||||
libdir = @libdir@ |
||||
libexecdir = @libexecdir@ |
||||
localedir = @localedir@ |
||||
localstatedir = @localstatedir@ |
||||
mandir = @mandir@ |
||||
mkdir_p = @mkdir_p@ |
||||
oldincludedir = @oldincludedir@ |
||||
pdfdir = @pdfdir@ |
||||
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@ |
||||
i2p_SOURCES = AddressBook.cpp CryptoConst.cpp Daemon.cpp \
|
||||
DaemonLinux.cpp DaemonWin32.cpp Garlic.cpp \
|
||||
HTTPProxy.cpp HTTPServer.cpp I2NPProtocol.cpp \
|
||||
I2PTunnel.cpp Identity.cpp LeaseSet.cpp Log.cpp \
|
||||
NTCPSession.cpp NetDb.cpp Reseed.cpp \
|
||||
RouterContext.cpp RouterInfo.cpp SOCKS.cpp SSU.cpp \
|
||||
SSUData.cpp Streaming.cpp TransitTunnel.cpp \
|
||||
Transports.cpp Tunnel.cpp TunnelEndpoint.cpp \
|
||||
TunnelGateway.cpp TunnelPool.cpp UPnP.cpp aes.cpp \
|
||||
base64.cpp i2p.cpp util.cpp SAM.cpp Destination.cpp \
|
||||
ClientContext.cpp DataFram.cpp SSUSession.cpp BOB.cpp \
|
||||
I2PControl.cpp Profiling.cpp Signature.cpp \
|
||||
NetDbRequests.cpp \ |
||||
\
|
||||
AddressBook.h CryptoConst.h Daemon.h ElGamal.h \
|
||||
Garlic.h HTTPProxy.h HTTPServer.h I2NPProtocol.h \
|
||||
I2PEndian.h I2PTunnel.h Identity.h LeaseSet.h \
|
||||
LittleBigEndian.h Log.h NTCPSession.h NetDb.h Queue.h \
|
||||
Reseed.h RouterContext.h RouterInfo.h SOCKS.h SSU.h \
|
||||
SSUData.h Signature.h Streaming.h Timestamp.h \
|
||||
TransitTunnel.h Transports.h Tunnel.h TunnelBase.h \
|
||||
TunnelConfig.h TunnelEndpoint.h TunnelGateway.h \
|
||||
TunnelPool.h UPnP.h aes.h base64.h config.h hmac.h \
|
||||
util.h version.h Destination.h ClientContext.h \
|
||||
TransportSession.h Datagram.h SSUSession.h BOB.h \
|
||||
I2PControl.h Profiling.h NetDbRequests.h |
||||
|
||||
AM_LDFLAGS = @BOOST_DATE_TIME_LIB@ @BOOST_FILESYSTEM_LIB@ \
|
||||
@BOOST_PROGRAM_OPTIONS_LIB@ @BOOST_REGEX_LIB@ \
|
||||
@BOOST_SYSTEM_LIB@ |
||||
|
||||
all: config.h |
||||
$(MAKE) $(AM_MAKEFLAGS) all-am |
||||
|
||||
.SUFFIXES: |
||||
.SUFFIXES: .cpp .o .obj |
||||
am--refresh: Makefile |
||||
@: |
||||
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) |
||||
@for dep in $?; do \
|
||||
case '$(am__configure_deps)' in \
|
||||
*$$dep*) \
|
||||
echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \
|
||||
$(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \
|
||||
&& exit 0; \
|
||||
exit 1;; \
|
||||
esac; \
|
||||
done; \
|
||||
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \
|
||||
$(am__cd) $(top_srcdir) && \
|
||||
$(AUTOMAKE) --foreign Makefile |
||||
.PRECIOUS: Makefile |
||||
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status |
||||
@case '$?' in \
|
||||
*config.status*) \
|
||||
echo ' $(SHELL) ./config.status'; \
|
||||
$(SHELL) ./config.status;; \
|
||||
*) \
|
||||
echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \
|
||||
cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \
|
||||
esac; |
||||
|
||||
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) |
||||
$(SHELL) ./config.status --recheck |
||||
|
||||
$(top_srcdir)/configure: $(am__configure_deps) |
||||
$(am__cd) $(srcdir) && $(AUTOCONF) |
||||
$(ACLOCAL_M4): $(am__aclocal_m4_deps) |
||||
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) |
||||
$(am__aclocal_m4_deps): |
||||
|
||||
config.h: stamp-h1 |
||||
@if test ! -f $@; then rm -f stamp-h1; else :; fi |
||||
@if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi |
||||
|
||||
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status |
||||
@rm -f stamp-h1 |
||||
cd $(top_builddir) && $(SHELL) ./config.status config.h |
||||
$(srcdir)/config.h.in: $(am__configure_deps) |
||||
($(am__cd) $(top_srcdir) && $(AUTOHEADER)) |
||||
rm -f stamp-h1 |
||||
touch $@ |
||||
|
||||
distclean-hdr: |
||||
-rm -f config.h stamp-h1 |
||||
install-binPROGRAMS: $(bin_PROGRAMS) |
||||
@$(NORMAL_INSTALL) |
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
if test -n "$$list"; then \
|
||||
echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \
|
||||
$(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \
|
||||
fi; \
|
||||
for p in $$list; do echo "$$p $$p"; done | \
|
||||
sed 's/$(EXEEXT)$$//' | \
|
||||
while read p p1; do if test -f $$p \
|
||||
; then echo "$$p"; echo "$$p"; else :; fi; \
|
||||
done | \
|
||||
sed -e 'p;s,.*/,,;n;h' \
|
||||
-e 's|.*|.|' \
|
||||
-e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
|
||||
sed 'N;N;N;s,\n, ,g' | \
|
||||
$(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
|
||||
{ d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
|
||||
if ($$2 == $$4) files[d] = files[d] " " $$1; \
|
||||
else { print "f", $$3 "/" $$4, $$1; } } \
|
||||
END { for (d in files) print "f", d, files[d] }' | \
|
||||
while read type dir files; do \
|
||||
if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \
|
||||
test -z "$$files" || { \
|
||||
echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \
|
||||
$(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \
|
||||
} \
|
||||
; done |
||||
|
||||
uninstall-binPROGRAMS: |
||||
@$(NORMAL_UNINSTALL) |
||||
@list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \
|
||||
files=`for p in $$list; do echo "$$p"; done | \
|
||||
sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \
|
||||
-e 's/$$/$(EXEEXT)/' \
|
||||
`; \
|
||||
test -n "$$list" || exit 0; \
|
||||
echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \
|
||||
cd "$(DESTDIR)$(bindir)" && rm -f $$files |
||||
|
||||
clean-binPROGRAMS: |
||||
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) |
||||
|
||||
i2p$(EXEEXT): $(i2p_OBJECTS) $(i2p_DEPENDENCIES) $(EXTRA_i2p_DEPENDENCIES) |
||||
@rm -f i2p$(EXEEXT) |
||||
$(AM_V_CXXLD)$(CXXLINK) $(i2p_OBJECTS) $(i2p_LDADD) $(LIBS) |
||||
|
||||
mostlyclean-compile: |
||||
-rm -f *.$(OBJEXT) |
||||
|
||||
distclean-compile: |
||||
-rm -f *.tab.c |
||||
|
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/AddressBook.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/CryptoConst.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Daemon.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DaemonLinux.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/DaemonWin32.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Garlic.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPProxy.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/HTTPServer.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/I2NPProtocol.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/I2PTunnel.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Identity.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/LeaseSet.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Log.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NTCPSession.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetDb.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Reseed.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RouterContext.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/RouterInfo.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SOCKS.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SSU.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SSUData.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Streaming.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Destination.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TransitTunnel.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Transports.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Tunnel.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TunnelEndpoint.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TunnelGateway.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/TunnelPool.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/UPnP.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/aes.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/base64.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/i2p.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/util.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SAM.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/BOB.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ClientContext.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Datagram.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/SSUSession.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Profiling.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Signature.Po@am__quote@ |
||||
@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/NetDbRequests.Po@am__quote@ |
||||
|
||||
.cpp.o: |
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< |
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ |
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< |
||||
|
||||
.cpp.obj: |
||||
@am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` |
||||
@am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po |
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ |
||||
@AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ |
||||
@am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` |
||||
|
||||
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" |
||||
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-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 |
||||
-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 |
||||
-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 |
||||
tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z |
||||
$(am__post_remove_distdir) |
||||
|
||||
dist-shar: distdir |
||||
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 --srcdir=.. --prefix="$$dc_install_base" \
|
||||
$(AM_DISTCHECK_CONFIGURE_FLAGS) \
|
||||
$(DISTCHECK_CONFIGURE_FLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) check \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) installcheck \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \
|
||||
distuninstallcheck \
|
||||
&& chmod -R a-w "$$dc_install_base" \
|
||||
&& ({ \
|
||||
(cd ../.. && umask 077 && mkdir "$$dc_destdir") \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \
|
||||
distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \
|
||||
} || { rm -rf "$$dc_destdir"; exit 1; }) \
|
||||
&& rm -rf "$$dc_destdir" \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) dist \
|
||||
&& rm -rf $(DIST_ARCHIVES) \
|
||||
&& $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
|
||||
&& 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-am |
||||
all-am: Makefile $(PROGRAMS) config.h |
||||
installdirs: |
||||
for dir in "$(DESTDIR)$(bindir)"; do \
|
||||
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||
done |
||||
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-binPROGRAMS clean-generic mostlyclean-am |
||||
|
||||
distclean: distclean-am |
||||
-rm -f $(am__CONFIG_DISTCLEAN_FILES) |
||||
-rm -rf ./$(DEPDIR) |
||||
-rm -f Makefile |
||||
distclean-am: clean-am distclean-compile distclean-generic \ |
||||
distclean-hdr 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-binPROGRAMS |
||||
|
||||
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 -f $(am__CONFIG_DISTCLEAN_FILES) |
||||
-rm -rf $(top_srcdir)/autom4te.cache |
||||
-rm -rf ./$(DEPDIR) |
||||
-rm -f Makefile |
||||
maintainer-clean-am: distclean-am maintainer-clean-generic |
||||
|
||||
mostlyclean: mostlyclean-am |
||||
|
||||
mostlyclean-am: mostlyclean-compile mostlyclean-generic |
||||
|
||||
pdf: pdf-am |
||||
|
||||
pdf-am: |
||||
|
||||
ps: ps-am |
||||
|
||||
ps-am: |
||||
|
||||
uninstall-am: uninstall-binPROGRAMS |
||||
|
||||
.MAKE: all install-am install-strip |
||||
|
||||
.PHONY: CTAGS GTAGS TAGS all all-am am--refresh check check-am clean \ |
||||
clean-binPROGRAMS clean-cscope clean-generic cscope \
|
||||
cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \
|
||||
dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \
|
||||
distcheck distclean distclean-compile distclean-generic \
|
||||
distclean-hdr distclean-tags distcleancheck distdir \
|
||||
distuninstallcheck dvi dvi-am html html-am info info-am \
|
||||
install install-am install-binPROGRAMS 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 pdf pdf-am ps ps-am tags tags-am uninstall \
|
||||
uninstall-am uninstall-binPROGRAMS |
||||
|
||||
|
||||
# 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: |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,175 +0,0 @@
@@ -1,175 +0,0 @@
|
||||
/* config.h.in. Generated from configure.ac by autoheader. */ |
||||
|
||||
/* define if the Boost library is available */ |
||||
#undef HAVE_BOOST |
||||
|
||||
/* define if the Boost::Date_Time library is available */ |
||||
#undef HAVE_BOOST_DATE_TIME |
||||
|
||||
/* define if the Boost::Filesystem library is available */ |
||||
#undef HAVE_BOOST_FILESYSTEM |
||||
|
||||
/* define if the Boost::PROGRAM_OPTIONS library is available */ |
||||
#undef HAVE_BOOST_PROGRAM_OPTIONS |
||||
|
||||
/* define if the Boost::Regex library is available */ |
||||
#undef HAVE_BOOST_REGEX |
||||
|
||||
/* define if the Boost::System library is available */ |
||||
#undef HAVE_BOOST_SYSTEM |
||||
|
||||
/* define if the compiler supports basic C++11 syntax */ |
||||
#undef HAVE_CXX11 |
||||
|
||||
/* Define to 1 if you have the <fcntl.h> header file. */ |
||||
#undef HAVE_FCNTL_H |
||||
|
||||
/* Define to 1 if you have the `fork' function. */ |
||||
#undef HAVE_FORK |
||||
|
||||
/* Define to 1 if you have the <inttypes.h> header file. */ |
||||
#undef HAVE_INTTYPES_H |
||||
|
||||
/* Define to 1 if you have the `memchr' function. */ |
||||
#undef HAVE_MEMCHR |
||||
|
||||
/* Define to 1 if you have the <memory.h> header file. */ |
||||
#undef HAVE_MEMORY_H |
||||
|
||||
/* Define to 1 if you have the `memset' function. */ |
||||
#undef HAVE_MEMSET |
||||
|
||||
/* Define if you have POSIX threads libraries and header files. */ |
||||
#undef HAVE_PTHREAD |
||||
|
||||
/* Have PTHREAD_PRIO_INHERIT. */ |
||||
#undef HAVE_PTHREAD_PRIO_INHERIT |
||||
|
||||
/* Define to 1 if the system has the type `ptrdiff_t'. */ |
||||
#undef HAVE_PTRDIFF_T |
||||
|
||||
/* Define to 1 if you have the `setlocale' function. */ |
||||
#undef HAVE_SETLOCALE |
||||
|
||||
/* Define to 1 if you have the `socket' function. */ |
||||
#undef HAVE_SOCKET |
||||
|
||||
/* Define to 1 if you have the <stdint.h> header file. */ |
||||
#undef HAVE_STDINT_H |
||||
|
||||
/* Define to 1 if you have the <stdlib.h> header file. */ |
||||
#undef HAVE_STDLIB_H |
||||
|
||||
/* Define to 1 if you have the <strings.h> header file. */ |
||||
#undef HAVE_STRINGS_H |
||||
|
||||
/* Define to 1 if you have the <string.h> header file. */ |
||||
#undef HAVE_STRING_H |
||||
|
||||
/* Define to 1 if you have the `strstr' function. */ |
||||
#undef HAVE_STRSTR |
||||
|
||||
/* Define to 1 if you have the <sys/stat.h> header file. */ |
||||
#undef HAVE_SYS_STAT_H |
||||
|
||||
/* Define to 1 if you have the <sys/types.h> header file. */ |
||||
#undef HAVE_SYS_TYPES_H |
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */ |
||||
#undef HAVE_UNISTD_H |
||||
|
||||
/* Define to 1 if you have the `vfork' function. */ |
||||
#undef HAVE_VFORK |
||||
|
||||
/* Define to 1 if you have the <vfork.h> header file. */ |
||||
#undef HAVE_VFORK_H |
||||
|
||||
/* Define to 1 if `fork' works. */ |
||||
#undef HAVE_WORKING_FORK |
||||
|
||||
/* Define to 1 if `vfork' works. */ |
||||
#undef HAVE_WORKING_VFORK |
||||
|
||||
/* Define to 1 if the system has the type `_Bool'. */ |
||||
#undef HAVE__BOOL |
||||
|
||||
/* Name of package */ |
||||
#undef PACKAGE |
||||
|
||||
/* Define to the address where bug reports for this package should be sent. */ |
||||
#undef PACKAGE_BUGREPORT |
||||
|
||||
/* Define to the full name of this package. */ |
||||
#undef PACKAGE_NAME |
||||
|
||||
/* Define to the full name and version of this package. */ |
||||
#undef PACKAGE_STRING |
||||
|
||||
/* Define to the one symbol short name of this package. */ |
||||
#undef PACKAGE_TARNAME |
||||
|
||||
/* Define to the home page for this package. */ |
||||
#undef PACKAGE_URL |
||||
|
||||
/* Define to the version of this package. */ |
||||
#undef PACKAGE_VERSION |
||||
|
||||
/* Define to necessary symbol if this constant uses a non-standard name on
|
||||
your system. */ |
||||
#undef PTHREAD_CREATE_JOINABLE |
||||
|
||||
/* Define to 1 if you have the ANSI C header files. */ |
||||
#undef STDC_HEADERS |
||||
|
||||
/* Version number of package */ |
||||
#undef VERSION |
||||
|
||||
/* Define for Solaris 2.5.1 so the uint32_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the |
||||
#define below would cause a syntax error. */ |
||||
#undef _UINT32_T |
||||
|
||||
/* Define for Solaris 2.5.1 so the uint64_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the |
||||
#define below would cause a syntax error. */ |
||||
#undef _UINT64_T |
||||
|
||||
/* Define for Solaris 2.5.1 so the uint8_t typedef from <sys/synch.h>,
|
||||
<pthread.h>, or <semaphore.h> is not used. If the typedef were allowed, the |
||||
#define below would cause a syntax error. */ |
||||
#undef _UINT8_T |
||||
|
||||
/* Define to `__inline__' or `__inline' if that's what the C compiler
|
||||
calls it, or to nothing if 'inline' is not supported under any name. */ |
||||
#ifndef __cplusplus |
||||
#undef inline |
||||
#endif |
||||
|
||||
/* Define to the type of a signed integer type of width exactly 32 bits if
|
||||
such a type exists and the standard includes do not define it. */ |
||||
#undef int32_t |
||||
|
||||
/* Define to `int' if <sys/types.h> does not define. */ |
||||
#undef pid_t |
||||
|
||||
/* Define to `unsigned int' if <sys/types.h> does not define. */ |
||||
#undef size_t |
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 16 bits if
|
||||
such a type exists and the standard includes do not define it. */ |
||||
#undef uint16_t |
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 32 bits if
|
||||
such a type exists and the standard includes do not define it. */ |
||||
#undef uint32_t |
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 64 bits if
|
||||
such a type exists and the standard includes do not define it. */ |
||||
#undef uint64_t |
||||
|
||||
/* Define to the type of an unsigned integer type of width exactly 8 bits if
|
||||
such a type exists and the standard includes do not define it. */ |
||||
#undef uint8_t |
||||
|
||||
/* Define as `fork' if `vfork' does not work. */ |
||||
#undef vfork |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,72 +0,0 @@
@@ -1,72 +0,0 @@
|
||||
AC_PREREQ([2.69]) |
||||
AC_INIT([i2pd], [0.0.0], |
||||
[https://track.privacysolutions.no/projects/i2pd/issues]) |
||||
AM_INIT_AUTOMAKE([-Wall foreign]) |
||||
AC_CONFIG_SRCDIR([I2NPProtocol.cpp]) |
||||
AC_CONFIG_HEADERS([config.h]) |
||||
|
||||
# Checks for programs. |
||||
AC_PROG_CXX |
||||
AC_PROG_CC |
||||
|
||||
# Check for C++11 |
||||
m4_include([m4/ax_cxx_compile_stdcxx_11.m4]) |
||||
AX_CXX_COMPILE_STDCXX_11([],[mandatory]) |
||||
|
||||
# Set platform specific flags |
||||
if test "$(uname -s)" = "Darwin" |
||||
then |
||||
CXXFLAGS="-DCRYPTOPP_DISABLE_ASM -DAESNI ${CXXFLAGS}" |
||||
|
||||
elif test "$(uname -s)" = "Linux" |
||||
then |
||||
if test -n "$(grep aes /proc/cpuinfo)" |
||||
then |
||||
CXXFLAGS="-DAESNI ${CXXFLAGS}" |
||||
fi |
||||
else |
||||
# emtpy |
||||
true |
||||
fi |
||||
|
||||
# Checks for libraries. |
||||
AC_SEARCH_LIBS([s_sosemanukMulTables], [cryptopp], |
||||
[], [AC_MSG_ERROR([Unable to find crypto++])]) |
||||
|
||||
m4_include([m4/ax_boost_base.m4]) |
||||
m4_include([m4/ax_boost_date_time.m4]) |
||||
m4_include([m4/ax_boost_filesystem.m4]) |
||||
m4_include([m4/ax_boost_program_options.m4]) |
||||
m4_include([m4/ax_boost_regex.m4]) |
||||
m4_include([m4/ax_boost_system.m4]) |
||||
AX_BOOST_BASE([1.46]) |
||||
AX_BOOST_DATE_TIME |
||||
AX_BOOST_FILESYSTEM |
||||
AX_BOOST_PROGRAM_OPTIONS |
||||
AX_BOOST_REGEX |
||||
AX_BOOST_SYSTEM |
||||
|
||||
m4_include([m4/ax_pthread.m4]) |
||||
AX_PTHREAD() |
||||
|
||||
# Checks for header files. |
||||
AC_CHECK_HEADERS([fcntl.h inttypes.h stdlib.h string.h unistd.h]) |
||||
|
||||
# Checks for typedefs, structures, and compiler characteristics. |
||||
AC_CHECK_HEADER_STDBOOL |
||||
AC_C_INLINE |
||||
AC_TYPE_INT32_T |
||||
AC_TYPE_PID_T |
||||
AC_TYPE_SIZE_T |
||||
AC_TYPE_UINT16_T |
||||
AC_TYPE_UINT32_T |
||||
AC_TYPE_UINT64_T |
||||
AC_TYPE_UINT8_T |
||||
AC_CHECK_TYPES([ptrdiff_t]) |
||||
|
||||
# Checks for library functions. |
||||
AC_FUNC_FORK |
||||
AC_CHECK_FUNCS([memchr memset setlocale socket strstr]) |
||||
|
||||
AC_CONFIG_FILES([Makefile]) |
||||
AC_OUTPUT |
@ -1,791 +0,0 @@
@@ -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,527 +0,0 @@
@@ -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: |
@ -1,272 +0,0 @@
@@ -1,272 +0,0 @@
|
||||
# =========================================================================== |
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_base.html |
||||
# =========================================================================== |
||||
# |
||||
# SYNOPSIS |
||||
# |
||||
# AX_BOOST_BASE([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) |
||||
# |
||||
# DESCRIPTION |
||||
# |
||||
# Test for the Boost C++ libraries of a particular version (or newer) |
||||
# |
||||
# If no path to the installed boost library is given the macro searchs |
||||
# under /usr, /usr/local, /opt and /opt/local and evaluates the |
||||
# $BOOST_ROOT environment variable. Further documentation is available at |
||||
# <http://randspringer.de/boost/index.html>. |
||||
# |
||||
# This macro calls: |
||||
# |
||||
# AC_SUBST(BOOST_CPPFLAGS) / AC_SUBST(BOOST_LDFLAGS) |
||||
# |
||||
# And sets: |
||||
# |
||||
# HAVE_BOOST |
||||
# |
||||
# LICENSE |
||||
# |
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> |
||||
# Copyright (c) 2009 Peter Adolphs |
||||
# |
||||
# Copying and distribution of this file, with or without modification, are |
||||
# permitted in any medium without royalty provided the copyright notice |
||||
# and this notice are preserved. This file is offered as-is, without any |
||||
# warranty. |
||||
|
||||
#serial 23 |
||||
|
||||
AC_DEFUN([AX_BOOST_BASE], |
||||
[ |
||||
AC_ARG_WITH([boost], |
||||
[AS_HELP_STRING([--with-boost@<:@=ARG@:>@], |
||||
[use Boost library from a standard location (ARG=yes), |
||||
from the specified location (ARG=<path>), |
||||
or disable it (ARG=no) |
||||
@<:@ARG=yes@:>@ ])], |
||||
[ |
||||
if test "$withval" = "no"; then |
||||
want_boost="no" |
||||
elif test "$withval" = "yes"; then |
||||
want_boost="yes" |
||||
ac_boost_path="" |
||||
else |
||||
want_boost="yes" |
||||
ac_boost_path="$withval" |
||||
fi |
||||
], |
||||
[want_boost="yes"]) |
||||
|
||||
|
||||
AC_ARG_WITH([boost-libdir], |
||||
AS_HELP_STRING([--with-boost-libdir=LIB_DIR], |
||||
[Force given directory for boost libraries. Note that this will override library path detection, so use this parameter only if default library detection fails and you know exactly where your boost libraries are located.]), |
||||
[ |
||||
if test -d "$withval" |
||||
then |
||||
ac_boost_lib_path="$withval" |
||||
else |
||||
AC_MSG_ERROR(--with-boost-libdir expected directory name) |
||||
fi |
||||
], |
||||
[ac_boost_lib_path=""] |
||||
) |
||||
|
||||
if test "x$want_boost" = "xyes"; then |
||||
boost_lib_version_req=ifelse([$1], ,1.20.0,$1) |
||||
boost_lib_version_req_shorten=`expr $boost_lib_version_req : '\([[0-9]]*\.[[0-9]]*\)'` |
||||
boost_lib_version_req_major=`expr $boost_lib_version_req : '\([[0-9]]*\)'` |
||||
boost_lib_version_req_minor=`expr $boost_lib_version_req : '[[0-9]]*\.\([[0-9]]*\)'` |
||||
boost_lib_version_req_sub_minor=`expr $boost_lib_version_req : '[[0-9]]*\.[[0-9]]*\.\([[0-9]]*\)'` |
||||
if test "x$boost_lib_version_req_sub_minor" = "x" ; then |
||||
boost_lib_version_req_sub_minor="0" |
||||
fi |
||||
WANT_BOOST_VERSION=`expr $boost_lib_version_req_major \* 100000 \+ $boost_lib_version_req_minor \* 100 \+ $boost_lib_version_req_sub_minor` |
||||
AC_MSG_CHECKING(for boostlib >= $boost_lib_version_req) |
||||
succeeded=no |
||||
|
||||
dnl On 64-bit systems check for system libraries in both lib64 and lib. |
||||
dnl The former is specified by FHS, but e.g. Debian does not adhere to |
||||
dnl this (as it rises problems for generic multi-arch support). |
||||
dnl The last entry in the list is chosen by default when no libraries |
||||
dnl are found, e.g. when only header-only libraries are installed! |
||||
libsubdirs="lib" |
||||
ax_arch=`uname -m` |
||||
case $ax_arch in |
||||
x86_64|ppc64|s390x|sparc64|aarch64) |
||||
libsubdirs="lib64 lib lib64" |
||||
;; |
||||
esac |
||||
|
||||
dnl allow for real multi-arch paths e.g. /usr/lib/x86_64-linux-gnu. Give |
||||
dnl them priority over the other paths since, if libs are found there, they |
||||
dnl are almost assuredly the ones desired. |
||||
AC_REQUIRE([AC_CANONICAL_HOST]) |
||||
libsubdirs="lib/${host_cpu}-${host_os} $libsubdirs" |
||||
|
||||
case ${host_cpu} in |
||||
i?86) |
||||
libsubdirs="lib/i386-${host_os} $libsubdirs" |
||||
;; |
||||
esac |
||||
|
||||
dnl first we check the system location for boost libraries |
||||
dnl this location ist chosen if boost libraries are installed with the --layout=system option |
||||
dnl or if you install boost with RPM |
||||
if test "$ac_boost_path" != ""; then |
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include" |
||||
for ac_boost_path_tmp in $libsubdirs; do |
||||
if test -d "$ac_boost_path"/"$ac_boost_path_tmp" ; then |
||||
BOOST_LDFLAGS="-L$ac_boost_path/$ac_boost_path_tmp" |
||||
break |
||||
fi |
||||
done |
||||
elif test "$cross_compiling" != yes; then |
||||
for ac_boost_path_tmp in /usr /usr/local /opt /opt/local ; do |
||||
if test -d "$ac_boost_path_tmp/include/boost" && test -r "$ac_boost_path_tmp/include/boost"; then |
||||
for libsubdir in $libsubdirs ; do |
||||
if ls "$ac_boost_path_tmp/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi |
||||
done |
||||
BOOST_LDFLAGS="-L$ac_boost_path_tmp/$libsubdir" |
||||
BOOST_CPPFLAGS="-I$ac_boost_path_tmp/include" |
||||
break; |
||||
fi |
||||
done |
||||
fi |
||||
|
||||
dnl overwrite ld flags if we have required special directory with |
||||
dnl --with-boost-libdir parameter |
||||
if test "$ac_boost_lib_path" != ""; then |
||||
BOOST_LDFLAGS="-L$ac_boost_lib_path" |
||||
fi |
||||
|
||||
CPPFLAGS_SAVED="$CPPFLAGS" |
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" |
||||
export CPPFLAGS |
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS" |
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" |
||||
export LDFLAGS |
||||
|
||||
AC_REQUIRE([AC_PROG_CXX]) |
||||
AC_LANG_PUSH(C++) |
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
||||
@%:@include <boost/version.hpp> |
||||
]], [[ |
||||
#if BOOST_VERSION >= $WANT_BOOST_VERSION |
||||
// Everything is okay |
||||
#else |
||||
# error Boost version is too old |
||||
#endif |
||||
]])],[ |
||||
AC_MSG_RESULT(yes) |
||||
succeeded=yes |
||||
found_system=yes |
||||
],[ |
||||
]) |
||||
AC_LANG_POP([C++]) |
||||
|
||||
|
||||
|
||||
dnl if we found no boost with system layout we search for boost libraries |
||||
dnl built and installed without the --layout=system option or for a staged(not installed) version |
||||
if test "x$succeeded" != "xyes"; then |
||||
_version=0 |
||||
if test "$ac_boost_path" != ""; then |
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then |
||||
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do |
||||
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` |
||||
V_CHECK=`expr $_version_tmp \> $_version` |
||||
if test "$V_CHECK" = "1" ; then |
||||
_version=$_version_tmp |
||||
fi |
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` |
||||
BOOST_CPPFLAGS="-I$ac_boost_path/include/boost-$VERSION_UNDERSCORE" |
||||
done |
||||
fi |
||||
else |
||||
if test "$cross_compiling" != yes; then |
||||
for ac_boost_path in /usr /usr/local /opt /opt/local ; do |
||||
if test -d "$ac_boost_path" && test -r "$ac_boost_path"; then |
||||
for i in `ls -d $ac_boost_path/include/boost-* 2>/dev/null`; do |
||||
_version_tmp=`echo $i | sed "s#$ac_boost_path##" | sed 's/\/include\/boost-//' | sed 's/_/./'` |
||||
V_CHECK=`expr $_version_tmp \> $_version` |
||||
if test "$V_CHECK" = "1" ; then |
||||
_version=$_version_tmp |
||||
best_path=$ac_boost_path |
||||
fi |
||||
done |
||||
fi |
||||
done |
||||
|
||||
VERSION_UNDERSCORE=`echo $_version | sed 's/\./_/'` |
||||
BOOST_CPPFLAGS="-I$best_path/include/boost-$VERSION_UNDERSCORE" |
||||
if test "$ac_boost_lib_path" = ""; then |
||||
for libsubdir in $libsubdirs ; do |
||||
if ls "$best_path/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi |
||||
done |
||||
BOOST_LDFLAGS="-L$best_path/$libsubdir" |
||||
fi |
||||
fi |
||||
|
||||
if test "x$BOOST_ROOT" != "x"; then |
||||
for libsubdir in $libsubdirs ; do |
||||
if ls "$BOOST_ROOT/stage/$libsubdir/libboost_"* >/dev/null 2>&1 ; then break; fi |
||||
done |
||||
if test -d "$BOOST_ROOT" && test -r "$BOOST_ROOT" && test -d "$BOOST_ROOT/stage/$libsubdir" && test -r "$BOOST_ROOT/stage/$libsubdir"; then |
||||
version_dir=`expr //$BOOST_ROOT : '.*/\(.*\)'` |
||||
stage_version=`echo $version_dir | sed 's/boost_//' | sed 's/_/./g'` |
||||
stage_version_shorten=`expr $stage_version : '\([[0-9]]*\.[[0-9]]*\)'` |
||||
V_CHECK=`expr $stage_version_shorten \>\= $_version` |
||||
if test "$V_CHECK" = "1" -a "$ac_boost_lib_path" = "" ; then |
||||
AC_MSG_NOTICE(We will use a staged boost library from $BOOST_ROOT) |
||||
BOOST_CPPFLAGS="-I$BOOST_ROOT" |
||||
BOOST_LDFLAGS="-L$BOOST_ROOT/stage/$libsubdir" |
||||
fi |
||||
fi |
||||
fi |
||||
fi |
||||
|
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" |
||||
export CPPFLAGS |
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" |
||||
export LDFLAGS |
||||
|
||||
AC_LANG_PUSH(C++) |
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[ |
||||
@%:@include <boost/version.hpp> |
||||
]], [[ |
||||
#if BOOST_VERSION >= $WANT_BOOST_VERSION |
||||
// Everything is okay |
||||
#else |
||||
# error Boost version is too old |
||||
#endif |
||||
]])],[ |
||||
AC_MSG_RESULT(yes) |
||||
succeeded=yes |
||||
found_system=yes |
||||
],[ |
||||
]) |
||||
AC_LANG_POP([C++]) |
||||
fi |
||||
|
||||
if test "$succeeded" != "yes" ; then |
||||
if test "$_version" = "0" ; then |
||||
AC_MSG_NOTICE([[We could not detect the boost libraries (version $boost_lib_version_req_shorten or higher). If you have a staged boost library (still not installed) please specify \$BOOST_ROOT in your environment and do not give a PATH to --with-boost option. If you are sure you have boost installed, then check your version number looking in <boost/version.hpp>. See http://randspringer.de/boost for more documentation.]]) |
||||
else |
||||
AC_MSG_NOTICE([Your boost libraries seems to old (version $_version).]) |
||||
fi |
||||
# execute ACTION-IF-NOT-FOUND (if present): |
||||
ifelse([$3], , :, [$3]) |
||||
else |
||||
AC_SUBST(BOOST_CPPFLAGS) |
||||
AC_SUBST(BOOST_LDFLAGS) |
||||
AC_DEFINE(HAVE_BOOST,,[define if the Boost library is available]) |
||||
# execute ACTION-IF-FOUND (if present): |
||||
ifelse([$2], , :, [$2]) |
||||
fi |
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED" |
||||
LDFLAGS="$LDFLAGS_SAVED" |
||||
fi |
||||
|
||||
]) |
@ -1,113 +0,0 @@
@@ -1,113 +0,0 @@
|
||||
# =========================================================================== |
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_date_time.html |
||||
# =========================================================================== |
||||
# |
||||
# SYNOPSIS |
||||
# |
||||
# AX_BOOST_DATE_TIME |
||||
# |
||||
# DESCRIPTION |
||||
# |
||||
# Test for Date_Time library from the Boost C++ libraries. The macro |
||||
# requires a preceding call to AX_BOOST_BASE. Further documentation is |
||||
# available at <http://randspringer.de/boost/index.html>. |
||||
# |
||||
# This macro calls: |
||||
# |
||||
# AC_SUBST(BOOST_DATE_TIME_LIB) |
||||
# |
||||
# And sets: |
||||
# |
||||
# HAVE_BOOST_DATE_TIME |
||||
# |
||||
# LICENSE |
||||
# |
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> |
||||
# Copyright (c) 2008 Michael Tindal |
||||
# |
||||
# Copying and distribution of this file, with or without modification, are |
||||
# permitted in any medium without royalty provided the copyright notice |
||||
# and this notice are preserved. This file is offered as-is, without any |
||||
# warranty. |
||||
|
||||
#serial 21 |
||||
|
||||
AC_DEFUN([AX_BOOST_DATE_TIME], |
||||
[ |
||||
AC_ARG_WITH([boost-date-time], |
||||
AS_HELP_STRING([--with-boost-date-time@<:@=special-lib@:>@], |
||||
[use the Date_Time library from boost - it is possible to specify a certain library for the linker |
||||
e.g. --with-boost-date-time=boost_date_time-gcc-mt-d-1_33_1 ]), |
||||
[ |
||||
if test "$withval" = "no"; then |
||||
want_boost="no" |
||||
elif test "$withval" = "yes"; then |
||||
want_boost="yes" |
||||
ax_boost_user_date_time_lib="" |
||||
else |
||||
want_boost="yes" |
||||
ax_boost_user_date_time_lib="$withval" |
||||
fi |
||||
], |
||||
[want_boost="yes"] |
||||
) |
||||
|
||||
if test "x$want_boost" = "xyes"; then |
||||
AC_REQUIRE([AC_PROG_CC]) |
||||
CPPFLAGS_SAVED="$CPPFLAGS" |
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" |
||||
export CPPFLAGS |
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS" |
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" |
||||
export LDFLAGS |
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Date_Time library is available, |
||||
ax_cv_boost_date_time, |
||||
[AC_LANG_PUSH([C++]) |
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/date_time/gregorian/gregorian_types.hpp>]], |
||||
[[using namespace boost::gregorian; date d(2002,Jan,10); |
||||
return 0; |
||||
]])], |
||||
ax_cv_boost_date_time=yes, ax_cv_boost_date_time=no) |
||||
AC_LANG_POP([C++]) |
||||
]) |
||||
if test "x$ax_cv_boost_date_time" = "xyes"; then |
||||
AC_DEFINE(HAVE_BOOST_DATE_TIME,,[define if the Boost::Date_Time library is available]) |
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` |
||||
if test "x$ax_boost_user_date_time_lib" = "x"; then |
||||
for libextension in `ls $BOOSTLIBDIR/libboost_date_time*.so* $BOOSTLIBDIR/libboost_date_time*.dylib* $BOOSTLIBDIR/libboost_date_time*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_date_time.*\)\.so.*$;\1;' -e 's;^lib\(boost_date_time.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_date_time.*\)\.a*$;\1;'` ; do |
||||
ax_lib=${libextension} |
||||
AC_CHECK_LIB($ax_lib, exit, |
||||
[BOOST_DATE_TIME_LIB="-l$ax_lib"; AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes"; break], |
||||
[link_date_time="no"]) |
||||
done |
||||
if test "x$link_date_time" != "xyes"; then |
||||
for libextension in `ls $BOOSTLIBDIR/boost_date_time*.dll* $BOOSTLIBDIR/boost_date_time*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_date_time.*\)\.dll.*$;\1;' -e 's;^\(boost_date_time.*\)\.a.*$;\1;'` ; do |
||||
ax_lib=${libextension} |
||||
AC_CHECK_LIB($ax_lib, exit, |
||||
[BOOST_DATE_TIME_LIB="-l$ax_lib"; AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes"; break], |
||||
[link_date_time="no"]) |
||||
done |
||||
fi |
||||
|
||||
else |
||||
for ax_lib in $ax_boost_user_date_time_lib boost_date_time-$ax_boost_user_date_time_lib; do |
||||
AC_CHECK_LIB($ax_lib, main, |
||||
[BOOST_DATE_TIME_LIB="-l$ax_lib"; AC_SUBST(BOOST_DATE_TIME_LIB) link_date_time="yes"; break], |
||||
[link_date_time="no"]) |
||||
done |
||||
|
||||
fi |
||||
if test "x$ax_lib" = "x"; then |
||||
AC_MSG_ERROR(Could not find a version of the library!) |
||||
fi |
||||
if test "x$link_date_time" != "xyes"; then |
||||
AC_MSG_ERROR(Could not link against $ax_lib !) |
||||
fi |
||||
fi |
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED" |
||||
LDFLAGS="$LDFLAGS_SAVED" |
||||
fi |
||||
]) |
@ -1,118 +0,0 @@
@@ -1,118 +0,0 @@
|
||||
# =========================================================================== |
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_filesystem.html |
||||
# =========================================================================== |
||||
# |
||||
# SYNOPSIS |
||||
# |
||||
# AX_BOOST_FILESYSTEM |
||||
# |
||||
# DESCRIPTION |
||||
# |
||||
# Test for Filesystem library from the Boost C++ libraries. The macro |
||||
# requires a preceding call to AX_BOOST_BASE. Further documentation is |
||||
# available at <http://randspringer.de/boost/index.html>. |
||||
# |
||||
# This macro calls: |
||||
# |
||||
# AC_SUBST(BOOST_FILESYSTEM_LIB) |
||||
# |
||||
# And sets: |
||||
# |
||||
# HAVE_BOOST_FILESYSTEM |
||||
# |
||||
# LICENSE |
||||
# |
||||
# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de> |
||||
# Copyright (c) 2009 Michael Tindal |
||||
# Copyright (c) 2009 Roman Rybalko <libtorrent@romanr.info> |
||||
# |
||||
# Copying and distribution of this file, with or without modification, are |
||||
# permitted in any medium without royalty provided the copyright notice |
||||
# and this notice are preserved. This file is offered as-is, without any |
||||
# warranty. |
||||
|
||||
#serial 26 |
||||
|
||||
AC_DEFUN([AX_BOOST_FILESYSTEM], |
||||
[ |
||||
AC_ARG_WITH([boost-filesystem], |
||||
AS_HELP_STRING([--with-boost-filesystem@<:@=special-lib@:>@], |
||||
[use the Filesystem library from boost - it is possible to specify a certain library for the linker |
||||
e.g. --with-boost-filesystem=boost_filesystem-gcc-mt ]), |
||||
[ |
||||
if test "$withval" = "no"; then |
||||
want_boost="no" |
||||
elif test "$withval" = "yes"; then |
||||
want_boost="yes" |
||||
ax_boost_user_filesystem_lib="" |
||||
else |
||||
want_boost="yes" |
||||
ax_boost_user_filesystem_lib="$withval" |
||||
fi |
||||
], |
||||
[want_boost="yes"] |
||||
) |
||||
|
||||
if test "x$want_boost" = "xyes"; then |
||||
AC_REQUIRE([AC_PROG_CC]) |
||||
CPPFLAGS_SAVED="$CPPFLAGS" |
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" |
||||
export CPPFLAGS |
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS" |
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" |
||||
export LDFLAGS |
||||
|
||||
LIBS_SAVED=$LIBS |
||||
LIBS="$LIBS $BOOST_SYSTEM_LIB" |
||||
export LIBS |
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Filesystem library is available, |
||||
ax_cv_boost_filesystem, |
||||
[AC_LANG_PUSH([C++]) |
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/filesystem/path.hpp>]], |
||||
[[using namespace boost::filesystem; |
||||
path my_path( "foo/bar/data.txt" ); |
||||
return 0;]])], |
||||
ax_cv_boost_filesystem=yes, ax_cv_boost_filesystem=no) |
||||
AC_LANG_POP([C++]) |
||||
]) |
||||
if test "x$ax_cv_boost_filesystem" = "xyes"; then |
||||
AC_DEFINE(HAVE_BOOST_FILESYSTEM,,[define if the Boost::Filesystem library is available]) |
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` |
||||
if test "x$ax_boost_user_filesystem_lib" = "x"; then |
||||
for libextension in `ls -r $BOOSTLIBDIR/libboost_filesystem* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do |
||||
ax_lib=${libextension} |
||||
AC_CHECK_LIB($ax_lib, exit, |
||||
[BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break], |
||||
[link_filesystem="no"]) |
||||
done |
||||
if test "x$link_filesystem" != "xyes"; then |
||||
for libextension in `ls -r $BOOSTLIBDIR/boost_filesystem* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do |
||||
ax_lib=${libextension} |
||||
AC_CHECK_LIB($ax_lib, exit, |
||||
[BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break], |
||||
[link_filesystem="no"]) |
||||
done |
||||
fi |
||||
else |
||||
for ax_lib in $ax_boost_user_filesystem_lib boost_filesystem-$ax_boost_user_filesystem_lib; do |
||||
AC_CHECK_LIB($ax_lib, exit, |
||||
[BOOST_FILESYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_FILESYSTEM_LIB) link_filesystem="yes"; break], |
||||
[link_filesystem="no"]) |
||||
done |
||||
|
||||
fi |
||||
if test "x$ax_lib" = "x"; then |
||||
AC_MSG_ERROR(Could not find a version of the library!) |
||||
fi |
||||
if test "x$link_filesystem" != "xyes"; then |
||||
AC_MSG_ERROR(Could not link against $ax_lib !) |
||||
fi |
||||
fi |
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED" |
||||
LDFLAGS="$LDFLAGS_SAVED" |
||||
LIBS="$LIBS_SAVED" |
||||
fi |
||||
]) |
@ -1,108 +0,0 @@
@@ -1,108 +0,0 @@
|
||||
# ============================================================================ |
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_program_options.html |
||||
# ============================================================================ |
||||
# |
||||
# SYNOPSIS |
||||
# |
||||
# AX_BOOST_PROGRAM_OPTIONS |
||||
# |
||||
# DESCRIPTION |
||||
# |
||||
# Test for program options library from the Boost C++ libraries. The macro |
||||
# requires a preceding call to AX_BOOST_BASE. Further documentation is |
||||
# available at <http://randspringer.de/boost/index.html>. |
||||
# |
||||
# This macro calls: |
||||
# |
||||
# AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) |
||||
# |
||||
# And sets: |
||||
# |
||||
# HAVE_BOOST_PROGRAM_OPTIONS |
||||
# |
||||
# LICENSE |
||||
# |
||||
# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de> |
||||
# |
||||
# Copying and distribution of this file, with or without modification, are |
||||
# permitted in any medium without royalty provided the copyright notice |
||||
# and this notice are preserved. This file is offered as-is, without any |
||||
# warranty. |
||||
|
||||
#serial 22 |
||||
|
||||
AC_DEFUN([AX_BOOST_PROGRAM_OPTIONS], |
||||
[ |
||||
AC_ARG_WITH([boost-program-options], |
||||
AS_HELP_STRING([--with-boost-program-options@<:@=special-lib@:>@], |
||||
[use the program options library from boost - it is possible to specify a certain library for the linker |
||||
e.g. --with-boost-program-options=boost_program_options-gcc-mt-1_33_1 ]), |
||||
[ |
||||
if test "$withval" = "no"; then |
||||
want_boost="no" |
||||
elif test "$withval" = "yes"; then |
||||
want_boost="yes" |
||||
ax_boost_user_program_options_lib="" |
||||
else |
||||
want_boost="yes" |
||||
ax_boost_user_program_options_lib="$withval" |
||||
fi |
||||
], |
||||
[want_boost="yes"] |
||||
) |
||||
|
||||
if test "x$want_boost" = "xyes"; then |
||||
AC_REQUIRE([AC_PROG_CC]) |
||||
export want_boost |
||||
CPPFLAGS_SAVED="$CPPFLAGS" |
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" |
||||
export CPPFLAGS |
||||
LDFLAGS_SAVED="$LDFLAGS" |
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" |
||||
export LDFLAGS |
||||
AC_CACHE_CHECK([whether the Boost::Program_Options library is available], |
||||
ax_cv_boost_program_options, |
||||
[AC_LANG_PUSH(C++) |
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/program_options.hpp> |
||||
]], |
||||
[[boost::program_options::options_description generic("Generic options"); |
||||
return 0;]])], |
||||
ax_cv_boost_program_options=yes, ax_cv_boost_program_options=no) |
||||
AC_LANG_POP([C++]) |
||||
]) |
||||
if test "$ax_cv_boost_program_options" = yes; then |
||||
AC_DEFINE(HAVE_BOOST_PROGRAM_OPTIONS,,[define if the Boost::PROGRAM_OPTIONS library is available]) |
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` |
||||
if test "x$ax_boost_user_program_options_lib" = "x"; then |
||||
for libextension in `ls $BOOSTLIBDIR/libboost_program_options*.so* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.so.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.dylib* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.dylib.*$;\1;'` `ls $BOOSTLIBDIR/libboost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_program_options.*\)\.a.*$;\1;'` ; do |
||||
ax_lib=${libextension} |
||||
AC_CHECK_LIB($ax_lib, exit, |
||||
[BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break], |
||||
[link_program_options="no"]) |
||||
done |
||||
if test "x$link_program_options" != "xyes"; then |
||||
for libextension in `ls $BOOSTLIBDIR/boost_program_options*.dll* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.dll.*$;\1;'` `ls $BOOSTLIBDIR/boost_program_options*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_program_options.*\)\.a.*$;\1;'` ; do |
||||
ax_lib=${libextension} |
||||
AC_CHECK_LIB($ax_lib, exit, |
||||
[BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break], |
||||
[link_program_options="no"]) |
||||
done |
||||
fi |
||||
else |
||||
for ax_lib in $ax_boost_user_program_options_lib boost_program_options-$ax_boost_user_program_options_lib; do |
||||
AC_CHECK_LIB($ax_lib, main, |
||||
[BOOST_PROGRAM_OPTIONS_LIB="-l$ax_lib"; AC_SUBST(BOOST_PROGRAM_OPTIONS_LIB) link_program_options="yes"; break], |
||||
[link_program_options="no"]) |
||||
done |
||||
fi |
||||
if test "x$ax_lib" = "x"; then |
||||
AC_MSG_ERROR(Could not find a version of the library!) |
||||
fi |
||||
if test "x$link_program_options" != "xyes"; then |
||||
AC_MSG_ERROR([Could not link against [$ax_lib] !]) |
||||
fi |
||||
fi |
||||
CPPFLAGS="$CPPFLAGS_SAVED" |
||||
LDFLAGS="$LDFLAGS_SAVED" |
||||
fi |
||||
]) |
@ -1,111 +0,0 @@
@@ -1,111 +0,0 @@
|
||||
# =========================================================================== |
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_regex.html |
||||
# =========================================================================== |
||||
# |
||||
# SYNOPSIS |
||||
# |
||||
# AX_BOOST_REGEX |
||||
# |
||||
# DESCRIPTION |
||||
# |
||||
# Test for Regex library from the Boost C++ libraries. The macro requires |
||||
# a preceding call to AX_BOOST_BASE. Further documentation is available at |
||||
# <http://randspringer.de/boost/index.html>. |
||||
# |
||||
# This macro calls: |
||||
# |
||||
# AC_SUBST(BOOST_REGEX_LIB) |
||||
# |
||||
# And sets: |
||||
# |
||||
# HAVE_BOOST_REGEX |
||||
# |
||||
# LICENSE |
||||
# |
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> |
||||
# Copyright (c) 2008 Michael Tindal |
||||
# |
||||
# Copying and distribution of this file, with or without modification, are |
||||
# permitted in any medium without royalty provided the copyright notice |
||||
# and this notice are preserved. This file is offered as-is, without any |
||||
# warranty. |
||||
|
||||
#serial 22 |
||||
|
||||
AC_DEFUN([AX_BOOST_REGEX], |
||||
[ |
||||
AC_ARG_WITH([boost-regex], |
||||
AS_HELP_STRING([--with-boost-regex@<:@=special-lib@:>@], |
||||
[use the Regex library from boost - it is possible to specify a certain library for the linker |
||||
e.g. --with-boost-regex=boost_regex-gcc-mt-d-1_33_1 ]), |
||||
[ |
||||
if test "$withval" = "no"; then |
||||
want_boost="no" |
||||
elif test "$withval" = "yes"; then |
||||
want_boost="yes" |
||||
ax_boost_user_regex_lib="" |
||||
else |
||||
want_boost="yes" |
||||
ax_boost_user_regex_lib="$withval" |
||||
fi |
||||
], |
||||
[want_boost="yes"] |
||||
) |
||||
|
||||
if test "x$want_boost" = "xyes"; then |
||||
AC_REQUIRE([AC_PROG_CC]) |
||||
CPPFLAGS_SAVED="$CPPFLAGS" |
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" |
||||
export CPPFLAGS |
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS" |
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" |
||||
export LDFLAGS |
||||
|
||||
AC_CACHE_CHECK(whether the Boost::Regex library is available, |
||||
ax_cv_boost_regex, |
||||
[AC_LANG_PUSH([C++]) |
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/regex.hpp> |
||||
]], |
||||
[[boost::regex r(); return 0;]])], |
||||
ax_cv_boost_regex=yes, ax_cv_boost_regex=no) |
||||
AC_LANG_POP([C++]) |
||||
]) |
||||
if test "x$ax_cv_boost_regex" = "xyes"; then |
||||
AC_DEFINE(HAVE_BOOST_REGEX,,[define if the Boost::Regex library is available]) |
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` |
||||
if test "x$ax_boost_user_regex_lib" = "x"; then |
||||
for libextension in `ls $BOOSTLIBDIR/libboost_regex*.so* $BOOSTLIBDIR/libboost_regex*.dylib* $BOOSTLIBDIR/libboost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_regex.*\)\.so.*$;\1;' -e 's;^lib\(boost_regex.*\)\.dylib.*;\1;' -e 's;^lib\(boost_regex.*\)\.a.*$;\1;'` ; do |
||||
ax_lib=${libextension} |
||||
AC_CHECK_LIB($ax_lib, exit, |
||||
[BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break], |
||||
[link_regex="no"]) |
||||
done |
||||
if test "x$link_regex" != "xyes"; then |
||||
for libextension in `ls $BOOSTLIBDIR/boost_regex*.dll* $BOOSTLIBDIR/boost_regex*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_regex.*\)\.dll.*$;\1;' -e 's;^\(boost_regex.*\)\.a.*$;\1;'` ; do |
||||
ax_lib=${libextension} |
||||
AC_CHECK_LIB($ax_lib, exit, |
||||
[BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break], |
||||
[link_regex="no"]) |
||||
done |
||||
fi |
||||
|
||||
else |
||||
for ax_lib in $ax_boost_user_regex_lib boost_regex-$ax_boost_user_regex_lib; do |
||||
AC_CHECK_LIB($ax_lib, main, |
||||
[BOOST_REGEX_LIB="-l$ax_lib"; AC_SUBST(BOOST_REGEX_LIB) link_regex="yes"; break], |
||||
[link_regex="no"]) |
||||
done |
||||
fi |
||||
if test "x$ax_lib" = "x"; then |
||||
AC_MSG_ERROR(Could not find a version of the Boost::Regex library!) |
||||
fi |
||||
if test "x$link_regex" != "xyes"; then |
||||
AC_MSG_ERROR(Could not link against $ax_lib !) |
||||
fi |
||||
fi |
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED" |
||||
LDFLAGS="$LDFLAGS_SAVED" |
||||
fi |
||||
]) |
@ -1,120 +0,0 @@
@@ -1,120 +0,0 @@
|
||||
# =========================================================================== |
||||
# http://www.gnu.org/software/autoconf-archive/ax_boost_system.html |
||||
# =========================================================================== |
||||
# |
||||
# SYNOPSIS |
||||
# |
||||
# AX_BOOST_SYSTEM |
||||
# |
||||
# DESCRIPTION |
||||
# |
||||
# Test for System library from the Boost C++ libraries. The macro requires |
||||
# a preceding call to AX_BOOST_BASE. Further documentation is available at |
||||
# <http://randspringer.de/boost/index.html>. |
||||
# |
||||
# This macro calls: |
||||
# |
||||
# AC_SUBST(BOOST_SYSTEM_LIB) |
||||
# |
||||
# And sets: |
||||
# |
||||
# HAVE_BOOST_SYSTEM |
||||
# |
||||
# LICENSE |
||||
# |
||||
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de> |
||||
# Copyright (c) 2008 Michael Tindal |
||||
# Copyright (c) 2008 Daniel Casimiro <dan.casimiro@gmail.com> |
||||
# |
||||
# Copying and distribution of this file, with or without modification, are |
||||
# permitted in any medium without royalty provided the copyright notice |
||||
# and this notice are preserved. This file is offered as-is, without any |
||||
# warranty. |
||||
|
||||
#serial 17 |
||||
|
||||
AC_DEFUN([AX_BOOST_SYSTEM], |
||||
[ |
||||
AC_ARG_WITH([boost-system], |
||||
AS_HELP_STRING([--with-boost-system@<:@=special-lib@:>@], |
||||
[use the System library from boost - it is possible to specify a certain library for the linker |
||||
e.g. --with-boost-system=boost_system-gcc-mt ]), |
||||
[ |
||||
if test "$withval" = "no"; then |
||||
want_boost="no" |
||||
elif test "$withval" = "yes"; then |
||||
want_boost="yes" |
||||
ax_boost_user_system_lib="" |
||||
else |
||||
want_boost="yes" |
||||
ax_boost_user_system_lib="$withval" |
||||
fi |
||||
], |
||||
[want_boost="yes"] |
||||
) |
||||
|
||||
if test "x$want_boost" = "xyes"; then |
||||
AC_REQUIRE([AC_PROG_CC]) |
||||
AC_REQUIRE([AC_CANONICAL_BUILD]) |
||||
CPPFLAGS_SAVED="$CPPFLAGS" |
||||
CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" |
||||
export CPPFLAGS |
||||
|
||||
LDFLAGS_SAVED="$LDFLAGS" |
||||
LDFLAGS="$LDFLAGS $BOOST_LDFLAGS" |
||||
export LDFLAGS |
||||
|
||||
AC_CACHE_CHECK(whether the Boost::System library is available, |
||||
ax_cv_boost_system, |
||||
[AC_LANG_PUSH([C++]) |
||||
CXXFLAGS_SAVE=$CXXFLAGS |
||||
|
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/system/error_code.hpp>]], |
||||
[[boost::system::system_category]])], |
||||
ax_cv_boost_system=yes, ax_cv_boost_system=no) |
||||
CXXFLAGS=$CXXFLAGS_SAVE |
||||
AC_LANG_POP([C++]) |
||||
]) |
||||
if test "x$ax_cv_boost_system" = "xyes"; then |
||||
AC_SUBST(BOOST_CPPFLAGS) |
||||
|
||||
AC_DEFINE(HAVE_BOOST_SYSTEM,,[define if the Boost::System library is available]) |
||||
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'` |
||||
|
||||
LDFLAGS_SAVE=$LDFLAGS |
||||
if test "x$ax_boost_user_system_lib" = "x"; then |
||||
for libextension in `ls -r $BOOSTLIBDIR/libboost_system* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'` ; do |
||||
ax_lib=${libextension} |
||||
AC_CHECK_LIB($ax_lib, exit, |
||||
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], |
||||
[link_system="no"]) |
||||
done |
||||
if test "x$link_system" != "xyes"; then |
||||
for libextension in `ls -r $BOOSTLIBDIR/boost_system* 2>/dev/null | sed 's,.*/,,' | sed -e 's,\..*,,'` ; do |
||||
ax_lib=${libextension} |
||||
AC_CHECK_LIB($ax_lib, exit, |
||||
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], |
||||
[link_system="no"]) |
||||
done |
||||
fi |
||||
|
||||
else |
||||
for ax_lib in $ax_boost_user_system_lib boost_system-$ax_boost_user_system_lib; do |
||||
AC_CHECK_LIB($ax_lib, exit, |
||||
[BOOST_SYSTEM_LIB="-l$ax_lib"; AC_SUBST(BOOST_SYSTEM_LIB) link_system="yes"; break], |
||||
[link_system="no"]) |
||||
done |
||||
|
||||
fi |
||||
if test "x$ax_lib" = "x"; then |
||||
AC_MSG_ERROR(Could not find a version of the library!) |
||||
fi |
||||
if test "x$link_system" = "xno"; then |
||||
AC_MSG_ERROR(Could not link against $ax_lib !) |
||||
fi |
||||
fi |
||||
|
||||
CPPFLAGS="$CPPFLAGS_SAVED" |
||||
LDFLAGS="$LDFLAGS_SAVED" |
||||
fi |
||||
]) |
@ -1,141 +0,0 @@
@@ -1,141 +0,0 @@
|
||||
# ============================================================================ |
||||
# http://www.gnu.org/software/autoconf-archive/ax_cxx_compile_stdcxx_11.html |
||||
# ============================================================================ |
||||
# |
||||
# SYNOPSIS |
||||
# |
||||
# AX_CXX_COMPILE_STDCXX_11([ext|noext],[mandatory|optional]) |
||||
# |
||||
# DESCRIPTION |
||||
# |
||||
# Check for baseline language coverage in the compiler for the C++11 |
||||
# standard; if necessary, add switches to CXXFLAGS to enable support. |
||||
# |
||||
# The first argument, if specified, indicates whether you insist on an |
||||
# extended mode (e.g. -std=gnu++11) or a strict conformance mode (e.g. |
||||
# -std=c++11). If neither is specified, you get whatever works, with |
||||
# preference for an extended mode. |
||||
# |
||||
# The second argument, if specified 'mandatory' or if left unspecified, |
||||
# indicates that baseline C++11 support is required and that the macro |
||||
# should error out if no mode with that support is found. If specified |
||||
# 'optional', then configuration proceeds regardless, after defining |
||||
# HAVE_CXX11 if and only if a supporting mode is found. |
||||
# |
||||
# LICENSE |
||||
# |
||||
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.com> |
||||
# Copyright (c) 2012 Zack Weinberg <zackw@panix.com> |
||||
# Copyright (c) 2013 Roy Stogner <roystgnr@ices.utexas.edu> |
||||
# Copyright (c) 2014 Alexey Sokolov <sokolov@google.com> |
||||
# |
||||
# Copying and distribution of this file, with or without modification, are |
||||
# permitted in any medium without royalty provided the copyright notice |
||||
# and this notice are preserved. This file is offered as-is, without any |
||||
# warranty. |
||||
|
||||
#serial 4 |
||||
|
||||
m4_define([_AX_CXX_COMPILE_STDCXX_11_testbody], [[ |
||||
template <typename T> |
||||
struct check |
||||
{ |
||||
static_assert(sizeof(int) <= sizeof(T), "not big enough"); |
||||
}; |
||||
|
||||
struct Base { |
||||
virtual void f() {} |
||||
}; |
||||
struct Child : public Base { |
||||
virtual void f() {} |
||||
}; |
||||
|
||||
typedef check<check<bool>> right_angle_brackets; |
||||
|
||||
int a; |
||||
decltype(a) b; |
||||
|
||||
typedef check<int> check_type; |
||||
check_type c; |
||||
check_type&& cr = static_cast<check_type&&>(c); |
||||
|
||||
auto d = a; |
||||
]]) |
||||
|
||||
AC_DEFUN([AX_CXX_COMPILE_STDCXX_11], [dnl |
||||
m4_if([$1], [], [], |
||||
[$1], [ext], [], |
||||
[$1], [noext], [], |
||||
[m4_fatal([invalid argument `$1' to AX_CXX_COMPILE_STDCXX_11])])dnl |
||||
m4_if([$2], [], [ax_cxx_compile_cxx11_required=true], |
||||
[$2], [mandatory], [ax_cxx_compile_cxx11_required=true], |
||||
[$2], [optional], [ax_cxx_compile_cxx11_required=false], |
||||
[m4_fatal([invalid second argument `$2' to AX_CXX_COMPILE_STDCXX_11])]) |
||||
AC_LANG_PUSH([C++])dnl |
||||
ac_success=no |
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features by default, |
||||
ax_cv_cxx_compile_cxx11, |
||||
[AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], |
||||
[ax_cv_cxx_compile_cxx11=yes], |
||||
[ax_cv_cxx_compile_cxx11=no])]) |
||||
if test x$ax_cv_cxx_compile_cxx11 = xyes; then |
||||
ac_success=yes |
||||
fi |
||||
|
||||
m4_if([$1], [noext], [], [dnl |
||||
if test x$ac_success = xno; then |
||||
for switch in -std=gnu++11 -std=gnu++0x; do |
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) |
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, |
||||
$cachevar, |
||||
[ac_save_CXXFLAGS="$CXXFLAGS" |
||||
CXXFLAGS="$CXXFLAGS $switch" |
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], |
||||
[eval $cachevar=yes], |
||||
[eval $cachevar=no]) |
||||
CXXFLAGS="$ac_save_CXXFLAGS"]) |
||||
if eval test x\$$cachevar = xyes; then |
||||
CXXFLAGS="$CXXFLAGS $switch" |
||||
ac_success=yes |
||||
break |
||||
fi |
||||
done |
||||
fi]) |
||||
|
||||
m4_if([$1], [ext], [], [dnl |
||||
if test x$ac_success = xno; then |
||||
for switch in -std=c++11 -std=c++0x; do |
||||
cachevar=AS_TR_SH([ax_cv_cxx_compile_cxx11_$switch]) |
||||
AC_CACHE_CHECK(whether $CXX supports C++11 features with $switch, |
||||
$cachevar, |
||||
[ac_save_CXXFLAGS="$CXXFLAGS" |
||||
CXXFLAGS="$CXXFLAGS $switch" |
||||
AC_COMPILE_IFELSE([AC_LANG_SOURCE([_AX_CXX_COMPILE_STDCXX_11_testbody])], |
||||
[eval $cachevar=yes], |
||||
[eval $cachevar=no]) |
||||
CXXFLAGS="$ac_save_CXXFLAGS"]) |
||||
if eval test x\$$cachevar = xyes; then |
||||
CXXFLAGS="$CXXFLAGS $switch" |
||||
ac_success=yes |
||||
break |
||||
fi |
||||
done |
||||
fi]) |
||||
AC_LANG_POP([C++]) |
||||
if test x$ax_cxx_compile_cxx11_required = xtrue; then |
||||
if test x$ac_success = xno; then |
||||
AC_MSG_ERROR([*** A compiler with support for C++11 language features is required.]) |
||||
fi |
||||
else |
||||
if test x$ac_success = xno; then |
||||
HAVE_CXX11=0 |
||||
AC_MSG_NOTICE([No compiler with C++11 support was found]) |
||||
else |
||||
HAVE_CXX11=1 |
||||
AC_DEFINE(HAVE_CXX11,1, |
||||
[define if the compiler supports basic C++11 syntax]) |
||||
fi |
||||
|
||||
AC_SUBST(HAVE_CXX11) |
||||
fi |
||||
]) |
@ -1,332 +0,0 @@
@@ -1,332 +0,0 @@
|
||||
# =========================================================================== |
||||
# http://www.gnu.org/software/autoconf-archive/ax_pthread.html |
||||
# =========================================================================== |
||||
# |
||||
# SYNOPSIS |
||||
# |
||||
# AX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) |
||||
# |
||||
# DESCRIPTION |
||||
# |
||||
# This macro figures out how to build C programs using POSIX threads. It |
||||
# sets the PTHREAD_LIBS output variable to the threads library and linker |
||||
# flags, and the PTHREAD_CFLAGS output variable to any special C compiler |
||||
# flags that are needed. (The user can also force certain compiler |
||||
# flags/libs to be tested by setting these environment variables.) |
||||
# |
||||
# Also sets PTHREAD_CC to any special C compiler that is needed for |
||||
# multi-threaded programs (defaults to the value of CC otherwise). (This |
||||
# is necessary on AIX to use the special cc_r compiler alias.) |
||||
# |
||||
# NOTE: You are assumed to not only compile your program with these flags, |
||||
# but also link it with them as well. e.g. you should link with |
||||
# $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS |
||||
# |
||||
# If you are only building threads programs, you may wish to use these |
||||
# variables in your default LIBS, CFLAGS, and CC: |
||||
# |
||||
# LIBS="$PTHREAD_LIBS $LIBS" |
||||
# CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
||||
# CC="$PTHREAD_CC" |
||||
# |
||||
# In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant |
||||
# has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name |
||||
# (e.g. PTHREAD_CREATE_UNDETACHED on AIX). |
||||
# |
||||
# Also HAVE_PTHREAD_PRIO_INHERIT is defined if pthread is found and the |
||||
# PTHREAD_PRIO_INHERIT symbol is defined when compiling with |
||||
# PTHREAD_CFLAGS. |
||||
# |
||||
# ACTION-IF-FOUND is a list of shell commands to run if a threads library |
||||
# is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it |
||||
# is not found. If ACTION-IF-FOUND is not specified, the default action |
||||
# will define HAVE_PTHREAD. |
||||
# |
||||
# Please let the authors know if this macro fails on any platform, or if |
||||
# you have any other suggestions or comments. This macro was based on work |
||||
# by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help |
||||
# from M. Frigo), as well as ac_pthread and hb_pthread macros posted by |
||||
# Alejandro Forero Cuervo to the autoconf macro repository. We are also |
||||
# grateful for the helpful feedback of numerous users. |
||||
# |
||||
# Updated for Autoconf 2.68 by Daniel Richard G. |
||||
# |
||||
# LICENSE |
||||
# |
||||
# Copyright (c) 2008 Steven G. Johnson <stevenj@alum.mit.edu> |
||||
# Copyright (c) 2011 Daniel Richard G. <skunk@iSKUNK.ORG> |
||||
# |
||||
# This program is free software: you can redistribute it and/or modify it |
||||
# under the terms of the GNU General Public License as published by the |
||||
# Free Software Foundation, either version 3 of the License, or (at your |
||||
# option) any later version. |
||||
# |
||||
# This program is distributed in the hope that it will be useful, but |
||||
# WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General |
||||
# Public License for more details. |
||||
# |
||||
# You should have received a copy of the GNU General Public License along |
||||
# with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
# |
||||
# As a special exception, the respective Autoconf Macro's copyright owner |
||||
# gives unlimited permission to copy, distribute and modify the configure |
||||
# scripts that are the output of Autoconf when processing the Macro. You |
||||
# need not follow the terms of the GNU General Public License when using |
||||
# or distributing such scripts, even though portions of the text of the |
||||
# Macro appear in them. The GNU General Public License (GPL) does govern |
||||
# all other use of the material that constitutes the Autoconf Macro. |
||||
# |
||||
# This special exception to the GPL applies to versions of the Autoconf |
||||
# Macro released by the Autoconf Archive. When you make and distribute a |
||||
# modified version of the Autoconf Macro, you may extend this special |
||||
# exception to the GPL to apply to your modified version as well. |
||||
|
||||
#serial 21 |
||||
|
||||
AU_ALIAS([ACX_PTHREAD], [AX_PTHREAD]) |
||||
AC_DEFUN([AX_PTHREAD], [ |
||||
AC_REQUIRE([AC_CANONICAL_HOST]) |
||||
AC_LANG_PUSH([C]) |
||||
ax_pthread_ok=no |
||||
|
||||
# We used to check for pthread.h first, but this fails if pthread.h |
||||
# requires special compiler flags (e.g. on True64 or Sequent). |
||||
# It gets checked for in the link test anyway. |
||||
|
||||
# First of all, check if the user has set any of the PTHREAD_LIBS, |
||||
# etcetera environment variables, and if threads linking works using |
||||
# them: |
||||
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then |
||||
save_CFLAGS="$CFLAGS" |
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
||||
save_LIBS="$LIBS" |
||||
LIBS="$PTHREAD_LIBS $LIBS" |
||||
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) |
||||
AC_TRY_LINK_FUNC([pthread_join], [ax_pthread_ok=yes]) |
||||
AC_MSG_RESULT([$ax_pthread_ok]) |
||||
if test x"$ax_pthread_ok" = xno; then |
||||
PTHREAD_LIBS="" |
||||
PTHREAD_CFLAGS="" |
||||
fi |
||||
LIBS="$save_LIBS" |
||||
CFLAGS="$save_CFLAGS" |
||||
fi |
||||
|
||||
# We must check for the threads library under a number of different |
||||
# names; the ordering is very important because some systems |
||||
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the |
||||
# libraries is broken (non-POSIX). |
||||
|
||||
# Create a list of thread flags to try. Items starting with a "-" are |
||||
# C compiler flags, and other items are library names, except for "none" |
||||
# which indicates that we try without any flags at all, and "pthread-config" |
||||
# which is a program returning the flags for the Pth emulation library. |
||||
|
||||
ax_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" |
||||
|
||||
# The ordering *is* (sometimes) important. Some notes on the |
||||
# individual items follow: |
||||
|
||||
# pthreads: AIX (must check this before -lpthread) |
||||
# none: in case threads are in libc; should be tried before -Kthread and |
||||
# other compiler flags to prevent continual compiler warnings |
||||
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) |
||||
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) |
||||
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) |
||||
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) |
||||
# -pthreads: Solaris/gcc |
||||
# -mthreads: Mingw32/gcc, Lynx/gcc |
||||
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it |
||||
# doesn't hurt to check since this sometimes defines pthreads too; |
||||
# also defines -D_REENTRANT) |
||||
# ... -mt is also the pthreads flag for HP/aCC |
||||
# pthread: Linux, etcetera |
||||
# --thread-safe: KAI C++ |
||||
# pthread-config: use pthread-config program (for GNU Pth library) |
||||
|
||||
case ${host_os} in |
||||
solaris*) |
||||
|
||||
# On Solaris (at least, for some versions), libc contains stubbed |
||||
# (non-functional) versions of the pthreads routines, so link-based |
||||
# tests will erroneously succeed. (We need to link with -pthreads/-mt/ |
||||
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather |
||||
# a function called by this macro, so we could check for that, but |
||||
# who knows whether they'll stub that too in a future libc.) So, |
||||
# we'll just look for -pthreads and -lpthread first: |
||||
|
||||
ax_pthread_flags="-pthreads pthread -mt -pthread $ax_pthread_flags" |
||||
;; |
||||
|
||||
darwin*) |
||||
ax_pthread_flags="-pthread $ax_pthread_flags" |
||||
;; |
||||
esac |
||||
|
||||
# Clang doesn't consider unrecognized options an error unless we specify |
||||
# -Werror. We throw in some extra Clang-specific options to ensure that |
||||
# this doesn't happen for GCC, which also accepts -Werror. |
||||
|
||||
AC_MSG_CHECKING([if compiler needs -Werror to reject unknown flags]) |
||||
save_CFLAGS="$CFLAGS" |
||||
ax_pthread_extra_flags="-Werror" |
||||
CFLAGS="$CFLAGS $ax_pthread_extra_flags -Wunknown-warning-option -Wsizeof-array-argument" |
||||
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([int foo(void);],[foo()])], |
||||
[AC_MSG_RESULT([yes])], |
||||
[ax_pthread_extra_flags= |
||||
AC_MSG_RESULT([no])]) |
||||
CFLAGS="$save_CFLAGS" |
||||
|
||||
if test x"$ax_pthread_ok" = xno; then |
||||
for flag in $ax_pthread_flags; do |
||||
|
||||
case $flag in |
||||
none) |
||||
AC_MSG_CHECKING([whether pthreads work without any flags]) |
||||
;; |
||||
|
||||
-*) |
||||
AC_MSG_CHECKING([whether pthreads work with $flag]) |
||||
PTHREAD_CFLAGS="$flag" |
||||
;; |
||||
|
||||
pthread-config) |
||||
AC_CHECK_PROG([ax_pthread_config], [pthread-config], [yes], [no]) |
||||
if test x"$ax_pthread_config" = xno; then continue; fi |
||||
PTHREAD_CFLAGS="`pthread-config --cflags`" |
||||
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" |
||||
;; |
||||
|
||||
*) |
||||
AC_MSG_CHECKING([for the pthreads library -l$flag]) |
||||
PTHREAD_LIBS="-l$flag" |
||||
;; |
||||
esac |
||||
|
||||
save_LIBS="$LIBS" |
||||
save_CFLAGS="$CFLAGS" |
||||
LIBS="$PTHREAD_LIBS $LIBS" |
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS $ax_pthread_extra_flags" |
||||
|
||||
# Check for various functions. We must include pthread.h, |
||||
# since some functions may be macros. (On the Sequent, we |
||||
# need a special flag -Kthread to make this header compile.) |
||||
# We check for pthread_join because it is in -lpthread on IRIX |
||||
# while pthread_create is in libc. We check for pthread_attr_init |
||||
# due to DEC craziness with -lpthreads. We check for |
||||
# pthread_cleanup_push because it is one of the few pthread |
||||
# functions on Solaris that doesn't have a non-functional libc stub. |
||||
# We try pthread_create on general principles. |
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h> |
||||
static void routine(void *a) { a = 0; } |
||||
static void *start_routine(void *a) { return a; }], |
||||
[pthread_t th; pthread_attr_t attr; |
||||
pthread_create(&th, 0, start_routine, 0); |
||||
pthread_join(th, 0); |
||||
pthread_attr_init(&attr); |
||||
pthread_cleanup_push(routine, 0); |
||||
pthread_cleanup_pop(0) /* ; */])], |
||||
[ax_pthread_ok=yes], |
||||
[]) |
||||
|
||||
LIBS="$save_LIBS" |
||||
CFLAGS="$save_CFLAGS" |
||||
|
||||
AC_MSG_RESULT([$ax_pthread_ok]) |
||||
if test "x$ax_pthread_ok" = xyes; then |
||||
break; |
||||
fi |
||||
|
||||
PTHREAD_LIBS="" |
||||
PTHREAD_CFLAGS="" |
||||
done |
||||
fi |
||||
|
||||
# Various other checks: |
||||
if test "x$ax_pthread_ok" = xyes; then |
||||
save_LIBS="$LIBS" |
||||
LIBS="$PTHREAD_LIBS $LIBS" |
||||
save_CFLAGS="$CFLAGS" |
||||
CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
||||
|
||||
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED. |
||||
AC_MSG_CHECKING([for joinable pthread attribute]) |
||||
attr_name=unknown |
||||
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do |
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([#include <pthread.h>], |
||||
[int attr = $attr; return attr /* ; */])], |
||||
[attr_name=$attr; break], |
||||
[]) |
||||
done |
||||
AC_MSG_RESULT([$attr_name]) |
||||
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then |
||||
AC_DEFINE_UNQUOTED([PTHREAD_CREATE_JOINABLE], [$attr_name], |
||||
[Define to necessary symbol if this constant |
||||
uses a non-standard name on your system.]) |
||||
fi |
||||
|
||||
AC_MSG_CHECKING([if more special flags are required for pthreads]) |
||||
flag=no |
||||
case ${host_os} in |
||||
aix* | freebsd* | darwin*) flag="-D_THREAD_SAFE";; |
||||
osf* | hpux*) flag="-D_REENTRANT";; |
||||
solaris*) |
||||
if test "$GCC" = "yes"; then |
||||
flag="-D_REENTRANT" |
||||
else |
||||
# TODO: What about Clang on Solaris? |
||||
flag="-mt -D_REENTRANT" |
||||
fi |
||||
;; |
||||
esac |
||||
AC_MSG_RESULT([$flag]) |
||||
if test "x$flag" != xno; then |
||||
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" |
||||
fi |
||||
|
||||
AC_CACHE_CHECK([for PTHREAD_PRIO_INHERIT], |
||||
[ax_cv_PTHREAD_PRIO_INHERIT], [ |
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <pthread.h>]], |
||||
[[int i = PTHREAD_PRIO_INHERIT;]])], |
||||
[ax_cv_PTHREAD_PRIO_INHERIT=yes], |
||||
[ax_cv_PTHREAD_PRIO_INHERIT=no]) |
||||
]) |
||||
AS_IF([test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes"], |
||||
[AC_DEFINE([HAVE_PTHREAD_PRIO_INHERIT], [1], [Have PTHREAD_PRIO_INHERIT.])]) |
||||
|
||||
LIBS="$save_LIBS" |
||||
CFLAGS="$save_CFLAGS" |
||||
|
||||
# More AIX lossage: compile with *_r variant |
||||
if test "x$GCC" != xyes; then |
||||
case $host_os in |
||||
aix*) |
||||
AS_CASE(["x/$CC"], |
||||
[x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6], |
||||
[#handle absolute path differently from PATH based program lookup |
||||
AS_CASE(["x$CC"], |
||||
[x/*], |
||||
[AS_IF([AS_EXECUTABLE_P([${CC}_r])],[PTHREAD_CC="${CC}_r"])], |
||||
[AC_CHECK_PROGS([PTHREAD_CC],[${CC}_r],[$CC])])]) |
||||
;; |
||||
esac |
||||
fi |
||||
fi |
||||
|
||||
test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" |
||||
|
||||
AC_SUBST([PTHREAD_LIBS]) |
||||
AC_SUBST([PTHREAD_CFLAGS]) |
||||
AC_SUBST([PTHREAD_CC]) |
||||
|
||||
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: |
||||
if test x"$ax_pthread_ok" = xyes; then |
||||
ifelse([$1],,[AC_DEFINE([HAVE_PTHREAD],[1],[Define if you have POSIX threads libraries and header files.])],[$1]) |
||||
: |
||||
else |
||||
ax_pthread_ok=no |
||||
$2 |
||||
fi |
||||
AC_LANG_POP |
||||
])dnl AX_PTHREAD |
@ -1,215 +0,0 @@
@@ -1,215 +0,0 @@
|
||||
#! /bin/sh |
||||
# Common wrapper for a few potentially missing GNU programs. |
||||
|
||||
scriptversion=2012-06-26.16; # UTC |
||||
|
||||
# Copyright (C) 1996-2013 Free Software Foundation, Inc. |
||||
# Originally written by Fran,cois Pinard <pinard@iro.umontreal.ca>, 1996. |
||||
|
||||
# This program is free software; you can redistribute it and/or modify |
||||
# it under the terms of the GNU General Public License as published by |
||||
# the Free Software Foundation; either version 2, or (at your option) |
||||
# any later version. |
||||
|
||||
# This program is distributed in the hope that it will be useful, |
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
# GNU General Public License for more details. |
||||
|
||||
# You should have received a copy of the GNU General Public License |
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
|
||||
# As a special exception to the GNU General Public License, if you |
||||
# distribute this file as part of a program that contains a |
||||
# configuration script generated by Autoconf, you may include it under |
||||
# the same distribution terms that you use for the rest of that program. |
||||
|
||||
if test $# -eq 0; then |
||||
echo 1>&2 "Try '$0 --help' for more information" |
||||
exit 1 |
||||
fi |
||||
|
||||
case $1 in |
||||
|
||||
--is-lightweight) |
||||
# Used by our autoconf macros to check whether the available missing |
||||
# script is modern enough. |
||||
exit 0 |
||||
;; |
||||
|
||||
--run) |
||||
# Back-compat with the calling convention used by older automake. |
||||
shift |
||||
;; |
||||
|
||||
-h|--h|--he|--hel|--help) |
||||
echo "\ |
||||
$0 [OPTION]... PROGRAM [ARGUMENT]... |
||||
|
||||
Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due |
||||
to PROGRAM being missing or too old. |
||||
|
||||
Options: |
||||
-h, --help display this help and exit |
||||
-v, --version output version information and exit |
||||
|
||||
Supported PROGRAM values: |
||||
aclocal autoconf autoheader autom4te automake makeinfo |
||||
bison yacc flex lex help2man |
||||
|
||||
Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and |
||||
'g' are ignored when checking the name. |
||||
|
||||
Send bug reports to <bug-automake@gnu.org>." |
||||
exit $? |
||||
;; |
||||
|
||||
-v|--v|--ve|--ver|--vers|--versi|--versio|--version) |
||||
echo "missing $scriptversion (GNU Automake)" |
||||
exit $? |
||||
;; |
||||
|
||||
-*) |
||||
echo 1>&2 "$0: unknown '$1' option" |
||||
echo 1>&2 "Try '$0 --help' for more information" |
||||
exit 1 |
||||
;; |
||||
|
||||
esac |
||||
|
||||
# Run the given program, remember its exit status. |
||||
"$@"; st=$? |
||||
|
||||
# If it succeeded, we are done. |
||||
test $st -eq 0 && exit 0 |
||||
|
||||
# Also exit now if we it failed (or wasn't found), and '--version' was |
||||
# passed; such an option is passed most likely to detect whether the |
||||
# program is present and works. |
||||
case $2 in --version|--help) exit $st;; esac |
||||
|
||||
# Exit code 63 means version mismatch. This often happens when the user |
||||
# tries to use an ancient version of a tool on a file that requires a |
||||
# minimum version. |
||||
if test $st -eq 63; then |
||||
msg="probably too old" |
||||
elif test $st -eq 127; then |
||||
# Program was missing. |
||||
msg="missing on your system" |
||||
else |
||||
# Program was found and executed, but failed. Give up. |
||||
exit $st |
||||
fi |
||||
|
||||
perl_URL=http://www.perl.org/ |
||||
flex_URL=http://flex.sourceforge.net/ |
||||
gnu_software_URL=http://www.gnu.org/software |
||||
|
||||
program_details () |
||||
{ |
||||
case $1 in |
||||
aclocal|automake) |
||||
echo "The '$1' program is part of the GNU Automake package:" |
||||
echo "<$gnu_software_URL/automake>" |
||||
echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" |
||||
echo "<$gnu_software_URL/autoconf>" |
||||
echo "<$gnu_software_URL/m4/>" |
||||
echo "<$perl_URL>" |
||||
;; |
||||
autoconf|autom4te|autoheader) |
||||
echo "The '$1' program is part of the GNU Autoconf package:" |
||||
echo "<$gnu_software_URL/autoconf/>" |
||||
echo "It also requires GNU m4 and Perl in order to run:" |
||||
echo "<$gnu_software_URL/m4/>" |
||||
echo "<$perl_URL>" |
||||
;; |
||||
esac |
||||
} |
||||
|
||||
give_advice () |
||||
{ |
||||
# Normalize program name to check for. |
||||
normalized_program=`echo "$1" | sed ' |
||||
s/^gnu-//; t |
||||
s/^gnu//; t |
||||
s/^g//; t'` |
||||
|
||||
printf '%s\n' "'$1' is $msg." |
||||
|
||||
configure_deps="'configure.ac' or m4 files included by 'configure.ac'" |
||||
case $normalized_program in |
||||
autoconf*) |
||||
echo "You should only need it if you modified 'configure.ac'," |
||||
echo "or m4 files included by it." |
||||
program_details 'autoconf' |
||||
;; |
||||
autoheader*) |
||||
echo "You should only need it if you modified 'acconfig.h' or" |
||||
echo "$configure_deps." |
||||
program_details 'autoheader' |
||||
;; |
||||
automake*) |
||||
echo "You should only need it if you modified 'Makefile.am' or" |
||||
echo "$configure_deps." |
||||
program_details 'automake' |
||||
;; |
||||
aclocal*) |
||||
echo "You should only need it if you modified 'acinclude.m4' or" |
||||
echo "$configure_deps." |
||||
program_details 'aclocal' |
||||
;; |
||||
autom4te*) |
||||
echo "You might have modified some maintainer files that require" |
||||
echo "the 'automa4te' program to be rebuilt." |
||||
program_details 'autom4te' |
||||
;; |
||||
bison*|yacc*) |
||||
echo "You should only need it if you modified a '.y' file." |
||||
echo "You may want to install the GNU Bison package:" |
||||
echo "<$gnu_software_URL/bison/>" |
||||
;; |
||||
lex*|flex*) |
||||
echo "You should only need it if you modified a '.l' file." |
||||
echo "You may want to install the Fast Lexical Analyzer package:" |
||||
echo "<$flex_URL>" |
||||
;; |
||||
help2man*) |
||||
echo "You should only need it if you modified a dependency" \ |
||||
"of a man page." |
||||
echo "You may want to install the GNU Help2man package:" |
||||
echo "<$gnu_software_URL/help2man/>" |
||||
;; |
||||
makeinfo*) |
||||
echo "You should only need it if you modified a '.texi' file, or" |
||||
echo "any other file indirectly affecting the aspect of the manual." |
||||
echo "You might want to install the Texinfo package:" |
||||
echo "<$gnu_software_URL/texinfo/>" |
||||
echo "The spurious makeinfo call might also be the consequence of" |
||||
echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" |
||||
echo "want to install GNU make:" |
||||
echo "<$gnu_software_URL/make/>" |
||||
;; |
||||
*) |
||||
echo "You might have modified some files without having the proper" |
||||
echo "tools for further handling them. Check the 'README' file, it" |
||||
echo "often tells you about the needed prerequisites for installing" |
||||
echo "this package. You may also peek at any GNU archive site, in" |
||||
echo "case some other package contains this missing '$1' program." |
||||
;; |
||||
esac |
||||
} |
||||
|
||||
give_advice "$1" | sed -e '1s/^/WARNING: /' \ |
||||
-e '2,$s/^/ /' >&2 |
||||
|
||||
# Propagate the correct exit status (expected to be 127 for a program |
||||
# not found, 63 for a program that failed due to version mismatch). |
||||
exit $st |
||||
|
||||
# Local variables: |
||||
# eval: (add-hook 'write-file-hooks 'time-stamp) |
||||
# time-stamp-start: "scriptversion=" |
||||
# time-stamp-format: "%:y-%02m-%02d.%02H" |
||||
# time-stamp-time-zone: "UTC" |
||||
# time-stamp-end: "; # UTC" |
||||
# End: |
@ -0,0 +1,61 @@
@@ -0,0 +1,61 @@
|
||||
set(CLIENT_SRC |
||||
"BOB.cpp" |
||||
"ClientContext.cpp" |
||||
"Daemon.cpp" |
||||
"HTTPProxy.cpp" |
||||
"HTTPServer.cpp" |
||||
"I2PService.cpp" |
||||
"i2pcontrol/I2PControl.cpp" |
||||
"i2pcontrol/I2PControlServer.cpp" |
||||
"I2PTunnel.cpp" |
||||
"SAM.cpp" |
||||
"SOCKS.cpp" |
||||
"i2p.cpp" |
||||
) |
||||
|
||||
include_directories(".") |
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Linux") |
||||
list(APPEND CLIENT_SRC "DaemonLinux.cpp") |
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "FreeBSD") |
||||
list(APPEND CLIENT_SRC "DaemonLinux.cpp") |
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Darwin") |
||||
list(APPEND CLIENT_SRC "DaemonLinux.cpp") |
||||
elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") |
||||
list(APPEND CLIENT_SRC "DaemonWin32.cpp") |
||||
list(APPEND CLIENT_SRC "Win32Service.cpp") |
||||
endif() |
||||
|
||||
if(WITH_BINARY) |
||||
add_executable(${CLIENT_NAME} ${CLIENT_SRC}) |
||||
if(NOT MSVC) # FIXME: incremental linker file name (.ilk) collision for dll & exe |
||||
set_target_properties(${CLIENT_NAME} PROPERTIES OUTPUT_NAME "${PROJECT_NAME}") |
||||
if(WITH_STATIC) |
||||
set_target_properties(${CLIENT_NAME} PROPERTIES LINK_FLAGS "-static" ) |
||||
endif() |
||||
endif() |
||||
|
||||
if(WITH_HARDENING AND CMAKE_CXX_COMPILER_ID STREQUAL "GNU") |
||||
set_target_properties(${CLIENT_NAME} PROPERTIES LINK_FLAGS "-z relro -z now") |
||||
endif() |
||||
|
||||
# FindBoost pulls pthread for thread which is broken for static linking |
||||
# (at least on Ubuntu 15.04) |
||||
list(GET Boost_LIBRARIES -1 LAST_Boost_LIBRARIES) |
||||
if(${LAST_Boost_LIBRARIES} MATCHES ".*pthread.*") |
||||
list(REMOVE_AT Boost_LIBRARIES -1) |
||||
endif() |
||||
target_link_libraries( |
||||
${CLIENT_NAME} ${CORE_NAME} |
||||
${DL_LIB} ${Boost_LIBRARIES} ${CRYPTO++_LIBRARIES} ${CMAKE_THREAD_LIBS_INIT} |
||||
) |
||||
|
||||
install(TARGETS |
||||
${CLIENT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
||||
) |
||||
if(MSVC) |
||||
install(FILES |
||||
$<TARGET_PDB_FILE:${CLIENT_NAME}> DESTINATION "bin" CONFIGURATIONS DEBUG |
||||
) |
||||
endif() |
||||
endif() |
@ -0,0 +1,56 @@
@@ -0,0 +1,56 @@
|
||||
set(CORE_SRC |
||||
"transport/NTCPSession.cpp" |
||||
"transport/SSU.cpp" |
||||
"transport/SSUData.cpp" |
||||
"transport/SSUSession.cpp" |
||||
"transport/Transports.cpp" |
||||
"crypto/CryptoConst.cpp" |
||||
"crypto/aes.cpp" |
||||
"crypto/Signature.cpp" |
||||
"util/base64.cpp" |
||||
"util/util.cpp" |
||||
"util/Log.cpp" |
||||
"tunnel/TransitTunnel.cpp" |
||||
"tunnel/Tunnel.cpp" |
||||
"tunnel/TunnelGateway.cpp" |
||||
"tunnel/TunnelEndpoint.cpp" |
||||
"tunnel/TunnelPool.cpp" |
||||
"tunnel/TunnelCrypto.cpp" |
||||
"AddressBook.cpp" |
||||
"Garlic.cpp" |
||||
"I2NPProtocol.cpp" |
||||
"Identity.cpp" |
||||
"LeaseSet.cpp" |
||||
"NetDbRequests.cpp" |
||||
"NetDb.cpp" |
||||
"Profiling.cpp" |
||||
"RouterContext.cpp" |
||||
"RouterInfo.cpp" |
||||
"Streaming.cpp" |
||||
"Destination.cpp" |
||||
"Datagram.cpp" |
||||
"UPnP.cpp" |
||||
"Reseed.cpp" |
||||
) |
||||
|
||||
if(CMAKE_SYSTEM_NAME STREQUAL "Windows") |
||||
list(APPEND CORE_SRC "util/I2PEndian.cpp") |
||||
endif() |
||||
|
||||
include_directories(".") |
||||
|
||||
# Library building |
||||
if(WITH_LIBRARY) |
||||
add_library(${CORE_NAME} ${CORE_SRC}) |
||||
target_link_libraries( |
||||
${CORE_NAME} ${Boost_LIBRARIES} ${CRYPTO++_LIBRARIES} |
||||
) |
||||
|
||||
install( |
||||
TARGETS ${CORE_NAME} |
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} |
||||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} |
||||
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} |
||||
) |
||||
endif() |
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in new issue