protoc 2.6.1.1 → 2.6.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ext/protoc/Makefile.in +10 -13
- data/ext/protoc/extconf.rb +0 -1
- data/ext/protoc/protobuf/CHANGES.txt +593 -0
- data/ext/protoc/protobuf/CONTRIBUTORS.txt +93 -0
- data/ext/protoc/protobuf/INSTALL.txt +237 -0
- data/ext/protoc/protobuf/LICENSE +33 -0
- data/ext/protoc/protobuf/Makefile.am +267 -0
- data/ext/protoc/protobuf/README.md +167 -0
- data/ext/protoc/protobuf/autogen.sh +41 -0
- data/ext/protoc/protobuf/benchmarks/ProtoBench.java +203 -0
- data/ext/protoc/protobuf/benchmarks/google_message1.dat +0 -0
- data/ext/protoc/protobuf/benchmarks/google_message2.dat +0 -0
- data/ext/protoc/protobuf/benchmarks/google_size.proto +136 -0
- data/ext/protoc/protobuf/benchmarks/google_speed.proto +136 -0
- data/ext/protoc/protobuf/benchmarks/readme.txt +50 -0
- data/ext/protoc/protobuf/configure.ac +159 -0
- data/ext/protoc/protobuf/editors/README.txt +5 -0
- data/ext/protoc/protobuf/editors/proto.vim +105 -0
- data/ext/protoc/protobuf/editors/protobuf-mode.el +220 -0
- data/ext/protoc/protobuf/examples/AddPerson.java +95 -0
- data/ext/protoc/protobuf/examples/ListPeople.java +50 -0
- data/ext/protoc/protobuf/examples/Makefile +58 -0
- data/ext/protoc/protobuf/examples/README.txt +29 -0
- data/ext/protoc/protobuf/examples/add_person.cc +95 -0
- data/ext/protoc/protobuf/examples/add_person.py +58 -0
- data/ext/protoc/protobuf/examples/addressbook.proto +30 -0
- data/ext/protoc/protobuf/examples/list_people.cc +68 -0
- data/ext/protoc/protobuf/examples/list_people.py +38 -0
- data/ext/protoc/protobuf/generate_descriptor_proto.sh +33 -0
- data/ext/protoc/protobuf/java/README.txt +96 -0
- data/ext/protoc/protobuf/java/pom.xml +217 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/AbstractMessage.java +466 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/AbstractMessageLite.java +355 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/AbstractParser.java +253 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/BlockingRpcChannel.java +51 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/BlockingService.java +64 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/BoundedByteString.java +163 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ByteString.java +1022 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/CodedInputStream.java +1311 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/CodedOutputStream.java +1297 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Descriptors.java +2238 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/DynamicMessage.java +622 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Extension.java +96 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ExtensionRegistry.java +392 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ExtensionRegistryLite.java +185 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/FieldSet.java +907 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessage.java +2213 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/GeneratedMessageLite.java +949 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Internal.java +391 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/InvalidProtocolBufferException.java +122 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LazyField.java +154 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LazyFieldLite.java +176 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LazyStringArrayList.java +367 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LazyStringList.java +163 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/LiteralByteString.java +362 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Message.java +244 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/MessageLite.java +320 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/MessageLiteOrBuilder.java +60 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/MessageOrBuilder.java +143 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/MessageReflection.java +931 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Parser.java +261 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ProtocolMessageEnum.java +58 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ProtocolStringList.java +48 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RepeatedFieldBuilder.java +696 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RopeByteString.java +957 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RpcCallback.java +47 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RpcChannel.java +71 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RpcController.java +118 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/RpcUtil.java +134 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Service.java +117 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/ServiceException.java +52 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/SingleFieldBuilder.java +241 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/SmallSortedMap.java +618 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/TextFormat.java +1984 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/UninitializedMessageException.java +99 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/UnknownFieldSet.java +995 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/UnmodifiableLazyStringList.java +205 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/Utf8.java +349 -0
- data/ext/protoc/protobuf/java/src/main/java/com/google/protobuf/WireFormat.java +163 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/AbstractMessageTest.java +527 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/BoundedByteStringTest.java +68 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/ByteStringTest.java +759 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/CheckUtf8Test.java +141 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/CodedInputStreamTest.java +769 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/CodedOutputStreamTest.java +401 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/DeprecatedFieldTest.java +80 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/DescriptorsTest.java +735 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/DynamicMessageTest.java +326 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/ForceFieldBuildersPreRun.java +48 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/GeneratedMessageTest.java +1515 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/IsValidUtf8Test.java +180 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/IsValidUtf8TestUtil.java +421 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyFieldLiteTest.java +134 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyFieldTest.java +121 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyMessageLiteTest.java +319 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyStringArrayListTest.java +174 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LazyStringEndToEndTest.java +143 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LiteEqualsAndHashTest.java +85 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LiteTest.java +148 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/LiteralByteStringTest.java +396 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/MessageTest.java +353 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/NestedBuildersTest.java +185 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/ParserTest.java +381 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/RepeatedFieldBuilderTest.java +190 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/RopeByteStringSubstringTest.java +97 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/RopeByteStringTest.java +115 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/ServiceTest.java +320 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/SingleFieldBuilderTest.java +155 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/SmallSortedMapTest.java +420 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/TestBadIdentifiers.java +96 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/TestUtil.java +4124 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/TextFormatTest.java +994 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/UnknownFieldSetTest.java +653 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/UnmodifiableLazyStringListTest.java +227 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/WireFormatTest.java +606 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/lazy_fields_lite.proto +61 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/lite_equals_and_hash.proto +55 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/multiple_files_test.proto +77 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/nested_builders_test.proto +53 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/nested_extension.proto +46 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/nested_extension_lite.proto +48 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/non_nested_extension.proto +49 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/non_nested_extension_lite.proto +50 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/outer_class_name_test.proto +38 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/outer_class_name_test2.proto +42 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/outer_class_name_test3.proto +43 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_bad_identifiers.proto +157 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_check_utf8.proto +50 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_check_utf8_size.proto +51 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_custom_options.proto +43 -0
- data/ext/protoc/protobuf/java/src/test/java/com/google/protobuf/test_extra_interfaces.proto +60 -0
- data/ext/protoc/protobuf/m4/ac_system_extensions.m4 +37 -0
- data/ext/protoc/protobuf/m4/acx_check_suncc.m4 +75 -0
- data/ext/protoc/protobuf/m4/acx_pthread.m4 +397 -0
- data/ext/protoc/protobuf/m4/stl_hash.m4 +72 -0
- data/ext/protoc/protobuf/more_tests/Makefile +41 -0
- data/ext/protoc/protobuf/post_process_dist.sh +60 -0
- data/ext/protoc/protobuf/protobuf-lite.pc.in +13 -0
- data/ext/protoc/protobuf/protobuf.pc.in +14 -0
- data/ext/protoc/protobuf/python/README.txt +105 -0
- data/ext/protoc/protobuf/python/ez_setup.py +284 -0
- data/ext/protoc/protobuf/python/google/__init__.py +1 -0
- data/ext/protoc/protobuf/python/google/protobuf/__init__.py +0 -0
- data/ext/protoc/protobuf/python/google/protobuf/descriptor.py +849 -0
- data/ext/protoc/protobuf/python/google/protobuf/descriptor_database.py +137 -0
- data/ext/protoc/protobuf/python/google/protobuf/descriptor_pool.py +643 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/__init__.py +0 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/api_implementation.cc +139 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/api_implementation.py +89 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/api_implementation_default_test.py +63 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/containers.py +269 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/cpp_message.py +663 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/decoder.py +831 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_database_test.py +63 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_pool_test.py +564 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_pool_test1.proto +94 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_pool_test2.proto +70 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_python_test.py +54 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/descriptor_test.py +669 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/encoder.py +788 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/enum_type_wrapper.py +89 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/factory_test1.proto +57 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/factory_test2.proto +92 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/generator_test.py +343 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/message_factory_python_test.py +54 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/message_factory_test.py +131 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/message_listener.py +78 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/message_python_test.py +54 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/message_test.py +681 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/missing_enum_values.proto +50 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/more_extensions.proto +58 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/more_extensions_dynamic.proto +49 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/more_messages.proto +51 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/python_message.py +1251 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/reflection_test.py +2934 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/service_reflection_test.py +136 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/symbol_database_test.py +120 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/test_bad_identifiers.proto +52 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/test_util.py +662 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/text_encoding_test.py +68 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/text_format_test.py +743 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/type_checkers.py +328 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/unknown_fields_test.py +231 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/wire_format.py +268 -0
- data/ext/protoc/protobuf/python/google/protobuf/internal/wire_format_test.py +253 -0
- data/ext/protoc/protobuf/python/google/protobuf/message.py +284 -0
- data/ext/protoc/protobuf/python/google/protobuf/message_factory.py +155 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/README +6 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/__init__.py +0 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/cpp_message.py +61 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/descriptor.cc +357 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/descriptor.h +96 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/descriptor_cpp2_test.py +58 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/extension_dict.cc +338 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/extension_dict.h +123 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/message.cc +2561 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/message.h +305 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/message_factory_cpp2_test.py +56 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/proto2_api_test.proto +38 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/python.proto +66 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/python_protobuf.h +57 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/reflection_cpp2_generated_test.py +94 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/repeated_composite_container.cc +763 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/repeated_composite_container.h +172 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/repeated_scalar_container.cc +825 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/repeated_scalar_container.h +112 -0
- data/ext/protoc/protobuf/python/google/protobuf/pyext/scoped_pyobject_ptr.h +95 -0
- data/ext/protoc/protobuf/python/google/protobuf/reflection.py +205 -0
- data/ext/protoc/protobuf/python/google/protobuf/service.py +226 -0
- data/ext/protoc/protobuf/python/google/protobuf/service_reflection.py +284 -0
- data/ext/protoc/protobuf/python/google/protobuf/symbol_database.py +185 -0
- data/ext/protoc/protobuf/python/google/protobuf/text_encoding.py +110 -0
- data/ext/protoc/protobuf/python/google/protobuf/text_format.py +873 -0
- data/ext/protoc/protobuf/python/mox.py +1401 -0
- data/ext/protoc/protobuf/python/setup.py +201 -0
- data/ext/protoc/protobuf/python/stubout.py +140 -0
- data/ext/protoc/protobuf/src/Makefile.am +418 -0
- data/ext/protoc/protobuf/src/google/protobuf/SEBS +240 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/code_generator.cc +84 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/code_generator.h +145 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/command_line_interface.cc +1603 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/command_line_interface.h +378 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/command_line_interface_unittest.cc +1654 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc +158 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.cc +288 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_enum.h +103 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.cc +431 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_enum_field.h +122 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.cc +210 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_extension.h +86 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_field.cc +166 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_field.h +185 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_file.cc +665 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_file.h +99 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.cc +125 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_generator.h +72 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.cc +494 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_helpers.h +206 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc +2645 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_message.h +175 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.cc +375 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_message_field.h +121 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_options.h +58 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_plugin_unittest.cc +123 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.cc +451 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_primitive_field.h +123 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_service.cc +334 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_service.h +118 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.cc +642 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_string_field.h +127 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_test_bad_identifiers.proto +132 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.cc +2074 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/cpp/cpp_unittest.h +51 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/importer.cc +480 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/importer.h +317 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/importer_unittest.cc +617 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_context.cc +195 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_context.h +95 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_doc_comment.cc +233 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_doc_comment.h +69 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_doc_comment_unittest.cc +67 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_enum.cc +333 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_enum.h +99 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_enum_field.cc +778 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_enum_field.h +158 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_extension.cc +207 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_extension.h +109 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_field.cc +213 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_field.h +162 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_file.cc +534 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_file.h +115 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_generator.cc +158 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_generator.h +72 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_generator_factory.cc +77 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_generator_factory.h +101 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_helpers.cc +737 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_helpers.h +322 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_lazy_message_field.cc +826 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_lazy_message_field.h +121 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_message.cc +1666 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_message.h +140 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_message_field.cc +1343 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_message_field.h +173 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_name_resolver.cc +266 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_name_resolver.h +124 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc +124 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_primitive_field.cc +877 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_primitive_field.h +160 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_service.cc +473 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_service.h +135 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.cc +201 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_shared_code_generator.h +90 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_string_field.cc +1056 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/java/java_string_field.h +160 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/main.cc +61 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/mock_code_generator.cc +240 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/mock_code_generator.h +117 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/package_info.h +64 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/parser.cc +1750 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/parser.h +522 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/parser_unittest.cc +2612 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.cc +163 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.h +72 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.pb.cc +1148 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.pb.h +897 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/plugin.proto +147 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/python/python_generator.cc +1262 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/python/python_generator.h +166 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/python/python_plugin_unittest.cc +118 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/subprocess.cc +463 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/subprocess.h +108 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/test_plugin.cc +51 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/zip_output_unittest.sh +91 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/zip_writer.cc +218 -0
- data/ext/protoc/protobuf/src/google/protobuf/compiler/zip_writer.h +93 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor.cc +5420 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor.h +1691 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor.pb.cc +9135 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor.pb.h +6761 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor.proto +687 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor_database.cc +543 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor_database.h +369 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor_database_unittest.cc +748 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor_pb2_test.py +54 -0
- data/ext/protoc/protobuf/src/google/protobuf/descriptor_unittest.cc +5501 -0
- data/ext/protoc/protobuf/src/google/protobuf/dynamic_message.cc +764 -0
- data/ext/protoc/protobuf/src/google/protobuf/dynamic_message.h +148 -0
- data/ext/protoc/protobuf/src/google/protobuf/dynamic_message_unittest.cc +230 -0
- data/ext/protoc/protobuf/src/google/protobuf/extension_set.cc +1663 -0
- data/ext/protoc/protobuf/src/google/protobuf/extension_set.h +1234 -0
- data/ext/protoc/protobuf/src/google/protobuf/extension_set_heavy.cc +734 -0
- data/ext/protoc/protobuf/src/google/protobuf/extension_set_unittest.cc +1095 -0
- data/ext/protoc/protobuf/src/google/protobuf/generated_enum_reflection.h +91 -0
- data/ext/protoc/protobuf/src/google/protobuf/generated_message_reflection.cc +1683 -0
- data/ext/protoc/protobuf/src/google/protobuf/generated_message_reflection.h +504 -0
- data/ext/protoc/protobuf/src/google/protobuf/generated_message_reflection_unittest.cc +795 -0
- data/ext/protoc/protobuf/src/google/protobuf/generated_message_util.cc +65 -0
- data/ext/protoc/protobuf/src/google/protobuf/generated_message_util.h +113 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/coded_stream.cc +914 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/coded_stream.h +1220 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/coded_stream_inl.h +69 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/coded_stream_unittest.cc +1378 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/gzip_stream.cc +326 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/gzip_stream.h +209 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/gzip_stream_unittest.sh +44 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/package_info.h +54 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/printer.cc +198 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/printer.h +136 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/printer_unittest.cc +285 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/strtod.cc +113 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/strtod.h +50 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/tokenizer.cc +1127 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/tokenizer.h +402 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/tokenizer_unittest.cc +999 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream.cc +57 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream.h +248 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_impl.cc +473 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_impl.h +358 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.cc +405 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_impl_lite.h +354 -0
- data/ext/protoc/protobuf/src/google/protobuf/io/zero_copy_stream_unittest.cc +965 -0
- data/ext/protoc/protobuf/src/google/protobuf/lite_unittest.cc +350 -0
- data/ext/protoc/protobuf/src/google/protobuf/message.cc +358 -0
- data/ext/protoc/protobuf/src/google/protobuf/message.h +866 -0
- data/ext/protoc/protobuf/src/google/protobuf/message_lite.cc +335 -0
- data/ext/protoc/protobuf/src/google/protobuf/message_lite.h +247 -0
- data/ext/protoc/protobuf/src/google/protobuf/message_unittest.cc +427 -0
- data/ext/protoc/protobuf/src/google/protobuf/package_info.h +64 -0
- data/ext/protoc/protobuf/src/google/protobuf/reflection_ops.cc +269 -0
- data/ext/protoc/protobuf/src/google/protobuf/reflection_ops.h +81 -0
- data/ext/protoc/protobuf/src/google/protobuf/reflection_ops_unittest.cc +475 -0
- data/ext/protoc/protobuf/src/google/protobuf/repeated_field.cc +87 -0
- data/ext/protoc/protobuf/src/google/protobuf/repeated_field.h +1603 -0
- data/ext/protoc/protobuf/src/google/protobuf/repeated_field_reflection_unittest.cc +195 -0
- data/ext/protoc/protobuf/src/google/protobuf/repeated_field_unittest.cc +1442 -0
- data/ext/protoc/protobuf/src/google/protobuf/service.cc +46 -0
- data/ext/protoc/protobuf/src/google/protobuf/service.h +291 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops.h +227 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_arm64_gcc.h +325 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_gcc.h +151 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_arm_qnx.h +146 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_atomicword_compat.h +122 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_generic_gcc.h +137 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_macosx.h +225 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_mips_gcc.h +313 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_pnacl.h +73 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_solaris.h +188 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_tsan.h +219 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.cc +137 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_gcc.h +293 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.cc +112 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/atomicops_internals_x86_msvc.h +150 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/common.cc +395 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/common.h +1226 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/common_unittest.cc +357 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/hash.h +232 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/map_util.h +771 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/once.cc +99 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/once.h +166 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/once_unittest.cc +253 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/platform_macros.h +103 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/shared_ptr.h +470 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/stl_util.h +121 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/stringprintf.cc +175 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/stringprintf.h +76 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/stringprintf_unittest.cc +152 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/structurally_valid.cc +536 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/structurally_valid_unittest.cc +40 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/strutil.cc +1279 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/strutil.h +562 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/strutil_unittest.cc +73 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/substitute.cc +134 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/substitute.h +170 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/template_util.h +138 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/template_util_unittest.cc +130 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/type_traits.h +336 -0
- data/ext/protoc/protobuf/src/google/protobuf/stubs/type_traits_unittest.cc +628 -0
- data/ext/protoc/protobuf/src/google/protobuf/test_util.cc +3345 -0
- data/ext/protoc/protobuf/src/google/protobuf/test_util.h +215 -0
- data/ext/protoc/protobuf/src/google/protobuf/test_util_lite.cc +1585 -0
- data/ext/protoc/protobuf/src/google/protobuf/test_util_lite.h +101 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/bad_utf8_string +1 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/golden_message +0 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/golden_message_oneof_implemented +0 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/golden_packed_fields_message +0 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_data.txt +134 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_data_oneof_implemented.txt +129 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_data_pointy.txt +134 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_data_pointy_oneof.txt +129 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_extensions_data.txt +134 -0
- data/ext/protoc/protobuf/src/google/protobuf/testdata/text_format_unittest_extensions_data_pointy.txt +134 -0
- data/ext/protoc/protobuf/src/google/protobuf/testing/file.cc +194 -0
- data/ext/protoc/protobuf/src/google/protobuf/testing/file.h +97 -0
- data/ext/protoc/protobuf/src/google/protobuf/testing/googletest.cc +255 -0
- data/ext/protoc/protobuf/src/google/protobuf/testing/googletest.h +102 -0
- data/ext/protoc/protobuf/src/google/protobuf/testing/zcgunzip.cc +73 -0
- data/ext/protoc/protobuf/src/google/protobuf/testing/zcgzip.cc +79 -0
- data/ext/protoc/protobuf/src/google/protobuf/text_format.cc +1746 -0
- data/ext/protoc/protobuf/src/google/protobuf/text_format.h +473 -0
- data/ext/protoc/protobuf/src/google/protobuf/text_format_unittest.cc +1479 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest.proto +861 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_custom_options.proto +393 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_embed_optimize_for.proto +50 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_empty.proto +37 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_enormous_descriptor.proto +1046 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_import.proto +64 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_import_lite.proto +51 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_import_public.proto +40 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_import_public_lite.proto +42 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_lite.proto +384 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_lite_imports_nonlite.proto +43 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_mset.proto +83 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_no_generic_services.proto +53 -0
- data/ext/protoc/protobuf/src/google/protobuf/unittest_optimize_for.proto +66 -0
- data/ext/protoc/protobuf/src/google/protobuf/unknown_field_set.cc +265 -0
- data/ext/protoc/protobuf/src/google/protobuf/unknown_field_set.h +318 -0
- data/ext/protoc/protobuf/src/google/protobuf/unknown_field_set_unittest.cc +599 -0
- data/ext/protoc/protobuf/src/google/protobuf/wire_format.cc +1101 -0
- data/ext/protoc/protobuf/src/google/protobuf/wire_format.h +336 -0
- data/ext/protoc/protobuf/src/google/protobuf/wire_format_lite.cc +471 -0
- data/ext/protoc/protobuf/src/google/protobuf/wire_format_lite.h +661 -0
- data/ext/protoc/protobuf/src/google/protobuf/wire_format_lite_inl.h +860 -0
- data/ext/protoc/protobuf/src/google/protobuf/wire_format_unittest.cc +1120 -0
- data/ext/protoc/protobuf/src/solaris/libstdc++.la +51 -0
- data/ext/protoc/protobuf/vsprojects/config.h +29 -0
- data/ext/protoc/protobuf/vsprojects/convert2008to2005.sh +20 -0
- data/ext/protoc/protobuf/vsprojects/extract_includes.bat +50 -0
- data/ext/protoc/protobuf/vsprojects/libprotobuf-lite.vcproj +302 -0
- data/ext/protoc/protobuf/vsprojects/libprotobuf.vcproj +470 -0
- data/ext/protoc/protobuf/vsprojects/libprotoc.vcproj +466 -0
- data/ext/protoc/protobuf/vsprojects/lite-test.vcproj +305 -0
- data/ext/protoc/protobuf/vsprojects/protobuf.sln +92 -0
- data/ext/protoc/protobuf/vsprojects/protoc.vcproj +192 -0
- data/ext/protoc/protobuf/vsprojects/readme.txt +114 -0
- data/ext/protoc/protobuf/vsprojects/test_plugin.vcproj +209 -0
- data/ext/protoc/protobuf/vsprojects/tests.vcproj +681 -0
- data/lib/protoc/version.rb +1 -1
- metadata +480 -3
@@ -0,0 +1,37 @@
|
|
1
|
+
dnl Provide AC_USE_SYSTEM_EXTENSIONS for old autoconf machines.
|
2
|
+
AC_DEFUN([ACX_USE_SYSTEM_EXTENSIONS],[
|
3
|
+
ifdef([AC_USE_SYSTEM_EXTENSIONS],[
|
4
|
+
AC_USE_SYSTEM_EXTENSIONS
|
5
|
+
],[
|
6
|
+
AC_BEFORE([$0], [AC_COMPILE_IFELSE])
|
7
|
+
AC_BEFORE([$0], [AC_RUN_IFELSE])
|
8
|
+
|
9
|
+
AC_REQUIRE([AC_GNU_SOURCE])
|
10
|
+
AC_REQUIRE([AC_AIX])
|
11
|
+
AC_REQUIRE([AC_MINIX])
|
12
|
+
|
13
|
+
AH_VERBATIM([__EXTENSIONS__],
|
14
|
+
[/* Enable extensions on Solaris. */
|
15
|
+
#ifndef __EXTENSIONS__
|
16
|
+
# undef __EXTENSIONS__
|
17
|
+
#endif
|
18
|
+
#ifndef _POSIX_PTHREAD_SEMANTICS
|
19
|
+
# undef _POSIX_PTHREAD_SEMANTICS
|
20
|
+
#endif
|
21
|
+
#ifndef _TANDEM_SOURCE
|
22
|
+
# undef _TANDEM_SOURCE
|
23
|
+
#endif])
|
24
|
+
AC_CACHE_CHECK([whether it is safe to define __EXTENSIONS__],
|
25
|
+
[ac_cv_safe_to_define___extensions__],
|
26
|
+
[AC_COMPILE_IFELSE(
|
27
|
+
[AC_LANG_PROGRAM([
|
28
|
+
# define __EXTENSIONS__ 1
|
29
|
+
AC_INCLUDES_DEFAULT])],
|
30
|
+
[ac_cv_safe_to_define___extensions__=yes],
|
31
|
+
[ac_cv_safe_to_define___extensions__=no])])
|
32
|
+
test $ac_cv_safe_to_define___extensions__ = yes &&
|
33
|
+
AC_DEFINE([__EXTENSIONS__])
|
34
|
+
AC_DEFINE([_POSIX_PTHREAD_SEMANTICS])
|
35
|
+
AC_DEFINE([_TANDEM_SOURCE])
|
36
|
+
])
|
37
|
+
])
|
@@ -0,0 +1,75 @@
|
|
1
|
+
dnl Check for the presence of the Sun Studio compiler.
|
2
|
+
dnl If Sun Studio compiler is found, set appropriate flags.
|
3
|
+
dnl Additionally, Sun Studio doesn't default to 64-bit by itself,
|
4
|
+
dnl nor does it automatically look in standard Solaris places for
|
5
|
+
dnl 64-bit libs, so we must add those options and paths to the search
|
6
|
+
dnl paths.
|
7
|
+
|
8
|
+
dnl TODO(kenton): This is pretty hacky. It sets CXXFLAGS, which the autoconf
|
9
|
+
dnl docs say should never be overridden except by the user. It also isn't
|
10
|
+
dnl cross-compile safe. We should fix these problems, but since I don't have
|
11
|
+
dnl Sun CC at my disposal for testing, someone else will have to do it.
|
12
|
+
|
13
|
+
AC_DEFUN([ACX_CHECK_SUNCC],[
|
14
|
+
|
15
|
+
AC_LANG_PUSH([C++])
|
16
|
+
AC_CHECK_DECL([__SUNPRO_CC], [SUNCC="yes"], [SUNCC="no"])
|
17
|
+
AC_LANG_POP()
|
18
|
+
|
19
|
+
|
20
|
+
AC_ARG_ENABLE([64bit-solaris],
|
21
|
+
[AS_HELP_STRING([--disable-64bit-solaris],
|
22
|
+
[Build 64 bit binary on Solaris @<:@default=on@:>@])],
|
23
|
+
[ac_enable_64bit="$enableval"],
|
24
|
+
[ac_enable_64bit="yes"])
|
25
|
+
|
26
|
+
AS_IF([test "$SUNCC" = "yes" -a "x${ac_cv_env_CXXFLAGS_set}" = "x"],[
|
27
|
+
dnl Sun Studio has a crashing bug with -xO4 in some cases. Keep this
|
28
|
+
dnl at -xO3 until a proper test to detect those crashes can be done.
|
29
|
+
CXXFLAGS="-g0 -xO3 -xlibmil -xdepend -xbuiltin -mt -compat=5 -library=stlport4 -library=Crun -template=no%extdef ${CXXFLAGS}"
|
30
|
+
])
|
31
|
+
|
32
|
+
case $host_os in
|
33
|
+
*solaris*)
|
34
|
+
AC_CHECK_PROGS(ISAINFO, [isainfo], [no])
|
35
|
+
AS_IF([test "x$ISAINFO" != "xno"],
|
36
|
+
[isainfo_b=`${ISAINFO} -b`],
|
37
|
+
[isainfo_b="x"])
|
38
|
+
|
39
|
+
AS_IF([test "$isainfo_b" != "x"],[
|
40
|
+
|
41
|
+
isainfo_k=`${ISAINFO} -k`
|
42
|
+
|
43
|
+
AS_IF([test "x$ac_enable_64bit" = "xyes"],[
|
44
|
+
|
45
|
+
AC_DEFINE([SOLARIS_64BIT_ENABLED], [1], [64bit enabled])
|
46
|
+
AS_IF([test "x$libdir" = "x\${exec_prefix}/lib"],[
|
47
|
+
dnl The user hasn't overridden the default libdir, so we'll
|
48
|
+
dnl the dir suffix to match solaris 32/64-bit policy
|
49
|
+
libdir="${libdir}/${isainfo_k}"
|
50
|
+
])
|
51
|
+
|
52
|
+
dnl This should just be set in CPPFLAGS and in LDFLAGS, but libtool
|
53
|
+
dnl does the wrong thing if you don't put it into CXXFLAGS. sigh.
|
54
|
+
dnl (It also needs it in CFLAGS, or it does a different wrong thing!)
|
55
|
+
AS_IF([test "x${ac_cv_env_CXXFLAGS_set}" = "x"],[
|
56
|
+
CXXFLAGS="${CXXFLAGS} -m64"
|
57
|
+
ac_cv_env_CXXFLAGS_set=set
|
58
|
+
ac_cv_env_CXXFLAGS_value='-m64'
|
59
|
+
])
|
60
|
+
|
61
|
+
AS_IF([test "x${ac_cv_env_CFLAGS_set}" = "x"],[
|
62
|
+
CFLAGS="${CFLAGS} -m64"
|
63
|
+
ac_cv_env_CFLAGS_set=set
|
64
|
+
ac_cv_env_CFLAGS_value='-m64'
|
65
|
+
])
|
66
|
+
|
67
|
+
AS_IF([test "$target_cpu" = "sparc" -a "x$SUNCC" = "xyes" ],[
|
68
|
+
CXXFLAGS="-xmemalign=8s ${CXXFLAGS}"
|
69
|
+
])
|
70
|
+
])
|
71
|
+
])
|
72
|
+
;;
|
73
|
+
esac
|
74
|
+
|
75
|
+
])
|
@@ -0,0 +1,397 @@
|
|
1
|
+
# This was retrieved from
|
2
|
+
# http://svn.0pointer.de/viewvc/trunk/common/acx_pthread.m4?revision=1277&root=avahi
|
3
|
+
# See also (perhaps for new versions?)
|
4
|
+
# http://svn.0pointer.de/viewvc/trunk/common/acx_pthread.m4?root=avahi
|
5
|
+
#
|
6
|
+
# We've rewritten the inconsistency check code (from avahi), to work
|
7
|
+
# more broadly. In particular, it no longer assumes ld accepts -zdefs.
|
8
|
+
# This caused a restructing of the code, but the functionality has only
|
9
|
+
# changed a little.
|
10
|
+
|
11
|
+
dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]])
|
12
|
+
dnl
|
13
|
+
dnl @summary figure out how to build C programs using POSIX threads
|
14
|
+
dnl
|
15
|
+
dnl This macro figures out how to build C programs using POSIX threads.
|
16
|
+
dnl It sets the PTHREAD_LIBS output variable to the threads library and
|
17
|
+
dnl linker flags, and the PTHREAD_CFLAGS output variable to any special
|
18
|
+
dnl C compiler flags that are needed. (The user can also force certain
|
19
|
+
dnl compiler flags/libs to be tested by setting these environment
|
20
|
+
dnl variables.)
|
21
|
+
dnl
|
22
|
+
dnl Also sets PTHREAD_CC to any special C compiler that is needed for
|
23
|
+
dnl multi-threaded programs (defaults to the value of CC otherwise).
|
24
|
+
dnl (This is necessary on AIX to use the special cc_r compiler alias.)
|
25
|
+
dnl
|
26
|
+
dnl NOTE: You are assumed to not only compile your program with these
|
27
|
+
dnl flags, but also link it with them as well. e.g. you should link
|
28
|
+
dnl with $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS
|
29
|
+
dnl $LIBS
|
30
|
+
dnl
|
31
|
+
dnl If you are only building threads programs, you may wish to use
|
32
|
+
dnl these variables in your default LIBS, CFLAGS, and CC:
|
33
|
+
dnl
|
34
|
+
dnl LIBS="$PTHREAD_LIBS $LIBS"
|
35
|
+
dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
36
|
+
dnl CC="$PTHREAD_CC"
|
37
|
+
dnl
|
38
|
+
dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute
|
39
|
+
dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to
|
40
|
+
dnl that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX).
|
41
|
+
dnl
|
42
|
+
dnl ACTION-IF-FOUND is a list of shell commands to run if a threads
|
43
|
+
dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands to
|
44
|
+
dnl run it if it is not found. If ACTION-IF-FOUND is not specified, the
|
45
|
+
dnl default action will define HAVE_PTHREAD.
|
46
|
+
dnl
|
47
|
+
dnl Please let the authors know if this macro fails on any platform, or
|
48
|
+
dnl if you have any other suggestions or comments. This macro was based
|
49
|
+
dnl on work by SGJ on autoconf scripts for FFTW (www.fftw.org) (with
|
50
|
+
dnl help from M. Frigo), as well as ac_pthread and hb_pthread macros
|
51
|
+
dnl posted by Alejandro Forero Cuervo to the autoconf macro repository.
|
52
|
+
dnl We are also grateful for the helpful feedback of numerous users.
|
53
|
+
dnl
|
54
|
+
dnl @category InstalledPackages
|
55
|
+
dnl @author Steven G. Johnson <stevenj@alum.mit.edu>
|
56
|
+
dnl @version 2006-05-29
|
57
|
+
dnl @license GPLWithACException
|
58
|
+
dnl
|
59
|
+
dnl Checks for GCC shared/pthread inconsistency based on work by
|
60
|
+
dnl Marcin Owsiany <marcin@owsiany.pl>
|
61
|
+
|
62
|
+
|
63
|
+
AC_DEFUN([ACX_PTHREAD], [
|
64
|
+
AC_REQUIRE([AC_CANONICAL_HOST])
|
65
|
+
AC_LANG_SAVE
|
66
|
+
AC_LANG_C
|
67
|
+
acx_pthread_ok=no
|
68
|
+
|
69
|
+
# We used to check for pthread.h first, but this fails if pthread.h
|
70
|
+
# requires special compiler flags (e.g. on True64 or Sequent).
|
71
|
+
# It gets checked for in the link test anyway.
|
72
|
+
|
73
|
+
# First of all, check if the user has set any of the PTHREAD_LIBS,
|
74
|
+
# etcetera environment variables, and if threads linking works using
|
75
|
+
# them:
|
76
|
+
if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then
|
77
|
+
save_CFLAGS="$CFLAGS"
|
78
|
+
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
79
|
+
save_LIBS="$LIBS"
|
80
|
+
LIBS="$PTHREAD_LIBS $LIBS"
|
81
|
+
AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS])
|
82
|
+
AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes)
|
83
|
+
AC_MSG_RESULT($acx_pthread_ok)
|
84
|
+
if test x"$acx_pthread_ok" = xno; then
|
85
|
+
PTHREAD_LIBS=""
|
86
|
+
PTHREAD_CFLAGS=""
|
87
|
+
fi
|
88
|
+
LIBS="$save_LIBS"
|
89
|
+
CFLAGS="$save_CFLAGS"
|
90
|
+
fi
|
91
|
+
|
92
|
+
# We must check for the threads library under a number of different
|
93
|
+
# names; the ordering is very important because some systems
|
94
|
+
# (e.g. DEC) have both -lpthread and -lpthreads, where one of the
|
95
|
+
# libraries is broken (non-POSIX).
|
96
|
+
|
97
|
+
# Create a list of thread flags to try. Items starting with a "-" are
|
98
|
+
# C compiler flags, and other items are library names, except for "none"
|
99
|
+
# which indicates that we try without any flags at all, and "pthread-config"
|
100
|
+
# which is a program returning the flags for the Pth emulation library.
|
101
|
+
|
102
|
+
acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
|
103
|
+
|
104
|
+
# The ordering *is* (sometimes) important. Some notes on the
|
105
|
+
# individual items follow:
|
106
|
+
|
107
|
+
# pthreads: AIX (must check this before -lpthread)
|
108
|
+
# none: in case threads are in libc; should be tried before -Kthread and
|
109
|
+
# other compiler flags to prevent continual compiler warnings
|
110
|
+
# -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
|
111
|
+
# -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
|
112
|
+
# lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
|
113
|
+
# -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads)
|
114
|
+
# -pthreads: Solaris/gcc
|
115
|
+
# -mthreads: Mingw32/gcc, Lynx/gcc
|
116
|
+
# -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
|
117
|
+
# doesn't hurt to check since this sometimes defines pthreads too;
|
118
|
+
# also defines -D_REENTRANT)
|
119
|
+
# ... -mt is also the pthreads flag for HP/aCC
|
120
|
+
# pthread: Linux, etcetera
|
121
|
+
# --thread-safe: KAI C++
|
122
|
+
# pthread-config: use pthread-config program (for GNU Pth library)
|
123
|
+
|
124
|
+
case "${host_cpu}-${host_os}" in
|
125
|
+
*solaris*)
|
126
|
+
|
127
|
+
# On Solaris (at least, for some versions), libc contains stubbed
|
128
|
+
# (non-functional) versions of the pthreads routines, so link-based
|
129
|
+
# tests will erroneously succeed. (We need to link with -pthreads/-mt/
|
130
|
+
# -lpthread.) (The stubs are missing pthread_cleanup_push, or rather
|
131
|
+
# a function called by this macro, so we could check for that, but
|
132
|
+
# who knows whether they'll stub that too in a future libc.) So,
|
133
|
+
# we'll just look for -pthreads and -lpthread first:
|
134
|
+
|
135
|
+
acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags"
|
136
|
+
;;
|
137
|
+
esac
|
138
|
+
|
139
|
+
if test x"$acx_pthread_ok" = xno; then
|
140
|
+
for flag in $acx_pthread_flags; do
|
141
|
+
|
142
|
+
case $flag in
|
143
|
+
none)
|
144
|
+
AC_MSG_CHECKING([whether pthreads work without any flags])
|
145
|
+
;;
|
146
|
+
|
147
|
+
-*)
|
148
|
+
AC_MSG_CHECKING([whether pthreads work with $flag])
|
149
|
+
PTHREAD_CFLAGS="$flag"
|
150
|
+
;;
|
151
|
+
|
152
|
+
pthread-config)
|
153
|
+
AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no)
|
154
|
+
if test x"$acx_pthread_config" = xno; then continue; fi
|
155
|
+
PTHREAD_CFLAGS="`pthread-config --cflags`"
|
156
|
+
PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
|
157
|
+
;;
|
158
|
+
|
159
|
+
*)
|
160
|
+
AC_MSG_CHECKING([for the pthreads library -l$flag])
|
161
|
+
PTHREAD_LIBS="-l$flag"
|
162
|
+
;;
|
163
|
+
esac
|
164
|
+
|
165
|
+
save_LIBS="$LIBS"
|
166
|
+
save_CFLAGS="$CFLAGS"
|
167
|
+
LIBS="$PTHREAD_LIBS $LIBS"
|
168
|
+
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
169
|
+
|
170
|
+
# Check for various functions. We must include pthread.h,
|
171
|
+
# since some functions may be macros. (On the Sequent, we
|
172
|
+
# need a special flag -Kthread to make this header compile.)
|
173
|
+
# We check for pthread_join because it is in -lpthread on IRIX
|
174
|
+
# while pthread_create is in libc. We check for pthread_attr_init
|
175
|
+
# due to DEC craziness with -lpthreads. We check for
|
176
|
+
# pthread_cleanup_push because it is one of the few pthread
|
177
|
+
# functions on Solaris that doesn't have a non-functional libc stub.
|
178
|
+
# We try pthread_create on general principles.
|
179
|
+
AC_TRY_LINK([#include <pthread.h>],
|
180
|
+
[pthread_t th; pthread_join(th, 0);
|
181
|
+
pthread_attr_init(0); pthread_cleanup_push(0, 0);
|
182
|
+
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
|
183
|
+
[acx_pthread_ok=yes])
|
184
|
+
|
185
|
+
LIBS="$save_LIBS"
|
186
|
+
CFLAGS="$save_CFLAGS"
|
187
|
+
|
188
|
+
AC_MSG_RESULT($acx_pthread_ok)
|
189
|
+
if test "x$acx_pthread_ok" = xyes; then
|
190
|
+
break;
|
191
|
+
fi
|
192
|
+
|
193
|
+
PTHREAD_LIBS=""
|
194
|
+
PTHREAD_CFLAGS=""
|
195
|
+
done
|
196
|
+
fi
|
197
|
+
|
198
|
+
# Various other checks:
|
199
|
+
if test "x$acx_pthread_ok" = xyes; then
|
200
|
+
save_LIBS="$LIBS"
|
201
|
+
LIBS="$PTHREAD_LIBS $LIBS"
|
202
|
+
save_CFLAGS="$CFLAGS"
|
203
|
+
CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
|
204
|
+
|
205
|
+
# Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
|
206
|
+
AC_MSG_CHECKING([for joinable pthread attribute])
|
207
|
+
attr_name=unknown
|
208
|
+
for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
|
209
|
+
AC_TRY_LINK([#include <pthread.h>], [int attr=$attr; return attr;],
|
210
|
+
[attr_name=$attr; break])
|
211
|
+
done
|
212
|
+
AC_MSG_RESULT($attr_name)
|
213
|
+
if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then
|
214
|
+
AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name,
|
215
|
+
[Define to necessary symbol if this constant
|
216
|
+
uses a non-standard name on your system.])
|
217
|
+
fi
|
218
|
+
|
219
|
+
AC_MSG_CHECKING([if more special flags are required for pthreads])
|
220
|
+
flag=no
|
221
|
+
case "${host_cpu}-${host_os}" in
|
222
|
+
*-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";;
|
223
|
+
*solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";;
|
224
|
+
esac
|
225
|
+
AC_MSG_RESULT(${flag})
|
226
|
+
if test "x$flag" != xno; then
|
227
|
+
PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS"
|
228
|
+
fi
|
229
|
+
|
230
|
+
LIBS="$save_LIBS"
|
231
|
+
CFLAGS="$save_CFLAGS"
|
232
|
+
# More AIX lossage: must compile with xlc_r or cc_r
|
233
|
+
if test x"$GCC" != xyes; then
|
234
|
+
AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC})
|
235
|
+
else
|
236
|
+
PTHREAD_CC=$CC
|
237
|
+
fi
|
238
|
+
|
239
|
+
# The next part tries to detect GCC inconsistency with -shared on some
|
240
|
+
# architectures and systems. The problem is that in certain
|
241
|
+
# configurations, when -shared is specified, GCC "forgets" to
|
242
|
+
# internally use various flags which are still necessary.
|
243
|
+
|
244
|
+
#
|
245
|
+
# Prepare the flags
|
246
|
+
#
|
247
|
+
save_CFLAGS="$CFLAGS"
|
248
|
+
save_LIBS="$LIBS"
|
249
|
+
save_CC="$CC"
|
250
|
+
|
251
|
+
# Try with the flags determined by the earlier checks.
|
252
|
+
#
|
253
|
+
# -Wl,-z,defs forces link-time symbol resolution, so that the
|
254
|
+
# linking checks with -shared actually have any value
|
255
|
+
#
|
256
|
+
# FIXME: -fPIC is required for -shared on many architectures,
|
257
|
+
# so we specify it here, but the right way would probably be to
|
258
|
+
# properly detect whether it is actually required.
|
259
|
+
CFLAGS="-shared -fPIC -Wl,-z,defs $CFLAGS $PTHREAD_CFLAGS"
|
260
|
+
LIBS="$PTHREAD_LIBS $LIBS"
|
261
|
+
CC="$PTHREAD_CC"
|
262
|
+
|
263
|
+
# In order not to create several levels of indentation, we test
|
264
|
+
# the value of "$done" until we find the cure or run out of ideas.
|
265
|
+
done="no"
|
266
|
+
|
267
|
+
# First, make sure the CFLAGS we added are actually accepted by our
|
268
|
+
# compiler. If not (and OS X's ld, for instance, does not accept -z),
|
269
|
+
# then we can't do this test.
|
270
|
+
if test x"$done" = xno; then
|
271
|
+
AC_MSG_CHECKING([whether to check for GCC pthread/shared inconsistencies])
|
272
|
+
AC_TRY_LINK(,, , [done=yes])
|
273
|
+
|
274
|
+
if test "x$done" = xyes ; then
|
275
|
+
AC_MSG_RESULT([no])
|
276
|
+
else
|
277
|
+
AC_MSG_RESULT([yes])
|
278
|
+
fi
|
279
|
+
fi
|
280
|
+
|
281
|
+
if test x"$done" = xno; then
|
282
|
+
AC_MSG_CHECKING([whether -pthread is sufficient with -shared])
|
283
|
+
AC_TRY_LINK([#include <pthread.h>],
|
284
|
+
[pthread_t th; pthread_join(th, 0);
|
285
|
+
pthread_attr_init(0); pthread_cleanup_push(0, 0);
|
286
|
+
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
|
287
|
+
[done=yes])
|
288
|
+
|
289
|
+
if test "x$done" = xyes; then
|
290
|
+
AC_MSG_RESULT([yes])
|
291
|
+
else
|
292
|
+
AC_MSG_RESULT([no])
|
293
|
+
fi
|
294
|
+
fi
|
295
|
+
|
296
|
+
#
|
297
|
+
# Linux gcc on some architectures such as mips/mipsel forgets
|
298
|
+
# about -lpthread
|
299
|
+
#
|
300
|
+
if test x"$done" = xno; then
|
301
|
+
AC_MSG_CHECKING([whether -lpthread fixes that])
|
302
|
+
LIBS="-lpthread $PTHREAD_LIBS $save_LIBS"
|
303
|
+
AC_TRY_LINK([#include <pthread.h>],
|
304
|
+
[pthread_t th; pthread_join(th, 0);
|
305
|
+
pthread_attr_init(0); pthread_cleanup_push(0, 0);
|
306
|
+
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
|
307
|
+
[done=yes])
|
308
|
+
|
309
|
+
if test "x$done" = xyes; then
|
310
|
+
AC_MSG_RESULT([yes])
|
311
|
+
PTHREAD_LIBS="-lpthread $PTHREAD_LIBS"
|
312
|
+
else
|
313
|
+
AC_MSG_RESULT([no])
|
314
|
+
fi
|
315
|
+
fi
|
316
|
+
#
|
317
|
+
# FreeBSD 4.10 gcc forgets to use -lc_r instead of -lc
|
318
|
+
#
|
319
|
+
if test x"$done" = xno; then
|
320
|
+
AC_MSG_CHECKING([whether -lc_r fixes that])
|
321
|
+
LIBS="-lc_r $PTHREAD_LIBS $save_LIBS"
|
322
|
+
AC_TRY_LINK([#include <pthread.h>],
|
323
|
+
[pthread_t th; pthread_join(th, 0);
|
324
|
+
pthread_attr_init(0); pthread_cleanup_push(0, 0);
|
325
|
+
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
|
326
|
+
[done=yes])
|
327
|
+
|
328
|
+
if test "x$done" = xyes; then
|
329
|
+
AC_MSG_RESULT([yes])
|
330
|
+
PTHREAD_LIBS="-lc_r $PTHREAD_LIBS"
|
331
|
+
else
|
332
|
+
AC_MSG_RESULT([no])
|
333
|
+
fi
|
334
|
+
fi
|
335
|
+
if test x"$done" = xno; then
|
336
|
+
# OK, we have run out of ideas
|
337
|
+
AC_MSG_WARN([Impossible to determine how to use pthreads with shared libraries])
|
338
|
+
|
339
|
+
# so it's not safe to assume that we may use pthreads
|
340
|
+
acx_pthread_ok=no
|
341
|
+
fi
|
342
|
+
|
343
|
+
AC_MSG_CHECKING([whether what we have so far is sufficient with -nostdlib])
|
344
|
+
CFLAGS="-nostdlib $CFLAGS"
|
345
|
+
# we need c with nostdlib
|
346
|
+
LIBS="$LIBS -lc"
|
347
|
+
AC_TRY_LINK([#include <pthread.h>],
|
348
|
+
[pthread_t th; pthread_join(th, 0);
|
349
|
+
pthread_attr_init(0); pthread_cleanup_push(0, 0);
|
350
|
+
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
|
351
|
+
[done=yes],[done=no])
|
352
|
+
|
353
|
+
if test "x$done" = xyes; then
|
354
|
+
AC_MSG_RESULT([yes])
|
355
|
+
else
|
356
|
+
AC_MSG_RESULT([no])
|
357
|
+
fi
|
358
|
+
|
359
|
+
if test x"$done" = xno; then
|
360
|
+
AC_MSG_CHECKING([whether -lpthread saves the day])
|
361
|
+
LIBS="-lpthread $LIBS"
|
362
|
+
AC_TRY_LINK([#include <pthread.h>],
|
363
|
+
[pthread_t th; pthread_join(th, 0);
|
364
|
+
pthread_attr_init(0); pthread_cleanup_push(0, 0);
|
365
|
+
pthread_create(0,0,0,0); pthread_cleanup_pop(0); ],
|
366
|
+
[done=yes],[done=no])
|
367
|
+
|
368
|
+
if test "x$done" = xyes; then
|
369
|
+
AC_MSG_RESULT([yes])
|
370
|
+
PTHREAD_LIBS="$PTHREAD_LIBS -lpthread"
|
371
|
+
else
|
372
|
+
AC_MSG_RESULT([no])
|
373
|
+
AC_MSG_WARN([Impossible to determine how to use pthreads with shared libraries and -nostdlib])
|
374
|
+
fi
|
375
|
+
fi
|
376
|
+
|
377
|
+
CFLAGS="$save_CFLAGS"
|
378
|
+
LIBS="$save_LIBS"
|
379
|
+
CC="$save_CC"
|
380
|
+
else
|
381
|
+
PTHREAD_CC="$CC"
|
382
|
+
fi
|
383
|
+
|
384
|
+
AC_SUBST(PTHREAD_LIBS)
|
385
|
+
AC_SUBST(PTHREAD_CFLAGS)
|
386
|
+
AC_SUBST(PTHREAD_CC)
|
387
|
+
|
388
|
+
# Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
|
389
|
+
if test x"$acx_pthread_ok" = xyes; then
|
390
|
+
ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1])
|
391
|
+
:
|
392
|
+
else
|
393
|
+
acx_pthread_ok=no
|
394
|
+
$2
|
395
|
+
fi
|
396
|
+
AC_LANG_RESTORE
|
397
|
+
])dnl ACX_PTHREAD
|