Commit 1d58fd57 authored by Orvid King's avatar Orvid King Committed by Facebook Github Bot

Remove support for building with autotools

Summary: Let's see what breaks.

Reviewed By: yfeldblum

Differential Revision: D9569029

fbshipit-source-id: 2edbafc018ec70d8640f2e28d35735089c9eb69d
parent 5e0a8b79
if FOLLY_TESTMAIN
MAYBE_INIT = init
endif
# Note that the order of SUBDIRS matters.
# Many subdirectories depend on libfollytest from the test directory,
# so it must appear before other directories
SUBDIRS = . \
test \
experimental \
$(MAYBE_INIT) \
chrono/test \
io/test \
logging/example \
stats/test
ACLOCAL_AMFLAGS = -I m4
CLEANFILES =
noinst_PROGRAMS = generate_fingerprint_tables
generate_fingerprint_tables_SOURCES = build/GenerateFingerprintTables.cpp
generate_fingerprint_tables_LDADD = libfollybase.la
noinst_LTLIBRARIES = \
libfollybasesse42.la \
libfollybase.la
lib_LTLIBRARIES = \
libfolly.la \
libfollybenchmark.la
follyincludedir = $(includedir)/folly
nobase_follyinclude_HEADERS = \
AtomicBitSet.h \
AtomicHashArray.h \
AtomicHashArray-inl.h \
AtomicHashMap.h \
AtomicHashMap-inl.h \
AtomicIntrusiveLinkedList.h \
AtomicLinkedList.h \
AtomicUnorderedMap.h \
Benchmark.h \
Bits.h \
CachelinePadded.h \
Chrono.h \
chrono/Conv.h \
ClockGettimeWrappers.h \
ConcurrentSkipList.h \
ConcurrentSkipList-inl.h \
Conv.h \
CppAttributes.h \
CpuId.h \
CPortability.h \
compression/Compression.h \
compression/Counters.h \
compression/Utils.h \
compression/Zlib.h \
compression/Zstd.h \
concurrency/CacheLocality.h \
concurrency/ConcurrentHashMap.h \
concurrency/CoreCachedSharedPtr.h \
concurrency/detail/ConcurrentHashMap-detail.h \
concurrency/UnboundedQueue.h \
container/Access.h \
container/Array.h \
container/detail/BitIteratorDetail.h \
container/detail/F14Defaults.h \
container/detail/F14IntrinsicsAvailability.h \
container/detail/F14Policy.h \
container/detail/F14Table.h \
container/Iterator.h \
container/Enumerate.h \
container/EvictingCacheMap.h \
container/F14Map-fwd.h \
container/F14Map.h \
container/F14Set-fwd.h \
container/F14Set.h \
container/Foreach.h \
container/Foreach-inl.h \
container/SparseByteSet.h \
ConstexprMath.h \
DefaultKeepAliveExecutor.h \
detail/AtFork.h \
detail/AtomicHashUtils.h \
detail/AtomicUnorderedMapUtils.h \
detail/Demangle.h \
detail/DiscriminatedPtrDetail.h \
detail/FileUtilDetail.h \
detail/FingerprintPolynomial.h \
detail/Futex.h \
detail/Futex-inl.h \
detail/GroupVarintDetail.h \
detail/IPAddress.h \
detail/IPAddressSource.h \
detail/Iterators.h \
detail/MemoryIdler.h \
detail/MPMCPipelineDetail.h \
detail/PolyDetail.h \
detail/RangeCommon.h \
detail/RangeSse42.h \
detail/Singleton.h \
detail/SlowFingerprint.h \
detail/SocketFastOpen.h \
detail/StaticSingletonManager.h \
detail/ThreadLocalDetail.h \
detail/TypeList.h \
detail/TurnSequencer.h \
executors/Async.h \
executors/CPUThreadPoolExecutor.h \
executors/Codel.h \
executors/DrivableExecutor.h \
executors/FiberIOExecutor.h \
executors/FutureExecutor.h \
executors/GlobalExecutor.h \
executors/GlobalThreadPoolList.h \
executors/InlineExecutor.h \
executors/IOExecutor.h \
executors/IOObjectCache.h \
executors/IOThreadPoolExecutor.h \
executors/ManualExecutor.h \
executors/QueuedImmediateExecutor.h \
executors/ScheduledExecutor.h \
executors/SequencedExecutor.h \
executors/SerialExecutor.h \
executors/ThreadPoolExecutor.h \
executors/ThreadedExecutor.h \
executors/TimedDrivableExecutor.h \
executors/task_queue/BlockingQueue.h \
executors/task_queue/LifoSemMPMCQueue.h \
executors/task_queue/PriorityLifoSemMPMCQueue.h \
executors/task_queue/UnboundedBlockingQueue.h \
executors/thread_factory/NamedThreadFactory.h \
executors/thread_factory/PriorityThreadFactory.h \
executors/thread_factory/ThreadFactory.h \
functional/ApplyTuple.h \
Demangle.h \
DiscriminatedPtr.h \
DynamicConverter.h \
dynamic.h \
dynamic-inl.h \
Exception.h \
ExceptionString.h \
ExceptionWrapper.h \
ExceptionWrapper-inl.h \
Executor.h \
Expected.h \
concurrency/AtomicSharedPtr.h \
concurrency/detail/AtomicSharedPtr-detail.h \
experimental/AutoTimer.h \
experimental/ThreadedRepeatingFunctionRunner.h \
experimental/Bits.h \
experimental/BitVectorCoding.h \
experimental/CodingDetail.h \
experimental/DynamicParser.h \
experimental/DynamicParser-inl.h \
experimental/ExecutionObserver.h \
experimental/EliasFanoCoding.h \
experimental/EnvUtil.h \
experimental/EventCount.h \
experimental/Instructions.h \
experimental/bser/Bser.h \
experimental/exception_tracer/ExceptionAbi.h \
experimental/exception_tracer/ExceptionCounterLib.h \
experimental/exception_tracer/ExceptionTracer.h \
experimental/exception_tracer/ExceptionTracerLib.h \
experimental/exception_tracer/StackTrace.h \
experimental/FunctionScheduler.h \
experimental/FutureDAG.h \
experimental/hazptr/debug.h \
experimental/hazptr/hazptr.h \
experimental/hazptr/hazptr-impl.h \
experimental/hazptr/memory_resource.h \
experimental/io/FsUtil.h \
experimental/JemallocNodumpAllocator.h \
experimental/JSONSchema.h \
experimental/LockFreeRingBuffer.h \
experimental/NestedCommandLineApp.h \
experimental/observer/detail/Core.h \
experimental/observer/detail/GraphCycleDetector.h \
experimental/observer/detail/ObserverManager.h \
experimental/observer/Observable.h \
experimental/observer/Observable-inl.h \
experimental/observer/Observer.h \
experimental/observer/Observer-inl.h \
experimental/observer/Observer-pre.h \
experimental/observer/SimpleObservable.h \
experimental/observer/SimpleObservable-inl.h \
experimental/ProgramOptions.h \
experimental/ReadMostlySharedPtr.h \
experimental/Select64.h \
experimental/StampedPtr.h \
experimental/StringKeyedCommon.h \
experimental/StringKeyedMap.h \
experimental/StringKeyedSet.h \
experimental/StringKeyedUnorderedMap.h \
experimental/StringKeyedUnorderedSet.h \
experimental/TestUtil.h \
experimental/TLRefCount.h \
experimental/TupleOps.h \
FBString.h \
FBVector.h \
File.h \
FileUtil.h \
Fingerprint.h \
FixedString.h \
folly-config.h \
FormatArg.h \
FormatTraits.h \
Format.h \
Format-inl.h \
functional/Invoke.h \
functional/Partial.h \
futures/Barrier.h \
futures/Future-pre.h \
futures/helpers.h \
futures/Future.h \
futures/Future-inl.h \
futures/FutureSplitter.h \
futures/Promise-inl.h \
futures/Promise.h \
futures/SharedPromise.h \
futures/SharedPromise-inl.h \
futures/ThreadWheelTimekeeper.h \
futures/detail/Core.h \
futures/detail/Types.h \
futures/test/TestExecutor.h \
hash/Checksum.h \
hash/detail/ChecksumDetail.h \
hash/Hash.h \
hash/SpookyHashV1.h \
hash/SpookyHashV2.h \
gen/Base.h \
gen/Base-inl.h \
gen/Combine.h \
gen/Combine-inl.h \
gen/Core.h \
gen/Core-inl.h \
gen/File.h \
gen/File-inl.h \
gen/Parallel.h \
gen/Parallel-inl.h \
gen/ParallelMap.h \
gen/ParallelMap-inl.h \
gen/String.h \
gen/String-inl.h \
GLog.h \
GroupVarint.h \
Hash.h \
IPAddress.h \
IPAddressV4.h \
IPAddressV6.h \
IPAddressException.h \
Indestructible.h \
IndexedMemPool.h \
init/Init.h \
IntrusiveList.h \
io/Cursor.h \
io/Cursor-inl.h \
io/GlobalShutdownSocketSet.h \
io/IOBuf.h \
io/IOBufQueue.h \
io/RecordIO.h \
io/RecordIO-inl.h \
io/TypedIOBuf.h \
io/ShutdownSocketSet.h \
io/async/AsyncPipe.h \
io/async/AsyncTimeout.h \
io/async/AsyncTransport.h \
io/async/AsyncTransportCertificate.h \
io/async/AsyncUDPServerSocket.h \
io/async/AsyncUDPSocket.h \
io/async/AsyncServerSocket.h \
io/async/AsyncSignalHandler.h \
io/async/AsyncSocket.h \
io/async/AsyncSocketBase.h \
io/async/AsyncSSLSocket.h \
io/async/AsyncSocketException.h \
io/async/DecoratedAsyncTransportWrapper.h \
io/async/DelayedDestructionBase.h \
io/async/DelayedDestruction.h \
io/async/DestructorCheck.h \
io/async/EventBase.h \
io/async/EventBaseLocal.h \
io/async/EventBaseManager.h \
io/async/EventBaseThread.h \
io/async/EventFDWrapper.h \
io/async/EventHandler.h \
io/async/EventUtil.h \
io/async/NotificationQueue.h \
io/async/HHWheelTimer.h \
io/async/ssl/OpenSSLUtils.h \
io/async/ssl/SSLErrors.h \
io/async/ssl/TLSDefinitions.h \
io/async/PasswordInFile.h \
io/async/Request.h \
io/async/SSLContext.h \
io/async/SSLOptions.h \
io/async/ScopedEventBaseThread.h \
io/async/TimeoutManager.h \
io/async/VirtualEventBase.h \
io/async/WriteChainAsyncTransportWrapper.h \
io/async/test/AsyncSSLSocketTest.h \
io/async/test/AsyncSocketTest.h \
io/async/test/AsyncSocketTest2.h \
io/async/test/BlockingSocket.h \
io/async/test/MockAsyncSocket.h \
io/async/test/MockAsyncServerSocket.h \
io/async/test/MockAsyncSSLSocket.h \
io/async/test/MockAsyncTransport.h \
io/async/test/MockAsyncUDPSocket.h \
io/async/test/MockTimeoutManager.h \
io/async/test/ScopedBoundPort.h \
io/async/test/SocketPair.h \
io/async/test/TestSSLServer.h \
io/async/test/TimeUtil.h \
io/async/test/UndelayedDestruction.h \
io/async/test/Util.h \
json.h \
json_pointer.h \
lang/Align.h \
lang/Assume.h \
lang/Bits.h \
lang/ColdClass.h \
lang/Exception.h \
lang/Launder.h \
lang/Ordering.h \
lang/RValueReferenceWrapper.h \
lang/SafeAssert.h \
lang/UncaughtExceptions.h \
Lazy.h \
Likely.h \
LockTraits.h \
LockTraitsBoost.h \
logging/AsyncFileWriter.h \
logging/CustomLogFormatter.h \
logging/FileHandlerFactory.h \
logging/FileWriterFactory.h \
logging/GlogStyleFormatter.h \
logging/ImmediateFileWriter.h \
logging/Init.h \
logging/LogCategory.h \
logging/LogCategoryConfig.h \
logging/LogConfig.h \
logging/LogConfigParser.h \
logging/LogFormatter.h \
logging/Logger.h \
logging/LoggerDB.h \
logging/LogHandler.h \
logging/LogHandlerFactory.h \
logging/LogHandlerConfig.h \
logging/LogLevel.h \
logging/LogMessage.h \
logging/LogName.h \
logging/LogStream.h \
logging/LogStreamProcessor.h \
logging/LogWriter.h \
logging/printf.h \
logging/RateLimiter.h \
logging/StandardLogHandler.h \
logging/StandardLogHandlerFactory.h \
logging/StreamHandlerFactory.h \
logging/xlog.h \
MacAddress.h \
MapUtil.h \
Math.h \
Memory.h \
memory/Arena.h \
memory/Arena-inl.h \
memory/EnableSharedFromThis.h \
memory/MallctlHelper.h \
memory/Malloc.h \
memory/ThreadCachedArena.h \
memory/UninitializedMemoryHacks.h \
memory/detail/MallocImpl.h \
MicroSpinLock.h \
MicroLock.h \
MoveWrapper.h \
MPMCPipeline.h \
MPMCQueue.h \
Optional.h \
Overload.h \
PackedSyncPtr.h \
Padded.h \
Poly.h \
Poly-inl.h \
poly/Nullable.h \
poly/Regular.h \
Portability.h \
portability/Asm.h \
portability/Atomic.h \
portability/Builtins.h \
portability/Config.h \
portability/Constexpr.h \
portability/Dirent.h \
portability/Event.h \
portability/Fcntl.h \
portability/GFlags.h \
portability/GMock.h \
portability/GTest.h \
portability/IOVec.h \
portability/Libgen.h \
portability/Malloc.h \
portability/Math.h \
portability/Memory.h \
portability/OpenSSL.h \
portability/PThread.h \
portability/Semaphore.h \
portability/Sockets.h \
portability/Stdio.h \
portability/Stdlib.h \
portability/String.h \
portability/Syslog.h \
portability/SysFile.h \
portability/SysMembarrier.h \
portability/SysMman.h \
portability/SysResource.h \
portability/SysStat.h \
portability/SysSyscall.h \
portability/SysTime.h \
portability/SysTypes.h \
portability/SysUio.h \
portability/Time.h \
portability/Unistd.h \
portability/Windows.h \
Preprocessor.h \
PriorityMPMCQueue.h \
ProducerConsumerQueue.h \
Random.h \
Random-inl.h \
Range.h \
Replaceable.h \
ScopeGuard.h \
SharedMutex.h \
Singleton.h \
Singleton-inl.h \
SingletonThreadLocal.h \
small_vector.h \
SocketAddress.h \
sorted_vector_types.h \
SpinLock.h \
ssl/Init.h \
ssl/OpenSSLCertUtils.h \
ssl/OpenSSLHash.h \
ssl/OpenSSLPtrTypes.h \
ssl/OpenSSLVersionFinder.h \
ssl/SSLSession.h \
ssl/OpenSSLLockTypes.h \
ssl/detail/OpenSSLThreading.h \
ssl/detail/SSLSessionImpl.h \
stats/detail/Bucket.h \
stats/detail/BufferedStat-defs.h \
stats/detail/BufferedStat.h \
stats/detail/DigestBuilder-defs.h \
stats/detail/DigestBuilder.h \
stats/detail/DoubleRadixSort.h \
stats/detail/SlidingWindow-defs.h \
stats/detail/SlidingWindow.h \
stats/BucketedTimeSeries-defs.h \
stats/BucketedTimeSeries.h \
stats/Histogram-defs.h \
stats/Histogram.h \
stats/MultiLevelTimeSeries-defs.h \
stats/MultiLevelTimeSeries.h \
stats/QuantileEstimator-defs.h \
stats/QuantileEstimator.h \
stats/TDigest.h \
stats/TimeseriesHistogram-defs.h \
stats/TimeseriesHistogram.h \
synchronization/AsymmetricMemoryBarrier.h \
synchronization/AtomicStruct.h \
synchronization/Baton.h \
synchronization/CallOnce.h \
synchronization/Hazptr.h \
synchronization/Hazptr-fwd.h \
synchronization/HazptrDomain.h \
synchronization/HazptrHolder.h \
synchronization/HazptrObj.h \
synchronization/HazptrObjLinked.h \
synchronization/HazptrRec.h \
synchronization/HazptrThrLocal.h \
synchronization/LifoSem.h \
synchronization/MicroSpinLock.h \
synchronization/ParkingLot.h \
synchronization/PicoSpinLock.h \
synchronization/RWSpinLock.h \
synchronization/SaturatingSemaphore.h \
synchronization/SmallLocks.h \
synchronization/Tearable.h \
synchronization/WaitOptions.h \
synchronization/detail/AtomicUtils.h \
synchronization/detail/Sleeper.h \
synchronization/detail/Spin.h \
system/MemoryMapping.h \
system/Shell.h \
system/ThreadId.h \
system/ThreadName.h \
stop_watch.h \
String.h \
String-inl.h \
Subprocess.h \
Synchronized.h \
SynchronizedPtr.h \
test/FBStringTestBenchmarks.cpp.h \
test/FBVectorBenchmarks.cpp.h \
test/FBVectorTests.cpp.h \
test/function_benchmark/benchmark_impl.h \
test/function_benchmark/test_functions.h \
test/SynchronizedTestLib.h \
test/SynchronizedTestLib-inl.h \
test/TestUtils.h \
ThreadCachedInt.h \
ThreadLocal.h \
TimeoutQueue.h \
TokenBucket.h \
tracing/StaticTracepoint.h \
tracing/ScopedTraceSection.h \
Traits.h \
Try-inl.h \
Try.h \
Unicode.h \
UTF8String.h \
Function.h \
Unit.h \
Uri.h \
Uri-inl.h \
Utility.h \
Varint.h \
VirtualExecutor.h
libfollybasesse42_la_SOURCES = \
detail/RangeSse42.cpp \
hash/detail/ChecksumDetail.cpp \
hash/detail/Crc32cDetail.cpp \
hash/detail/Crc32CombineDetail.cpp
libfollybase_la_SOURCES = \
Conv.cpp \
Demangle.cpp \
detail/Demangle.cpp \
detail/RangeCommon.cpp \
Format.cpp \
memory/MallctlHelper.cpp \
String.cpp \
Unicode.cpp
libfolly_la_SOURCES = \
ClockGettimeWrappers.cpp \
compression/Compression.cpp \
compression/Counters.cpp \
compression/Zlib.cpp \
compression/Zstd.cpp \
concurrency/CacheLocality.cpp \
container/detail/F14Table.cpp \
detail/AtFork.cpp \
detail/Futex.cpp \
detail/IPAddress.cpp \
detail/StaticSingletonManager.cpp \
detail/ThreadLocalDetail.cpp \
dynamic.cpp \
ExceptionWrapper.cpp \
Executor.cpp \
File.cpp \
FileUtil.cpp \
FingerprintTables.cpp \
futures/Barrier.cpp \
futures/Future.cpp \
futures/ThreadWheelTimekeeper.cpp \
futures/test/TestExecutor.cpp \
executors/CPUThreadPoolExecutor.cpp \
executors/Codel.cpp \
executors/GlobalExecutor.cpp \
executors/GlobalThreadPoolList.cpp \
executors/IOThreadPoolExecutor.cpp \
executors/InlineExecutor.cpp \
executors/ManualExecutor.cpp \
executors/SerialExecutor.cpp \
executors/ThreadPoolExecutor.cpp \
executors/ThreadedExecutor.cpp \
executors/TimedDrivableExecutor.cpp \
executors/QueuedImmediateExecutor.cpp \
experimental/hazptr/hazptr.cpp \
experimental/hazptr/memory_resource.cpp \
GroupVarint.cpp \
hash/Checksum.cpp \
hash/SpookyHashV1.cpp \
hash/SpookyHashV2.cpp \
IPAddress.cpp \
IPAddressV4.cpp \
IPAddressV6.cpp \
init/Init.cpp \
io/Cursor.cpp \
io/GlobalShutdownSocketSet.cpp \
io/IOBuf.cpp \
io/IOBufQueue.cpp \
io/RecordIO.cpp \
io/ShutdownSocketSet.cpp \
io/async/AsyncPipe.cpp \
io/async/AsyncTimeout.cpp \
io/async/AsyncUDPSocket.cpp \
io/async/AsyncServerSocket.cpp \
io/async/AsyncSignalHandler.cpp \
io/async/AsyncSocket.cpp \
io/async/AsyncSocketException.cpp \
io/async/AsyncSSLSocket.cpp \
io/async/EventBase.cpp \
io/async/EventBaseLocal.cpp \
io/async/EventBaseManager.cpp \
io/async/EventBaseThread.cpp \
io/async/EventHandler.cpp \
io/async/PasswordInFile.cpp \
io/async/Request.cpp \
io/async/SSLContext.cpp \
io/async/SSLOptions.cpp \
io/async/ScopedEventBaseThread.cpp \
io/async/VirtualEventBase.cpp \
io/async/HHWheelTimer.cpp \
io/async/TimeoutManager.cpp \
io/async/test/ScopedBoundPort.cpp \
io/async/test/SocketPair.cpp \
io/async/test/TimeUtil.cpp \
io/async/ssl/OpenSSLUtils.cpp \
io/async/ssl/SSLErrors.cpp \
json.cpp \
json_pointer.cpp \
lang/Assume.cpp \
lang/ColdClass.cpp \
lang/SafeAssert.cpp \
logging/AsyncFileWriter.cpp \
logging/CustomLogFormatter.cpp \
logging/FileHandlerFactory.cpp \
logging/FileWriterFactory.cpp \
logging/GlogStyleFormatter.cpp \
logging/ImmediateFileWriter.cpp \
logging/Init.cpp \
logging/InitWeak.cpp \
logging/LogCategory.cpp \
logging/LogCategoryConfig.cpp \
logging/LogConfig.cpp \
logging/LogConfigParser.cpp \
logging/Logger.cpp \
logging/LoggerDB.cpp \
logging/LogHandlerConfig.cpp \
logging/LogLevel.cpp \
logging/LogMessage.cpp \
logging/LogName.cpp \
logging/LogStream.cpp \
logging/LogStreamProcessor.cpp \
logging/printf.cpp \
logging/RateLimiter.cpp \
logging/StandardLogHandler.cpp \
logging/StandardLogHandlerFactory.cpp \
logging/StreamHandlerFactory.cpp \
logging/xlog.cpp \
detail/MemoryIdler.cpp \
detail/SocketFastOpen.cpp \
MacAddress.cpp \
memory/ThreadCachedArena.cpp \
portability/Dirent.cpp \
portability/Fcntl.cpp \
portability/Libgen.cpp \
portability/Malloc.cpp \
portability/OpenSSL.cpp \
portability/PThread.cpp \
portability/Sockets.cpp \
portability/Stdio.cpp \
portability/Stdlib.cpp \
portability/String.cpp \
portability/SysFile.cpp \
portability/SysMembarrier.cpp \
portability/SysMman.cpp \
portability/SysResource.cpp \
portability/SysStat.cpp \
portability/SysTime.cpp \
portability/SysUio.cpp \
portability/Time.cpp \
portability/Unistd.cpp \
Random.cpp \
ScopeGuard.cpp \
SharedMutex.cpp \
MicroLock.cpp \
Singleton.cpp \
SocketAddress.cpp \
ssl/Init.cpp \
ssl/OpenSSLCertUtils.cpp \
ssl/OpenSSLHash.cpp \
ssl/detail/OpenSSLThreading.cpp \
ssl/detail/SSLSessionImpl.cpp \
stats/BucketedTimeSeries.cpp \
stats/Histogram.cpp \
stats/MultiLevelTimeSeries.cpp \
stats/QuantileEstimator.cpp \
stats/TDigest.cpp \
stats/TimeseriesHistogram.cpp \
stats/detail/DoubleRadixSort.cpp \
synchronization/AsymmetricMemoryBarrier.cpp \
synchronization/Hazptr.cpp \
synchronization/LifoSem.cpp \
synchronization/ParkingLot.cpp \
synchronization/WaitOptions.cpp \
system/MemoryMapping.cpp \
system/Shell.cpp \
system/ThreadName.cpp \
Subprocess.cpp \
TimeoutQueue.cpp \
Uri.cpp \
experimental/ThreadedRepeatingFunctionRunner.cpp \
experimental/bser/Dump.cpp \
experimental/bser/Load.cpp \
experimental/DynamicParser.cpp \
experimental/EnvUtil.cpp \
experimental/FunctionScheduler.cpp \
experimental/io/FsUtil.cpp \
experimental/JemallocNodumpAllocator.cpp \
experimental/JSONSchema.cpp \
experimental/NestedCommandLineApp.cpp \
experimental/observer/detail/Core.cpp \
experimental/observer/detail/ObserverManager.cpp \
experimental/ProgramOptions.cpp \
experimental/Select64.cpp \
experimental/TestUtil.cpp
if HAVE_LINUX
nobase_follyinclude_HEADERS += \
experimental/io/HugePages.h
libfolly_la_SOURCES += \
experimental/io/HugePages.cpp
endif
if !HAVE_WEAK_SYMBOLS
libfollybase_la_SOURCES += memory/detail/MallocImpl.cpp
endif
if HAVE_BOOST_CONTEXT
nobase_follyinclude_HEADERS += \
fibers/AddTasks.h \
fibers/AddTasks-inl.h \
fibers/AtomicBatchDispatcher.h \
fibers/AtomicBatchDispatcher-inl.h \
fibers/Baton.h \
fibers/Baton-inl.h \
fibers/BatchDispatcher.h \
fibers/BoostContextCompatibility.h \
fibers/detail/AtomicBatchDispatcher.h \
fibers/EventBaseLoopController.h \
fibers/EventBaseLoopController-inl.h \
fibers/Fiber.h \
fibers/Fiber-inl.h \
fibers/FiberManager.h \
fibers/FiberManager-inl.h \
fibers/FiberManagerInternal.h \
fibers/FiberManagerInternal-inl.h \
fibers/FiberManagerMap.h \
fibers/ForEach.h \
fibers/ForEach-inl.h \
fibers/GenericBaton.h \
fibers/GuardPageAllocator.h \
fibers/LoopController.h \
fibers/Promise.h \
fibers/Promise-inl.h \
fibers/Semaphore.h \
fibers/SimpleLoopController.h \
fibers/TimedMutex.h \
fibers/TimedMutex-inl.h \
fibers/TimeoutController.h \
fibers/traits.h \
fibers/WhenN.h \
fibers/WhenN-inl.h
libfolly_la_SOURCES += \
fibers/Baton.cpp \
fibers/detail/AtomicBatchDispatcher.cpp \
fibers/Fiber.cpp \
fibers/FiberManager.cpp \
fibers/FiberManagerMap.cpp \
fibers/GuardPageAllocator.cpp \
fibers/Semaphore.cpp \
fibers/TimeoutController.cpp
endif
if USE_SYMBOLIZER
nobase_follyinclude_HEADERS += \
experimental/symbolizer/Elf.h \
experimental/symbolizer/Elf-inl.h \
experimental/symbolizer/ElfCache.h \
experimental/symbolizer/Dwarf.h \
experimental/symbolizer/LineReader.h \
experimental/symbolizer/SignalHandler.h \
experimental/symbolizer/StackTrace.h \
experimental/symbolizer/Symbolizer.h
libfolly_la_SOURCES += \
experimental/symbolizer/Elf.cpp \
experimental/symbolizer/ElfCache.cpp \
experimental/symbolizer/Dwarf.cpp \
experimental/symbolizer/LineReader.cpp \
experimental/symbolizer/SignalHandler.cpp \
experimental/symbolizer/StackTrace.cpp \
experimental/symbolizer/Symbolizer.cpp
endif
if HAVE_VARIABLE_TEMPLATES
libfolly_la_SOURCES += \
Poly.cpp
endif
libfollybasesse42_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
libfollybasesse42_la_CXXFLAGS = -msse4.2 -mpclmul
libfollybase_la_LIBADD = libfollybasesse42.la
libfollybase_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
libfolly_la_LIBADD = libfollybase.la
libfolly_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION) -lssl
if USE_SYMBOLIZER
libfolly_la_LDFLAGS += -lunwind
endif
FingerprintTables.cpp: generate_fingerprint_tables
./generate_fingerprint_tables
CLEANFILES += FingerprintTables.cpp
libfollybenchmark_la_SOURCES = Benchmark.cpp
libfollybenchmark_la_LIBADD = libfolly.la
libfollybenchmark_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
# install pkg-config metadata file
pkgconfigdir = $(libdir)/pkgconfig
nodist_pkgconfig_DATA = libfolly.pc
ACLOCAL_AMFLAGS = -I m4
CPPFLAGS = -I$(top_srcdir)/test/gtest/googletest/include
ldadd = $(top_builddir)/test/libfollytestmain.la
check_PROGRAMS = \
conv_test
TESTS = $(check_PROGRAMS)
conv_test_SOURCES = ConvTest.cpp
conv_test_LDADD = $(ldadd)
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.59)
m4_define([folly_version_str], m4_esyscmd_s([cat VERSION]))
AC_INIT([folly], m4_translit(folly_version_str, [:], [.]), [folly@fb.com])
# We assume all revisions are backwards incompatible.
LT_VERSION=folly_version_str:0
AC_SUBST([LT_VERSION])
#declare pkg-config variables
PKG_VERSION=m4_join([.], m4_reverse(m4_translit(folly_version_str, [:], [,])))
AC_SUBST([PKG_VERSION])
AC_SUBST([PKG_CXXFLAGS])
AC_SUBST([PKG_DEPS])
AC_SUBST([PKG_LIBS])
AC_CONFIG_SRCDIR([Likely.h])
AC_CONFIG_HEADERS([config.h])
AX_PREFIX_CONFIG_H([folly-config.h], [folly], [config.h])
AC_CONFIG_AUX_DIR([build-aux])
AM_INIT_AUTOMAKE([foreign dist-bzip2 nostdinc subdir-objects])
AC_CONFIG_MACRO_DIR([m4])
AC_PROG_INSTALL
AM_PROG_LIBTOOL
AC_LANG([C++])
# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_CXX_COMPILE_STDCXX_1Y
# Be sure to add any -std option to CXXFLAGS before we invoke any
# AC_COMPILE_IFELSE() or similar macros. Any such macros that are invoked
# before we update CXXFLAGS will not be run with the same options that we use
# during the real build.
STD=""
if test "x$ac_cv_cxx_compile_cxx1y_cxx" = xyes; then
STD="-std=c++1y"
fi
if test "x$ac_cv_cxx_compile_cxx1y_gxx" = xyes; then
STD="-std=gnu++1y"
fi
CXXFLAGS="$STD $CXXFLAGS"
# expose required -std option via pkg-config
PKG_CXXFLAGS=$STD
# See if -Wunknown-warning-option is supported
AC_MSG_CHECKING(
[whether -Wunknown-warning-option is supported])
AC_CACHE_VAL([folly_cv_cxx_unknown_warning_option_support], [
folly_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]], [[]])],
[
# The compiler didn't completely error out on -Werror=unknown-warning-option
CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option -Wthis-is-an-unknown-option-that-should-error"
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]], [[]])],
[folly_cv_cxx_unknown_warning_option_support=no],
[folly_cv_cxx_unknown_warning_option_support=yes])
],
[folly_cv_cxx_unknown_warning_option_support=no])
CXXFLAGS="$folly_save_CXXFLAGS"])
AC_MSG_RESULT([$folly_cv_cxx_unknown_warning_option_support])
# See if -Wshadow-local and -Wshadow-compatible-local are supported
AC_MSG_CHECKING(
[whether -Wshadow-local and -Wshadow-compatible-local are supported])
AC_CACHE_VAL([folly_cv_cxx_shadow_local_support], [
folly_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -Wshadow-local -Wshadow-compatible-local"
if test "$folly_cv_cxx_unknown_warning_option_support" = yes; then
CXXFLAGS="$CXXFLAGS -Werror=unknown-warning-option"
fi
AC_COMPILE_IFELSE(
[AC_LANG_PROGRAM([[]], [[]])],
[folly_cv_cxx_shadow_local_support=yes],
[folly_cv_cxx_shadow_local_support=no])
CXXFLAGS="$folly_save_CXXFLAGS"])
AC_MSG_RESULT([$folly_cv_cxx_shadow_local_support])
if test "$folly_cv_cxx_shadow_local_support" = yes; then
AC_DEFINE([HAVE_SHADOW_LOCAL_WARNINGS], [1],
[Define if both -Wshadow-local and -Wshadow-compatible-local are supported.])
fi
# Checks for glog and gflags
# There are no symbols with C linkage, so we do a try-run
AC_HAVE_LIBRARY([gflags],[],[AC_MSG_ERROR(
[Please install google-gflags library])])
AC_CACHE_CHECK(
[for gflags viability],
[folly_cv_prog_cc_gflags],
[AC_RUN_IFELSE(
[AC_LANG_SOURCE[
#include <gflags/gflags.h>
DEFINE_bool(folly_truthy, true, "Sample truthy flag");
DEFINE_bool(folly_falsey, false, "Sample falsey flag");
int main(int argc, char** argv) {
return (FLAGS_folly_truthy && !FLAGS_folly_falsey) ? 0 : 1;
}
]],
[folly_cv_prog_cc_gflags=yes],
[folly_cv_prog_cc_gflags=no]
)]
)
if test "$folly_cv_prog_cc_gflags" != "yes"; then
AC_MSG_ERROR(["gflags invalid, see config.log for details"])
fi
FB_CHECK_PKG_CONFIG([GFLAGS], [gflags])
AC_HAVE_LIBRARY([glog],[],[AC_MSG_ERROR(
[Please install google-glog library])])
AC_CACHE_CHECK(
[for glog viability],
[folly_cv_prog_cc_glog],
[AC_RUN_IFELSE(
[AC_LANG_SOURCE[
#include <glog/logging.h>
int main(int argc, char** argv) {
google::InitGoogleLogging(argv[0]);
google::ShutdownGoogleLogging();
return 0;
}
]],
[folly_cv_prog_cc_glog=yes],
[folly_cv_prog_cc_glog=no]
)]
)
if test "$folly_cv_prog_cc_glog" != "yes"; then
AC_MSG_ERROR(["libglog invalid, see config.log for details"])
fi
FB_CHECK_PKG_CONFIG([GLOG], [libglog])
AS_IF(
[test "x$OPENSSL_INCLUDES" = "x"],
[
AX_CHECK_OPENSSL([], [AC_MSG_ERROR(["Error: libssl required"])])
],
[
# AX_CHECK_OPENSSL doesn't seem to play nice with builds started
# via build/bootstrap-osx-homebrew.sh
AC_MSG_WARN(["Using existing OpenSSL flags from environment."])
PKG_CXXFLAGS="$PKG_CXXFLAGS $OPENSSL_INCLUDES"
]
)
FB_CHECK_PKG_CONFIG([OPENSSL], [openssl])
# check for boost libs
AX_BOOST_BASE([1.51.0], [], [AC_MSG_ERROR(
[Please install boost >= 1.51.0 (context, thread, program_options, regex, system and chrono)])])
AX_BOOST_CONTEXT
AX_BOOST_PROGRAM_OPTIONS
AX_BOOST_THREAD
AX_BOOST_REGEX
AX_BOOST_SYSTEM
AX_BOOST_FILESYSTEM
AX_BOOST_CHRONO
# Check for python interpreter
AM_PATH_PYTHON
# Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([features.h malloc.h bits/functexcept.h bits/c++config.h])
AC_CHECK_HEADER(double-conversion/double-conversion.h, [], [AC_MSG_ERROR(
[Couldn't find double-conversion.h, please download from \
https://github.com/google/double-conversion/])], [])
AC_CHECK_LIB([double-conversion],[ceil],[],[AC_MSG_ERROR(
[Please install double-conversion library])])
AC_CHECK_LIB([event], [event_set], [], [AC_MSG_ERROR([Unable to find libevent])])
FB_CHECK_PKG_CONFIG([EVENT], [libevent])
AC_ARG_WITH([jemalloc], [
--with-jemalloc Whether to make folly jemalloc aware
],[
AC_CHECK_LIB([jemalloc], [xallocx],[
AC_DEFINE([USE_JEMALLOC], [1], [Enable jemalloc])
],[
AC_MSG_ERROR([--with-jemalloc requested, but jemalloc not found])
])
])
# Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
AC_C_INLINE
AC_TYPE_SIZE_T
AC_HEADER_TIME
AC_C_VOLATILE
AC_CHECK_TYPE([__int128], [folly_cv_prog_cc_int128=yes],
[folly_cv_prog_cc_int128=no])
if test "$folly_cv_prog_cc_int128" = "yes"; then
AC_DEFINE([HAVE_INT128_T], [1], [Define if we have __int128])
AC_CACHE_CHECK(
[for __int128 type traits],
[folly_cv_prog_cc_int128traits],
[AC_COMPILE_IFELSE(
[AC_LANG_SOURCE([[
#include <type_traits>
static_assert(
::std::is_same<::std::make_signed<unsigned __int128>::type, __int128>::value,
"signed form of \`unsigned __uint128\` must be \`__int128\`.");
]])],
[folly_cv_prog_cc_int128traits=yes],
[folly_cv_prog_cc_int128traits=no])
])
if test "$folly_cv_prog_cc_int128traits" = "no"; then
AC_DEFINE([SUPPLY_MISSING_INT128_TRAITS], [1], [Define if we need the standard integer traits defined for the type `__int128'.])
fi
fi
AC_CHECK_TYPES([pthread_spinlock_t])
AC_CACHE_CHECK(
[for ifunc support],
[folly_cv_prog_cc_ifunc],
[AC_COMPILE_IFELSE(
[AC_LANG_SOURCE[
#pragma GCC diagnostic error "-Wattributes"
extern "C" void (*test_ifunc(void))() { return 0; }
void func() __attribute__((ifunc("test_ifunc")));]
],
[folly_cv_prog_cc_ifunc=yes],
[folly_cv_prog_cc_ifunc=no])])
if test "$folly_cv_prog_cc_ifunc" = "yes"; then
AC_DEFINE([HAVE_IFUNC], [1], [Define to 1 if the compiler supports ifunc])
fi
AC_CACHE_CHECK(
[for final and override support],
[folly_cv_c_final_override],
[AC_COMPILE_IFELSE(
[AC_LANG_SOURCE[class C { virtual void f() final {} virtual void g() {} };
class D : public C { virtual void g() override {} };]],
[folly_cv_c_final_override=yes],
[folly_cv_c_final_override=no])])
if test "$folly_cv_c_final_override" = "yes"; then
final_val=final
override_val=override
else
final_val=
override_val=
fi
AC_DEFINE_UNQUOTED(
[FINAL], [$final_val],
[Define to "final" if the compiler supports C++11 "final"])
AC_DEFINE_UNQUOTED(
[OVERRIDE], [$override_val],
[Define to "override" if the compiler supports C++11 "override"])
AC_CACHE_CHECK(
[for libc++],
[folly_cv_lib_libcpp],
[AC_COMPILE_IFELSE(
[AC_LANG_SOURCE[
#include <type_traits>
#if !_LIBCPP_VERSION
#error No libc++
#endif
void func() {}]
],
[folly_cv_lib_libcpp=yes],
[folly_cv_lib_libcpp=no])])
if test "$folly_cv_lib_libcpp" = yes; then
AC_DEFINE([USE_LIBCPP], [1], [Define to 1 if we are using libc++.])
fi
AC_CACHE_CHECK(
[for c++11 atomic support without GNU Atomic library],
[folly_cv_lib_libatomic],
[AC_LINK_IFELSE(
[AC_LANG_SOURCE[
#include <atomic>
int main() {
struct Test { int val; };
std::atomic<Test> s;
s.is_lock_free();
}
]],
[folly_cv_lib_libatomic=yes],
[folly_cv_lib_libatomic=no])])
if test "$folly_cv_lib_libatomic" = no; then
AC_HAVE_LIBRARY([atomic],[],[AC_MSG_ERROR(
[Please install the GNU Atomic library])])
fi
if test "$build_os" = "linux-gnu"; then
AC_HAVE_LIBRARY([dl],[],[AC_MSG_ERROR(
[Folly depends on libdl])])
fi
AC_CACHE_CHECK(
[for liblinux-vdso support],
[folly_cv_lib_liblinux_vdso],
[AC_RUN_IFELSE(
[AC_LANG_SOURCE[
#include <dlfcn.h>
int main() {
void *h = dlopen("linux-vdso.so.1", RTLD_LAZY | RTLD_LOCAL | RTLD_NOLOAD);
if (h == nullptr) {
return -1;
}
dlclose(h);
return 0;
}
]],
[folly_cv_lib_liblinux_vdso=yes],
[folly_cv_lib_liblinux_vdso=no])])
if test "$folly_cv_lib_liblinux_vdso" = yes; then
AC_DEFINE([HAVE_LINUX_VDSO], [1], [Define to 1 if liblinux-vdso is available])
fi
AC_DEFINE([HAVE_PTHREAD], [1], [Define to 1 if pthread is avaliable])
AC_CACHE_CHECK(
[for usable std::is_trivially_copyable],
[folly_cv_decl_std_is_trivially_copyable],
[AC_COMPILE_IFELSE(
[AC_LANG_SOURCE[
#include <type_traits>
const bool val = std::is_trivially_copyable<bool>::value;]
],
[folly_cv_decl_std_is_trivially_copyable=yes],
[folly_cv_decl_std_is_trivially_copyable=no])])
if test "$folly_cv_decl_std_is_trivially_copyable" = yes; then
AC_DEFINE([HAVE_STD__IS_TRIVIALLY_COPYABLE], [1],
[Define to 1 if we have a usable std::is_trivially_copyable<T>
implementation.])
fi
AC_CACHE_CHECK(
[gflags namespace],
[folly_cv_decl_gflags_namespace],
[AC_COMPILE_IFELSE(
[AC_LANG_SOURCE[
#include <gflags/gflags.h>
void foo() { gflags::GetArgv(); }]
],
[folly_cv_decl_gflags_namespace=gflags],
[AC_COMPILE_IFELSE(
[AC_LANG_SOURCE[
#include <gflags/gflags.h>
void foo() { google::GetArgv(); }]
],
[folly_cv_decl_gflags_namespace=google],
[folly_cv_decl_gflags_namespace=error])])])
if test "$folly_cv_decl_gflags_namespace" = error; then
AC_MSG_ERROR([Cannot determine gflags namespace])
else
AC_DEFINE_UNQUOTED(
[GFLAGS_NAMESPACE], [$folly_cv_decl_gflags_namespace],
[Define to gflags namespace (usually "google" or "gflags")])
if test "$folly_cv_decl_gflags_namespace" != gflags; then
AC_DEFINE([UNUSUAL_GFLAGS_NAMESPACE], [1],
[Define to 1 if the gflags namespace is not "gflags"])
fi
fi
# Figure out if we support weak symbols. If not, we will link in some null
# stubs for functions that would otherwise be weak.
AC_CACHE_CHECK(
[for weak symbol support],
[folly_cv_prog_cc_weak_symbols],
[AC_LINK_IFELSE(
[AC_LANG_SOURCE[
extern "C" void configure_link_extern_weak_test() __attribute__((weak));
int main(int argc, char** argv) {
return configure_link_extern_weak_test == nullptr;
}]],
[folly_cv_prog_cc_weak_symbols="yes"],
[folly_cv_prog_cc_weak_symbols="no"])])
if test "$folly_cv_prog_cc_weak_symbols" = yes; then
AC_DEFINE([HAVE_WEAK_SYMBOLS], [1],
[Define to 1 if the linker supports weak symbols.])
fi
# Figure out if we support wchar well
AC_CACHE_CHECK(
[for wchar support],
[folly_cv_prog_cc_wchar_support],
[AC_RUN_IFELSE(
[AC_LANG_SOURCE[
#include <cstddef>
#include <cwchar>
int main(int argc, char** argv) {
return wcstol(L"01", nullptr, 10) == 1 ? 0 : 1;
}
]],
[folly_cv_prog_cc_wchar_support=yes],
[folly_cv_prog_cc_wchar_support=no])])
if test "$folly_cv_prog_cc_wchar_support" = "yes"; then
AC_DEFINE([HAVE_WCHAR_SUPPORT], [1], [Define to 1 if the libc supports wchar well])
fi
# Figure out whether the architecture supports unaligned accesses
AC_CACHE_CHECK(
[for unaligned access support],
[folly_cv_prog_cc_unaligned_access],
[AC_RUN_IFELSE(
[AC_LANG_SOURCE[
int main(int argc, char** argv) {
char buf[64] = {0};
unsigned long *ptr = (unsigned long *)(buf + 1);
*ptr = 0xdeadbeef;
return (*ptr & 0xff) == 0xef ? 0 : 1;
}
]],
[folly_cv_prog_cc_unaligned_access=yes],
[folly_cv_prog_cc_unaligned_access=no])])
if test "$folly_cv_prog_cc_unaligned_access" = "yes"; then
AC_DEFINE([HAVE_UNALIGNED_ACCESS], [1], [Define to 1 if the architecture allows unaligned accesses])
fi
AC_CACHE_CHECK(
[for vsnprintf reporting bad format strings],
[folly_cv_prog_vsnprintf_bad_format],
[AC_RUN_IFELSE(
[AC_LANG_SOURCE[
#include <stdio.h>
int main(int argc, char** argv) {
char buf[256];
return vsnprintf(buf, sizeof(buf), "%", 1) < 0 ? 0 : 1;
}]],
[folly_cv_prog_vsnprintf_bad_format="yes"],
[folly_cv_prog_vsnprintf_bad_format="no"])])
if test "$folly_cv_prog_vsnprintf_bad_format" = yes; then
AC_DEFINE([HAVE_VSNPRINTF_ERRORS], [1],
[Define to 1 if the vsnprintf supports returning errors on bad format strings.])
fi
AC_SEARCH_LIBS([cplus_demangle_v3_callback], [iberty_pic iberty])
if test "$ac_cv_search_cplus_demangle_v3_callback" != "no" ; then
AC_DEFINE([HAVE_CPLUS_DEMANGLE_V3_CALLBACK], [1],
[Define to 1 if we have cplus_demangle_v3_callback.])
fi
# Check for clock_gettime(2). This is not in an AC_CHECK_FUNCS() because we
# want to link with librt if necessary.
AC_SEARCH_LIBS([clock_gettime], [rt],
AC_DEFINE(
[HAVE_CLOCK_GETTIME],
[1],
[Define to 1 if we support clock_gettime(2).]),
[])
# Check for pthread_atfork(3). This is not in an AC_CHECK_FUNCS() because we
# want to include pthread.h if necessary.
AC_CACHE_CHECK(
[for pthread_atfork support],
[folly_cv_prog_cc_pthread_atfork],
[AC_COMPILE_IFELSE(
[AC_LANG_SOURCE[
#include <pthread.h>
void func() {pthread_atfork(NULL, NULL, NULL);}]
],
[folly_cv_prog_cc_pthread_atfork=yes],
[folly_cv_prog_cc_pthread_atfork=no])])
if test "$folly_cv_prog_cc_pthread_atfork" = "yes"; then
AC_DEFINE([HAVE_PTHREAD_ATFORK], [1], [Define to 1 if the compiler supports pthread_atfork])
fi
# Check for XSI-compatible strerror_r as default implementation
AC_CACHE_CHECK(
[for XSI style strerror_r support],
[folly_cv_prog_cc_xsi_strerror_r],
[AC_RUN_IFELSE(
[AC_LANG_SOURCE[
#include <string.h>
#include <errno.h>
int main(int argc, char** argv) {
char buf[1024];
buf[0] = 0;
int ret = strerror_r(ENOMEM, buf, sizeof(buf));
return ret;
}
]],
[folly_cv_prog_cc_xsi_strerror_r=yes],
[folly_cv_prog_cc_xsi_strerror_r=no])])
if test "$folly_cv_prog_cc_xsi_strerror_r" = "yes"; then
AC_DEFINE([HAVE_XSI_STRERROR_R], [1], [Define to 1 if the runtime supports XSI-style strerror_r])
fi
AC_CACHE_CHECK(
[for ext/random and __gnu_cxx::sfmt19937],
[folly_cv_prog_cc_have_extrandom_sfmt19937],
[AC_COMPILE_IFELSE(
[AC_LANG_SOURCE[
#include <ext/random>
int main(int argc, char** argv) {
__gnu_cxx::sfmt19937 rng;
return 0;
}
]],
[folly_cv_prog_cc_have_extrandom_sfmt19937=yes],
[folly_cv_prog_cc_have_extrandom_sfmt19937=no])])
AC_CACHE_CHECK(
[for VLA (variable-length array) support],
[folly_cv_prog_cc_have_vla],
[AC_COMPILE_IFELSE(
[AC_LANG_SOURCE[
int main(int argc, char** argv) {
unsigned size = argc;
char data[size];
return 0;
}
]],
[folly_cv_prog_cc_have_vla=yes],
[folly_cv_prog_cc_have_vla=no])])
test "$folly_cv_prog_cc_have_vla" = yes && have_vla=1 || have_vla=0
AC_DEFINE_UNQUOTED(
[HAVE_VLA],
[$have_vla],
[Define to 1 if the compiler has VLA (variable-length array) support,
otherwise define to 0])
AC_CACHE_CHECK(
[for variable template support],
[folly_cv_prog_cc_have_variable_templates],
[AC_COMPILE_IFELSE(
[AC_LANG_SOURCE[
template <class> constexpr bool g = true;
int main() {}
]],
[folly_cv_prog_cc_have_variable_templates=yes],
[folly_cv_prog_cc_have_variable_templates=no])])
AM_CONDITIONAL(
[HAVE_VARIABLE_TEMPLATES],
[test "x${folly_cv_prog_cc_have_variable_templates}" = "xyes"],
[Define to 1 if the compiler supports variable templates])
# Checks for library functions.
AC_CHECK_FUNCS([malloc_size \
malloc_usable_size \
memrchr \
pipe2 \
preadv \
pwritev \
])
AC_CHECK_HEADER([lz4.h], AC_CHECK_LIB([lz4], [LZ4_decompress_safe]))
AC_CHECK_HEADER([snappy.h], AC_CHECK_LIB([snappy], [main]))
AC_CHECK_HEADER([zlib.h], AC_CHECK_LIB([z], [main]))
AC_CHECK_HEADER([lzma.h], AC_CHECK_LIB([lzma], [main]))
AC_CHECK_HEADER([zstd.h], AC_CHECK_LIB([zstd], [ZSTD_compressStream]))
AC_CHECK_HEADER([bzlib.h], AC_CHECK_LIB([bz2], [main]))
AC_CHECK_HEADER([linux/membarrier.h], AC_DEFINE([HAVE_LINUX_MEMBARRIER_H], [1], [Define to 1 if membarrier.h is available]))
AC_ARG_ENABLE([follytestmain],
AS_HELP_STRING([--enable-follytestmain], [enables using main function from folly for tests]),
[use_follytestmain=${enableval}], [use_follytestmain=yes])
# libdwarf used to install in /usr/include, now installs in /usr/include/libdwarf.
have_libdwarf=no
AC_CHECK_HEADERS([libdwarf/dwarf.h dwarf.h], [have_libdwarf=yes])
AC_ARG_ENABLE([mobile],
AS_HELP_STRING([--enable-mobile],
[enables using main function from folly for tests]),
[mobile=${enableval}], [mobile=no])
AS_IF([test "x${mobile}" = "xyes"], [
AC_DEFINE([MOBILE], [1],
[Define to 1 for compiler guards for mobile targets.])
])
AC_ARG_ENABLE([exception-tracer],
AS_HELP_STRING([--enable-exception-tracer], [enables building exception tracer]),
[build_exception_tracer=${enableval}], [build_exception_tracer=no])
AC_ARG_ENABLE([symbolizer],
AS_HELP_STRING([--enable-symbolizer], [try to build symbolizer if possible]),
[folly_try_use_symbolizer=${enableval}], [folly_try_use_symbolizer=yes])
folly_use_symbolizer=no
if test "$folly_try_use_symbolizer" = yes; then
if test "$build_os" = "linux-gnu" && test "$have_libdwarf" = yes; then
AC_CHECK_HEADER(
[elf.h],
AC_CHECK_LIB([unwind], [backtrace], [folly_use_symbolizer=yes]),
)
fi
fi
if test "$folly_use_symbolizer" = yes; then
AC_DEFINE([USE_SYMBOLIZER], [1], [Define to 1 if we should use the symbolizer in init])
fi
# Include directory that contains "folly" so #include <folly/Foo.h> works
AM_CPPFLAGS='-I$(top_srcdir)/..'
AM_CPPFLAGS="$AM_CPPFLAGS $BOOST_CPPFLAGS $OPENSSL_INCLUDES"
AM_LDFLAGS="$AM_LDFLAGS $BOOST_CONTEXT_LIB $BOOST_PROGRAM_OPTIONS_LIB"
AM_LDFLAGS="$AM_LDFLAGS $BOOST_THREAD_LIB $BOOST_FILESYSTEM_LIB"
AM_LDFLAGS="$AM_LDFLAGS $BOOST_SYSTEM_LIB $BOOST_REGEX_LIB -lpthread"
AM_LDFLAGS="$AM_LDFLAGS $BOOST_CHRONO_LIB"
AM_LDFLAGS="$AM_LDFLAGS $OPENSSL_LDFLAGS $OPENSSL_LIBS"
AC_SUBST([AM_CPPFLAGS])
AC_SUBST([AM_LDFLAGS])
AM_CONDITIONAL([HAVE_STD_THREAD], [test "$ac_cv_header_features" = "yes"])
AM_CONDITIONAL([HAVE_X86_64], [test "$build_cpu" = "x86_64"])
AM_CONDITIONAL([HAVE_PPC64], [test "$build_cpu" = "powerpc64le"])
AM_CONDITIONAL([RUN_ARCH_SPECIFIC_TESTS], [test "$build_cpu" = "x86_64" || test "$build_cpu" = "powerpc64le"])
AM_CONDITIONAL([HAVE_LINUX], [test "$build_os" == "linux-gnu"])
AM_CONDITIONAL([HAVE_WEAK_SYMBOLS],
[test "$folly_cv_prog_cc_weak_symbols" = "yes"])
AM_CONDITIONAL([HAVE_BITS_FUNCTEXCEPT_H], [test "$ac_cv_header_bits_functexcept_h" = "yes"])
AM_CONDITIONAL([HAVE_EXTRANDOM_SFMT19937],
[test "$folly_cv_prog_cc_have_extrandom_sfmt19937" = "yes"])
AM_CONDITIONAL([FOLLY_TESTMAIN], [test "x${use_follytestmain}" = "xyes"])
AM_CONDITIONAL([HAVE_LIBDWARF], [test "x${have_libdwarf}" = "xyes"])
AM_CONDITIONAL([HAVE_BOOST_CONTEXT], [test "x${ax_cv_boost_context}" = "xyes"])
AM_CONDITIONAL([EXCEPTION_TRACER], [test "x${build_exception_tracer}" = "xyes"])
AM_CONDITIONAL([USE_SYMBOLIZER], [test "x${folly_use_symbolizer}" = "xyes"])
# remove pkg-config deps from dependent libraries
# (at least for pkg-config file purposes)
FB_FILTER_PKG_LIBS([$AM_LDFLAGS $LIBS])
# Output
AC_CONFIG_FILES([Makefile
chrono/test/Makefile
io/test/Makefile
libfolly.pc
test/Makefile
test/function_benchmark/Makefile
experimental/Makefile
experimental/io/test/Makefile
experimental/symbolizer/Makefile
init/Makefile
logging/example/Makefile
stats/test/Makefile])
AM_COND_IF([EXCEPTION_TRACER],
[AC_CONFIG_FILES([experimental/exception_tracer/Makefile])])
AC_OUTPUT
if USE_SYMBOLIZER
MAYBE_SYMBOLIZER = symbolizer
endif
if EXCEPTION_TRACER
MAYBE_EXCEPTION_TRACER = exception_tracer
endif
SUBDIRS = io/test $(MAYBE_SYMBOLIZER) $(MAYBE_EXCEPTION_TRACER)
SUBDIRS = .
lib_LTLIBRARIES = libfollyexception_tracer.la
libfollyexception_tracer_la_SOURCES = \
ExceptionCounterLib.cpp \
ExceptionStackTraceLib.cpp \
ExceptionTracer.cpp \
ExceptionTracerLib.cpp \
StackTrace.cpp
libfollyexception_tracer_la_LIBADD = $(top_builddir)/libfolly.la $(top_builddir)/experimental/symbolizer/libfollysymbolizer.la
libfollyexception_tracer_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
ACLOCAL_AMFLAGS = -I m4
CPPFLAGS = -I$(top_srcdir)/test/gtest/googletest/include
ldadd = $(top_builddir)/test/libfollytestmain.la
check_PROGRAMS = \
fs_util_test
TESTS = $(check_PROGRAMS)
fs_util_test_SOURCES = FsUtilTest.cpp
fs_util_test_LDADD = $(ldadd)
SUBDIRS = .
lib_LTLIBRARIES = libfollysymbolizer.la
libfollysymbolizer_la_SOURCES = \
Elf.cpp \
ElfCache.cpp \
Dwarf.cpp \
LineReader.cpp \
SignalHandler.cpp \
StackTrace.cpp \
Symbolizer.cpp
libfollysymbolizer_la_LIBADD = $(top_builddir)/libfolly.la
libfollysymbolizer_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
SUBDIRS = .
lib_LTLIBRARIES = libfollyinit.la
libfollyinit_la_SOURCES = Init.cpp
libfollyinit_la_LIBADD = $(top_builddir)/libfolly.la
libfollyinit_la_LDFLAGS = $(AM_LDFLAGS) -version-info $(LT_VERSION)
ACLOCAL_AMFLAGS = -I m4
CPPFLAGS = -I$(top_srcdir)/test/gtest/googletest/include
ldadd = $(top_builddir)/test/libfollytestmain.la
# compression_test takes several minutes, so it's not run automatically.
TESTS = \
iobuf_test \
iobuf_cursor_test \
iobuf_queue_test \
record_io_test \
shutdown_socket_set_test
check_PROGRAMS = $(TESTS) \
compression_test
iobuf_test_SOURCES = IOBufTest.cpp
iobuf_test_LDADD = $(ldadd)
iobuf_cursor_test_SOURCES = IOBufCursorTest.cpp
iobuf_cursor_test_LDADD = $(ldadd)
compression_test_SOURCES = ../../compression/test/CompressionTest.cpp
compression_test_LDADD = $(top_builddir)/libfolly.la \
$(top_builddir)/test/libgtest.la \
$(top_builddir)/libfollybenchmark.la
iobuf_queue_test_SOURCES = IOBufQueueTest.cpp
iobuf_queue_test_LDADD = $(ldadd)
record_io_test_SOURCES = RecordIOTest.cpp
record_io_test_LDADD = $(ldadd)
shutdown_socket_set_test_SOURCES = ShutdownSocketSetTest.cpp
shutdown_socket_set_test_LDADD = $(ldadd)
noinst_PROGRAMS = logging_example
noinst_LTLIBRARIES = libfollylogging_example.la
logging_example_SOURCES = main.cpp
logging_example_LDADD = libfollylogging_example.la
libfollylogging_example_la_SOURCES = lib.cpp
libfollylogging_example_la_LIBADD = \
$(top_builddir)/libfolly.la
# ===========================================================================
# http://autoconf-archive.cryp.to/ac_cxx_compile_stdcxx_0x.html
# ===========================================================================
#
# SYNOPSIS
#
# AC_CXX_COMPILE_STDCXX_1Y
#
# DESCRIPTION
#
# Check for baseline language coverage in the compiler for the C++1y
# standard.
#
# LAST MODIFICATION
#
# 2008-04-17
#
# COPYLEFT
#
# Copyright (c) 2008 Benjamin Kosnik <bkoz@redhat.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.
AC_DEFUN([AC_CXX_COMPILE_STDCXX_1Y], [
AC_CACHE_CHECK(if g++ supports C++1y features without additional flags,
ac_cv_cxx_compile_cxx1y_native,
[AC_LANG_SAVE
AC_LANG_CPLUSPLUS
AC_TRY_COMPILE([
template <typename T>
struct check
{
static_assert(sizeof(int) <= sizeof(T), "not big enough");
};
typedef check<check<bool>> right_angle_brackets;
int a;
decltype(a) b;
auto f() {
int x = 0b01001;
return x;
}
typedef check<int> check_type;
check_type c;
check_type&& cr = static_cast<check_type&&>(c);],,
ac_cv_cxx_compile_cxx1y_native=yes, ac_cv_cxx_compile_cxx1y_native=no)
AC_LANG_RESTORE
])
AC_CACHE_CHECK(if g++ supports C++1y features with -std=c++1y,
ac_cv_cxx_compile_cxx1y_cxx,
[AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -std=c++1y"
AC_TRY_COMPILE([
template <typename T>
struct check
{
static_assert(sizeof(int) <= sizeof(T), "not big enough");
};
typedef check<check<bool>> right_angle_brackets;
int a;
decltype(a) b;
auto f() {
int x = 0b01001;
return x;
}
typedef check<int> check_type;
check_type c;
check_type&& cr = static_cast<check_type&&>(c);],,
ac_cv_cxx_compile_cxx1y_cxx=yes, ac_cv_cxx_compile_cxx1y_cxx=no)
CXXFLAGS="$ac_save_CXXFLAGS"
AC_LANG_RESTORE
])
AC_CACHE_CHECK(if g++ supports C++1y features with -std=gnu++1y,
ac_cv_cxx_compile_cxx1y_gxx,
[AC_LANG_SAVE
AC_LANG_CPLUSPLUS
ac_save_CXXFLAGS="$CXXFLAGS"
CXXFLAGS="$CXXFLAGS -std=gnu++1y"
AC_TRY_COMPILE([
template <typename T>
struct check
{
static_assert(sizeof(int) <= sizeof(T), "not big enough");
};
typedef check<check<bool>> right_angle_brackets;
int a;
decltype(a) b;
auto f() {
int x = 0b01001;
return x;
}
typedef check<int> check_type;
check_type c;
check_type&& cr = static_cast<check_type&&>(c);],,
ac_cv_cxx_compile_cxx1y_gxx=yes, ac_cv_cxx_compile_cxx1y_gxx=no)
CXXFLAGS="$ac_save_CXXFLAGS"
AC_LANG_RESTORE
])
if test "$ac_cv_cxx_compile_cxx1y_native" = yes ||
test "$ac_cv_cxx_compile_cxx1y_cxx" = yes ||
test "$ac_cv_cxx_compile_cxx1y_gxx" = yes; then
AC_DEFINE(HAVE_STDCXX_1Y,,[Define if g++ supports C++1y features. ])
else
AC_MSG_ERROR([Could not find cxx1y support in g++])
fi
])
# ===========================================================================
# 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
])
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_boost_chrono.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_BOOST_CHRONO
#
# 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_CHRONO_LIB)
#
# And sets:
#
# HAVE_BOOST_CHRONO
#
# LICENSE
#
# Copyright (c) 2012 Xiyue Deng <manphiz@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 1
AC_DEFUN([AX_BOOST_CHRONO],
[
AC_ARG_WITH([boost-chrono],
AS_HELP_STRING([--with-boost-chrono@<:@=special-lib@:>@],
[use the Chrono library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-chrono=boost_chrono-gcc-mt ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_chrono_lib=""
else
want_boost="yes"
ax_boost_user_chrono_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::Chrono library is available,
ax_cv_boost_chrono,
[AC_LANG_PUSH([C++])
CXXFLAGS_SAVE=$CXXFLAGS
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/chrono.hpp>]],
[[boost::chrono::system_clock::time_point time;]])],
ax_cv_boost_chrono=yes, ax_cv_boost_chrono=no)
CXXFLAGS=$CXXFLAGS_SAVE
AC_LANG_POP([C++])
])
if test "x$ax_cv_boost_chrono" = "xyes"; then
AC_SUBST(BOOST_CPPFLAGS)
AC_DEFINE(HAVE_BOOST_CHRONO,,[define if the Boost::Chrono library is available])
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
LDFLAGS_SAVE=$LDFLAGS
if test "x$ax_boost_user_chrono_lib" = "x"; then
for libextension in `ls $BOOSTLIBDIR/libboost_chrono*.so* $BOOSTLIBDIR/libboost_chrono*.dylib* $BOOSTLIBDIR/libboost_chrono*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_chrono.*\)\.so.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_chrono.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit,
[BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
[link_chrono="no"])
done
if test "x$link_chrono" != "xyes"; then
for libextension in `ls $BOOSTLIBDIR/boost_chrono*.dll* $BOOSTLIBDIR/boost_chrono*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_chrono.*\)\.dll.*$;\1;' -e 's;^\(boost_chrono.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit,
[BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
[link_chrono="no"])
done
fi
else
for ax_lib in $ax_boost_user_chrono_lib boost_chrono-$ax_boost_user_chrono_lib; do
AC_CHECK_LIB($ax_lib, exit,
[BOOST_CHRONO_LIB="-l$ax_lib"; AC_SUBST(BOOST_CHRONO_LIB) link_chrono="yes"; break],
[link_chrono="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_chrono" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_boost_context.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_BOOST_CONTEXT
#
# DESCRIPTION
#
# Test for Context 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_CONTEXT_LIB)
#
# And sets:
#
# HAVE_BOOST_CONTEXT
#
# LICENSE
#
# Copyright (c) 2008 Thomas Porschberg <thomas@randspringer.de>
# Copyright (c) 2008 Michael Tindal
# Copyright (c) 2013 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 1
AC_DEFUN([AX_BOOST_CONTEXT],
[
AC_ARG_WITH([boost-context],
AS_HELP_STRING([--with-boost-context@<:@=special-lib@:>@],
[use the Context library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-context=boost_context-gcc-mt ]), [
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_context_lib=""
else
want_boost="yes"
ax_boost_user_context_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::Context library is available,
ax_cv_boost_context,
[AC_LANG_PUSH([C++])
CXXFLAGS_SAVE=$CXXFLAGS
AC_COMPILE_IFELSE([AC_LANG_PROGRAM(
[[@%:@include <boost/version.hpp>
#if BOOST_VERSION >= 106100
#include <boost/context/detail/fcontext.hpp>
#else
#include <boost/context/fcontext.hpp>
#endif
]],
[[#if BOOST_VERSION >= 106100
boost::context::detail::fcontext_t fc = boost::context::detail::make_fcontext(0, 0, 0);
#elif BOOST_VERSION >= 105600
boost::context::fcontext_t fc = boost::context::make_fcontext(0, 0, 0);
#else
boost::context::fcontext_t* fc = boost::context::make_fcontext(0, 0, 0);
#endif
]]
)],
ax_cv_boost_context=yes, ax_cv_boost_context=no)
CXXFLAGS=$CXXFLAGS_SAVE
AC_LANG_POP([C++])
])
if test "x$ax_cv_boost_context" = "xyes"; then
AC_SUBST(BOOST_CPPFLAGS)
AC_DEFINE(HAVE_BOOST_CONTEXT,,[define if the Boost::Context library is available])
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
if test "x$ax_boost_user_context_lib" = "x"; then
for libextension in `ls $BOOSTLIBDIR/libboost_context*.so* $BOOSTLIBDIR/libboost_context*.dylib* $BOOSTLIBDIR/libboost_context*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^lib\(boost_context.*\)\.so.*$;\1;' -e 's;^lib\(boost_context.*\)\.dylib.*$;\1;' -e 's;^lib\(boost_context.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit,
[BOOST_CONTEXT_LIB="-l$ax_lib"; AC_SUBST(BOOST_CONTEXT_LIB) link_context="yes"; break],
[link_context="no"])
done
if test "x$link_context" != "xyes"; then
for libextension in `ls $BOOSTLIBDIR/boost_context*.dll* $BOOSTLIBDIR/boost_context*.a* 2>/dev/null | sed 's,.*/,,' | sed -e 's;^\(boost_context.*\)\.dll.*$;\1;' -e 's;^\(boost_context.*\)\.a.*$;\1;'` ; do
ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit,
[BOOST_CONTEXT_LIB="-l$ax_lib"; AC_SUBST(BOOST_CONTEXT_LIB) link_context="yes"; break],
[link_context="no"])
done
fi
else
for ax_lib in $ax_boost_user_context_lib boost_context-$ax_boost_user_context_lib; do
AC_CHECK_LIB($ax_lib, exit,
[BOOST_CONTEXT_LIB="-l$ax_lib"; AC_SUBST(BOOST_CONTEXT_LIB) link_context="yes"; break],
[link_context="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_context" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
# ===========================================================================
# 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
])
\ No newline at end of file
# ============================================================================
# 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 24
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/errors.hpp>
]],
[[boost::program_options::error err("Error message");
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
])
# ===========================================================================
# 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
])
# ===========================================================================
# 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
])
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_boost_thread.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_BOOST_THREAD
#
# DESCRIPTION
#
# Test for Thread 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_THREAD_LIB)
#
# And sets:
#
# HAVE_BOOST_THREAD
#
# LICENSE
#
# Copyright (c) 2009 Thomas Porschberg <thomas@randspringer.de>
# Copyright (c) 2009 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 27
AC_DEFUN([AX_BOOST_THREAD],
[
AC_ARG_WITH([boost-thread],
AS_HELP_STRING([--with-boost-thread@<:@=special-lib@:>@],
[use the Thread library from boost - it is possible to specify a certain library for the linker
e.g. --with-boost-thread=boost_thread-gcc-mt ]),
[
if test "$withval" = "no"; then
want_boost="no"
elif test "$withval" = "yes"; then
want_boost="yes"
ax_boost_user_thread_lib=""
else
want_boost="yes"
ax_boost_user_thread_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::Thread library is available,
ax_cv_boost_thread,
[AC_LANG_PUSH([C++])
CXXFLAGS_SAVE=$CXXFLAGS
if test "x$host_os" = "xsolaris" ; then
CXXFLAGS="-pthreads $CXXFLAGS"
elif test "x$host_os" = "xmingw32" ; then
CXXFLAGS="-mthreads $CXXFLAGS"
else
CXXFLAGS="-pthread $CXXFLAGS"
fi
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[@%:@include <boost/thread/thread.hpp>]],
[[boost::thread_group thrds;
return 0;]])],
ax_cv_boost_thread=yes, ax_cv_boost_thread=no)
CXXFLAGS=$CXXFLAGS_SAVE
AC_LANG_POP([C++])
])
if test "x$ax_cv_boost_thread" = "xyes"; then
if test "x$host_os" = "xsolaris" ; then
BOOST_CPPFLAGS="-pthreads $BOOST_CPPFLAGS"
elif test "x$host_os" = "xmingw32" ; then
BOOST_CPPFLAGS="-mthreads $BOOST_CPPFLAGS"
else
BOOST_CPPFLAGS="-pthread $BOOST_CPPFLAGS"
fi
AC_SUBST(BOOST_CPPFLAGS)
AC_DEFINE(HAVE_BOOST_THREAD,,[define if the Boost::Thread library is available])
BOOSTLIBDIR=`echo $BOOST_LDFLAGS | sed -e 's/@<:@^\/@:>@*//'`
LDFLAGS_SAVE=$LDFLAGS
case "x$host_os" in
*bsd* )
LDFLAGS="-pthread $LDFLAGS"
break;
;;
esac
if test "x$ax_boost_user_thread_lib" = "x"; then
for libextension in `ls -r $BOOSTLIBDIR/libboost_thread* 2>/dev/null | sed 's,.*/lib,,' | sed 's,\..*,,'`; do
ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit,
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
[link_thread="no"])
done
if test "x$link_thread" != "xyes"; then
for libextension in `ls -r $BOOSTLIBDIR/boost_thread* 2>/dev/null | sed 's,.*/,,' | sed 's,\..*,,'`; do
ax_lib=${libextension}
AC_CHECK_LIB($ax_lib, exit,
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
[link_thread="no"])
done
fi
else
for ax_lib in $ax_boost_user_thread_lib boost_thread-$ax_boost_user_thread_lib; do
AC_CHECK_LIB($ax_lib, exit,
[BOOST_THREAD_LIB="-l$ax_lib"; AC_SUBST(BOOST_THREAD_LIB) link_thread="yes"; break],
[link_thread="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_thread" = "xno"; then
AC_MSG_ERROR(Could not link against $ax_lib !)
else
case "x$host_os" in
*bsd* )
BOOST_LDFLAGS="-pthread $BOOST_LDFLAGS"
break;
;;
esac
fi
fi
CPPFLAGS="$CPPFLAGS_SAVED"
LDFLAGS="$LDFLAGS_SAVED"
fi
])
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_check_openssl.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CHECK_OPENSSL([action-if-found[, action-if-not-found]])
#
# DESCRIPTION
#
# Look for OpenSSL in a number of default spots, or in a user-selected
# spot (via --with-openssl). Sets
#
# OPENSSL_INCLUDES to the include directives required
# OPENSSL_LIBS to the -l directives required
# OPENSSL_LDFLAGS to the -L or -R flags required
#
# and calls ACTION-IF-FOUND or ACTION-IF-NOT-FOUND appropriately
#
# This macro sets OPENSSL_INCLUDES such that source files should use the
# openssl/ directory in include directives:
#
# #include <openssl/hmac.h>
#
# LICENSE
#
# Copyright (c) 2009,2010 Zmanda Inc. <http://www.zmanda.com/>
# Copyright (c) 2009,2010 Dustin J. Mitchell <dustin@zmanda.com>
#
# Copying and distribution of this file, with or without modification, are
# permitted in any medium without royalty provided the copyright notice
# and this notice are preserved. This file is offered as-is, without any
# warranty.
#serial 9
AU_ALIAS([CHECK_SSL], [AX_CHECK_OPENSSL])
AC_DEFUN([AX_CHECK_OPENSSL], [
found=false
AC_ARG_WITH([openssl],
[AS_HELP_STRING([--with-openssl=DIR],
[root of the OpenSSL directory])],
[
case "$withval" in
"" | y | ye | yes | n | no)
AC_MSG_ERROR([Invalid --with-openssl value])
;;
*) ssldirs="$withval"
;;
esac
], [
# if pkg-config is installed and openssl has installed a .pc file,
# then use that information and don't search ssldirs
AC_CHECK_TOOL([PKG_CONFIG], [pkg-config])
if test x"$PKG_CONFIG" != x""; then
OPENSSL_LDFLAGS=`$PKG_CONFIG openssl --libs-only-L 2>/dev/null`
if test $? = 0; then
OPENSSL_LIBS=`$PKG_CONFIG openssl --libs-only-l 2>/dev/null`
OPENSSL_INCLUDES=`$PKG_CONFIG openssl --cflags-only-I 2>/dev/null`
found=true
fi
fi
# no such luck; use some default ssldirs
if ! $found; then
ssldirs="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /usr"
fi
]
)
# note that we #include <openssl/foo.h>, so the OpenSSL headers have to be in
# an 'openssl' subdirectory
if ! $found; then
OPENSSL_INCLUDES=
for ssldir in $ssldirs; do
AC_MSG_CHECKING([for openssl/ssl.h in $ssldir])
if test -f "$ssldir/include/openssl/ssl.h"; then
OPENSSL_INCLUDES="-I$ssldir/include"
OPENSSL_LDFLAGS="-L$ssldir/lib"
OPENSSL_LIBS="-lssl -lcrypto"
found=true
AC_MSG_RESULT([yes])
break
else
AC_MSG_RESULT([no])
fi
done
# if the file wasn't found, well, go ahead and try the link anyway -- maybe
# it will just work!
fi
# try the preprocessor and linker with our new flags,
# being careful not to pollute the global LIBS, LDFLAGS, and CPPFLAGS
AC_MSG_CHECKING([whether compiling and linking against OpenSSL works])
echo "Trying link with OPENSSL_LDFLAGS=$OPENSSL_LDFLAGS;" \
"OPENSSL_LIBS=$OPENSSL_LIBS; OPENSSL_INCLUDES=$OPENSSL_INCLUDES" >&AS_MESSAGE_LOG_FD
save_LIBS="$LIBS"
save_LDFLAGS="$LDFLAGS"
save_CPPFLAGS="$CPPFLAGS"
LDFLAGS="$LDFLAGS $OPENSSL_LDFLAGS"
LIBS="$OPENSSL_LIBS $LIBS"
CPPFLAGS="$OPENSSL_INCLUDES $CPPFLAGS"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([#include <openssl/ssl.h>], [SSL_new(NULL)])],
[
AC_MSG_RESULT([yes])
$1
], [
AC_MSG_RESULT([no])
$2
])
CPPFLAGS="$save_CPPFLAGS"
LDFLAGS="$save_LDFLAGS"
LIBS="$save_LIBS"
AC_SUBST([OPENSSL_INCLUDES])
AC_SUBST([OPENSSL_LIBS])
AC_SUBST([OPENSSL_LDFLAGS])
])
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_config_feature.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_CONFIG_FEATURE(FEATURE-NAME, FEATURE-DESCRIPTION, DEFINE, DEFINE-DESCRIPTION, [ACTION-IF-ENABLED [, ACTION-IF-NOT-ENABLED]])
#
# DESCRIPTION
#
# AX_CONFIG_FEATURE is a simple wrapper for AC_ARG_ENABLE, it enables the
# feature FEATURE-NAME and AC_DEFINEs the passed DEFINE, depending on the
# user choice. DESCRIPTION will be used for AC_DEFINEs. ACTION-IF-ENABLED
# and ACTION-IF-NOT-ENABLED are the actions that will be run. A feature is
# enabled by default, in order to change this behaviour use the
# AX_CONFIG_FEATURE_DEFAULT_ENABLED and AX_CONFIG_FEATURE_DEFAULT_DISABLED
# macros.
#
# A simple example:
#
# AX_CONFIG_FEATURE_DEFAULT_ENABLED
# AX_CONFIG_FEATURE(feature_xxxxx, [turns on/off XXXXX support],
# HAVE_XXXXX, [Define if you want XXXXX support])
#
# ...
#
# AX_CONFIG_FEATURE_DEFAULT_DISABLED
# AX_CONFIG_FEATURE(feature_yyyyy, [turns on/off YYYYY support],
# HAVE_YYYYY, [Define if you want YYYYY support],
# [enable_yyyyy="yes"], [enable_yyyyy="no"])
# AM_CONDITIONAL(YYYYY, [test "$enable_yyyyy" = "yes"])
#
# AX_CONFIG_FEATURE_DEFAULT_ENABLED
# AX_CONFIG_FEATURE(...)
#
# ...
#
# If you have lot of features and you want a verbose dumping of each user
# selection use AX_CONFIG_FEATURE_VERBOSE. Use AX_CONFIG_FEATURE_SILENT in
# order to remove a previously AX_CONFIG_FEATURE_VERBOSE. By default
# features are silent.
#
# Use AX_CONFIG_FEATURE_ENABLE or AX_CONFIG_FEATURE_DISABLE in order to
# enable or disable a specific feature.
#
# Another simple example:
#
# AS_IF([some_test_here],[AX_CONFIG_FEATURE_ENABLE(feature_xxxxx)],[])
#
# AX_CONFIG_FEATURE(feature_xxxxx, [turns on/off XXXXX support],
# HAVE_XXXXX, [Define if you want XXXXX support])
# AX_CONFIG_FEATURE(feature_yyyyy, [turns on/off YYYYY support],
# HAVE_YYYYY, [Define if you want YYYYY support],
# [enable_yyyyy="yes"], [enable_yyyyy="no"])
#
# ...
#
# NOTE: AX_CONFIG_FEATURE_ENABLE() must be placed first of the relative
# AX_CONFIG_FEATURE() macro ...
#
# LICENSE
#
# Copyright (c) 2008 Francesco Salvestrini <salvestrini@users.sourceforge.net>
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; either version 2 of the License, or (at your
# option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
# Public License for more details.
#
# You should have received a copy of the GNU General Public License along
# with this program. If not, see <http://www.gnu.org/licenses/>.
#
# As a special exception, the respective Autoconf Macro's copyright owner
# gives unlimited permission to copy, distribute and modify the configure
# scripts that are the output of Autoconf when processing the Macro. You
# need not follow the terms of the GNU General Public License when using
# or distributing such scripts, even though portions of the text of the
# Macro appear in them. The GNU General Public License (GPL) does govern
# all other use of the material that constitutes the Autoconf Macro.
#
# This special exception to the GPL applies to versions of the Autoconf
# Macro released by the Autoconf Archive. When you make and distribute a
# modified version of the Autoconf Macro, you may extend this special
# exception to the GPL to apply to your modified version as well.
#serial 10
AC_DEFUN([AX_CONFIG_FEATURE],[ dnl
m4_pushdef([FEATURE], patsubst([$1], -, _))dnl
AC_ARG_ENABLE([$1],AS_HELP_STRING([--enable-$1],[$2]),[
case "${enableval}" in
yes)
ax_config_feature_[]FEATURE[]="yes"
;;
no)
ax_config_feature_[]FEATURE[]="no"
;;
*)
AC_MSG_ERROR([bad value ${enableval} for feature --$1])
;;
esac
])
AS_IF([test "$ax_config_feature_[]FEATURE[]" = yes],[ dnl
AC_DEFINE([$3])
$5
AS_IF([test "$ax_config_feature_verbose" = yes],[ dnl
AC_MSG_NOTICE([Feature $1 is enabled])
])
],[ dnl
$6
AS_IF([test "$ax_config_feature_verbose" = yes],[ dnl
AC_MSG_NOTICE([Feature $1 is disabled])
])
])
AH_TEMPLATE([$3],[$4])
m4_popdef([FEATURE])dnl
])
dnl Feature global
AC_DEFUN([AX_CONFIG_FEATURE_VERBOSE],[ dnl
ax_config_feature_verbose=yes
])
dnl Feature global
AC_DEFUN([AX_CONFIG_FEATURE_SILENT],[ dnl
ax_config_feature_verbose=no
])
dnl Feature specific
AC_DEFUN([AX_CONFIG_FEATURE_DEFAULT_ENABLED], [
ax_config_feature_[]FEATURE[]_default=yes
])
dnl Feature specific
AC_DEFUN([AX_CONFIG_FEATURE_DEFAULT_DISABLED], [
ax_config_feature_[]FEATURE[]_default=no
])
dnl Feature specific
AC_DEFUN([AX_CONFIG_FEATURE_ENABLE],[ dnl
ax_config_feature_[]patsubst([$1], -, _)[]=yes
])
dnl Feature specific
AC_DEFUN([AX_CONFIG_FEATURE_DISABLE],[ dnl
ax_config_feature_[]patsubst([$1], -, _)[]=no
])
# ===========================================================================
# http://www.gnu.org/software/autoconf-archive/ax_prefix_config_h.html
# ===========================================================================
#
# SYNOPSIS
#
# AX_PREFIX_CONFIG_H [(OUTPUT-HEADER [,PREFIX [,ORIG-HEADER]])]
#
# DESCRIPTION
#
# This is a new variant from ac_prefix_config_ this one will use a
# lowercase-prefix if the config-define was starting with a
# lowercase-char, e.g. "#define const", "#define restrict", or "#define
# off_t", (and this one can live in another directory, e.g.
# testpkg/config.h therefore I decided to move the output-header to be the
# first arg)
#
# takes the usual config.h generated header file; looks for each of the
# generated "#define SOMEDEF" lines, and prefixes the defined name (ie.
# makes it "#define PREFIX_SOMEDEF". The result is written to the output
# config.header file. The PREFIX is converted to uppercase for the
# conversions.
#
# Defaults:
#
# OUTPUT-HEADER = $PACKAGE-config.h
# PREFIX = $PACKAGE
# ORIG-HEADER, from AM_CONFIG_HEADER(config.h)
#
# Your configure.ac script should contain both macros in this order, and
# unlike the earlier variations of this prefix-macro it is okay to place
# the AX_PREFIX_CONFIG_H call before the AC_OUTPUT invokation.
#
# Example:
#
# AC_INIT(config.h.in) # config.h.in as created by "autoheader"
# AM_INIT_AUTOMAKE(testpkg, 0.1.1) # makes #undef VERSION and PACKAGE
# AM_CONFIG_HEADER(config.h) # prep config.h from config.h.in
# AX_PREFIX_CONFIG_H(mylib/_config.h) # prep mylib/_config.h from it..
# AC_MEMORY_H # makes "#undef NEED_MEMORY_H"
# AC_C_CONST_H # makes "#undef const"
# AC_OUTPUT(Makefile) # creates the "config.h" now
# # and also mylib/_config.h
#
# if the argument to AX_PREFIX_CONFIG_H would have been omitted then the
# default outputfile would have been called simply "testpkg-config.h", but
# even under the name "mylib/_config.h" it contains prefix-defines like
#
# #ifndef TESTPKG_VERSION
# #define TESTPKG_VERSION "0.1.1"
# #endif
# #ifndef TESTPKG_NEED_MEMORY_H
# #define TESTPKG_NEED_MEMORY_H 1
# #endif
# #ifndef _testpkg_const
# #define _testpkg_const _const
# #endif
#
# and this "mylib/_config.h" can be installed along with other
# header-files, which is most convenient when creating a shared library
# (that has some headers) where some functionality is dependent on the
# OS-features detected at compile-time. No need to invent some
# "mylib-confdefs.h.in" manually. :-)
#
# Note that some AC_DEFINEs that end up in the config.h file are actually
# self-referential - e.g. AC_C_INLINE, AC_C_CONST, and the AC_TYPE_OFF_T
# say that they "will define inline|const|off_t if the system does not do
# it by itself". You might want to clean up about these - consider an
# extra mylib/conf.h that reads something like:
#
# #include <mylib/_config.h>
# #ifndef _testpkg_const
# #define _testpkg_const const
# #endif
#
# and then start using _testpkg_const in the header files. That is also a
# good thing to differentiate whether some library-user has starting to
# take up with a different compiler, so perhaps it could read something
# like this:
#
# #ifdef _MSC_VER
# #include <mylib/_msvc.h>
# #else
# #include <mylib/_config.h>
# #endif
# #ifndef _testpkg_const
# #define _testpkg_const const
# #endif
#
# LICENSE
#
# Copyright (c) 2008 Guido U. Draheim <guidod@gmx.de>
# Copyright (c) 2008 Marten Svantesson
# Copyright (c) 2008 Gerald Point <Gerald.Point@labri.fr>
#
# 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 11
AC_DEFUN([AX_PREFIX_CONFIG_H],[dnl
AC_PREREQ([2.62])
AC_BEFORE([AC_CONFIG_HEADERS],[$0])dnl
AC_CONFIG_COMMANDS([ifelse($1,,$PACKAGE-config.h,$1)],[dnl
AS_VAR_PUSHDEF([_OUT],[ac_prefix_conf_OUT])dnl
AS_VAR_PUSHDEF([_DEF],[ac_prefix_conf_DEF])dnl
AS_VAR_PUSHDEF([_PKG],[ac_prefix_conf_PKG])dnl
AS_VAR_PUSHDEF([_LOW],[ac_prefix_conf_LOW])dnl
AS_VAR_PUSHDEF([_UPP],[ac_prefix_conf_UPP])dnl
AS_VAR_PUSHDEF([_INP],[ac_prefix_conf_INP])dnl
m4_pushdef([_script],[conftest.prefix])dnl
m4_pushdef([_symbol],[m4_cr_Letters[]m4_cr_digits[]_])dnl
_OUT=`echo ifelse($1, , $PACKAGE-config.h, $1)`
_DEF=`echo _$_OUT | sed -e "y:m4_cr_letters:m4_cr_LETTERS[]:" -e "s/@<:@^m4_cr_Letters@:>@/_/g"`
_PKG=`echo ifelse($2, , $PACKAGE, $2)`
_LOW=`echo _$_PKG | sed -e "y:m4_cr_LETTERS-:m4_cr_letters[]_:"`
_UPP=`echo $_PKG | sed -e "y:m4_cr_letters-:m4_cr_LETTERS[]_:" -e "/^@<:@m4_cr_digits@:>@/s/^/_/"`
_INP=`echo "ifelse($3,,,$3)" | sed -e 's/ *//'`
if test ".$_INP" = "."; then
for ac_file in : $CONFIG_HEADERS; do test "_$ac_file" = _: && continue
case "$ac_file" in
*.h) _INP=$ac_file ;;
*)
esac
test ".$_INP" != "." && break
done
fi
if test ".$_INP" = "."; then
case "$_OUT" in
*/*) _INP=`basename "$_OUT"`
;;
*-*) _INP=`echo "$_OUT" | sed -e "s/@<:@_symbol@:>@*-//"`
;;
*) _INP=config.h
;;
esac
fi
if test -z "$_PKG" ; then
AC_MSG_ERROR([no prefix for _PREFIX_PKG_CONFIG_H])
else
if test ! -f "$_INP" ; then if test -f "$srcdir/$_INP" ; then
_INP="$srcdir/$_INP"
fi fi
AC_MSG_NOTICE(creating $_OUT - prefix $_UPP for $_INP defines)
if test -f $_INP ; then
AS_ECHO(["s/^@%:@undef *\\(@<:@m4_cr_LETTERS[]_@:>@\\)/@%:@undef $_UPP""_\\1/"]) > _script
AS_ECHO(["s/^@%:@undef *\\(@<:@m4_cr_letters@:>@\\)/@%:@undef $_LOW""_\\1/"]) >> _script
AS_ECHO(["s/^@%:@def[]ine *\\(@<:@m4_cr_LETTERS[]_@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_UPP""_\\1\\"]) >> _script
AS_ECHO(["@%:@def[]ine $_UPP""_\\1\\2\\"]) >> _script
AS_ECHO(["@%:@endif/"]) >> _script
AS_ECHO(["s/^@%:@def[]ine *\\(@<:@m4_cr_letters@:>@@<:@_symbol@:>@*\\)\\(.*\\)/@%:@ifndef $_LOW""_\\1\\"]) >> _script
AS_ECHO(["@%:@define $_LOW""_\\1\\2\\"]) >> _script
AS_ECHO(["@%:@endif/"]) >> _script
# now executing _script on _DEF input to create _OUT output file
echo "@%:@ifndef $_DEF" >$tmp/pconfig.h
echo "@%:@def[]ine $_DEF 1" >>$tmp/pconfig.h
echo ' ' >>$tmp/pconfig.h
echo /'*' $_OUT. Generated automatically at end of configure. '*'/ >>$tmp/pconfig.h
sed -f _script $_INP >>$tmp/pconfig.h
echo ' ' >>$tmp/pconfig.h
echo '/* once:' $_DEF '*/' >>$tmp/pconfig.h
echo "@%:@endif" >>$tmp/pconfig.h
if cmp -s $_OUT $tmp/pconfig.h 2>/dev/null; then
AC_MSG_NOTICE([$_OUT is unchanged])
else
ac_dir=`AS_DIRNAME(["$_OUT"])`
AS_MKDIR_P(["$ac_dir"])
rm -f "$_OUT"
mv $tmp/pconfig.h "$_OUT"
fi
cp _script _configs.sed
else
AC_MSG_ERROR([input file $_INP does not exist - skip generating $_OUT])
fi
rm -f conftest.*
fi
m4_popdef([_symbol])dnl
m4_popdef([_script])dnl
AS_VAR_POPDEF([_INP])dnl
AS_VAR_POPDEF([_UPP])dnl
AS_VAR_POPDEF([_LOW])dnl
AS_VAR_POPDEF([_PKG])dnl
AS_VAR_POPDEF([_DEF])dnl
AS_VAR_POPDEF([_OUT])dnl
],[PACKAGE="$PACKAGE"])])
\ No newline at end of file
AC_DEFUN([FB_CHECK_PKG_CONFIG],
[AC_REQUIRE([PKG_PROG_PKG_CONFIG])
PKG_CHECK_MODULES($1, $2,
[PKG_DEPS="$PKG_DEPS $2"],
[AC_MSG_NOTICE([$2.pc not found, treating as legacy dependency])]
)
]
)
AC_DEFUN([FB_FILTER_PKG_LIBS],
[AC_REQUIRE([AC_PROG_SED])
deps_=`for p in $PKG_DEPS; do pkg-config --libs $p; done`
filter_=`for l in $deps_;dnl
do echo $l | $SED -ne 's%\(-l.*\)%-e s/\1//%p';dnl
done`
PKG_LIBS=`echo $1 | $SED $filter_`
]
)
ACLOCAL_AMFLAGS = -I m4
CPPFLAGS = -I$(top_srcdir)/test/gtest/googletest/include
ldadd = $(top_builddir)/test/libfollytestmain.la
TESTS = \
buffered_stat_test \
digest_builder_test \
histogram_test \
quantile_estimator_test \
sliding_window_test \
tdigest_test
check_PROGRAMS = $(TESTS)
buffered_stat_test_SOURCES = BufferedStatTest.cpp
buffered_stat_test_LDADD = $(ldadd)
digest_builder_test_SOURCES = DigestBuilderTest.cpp
digest_builder_test_LDADD = $(ldadd)
histogram_test_SOURCES = HistogramTest.cpp
histogram_test_LDADD = $(ldadd)
quantile_estimator_test_SOURCES = QuantileEstimatorTest.cpp
quantile_estimator_test_LDADD = $(ldadd)
sliding_window_test_SOURCES = SlidingWindowTest.cpp
sliding_window_test_LDADD = $(ldadd)
tdigest_test_SOURCES = TDigestTest.cpp
tdigest_test_LDADD = $(ldadd)
SUBDIRS = . function_benchmark
ACLOCAL_AMFLAGS = -I m4
CPPFLAGS += -isystem gtest/googletest/include -isystem gtest/googlemock/include
TESTS= \
sorted_vector_types_test \
foreach_test \
hash_test \
timeout_queue_test \
conv_test \
expected_test \
range_test \
math_test \
bits_test \
bit_iterator_test
check_LTLIBRARIES = libfollytestmain.la libgtest.la
check_PROGRAMS =
noinst_LTLIBRARIES = thread_local_test_lib.la
libgtest_la_CPPFLAGS = -isystem gtest/googletest
libgtest_la_SOURCES = gtest/googletest/src/gtest-all.cc
if FOLLY_TESTMAIN
libfollytestmain_la_CPPFLAGS = $(AM_CPPFLAGS) $(libgtest_la_CPPFLAGS)
libfollytestmain_la_SOURCES = $(libgtest_la_SOURCES) common/TestMain.cpp
libfollytestmain_la_LIBADD = $(top_builddir)/init/libfollyinit.la $(top_builddir)/libfolly.la
else
libfollytestmain_la_CPPFLAGS = $(libgtest_la_CPPFLAGS)
libfollytestmain_la_SOURCES = $(libgtest_la_SOURCES) gtest/googletest/src/gtest_main.cc
libfollytestmain_la_LIBADD = $(top_builddir)/libfolly.la
endif
thread_local_test_lib_la_CPPFLAGS = $(AM_CPPFLAGS)
thread_local_test_lib_la_SOURCES = ThreadLocalTestLib.cpp
thread_local_test_lib_la_LDFLAGS = -module -rpath /force_shared
thread_local_test_lib_la_LIBADD = $(top_builddir)/libfolly.la
noinst_HEADERS = FBStringTestBenchmarks.cpp.h \
FBVectorBenchmarks.cpp.h \
FBVectorTests.cpp.h
spin_lock_test_SOURCES = SpinLockTest.cpp
spin_lock_test_LDADD = libfollytestmain.la
TESTS += spin_lock_test
array_test_SOURCES = ../container/test/ArrayTest.cpp
array_test_LDADD = libfollytestmain.la
TESTS += array_test
constexpr_math_test_SOURCES = ConstexprMathTest.cpp
constexpr_math_test_LDADD = libfollytestmain.la
TESTS += constexpr_math_test
if RUN_ARCH_SPECIFIC_TESTS
small_locks_test_SOURCES = ../synchronization/test/SmallLocksTest.cpp
small_locks_test_LDADD = libfollytestmain.la
TESTS += small_locks_test
# Fails with WARNING: Logging before InitGoogleLogging() is written to STDERR
packed_sync_ptr_test_SOURCES = PackedSyncPtrTest.cpp
packed_sync_ptr_test_LDADD = libfollytestmain.la
TESTS += packed_sync_ptr_test
small_vector_test_SOURCES = small_vector_test.cpp
small_vector_test_LDADD = libfollytestmain.la
TESTS += small_vector_test
discriminated_ptr_test_SOURCES = DiscriminatedPtrTest.cpp
discriminated_ptr_test_LDADD = libfollytestmain.la
TESTS += discriminated_ptr_test
if !HAVE_PPC64
cpuid_test_SOURCES = CpuIdTest.cpp
cpuid_test_LDADD = libfollytestmain.la
TESTS += cpuid_test
endif
endif
sorted_vector_types_test_SOURCES = sorted_vector_test.cpp
sorted_vector_types_test_LDADD = libfollytestmain.la
TESTS += sorted_vector_types_test
container_access_test_SOURCES = ../container/test/AccessTest.cpp
container_access_test_LDADD = libfollytestmain.la
TESTS += container_access_test
foreach_test_SOURCES = ../container/test/ForeachTest.cpp
foreach_test_LDADD = libfollytestmain.la
TESTS += foreach_test
foreach_benchmark_SOURCES = ../container/test/ForeachBenchmark.cpp
foreach_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
check_PROGRAMS += foreach_benchmark
hash_test_SOURCES = ../hash/test/HashTest.cpp
hash_test_LDADD = libfollytestmain.la
TESTS += hash_test
invoke_test_SOURCES = ../functional/test/InvokeTest.cpp
invoke_test_LDADD = libfollytestmain.la
TESTS += invoke_test
fbstring_test_using_jemalloc_SOURCES = FBStringTest.cpp
fbstring_test_using_jemalloc_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += fbstring_test_using_jemalloc
thread_cached_int_test_SOURCES = ThreadCachedIntTest.cpp
thread_cached_int_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += thread_cached_int_test
thread_id_test_SOURCES = ../system/test/ThreadIdTest.cpp
thread_id_test_LDADD = libfollytestmain.la
TESTS += thread_id_test
thread_local_test_SOURCES = ThreadLocalTest.cpp
thread_local_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
thread_local_test_LDFLAGS = -ldl
TESTS += thread_cached_int_test thread_local_test
fbvector_test_SOURCES = FBVectorTest.cpp
fbvector_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += fbvector_test
# fails due to cout
dynamic_test_SOURCES = DynamicTest.cpp
dynamic_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += dynamic_test
# fails due to cout
json_test_SOURCES = JsonTest.cpp
json_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += json_test
json_pointer_test_SOURCES = json_pointer_test.cpp
json_pointer_test_LDADD = libfollytestmain.la
TESTS += json_pointer_test
benchmark_test_SOURCES = BenchmarkTest.cpp
benchmark_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
check_PROGRAMS += benchmark_test
# fails due to destructor
scope_guard_test_SOURCES = ScopeGuardTest.cpp
scope_guard_test_LDADD = libfollytestmain.la
TESTS += scope_guard_test
timeout_queue_test_SOURCES = TimeoutQueueTest.cpp
timeout_queue_test_LDADD = libfollytestmain.la
TESTS += timeout_queue_test
cold_class_test_SOURCES = ../lang/test/ColdClassTest.cpp
cold_class_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += cold_class_test
conv_test_SOURCES = ConvTest.cpp
conv_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += conv_test
expected_test_SOURCES = ExpectedTest.cpp
expected_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += expected_test
range_test_SOURCES = RangeTest.cpp
range_test_LDADD = libfollytestmain.la
TESTS += range_test
math_test_SOURCES = MathTest.cpp
math_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += math_test
bits_test_SOURCES = ../lang/test/BitsTest.cpp
bits_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += bits_test
bit_iterator_test_SOURCES = ../container/test/BitIteratorTest.cpp
bit_iterator_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += bit_iterator_test
endian_test_SOURCES = EndianTest.cpp
endian_test_LDADD = libfollytestmain.la
TESTS += endian_test
rw_spinlock_test_SOURCES = ../synchronization/test/RWSpinLockTest.cpp
rw_spinlock_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += rw_spinlock_test
synchronized_test_SOURCES = SynchronizedTest.cpp
synchronized_test_LDADD = libfollytestmain.la
TESTS += synchronized_test
synchronized_ptr_test_SOURCES = SynchronizedPtrTest.cpp
synchronized_ptr_test_LDADD = libfollytestmain.la
TESTS += synchronized_ptr_test
lock_traits_test_SOURCES = LockTraitsTest.cpp
lock_traits_test_LDADD = libfollytestmain.la
TESTS += lock_traits_test
concurrent_skiplist_test_SOURCES = ConcurrentSkipListTest.cpp
concurrent_skiplist_test_LDADD = libfollytestmain.la
TESTS += concurrent_skiplist_test
concurrent_skiplist_benchmark_SOURCES = ConcurrentSkipListBenchmark.cpp
concurrent_skiplist_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
check_PROGRAMS += concurrent_skiplist_benchmark
conv_benchmark_SOURCES = ConvBenchmark.cpp
conv_benchmark_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
check_PROGRAMS += conv_benchmark
group_varint_test_SOURCES = GroupVarintTest.cpp
group_varint_test_LDADD = libfollytestmain.la
TESTS += group_varint_test
map_util_test_SOURCES = MapUtilTest.cpp
map_util_test_LDADD = libfollytestmain.la
TESTS += map_util_test
string_test_SOURCES = StringTest.cpp
string_test_LDADD = libfollytestmain.la
TESTS += string_test
producer_consumer_queue_test_SOURCES = ProducerConsumerQueueTest.cpp
producer_consumer_queue_test_LDADD = libfollytestmain.la
TESTS += producer_consumer_queue_test
atomic_hash_array_test_SOURCES = AtomicHashArrayTest.cpp
atomic_hash_array_test_LDADD = libfollytestmain.la
TESTS += atomic_hash_array_test
atomic_hash_map_test_SOURCES = AtomicHashMapTest.cpp
atomic_hash_map_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += atomic_hash_map_test
chrono_test_SOURCES = ChronoTest.cpp
chrono_test_LDADD = libfollytestmain.la
TESTS += chrono_test
format_test_SOURCES = FormatTest.cpp
format_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += format_test
fingerprint_test_SOURCES = FingerprintTest.cpp
fingerprint_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += fingerprint_test
if HAVE_VARIABLE_TEMPLATES
poly_test_SOURCES = PolyTest.cpp
poly_test_LDADD = libfollytestmain.la
TESTS += poly_test
endif
portability_test_SOURCES = PortabilityTest.cpp
portability_test_LDADD = libfollytestmain.la
TESTS += portability_test
spooky_hash_v1_test_SOURCES = ../hash/test/SpookyHashV1Test.cpp
spooky_hash_v1_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += spooky_hash_v1_test
spooky_hash_v2_test_SOURCES = ../hash/test/SpookyHashV2Test.cpp
spooky_hash_v2_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += spooky_hash_v2_test
token_bucket_test_SOURCES = TokenBucketTest.cpp
token_bucket_test_LDADD = libfollytestmain.la $(top_builddir)/libfollybenchmark.la
TESTS += token_bucket_test
thread_name_test_SOURCES = ../system/test/ThreadNameTest.cpp
thread_name_test_LDADD = libfollytestmain.la
TESTS += thread_name_test
indestructible_test_SOURCES = IndestructibleTest.cpp
indestructible_test_LDADD = libfollytestmain.la
TESTS += indestructible_test
portability_clock_gettime_wrappers_test_SOURCES = ClockGettimeWrappersTest.cpp
portability_clock_gettime_wrappers_test_LDADD = libfollytestmain.la
TESTS += portability_clock_gettime_wrappers_test
portability_time_test_SOURCES = ../portability/test/TimeTest.cpp
portability_time_test_LDADD = libfollytestmain.la
TESTS += portability_time_test
portability_constexpr_test_SOURCES = ../portability/test/ConstexprTest.cpp
portability_constexpr_test_LDADD = libfollytestmain.la
TESTS += portability_constexpr_test
portability_openssl_test_SOURCES = ../portability/test/OpenSSLPortabilityTest.cpp
portability_openssl_test_LDADD = libfollytestmain.la
TESTS += portability_openssl_test
try_test_SOURCES = TryTest.cpp
try_test_LDADD = libfollytestmain.la
TESTS += try_test
typelist_test_SOURCES = TypeListTest.cpp
typelist_test_LDADD = libfollytestmain.la
TESTS += typelist_test
uncaught_exceptions_test_SOURCES = UncaughtExceptionsTest.cpp
uncaught_exceptions_test_LDADD = libfollytestmain.la
TESTS += uncaught_exceptions_test
unit_test_SOURCES = UnitTest.cpp
unit_test_LDADD = libfollytestmain.la
TESTS += unit_test
futures_test_SOURCES = \
../futures/test/CallbackLifetimeTest.cpp \
../futures/test/CollectTest.cpp \
../futures/test/ContextTest.cpp \
../futures/test/ConversionOperatorTest.cpp \
../futures/test/CoreTest.cpp \
../futures/test/EnsureTest.cpp \
../futures/test/FilterTest.cpp \
../futures/test/FutureTest.cpp \
../futures/test/HeaderCompileTest.cpp \
../futures/test/InterruptTest.cpp \
../futures/test/MapTest.cpp \
../futures/test/NonCopyableLambdaTest.cpp \
../futures/test/PollTest.cpp \
../futures/test/PromiseTest.cpp \
../futures/test/ReduceTest.cpp \
../futures/test/RetryingTest.cpp \
../futures/test/SelfDestructTest.cpp \
../futures/test/SharedPromiseTest.cpp \
../futures/test/TestExecutorTest.cpp \
../futures/test/ThenCompileTest.cpp \
../futures/test/ThenTest.cpp \
../futures/test/TimekeeperTest.cpp \
../futures/test/TimesTest.cpp \
../futures/test/UnwrapTest.cpp \
../futures/test/ViaTest.cpp \
../futures/test/WaitTest.cpp \
../futures/test/WillEqualTest.cpp \
../futures/test/WindowTest.cpp \
../futures/test/WhenTest.cpp \
../futures/test/WhileDoTest.cpp
futures_test_LDADD = libfollytestmain.la
TESTS += futures_test
function_test_SOURCES = \
FunctionRefTest.cpp \
FunctionTest.cpp
function_test_LDADD = libfollytestmain.la
TESTS += function_test
rvalue_reference_wrapper_test_SOURCES = \
../lang/test/RValueReferenceWrapperTest.cpp
rvalue_reference_wrapper_test_LDADD = libfollytestmain.la
TESTS += rvalue_reference_wrapper_test
ssl_test_SOURCES = \
../ssl/test/OpenSSLHashTest.cpp
ssl_test_LDADD = libfollytestmain.la -lcrypto
TESTS += ssl_test
mallctl_helper_test_SOURCES = ../memory/test/MallctlHelperTest.cpp
mallctl_helper_test_LDADD = libfollytestmain.la
TESTS += mallctl_helper_test
apply_tuple_test_SOURCES = ../functional/test/ApplyTupleTest.cpp
apply_tuple_test_LDADD = libfollytestmain.la
TESTS += apply_tuple_test
partial_test_SOURCES = ../functional/test/PartialTest.cpp
partial_test_LDADD = libfollytestmain.la
TESTS += partial_test
singleton_thread_local_test_SOURCES = SingletonThreadLocalTest.cpp
singleton_thread_local_test_LDADD = libfollytestmain.la
TESTS += singleton_thread_local_test
utility_test_SOURCES = UtilityTest.cpp
utility_test_LDADD = libfollytestmain.la
TESTS += utility_test
iterator_test_SOURCES = ../container/test/IteratorTest.cpp
iterator_test_LDADD = libfollytestmain.la
TESTS += iterator_test
detail_iterators_test_SOURCES = IteratorTests.cpp
detail_iterators_test_LDADD = libfollytestmain.la
TESTS += iterator_test
check_PROGRAMS += $(TESTS)
ACLOCAL_AMFLAGS = -I m4
# depends on libfollybenchmark
# TESTS = function_benchmark
# check_PROGRAMS = $(TESTS)
# noinst_HEADERS = test_functions.h benchmark_impl.h
# function_benchmark_SOURCES = benchmark_impl.cpp main.cpp test_functions.cpp
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment