Browse Source

[master] Merge branch 'trac3092'

Stephen Morris 11 years ago
parent
commit
e9beef0b43

+ 5 - 1
Makefile.am

@@ -2,7 +2,7 @@ ACLOCAL_AMFLAGS = -I m4macros -I examples/m4 ${ACLOCAL_FLAGS}
 # ^^^^^^^^ This has to be the first line and cannot come later in this
 # Makefile.am due to some bork in some versions of autotools.
 
-SUBDIRS = compatcheck doc . src tests m4macros
+SUBDIRS = compatcheck doc . src tests m4macros ext
 USE_LCOV=@USE_LCOV@
 LCOV=@LCOV@
 GENHTML=@GENHTML@
@@ -435,6 +435,10 @@ pkgconfig_DATA = dns++.pc
 
 CLEANFILES = $(abs_top_builddir)/logger_lockfile
 
+# config.h may be included by headers supplied for building user-written
+# hooks libraries, so we need to include it in the distribution.
+pkginclude_HEADERS = config.h
+
 if HAVE_GTEST_SOURCE
 noinst_LIBRARIES = libgtest.a
 libgtest_a_CXXFLAGS = $(GTEST_INCLUDES) $(AM_CXXFLAGS)

+ 3 - 0
configure.ac

@@ -1226,6 +1226,9 @@ AC_CONFIG_FILES([Makefile
                  doc/guide/Makefile
                  doc/design/Makefile
                  doc/design/datasrc/Makefile
+                 ext/Makefile
+                 ext/asio/Makefile
+                 ext/asio/asio/Makefile
                  compatcheck/Makefile
                  src/Makefile
                  src/bin/Makefile

+ 6 - 0
ext/Makefile.am

@@ -0,0 +1,6 @@
+SUBDIRS = . asio
+
+# As we are copying ASIO headers to the installation directory, copy across
+# the licence file as well.
+asio_datadir = $(pkgincludedir)/asio
+asio_data_DATA = LICENSE_1_0.txt

+ 6 - 0
ext/asio/Makefile.am

@@ -0,0 +1,6 @@
+SUBDIRS = . asio
+
+# As we are copying across the ASIO files to the installation directory, copy
+# across the README that tells us where we got them from.
+asio_datadir = $(pkgincludedir)/asio
+asio_data_DATA = README

+ 310 - 0
ext/asio/asio/Makefile.am

@@ -0,0 +1,310 @@
+SUBDIRS = .
+
+# Copy across the BIND 10 copy of ASIO to the installation directory, as some
+# header files used by user-libraries may use parts of it.
+asio_includedir = $(pkgincludedir)/asio
+nobase_asio_include_HEADERS = \
+    basic_datagram_socket.hpp \
+    basic_deadline_timer.hpp \
+    basic_io_object.hpp \
+    basic_raw_socket.hpp \
+    basic_serial_port.hpp \
+    basic_socket.hpp \
+    basic_socket_acceptor.hpp \
+    basic_socket_iostream.hpp \
+    basic_socket_streambuf.hpp \
+    basic_stream_socket.hpp \
+    basic_streambuf.hpp \
+    basic_streambuf_fwd.hpp \
+    buffer.hpp \
+    buffered_read_stream.hpp \
+    buffered_read_stream_fwd.hpp \
+    buffered_stream.hpp \
+    buffered_stream_fwd.hpp \
+    buffered_write_stream.hpp \
+    buffered_write_stream_fwd.hpp \
+    buffers_iterator.hpp \
+    completion_condition.hpp \
+    datagram_socket_service.hpp \
+    deadline_timer.hpp \
+    deadline_timer_service.hpp \
+    detail/array_fwd.hpp \
+    detail/base_from_completion_cond.hpp \
+    detail/bind_handler.hpp \
+    detail/buffer_resize_guard.hpp \
+    detail/buffer_sequence_adapter.hpp \
+    detail/buffered_stream_storage.hpp \
+    detail/call_stack.hpp \
+    detail/completion_handler.hpp \
+    detail/config.hpp \
+    detail/consuming_buffers.hpp \
+    detail/deadline_timer_service.hpp \
+    detail/descriptor_ops.hpp \
+    detail/descriptor_read_op.hpp \
+    detail/descriptor_write_op.hpp \
+    detail/dev_poll_reactor.hpp \
+    detail/dev_poll_reactor_fwd.hpp \
+    detail/epoll_reactor.hpp \
+    detail/epoll_reactor_fwd.hpp \
+    detail/event.hpp \
+    detail/eventfd_select_interrupter.hpp \
+    detail/fd_set_adapter.hpp \
+    detail/fenced_block.hpp \
+    detail/gcc_arm_fenced_block.hpp \
+    detail/gcc_fenced_block.hpp \
+    detail/gcc_hppa_fenced_block.hpp \
+    detail/gcc_sync_fenced_block.hpp \
+    detail/gcc_x86_fenced_block.hpp \
+    detail/handler_alloc_helpers.hpp \
+    detail/handler_invoke_helpers.hpp \
+    detail/hash_map.hpp \
+    detail/impl/descriptor_ops.ipp \
+    detail/impl/dev_poll_reactor.hpp \
+    detail/impl/dev_poll_reactor.ipp \
+    detail/impl/epoll_reactor.hpp \
+    detail/impl/epoll_reactor.ipp \
+    detail/impl/eventfd_select_interrupter.ipp \
+    detail/impl/kqueue_reactor.hpp \
+    detail/impl/kqueue_reactor.ipp \
+    detail/impl/pipe_select_interrupter.ipp \
+    detail/impl/posix_event.ipp \
+    detail/impl/posix_mutex.ipp \
+    detail/impl/posix_thread.ipp \
+    detail/impl/posix_tss_ptr.ipp \
+    detail/impl/reactive_descriptor_service.ipp \
+    detail/impl/reactive_serial_port_service.ipp \
+    detail/impl/reactive_socket_service_base.ipp \
+    detail/impl/resolver_service_base.ipp \
+    detail/impl/select_reactor.hpp \
+    detail/impl/select_reactor.ipp \
+    detail/impl/service_registry.hpp \
+    detail/impl/service_registry.ipp \
+    detail/impl/socket_ops.ipp \
+    detail/impl/socket_select_interrupter.ipp \
+    detail/impl/strand_service.hpp \
+    detail/impl/strand_service.ipp \
+    detail/impl/task_io_service.hpp \
+    detail/impl/task_io_service.ipp \
+    detail/impl/throw_error.ipp \
+    detail/impl/timer_queue.ipp \
+    detail/impl/timer_queue_set.ipp \
+    detail/impl/win_event.ipp \
+    detail/impl/win_iocp_handle_service.ipp \
+    detail/impl/win_iocp_io_service.hpp \
+    detail/impl/win_iocp_io_service.ipp \
+    detail/impl/win_iocp_serial_port_service.ipp \
+    detail/impl/win_iocp_socket_service_base.ipp \
+    detail/impl/win_mutex.ipp \
+    detail/impl/win_thread.ipp \
+    detail/impl/win_tss_ptr.ipp \
+    detail/impl/winsock_init.ipp \
+    detail/io_control.hpp \
+    detail/kqueue_reactor.hpp \
+    detail/kqueue_reactor_fwd.hpp \
+    detail/local_free_on_block_exit.hpp \
+    detail/macos_fenced_block.hpp \
+    detail/mutex.hpp \
+    detail/noncopyable.hpp \
+    detail/null_buffers_op.hpp \
+    detail/null_event.hpp \
+    detail/null_fenced_block.hpp \
+    detail/null_mutex.hpp \
+    detail/null_signal_blocker.hpp \
+    detail/null_thread.hpp \
+    detail/null_tss_ptr.hpp \
+    detail/object_pool.hpp \
+    detail/old_win_sdk_compat.hpp \
+    detail/op_queue.hpp \
+    detail/operation.hpp \
+    detail/pipe_select_interrupter.hpp \
+    detail/pop_options.hpp \
+    detail/posix_event.hpp \
+    detail/posix_fd_set_adapter.hpp \
+    detail/posix_mutex.hpp \
+    detail/posix_signal_blocker.hpp \
+    detail/posix_thread.hpp \
+    detail/posix_tss_ptr.hpp \
+    detail/push_options.hpp \
+    detail/reactive_descriptor_service.hpp \
+    detail/reactive_null_buffers_op.hpp \
+    detail/reactive_serial_port_service.hpp \
+    detail/reactive_socket_accept_op.hpp \
+    detail/reactive_socket_connect_op.hpp \
+    detail/reactive_socket_recv_op.hpp \
+    detail/reactive_socket_recvfrom_op.hpp \
+    detail/reactive_socket_send_op.hpp \
+    detail/reactive_socket_sendto_op.hpp \
+    detail/reactive_socket_service.hpp \
+    detail/reactive_socket_service_base.hpp \
+    detail/reactor.hpp \
+    detail/reactor_fwd.hpp \
+    detail/reactor_op.hpp \
+    detail/reactor_op_queue.hpp \
+    detail/regex_fwd.hpp \
+    detail/resolve_endpoint_op.hpp \
+    detail/resolve_op.hpp \
+    detail/resolver_service.hpp \
+    detail/resolver_service_base.hpp \
+    detail/scoped_lock.hpp \
+    detail/select_interrupter.hpp \
+    detail/select_reactor.hpp \
+    detail/select_reactor_fwd.hpp \
+    detail/service_base.hpp \
+    detail/service_id.hpp \
+    detail/service_registry.hpp \
+    detail/service_registry_fwd.hpp \
+    detail/shared_ptr.hpp \
+    detail/signal_blocker.hpp \
+    detail/signal_init.hpp \
+    detail/socket_holder.hpp \
+    detail/socket_ops.hpp \
+    detail/socket_option.hpp \
+    detail/socket_select_interrupter.hpp \
+    detail/socket_types.hpp \
+    detail/solaris_fenced_block.hpp \
+    detail/strand_service.hpp \
+    detail/task_io_service.hpp \
+    detail/task_io_service_fwd.hpp \
+    detail/task_io_service_operation.hpp \
+    detail/thread.hpp \
+    detail/throw_error.hpp \
+    detail/timer_op.hpp \
+    detail/timer_queue.hpp \
+    detail/timer_queue_base.hpp \
+    detail/timer_queue_fwd.hpp \
+    detail/timer_queue_set.hpp \
+    detail/timer_scheduler.hpp \
+    detail/timer_scheduler_fwd.hpp \
+    detail/tss_ptr.hpp \
+    detail/wait_handler.hpp \
+    detail/weak_ptr.hpp \
+    detail/win_event.hpp \
+    detail/win_fd_set_adapter.hpp \
+    detail/win_fenced_block.hpp \
+    detail/win_iocp_handle_read_op.hpp \
+    detail/win_iocp_handle_service.hpp \
+    detail/win_iocp_handle_write_op.hpp \
+    detail/win_iocp_io_service.hpp \
+    detail/win_iocp_io_service_fwd.hpp \
+    detail/win_iocp_null_buffers_op.hpp \
+    detail/win_iocp_operation.hpp \
+    detail/win_iocp_overlapped_op.hpp \
+    detail/win_iocp_overlapped_ptr.hpp \
+    detail/win_iocp_serial_port_service.hpp \
+    detail/win_iocp_socket_accept_op.hpp \
+    detail/win_iocp_socket_recv_op.hpp \
+    detail/win_iocp_socket_recvfrom_op.hpp \
+    detail/win_iocp_socket_send_op.hpp \
+    detail/win_iocp_socket_service.hpp \
+    detail/win_iocp_socket_service_base.hpp \
+    detail/win_mutex.hpp \
+    detail/win_signal_blocker.hpp \
+    detail/win_thread.hpp \
+    detail/win_tss_ptr.hpp \
+    detail/wince_thread.hpp \
+    detail/winsock_init.hpp \
+    detail/wrapped_handler.hpp \
+    error.hpp \
+    error_code.hpp \
+    handler_alloc_hook.hpp \
+    handler_invoke_hook.hpp \
+    impl/error.ipp \
+    impl/error_code.ipp \
+    impl/io_service.hpp \
+    impl/io_service.ipp \
+    impl/read.hpp \
+    impl/read.ipp \
+    impl/read_at.hpp \
+    impl/read_at.ipp \
+    impl/read_until.hpp \
+    impl/read_until.ipp \
+    impl/serial_port_base.hpp \
+    impl/serial_port_base.ipp \
+    impl/src.cpp \
+    impl/src.hpp \
+    impl/write.hpp \
+    impl/write.ipp \
+    impl/write_at.hpp \
+    impl/write_at.ipp \
+    io_service.hpp \
+    ip/address.hpp \
+    ip/address_v4.hpp \
+    ip/address_v6.hpp \
+    ip/basic_endpoint.hpp \
+    ip/basic_resolver.hpp \
+    ip/basic_resolver_entry.hpp \
+    ip/basic_resolver_iterator.hpp \
+    ip/basic_resolver_query.hpp \
+    ip/detail/endpoint.hpp \
+    ip/detail/impl/endpoint.ipp \
+    ip/detail/socket_option.hpp \
+    ip/host_name.hpp \
+    ip/icmp.hpp \
+    ip/impl/address.hpp \
+    ip/impl/address.ipp \
+    ip/impl/address_v4.hpp \
+    ip/impl/address_v4.ipp \
+    ip/impl/address_v6.hpp \
+    ip/impl/address_v6.ipp \
+    ip/impl/basic_endpoint.hpp \
+    ip/impl/host_name.ipp \
+    ip/multicast.hpp \
+    ip/resolver_query_base.hpp \
+    ip/resolver_service.hpp \
+    ip/tcp.hpp \
+    ip/udp.hpp \
+    ip/unicast.hpp \
+    ip/v6_only.hpp \
+    is_read_buffered.hpp \
+    is_write_buffered.hpp \
+    local/basic_endpoint.hpp \
+    local/connect_pair.hpp \
+    local/datagram_protocol.hpp \
+    local/detail/endpoint.hpp \
+    local/detail/impl/endpoint.ipp \
+    local/stream_protocol.hpp \
+    placeholders.hpp \
+    posix/basic_descriptor.hpp \
+    posix/basic_stream_descriptor.hpp \
+    posix/descriptor_base.hpp \
+    posix/stream_descriptor.hpp \
+    posix/stream_descriptor_service.hpp \
+    raw_socket_service.hpp \
+    read.hpp \
+    read_at.hpp \
+    read_until.hpp \
+    serial_port.hpp \
+    serial_port_base.hpp \
+    serial_port_service.hpp \
+    socket_acceptor_service.hpp \
+    socket_base.hpp \
+    ssl.hpp \
+    ssl/basic_context.hpp \
+    ssl/context.hpp \
+    ssl/context_base.hpp \
+    ssl/context_service.hpp \
+    ssl/detail/openssl_context_service.hpp \
+    ssl/detail/openssl_init.hpp \
+    ssl/detail/openssl_operation.hpp \
+    ssl/detail/openssl_stream_service.hpp \
+    ssl/detail/openssl_types.hpp \
+    ssl/stream.hpp \
+    ssl/stream_base.hpp \
+    ssl/stream_service.hpp \
+    strand.hpp \
+    stream_socket_service.hpp \
+    streambuf.hpp \
+    system_error.hpp \
+    thread.hpp \
+    time_traits.hpp \
+    version.hpp \
+    windows/basic_handle.hpp \
+    windows/basic_random_access_handle.hpp \
+    windows/basic_stream_handle.hpp \
+    windows/overlapped_ptr.hpp \
+    windows/random_access_handle.hpp \
+    windows/random_access_handle_service.hpp \
+    windows/stream_handle.hpp \
+    windows/stream_handle_service.hpp \
+    write.hpp \
+    write_at.hpp

+ 4 - 0
src/lib/asiolink/Makefile.am

@@ -43,3 +43,7 @@ libb10_asiolink_la_CXXFLAGS += -Wno-error
 endif
 libb10_asiolink_la_CPPFLAGS = $(AM_CPPFLAGS)
 libb10_asiolink_la_LIBADD = $(top_builddir)/src/lib/exceptions/libb10-exceptions.la
+
+# IOAddress is sometimes used in user-library code
+libb10_asiolink_includedir = $(pkgincludedir)/asiolink
+libb10_asiolink_include_HEADERS = io_address.h

+ 30 - 0
src/lib/dhcp/Makefile.am

@@ -55,6 +55,36 @@ libb10_dhcp___la_LDFLAGS  = -no-undefined -version-info 2:0:0
 
 EXTRA_DIST  = README libdhcp++.dox
 
+# Specify the headers for copying into the installation directory tree. User-
+# written libraries may need access to all libdhcp++ headers.
+libb10_dhcp___includedir = $(pkgincludedir)/dhcp
+libb10_dhcp___include_HEADERS = \
+    dhcp4.h \
+    dhcp6.h \
+    duid.h \
+    hwaddr.h \
+    iface_mgr.h \
+    libdhcp++.h \
+    option.h \
+    option4_addrlst.h \
+    option6_addrlst.h \
+    option6_ia.h \
+    option6_iaaddr.h \
+    option_custom.h \
+    option_data_types.h \
+    option_definition.h \
+    option_int.h \
+    option_int_array.h \
+    option_space.h \
+    option_string.h \
+    pkt4.h \
+    pkt6.h \
+    pkt_filter.h \
+    pkt_filter_inet.h \
+    pkt_filter_lpf.h \
+    protocol_util.h \
+    std_option_defs.h
+
 if USE_CLANGPP
 # Disable unused parameter warning caused by some of the
 # Boost headers when compiling with clang.

+ 8 - 0
src/lib/hooks/Makefile.am

@@ -48,6 +48,14 @@ libb10_hooks_la_LIBADD += $(top_builddir)/src/lib/log/libb10-log.la
 libb10_hooks_la_LIBADD += $(top_builddir)/src/lib/util/libb10-util.la
 libb10_hooks_la_LIBADD += $(top_builddir)/src/lib/exceptions/libb10-exceptions.la
 
+# Specify the headers for copying into the installation directory tree. User-
+# written libraries only need the definitions from the headers for the
+# CalloutHandle and LibraryHandle objects.
+libb10_hooks_includedir = $(pkgincludedir)/hooks
+libb10_hooks_include_HEADERS = \
+    callout_handle.h \
+    library_handle.h \
+    hooks.h
 
 if USE_CLANGPP
 # Disable unused parameter warning caused by some of the

+ 11 - 0
src/lib/log/Makefile.am

@@ -51,3 +51,14 @@ libb10_log_la_LIBADD   = $(top_builddir)/src/lib/util/libb10-util.la
 libb10_log_la_LIBADD  += interprocess/libb10-log_interprocess.la
 libb10_log_la_LIBADD  += $(LOG4CPLUS_LIBS)
 libb10_log_la_LDFLAGS = -no-undefined -version-info 1:0:0
+
+# Specify the headers for copying into the installation directory tree. User-
+# written libraries only need the definitions for logger.h and dependencies.
+libb10_log_includedir = $(pkgincludedir)/log
+libb10_log_include_HEADERS = \
+    log_formatter.h \
+    logger.h \
+    logger_level.h \
+    macros.h \
+    message_types.h
+

+ 1 - 1
src/lib/util/Makefile.am

@@ -45,4 +45,4 @@ libb10_util_la_LIBADD = $(top_builddir)/src/lib/exceptions/libb10-exceptions.la
 CLEANFILES = *.gcno *.gcda
 
 libb10_util_includedir = $(includedir)/$(PACKAGE_NAME)/util
-libb10_util_include_HEADERS = buffer.h
+libb10_util_include_HEADERS = buffer.h io_utilities.h