From fb1609f5540e3578b579c5e3476de5613c45d3a6 Mon Sep 17 00:00:00 2001 From: Timothee 'TTimo' Besset Date: Tue, 22 Nov 2011 15:28:15 -0600 Subject: [PATCH] hello world --- .gitignore | 1 + COPYING.txt | 643 + README.txt | 435 + base/default.cfg | 1 + neo/MayaImport.vcxproj | 954 + neo/MayaImport.vcxproj.filters | 2332 ++ neo/MayaImport/exporter.h | 457 + neo/MayaImport/maya_main.cpp | 3149 ++ neo/MayaImport/maya_main.h | 45 + neo/MayaImport/mayaimport.def | 4 + neo/SConstruct | 539 + neo/TypeInfo/TypeInfoGen.cpp | 1050 + neo/TypeInfo/TypeInfoGen.h | 116 + neo/TypeInfo/main.cpp | 307 + neo/_Common.props | 17 + neo/_Curl.props | 13 + neo/_Debug.props | 24 + neo/_Dedicated.props | 12 + neo/_DoomDLL.props | 26 + neo/_Game-d3xp.props | 20 + neo/_Game.props | 22 + neo/_MayaImport.props | 19 + neo/_Release.props | 30 + neo/_TypeInfo.props | 16 + neo/_WithInlines.props | 13 + neo/_WithMemoryLog.props | 12 + neo/_idlib.props | 13 + neo/clean.bat | 53 + neo/cm/CollisionModel.h | 148 + neo/cm/CollisionModel_contacts.cpp | 75 + neo/cm/CollisionModel_contents.cpp | 641 + neo/cm/CollisionModel_debug.cpp | 488 + neo/cm/CollisionModel_files.cpp | 616 + neo/cm/CollisionModel_load.cpp | 3693 ++ neo/cm/CollisionModel_local.h | 527 + neo/cm/CollisionModel_rotate.cpp | 1694 + neo/cm/CollisionModel_trace.cpp | 256 + neo/cm/CollisionModel_translate.cpp | 1120 + neo/curl/CHANGES | 2078 ++ neo/curl/COPYING | 21 + neo/curl/Makefile.am | 113 + neo/curl/Makefile.in | 756 + neo/curl/README | 75 + neo/curl/RELEASE-NOTES | 89 + neo/curl/acinclude.m4 | 592 + neo/curl/aclocal.m4 | 6876 ++++ neo/curl/config.guess | 1435 + neo/curl/config.sub | 1537 + neo/curl/configure | 31052 ++++++++++++++++ neo/curl/configure.ac | 1274 + neo/curl/curl-config.in | 133 + neo/curl/curl-style.el | 50 + neo/curl/depcomp | 479 + neo/curl/docs/BINDINGS | 119 + neo/curl/docs/BUGS | 81 + neo/curl/docs/CONTRIBUTE | 159 + neo/curl/docs/FAQ | 796 + neo/curl/docs/FEATURES | 114 + neo/curl/docs/HISTORY | 128 + neo/curl/docs/INSTALL | 551 + neo/curl/docs/INTERNALS | 381 + neo/curl/docs/KNOWN_BUGS | 60 + neo/curl/docs/MANUAL | 877 + neo/curl/docs/Makefile.am | 49 + neo/curl/docs/Makefile.in | 588 + neo/curl/docs/README.win32 | 22 + neo/curl/docs/RESOURCES | 72 + neo/curl/docs/SSLCERTS | 46 + neo/curl/docs/THANKS | 100 + neo/curl/docs/TODO | 199 + neo/curl/docs/TheArtOfHttpScripting | 399 + neo/curl/docs/VERSIONS | 64 + neo/curl/docs/curl-config.1 | 64 + neo/curl/docs/curl-config.html | 82 + neo/curl/docs/curl-config.pdf | Bin 0 -> 8389 bytes neo/curl/docs/curl.1 | 1148 + neo/curl/docs/curl.html | 599 + neo/curl/docs/curl.pdf | Bin 0 -> 105428 bytes neo/curl/docs/examples/Makefile.am | 15 + neo/curl/docs/examples/Makefile.example | 42 + neo/curl/docs/examples/Makefile.in | 368 + neo/curl/docs/examples/README | 25 + neo/curl/docs/examples/curlgtk.c | 106 + neo/curl/docs/examples/curlx.c | 480 + neo/curl/docs/examples/fopen.c | 560 + neo/curl/docs/examples/ftpget.c | 83 + neo/curl/docs/examples/ftpgetresp.c | 61 + neo/curl/docs/examples/ftpupload.c | 91 + neo/curl/docs/examples/getinmemory.c | 83 + neo/curl/docs/examples/http-post.c | 35 + neo/curl/docs/examples/httpput.c | 101 + neo/curl/docs/examples/makefile.dj | 31 + neo/curl/docs/examples/multi-app.c | 128 + neo/curl/docs/examples/multi-double.c | 95 + neo/curl/docs/examples/multi-post.c | 126 + neo/curl/docs/examples/multi-single.c | 88 + neo/curl/docs/examples/multithread.c | 70 + neo/curl/docs/examples/persistant.c | 41 + neo/curl/docs/examples/post-callback.c | 79 + neo/curl/docs/examples/postit2.c | 87 + neo/curl/docs/examples/sepheaders.c | 79 + neo/curl/docs/examples/simple.c | 28 + neo/curl/docs/examples/simplepost.c | 36 + neo/curl/docs/examples/simplessl.c | 118 + neo/curl/docs/index.html | 21 + neo/curl/docs/libcurl-the-guide | 1138 + neo/curl/docs/libcurl/Makefile.am | 141 + neo/curl/docs/libcurl/Makefile.in | 542 + neo/curl/docs/libcurl/curl_easy_cleanup.3 | 28 + neo/curl/docs/libcurl/curl_easy_cleanup.html | 58 + neo/curl/docs/libcurl/curl_easy_cleanup.pdf | Bin 0 -> 5590 bytes neo/curl/docs/libcurl/curl_easy_duphandle.3 | 35 + .../docs/libcurl/curl_easy_duphandle.html | 59 + neo/curl/docs/libcurl/curl_easy_duphandle.pdf | Bin 0 -> 5882 bytes neo/curl/docs/libcurl/curl_easy_getinfo.3 | 114 + neo/curl/docs/libcurl/curl_easy_getinfo.html | 102 + neo/curl/docs/libcurl/curl_easy_getinfo.pdf | Bin 0 -> 13349 bytes neo/curl/docs/libcurl/curl_easy_init.3 | 25 + neo/curl/docs/libcurl/curl_easy_init.html | 57 + neo/curl/docs/libcurl/curl_easy_init.pdf | Bin 0 -> 5396 bytes neo/curl/docs/libcurl/curl_easy_perform.3 | 40 + neo/curl/docs/libcurl/curl_easy_perform.html | 58 + neo/curl/docs/libcurl/curl_easy_perform.pdf | Bin 0 -> 6200 bytes neo/curl/docs/libcurl/curl_easy_setopt.3 | 946 + neo/curl/docs/libcurl/curl_easy_setopt.html | 405 + neo/curl/docs/libcurl/curl_easy_setopt.pdf | Bin 0 -> 111913 bytes neo/curl/docs/libcurl/curl_escape.3 | 26 + neo/curl/docs/libcurl/curl_escape.html | 57 + neo/curl/docs/libcurl/curl_escape.pdf | Bin 0 -> 5643 bytes neo/curl/docs/libcurl/curl_formadd.3 | 209 + neo/curl/docs/libcurl/curl_formadd.html | 141 + neo/curl/docs/libcurl/curl_formadd.pdf | Bin 0 -> 20393 bytes neo/curl/docs/libcurl/curl_formfree.3 | 20 + neo/curl/docs/libcurl/curl_formfree.html | 55 + neo/curl/docs/libcurl/curl_formfree.pdf | Bin 0 -> 5238 bytes neo/curl/docs/libcurl/curl_formparse.3 | 18 + neo/curl/docs/libcurl/curl_formparse.html | 53 + neo/curl/docs/libcurl/curl_formparse.pdf | 150 + neo/curl/docs/libcurl/curl_free.3 | 18 + neo/curl/docs/libcurl/curl_free.html | 54 + neo/curl/docs/libcurl/curl_free.pdf | Bin 0 -> 5112 bytes neo/curl/docs/libcurl/curl_getdate.3 | 80 + neo/curl/docs/libcurl/curl_getdate.html | 67 + neo/curl/docs/libcurl/curl_getdate.pdf | Bin 0 -> 11096 bytes neo/curl/docs/libcurl/curl_getenv.3 | 29 + neo/curl/docs/libcurl/curl_getenv.html | 56 + neo/curl/docs/libcurl/curl_getenv.pdf | Bin 0 -> 5886 bytes neo/curl/docs/libcurl/curl_global_cleanup.3 | 23 + .../docs/libcurl/curl_global_cleanup.html | 57 + neo/curl/docs/libcurl/curl_global_cleanup.pdf | Bin 0 -> 5192 bytes neo/curl/docs/libcurl/curl_global_init.3 | 47 + neo/curl/docs/libcurl/curl_global_init.html | 67 + neo/curl/docs/libcurl/curl_global_init.pdf | Bin 0 -> 6099 bytes neo/curl/docs/libcurl/curl_mprintf.3 | 88 + neo/curl/docs/libcurl/curl_mprintf.html | 69 + neo/curl/docs/libcurl/curl_mprintf.pdf | Bin 0 -> 9841 bytes neo/curl/docs/libcurl/curl_multi_add_handle.3 | 20 + .../docs/libcurl/curl_multi_add_handle.html | 56 + .../docs/libcurl/curl_multi_add_handle.pdf | Bin 0 -> 5385 bytes neo/curl/docs/libcurl/curl_multi_cleanup.3 | 18 + neo/curl/docs/libcurl/curl_multi_cleanup.html | 55 + neo/curl/docs/libcurl/curl_multi_cleanup.pdf | 143 + neo/curl/docs/libcurl/curl_multi_fdset.3 | 28 + neo/curl/docs/libcurl/curl_multi_fdset.html | 56 + neo/curl/docs/libcurl/curl_multi_fdset.pdf | Bin 0 -> 5633 bytes neo/curl/docs/libcurl/curl_multi_info_read.3 | 45 + .../docs/libcurl/curl_multi_info_read.html | 69 + .../docs/libcurl/curl_multi_info_read.pdf | Bin 0 -> 6218 bytes neo/curl/docs/libcurl/curl_multi_init.3 | 21 + neo/curl/docs/libcurl/curl_multi_init.html | 56 + neo/curl/docs/libcurl/curl_multi_init.pdf | Bin 0 -> 5246 bytes neo/curl/docs/libcurl/curl_multi_perform.3 | 37 + neo/curl/docs/libcurl/curl_multi_perform.html | 58 + neo/curl/docs/libcurl/curl_multi_perform.pdf | Bin 0 -> 6392 bytes .../docs/libcurl/curl_multi_remove_handle.3 | 23 + .../libcurl/curl_multi_remove_handle.html | 57 + .../docs/libcurl/curl_multi_remove_handle.pdf | Bin 0 -> 5615 bytes neo/curl/docs/libcurl/curl_share_cleanup.3 | 21 + neo/curl/docs/libcurl/curl_share_cleanup.html | 56 + neo/curl/docs/libcurl/curl_share_cleanup.pdf | Bin 0 -> 5414 bytes neo/curl/docs/libcurl/curl_share_init.3 | 25 + neo/curl/docs/libcurl/curl_share_init.html | 57 + neo/curl/docs/libcurl/curl_share_init.pdf | Bin 0 -> 5624 bytes neo/curl/docs/libcurl/curl_share_setopt.3 | 59 + neo/curl/docs/libcurl/curl_share_setopt.html | 79 + neo/curl/docs/libcurl/curl_share_setopt.pdf | Bin 0 -> 6400 bytes neo/curl/docs/libcurl/curl_slist_append.3 | 37 + neo/curl/docs/libcurl/curl_slist_append.html | 60 + neo/curl/docs/libcurl/curl_slist_append.pdf | Bin 0 -> 5626 bytes neo/curl/docs/libcurl/curl_slist_free_all.3 | 20 + .../docs/libcurl/curl_slist_free_all.html | 56 + neo/curl/docs/libcurl/curl_slist_free_all.pdf | Bin 0 -> 5087 bytes neo/curl/docs/libcurl/curl_strequal.3 | 30 + neo/curl/docs/libcurl/curl_strequal.html | 57 + neo/curl/docs/libcurl/curl_strequal.pdf | Bin 0 -> 5716 bytes neo/curl/docs/libcurl/curl_strnequal.3 | 1 + neo/curl/docs/libcurl/curl_strnequal.html | 49 + neo/curl/docs/libcurl/curl_strnequal.pdf | Bin 0 -> 5716 bytes neo/curl/docs/libcurl/curl_unescape.3 | 27 + neo/curl/docs/libcurl/curl_unescape.html | 57 + neo/curl/docs/libcurl/curl_unescape.pdf | Bin 0 -> 5720 bytes neo/curl/docs/libcurl/curl_version.3 | 19 + neo/curl/docs/libcurl/curl_version.html | 55 + neo/curl/docs/libcurl/curl_version.pdf | 119 + neo/curl/docs/libcurl/curl_version_info.3 | 109 + neo/curl/docs/libcurl/curl_version_info.html | 118 + neo/curl/docs/libcurl/curl_version_info.pdf | Bin 0 -> 12273 bytes neo/curl/docs/libcurl/index.html | 57 + neo/curl/docs/libcurl/libcurl-easy.3 | 29 + neo/curl/docs/libcurl/libcurl-easy.html | 54 + neo/curl/docs/libcurl/libcurl-easy.pdf | Bin 0 -> 6047 bytes neo/curl/docs/libcurl/libcurl-errors.3 | 205 + neo/curl/docs/libcurl/libcurl-errors.html | 195 + neo/curl/docs/libcurl/libcurl-errors.pdf | Bin 0 -> 20876 bytes neo/curl/docs/libcurl/libcurl-multi.3 | 100 + neo/curl/docs/libcurl/libcurl-multi.html | 67 + neo/curl/docs/libcurl/libcurl-multi.pdf | Bin 0 -> 13910 bytes neo/curl/docs/libcurl/libcurl-share.3 | 46 + neo/curl/docs/libcurl/libcurl-share.html | 61 + neo/curl/docs/libcurl/libcurl-share.pdf | Bin 0 -> 6599 bytes neo/curl/docs/libcurl/libcurl.3 | 120 + neo/curl/docs/libcurl/libcurl.html | 83 + neo/curl/docs/libcurl/libcurl.pdf | Bin 0 -> 13510 bytes neo/curl/include/Makefile.am | 5 + neo/curl/include/Makefile.in | 495 + neo/curl/include/README | 38 + neo/curl/include/curl/Makefile.am | 8 + neo/curl/include/curl/Makefile.in | 429 + neo/curl/include/curl/curl.h | 1282 + neo/curl/include/curl/easy.h | 68 + neo/curl/include/curl/mprintf.h | 54 + neo/curl/include/curl/multi.h | 210 + neo/curl/include/curl/stdcheaders.h | 34 + neo/curl/include/curl/types.h | 28 + neo/curl/install-sh | 250 + neo/curl/lib/Makefile.am | 112 + neo/curl/lib/Makefile.b32 | 90 + neo/curl/lib/Makefile.b32.resp | 39 + neo/curl/lib/Makefile.in | 688 + neo/curl/lib/Makefile.m32 | 102 + neo/curl/lib/Makefile.netware | 277 + neo/curl/lib/Makefile.riscos | 131 + neo/curl/lib/Makefile.vc6 | 257 + neo/curl/lib/README.ares | 76 + neo/curl/lib/README.encoding | 60 + neo/curl/lib/README.memoryleak | 56 + neo/curl/lib/amigaos.c | 49 + neo/curl/lib/amigaos.h | 52 + neo/curl/lib/arpa_telnet.h | 101 + neo/curl/lib/base64.c | 285 + neo/curl/lib/base64.h | 27 + neo/curl/lib/ca-bundle.crt | 4371 +++ neo/curl/lib/ca-bundle.h | 2 + neo/curl/lib/config-amigaos.h | 84 + neo/curl/lib/config-mac.h | 45 + neo/curl/lib/config-netware.h | 485 + neo/curl/lib/config-riscos.h | 393 + neo/curl/lib/config-vms.h | 384 + neo/curl/lib/config-win32.h | 231 + neo/curl/lib/config.dj | 101 + neo/curl/lib/config.h.in | 485 + neo/curl/lib/connect.c | 715 + neo/curl/lib/connect.h | 42 + neo/curl/lib/content_encoding.c | 359 + neo/curl/lib/content_encoding.h | 41 + neo/curl/lib/cookie.c | 848 + neo/curl/lib/cookie.h | 88 + neo/curl/lib/curllib.dsp | 422 + neo/curl/lib/curllib.dsw | 29 + neo/curl/lib/curllib.vcproj | 362 + neo/curl/lib/dict.c | 220 + neo/curl/lib/dict.h | 30 + neo/curl/lib/easy.c | 376 + neo/curl/lib/escape.c | 128 + neo/curl/lib/escape.h | 32 + neo/curl/lib/file.c | 285 + neo/curl/lib/file.h | 30 + neo/curl/lib/formdata.c | 1583 + neo/curl/lib/formdata.h | 79 + neo/curl/lib/ftp.c | 2614 ++ neo/curl/lib/ftp.h | 38 + neo/curl/lib/getdate.c | 2151 ++ neo/curl/lib/getdate.h | 37 + neo/curl/lib/getdate.y | 1104 + neo/curl/lib/getenv.c | 71 + neo/curl/lib/getinfo.c | 180 + neo/curl/lib/getinfo.h | 28 + neo/curl/lib/hash.c | 286 + neo/curl/lib/hash.h | 60 + neo/curl/lib/hostip.c | 1349 + neo/curl/lib/hostip.h | 99 + neo/curl/lib/http.c | 1703 + neo/curl/lib/http.h | 50 + neo/curl/lib/http_chunks.c | 265 + neo/curl/lib/http_chunks.h | 88 + neo/curl/lib/http_digest.c | 231 + neo/curl/lib/http_digest.h | 48 + neo/curl/lib/http_negotiate.c | 331 + neo/curl/lib/http_negotiate.h | 39 + neo/curl/lib/http_ntlm.c | 587 + neo/curl/lib/http_ntlm.h | 143 + neo/curl/lib/if2ip.c | 132 + neo/curl/lib/if2ip.h | 69 + neo/curl/lib/inet_ntoa_r.h | 9 + neo/curl/lib/inet_pton.c | 240 + neo/curl/lib/inet_pton.h | 37 + neo/curl/lib/krb4.c | 409 + neo/curl/lib/krb4.h | 27 + neo/curl/lib/ldap.c | 276 + neo/curl/lib/ldap.h | 30 + neo/curl/lib/libcurl.def | 47 + neo/curl/lib/libcurl.framework.make | 108 + neo/curl/lib/libcurl.imp | 44 + neo/curl/lib/libcurl.plist | 35 + neo/curl/lib/libcurl.rc | 41 + neo/curl/lib/llist.c | 172 + neo/curl/lib/llist.h | 56 + neo/curl/lib/makefile.amiga | 27 + neo/curl/lib/makefile.dj | 175 + neo/curl/lib/md5.c | 348 + neo/curl/lib/md5.h | 29 + neo/curl/lib/memdebug.c | 288 + neo/curl/lib/memdebug.h | 105 + neo/curl/lib/mprintf.c | 1203 + neo/curl/lib/multi.c | 644 + neo/curl/lib/netrc.c | 248 + neo/curl/lib/netrc.h | 34 + neo/curl/lib/nwlib.c | 326 + neo/curl/lib/progress.c | 406 + neo/curl/lib/progress.h | 70 + neo/curl/lib/security.c | 482 + neo/curl/lib/security.h | 72 + neo/curl/lib/sendf.c | 460 + neo/curl/lib/sendf.h | 56 + neo/curl/lib/setup.h | 301 + neo/curl/lib/share.c | 211 + neo/curl/lib/share.h | 55 + neo/curl/lib/speedcheck.c | 67 + neo/curl/lib/speedcheck.h | 34 + neo/curl/lib/ssluse.c | 1268 + neo/curl/lib/ssluse.h | 38 + neo/curl/lib/strequal.c | 121 + neo/curl/lib/strequal.h | 44 + neo/curl/lib/strtok.c | 68 + neo/curl/lib/strtok.h | 38 + neo/curl/lib/strtoofft.c | 157 + neo/curl/lib/strtoofft.h | 62 + neo/curl/lib/telnet.c | 1344 + neo/curl/lib/telnet.h | 30 + neo/curl/lib/timeval.c | 101 + neo/curl/lib/timeval.h | 49 + neo/curl/lib/transfer.c | 2028 + neo/curl/lib/transfer.h | 49 + neo/curl/lib/url.c | 3482 ++ neo/curl/lib/url.h | 48 + neo/curl/lib/urldata.h | 913 + neo/curl/lib/version.c | 239 + neo/curl/ltmain.sh | 6399 ++++ neo/curl/maketgz | 137 + neo/curl/missing | 283 + neo/curl/mkinstalldirs | 40 + neo/curl/packages/DOS/Makefile.am | 1 + neo/curl/packages/DOS/Makefile.in | 352 + neo/curl/packages/DOS/README | 4 + neo/curl/packages/DOS/common.dj | 74 + neo/curl/packages/EPM/Makefile.am | 3 + neo/curl/packages/EPM/Makefile.in | 356 + neo/curl/packages/EPM/README | 12 + neo/curl/packages/EPM/curl.list.in | 58 + neo/curl/packages/Linux/Makefile.am | 1 + neo/curl/packages/Linux/Makefile.in | 491 + neo/curl/packages/Linux/RPM/Makefile.am | 2 + neo/curl/packages/Linux/RPM/Makefile.in | 357 + neo/curl/packages/Linux/RPM/README | 5 + neo/curl/packages/Linux/RPM/curl-ssl.spec.in | 84 + neo/curl/packages/Linux/RPM/curl.spec.in | 84 + neo/curl/packages/Linux/RPM/make_curl_rpm | 62 + neo/curl/packages/Makefile.am | 3 + neo/curl/packages/Makefile.in | 493 + neo/curl/packages/NetWare/get_ver.awk | 20 + neo/curl/packages/README | 27 + neo/curl/packages/Solaris/Makefile.am | 39 + neo/curl/packages/Solaris/Makefile.in | 386 + neo/curl/packages/Win32/Makefile.am | 3 + neo/curl/packages/Win32/Makefile.in | 492 + neo/curl/packages/Win32/README | 53 + neo/curl/packages/Win32/cygwin/Makefile.am | 63 + neo/curl/packages/Win32/cygwin/Makefile.in | 413 + neo/curl/packages/Win32/cygwin/README | 103 + neo/curl/packages/vms/Makefile.am | 4 + neo/curl/packages/vms/Makefile.in | 355 + neo/curl/packages/vms/batch_compile.com | Bin 0 -> 196 bytes neo/curl/packages/vms/build_vms.com | 206 + neo/curl/packages/vms/config-vms.h_with_ssl | Bin 0 -> 7165 bytes .../packages/vms/config-vms.h_without_ssl | Bin 0 -> 7159 bytes neo/curl/packages/vms/defines.com | Bin 0 -> 1544 bytes neo/curl/packages/vms/hpssl_alpha.opt | Bin 0 -> 80 bytes neo/curl/packages/vms/hpssl_ia64.opt | Bin 0 -> 80 bytes neo/curl/packages/vms/hpssl_vax.opt | Bin 0 -> 84 bytes neo/curl/packages/vms/readme | Bin 0 -> 2272 bytes neo/curl/reconf | 15 + neo/curl/sample.emacs | 46 + neo/curl/src/Makefile.am | 85 + neo/curl/src/Makefile.b32 | 44 + neo/curl/src/Makefile.in | 619 + neo/curl/src/Makefile.m32 | 78 + neo/curl/src/Makefile.netware | 240 + neo/curl/src/Makefile.riscos | 48 + neo/curl/src/Makefile.vc6 | 124 + neo/curl/src/config-amigaos.h | 40 + neo/curl/src/config-mac.h | 12 + neo/curl/src/config-netware.h | 485 + neo/curl/src/config-riscos.h | 390 + neo/curl/src/config-vms.h | 21 + neo/curl/src/config-win32.h | 34 + neo/curl/src/config.h.in | 96 + neo/curl/src/curl.rc | 63 + neo/curl/src/curlmsg.h | Bin 0 -> 4641 bytes neo/curl/src/curlmsg.msg | 87 + neo/curl/src/curlmsg.sdl | Bin 0 -> 5413 bytes neo/curl/src/curlmsg_vms.h | 90 + neo/curl/src/getpass.c | 234 + neo/curl/src/getpass.h | 35 + neo/curl/src/homedir.c | 116 + neo/curl/src/homedir.h | 28 + neo/curl/src/hugehelp.c | 3 + neo/curl/src/hugehelp.h | 26 + neo/curl/src/macos/MACINSTALL.TXT | 38 + neo/curl/src/macos/curl.mcp.xml.sit.hqx | 154 + neo/curl/src/macos/src/curl_GUSIConfig.cpp | 79 + neo/curl/src/macos/src/macos_main.cpp | 26 + neo/curl/src/main.c | 3699 ++ neo/curl/src/makefile.amiga | 29 + neo/curl/src/makefile.dj | 59 + neo/curl/src/mkhelp.pl | 215 + neo/curl/src/setup.h | 129 + neo/curl/src/urlglob.c | 502 + neo/curl/src/urlglob.h | 66 + neo/curl/src/version.h | 35 + neo/curl/src/writeenv.c | 109 + neo/curl/src/writeenv.h | 28 + neo/curl/src/writeout.c | 229 + neo/curl/src/writeout.h | 28 + neo/curl/testcurl.sh | 303 + neo/curl/tests/FILEFORMAT | 158 + neo/curl/tests/Makefile.am | 46 + neo/curl/tests/Makefile.in | 536 + neo/curl/tests/README | 88 + neo/curl/tests/data/Makefile.am | 30 + neo/curl/tests/data/Makefile.in | 380 + neo/curl/tests/data/test1 | 47 + neo/curl/tests/data/test10 | 60 + neo/curl/tests/data/test100 | 48 + neo/curl/tests/data/test101 | 48 + neo/curl/tests/data/test102 | 43 + neo/curl/tests/data/test103 | 45 + neo/curl/tests/data/test104 | 35 + neo/curl/tests/data/test105 | 43 + neo/curl/tests/data/test106 | 40 + neo/curl/tests/data/test107 | 42 + neo/curl/tests/data/test108 | 47 + neo/curl/tests/data/test109 | 41 + neo/curl/tests/data/test11 | 67 + neo/curl/tests/data/test110 | 44 + neo/curl/tests/data/test111 | 37 + neo/curl/tests/data/test112 | 41 + neo/curl/tests/data/test113 | 29 + neo/curl/tests/data/test114 | 30 + neo/curl/tests/data/test115 | 35 + neo/curl/tests/data/test116 | 37 + neo/curl/tests/data/test117 | 36 + neo/curl/tests/data/test118 | 38 + neo/curl/tests/data/test119 | 40 + neo/curl/tests/data/test12 | 47 + neo/curl/tests/data/test120 | 43 + neo/curl/tests/data/test121 | 40 + neo/curl/tests/data/test122 | 36 + neo/curl/tests/data/test123 | 31 + neo/curl/tests/data/test124 | 38 + neo/curl/tests/data/test125 | 33 + neo/curl/tests/data/test126 | 38 + neo/curl/tests/data/test127 | 36 + neo/curl/tests/data/test128 | 47 + neo/curl/tests/data/test13 | 37 + neo/curl/tests/data/test130 | 56 + neo/curl/tests/data/test131 | 56 + neo/curl/tests/data/test132 | 56 + neo/curl/tests/data/test133 | 56 + neo/curl/tests/data/test134 | 56 + neo/curl/tests/data/test135 | 43 + neo/curl/tests/data/test136 | 33 + neo/curl/tests/data/test137 | 38 + neo/curl/tests/data/test138 | 41 + neo/curl/tests/data/test139 | 38 + neo/curl/tests/data/test14 | 37 + neo/curl/tests/data/test140 | 33 + neo/curl/tests/data/test141 | 39 + neo/curl/tests/data/test142 | 30 + neo/curl/tests/data/test143 | 35 + neo/curl/tests/data/test144 | 40 + neo/curl/tests/data/test145 | 43 + neo/curl/tests/data/test146 | 47 + neo/curl/tests/data/test147 | 49 + neo/curl/tests/data/test148 | 42 + neo/curl/tests/data/test149 | 47 + neo/curl/tests/data/test15 | 49 + neo/curl/tests/data/test16 | 41 + neo/curl/tests/data/test17 | 46 + neo/curl/tests/data/test18 | 84 + neo/curl/tests/data/test19 | 25 + neo/curl/tests/data/test190 | 36 + neo/curl/tests/data/test2 | 45 + neo/curl/tests/data/test20 | 25 + neo/curl/tests/data/test200 | 34 + neo/curl/tests/data/test201 | 25 + neo/curl/tests/data/test202 | 29 + neo/curl/tests/data/test203 | 34 + neo/curl/tests/data/test21 | 25 + neo/curl/tests/data/test22 | 38 + neo/curl/tests/data/test23 | 25 + neo/curl/tests/data/test24 | 40 + neo/curl/tests/data/test25 | 112 + neo/curl/tests/data/test26 | 38 + neo/curl/tests/data/test27 | 49 + neo/curl/tests/data/test28 | 67 + neo/curl/tests/data/test29 | 43 + neo/curl/tests/data/test3 | 52 + neo/curl/tests/data/test30 | 35 + neo/curl/tests/data/test300 | 41 + neo/curl/tests/data/test301 | 45 + neo/curl/tests/data/test302 | 35 + neo/curl/tests/data/test303 | 43 + neo/curl/tests/data/test304 | 61 + neo/curl/tests/data/test305 | 30 + neo/curl/tests/data/test306 | 54 + neo/curl/tests/data/test31 | 59 + neo/curl/tests/data/test32 | 48 + neo/curl/tests/data/test33 | 55 + neo/curl/tests/data/test34 | 58 + neo/curl/tests/data/test36 | 57 + neo/curl/tests/data/test37 | 39 + neo/curl/tests/data/test38 | 52 + neo/curl/tests/data/test39 | 76 + neo/curl/tests/data/test4 | 42 + neo/curl/tests/data/test40 | 67 + neo/curl/tests/data/test41 | 23 + neo/curl/tests/data/test42 | 67 + neo/curl/tests/data/test43 | 67 + neo/curl/tests/data/test44 | 64 + neo/curl/tests/data/test45 | 67 + neo/curl/tests/data/test46 | 69 + neo/curl/tests/data/test47 | 41 + neo/curl/tests/data/test48 | 39 + neo/curl/tests/data/test49 | 67 + neo/curl/tests/data/test5 | 41 + neo/curl/tests/data/test50 | 67 + neo/curl/tests/data/test500 | 48 + neo/curl/tests/data/test501 | 30 + neo/curl/tests/data/test502 | 40 + neo/curl/tests/data/test503 | 61 + neo/curl/tests/data/test504 | 28 + neo/curl/tests/data/test505 | 58 + neo/curl/tests/data/test506 | 155 + neo/curl/tests/data/test507 | 26 + neo/curl/tests/data/test508 | 46 + neo/curl/tests/data/test509 | 51 + neo/curl/tests/data/test51 | 67 + neo/curl/tests/data/test510 | 55 + neo/curl/tests/data/test52 | 67 + neo/curl/tests/data/test53 | 46 + neo/curl/tests/data/test54 | 37 + neo/curl/tests/data/test55 | 59 + neo/curl/tests/data/test56 | 53 + neo/curl/tests/data/test57 | 39 + neo/curl/tests/data/test58 | 44 + neo/curl/tests/data/test59 | 40 + neo/curl/tests/data/test6 | 40 + neo/curl/tests/data/test60 | 49 + neo/curl/tests/data/test61 | 54 + neo/curl/tests/data/test62 | 49 + neo/curl/tests/data/test63 | 41 + neo/curl/tests/data/test64 | 69 + neo/curl/tests/data/test65 | 73 + neo/curl/tests/data/test66 | 34 + neo/curl/tests/data/test67 | 82 + neo/curl/tests/data/test68 | 84 + neo/curl/tests/data/test69 | 103 + neo/curl/tests/data/test7 | 52 + neo/curl/tests/data/test70 | 80 + neo/curl/tests/data/test71 | 70 + neo/curl/tests/data/test72 | 76 + neo/curl/tests/data/test73 | 45 + neo/curl/tests/data/test74 | 67 + neo/curl/tests/data/test75 | 33 + neo/curl/tests/data/test76 | 29 + neo/curl/tests/data/test77 | 47 + neo/curl/tests/data/test78 | 59 + neo/curl/tests/data/test79 | 42 + neo/curl/tests/data/test8 | 50 + neo/curl/tests/data/test80 | 59 + neo/curl/tests/data/test81 | 80 + neo/curl/tests/data/test82 | 45 + neo/curl/tests/data/test83 | 58 + neo/curl/tests/data/test84 | 44 + neo/curl/tests/data/test85 | 45 + neo/curl/tests/data/test86 | 90 + neo/curl/tests/data/test87 | 25 + neo/curl/tests/data/test88 | 86 + neo/curl/tests/data/test89 | 128 + neo/curl/tests/data/test9 | 65 + neo/curl/tests/data/test90 | 172 + neo/curl/tests/data/test91 | 104 + neo/curl/tests/data/test92 | 44 + neo/curl/tests/data/test93 | 41 + neo/curl/tests/data/test94 | 45 + neo/curl/tests/data/test95 | 60 + neo/curl/tests/data/test97 | 44 + neo/curl/tests/data/test98 | 47 + neo/curl/tests/data/test99 | 48 + neo/curl/tests/ftpserver.pl | 602 + neo/curl/tests/ftpsserver.pl | 85 + neo/curl/tests/getpart.pm | 216 + neo/curl/tests/httpserver.pl | 22 + neo/curl/tests/httpsserver.pl | 87 + neo/curl/tests/libtest/Makefile.am | 85 + neo/curl/tests/libtest/Makefile.in | 608 + neo/curl/tests/libtest/first.c | 31 + neo/curl/tests/libtest/lib500.c | 13 + neo/curl/tests/libtest/lib501.c | 14 + neo/curl/tests/libtest/lib502.c | 33 + neo/curl/tests/libtest/lib503.c | 84 + neo/curl/tests/libtest/lib504.c | 89 + neo/curl/tests/libtest/lib505.c | 111 + neo/curl/tests/libtest/lib506.c | 230 + neo/curl/tests/libtest/lib507.c | 50 + neo/curl/tests/libtest/lib508.c | 67 + neo/curl/tests/libtest/lib509.c | 256 + neo/curl/tests/libtest/lib510.c | 80 + neo/curl/tests/libtest/test.h | 35 + neo/curl/tests/memanalyze.pl | 346 + neo/curl/tests/runtests.pl | 1579 + neo/curl/tests/server/Makefile.am | 36 + neo/curl/tests/server/Makefile.in | 495 + neo/curl/tests/server/getpart.c | 189 + neo/curl/tests/server/getpart.h | 26 + neo/curl/tests/server/sws.c | 769 + neo/curl/tests/stunnel.pem | 138 + neo/curllib.vcxproj | 157 + neo/curllib.vcxproj.filters | 253 + neo/d3xp/AF.cpp | 1271 + neo/d3xp/AF.h | 120 + neo/d3xp/AFEntity.cpp | 3689 ++ neo/d3xp/AFEntity.h | 612 + neo/d3xp/Actor.cpp | 3400 ++ neo/d3xp/Actor.h | 340 + neo/d3xp/BrittleFracture.cpp | 1380 + neo/d3xp/BrittleFracture.h | 134 + neo/d3xp/Camera.cpp | 723 + neo/d3xp/Camera.h | 132 + neo/d3xp/EndLevel.cpp | 185 + neo/d3xp/EndLevel.h | 66 + neo/d3xp/Entity.cpp | 5602 +++ neo/d3xp/Entity.h | 617 + neo/d3xp/Fx.cpp | 822 + neo/d3xp/Fx.h | 106 + neo/d3xp/Game.def | 2 + neo/d3xp/Game.h | 356 + neo/d3xp/GameEdit.cpp | 1142 + neo/d3xp/GameEdit.h | 119 + neo/d3xp/Game_local.cpp | 4986 +++ neo/d3xp/Game_local.h | 808 + neo/d3xp/Game_network.cpp | 1798 + neo/d3xp/Grabber.cpp | 735 + neo/d3xp/Grabber.h | 86 + neo/d3xp/IK.cpp | 1127 + neo/d3xp/IK.h | 182 + neo/d3xp/Item.cpp | 2164 ++ neo/d3xp/Item.h | 314 + neo/d3xp/Light.cpp | 1152 + neo/d3xp/Light.h | 135 + neo/d3xp/Misc.cpp | 3753 ++ neo/d3xp/Misc.h | 897 + neo/d3xp/Moveable.cpp | 1355 + neo/d3xp/Moveable.h | 215 + neo/d3xp/Mover.cpp | 4693 +++ neo/d3xp/Mover.h | 560 + neo/d3xp/MultiplayerGame.cpp | 4385 +++ neo/d3xp/MultiplayerGame.h | 483 + neo/d3xp/Player.cpp | 10119 +++++ neo/d3xp/Player.h | 840 + neo/d3xp/PlayerIcon.cpp | 198 + neo/d3xp/PlayerIcon.h | 67 + neo/d3xp/PlayerView.cpp | 1853 + neo/d3xp/PlayerView.h | 429 + neo/d3xp/Projectile.cpp | 2652 ++ neo/d3xp/Projectile.h | 284 + neo/d3xp/Pvs.cpp | 1456 + neo/d3xp/Pvs.h | 133 + neo/d3xp/SecurityCamera.cpp | 587 + neo/d3xp/SecurityCamera.h | 97 + neo/d3xp/SmokeParticles.cpp | 447 + neo/d3xp/SmokeParticles.h | 105 + neo/d3xp/Sound.cpp | 305 + neo/d3xp/Sound.h | 76 + neo/d3xp/Target.cpp | 1801 + neo/d3xp/Target.h | 578 + neo/d3xp/Trigger.cpp | 1327 + neo/d3xp/Trigger.h | 318 + neo/d3xp/Weapon.cpp | 3938 ++ neo/d3xp/Weapon.h | 427 + neo/d3xp/WorldSpawn.cpp | 143 + neo/d3xp/WorldSpawn.h | 55 + neo/d3xp/ai/AAS.cpp | 275 + neo/d3xp/ai/AAS.h | 141 + neo/d3xp/ai/AAS_debug.cpp | 508 + neo/d3xp/ai/AAS_local.h | 189 + neo/d3xp/ai/AAS_pathing.cpp | 716 + neo/d3xp/ai/AAS_routing.cpp | 1349 + neo/d3xp/ai/AI.cpp | 5354 +++ neo/d3xp/ai/AI.h | 736 + neo/d3xp/ai/AI_Vagary.cpp | 147 + neo/d3xp/ai/AI_events.cpp | 2906 ++ neo/d3xp/ai/AI_pathing.cpp | 1525 + neo/d3xp/anim/Anim.cpp | 1087 + neo/d3xp/anim/Anim.h | 627 + neo/d3xp/anim/Anim_Blend.cpp | 5108 +++ neo/d3xp/anim/Anim_Import.cpp | 568 + neo/d3xp/anim/Anim_Testmodel.cpp | 927 + neo/d3xp/anim/Anim_Testmodel.h | 95 + neo/d3xp/gamesys/Callbacks.cpp | 2626 ++ neo/d3xp/gamesys/Class.cpp | 1068 + neo/d3xp/gamesys/Class.h | 357 + neo/d3xp/gamesys/DebugGraph.cpp | 92 + neo/d3xp/gamesys/DebugGraph.h | 39 + neo/d3xp/gamesys/Event.cpp | 1068 + neo/d3xp/gamesys/Event.h | 212 + neo/d3xp/gamesys/NoGameTypeInfo.h | 83 + neo/d3xp/gamesys/SaveGame.cpp | 1557 + neo/d3xp/gamesys/SaveGame.h | 164 + neo/d3xp/gamesys/SysCmds.cpp | 2510 ++ neo/d3xp/gamesys/SysCmds.h | 34 + neo/d3xp/gamesys/SysCvar.cpp | 415 + neo/d3xp/gamesys/SysCvar.h | 304 + neo/d3xp/gamesys/TypeInfo.cpp | 1431 + neo/d3xp/gamesys/TypeInfo.h | 52 + neo/d3xp/physics/Clip.cpp | 1671 + neo/d3xp/physics/Clip.h | 352 + neo/d3xp/physics/Force.cpp | 93 + neo/d3xp/physics/Force.h | 66 + neo/d3xp/physics/Force_Constant.cpp | 135 + neo/d3xp/physics/Force_Constant.h | 71 + neo/d3xp/physics/Force_Drag.cpp | 155 + neo/d3xp/physics/Force_Drag.h | 74 + neo/d3xp/physics/Force_Field.cpp | 257 + neo/d3xp/physics/Force_Field.h | 94 + neo/d3xp/physics/Force_Grab.cpp | 188 + neo/d3xp/physics/Force_Grab.h | 81 + neo/d3xp/physics/Force_Spring.cpp | 165 + neo/d3xp/physics/Force_Spring.h | 75 + neo/d3xp/physics/Physics.cpp | 80 + neo/d3xp/physics/Physics.h | 183 + neo/d3xp/physics/Physics_AF.cpp | 8007 ++++ neo/d3xp/physics/Physics_AF.h | 1047 + neo/d3xp/physics/Physics_Actor.cpp | 382 + neo/d3xp/physics/Physics_Actor.h | 113 + neo/d3xp/physics/Physics_Base.cpp | 837 + neo/d3xp/physics/Physics_Base.h | 165 + neo/d3xp/physics/Physics_Monster.cpp | 806 + neo/d3xp/physics/Physics_Monster.h | 152 + neo/d3xp/physics/Physics_Parametric.cpp | 1181 + neo/d3xp/physics/Physics_Parametric.h | 176 + neo/d3xp/physics/Physics_Player.cpp | 2045 + neo/d3xp/physics/Physics_Player.h | 195 + neo/d3xp/physics/Physics_RigidBody.cpp | 1538 + neo/d3xp/physics/Physics_RigidBody.h | 196 + neo/d3xp/physics/Physics_Static.cpp | 842 + neo/d3xp/physics/Physics_Static.h | 158 + neo/d3xp/physics/Physics_StaticMulti.cpp | 1049 + neo/d3xp/physics/Physics_StaticMulti.h | 154 + neo/d3xp/physics/Push.cpp | 1448 + neo/d3xp/physics/Push.h | 113 + neo/d3xp/script/Script_Compiler.cpp | 2649 ++ neo/d3xp/script/Script_Compiler.h | 278 + neo/d3xp/script/Script_Interpreter.cpp | 1835 + neo/d3xp/script/Script_Interpreter.h | 271 + neo/d3xp/script/Script_Program.cpp | 2146 ++ neo/d3xp/script/Script_Program.h | 637 + neo/d3xp/script/Script_Thread.cpp | 1923 + neo/d3xp/script/Script_Thread.h | 340 + neo/doom.sln | 131 + neo/doom.suo | Bin 0 -> 42496 bytes neo/doomdll.vcxproj | 2518 ++ neo/doomdll.vcxproj.filters | 2544 ++ neo/doomdll.vcxproj.user | 38 + neo/framework/BuildDefines.h | 135 + neo/framework/BuildVersion.h | 28 + neo/framework/CVarSystem.cpp | 1257 + neo/framework/CVarSystem.h | 309 + neo/framework/CmdSystem.cpp | 783 + neo/framework/CmdSystem.h | 188 + neo/framework/Common.cpp | 3101 ++ neo/framework/Common.h | 215 + neo/framework/Compressor.cpp | 2576 ++ neo/framework/Compressor.h | 73 + neo/framework/Console.cpp | 1186 + neo/framework/Console.h | 72 + neo/framework/DeclAF.cpp | 1745 + neo/framework/DeclAF.h | 216 + neo/framework/DeclEntityDef.cpp | 153 + neo/framework/DeclEntityDef.h | 51 + neo/framework/DeclFX.cpp | 473 + neo/framework/DeclFX.h | 113 + neo/framework/DeclManager.cpp | 2230 ++ neo/framework/DeclManager.h | 336 + neo/framework/DeclPDA.cpp | 668 + neo/framework/DeclPDA.h | 167 + neo/framework/DeclParticle.cpp | 1431 + neo/framework/DeclParticle.h | 218 + neo/framework/DeclSkin.cpp | 185 + neo/framework/DeclSkin.h | 64 + neo/framework/DeclTable.cpp | 177 + neo/framework/DeclTable.h | 56 + neo/framework/DemoChecksum.h | 39 + neo/framework/DemoFile.cpp | 328 + neo/framework/DemoFile.h | 88 + neo/framework/EditField.cpp | 604 + neo/framework/EditField.h | 79 + neo/framework/EventLoop.cpp | 274 + neo/framework/EventLoop.h | 88 + neo/framework/File.cpp | 1365 + neo/framework/File.h | 243 + neo/framework/FileSystem.cpp | 4217 +++ neo/framework/FileSystem.h | 289 + neo/framework/KeyInput.cpp | 785 + neo/framework/KeyInput.h | 221 + neo/framework/Licensee.h | 115 + neo/framework/Session.cpp | 3324 ++ neo/framework/Session.h | 165 + neo/framework/Session_local.h | 363 + neo/framework/Session_menu.cpp | 1654 + neo/framework/Unzip.cpp | 4470 +++ neo/framework/Unzip.h | 346 + neo/framework/UsercmdGen.cpp | 1112 + neo/framework/UsercmdGen.h | 170 + neo/framework/async/AsyncClient.cpp | 2334 ++ neo/framework/async/AsyncClient.h | 218 + neo/framework/async/AsyncNetwork.cpp | 513 + neo/framework/async/AsyncNetwork.h | 219 + neo/framework/async/AsyncServer.cpp | 2825 ++ neo/framework/async/AsyncServer.h | 259 + neo/framework/async/MsgChannel.cpp | 790 + neo/framework/async/MsgChannel.h | 201 + neo/framework/async/NetworkSystem.cpp | 215 + neo/framework/async/NetworkSystem.h | 65 + neo/framework/async/ServerScan.cpp | 639 + neo/framework/async/ServerScan.h | 170 + neo/game-d3xp.vcxproj | 356 + neo/game-d3xp.vcxproj.filters | 313 + neo/game.vcxproj | 344 + neo/game.vcxproj.filters | 304 + neo/game/AF.cpp | 1271 + neo/game/AF.h | 120 + neo/game/AFEntity.cpp | 2879 ++ neo/game/AFEntity.h | 474 + neo/game/Actor.cpp | 3273 ++ neo/game/Actor.h | 319 + neo/game/BrittleFracture.cpp | 1286 + neo/game/BrittleFracture.h | 130 + neo/game/Camera.cpp | 719 + neo/game/Camera.h | 132 + neo/game/EndLevel.cpp | 185 + neo/game/EndLevel.h | 66 + neo/game/Entity.cpp | 5390 +++ neo/game/Entity.h | 524 + neo/game/Fx.cpp | 792 + neo/game/Fx.h | 106 + neo/game/Game.def | 1 + neo/game/Game.h | 354 + neo/game/GameEdit.cpp | 1142 + neo/game/GameEdit.h | 119 + neo/game/Game_local.cpp | 4368 +++ neo/game/Game_local.h | 743 + neo/game/Game_network.cpp | 1753 + neo/game/IK.cpp | 1127 + neo/game/IK.h | 182 + neo/game/Item.cpp | 1354 + neo/game/Item.h | 227 + neo/game/Light.cpp | 1145 + neo/game/Light.h | 135 + neo/game/Misc.cpp | 3149 ++ neo/game/Misc.h | 765 + neo/game/Moveable.cpp | 1193 + neo/game/Moveable.h | 197 + neo/game/Mover.cpp | 4632 +++ neo/game/Mover.h | 550 + neo/game/MultiplayerGame.cpp | 3410 ++ neo/game/MultiplayerGame.h | 371 + neo/game/Player.cpp | 8521 +++++ neo/game/Player.h | 721 + neo/game/PlayerIcon.cpp | 183 + neo/game/PlayerIcon.h | 63 + neo/game/PlayerView.cpp | 722 + neo/game/PlayerView.h | 126 + neo/game/Projectile.cpp | 2393 ++ neo/game/Projectile.h | 269 + neo/game/Pvs.cpp | 1422 + neo/game/Pvs.h | 129 + neo/game/SecurityCamera.cpp | 587 + neo/game/SecurityCamera.h | 97 + neo/game/SmokeParticles.cpp | 421 + neo/game/SmokeParticles.h | 102 + neo/game/Sound.cpp | 305 + neo/game/Sound.h | 76 + neo/game/Target.cpp | 1765 + neo/game/Target.h | 567 + neo/game/Trigger.cpp | 1192 + neo/game/Trigger.h | 287 + neo/game/Weapon.cpp | 3167 ++ neo/game/Weapon.h | 365 + neo/game/WorldSpawn.cpp | 143 + neo/game/WorldSpawn.h | 55 + neo/game/ai/AAS.cpp | 275 + neo/game/ai/AAS.h | 141 + neo/game/ai/AAS_debug.cpp | 508 + neo/game/ai/AAS_local.h | 189 + neo/game/ai/AAS_pathing.cpp | 716 + neo/game/ai/AAS_routing.cpp | 1349 + neo/game/ai/AI.cpp | 5106 +++ neo/game/ai/AI.h | 691 + neo/game/ai/AI_Vagary.cpp | 147 + neo/game/ai/AI_events.cpp | 2707 ++ neo/game/ai/AI_pathing.cpp | 1524 + neo/game/anim/Anim.cpp | 1087 + neo/game/anim/Anim.h | 621 + neo/game/anim/Anim_Blend.cpp | 5022 +++ neo/game/anim/Anim_Import.cpp | 562 + neo/game/anim/Anim_Testmodel.cpp | 924 + neo/game/anim/Anim_Testmodel.h | 95 + neo/game/gamesys/Callbacks.cpp | 2626 ++ neo/game/gamesys/Class.cpp | 1059 + neo/game/gamesys/Class.h | 357 + neo/game/gamesys/DebugGraph.cpp | 92 + neo/game/gamesys/DebugGraph.h | 39 + neo/game/gamesys/Event.cpp | 872 + neo/game/gamesys/Event.h | 209 + neo/game/gamesys/NoGameTypeInfo.h | 83 + neo/game/gamesys/SaveGame.cpp | 1547 + neo/game/gamesys/SaveGame.h | 164 + neo/game/gamesys/SysCmds.cpp | 2405 ++ neo/game/gamesys/SysCmds.h | 34 + neo/game/gamesys/SysCvar.cpp | 333 + neo/game/gamesys/SysCvar.h | 255 + neo/game/gamesys/TypeInfo.cpp | 1431 + neo/game/gamesys/TypeInfo.h | 52 + neo/game/physics/Clip.cpp | 1666 + neo/game/physics/Clip.h | 352 + neo/game/physics/Force.cpp | 93 + neo/game/physics/Force.h | 66 + neo/game/physics/Force_Constant.cpp | 135 + neo/game/physics/Force_Constant.h | 71 + neo/game/physics/Force_Drag.cpp | 155 + neo/game/physics/Force_Drag.h | 74 + neo/game/physics/Force_Field.cpp | 257 + neo/game/physics/Force_Field.h | 94 + neo/game/physics/Force_Spring.cpp | 165 + neo/game/physics/Force_Spring.h | 75 + neo/game/physics/Physics.cpp | 80 + neo/game/physics/Physics.h | 183 + neo/game/physics/Physics_AF.cpp | 8006 ++++ neo/game/physics/Physics_AF.h | 1047 + neo/game/physics/Physics_Actor.cpp | 382 + neo/game/physics/Physics_Actor.h | 113 + neo/game/physics/Physics_Base.cpp | 837 + neo/game/physics/Physics_Base.h | 165 + neo/game/physics/Physics_Monster.cpp | 806 + neo/game/physics/Physics_Monster.h | 152 + neo/game/physics/Physics_Parametric.cpp | 1181 + neo/game/physics/Physics_Parametric.h | 176 + neo/game/physics/Physics_Player.cpp | 2045 + neo/game/physics/Physics_Player.h | 195 + neo/game/physics/Physics_RigidBody.cpp | 1538 + neo/game/physics/Physics_RigidBody.h | 196 + neo/game/physics/Physics_Static.cpp | 842 + neo/game/physics/Physics_Static.h | 158 + neo/game/physics/Physics_StaticMulti.cpp | 1049 + neo/game/physics/Physics_StaticMulti.h | 154 + neo/game/physics/Push.cpp | 1448 + neo/game/physics/Push.h | 113 + neo/game/script/Script_Compiler.cpp | 2649 ++ neo/game/script/Script_Compiler.h | 278 + neo/game/script/Script_Interpreter.cpp | 1835 + neo/game/script/Script_Interpreter.h | 271 + neo/game/script/Script_Program.cpp | 2146 ++ neo/game/script/Script_Program.h | 623 + neo/game/script/Script_Thread.cpp | 1843 + neo/game/script/Script_Thread.h | 329 + neo/idlib.vcxproj | 297 + neo/idlib.vcxproj.filters | 352 + neo/idlib/Base64.cpp | 233 + neo/idlib/Base64.h | 111 + neo/idlib/BitMsg.cpp | 1067 + neo/idlib/BitMsg.h | 676 + neo/idlib/CmdArgs.cpp | 198 + neo/idlib/CmdArgs.h | 73 + neo/idlib/Dict.cpp | 699 + neo/idlib/Dict.h | 301 + neo/idlib/Heap.cpp | 1770 + neo/idlib/Heap.h | 888 + neo/idlib/LangDict.cpp | 309 + neo/idlib/LangDict.h | 77 + neo/idlib/Lexer.cpp | 1797 + neo/idlib/Lexer.h | 307 + neo/idlib/Lib.cpp | 585 + neo/idlib/Lib.h | 244 + neo/idlib/MapFile.cpp | 967 + neo/idlib/MapFile.h | 237 + neo/idlib/Parser.cpp | 3252 ++ neo/idlib/Parser.h | 283 + neo/idlib/Str.cpp | 1743 + neo/idlib/Str.h | 1044 + neo/idlib/Timer.cpp | 160 + neo/idlib/Timer.h | 223 + neo/idlib/Token.cpp | 179 + neo/idlib/Token.h | 165 + neo/idlib/bv/Bounds.cpp | 424 + neo/idlib/bv/Bounds.h | 409 + neo/idlib/bv/Box.cpp | 849 + neo/idlib/bv/Box.h | 297 + neo/idlib/bv/Frustum.cpp | 2843 ++ neo/idlib/bv/Frustum.h | 265 + neo/idlib/bv/Frustum_gcc.cpp | 143 + neo/idlib/bv/Sphere.cpp | 155 + neo/idlib/bv/Sphere.h | 275 + neo/idlib/containers/BTree.h | 520 + neo/idlib/containers/BinSearch.h | 138 + neo/idlib/containers/HashIndex.cpp | 155 + neo/idlib/containers/HashIndex.h | 405 + neo/idlib/containers/HashTable.h | 404 + neo/idlib/containers/Hierarchy.h | 362 + neo/idlib/containers/LinkList.h | 343 + neo/idlib/containers/List.h | 950 + neo/idlib/containers/PlaneSet.h | 81 + neo/idlib/containers/Queue.h | 88 + neo/idlib/containers/Stack.h | 86 + neo/idlib/containers/StaticList.h | 548 + neo/idlib/containers/StrList.h | 204 + neo/idlib/containers/StrPool.h | 228 + neo/idlib/containers/VectorSet.h | 270 + neo/idlib/geometry/DrawVert.cpp | 44 + neo/idlib/geometry/DrawVert.h | 107 + neo/idlib/geometry/JointTransform.cpp | 87 + neo/idlib/geometry/JointTransform.h | 245 + neo/idlib/geometry/Surface.cpp | 930 + neo/idlib/geometry/Surface.h | 233 + neo/idlib/geometry/Surface_Patch.cpp | 691 + neo/idlib/geometry/Surface_Patch.h | 146 + neo/idlib/geometry/Surface_Polytope.cpp | 336 + neo/idlib/geometry/Surface_Polytope.h | 70 + neo/idlib/geometry/Surface_SweptSpline.cpp | 223 + neo/idlib/geometry/Surface_SweptSpline.h | 93 + neo/idlib/geometry/TraceModel.cpp | 1494 + neo/idlib/geometry/TraceModel.h | 189 + neo/idlib/geometry/Winding.cpp | 1601 + neo/idlib/geometry/Winding.h | 401 + neo/idlib/geometry/Winding2D.cpp | 754 + neo/idlib/geometry/Winding2D.h | 169 + neo/idlib/hashing/CRC32.cpp | 167 + neo/idlib/hashing/CRC32.h | 18 + neo/idlib/hashing/MD4.cpp | 259 + neo/idlib/hashing/MD4.h | 15 + neo/idlib/hashing/MD5.cpp | 272 + neo/idlib/hashing/MD5.h | 15 + neo/idlib/math/Angles.cpp | 240 + neo/idlib/math/Angles.h | 262 + neo/idlib/math/Complex.cpp | 41 + neo/idlib/math/Complex.h | 348 + neo/idlib/math/Curve.h | 2542 ++ neo/idlib/math/Extrapolate.h | 241 + neo/idlib/math/Interpolate.h | 417 + neo/idlib/math/Lcp.cpp | 1644 + neo/idlib/math/Lcp.h | 77 + neo/idlib/math/Math.cpp | 131 + neo/idlib/math/Math.h | 931 + neo/idlib/math/Matrix.cpp | 8102 ++++ neo/idlib/math/Matrix.h | 2943 ++ neo/idlib/math/Ode.cpp | 355 + neo/idlib/math/Ode.h | 146 + neo/idlib/math/Plane.cpp | 154 + neo/idlib/math/Plane.h | 391 + neo/idlib/math/Pluecker.cpp | 86 + neo/idlib/math/Pluecker.h | 368 + neo/idlib/math/Polynomial.cpp | 242 + neo/idlib/math/Polynomial.h | 629 + neo/idlib/math/Quat.cpp | 252 + neo/idlib/math/Quat.h | 404 + neo/idlib/math/Random.h | 158 + neo/idlib/math/Rotation.cpp | 157 + neo/idlib/math/Rotation.h | 211 + neo/idlib/math/Simd.cpp | 4225 +++ neo/idlib/math/Simd.h | 204 + neo/idlib/math/Simd_3DNow.cpp | 297 + neo/idlib/math/Simd_3DNow.h | 50 + neo/idlib/math/Simd_AltiVec.cpp | 11239 ++++++ neo/idlib/math/Simd_AltiVec.h | 250 + neo/idlib/math/Simd_Generic.cpp | 3060 ++ neo/idlib/math/Simd_Generic.h | 137 + neo/idlib/math/Simd_MMX.cpp | 367 + neo/idlib/math/Simd_MMX.h | 54 + neo/idlib/math/Simd_SSE.cpp | 18087 +++++++++ neo/idlib/math/Simd_SSE.h | 143 + neo/idlib/math/Simd_SSE2.cpp | 877 + neo/idlib/math/Simd_SSE2.h | 57 + neo/idlib/math/Simd_SSE3.cpp | 367 + neo/idlib/math/Simd_SSE3.h | 53 + neo/idlib/math/Vector.cpp | 397 + neo/idlib/math/Vector.h | 2002 + neo/idlib/precompiled.cpp | 28 + neo/idlib/precompiled.h | 217 + neo/installdebug.bat | 2 + neo/installrelease.bat | 4 + neo/openal/docs/ChangeLog | 378 + neo/openal/docs/Makefile | 148 + neo/openal/docs/alc-context.sgml | 846 + neo/openal/docs/api-reference.html | 15 + neo/openal/docs/app-annotations.sgml | 297 + neo/openal/docs/app-constants.sgml | 43 + neo/openal/docs/app-extensionprocess.sgml | 36 + neo/openal/docs/app-extensions.sgml | 754 + neo/openal/docs/architecture.html | 16 + neo/openal/docs/chp-buffers.sgml | 691 + neo/openal/docs/chp-introduction.sgml | 304 + neo/openal/docs/chp-multichannel.sgml | 261 + neo/openal/docs/chp-operation.sgml | 977 + neo/openal/docs/chp-queueing.sgml | 2 + neo/openal/docs/chp-rendering.sgml | 2076 ++ neo/openal/docs/chp-state.sgml | 730 + neo/openal/docs/ent-examples.sgml | 5 + neo/openal/docs/ent-extensions.sgml | 3 + neo/openal/docs/ent-marks-annotated.sgml | 12 + neo/openal/docs/ent-marks-full.sgml | 12 + neo/openal/docs/ent-marks-reference.sgml | 12 + neo/openal/docs/ent-marks-specification.sgml | 12 + neo/openal/docs/ent-names.sgml | 43 + neo/openal/docs/index.html | 21 + neo/openal/docs/oalspecs.sgml | 109 + neo/openal/docs/sec-bookinfo.sgml | 53 + neo/openal/docs/specification.html | 18 + neo/openal/docs/white-paper.html | 16 + neo/openal/idal.cpp | 158 + neo/openal/idal.h | 65 + neo/openal/idal.py | 103 + neo/openal/include/al.h | 491 + neo/openal/include/alc.h | 91 + neo/openal/include/alctypes.h | 125 + neo/openal/include/altypes.h | 333 + neo/openal/include/alu.h | 34 + neo/openal/include/eax2.h | 345 + neo/openal/include/eax3.h | 547 + neo/openal/include/eax4.h | 1575 + neo/openal/include/eax5.h | 1792 + neo/openal/include/eaxac3.h | 232 + neo/openal/include/eaxman.h | 171 + neo/openal/include/efxlib.h | 61 + neo/openal/lib/eaxguid.lib | Bin 0 -> 4426 bytes neo/openal/lib/openal32.lib | Bin 0 -> 17240 bytes neo/openal/osx/OpenAL.framework/Headers | 1 + neo/openal/osx/OpenAL.framework/OpenAL | 1 + neo/openal/osx/OpenAL.framework/Resources | 1 + .../OpenAL.framework/Versions/A/Headers/al.h | 498 + .../OpenAL.framework/Versions/A/Headers/alc.h | 88 + .../Versions/A/Headers/alctypes.h | 165 + .../Versions/A/Headers/altypes.h | 326 + .../Versions/A/Headers/alut.h | 55 + .../osx/OpenAL.framework/Versions/A/OpenAL | Bin 0 -> 256696 bytes .../Resources/English.lproj/InfoPlist.strings | Bin 0 -> 486 bytes .../Versions/A/Resources/Info.plist | 26 + .../Versions/A/Resources/READ_ME | 86 + .../Versions/A/Resources/pbdevelopment.plist | 8 + .../osx/OpenAL.framework/Versions/Current | 1 + neo/openal/stubs.cpp | 135 + neo/renderer/Cinematic.cpp | 1774 + neo/renderer/Cinematic.h | 114 + neo/renderer/GuiModel.cpp | 652 + neo/renderer/GuiModel.h | 70 + neo/renderer/Image.h | 496 + neo/renderer/Image_files.cpp | 1181 + neo/renderer/Image_init.cpp | 2219 ++ neo/renderer/Image_load.cpp | 2212 ++ neo/renderer/Image_process.cpp | 621 + neo/renderer/Image_program.cpp | 644 + neo/renderer/Interaction.cpp | 1308 + neo/renderer/Interaction.h | 184 + neo/renderer/Material.cpp | 2736 ++ neo/renderer/Material.h | 691 + neo/renderer/MegaTexture.cpp | 913 + neo/renderer/MegaTexture.h | 99 + neo/renderer/Model.cpp | 2328 ++ neo/renderer/Model.h | 314 + neo/renderer/ModelDecal.cpp | 537 + neo/renderer/ModelDecal.h | 116 + neo/renderer/ModelManager.cpp | 622 + neo/renderer/ModelManager.h | 99 + neo/renderer/ModelOverlay.cpp | 386 + neo/renderer/ModelOverlay.h | 93 + neo/renderer/Model_ase.cpp | 912 + neo/renderer/Model_ase.h | 95 + neo/renderer/Model_beam.cpp | 213 + neo/renderer/Model_liquid.cpp | 532 + neo/renderer/Model_local.h | 385 + neo/renderer/Model_lwo.cpp | 4138 ++ neo/renderer/Model_lwo.h | 676 + neo/renderer/Model_ma.cpp | 1107 + neo/renderer/Model_ma.h | 145 + neo/renderer/Model_md3.cpp | 371 + neo/renderer/Model_md3.h | 146 + neo/renderer/Model_md5.cpp | 962 + neo/renderer/Model_prt.cpp | 290 + neo/renderer/Model_sprite.cpp | 198 + neo/renderer/RenderEntity.cpp | 117 + neo/renderer/RenderSystem.cpp | 1041 + neo/renderer/RenderSystem.h | 276 + neo/renderer/RenderSystem_init.cpp | 2324 ++ neo/renderer/RenderWorld.cpp | 2142 ++ neo/renderer/RenderWorld.h | 424 + neo/renderer/RenderWorld_demo.cpp | 729 + neo/renderer/RenderWorld_load.cpp | 700 + neo/renderer/RenderWorld_local.h | 262 + neo/renderer/RenderWorld_portals.cpp | 1073 + neo/renderer/VertexCache.cpp | 563 + neo/renderer/VertexCache.h | 143 + neo/renderer/cg_explicit.cpp | 423 + neo/renderer/cg_explicit.h | 866 + neo/renderer/draw_arb.cpp | 529 + neo/renderer/draw_arb2.cpp | 537 + neo/renderer/draw_common.cpp | 1725 + neo/renderer/draw_exp.cpp | 2618 ++ neo/renderer/draw_exp_stub.cpp | 38 + neo/renderer/draw_nv10.cpp | 647 + neo/renderer/draw_nv20.cpp | 885 + neo/renderer/draw_r200.cpp | 516 + neo/renderer/glext.h | 5919 +++ neo/renderer/jpeg-6/jcapimin.c | 228 + neo/renderer/jpeg-6/jcapistd.c | 161 + neo/renderer/jpeg-6/jccoefct.c | 448 + neo/renderer/jpeg-6/jccolor.c | 459 + neo/renderer/jpeg-6/jcdctmgr.c | 388 + neo/renderer/jpeg-6/jchuff.c | 846 + neo/renderer/jpeg-6/jchuff.h | 34 + neo/renderer/jpeg-6/jcinit.c | 72 + neo/renderer/jpeg-6/jcmainct.c | 293 + neo/renderer/jpeg-6/jcmarker.c | 639 + neo/renderer/jpeg-6/jcmaster.c | 578 + neo/renderer/jpeg-6/jcomapi.c | 94 + neo/renderer/jpeg-6/jconfig.h | 41 + neo/renderer/jpeg-6/jcparam.c | 575 + neo/renderer/jpeg-6/jcphuff.c | 829 + neo/renderer/jpeg-6/jcprepct.c | 371 + neo/renderer/jpeg-6/jcsample.c | 519 + neo/renderer/jpeg-6/jctrans.c | 371 + neo/renderer/jpeg-6/jdapimin.c | 398 + neo/renderer/jpeg-6/jdapistd.c | 275 + neo/renderer/jpeg-6/jdatadst.c | 151 + neo/renderer/jpeg-6/jdatasrc.c | 204 + neo/renderer/jpeg-6/jdcoefct.c | 725 + neo/renderer/jpeg-6/jdcolor.c | 367 + neo/renderer/jpeg-6/jdct.h | 176 + neo/renderer/jpeg-6/jddctmgr.c | 270 + neo/renderer/jpeg-6/jdhuff.c | 574 + neo/renderer/jpeg-6/jdhuff.h | 202 + neo/renderer/jpeg-6/jdinput.c | 381 + neo/renderer/jpeg-6/jdmainct.c | 512 + neo/renderer/jpeg-6/jdmarker.c | 1052 + neo/renderer/jpeg-6/jdmaster.c | 557 + neo/renderer/jpeg-6/jdmerge.c | 400 + neo/renderer/jpeg-6/jdphuff.c | 642 + neo/renderer/jpeg-6/jdpostct.c | 290 + neo/renderer/jpeg-6/jdsample.c | 478 + neo/renderer/jpeg-6/jdtrans.c | 122 + neo/renderer/jpeg-6/jerror.c | 234 + neo/renderer/jpeg-6/jerror.h | 273 + neo/renderer/jpeg-6/jfdctflt.c | 168 + neo/renderer/jpeg-6/jfdctfst.c | 224 + neo/renderer/jpeg-6/jfdctint.c | 283 + neo/renderer/jpeg-6/jidctflt.c | 241 + neo/renderer/jpeg-6/jidctfst.c | 367 + neo/renderer/jpeg-6/jidctint.c | 388 + neo/renderer/jpeg-6/jidctred.c | 397 + neo/renderer/jpeg-6/jinclude.h | 91 + neo/renderer/jpeg-6/jload.c | 145 + neo/renderer/jpeg-6/jmemansi.c | 167 + neo/renderer/jpeg-6/jmemdos.c | 634 + neo/renderer/jpeg-6/jmemmgr.c | 1115 + neo/renderer/jpeg-6/jmemname.c | 271 + neo/renderer/jpeg-6/jmemnobs.c | 103 + neo/renderer/jpeg-6/jmemsys.h | 182 + neo/renderer/jpeg-6/jmorecfg.h | 352 + neo/renderer/jpeg-6/jpegint.h | 388 + neo/renderer/jpeg-6/jpeglib.h | 1051 + neo/renderer/jpeg-6/jpegtran.c | 370 + neo/renderer/jpeg-6/jquant1.c | 856 + neo/renderer/jpeg-6/jquant2.c | 1310 + neo/renderer/jpeg-6/jutils.c | 175 + neo/renderer/jpeg-6/jversion.h | 14 + neo/renderer/qgl.h | 567 + neo/renderer/qgl_linked.h | 373 + neo/renderer/simplex.h | 600 + neo/renderer/tr_backend.cpp | 659 + neo/renderer/tr_deform.cpp | 1267 + neo/renderer/tr_font.cpp | 553 + neo/renderer/tr_guisurf.cpp | 219 + neo/renderer/tr_light.cpp | 1619 + neo/renderer/tr_lightrun.cpp | 872 + neo/renderer/tr_local.h | 1687 + neo/renderer/tr_main.cpp | 1163 + neo/renderer/tr_orderIndexes.cpp | 212 + neo/renderer/tr_polytope.cpp | 111 + neo/renderer/tr_render.cpp | 890 + neo/renderer/tr_rendertools.cpp | 2385 ++ neo/renderer/tr_shadowbounds.cpp | 638 + neo/renderer/tr_stencilshadow.cpp | 1395 + neo/renderer/tr_subview.cpp | 578 + neo/renderer/tr_trace.cpp | 427 + neo/renderer/tr_trisurf.cpp | 2274 ++ neo/renderer/tr_turboshadow.cpp | 356 + neo/renderer/wglext.h | 612 + neo/run.bat | 1 + neo/runrelease.bat | 1 + neo/sound/OggVorbis/ogg/AUTHORS | 4 + neo/sound/OggVorbis/ogg/COPYING | 28 + neo/sound/OggVorbis/ogg/README | 103 + neo/sound/OggVorbis/ogg/config_types.h.in | 11 + neo/sound/OggVorbis/ogg/ogg.h | 202 + neo/sound/OggVorbis/ogg/os_types.h | 145 + neo/sound/OggVorbis/oggsrc/bitwise.c | 782 + neo/sound/OggVorbis/oggsrc/framing.c | 1747 + neo/sound/OggVorbis/version.txt | 6 + neo/sound/OggVorbis/vorbis/AUTHORS | 3 + neo/sound/OggVorbis/vorbis/COPYING | 28 + neo/sound/OggVorbis/vorbis/README | 140 + neo/sound/OggVorbis/vorbis/codec.h | 240 + neo/sound/OggVorbis/vorbis/vorbisenc.h | 93 + neo/sound/OggVorbis/vorbis/vorbisfile.h | 144 + neo/sound/OggVorbis/vorbissrc/analysis.c | 119 + neo/sound/OggVorbis/vorbissrc/backends.h | 145 + neo/sound/OggVorbis/vorbissrc/barkmel.c | 64 + neo/sound/OggVorbis/vorbissrc/bitrate.c | 531 + neo/sound/OggVorbis/vorbissrc/bitrate.h | 84 + neo/sound/OggVorbis/vorbissrc/block.c | 971 + .../books/coupled/res_books_stereo.h | 19080 ++++++++++ .../vorbissrc/books/floor/floor_books.h | 1455 + .../books/uncoupled/res_books_uncoupled.h | 10907 ++++++ neo/sound/OggVorbis/vorbissrc/codebook.c | 615 + neo/sound/OggVorbis/vorbissrc/codebook.h | 160 + .../OggVorbis/vorbissrc/codec_internal.h | 134 + neo/sound/OggVorbis/vorbissrc/envelope.c | 382 + neo/sound/OggVorbis/vorbissrc/envelope.h | 81 + neo/sound/OggVorbis/vorbissrc/floor0.c | 223 + neo/sound/OggVorbis/vorbissrc/floor1.c | 1089 + neo/sound/OggVorbis/vorbissrc/highlevel.h | 58 + neo/sound/OggVorbis/vorbissrc/info.c | 603 + neo/sound/OggVorbis/vorbissrc/lookup.c | 94 + neo/sound/OggVorbis/vorbissrc/lookup.h | 32 + neo/sound/OggVorbis/vorbissrc/lookup_data.h | 189 + neo/sound/OggVorbis/vorbissrc/lookups.pl | 142 + neo/sound/OggVorbis/vorbissrc/lpc.c | 149 + neo/sound/OggVorbis/vorbissrc/lpc.h | 29 + neo/sound/OggVorbis/vorbissrc/lsp.c | 455 + neo/sound/OggVorbis/vorbissrc/lsp.h | 28 + neo/sound/OggVorbis/vorbissrc/mapping0.c | 763 + neo/sound/OggVorbis/vorbissrc/masking.h | 785 + neo/sound/OggVorbis/vorbissrc/mdct.c | 564 + neo/sound/OggVorbis/vorbissrc/mdct.h | 83 + neo/sound/OggVorbis/vorbissrc/misc.h | 52 + .../OggVorbis/vorbissrc/modes/floor_all.h | 226 + .../OggVorbis/vorbissrc/modes/psych_11.h | 51 + .../OggVorbis/vorbissrc/modes/psych_16.h | 129 + .../OggVorbis/vorbissrc/modes/psych_44.h | 532 + neo/sound/OggVorbis/vorbissrc/modes/psych_8.h | 102 + .../OggVorbis/vorbissrc/modes/residue_16.h | 163 + .../OggVorbis/vorbissrc/modes/residue_44.h | 254 + .../OggVorbis/vorbissrc/modes/residue_44u.h | 296 + .../OggVorbis/vorbissrc/modes/residue_8.h | 97 + .../OggVorbis/vorbissrc/modes/setup_11.h | 141 + .../OggVorbis/vorbissrc/modes/setup_16.h | 149 + .../OggVorbis/vorbissrc/modes/setup_22.h | 128 + .../OggVorbis/vorbissrc/modes/setup_32.h | 246 + .../OggVorbis/vorbissrc/modes/setup_44.h | 176 + .../OggVorbis/vorbissrc/modes/setup_44u.h | 129 + neo/sound/OggVorbis/vorbissrc/modes/setup_8.h | 146 + neo/sound/OggVorbis/vorbissrc/modes/setup_X.h | 329 + neo/sound/OggVorbis/vorbissrc/os.h | 147 + neo/sound/OggVorbis/vorbissrc/psy.c | 1148 + neo/sound/OggVorbis/vorbissrc/psy.h | 175 + neo/sound/OggVorbis/vorbissrc/psytune.c | 521 + neo/sound/OggVorbis/vorbissrc/registry.c | 46 + neo/sound/OggVorbis/vorbissrc/registry.h | 32 + neo/sound/OggVorbis/vorbissrc/res0.c | 906 + neo/sound/OggVorbis/vorbissrc/scales.h | 88 + neo/sound/OggVorbis/vorbissrc/sharedbook.c | 734 + neo/sound/OggVorbis/vorbissrc/smallft.c | 1254 + neo/sound/OggVorbis/vorbissrc/smallft.h | 34 + neo/sound/OggVorbis/vorbissrc/synthesis.c | 170 + neo/sound/OggVorbis/vorbissrc/tone.c | 54 + neo/sound/OggVorbis/vorbissrc/vorbisenc.c | 1134 + neo/sound/OggVorbis/vorbissrc/vorbisfile.c | 1981 + neo/sound/OggVorbis/vorbissrc/window.h | 26 + neo/sound/OggVorbis/vorbissrc/windowvb.c | 2136 ++ neo/sound/snd_cache.cpp | 709 + neo/sound/snd_decoder.cpp | 572 + neo/sound/snd_efxfile.cpp | 232 + neo/sound/snd_emitter.cpp | 1233 + neo/sound/snd_local.h | 924 + neo/sound/snd_shader.cpp | 510 + neo/sound/snd_system.cpp | 1461 + neo/sound/snd_wavefile.cpp | 354 + neo/sound/snd_world.cpp | 2141 ++ neo/sound/sound.h | 350 + neo/sys/gllog/gl.api | 336 + neo/sys/gllog/glX.api | 6 + neo/sys/gllog/gl_def.m4 | 1099 + neo/sys/gllog/gl_extensions.cpp.m4 | 61 + neo/sys/gllog/logfunc.py | 75 + neo/sys/gllog/read.py | 26 + neo/sys/gllog/wgl.api | 22 + neo/sys/linux/SDK-1.3.list.txt | 557 + neo/sys/linux/SDK.list.txt | 416 + neo/sys/linux/casedir.patch | 213 + neo/sys/linux/dedicated.cpp | 92 + neo/sys/linux/glimp.cpp | 668 + neo/sys/linux/glimp_dlopen.cpp.m4 | 135 + neo/sys/linux/glimp_glenum.h | 434 + neo/sys/linux/glimp_local.h.m4 | 24 + neo/sys/linux/glimp_logging.cpp.m4 | 185 + neo/sys/linux/glimp_stub.cpp.m4 | 66 + neo/sys/linux/input.cpp | 562 + neo/sys/linux/libXNVCtrl/NV-CONTROL-API.txt | 385 + neo/sys/linux/libXNVCtrl/NVCtrl.c | 339 + neo/sys/linux/libXNVCtrl/NVCtrl.h | 786 + neo/sys/linux/libXNVCtrl/NVCtrlLib.h | 177 + neo/sys/linux/libXNVCtrl/extutil.h | 224 + neo/sys/linux/libXNVCtrl/nv_control.h | 184 + neo/sys/linux/local.h | 63 + neo/sys/linux/main.cpp | 565 + neo/sys/linux/oss/include/audio_core.h | 310 + neo/sys/linux/oss/include/midi_core.h | 66 + neo/sys/linux/oss/include/mixer_core.h | 61 + neo/sys/linux/oss/include/sys/soundcard.h | 1725 + neo/sys/linux/oss/include/sys/ultrasound.h | 96 + neo/sys/linux/pk4/id_utils.py | 241 + neo/sys/linux/pk4/packup-nocase.sh | 7 + neo/sys/linux/pk4/packup.sh | 7 + neo/sys/linux/pk4/syncfromlist.sh | 42 + neo/sys/linux/pk4/updatepaks.sh | 27 + neo/sys/linux/process.py | 41 + neo/sys/linux/process_undef.pl | 20 + neo/sys/linux/qgl_enforce.h | 1478 + neo/sys/linux/qgl_enforce.h.m4 | 24 + neo/sys/linux/runner/runner.tac | 25 + neo/sys/linux/runner/runner_lib.py | 209 + neo/sys/linux/setup/binary.conf | 1 + neo/sys/linux/setup/brandelf.c | 224 + .../bin/Linux/x86/glibc-2.1/setup.gtk | Bin 0 -> 659584 bytes .../setup.data/bin/Linux/x86/glibc-2.1/xsu | Bin 0 -> 27956 bytes .../image-base/setup.data/bin/Linux/x86/setup | Bin 0 -> 633828 bytes .../setup/image-base/setup.data/config.sh | 30 + .../locale/de/LC_MESSAGES/loki-uninstall.mo | Bin 0 -> 5466 bytes .../setup.data/locale/de/LC_MESSAGES/setup.mo | Bin 0 -> 30014 bytes .../en_UK/LC_MESSAGES/loki-uninstall.mo | Bin 0 -> 5184 bytes .../locale/en_UK/LC_MESSAGES/setup.mo | Bin 0 -> 28158 bytes .../locale/es/LC_MESSAGES/loki-uninstall.mo | Bin 0 -> 5511 bytes .../setup.data/locale/es/LC_MESSAGES/setup.mo | Bin 0 -> 30304 bytes .../locale/fr/LC_MESSAGES/loki-uninstall.mo | Bin 0 -> 5577 bytes .../setup.data/locale/fr/LC_MESSAGES/setup.mo | Bin 0 -> 30733 bytes .../locale/it/LC_MESSAGES/loki-uninstall.mo | Bin 0 -> 5613 bytes .../setup.data/locale/it/LC_MESSAGES/setup.mo | Bin 0 -> 30337 bytes .../locale/nl/LC_MESSAGES/loki-uninstall.mo | Bin 0 -> 339 bytes .../setup.data/locale/nl/LC_MESSAGES/setup.mo | Bin 0 -> 14954 bytes .../locale/ru/LC_MESSAGES/loki-uninstall.mo | Bin 0 -> 3246 bytes .../setup.data/locale/ru/LC_MESSAGES/setup.mo | Bin 0 -> 19370 bytes .../locale/sv/LC_MESSAGES/loki-uninstall.mo | Bin 0 -> 3207 bytes .../setup.data/locale/sv/LC_MESSAGES/setup.mo | Bin 0 -> 18920 bytes .../setup/image-base/setup.data/setup.glade | 2096 ++ neo/sys/linux/setup/image-base/setup.sh | 290 + neo/sys/linux/setup/image-demo/License.txt | 86 + neo/sys/linux/setup/image-demo/README | 31 + .../setup/image-demo/bin/Linux/x86/doom3-demo | 3 + .../image-demo/setup.data/postinstall.sh | 34 + .../setup/image-demo/setup.data/setup.xml.in | 24 + neo/sys/linux/setup/image-sdk/License.SDK.txt | 55 + neo/sys/linux/setup/image-sdk/README.SDK.txt | 21 + .../setup/image-sdk/setup.data/config.sh | 17 + .../setup/image-sdk/setup.data/setup.xml.in | 19 + neo/sys/linux/setup/image/License.txt | 86 + neo/sys/linux/setup/image/README | 53 + neo/sys/linux/setup/image/bin/Linux/x86/doom3 | 3 + .../setup/image/bin/Linux/x86/doom3-dedicated | 3 + neo/sys/linux/setup/image/doom3.png | Bin 0 -> 6502 bytes neo/sys/linux/setup/image/openurl.sh | 17 + .../setup/image/setup.data/postinstall.sh | 39 + .../linux/setup/image/setup.data/setup.xml.in | 42 + neo/sys/linux/setup/loki_setup.patch | 36 + neo/sys/linux/setup/lokisetup/loki_setup.tgz | Bin 0 -> 571440 bytes .../linux/setup/lokisetup/loki_setupdb.tgz | Bin 0 -> 67821 bytes neo/sys/linux/setup/lokisetup/xsu.diff | 170 + neo/sys/linux/setup/makeself/COPYING | 341 + neo/sys/linux/setup/makeself/README | 307 + neo/sys/linux/setup/makeself/TODO | 6 + .../linux/setup/makeself/makeself-header.sh | 373 + neo/sys/linux/setup/makeself/makeself.1 | 76 + neo/sys/linux/setup/makeself/makeself.lsm | 16 + neo/sys/linux/setup/makeself/makeself.sh | 374 + neo/sys/linux/setup/makeself/update-readme | 7 + neo/sys/linux/sound.cpp | 399 + neo/sys/linux/sound.h | 187 + neo/sys/linux/sound_alsa.cpp | 316 + neo/sys/linux/stack.cpp | 137 + neo/sys/linux/test_scheduler.c | 105 + neo/sys/osx/DLL.OSX.txt | 34 + neo/sys/osx/DOOMController.h | 15 + neo/sys/osx/DOOMController.mm | 1054 + neo/sys/osx/Doom 3.rsrc | Bin 0 -> 10514 bytes neo/sys/osx/Doom3.icns | Bin 0 -> 65086 bytes neo/sys/osx/Doom3.xcodeproj/project.pbxproj | 1891 + .../osx/English.lproj/ASLCore.nib/classes.nib | 4 + .../osx/English.lproj/ASLCore.nib/info.nib | 21 + .../osx/English.lproj/ASLCore.nib/objects.xib | 710 + neo/sys/osx/English.lproj/InfoPlist.strings | Bin 0 -> 528 bytes neo/sys/osx/English.lproj/Localizable.strings | Bin 0 -> 3858 bytes .../English.lproj/MainMenu.nib/classes.nib | 7 + .../osx/English.lproj/MainMenu.nib/info.nib | 21 + .../English.lproj/MainMenu.nib/objects.nib | Bin 0 -> 1483 bytes neo/sys/osx/English.lproj/locversion.plist | 14 + .../osx/French.lproj/ASLCore.nib/classes.nib | 4 + neo/sys/osx/French.lproj/ASLCore.nib/info.nib | 21 + .../osx/French.lproj/ASLCore.nib/objects.xib | 701 + neo/sys/osx/French.lproj/InfoPlist.strings | 6 + neo/sys/osx/French.lproj/Localizable.strings | Bin 0 -> 3902 bytes .../osx/French.lproj/MainMenu.nib/classes.nib | 7 + .../osx/French.lproj/MainMenu.nib/info.nib | 21 + .../osx/French.lproj/MainMenu.nib/objects.nib | Bin 0 -> 1475 bytes neo/sys/osx/Info.plist | 26 + neo/sys/osx/PickMonitor.cpp | 540 + neo/sys/osx/PickMonitor.h | 35 + neo/sys/osx/PreferencesDialog.cpp | 844 + neo/sys/osx/PreferencesDialog.h | 72 + .../curl.xcodeproj/project.pbxproj | 419 + neo/sys/osx/d3xp.xcodeproj/project.pbxproj | 938 + neo/sys/osx/game.xcodeproj/project.pbxproj | 901 + neo/sys/osx/idlib.xcodeproj/project.pbxproj | 1109 + neo/sys/osx/macosx_common.h | 2 + neo/sys/osx/macosx_display.h | 16 + neo/sys/osx/macosx_event.mm | 542 + neo/sys/osx/macosx_glimp.h | 17 + neo/sys/osx/macosx_glimp.mm | 1865 + neo/sys/osx/macosx_guids.cpp | 6 + neo/sys/osx/macosx_local.h | 22 + neo/sys/osx/macosx_misc.mm | 79 + neo/sys/osx/macosx_sound.cpp | 448 + neo/sys/osx/macosx_sys.h | 84 + neo/sys/osx/macosx_sys.mm | 260 + neo/sys/osx/macosx_timers.h | 17 + neo/sys/osx/macosx_utils.mm | 168 + neo/sys/osx/misc/ftoi.patch | 145 + .../osx/oggVorbis.xcodeproj/project.pbxproj | 527 + neo/sys/osx/showcursor | Bin 0 -> 9924 bytes neo/sys/osx/showcursor.c | 54 + neo/sys/osx/version.plist | 16 + neo/sys/posix/posix_input.cpp | 136 + neo/sys/posix/posix_main.cpp | 1053 + neo/sys/posix/posix_net.cpp | 784 + neo/sys/posix/posix_public.h | 66 + neo/sys/posix/posix_signal.cpp | 166 + neo/sys/posix/posix_threads.cpp | 292 + neo/sys/scons/SConscript.core | 359 + neo/sys/scons/SConscript.curl | 41 + neo/sys/scons/SConscript.game | 111 + neo/sys/scons/SConscript.gl | 101 + neo/sys/scons/SConscript.idlib | 81 + neo/sys/scons/SDK.py | 89 + neo/sys/scons/Setup.py | 160 + neo/sys/scons/scons_utils.py | 186 + neo/sys/stub/stub_gl.cpp | 395 + neo/sys/stub/sys_stub.cpp | 234 + neo/sys/stub/util_stub.cpp | 33 + neo/sys/sys_local.cpp | 210 + neo/sys/sys_local.h | 76 + neo/sys/sys_public.h | 578 + neo/sys/win32/eax.h | 533 + neo/sys/win32/eaxguid.lib | Bin 0 -> 1888 bytes neo/sys/win32/gl_logfuncs.cpp | 1923 + neo/sys/win32/rc/AFEditor.rc | 893 + neo/sys/win32/rc/AFEditor_resource.h | 369 + neo/sys/win32/rc/Common.rc | 170 + neo/sys/win32/rc/Common_resource.h | 58 + neo/sys/win32/rc/CreateResourceIDs.cpp | 189 + neo/sys/win32/rc/CreateResourceIDs.h | 42 + neo/sys/win32/rc/Debugger.rc | 250 + neo/sys/win32/rc/Debugger_resource.h | 90 + neo/sys/win32/rc/DeclEditor.rc | 179 + neo/sys/win32/rc/DeclEditor_resource.h | 67 + neo/sys/win32/rc/GuiEd.rc | 736 + neo/sys/win32/rc/GuiEd_resource.h | 207 + neo/sys/win32/rc/MaterialEditor.rc | 387 + neo/sys/win32/rc/MaterialEditor_Resource.h | 130 + neo/sys/win32/rc/PDAEditor.rc | 192 + neo/sys/win32/rc/PDAEditor_resource.h | 76 + neo/sys/win32/rc/ParticleEditor.rc | 324 + neo/sys/win32/rc/ParticleEditor_resource.h | 151 + neo/sys/win32/rc/PropTree.rc | 132 + neo/sys/win32/rc/PropTree_resource.h | 53 + neo/sys/win32/rc/Radiant.rc | 2825 ++ neo/sys/win32/rc/Radiant_resource.h | 888 + neo/sys/win32/rc/ScriptEditor.rc | 99 + neo/sys/win32/rc/ScriptEditor_resource.h | 47 + neo/sys/win32/rc/SoundEditor.rc | 188 + neo/sys/win32/rc/SoundEditor_resource.h | 88 + neo/sys/win32/rc/doom.rc | 122 + neo/sys/win32/rc/doom_resource.h | 44 + neo/sys/win32/rc/res/BEVEL.BMP | Bin 0 -> 486 bytes neo/sys/win32/rc/res/BITMAP2.BMP | Bin 0 -> 614 bytes neo/sys/win32/rc/res/BMP00001.BMP | Bin 0 -> 614 bytes neo/sys/win32/rc/res/BMP0002.BMP | Bin 0 -> 4078 bytes neo/sys/win32/rc/res/DEFTEX.WAL | Bin 0 -> 5540 bytes neo/sys/win32/rc/res/ENDCAP.BMP | Bin 0 -> 486 bytes neo/sys/win32/rc/res/GetString.htm | 19 + neo/sys/win32/rc/res/IBEVEL.BMP | Bin 0 -> 486 bytes neo/sys/win32/rc/res/IENDCAP.BMP | Bin 0 -> 486 bytes neo/sys/win32/rc/res/MEFileToolbar.bmp | Bin 0 -> 478 bytes neo/sys/win32/rc/res/MEtoolbar.bmp | Bin 0 -> 2158 bytes neo/sys/win32/rc/res/MaterialEditor.ico | Bin 0 -> 766 bytes neo/sys/win32/rc/res/PropTree.rc2 | 13 + neo/sys/win32/rc/res/Q.BMP | Bin 0 -> 47810 bytes neo/sys/win32/rc/res/RADIANT3.GIF | Bin 0 -> 19737 bytes neo/sys/win32/rc/res/Radiant.ico | Bin 0 -> 1078 bytes neo/sys/win32/rc/res/RadiantDoc.ico | Bin 0 -> 1078 bytes neo/sys/win32/rc/res/TOOLBAR1.BMP | Bin 0 -> 2878 bytes neo/sys/win32/rc/res/TOOLBAR2.BMP | Bin 0 -> 478 bytes neo/sys/win32/rc/res/Toolbar.bmp | Bin 0 -> 718 bytes neo/sys/win32/rc/res/VIEWDEFA.BMP | Bin 0 -> 614 bytes neo/sys/win32/rc/res/VIEWOPPO.BMP | Bin 0 -> 614 bytes neo/sys/win32/rc/res/bmp00002.bmp | Bin 0 -> 6374 bytes neo/sys/win32/rc/res/bmp00003.bmp | Bin 0 -> 1014 bytes neo/sys/win32/rc/res/bmp00004.bmp | Bin 0 -> 502 bytes neo/sys/win32/rc/res/bmp00005.bmp | Bin 0 -> 1270 bytes neo/sys/win32/rc/res/cchsb.bmp | Bin 0 -> 122262 bytes neo/sys/win32/rc/res/ccrgb.bmp | Bin 0 -> 108734 bytes neo/sys/win32/rc/res/dbg_back.bmp | Bin 0 -> 310 bytes neo/sys/win32/rc/res/dbg_breakpoint.ico | Bin 0 -> 318 bytes neo/sys/win32/rc/res/dbg_current.ico | Bin 0 -> 318 bytes neo/sys/win32/rc/res/dbg_currentline.ico | Bin 0 -> 318 bytes neo/sys/win32/rc/res/dbg_empty.ico | Bin 0 -> 318 bytes neo/sys/win32/rc/res/dbg_open.bmp | Bin 0 -> 502 bytes neo/sys/win32/rc/res/dbg_toolbar.bmp | Bin 0 -> 1198 bytes neo/sys/win32/rc/res/doom.ico | Bin 0 -> 22486 bytes neo/sys/win32/rc/res/fpoint.cur | Bin 0 -> 326 bytes neo/sys/win32/rc/res/fxed_link.ico | Bin 0 -> 766 bytes neo/sys/win32/rc/res/fxed_toolbar.bmp | Bin 0 -> 1078 bytes neo/sys/win32/rc/res/fxeditor.ico | Bin 0 -> 2998 bytes neo/sys/win32/rc/res/guied.ico | Bin 0 -> 2998 bytes neo/sys/win32/rc/res/guied_collapse.ico | Bin 0 -> 318 bytes neo/sys/win32/rc/res/guied_expand.ico | Bin 0 -> 318 bytes neo/sys/win32/rc/res/guied_hand.cur | Bin 0 -> 766 bytes neo/sys/win32/rc/res/guied_nav_visible.ico | Bin 0 -> 318 bytes .../rc/res/guied_nav_visibledisabled.ico | Bin 0 -> 318 bytes neo/sys/win32/rc/res/guied_scripts.ico | Bin 0 -> 318 bytes neo/sys/win32/rc/res/guied_scripts_white.ico | Bin 0 -> 318 bytes neo/sys/win32/rc/res/guied_viewer_toolbar.bmp | Bin 0 -> 478 bytes neo/sys/win32/rc/res/icon2.ico | Bin 0 -> 6254 bytes neo/sys/win32/rc/res/logo_sm3dfx.bmp | Bin 0 -> 4918 bytes neo/sys/win32/rc/res/matedtree.bmp | Bin 0 -> 1014 bytes neo/sys/win32/rc/res/me_disabled_icon.ico | Bin 0 -> 318 bytes neo/sys/win32/rc/res/me_enabled.ico | Bin 0 -> 766 bytes neo/sys/win32/rc/res/me_off_icon.ico | Bin 0 -> 318 bytes neo/sys/win32/rc/res/me_on_icon.ico | Bin 0 -> 318 bytes neo/sys/win32/rc/res/qe3.ico | Bin 0 -> 4846 bytes neo/sys/win32/rc/res/shaderbar.bmp | Bin 0 -> 1198 bytes neo/sys/win32/rc/res/shaderdoc.ico | Bin 0 -> 1078 bytes neo/sys/win32/rc/res/shaderframe.ico | Bin 0 -> 1078 bytes neo/sys/win32/rc/res/spliter.cur | Bin 0 -> 326 bytes neo/sys/win32/sdk/D3SDK.nsi | 42 + neo/sys/win32/sdk/prepare.py | 55 + neo/sys/win32/sdk/source.list | 446 + neo/sys/win32/win_cpu.cpp | 930 + neo/sys/win32/win_gamma.cpp | 93 + neo/sys/win32/win_glimp.cpp | 1241 + neo/sys/win32/win_input.cpp | 1047 + neo/sys/win32/win_local.h | 175 + neo/sys/win32/win_main.cpp | 1615 + neo/sys/win32/win_net.cpp | 1200 + neo/sys/win32/win_qgl.cpp | 2811 ++ neo/sys/win32/win_shared.cpp | 778 + neo/sys/win32/win_snd.cpp | 847 + neo/sys/win32/win_syscon.cpp | 557 + neo/sys/win32/win_taskkeyhook.cpp | 145 + neo/sys/win32/win_wndproc.cpp | 456 + neo/tools/Help/MT_help.htm | 213 + neo/tools/Help/MVH_Controls.htm | 239 + neo/tools/Help/MVH_Issues.htm | 23 + neo/tools/Help/MVH_Misc.htm | 56 + neo/tools/Help/MVH_Mouse.htm | 194 + neo/tools/Help/MVH_Overview.htm | 84 + neo/tools/Help/Tools.hhc | 56 + neo/tools/Help/Tools.hhk | 9 + neo/tools/Help/Tools.hhp | 13 + neo/tools/Help/default.htm | 10 + neo/tools/Help/images/FirstAnim.png | Bin 0 -> 379 bytes neo/tools/Help/images/OpenAnim.png | Bin 0 -> 1367 bytes neo/tools/Help/images/OpenMesh.png | Bin 0 -> 1525 bytes neo/tools/Help/images/Play.png | Bin 0 -> 359 bytes neo/tools/Help/images/PrevAnim.png | Bin 0 -> 388 bytes neo/tools/Help/images/animloop.png | Bin 0 -> 399 bytes neo/tools/Help/images/diffuse.png | Bin 0 -> 1303 bytes neo/tools/Help/images/lastanim.png | Bin 0 -> 416 bytes neo/tools/Help/images/nextanim.png | Bin 0 -> 394 bytes neo/tools/Help/images/orgoff.png | Bin 0 -> 1105 bytes neo/tools/Help/images/reloadtex.png | Bin 0 -> 1085 bytes neo/tools/Help/images/resetcam.png | Bin 0 -> 1193 bytes neo/tools/Help/images/showbones.png | Bin 0 -> 1169 bytes neo/tools/Help/images/shownorms.png | Bin 0 -> 765 bytes neo/tools/Help/images/showoverdraw.png | Bin 0 -> 818 bytes neo/tools/Help/images/showskel.png | Bin 0 -> 1085 bytes neo/tools/Help/images/showsurf.png | Bin 0 -> 1263 bytes neo/tools/Help/images/showtris.png | Bin 0 -> 1549 bytes neo/tools/Help/images/specular.png | Bin 0 -> 1417 bytes neo/tools/Help/images/stop.png | Bin 0 -> 298 bytes neo/tools/af/DialogAF.cpp | 628 + neo/tools/af/DialogAF.h | 98 + neo/tools/af/DialogAFBody.cpp | 1355 + neo/tools/af/DialogAFBody.h | 160 + neo/tools/af/DialogAFConstraint.cpp | 561 + neo/tools/af/DialogAFConstraint.h | 98 + .../af/DialogAFConstraintBallAndSocket.cpp | 735 + .../af/DialogAFConstraintBallAndSocket.h | 117 + neo/tools/af/DialogAFConstraintFixed.cpp | 169 + neo/tools/af/DialogAFConstraintFixed.h | 65 + neo/tools/af/DialogAFConstraintHinge.cpp | 565 + neo/tools/af/DialogAFConstraintHinge.h | 101 + neo/tools/af/DialogAFConstraintSlider.cpp | 313 + neo/tools/af/DialogAFConstraintSlider.h | 77 + neo/tools/af/DialogAFConstraintSpring.cpp | 662 + neo/tools/af/DialogAFConstraintSpring.h | 113 + neo/tools/af/DialogAFConstraintUniversal.cpp | 863 + neo/tools/af/DialogAFConstraintUniversal.h | 129 + neo/tools/af/DialogAFName.cpp | 168 + neo/tools/af/DialogAFName.h | 56 + neo/tools/af/DialogAFProperties.cpp | 512 + neo/tools/af/DialogAFProperties.h | 110 + neo/tools/af/DialogAFView.cpp | 324 + neo/tools/af/DialogAFView.h | 102 + neo/tools/comafx/CDIB.cpp | 1022 + neo/tools/comafx/CDIB.h | 121 + neo/tools/comafx/CPathTreeCtrl.cpp | 305 + neo/tools/comafx/CPathTreeCtrl.h | 93 + neo/tools/comafx/CSyntaxRichEditCtrl.cpp | 1903 + neo/tools/comafx/CSyntaxRichEditCtrl.h | 236 + neo/tools/comafx/DialogColorPicker.cpp | 1314 + neo/tools/comafx/DialogColorPicker.h | 193 + neo/tools/comafx/DialogGoToLine.cpp | 134 + neo/tools/comafx/DialogGoToLine.h | 63 + neo/tools/comafx/DialogName.cpp | 78 + neo/tools/comafx/DialogName.h | 76 + neo/tools/comafx/StdAfx.cpp | 382 + neo/tools/comafx/StdAfx.h | 66 + neo/tools/comafx/VectorCtl.cpp | 424 + neo/tools/comafx/VectorCtl.h | 225 + neo/tools/comafx/riched20.tlh | 865 + neo/tools/common/AlphaPopup.cpp | 342 + neo/tools/common/ColorButton.cpp | 206 + neo/tools/common/ColorButton.h | 40 + neo/tools/common/DialogHelpers.h | 128 + neo/tools/common/MaskEdit.cpp | 97 + neo/tools/common/MaskEdit.h | 34 + neo/tools/common/OpenFileDialog.cpp | 504 + neo/tools/common/OpenFileDialog.h | 117 + neo/tools/common/PropTree/PropTree.cpp | 923 + neo/tools/common/PropTree/PropTree.h | 290 + neo/tools/common/PropTree/PropTreeInfo.cpp | 110 + neo/tools/common/PropTree/PropTreeInfo.h | 71 + neo/tools/common/PropTree/PropTreeItem.cpp | 590 + neo/tools/common/PropTree/PropTreeItem.h | 203 + .../common/PropTree/PropTreeItemButton.cpp | 103 + .../common/PropTree/PropTreeItemButton.h | 63 + .../common/PropTree/PropTreeItemCheck.cpp | 161 + neo/tools/common/PropTree/PropTreeItemCheck.h | 95 + .../common/PropTree/PropTreeItemColor.cpp | 369 + neo/tools/common/PropTree/PropTreeItemColor.h | 98 + .../common/PropTree/PropTreeItemCombo.cpp | 233 + neo/tools/common/PropTree/PropTreeItemCombo.h | 103 + .../common/PropTree/PropTreeItemEdit.cpp | 212 + neo/tools/common/PropTree/PropTreeItemEdit.h | 108 + .../PropTree/PropTreeItemEditButton.cpp | 259 + .../common/PropTree/PropTreeItemEditButton.h | 125 + .../common/PropTree/PropTreeItemFileEdit.cpp | 130 + .../common/PropTree/PropTreeItemFileEdit.h | 54 + .../common/PropTree/PropTreeItemStatic.cpp | 67 + .../common/PropTree/PropTreeItemStatic.h | 45 + neo/tools/common/PropTree/PropTreeList.cpp | 635 + neo/tools/common/PropTree/PropTreeList.h | 99 + neo/tools/common/PropTree/PropTreeView.cpp | 103 + neo/tools/common/PropTree/PropTreeView.h | 41 + neo/tools/common/PropertyGrid.cpp | 674 + neo/tools/common/PropertyGrid.h | 123 + neo/tools/common/RegistryOptions.cpp | 336 + neo/tools/common/RegistryOptions.h | 144 + neo/tools/common/RenderBumpFlatDialog.cpp | 110 + neo/tools/common/RenderBumpFlatDialog.h | 35 + neo/tools/common/RollupPanel.cpp | 1215 + neo/tools/common/RollupPanel.h | 146 + neo/tools/common/SpinButton.cpp | 91 + neo/tools/common/SpinButton.h | 36 + neo/tools/compilers/aas/AASBuild.cpp | 1031 + neo/tools/compilers/aas/AASBuild_file.cpp | 499 + neo/tools/compilers/aas/AASBuild_gravity.cpp | 359 + neo/tools/compilers/aas/AASBuild_ledge.cpp | 575 + neo/tools/compilers/aas/AASBuild_local.h | 149 + neo/tools/compilers/aas/AASBuild_merge.cpp | 163 + neo/tools/compilers/aas/AASCluster.cpp | 557 + neo/tools/compilers/aas/AASCluster.h | 62 + neo/tools/compilers/aas/AASFile.cpp | 1314 + neo/tools/compilers/aas/AASFile.h | 351 + neo/tools/compilers/aas/AASFileManager.cpp | 76 + neo/tools/compilers/aas/AASFileManager.h | 50 + neo/tools/compilers/aas/AASFile_local.h | 99 + neo/tools/compilers/aas/AASFile_optimize.cpp | 154 + neo/tools/compilers/aas/AASFile_sample.cpp | 608 + neo/tools/compilers/aas/AASReach.cpp | 945 + neo/tools/compilers/aas/AASReach.h | 67 + neo/tools/compilers/aas/Brush.cpp | 1582 + neo/tools/compilers/aas/Brush.h | 231 + neo/tools/compilers/aas/BrushBSP.cpp | 2151 ++ neo/tools/compilers/aas/BrushBSP.h | 233 + neo/tools/compilers/compiler_public.h | 55 + neo/tools/compilers/dmap/dmap.cpp | 404 + neo/tools/compilers/dmap/dmap.h | 485 + neo/tools/compilers/dmap/facebsp.cpp | 499 + neo/tools/compilers/dmap/gldraw.cpp | 292 + neo/tools/compilers/dmap/glfile.cpp | 158 + neo/tools/compilers/dmap/leakfile.cpp | 112 + neo/tools/compilers/dmap/map.cpp | 648 + neo/tools/compilers/dmap/optimize.cpp | 1990 + neo/tools/compilers/dmap/optimize_gcc.cpp | 84 + neo/tools/compilers/dmap/output.cpp | 682 + neo/tools/compilers/dmap/portals.cpp | 999 + neo/tools/compilers/dmap/shadowopt3.cpp | 1276 + neo/tools/compilers/dmap/tritjunction.cpp | 663 + neo/tools/compilers/dmap/tritools.cpp | 387 + neo/tools/compilers/dmap/ubrush.cpp | 709 + neo/tools/compilers/dmap/usurface.cpp | 1046 + neo/tools/compilers/renderbump/renderbump.cpp | 1641 + .../compilers/roqvq/NSBitmapImageRep.cpp | 105 + neo/tools/compilers/roqvq/codec.cpp | 1696 + neo/tools/compilers/roqvq/codec.h | 108 + neo/tools/compilers/roqvq/gdefs.h | 68 + neo/tools/compilers/roqvq/quaddefs.h | 131 + neo/tools/compilers/roqvq/roq.cpp | 855 + neo/tools/compilers/roqvq/roq.h | 135 + neo/tools/compilers/roqvq/roq.m | 933 + neo/tools/compilers/roqvq/roqParam.cpp | 635 + neo/tools/compilers/roqvq/roqParam.h | 105 + neo/tools/debugger/DebuggerApp.cpp | 166 + neo/tools/debugger/DebuggerApp.h | 108 + neo/tools/debugger/DebuggerBreakpoint.cpp | 62 + neo/tools/debugger/DebuggerBreakpoint.h | 70 + neo/tools/debugger/DebuggerClient.cpp | 586 + neo/tools/debugger/DebuggerClient.h | 289 + neo/tools/debugger/DebuggerFindDlg.cpp | 106 + neo/tools/debugger/DebuggerFindDlg.h | 59 + neo/tools/debugger/DebuggerMessages.h | 51 + neo/tools/debugger/DebuggerQuickWatchDlg.cpp | 267 + neo/tools/debugger/DebuggerQuickWatchDlg.h | 59 + neo/tools/debugger/DebuggerScript.cpp | 244 + neo/tools/debugger/DebuggerScript.h | 78 + neo/tools/debugger/DebuggerServer.cpp | 714 + neo/tools/debugger/DebuggerServer.h | 133 + neo/tools/debugger/DebuggerWindow.cpp | 2373 ++ neo/tools/debugger/DebuggerWindow.h | 184 + neo/tools/debugger/debugger.cpp | 235 + neo/tools/decl/DialogDeclBrowser.cpp | 947 + neo/tools/decl/DialogDeclBrowser.h | 113 + neo/tools/decl/DialogDeclEditor.cpp | 715 + neo/tools/decl/DialogDeclEditor.h | 106 + neo/tools/decl/DialogDeclNew.cpp | 279 + neo/tools/decl/DialogDeclNew.h | 93 + neo/tools/decl/DialogEntityDefEditor.cpp | 860 + neo/tools/decl/DialogEntityDefEditor.h | 117 + neo/tools/edit_public.h | 117 + neo/tools/edit_stub.cpp | 78 + neo/tools/guied/GEApp.cpp | 1384 + neo/tools/guied/GEApp.h | 191 + neo/tools/guied/GECheckInDlg.cpp | 114 + neo/tools/guied/GEDeleteModifier.cpp | 67 + neo/tools/guied/GEDeleteModifier.h | 45 + neo/tools/guied/GEHideModifier.cpp | 94 + neo/tools/guied/GEHideModifier.h | 51 + neo/tools/guied/GEInsertModifier.cpp | 113 + neo/tools/guied/GEInsertModifier.h | 54 + neo/tools/guied/GEItemPropsDlg.cpp | 1259 + neo/tools/guied/GEItemPropsDlg.h | 33 + neo/tools/guied/GEItemScriptsDlg.cpp | 363 + neo/tools/guied/GEItemScriptsDlg.h | 33 + neo/tools/guied/GEKeyValueModifier.cpp | 71 + neo/tools/guied/GEKeyValueModifier.h | 59 + neo/tools/guied/GEModifier.cpp | 44 + neo/tools/guied/GEModifier.h | 85 + neo/tools/guied/GEModifierGroup.cpp | 148 + neo/tools/guied/GEModifierGroup.h | 66 + neo/tools/guied/GEModifierStack.cpp | 137 + neo/tools/guied/GEModifierStack.h | 90 + neo/tools/guied/GEMoveModifier.cpp | 77 + neo/tools/guied/GEMoveModifier.h | 56 + neo/tools/guied/GENavigator.cpp | 596 + neo/tools/guied/GENavigator.h | 77 + neo/tools/guied/GEOptions.cpp | 190 + neo/tools/guied/GEOptions.h | 314 + neo/tools/guied/GEOptionsDlg.cpp | 210 + neo/tools/guied/GEOptionsDlg.h | 33 + neo/tools/guied/GEProperties.cpp | 311 + neo/tools/guied/GEProperties.h | 77 + neo/tools/guied/GEPropertyPage.cpp | 110 + neo/tools/guied/GEPropertyPage.h | 51 + neo/tools/guied/GESelectionMgr.cpp | 474 + neo/tools/guied/GESelectionMgr.h | 121 + neo/tools/guied/GESizeModifier.cpp | 77 + neo/tools/guied/GESizeModifier.h | 56 + neo/tools/guied/GEStateModifier.cpp | 95 + neo/tools/guied/GEStateModifier.h | 54 + neo/tools/guied/GEStatusBar.cpp | 128 + neo/tools/guied/GEStatusBar.h | 89 + neo/tools/guied/GETransformer.cpp | 345 + neo/tools/guied/GETransformer.h | 65 + neo/tools/guied/GEViewer.cpp | 551 + neo/tools/guied/GEViewer.h | 76 + neo/tools/guied/GEWindowWrapper.cpp | 590 + neo/tools/guied/GEWindowWrapper.h | 223 + neo/tools/guied/GEWindowWrapper_stub.cpp | 47 + neo/tools/guied/GEWorkspace.cpp | 2064 + neo/tools/guied/GEWorkspace.h | 338 + neo/tools/guied/GEWorkspaceFile.cpp | 395 + neo/tools/guied/GEZOrderModifier.cpp | 129 + neo/tools/guied/GEZOrderModifier.h | 59 + neo/tools/guied/guied.cpp | 199 + neo/tools/materialeditor/ConsoleView.cpp | 299 + neo/tools/materialeditor/ConsoleView.h | 78 + neo/tools/materialeditor/FindDialog.cpp | 145 + neo/tools/materialeditor/FindDialog.h | 72 + neo/tools/materialeditor/MEMainFrame.cpp | 937 + neo/tools/materialeditor/MEMainFrame.h | 154 + neo/tools/materialeditor/MEOptions.cpp | 88 + neo/tools/materialeditor/MEOptions.h | 152 + neo/tools/materialeditor/MaterialDef.cpp | 199 + neo/tools/materialeditor/MaterialDef.h | 102 + neo/tools/materialeditor/MaterialDoc.cpp | 966 + neo/tools/materialeditor/MaterialDoc.h | 156 + .../materialeditor/MaterialDocManager.cpp | 893 + neo/tools/materialeditor/MaterialDocManager.h | 163 + neo/tools/materialeditor/MaterialEditView.cpp | 308 + neo/tools/materialeditor/MaterialEditView.h | 87 + neo/tools/materialeditor/MaterialEditor.cpp | 176 + neo/tools/materialeditor/MaterialEditor.h | 45 + neo/tools/materialeditor/MaterialModifier.cpp | 428 + neo/tools/materialeditor/MaterialModifier.h | 268 + .../MaterialPreviewPropView.cpp | 368 + .../materialeditor/MaterialPreviewPropView.h | 68 + .../materialeditor/MaterialPreviewView.cpp | 655 + .../materialeditor/MaterialPreviewView.h | 149 + .../materialeditor/MaterialPropTreeView.cpp | 248 + .../materialeditor/MaterialPropTreeView.h | 74 + neo/tools/materialeditor/MaterialTreeView.cpp | 1926 + neo/tools/materialeditor/MaterialTreeView.h | 175 + neo/tools/materialeditor/MaterialView.cpp | 32 + neo/tools/materialeditor/MaterialView.h | 148 + neo/tools/materialeditor/StageView.cpp | 828 + neo/tools/materialeditor/StageView.h | 132 + neo/tools/materialeditor/ToggleListView.cpp | 306 + neo/tools/materialeditor/ToggleListView.h | 87 + neo/tools/particle/DialogParticleEditor.cpp | 1495 + neo/tools/particle/DialogParticleEditor.h | 223 + neo/tools/pda/DialogPDAEditor.cpp | 528 + neo/tools/pda/DialogPDAEditor.h | 138 + neo/tools/radiant/CSG.CPP | 687 + neo/tools/radiant/CamWnd.cpp | 2168 ++ neo/tools/radiant/CamWnd.h | 205 + neo/tools/radiant/CameraTargetDlg.cpp | 78 + neo/tools/radiant/CameraTargetDlg.h | 74 + neo/tools/radiant/CapDialog.cpp | 71 + neo/tools/radiant/CapDialog.h | 75 + neo/tools/radiant/CommandsDlg.cpp | 116 + neo/tools/radiant/CommandsDlg.h | 73 + neo/tools/radiant/CommentsDlg.cpp | 65 + neo/tools/radiant/CommentsDlg.h | 53 + neo/tools/radiant/ConsoleDlg.cpp | 261 + neo/tools/radiant/ConsoleDlg.h | 66 + neo/tools/radiant/CurveDlg.cpp | 67 + neo/tools/radiant/CurveDlg.h | 51 + neo/tools/radiant/DRAG.CPP | 763 + neo/tools/radiant/DialogInfo.cpp | 101 + neo/tools/radiant/DialogInfo.h | 75 + neo/tools/radiant/DialogTextures.cpp | 1051 + neo/tools/radiant/DialogTextures.h | 124 + neo/tools/radiant/DialogThick.cpp | 73 + neo/tools/radiant/DialogThick.h | 74 + neo/tools/radiant/DlgCamera.cpp | 373 + neo/tools/radiant/DlgCamera.h | 104 + neo/tools/radiant/DlgEvent.cpp | 72 + neo/tools/radiant/DlgEvent.h | 75 + neo/tools/radiant/ECLASS.CPP | 454 + neo/tools/radiant/EditViewDlg.cpp | 303 + neo/tools/radiant/EditViewDlg.h | 82 + neo/tools/radiant/EditorBrush.cpp | 5220 +++ neo/tools/radiant/EditorBrush.h | 79 + neo/tools/radiant/EditorBrushPrimit.cpp | 1239 + neo/tools/radiant/EditorEntity.cpp | 1401 + neo/tools/radiant/EditorEntity.h | 96 + neo/tools/radiant/EditorMap.cpp | 1624 + neo/tools/radiant/EditorMap.h | 67 + neo/tools/radiant/EntKeyFindReplace.cpp | 199 + neo/tools/radiant/EntKeyFindReplace.h | 104 + neo/tools/radiant/EntityDlg.cpp | 1377 + neo/tools/radiant/EntityDlg.h | 168 + neo/tools/radiant/EntityListDlg.cpp | 158 + neo/tools/radiant/EntityListDlg.h | 85 + neo/tools/radiant/FindTextureDlg.cpp | 182 + neo/tools/radiant/FindTextureDlg.h | 89 + neo/tools/radiant/GLWidget.cpp | 937 + neo/tools/radiant/GLWidget.h | 247 + neo/tools/radiant/GetString.cpp | 126 + neo/tools/radiant/GetString.h | 70 + neo/tools/radiant/InspectorDialog.cpp | 199 + neo/tools/radiant/InspectorDialog.h | 77 + neo/tools/radiant/LightDlg.cpp | 969 + neo/tools/radiant/LightDlg.h | 188 + neo/tools/radiant/MRU.CPP | 679 + neo/tools/radiant/MRU.H | 94 + neo/tools/radiant/MainFrm.cpp | 6902 ++++ neo/tools/radiant/MainFrm.h | 559 + neo/tools/radiant/MapInfo.cpp | 120 + neo/tools/radiant/MapInfo.h | 76 + neo/tools/radiant/MediaPreviewDlg.cpp | 181 + neo/tools/radiant/MediaPreviewDlg.h | 69 + neo/tools/radiant/NewProjDlg.cpp | 71 + neo/tools/radiant/NewProjDlg.h | 73 + neo/tools/radiant/NewTexWnd.cpp | 922 + neo/tools/radiant/NewTexWnd.h | 126 + neo/tools/radiant/PARSE.CPP | 157 + neo/tools/radiant/PARSE.H | 39 + neo/tools/radiant/PMESH.CPP | 4461 +++ neo/tools/radiant/PMESH.H | 124 + neo/tools/radiant/PatchDensityDlg.cpp | 96 + neo/tools/radiant/PatchDensityDlg.h | 75 + neo/tools/radiant/PatchDialog.cpp | 358 + neo/tools/radiant/PatchDialog.h | 108 + neo/tools/radiant/PointFile.cpp | 163 + neo/tools/radiant/PrefsDlg.cpp | 452 + neo/tools/radiant/PrefsDlg.h | 138 + neo/tools/radiant/PreviewDlg.cpp | 669 + neo/tools/radiant/PreviewDlg.h | 101 + neo/tools/radiant/PropertyList.cpp | 540 + neo/tools/radiant/PropertyList.h | 170 + neo/tools/radiant/QE3.CPP | 440 + neo/tools/radiant/QE3.H | 495 + neo/tools/radiant/QEDEFS.H | 171 + neo/tools/radiant/QERTYPES.H | 429 + neo/tools/radiant/Radiant.cpp | 472 + neo/tools/radiant/Radiant.h | 78 + neo/tools/radiant/RotateDlg.cpp | 137 + neo/tools/radiant/RotateDlg.h | 84 + neo/tools/radiant/SELECT.CPP | 2210 ++ neo/tools/radiant/SELECT.H | 144 + neo/tools/radiant/ScaleDialog.cpp | 75 + neo/tools/radiant/ScaleDialog.h | 75 + neo/tools/radiant/SurfaceDlg.cpp | 629 + neo/tools/radiant/SurfaceDlg.h | 139 + neo/tools/radiant/TabsDlg.cpp | 352 + neo/tools/radiant/TabsDlg.h | 119 + neo/tools/radiant/TearoffContainerWindow.cpp | 150 + neo/tools/radiant/TearoffContainerWindow.h | 59 + neo/tools/radiant/TextureBar.cpp | 215 + neo/tools/radiant/TextureBar.h | 91 + neo/tools/radiant/Textures.h | 59 + neo/tools/radiant/Undo.cpp | 909 + neo/tools/radiant/Undo.h | 65 + neo/tools/radiant/VERTSEL.CPP | 428 + neo/tools/radiant/WIN_DLG.CPP | 635 + neo/tools/radiant/WIN_QE3.CPP | 508 + neo/tools/radiant/WIN_QE3.RC2 | 693 + neo/tools/radiant/WaitDlg.cpp | 138 + neo/tools/radiant/WaitDlg.h | 82 + neo/tools/radiant/WaveOpen.cpp | 105 + neo/tools/radiant/WaveOpen.h | 64 + neo/tools/radiant/XYWnd.cpp | 4569 +++ neo/tools/radiant/XYWnd.h | 264 + neo/tools/radiant/Z.CPP | 492 + neo/tools/radiant/Z.H | 46 + neo/tools/radiant/ZClip.cpp | 199 + neo/tools/radiant/ZClip.h | 68 + neo/tools/radiant/ZWnd.cpp | 270 + neo/tools/radiant/ZWnd.h | 100 + neo/tools/radiant/autocaulk.cpp | 340 + neo/tools/radiant/autocaulk.h | 39 + neo/tools/radiant/cmdlib.cpp | 236 + neo/tools/radiant/cmdlib.h | 63 + neo/tools/radiant/splines.cpp | 2037 + neo/tools/radiant/splines.h | 399 + neo/tools/script/DialogScriptEditor.cpp | 756 + neo/tools/script/DialogScriptEditor.h | 104 + neo/tools/sound/DialogSound.cpp | 974 + neo/tools/sound/DialogSound.h | 138 + neo/tools/sound/DialogSoundGroup.cpp | 89 + neo/tools/sound/DialogSoundGroup.h | 75 + neo/typeinfo.vcxproj | 192 + neo/typeinfo.vcxproj.filters | 57 + neo/ui/BindWindow.cpp | 128 + neo/ui/BindWindow.h | 54 + neo/ui/ChoiceWindow.cpp | 402 + neo/ui/ChoiceWindow.h | 82 + neo/ui/DeviceContext.cpp | 1098 + neo/ui/DeviceContext.h | 168 + neo/ui/EditWindow.cpp | 648 + neo/ui/EditWindow.h | 96 + neo/ui/FieldWindow.cpp | 105 + neo/ui/FieldWindow.h | 54 + neo/ui/GameBearShootWindow.cpp | 895 + neo/ui/GameBearShootWindow.h | 133 + neo/ui/GameBustOutWindow.cpp | 1342 + neo/ui/GameBustOutWindow.h | 186 + neo/ui/GameSSDWindow.cpp | 2299 ++ neo/ui/GameSSDWindow.h | 616 + neo/ui/GameWindow.cpp | 52 + neo/ui/GameWindow.h | 38 + neo/ui/GuiScript.cpp | 625 + neo/ui/GuiScript.h | 105 + neo/ui/ListGUI.cpp | 184 + neo/ui/ListGUI.h | 61 + neo/ui/ListGUILocal.h | 70 + neo/ui/ListWindow.cpp | 630 + neo/ui/ListWindow.h | 98 + neo/ui/MarkerWindow.cpp | 359 + neo/ui/MarkerWindow.h | 74 + neo/ui/Rectangle.h | 222 + neo/ui/RegExp.cpp | 402 + neo/ui/RegExp.h | 111 + neo/ui/RegExp_old.h | 87 + neo/ui/RenderWindow.cpp | 212 + neo/ui/RenderWindow.h | 75 + neo/ui/SimpleWindow.cpp | 439 + neo/ui/SimpleWindow.h | 101 + neo/ui/SliderWindow.cpp | 416 + neo/ui/SliderWindow.h | 93 + neo/ui/UserInterface.cpp | 640 + neo/ui/UserInterface.h | 162 + neo/ui/UserInterfaceLocal.h | 146 + neo/ui/Window.cpp | 4230 +++ neo/ui/Window.h | 455 + neo/ui/Winvar.cpp | 83 + neo/ui/Winvar.h | 856 + 2155 files changed, 1017022 insertions(+) create mode 100644 .gitignore create mode 100644 COPYING.txt create mode 100644 README.txt create mode 100644 base/default.cfg create mode 100644 neo/MayaImport.vcxproj create mode 100644 neo/MayaImport.vcxproj.filters create mode 100644 neo/MayaImport/exporter.h create mode 100644 neo/MayaImport/maya_main.cpp create mode 100644 neo/MayaImport/maya_main.h create mode 100644 neo/MayaImport/mayaimport.def create mode 100644 neo/SConstruct create mode 100644 neo/TypeInfo/TypeInfoGen.cpp create mode 100644 neo/TypeInfo/TypeInfoGen.h create mode 100644 neo/TypeInfo/main.cpp create mode 100644 neo/_Common.props create mode 100644 neo/_Curl.props create mode 100644 neo/_Debug.props create mode 100644 neo/_Dedicated.props create mode 100644 neo/_DoomDLL.props create mode 100644 neo/_Game-d3xp.props create mode 100644 neo/_Game.props create mode 100644 neo/_MayaImport.props create mode 100644 neo/_Release.props create mode 100644 neo/_TypeInfo.props create mode 100644 neo/_WithInlines.props create mode 100644 neo/_WithMemoryLog.props create mode 100644 neo/_idlib.props create mode 100644 neo/clean.bat create mode 100644 neo/cm/CollisionModel.h create mode 100644 neo/cm/CollisionModel_contacts.cpp create mode 100644 neo/cm/CollisionModel_contents.cpp create mode 100644 neo/cm/CollisionModel_debug.cpp create mode 100644 neo/cm/CollisionModel_files.cpp create mode 100644 neo/cm/CollisionModel_load.cpp create mode 100644 neo/cm/CollisionModel_local.h create mode 100644 neo/cm/CollisionModel_rotate.cpp create mode 100644 neo/cm/CollisionModel_trace.cpp create mode 100644 neo/cm/CollisionModel_translate.cpp create mode 100644 neo/curl/CHANGES create mode 100644 neo/curl/COPYING create mode 100644 neo/curl/Makefile.am create mode 100644 neo/curl/Makefile.in create mode 100644 neo/curl/README create mode 100644 neo/curl/RELEASE-NOTES create mode 100644 neo/curl/acinclude.m4 create mode 100644 neo/curl/aclocal.m4 create mode 100644 neo/curl/config.guess create mode 100644 neo/curl/config.sub create mode 100755 neo/curl/configure create mode 100644 neo/curl/configure.ac create mode 100644 neo/curl/curl-config.in create mode 100644 neo/curl/curl-style.el create mode 100644 neo/curl/depcomp create mode 100644 neo/curl/docs/BINDINGS create mode 100644 neo/curl/docs/BUGS create mode 100644 neo/curl/docs/CONTRIBUTE create mode 100644 neo/curl/docs/FAQ create mode 100644 neo/curl/docs/FEATURES create mode 100644 neo/curl/docs/HISTORY create mode 100644 neo/curl/docs/INSTALL create mode 100644 neo/curl/docs/INTERNALS create mode 100644 neo/curl/docs/KNOWN_BUGS create mode 100644 neo/curl/docs/MANUAL create mode 100644 neo/curl/docs/Makefile.am create mode 100644 neo/curl/docs/Makefile.in create mode 100644 neo/curl/docs/README.win32 create mode 100644 neo/curl/docs/RESOURCES create mode 100644 neo/curl/docs/SSLCERTS create mode 100644 neo/curl/docs/THANKS create mode 100644 neo/curl/docs/TODO create mode 100644 neo/curl/docs/TheArtOfHttpScripting create mode 100644 neo/curl/docs/VERSIONS create mode 100644 neo/curl/docs/curl-config.1 create mode 100644 neo/curl/docs/curl-config.html create mode 100644 neo/curl/docs/curl-config.pdf create mode 100644 neo/curl/docs/curl.1 create mode 100644 neo/curl/docs/curl.html create mode 100644 neo/curl/docs/curl.pdf create mode 100644 neo/curl/docs/examples/Makefile.am create mode 100644 neo/curl/docs/examples/Makefile.example create mode 100644 neo/curl/docs/examples/Makefile.in create mode 100644 neo/curl/docs/examples/README create mode 100644 neo/curl/docs/examples/curlgtk.c create mode 100644 neo/curl/docs/examples/curlx.c create mode 100644 neo/curl/docs/examples/fopen.c create mode 100644 neo/curl/docs/examples/ftpget.c create mode 100644 neo/curl/docs/examples/ftpgetresp.c create mode 100644 neo/curl/docs/examples/ftpupload.c create mode 100644 neo/curl/docs/examples/getinmemory.c create mode 100644 neo/curl/docs/examples/http-post.c create mode 100644 neo/curl/docs/examples/httpput.c create mode 100644 neo/curl/docs/examples/makefile.dj create mode 100644 neo/curl/docs/examples/multi-app.c create mode 100644 neo/curl/docs/examples/multi-double.c create mode 100644 neo/curl/docs/examples/multi-post.c create mode 100644 neo/curl/docs/examples/multi-single.c create mode 100644 neo/curl/docs/examples/multithread.c create mode 100644 neo/curl/docs/examples/persistant.c create mode 100644 neo/curl/docs/examples/post-callback.c create mode 100644 neo/curl/docs/examples/postit2.c create mode 100644 neo/curl/docs/examples/sepheaders.c create mode 100644 neo/curl/docs/examples/simple.c create mode 100644 neo/curl/docs/examples/simplepost.c create mode 100644 neo/curl/docs/examples/simplessl.c create mode 100644 neo/curl/docs/index.html create mode 100644 neo/curl/docs/libcurl-the-guide create mode 100644 neo/curl/docs/libcurl/Makefile.am create mode 100644 neo/curl/docs/libcurl/Makefile.in create mode 100644 neo/curl/docs/libcurl/curl_easy_cleanup.3 create mode 100644 neo/curl/docs/libcurl/curl_easy_cleanup.html create mode 100644 neo/curl/docs/libcurl/curl_easy_cleanup.pdf create mode 100644 neo/curl/docs/libcurl/curl_easy_duphandle.3 create mode 100644 neo/curl/docs/libcurl/curl_easy_duphandle.html create mode 100644 neo/curl/docs/libcurl/curl_easy_duphandle.pdf create mode 100644 neo/curl/docs/libcurl/curl_easy_getinfo.3 create mode 100644 neo/curl/docs/libcurl/curl_easy_getinfo.html create mode 100644 neo/curl/docs/libcurl/curl_easy_getinfo.pdf create mode 100644 neo/curl/docs/libcurl/curl_easy_init.3 create mode 100644 neo/curl/docs/libcurl/curl_easy_init.html create mode 100644 neo/curl/docs/libcurl/curl_easy_init.pdf create mode 100644 neo/curl/docs/libcurl/curl_easy_perform.3 create mode 100644 neo/curl/docs/libcurl/curl_easy_perform.html create mode 100644 neo/curl/docs/libcurl/curl_easy_perform.pdf create mode 100644 neo/curl/docs/libcurl/curl_easy_setopt.3 create mode 100644 neo/curl/docs/libcurl/curl_easy_setopt.html create mode 100644 neo/curl/docs/libcurl/curl_easy_setopt.pdf create mode 100644 neo/curl/docs/libcurl/curl_escape.3 create mode 100644 neo/curl/docs/libcurl/curl_escape.html create mode 100644 neo/curl/docs/libcurl/curl_escape.pdf create mode 100644 neo/curl/docs/libcurl/curl_formadd.3 create mode 100644 neo/curl/docs/libcurl/curl_formadd.html create mode 100644 neo/curl/docs/libcurl/curl_formadd.pdf create mode 100644 neo/curl/docs/libcurl/curl_formfree.3 create mode 100644 neo/curl/docs/libcurl/curl_formfree.html create mode 100644 neo/curl/docs/libcurl/curl_formfree.pdf create mode 100644 neo/curl/docs/libcurl/curl_formparse.3 create mode 100644 neo/curl/docs/libcurl/curl_formparse.html create mode 100644 neo/curl/docs/libcurl/curl_formparse.pdf create mode 100644 neo/curl/docs/libcurl/curl_free.3 create mode 100644 neo/curl/docs/libcurl/curl_free.html create mode 100644 neo/curl/docs/libcurl/curl_free.pdf create mode 100644 neo/curl/docs/libcurl/curl_getdate.3 create mode 100644 neo/curl/docs/libcurl/curl_getdate.html create mode 100644 neo/curl/docs/libcurl/curl_getdate.pdf create mode 100644 neo/curl/docs/libcurl/curl_getenv.3 create mode 100644 neo/curl/docs/libcurl/curl_getenv.html create mode 100644 neo/curl/docs/libcurl/curl_getenv.pdf create mode 100644 neo/curl/docs/libcurl/curl_global_cleanup.3 create mode 100644 neo/curl/docs/libcurl/curl_global_cleanup.html create mode 100644 neo/curl/docs/libcurl/curl_global_cleanup.pdf create mode 100644 neo/curl/docs/libcurl/curl_global_init.3 create mode 100644 neo/curl/docs/libcurl/curl_global_init.html create mode 100644 neo/curl/docs/libcurl/curl_global_init.pdf create mode 100644 neo/curl/docs/libcurl/curl_mprintf.3 create mode 100644 neo/curl/docs/libcurl/curl_mprintf.html create mode 100644 neo/curl/docs/libcurl/curl_mprintf.pdf create mode 100644 neo/curl/docs/libcurl/curl_multi_add_handle.3 create mode 100644 neo/curl/docs/libcurl/curl_multi_add_handle.html create mode 100644 neo/curl/docs/libcurl/curl_multi_add_handle.pdf create mode 100644 neo/curl/docs/libcurl/curl_multi_cleanup.3 create mode 100644 neo/curl/docs/libcurl/curl_multi_cleanup.html create mode 100644 neo/curl/docs/libcurl/curl_multi_cleanup.pdf create mode 100644 neo/curl/docs/libcurl/curl_multi_fdset.3 create mode 100644 neo/curl/docs/libcurl/curl_multi_fdset.html create mode 100644 neo/curl/docs/libcurl/curl_multi_fdset.pdf create mode 100644 neo/curl/docs/libcurl/curl_multi_info_read.3 create mode 100644 neo/curl/docs/libcurl/curl_multi_info_read.html create mode 100644 neo/curl/docs/libcurl/curl_multi_info_read.pdf create mode 100644 neo/curl/docs/libcurl/curl_multi_init.3 create mode 100644 neo/curl/docs/libcurl/curl_multi_init.html create mode 100644 neo/curl/docs/libcurl/curl_multi_init.pdf create mode 100644 neo/curl/docs/libcurl/curl_multi_perform.3 create mode 100644 neo/curl/docs/libcurl/curl_multi_perform.html create mode 100644 neo/curl/docs/libcurl/curl_multi_perform.pdf create mode 100644 neo/curl/docs/libcurl/curl_multi_remove_handle.3 create mode 100644 neo/curl/docs/libcurl/curl_multi_remove_handle.html create mode 100644 neo/curl/docs/libcurl/curl_multi_remove_handle.pdf create mode 100644 neo/curl/docs/libcurl/curl_share_cleanup.3 create mode 100644 neo/curl/docs/libcurl/curl_share_cleanup.html create mode 100644 neo/curl/docs/libcurl/curl_share_cleanup.pdf create mode 100644 neo/curl/docs/libcurl/curl_share_init.3 create mode 100644 neo/curl/docs/libcurl/curl_share_init.html create mode 100644 neo/curl/docs/libcurl/curl_share_init.pdf create mode 100644 neo/curl/docs/libcurl/curl_share_setopt.3 create mode 100644 neo/curl/docs/libcurl/curl_share_setopt.html create mode 100644 neo/curl/docs/libcurl/curl_share_setopt.pdf create mode 100644 neo/curl/docs/libcurl/curl_slist_append.3 create mode 100644 neo/curl/docs/libcurl/curl_slist_append.html create mode 100644 neo/curl/docs/libcurl/curl_slist_append.pdf create mode 100644 neo/curl/docs/libcurl/curl_slist_free_all.3 create mode 100644 neo/curl/docs/libcurl/curl_slist_free_all.html create mode 100644 neo/curl/docs/libcurl/curl_slist_free_all.pdf create mode 100644 neo/curl/docs/libcurl/curl_strequal.3 create mode 100644 neo/curl/docs/libcurl/curl_strequal.html create mode 100644 neo/curl/docs/libcurl/curl_strequal.pdf create mode 100644 neo/curl/docs/libcurl/curl_strnequal.3 create mode 100644 neo/curl/docs/libcurl/curl_strnequal.html create mode 100644 neo/curl/docs/libcurl/curl_strnequal.pdf create mode 100644 neo/curl/docs/libcurl/curl_unescape.3 create mode 100644 neo/curl/docs/libcurl/curl_unescape.html create mode 100644 neo/curl/docs/libcurl/curl_unescape.pdf create mode 100644 neo/curl/docs/libcurl/curl_version.3 create mode 100644 neo/curl/docs/libcurl/curl_version.html create mode 100644 neo/curl/docs/libcurl/curl_version.pdf create mode 100644 neo/curl/docs/libcurl/curl_version_info.3 create mode 100644 neo/curl/docs/libcurl/curl_version_info.html create mode 100644 neo/curl/docs/libcurl/curl_version_info.pdf create mode 100644 neo/curl/docs/libcurl/index.html create mode 100644 neo/curl/docs/libcurl/libcurl-easy.3 create mode 100644 neo/curl/docs/libcurl/libcurl-easy.html create mode 100644 neo/curl/docs/libcurl/libcurl-easy.pdf create mode 100644 neo/curl/docs/libcurl/libcurl-errors.3 create mode 100644 neo/curl/docs/libcurl/libcurl-errors.html create mode 100644 neo/curl/docs/libcurl/libcurl-errors.pdf create mode 100644 neo/curl/docs/libcurl/libcurl-multi.3 create mode 100644 neo/curl/docs/libcurl/libcurl-multi.html create mode 100644 neo/curl/docs/libcurl/libcurl-multi.pdf create mode 100644 neo/curl/docs/libcurl/libcurl-share.3 create mode 100644 neo/curl/docs/libcurl/libcurl-share.html create mode 100644 neo/curl/docs/libcurl/libcurl-share.pdf create mode 100644 neo/curl/docs/libcurl/libcurl.3 create mode 100644 neo/curl/docs/libcurl/libcurl.html create mode 100644 neo/curl/docs/libcurl/libcurl.pdf create mode 100644 neo/curl/include/Makefile.am create mode 100644 neo/curl/include/Makefile.in create mode 100644 neo/curl/include/README create mode 100644 neo/curl/include/curl/Makefile.am create mode 100644 neo/curl/include/curl/Makefile.in create mode 100644 neo/curl/include/curl/curl.h create mode 100644 neo/curl/include/curl/easy.h create mode 100644 neo/curl/include/curl/mprintf.h create mode 100644 neo/curl/include/curl/multi.h create mode 100644 neo/curl/include/curl/stdcheaders.h create mode 100644 neo/curl/include/curl/types.h create mode 100644 neo/curl/install-sh create mode 100644 neo/curl/lib/Makefile.am create mode 100644 neo/curl/lib/Makefile.b32 create mode 100644 neo/curl/lib/Makefile.b32.resp create mode 100644 neo/curl/lib/Makefile.in create mode 100644 neo/curl/lib/Makefile.m32 create mode 100644 neo/curl/lib/Makefile.netware create mode 100644 neo/curl/lib/Makefile.riscos create mode 100644 neo/curl/lib/Makefile.vc6 create mode 100644 neo/curl/lib/README.ares create mode 100644 neo/curl/lib/README.encoding create mode 100644 neo/curl/lib/README.memoryleak create mode 100644 neo/curl/lib/amigaos.c create mode 100644 neo/curl/lib/amigaos.h create mode 100644 neo/curl/lib/arpa_telnet.h create mode 100644 neo/curl/lib/base64.c create mode 100644 neo/curl/lib/base64.h create mode 100644 neo/curl/lib/ca-bundle.crt create mode 100644 neo/curl/lib/ca-bundle.h create mode 100644 neo/curl/lib/config-amigaos.h create mode 100644 neo/curl/lib/config-mac.h create mode 100644 neo/curl/lib/config-netware.h create mode 100644 neo/curl/lib/config-riscos.h create mode 100644 neo/curl/lib/config-vms.h create mode 100644 neo/curl/lib/config-win32.h create mode 100644 neo/curl/lib/config.dj create mode 100644 neo/curl/lib/config.h.in create mode 100644 neo/curl/lib/connect.c create mode 100644 neo/curl/lib/connect.h create mode 100644 neo/curl/lib/content_encoding.c create mode 100644 neo/curl/lib/content_encoding.h create mode 100644 neo/curl/lib/cookie.c create mode 100644 neo/curl/lib/cookie.h create mode 100644 neo/curl/lib/curllib.dsp create mode 100644 neo/curl/lib/curllib.dsw create mode 100644 neo/curl/lib/curllib.vcproj create mode 100644 neo/curl/lib/dict.c create mode 100644 neo/curl/lib/dict.h create mode 100644 neo/curl/lib/easy.c create mode 100644 neo/curl/lib/escape.c create mode 100644 neo/curl/lib/escape.h create mode 100644 neo/curl/lib/file.c create mode 100644 neo/curl/lib/file.h create mode 100644 neo/curl/lib/formdata.c create mode 100644 neo/curl/lib/formdata.h create mode 100644 neo/curl/lib/ftp.c create mode 100644 neo/curl/lib/ftp.h create mode 100644 neo/curl/lib/getdate.c create mode 100644 neo/curl/lib/getdate.h create mode 100644 neo/curl/lib/getdate.y create mode 100644 neo/curl/lib/getenv.c create mode 100644 neo/curl/lib/getinfo.c create mode 100644 neo/curl/lib/getinfo.h create mode 100644 neo/curl/lib/hash.c create mode 100644 neo/curl/lib/hash.h create mode 100644 neo/curl/lib/hostip.c create mode 100644 neo/curl/lib/hostip.h create mode 100644 neo/curl/lib/http.c create mode 100644 neo/curl/lib/http.h create mode 100644 neo/curl/lib/http_chunks.c create mode 100644 neo/curl/lib/http_chunks.h create mode 100644 neo/curl/lib/http_digest.c create mode 100644 neo/curl/lib/http_digest.h create mode 100644 neo/curl/lib/http_negotiate.c create mode 100644 neo/curl/lib/http_negotiate.h create mode 100644 neo/curl/lib/http_ntlm.c create mode 100644 neo/curl/lib/http_ntlm.h create mode 100644 neo/curl/lib/if2ip.c create mode 100644 neo/curl/lib/if2ip.h create mode 100644 neo/curl/lib/inet_ntoa_r.h create mode 100644 neo/curl/lib/inet_pton.c create mode 100644 neo/curl/lib/inet_pton.h create mode 100644 neo/curl/lib/krb4.c create mode 100644 neo/curl/lib/krb4.h create mode 100644 neo/curl/lib/ldap.c create mode 100644 neo/curl/lib/ldap.h create mode 100644 neo/curl/lib/libcurl.def create mode 100644 neo/curl/lib/libcurl.framework.make create mode 100644 neo/curl/lib/libcurl.imp create mode 100644 neo/curl/lib/libcurl.plist create mode 100644 neo/curl/lib/libcurl.rc create mode 100644 neo/curl/lib/llist.c create mode 100644 neo/curl/lib/llist.h create mode 100644 neo/curl/lib/makefile.amiga create mode 100644 neo/curl/lib/makefile.dj create mode 100644 neo/curl/lib/md5.c create mode 100644 neo/curl/lib/md5.h create mode 100644 neo/curl/lib/memdebug.c create mode 100644 neo/curl/lib/memdebug.h create mode 100644 neo/curl/lib/mprintf.c create mode 100644 neo/curl/lib/multi.c create mode 100644 neo/curl/lib/netrc.c create mode 100644 neo/curl/lib/netrc.h create mode 100644 neo/curl/lib/nwlib.c create mode 100644 neo/curl/lib/progress.c create mode 100644 neo/curl/lib/progress.h create mode 100644 neo/curl/lib/security.c create mode 100644 neo/curl/lib/security.h create mode 100644 neo/curl/lib/sendf.c create mode 100644 neo/curl/lib/sendf.h create mode 100644 neo/curl/lib/setup.h create mode 100644 neo/curl/lib/share.c create mode 100644 neo/curl/lib/share.h create mode 100644 neo/curl/lib/speedcheck.c create mode 100644 neo/curl/lib/speedcheck.h create mode 100644 neo/curl/lib/ssluse.c create mode 100644 neo/curl/lib/ssluse.h create mode 100644 neo/curl/lib/strequal.c create mode 100644 neo/curl/lib/strequal.h create mode 100644 neo/curl/lib/strtok.c create mode 100644 neo/curl/lib/strtok.h create mode 100644 neo/curl/lib/strtoofft.c create mode 100644 neo/curl/lib/strtoofft.h create mode 100644 neo/curl/lib/telnet.c create mode 100644 neo/curl/lib/telnet.h create mode 100644 neo/curl/lib/timeval.c create mode 100644 neo/curl/lib/timeval.h create mode 100644 neo/curl/lib/transfer.c create mode 100644 neo/curl/lib/transfer.h create mode 100644 neo/curl/lib/url.c create mode 100644 neo/curl/lib/url.h create mode 100644 neo/curl/lib/urldata.h create mode 100644 neo/curl/lib/version.c create mode 100644 neo/curl/ltmain.sh create mode 100644 neo/curl/maketgz create mode 100644 neo/curl/missing create mode 100644 neo/curl/mkinstalldirs create mode 100644 neo/curl/packages/DOS/Makefile.am create mode 100644 neo/curl/packages/DOS/Makefile.in create mode 100644 neo/curl/packages/DOS/README create mode 100644 neo/curl/packages/DOS/common.dj create mode 100644 neo/curl/packages/EPM/Makefile.am create mode 100644 neo/curl/packages/EPM/Makefile.in create mode 100644 neo/curl/packages/EPM/README create mode 100644 neo/curl/packages/EPM/curl.list.in create mode 100644 neo/curl/packages/Linux/Makefile.am create mode 100644 neo/curl/packages/Linux/Makefile.in create mode 100644 neo/curl/packages/Linux/RPM/Makefile.am create mode 100644 neo/curl/packages/Linux/RPM/Makefile.in create mode 100644 neo/curl/packages/Linux/RPM/README create mode 100644 neo/curl/packages/Linux/RPM/curl-ssl.spec.in create mode 100644 neo/curl/packages/Linux/RPM/curl.spec.in create mode 100644 neo/curl/packages/Linux/RPM/make_curl_rpm create mode 100644 neo/curl/packages/Makefile.am create mode 100644 neo/curl/packages/Makefile.in create mode 100644 neo/curl/packages/NetWare/get_ver.awk create mode 100644 neo/curl/packages/README create mode 100644 neo/curl/packages/Solaris/Makefile.am create mode 100644 neo/curl/packages/Solaris/Makefile.in create mode 100644 neo/curl/packages/Win32/Makefile.am create mode 100644 neo/curl/packages/Win32/Makefile.in create mode 100644 neo/curl/packages/Win32/README create mode 100644 neo/curl/packages/Win32/cygwin/Makefile.am create mode 100644 neo/curl/packages/Win32/cygwin/Makefile.in create mode 100644 neo/curl/packages/Win32/cygwin/README create mode 100644 neo/curl/packages/vms/Makefile.am create mode 100644 neo/curl/packages/vms/Makefile.in create mode 100644 neo/curl/packages/vms/batch_compile.com create mode 100644 neo/curl/packages/vms/build_vms.com create mode 100644 neo/curl/packages/vms/config-vms.h_with_ssl create mode 100644 neo/curl/packages/vms/config-vms.h_without_ssl create mode 100644 neo/curl/packages/vms/defines.com create mode 100644 neo/curl/packages/vms/hpssl_alpha.opt create mode 100644 neo/curl/packages/vms/hpssl_ia64.opt create mode 100644 neo/curl/packages/vms/hpssl_vax.opt create mode 100644 neo/curl/packages/vms/readme create mode 100644 neo/curl/reconf create mode 100644 neo/curl/sample.emacs create mode 100644 neo/curl/src/Makefile.am create mode 100644 neo/curl/src/Makefile.b32 create mode 100644 neo/curl/src/Makefile.in create mode 100644 neo/curl/src/Makefile.m32 create mode 100644 neo/curl/src/Makefile.netware create mode 100644 neo/curl/src/Makefile.riscos create mode 100644 neo/curl/src/Makefile.vc6 create mode 100644 neo/curl/src/config-amigaos.h create mode 100644 neo/curl/src/config-mac.h create mode 100644 neo/curl/src/config-netware.h create mode 100644 neo/curl/src/config-riscos.h create mode 100644 neo/curl/src/config-vms.h create mode 100644 neo/curl/src/config-win32.h create mode 100644 neo/curl/src/config.h.in create mode 100644 neo/curl/src/curl.rc create mode 100644 neo/curl/src/curlmsg.h create mode 100644 neo/curl/src/curlmsg.msg create mode 100644 neo/curl/src/curlmsg.sdl create mode 100644 neo/curl/src/curlmsg_vms.h create mode 100644 neo/curl/src/getpass.c create mode 100644 neo/curl/src/getpass.h create mode 100644 neo/curl/src/homedir.c create mode 100644 neo/curl/src/homedir.h create mode 100644 neo/curl/src/hugehelp.c create mode 100644 neo/curl/src/hugehelp.h create mode 100644 neo/curl/src/macos/MACINSTALL.TXT create mode 100644 neo/curl/src/macos/curl.mcp.xml.sit.hqx create mode 100644 neo/curl/src/macos/src/curl_GUSIConfig.cpp create mode 100644 neo/curl/src/macos/src/macos_main.cpp create mode 100644 neo/curl/src/main.c create mode 100644 neo/curl/src/makefile.amiga create mode 100644 neo/curl/src/makefile.dj create mode 100644 neo/curl/src/mkhelp.pl create mode 100644 neo/curl/src/setup.h create mode 100644 neo/curl/src/urlglob.c create mode 100644 neo/curl/src/urlglob.h create mode 100644 neo/curl/src/version.h create mode 100644 neo/curl/src/writeenv.c create mode 100644 neo/curl/src/writeenv.h create mode 100644 neo/curl/src/writeout.c create mode 100644 neo/curl/src/writeout.h create mode 100644 neo/curl/testcurl.sh create mode 100644 neo/curl/tests/FILEFORMAT create mode 100644 neo/curl/tests/Makefile.am create mode 100644 neo/curl/tests/Makefile.in create mode 100644 neo/curl/tests/README create mode 100644 neo/curl/tests/data/Makefile.am create mode 100644 neo/curl/tests/data/Makefile.in create mode 100644 neo/curl/tests/data/test1 create mode 100644 neo/curl/tests/data/test10 create mode 100644 neo/curl/tests/data/test100 create mode 100644 neo/curl/tests/data/test101 create mode 100644 neo/curl/tests/data/test102 create mode 100644 neo/curl/tests/data/test103 create mode 100644 neo/curl/tests/data/test104 create mode 100644 neo/curl/tests/data/test105 create mode 100644 neo/curl/tests/data/test106 create mode 100644 neo/curl/tests/data/test107 create mode 100644 neo/curl/tests/data/test108 create mode 100644 neo/curl/tests/data/test109 create mode 100644 neo/curl/tests/data/test11 create mode 100644 neo/curl/tests/data/test110 create mode 100644 neo/curl/tests/data/test111 create mode 100644 neo/curl/tests/data/test112 create mode 100644 neo/curl/tests/data/test113 create mode 100644 neo/curl/tests/data/test114 create mode 100644 neo/curl/tests/data/test115 create mode 100644 neo/curl/tests/data/test116 create mode 100644 neo/curl/tests/data/test117 create mode 100644 neo/curl/tests/data/test118 create mode 100644 neo/curl/tests/data/test119 create mode 100644 neo/curl/tests/data/test12 create mode 100644 neo/curl/tests/data/test120 create mode 100644 neo/curl/tests/data/test121 create mode 100644 neo/curl/tests/data/test122 create mode 100644 neo/curl/tests/data/test123 create mode 100644 neo/curl/tests/data/test124 create mode 100644 neo/curl/tests/data/test125 create mode 100644 neo/curl/tests/data/test126 create mode 100644 neo/curl/tests/data/test127 create mode 100644 neo/curl/tests/data/test128 create mode 100644 neo/curl/tests/data/test13 create mode 100644 neo/curl/tests/data/test130 create mode 100644 neo/curl/tests/data/test131 create mode 100644 neo/curl/tests/data/test132 create mode 100644 neo/curl/tests/data/test133 create mode 100644 neo/curl/tests/data/test134 create mode 100644 neo/curl/tests/data/test135 create mode 100644 neo/curl/tests/data/test136 create mode 100644 neo/curl/tests/data/test137 create mode 100644 neo/curl/tests/data/test138 create mode 100644 neo/curl/tests/data/test139 create mode 100644 neo/curl/tests/data/test14 create mode 100644 neo/curl/tests/data/test140 create mode 100644 neo/curl/tests/data/test141 create mode 100644 neo/curl/tests/data/test142 create mode 100644 neo/curl/tests/data/test143 create mode 100644 neo/curl/tests/data/test144 create mode 100644 neo/curl/tests/data/test145 create mode 100644 neo/curl/tests/data/test146 create mode 100644 neo/curl/tests/data/test147 create mode 100644 neo/curl/tests/data/test148 create mode 100644 neo/curl/tests/data/test149 create mode 100644 neo/curl/tests/data/test15 create mode 100644 neo/curl/tests/data/test16 create mode 100644 neo/curl/tests/data/test17 create mode 100644 neo/curl/tests/data/test18 create mode 100644 neo/curl/tests/data/test19 create mode 100644 neo/curl/tests/data/test190 create mode 100644 neo/curl/tests/data/test2 create mode 100644 neo/curl/tests/data/test20 create mode 100644 neo/curl/tests/data/test200 create mode 100644 neo/curl/tests/data/test201 create mode 100644 neo/curl/tests/data/test202 create mode 100644 neo/curl/tests/data/test203 create mode 100644 neo/curl/tests/data/test21 create mode 100644 neo/curl/tests/data/test22 create mode 100644 neo/curl/tests/data/test23 create mode 100644 neo/curl/tests/data/test24 create mode 100644 neo/curl/tests/data/test25 create mode 100644 neo/curl/tests/data/test26 create mode 100644 neo/curl/tests/data/test27 create mode 100644 neo/curl/tests/data/test28 create mode 100644 neo/curl/tests/data/test29 create mode 100644 neo/curl/tests/data/test3 create mode 100644 neo/curl/tests/data/test30 create mode 100644 neo/curl/tests/data/test300 create mode 100644 neo/curl/tests/data/test301 create mode 100644 neo/curl/tests/data/test302 create mode 100644 neo/curl/tests/data/test303 create mode 100644 neo/curl/tests/data/test304 create mode 100644 neo/curl/tests/data/test305 create mode 100644 neo/curl/tests/data/test306 create mode 100644 neo/curl/tests/data/test31 create mode 100644 neo/curl/tests/data/test32 create mode 100644 neo/curl/tests/data/test33 create mode 100644 neo/curl/tests/data/test34 create mode 100644 neo/curl/tests/data/test36 create mode 100644 neo/curl/tests/data/test37 create mode 100644 neo/curl/tests/data/test38 create mode 100644 neo/curl/tests/data/test39 create mode 100644 neo/curl/tests/data/test4 create mode 100644 neo/curl/tests/data/test40 create mode 100644 neo/curl/tests/data/test41 create mode 100644 neo/curl/tests/data/test42 create mode 100644 neo/curl/tests/data/test43 create mode 100644 neo/curl/tests/data/test44 create mode 100644 neo/curl/tests/data/test45 create mode 100644 neo/curl/tests/data/test46 create mode 100644 neo/curl/tests/data/test47 create mode 100644 neo/curl/tests/data/test48 create mode 100644 neo/curl/tests/data/test49 create mode 100644 neo/curl/tests/data/test5 create mode 100644 neo/curl/tests/data/test50 create mode 100644 neo/curl/tests/data/test500 create mode 100644 neo/curl/tests/data/test501 create mode 100644 neo/curl/tests/data/test502 create mode 100644 neo/curl/tests/data/test503 create mode 100644 neo/curl/tests/data/test504 create mode 100644 neo/curl/tests/data/test505 create mode 100644 neo/curl/tests/data/test506 create mode 100644 neo/curl/tests/data/test507 create mode 100644 neo/curl/tests/data/test508 create mode 100644 neo/curl/tests/data/test509 create mode 100644 neo/curl/tests/data/test51 create mode 100644 neo/curl/tests/data/test510 create mode 100644 neo/curl/tests/data/test52 create mode 100644 neo/curl/tests/data/test53 create mode 100644 neo/curl/tests/data/test54 create mode 100644 neo/curl/tests/data/test55 create mode 100644 neo/curl/tests/data/test56 create mode 100644 neo/curl/tests/data/test57 create mode 100644 neo/curl/tests/data/test58 create mode 100644 neo/curl/tests/data/test59 create mode 100644 neo/curl/tests/data/test6 create mode 100644 neo/curl/tests/data/test60 create mode 100644 neo/curl/tests/data/test61 create mode 100644 neo/curl/tests/data/test62 create mode 100644 neo/curl/tests/data/test63 create mode 100644 neo/curl/tests/data/test64 create mode 100644 neo/curl/tests/data/test65 create mode 100644 neo/curl/tests/data/test66 create mode 100644 neo/curl/tests/data/test67 create mode 100644 neo/curl/tests/data/test68 create mode 100644 neo/curl/tests/data/test69 create mode 100644 neo/curl/tests/data/test7 create mode 100644 neo/curl/tests/data/test70 create mode 100644 neo/curl/tests/data/test71 create mode 100644 neo/curl/tests/data/test72 create mode 100644 neo/curl/tests/data/test73 create mode 100644 neo/curl/tests/data/test74 create mode 100644 neo/curl/tests/data/test75 create mode 100644 neo/curl/tests/data/test76 create mode 100644 neo/curl/tests/data/test77 create mode 100644 neo/curl/tests/data/test78 create mode 100644 neo/curl/tests/data/test79 create mode 100644 neo/curl/tests/data/test8 create mode 100644 neo/curl/tests/data/test80 create mode 100644 neo/curl/tests/data/test81 create mode 100644 neo/curl/tests/data/test82 create mode 100644 neo/curl/tests/data/test83 create mode 100644 neo/curl/tests/data/test84 create mode 100644 neo/curl/tests/data/test85 create mode 100644 neo/curl/tests/data/test86 create mode 100644 neo/curl/tests/data/test87 create mode 100644 neo/curl/tests/data/test88 create mode 100644 neo/curl/tests/data/test89 create mode 100644 neo/curl/tests/data/test9 create mode 100644 neo/curl/tests/data/test90 create mode 100644 neo/curl/tests/data/test91 create mode 100644 neo/curl/tests/data/test92 create mode 100644 neo/curl/tests/data/test93 create mode 100644 neo/curl/tests/data/test94 create mode 100644 neo/curl/tests/data/test95 create mode 100644 neo/curl/tests/data/test97 create mode 100644 neo/curl/tests/data/test98 create mode 100644 neo/curl/tests/data/test99 create mode 100644 neo/curl/tests/ftpserver.pl create mode 100644 neo/curl/tests/ftpsserver.pl create mode 100644 neo/curl/tests/getpart.pm create mode 100644 neo/curl/tests/httpserver.pl create mode 100644 neo/curl/tests/httpsserver.pl create mode 100644 neo/curl/tests/libtest/Makefile.am create mode 100644 neo/curl/tests/libtest/Makefile.in create mode 100644 neo/curl/tests/libtest/first.c create mode 100644 neo/curl/tests/libtest/lib500.c create mode 100644 neo/curl/tests/libtest/lib501.c create mode 100644 neo/curl/tests/libtest/lib502.c create mode 100644 neo/curl/tests/libtest/lib503.c create mode 100644 neo/curl/tests/libtest/lib504.c create mode 100644 neo/curl/tests/libtest/lib505.c create mode 100644 neo/curl/tests/libtest/lib506.c create mode 100644 neo/curl/tests/libtest/lib507.c create mode 100644 neo/curl/tests/libtest/lib508.c create mode 100644 neo/curl/tests/libtest/lib509.c create mode 100644 neo/curl/tests/libtest/lib510.c create mode 100644 neo/curl/tests/libtest/test.h create mode 100644 neo/curl/tests/memanalyze.pl create mode 100644 neo/curl/tests/runtests.pl create mode 100644 neo/curl/tests/server/Makefile.am create mode 100644 neo/curl/tests/server/Makefile.in create mode 100644 neo/curl/tests/server/getpart.c create mode 100644 neo/curl/tests/server/getpart.h create mode 100644 neo/curl/tests/server/sws.c create mode 100644 neo/curl/tests/stunnel.pem create mode 100644 neo/curllib.vcxproj create mode 100644 neo/curllib.vcxproj.filters create mode 100644 neo/d3xp/AF.cpp create mode 100644 neo/d3xp/AF.h create mode 100644 neo/d3xp/AFEntity.cpp create mode 100644 neo/d3xp/AFEntity.h create mode 100644 neo/d3xp/Actor.cpp create mode 100644 neo/d3xp/Actor.h create mode 100644 neo/d3xp/BrittleFracture.cpp create mode 100644 neo/d3xp/BrittleFracture.h create mode 100644 neo/d3xp/Camera.cpp create mode 100644 neo/d3xp/Camera.h create mode 100644 neo/d3xp/EndLevel.cpp create mode 100644 neo/d3xp/EndLevel.h create mode 100644 neo/d3xp/Entity.cpp create mode 100644 neo/d3xp/Entity.h create mode 100644 neo/d3xp/Fx.cpp create mode 100644 neo/d3xp/Fx.h create mode 100644 neo/d3xp/Game.def create mode 100644 neo/d3xp/Game.h create mode 100644 neo/d3xp/GameEdit.cpp create mode 100644 neo/d3xp/GameEdit.h create mode 100644 neo/d3xp/Game_local.cpp create mode 100644 neo/d3xp/Game_local.h create mode 100644 neo/d3xp/Game_network.cpp create mode 100644 neo/d3xp/Grabber.cpp create mode 100644 neo/d3xp/Grabber.h create mode 100644 neo/d3xp/IK.cpp create mode 100644 neo/d3xp/IK.h create mode 100644 neo/d3xp/Item.cpp create mode 100644 neo/d3xp/Item.h create mode 100644 neo/d3xp/Light.cpp create mode 100644 neo/d3xp/Light.h create mode 100644 neo/d3xp/Misc.cpp create mode 100644 neo/d3xp/Misc.h create mode 100644 neo/d3xp/Moveable.cpp create mode 100644 neo/d3xp/Moveable.h create mode 100644 neo/d3xp/Mover.cpp create mode 100644 neo/d3xp/Mover.h create mode 100644 neo/d3xp/MultiplayerGame.cpp create mode 100644 neo/d3xp/MultiplayerGame.h create mode 100644 neo/d3xp/Player.cpp create mode 100644 neo/d3xp/Player.h create mode 100644 neo/d3xp/PlayerIcon.cpp create mode 100644 neo/d3xp/PlayerIcon.h create mode 100644 neo/d3xp/PlayerView.cpp create mode 100644 neo/d3xp/PlayerView.h create mode 100644 neo/d3xp/Projectile.cpp create mode 100644 neo/d3xp/Projectile.h create mode 100644 neo/d3xp/Pvs.cpp create mode 100644 neo/d3xp/Pvs.h create mode 100644 neo/d3xp/SecurityCamera.cpp create mode 100644 neo/d3xp/SecurityCamera.h create mode 100644 neo/d3xp/SmokeParticles.cpp create mode 100644 neo/d3xp/SmokeParticles.h create mode 100644 neo/d3xp/Sound.cpp create mode 100644 neo/d3xp/Sound.h create mode 100644 neo/d3xp/Target.cpp create mode 100644 neo/d3xp/Target.h create mode 100644 neo/d3xp/Trigger.cpp create mode 100644 neo/d3xp/Trigger.h create mode 100644 neo/d3xp/Weapon.cpp create mode 100644 neo/d3xp/Weapon.h create mode 100644 neo/d3xp/WorldSpawn.cpp create mode 100644 neo/d3xp/WorldSpawn.h create mode 100644 neo/d3xp/ai/AAS.cpp create mode 100644 neo/d3xp/ai/AAS.h create mode 100644 neo/d3xp/ai/AAS_debug.cpp create mode 100644 neo/d3xp/ai/AAS_local.h create mode 100644 neo/d3xp/ai/AAS_pathing.cpp create mode 100644 neo/d3xp/ai/AAS_routing.cpp create mode 100644 neo/d3xp/ai/AI.cpp create mode 100644 neo/d3xp/ai/AI.h create mode 100644 neo/d3xp/ai/AI_Vagary.cpp create mode 100644 neo/d3xp/ai/AI_events.cpp create mode 100644 neo/d3xp/ai/AI_pathing.cpp create mode 100644 neo/d3xp/anim/Anim.cpp create mode 100644 neo/d3xp/anim/Anim.h create mode 100644 neo/d3xp/anim/Anim_Blend.cpp create mode 100644 neo/d3xp/anim/Anim_Import.cpp create mode 100644 neo/d3xp/anim/Anim_Testmodel.cpp create mode 100644 neo/d3xp/anim/Anim_Testmodel.h create mode 100644 neo/d3xp/gamesys/Callbacks.cpp create mode 100644 neo/d3xp/gamesys/Class.cpp create mode 100644 neo/d3xp/gamesys/Class.h create mode 100644 neo/d3xp/gamesys/DebugGraph.cpp create mode 100644 neo/d3xp/gamesys/DebugGraph.h create mode 100644 neo/d3xp/gamesys/Event.cpp create mode 100644 neo/d3xp/gamesys/Event.h create mode 100644 neo/d3xp/gamesys/NoGameTypeInfo.h create mode 100644 neo/d3xp/gamesys/SaveGame.cpp create mode 100644 neo/d3xp/gamesys/SaveGame.h create mode 100644 neo/d3xp/gamesys/SysCmds.cpp create mode 100644 neo/d3xp/gamesys/SysCmds.h create mode 100644 neo/d3xp/gamesys/SysCvar.cpp create mode 100644 neo/d3xp/gamesys/SysCvar.h create mode 100644 neo/d3xp/gamesys/TypeInfo.cpp create mode 100644 neo/d3xp/gamesys/TypeInfo.h create mode 100644 neo/d3xp/physics/Clip.cpp create mode 100644 neo/d3xp/physics/Clip.h create mode 100644 neo/d3xp/physics/Force.cpp create mode 100644 neo/d3xp/physics/Force.h create mode 100644 neo/d3xp/physics/Force_Constant.cpp create mode 100644 neo/d3xp/physics/Force_Constant.h create mode 100644 neo/d3xp/physics/Force_Drag.cpp create mode 100644 neo/d3xp/physics/Force_Drag.h create mode 100644 neo/d3xp/physics/Force_Field.cpp create mode 100644 neo/d3xp/physics/Force_Field.h create mode 100644 neo/d3xp/physics/Force_Grab.cpp create mode 100644 neo/d3xp/physics/Force_Grab.h create mode 100644 neo/d3xp/physics/Force_Spring.cpp create mode 100644 neo/d3xp/physics/Force_Spring.h create mode 100644 neo/d3xp/physics/Physics.cpp create mode 100644 neo/d3xp/physics/Physics.h create mode 100644 neo/d3xp/physics/Physics_AF.cpp create mode 100644 neo/d3xp/physics/Physics_AF.h create mode 100644 neo/d3xp/physics/Physics_Actor.cpp create mode 100644 neo/d3xp/physics/Physics_Actor.h create mode 100644 neo/d3xp/physics/Physics_Base.cpp create mode 100644 neo/d3xp/physics/Physics_Base.h create mode 100644 neo/d3xp/physics/Physics_Monster.cpp create mode 100644 neo/d3xp/physics/Physics_Monster.h create mode 100644 neo/d3xp/physics/Physics_Parametric.cpp create mode 100644 neo/d3xp/physics/Physics_Parametric.h create mode 100644 neo/d3xp/physics/Physics_Player.cpp create mode 100644 neo/d3xp/physics/Physics_Player.h create mode 100644 neo/d3xp/physics/Physics_RigidBody.cpp create mode 100644 neo/d3xp/physics/Physics_RigidBody.h create mode 100644 neo/d3xp/physics/Physics_Static.cpp create mode 100644 neo/d3xp/physics/Physics_Static.h create mode 100644 neo/d3xp/physics/Physics_StaticMulti.cpp create mode 100644 neo/d3xp/physics/Physics_StaticMulti.h create mode 100644 neo/d3xp/physics/Push.cpp create mode 100644 neo/d3xp/physics/Push.h create mode 100644 neo/d3xp/script/Script_Compiler.cpp create mode 100644 neo/d3xp/script/Script_Compiler.h create mode 100644 neo/d3xp/script/Script_Interpreter.cpp create mode 100644 neo/d3xp/script/Script_Interpreter.h create mode 100644 neo/d3xp/script/Script_Program.cpp create mode 100644 neo/d3xp/script/Script_Program.h create mode 100644 neo/d3xp/script/Script_Thread.cpp create mode 100644 neo/d3xp/script/Script_Thread.h create mode 100644 neo/doom.sln create mode 100644 neo/doom.suo create mode 100644 neo/doomdll.vcxproj create mode 100644 neo/doomdll.vcxproj.filters create mode 100644 neo/doomdll.vcxproj.user create mode 100644 neo/framework/BuildDefines.h create mode 100644 neo/framework/BuildVersion.h create mode 100644 neo/framework/CVarSystem.cpp create mode 100644 neo/framework/CVarSystem.h create mode 100644 neo/framework/CmdSystem.cpp create mode 100644 neo/framework/CmdSystem.h create mode 100644 neo/framework/Common.cpp create mode 100644 neo/framework/Common.h create mode 100644 neo/framework/Compressor.cpp create mode 100644 neo/framework/Compressor.h create mode 100644 neo/framework/Console.cpp create mode 100644 neo/framework/Console.h create mode 100644 neo/framework/DeclAF.cpp create mode 100644 neo/framework/DeclAF.h create mode 100644 neo/framework/DeclEntityDef.cpp create mode 100644 neo/framework/DeclEntityDef.h create mode 100644 neo/framework/DeclFX.cpp create mode 100644 neo/framework/DeclFX.h create mode 100644 neo/framework/DeclManager.cpp create mode 100644 neo/framework/DeclManager.h create mode 100644 neo/framework/DeclPDA.cpp create mode 100644 neo/framework/DeclPDA.h create mode 100644 neo/framework/DeclParticle.cpp create mode 100644 neo/framework/DeclParticle.h create mode 100644 neo/framework/DeclSkin.cpp create mode 100644 neo/framework/DeclSkin.h create mode 100644 neo/framework/DeclTable.cpp create mode 100644 neo/framework/DeclTable.h create mode 100644 neo/framework/DemoChecksum.h create mode 100644 neo/framework/DemoFile.cpp create mode 100644 neo/framework/DemoFile.h create mode 100644 neo/framework/EditField.cpp create mode 100644 neo/framework/EditField.h create mode 100644 neo/framework/EventLoop.cpp create mode 100644 neo/framework/EventLoop.h create mode 100644 neo/framework/File.cpp create mode 100644 neo/framework/File.h create mode 100644 neo/framework/FileSystem.cpp create mode 100644 neo/framework/FileSystem.h create mode 100644 neo/framework/KeyInput.cpp create mode 100644 neo/framework/KeyInput.h create mode 100644 neo/framework/Licensee.h create mode 100644 neo/framework/Session.cpp create mode 100644 neo/framework/Session.h create mode 100644 neo/framework/Session_local.h create mode 100644 neo/framework/Session_menu.cpp create mode 100644 neo/framework/Unzip.cpp create mode 100644 neo/framework/Unzip.h create mode 100644 neo/framework/UsercmdGen.cpp create mode 100644 neo/framework/UsercmdGen.h create mode 100644 neo/framework/async/AsyncClient.cpp create mode 100644 neo/framework/async/AsyncClient.h create mode 100644 neo/framework/async/AsyncNetwork.cpp create mode 100644 neo/framework/async/AsyncNetwork.h create mode 100644 neo/framework/async/AsyncServer.cpp create mode 100644 neo/framework/async/AsyncServer.h create mode 100644 neo/framework/async/MsgChannel.cpp create mode 100644 neo/framework/async/MsgChannel.h create mode 100644 neo/framework/async/NetworkSystem.cpp create mode 100644 neo/framework/async/NetworkSystem.h create mode 100644 neo/framework/async/ServerScan.cpp create mode 100644 neo/framework/async/ServerScan.h create mode 100644 neo/game-d3xp.vcxproj create mode 100644 neo/game-d3xp.vcxproj.filters create mode 100644 neo/game.vcxproj create mode 100644 neo/game.vcxproj.filters create mode 100644 neo/game/AF.cpp create mode 100644 neo/game/AF.h create mode 100644 neo/game/AFEntity.cpp create mode 100644 neo/game/AFEntity.h create mode 100644 neo/game/Actor.cpp create mode 100644 neo/game/Actor.h create mode 100644 neo/game/BrittleFracture.cpp create mode 100644 neo/game/BrittleFracture.h create mode 100644 neo/game/Camera.cpp create mode 100644 neo/game/Camera.h create mode 100644 neo/game/EndLevel.cpp create mode 100644 neo/game/EndLevel.h create mode 100644 neo/game/Entity.cpp create mode 100644 neo/game/Entity.h create mode 100644 neo/game/Fx.cpp create mode 100644 neo/game/Fx.h create mode 100644 neo/game/Game.def create mode 100644 neo/game/Game.h create mode 100644 neo/game/GameEdit.cpp create mode 100644 neo/game/GameEdit.h create mode 100644 neo/game/Game_local.cpp create mode 100644 neo/game/Game_local.h create mode 100644 neo/game/Game_network.cpp create mode 100644 neo/game/IK.cpp create mode 100644 neo/game/IK.h create mode 100644 neo/game/Item.cpp create mode 100644 neo/game/Item.h create mode 100644 neo/game/Light.cpp create mode 100644 neo/game/Light.h create mode 100644 neo/game/Misc.cpp create mode 100644 neo/game/Misc.h create mode 100644 neo/game/Moveable.cpp create mode 100644 neo/game/Moveable.h create mode 100644 neo/game/Mover.cpp create mode 100644 neo/game/Mover.h create mode 100644 neo/game/MultiplayerGame.cpp create mode 100644 neo/game/MultiplayerGame.h create mode 100644 neo/game/Player.cpp create mode 100644 neo/game/Player.h create mode 100644 neo/game/PlayerIcon.cpp create mode 100644 neo/game/PlayerIcon.h create mode 100644 neo/game/PlayerView.cpp create mode 100644 neo/game/PlayerView.h create mode 100644 neo/game/Projectile.cpp create mode 100644 neo/game/Projectile.h create mode 100644 neo/game/Pvs.cpp create mode 100644 neo/game/Pvs.h create mode 100644 neo/game/SecurityCamera.cpp create mode 100644 neo/game/SecurityCamera.h create mode 100644 neo/game/SmokeParticles.cpp create mode 100644 neo/game/SmokeParticles.h create mode 100644 neo/game/Sound.cpp create mode 100644 neo/game/Sound.h create mode 100644 neo/game/Target.cpp create mode 100644 neo/game/Target.h create mode 100644 neo/game/Trigger.cpp create mode 100644 neo/game/Trigger.h create mode 100644 neo/game/Weapon.cpp create mode 100644 neo/game/Weapon.h create mode 100644 neo/game/WorldSpawn.cpp create mode 100644 neo/game/WorldSpawn.h create mode 100644 neo/game/ai/AAS.cpp create mode 100644 neo/game/ai/AAS.h create mode 100644 neo/game/ai/AAS_debug.cpp create mode 100644 neo/game/ai/AAS_local.h create mode 100644 neo/game/ai/AAS_pathing.cpp create mode 100644 neo/game/ai/AAS_routing.cpp create mode 100644 neo/game/ai/AI.cpp create mode 100644 neo/game/ai/AI.h create mode 100644 neo/game/ai/AI_Vagary.cpp create mode 100644 neo/game/ai/AI_events.cpp create mode 100644 neo/game/ai/AI_pathing.cpp create mode 100644 neo/game/anim/Anim.cpp create mode 100644 neo/game/anim/Anim.h create mode 100644 neo/game/anim/Anim_Blend.cpp create mode 100644 neo/game/anim/Anim_Import.cpp create mode 100644 neo/game/anim/Anim_Testmodel.cpp create mode 100644 neo/game/anim/Anim_Testmodel.h create mode 100644 neo/game/gamesys/Callbacks.cpp create mode 100644 neo/game/gamesys/Class.cpp create mode 100644 neo/game/gamesys/Class.h create mode 100644 neo/game/gamesys/DebugGraph.cpp create mode 100644 neo/game/gamesys/DebugGraph.h create mode 100644 neo/game/gamesys/Event.cpp create mode 100644 neo/game/gamesys/Event.h create mode 100644 neo/game/gamesys/NoGameTypeInfo.h create mode 100644 neo/game/gamesys/SaveGame.cpp create mode 100644 neo/game/gamesys/SaveGame.h create mode 100644 neo/game/gamesys/SysCmds.cpp create mode 100644 neo/game/gamesys/SysCmds.h create mode 100644 neo/game/gamesys/SysCvar.cpp create mode 100644 neo/game/gamesys/SysCvar.h create mode 100644 neo/game/gamesys/TypeInfo.cpp create mode 100644 neo/game/gamesys/TypeInfo.h create mode 100644 neo/game/physics/Clip.cpp create mode 100644 neo/game/physics/Clip.h create mode 100644 neo/game/physics/Force.cpp create mode 100644 neo/game/physics/Force.h create mode 100644 neo/game/physics/Force_Constant.cpp create mode 100644 neo/game/physics/Force_Constant.h create mode 100644 neo/game/physics/Force_Drag.cpp create mode 100644 neo/game/physics/Force_Drag.h create mode 100644 neo/game/physics/Force_Field.cpp create mode 100644 neo/game/physics/Force_Field.h create mode 100644 neo/game/physics/Force_Spring.cpp create mode 100644 neo/game/physics/Force_Spring.h create mode 100644 neo/game/physics/Physics.cpp create mode 100644 neo/game/physics/Physics.h create mode 100644 neo/game/physics/Physics_AF.cpp create mode 100644 neo/game/physics/Physics_AF.h create mode 100644 neo/game/physics/Physics_Actor.cpp create mode 100644 neo/game/physics/Physics_Actor.h create mode 100644 neo/game/physics/Physics_Base.cpp create mode 100644 neo/game/physics/Physics_Base.h create mode 100644 neo/game/physics/Physics_Monster.cpp create mode 100644 neo/game/physics/Physics_Monster.h create mode 100644 neo/game/physics/Physics_Parametric.cpp create mode 100644 neo/game/physics/Physics_Parametric.h create mode 100644 neo/game/physics/Physics_Player.cpp create mode 100644 neo/game/physics/Physics_Player.h create mode 100644 neo/game/physics/Physics_RigidBody.cpp create mode 100644 neo/game/physics/Physics_RigidBody.h create mode 100644 neo/game/physics/Physics_Static.cpp create mode 100644 neo/game/physics/Physics_Static.h create mode 100644 neo/game/physics/Physics_StaticMulti.cpp create mode 100644 neo/game/physics/Physics_StaticMulti.h create mode 100644 neo/game/physics/Push.cpp create mode 100644 neo/game/physics/Push.h create mode 100644 neo/game/script/Script_Compiler.cpp create mode 100644 neo/game/script/Script_Compiler.h create mode 100644 neo/game/script/Script_Interpreter.cpp create mode 100644 neo/game/script/Script_Interpreter.h create mode 100644 neo/game/script/Script_Program.cpp create mode 100644 neo/game/script/Script_Program.h create mode 100644 neo/game/script/Script_Thread.cpp create mode 100644 neo/game/script/Script_Thread.h create mode 100644 neo/idlib.vcxproj create mode 100644 neo/idlib.vcxproj.filters create mode 100644 neo/idlib/Base64.cpp create mode 100644 neo/idlib/Base64.h create mode 100644 neo/idlib/BitMsg.cpp create mode 100644 neo/idlib/BitMsg.h create mode 100644 neo/idlib/CmdArgs.cpp create mode 100644 neo/idlib/CmdArgs.h create mode 100644 neo/idlib/Dict.cpp create mode 100644 neo/idlib/Dict.h create mode 100644 neo/idlib/Heap.cpp create mode 100644 neo/idlib/Heap.h create mode 100644 neo/idlib/LangDict.cpp create mode 100644 neo/idlib/LangDict.h create mode 100644 neo/idlib/Lexer.cpp create mode 100644 neo/idlib/Lexer.h create mode 100644 neo/idlib/Lib.cpp create mode 100644 neo/idlib/Lib.h create mode 100644 neo/idlib/MapFile.cpp create mode 100644 neo/idlib/MapFile.h create mode 100644 neo/idlib/Parser.cpp create mode 100644 neo/idlib/Parser.h create mode 100644 neo/idlib/Str.cpp create mode 100644 neo/idlib/Str.h create mode 100644 neo/idlib/Timer.cpp create mode 100644 neo/idlib/Timer.h create mode 100644 neo/idlib/Token.cpp create mode 100644 neo/idlib/Token.h create mode 100644 neo/idlib/bv/Bounds.cpp create mode 100644 neo/idlib/bv/Bounds.h create mode 100644 neo/idlib/bv/Box.cpp create mode 100644 neo/idlib/bv/Box.h create mode 100644 neo/idlib/bv/Frustum.cpp create mode 100644 neo/idlib/bv/Frustum.h create mode 100644 neo/idlib/bv/Frustum_gcc.cpp create mode 100644 neo/idlib/bv/Sphere.cpp create mode 100644 neo/idlib/bv/Sphere.h create mode 100644 neo/idlib/containers/BTree.h create mode 100644 neo/idlib/containers/BinSearch.h create mode 100644 neo/idlib/containers/HashIndex.cpp create mode 100644 neo/idlib/containers/HashIndex.h create mode 100644 neo/idlib/containers/HashTable.h create mode 100644 neo/idlib/containers/Hierarchy.h create mode 100644 neo/idlib/containers/LinkList.h create mode 100644 neo/idlib/containers/List.h create mode 100644 neo/idlib/containers/PlaneSet.h create mode 100644 neo/idlib/containers/Queue.h create mode 100644 neo/idlib/containers/Stack.h create mode 100644 neo/idlib/containers/StaticList.h create mode 100644 neo/idlib/containers/StrList.h create mode 100644 neo/idlib/containers/StrPool.h create mode 100644 neo/idlib/containers/VectorSet.h create mode 100644 neo/idlib/geometry/DrawVert.cpp create mode 100644 neo/idlib/geometry/DrawVert.h create mode 100644 neo/idlib/geometry/JointTransform.cpp create mode 100644 neo/idlib/geometry/JointTransform.h create mode 100644 neo/idlib/geometry/Surface.cpp create mode 100644 neo/idlib/geometry/Surface.h create mode 100644 neo/idlib/geometry/Surface_Patch.cpp create mode 100644 neo/idlib/geometry/Surface_Patch.h create mode 100644 neo/idlib/geometry/Surface_Polytope.cpp create mode 100644 neo/idlib/geometry/Surface_Polytope.h create mode 100644 neo/idlib/geometry/Surface_SweptSpline.cpp create mode 100644 neo/idlib/geometry/Surface_SweptSpline.h create mode 100644 neo/idlib/geometry/TraceModel.cpp create mode 100644 neo/idlib/geometry/TraceModel.h create mode 100644 neo/idlib/geometry/Winding.cpp create mode 100644 neo/idlib/geometry/Winding.h create mode 100644 neo/idlib/geometry/Winding2D.cpp create mode 100644 neo/idlib/geometry/Winding2D.h create mode 100644 neo/idlib/hashing/CRC32.cpp create mode 100644 neo/idlib/hashing/CRC32.h create mode 100644 neo/idlib/hashing/MD4.cpp create mode 100644 neo/idlib/hashing/MD4.h create mode 100644 neo/idlib/hashing/MD5.cpp create mode 100644 neo/idlib/hashing/MD5.h create mode 100644 neo/idlib/math/Angles.cpp create mode 100644 neo/idlib/math/Angles.h create mode 100644 neo/idlib/math/Complex.cpp create mode 100644 neo/idlib/math/Complex.h create mode 100644 neo/idlib/math/Curve.h create mode 100644 neo/idlib/math/Extrapolate.h create mode 100644 neo/idlib/math/Interpolate.h create mode 100644 neo/idlib/math/Lcp.cpp create mode 100644 neo/idlib/math/Lcp.h create mode 100644 neo/idlib/math/Math.cpp create mode 100644 neo/idlib/math/Math.h create mode 100644 neo/idlib/math/Matrix.cpp create mode 100644 neo/idlib/math/Matrix.h create mode 100644 neo/idlib/math/Ode.cpp create mode 100644 neo/idlib/math/Ode.h create mode 100644 neo/idlib/math/Plane.cpp create mode 100644 neo/idlib/math/Plane.h create mode 100644 neo/idlib/math/Pluecker.cpp create mode 100644 neo/idlib/math/Pluecker.h create mode 100644 neo/idlib/math/Polynomial.cpp create mode 100644 neo/idlib/math/Polynomial.h create mode 100644 neo/idlib/math/Quat.cpp create mode 100644 neo/idlib/math/Quat.h create mode 100644 neo/idlib/math/Random.h create mode 100644 neo/idlib/math/Rotation.cpp create mode 100644 neo/idlib/math/Rotation.h create mode 100644 neo/idlib/math/Simd.cpp create mode 100644 neo/idlib/math/Simd.h create mode 100644 neo/idlib/math/Simd_3DNow.cpp create mode 100644 neo/idlib/math/Simd_3DNow.h create mode 100644 neo/idlib/math/Simd_AltiVec.cpp create mode 100644 neo/idlib/math/Simd_AltiVec.h create mode 100644 neo/idlib/math/Simd_Generic.cpp create mode 100644 neo/idlib/math/Simd_Generic.h create mode 100644 neo/idlib/math/Simd_MMX.cpp create mode 100644 neo/idlib/math/Simd_MMX.h create mode 100644 neo/idlib/math/Simd_SSE.cpp create mode 100644 neo/idlib/math/Simd_SSE.h create mode 100644 neo/idlib/math/Simd_SSE2.cpp create mode 100644 neo/idlib/math/Simd_SSE2.h create mode 100644 neo/idlib/math/Simd_SSE3.cpp create mode 100644 neo/idlib/math/Simd_SSE3.h create mode 100644 neo/idlib/math/Vector.cpp create mode 100644 neo/idlib/math/Vector.h create mode 100644 neo/idlib/precompiled.cpp create mode 100644 neo/idlib/precompiled.h create mode 100644 neo/installdebug.bat create mode 100644 neo/installrelease.bat create mode 100644 neo/openal/docs/ChangeLog create mode 100644 neo/openal/docs/Makefile create mode 100644 neo/openal/docs/alc-context.sgml create mode 100644 neo/openal/docs/api-reference.html create mode 100644 neo/openal/docs/app-annotations.sgml create mode 100644 neo/openal/docs/app-constants.sgml create mode 100644 neo/openal/docs/app-extensionprocess.sgml create mode 100644 neo/openal/docs/app-extensions.sgml create mode 100644 neo/openal/docs/architecture.html create mode 100644 neo/openal/docs/chp-buffers.sgml create mode 100644 neo/openal/docs/chp-introduction.sgml create mode 100644 neo/openal/docs/chp-multichannel.sgml create mode 100644 neo/openal/docs/chp-operation.sgml create mode 100644 neo/openal/docs/chp-queueing.sgml create mode 100644 neo/openal/docs/chp-rendering.sgml create mode 100644 neo/openal/docs/chp-state.sgml create mode 100644 neo/openal/docs/ent-examples.sgml create mode 100644 neo/openal/docs/ent-extensions.sgml create mode 100644 neo/openal/docs/ent-marks-annotated.sgml create mode 100644 neo/openal/docs/ent-marks-full.sgml create mode 100644 neo/openal/docs/ent-marks-reference.sgml create mode 100644 neo/openal/docs/ent-marks-specification.sgml create mode 100644 neo/openal/docs/ent-names.sgml create mode 100644 neo/openal/docs/index.html create mode 100644 neo/openal/docs/oalspecs.sgml create mode 100644 neo/openal/docs/sec-bookinfo.sgml create mode 100644 neo/openal/docs/specification.html create mode 100644 neo/openal/docs/white-paper.html create mode 100644 neo/openal/idal.cpp create mode 100644 neo/openal/idal.h create mode 100644 neo/openal/idal.py create mode 100644 neo/openal/include/al.h create mode 100644 neo/openal/include/alc.h create mode 100644 neo/openal/include/alctypes.h create mode 100644 neo/openal/include/altypes.h create mode 100644 neo/openal/include/alu.h create mode 100644 neo/openal/include/eax2.h create mode 100644 neo/openal/include/eax3.h create mode 100644 neo/openal/include/eax4.h create mode 100644 neo/openal/include/eax5.h create mode 100644 neo/openal/include/eaxac3.h create mode 100644 neo/openal/include/eaxman.h create mode 100644 neo/openal/include/efxlib.h create mode 100644 neo/openal/lib/eaxguid.lib create mode 100644 neo/openal/lib/openal32.lib create mode 100644 neo/openal/osx/OpenAL.framework/Headers create mode 100644 neo/openal/osx/OpenAL.framework/OpenAL create mode 100644 neo/openal/osx/OpenAL.framework/Resources create mode 100644 neo/openal/osx/OpenAL.framework/Versions/A/Headers/al.h create mode 100644 neo/openal/osx/OpenAL.framework/Versions/A/Headers/alc.h create mode 100644 neo/openal/osx/OpenAL.framework/Versions/A/Headers/alctypes.h create mode 100644 neo/openal/osx/OpenAL.framework/Versions/A/Headers/altypes.h create mode 100644 neo/openal/osx/OpenAL.framework/Versions/A/Headers/alut.h create mode 100644 neo/openal/osx/OpenAL.framework/Versions/A/OpenAL create mode 100644 neo/openal/osx/OpenAL.framework/Versions/A/Resources/English.lproj/InfoPlist.strings create mode 100644 neo/openal/osx/OpenAL.framework/Versions/A/Resources/Info.plist create mode 100644 neo/openal/osx/OpenAL.framework/Versions/A/Resources/READ_ME create mode 100644 neo/openal/osx/OpenAL.framework/Versions/A/Resources/pbdevelopment.plist create mode 100644 neo/openal/osx/OpenAL.framework/Versions/Current create mode 100644 neo/openal/stubs.cpp create mode 100644 neo/renderer/Cinematic.cpp create mode 100644 neo/renderer/Cinematic.h create mode 100644 neo/renderer/GuiModel.cpp create mode 100644 neo/renderer/GuiModel.h create mode 100644 neo/renderer/Image.h create mode 100644 neo/renderer/Image_files.cpp create mode 100644 neo/renderer/Image_init.cpp create mode 100644 neo/renderer/Image_load.cpp create mode 100644 neo/renderer/Image_process.cpp create mode 100644 neo/renderer/Image_program.cpp create mode 100644 neo/renderer/Interaction.cpp create mode 100644 neo/renderer/Interaction.h create mode 100644 neo/renderer/Material.cpp create mode 100644 neo/renderer/Material.h create mode 100644 neo/renderer/MegaTexture.cpp create mode 100644 neo/renderer/MegaTexture.h create mode 100644 neo/renderer/Model.cpp create mode 100644 neo/renderer/Model.h create mode 100644 neo/renderer/ModelDecal.cpp create mode 100644 neo/renderer/ModelDecal.h create mode 100644 neo/renderer/ModelManager.cpp create mode 100644 neo/renderer/ModelManager.h create mode 100644 neo/renderer/ModelOverlay.cpp create mode 100644 neo/renderer/ModelOverlay.h create mode 100644 neo/renderer/Model_ase.cpp create mode 100644 neo/renderer/Model_ase.h create mode 100644 neo/renderer/Model_beam.cpp create mode 100644 neo/renderer/Model_liquid.cpp create mode 100644 neo/renderer/Model_local.h create mode 100644 neo/renderer/Model_lwo.cpp create mode 100644 neo/renderer/Model_lwo.h create mode 100644 neo/renderer/Model_ma.cpp create mode 100644 neo/renderer/Model_ma.h create mode 100644 neo/renderer/Model_md3.cpp create mode 100644 neo/renderer/Model_md3.h create mode 100644 neo/renderer/Model_md5.cpp create mode 100644 neo/renderer/Model_prt.cpp create mode 100644 neo/renderer/Model_sprite.cpp create mode 100644 neo/renderer/RenderEntity.cpp create mode 100644 neo/renderer/RenderSystem.cpp create mode 100644 neo/renderer/RenderSystem.h create mode 100644 neo/renderer/RenderSystem_init.cpp create mode 100644 neo/renderer/RenderWorld.cpp create mode 100644 neo/renderer/RenderWorld.h create mode 100644 neo/renderer/RenderWorld_demo.cpp create mode 100644 neo/renderer/RenderWorld_load.cpp create mode 100644 neo/renderer/RenderWorld_local.h create mode 100644 neo/renderer/RenderWorld_portals.cpp create mode 100644 neo/renderer/VertexCache.cpp create mode 100644 neo/renderer/VertexCache.h create mode 100644 neo/renderer/cg_explicit.cpp create mode 100644 neo/renderer/cg_explicit.h create mode 100644 neo/renderer/draw_arb.cpp create mode 100644 neo/renderer/draw_arb2.cpp create mode 100644 neo/renderer/draw_common.cpp create mode 100644 neo/renderer/draw_exp.cpp create mode 100644 neo/renderer/draw_exp_stub.cpp create mode 100644 neo/renderer/draw_nv10.cpp create mode 100644 neo/renderer/draw_nv20.cpp create mode 100644 neo/renderer/draw_r200.cpp create mode 100644 neo/renderer/glext.h create mode 100644 neo/renderer/jpeg-6/jcapimin.c create mode 100644 neo/renderer/jpeg-6/jcapistd.c create mode 100644 neo/renderer/jpeg-6/jccoefct.c create mode 100644 neo/renderer/jpeg-6/jccolor.c create mode 100644 neo/renderer/jpeg-6/jcdctmgr.c create mode 100644 neo/renderer/jpeg-6/jchuff.c create mode 100644 neo/renderer/jpeg-6/jchuff.h create mode 100644 neo/renderer/jpeg-6/jcinit.c create mode 100644 neo/renderer/jpeg-6/jcmainct.c create mode 100644 neo/renderer/jpeg-6/jcmarker.c create mode 100644 neo/renderer/jpeg-6/jcmaster.c create mode 100644 neo/renderer/jpeg-6/jcomapi.c create mode 100644 neo/renderer/jpeg-6/jconfig.h create mode 100644 neo/renderer/jpeg-6/jcparam.c create mode 100644 neo/renderer/jpeg-6/jcphuff.c create mode 100644 neo/renderer/jpeg-6/jcprepct.c create mode 100644 neo/renderer/jpeg-6/jcsample.c create mode 100644 neo/renderer/jpeg-6/jctrans.c create mode 100644 neo/renderer/jpeg-6/jdapimin.c create mode 100644 neo/renderer/jpeg-6/jdapistd.c create mode 100644 neo/renderer/jpeg-6/jdatadst.c create mode 100644 neo/renderer/jpeg-6/jdatasrc.c create mode 100644 neo/renderer/jpeg-6/jdcoefct.c create mode 100644 neo/renderer/jpeg-6/jdcolor.c create mode 100644 neo/renderer/jpeg-6/jdct.h create mode 100644 neo/renderer/jpeg-6/jddctmgr.c create mode 100644 neo/renderer/jpeg-6/jdhuff.c create mode 100644 neo/renderer/jpeg-6/jdhuff.h create mode 100644 neo/renderer/jpeg-6/jdinput.c create mode 100644 neo/renderer/jpeg-6/jdmainct.c create mode 100644 neo/renderer/jpeg-6/jdmarker.c create mode 100644 neo/renderer/jpeg-6/jdmaster.c create mode 100644 neo/renderer/jpeg-6/jdmerge.c create mode 100644 neo/renderer/jpeg-6/jdphuff.c create mode 100644 neo/renderer/jpeg-6/jdpostct.c create mode 100644 neo/renderer/jpeg-6/jdsample.c create mode 100644 neo/renderer/jpeg-6/jdtrans.c create mode 100644 neo/renderer/jpeg-6/jerror.c create mode 100644 neo/renderer/jpeg-6/jerror.h create mode 100644 neo/renderer/jpeg-6/jfdctflt.c create mode 100644 neo/renderer/jpeg-6/jfdctfst.c create mode 100644 neo/renderer/jpeg-6/jfdctint.c create mode 100644 neo/renderer/jpeg-6/jidctflt.c create mode 100644 neo/renderer/jpeg-6/jidctfst.c create mode 100644 neo/renderer/jpeg-6/jidctint.c create mode 100644 neo/renderer/jpeg-6/jidctred.c create mode 100644 neo/renderer/jpeg-6/jinclude.h create mode 100644 neo/renderer/jpeg-6/jload.c create mode 100644 neo/renderer/jpeg-6/jmemansi.c create mode 100644 neo/renderer/jpeg-6/jmemdos.c create mode 100644 neo/renderer/jpeg-6/jmemmgr.c create mode 100644 neo/renderer/jpeg-6/jmemname.c create mode 100644 neo/renderer/jpeg-6/jmemnobs.c create mode 100644 neo/renderer/jpeg-6/jmemsys.h create mode 100644 neo/renderer/jpeg-6/jmorecfg.h create mode 100644 neo/renderer/jpeg-6/jpegint.h create mode 100644 neo/renderer/jpeg-6/jpeglib.h create mode 100644 neo/renderer/jpeg-6/jpegtran.c create mode 100644 neo/renderer/jpeg-6/jquant1.c create mode 100644 neo/renderer/jpeg-6/jquant2.c create mode 100644 neo/renderer/jpeg-6/jutils.c create mode 100644 neo/renderer/jpeg-6/jversion.h create mode 100644 neo/renderer/qgl.h create mode 100644 neo/renderer/qgl_linked.h create mode 100644 neo/renderer/simplex.h create mode 100644 neo/renderer/tr_backend.cpp create mode 100644 neo/renderer/tr_deform.cpp create mode 100644 neo/renderer/tr_font.cpp create mode 100644 neo/renderer/tr_guisurf.cpp create mode 100644 neo/renderer/tr_light.cpp create mode 100644 neo/renderer/tr_lightrun.cpp create mode 100644 neo/renderer/tr_local.h create mode 100644 neo/renderer/tr_main.cpp create mode 100644 neo/renderer/tr_orderIndexes.cpp create mode 100644 neo/renderer/tr_polytope.cpp create mode 100644 neo/renderer/tr_render.cpp create mode 100644 neo/renderer/tr_rendertools.cpp create mode 100644 neo/renderer/tr_shadowbounds.cpp create mode 100644 neo/renderer/tr_stencilshadow.cpp create mode 100644 neo/renderer/tr_subview.cpp create mode 100644 neo/renderer/tr_trace.cpp create mode 100644 neo/renderer/tr_trisurf.cpp create mode 100644 neo/renderer/tr_turboshadow.cpp create mode 100644 neo/renderer/wglext.h create mode 100644 neo/run.bat create mode 100644 neo/runrelease.bat create mode 100644 neo/sound/OggVorbis/ogg/AUTHORS create mode 100644 neo/sound/OggVorbis/ogg/COPYING create mode 100644 neo/sound/OggVorbis/ogg/README create mode 100644 neo/sound/OggVorbis/ogg/config_types.h.in create mode 100644 neo/sound/OggVorbis/ogg/ogg.h create mode 100644 neo/sound/OggVorbis/ogg/os_types.h create mode 100644 neo/sound/OggVorbis/oggsrc/bitwise.c create mode 100644 neo/sound/OggVorbis/oggsrc/framing.c create mode 100644 neo/sound/OggVorbis/version.txt create mode 100644 neo/sound/OggVorbis/vorbis/AUTHORS create mode 100644 neo/sound/OggVorbis/vorbis/COPYING create mode 100644 neo/sound/OggVorbis/vorbis/README create mode 100644 neo/sound/OggVorbis/vorbis/codec.h create mode 100644 neo/sound/OggVorbis/vorbis/vorbisenc.h create mode 100644 neo/sound/OggVorbis/vorbis/vorbisfile.h create mode 100644 neo/sound/OggVorbis/vorbissrc/analysis.c create mode 100644 neo/sound/OggVorbis/vorbissrc/backends.h create mode 100644 neo/sound/OggVorbis/vorbissrc/barkmel.c create mode 100644 neo/sound/OggVorbis/vorbissrc/bitrate.c create mode 100644 neo/sound/OggVorbis/vorbissrc/bitrate.h create mode 100644 neo/sound/OggVorbis/vorbissrc/block.c create mode 100644 neo/sound/OggVorbis/vorbissrc/books/coupled/res_books_stereo.h create mode 100644 neo/sound/OggVorbis/vorbissrc/books/floor/floor_books.h create mode 100644 neo/sound/OggVorbis/vorbissrc/books/uncoupled/res_books_uncoupled.h create mode 100644 neo/sound/OggVorbis/vorbissrc/codebook.c create mode 100644 neo/sound/OggVorbis/vorbissrc/codebook.h create mode 100644 neo/sound/OggVorbis/vorbissrc/codec_internal.h create mode 100644 neo/sound/OggVorbis/vorbissrc/envelope.c create mode 100644 neo/sound/OggVorbis/vorbissrc/envelope.h create mode 100644 neo/sound/OggVorbis/vorbissrc/floor0.c create mode 100644 neo/sound/OggVorbis/vorbissrc/floor1.c create mode 100644 neo/sound/OggVorbis/vorbissrc/highlevel.h create mode 100644 neo/sound/OggVorbis/vorbissrc/info.c create mode 100644 neo/sound/OggVorbis/vorbissrc/lookup.c create mode 100644 neo/sound/OggVorbis/vorbissrc/lookup.h create mode 100644 neo/sound/OggVorbis/vorbissrc/lookup_data.h create mode 100644 neo/sound/OggVorbis/vorbissrc/lookups.pl create mode 100644 neo/sound/OggVorbis/vorbissrc/lpc.c create mode 100644 neo/sound/OggVorbis/vorbissrc/lpc.h create mode 100644 neo/sound/OggVorbis/vorbissrc/lsp.c create mode 100644 neo/sound/OggVorbis/vorbissrc/lsp.h create mode 100644 neo/sound/OggVorbis/vorbissrc/mapping0.c create mode 100644 neo/sound/OggVorbis/vorbissrc/masking.h create mode 100644 neo/sound/OggVorbis/vorbissrc/mdct.c create mode 100644 neo/sound/OggVorbis/vorbissrc/mdct.h create mode 100644 neo/sound/OggVorbis/vorbissrc/misc.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/floor_all.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/psych_11.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/psych_16.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/psych_44.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/psych_8.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/residue_16.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/residue_44.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/residue_44u.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/residue_8.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/setup_11.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/setup_16.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/setup_22.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/setup_32.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/setup_44.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/setup_44u.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/setup_8.h create mode 100644 neo/sound/OggVorbis/vorbissrc/modes/setup_X.h create mode 100644 neo/sound/OggVorbis/vorbissrc/os.h create mode 100644 neo/sound/OggVorbis/vorbissrc/psy.c create mode 100644 neo/sound/OggVorbis/vorbissrc/psy.h create mode 100644 neo/sound/OggVorbis/vorbissrc/psytune.c create mode 100644 neo/sound/OggVorbis/vorbissrc/registry.c create mode 100644 neo/sound/OggVorbis/vorbissrc/registry.h create mode 100644 neo/sound/OggVorbis/vorbissrc/res0.c create mode 100644 neo/sound/OggVorbis/vorbissrc/scales.h create mode 100644 neo/sound/OggVorbis/vorbissrc/sharedbook.c create mode 100644 neo/sound/OggVorbis/vorbissrc/smallft.c create mode 100644 neo/sound/OggVorbis/vorbissrc/smallft.h create mode 100644 neo/sound/OggVorbis/vorbissrc/synthesis.c create mode 100644 neo/sound/OggVorbis/vorbissrc/tone.c create mode 100644 neo/sound/OggVorbis/vorbissrc/vorbisenc.c create mode 100644 neo/sound/OggVorbis/vorbissrc/vorbisfile.c create mode 100644 neo/sound/OggVorbis/vorbissrc/window.h create mode 100644 neo/sound/OggVorbis/vorbissrc/windowvb.c create mode 100644 neo/sound/snd_cache.cpp create mode 100644 neo/sound/snd_decoder.cpp create mode 100644 neo/sound/snd_efxfile.cpp create mode 100644 neo/sound/snd_emitter.cpp create mode 100644 neo/sound/snd_local.h create mode 100644 neo/sound/snd_shader.cpp create mode 100644 neo/sound/snd_system.cpp create mode 100644 neo/sound/snd_wavefile.cpp create mode 100644 neo/sound/snd_world.cpp create mode 100644 neo/sound/sound.h create mode 100644 neo/sys/gllog/gl.api create mode 100644 neo/sys/gllog/glX.api create mode 100644 neo/sys/gllog/gl_def.m4 create mode 100644 neo/sys/gllog/gl_extensions.cpp.m4 create mode 100644 neo/sys/gllog/logfunc.py create mode 100644 neo/sys/gllog/read.py create mode 100644 neo/sys/gllog/wgl.api create mode 100644 neo/sys/linux/SDK-1.3.list.txt create mode 100644 neo/sys/linux/SDK.list.txt create mode 100644 neo/sys/linux/casedir.patch create mode 100644 neo/sys/linux/dedicated.cpp create mode 100644 neo/sys/linux/glimp.cpp create mode 100644 neo/sys/linux/glimp_dlopen.cpp.m4 create mode 100644 neo/sys/linux/glimp_glenum.h create mode 100644 neo/sys/linux/glimp_local.h.m4 create mode 100644 neo/sys/linux/glimp_logging.cpp.m4 create mode 100644 neo/sys/linux/glimp_stub.cpp.m4 create mode 100644 neo/sys/linux/input.cpp create mode 100644 neo/sys/linux/libXNVCtrl/NV-CONTROL-API.txt create mode 100644 neo/sys/linux/libXNVCtrl/NVCtrl.c create mode 100644 neo/sys/linux/libXNVCtrl/NVCtrl.h create mode 100644 neo/sys/linux/libXNVCtrl/NVCtrlLib.h create mode 100644 neo/sys/linux/libXNVCtrl/extutil.h create mode 100644 neo/sys/linux/libXNVCtrl/nv_control.h create mode 100644 neo/sys/linux/local.h create mode 100644 neo/sys/linux/main.cpp create mode 100644 neo/sys/linux/oss/include/audio_core.h create mode 100644 neo/sys/linux/oss/include/midi_core.h create mode 100644 neo/sys/linux/oss/include/mixer_core.h create mode 100644 neo/sys/linux/oss/include/sys/soundcard.h create mode 100644 neo/sys/linux/oss/include/sys/ultrasound.h create mode 100644 neo/sys/linux/pk4/id_utils.py create mode 100644 neo/sys/linux/pk4/packup-nocase.sh create mode 100644 neo/sys/linux/pk4/packup.sh create mode 100644 neo/sys/linux/pk4/syncfromlist.sh create mode 100644 neo/sys/linux/pk4/updatepaks.sh create mode 100644 neo/sys/linux/process.py create mode 100644 neo/sys/linux/process_undef.pl create mode 100644 neo/sys/linux/qgl_enforce.h create mode 100644 neo/sys/linux/qgl_enforce.h.m4 create mode 100644 neo/sys/linux/runner/runner.tac create mode 100644 neo/sys/linux/runner/runner_lib.py create mode 100644 neo/sys/linux/setup/binary.conf create mode 100644 neo/sys/linux/setup/brandelf.c create mode 100644 neo/sys/linux/setup/image-base/setup.data/bin/Linux/x86/glibc-2.1/setup.gtk create mode 100644 neo/sys/linux/setup/image-base/setup.data/bin/Linux/x86/glibc-2.1/xsu create mode 100644 neo/sys/linux/setup/image-base/setup.data/bin/Linux/x86/setup create mode 100644 neo/sys/linux/setup/image-base/setup.data/config.sh create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/de/LC_MESSAGES/loki-uninstall.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/de/LC_MESSAGES/setup.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/en_UK/LC_MESSAGES/loki-uninstall.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/en_UK/LC_MESSAGES/setup.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/es/LC_MESSAGES/loki-uninstall.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/es/LC_MESSAGES/setup.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/fr/LC_MESSAGES/loki-uninstall.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/fr/LC_MESSAGES/setup.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/it/LC_MESSAGES/loki-uninstall.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/it/LC_MESSAGES/setup.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/nl/LC_MESSAGES/loki-uninstall.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/nl/LC_MESSAGES/setup.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/ru/LC_MESSAGES/loki-uninstall.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/ru/LC_MESSAGES/setup.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/sv/LC_MESSAGES/loki-uninstall.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/locale/sv/LC_MESSAGES/setup.mo create mode 100644 neo/sys/linux/setup/image-base/setup.data/setup.glade create mode 100644 neo/sys/linux/setup/image-base/setup.sh create mode 100644 neo/sys/linux/setup/image-demo/License.txt create mode 100644 neo/sys/linux/setup/image-demo/README create mode 100644 neo/sys/linux/setup/image-demo/bin/Linux/x86/doom3-demo create mode 100644 neo/sys/linux/setup/image-demo/setup.data/postinstall.sh create mode 100644 neo/sys/linux/setup/image-demo/setup.data/setup.xml.in create mode 100644 neo/sys/linux/setup/image-sdk/License.SDK.txt create mode 100644 neo/sys/linux/setup/image-sdk/README.SDK.txt create mode 100644 neo/sys/linux/setup/image-sdk/setup.data/config.sh create mode 100644 neo/sys/linux/setup/image-sdk/setup.data/setup.xml.in create mode 100644 neo/sys/linux/setup/image/License.txt create mode 100644 neo/sys/linux/setup/image/README create mode 100644 neo/sys/linux/setup/image/bin/Linux/x86/doom3 create mode 100644 neo/sys/linux/setup/image/bin/Linux/x86/doom3-dedicated create mode 100644 neo/sys/linux/setup/image/doom3.png create mode 100644 neo/sys/linux/setup/image/openurl.sh create mode 100644 neo/sys/linux/setup/image/setup.data/postinstall.sh create mode 100644 neo/sys/linux/setup/image/setup.data/setup.xml.in create mode 100644 neo/sys/linux/setup/loki_setup.patch create mode 100644 neo/sys/linux/setup/lokisetup/loki_setup.tgz create mode 100644 neo/sys/linux/setup/lokisetup/loki_setupdb.tgz create mode 100644 neo/sys/linux/setup/lokisetup/xsu.diff create mode 100644 neo/sys/linux/setup/makeself/COPYING create mode 100644 neo/sys/linux/setup/makeself/README create mode 100644 neo/sys/linux/setup/makeself/TODO create mode 100644 neo/sys/linux/setup/makeself/makeself-header.sh create mode 100644 neo/sys/linux/setup/makeself/makeself.1 create mode 100644 neo/sys/linux/setup/makeself/makeself.lsm create mode 100644 neo/sys/linux/setup/makeself/makeself.sh create mode 100644 neo/sys/linux/setup/makeself/update-readme create mode 100644 neo/sys/linux/sound.cpp create mode 100644 neo/sys/linux/sound.h create mode 100644 neo/sys/linux/sound_alsa.cpp create mode 100644 neo/sys/linux/stack.cpp create mode 100644 neo/sys/linux/test_scheduler.c create mode 100644 neo/sys/osx/DLL.OSX.txt create mode 100644 neo/sys/osx/DOOMController.h create mode 100644 neo/sys/osx/DOOMController.mm create mode 100644 neo/sys/osx/Doom 3.rsrc create mode 100644 neo/sys/osx/Doom3.icns create mode 100644 neo/sys/osx/Doom3.xcodeproj/project.pbxproj create mode 100644 neo/sys/osx/English.lproj/ASLCore.nib/classes.nib create mode 100644 neo/sys/osx/English.lproj/ASLCore.nib/info.nib create mode 100644 neo/sys/osx/English.lproj/ASLCore.nib/objects.xib create mode 100644 neo/sys/osx/English.lproj/InfoPlist.strings create mode 100644 neo/sys/osx/English.lproj/Localizable.strings create mode 100644 neo/sys/osx/English.lproj/MainMenu.nib/classes.nib create mode 100644 neo/sys/osx/English.lproj/MainMenu.nib/info.nib create mode 100644 neo/sys/osx/English.lproj/MainMenu.nib/objects.nib create mode 100644 neo/sys/osx/English.lproj/locversion.plist create mode 100644 neo/sys/osx/French.lproj/ASLCore.nib/classes.nib create mode 100644 neo/sys/osx/French.lproj/ASLCore.nib/info.nib create mode 100644 neo/sys/osx/French.lproj/ASLCore.nib/objects.xib create mode 100644 neo/sys/osx/French.lproj/InfoPlist.strings create mode 100644 neo/sys/osx/French.lproj/Localizable.strings create mode 100644 neo/sys/osx/French.lproj/MainMenu.nib/classes.nib create mode 100644 neo/sys/osx/French.lproj/MainMenu.nib/info.nib create mode 100644 neo/sys/osx/French.lproj/MainMenu.nib/objects.nib create mode 100644 neo/sys/osx/Info.plist create mode 100644 neo/sys/osx/PickMonitor.cpp create mode 100644 neo/sys/osx/PickMonitor.h create mode 100644 neo/sys/osx/PreferencesDialog.cpp create mode 100644 neo/sys/osx/PreferencesDialog.h create mode 100644 neo/sys/osx/SubProjects/curl.xcodeproj/project.pbxproj create mode 100644 neo/sys/osx/d3xp.xcodeproj/project.pbxproj create mode 100644 neo/sys/osx/game.xcodeproj/project.pbxproj create mode 100644 neo/sys/osx/idlib.xcodeproj/project.pbxproj create mode 100644 neo/sys/osx/macosx_common.h create mode 100644 neo/sys/osx/macosx_display.h create mode 100644 neo/sys/osx/macosx_event.mm create mode 100644 neo/sys/osx/macosx_glimp.h create mode 100644 neo/sys/osx/macosx_glimp.mm create mode 100644 neo/sys/osx/macosx_guids.cpp create mode 100644 neo/sys/osx/macosx_local.h create mode 100644 neo/sys/osx/macosx_misc.mm create mode 100644 neo/sys/osx/macosx_sound.cpp create mode 100644 neo/sys/osx/macosx_sys.h create mode 100644 neo/sys/osx/macosx_sys.mm create mode 100644 neo/sys/osx/macosx_timers.h create mode 100644 neo/sys/osx/macosx_utils.mm create mode 100644 neo/sys/osx/misc/ftoi.patch create mode 100644 neo/sys/osx/oggVorbis.xcodeproj/project.pbxproj create mode 100644 neo/sys/osx/showcursor create mode 100644 neo/sys/osx/showcursor.c create mode 100644 neo/sys/osx/version.plist create mode 100644 neo/sys/posix/posix_input.cpp create mode 100644 neo/sys/posix/posix_main.cpp create mode 100644 neo/sys/posix/posix_net.cpp create mode 100644 neo/sys/posix/posix_public.h create mode 100644 neo/sys/posix/posix_signal.cpp create mode 100644 neo/sys/posix/posix_threads.cpp create mode 100644 neo/sys/scons/SConscript.core create mode 100644 neo/sys/scons/SConscript.curl create mode 100644 neo/sys/scons/SConscript.game create mode 100644 neo/sys/scons/SConscript.gl create mode 100644 neo/sys/scons/SConscript.idlib create mode 100644 neo/sys/scons/SDK.py create mode 100644 neo/sys/scons/Setup.py create mode 100644 neo/sys/scons/scons_utils.py create mode 100644 neo/sys/stub/stub_gl.cpp create mode 100644 neo/sys/stub/sys_stub.cpp create mode 100644 neo/sys/stub/util_stub.cpp create mode 100644 neo/sys/sys_local.cpp create mode 100644 neo/sys/sys_local.h create mode 100644 neo/sys/sys_public.h create mode 100644 neo/sys/win32/eax.h create mode 100644 neo/sys/win32/eaxguid.lib create mode 100644 neo/sys/win32/gl_logfuncs.cpp create mode 100644 neo/sys/win32/rc/AFEditor.rc create mode 100644 neo/sys/win32/rc/AFEditor_resource.h create mode 100644 neo/sys/win32/rc/Common.rc create mode 100644 neo/sys/win32/rc/Common_resource.h create mode 100644 neo/sys/win32/rc/CreateResourceIDs.cpp create mode 100644 neo/sys/win32/rc/CreateResourceIDs.h create mode 100644 neo/sys/win32/rc/Debugger.rc create mode 100644 neo/sys/win32/rc/Debugger_resource.h create mode 100644 neo/sys/win32/rc/DeclEditor.rc create mode 100644 neo/sys/win32/rc/DeclEditor_resource.h create mode 100644 neo/sys/win32/rc/GuiEd.rc create mode 100644 neo/sys/win32/rc/GuiEd_resource.h create mode 100644 neo/sys/win32/rc/MaterialEditor.rc create mode 100644 neo/sys/win32/rc/MaterialEditor_Resource.h create mode 100644 neo/sys/win32/rc/PDAEditor.rc create mode 100644 neo/sys/win32/rc/PDAEditor_resource.h create mode 100644 neo/sys/win32/rc/ParticleEditor.rc create mode 100644 neo/sys/win32/rc/ParticleEditor_resource.h create mode 100644 neo/sys/win32/rc/PropTree.rc create mode 100644 neo/sys/win32/rc/PropTree_resource.h create mode 100644 neo/sys/win32/rc/Radiant.rc create mode 100644 neo/sys/win32/rc/Radiant_resource.h create mode 100644 neo/sys/win32/rc/ScriptEditor.rc create mode 100644 neo/sys/win32/rc/ScriptEditor_resource.h create mode 100644 neo/sys/win32/rc/SoundEditor.rc create mode 100644 neo/sys/win32/rc/SoundEditor_resource.h create mode 100644 neo/sys/win32/rc/doom.rc create mode 100644 neo/sys/win32/rc/doom_resource.h create mode 100644 neo/sys/win32/rc/res/BEVEL.BMP create mode 100644 neo/sys/win32/rc/res/BITMAP2.BMP create mode 100644 neo/sys/win32/rc/res/BMP00001.BMP create mode 100644 neo/sys/win32/rc/res/BMP0002.BMP create mode 100644 neo/sys/win32/rc/res/DEFTEX.WAL create mode 100644 neo/sys/win32/rc/res/ENDCAP.BMP create mode 100644 neo/sys/win32/rc/res/GetString.htm create mode 100644 neo/sys/win32/rc/res/IBEVEL.BMP create mode 100644 neo/sys/win32/rc/res/IENDCAP.BMP create mode 100644 neo/sys/win32/rc/res/MEFileToolbar.bmp create mode 100644 neo/sys/win32/rc/res/MEtoolbar.bmp create mode 100644 neo/sys/win32/rc/res/MaterialEditor.ico create mode 100644 neo/sys/win32/rc/res/PropTree.rc2 create mode 100644 neo/sys/win32/rc/res/Q.BMP create mode 100644 neo/sys/win32/rc/res/RADIANT3.GIF create mode 100644 neo/sys/win32/rc/res/Radiant.ico create mode 100644 neo/sys/win32/rc/res/RadiantDoc.ico create mode 100644 neo/sys/win32/rc/res/TOOLBAR1.BMP create mode 100644 neo/sys/win32/rc/res/TOOLBAR2.BMP create mode 100644 neo/sys/win32/rc/res/Toolbar.bmp create mode 100644 neo/sys/win32/rc/res/VIEWDEFA.BMP create mode 100644 neo/sys/win32/rc/res/VIEWOPPO.BMP create mode 100644 neo/sys/win32/rc/res/bmp00002.bmp create mode 100644 neo/sys/win32/rc/res/bmp00003.bmp create mode 100644 neo/sys/win32/rc/res/bmp00004.bmp create mode 100644 neo/sys/win32/rc/res/bmp00005.bmp create mode 100644 neo/sys/win32/rc/res/cchsb.bmp create mode 100644 neo/sys/win32/rc/res/ccrgb.bmp create mode 100644 neo/sys/win32/rc/res/dbg_back.bmp create mode 100644 neo/sys/win32/rc/res/dbg_breakpoint.ico create mode 100644 neo/sys/win32/rc/res/dbg_current.ico create mode 100644 neo/sys/win32/rc/res/dbg_currentline.ico create mode 100644 neo/sys/win32/rc/res/dbg_empty.ico create mode 100644 neo/sys/win32/rc/res/dbg_open.bmp create mode 100644 neo/sys/win32/rc/res/dbg_toolbar.bmp create mode 100644 neo/sys/win32/rc/res/doom.ico create mode 100644 neo/sys/win32/rc/res/fpoint.cur create mode 100644 neo/sys/win32/rc/res/fxed_link.ico create mode 100644 neo/sys/win32/rc/res/fxed_toolbar.bmp create mode 100644 neo/sys/win32/rc/res/fxeditor.ico create mode 100644 neo/sys/win32/rc/res/guied.ico create mode 100644 neo/sys/win32/rc/res/guied_collapse.ico create mode 100644 neo/sys/win32/rc/res/guied_expand.ico create mode 100644 neo/sys/win32/rc/res/guied_hand.cur create mode 100644 neo/sys/win32/rc/res/guied_nav_visible.ico create mode 100644 neo/sys/win32/rc/res/guied_nav_visibledisabled.ico create mode 100644 neo/sys/win32/rc/res/guied_scripts.ico create mode 100644 neo/sys/win32/rc/res/guied_scripts_white.ico create mode 100644 neo/sys/win32/rc/res/guied_viewer_toolbar.bmp create mode 100644 neo/sys/win32/rc/res/icon2.ico create mode 100644 neo/sys/win32/rc/res/logo_sm3dfx.bmp create mode 100644 neo/sys/win32/rc/res/matedtree.bmp create mode 100644 neo/sys/win32/rc/res/me_disabled_icon.ico create mode 100644 neo/sys/win32/rc/res/me_enabled.ico create mode 100644 neo/sys/win32/rc/res/me_off_icon.ico create mode 100644 neo/sys/win32/rc/res/me_on_icon.ico create mode 100644 neo/sys/win32/rc/res/qe3.ico create mode 100644 neo/sys/win32/rc/res/shaderbar.bmp create mode 100644 neo/sys/win32/rc/res/shaderdoc.ico create mode 100644 neo/sys/win32/rc/res/shaderframe.ico create mode 100644 neo/sys/win32/rc/res/spliter.cur create mode 100644 neo/sys/win32/sdk/D3SDK.nsi create mode 100644 neo/sys/win32/sdk/prepare.py create mode 100644 neo/sys/win32/sdk/source.list create mode 100644 neo/sys/win32/win_cpu.cpp create mode 100644 neo/sys/win32/win_gamma.cpp create mode 100644 neo/sys/win32/win_glimp.cpp create mode 100644 neo/sys/win32/win_input.cpp create mode 100644 neo/sys/win32/win_local.h create mode 100644 neo/sys/win32/win_main.cpp create mode 100644 neo/sys/win32/win_net.cpp create mode 100644 neo/sys/win32/win_qgl.cpp create mode 100644 neo/sys/win32/win_shared.cpp create mode 100644 neo/sys/win32/win_snd.cpp create mode 100644 neo/sys/win32/win_syscon.cpp create mode 100644 neo/sys/win32/win_taskkeyhook.cpp create mode 100644 neo/sys/win32/win_wndproc.cpp create mode 100644 neo/tools/Help/MT_help.htm create mode 100644 neo/tools/Help/MVH_Controls.htm create mode 100644 neo/tools/Help/MVH_Issues.htm create mode 100644 neo/tools/Help/MVH_Misc.htm create mode 100644 neo/tools/Help/MVH_Mouse.htm create mode 100644 neo/tools/Help/MVH_Overview.htm create mode 100644 neo/tools/Help/Tools.hhc create mode 100644 neo/tools/Help/Tools.hhk create mode 100644 neo/tools/Help/Tools.hhp create mode 100644 neo/tools/Help/default.htm create mode 100644 neo/tools/Help/images/FirstAnim.png create mode 100644 neo/tools/Help/images/OpenAnim.png create mode 100644 neo/tools/Help/images/OpenMesh.png create mode 100644 neo/tools/Help/images/Play.png create mode 100644 neo/tools/Help/images/PrevAnim.png create mode 100644 neo/tools/Help/images/animloop.png create mode 100644 neo/tools/Help/images/diffuse.png create mode 100644 neo/tools/Help/images/lastanim.png create mode 100644 neo/tools/Help/images/nextanim.png create mode 100644 neo/tools/Help/images/orgoff.png create mode 100644 neo/tools/Help/images/reloadtex.png create mode 100644 neo/tools/Help/images/resetcam.png create mode 100644 neo/tools/Help/images/showbones.png create mode 100644 neo/tools/Help/images/shownorms.png create mode 100644 neo/tools/Help/images/showoverdraw.png create mode 100644 neo/tools/Help/images/showskel.png create mode 100644 neo/tools/Help/images/showsurf.png create mode 100644 neo/tools/Help/images/showtris.png create mode 100644 neo/tools/Help/images/specular.png create mode 100644 neo/tools/Help/images/stop.png create mode 100644 neo/tools/af/DialogAF.cpp create mode 100644 neo/tools/af/DialogAF.h create mode 100644 neo/tools/af/DialogAFBody.cpp create mode 100644 neo/tools/af/DialogAFBody.h create mode 100644 neo/tools/af/DialogAFConstraint.cpp create mode 100644 neo/tools/af/DialogAFConstraint.h create mode 100644 neo/tools/af/DialogAFConstraintBallAndSocket.cpp create mode 100644 neo/tools/af/DialogAFConstraintBallAndSocket.h create mode 100644 neo/tools/af/DialogAFConstraintFixed.cpp create mode 100644 neo/tools/af/DialogAFConstraintFixed.h create mode 100644 neo/tools/af/DialogAFConstraintHinge.cpp create mode 100644 neo/tools/af/DialogAFConstraintHinge.h create mode 100644 neo/tools/af/DialogAFConstraintSlider.cpp create mode 100644 neo/tools/af/DialogAFConstraintSlider.h create mode 100644 neo/tools/af/DialogAFConstraintSpring.cpp create mode 100644 neo/tools/af/DialogAFConstraintSpring.h create mode 100644 neo/tools/af/DialogAFConstraintUniversal.cpp create mode 100644 neo/tools/af/DialogAFConstraintUniversal.h create mode 100644 neo/tools/af/DialogAFName.cpp create mode 100644 neo/tools/af/DialogAFName.h create mode 100644 neo/tools/af/DialogAFProperties.cpp create mode 100644 neo/tools/af/DialogAFProperties.h create mode 100644 neo/tools/af/DialogAFView.cpp create mode 100644 neo/tools/af/DialogAFView.h create mode 100644 neo/tools/comafx/CDIB.cpp create mode 100644 neo/tools/comafx/CDIB.h create mode 100644 neo/tools/comafx/CPathTreeCtrl.cpp create mode 100644 neo/tools/comafx/CPathTreeCtrl.h create mode 100644 neo/tools/comafx/CSyntaxRichEditCtrl.cpp create mode 100644 neo/tools/comafx/CSyntaxRichEditCtrl.h create mode 100644 neo/tools/comafx/DialogColorPicker.cpp create mode 100644 neo/tools/comafx/DialogColorPicker.h create mode 100644 neo/tools/comafx/DialogGoToLine.cpp create mode 100644 neo/tools/comafx/DialogGoToLine.h create mode 100644 neo/tools/comafx/DialogName.cpp create mode 100644 neo/tools/comafx/DialogName.h create mode 100644 neo/tools/comafx/StdAfx.cpp create mode 100644 neo/tools/comafx/StdAfx.h create mode 100644 neo/tools/comafx/VectorCtl.cpp create mode 100644 neo/tools/comafx/VectorCtl.h create mode 100644 neo/tools/comafx/riched20.tlh create mode 100644 neo/tools/common/AlphaPopup.cpp create mode 100644 neo/tools/common/ColorButton.cpp create mode 100644 neo/tools/common/ColorButton.h create mode 100644 neo/tools/common/DialogHelpers.h create mode 100644 neo/tools/common/MaskEdit.cpp create mode 100644 neo/tools/common/MaskEdit.h create mode 100644 neo/tools/common/OpenFileDialog.cpp create mode 100644 neo/tools/common/OpenFileDialog.h create mode 100644 neo/tools/common/PropTree/PropTree.cpp create mode 100644 neo/tools/common/PropTree/PropTree.h create mode 100644 neo/tools/common/PropTree/PropTreeInfo.cpp create mode 100644 neo/tools/common/PropTree/PropTreeInfo.h create mode 100644 neo/tools/common/PropTree/PropTreeItem.cpp create mode 100644 neo/tools/common/PropTree/PropTreeItem.h create mode 100644 neo/tools/common/PropTree/PropTreeItemButton.cpp create mode 100644 neo/tools/common/PropTree/PropTreeItemButton.h create mode 100644 neo/tools/common/PropTree/PropTreeItemCheck.cpp create mode 100644 neo/tools/common/PropTree/PropTreeItemCheck.h create mode 100644 neo/tools/common/PropTree/PropTreeItemColor.cpp create mode 100644 neo/tools/common/PropTree/PropTreeItemColor.h create mode 100644 neo/tools/common/PropTree/PropTreeItemCombo.cpp create mode 100644 neo/tools/common/PropTree/PropTreeItemCombo.h create mode 100644 neo/tools/common/PropTree/PropTreeItemEdit.cpp create mode 100644 neo/tools/common/PropTree/PropTreeItemEdit.h create mode 100644 neo/tools/common/PropTree/PropTreeItemEditButton.cpp create mode 100644 neo/tools/common/PropTree/PropTreeItemEditButton.h create mode 100644 neo/tools/common/PropTree/PropTreeItemFileEdit.cpp create mode 100644 neo/tools/common/PropTree/PropTreeItemFileEdit.h create mode 100644 neo/tools/common/PropTree/PropTreeItemStatic.cpp create mode 100644 neo/tools/common/PropTree/PropTreeItemStatic.h create mode 100644 neo/tools/common/PropTree/PropTreeList.cpp create mode 100644 neo/tools/common/PropTree/PropTreeList.h create mode 100644 neo/tools/common/PropTree/PropTreeView.cpp create mode 100644 neo/tools/common/PropTree/PropTreeView.h create mode 100644 neo/tools/common/PropertyGrid.cpp create mode 100644 neo/tools/common/PropertyGrid.h create mode 100644 neo/tools/common/RegistryOptions.cpp create mode 100644 neo/tools/common/RegistryOptions.h create mode 100644 neo/tools/common/RenderBumpFlatDialog.cpp create mode 100644 neo/tools/common/RenderBumpFlatDialog.h create mode 100644 neo/tools/common/RollupPanel.cpp create mode 100644 neo/tools/common/RollupPanel.h create mode 100644 neo/tools/common/SpinButton.cpp create mode 100644 neo/tools/common/SpinButton.h create mode 100644 neo/tools/compilers/aas/AASBuild.cpp create mode 100644 neo/tools/compilers/aas/AASBuild_file.cpp create mode 100644 neo/tools/compilers/aas/AASBuild_gravity.cpp create mode 100644 neo/tools/compilers/aas/AASBuild_ledge.cpp create mode 100644 neo/tools/compilers/aas/AASBuild_local.h create mode 100644 neo/tools/compilers/aas/AASBuild_merge.cpp create mode 100644 neo/tools/compilers/aas/AASCluster.cpp create mode 100644 neo/tools/compilers/aas/AASCluster.h create mode 100644 neo/tools/compilers/aas/AASFile.cpp create mode 100644 neo/tools/compilers/aas/AASFile.h create mode 100644 neo/tools/compilers/aas/AASFileManager.cpp create mode 100644 neo/tools/compilers/aas/AASFileManager.h create mode 100644 neo/tools/compilers/aas/AASFile_local.h create mode 100644 neo/tools/compilers/aas/AASFile_optimize.cpp create mode 100644 neo/tools/compilers/aas/AASFile_sample.cpp create mode 100644 neo/tools/compilers/aas/AASReach.cpp create mode 100644 neo/tools/compilers/aas/AASReach.h create mode 100644 neo/tools/compilers/aas/Brush.cpp create mode 100644 neo/tools/compilers/aas/Brush.h create mode 100644 neo/tools/compilers/aas/BrushBSP.cpp create mode 100644 neo/tools/compilers/aas/BrushBSP.h create mode 100644 neo/tools/compilers/compiler_public.h create mode 100644 neo/tools/compilers/dmap/dmap.cpp create mode 100644 neo/tools/compilers/dmap/dmap.h create mode 100644 neo/tools/compilers/dmap/facebsp.cpp create mode 100644 neo/tools/compilers/dmap/gldraw.cpp create mode 100644 neo/tools/compilers/dmap/glfile.cpp create mode 100644 neo/tools/compilers/dmap/leakfile.cpp create mode 100644 neo/tools/compilers/dmap/map.cpp create mode 100644 neo/tools/compilers/dmap/optimize.cpp create mode 100644 neo/tools/compilers/dmap/optimize_gcc.cpp create mode 100644 neo/tools/compilers/dmap/output.cpp create mode 100644 neo/tools/compilers/dmap/portals.cpp create mode 100644 neo/tools/compilers/dmap/shadowopt3.cpp create mode 100644 neo/tools/compilers/dmap/tritjunction.cpp create mode 100644 neo/tools/compilers/dmap/tritools.cpp create mode 100644 neo/tools/compilers/dmap/ubrush.cpp create mode 100644 neo/tools/compilers/dmap/usurface.cpp create mode 100644 neo/tools/compilers/renderbump/renderbump.cpp create mode 100644 neo/tools/compilers/roqvq/NSBitmapImageRep.cpp create mode 100644 neo/tools/compilers/roqvq/codec.cpp create mode 100644 neo/tools/compilers/roqvq/codec.h create mode 100644 neo/tools/compilers/roqvq/gdefs.h create mode 100644 neo/tools/compilers/roqvq/quaddefs.h create mode 100644 neo/tools/compilers/roqvq/roq.cpp create mode 100644 neo/tools/compilers/roqvq/roq.h create mode 100644 neo/tools/compilers/roqvq/roq.m create mode 100644 neo/tools/compilers/roqvq/roqParam.cpp create mode 100644 neo/tools/compilers/roqvq/roqParam.h create mode 100644 neo/tools/debugger/DebuggerApp.cpp create mode 100644 neo/tools/debugger/DebuggerApp.h create mode 100644 neo/tools/debugger/DebuggerBreakpoint.cpp create mode 100644 neo/tools/debugger/DebuggerBreakpoint.h create mode 100644 neo/tools/debugger/DebuggerClient.cpp create mode 100644 neo/tools/debugger/DebuggerClient.h create mode 100644 neo/tools/debugger/DebuggerFindDlg.cpp create mode 100644 neo/tools/debugger/DebuggerFindDlg.h create mode 100644 neo/tools/debugger/DebuggerMessages.h create mode 100644 neo/tools/debugger/DebuggerQuickWatchDlg.cpp create mode 100644 neo/tools/debugger/DebuggerQuickWatchDlg.h create mode 100644 neo/tools/debugger/DebuggerScript.cpp create mode 100644 neo/tools/debugger/DebuggerScript.h create mode 100644 neo/tools/debugger/DebuggerServer.cpp create mode 100644 neo/tools/debugger/DebuggerServer.h create mode 100644 neo/tools/debugger/DebuggerWindow.cpp create mode 100644 neo/tools/debugger/DebuggerWindow.h create mode 100644 neo/tools/debugger/debugger.cpp create mode 100644 neo/tools/decl/DialogDeclBrowser.cpp create mode 100644 neo/tools/decl/DialogDeclBrowser.h create mode 100644 neo/tools/decl/DialogDeclEditor.cpp create mode 100644 neo/tools/decl/DialogDeclEditor.h create mode 100644 neo/tools/decl/DialogDeclNew.cpp create mode 100644 neo/tools/decl/DialogDeclNew.h create mode 100644 neo/tools/decl/DialogEntityDefEditor.cpp create mode 100644 neo/tools/decl/DialogEntityDefEditor.h create mode 100644 neo/tools/edit_public.h create mode 100644 neo/tools/edit_stub.cpp create mode 100644 neo/tools/guied/GEApp.cpp create mode 100644 neo/tools/guied/GEApp.h create mode 100644 neo/tools/guied/GECheckInDlg.cpp create mode 100644 neo/tools/guied/GEDeleteModifier.cpp create mode 100644 neo/tools/guied/GEDeleteModifier.h create mode 100644 neo/tools/guied/GEHideModifier.cpp create mode 100644 neo/tools/guied/GEHideModifier.h create mode 100644 neo/tools/guied/GEInsertModifier.cpp create mode 100644 neo/tools/guied/GEInsertModifier.h create mode 100644 neo/tools/guied/GEItemPropsDlg.cpp create mode 100644 neo/tools/guied/GEItemPropsDlg.h create mode 100644 neo/tools/guied/GEItemScriptsDlg.cpp create mode 100644 neo/tools/guied/GEItemScriptsDlg.h create mode 100644 neo/tools/guied/GEKeyValueModifier.cpp create mode 100644 neo/tools/guied/GEKeyValueModifier.h create mode 100644 neo/tools/guied/GEModifier.cpp create mode 100644 neo/tools/guied/GEModifier.h create mode 100644 neo/tools/guied/GEModifierGroup.cpp create mode 100644 neo/tools/guied/GEModifierGroup.h create mode 100644 neo/tools/guied/GEModifierStack.cpp create mode 100644 neo/tools/guied/GEModifierStack.h create mode 100644 neo/tools/guied/GEMoveModifier.cpp create mode 100644 neo/tools/guied/GEMoveModifier.h create mode 100644 neo/tools/guied/GENavigator.cpp create mode 100644 neo/tools/guied/GENavigator.h create mode 100644 neo/tools/guied/GEOptions.cpp create mode 100644 neo/tools/guied/GEOptions.h create mode 100644 neo/tools/guied/GEOptionsDlg.cpp create mode 100644 neo/tools/guied/GEOptionsDlg.h create mode 100644 neo/tools/guied/GEProperties.cpp create mode 100644 neo/tools/guied/GEProperties.h create mode 100644 neo/tools/guied/GEPropertyPage.cpp create mode 100644 neo/tools/guied/GEPropertyPage.h create mode 100644 neo/tools/guied/GESelectionMgr.cpp create mode 100644 neo/tools/guied/GESelectionMgr.h create mode 100644 neo/tools/guied/GESizeModifier.cpp create mode 100644 neo/tools/guied/GESizeModifier.h create mode 100644 neo/tools/guied/GEStateModifier.cpp create mode 100644 neo/tools/guied/GEStateModifier.h create mode 100644 neo/tools/guied/GEStatusBar.cpp create mode 100644 neo/tools/guied/GEStatusBar.h create mode 100644 neo/tools/guied/GETransformer.cpp create mode 100644 neo/tools/guied/GETransformer.h create mode 100644 neo/tools/guied/GEViewer.cpp create mode 100644 neo/tools/guied/GEViewer.h create mode 100644 neo/tools/guied/GEWindowWrapper.cpp create mode 100644 neo/tools/guied/GEWindowWrapper.h create mode 100644 neo/tools/guied/GEWindowWrapper_stub.cpp create mode 100644 neo/tools/guied/GEWorkspace.cpp create mode 100644 neo/tools/guied/GEWorkspace.h create mode 100644 neo/tools/guied/GEWorkspaceFile.cpp create mode 100644 neo/tools/guied/GEZOrderModifier.cpp create mode 100644 neo/tools/guied/GEZOrderModifier.h create mode 100644 neo/tools/guied/guied.cpp create mode 100644 neo/tools/materialeditor/ConsoleView.cpp create mode 100644 neo/tools/materialeditor/ConsoleView.h create mode 100644 neo/tools/materialeditor/FindDialog.cpp create mode 100644 neo/tools/materialeditor/FindDialog.h create mode 100644 neo/tools/materialeditor/MEMainFrame.cpp create mode 100644 neo/tools/materialeditor/MEMainFrame.h create mode 100644 neo/tools/materialeditor/MEOptions.cpp create mode 100644 neo/tools/materialeditor/MEOptions.h create mode 100644 neo/tools/materialeditor/MaterialDef.cpp create mode 100644 neo/tools/materialeditor/MaterialDef.h create mode 100644 neo/tools/materialeditor/MaterialDoc.cpp create mode 100644 neo/tools/materialeditor/MaterialDoc.h create mode 100644 neo/tools/materialeditor/MaterialDocManager.cpp create mode 100644 neo/tools/materialeditor/MaterialDocManager.h create mode 100644 neo/tools/materialeditor/MaterialEditView.cpp create mode 100644 neo/tools/materialeditor/MaterialEditView.h create mode 100644 neo/tools/materialeditor/MaterialEditor.cpp create mode 100644 neo/tools/materialeditor/MaterialEditor.h create mode 100644 neo/tools/materialeditor/MaterialModifier.cpp create mode 100644 neo/tools/materialeditor/MaterialModifier.h create mode 100644 neo/tools/materialeditor/MaterialPreviewPropView.cpp create mode 100644 neo/tools/materialeditor/MaterialPreviewPropView.h create mode 100644 neo/tools/materialeditor/MaterialPreviewView.cpp create mode 100644 neo/tools/materialeditor/MaterialPreviewView.h create mode 100644 neo/tools/materialeditor/MaterialPropTreeView.cpp create mode 100644 neo/tools/materialeditor/MaterialPropTreeView.h create mode 100644 neo/tools/materialeditor/MaterialTreeView.cpp create mode 100644 neo/tools/materialeditor/MaterialTreeView.h create mode 100644 neo/tools/materialeditor/MaterialView.cpp create mode 100644 neo/tools/materialeditor/MaterialView.h create mode 100644 neo/tools/materialeditor/StageView.cpp create mode 100644 neo/tools/materialeditor/StageView.h create mode 100644 neo/tools/materialeditor/ToggleListView.cpp create mode 100644 neo/tools/materialeditor/ToggleListView.h create mode 100644 neo/tools/particle/DialogParticleEditor.cpp create mode 100644 neo/tools/particle/DialogParticleEditor.h create mode 100644 neo/tools/pda/DialogPDAEditor.cpp create mode 100644 neo/tools/pda/DialogPDAEditor.h create mode 100644 neo/tools/radiant/CSG.CPP create mode 100644 neo/tools/radiant/CamWnd.cpp create mode 100644 neo/tools/radiant/CamWnd.h create mode 100644 neo/tools/radiant/CameraTargetDlg.cpp create mode 100644 neo/tools/radiant/CameraTargetDlg.h create mode 100644 neo/tools/radiant/CapDialog.cpp create mode 100644 neo/tools/radiant/CapDialog.h create mode 100644 neo/tools/radiant/CommandsDlg.cpp create mode 100644 neo/tools/radiant/CommandsDlg.h create mode 100644 neo/tools/radiant/CommentsDlg.cpp create mode 100644 neo/tools/radiant/CommentsDlg.h create mode 100644 neo/tools/radiant/ConsoleDlg.cpp create mode 100644 neo/tools/radiant/ConsoleDlg.h create mode 100644 neo/tools/radiant/CurveDlg.cpp create mode 100644 neo/tools/radiant/CurveDlg.h create mode 100644 neo/tools/radiant/DRAG.CPP create mode 100644 neo/tools/radiant/DialogInfo.cpp create mode 100644 neo/tools/radiant/DialogInfo.h create mode 100644 neo/tools/radiant/DialogTextures.cpp create mode 100644 neo/tools/radiant/DialogTextures.h create mode 100644 neo/tools/radiant/DialogThick.cpp create mode 100644 neo/tools/radiant/DialogThick.h create mode 100644 neo/tools/radiant/DlgCamera.cpp create mode 100644 neo/tools/radiant/DlgCamera.h create mode 100644 neo/tools/radiant/DlgEvent.cpp create mode 100644 neo/tools/radiant/DlgEvent.h create mode 100644 neo/tools/radiant/ECLASS.CPP create mode 100644 neo/tools/radiant/EditViewDlg.cpp create mode 100644 neo/tools/radiant/EditViewDlg.h create mode 100644 neo/tools/radiant/EditorBrush.cpp create mode 100644 neo/tools/radiant/EditorBrush.h create mode 100644 neo/tools/radiant/EditorBrushPrimit.cpp create mode 100644 neo/tools/radiant/EditorEntity.cpp create mode 100644 neo/tools/radiant/EditorEntity.h create mode 100644 neo/tools/radiant/EditorMap.cpp create mode 100644 neo/tools/radiant/EditorMap.h create mode 100644 neo/tools/radiant/EntKeyFindReplace.cpp create mode 100644 neo/tools/radiant/EntKeyFindReplace.h create mode 100644 neo/tools/radiant/EntityDlg.cpp create mode 100644 neo/tools/radiant/EntityDlg.h create mode 100644 neo/tools/radiant/EntityListDlg.cpp create mode 100644 neo/tools/radiant/EntityListDlg.h create mode 100644 neo/tools/radiant/FindTextureDlg.cpp create mode 100644 neo/tools/radiant/FindTextureDlg.h create mode 100644 neo/tools/radiant/GLWidget.cpp create mode 100644 neo/tools/radiant/GLWidget.h create mode 100644 neo/tools/radiant/GetString.cpp create mode 100644 neo/tools/radiant/GetString.h create mode 100644 neo/tools/radiant/InspectorDialog.cpp create mode 100644 neo/tools/radiant/InspectorDialog.h create mode 100644 neo/tools/radiant/LightDlg.cpp create mode 100644 neo/tools/radiant/LightDlg.h create mode 100644 neo/tools/radiant/MRU.CPP create mode 100644 neo/tools/radiant/MRU.H create mode 100644 neo/tools/radiant/MainFrm.cpp create mode 100644 neo/tools/radiant/MainFrm.h create mode 100644 neo/tools/radiant/MapInfo.cpp create mode 100644 neo/tools/radiant/MapInfo.h create mode 100644 neo/tools/radiant/MediaPreviewDlg.cpp create mode 100644 neo/tools/radiant/MediaPreviewDlg.h create mode 100644 neo/tools/radiant/NewProjDlg.cpp create mode 100644 neo/tools/radiant/NewProjDlg.h create mode 100644 neo/tools/radiant/NewTexWnd.cpp create mode 100644 neo/tools/radiant/NewTexWnd.h create mode 100644 neo/tools/radiant/PARSE.CPP create mode 100644 neo/tools/radiant/PARSE.H create mode 100644 neo/tools/radiant/PMESH.CPP create mode 100644 neo/tools/radiant/PMESH.H create mode 100644 neo/tools/radiant/PatchDensityDlg.cpp create mode 100644 neo/tools/radiant/PatchDensityDlg.h create mode 100644 neo/tools/radiant/PatchDialog.cpp create mode 100644 neo/tools/radiant/PatchDialog.h create mode 100644 neo/tools/radiant/PointFile.cpp create mode 100644 neo/tools/radiant/PrefsDlg.cpp create mode 100644 neo/tools/radiant/PrefsDlg.h create mode 100644 neo/tools/radiant/PreviewDlg.cpp create mode 100644 neo/tools/radiant/PreviewDlg.h create mode 100644 neo/tools/radiant/PropertyList.cpp create mode 100644 neo/tools/radiant/PropertyList.h create mode 100644 neo/tools/radiant/QE3.CPP create mode 100644 neo/tools/radiant/QE3.H create mode 100644 neo/tools/radiant/QEDEFS.H create mode 100644 neo/tools/radiant/QERTYPES.H create mode 100644 neo/tools/radiant/Radiant.cpp create mode 100644 neo/tools/radiant/Radiant.h create mode 100644 neo/tools/radiant/RotateDlg.cpp create mode 100644 neo/tools/radiant/RotateDlg.h create mode 100644 neo/tools/radiant/SELECT.CPP create mode 100644 neo/tools/radiant/SELECT.H create mode 100644 neo/tools/radiant/ScaleDialog.cpp create mode 100644 neo/tools/radiant/ScaleDialog.h create mode 100644 neo/tools/radiant/SurfaceDlg.cpp create mode 100644 neo/tools/radiant/SurfaceDlg.h create mode 100644 neo/tools/radiant/TabsDlg.cpp create mode 100644 neo/tools/radiant/TabsDlg.h create mode 100644 neo/tools/radiant/TearoffContainerWindow.cpp create mode 100644 neo/tools/radiant/TearoffContainerWindow.h create mode 100644 neo/tools/radiant/TextureBar.cpp create mode 100644 neo/tools/radiant/TextureBar.h create mode 100644 neo/tools/radiant/Textures.h create mode 100644 neo/tools/radiant/Undo.cpp create mode 100644 neo/tools/radiant/Undo.h create mode 100644 neo/tools/radiant/VERTSEL.CPP create mode 100644 neo/tools/radiant/WIN_DLG.CPP create mode 100644 neo/tools/radiant/WIN_QE3.CPP create mode 100644 neo/tools/radiant/WIN_QE3.RC2 create mode 100644 neo/tools/radiant/WaitDlg.cpp create mode 100644 neo/tools/radiant/WaitDlg.h create mode 100644 neo/tools/radiant/WaveOpen.cpp create mode 100644 neo/tools/radiant/WaveOpen.h create mode 100644 neo/tools/radiant/XYWnd.cpp create mode 100644 neo/tools/radiant/XYWnd.h create mode 100644 neo/tools/radiant/Z.CPP create mode 100644 neo/tools/radiant/Z.H create mode 100644 neo/tools/radiant/ZClip.cpp create mode 100644 neo/tools/radiant/ZClip.h create mode 100644 neo/tools/radiant/ZWnd.cpp create mode 100644 neo/tools/radiant/ZWnd.h create mode 100644 neo/tools/radiant/autocaulk.cpp create mode 100644 neo/tools/radiant/autocaulk.h create mode 100644 neo/tools/radiant/cmdlib.cpp create mode 100644 neo/tools/radiant/cmdlib.h create mode 100644 neo/tools/radiant/splines.cpp create mode 100644 neo/tools/radiant/splines.h create mode 100644 neo/tools/script/DialogScriptEditor.cpp create mode 100644 neo/tools/script/DialogScriptEditor.h create mode 100644 neo/tools/sound/DialogSound.cpp create mode 100644 neo/tools/sound/DialogSound.h create mode 100644 neo/tools/sound/DialogSoundGroup.cpp create mode 100644 neo/tools/sound/DialogSoundGroup.h create mode 100644 neo/typeinfo.vcxproj create mode 100644 neo/typeinfo.vcxproj.filters create mode 100644 neo/ui/BindWindow.cpp create mode 100644 neo/ui/BindWindow.h create mode 100644 neo/ui/ChoiceWindow.cpp create mode 100644 neo/ui/ChoiceWindow.h create mode 100644 neo/ui/DeviceContext.cpp create mode 100644 neo/ui/DeviceContext.h create mode 100644 neo/ui/EditWindow.cpp create mode 100644 neo/ui/EditWindow.h create mode 100644 neo/ui/FieldWindow.cpp create mode 100644 neo/ui/FieldWindow.h create mode 100644 neo/ui/GameBearShootWindow.cpp create mode 100644 neo/ui/GameBearShootWindow.h create mode 100644 neo/ui/GameBustOutWindow.cpp create mode 100644 neo/ui/GameBustOutWindow.h create mode 100644 neo/ui/GameSSDWindow.cpp create mode 100644 neo/ui/GameSSDWindow.h create mode 100644 neo/ui/GameWindow.cpp create mode 100644 neo/ui/GameWindow.h create mode 100644 neo/ui/GuiScript.cpp create mode 100644 neo/ui/GuiScript.h create mode 100644 neo/ui/ListGUI.cpp create mode 100644 neo/ui/ListGUI.h create mode 100644 neo/ui/ListGUILocal.h create mode 100644 neo/ui/ListWindow.cpp create mode 100644 neo/ui/ListWindow.h create mode 100644 neo/ui/MarkerWindow.cpp create mode 100644 neo/ui/MarkerWindow.h create mode 100644 neo/ui/Rectangle.h create mode 100644 neo/ui/RegExp.cpp create mode 100644 neo/ui/RegExp.h create mode 100644 neo/ui/RegExp_old.h create mode 100644 neo/ui/RenderWindow.cpp create mode 100644 neo/ui/RenderWindow.h create mode 100644 neo/ui/SimpleWindow.cpp create mode 100644 neo/ui/SimpleWindow.h create mode 100644 neo/ui/SliderWindow.cpp create mode 100644 neo/ui/SliderWindow.h create mode 100644 neo/ui/UserInterface.cpp create mode 100644 neo/ui/UserInterface.h create mode 100644 neo/ui/UserInterfaceLocal.h create mode 100644 neo/ui/Window.cpp create mode 100644 neo/ui/Window.h create mode 100644 neo/ui/Winvar.cpp create mode 100644 neo/ui/Winvar.h diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build diff --git a/COPYING.txt b/COPYING.txt new file mode 100644 index 0000000..c6e7765 --- /dev/null +++ b/COPYING.txt @@ -0,0 +1,643 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + + +ADDITIONAL TERMS APPLICABLE TO THE DOOM 3 GPL SOURCE CODE. + + The following additional terms (“Additional Terms”) supplement and modify the GNU General Public License, Version 3 (“GPL”) applicable to the Doom 3 GPL Source Code (“Doom 3 Source Code”). In addition to the terms and conditions of the GPL, the Doom 3 Source Code is subject to the further restrictions below. + +1. Replacement of Section 15. Section 15 of the GPL shall be deleted in its entirety and replaced with the following: + +“15. Disclaimer of Warranty. + +THE PROGRAM IS PROVIDED WITHOUT ANY WARRANTIES, WHETHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, TITLE AND MERCHANTABILITY. THE PROGRAM IS BEING DELIVERED OR MADE AVAILABLE “AS IS”, “WITH ALL FAULTS” AND WITHOUT WARRANTY OR REPRESENTATION. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.” + +2. Replacement of Section 16. Section 16 of the GPL shall be deleted in its entirety and replaced with the following: + +“16. LIMITATION OF LIABILITY. + +UNDER NO CIRCUMSTANCES SHALL ANY COPYRIGHT HOLDER OR ITS AFFILIATES, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, FOR ANY DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, DIRECT, INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL OR PUNITIVE DAMAGES ARISING FROM, OUT OF OR IN CONNECTION WITH THE USE OR INABILITY TO USE THE PROGRAM OR OTHER DEALINGS WITH THE PROGRAM(INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), WHETHER OR NOT ANY COPYRIGHT HOLDER OR SUCH OTHER PARTY RECEIVES NOTICE OF ANY SUCH DAMAGES AND WHETHER OR NOT SUCH DAMAGES COULD HAVE BEEN FORESEEN.” + +3. LEGAL NOTICES; NO TRADEMARK LICENSE; ORIGIN. You must reproduce faithfully all trademark, copyright and other proprietary and legal notices on any copies of the Program or any other required author attributions. This license does not grant you rights to use any copyright holder or any other party’s name, logo, or trademarks. Neither the name of the copyright holder or its affiliates, or any other party who modifies and/or conveys the Program may be used to endorse or promote products derived from this software without specific prior written permission. The origin of the Program must not be misrepresented; you must not claim that you wrote the original Program. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original Program. + +4. INDEMNIFICATION. IF YOU CONVEY A COVERED WORK AND AGREE WITH ANY RECIPIENT OF THAT COVERED WORK THAT YOU WILL ASSUME ANY LIABILITY FOR THAT COVERED WORK, YOU HEREBY AGREE TO INDEMNIFY, DEFEND AND HOLD HARMLESS THE OTHER LICENSORS AND AUTHORS OF THAT COVERED WORK FOR ANY DAMAEGS, DEMANDS, CLAIMS, LOSSES, CAUSES OF ACTION, LAWSUITS, JUDGMENTS EXPENSES (INCLUDING WITHOUT LIMITATION REASONABLE ATTORNEYS' FEES AND EXPENSES) OR ANY OTHER LIABLITY ARISING FROM, RELATED TO OR IN CONNECTION WITH YOUR ASSUMPTIONS OF LIABILITY. diff --git a/README.txt b/README.txt new file mode 100644 index 0000000..f12fbce --- /dev/null +++ b/README.txt @@ -0,0 +1,435 @@ +Doom 3 GPL source release +========================= + +This file contains the following sections: + +GENERAL NOTES +LICENSE + +GENERAL NOTES +============= + +Game data and patching: +----------------------- + +This source release does not contain any game data, the game data is still +covered by the original EULA and must be obeyed as usual. + +You must patch the game to the latest version. + +Note that Doom 3 and Doom 3: Resurrection of Evil are available from the Steam store at +http://store.steampowered.com/app/9050/ +http://store.steampowered.com/app/9070/ + +Other platforms, updated source code, security issues: +------------------------------------------------------ + +If you have obtained this source code several weeks after the time of release, +it is likely that you can find modified and improved +versions of the engine in various open source projects across the internet. +Depending what is your interest with the source code, those may be a better +starting point. + +Compiling on win32: +------------------- + +A project file for Microsoft Visual Studio 2010 is provided in neo\doom.sln +We expect the solution file is compatible with the Express releases + +You will need the Microsoft DirectX SDK installed as well. +If it does not reside in "C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)" +you will need to update the project files accordingly. + +Compiling on GNU/Linux x86: +--------------------------- + +The build system on GNU/Linux is based on SCons: http://www.scons.org/ +Issue the scons command in the neo/ folder. + +Compiling on MacOS X: +--------------------------- + +XCode 3.2 project is under neo/sys/osx/ + +Back End Rendering of Stencil Shadows: +-------------------------------------- + +The Doom 3 GPL source code release does not include functionality enabling rendering +of stencil shadows via the “depth fail” method, a functionality commonly known as +"Carmack's Reverse". + +MayaImport: +--------------------------- + +The code for our Maya export plugin is included, if you are a Maya licensee +you can obtain the SDK from Autodesk. + + +LICENSE +======= + +See COPYING.txt for the GNU GENERAL PUBLIC LICENSE + +ADDITIONAL TERMS: The Doom 3 GPL Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU GPL which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +EXCLUDED CODE: The code described below and contained in the Doom 3 GPL Source Code release is not part of the Program covered by the GPL and is expressly excluded from its terms. You are solely responsible for obtaining from the copyright holder a license for such code and complying with the applicable license terms. + +Curl library +--------------------------------------------------------------------------- +lines file(s) + neo/curl/*, neo/curl/README + +COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 1996 - 2004, Daniel Stenberg, . + +All rights reserved. + +Permission to use, copy, modify, and distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright +notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization of the copyright holder. + +JPEG library +----------------------------------------------------------------------------- +neo/renderer/jpeg-6/* + +Copyright (C) 1991-1995, Thomas G. Lane + +Permission is hereby granted to use, copy, modify, and distribute this +software (or portions thereof) for any purpose, without fee, subject to these +conditions: +(1) If any part of the source code for this software is distributed, then this +README file must be included, with this copyright and no-warranty notice +unaltered; and any additions, deletions, or changes to the original files +must be clearly indicated in accompanying documentation. +(2) If only executable code is distributed, then the accompanying +documentation must state that "this software is based in part on the work of +the Independent JPEG Group". +(3) Permission for use of this software is granted only if the user accepts +full responsibility for any undesirable consequences; the authors accept +NO LIABILITY for damages of any kind. + +These conditions apply to any software derived from or based on the IJG code, +not just to the unmodified library. If you use our work, you ought to +acknowledge us. + +NOTE: unfortunately the README that came with our copy of the library has +been lost, so the one from release 6b is included instead. There are a few +'glue type' modifications to the library to make it easier to use from +the engine, but otherwise the dependency can be easily cleaned up to a +better release of the library. + +OggVorbis +--------------------------------------------------------------------------- +neo/sound/OggVorbis/* +neo/sound/OggVorbis/ogg/README +neo/sound/OggVorbis/vorbis/README + +Copyright (c) 2002, Xiph.org Foundation + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +- Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + +- Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + +- Neither the name of the Xiph.org Foundation nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION +OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +PropTree +--------------------------------------------------------------------------- +neo/tools/common/PropTree/* + +Copyright (C) 1998-2001 Scott Ramsay +sramsay@gonavi.com +http://www.gonavi.com + +This material is provided "as is", with absolutely no warranty expressed +or implied. Any use is at your own risk. + +Permission to use or copy this software for any purpose is hereby granted +without fee, provided the above notices are retained on all copies. +Permission to modify the code and to distribute modified code is granted, +provided the above notices are retained, and a notice that the code was +modified is included with the above copyright notice. + +If you use this code, drop me an email. I'd like to know if you find the code +useful. + +OpenAL SDK +--------------------------------------------------------------------------- +neo/openal/docs/* +neo/openal/include/* +neo/openal/lib/* +neo/openal/osx/* + +/** + * OpenAL cross platform audio library + * Copyright (C) 1999-2000 by authors. + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Library General Public + * License as published by the Free Software Foundation; either + * version 2 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Library General Public License for more details. + * + * You should have received a copy of the GNU Library General Public + * License along with this library; if not, write to the + * Free Software Foundation, Inc., 59 Temple Place - Suite 330, + * Boston, MA 02111-1307, USA. + * Or go to http://www.gnu.org/copyleft/lgpl.html + */ + +Base64 implementation +--------------------------------------------------------------------------- +lines file(s) +234 neo/idlib/Base64.cpp + +Copyright (c) 1996 Lars Wirzenius. All rights reserved. + +June 14 2003: TTimo + modified + endian bug fixes + http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=197039 + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, +INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +POSSIBILITY OF SUCH DAMAGE. + + +IO on .zip files using portions of zlib +--------------------------------------------------------------------------- +lines file(s) +4471 src/framework/Unzip.cpp +Copyright (C) 1998 Gilles Vollant +zlib is Copyright (C) 1995-1998 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + +MD4 Message-Digest Algorithm +----------------------------------------------------------------------------- +lines file(s) +260 neo/idlib/hashing/MD4.cpp +Copyright (C) 1991-2, RSA Data Security, Inc. Created 1991. All +rights reserved. + +License to copy and use this software is granted provided that it +is identified as the "RSA Data Security, Inc. MD4 Message-Digest +Algorithm" in all material mentioning or referencing this software +or this function. + +License is also granted to make and use derivative works provided +that such works are identified as "derived from the RSA Data +Security, Inc. MD4 Message-Digest Algorithm" in all material +mentioning or referencing the derived work. + +RSA Data Security, Inc. makes no representations concerning either +the merchantability of this software or the suitability of this +software for any particular purpose. It is provided "as is" +without express or implied warranty of any kind. + +These notices must be retained in any copies of any part of this +documentation and/or software. + +MD5 Message-Digest Algorithm +----------------------------------------------------------------------------- +lines file(s) +273 neo/idlib/hashing/MD5.cpp +This code implements the MD5 message-digest algorithm. +The algorithm is due to Ron Rivest. This code was +written by Colin Plumb in 1993, no copyright is claimed. +This code is in the public domain; do with it what you wish. + +CRC32 Checksum +----------------------------------------------------------------------------- +lines file(s) +168 neo/idlib/hashing/CRC32.cpp +Copyright (C) 1995-1998 Mark Adler + +OpenGL headers +--------------------------------------------------------------------------- +lines file(s) +5920 neo/renderer/glext.h +613 neo/renderer/wglext.h + +/* +** License Applicability. Except to the extent portions of this file are +** made subject to an alternative license as permitted in the SGI Free +** Software License B, Version 1.1 (the "License"), the contents of this +** file are subject only to the provisions of the License. You may not use +** this file except in compliance with the License. You may obtain a copy +** of the License at Silicon Graphics, Inc., attn: Legal Services, 1600 +** Amphitheatre Parkway, Mountain View, CA 94043-1351, or at: +** +** http://oss.sgi.com/projects/FreeB +** +** Note that, as provided in the License, the Software is distributed on an +** "AS IS" basis, with ALL EXPRESS AND IMPLIED WARRANTIES AND CONDITIONS +** DISCLAIMED, INCLUDING, WITHOUT LIMITATION, ANY IMPLIED WARRANTIES AND +** CONDITIONS OF MERCHANTABILITY, SATISFACTORY QUALITY, FITNESS FOR A +** PARTICULAR PURPOSE, AND NON-INFRINGEMENT. +** +** Original Code. The Original Code is: OpenGL Sample Implementation, +** Version 1.2.1, released January 26, 2000, developed by Silicon Graphics, +** Inc. The Original Code is Copyright (c) 1991-2002 Silicon Graphics, Inc. +** Copyright in any portions created by third parties is as indicated +** elsewhere herein. All Rights Reserved. +** +** Additional Notice Provisions: This software was created using the +** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has +** not been independently verified as being compliant with the OpenGL(R) +** version 1.2.1 Specification. +*/ + +NV-CONTROL X Extension +--------------------------------------------------------------------------- +neo/sys/linux/libXNVCtrl/* +Copyright NVIDIA Corporation + +ExtUtil.h +--------------------------------------------------------------------------- +neo/sys/linux/extutil.h +/* + * $Xorg: extutil.h,v 1.4 2001/02/09 02:03:24 xorgcvs Exp $ + * +Copyright 1989, 1998 The Open Group + +Permission to use, copy, modify, distribute, and sell this software and its +documentation for any purpose is hereby granted without fee, provided that +the above copyright notice appear in all copies and that both that +copyright notice and this permission notice appear in supporting +documentation. + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN +AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of The Open Group shall not be +used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization from The Open Group. + * + * Author: Jim Fulton, MIT The Open Group + * + * Xlib Extension-Writing Utilities + * + * This package contains utilities for writing the client API for various + * protocol extensions. THESE INTERFACES ARE NOT PART OF THE X STANDARD AND + * ARE SUBJECT TO CHANGE! + */ + +OSS headers +--------------------------------------------------------------------------- +neo/sys/linux/oss/* +Copyright by 4Front Technologies 1993-2004 + +Brandelf utility +--------------------------------------------------------------------------- +lines file(s) +225 neo/sys/linux/setup/brandelf.c + +/*- + * Copyright (c) 1996 Søren Schmidt + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software withough specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + * $FreeBSD: src/usr.bin/brandelf/brandelf.c,v 1.16 2000/07/02 03:34:08 imp Exp $ + */ + +makeself - Make self-extractable archives on Unix +--------------------------------------------------------------------------- +neo/sys/linux/setup/makeself/*, neo/sys/linux/setup/makeself/README +Copyright (c) Stéphane Peter +Licensing: GPL v2 diff --git a/base/default.cfg b/base/default.cfg new file mode 100644 index 0000000..fa81ada --- /dev/null +++ b/base/default.cfg @@ -0,0 +1 @@ +# empty file diff --git a/neo/MayaImport.vcxproj b/neo/MayaImport.vcxproj new file mode 100644 index 0000000..cbf455e --- /dev/null +++ b/neo/MayaImport.vcxproj @@ -0,0 +1,954 @@ + + + + + Debug with inlines and memory log + Win32 + + + Debug with inlines + Win32 + + + Debug + Win32 + + + Dedicated Debug with inlines + Win32 + + + Dedicated Debug + Win32 + + + Dedicated Release + Win32 + + + Release + Win32 + + + + MayaImport + {49BEC5C6-B964-417A-851E-808886B574F1} + MayaImport + + + + + + + Win32Proj + + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + DynamicLibrary + false + MultiByte + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Create + Create + Create + Create + Create + Create + Create + + + + + + + + {49bec5c6-b964-417a-851e-808886b57400} + false + + + + + + \ No newline at end of file diff --git a/neo/MayaImport.vcxproj.filters b/neo/MayaImport.vcxproj.filters new file mode 100644 index 0000000..03afbf2 --- /dev/null +++ b/neo/MayaImport.vcxproj.filters @@ -0,0 +1,2332 @@ + + + + + {aae4acbc-7824-448a-bfb1-016aff3c33fb} + + + {7771e2b0-7015-45d4-b0ec-3e7fdef5f75e} + + + {476e85cf-2481-430a-b6a3-b27cd4b70899} + + + {7a5e50e7-603a-4860-85d5-2a88fa17bcec} + + + {0585a38e-8a62-49f2-9476-2babb9e258f7} + + + {c1abf073-d6cb-4e00-a8c1-b70546f1fa45} + + + + + Maya 4.5 + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 4.5\include + + + Maya 5.0 + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 5.0\include + + + Maya 6.0 + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + Maya 6.0\include + + + + + + + + + + + + \ No newline at end of file diff --git a/neo/MayaImport/exporter.h b/neo/MayaImport/exporter.h new file mode 100644 index 0000000..d6047c8 --- /dev/null +++ b/neo/MayaImport/exporter.h @@ -0,0 +1,457 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ +#define MAYA_DEFAULT_CAMERA "camera1" + +#define ANIM_TX BIT( 0 ) +#define ANIM_TY BIT( 1 ) +#define ANIM_TZ BIT( 2 ) +#define ANIM_QX BIT( 3 ) +#define ANIM_QY BIT( 4 ) +#define ANIM_QZ BIT( 5 ) + +typedef enum { + WRITE_MESH, + WRITE_ANIM, + WRITE_CAMERA +} exportType_t; + +typedef struct { + idCQuat q; + idVec3 t; +} jointFrame_t; + +typedef struct { + idCQuat q; + idVec3 t; + float fov; +} cameraFrame_t; + +/* +============================================================================================== + + idTokenizer + +============================================================================================== +*/ + +class idTokenizer { +private: + int currentToken; + idStrList tokens; + +public: + idTokenizer() { Clear(); }; + void Clear( void ) { currentToken = 0; tokens.Clear(); }; + + int SetTokens( const char *buffer ); + const char *NextToken( const char *errorstring = NULL ); + + bool TokenAvailable( void ) { return currentToken < tokens.Num(); }; + int Num( void ) { return tokens.Num(); }; + void UnGetToken( void ) { if ( currentToken > 0 ) { currentToken--; } }; + const char *GetToken( int index ) { if ( ( index >= 0 ) && ( index < tokens.Num() ) ) { return tokens[ index ]; } else { return NULL; } }; + const char *CurrentToken( void ) { return GetToken( currentToken ); }; +}; + +/* +============================================================================================== + + idExportOptions + +============================================================================================== +*/ + +class idNamePair { +public: + idStr from; + idStr to; +}; + +class idAnimGroup { +public: + idStr name; + idStrList joints; +}; + +class idExportOptions { +private: + idTokenizer tokens; + + void Reset( const char *commandline ); + +public: + idStr commandLine; + idStr src; + idStr dest; + idStr game; + idStr prefix; + float scale; + exportType_t type; + bool ignoreMeshes; + bool clearOrigin; + bool clearOriginAxis; + bool ignoreScale; + int startframe; + int endframe; + int framerate; + float xyzPrecision; + float quatPrecision; + idStr align; + idList renamejoints; + idList remapjoints; + idStrList keepjoints; + idStrList skipmeshes; + idStrList keepmeshes; + idList exportgroups; + idList groups; + float rotate; + float jointThreshold; + int cycleStart; + + idExportOptions( const char *commandline, const char *ospath ); + + bool jointInExportGroup( const char *jointname ); +}; + +/* +============================================================================== + +idExportJoint + +============================================================================== +*/ + +class idExportJoint { +public: + idStr name; + idStr realname; + idStr longname; + int index; + int exportNum; + bool keep; + + float scale; + float invscale; + + MFnDagNode *dagnode; + + idHierarchy mayaNode; + idHierarchy exportNode; + + idVec3 t; + idMat3 wm; + + idVec3 idt; + idMat3 idwm; + + idVec3 bindpos; + idMat3 bindmat; + + int animBits; + int firstComponent; + jointFrame_t baseFrame; + int depth; + + idExportJoint(); + idExportJoint &operator=( const idExportJoint &other ); +}; + +/* +============================================================================== + +misc structures + +============================================================================== +*/ + +typedef struct { + idExportJoint *joint; + float jointWeight; + idVec3 offset; +} exportWeight_t; + +typedef struct { + idVec3 pos; + idVec2 texCoords; + int startweight; + int numWeights; +} exportVertex_t; + +typedef struct { + int indexes[ 3 ]; +} exportTriangle_t; + +typedef struct { + idVec2 uv[ 3 ]; +} exportUV_t; + +ID_INLINE int operator==( exportVertex_t a, exportVertex_t b ) { + if ( a.pos != b.pos ) { + return false; + } + + if ( ( a.texCoords[ 0 ] != b.texCoords[ 0 ] ) || ( a.texCoords[ 1 ] != b.texCoords[ 1 ] ) ) { + return false; + } + + if ( ( a.startweight != b.startweight ) || ( a.numWeights != b.numWeights ) ) { + return false; + } + + return true; +} + +/* +======================================================================== + +.MD3 triangle model file format + +======================================================================== +*/ + +#define MD3_IDENT (('3'<<24)+('P'<<16)+('D'<<8)+'I') +#define MD3_VERSION 15 + +// limits +#define MD3_MAX_LODS 4 +#define MD3_MAX_TRIANGLES 8192 // per surface +#define MD3_MAX_VERTS 4096 // per surface +#define MD3_MAX_SHADERS 256 // per surface +#define MD3_MAX_FRAMES 1024 // per model +#define MD3_MAX_SURFACES 32 // per model +#define MD3_MAX_TAGS 16 // per frame + +// vertex scales +#define MD3_XYZ_SCALE (1.0/64) + +// surface geometry should not exceed these limits +#define SHADER_MAX_VERTEXES 1000 +#define SHADER_MAX_INDEXES (6*SHADER_MAX_VERTEXES) + + +// the maximum size of game reletive pathnames +#define MAX_Q3PATH 64 + +typedef struct md3Frame_s { + idVec3 bounds[2]; + idVec3 localOrigin; + float radius; + char name[16]; +} md3Frame_t; + +typedef struct md3Tag_s { + char name[MAX_Q3PATH]; // tag name + idVec3 origin; + idVec3 axis[3]; +} md3Tag_t; + +/* +** md3Surface_t +** +** CHUNK SIZE +** header sizeof( md3Surface_t ) +** shaders sizeof( md3Shader_t ) * numShaders +** triangles[0] sizeof( md3Triangle_t ) * numTriangles +** st sizeof( md3St_t ) * numVerts +** XyzNormals sizeof( md3XyzNormal_t ) * numVerts * numFrames +*/ +typedef struct { + int ident; // + + char name[MAX_Q3PATH]; // polyset name + + int flags; + int numFrames; // all surfaces in a model should have the same + + int numShaders; // all surfaces in a model should have the same + int numVerts; + + int numTriangles; + int ofsTriangles; + + int ofsShaders; // offset from start of md3Surface_t + int ofsSt; // texture coords are common for all frames + int ofsXyzNormals; // numVerts * numFrames + + int ofsEnd; // next surface follows +} md3Surface_t; + +typedef struct { + char name[MAX_Q3PATH]; + int shaderIndex; // for in-game use +} md3Shader_t; + +typedef struct { + int indexes[3]; +} md3Triangle_t; + +typedef struct { + float st[2]; +} md3St_t; + +typedef struct { + short xyz[3]; + short normal; +} md3XyzNormal_t; + +typedef struct { + int ident; + int version; + + char name[MAX_Q3PATH]; // model name + + int flags; + + int numFrames; + int numTags; + int numSurfaces; + + int numSkins; + + int ofsFrames; // offset for first frame + int ofsTags; // numFrames * numTags + int ofsSurfaces; // first surface, others follow + + int ofsEnd; // end of file +} md3Header_t; + +/* +============================================================================== + +idExportMesh + +============================================================================== +*/ + +class idExportMesh { +public: + + idStr name; + idStr shader; + + bool keep; + + idList verts; + idList tris; + idList weights; + idList uv; + + idExportMesh() { keep = true; }; + void ShareVerts( void ); + void GetBounds( idBounds &bounds ) const; + void Merge( idExportMesh *mesh ); +}; + +/* +============================================================================== + +idExportModel + +============================================================================== +*/ + +class idExportModel { +public: + idExportJoint *exportOrigin; + idList joints; + idHierarchy mayaHead; + idHierarchy exportHead; + idList cameraCuts; + idList camera; + idList bounds; + idList jointFrames; + idList frames; + int frameRate; + int numFrames; + int skipjoints; + int export_joints; + idList meshes; + + idExportModel(); + ~idExportModel(); + idExportJoint *FindJointReal( const char *name ); + idExportJoint *FindJoint( const char *name ); + bool WriteMesh( const char *filename, idExportOptions &options ); + bool WriteAnim( const char *filename, idExportOptions &options ); + bool WriteCamera( const char *filename, idExportOptions &options ); +}; + +/* +============================================================================== + +Maya + +============================================================================== +*/ + +class idMayaExport { +private: + idExportModel model; + idExportOptions &options; + + void FreeDagNodes( void ); + + float TimeForFrame( int num ) const; + int GetMayaFrameNum( int num ) const; + void SetFrame( int num ); + + + void GetBindPose( MObject &jointNode, idExportJoint *joint, float scale ); + void GetLocalTransform( idExportJoint *joint, idVec3 &pos, idMat3 &mat ); + void GetWorldTransform( idExportJoint *joint, idVec3 &pos, idMat3 &mat, float scale ); + + void CreateJoints( float scale ); + void PruneJoints( idStrList &keepjoints, idStr &prefix ); + void RenameJoints( idList &renamejoints, idStr &prefix ); + bool RemapParents( idList &remapjoints ); + + MObject FindShader( MObject& setNode ); + void GetTextureForMesh( idExportMesh *mesh, MFnDagNode &dagNode ); + + idExportMesh *CopyMesh( MFnSkinCluster &skinCluster, float scale ); + void CreateMesh( float scale ); + void CombineMeshes( void ); + + void GetAlignment( idStr &alignName, idMat3 &align, float rotate, int startframe ); + + const char *GetObjectType( MObject object ); + + float GetCameraFov( idExportJoint *joint ); + void GetCameraFrame( idExportJoint *camera, idMat3 &align, cameraFrame_t *cam ); + void CreateCameraAnim( idMat3 &align ); + + void GetDefaultPose( idMat3 &align ); + void CreateAnimation( idMat3 &align ); + +public: + idMayaExport( idExportOptions &exportOptions ) : options( exportOptions ) { }; + ~idMayaExport(); + + void ConvertModel( void ); + void ConvertToMD3( void ); +}; diff --git a/neo/MayaImport/maya_main.cpp b/neo/MayaImport/maya_main.cpp new file mode 100644 index 0000000..403476e --- /dev/null +++ b/neo/MayaImport/maya_main.cpp @@ -0,0 +1,3149 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ + +#include "../idlib/precompiled.h" +#pragma hdrstop + +#include "Maya5.0/maya.h" +//#include "Maya6.0/maya.h" // must also change include directory in project from "MayaImport\Maya4.5\include" to "MayaImport\Maya6.0\include" (requires MSDev 7.1) +#include "exporter.h" +#include "maya_main.h" + +idStr errorMessage; +bool initialized = false; + +#define DEFAULT_ANIM_EPSILON 0.125f +#define DEFAULT_QUAT_EPSILON ( 1.0f / 8192.0f ) + +#define SLOP_VERTEX 0.01f // merge xyz coordinates this far apart +#define SLOP_TEXCOORD 0.001f // merge texture coordinates this far apart + +const char *componentNames[ 6 ] = { "Tx", "Ty", "Tz", "Qx", "Qy", "Qz" }; + +idSys * sys = NULL; +idCommon * common = NULL; +idCVarSystem * cvarSystem = NULL; + +idCVar * idCVar::staticVars = NULL; + +/* +================= +MayaError +================= +*/ +void MayaError( const char *fmt, ... ) { + va_list argptr; + char text[ 8192 ]; + + va_start( argptr, fmt ); + idStr::vsnPrintf( text, sizeof( text ), fmt, argptr ); + va_end( argptr ); + + throw idException( text ); +} + +/* +================= +FS_WriteFloatString +================= +*/ +#define MAX_PRINT_MSG 4096 +static int WriteFloatString( FILE *file, const char *fmt, ... ) { + long i; + unsigned long u; + double f; + char *str; + int index; + idStr tmp, format; + va_list argPtr; + + va_start( argPtr, fmt ); + + index = 0; + + while( *fmt ) { + switch( *fmt ) { + case '%': + format = ""; + format += *fmt++; + while ( (*fmt >= '0' && *fmt <= '9') || + *fmt == '.' || *fmt == '-' || *fmt == '+' || *fmt == '#') { + format += *fmt++; + } + format += *fmt; + switch( *fmt ) { + case 'f': + case 'e': + case 'E': + case 'g': + case 'G': + f = va_arg( argPtr, double ); + if ( format.Length() <= 2 ) { + // high precision floating point number without trailing zeros + sprintf( tmp, "%1.10f", f ); + tmp.StripTrailing( '0' ); + tmp.StripTrailing( '.' ); + index += fprintf( file, "%s", tmp.c_str() ); + } + else { + index += fprintf( file, format.c_str(), f ); + } + break; + case 'd': + case 'i': + i = va_arg( argPtr, long ); + index += fprintf( file, format.c_str(), i ); + break; + case 'u': + u = va_arg( argPtr, unsigned long ); + index += fprintf( file, format.c_str(), u ); + break; + case 'o': + u = va_arg( argPtr, unsigned long ); + index += fprintf( file, format.c_str(), u ); + break; + case 'x': + u = va_arg( argPtr, unsigned long ); + index += fprintf( file, format.c_str(), u ); + break; + case 'X': + u = va_arg( argPtr, unsigned long ); + index += fprintf( file, format.c_str(), u ); + break; + case 'c': + i = va_arg( argPtr, long ); + index += fprintf( file, format.c_str(), (char) i ); + break; + case 's': + str = va_arg( argPtr, char * ); + index += fprintf( file, format.c_str(), str ); + break; + case '%': + index += fprintf( file, format.c_str() ); + break; + default: + MayaError( "WriteFloatString: invalid format %s", format.c_str() ); + break; + } + fmt++; + break; + case '\\': + fmt++; + switch( *fmt ) { + case 't': + index += fprintf( file, "\t" ); + break; + case 'n': + index += fprintf( file, "\n" ); + default: + MayaError( "WriteFloatString: unknown escape character \'%c\'", *fmt ); + break; + } + fmt++; + break; + default: + index += fprintf( file, "%c", *fmt ); + fmt++; + break; + } + } + + va_end( argPtr ); + + return index; +} + +/* +================ +OSPathToRelativePath + +takes a full OS path, as might be found in data from a media creation +program, and converts it to a qpath by stripping off directories + +Returns false if the osPath tree doesn't match any of the existing +search paths. +================ +*/ +bool OSPathToRelativePath( const char *osPath, idStr &qpath, const char *game ) { + char *s, *base; + + // skip a drive letter? + + // search for anything with BASE_GAMEDIR in it + // Ase files from max may have the form of: + // "//Purgatory/purgatory/doom/base/models/mapobjects/bitch/hologirl.tga" + // which won't match any of our drive letter based search paths + base = (char *)strstr( osPath, BASE_GAMEDIR ); + + // _D3XP added mod support + if ( base == NULL && strlen(game) > 0 ) { + + base = s = (char *)strstr( osPath, game ); + + while( s = strstr( s, game ) ) { + s += strlen( game ); + if ( s[0] == '/' || s[0] == '\\' ) { + base = s; + } + } + } + + if ( base ) { + s = strstr( base, "/" ); + if ( !s ) { + s = strstr( base, "\\" ); + } + if ( s ) { + qpath = s + 1; + return true; + } + } + + common->Printf( "OSPathToRelativePath failed on %s\n", osPath ); + qpath = osPath; + + return false; +} + +/* +=============== +ConvertFromIdSpace +=============== +*/ +idMat3 ConvertFromIdSpace( const idMat3 &idmat ) { + idMat3 mat; + + mat[ 0 ][ 0 ] = idmat[ 0 ][ 0 ]; + mat[ 0 ][ 2 ] = -idmat[ 0 ][ 1 ]; + mat[ 0 ][ 1 ] = idmat[ 0 ][ 2 ]; + + mat[ 1 ][ 0 ] = idmat[ 1 ][ 0 ]; + mat[ 1 ][ 2 ] = -idmat[ 1 ][ 1 ]; + mat[ 1 ][ 1 ] = idmat[ 1 ][ 2 ]; + + mat[ 2 ][ 0 ] = idmat[ 2 ][ 0 ]; + mat[ 2 ][ 2 ] = -idmat[ 2 ][ 1 ]; + mat[ 2 ][ 1 ] = idmat[ 2 ][ 2 ]; + + return mat; +} + +/* +=============== +ConvertFromIdSpace +=============== +*/ +idVec3 ConvertFromIdSpace( const idVec3 &idpos ) { + idVec3 pos; + + pos.x = idpos.x; + pos.z = -idpos.y; + pos.y = idpos.z; + + return pos; +} + +/* +=============== +ConvertToIdSpace +=============== +*/ +idMat3 ConvertToIdSpace( const idMat3 &mat ) { + idMat3 idmat; + + idmat[ 0 ][ 0 ] = mat[ 0 ][ 0 ]; + idmat[ 0 ][ 1 ] = -mat[ 0 ][ 2 ]; + idmat[ 0 ][ 2 ] = mat[ 0 ][ 1 ]; + + idmat[ 1 ][ 0 ] = mat[ 1 ][ 0 ]; + idmat[ 1 ][ 1 ] = -mat[ 1 ][ 2 ]; + idmat[ 1 ][ 2 ] = mat[ 1 ][ 1 ]; + + idmat[ 2 ][ 0 ] = mat[ 2 ][ 0 ]; + idmat[ 2 ][ 1 ] = -mat[ 2 ][ 2 ]; + idmat[ 2 ][ 2 ] = mat[ 2 ][ 1 ]; + + return idmat; +} + +/* +=============== +ConvertToIdSpace +=============== +*/ +idVec3 ConvertToIdSpace( const idVec3 &pos ) { + idVec3 idpos; + + idpos.x = pos.x; + idpos.y = -pos.z; + idpos.z = pos.y; + + return idpos; +} + +/* +=============== +idVec +=============== +*/ +idVec3 idVec( const MFloatPoint &point ) { + return idVec3( point[ 0 ], point[ 1 ], point[ 2 ] ); +} + +/* +=============== +idVec +=============== +*/ +idVec3 idVec( const MMatrix &matrix ) { + return idVec3( matrix[ 3 ][ 0 ], matrix[ 3 ][ 1 ], matrix[ 3 ][ 2 ] ); +} + +/* +=============== +idMat +=============== +*/ +idMat3 idMat( const MMatrix &matrix ) { + int j, k; + idMat3 mat; + + for( j = 0; j < 3; j++ ) { + for( k = 0; k < 3; k++ ) { + mat[ j ][ k ] = matrix[ j ][ k ]; + } + } + + return mat; +} + +/* +=============== +GetParent +=============== +*/ +MFnDagNode *GetParent( MFnDagNode *joint ) { + MStatus status; + MObject parentObject; + + parentObject = joint->parent( 0, &status ); + if ( !status && status.statusCode() == MStatus::kInvalidParameter ) { + return NULL; + } + + while( !parentObject.hasFn( MFn::kTransform ) ) { + MFnDagNode parentNode( parentObject, &status ); + if ( !status ) { + return NULL; + } + + parentObject = parentNode.parent( 0, &status ); + if ( !status && status.statusCode() == MStatus::kInvalidParameter ) { + return NULL; + } + } + + MFnDagNode *parentNode; + + parentNode = new MFnDagNode( parentObject, &status ); + if ( !status ) { + delete parentNode; + return NULL; + } + + return parentNode; +} + +/* +============================================================================================== + + idTokenizer + +============================================================================================== +*/ + +/* +==================== +idTokenizer::SetTokens +==================== +*/ +int idTokenizer::SetTokens( const char *buffer ) { + const char *cmd; + + Clear(); + + // tokenize commandline + cmd = buffer; + while ( *cmd ) { + // skip whitespace + while( *cmd && isspace( *cmd ) ) { + cmd++; + } + + if ( !*cmd ) { + break; + } + + idStr ¤t = tokens.Alloc(); + while( *cmd && !isspace( *cmd ) ) { + current += *cmd; + cmd++; + } + } + + return tokens.Num(); +} + +/* +==================== +idTokenizer::NextToken +==================== +*/ +const char *idTokenizer::NextToken( const char *errorstring ) { + if ( currentToken < tokens.Num() ) { + return tokens[ currentToken++ ]; + } + + if ( errorstring ) { + MayaError( "Error: %s", errorstring ); + } + + return NULL; +} + +/* +============================================================================================== + + idExportOptions + +============================================================================================== +*/ + +/* +==================== +idExportOptions::Reset +==================== +*/ +void idExportOptions::Reset( const char *commandline ) { + scale = 1.0f; + type = WRITE_MESH; + startframe = -1; + endframe = -1; + ignoreMeshes = false; + clearOrigin = false; + clearOriginAxis = false; + framerate = 24; + align = ""; + rotate = 0.0f; + commandLine = commandline; + prefix = ""; + jointThreshold = 0.05f; + ignoreScale = false; + xyzPrecision = DEFAULT_ANIM_EPSILON; + quatPrecision = DEFAULT_QUAT_EPSILON; + cycleStart = -1; + + src.Clear(); + dest.Clear(); + + tokens.SetTokens( commandline ); + + keepjoints.Clear(); + renamejoints.Clear(); + remapjoints.Clear(); + exportgroups.Clear(); + skipmeshes.Clear(); + keepmeshes.Clear(); + groups.Clear(); +} + +/* +==================== +idExportOptions::idExportOptions +==================== +*/ +idExportOptions::idExportOptions( const char *commandline, const char *ospath ) { + idStr token; + idNamePair joints; + int i; + idAnimGroup *group; + idStr sourceDir; + idStr destDir; + + Reset( commandline ); + + token = tokens.NextToken( "Missing export command" ); + if ( token == "mesh" ) { + type = WRITE_MESH; + } else if ( token == "anim" ) { + type = WRITE_ANIM; + } else if ( token == "camera" ) { + type = WRITE_CAMERA; + } else { + MayaError( "Unknown export command '%s'", token.c_str() ); + } + + src = tokens.NextToken( "Missing source filename" ); + dest = src; + + for( token = tokens.NextToken(); token != ""; token = tokens.NextToken() ) { + if ( token == "-force" ) { + // skip + } else if ( token == "-game" ) { + // parse game name + game = tokens.NextToken( "Expecting game name after -game" ); + + } else if ( token == "-rename" ) { + // parse joint to rename + joints.from = tokens.NextToken( "Missing joint name for -rename. Usage: -rename [joint name] [new name]" ); + joints.to = tokens.NextToken( "Missing new name for -rename. Usage: -rename [joint name] [new name]" ); + renamejoints.Append( joints ); + + } else if ( token == "-prefix" ) { + prefix = tokens.NextToken( "Missing name for -prefix. Usage: -prefix [joint prefix]" ); + + } else if ( token == "-parent" ) { + // parse joint to reparent + joints.from = tokens.NextToken( "Missing joint name for -parent. Usage: -parent [joint name] [new parent]" ); + joints.to = tokens.NextToken( "Missing new parent for -parent. Usage: -parent [joint name] [new parent]" ); + remapjoints.Append( joints ); + + } else if ( !token.Icmp( "-sourcedir" ) ) { + // parse source directory + sourceDir = tokens.NextToken( "Missing filename for -sourcedir. Usage: -sourcedir [directory]" ); + + } else if ( !token.Icmp( "-destdir" ) ) { + // parse destination directory + destDir = tokens.NextToken( "Missing filename for -destdir. Usage: -destdir [directory]" ); + + } else if ( token == "-dest" ) { + // parse destination filename + dest = tokens.NextToken( "Missing filename for -dest. Usage: -dest [filename]" ); + + } else if ( token == "-range" ) { + // parse frame range to export + token = tokens.NextToken( "Missing start frame for -range. Usage: -range [start frame] [end frame]" ); + startframe = atoi( token ); + token = tokens.NextToken( "Missing end frame for -range. Usage: -range [start frame] [end frame]" ); + endframe = atoi( token ); + + if ( startframe > endframe ) { + MayaError( "Start frame is greater than end frame." ); + } + + } else if ( !token.Icmp( "-cycleStart" ) ) { + // parse start frame of cycle + token = tokens.NextToken( "Missing cycle start frame for -cycleStart. Usage: -cycleStart [first frame of cycle]" ); + cycleStart = atoi( token ); + + } else if ( token == "-scale" ) { + // parse scale + token = tokens.NextToken( "Missing scale amount for -scale. Usage: -scale [scale amount]" ); + scale = atof( token ); + + } else if ( token == "-align" ) { + // parse align joint + align = tokens.NextToken( "Missing joint name for -align. Usage: -align [joint name]" ); + + } else if ( token == "-rotate" ) { + // parse angle rotation + token = tokens.NextToken( "Missing value for -rotate. Usage: -rotate [yaw]" ); + rotate = -atof( token ); + + } else if ( token == "-nomesh" ) { + ignoreMeshes = true; + + } else if ( token == "-clearorigin" ) { + clearOrigin = true; + clearOriginAxis = true; + + } else if ( token == "-clearoriginaxis" ) { + clearOriginAxis = true; + + } else if ( token == "-ignorescale" ) { + ignoreScale = true; + + } else if ( token == "-xyzprecision" ) { + // parse quaternion precision + token = tokens.NextToken( "Missing value for -xyzprecision. Usage: -xyzprecision [precision]" ); + xyzPrecision = atof( token ); + if ( xyzPrecision < 0.0f ) { + MayaError( "Invalid value for -xyzprecision. Must be >= 0" ); + } + + } else if ( token == "-quatprecision" ) { + // parse quaternion precision + token = tokens.NextToken( "Missing value for -quatprecision. Usage: -quatprecision [precision]" ); + quatPrecision = atof( token ); + if ( quatPrecision < 0.0f ) { + MayaError( "Invalid value for -quatprecision. Must be >= 0" ); + } + + } else if ( token == "-jointthreshold" ) { + // parse joint threshold + token = tokens.NextToken( "Missing weight for -jointthreshold. Usage: -jointthreshold [minimum joint weight]" ); + jointThreshold = atof( token ); + + } else if ( token == "-skipmesh" ) { + token = tokens.NextToken( "Missing name for -skipmesh. Usage: -skipmesh [name of mesh to skip]" ); + skipmeshes.AddUnique( token ); + + } else if ( token == "-keepmesh" ) { + token = tokens.NextToken( "Missing name for -keepmesh. Usage: -keepmesh [name of mesh to keep]" ); + keepmeshes.AddUnique( token ); + + } else if ( token == "-jointgroup" ) { + token = tokens.NextToken( "Missing name for -jointgroup. Usage: -jointgroup [group name] [joint1] [joint2]...[joint n]" ); + group = groups.Ptr(); + for( i = 0; i < groups.Num(); i++, group++ ) { + if ( group->name == token ) { + break; + } + } + + if ( i >= groups.Num() ) { + // create a new group + group = &groups.Alloc(); + group->name = token; + } + + while( tokens.TokenAvailable() ) { + token = tokens.NextToken(); + if ( token[ 0 ] == '-' ) { + tokens.UnGetToken(); + break; + } + + group->joints.AddUnique( token ); + } + } else if ( token == "-group" ) { + // add the list of groups to export (these don't affect the hierarchy) + while( tokens.TokenAvailable() ) { + token = tokens.NextToken(); + if ( token[ 0 ] == '-' ) { + tokens.UnGetToken(); + break; + } + + group = groups.Ptr(); + for( i = 0; i < groups.Num(); i++, group++ ) { + if ( group->name == token ) { + break; + } + } + + if ( i >= groups.Num() ) { + MayaError( "Unknown group '%s'", token.c_str() ); + } + + exportgroups.AddUnique( group ); + } + } else if ( token == "-keep" ) { + // add joints that are kept whether they're used by a mesh or not + while( tokens.TokenAvailable() ) { + token = tokens.NextToken(); + if ( token[ 0 ] == '-' ) { + tokens.UnGetToken(); + break; + } + keepjoints.AddUnique( token ); + } + } else { + MayaError( "Unknown option '%s'", token.c_str() ); + } + } + + token = src; + src = ospath; + src.BackSlashesToSlashes(); + src.AppendPath( sourceDir ); + src.AppendPath( token ); + + token = dest; + dest = ospath; + dest.BackSlashesToSlashes(); + dest.AppendPath( destDir ); + dest.AppendPath( token ); + + // Maya only accepts unix style path separators + src.BackSlashesToSlashes(); + dest.BackSlashesToSlashes(); + + if ( skipmeshes.Num() && keepmeshes.Num() ) { + MayaError( "Can't use -keepmesh and -skipmesh together." ); + } +} + +/* +==================== +idExportOptions::jointInExportGroup +==================== +*/ +bool idExportOptions::jointInExportGroup( const char *jointname ) { + int i; + int j; + idAnimGroup *group; + + if ( !exportgroups.Num() ) { + // if we don't have any groups specified as export then export every joint + return true; + } + + // search through all exported groups to see if this joint is exported + for( i = 0; i < exportgroups.Num(); i++ ) { + group = exportgroups[ i ]; + for( j = 0; j < group->joints.Num(); j++ ) { + if ( group->joints[ j ] == jointname ) { + return true; + } + } + } + + return false; +} + +/* +============================================================================== + +idExportJoint + +============================================================================== +*/ + +idExportJoint::idExportJoint() { + index = 0; + exportNum = 0; + + mayaNode.SetOwner( this ); + exportNode.SetOwner( this ); + + dagnode = NULL; + + t = vec3_zero; + wm = mat3_default; + bindpos = vec3_zero; + bindmat = mat3_default; + keep = false; + scale = 1.0f; + invscale = 1.0f; + animBits = 0; + firstComponent = 0; + baseFrame.q.Set( 0.0f, 0.0f, 0.0f ); + baseFrame.t.Zero(); +} + +idExportJoint &idExportJoint::operator=( const idExportJoint &other ) { + name = other.name; + realname = other.realname; + longname = other.longname; + index = other.index; + exportNum = other.exportNum; + keep = other.keep; + + scale = other.scale; + invscale = other.invscale; + + dagnode = other.dagnode; + + mayaNode = other.mayaNode; + exportNode = other.exportNode; + + t = other.t; + idt = other.idt; + wm = other.wm; + idwm = other.idwm; + bindpos = other.bindpos; + bindmat = other.bindmat; + + animBits = other.animBits; + firstComponent = other.firstComponent; + baseFrame = other.baseFrame; + + mayaNode.SetOwner( this ); + exportNode.SetOwner( this ); + + return *this; +} + +/* +============================================================================== + +idExportMesh + +============================================================================== +*/ + +void idExportMesh::ShareVerts( void ) { + int i, j, k; + exportVertex_t vert; + idList v; + + v = verts; + verts.Clear(); + for( i = 0; i < tris.Num(); i++ ) { + for( j = 0; j < 3; j++ ) { + vert = v[ tris[ i ].indexes[ j ] ]; + vert.texCoords[ 0 ] = uv[ i ].uv[ j ][ 0 ]; + vert.texCoords[ 1 ] = 1.0f - uv[ i ].uv[ j ][ 1 ]; + + for( k = 0; k < verts.Num(); k++ ) { + if ( vert.numWeights != verts[ k ].numWeights ) { + continue; + } + if ( vert.startweight != verts[ k ].startweight ) { + continue; + } + if ( !vert.pos.Compare( verts[ k ].pos, SLOP_VERTEX ) ) { + continue; + } + if ( !vert.texCoords.Compare( verts[ k ].texCoords, SLOP_TEXCOORD ) ) { + continue; + } + + break; + } + + if ( k < verts.Num() ) { + tris[ i ].indexes[ j ] = k; + } else { + tris[ i ].indexes[ j ] = verts.Append( vert ); + } + } + } +} + +void idExportMesh::Merge( idExportMesh *mesh ) { + int i; + int numverts; + int numtris; + int numweights; + int numuvs; + + // merge name + sprintf( name, "%s, %s", name.c_str(), mesh->name.c_str() ); + + // merge verts + numverts = verts.Num(); + verts.SetNum( numverts + mesh->verts.Num() ); + for( i = 0; i < mesh->verts.Num(); i++ ) { + verts[ numverts + i ] = mesh->verts[ i ]; + verts[ numverts + i ].startweight += weights.Num(); + } + + // merge triangles + numtris = tris.Num(); + tris.SetNum( numtris + mesh->tris.Num() ); + for( i = 0; i < mesh->tris.Num(); i++ ) { + tris[ numtris + i ].indexes[ 0 ] = mesh->tris[ i ].indexes[ 0 ] + numverts; + tris[ numtris + i ].indexes[ 1 ] = mesh->tris[ i ].indexes[ 1 ] + numverts; + tris[ numtris + i ].indexes[ 2 ] = mesh->tris[ i ].indexes[ 2 ] + numverts; + } + + // merge weights + numweights = weights.Num(); + weights.SetNum( numweights + mesh->weights.Num() ); + for( i = 0; i < mesh->weights.Num(); i++ ) { + weights[ numweights + i ] = mesh->weights[ i ]; + } + + // merge uvs + numuvs = uv.Num(); + uv .SetNum( numuvs + mesh->uv.Num() ); + for( i = 0; i < mesh->uv.Num(); i++ ) { + uv[ numuvs + i ] = mesh->uv[ i ]; + } +} + +void idExportMesh::GetBounds( idBounds &bounds ) const { + int i; + int j; + idVec3 pos; + const exportWeight_t *weight; + const exportVertex_t *vert; + + bounds.Clear(); + + weight = weights.Ptr(); + vert = verts.Ptr(); + for( i = 0; i < verts.Num(); i++, vert++ ) { + pos.Zero(); + weight = &weights[ vert->startweight ]; + for( j = 0; j < vert->numWeights; j++, weight++ ) { + pos += weight->jointWeight * ( weight->joint->idwm * weight->offset + weight->joint->idt ); + } + bounds.AddPoint( pos ); + } +} + +/* +============================================================================== + +idExportModel + +============================================================================== +*/ + +/* +==================== +idExportModel::idExportModel +==================== +*/ +ID_INLINE idExportModel::idExportModel() { + export_joints = 0; + skipjoints = 0; + frameRate = 24; + numFrames = 0; + exportOrigin = NULL; +} + +/* +==================== +idExportModel::~idExportModel +==================== +*/ +ID_INLINE idExportModel::~idExportModel() { + meshes.DeleteContents( true ); +} + +idExportJoint *idExportModel::FindJointReal( const char *name ) { + idExportJoint *joint; + int i; + + joint = joints.Ptr(); + for( i = 0; i < joints.Num(); i++, joint++ ) { + if ( joint->realname == name ) { + return joint; + } + } + + return NULL; +} + +idExportJoint *idExportModel::FindJoint( const char *name ) { + idExportJoint *joint; + int i; + + joint = joints.Ptr(); + for( i = 0; i < joints.Num(); i++, joint++ ) { + if ( joint->name == name ) { + return joint; + } + } + + return NULL; +} + +bool idExportModel::WriteMesh( const char *filename, idExportOptions &options ) { + int i, j; + int numMeshes; + idExportMesh *mesh; + idExportJoint *joint; + idExportJoint *parent; + idExportJoint *sibling; + FILE *file; + const char *parentName; + int parentNum; + idList jointList; + + file = fopen( filename, "w" ); + if ( !file ) { + return false; + } + + for( joint = exportHead.GetNext(); joint != NULL; joint = joint->exportNode.GetNext() ) { + jointList.Append( joint ); + } + + for( i = 0; i < jointList.Num(); i++ ) { + joint = jointList[ i ]; + sibling = joint->exportNode.GetSibling(); + while( sibling ) { + if ( idStr::Cmp( joint->name, sibling->name ) > 0 ) { + joint->exportNode.MakeSiblingAfter( sibling->exportNode ); + sibling = joint->exportNode.GetSibling(); + } else { + sibling = sibling->exportNode.GetSibling(); + } + } + } + + jointList.Clear(); + for( joint = exportHead.GetNext(); joint != NULL; joint = joint->exportNode.GetNext() ) { + joint->exportNum = jointList.Append( joint ); + } + + numMeshes = 0; + if ( !options.ignoreMeshes ) { + for( i = 0; i < meshes.Num(); i++ ) { + if ( meshes[ i ]->keep ) { + numMeshes++; + } + } + } + + // write version info + WriteFloatString( file, MD5_VERSION_STRING " %d\n", MD5_VERSION ); + WriteFloatString( file, "commandline \"%s\"\n\n", options.commandLine.c_str() ); + + // write joints + WriteFloatString( file, "numJoints %d\n", jointList.Num() ); + WriteFloatString( file, "numMeshes %d\n\n", numMeshes ); + + WriteFloatString( file, "joints {\n" ); + for( i = 0; i < jointList.Num(); i++ ) { + joint = jointList[ i ]; + parent = joint->exportNode.GetParent(); + if ( parent ) { + parentNum = parent->exportNum; + parentName = parent->name.c_str(); + } else { + parentNum = -1; + parentName = ""; + } + + idCQuat bindQuat = joint->bindmat.ToQuat().ToCQuat(); + WriteFloatString( file, "\t\"%s\"\t%d ( %f %f %f ) ( %f %f %f )\t\t// %s\n", joint->name.c_str(), parentNum, + joint->bindpos.x, joint->bindpos.y, joint->bindpos.z, bindQuat[ 0 ], bindQuat[ 1 ], bindQuat[ 2 ], parentName ); + } + WriteFloatString( file, "}\n" ); + + // write meshes + for( i = 0; i < meshes.Num(); i++ ) { + mesh = meshes[ i ]; + if ( !mesh->keep ) { + continue; + } + + WriteFloatString( file, "\nmesh {\n" ); + WriteFloatString( file, "\t// meshes: %s\n", mesh->name.c_str() ); + WriteFloatString( file, "\tshader \"%s\"\n", mesh->shader.c_str() ); + + WriteFloatString( file, "\n\tnumverts %d\n", mesh->verts.Num() ); + for( j = 0; j < mesh->verts.Num(); j++ ) { + WriteFloatString( file, "\tvert %d ( %f %f ) %d %d\n", j, mesh->verts[ j ].texCoords[ 0 ], mesh->verts[ j ].texCoords[ 1 ], + mesh->verts[ j ].startweight, mesh->verts[ j ].numWeights ); + } + + WriteFloatString( file, "\n\tnumtris %d\n", mesh->tris.Num() ); + for( j = 0; j < mesh->tris.Num(); j++ ) { + WriteFloatString( file, "\ttri %d %d %d %d\n", j, mesh->tris[ j ].indexes[ 2 ], mesh->tris[ j ].indexes[ 1 ], mesh->tris[ j ].indexes[ 0 ] ); + } + + WriteFloatString( file, "\n\tnumweights %d\n", mesh->weights.Num() ); + for( j = 0; j < mesh->weights.Num(); j++ ) { + exportWeight_t *weight; + + weight = &mesh->weights[ j ]; + WriteFloatString( file, "\tweight %d %d %f ( %f %f %f )\n", j, + weight->joint->exportNum, weight->jointWeight, weight->offset.x, weight->offset.y, weight->offset.z ); + } + + WriteFloatString( file, "}\n" ); + } + + fclose( file ); + + return true; +} + +bool idExportModel::WriteAnim( const char *filename, idExportOptions &options ) { + int i, j; + idExportJoint *joint; + idExportJoint *parent; + idExportJoint *sibling; + jointFrame_t *frame; + FILE *file; + int numAnimatedComponents; + idList jointList; + + file = fopen( filename, "w" ); + if ( !file ) { + return false; + } + + for( joint = exportHead.GetNext(); joint != NULL; joint = joint->exportNode.GetNext() ) { + jointList.Append( joint ); + } + + for( i = 0; i < jointList.Num(); i++ ) { + joint = jointList[ i ]; + sibling = joint->exportNode.GetSibling(); + while( sibling ) { + if ( idStr::Cmp( joint->name, sibling->name ) > 0 ) { + joint->exportNode.MakeSiblingAfter( sibling->exportNode ); + sibling = joint->exportNode.GetSibling(); + } else { + sibling = sibling->exportNode.GetSibling(); + } + } + } + + jointList.Clear(); + for( joint = exportHead.GetNext(); joint != NULL; joint = joint->exportNode.GetNext() ) { + joint->exportNum = jointList.Append( joint ); + } + + numAnimatedComponents = 0; + for( i = 0; i < jointList.Num(); i++ ) { + joint = jointList[ i ]; + joint->exportNum = i; + joint->baseFrame = frames[ 0 ][ joint->index ]; + joint->animBits = 0; + for( j = 1; j < numFrames; j++ ) { + frame = &frames[ j ][ joint->index ]; + if ( fabs( frame->t[ 0 ] - joint->baseFrame.t[ 0 ] ) > options.xyzPrecision ) { + joint->animBits |= ANIM_TX; + } + if ( fabs( frame->t[ 1 ] - joint->baseFrame.t[ 1 ] ) > options.xyzPrecision ) { + joint->animBits |= ANIM_TY; + } + if ( fabs( frame->t[ 2 ] - joint->baseFrame.t[ 2 ] ) > options.xyzPrecision ) { + joint->animBits |= ANIM_TZ; + } + if ( fabs( frame->q[ 0 ] - joint->baseFrame.q[ 0 ] ) > options.quatPrecision ) { + joint->animBits |= ANIM_QX; + } + if ( fabs( frame->q[ 1 ] - joint->baseFrame.q[ 1 ] ) > options.quatPrecision ) { + joint->animBits |= ANIM_QY; + } + if ( fabs( frame->q[ 2 ] - joint->baseFrame.q[ 2 ] ) > options.quatPrecision ) { + joint->animBits |= ANIM_QZ; + } + if ( ( joint->animBits & 63 ) == 63 ) { + break; + } + } + if ( joint->animBits ) { + joint->firstComponent = numAnimatedComponents; + for( j = 0; j < 6; j++ ) { + if ( joint->animBits & BIT( j ) ) { + numAnimatedComponents++; + } + } + } + } + + // write version info + WriteFloatString( file, MD5_VERSION_STRING " %d\n", MD5_VERSION ); + WriteFloatString( file, "commandline \"%s\"\n\n", options.commandLine.c_str() ); + + WriteFloatString( file, "numFrames %d\n", numFrames ); + WriteFloatString( file, "numJoints %d\n", jointList.Num() ); + WriteFloatString( file, "frameRate %d\n", frameRate ); + WriteFloatString( file, "numAnimatedComponents %d\n", numAnimatedComponents ); + + // write out the hierarchy + WriteFloatString( file, "\nhierarchy {\n" ); + for( i = 0; i < jointList.Num(); i++ ) { + joint = jointList[ i ]; + parent = joint->exportNode.GetParent(); + if ( parent ) { + WriteFloatString( file, "\t\"%s\"\t%d %d %d\t// %s", joint->name.c_str(), parent->exportNum, joint->animBits, joint->firstComponent, parent->name.c_str() ); + } else { + WriteFloatString( file, "\t\"%s\"\t-1 %d %d\t//", joint->name.c_str(), joint->animBits, joint->firstComponent ); + } + + if ( !joint->animBits ) { + WriteFloatString( file, "\n" ); + } else { + WriteFloatString( file, " ( " ); + for( j = 0; j < 6; j++ ) { + if ( joint->animBits & BIT( j ) ) { + WriteFloatString( file, "%s ", componentNames[ j ] ); + } + } + WriteFloatString( file, ")\n" ); + } + } + WriteFloatString( file, "}\n" ); + + // write the frame bounds + WriteFloatString( file, "\nbounds {\n" ); + for( i = 0; i < numFrames; i++ ) { + WriteFloatString( file, "\t( %f %f %f ) ( %f %f %f )\n", bounds[ i ][ 0 ].x, bounds[ i ][ 0 ].y, bounds[ i ][ 0 ].z, bounds[ i ][ 1 ].x, bounds[ i ][ 1 ].y, bounds[ i ][ 1 ].z ); + } + WriteFloatString( file, "}\n" ); + + // write the base frame + WriteFloatString( file, "\nbaseframe {\n" ); + for( i = 0; i < jointList.Num(); i++ ) { + joint = jointList[ i ]; + WriteFloatString( file, "\t( %f %f %f ) ( %f %f %f )\n", joint->baseFrame.t[ 0 ], joint->baseFrame.t[ 1 ], joint->baseFrame.t[ 2 ], + joint->baseFrame.q[ 0 ], joint->baseFrame.q[ 1 ], joint->baseFrame.q[ 2 ] ); + } + WriteFloatString( file, "}\n" ); + + // write the frames + for( i = 0; i < numFrames; i++ ) { + WriteFloatString( file, "\nframe %d {\n", i ); + for( j = 0; j < jointList.Num(); j++ ) { + joint = jointList[ j ]; + frame = &frames[ i ][ joint->index ]; + if ( joint->animBits ) { + WriteFloatString( file, "\t" ); + if ( joint->animBits & ANIM_TX ) { + WriteFloatString( file, " %f", frame->t[ 0 ] ); + } + if ( joint->animBits & ANIM_TY ) { + WriteFloatString( file, " %f", frame->t[ 1 ] ); + } + if ( joint->animBits & ANIM_TZ ) { + WriteFloatString( file, " %f", frame->t[ 2 ] ); + } + if ( joint->animBits & ANIM_QX ) { + WriteFloatString( file, " %f", frame->q[ 0 ] ); + } + if ( joint->animBits & ANIM_QY ) { + WriteFloatString( file, " %f", frame->q[ 1 ] ); + } + if ( joint->animBits & ANIM_QZ ) { + WriteFloatString( file, " %f", frame->q[ 2 ] ); + } + WriteFloatString( file, "\n" ); + } + } + WriteFloatString( file, "}\n" ); + } + + fclose( file ); + + return true; +} + +bool idExportModel::WriteCamera( const char *filename, idExportOptions &options ) { + int i; + FILE *file; + + file = fopen( filename, "w" ); + if ( !file ) { + return false; + } + + // write version info + WriteFloatString( file, MD5_VERSION_STRING " %d\n", MD5_VERSION ); + WriteFloatString( file, "commandline \"%s\"\n\n", options.commandLine.c_str() ); + + WriteFloatString( file, "numFrames %d\n", camera.Num() ); + WriteFloatString( file, "frameRate %d\n", frameRate ); + WriteFloatString( file, "numCuts %d\n", cameraCuts.Num() ); + + // write out the cuts + WriteFloatString( file, "\ncuts {\n" ); + for( i = 0; i < cameraCuts.Num(); i++ ) { + WriteFloatString( file, "\t%d\n", cameraCuts[ i ] ); + } + WriteFloatString( file, "}\n" ); + + // write out the frames + WriteFloatString( file, "\ncamera {\n" ); + cameraFrame_t *frame = camera.Ptr(); + for( i = 0; i < camera.Num(); i++, frame++ ) { + WriteFloatString( file, "\t( %f %f %f ) ( %f %f %f ) %f\n", frame->t.x, frame->t.y, frame->t.z, frame->q[ 0 ], frame->q[ 1 ], frame->q[ 2 ], frame->fov ); + } + WriteFloatString( file, "}\n" ); + + fclose( file ); + + return true; +} + +/* +============================================================================== + +Maya + +============================================================================== +*/ + +/* +=============== +idMayaExport::~idMayaExport + +=============== +*/ +idMayaExport::~idMayaExport() { + FreeDagNodes(); + + // free up the file in Maya + MFileIO::newFile( true ); +} + +/* +=============== +idMayaExport::TimeForFrame +=============== +*/ +float idMayaExport::TimeForFrame( int num ) const { + MTime time; + + // set time unit to 24 frames per second + time.setUnit( MTime::kFilm ); + time.setValue( num ); + return time.as( MTime::kSeconds ); +} + +/* +=============== +idMayaExport::GetMayaFrameNum +=============== +*/ +int idMayaExport::GetMayaFrameNum( int num ) const { + int frameNum; + + if ( options.cycleStart > options.startframe ) { + // in cycles, the last frame is a duplicate of the first frame, so with cycleStart we need to + // duplicate one of the interior frames instead and chop off the first frame. + frameNum = options.cycleStart + num; + if ( frameNum > options.endframe ) { + frameNum -= options.endframe - options.startframe; + } + if ( frameNum < options.startframe ) { + frameNum = options.startframe + 1; + } + } else { + frameNum = options.startframe + num; + if ( frameNum > options.endframe ) { + frameNum -= options.endframe + 1 - options.startframe; + } + if ( frameNum < options.startframe ) { + frameNum = options.startframe; + } + } + + return frameNum; +} + +/* +=============== +idMayaExport::SetFrame +=============== +*/ +void idMayaExport::SetFrame( int num ) { + MTime time; + int frameNum; + + frameNum = GetMayaFrameNum( num ); + + // set time unit to 24 frames per second + time.setUnit( MTime::kFilm ); + time.setValue( frameNum ); + MGlobal::viewFrame( time ); +} + +/* +=============== +idMayaExport::PruneJoints +=============== +*/ +void idMayaExport::PruneJoints( idStrList &keepjoints, idStr &prefix ) { + int i; + int j; + idExportMesh *mesh; + idExportJoint *joint; + idExportJoint *joint2; + idExportJoint *parent; + int num_weights; + + // if we don't have any joints specified to keep, mark the ones used by the meshes as keep + if ( !keepjoints.Num() && !prefix.Length() ) { + if ( !model.meshes.Num() || options.ignoreMeshes ) { + // export all joints + joint = model.joints.Ptr(); + for( i = 0; i < model.joints.Num(); i++, joint++ ) { + joint->keep = true; + } + } else { + for( i = 0; i < model.meshes.Num(); i++, mesh++ ) { + mesh = model.meshes[ i ]; + for( j = 0; j < mesh->weights.Num(); j++ ) { + mesh->weights[ j ].joint->keep = true; + } + } + } + } else { + // mark the joints to keep + for( i = 0; i < keepjoints.Num(); i++ ) { + joint = model.FindJoint( keepjoints[ i ] ); + if ( joint ) { + joint->keep = true; + } + } + + // count valid meshes + for( i = 0; i < model.meshes.Num(); i++ ) { + mesh = model.meshes[ i ]; + num_weights = 0; + for( j = 0; j < mesh->weights.Num(); j++ ) { + if ( mesh->weights[ j ].joint->keep ) { + num_weights++; + } else if ( prefix.Length() && !mesh->weights[ j ].joint->realname.Cmpn( prefix, prefix.Length() ) ) { + // keep the joint if it's used by the mesh and it has the right prefix + mesh->weights[ j ].joint->keep = true; + num_weights++; + } + } + + if ( num_weights != mesh->weights.Num() ) { + mesh->keep = false; + } + } + } + + // find all joints aren't exported and reparent joint's children + model.export_joints = 0; + joint = model.joints.Ptr(); + for( i = 0; i < model.joints.Num(); i++, joint++ ) { + if ( !joint->keep ) { + joint->exportNode.RemoveFromHierarchy(); + } else { + joint->index = model.export_joints; + model.export_joints++; + + // make sure we are parented to an exported joint + for( parent = joint->exportNode.GetParent(); parent != NULL; parent = parent->exportNode.GetParent() ) { + if ( parent->keep ) { + break; + } + } + + if ( parent != NULL ) { + joint->exportNode.ParentTo( parent->exportNode ); + } else { + joint->exportNode.ParentTo( model.exportHead ); + } + } + } + + // check if we have any duplicate joint names + for( joint = model.exportHead.GetNext(); joint != NULL; joint = joint->exportNode.GetNext() ) { + if ( !joint->keep ) { + MayaError( "Non-kept joint in export tree ('%s')", joint->name.c_str() ); + } + + for( joint2 = model.exportHead.GetNext(); joint2 != NULL; joint2 = joint2->exportNode.GetNext() ) { + if ( ( joint2 != joint ) && ( joint2->name == joint->name ) ) { + MayaError( "Two joints found with the same name ('%s')", joint->name.c_str() ); + } + } + } +} + +/* +=============== +idMayaExport::FreeDagNodes +=============== +*/ +void idMayaExport::FreeDagNodes( void ) { + int i; + + for( i = 0; i < model.joints.Num(); i++ ) { + delete model.joints[ i ].dagnode; + model.joints[ i ].dagnode = NULL; + } +} + +/* +=============== +idMayaExport::GetBindPose +=============== +*/ +void idMayaExport::GetBindPose( MObject &jointNode, idExportJoint *joint, float scale ) { + MStatus status; + MFnDependencyNode fnJoint( jointNode ); + MObject aBindPose = fnJoint.attribute( "bindPose", &status ); + + joint->bindpos = vec3_zero; + joint->bindmat = mat3_default; + + if ( MS::kSuccess == status ) { + unsigned ii; + unsigned jointIndex; + unsigned connLength; + MPlugArray connPlugs; + MPlug pBindPose( jointNode, aBindPose ); + + pBindPose.connectedTo( connPlugs, false, true ); + connLength = connPlugs.length(); + for( ii = 0; ii < connLength; ++ii ) { + if ( connPlugs[ ii ].node().apiType() == MFn::kDagPose ) { + MObject aMember = connPlugs[ ii ].attribute(); + MFnAttribute fnAttr( aMember ); + + if ( fnAttr.name() == "worldMatrix" ) { + jointIndex = connPlugs[ ii ].logicalIndex(); + + MFnDependencyNode nDagPose( connPlugs[ ii ].node() ); + + // construct plugs for this joint's world matrix + MObject aWorldMatrix = nDagPose.attribute( "worldMatrix" ); + MPlug pWorldMatrix( connPlugs[ ii ].node(), aWorldMatrix ); + + pWorldMatrix.selectAncestorLogicalIndex( jointIndex, aWorldMatrix ); + + // get the world matrix data + MObject worldMatrix; + MStatus status = pWorldMatrix.getValue( worldMatrix ); + if ( MS::kSuccess != status ) { + // Problem retrieving world matrix + return; + } + + MFnMatrixData dMatrix( worldMatrix ); + MMatrix wMatrix = dMatrix.matrix( &status ); + + joint->bindmat = ConvertToIdSpace( idMat( wMatrix ) ); + joint->bindpos = ConvertToIdSpace( idVec( wMatrix ) ) * scale; + if ( !options.ignoreScale ) { + joint->bindpos *= joint->scale; + } else { + joint->bindmat[ 0 ].Normalize(); + joint->bindmat[ 1 ].Normalize(); + joint->bindmat[ 2 ].Normalize(); + } + + return; + } + } + } + } +} + +/* +=============== +idMayaExport::GetLocalTransform +=============== +*/ +void idMayaExport::GetLocalTransform( idExportJoint *joint, idVec3 &pos, idMat3 &mat ) { + MStatus status; + MDagPath dagPath; + + pos.Zero(); + mat.Identity(); + + if ( !joint->dagnode ) { + return; + } + + status = joint->dagnode->getPath( dagPath ); + if ( !status ) { + return; + } + + MObject transformNode = dagPath.transform( &status ); + if ( !status && ( status.statusCode () == MStatus::kInvalidParameter ) ) { + return; + } + + MFnDagNode transform( transformNode, &status ); + if ( !status ) { + return; + } + + pos = idVec( transform.transformationMatrix() ); + mat = idMat( transform.transformationMatrix() ); +} + +/* +=============== +idMayaExport::GetWorldTransform +=============== +*/ +void idMayaExport::GetWorldTransform( idExportJoint *joint, idVec3 &pos, idMat3 &mat, float scale ) { + idExportJoint *parent; + + GetLocalTransform( joint, pos, mat ); + mat.OrthoNormalizeSelf(); + pos *= scale; + + parent = joint->mayaNode.GetParent(); + if ( parent ) { + idVec3 parentpos; + idMat3 parentmat; + + GetWorldTransform( parent, parentpos, parentmat, scale ); + + pos = parentpos + ( parentmat * ( pos * parent->scale ) ); + mat = mat * parentmat; + } +} + +/* +=============== +idMayaExport::CreateJoints +=============== +*/ +void idMayaExport::CreateJoints( float scale ) { + int i; + int j; + idExportJoint *joint; + idExportJoint *parent; + MStatus status; + MDagPath dagPath; + MFnDagNode *parentNode; + + SetFrame( 0 ); + + // create an initial list with all of the transformable nodes in the scene + MItDag dagIterator( MItDag::kDepthFirst, MFn::kTransform, &status ); + for ( ; !dagIterator.isDone(); dagIterator.next() ) { + status = dagIterator.getPath( dagPath ); + if ( !status ) { + MayaError( "CreateJoints: MItDag::getPath failed (%s)", status.errorString().asChar() ); + continue; + } + + joint = &model.joints.Alloc(); + joint->index = model.joints.Num() - 1; + joint->dagnode = new MFnDagNode( dagPath, &status ); + if ( !status ) { + MayaError( "CreateJoints: MFnDagNode constructor failed (%s)", status.errorString().asChar() ); + continue; + } + + joint->name = joint->dagnode->name().asChar(); + joint->realname = joint->name; + } + + // allocate an extra joint in case we need to add an origin later + model.exportOrigin = &model.joints.Alloc(); + model.exportOrigin->index = model.joints.Num() - 1; + + // create scene hierarchy + joint = model.joints.Ptr(); + for( i = 0; i < model.joints.Num(); i++, joint++ ) { + if ( !joint->dagnode ) { + continue; + } + joint->mayaNode.ParentTo( model.mayaHead ); + joint->exportNode.ParentTo( model.exportHead ); + + parentNode = GetParent( joint->dagnode ); + if ( parentNode ) { + // find the parent joint in our jointlist + for( j = 0; j < model.joints.Num(); j++ ) { + if ( !model.joints[ j ].dagnode ) { + continue; + } + if ( model.joints[ j ].dagnode->name() == parentNode->name() ) { + joint->mayaNode.ParentTo( model.joints[ j ].mayaNode ); + joint->exportNode.ParentTo( model.joints[ j ].exportNode ); + break; + } + } + + delete parentNode; + } + + // create long name + parent = joint->mayaNode.GetParent(); + if ( parent ) { + joint->longname = parent->longname + "/" + joint->name; + } else { + joint->longname = joint->name; + } + + // get the joint's scale + GetLocalTransform( &model.joints[ i ], joint->t, joint->wm ); + joint->scale = joint->wm[ 0 ].Length(); + + if ( parent ) { + joint->scale *= parent->scale; + if ( joint->scale != 0 ) { + joint->invscale = 1.0f / joint->scale; + } else { + joint->invscale = 0; + } + } + + joint->dagnode->getPath( dagPath ); + GetBindPose( dagPath.node( &status ), joint, scale ); + } +} + +/* +=============== +idMayaExport::RenameJoints +=============== +*/ +void idMayaExport::RenameJoints( idList &renamejoints, idStr &prefix ) { + int i; + idExportJoint *joint; + + // rename joints that match the prefix + if ( prefix.Length() ) { + joint = model.joints.Ptr(); + for( i = 0; i < model.joints.Num(); i++, joint++ ) { + if ( !joint->name.Cmpn( prefix, prefix.Length() ) ) { + // remove the prefix from the name + joint->name = joint->name.Right( joint->name.Length() - prefix.Length() ); + } + } + } + + // rename joints if necessary + for( i = 0; i < renamejoints.Num(); i++ ) { + joint = model.FindJoint( renamejoints[ i ].from ); + if ( joint ) { + joint->name = renamejoints[ i ].to; + } + } +} + +/* +=============== +idMayaExport::RemapParents +=============== +*/ +bool idMayaExport::RemapParents( idList &remapjoints ) { + int i; + idExportJoint *joint; + idExportJoint *parent; + idExportJoint *origin; + idExportJoint *sibling; + + for( i = 0; i < remapjoints.Num(); i++ ) { + // find joint to reparent + joint = model.FindJoint( remapjoints[ i ].from ); + if ( !joint ) { + // couldn't find joint, fail + MayaError( "Couldn't find joint '%s' to reparent\n", remapjoints[ i ].from.c_str() ); + } + + // find new parent joint + parent = model.FindJoint( remapjoints[ i ].to ); + if ( !parent ) { + // couldn't find parent, fail + MayaError( "Couldn't find joint '%s' to be new parent for '%s'\n", remapjoints[ i ].to.c_str(), remapjoints[ i ].from.c_str() ); + } + + if ( parent->exportNode.ParentedBy( joint->exportNode ) ) { + MayaError( "Joint '%s' is a child of joint '%s' and can't become the parent.", joint->name.c_str(), parent->name.c_str() ); + } + joint->exportNode.ParentTo( parent->exportNode ); + } + + // if we have an origin, make it the first node in the export list, otherwise add one + origin = model.FindJoint( "origin" ); + if ( !origin ) { + origin = model.exportOrigin; + origin->dagnode = NULL; + origin->name = "origin"; + origin->realname = "origin"; + origin->bindmat.Identity(); + origin->bindpos.Zero(); + } + + origin->exportNode.ParentTo( model.exportHead ); + + // force the joint to be kept + origin->keep = true; + + // make all root joints children of the origin joint + joint = model.exportHead.GetChild(); + while( joint ) { + sibling = joint->exportNode.GetSibling(); + if ( joint != origin ) { + joint->exportNode.ParentTo( origin->exportNode ); + } + joint = sibling; + } + + return true; +} + +/* +=============== +idMayaExport::FindShader + +Find the shading node for the given shading group set node. +=============== +*/ +MObject idMayaExport::FindShader( MObject& setNode ) { + MStatus status; + MFnDependencyNode fnNode( setNode ); + MPlug shaderPlug; + + shaderPlug = fnNode.findPlug( "surfaceShader" ); + if ( !shaderPlug.isNull() ) { + MPlugArray connectedPlugs; + bool asSrc = false; + bool asDst = true; + shaderPlug.connectedTo( connectedPlugs, asDst, asSrc, &status ); + + if ( connectedPlugs.length() != 1 ) { + MayaError( "FindShader: Error getting shader (%s)", status.errorString().asChar() ); + } else { + return connectedPlugs[ 0 ].node(); + } + } + + return MObject::kNullObj; +} + +/* +=============== +idMayaExport::GetTextureForMesh + +Find the texture files that apply to the color of each polygon of +a selected shape if the shape has its polygons organized into sets. +=============== +*/ +void idMayaExport::GetTextureForMesh( idExportMesh *mesh, MFnDagNode &dagNode ) { + MStatus status; + MDagPath path; + int i; + int instanceNum; + + status = dagNode.getPath( path ); + if ( !status ) { + return; + } + + path.extendToShape(); + + // If the shape is instanced then we need to determine which + // instance this path refers to. + // + instanceNum = 0; + if ( path.isInstanced() ) { + instanceNum = path.instanceNumber(); + } + + // Get a list of all sets pertaining to the selected shape and the + // members of those sets. + // + MFnMesh fnMesh( path ); + MObjectArray sets; + MObjectArray comps; + status = fnMesh.getConnectedSetsAndMembers( instanceNum, sets, comps, true ); + if ( !status ) { + MayaError( "GetTextureForMesh: MFnMesh::getConnectedSetsAndMembers failed (%s)", status.errorString().asChar() ); + } + + // Loop through all the sets. If the set is a polygonal set, find the + // shader attached to the and print out the texture file name for the + // set along with the polygons in the set. + // + for ( i = 0; i < ( int )sets.length(); i++ ) { + MObject set = sets[i]; + MObject comp = comps[i]; + + MFnSet fnSet( set, &status ); + if ( status == MS::kFailure ) { + MayaError( "GetTextureForMesh: MFnSet constructor failed (%s)", status.errorString().asChar() ); + continue; + } + + // Make sure the set is a polygonal set. If not, continue. + MItMeshPolygon piter(path, comp, &status); + if (status == MS::kFailure) { + continue; + } + + // Find the texture that is applied to this set. First, get the + // shading node connected to the set. Then, if there is an input + // attribute called "color", search upstream from it for a texture + // file node. + // + MObject shaderNode = FindShader( set ); + if ( shaderNode == MObject::kNullObj ) { + continue; + } + + MPlug colorPlug = MFnDependencyNode(shaderNode).findPlug("color", &status); + if ( status == MS::kFailure ) { + continue; + } + + MItDependencyGraph dgIt(colorPlug, MFn::kFileTexture, + MItDependencyGraph::kUpstream, + MItDependencyGraph::kBreadthFirst, + MItDependencyGraph::kNodeLevel, + &status); + + if ( status == MS::kFailure ) { + continue; + } + + dgIt.disablePruningOnFilter(); + + // If no texture file node was found, just continue. + // + if ( dgIt.isDone() ) { + continue; + } + + // Print out the texture node name and texture file that it references. + // + MObject textureNode = dgIt.thisNode(); + MPlug filenamePlug = MFnDependencyNode( textureNode ).findPlug( "fileTextureName" ); + MString textureName; + filenamePlug.getValue( textureName ); + + // remove the OS path and save it in the mesh + OSPathToRelativePath( textureName.asChar(), mesh->shader, options.game ); + mesh->shader.StripFileExtension(); + + return; + } +} + +/* +=============== +idMayaExport::CopyMesh +=============== +*/ +idExportMesh *idMayaExport::CopyMesh( MFnSkinCluster &skinCluster, float scale ) { + MStatus status; + MObjectArray objarray; + MObjectArray outputarray; + int nGeom; + int i, j, k; + idExportMesh *mesh; + float uv_u, uv_v; + idStr name, altname; + int pos; + + status = skinCluster.getInputGeometry( objarray ); + if ( !status ) { + MayaError( "CopyMesh: Error getting input geometry (%s)", status.errorString().asChar() ); + return NULL; + } + + nGeom = objarray.length(); + for( i = 0; i < nGeom; i++ ) { + MFnDagNode dagNode( objarray[ i ], &status ); + if ( !status ) { + common->Printf( "CopyMesh: MFnDagNode Constructor failed (%s)", status.errorString().asChar() ); + continue; + } + + MFnMesh fnmesh( objarray[ i ], &status ); + if ( !status ) { + // object isn't an MFnMesh + continue; + } + + status = skinCluster.getOutputGeometry( outputarray ); + if ( !status ) { + common->Printf( "CopyMesh: Error getting output geometry (%s)", status.errorString().asChar() ); + return NULL; + } + + if ( outputarray.length() < 1 ) { + return NULL; + } + + name = fnmesh.name().asChar(); + if ( options.prefix.Length() ) { + if ( !name.Cmpn( options.prefix, options.prefix.Length() ) ) { + // remove the prefix from the name + name = name.Right( name.Length() - options.prefix.Length() ); + } else { + // name doesn't match prefix, so don't use this mesh + //return NULL; + } + } + + pos = name.Find( "ShapeOrig" ); + if ( pos >= 0 ) { + name.CapLength( pos ); + } + + MFnDagNode dagNode2( outputarray[ 0 ], &status ); + if ( !status ) { + common->Printf( "CopyMesh: MFnDagNode Constructor failed (%s)", status.errorString().asChar() ); + continue; + } + + altname = name; + MObject parent = fnmesh.parent( 0, &status ); + if ( status ) { + MFnDagNode parentNode( parent, &status ); + if ( status ) { + altname = parentNode.name().asChar(); + } + } + + name.StripLeadingOnce( options.prefix ); + altname.StripLeadingOnce( options.prefix ); + if ( options.keepmeshes.Num() ) { + if ( !options.keepmeshes.Find( name ) && !options.keepmeshes.Find( altname ) ) { + if ( altname != name ) { + common->Printf( "Skipping mesh '%s' ('%s')\n", name.c_str(), altname.c_str() ); + } else { + common->Printf( "Skipping mesh '%s'\n", name.c_str() ); + } + return NULL; + } + } + + if ( options.skipmeshes.Find( name ) || options.skipmeshes.Find( altname ) ) { + common->Printf( "Skipping mesh '%s' ('%s')\n", name.c_str(), altname.c_str() ); + return NULL; + } + + mesh = new idExportMesh(); + model.meshes.Append( mesh ); + + if ( altname.Length() ) { + mesh->name = altname; + } else { + mesh->name = name; + } + GetTextureForMesh( mesh, dagNode2 ); + + int v = fnmesh.numVertices( &status ); + mesh->verts.SetNum( v ); + + MFloatPointArray vertexArray; + + fnmesh.getPoints( vertexArray, MSpace::kPreTransform ); + + for( j = 0; j < v; j++ ) { + memset( &mesh->verts[ j ], 0, sizeof( mesh->verts[ j ] ) ); + mesh->verts[ j ].pos = ConvertToIdSpace( idVec( vertexArray[ j ] ) ) * scale; + } + + MIntArray vertexList; + int p; + + p = fnmesh.numPolygons( &status ); + mesh->tris.SetNum( p ); + mesh->uv.SetNum( p ); + + MString setName; + + status = fnmesh.getCurrentUVSetName( setName ); + if ( !status ) { + MayaError( "CopyMesh: MFnMesh::getCurrentUVSetName failed (%s)", status.errorString().asChar() ); + } + + for( j = 0; j < p; j++ ) { + fnmesh.getPolygonVertices( j, vertexList ); + if ( vertexList.length() != 3 ) { + MayaError( "CopyMesh: Too many vertices on a face (%d)\n", vertexList.length() ); + } + + for( k = 0; k < 3; k++ ) { + mesh->tris[ j ].indexes[ k ] = vertexList[ k ]; + + status = fnmesh.getPolygonUV( j, k, uv_u, uv_v, &setName ); + if ( !status ) { + MayaError( "CopyMesh: MFnMesh::getPolygonUV failed (%s)", status.errorString().asChar() ); + } + + mesh->uv[ j ].uv[ k ][ 0 ] = uv_u; + mesh->uv[ j ].uv[ k ][ 1 ] = uv_v; + } + } + + return mesh; + } + + return NULL; +} + +/* +=============== +idMayaExport::CreateMesh +=============== +*/ +void idMayaExport::CreateMesh( float scale ) { + size_t count; + idExportMesh *mesh; + MStatus status; + exportWeight_t weight; + unsigned int nGeoms; + + // Iterate through graph and search for skinCluster nodes + MItDependencyNodes iter( MFn::kSkinClusterFilter ); + count = 0; + for ( ; !iter.isDone(); iter.next() ) { + MObject object = iter.item(); + + count++; + + // For each skinCluster node, get the list of influence objects + MFnSkinCluster skinCluster( object, &status ); + if ( !status ) { + MayaError( "%s: Error getting skin cluster (%s)", object.apiTypeStr(), status.errorString().asChar() ); + } + + mesh = CopyMesh( skinCluster, scale ); + if ( !mesh ) { + continue; + } + + MDagPathArray infs; + unsigned int nInfs = skinCluster.influenceObjects(infs, &status); + if ( !status ) { + MayaError( "Mesh '%s': Error getting influence objects (%s)", mesh->name.c_str(), status.errorString().asChar() ); + } + + if ( 0 == nInfs ) { + MayaError( "Mesh '%s': No influence objects found", mesh->name.c_str() ); + } + + // loop through the geometries affected by this cluster + nGeoms = skinCluster.numOutputConnections(); + for (size_t ii = 0; ii < nGeoms; ++ii) { + unsigned int index = skinCluster.indexForOutputConnection(ii,&status); + + if ( !status ) { + MayaError( "Mesh '%s': Error getting geometry index (%s)", mesh->name.c_str(), status.errorString().asChar() ); + } + + // get the dag path of the ii'th geometry + MDagPath skinPath; + status = skinCluster.getPathAtIndex(index,skinPath); + if ( !status ) { + MayaError( "Mesh '%s': Error getting geometry path (%s)", mesh->name.c_str(), status.errorString().asChar() ); + } + + // iterate through the components of this geometry + MItGeometry gIter( skinPath ); + + // print out the influence objects + idList joints; + idExportJoint *joint; + exportVertex_t *vert; + + joints.Resize( nInfs ); + for (size_t kk = 0; kk < nInfs; ++kk) { + const char *c; + MString s; + + s = infs[kk].partialPathName(); + c = s.asChar(); + joint = model.FindJointReal( c ); + if ( !joint ) { + MayaError( "Mesh '%s': joint %s not found", mesh->name.c_str(), c ); + } + + joints.Append( joint ); + } + + for ( /* nothing */ ; !gIter.isDone(); gIter.next() ) { + MObject comp = gIter.component( &status ); + if ( !status ) { + MayaError( "Mesh '%s': Error getting component (%s)", mesh->name.c_str(), status.errorString().asChar() ); + } + + // Get the weights for this vertex (one per influence object) + MFloatArray wts; + unsigned infCount; + status = skinCluster.getWeights(skinPath,comp,wts,infCount); + if ( !status ) { + MayaError( "Mesh '%s': Error getting weights (%s)", mesh->name.c_str(), status.errorString().asChar() ); + } + if (0 == infCount) { + MayaError( "Mesh '%s': Error: 0 influence objects.", mesh->name.c_str() ); + } + + int num = gIter.index(); + vert = &mesh->verts[ num ]; + vert->startweight = mesh->weights.Num(); + + float totalweight = 0.0f; + + // copy the weight data for this vertex + int numNonZeroWeights = 0; + int jj; + for ( jj = 0; jj < (int)infCount ; ++jj ) { + float w = ( float )wts[ jj ]; + if ( w > 0.0f ) { + numNonZeroWeights++; + } + if ( w > options.jointThreshold ) { + weight.joint = joints[ jj ]; + weight.jointWeight = wts[ jj ]; + + if ( !options.ignoreScale ) { + weight.joint->bindmat.ProjectVector( vert->pos - ( weight.joint->bindpos * weight.joint->invscale ), weight.offset ); + weight.offset *= weight.joint->scale; + } else { + weight.joint->bindmat.ProjectVector( vert->pos - weight.joint->bindpos, weight.offset ); + } + mesh->weights.Append( weight ); + totalweight += weight.jointWeight; + } + } + + vert->numWeights = mesh->weights.Num() - vert->startweight; + if ( !vert->numWeights ) { + if ( numNonZeroWeights ) { + MayaError( "Error on mesh '%s': Vertex %d doesn't have any joint weights exceeding jointThreshold (%f).", mesh->name.c_str(), num, options.jointThreshold ); + } else { + MayaError( "Error on mesh '%s': Vertex %d doesn't have any joint weights.", mesh->name.c_str(), num ); + } + } else if ( !totalweight ) { + MayaError( "Error on mesh '%s': Combined weight of 0 on vertex %d.", mesh->name.c_str(), num ); + } + //if ( numNonZeroWeights ) { + // common->Printf( "Mesh '%s': skipped %d out of %d weights on vertex %d\n", mesh->name.c_str(), numNonZeroWeights, numNonZeroWeights + vert->numWeights, num ); + //} + + // normalize the joint weights + for( jj = 0; jj < vert->numWeights; jj++ ) { + mesh->weights[ vert->startweight + jj ].jointWeight /= totalweight; + } + } + break; + } + } + + if ( !count && !options.ignoreMeshes ) { + MayaError( "CreateMesh: No skinClusters found in this scene.\n" ); + } +} + +/* +=============== +idMayaExport::CombineMeshes + +combine surfaces with the same shader. +=============== +*/ +void idMayaExport::CombineMeshes( void ) { + int i, j; + int count; + idExportMesh *mesh; + idExportMesh *combine; + idList oldmeshes; + + oldmeshes = model.meshes; + model.meshes.Clear(); + + count = 0; + for( i = 0; i < oldmeshes.Num(); i++ ) { + mesh = oldmeshes[ i ]; + if ( !mesh->keep ) { + delete mesh; + continue; + } + + combine = NULL; + for( j = 0; j < model.meshes.Num(); j++ ) { + if ( model.meshes[ j ]->shader == mesh->shader ) { + combine = model.meshes[ j ]; + break; + } + } + + if ( combine ) { + combine->Merge( mesh ); + delete mesh; + count++; + } else { + model.meshes.Append( mesh ); + } + } + + // share verts + for( i = 0; i < model.meshes.Num(); i++ ) { + model.meshes[ i ]->ShareVerts(); + } + + common->Printf( "Merged %d meshes\n", count ); +} + +/* +=============== +idMayaExport::GetAlignment +=============== +*/ +void idMayaExport::GetAlignment( idStr &alignName, idMat3 &align, float rotate, int startframe ) { + idVec3 pos; + idExportJoint *joint; + idAngles ang( 0, rotate, 0 ); + idMat3 mat; + + align.Identity(); + + if ( alignName.Length() ) { + SetFrame( 0 ); + + joint = model.FindJoint( alignName ); + if ( !joint ) { + MayaError( "could not find joint '%s' to align model to.\n", alignName.c_str() ); + } + + // found it + GetWorldTransform( joint, pos, mat, 1.0f ); + align[ 0 ][ 0 ] = mat[ 2 ][ 0 ]; + align[ 0 ][ 1 ] = -mat[ 2 ][ 2 ]; + align[ 0 ][ 2 ] = mat[ 2 ][ 1 ]; + + align[ 1 ][ 0 ] = mat[ 0 ][ 0 ]; + align[ 1 ][ 1 ] = -mat[ 0 ][ 2 ]; + align[ 1 ][ 2 ] = mat[ 0 ][ 1 ]; + + align[ 2 ][ 0 ] = mat[ 1 ][ 0 ]; + align[ 2 ][ 1 ] = -mat[ 1 ][ 2 ]; + align[ 2 ][ 2 ] = mat[ 1 ][ 1 ]; + + if ( rotate ) { + align *= ang.ToMat3(); + } + } else if ( rotate ) { + align = ang.ToMat3(); + } + + align.TransposeSelf(); +} + +/* +=============== +idMayaExport::GetObjectType + +return the type of the object +=============== +*/ +const char *idMayaExport::GetObjectType( MObject object ) { + if( object.isNull() ) { + return "(Null)"; + } + + MStatus stat; + MFnDependencyNode dgNode; + MString typeName; + + stat = dgNode.setObject( object ); + typeName = dgNode.typeName( &stat ); + if( MS::kSuccess != stat ) { + // can not get the type name of this object + return "(Unknown)"; + } + + return typeName.asChar(); +} + +/* +=============== +idMayaExport::GetCameraFov +=============== +*/ +float idMayaExport::GetCameraFov( idExportJoint *joint ) { + int childCount; + int j; + double horiz; + double focal; + MStatus status; + const char *n1, *n2; + MFnDagNode *dagnode; + float fov; + + dagnode = joint->dagnode; + + MObject cameraNode = dagnode->object(); + childCount = dagnode->childCount(); + + fov = 90.0f; + for( j = 0; j < childCount; j++ ) { + MObject childNode = dagnode->child( j ); + + n1 = GetObjectType( cameraNode ); + n2 = GetObjectType( childNode ); + if ( ( !strcmp( "transform", n1 ) ) && ( !strcmp( "camera", n2 ) ) ) { + MFnCamera camera( childNode ); + focal = camera.focalLength(); + horiz = camera.horizontalFilmAperture(); + fov = RAD2DEG( 2 * atan( ( horiz * 0.5 ) / ( focal / 25.4 ) ) ); + break; + } + } + + return fov; +} + +/* +=============== +idMayaExport::GetCameraFrame +=============== +*/ +void idMayaExport::GetCameraFrame( idExportJoint *camera, idMat3 &align, cameraFrame_t *cam ) { + idMat3 mat; + idMat3 axis; + idVec3 pos; + + // get the worldspace positions of the joint + GetWorldTransform( camera, pos, axis, 1.0f ); + + // convert to id coordinates + cam->t = ConvertToIdSpace( pos ) * align; + + // correct the orientation for the game + axis = ConvertToIdSpace( axis ) * align; + mat[ 0 ] = -axis[ 2 ]; + mat[ 1 ] = -axis[ 0 ]; + mat[ 2 ] = axis[ 1 ]; + cam->q = mat.ToQuat().ToCQuat(); + + // get it's fov + cam->fov = GetCameraFov( camera ); +} + +/* +=============== +idMayaExport::CreateCameraAnim +=============== +*/ +void idMayaExport::CreateCameraAnim( idMat3 &align ) { + float start, end; + MDagPath dagPath; + int frameNum; + short v; + MStatus status; + cameraFrame_t cam; + idExportJoint *refCam; + idExportJoint *camJoint; + idStr currentCam; + idStr newCam; + MPlug plug; + MFnEnumAttribute cameraAttribute; + + start = TimeForFrame( options.startframe ); + end = TimeForFrame( options.endframe ); + +#if 0 + options.framerate = 60; + model.numFrames = ( int )( ( end - start ) * ( float )options.framerate ) + 1; + model.frameRate = options.framerate; +#else + model.numFrames = options.endframe + 1 - options.startframe; + model.frameRate = options.framerate; +#endif + + common->Printf( "start frame = %d\n end frame = %d\n", options.startframe, options.endframe ); + common->Printf( " start time = %f\n end time = %f\n total time = %f\n", start, end, end - start ); + + if ( start > end ) { + MayaError( "Start frame is greater than end frame." ); + } + + refCam = model.FindJoint( "refcam" ); + if ( refCam == NULL ) { + currentCam = MAYA_DEFAULT_CAMERA; + } else { + MObject cameraNode = refCam->dagnode->object(); + MFnDependencyNode cameraDG( cameraNode, &status ); + if( MS::kSuccess != status ) { + MayaError( "Can't find 'refcam' dependency node." ); + return; + } + + MObject attr = cameraDG.attribute( MString( "Camera" ), &status ); + if( MS::kSuccess != status ) { + MayaError( "Can't find 'Camera' attribute on 'refcam'." ); + return; + } + + plug = MPlug( cameraNode, attr ); + status = cameraAttribute.setObject( attr ); + if( MS::kSuccess != status ) { + MayaError( "Bad 'Camera' attribute on 'refcam'." ); + return; + } + + model.camera.Clear(); + model.cameraCuts.Clear(); + + SetFrame( 0 ); + status = plug.getValue( v ); + currentCam = cameraAttribute.fieldName( v, &status ).asChar(); + if( MS::kSuccess != status ) { + MayaError( "Error getting camera name on frame %d", GetMayaFrameNum( 0 ) ); + } + } + + camJoint = model.FindJoint( currentCam ); + if ( !camJoint ) { + MayaError( "Couldn't find camera '%s'", currentCam.c_str() ); + } + + for( frameNum = 0; frameNum < model.numFrames; frameNum++ ) { + common->Printf( "\rFrame %d/%d...", options.startframe + frameNum, options.endframe ); + +#if 0 + MTime time; + time.setUnit( MTime::kSeconds ); + time.setValue( start + ( ( float )frameNum / ( float )options.framerate ) ); + MGlobal::viewFrame( time ); +#else + SetFrame( frameNum ); +#endif + + // get the position for this frame + GetCameraFrame( camJoint, align, &model.camera.Alloc() ); + + if ( refCam != NULL ) { + status = plug.getValue( v ); + newCam = cameraAttribute.fieldName( v, &status ).asChar(); + if( MS::kSuccess != status ) { + MayaError( "Error getting camera name on frame %d", GetMayaFrameNum( frameNum ) ); + } + + if ( newCam != currentCam ) { + // place a cut at our last frame + model.cameraCuts.Append( model.camera.Num() - 1 ); + + currentCam = newCam; + camJoint = model.FindJoint( currentCam ); + if ( !camJoint ) { + MayaError( "Couldn't find camera '%s'", currentCam.c_str() ); + } + + // get the position for this frame + GetCameraFrame( camJoint, align, &model.camera.Alloc() ); + } + } + } + + common->Printf( "\n" ); +} + +/* +=============== +idMayaExport::GetDefaultPose +=============== +*/ +void idMayaExport::GetDefaultPose( idMat3 &align ) { + float start; + MDagPath dagPath; + idMat3 jointaxis; + idVec3 jointpos; + idExportJoint *joint, *parent; + idBounds bnds; + idBounds meshBounds; + idList frame; + + start = TimeForFrame( options.startframe ); + + common->Printf( "default pose frame = %d\n", options.startframe ); + common->Printf( " default pose time = %f\n", start ); + + frame.SetNum( model.joints.Num() ); + SetFrame( 0 ); + + // convert joints into local coordinates and save in channels + for( joint = model.exportHead.GetNext(); joint != NULL; joint = joint->exportNode.GetNext() ) { + if ( !joint->dagnode ) { + // custom origin joint + joint->idwm.Identity(); + joint->idt.Zero(); + frame[ joint->index ].t.Zero(); + frame[ joint->index ].q.Set( 0.0f, 0.0f, 0.0f ); + continue; + } + + // get the worldspace positions of the joint + GetWorldTransform( joint, jointpos, jointaxis, options.scale ); + + // convert to id coordinates + jointaxis = ConvertToIdSpace( jointaxis ) * align; + jointpos = ConvertToIdSpace( jointpos ) * align; + + // save worldspace position of joint for children + joint->idwm = jointaxis; + joint->idt = jointpos; + + parent = joint->exportNode.GetParent(); + if ( parent ) { + // convert to local coordinates + jointpos = ( jointpos - parent->idt ) * parent->idwm.Transpose(); + jointaxis = jointaxis * parent->idwm.Transpose(); + } else if ( joint->name == "origin" ) { + if ( options.clearOrigin ) { + jointpos.Zero(); + } + if ( options.clearOriginAxis ) { + jointaxis.Identity(); + } + } + + frame[ joint->index ].t = jointpos; + frame[ joint->index ].q = jointaxis.ToQuat().ToCQuat(); + } + + // relocate origin to start at 0, 0, 0 for first frame + joint = model.FindJoint( "origin" ); + if ( joint ) { + frame[ joint->index ].t.Zero(); + } + + // transform the hierarchy + for( joint = model.exportHead.GetNext(); joint != NULL; joint = joint->exportNode.GetNext() ) { + jointpos = frame[ joint->index ].t; + jointaxis = frame[ joint->index ].q.ToQuat().ToMat3(); + + parent = joint->exportNode.GetParent(); + if ( parent ) { + joint->idwm = jointaxis * parent->idwm; + joint->idt = parent->idt + jointpos * parent->idwm; + } else { + joint->idwm = jointaxis; + joint->idt = jointpos; + } + + joint->bindmat = joint->idwm; + joint->bindpos = joint->idt; + } + + common->Printf( "\n" ); +} + +/* +=============== +idMayaExport::CreateAnimation +=============== +*/ +void idMayaExport::CreateAnimation( idMat3 &align ) { + int i; + float start, end; + MDagPath dagPath; + idMat3 jointaxis; + idVec3 jointpos; + int frameNum; + idExportJoint *joint, *parent; + idBounds bnds; + idBounds meshBounds; + jointFrame_t *frame; + int cycleStart; + idVec3 totalDelta; + idList copyFrames; + + start = TimeForFrame( options.startframe ); + end = TimeForFrame( options.endframe ); + + model.numFrames = options.endframe + 1 - options.startframe; + model.frameRate = options.framerate; + + common->Printf( "start frame = %d\n end frame = %d\n", options.startframe, options.endframe ); + common->Printf( " start time = %f\n end time = %f\n total time = %f\n", start, end, end - start ); + + if ( start > end ) { + MayaError( "Start frame is greater than end frame." ); + } + + model.bounds.SetNum( model.numFrames ); + model.jointFrames.SetNum( model.numFrames * model.joints.Num() ); + model.frames.SetNum( model.numFrames ); + for( i = 0; i < model.numFrames; i++ ) { + model.frames[ i ] = &model.jointFrames[ model.joints.Num() * i ]; + } + + // *sigh*. cyclestart doesn't work nicely with the anims. + // may just want to not do it in SetTime anymore. + cycleStart = options.cycleStart; + options.cycleStart = options.startframe; + + for( frameNum = 0; frameNum < model.numFrames; frameNum++ ) { + common->Printf( "\rFrame %d/%d...", options.startframe + frameNum, options.endframe ); + + frame = model.frames[ frameNum ]; + SetFrame( frameNum ); + + // convert joints into local coordinates and save in channels + for( joint = model.exportHead.GetNext(); joint != NULL; joint = joint->exportNode.GetNext() ) { + if ( !joint->dagnode ) { + // custom origin joint + joint->idwm.Identity(); + joint->idt.Zero(); + frame[ joint->index ].t.Zero(); + frame[ joint->index ].q.Set( 0.0f, 0.0f, 0.0f ); + continue; + } + + // get the worldspace positions of the joint + GetWorldTransform( joint, jointpos, jointaxis, options.scale ); + + // convert to id coordinates + jointaxis = ConvertToIdSpace( jointaxis ) * align; + jointpos = ConvertToIdSpace( jointpos ) * align; + + // save worldspace position of joint for children + joint->idwm = jointaxis; + joint->idt = jointpos; + + parent = joint->exportNode.GetParent(); + if ( parent ) { + // convert to local coordinates + jointpos = ( jointpos - parent->idt ) * parent->idwm.Transpose(); + jointaxis = jointaxis * parent->idwm.Transpose(); + } else if ( joint->name == "origin" ) { + if ( options.clearOrigin ) { + jointpos.Zero(); + } + if ( options.clearOriginAxis ) { + jointaxis.Identity(); + } + } + + frame[ joint->index ].t = jointpos; + frame[ joint->index ].q = jointaxis.ToQuat().ToCQuat(); + } + } + + options.cycleStart = cycleStart; + totalDelta.Zero(); + + joint = model.FindJoint( "origin" ); + if ( joint ) { + frame = model.frames[ 0 ]; + idVec3 origin = frame[ joint->index ].t; + + frame = model.frames[ model.numFrames - 1 ]; + totalDelta = frame[ joint->index ].t - origin; + } + + // shift the frames when cycleStart is used + if ( options.cycleStart > options.startframe ) { + copyFrames = model.jointFrames; + for( i = 0; i < model.numFrames; i++ ) { + bool shiftorigin = false; + frameNum = i + ( options.cycleStart - options.startframe ); + if ( frameNum >= model.numFrames ) { + // wrap around, skipping the first frame, since it's a dupe of the last frame + frameNum -= model.numFrames - 1; + shiftorigin = true; + } + + memcpy( &model.jointFrames[ model.joints.Num() * i ], ©Frames[ model.joints.Num() * frameNum ], model.joints.Num() * sizeof( copyFrames[ 0 ] ) ); + + if ( joint && shiftorigin ) { + model.frames[ i ][ joint->index ].t += totalDelta; + } + } + } + + if ( joint ) { + // relocate origin to start at 0, 0, 0 for first frame + frame = model.frames[ 0 ]; + idVec3 origin = frame[ joint->index ].t; + for( i = 0; i < model.numFrames; i++ ) { + frame = model.frames[ i ]; + frame[ joint->index ].t -= origin; + } + } + + // get the bounds for each frame + for( frameNum = 0; frameNum < model.numFrames; frameNum++ ) { + frame = model.frames[ frameNum ]; + + // transform the hierarchy + for( joint = model.exportHead.GetNext(); joint != NULL; joint = joint->exportNode.GetNext() ) { + jointpos = frame[ joint->index ].t; + jointaxis = frame[ joint->index ].q.ToQuat().ToMat3(); + + parent = joint->exportNode.GetParent(); + if ( parent ) { + joint->idwm = jointaxis * parent->idwm; + joint->idt = parent->idt + jointpos * parent->idwm; + } else { + joint->idwm = jointaxis; + joint->idt = jointpos; + } + } + + // get bounds for this frame + bnds.Clear(); + for( i = 0; i < model.meshes.Num(); i++ ) { + if ( model.meshes[ i ]->keep ) { + model.meshes[ i ]->GetBounds( meshBounds ); + bnds.AddBounds( meshBounds ); + } + } + model.bounds[ frameNum ][ 0 ] = bnds[ 0 ]; + model.bounds[ frameNum ][ 1 ] = bnds[ 1 ]; + } + + common->Printf( "\n" ); +} + +/* +=============== +idMayaExport::ConvertModel +=============== +*/ +void idMayaExport::ConvertModel( void ) { + MStatus status; + idMat3 align; + + common->Printf( "Converting %s to %s...\n", options.src.c_str(), options.dest.c_str() ); + + // see if the destination file exists + FILE *file = fopen( options.dest, "r" ); + if ( file ) { + fclose( file ); + + // make sure we can write to the destination + FILE *file = fopen( options.dest, "r+" ); + if ( !file ) { + MayaError( "Unable to write to the file '%s'", options.dest.c_str() ); + } + fclose( file ); + } + + MString filename( options.src ); + MFileIO::newFile( true ); + + // Load the file into Maya + common->Printf( "Loading file...\n" ); + status = MFileIO::open( filename, NULL, true ); + if ( !status ) { + MayaError( "Error loading '%s': '%s'\n", filename.asChar(), status.errorString().asChar() ); + } + + // force Maya to update the frame. When using references, sometimes + // the model is posed the way it is in the source. Since Maya only + // updates it when the frame time changes to a value other than the + // current, just setting the time to the min time doesn't guarantee + // that the model gets updated. + MGlobal::viewFrame( MAnimControl::maxTime() ); + MGlobal::viewFrame( MAnimControl::minTime() ); + + if ( options.startframe < 0 ) { + options.startframe = MAnimControl::minTime().as( MTime::kFilm ); + } + + if ( options.endframe < 0 ) { + options.endframe = MAnimControl::maxTime().as( MTime::kFilm ); + } + if ( options.cycleStart < 0 ) { + options.cycleStart = options.startframe; + } else if ( ( options.cycleStart < options.startframe ) || ( options.cycleStart > options.endframe ) ) { + MayaError( "cycleStart (%d) out of frame range (%d to %d)\n", options.cycleStart, options.startframe, options.endframe ); + } else if ( options.cycleStart == options.endframe ) { + // end frame is a duplicate of the first frame in cycles, so just disable cycleStart + options.cycleStart = options.startframe; + } + + // create a list of the transform nodes that will make up our heirarchy + common->Printf( "Creating joints...\n" ); + CreateJoints( options.scale ); + if ( options.type != WRITE_CAMERA ) { + common->Printf( "Creating meshes...\n" ); + CreateMesh( options.scale ); + common->Printf( "Renaming joints...\n" ); + RenameJoints( options.renamejoints, options.prefix ); + common->Printf( "Remapping parents...\n" ); + RemapParents( options.remapjoints ); + common->Printf( "Pruning joints...\n" ); + PruneJoints( options.keepjoints, options.prefix ); + common->Printf( "Combining meshes...\n" ); + CombineMeshes(); + } + + common->Printf( "Align model...\n" ); + GetAlignment( options.align, align, options.rotate, 0 ); + + switch( options.type ) { + case WRITE_MESH : + common->Printf( "Grabbing default pose:\n" ); + GetDefaultPose( align ); + common->Printf( "Writing file...\n" ); + if ( !model.WriteMesh( options.dest, options ) ) { + MayaError( "error writing to '%s'", options.dest.c_str() ); + } + break; + + case WRITE_ANIM : + common->Printf( "Creating animation frames:\n" ); + CreateAnimation( align ); + common->Printf( "Writing file...\n" ); + if ( !model.WriteAnim( options.dest, options ) ) { + MayaError( "error writing to '%s'", options.dest.c_str() ); + } + break; + + case WRITE_CAMERA : + common->Printf( "Creating camera frames:\n" ); + CreateCameraAnim( align ); + + common->Printf( "Writing file...\n" ); + if ( !model.WriteCamera( options.dest, options ) ) { + MayaError( "error writing to '%s'", options.dest.c_str() ); + } + break; + } + + common->Printf( "done\n\n" ); +} + +/* +=============== +idMayaExport::ConvertToMD3 +=============== +*/ +void idMayaExport::ConvertToMD3( void ) { +#if 0 + int i, j; + md3Header_t *pinmodel; + md3Frame_t *frame; + md3Surface_t *surf; + md3Shader_t *shader; + md3Triangle_t *tri; + md3St_t *st; + md3XyzNormal_t *xyz; + md3Tag_t *tag; + int version; + int size; + + //model_t *mod, int lod, void *buffer, const char *mod_name + + pinmodel = (md3Header_t *)buffer; + + version = LittleLong (pinmodel->version); + if (version != MD3_VERSION) { + common->Printf( "R_LoadMD3: %s has wrong version (%i should be %i)\n", + mod_name, version, MD3_VERSION); + return qfalse; + } + + mod->type = MOD_MESH; + size = LittleLong(pinmodel->ofsEnd); + mod->dataSize += size; + mod->md3[lod] = ri.Hunk_Alloc( size ); + + memcpy (mod->md3[lod], buffer, LittleLong(pinmodel->ofsEnd) ); + + LL(mod->md3[lod]->ident); + LL(mod->md3[lod]->version); + LL(mod->md3[lod]->numFrames); + LL(mod->md3[lod]->numTags); + LL(mod->md3[lod]->numSurfaces); + LL(mod->md3[lod]->ofsFrames); + LL(mod->md3[lod]->ofsTags); + LL(mod->md3[lod]->ofsSurfaces); + LL(mod->md3[lod]->ofsEnd); + + if ( mod->md3[lod]->numFrames < 1 ) { + common->Printf( "R_LoadMD3: %s has no frames\n", mod_name ); + return qfalse; + } + + // swap all the frames + frame = (md3Frame_t *) ( (byte *)mod->md3[lod] + mod->md3[lod]->ofsFrames ); + for ( i = 0 ; i < mod->md3[lod]->numFrames ; i++, frame++) { + frame->radius = LittleFloat( frame->radius ); + for ( j = 0 ; j < 3 ; j++ ) { + frame->bounds[0][j] = LittleFloat( frame->bounds[0][j] ); + frame->bounds[1][j] = LittleFloat( frame->bounds[1][j] ); + frame->localOrigin[j] = LittleFloat( frame->localOrigin[j] ); + } + } + + // swap all the tags + tag = (md3Tag_t *) ( (byte *)mod->md3[lod] + mod->md3[lod]->ofsTags ); + for ( i = 0 ; i < mod->md3[lod]->numTags * mod->md3[lod]->numFrames ; i++, tag++) { + for ( j = 0 ; j < 3 ; j++ ) { + tag->origin[j] = LittleFloat( tag->origin[j] ); + tag->axis[0][j] = LittleFloat( tag->axis[0][j] ); + tag->axis[1][j] = LittleFloat( tag->axis[1][j] ); + tag->axis[2][j] = LittleFloat( tag->axis[2][j] ); + } + } + + // swap all the surfaces + surf = (md3Surface_t *) ( (byte *)mod->md3[lod] + mod->md3[lod]->ofsSurfaces ); + for ( i = 0 ; i < mod->md3[lod]->numSurfaces ; i++) { + + LL(surf->ident); + LL(surf->flags); + LL(surf->numFrames); + LL(surf->numShaders); + LL(surf->numTriangles); + LL(surf->ofsTriangles); + LL(surf->numVerts); + LL(surf->ofsShaders); + LL(surf->ofsSt); + LL(surf->ofsXyzNormals); + LL(surf->ofsEnd); + + if ( surf->numVerts > SHADER_MAX_VERTEXES ) { + ri.Error (ERR_DROP, "R_LoadMD3: %s has more than %i verts on a surface (%i)", + mod_name, SHADER_MAX_VERTEXES, surf->numVerts ); + } + if ( surf->numTriangles*3 > SHADER_MAX_INDEXES ) { + ri.Error (ERR_DROP, "R_LoadMD3: %s has more than %i triangles on a surface (%i)", + mod_name, SHADER_MAX_INDEXES / 3, surf->numTriangles ); + } + + // change to surface identifier + surf->ident = SF_MD3; + + // lowercase the surface name so skin compares are faster + Q_strlwr( surf->name ); + + // strip off a trailing _1 or _2 + // this is a crutch for q3data being a mess + j = strlen( surf->name ); + if ( j > 2 && surf->name[j-2] == '_' ) { + surf->name[j-2] = 0; + } + + // register the shaders + shader = (md3Shader_t *) ( (byte *)surf + surf->ofsShaders ); + for ( j = 0 ; j < surf->numShaders ; j++, shader++ ) { + shader_t *sh; + + sh = R_FindShader( shader->name, LIGHTMAP_NONE, qtrue ); + if ( sh->defaultShader ) { + shader->shaderIndex = 0; + } else { + shader->shaderIndex = sh->index; + } + } + + // swap all the triangles + tri = (md3Triangle_t *) ( (byte *)surf + surf->ofsTriangles ); + for ( j = 0 ; j < surf->numTriangles ; j++, tri++ ) { + LL(tri->indexes[0]); + LL(tri->indexes[1]); + LL(tri->indexes[2]); + } + + // swap all the ST + st = (md3St_t *) ( (byte *)surf + surf->ofsSt ); + for ( j = 0 ; j < surf->numVerts ; j++, st++ ) { + st->st[0] = LittleFloat( st->st[0] ); + st->st[1] = LittleFloat( st->st[1] ); + } + + // swap all the XyzNormals + xyz = (md3XyzNormal_t *) ( (byte *)surf + surf->ofsXyzNormals ); + for ( j = 0 ; j < surf->numVerts * surf->numFrames ; j++, xyz++ ) + { + xyz->xyz[0] = LittleShort( xyz->xyz[0] ); + xyz->xyz[1] = LittleShort( xyz->xyz[1] ); + xyz->xyz[2] = LittleShort( xyz->xyz[2] ); + + xyz->normal = LittleShort( xyz->normal ); + } + + + // find the next surface + surf = (md3Surface_t *)( (byte *)surf + surf->ofsEnd ); + } + return true; +#endif +} + +/* +============================================================================== + +dll setup + +============================================================================== +*/ + +/* +=============== +Maya_Shutdown +=============== +*/ +void Maya_Shutdown( void ) { + if ( initialized ) { + errorMessage.Clear(); + initialized = false; + + // This shuts down the entire app somehow, so just ignore it. + //MLibrary::cleanup(); + } +} + +/* +=============== +Maya_ConvertModel +=============== +*/ +const char *Maya_ConvertModel( const char *ospath, const char *commandline ) { + + errorMessage = "Ok"; + + try { + idExportOptions options( commandline, ospath ); + idMayaExport exportM( options ); + + exportM.ConvertModel(); + } + + catch( idException &exception ) { + errorMessage = exception.error; + } + + return errorMessage; +} + +/* +=============== +dllEntry +=============== +*/ +bool dllEntry( int version, idCommon *common, idSys *sys ) { + + if ( !common || !sys ) { + return false; + } + + ::common = common; + ::sys = sys; + ::cvarSystem = NULL; + + idLib::sys = sys; + idLib::common = common; + idLib::cvarSystem = NULL; + idLib::fileSystem = NULL; + + idLib::Init(); + + if ( version != MD5_VERSION ) { + common->Printf( "Error initializing Maya exporter: DLL version %d different from .exe version %d\n", MD5_VERSION, version ); + return false; + } + + if ( !initialized ) { + MStatus status; + + status = MLibrary::initialize( GAME_NAME, true ); + if ( !status ) { + common->Printf( "Error calling MLibrary::initialize (%s)\n", status.errorString().asChar() ); + return false; + } + + initialized = true; + } + + return true; +} + +// Force type checking on the interface functions to help ensure that they match the ones in the .exe +const exporterDLLEntry_t ValidateEntry = &dllEntry; +const exporterInterface_t ValidateConvert = &Maya_ConvertModel; +const exporterShutdown_t ValidateShutdown = &Maya_Shutdown; diff --git a/neo/MayaImport/maya_main.h b/neo/MayaImport/maya_main.h new file mode 100644 index 0000000..8326008 --- /dev/null +++ b/neo/MayaImport/maya_main.h @@ -0,0 +1,45 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ + +#ifndef __MAYA_MAIN_H__ +#define __MAYA_MAIN_H__ + +/* +============================================================== + + Maya Import + +============================================================== +*/ + + +typedef bool ( *exporterDLLEntry_t )( int version, idCommon *common, idSys *sys ); +typedef const char *( *exporterInterface_t )( const char *ospath, const char *commandline ); +typedef void ( *exporterShutdown_t )( void ); + +#endif /* !__MAYA_MAIN_H__ */ diff --git a/neo/MayaImport/mayaimport.def b/neo/MayaImport/mayaimport.def new file mode 100644 index 0000000..9748f40 --- /dev/null +++ b/neo/MayaImport/mayaimport.def @@ -0,0 +1,4 @@ +EXPORTS + dllEntry + Maya_ConvertModel + Maya_Shutdown diff --git a/neo/SConstruct b/neo/SConstruct new file mode 100644 index 0000000..bc1ee17 --- /dev/null +++ b/neo/SConstruct @@ -0,0 +1,539 @@ +# -*- mode: python -*- +# DOOM build script +# TTimo +# http://scons.sourceforge.net + +import sys, os, time, commands, re, pickle, StringIO, popen2, commands, pdb, zipfile, string +import SCons + +sys.path.append( 'sys/scons' ) +import scons_utils + +conf_filename='site.conf' +# choose configuration variables which should be saved between runs +# ( we handle all those as strings ) +serialized=['CC', 'CXX', 'JOBS', 'BUILD', 'IDNET_HOST', 'GL_HARDLINK', 'DEDICATED', + 'DEBUG_MEMORY', 'LIBC_MALLOC', 'ID_NOLANADDRESS', 'ID_MCHECK', 'ALSA', + 'TARGET_CORE', 'TARGET_GAME', 'TARGET_D3XP', 'TARGET_MONO', 'TARGET_DEMO', 'NOCURL', + 'BUILD_ROOT', 'BUILD_GAMEPAK', 'BASEFLAGS', 'SILENT' ] + +# global build mode ------------------------------ + +g_sdk = not os.path.exists( 'sys/scons/SConscript.core' ) + +# ------------------------------------------------ + +# help ------------------------------------------- + +help_string = """ +Usage: scons [OPTIONS] [TARGET] [CONFIG] + +[OPTIONS] and [TARGET] are covered in command line options, use scons -H + +[CONFIG]: KEY="VALUE" [...] +a number of configuration options saved between runs in the """ + conf_filename + """ file +erase """ + conf_filename + """ to start with default settings again + +CC (default gcc) +CXX (default g++) + Specify C and C++ compilers (defaults gcc and g++) + ex: CC="gcc-3.3" + You can use ccache and distcc, for instance: + CC="ccache distcc gcc" CXX="ccache distcc g++" + +JOBS (default 1) + Parallel build + +BUILD (default debug) + Use debug-all/debug/release to select build settings + ex: BUILD="release" + debug-all: no optimisations, debugging symbols + debug: -O -g + release: all optimisations, including CPU target etc. + +BUILD_ROOT (default 'build') + change the build root directory + +TARGET_GAME (default 1) + Build the base game code + +TARGET_D3XP (default 1) + Build the d3xp game code + +BUILD_GAMEPAK (default 0) + Build a game pak + +BASEFLAGS (default '') + Add compile flags + +NOCONF (default 0, not saved) + ignore site configuration and use defaults + command line only + +SILENT ( default 0, saved ) + hide the compiler output, unless error +""" + +if ( not g_sdk ): + help_string += """ +DEDICATED (default 0) + Control regular / dedicated type of build: + 0 - client + 1 - dedicated server + 2 - both + +TARGET_CORE (default 1) + Build the core + +TARGET_MONO (default 0) + Build a monolithic binary + +TARGET_DEMO (default 0) + Build demo client ( both a core and game, no mono ) + NOTE: if you *only* want the demo client, set TARGET_CORE and TARGET_GAME to 0 + +IDNET_HOST (default to source hardcoded) + Override builtin IDNET_HOST with your own settings + +GL_HARDLINK (default 0) + Instead of dynamically loading the OpenGL libraries, use implicit dependencies + NOTE: no GL logging capability and no r_glDriver with GL_HARDLINK 1 + +DEBUG_MEMORY (default 0) + Enables memory logging to file + +LIBC_MALLOC (default 1) + Toggle idHeap memory / libc malloc usage + When libc malloc is on, memory size statistics are wrong ( no _msize ) + +ID_NOLANADDRESS (default 0) + Don't recognize any IP as LAN address. This is useful when debugging network + code where LAN / not LAN influences application behaviour + +ID_MCHECK (default 2) + Perform heap consistency checking + 0: on in Debug / off in Release + 1 forces on, 2 forces off + note that Doom has it's own block allocator/checking + this should not be considered a replacement, but an additional tool + +ALSA (default 1) + enable ALSA sound backend support + +SETUP (default 0, not saved) + build a setup. implies release build + +SDK (default 0, not saved) + build an SDK release + +NOCURL (default 0) + set to 1 to disable usage of libcurl and http/ftp downloads feature +""" + +Help( help_string ) + +# end help --------------------------------------- + +# sanity ----------------------------------------- + +EnsureSConsVersion( 0, 96 ) + +# end sanity ------------------------------------- + +# system detection ------------------------------- + +# CPU type +cpu = commands.getoutput('uname -m') +exp = re.compile('.*i?86.*') +if exp.match(cpu): + cpu = 'x86' +else: + cpu = commands.getoutput('uname -p') + if ( cpu == 'powerpc' ): + cpu = 'ppc' + else: + cpu = 'cpu' +g_os = 'Linux' + +# end system detection --------------------------- + +# default settings ------------------------------- + +CC = 'gcc' +CXX = 'g++' +JOBS = '1' +BUILD = 'debug' +DEDICATED = '0' +TARGET_CORE = '1' +TARGET_GAME = '1' +TARGET_D3XP = '1' +TARGET_MONO = '0' +TARGET_DEMO = '0' +IDNET_HOST = '' +GL_HARDLINK = '0' +DEBUG_MEMORY = '0' +LIBC_MALLOC = '1' +ID_NOLANADDRESS = '0' +ID_MCHECK = '2' +BUILD_ROOT = 'build' +ALSA = '1' +SETUP = '0' +SDK = '0' +NOCONF = '0' +NOCURL = '0' +BUILD_GAMEPAK = '0' +BASEFLAGS = '' +SILENT = '0' + +# end default settings --------------------------- + +# site settings ---------------------------------- + +if ( not ARGUMENTS.has_key( 'NOCONF' ) or ARGUMENTS['NOCONF'] != '1' ): + site_dict = {} + if (os.path.exists(conf_filename)): + site_file = open(conf_filename, 'r') + p = pickle.Unpickler(site_file) + site_dict = p.load() + print 'Loading build configuration from ' + conf_filename + ':' + for k, v in site_dict.items(): + exec_cmd = k + '=\'' + v + '\'' + print ' ' + exec_cmd + exec(exec_cmd) +else: + print 'Site settings ignored' + +# end site settings ------------------------------ + +# command line settings -------------------------- + +for k in ARGUMENTS.keys(): + exec_cmd = k + '=\'' + ARGUMENTS[k] + '\'' + print 'Command line: ' + exec_cmd + exec( exec_cmd ) + +# end command line settings ---------------------- + +# save site configuration ---------------------- + +if ( not ARGUMENTS.has_key( 'NOCONF' ) or ARGUMENTS['NOCONF'] != '1' ): + for k in serialized: + exec_cmd = 'site_dict[\'' + k + '\'] = ' + k + exec(exec_cmd) + + site_file = open(conf_filename, 'w') + p = pickle.Pickler(site_file) + p.dump(site_dict) + site_file.close() + +# end save site configuration ------------------ + +# configuration rules -------------------------- + +if ( SETUP != '0' ): + DEDICATED = '2' + BUILD = 'release' + +if ( g_sdk or SDK != '0' ): + TARGET_CORE = '0' + TARGET_GAME = '1' + TARGET_D3XP = '1' + TARGET_MONO = '0' + TARGET_DEMO = '0' + +# end configuration rules ---------------------- + +# general configuration, target selection -------- + +g_build = BUILD_ROOT + '/' + BUILD + +SConsignFile( 'scons.signatures' ) + +if ( GL_HARDLINK != '0' ): + g_build += '-hardlink' + +if ( DEBUG_MEMORY != '0' ): + g_build += '-debugmem' + +if ( LIBC_MALLOC != '1' ): + g_build += '-nolibcmalloc' + +SetOption('num_jobs', JOBS) + +LINK = CXX + +# common flags +# BASE + CORE + OPT for engine +# BASE + GAME + OPT for game +# _noopt versions of the environements are built without the OPT + +BASECPPFLAGS = [ ] +CORECPPPATH = [ ] +CORELIBPATH = [ ] +CORECPPFLAGS = [ ] +GAMECPPFLAGS = [ ] +BASELINKFLAGS = [ ] +CORELINKFLAGS = [ ] + +# for release build, further optimisations that may not work on all files +OPTCPPFLAGS = [ ] + +BASECPPFLAGS.append( BASEFLAGS ) +BASECPPFLAGS.append( '-pipe' ) +# warn all +BASECPPFLAGS.append( '-Wall' ) +BASECPPFLAGS.append( '-Wno-unknown-pragmas' ) +# this define is necessary to make sure threading support is enabled in X +CORECPPFLAGS.append( '-DXTHREADS' ) +# don't wrap gcc messages +BASECPPFLAGS.append( '-fmessage-length=0' ) +# gcc 4.0 +BASECPPFLAGS.append( '-fpermissive' ) + +if ( g_os == 'Linux' ): + # gcc 4.x option only - only export what we mean to from the game SO + BASECPPFLAGS.append( '-fvisibility=hidden' ) + # get the 64 bits machine on the distcc array to produce 32 bit binaries :) + BASECPPFLAGS.append( '-m32' ) + BASELINKFLAGS.append( '-m32' ) + +if ( g_sdk or SDK != '0' ): + BASECPPFLAGS.append( '-D_D3SDK' ) + +if ( BUILD == 'debug-all' ): + OPTCPPFLAGS = [ '-g', '-D_DEBUG' ] + if ( ID_MCHECK == '0' ): + ID_MCHECK = '1' +elif ( BUILD == 'debug' ): + OPTCPPFLAGS = [ '-g', '-O1', '-D_DEBUG' ] + if ( ID_MCHECK == '0' ): + ID_MCHECK = '1' +elif ( BUILD == 'release' ): + # -fomit-frame-pointer: "-O also turns on -fomit-frame-pointer on machines where doing so does not interfere with debugging." + # on x86 have to set it explicitely + # -finline-functions: implicit at -O3 + # -fschedule-insns2: implicit at -O2 + # no-unsafe-math-optimizations: that should be on by default really. hit some wonko bugs in physics code because of that + OPTCPPFLAGS = [ '-O3', '-march=pentium3', '-Winline', '-ffast-math', '-fno-unsafe-math-optimizations', '-fomit-frame-pointer' ] + if ( ID_MCHECK == '0' ): + ID_MCHECK = '2' +else: + print 'Unknown build configuration ' + BUILD + sys.exit(0) + +if ( GL_HARDLINK != '0' ): + CORECPPFLAGS.append( '-DID_GL_HARDLINK' ) + +if ( DEBUG_MEMORY != '0' ): + BASECPPFLAGS += [ '-DID_DEBUG_MEMORY', '-DID_REDIRECT_NEWDELETE' ] + +if ( LIBC_MALLOC != '1' ): + BASECPPFLAGS.append( '-DUSE_LIBC_MALLOC=0' ) + +if ( len( IDNET_HOST ) ): + CORECPPFLAGS.append( '-DIDNET_HOST=\\"%s\\"' % IDNET_HOST) + +if ( ID_NOLANADDRESS != '0' ): + CORECPPFLAGS.append( '-DID_NOLANADDRESS' ) + +if ( ID_MCHECK == '1' ): + BASECPPFLAGS.append( '-DID_MCHECK' ) + +# create the build environements +g_base_env = Environment( ENV = os.environ, CC = CC, CXX = CXX, LINK = LINK, CPPFLAGS = BASECPPFLAGS, LINKFLAGS = BASELINKFLAGS, CPPPATH = CORECPPPATH, LIBPATH = CORELIBPATH ) +scons_utils.SetupUtils( g_base_env ) + +g_env = g_base_env.Clone() + +g_env['CPPFLAGS'] += OPTCPPFLAGS +g_env['CPPFLAGS'] += CORECPPFLAGS +g_env['LINKFLAGS'] += CORELINKFLAGS + +g_env_noopt = g_base_env.Clone() +g_env_noopt['CPPFLAGS'] += CORECPPFLAGS + +g_game_env = g_base_env.Clone() +g_game_env['CPPFLAGS'] += OPTCPPFLAGS +g_game_env['CPPFLAGS'] += GAMECPPFLAGS + +# maintain this dangerous optimization off at all times +g_env.Append( CPPFLAGS = '-fno-strict-aliasing' ) +g_env_noopt.Append( CPPFLAGS = '-fno-strict-aliasing' ) +g_game_env.Append( CPPFLAGS = '-fno-strict-aliasing' ) + +if ( int(JOBS) > 1 ): + print 'Using buffered process output' + silent = False + if ( SILENT == '1' ): + silent = True + scons_utils.SetupBufferedOutput( g_env, silent ) + scons_utils.SetupBufferedOutput( g_game_env, silent ) + +# mark the globals + +local_dedicated = 0 +# 0 for monolithic build +local_gamedll = 1 +# carry around rather than using .a, avoids binutils bugs +idlib_objects = [] +game_objects = [] +local_demo = 0 +# curl usage. there is a global toggle flag +local_curl = 0 +curl_lib = [] +# if idlib should produce PIC objects ( depending on core or game inclusion ) +local_idlibpic = 0 +# switch between base game build and d3xp game build +local_d3xp = 0 + +GLOBALS = 'g_env g_env_noopt g_game_env g_os ID_MCHECK ALSA idlib_objects game_objects local_dedicated local_gamedll local_demo local_idlibpic curl_lib local_curl local_d3xp OPTCPPFLAGS' + +# end general configuration ---------------------- + +# targets ---------------------------------------- + +Export( 'GLOBALS ' + GLOBALS ) + +doom = None +doomded = None +game = None +doom_mono = None +doom_demo = None +game_demo = None + +# build curl if needed +if ( NOCURL == '0' and ( TARGET_CORE == '1' or TARGET_MONO == '1' ) ): + # 1: debug, 2: release + if ( BUILD == 'release' ): + local_curl = 2 + else: + local_curl = 1 + Export( 'GLOBALS ' + GLOBALS ) + curl_lib = SConscript( 'sys/scons/SConscript.curl' ) + +if ( TARGET_CORE == '1' ): + local_gamedll = 1 + local_demo = 0 + local_idlibpic = 0 + if ( DEDICATED == '0' or DEDICATED == '2' ): + local_dedicated = 0 + Export( 'GLOBALS ' + GLOBALS ) + + VariantDir( g_build + '/core/glimp', '.', duplicate = 1 ) + SConscript( g_build + '/core/glimp/sys/scons/SConscript.gl' ) + VariantDir( g_build + '/core', '.', duplicate = 0 ) + idlib_objects = SConscript( g_build + '/core/sys/scons/SConscript.idlib' ) + Export( 'GLOBALS ' + GLOBALS ) # update idlib_objects + doom = SConscript( g_build + '/core/sys/scons/SConscript.core' ) + + InstallAs( '#doom.' + cpu, doom ) + + if ( DEDICATED == '1' or DEDICATED == '2' ): + local_dedicated = 1 + Export( 'GLOBALS ' + GLOBALS ) + + VariantDir( g_build + '/dedicated/glimp', '.', duplicate = 1 ) + SConscript( g_build + '/dedicated/glimp/sys/scons/SConscript.gl' ) + VariantDir( g_build + '/dedicated', '.', duplicate = 0 ) + idlib_objects = SConscript( g_build + '/dedicated/sys/scons/SConscript.idlib' ) + Export( 'GLOBALS ' + GLOBALS ) + doomded = SConscript( g_build + '/dedicated/sys/scons/SConscript.core' ) + + InstallAs( '#doomded.' + cpu, doomded ) + +if ( TARGET_GAME == '1' or TARGET_D3XP == '1' ): + local_gamedll = 1 + local_demo = 0 + local_dedicated = 0 + local_idlibpic = 1 + Export( 'GLOBALS ' + GLOBALS ) + dupe = 0 + if ( SDK == '1' ): + # building an SDK, use scons for dependencies walking + # clear the build directory to be safe + g_env.PreBuildSDK( [ g_build + '/game', g_build + '/d3xp' ] ) + dupe = 1 + VariantDir( g_build + '/game', '.', duplicate = dupe ) + idlib_objects = SConscript( g_build + '/game/sys/scons/SConscript.idlib' ) + if ( TARGET_GAME == '1' ): + local_d3xp = 0 + Export( 'GLOBALS ' + GLOBALS ) + game = SConscript( g_build + '/game/sys/scons/SConscript.game' ) + game_base = InstallAs( '#game%s-base.so' % cpu, game ) + if ( BUILD_GAMEPAK == '1' ): + Command( '#game01-base.pk4', [ game_base, game ], Action( g_env.BuildGamePak ) ) + if ( TARGET_D3XP == '1' ): + # uses idlib as compiled for game/ + local_d3xp = 1 + VariantDir( g_build + '/d3xp', '.', duplicate = dupe ) + Export( 'GLOBALS ' + GLOBALS ) + d3xp = SConscript( g_build + '/d3xp/sys/scons/SConscript.game' ) + game_d3xp = InstallAs( '#game%s-d3xp.so' % cpu, d3xp ) + if ( BUILD_GAMEPAK == '1' ): + Command( '#game01-d3xp.pk4', [ game_d3xp, d3xp ], Action( g_env.BuildGamePak ) ) + +if ( TARGET_MONO == '1' ): + # NOTE: no D3XP atm. add a TARGET_MONO_D3XP + local_gamedll = 0 + local_dedicated = 0 + local_demo = 0 + local_idlibpic = 0 + local_d3xp = 0 + Export( 'GLOBALS ' + GLOBALS ) + VariantDir( g_build + '/mono/glimp', '.', duplicate = 1 ) + SConscript( g_build + '/mono/glimp/sys/scons/SConscript.gl' ) + VariantDir( g_build + '/mono', '.', duplicate = 0 ) + idlib_objects = SConscript( g_build + '/mono/sys/scons/SConscript.idlib' ) + game_objects = SConscript( g_build + '/mono/sys/scons/SConscript.game' ) + Export( 'GLOBALS ' + GLOBALS ) + doom_mono = SConscript( g_build + '/mono/sys/scons/SConscript.core' ) + InstallAs( '#doom-mon.' + cpu, doom_mono ) + +if ( TARGET_DEMO == '1' ): + # NOTE: no D3XP atm. add a TARGET_DEMO_D3XP + local_demo = 1 + local_dedicated = 0 + local_gamedll = 1 + local_idlibpic = 0 + local_curl = 0 + local_d3xp = 0 + curl_lib = [] + Export( 'GLOBALS ' + GLOBALS ) + VariantDir( g_build + '/demo/glimp', '.', duplicate = 1 ) + SConscript( g_build + '/demo/glimp/sys/scons/SConscript.gl' ) + VariantDir( g_build + '/demo', '.', duplicate = 0 ) + idlib_objects = SConscript( g_build + '/demo/sys/scons/SConscript.idlib' ) + Export( 'GLOBALS ' + GLOBALS ) + doom_demo = SConscript( g_build + '/demo/sys/scons/SConscript.core' ) + + InstallAs( '#doom-demo.' + cpu, doom_demo ) + + local_idlibpic = 1 + Export( 'GLOBALS ' + GLOBALS ) + VariantDir( g_build + '/demo/game', '.', duplicate = 0 ) + idlib_objects = SConscript( g_build + '/demo/game/sys/scons/SConscript.idlib' ) + Export( 'GLOBALS ' + GLOBALS ) + game_demo = SConscript( g_build + '/demo/game/sys/scons/SConscript.game' ) + + InstallAs( '#game%s-demo.so' % cpu, game_demo ) + +if ( SETUP != '0' ): + brandelf = Program( 'brandelf', 'sys/linux/setup/brandelf.c' ) + if ( TARGET_CORE == '1' and TARGET_GAME == '1' and TARGET_D3XP == '1' ): + setup = Command( 'setup', [ brandelf, doom, doomded, game, d3xp ], Action( g_env.BuildSetup ) ) + else: + print 'Skipping main setup: TARGET_CORE == 0 or TARGET_GAME == 0' + if ( TARGET_DEMO == '1' ): + setup_demo = Command( 'setup-demo', [ brandelf, doom_demo, game_demo ], Action( g_env.BuildSetup ) ) + # if building two setups, make sure JOBS doesn't parallelize them + try: + g_env.Depends( setup_demo, setup ) + except: + pass + else: + print 'Skipping demo setup ( TARGET_DEMO == 0 )' + +if ( SDK != '0' ): + setup_sdk = Command( 'sdk', [ ], Action( g_env.BuildSDK ) ) + g_env.Depends( setup_sdk, [ game, d3xp ] ) + +# end targets ------------------------------------ diff --git a/neo/TypeInfo/TypeInfoGen.cpp b/neo/TypeInfo/TypeInfoGen.cpp new file mode 100644 index 0000000..e8f82c0 --- /dev/null +++ b/neo/TypeInfo/TypeInfoGen.cpp @@ -0,0 +1,1050 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ +#include "../idlib/precompiled.h" +#pragma hdrstop + +#include "TypeInfoGen.h" + +#define TYPE_INFO_GEN_VERSION "1.0" + +/* +================ +idTypeInfoGen::idTypeInfoGen +================ +*/ +idTypeInfoGen::idTypeInfoGen( void ) { +} + +/* +================ +idTypeInfoGen::~idTypeInfoGen +================ +*/ +idTypeInfoGen::~idTypeInfoGen( void ) { + constants.DeleteContents( true ); + enums.DeleteContents( true ); + classes.DeleteContents( true ); +} + +/* +================ +idTypeInfoGen::GetInheritance +================ +*/ +int idTypeInfoGen::GetInheritance( const char *typeName ) const { + int i; + + for ( i = 0; i < classes.Num(); i++ ) { + if ( classes[i]->typeName.Cmp( typeName ) == 0 ) { + if ( classes[i]->superType[0] != '\0' ) { + return 1 + GetInheritance( classes[i]->superType ); + } + break; + } + } + return 0; +} + +/* +================ +idTypeInfoGen::EvaluateIntegerString +================ +*/ +int idTypeInfoGen::EvaluateIntegerString( const idStr &string ) { + idParser src; + idStr evalString; + + if ( string.Find( "::" ) != -1 ) { + return 0; + } + evalString = "$evalint(" + string + ")"; + src.LoadMemory( evalString, evalString.Length(), "eval integer" ); + return src.ParseInt(); +} + +/* +================ +idTypeInfoGen::EvaluateFloatString +================ +*/ +float idTypeInfoGen::EvaluateFloatString( const idStr &string ) { + idParser src; + idStr evalString; + + if ( string.Find( "::" ) != -1 ) { + return 0.0f; + } + evalString = "$evalfloat(" + string + ")"; + src.LoadMemory( evalString, evalString.Length(), "eval float" ); + return src.ParseFloat(); +} + +/* +================ +idTypeInfoGen::FindConstant +================ +*/ +idConstantInfo *idTypeInfoGen::FindConstant( const char *name ) { + int i; + + for ( i = 0; i < constants.Num(); i++ ) { + if ( constants[i]->name.Cmp( name ) == 0 ) { + return constants[i]; + } + } + return NULL; +} + +/* +================ +idTypeInfoGen::GetIntegerConstant +================ +*/ +int idTypeInfoGen::GetIntegerConstant( const char *scope, const char *name, idParser &src ) { + idConstantInfo *constant = FindConstant( idStr( scope ) + name ); + if ( constant == NULL ) { + constant = FindConstant( name ); + } + if ( constant ) { + return EvaluateIntegerString( constant->value ); + } + src.Warning( "unknown value '%s' in constant expression", name ); + return 0; +} + +/* +================ +idTypeInfoGen::GetFloatConstant +================ +*/ +float idTypeInfoGen::GetFloatConstant( const char *scope, const char *name, idParser &src ) { + idConstantInfo *constant = FindConstant( idStr( scope ) + name ); + if ( constant == NULL ) { + constant = FindConstant( name ); + } + if ( constant ) { + return EvaluateFloatString( constant->value ); + } + src.Warning( "unknown value '%s' in constant expression", name ); + return 0; +} + +/* +================ +idTypeInfoGen::ParseArraySize +================ +*/ +int idTypeInfoGen::ParseArraySize( const char *scope, idParser &src ) { + idToken token; + idStr sizeString, constantString; + int size, totalSize; + + if ( !src.CheckTokenString( "[" ) ) { + return 0; + } + + totalSize = 1; + sizeString = ""; + while( src.ReadToken( &token ) ) { + if ( token == "]" ) { + if ( sizeString.Length() ) { + size = EvaluateIntegerString( sizeString ); + if ( size ) { + totalSize *= size; + } + sizeString = ""; + } + if ( !src.CheckTokenString( "[" ) ) { + break; + } + } else if ( token.type == TT_NAME ) { + constantString = token; + while( src.CheckTokenString( "::" ) ) { + src.ExpectTokenType( TT_NAME, 0, &token ); + constantString += "::" + token; + } + sizeString += va( "%d", GetIntegerConstant( scope, constantString, src ) ); + } else { + sizeString += token; + } + } + + return totalSize; +} + +/* +================ +idTypeInfoGen::ParseConstantValue +================ +*/ +void idTypeInfoGen::ParseConstantValue( const char *scope, idParser &src, idStr &value ) { + idToken token; + idStr constantString; + + int indent = 0; + while( src.ReadToken( &token ) ) { + if ( token == "(" ) { + indent++; + } else if ( token == ")" ) { + indent--; + } else if ( indent == 0 && ( token == ";" || token == "," || token == "}" ) ) { + src.UnreadToken( &token ); + break; + } else if ( token.type == TT_NAME ) { + constantString = token; + while( src.CheckTokenString( "::" ) ) { + src.ExpectTokenType( TT_NAME, 0, &token ); + constantString += "::" + token; + } + value += va( "%d", GetIntegerConstant( scope, constantString, src ) ); + continue; + } + value += token; + } +} + +/* +================ +idTypeInfoGen::ParseEnumType +================ +*/ +idEnumTypeInfo *idTypeInfoGen::ParseEnumType( const char *scope, bool isTemplate, bool typeDef, idParser &src ) { + int value; + idToken token; + idEnumTypeInfo *typeInfo; + idEnumValueInfo enumValue; + idStr valueString; + + typeInfo = new idEnumTypeInfo; + typeInfo->scope = scope; + typeInfo->isTemplate = isTemplate; + + if ( src.CheckTokenType( TT_NAME, 0, &token ) ) { + typeInfo->typeName = token; + typeInfo->unnamed = false; + } else { + sprintf( typeInfo->typeName, "enum_%d", enums.Num() ); + typeInfo->unnamed = true; + } + + if ( !src.CheckTokenString( "{" ) ) { + src.UnreadToken( &token ); + delete typeInfo; + return NULL; + } + + value = -1; + while( src.ExpectTokenType( TT_NAME, 0, &token ) ) { + + enumValue.name = token; + + if ( src.CheckTokenString( "=" ) ) { + idStr valueString; + ParseConstantValue( scope, src, valueString ); + if ( valueString.Length() ) { + value = EvaluateIntegerString( valueString ); + } + } else { + value++; + } + + enumValue.value = value; + typeInfo->values.Append( enumValue ); + + // add a constant for the enum value + idConstantInfo *constantInfo = new idConstantInfo; + constantInfo->name = scope + enumValue.name; + constantInfo->type = "int"; + constantInfo->value = va( "%d", value ); + constants.Append( constantInfo ); + + src.CheckTokenString( "," ); + + if ( src.CheckTokenString( "}" ) ) { + break; + } + } + + if ( typeDef ) { + if ( src.CheckTokenType( TT_NAME, 0, &token ) ) { + typeInfo->typeName = token; + typeInfo->unnamed = false; + } + src.ExpectTokenString( ";" ); + } + + //common->Printf( "enum %s%s\n", typeInfo->scope.c_str(), typeInfo->typeName.c_str() ); + + return typeInfo; +} + +/* +================ +idTypeInfoGen::ParseClassType +================ +*/ +idClassTypeInfo *idTypeInfoGen::ParseClassType( const char *scope, const char *templateArgs, bool isTemplate, bool typeDef, idParser &src ) { + idToken token; + idClassTypeInfo *typeInfo; + + typeInfo = new idClassTypeInfo; + typeInfo->scope = scope; + typeInfo->isTemplate = isTemplate; + + if ( src.CheckTokenType( TT_NAME, 0, &token ) ) { + typeInfo->typeName = token + templateArgs; + typeInfo->unnamed = false; + } else { + sprintf( typeInfo->typeName, "class_%d%s", classes.Num(), templateArgs ); + typeInfo->unnamed = true; + } + + if ( src.CheckTokenString( ":" ) ) { + if ( !src.ExpectTokenType( TT_NAME, 0, &token ) ) { + delete typeInfo; + return NULL; + } + while( token == "public" || + token == "protected" || + token == "private" ) { + + if ( !src.ExpectTokenType( TT_NAME, 0, &token ) ) { + delete typeInfo; + return NULL; + } + + typeInfo->superType = token; + + // read template arguments + if ( src.CheckTokenString( "<" ) ) { + + int indent = 1; + typeInfo->superType += "< "; + while( src.ReadToken( &token ) ) { + if ( token == "<" ) { + indent++; + } else if ( token == ">" ) { + indent--; + if ( indent == 0 ) { + break; + } + } + typeInfo->superType += token + " "; + } + typeInfo->superType += ">"; + } + + // check for multiple inheritance + if ( !src.CheckTokenString( "," ) ) { + break; + } + + if ( !src.ExpectTokenType( TT_NAME, 0, &token ) ) { + delete typeInfo; + return NULL; + } + + src.Warning( "multiple inheritance not supported for '%s%s'", typeInfo->scope.c_str(), typeInfo->typeName.c_str() ); + } + } + + if ( !src.CheckTokenString( "{" ) ) { + src.UnreadToken( &token ); + delete typeInfo; + return NULL; + } + + ParseScope( typeInfo->scope + typeInfo->typeName + "::", typeInfo->isTemplate, src, typeInfo ); + + if ( typeDef ) { + if ( src.CheckTokenType( TT_NAME, 0, &token ) ) { + typeInfo->typeName = token + templateArgs; + typeInfo->unnamed = false; + } + src.ExpectTokenString( ";" ); + } + + //common->Printf( "class %s%s : %s\n", typeInfo->scope.c_str(), typeInfo->typeName.c_str(), typeInfo->superType.c_str() ); + + return typeInfo; +} + +/* +================ +idTypeInfoGen::ParseScope +================ +*/ +void idTypeInfoGen::ParseScope( const char *scope, bool isTemplate, idParser &src, idClassTypeInfo *typeInfo ) { + int indent; + idToken token; + idClassTypeInfo *classInfo; + idEnumTypeInfo *enumInfo; + idStr varType; + bool isConst = false; + bool isStatic = false; + + indent = 1; + while( indent ) { + if ( !src.ReadToken( &token ) ) { + break; + } + + if ( token == "{" ) { + + do { + if ( token == "{" ) { + indent++; + } else if ( token == "}" ) { + indent--; + } + varType += token + " "; + } while( indent > 1 && src.ReadToken( &token ) ); + + } else if ( token == "}" ) { + + assert( indent == 1 ); + indent--; + + } else if ( token == "<" ) { + + do { + if ( token == "<" ) { + indent++; + } else if ( token == ">" ) { + indent--; + } + varType += token + " "; + } while( indent > 1 && src.ReadToken( &token ) ); + + } else if ( token == ";" ) { + + varType = ""; + isConst = false; + isStatic = false; + + } else if ( token == "public" || token == "protected" || token == "private" ) { + + if ( !src.ExpectTokenString( ":" ) ) { + break; + } + varType = ""; + isConst = false; + isStatic = false; + + } else if ( token == "friend" ) { + + // skip friend classes/methods + while( src.ReadToken( &token ) ) { + if ( token == "{" ) { + indent++; + } else if ( token == "}" ) { + indent--; + if ( indent == 1 ) { + break; + } + } else if ( token == ";" && indent == 1 ) { + break; + } + } + + varType = ""; + isConst = false; + isStatic = false; + + } else if ( token == "template" ) { + + varType = ""; + + if ( src.CheckTokenString( "<" ) ) { + + int indent = 1; + varType += "< "; + while( src.ReadToken( &token ) ) { + if ( token == "<" ) { + indent++; + } else if ( token == ">" ) { + indent--; + if ( indent == 0 ) { + break; + } + } + varType += token + " "; + } + varType += ">"; + } + + if ( src.CheckTokenString( "class" ) ) { + + // parse template class + classInfo = ParseClassType( scope, varType, true, false, src ); + if ( classInfo ) { + classes.Append( classInfo ); + } + + } else { + + // skip template methods + while( src.ReadToken( &token ) ) { + if ( token == "{" ) { + indent++; + } else if ( token == "}" ) { + indent--; + if ( indent == 1 ) { + break; + } + } else if ( token == ";" && indent == 1 ) { + break; + } + } + } + + varType = ""; + isConst = false; + isStatic = false; + + } else if ( token == "namespace" ) { + + // parse namespace + classInfo = ParseClassType( scope, "", isTemplate, false, src ); + delete classInfo; + + } else if ( token == "class" ) { + + // parse class + classInfo = ParseClassType( scope, "", isTemplate, false, src ); + if ( classInfo ) { + classes.Append( classInfo ); + } + + } else if ( token == "struct" ) { + + // parse struct + classInfo = ParseClassType( scope, "", isTemplate, false, src ); + if ( classInfo ) { + classes.Append( classInfo ); + varType = classInfo->scope + classInfo->typeName; + } + + } else if ( token == "union" ) { + + // parse union + classInfo = ParseClassType( scope, "", isTemplate, false, src ); + if ( classInfo ) { + classes.Append( classInfo ); + } + + } else if ( token == "enum" ) { + + // parse enum + enumInfo = ParseEnumType( scope, isTemplate, false, src ); + if ( enumInfo ) { + enums.Append( enumInfo ); + varType = enumInfo->scope + enumInfo->typeName; + } + + } else if ( token == "typedef" ) { + + if ( token == "class" ) { + + // parse typedef class + classInfo = ParseClassType( scope, "", isTemplate, true, src ); + if ( classInfo ) { + classes.Append( classInfo ); + } + + } else if ( src.CheckTokenString( "struct" ) ) { + + // parse typedef struct + classInfo = ParseClassType( scope, "", isTemplate, true, src ); + if ( classInfo ) { + classes.Append( classInfo ); + } + + } else if ( src.CheckTokenString( "union" ) ) { + + // parse typedef union + classInfo = ParseClassType( scope, "", isTemplate, true, src ); + if ( classInfo ) { + classes.Append( classInfo ); + } + + } else if ( src.CheckTokenString( "enum" ) ) { + + // parse typedef enum + enumInfo = ParseEnumType( scope, isTemplate, true, src ); + if ( enumInfo ) { + enums.Append( enumInfo ); + } + + } else { + + // skip other typedefs + while( src.ReadToken( &token ) ) { + if ( token == "{" ) { + indent++; + } else if ( token == "}" ) { + indent--; + } else if ( token == ";" && indent == 1 ) { + break; + } + } + } + + varType = ""; + isConst = false; + isStatic = false; + + } else if ( token == "const" ) { + + varType += token + " "; + isConst = true; + + } else if ( token == "static" ) { + + varType += token + " "; + isStatic = true; + + } else if ( token.type == TT_NAME ) { + + assert( indent == 1 ); + + // if this is a class operator + if ( token == "operator" ) { + while( src.ReadToken( &token ) ) { + if ( token == "(" ) { + src.UnreadToken( &token ); + break; + } + } + } + + // if this is a class method + if ( src.CheckTokenString( "(" ) ) { + + indent++; + while( indent > 1 && src.ReadToken( &token ) ) { + if ( token == "(" ) { + indent++; + } else if ( token == ")" ) { + indent--; + } + } + + if ( src.CheckTokenString( "(" ) ) { + indent++; + while( indent > 1 && src.ReadToken( &token ) ) { + if ( token == "(" ) { + indent++; + } else if ( token == ")" ) { + indent--; + } + } + } + + if ( src.CheckTokenString( "const" ) ) { + } + + if ( src.CheckTokenString( "=" ) ) { + + src.ExpectTokenString( "0" ); + + } else if ( src.CheckTokenString( "{" ) ) { + indent++; + while( indent > 1 && src.ReadToken( &token ) ) { + if ( token == "{" ) { + indent++; + } else if ( token == "}" ) { + indent--; + } + } + } + + varType = ""; + isConst = false; + isStatic = false; + + } else if ( ( isStatic || isConst ) && src.CheckTokenString( "=" ) ) { + + // constant + idConstantInfo *constantInfo = new idConstantInfo; + constantInfo->name = scope + token; + constantInfo->type = varType; + constantInfo->type.StripTrailing( ' ' ); + ParseConstantValue( scope, src, constantInfo->value ); + constants.Append( constantInfo ); + + } else if ( isStatic ) { + + // static class variable + varType += token + " "; + + } else { + + // check for class variables + while( 1 ) { + + int arraySize = ParseArraySize( scope, src ); + + if ( arraySize ) { + idClassVariableInfo var; + + var.name = token; + var.type = varType; + var.type.StripTrailing( ' ' ); + var.type += va( "[%d]", arraySize ); + var.bits = 0; + typeInfo->variables.Append( var ); + if ( !src.CheckTokenString( "," ) ) { + varType = ""; + isConst = false; + isStatic = false; + break; + } + varType.StripTrailing( "* " ); + + } else { + + int bits = 0; + + if ( src.CheckTokenString( ":" ) ) { + idToken bitSize; + src.ExpectTokenType( TT_NUMBER, TT_INTEGER, &bitSize ); + bits = bitSize.GetIntValue(); + } + + if ( src.CheckTokenString( "," ) ) { + idClassVariableInfo var; + + var.name = token; + var.type = varType; + var.type.StripTrailing( ' ' ); + var.bits = bits; + typeInfo->variables.Append( var ); + varType.StripTrailing( "* " ); + + } else if ( src.CheckTokenString( ";" ) ) { + idClassVariableInfo var; + + var.name = token; + var.type = varType; + var.type.StripTrailing( ' ' ); + var.bits = bits; + typeInfo->variables.Append( var ); + varType = ""; + isConst = false; + isStatic = false; + break; + + } else { + + varType += token + " "; + break; + } + } + + while( src.CheckTokenString( "*" ) ) { + varType += "* "; + } + + if ( !src.ExpectTokenType( TT_NAME, 0, &token ) ) { + break; + } + } + } + } else { + varType += token + " "; + } + } +} + +/* +================ +idTypeInfoGen::AddDefine +================ +*/ +void idTypeInfoGen::AddDefine( const char *define ) { + defines.Append( define ); +} + +/* +================ +idTypeInfoGen::CreateTypeInfo +================ +*/ +void idTypeInfoGen::CreateTypeInfo( const char *path ) { + int i, j, inheritance; + idStr fileName; + idFileList *files; + idParser src; + + common->Printf( "Type Info Generator v"TYPE_INFO_GEN_VERSION" (c) 2004 id Software\n" ); + common->Printf( "%s\n", path ); + + files = fileSystem->ListFilesTree( path, ".cpp" ); + + for ( i = 0; i < files->GetNumFiles(); i++ ) { + + fileName = fileSystem->RelativePathToOSPath( files->GetFile( i ) ); + + common->Printf( "processing '%s' for type info...\n", fileName.c_str() ); + + if ( !src.LoadFile( fileName, true ) ) { + common->Warning( "couldn't load %s", fileName.c_str() ); + continue; + } + + src.SetFlags( LEXFL_NOBASEINCLUDES ); + + for ( j = 0; j < defines.Num(); j++ ) { + src.AddDefine( defines[j] ); + } + + idClassTypeInfo *typeInfo = new idClassTypeInfo; + ParseScope( "", false, src, typeInfo ); + delete typeInfo; + + src.FreeSource(); + + break; + } + + fileSystem->FreeFileList( files ); + + numTemplates = 0; + for ( i = 0; i < classes.Num(); i++ ) { + if ( classes[i]->isTemplate ) { + numTemplates++; + } + } + + maxInheritance = 0; + maxInheritanceClass = ""; + for ( i = 0; i < classes.Num(); i++ ) { + inheritance = GetInheritance( classes[i]->typeName ); + if ( inheritance > maxInheritance ) { + maxInheritance = inheritance; + maxInheritanceClass = classes[i]->typeName; + } + } + + common->Printf( "%d constants\n", constants.Num() ); + common->Printf( "%d enums\n", enums.Num() ); + common->Printf( "%d classes/structs/unions\n", classes.Num() ); + common->Printf( "%d templates\n", numTemplates ); + common->Printf( "%d max inheritance level for '%s'\n", maxInheritance, maxInheritanceClass.c_str() ); +} + +/* +================ +CleanName +================ +*/ +void CleanName( idStr &name ) { + name.Replace( "::", "_" ); + name.Replace( " , ", "_" ); + name.Replace( "< ", "_" ); + name.Replace( " >", "_" ); + name.Replace( " ", "_" ); +} + +/* +================ +idTypeInfoGen::WriteTypeInfo +================ +*/ +void idTypeInfoGen::WriteTypeInfo( const char *fileName ) const { + int i, j; + idStr path, define; + idFile *file; + + path = fileSystem->RelativePathToOSPath( fileName ); + + file = fileSystem->OpenExplicitFileWrite( path ); + if ( !file ) { + common->Warning( "couldn't open %s", path.c_str() ); + return; + } + + common->Printf( "writing %s...\n", path.c_str() ); + + path.ExtractFileName( define ); + define.Replace( ".", "_" ); + define.ToUpper(); + + file->WriteFloatString( + "\n" + "#ifndef __%s__\n" + "#define __%s__\n" + "\n" + "/*\n" + "===================================================================================\n" + "\n" + "\tThis file has been generated with the Type Info Generator v"TYPE_INFO_GEN_VERSION" (c) 2004 id Software\n" + "\n" + "\t%d constants\n" + "\t%d enums\n" + "\t%d classes/structs/unions\n" + "\t%d templates\n" + "\t%d max inheritance level for '%s'\n" + "\n" + "===================================================================================\n" + "*/\n" + "\n", define.c_str(), define.c_str(), constants.Num(), enums.Num(), classes.Num(), + numTemplates, maxInheritance, maxInheritanceClass.c_str() ); + + file->WriteFloatString( + "typedef struct {\n" + "\t" "const char * name;\n" + "\t" "const char * type;\n" + "\t" "const char * value;\n" + "} constantInfo_t;\n" + "\n" + "typedef struct {\n" + "\t" "const char * name;\n" + "\t" "int value;\n" + "} enumValueInfo_t;\n" + "\n" + "typedef struct {\n" + "\t" "const char * typeName;\n" + "\t" "const enumValueInfo_t * values;\n" + "} enumTypeInfo_t;\n" + "\n" + "typedef struct {\n" + "\t" "const char * type;\n" + "\t" "const char * name;\n" + "\t" "int offset;\n" + "\t" "int size;\n" + "} classVariableInfo_t;\n" + "\n" + "typedef struct {\n" + "\t" "const char * typeName;\n" + "\t" "const char * superType;\n" + "\t" "int size;\n" + "\t" "const classVariableInfo_t * variables;\n" + "} classTypeInfo_t;\n" + "\n" ); + + // constants + file->WriteFloatString( "static constantInfo_t constantInfo[] = {\n" ); + + for ( i = 0; i < constants.Num(); i++ ) { + idConstantInfo *info = constants[i]; + file->WriteFloatString( "\t{ \"%s\", \"%s\", \"%s\" },\n", info->type.c_str(), info->name.c_str(), info->value.c_str() ); + } + + file->WriteFloatString( "\t{ NULL, NULL, NULL }\n" ); + file->WriteFloatString( "};\n\n" ); + + // enum values + for ( i = 0; i < enums.Num(); i++ ) { + idEnumTypeInfo *info = enums[i]; + + idStr typeInfoName = info->scope + info->typeName; + CleanName( typeInfoName ); + + file->WriteFloatString( "static enumValueInfo_t %s_typeInfo[] = {\n", typeInfoName.c_str() ); + + for ( j = 0; j < info->values.Num(); j++ ) { + if ( info->isTemplate ) { + file->WriteFloatString( "//" ); + } + file->WriteFloatString( "\t{ \"%s\", %d },\n", info->values[j].name.c_str(), info->values[j].value ); + } + + file->WriteFloatString( "\t{ NULL, 0 }\n" ); + file->WriteFloatString( "};\n\n" ); + } + + // enums + file->WriteFloatString( "static enumTypeInfo_t enumTypeInfo[] = {\n" ); + + for ( i = 0; i < enums.Num(); i++ ) { + idEnumTypeInfo *info = enums[i]; + + idStr typeName = info->scope + info->typeName; + idStr typeInfoName = typeName; + CleanName( typeInfoName ); + + if ( info->isTemplate ) { + file->WriteFloatString( "//" ); + } + file->WriteFloatString( "\t{ \"%s\", %s_typeInfo },\n", typeName.c_str(), typeInfoName.c_str() ); + } + + file->WriteFloatString( "\t{ NULL, NULL }\n" ); + file->WriteFloatString( "};\n\n" ); + + // class variables + for ( i = 0; i < classes.Num(); i++ ) { + idClassTypeInfo *info = classes[i]; + + idStr typeName = info->scope + info->typeName; + idStr typeInfoName = typeName; + CleanName( typeInfoName ); + + file->WriteFloatString( "static classVariableInfo_t %s_typeInfo[] = {\n", typeInfoName.c_str() ); + + for ( j = 0; j < info->variables.Num(); j++ ) { + const char *varName = info->variables[j].name.c_str(); + const char *varType = info->variables[j].type.c_str(); + + if ( info->unnamed || info->isTemplate || info->variables[j].bits != 0 ) { + file->WriteFloatString( "//" ); + } + file->WriteFloatString( "\t{ \"%s\", \"%s\", (int)(&((%s *)0)->%s), sizeof( ((%s *)0)->%s ) },\n", + varType, varName, typeName.c_str(), varName, typeName.c_str(), varName ); + } + + file->WriteFloatString( "\t{ NULL, 0 }\n" ); + file->WriteFloatString( "};\n\n" ); + } + + // classes + file->WriteFloatString( "static classTypeInfo_t classTypeInfo[] = {\n" ); + + for ( i = 0; i < classes.Num(); i++ ) { + idClassTypeInfo *info = classes[i]; + + idStr typeName = info->scope + info->typeName; + idStr typeInfoName = typeName; + CleanName( typeInfoName ); + + if ( info->unnamed || info->isTemplate ) { + file->WriteFloatString( "//" ); + } + file->WriteFloatString( "\t{ \"%s\", \"%s\", sizeof(%s), %s_typeInfo },\n", + typeName.c_str(), info->superType.c_str(), typeName.c_str(), typeInfoName.c_str() ); + } + + file->WriteFloatString( "\t{ NULL, NULL, 0, NULL }\n" ); + file->WriteFloatString( "};\n\n" ); + + file->WriteFloatString( "#endif /* !__%s__ */\n", define.c_str() ); + + fileSystem->CloseFile( file ); +} diff --git a/neo/TypeInfo/TypeInfoGen.h b/neo/TypeInfo/TypeInfoGen.h new file mode 100644 index 0000000..447e394 --- /dev/null +++ b/neo/TypeInfo/TypeInfoGen.h @@ -0,0 +1,116 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ + +#ifndef __TYPEINFOGEN_H__ +#define __TYPEINFOGEN_H__ + +/* +=================================================================================== + + Type Info Generator + + - template classes are commented out (different instantiations are not identified) + - bit fields are commented out (cannot get the address of bit fields) + - multiple inheritance is not supported (only tracks a single super type) + +=================================================================================== +*/ + +class idConstantInfo { +public: + idStr name; + idStr type; + idStr value; +}; + +class idEnumValueInfo { +public: + idStr name; + int value; +}; + +class idEnumTypeInfo { +public: + idStr typeName; + idStr scope; + bool unnamed; + bool isTemplate; + idList values; +}; + +class idClassVariableInfo { +public: + idStr name; + idStr type; + int bits; +}; + +class idClassTypeInfo { +public: + idStr typeName; + idStr superType; + idStr scope; + bool unnamed; + bool isTemplate; + idList variables; +}; + +class idTypeInfoGen { +public: + idTypeInfoGen( void ); + ~idTypeInfoGen( void ); + + void AddDefine( const char *define ); + void CreateTypeInfo( const char *path ); + void WriteTypeInfo( const char *fileName ) const; + +private: + idStrList defines; + + idList constants; + idList enums; + idList classes; + + int numTemplates; + int maxInheritance; + idStr maxInheritanceClass; + + int GetInheritance( const char *typeName ) const; + int EvaluateIntegerString( const idStr &string ); + float EvaluateFloatString( const idStr &string ); + idConstantInfo * FindConstant( const char *name ); + int GetIntegerConstant( const char *scope, const char *name, idParser &src ); + float GetFloatConstant( const char *scope, const char *name, idParser &src ); + int ParseArraySize( const char *scope, idParser &src ); + void ParseConstantValue( const char *scope, idParser &src, idStr &value ); + idEnumTypeInfo * ParseEnumType( const char *scope, bool isTemplate, bool typeDef, idParser &src ); + idClassTypeInfo * ParseClassType( const char *scope, const char *templateArgs, bool isTemplate, bool typeDef, idParser &src ); + void ParseScope( const char *scope, bool isTemplate, idParser &src, idClassTypeInfo *typeInfo ); +}; + +#endif /* !__TYPEINFOGEN_H__ */ diff --git a/neo/TypeInfo/main.cpp b/neo/TypeInfo/main.cpp new file mode 100644 index 0000000..da348e4 --- /dev/null +++ b/neo/TypeInfo/main.cpp @@ -0,0 +1,307 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ + +#include "../idlib/precompiled.h" +#include "../sys/sys_local.h" +#pragma hdrstop + +#include "TypeInfoGen.h" + +idSession * session = NULL; +idDeclManager * declManager = NULL; +idEventLoop * eventLoop = NULL; + +int idEventLoop::JournalLevel( void ) const { return 0; } + +/* +============================================================== + + idCommon + +============================================================== +*/ + +#define STDIO_PRINT( pre, post ) \ + va_list argptr; \ + va_start( argptr, fmt ); \ + printf( pre ); \ + vprintf( fmt, argptr ); \ + printf( post ); \ + va_end( argptr ) + + +class idCommonLocal : public idCommon { +public: + idCommonLocal( void ) {} + + virtual void Init( int argc, const char **argv, const char *cmdline ) {} + virtual void Shutdown( void ) {} + virtual void Quit( void ) {} + virtual bool IsInitialized( void ) const { return true; } + virtual void Frame( void ) {} + virtual void GUIFrame( bool execCmd, bool network ) {} + virtual void Async( void ) {} + virtual void StartupVariable( const char *match, bool once ) {} + virtual void InitTool( const toolFlag_t tool, const idDict *dict ) {} + virtual void ActivateTool( bool active ) {} + virtual void WriteConfigToFile( const char *filename ) {} + virtual void WriteFlaggedCVarsToFile( const char *filename, int flags, const char *setCmd ) {} + virtual void BeginRedirect( char *buffer, int buffersize, void (*flush)( const char * ) ) {} + virtual void EndRedirect( void ) {} + virtual void SetRefreshOnPrint( bool set ) {} + virtual void Printf( const char *fmt, ... ) { STDIO_PRINT( "", "" ); } + virtual void VPrintf( const char *fmt, va_list arg ) { vprintf( fmt, arg ); } + virtual void DPrintf( const char *fmt, ... ) { /*STDIO_PRINT( "", "" );*/ } + virtual void Warning( const char *fmt, ... ) { STDIO_PRINT( "WARNING: ", "\n" ); } + virtual void DWarning( const char *fmt, ...) { /*STDIO_PRINT( "WARNING: ", "\n" );*/ } + virtual void PrintWarnings( void ) {} + virtual void ClearWarnings( const char *reason ) {} + virtual void Error( const char *fmt, ... ) { STDIO_PRINT( "ERROR: ", "\n" ); exit(0); } + virtual void FatalError( const char *fmt, ... ) { STDIO_PRINT( "FATAL ERROR: ", "\n" ); exit(0); } + virtual const idLangDict *GetLanguageDict() { return NULL; } + virtual const char * KeysFromBinding( const char *bind ) { return NULL; } + virtual const char * BindingFromKey( const char *key ) { return NULL; } + virtual int ButtonState( int key ) { return 0; } + virtual int KeyState( int key ) { return 0; } +}; + +idCVar com_developer( "developer", "0", CVAR_BOOL|CVAR_SYSTEM, "developer mode" ); + +idCommonLocal commonLocal; +idCommon * common = &commonLocal; + +/* +============================================================== + + idSys + +============================================================== +*/ + +void Sys_Mkdir( const char *path ) {} +ID_TIME_T Sys_FileTimeStamp( FILE *fp ) { return 0; } + +#ifdef _WIN32 + +#include +#include + +const char *Sys_Cwd( void ) { + static char cwd[1024]; + + _getcwd( cwd, sizeof( cwd ) - 1 ); + cwd[sizeof( cwd ) - 1] = 0; + + int i = idStr::FindText( cwd, CD_BASEDIR, false ); + if ( i >= 0 ) { + cwd[i + strlen( CD_BASEDIR )] = '\0'; + } + + return cwd; +} + +const char *Sys_DefaultCDPath( void ) { + return ""; +} + +const char *Sys_DefaultBasePath( void ) { + return Sys_Cwd(); +} + +const char *Sys_DefaultSavePath( void ) { + return cvarSystem->GetCVarString( "fs_basepath" ); +} + +const char *Sys_EXEPath( void ) { + return ""; +} + +int Sys_ListFiles( const char *directory, const char *extension, idStrList &list ) { + idStr search; + struct _finddata_t findinfo; + int findhandle; + int flag; + + if ( !extension) { + extension = ""; + } + + // passing a slash as extension will find directories + if ( extension[0] == '/' && extension[1] == 0 ) { + extension = ""; + flag = 0; + } else { + flag = _A_SUBDIR; + } + + sprintf( search, "%s\\*%s", directory, extension ); + + // search + list.Clear(); + + findhandle = _findfirst( search, &findinfo ); + if ( findhandle == -1 ) { + return -1; + } + + do { + if ( flag ^ ( findinfo.attrib & _A_SUBDIR ) ) { + list.Append( findinfo.name ); + } + } while ( _findnext( findhandle, &findinfo ) != -1 ); + + _findclose( findhandle ); + + return list.Num(); +} + +#else + +const char * Sys_DefaultCDPath( void ) { return ""; } +const char * Sys_DefaultBasePath( void ) { return ""; } +const char * Sys_DefaultSavePath( void ) { return ""; } +int Sys_ListFiles( const char *directory, const char *extension, idStrList &list ) { return 0; } + +#endif + +xthreadInfo * g_threads[MAX_THREADS]; +int g_thread_count; + +void Sys_CreateThread( xthread_t function, void *parms, xthreadPriority priority, xthreadInfo &info, const char *name, xthreadInfo *threads[MAX_THREADS], int *thread_count ) {} +void Sys_DestroyThread( xthreadInfo& info ) {} + +void Sys_EnterCriticalSection( int index ) {} +void Sys_LeaveCriticalSection( int index ) {} + +void Sys_WaitForEvent( int index ) {} +void Sys_TriggerEvent( int index ) {} + +/* +============== +idSysLocal stub +============== +*/ +void idSysLocal::DebugPrintf( const char *fmt, ... ) {} +void idSysLocal::DebugVPrintf( const char *fmt, va_list arg ) {} + +double idSysLocal::GetClockTicks( void ) { return 0.0; } +double idSysLocal::ClockTicksPerSecond( void ) { return 1.0; } +cpuid_t idSysLocal::GetProcessorId( void ) { return (cpuid_t)0; } +const char * idSysLocal::GetProcessorString( void ) { return ""; } +const char * idSysLocal::FPU_GetState( void ) { return ""; } +bool idSysLocal::FPU_StackIsEmpty( void ) { return true; } +void idSysLocal::FPU_SetFTZ( bool enable ) {} +void idSysLocal::FPU_SetDAZ( bool enable ) {} + +bool idSysLocal::LockMemory( void *ptr, int bytes ) { return false; } +bool idSysLocal::UnlockMemory( void *ptr, int bytes ) { return false; } + +void idSysLocal::GetCallStack( address_t *callStack, const int callStackSize ) { memset( callStack, 0, callStackSize * sizeof( callStack[0] ) ); } +const char * idSysLocal::GetCallStackStr( const address_t *callStack, const int callStackSize ) { return ""; } +const char * idSysLocal::GetCallStackCurStr( int depth ) { return ""; } +void idSysLocal::ShutdownSymbols( void ) {} + +int idSysLocal::DLL_Load( const char *dllName ) { return 0; } +void * idSysLocal::DLL_GetProcAddress( int dllHandle, const char *procName ) { return NULL; } +void idSysLocal::DLL_Unload( int dllHandle ) { } +void idSysLocal::DLL_GetFileName( const char *baseName, char *dllName, int maxLength ) { } + +sysEvent_t idSysLocal::GenerateMouseButtonEvent( int button, bool down ) { sysEvent_t ev; memset( &ev, 0, sizeof( ev ) ); return ev; } +sysEvent_t idSysLocal::GenerateMouseMoveEvent( int deltax, int deltay ) { sysEvent_t ev; memset( &ev, 0, sizeof( ev ) ); return ev; } + +void idSysLocal::OpenURL( const char *url, bool quit ) { } +void idSysLocal::StartProcess( const char *exeName, bool quit ) { } + +void idSysLocal::FPU_EnableExceptions( int exceptions ) { } + +idSysLocal sysLocal; +idSys * sys = &sysLocal; + + +/* +============================================================== + + main + +============================================================== +*/ + +int main( int argc, char** argv ) { + idStr fileName, sourcePath; + idTypeInfoGen *generator; + + idLib::common = common; + idLib::cvarSystem = cvarSystem; + idLib::fileSystem = fileSystem; + idLib::sys = sys; + + idLib::Init(); + cmdSystem->Init(); + cvarSystem->Init(); + idCVar::RegisterStaticVars(); + fileSystem->Init(); + + generator = new idTypeInfoGen; + + if ( argc > 1 ) { + sourcePath = idStr( "../"SOURCE_CODE_BASE_FOLDER"/" ) + argv[1]; + } else { + sourcePath = "../"SOURCE_CODE_BASE_FOLDER"/game"; + } + + if ( argc > 2 ) { + fileName = idStr( "../"SOURCE_CODE_BASE_FOLDER"/" ) + argv[2]; + } else { + fileName = "../"SOURCE_CODE_BASE_FOLDER"/game/gamesys/GameTypeInfo.h"; + } + + if ( argc > 3 ) { + for ( int i = 3; i < argc; i++ ) { + generator->AddDefine( argv[i] ); + } + } else { + generator->AddDefine( "__cplusplus" ); + generator->AddDefine( "GAME_DLL" ); + generator->AddDefine( "ID_TYPEINFO" ); + } + + generator->CreateTypeInfo( sourcePath ); + generator->WriteTypeInfo( fileName ); + + delete generator; + + fileName.Clear(); + sourcePath.Clear(); + + fileSystem->Shutdown( false ); + cvarSystem->Shutdown(); + cmdSystem->Shutdown(); + idLib::ShutDown(); + + return 0; +} diff --git a/neo/_Common.props b/neo/_Common.props new file mode 100644 index 0000000..c0d6223 --- /dev/null +++ b/neo/_Common.props @@ -0,0 +1,17 @@ + + + + <_ProjectFileVersion>10.0.40219.1 + <_PropertySheetDisplayName>Common Project Properties + ..\build\$(PlatformName)\$(Configuration)\ + ..\build\$(PlatformName)\$(Configuration)\intermediate\$(ProjectName)\ + + + + WIN32;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;_USE_32BIT_TIME_T;%(PreprocessorDefinitions) + Level4 + + + + + \ No newline at end of file diff --git a/neo/_Curl.props b/neo/_Curl.props new file mode 100644 index 0000000..526cb4e --- /dev/null +++ b/neo/_Curl.props @@ -0,0 +1,13 @@ + + + + <_ProjectFileVersion>10.0.40219.1 + <_PropertySheetDisplayName>Curl Library + + + + Level3 + USRDLL;CURLLIB_EXPORTS;%(PreprocessorDefinitions) + + + \ No newline at end of file diff --git a/neo/_Debug.props b/neo/_Debug.props new file mode 100644 index 0000000..315fa21 --- /dev/null +++ b/neo/_Debug.props @@ -0,0 +1,24 @@ + + + + <_ProjectFileVersion>10.0.40219.1 + <_PropertySheetDisplayName>Debug + + + + Disabled + _DEBUG;%(PreprocessorDefinitions) + EnableFastChecks + false + MultiThreadedDebug + true + ProgramDatabase + + + nafxcwd.lib;libcmtd.lib;%(AdditionalDependencies) + nafxcwd.lib;libcmtd.lib;%(IgnoreSpecificDefaultLibraries) + true + true + + + \ No newline at end of file diff --git a/neo/_Dedicated.props b/neo/_Dedicated.props new file mode 100644 index 0000000..cea663f --- /dev/null +++ b/neo/_Dedicated.props @@ -0,0 +1,12 @@ + + + + <_ProjectFileVersion>10.0.40219.1 + <_PropertySheetDisplayName>Dedicated + + + + ID_DEDICATED;%(PreprocessorDefinitions) + + + \ No newline at end of file diff --git a/neo/_DoomDLL.props b/neo/_DoomDLL.props new file mode 100644 index 0000000..8461f0e --- /dev/null +++ b/neo/_DoomDLL.props @@ -0,0 +1,26 @@ + + + + <_ProjectFileVersion>10.0.40219.1 + <_PropertySheetDisplayName>Doom III Executable + + + + sound/vorbis/include;%(AdditionalIncludeDirectories) + __DOOM__;__DOOM_DLL__;%(PreprocessorDefinitions) + + + Level3 + + + dbghelp.lib;dinput8.lib;dsound.lib;dxguid.lib;DxErr.lib;eaxguid.lib;glu32.lib;iphlpapi.lib;odbc32.lib;odbccp32.lib;opengl32.lib;winmm.lib;wsock32.lib;%(AdditionalDependencies) + C:\Program Files (x86)\Microsoft DirectX SDK (June 2010)\Lib\x86;openal\lib;sys\win32\dongle;%(AdditionalLibraryDirectories) + $(OutDir)DOOM3.exe + %(AdditionalManifestDependencies) + Windows + 16777216 + 16777216 + true + + + \ No newline at end of file diff --git a/neo/_Game-d3xp.props b/neo/_Game-d3xp.props new file mode 100644 index 0000000..b7309e6 --- /dev/null +++ b/neo/_Game-d3xp.props @@ -0,0 +1,20 @@ + + + + <_ProjectFileVersion>10.0.40219.1 + <_PropertySheetDisplayName>Game d3xp Library + + + + __DOOM__;GAME_DLL;_D3XP;CTF;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + $(OutDir)gamex86.dll + .\d3xp\game.def + + + ..\build\Win32\"$(Configuration)"\TypeInfo.exe + + + \ No newline at end of file diff --git a/neo/_Game.props b/neo/_Game.props new file mode 100644 index 0000000..c8a0402 --- /dev/null +++ b/neo/_Game.props @@ -0,0 +1,22 @@ + + + + <_ProjectFileVersion>10.0.40219.1 + <_PropertySheetDisplayName>Game Library + + + + __DOOM__;GAME_DLL;%(PreprocessorDefinitions) + %(AdditionalIncludeDirectories) + + + + + $(OutDir)gamex86.dll + .\game\game.def + + + ..\build\Win32\"$(Configuration)"\TypeInfo.exe + + + \ No newline at end of file diff --git a/neo/_MayaImport.props b/neo/_MayaImport.props new file mode 100644 index 0000000..711467c --- /dev/null +++ b/neo/_MayaImport.props @@ -0,0 +1,19 @@ + + + + <_ProjectFileVersion>10.0.40219.1 + <_PropertySheetDisplayName>MayaImport Library + + + + mssdk/include;MayaImport/Maya5.0;%(AdditionalIncludeDirectories) + _USRDLL;MAYAIMPORT_EXPORTS;MAYA_IMPORT;REQUIRE_IOSTREAM;%(PreprocessorDefinitions) + Use + Level3 + + + Foundation.lib;OpenMaya.lib;OpenMayaAnim.lib;%(AdditionalDependencies) + MayaImport/maya5.0/libs;%(AdditionalLibraryDirectories) + + + \ No newline at end of file diff --git a/neo/_Release.props b/neo/_Release.props new file mode 100644 index 0000000..1ce0627 --- /dev/null +++ b/neo/_Release.props @@ -0,0 +1,30 @@ + + + + <_ProjectFileVersion>10.0.40219.1 + <_PropertySheetDisplayName>Release + + + + MaxSpeed + AnySuitable + true + true + NDEBUG;%(PreprocessorDefinitions) + true + MultiThreaded + false + true + true + ProgramDatabase + + + nafxcw.lib;libcmt.lib;%(AdditionalDependencies) + nafxcw.lib;libcmt.lib;%(IgnoreSpecificDefaultLibraries) + false + false + true + true + + + \ No newline at end of file diff --git a/neo/_TypeInfo.props b/neo/_TypeInfo.props new file mode 100644 index 0000000..464ead9 --- /dev/null +++ b/neo/_TypeInfo.props @@ -0,0 +1,16 @@ + + + + <_ProjectFileVersion>10.0.40219.1 + <_PropertySheetDisplayName>TypeInfo + + + + ID_ENABLE_CURL=0;ID_TYPEINFO;__DOOM_DLL__;%(PreprocessorDefinitions) + Use + + + Console + + + \ No newline at end of file diff --git a/neo/_WithInlines.props b/neo/_WithInlines.props new file mode 100644 index 0000000..ac88a6a --- /dev/null +++ b/neo/_WithInlines.props @@ -0,0 +1,13 @@ + + + + <_ProjectFileVersion>10.0.40219.1 + <_PropertySheetDisplayName>With Inlines + + + + OnlyExplicitInline + _INLINEDEBUG;%(PreprocessorDefinitions) + + + \ No newline at end of file diff --git a/neo/_WithMemoryLog.props b/neo/_WithMemoryLog.props new file mode 100644 index 0000000..79867b5 --- /dev/null +++ b/neo/_WithMemoryLog.props @@ -0,0 +1,12 @@ + + + + <_ProjectFileVersion>10.0.40219.1 + <_PropertySheetDisplayName>With Memory Log + + + + ID_REDIRECT_NEWDELETE;ID_DEBUG_MEMORY;ID_DEBUG_UNINITIALIZED_MEMORY;%(PreprocessorDefinitions) + + + \ No newline at end of file diff --git a/neo/_idlib.props b/neo/_idlib.props new file mode 100644 index 0000000..3d7dc2f --- /dev/null +++ b/neo/_idlib.props @@ -0,0 +1,13 @@ + + + + <_ProjectFileVersion>10.0.40219.1 + <_PropertySheetDisplayName>idlib + + + + __IDLIB__;%(PreprocessorDefinitions) + Use + + + \ No newline at end of file diff --git a/neo/clean.bat b/neo/clean.bat new file mode 100644 index 0000000..f45d42c --- /dev/null +++ b/neo/clean.bat @@ -0,0 +1,53 @@ +rmdir debug /s /q +rmdir release /s /q +del quake3.ncb +del quake3.opt +del quake3.plg +del quake3.stt +rmdir cgame\debug /s /q +rmdir cgame\release /s /q +del cgame\cgame.ncb +del cgame\cgame.opt +del cgame\cgame.plg +del cgame\cgame.stt +rmdir game\debug /s /q +rmdir game\release /s /q +del game\game.ncb +del game\game.opt +del game\game.plg +del game\game.stt +rmdir ui\debug /s /q +rmdir ui\release /s /q +del ui\ui.ncb +del ui\ui.opt +del ui\ui.plg +del ui\ui.stt +rmdir renderer\debug /s /q +rmdir renderer\release /s /q +del renderer\renderer.ncb +del renderer\renderer.opt +del renderer\renderer.plg +del renderer\renderer.stt +rmdir botlib\debug /s /q +rmdir botlib\release /s /q +del botlib\botlib.ncb +del botlib\botlib.opt +del botlib\botlib.plg +del botlib\botlib.stt +rmdir botlai\debug /s /q +rmdir botlai\release /s /q +del botai\botai.dsp +del botai\botai.plg +rmdir bspc\debug /s /q +rmdir bspc\release /s /q +del bspc\bspc.exe +del bspc\bspc.log +del bspc\bspc.ncb +del bspc\bspc.opt +del bspc\bspc.pdb +del bspc\bspc.plg +rmdir unix\debugi386-glibc /s /q +rmdir unix\releasei386-glibc /s /q +rmdir "mac\MacQuake3 Data" /s /q +rmdir macosx\Client\Q3Test.app /s /q +rmdir macosx\Client\Q3Test.build /s /q diff --git a/neo/cm/CollisionModel.h b/neo/cm/CollisionModel.h new file mode 100644 index 0000000..cabde2d --- /dev/null +++ b/neo/cm/CollisionModel.h @@ -0,0 +1,148 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ + +#ifndef __COLLISIONMODELMANAGER_H__ +#define __COLLISIONMODELMANAGER_H__ + +/* +=============================================================================== + + Trace model vs. polygonal model collision detection. + + Short translations are the least expensive. Retrieving contact points is + about as cheap as a short translation. Position tests are more expensive + and rotations are most expensive. + + There is no position test at the start of a translation or rotation. In other + words if a translation with start != end or a rotation with angle != 0 starts + in solid, this goes unnoticed and the collision result is undefined. + + A translation with start == end or a rotation with angle == 0 performs + a position test and fills in the trace_t structure accordingly. + +=============================================================================== +*/ + +// contact type +typedef enum { + CONTACT_NONE, // no contact + CONTACT_EDGE, // trace model edge hits model edge + CONTACT_MODELVERTEX, // model vertex hits trace model polygon + CONTACT_TRMVERTEX // trace model vertex hits model polygon +} contactType_t; + +// contact info +typedef struct { + contactType_t type; // contact type + idVec3 point; // point of contact + idVec3 normal; // contact plane normal + float dist; // contact plane distance + int contents; // contents at other side of surface + const idMaterial * material; // surface material + int modelFeature; // contact feature on model + int trmFeature; // contact feature on trace model + int entityNum; // entity the contact surface is a part of + int id; // id of clip model the contact surface is part of +} contactInfo_t; + +// trace result +typedef struct trace_s { + float fraction; // fraction of movement completed, 1.0 = didn't hit anything + idVec3 endpos; // final position of trace model + idMat3 endAxis; // final axis of trace model + contactInfo_t c; // contact information, only valid if fraction < 1.0 +} trace_t; + +typedef int cmHandle_t; + +#define CM_CLIP_EPSILON 0.25f // always stay this distance away from any model +#define CM_BOX_EPSILON 1.0f // should always be larger than clip epsilon +#define CM_MAX_TRACE_DIST 4096.0f // maximum distance a trace model may be traced, point traces are unlimited + +class idCollisionModelManager { +public: + virtual ~idCollisionModelManager( void ) {} + + // Loads collision models from a map file. + virtual void LoadMap( const idMapFile *mapFile ) = 0; + // Frees all the collision models. + virtual void FreeMap( void ) = 0; + + // Gets the clip handle for a model. + virtual cmHandle_t LoadModel( const char *modelName, const bool precache ) = 0; + // Sets up a trace model for collision with other trace models. + virtual cmHandle_t SetupTrmModel( const idTraceModel &trm, const idMaterial *material ) = 0; + // Creates a trace model from a collision model, returns true if succesfull. + virtual bool TrmFromModel( const char *modelName, idTraceModel &trm ) = 0; + + // Gets the name of a model. + virtual const char * GetModelName( cmHandle_t model ) const = 0; + // Gets the bounds of a model. + virtual bool GetModelBounds( cmHandle_t model, idBounds &bounds ) const = 0; + // Gets all contents flags of brushes and polygons of a model ored together. + virtual bool GetModelContents( cmHandle_t model, int &contents ) const = 0; + // Gets a vertex of a model. + virtual bool GetModelVertex( cmHandle_t model, int vertexNum, idVec3 &vertex ) const = 0; + // Gets an edge of a model. + virtual bool GetModelEdge( cmHandle_t model, int edgeNum, idVec3 &start, idVec3 &end ) const = 0; + // Gets a polygon of a model. + virtual bool GetModelPolygon( cmHandle_t model, int polygonNum, idFixedWinding &winding ) const = 0; + + // Translates a trace model and reports the first collision if any. + virtual void Translation( trace_t *results, const idVec3 &start, const idVec3 &end, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) = 0; + // Rotates a trace model and reports the first collision if any. + virtual void Rotation( trace_t *results, const idVec3 &start, const idRotation &rotation, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) = 0; + // Returns the contents touched by the trace model or 0 if the trace model is in free space. + virtual int Contents( const idVec3 &start, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) = 0; + // Stores all contact points of the trace model with the model, returns the number of contacts. + virtual int Contacts( contactInfo_t *contacts, const int maxContacts, const idVec3 &start, const idVec6 &dir, const float depth, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) = 0; + + // Tests collision detection. + virtual void DebugOutput( const idVec3 &origin ) = 0; + // Draws a model. + virtual void DrawModel( cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis, + const idVec3 &viewOrigin, const float radius ) = 0; + // Prints model information, use -1 handle for accumulated model info. + virtual void ModelInfo( cmHandle_t model ) = 0; + // Lists all loaded models. + virtual void ListModels( void ) = 0; + // Writes a collision model file for the given map entity. + virtual bool WriteCollisionModelForMapEntity( const idMapEntity *mapEnt, const char *filename, const bool testTraceModel = true ) = 0; +}; + +extern idCollisionModelManager * collisionModelManager; + +#endif /* !__COLLISIONMODELMANAGER_H__ */ diff --git a/neo/cm/CollisionModel_contacts.cpp b/neo/cm/CollisionModel_contacts.cpp new file mode 100644 index 0000000..d4a344e --- /dev/null +++ b/neo/cm/CollisionModel_contacts.cpp @@ -0,0 +1,75 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ + +/* +=============================================================================== + + Trace model vs. polygonal model collision detection. + +=============================================================================== +*/ + +#include "../idlib/precompiled.h" +#pragma hdrstop + +#include "CollisionModel_local.h" + +/* +=============================================================================== + +Retrieving contacts + +=============================================================================== +*/ + +/* +================== +idCollisionModelManagerLocal::Contacts +================== +*/ +int idCollisionModelManagerLocal::Contacts( contactInfo_t *contacts, const int maxContacts, const idVec3 &start, const idVec6 &dir, const float depth, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &origin, const idMat3 &modelAxis ) { + trace_t results; + idVec3 end; + + // same as Translation but instead of storing the first collision we store all collisions as contacts + idCollisionModelManagerLocal::getContacts = true; + idCollisionModelManagerLocal::contacts = contacts; + idCollisionModelManagerLocal::maxContacts = maxContacts; + idCollisionModelManagerLocal::numContacts = 0; + end = start + dir.SubVec3(0) * depth; + idCollisionModelManagerLocal::Translation( &results, start, end, trm, trmAxis, contentMask, model, origin, modelAxis ); + if ( dir.SubVec3(1).LengthSqr() != 0.0f ) { + // FIXME: rotational contacts + } + idCollisionModelManagerLocal::getContacts = false; + idCollisionModelManagerLocal::maxContacts = 0; + + return idCollisionModelManagerLocal::numContacts; +} diff --git a/neo/cm/CollisionModel_contents.cpp b/neo/cm/CollisionModel_contents.cpp new file mode 100644 index 0000000..e27d2d4 --- /dev/null +++ b/neo/cm/CollisionModel_contents.cpp @@ -0,0 +1,641 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ + +/* +=============================================================================== + + Trace model vs. polygonal model collision detection. + +=============================================================================== +*/ + +#include "../idlib/precompiled.h" +#pragma hdrstop + +#include "CollisionModel_local.h" + +/* +=============================================================================== + +Contents test + +=============================================================================== +*/ + +/* +================ +idCollisionModelManagerLocal::TestTrmVertsInBrush + + returns true if any of the trm vertices is inside the brush +================ +*/ +bool idCollisionModelManagerLocal::TestTrmVertsInBrush( cm_traceWork_t *tw, cm_brush_t *b ) { + int i, j, numVerts, bestPlane; + float d, bestd; + idVec3 *p; + + if ( b->checkcount == idCollisionModelManagerLocal::checkCount ) { + return false; + } + b->checkcount = idCollisionModelManagerLocal::checkCount; + + if ( !(b->contents & tw->contents) ) { + return false; + } + + // if the brush bounds don't intersect the trace bounds + if ( !b->bounds.IntersectsBounds( tw->bounds ) ) { + return false; + } + + if ( tw->pointTrace ) { + numVerts = 1; + } + else { + numVerts = tw->numVerts; + } + + for ( j = 0; j < numVerts; j++ ) { + p = &tw->vertices[j].p; + + // see if the point is inside the brush + bestPlane = 0; + bestd = -idMath::INFINITY; + for ( i = 0; i < b->numPlanes; i++ ) { + d = b->planes[i].Distance( *p ); + if ( d >= 0.0f ) { + break; + } + if ( d > bestd ) { + bestd = d; + bestPlane = i; + } + } + if ( i >= b->numPlanes ) { + tw->trace.fraction = 0.0f; + tw->trace.c.type = CONTACT_TRMVERTEX; + tw->trace.c.normal = b->planes[bestPlane].Normal(); + tw->trace.c.dist = b->planes[bestPlane].Dist(); + tw->trace.c.contents = b->contents; + tw->trace.c.material = b->material; + tw->trace.c.point = *p; + tw->trace.c.modelFeature = 0; + tw->trace.c.trmFeature = j; + return true; + } + } + return false; +} + +/* +================ +CM_SetTrmEdgeSidedness +================ +*/ +#define CM_SetTrmEdgeSidedness( edge, bpl, epl, bitNum ) { \ + if ( !(edge->sideSet & (1<side = (edge->side & ~(1<sideSet |= (1 << bitNum); \ + } \ +} + +/* +================ +CM_SetTrmPolygonSidedness +================ +*/ +#define CM_SetTrmPolygonSidedness( v, plane, bitNum ) { \ + if ( !((v)->sideSet & (1<p ); \ + /* cannot use float sign bit because it is undetermined when fl == 0.0f */ \ + if ( fl < 0.0f ) { \ + (v)->side |= (1 << bitNum); \ + } \ + else { \ + (v)->side &= ~(1 << bitNum); \ + } \ + (v)->sideSet |= (1 << bitNum); \ + } \ +} + +/* +================ +idCollisionModelManagerLocal::TestTrmInPolygon + + returns true if the trm intersects the polygon +================ +*/ +bool idCollisionModelManagerLocal::TestTrmInPolygon( cm_traceWork_t *tw, cm_polygon_t *p ) { + int i, j, k, edgeNum, flip, trmEdgeNum, bitNum, bestPlane; + int sides[MAX_TRACEMODEL_VERTS]; + float d, bestd; + cm_trmEdge_t *trmEdge; + cm_edge_t *edge; + cm_vertex_t *v, *v1, *v2; + + // if already checked this polygon + if ( p->checkcount == idCollisionModelManagerLocal::checkCount ) { + return false; + } + p->checkcount = idCollisionModelManagerLocal::checkCount; + + // if this polygon does not have the right contents behind it + if ( !(p->contents & tw->contents) ) { + return false; + } + + // if the polygon bounds don't intersect the trace bounds + if ( !p->bounds.IntersectsBounds( tw->bounds ) ) { + return false; + } + + // bounds should cross polygon plane + switch( tw->bounds.PlaneSide( p->plane ) ) { + case PLANESIDE_CROSS: + break; + case PLANESIDE_FRONT: + if ( tw->model->isConvex ) { + tw->quickExit = true; + return true; + } + default: + return false; + } + + // if the trace model is convex + if ( tw->isConvex ) { + // test if any polygon vertices are inside the trm + for ( i = 0; i < p->numEdges; i++ ) { + edgeNum = p->edges[i]; + edge = tw->model->edges + abs(edgeNum); + // if this edge is already tested + if ( edge->checkcount == idCollisionModelManagerLocal::checkCount ) { + continue; + } + + for ( j = 0; j < 2; j++ ) { + v = &tw->model->vertices[edge->vertexNum[j]]; + // if this vertex is already tested + if ( v->checkcount == idCollisionModelManagerLocal::checkCount ) { + continue; + } + + bestPlane = 0; + bestd = -idMath::INFINITY; + for ( k = 0; k < tw->numPolys; k++ ) { + d = tw->polys[k].plane.Distance( v->p ); + if ( d >= 0.0f ) { + break; + } + if ( d > bestd ) { + bestd = d; + bestPlane = k; + } + } + if ( k >= tw->numPolys ) { + tw->trace.fraction = 0.0f; + tw->trace.c.type = CONTACT_MODELVERTEX; + tw->trace.c.normal = -tw->polys[bestPlane].plane.Normal(); + tw->trace.c.dist = -tw->polys[bestPlane].plane.Dist(); + tw->trace.c.contents = p->contents; + tw->trace.c.material = p->material; + tw->trace.c.point = v->p; + tw->trace.c.modelFeature = edge->vertexNum[j]; + tw->trace.c.trmFeature = 0; + return true; + } + } + } + } + + for ( i = 0; i < p->numEdges; i++ ) { + edgeNum = p->edges[i]; + edge = tw->model->edges + abs(edgeNum); + // reset sidedness cache if this is the first time we encounter this edge + if ( edge->checkcount != idCollisionModelManagerLocal::checkCount ) { + edge->sideSet = 0; + } + // pluecker coordinate for edge + tw->polygonEdgePlueckerCache[i].FromLine( tw->model->vertices[edge->vertexNum[0]].p, + tw->model->vertices[edge->vertexNum[1]].p ); + v = &tw->model->vertices[edge->vertexNum[INTSIGNBITSET(edgeNum)]]; + // reset sidedness cache if this is the first time we encounter this vertex + if ( v->checkcount != idCollisionModelManagerLocal::checkCount ) { + v->sideSet = 0; + } + v->checkcount = idCollisionModelManagerLocal::checkCount; + } + + // get side of polygon for each trm vertex + for ( i = 0; i < tw->numVerts; i++ ) { + d = p->plane.Distance( tw->vertices[i].p ); + sides[i] = d < 0.0f ? -1 : 1; + } + + // test if any trm edges go through the polygon + for ( i = 1; i <= tw->numEdges; i++ ) { + // if the trm edge does not cross the polygon plane + if ( sides[tw->edges[i].vertexNum[0]] == sides[tw->edges[i].vertexNum[1]] ) { + continue; + } + // check from which side to which side the trm edge goes + flip = INTSIGNBITSET( sides[tw->edges[i].vertexNum[0]] ); + // test if trm edge goes through the polygon between the polygon edges + for ( j = 0; j < p->numEdges; j++ ) { + edgeNum = p->edges[j]; + edge = tw->model->edges + abs(edgeNum); +#if 1 + CM_SetTrmEdgeSidedness( edge, tw->edges[i].pl, tw->polygonEdgePlueckerCache[j], i ); + if ( INTSIGNBITSET(edgeNum) ^ ((edge->side >> i) & 1) ^ flip ) { + break; + } +#else + d = tw->edges[i].pl.PermutedInnerProduct( tw->polygonEdgePlueckerCache[j] ); + if ( flip ) { + d = -d; + } + if ( edgeNum > 0 ) { + if ( d <= 0.0f ) { + break; + } + } + else { + if ( d >= 0.0f ) { + break; + } + } +#endif + } + if ( j >= p->numEdges ) { + tw->trace.fraction = 0.0f; + tw->trace.c.type = CONTACT_EDGE; + tw->trace.c.normal = p->plane.Normal(); + tw->trace.c.dist = p->plane.Dist(); + tw->trace.c.contents = p->contents; + tw->trace.c.material = p->material; + tw->trace.c.point = tw->vertices[tw->edges[i].vertexNum[ !flip ]].p; + tw->trace.c.modelFeature = *reinterpret_cast(&p); + tw->trace.c.trmFeature = i; + return true; + } + } + + // test if any polygon edges go through the trm polygons + for ( i = 0; i < p->numEdges; i++ ) { + edgeNum = p->edges[i]; + edge = tw->model->edges + abs(edgeNum); + if ( edge->checkcount == idCollisionModelManagerLocal::checkCount ) { + continue; + } + edge->checkcount = idCollisionModelManagerLocal::checkCount; + + for ( j = 0; j < tw->numPolys; j++ ) { +#if 1 + v1 = tw->model->vertices + edge->vertexNum[0]; + CM_SetTrmPolygonSidedness( v1, tw->polys[j].plane, j ); + v2 = tw->model->vertices + edge->vertexNum[1]; + CM_SetTrmPolygonSidedness( v2, tw->polys[j].plane, j ); + // if the polygon edge does not cross the trm polygon plane + if ( !(((v1->side ^ v2->side) >> j) & 1) ) { + continue; + } + flip = (v1->side >> j) & 1; +#else + float d1, d2; + + v1 = tw->model->vertices + edge->vertexNum[0]; + d1 = tw->polys[j].plane.Distance( v1->p ); + v2 = tw->model->vertices + edge->vertexNum[1]; + d2 = tw->polys[j].plane.Distance( v2->p ); + // if the polygon edge does not cross the trm polygon plane + if ( (d1 >= 0.0f && d2 >= 0.0f) || (d1 <= 0.0f && d2 <= 0.0f) ) { + continue; + } + flip = false; + if ( d1 < 0.0f ) { + flip = true; + } +#endif + // test if polygon edge goes through the trm polygon between the trm polygon edges + for ( k = 0; k < tw->polys[j].numEdges; k++ ) { + trmEdgeNum = tw->polys[j].edges[k]; + trmEdge = tw->edges + abs(trmEdgeNum); +#if 1 + bitNum = abs(trmEdgeNum); + CM_SetTrmEdgeSidedness( edge, trmEdge->pl, tw->polygonEdgePlueckerCache[i], bitNum ); + if ( INTSIGNBITSET(trmEdgeNum) ^ ((edge->side >> bitNum) & 1) ^ flip ) { + break; + } +#else + d = trmEdge->pl.PermutedInnerProduct( tw->polygonEdgePlueckerCache[i] ); + if ( flip ) { + d = -d; + } + if ( trmEdgeNum > 0 ) { + if ( d <= 0.0f ) { + break; + } + } + else { + if ( d >= 0.0f ) { + break; + } + } +#endif + } + if ( k >= tw->polys[j].numEdges ) { + tw->trace.fraction = 0.0f; + tw->trace.c.type = CONTACT_EDGE; + tw->trace.c.normal = -tw->polys[j].plane.Normal(); + tw->trace.c.dist = -tw->polys[j].plane.Dist(); + tw->trace.c.contents = p->contents; + tw->trace.c.material = p->material; + tw->trace.c.point = tw->model->vertices[edge->vertexNum[ !flip ]].p; + tw->trace.c.modelFeature = edgeNum; + tw->trace.c.trmFeature = j; + return true; + } + } + } + return false; +} + +/* +================ +idCollisionModelManagerLocal::PointNode +================ +*/ +cm_node_t *idCollisionModelManagerLocal::PointNode( const idVec3 &p, cm_model_t *model ) { + cm_node_t *node; + + node = model->node; + while ( node->planeType != -1 ) { + if (p[node->planeType] > node->planeDist) { + node = node->children[0]; + } + else { + node = node->children[1]; + } + + assert( node != NULL ); + } + return node; +} + +/* +================ +idCollisionModelManagerLocal::PointContents +================ +*/ +int idCollisionModelManagerLocal::PointContents( const idVec3 p, cmHandle_t model ) { + int i; + float d; + cm_node_t *node; + cm_brushRef_t *bref; + cm_brush_t *b; + idPlane *plane; + + node = idCollisionModelManagerLocal::PointNode( p, idCollisionModelManagerLocal::models[model] ); + for ( bref = node->brushes; bref; bref = bref->next ) { + b = bref->b; + // test if the point is within the brush bounds + for ( i = 0; i < 3; i++ ) { + if ( p[i] < b->bounds[0][i] ) { + break; + } + if ( p[i] > b->bounds[1][i] ) { + break; + } + } + if ( i < 3 ) { + continue; + } + // test if the point is inside the brush + plane = b->planes; + for ( i = 0; i < b->numPlanes; i++, plane++ ) { + d = plane->Distance( p ); + if ( d >= 0 ) { + break; + } + } + if ( i >= b->numPlanes ) { + return b->contents; + } + } + return 0; +} + +/* +================== +idCollisionModelManagerLocal::TransformedPointContents +================== +*/ +int idCollisionModelManagerLocal::TransformedPointContents( const idVec3 &p, cmHandle_t model, const idVec3 &origin, const idMat3 &modelAxis ) { + idVec3 p_l; + + // subtract origin offset + p_l = p - origin; + if ( modelAxis.IsRotated() ) { + p_l *= modelAxis; + } + return idCollisionModelManagerLocal::PointContents( p_l, model ); +} + + +/* +================== +idCollisionModelManagerLocal::ContentsTrm +================== +*/ +int idCollisionModelManagerLocal::ContentsTrm( trace_t *results, const idVec3 &start, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) { + int i; + bool model_rotated, trm_rotated; + idMat3 invModelAxis, tmpAxis; + idVec3 dir; + ALIGN16( cm_traceWork_t tw ); + + // fast point case + if ( !trm || ( trm->bounds[1][0] - trm->bounds[0][0] <= 0.0f && + trm->bounds[1][1] - trm->bounds[0][1] <= 0.0f && + trm->bounds[1][2] - trm->bounds[0][2] <= 0.0f ) ) { + + results->c.contents = idCollisionModelManagerLocal::TransformedPointContents( start, model, modelOrigin, modelAxis ); + results->fraction = ( results->c.contents == 0 ); + results->endpos = start; + results->endAxis = trmAxis; + + return results->c.contents; + } + + idCollisionModelManagerLocal::checkCount++; + + tw.trace.fraction = 1.0f; + tw.trace.c.contents = 0; + tw.trace.c.type = CONTACT_NONE; + tw.contents = contentMask; + tw.isConvex = true; + tw.rotation = false; + tw.positionTest = true; + tw.pointTrace = false; + tw.quickExit = false; + tw.numContacts = 0; + tw.model = idCollisionModelManagerLocal::models[model]; + tw.start = start - modelOrigin; + tw.end = tw.start; + + model_rotated = modelAxis.IsRotated(); + if ( model_rotated ) { + invModelAxis = modelAxis.Transpose(); + } + + // setup trm structure + idCollisionModelManagerLocal::SetupTrm( &tw, trm ); + + trm_rotated = trmAxis.IsRotated(); + + // calculate vertex positions + if ( trm_rotated ) { + for ( i = 0; i < tw.numVerts; i++ ) { + // rotate trm around the start position + tw.vertices[i].p *= trmAxis; + } + } + for ( i = 0; i < tw.numVerts; i++ ) { + // set trm at start position + tw.vertices[i].p += tw.start; + } + if ( model_rotated ) { + for ( i = 0; i < tw.numVerts; i++ ) { + // rotate trm around model instead of rotating the model + tw.vertices[i].p *= invModelAxis; + } + } + + // add offset to start point + if ( trm_rotated ) { + dir = trm->offset * trmAxis; + tw.start += dir; + tw.end += dir; + } else { + tw.start += trm->offset; + tw.end += trm->offset; + } + if ( model_rotated ) { + // rotate trace instead of model + tw.start *= invModelAxis; + tw.end *= invModelAxis; + } + + + // setup trm vertices + tw.size.Clear(); + for ( i = 0; i < tw.numVerts; i++ ) { + // get axial trm size after rotations + tw.size.AddPoint( tw.vertices[i].p - tw.start ); + } + + // setup trm edges + for ( i = 1; i <= tw.numEdges; i++ ) { + // edge start, end and pluecker coordinate + tw.edges[i].start = tw.vertices[tw.edges[i].vertexNum[0]].p; + tw.edges[i].end = tw.vertices[tw.edges[i].vertexNum[1]].p; + tw.edges[i].pl.FromLine( tw.edges[i].start, tw.edges[i].end ); + } + + // setup trm polygons + if ( trm_rotated & model_rotated ) { + tmpAxis = trmAxis * invModelAxis; + for ( i = 0; i < tw.numPolys; i++ ) { + tw.polys[i].plane *= tmpAxis; + } + } else if ( trm_rotated ) { + for ( i = 0; i < tw.numPolys; i++ ) { + tw.polys[i].plane *= trmAxis; + } + } else if ( model_rotated ) { + for ( i = 0; i < tw.numPolys; i++ ) { + tw.polys[i].plane *= invModelAxis; + } + } + for ( i = 0; i < tw.numPolys; i++ ) { + tw.polys[i].plane.FitThroughPoint( tw.edges[abs(tw.polys[i].edges[0])].start ); + } + + // bounds for full trace, a little bit larger for epsilons + for ( i = 0; i < 3; i++ ) { + if ( tw.start[i] < tw.end[i] ) { + tw.bounds[0][i] = tw.start[i] + tw.size[0][i] - CM_BOX_EPSILON; + tw.bounds[1][i] = tw.end[i] + tw.size[1][i] + CM_BOX_EPSILON; + } else { + tw.bounds[0][i] = tw.end[i] + tw.size[0][i] - CM_BOX_EPSILON; + tw.bounds[1][i] = tw.start[i] + tw.size[1][i] + CM_BOX_EPSILON; + } + if ( idMath::Fabs(tw.size[0][i]) > idMath::Fabs(tw.size[1][i]) ) { + tw.extents[i] = idMath::Fabs( tw.size[0][i] ) + CM_BOX_EPSILON; + } else { + tw.extents[i] = idMath::Fabs( tw.size[1][i] ) + CM_BOX_EPSILON; + } + } + + // trace through the model + idCollisionModelManagerLocal::TraceThroughModel( &tw ); + + *results = tw.trace; + results->fraction = ( results->c.contents == 0 ); + results->endpos = start; + results->endAxis = trmAxis; + + return results->c.contents; +} + +/* +================== +idCollisionModelManagerLocal::Contents +================== +*/ +int idCollisionModelManagerLocal::Contents( const idVec3 &start, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) { + trace_t results; + + if ( model < 0 || model > idCollisionModelManagerLocal::maxModels || model > MAX_SUBMODELS ) { + common->Printf("idCollisionModelManagerLocal::Contents: invalid model handle\n"); + return 0; + } + if ( !idCollisionModelManagerLocal::models || !idCollisionModelManagerLocal::models[model] ) { + common->Printf("idCollisionModelManagerLocal::Contents: invalid model\n"); + return 0; + } + + return ContentsTrm( &results, start, trm, trmAxis, contentMask, model, modelOrigin, modelAxis ); +} diff --git a/neo/cm/CollisionModel_debug.cpp b/neo/cm/CollisionModel_debug.cpp new file mode 100644 index 0000000..f43ad90 --- /dev/null +++ b/neo/cm/CollisionModel_debug.cpp @@ -0,0 +1,488 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ + +/* +=============================================================================== + + Trace model vs. polygonal model collision detection. + +=============================================================================== +*/ + +#include "../idlib/precompiled.h" +#pragma hdrstop + +#include "CollisionModel_local.h" + + +/* +=============================================================================== + +Visualisation code + +=============================================================================== +*/ + +const char *cm_contentsNameByIndex[] = { + "none", // 0 + "solid", // 1 + "opaque", // 2 + "water", // 3 + "playerclip", // 4 + "monsterclip", // 5 + "moveableclip", // 6 + "ikclip", // 7 + "blood", // 8 + "body", // 9 + "corpse", // 10 + "trigger", // 11 + "aas_solid", // 12 + "aas_obstacle", // 13 + "flashlight_trigger", // 14 + NULL +}; + +int cm_contentsFlagByIndex[] = { + -1, // 0 + CONTENTS_SOLID, // 1 + CONTENTS_OPAQUE, // 2 + CONTENTS_WATER, // 3 + CONTENTS_PLAYERCLIP, // 4 + CONTENTS_MONSTERCLIP, // 5 + CONTENTS_MOVEABLECLIP, // 6 + CONTENTS_IKCLIP, // 7 + CONTENTS_BLOOD, // 8 + CONTENTS_BODY, // 9 + CONTENTS_CORPSE, // 10 + CONTENTS_TRIGGER, // 11 + CONTENTS_AAS_SOLID, // 12 + CONTENTS_AAS_OBSTACLE, // 13 + CONTENTS_FLASHLIGHT_TRIGGER, // 14 + 0 +}; + +idCVar cm_drawMask( "cm_drawMask", "none", CVAR_GAME, "collision mask", cm_contentsNameByIndex, idCmdSystem::ArgCompletion_String ); +idCVar cm_drawColor( "cm_drawColor", "1 0 0 .5", CVAR_GAME, "color used to draw the collision models" ); +idCVar cm_drawFilled( "cm_drawFilled", "0", CVAR_GAME | CVAR_BOOL, "draw filled polygons" ); +idCVar cm_drawInternal( "cm_drawInternal", "1", CVAR_GAME | CVAR_BOOL, "draw internal edges green" ); +idCVar cm_drawNormals( "cm_drawNormals", "0", CVAR_GAME | CVAR_BOOL, "draw polygon and edge normals" ); +idCVar cm_backFaceCull( "cm_backFaceCull", "0", CVAR_GAME | CVAR_BOOL, "cull back facing polygons" ); +idCVar cm_debugCollision( "cm_debugCollision", "0", CVAR_GAME | CVAR_BOOL, "debug the collision detection" ); + +static idVec4 cm_color; + +/* +================ +idCollisionModelManagerLocal::ContentsFromString +================ +*/ +int idCollisionModelManagerLocal::ContentsFromString( const char *string ) const { + int i, contents = 0; + idLexer src( string, idStr::Length( string ), "ContentsFromString" ); + idToken token; + + while( src.ReadToken( &token ) ) { + if ( token == "," ) { + continue; + } + for ( i = 1; cm_contentsNameByIndex[i] != NULL; i++ ) { + if ( token.Icmp( cm_contentsNameByIndex[i] ) == 0 ) { + contents |= cm_contentsFlagByIndex[i]; + break; + } + } + } + + return contents; +} + +/* +================ +idCollisionModelManagerLocal::StringFromContents +================ +*/ +const char *idCollisionModelManagerLocal::StringFromContents( const int contents ) const { + int i, length = 0; + static char contentsString[MAX_STRING_CHARS]; + + contentsString[0] = '\0'; + + for ( i = 1; cm_contentsFlagByIndex[i] != 0; i++ ) { + if ( contents & cm_contentsFlagByIndex[i] ) { + if ( length != 0 ) { + length += idStr::snPrintf( contentsString + length, sizeof( contentsString ) - length, "," ); + } + length += idStr::snPrintf( contentsString + length, sizeof( contentsString ) - length, cm_contentsNameByIndex[i] ); + } + } + + return contentsString; +} + +/* +================ +idCollisionModelManagerLocal::DrawEdge +================ +*/ +void idCollisionModelManagerLocal::DrawEdge( cm_model_t *model, int edgeNum, const idVec3 &origin, const idMat3 &axis ) { + int side; + cm_edge_t *edge; + idVec3 start, end, mid; + bool isRotated; + + isRotated = axis.IsRotated(); + + edge = model->edges + abs(edgeNum); + side = edgeNum < 0; + + start = model->vertices[edge->vertexNum[side]].p; + end = model->vertices[edge->vertexNum[!side]].p; + if ( isRotated ) { + start *= axis; + end *= axis; + } + start += origin; + end += origin; + + if ( edge->internal ) { + if ( cm_drawInternal.GetBool() ) { + session->rw->DebugArrow( colorGreen, start, end, 1 ); + } + } else { + if ( edge->numUsers > 2 ) { + session->rw->DebugArrow( colorBlue, start, end, 1 ); + } else { + session->rw->DebugArrow( cm_color, start, end, 1 ); + } + } + + if ( cm_drawNormals.GetBool() ) { + mid = (start + end) * 0.5f; + if ( isRotated ) { + end = mid + 5 * (axis * edge->normal); + } else { + end = mid + 5 * edge->normal; + } + session->rw->DebugArrow( colorCyan, mid, end, 1 ); + } +} + +/* +================ +idCollisionModelManagerLocal::DrawPolygon +================ +*/ +void idCollisionModelManagerLocal::DrawPolygon( cm_model_t *model, cm_polygon_t *p, const idVec3 &origin, const idMat3 &axis, const idVec3 &viewOrigin ) { + int i, edgeNum; + cm_edge_t *edge; + idVec3 center, end, dir; + + if ( cm_backFaceCull.GetBool() ) { + edgeNum = p->edges[0]; + edge = model->edges + abs(edgeNum); + dir = model->vertices[edge->vertexNum[0]].p - viewOrigin; + if ( dir * p->plane.Normal() > 0.0f ) { + return; + } + } + + if ( cm_drawNormals.GetBool() ) { + center = vec3_origin; + for ( i = 0; i < p->numEdges; i++ ) { + edgeNum = p->edges[i]; + edge = model->edges + abs(edgeNum); + center += model->vertices[edge->vertexNum[edgeNum < 0]].p; + } + center *= (1.0f / p->numEdges); + if ( axis.IsRotated() ) { + center = center * axis + origin; + end = center + 5 * (axis * p->plane.Normal()); + } else { + center += origin; + end = center + 5 * p->plane.Normal(); + } + session->rw->DebugArrow( colorMagenta, center, end, 1 ); + } + + if ( cm_drawFilled.GetBool() ) { + idFixedWinding winding; + for ( i = p->numEdges - 1; i >= 0; i-- ) { + edgeNum = p->edges[i]; + edge = model->edges + abs(edgeNum); + winding += origin + model->vertices[edge->vertexNum[INTSIGNBITSET(edgeNum)]].p * axis; + } + session->rw->DebugPolygon( cm_color, winding ); + } else { + for ( i = 0; i < p->numEdges; i++ ) { + edgeNum = p->edges[i]; + edge = model->edges + abs(edgeNum); + if ( edge->checkcount == checkCount ) { + continue; + } + edge->checkcount = checkCount; + DrawEdge( model, edgeNum, origin, axis ); + } + } +} + +/* +================ +idCollisionModelManagerLocal::DrawNodePolygons +================ +*/ +void idCollisionModelManagerLocal::DrawNodePolygons( cm_model_t *model, cm_node_t *node, + const idVec3 &origin, const idMat3 &axis, + const idVec3 &viewOrigin, const float radius ) { + int i; + cm_polygon_t *p; + cm_polygonRef_t *pref; + + while (1) { + for ( pref = node->polygons; pref; pref = pref->next ) { + p = pref->p; + if ( radius ) { + // polygon bounds should overlap with trace bounds + for ( i = 0; i < 3; i++ ) { + if ( p->bounds[0][i] > viewOrigin[i] + radius ) { + break; + } + if ( p->bounds[1][i] < viewOrigin[i] - radius ) { + break; + } + } + if ( i < 3 ) { + continue; + } + } + if ( p->checkcount == checkCount ) { + continue; + } + if ( !( p->contents & cm_contentsFlagByIndex[cm_drawMask.GetInteger()] ) ) { + continue; + } + + DrawPolygon( model, p, origin, axis, viewOrigin ); + p->checkcount = checkCount; + } + if ( node->planeType == -1 ) { + break; + } + if ( radius && viewOrigin[node->planeType] > node->planeDist + radius ) { + node = node->children[0]; + } else if ( radius && viewOrigin[node->planeType] < node->planeDist - radius ) { + node = node->children[1]; + } else { + DrawNodePolygons( model, node->children[1], origin, axis, viewOrigin, radius ); + node = node->children[0]; + } + } +} + +/* +================ +idCollisionModelManagerLocal::DrawModel +================ +*/ +void idCollisionModelManagerLocal::DrawModel( cmHandle_t handle, const idVec3 &modelOrigin, const idMat3 &modelAxis, + const idVec3 &viewOrigin, const float radius ) { + + cm_model_t *model; + idVec3 viewPos; + + if ( handle < 0 && handle >= numModels ) { + return; + } + + if ( cm_drawColor.IsModified() ) { + sscanf( cm_drawColor.GetString(), "%f %f %f %f", &cm_color.x, &cm_color.y, &cm_color.z, &cm_color.w ); + cm_drawColor.ClearModified(); + } + + model = models[ handle ]; + viewPos = (viewOrigin - modelOrigin) * modelAxis.Transpose(); + checkCount++; + DrawNodePolygons( model, model->node, modelOrigin, modelAxis, viewPos, radius ); +} + +/* +=============================================================================== + +Speed test code + +=============================================================================== +*/ + +static idCVar cm_testCollision( "cm_testCollision", "0", CVAR_GAME | CVAR_BOOL, "" ); +static idCVar cm_testRotation( "cm_testRotation", "1", CVAR_GAME | CVAR_BOOL, "" ); +static idCVar cm_testModel( "cm_testModel", "0", CVAR_GAME | CVAR_INTEGER, "" ); +static idCVar cm_testTimes( "cm_testTimes", "1000", CVAR_GAME | CVAR_INTEGER, "" ); +static idCVar cm_testRandomMany( "cm_testRandomMany", "0", CVAR_GAME | CVAR_BOOL, "" ); +static idCVar cm_testOrigin( "cm_testOrigin", "0 0 0", CVAR_GAME, "" ); +static idCVar cm_testReset( "cm_testReset", "0", CVAR_GAME | CVAR_BOOL, "" ); +static idCVar cm_testBox( "cm_testBox", "-16 -16 0 16 16 64", CVAR_GAME, "" ); +static idCVar cm_testBoxRotation( "cm_testBoxRotation", "0 0 0", CVAR_GAME, "" ); +static idCVar cm_testWalk( "cm_testWalk", "1", CVAR_GAME | CVAR_BOOL, "" ); +static idCVar cm_testLength( "cm_testLength", "1024", CVAR_GAME | CVAR_FLOAT, "" ); +static idCVar cm_testRadius( "cm_testRadius", "64", CVAR_GAME | CVAR_FLOAT, "" ); +static idCVar cm_testAngle( "cm_testAngle", "60", CVAR_GAME | CVAR_FLOAT, "" ); + +static int total_translation; +static int min_translation = 999999; +static int max_translation = -999999; +static int num_translation = 0; +static int total_rotation; +static int min_rotation = 999999; +static int max_rotation = -999999; +static int num_rotation = 0; +static idVec3 start; +static idVec3 *testend; + +#include "../sys/sys_public.h" + +void idCollisionModelManagerLocal::DebugOutput( const idVec3 &origin ) { + int i, k, t; + char buf[128]; + idVec3 end; + idAngles boxAngles; + idMat3 modelAxis, boxAxis; + idBounds bounds; + trace_t trace; + + if ( !cm_testCollision.GetBool() ) { + return; + } + + testend = (idVec3 *) Mem_Alloc( cm_testTimes.GetInteger() * sizeof(idVec3) ); + + if ( cm_testReset.GetBool() || ( cm_testWalk.GetBool() && !start.Compare( start ) ) ) { + total_translation = total_rotation = 0; + min_translation = min_rotation = 999999; + max_translation = max_rotation = -999999; + num_translation = num_rotation = 0; + cm_testReset.SetBool( false ); + } + + if ( cm_testWalk.GetBool() ) { + start = origin; + cm_testOrigin.SetString( va( "%1.2f %1.2f %1.2f", start[0], start[1], start[2] ) ); + } else { + sscanf( cm_testOrigin.GetString(), "%f %f %f", &start[0], &start[1], &start[2] ); + } + + sscanf( cm_testBox.GetString(), "%f %f %f %f %f %f", &bounds[0][0], &bounds[0][1], &bounds[0][2], + &bounds[1][0], &bounds[1][1], &bounds[1][2] ); + sscanf( cm_testBoxRotation.GetString(), "%f %f %f", &boxAngles[0], &boxAngles[1], &boxAngles[2] ); + boxAxis = boxAngles.ToMat3(); + modelAxis.Identity(); + + idTraceModel itm( bounds ); + idRandom random( 0 ); + idTimer timer; + + if ( cm_testRandomMany.GetBool() ) { + // if many traces in one random direction + for ( i = 0; i < 3; i++ ) { + testend[0][i] = start[i] + random.CRandomFloat() * cm_testLength.GetFloat(); + } + for ( k = 1; k < cm_testTimes.GetInteger(); k++ ) { + testend[k] = testend[0]; + } + } else { + // many traces each in a different random direction + for ( k = 0; k < cm_testTimes.GetInteger(); k++ ) { + for ( i = 0; i < 3; i++ ) { + testend[k][i] = start[i] + random.CRandomFloat() * cm_testLength.GetFloat(); + } + } + } + + // translational collision detection + timer.Clear(); + timer.Start(); + for ( i = 0; i < cm_testTimes.GetInteger(); i++ ) { + Translation( &trace, start, testend[i], &itm, boxAxis, CONTENTS_SOLID|CONTENTS_PLAYERCLIP, cm_testModel.GetInteger(), vec3_origin, modelAxis ); + } + timer.Stop(); + t = timer.Milliseconds(); + if ( t < min_translation ) min_translation = t; + if ( t > max_translation ) max_translation = t; + num_translation++; + total_translation += t; + if ( cm_testTimes.GetInteger() > 9999 ) { + sprintf( buf, "%3dK", (int ) ( cm_testTimes.GetInteger() / 1000 ) ); + } else { + sprintf( buf, "%4d", cm_testTimes.GetInteger() ); + } + common->Printf("%s translations: %4d milliseconds, (min = %d, max = %d, av = %1.1f)\n", buf, t, min_translation, max_translation, (float) total_translation / num_translation ); + + if ( cm_testRandomMany.GetBool() ) { + // if many traces in one random direction + for ( i = 0; i < 3; i++ ) { + testend[0][i] = start[i] + random.CRandomFloat() * cm_testRadius.GetFloat(); + } + for ( k = 1; k < cm_testTimes.GetInteger(); k++ ) { + testend[k] = testend[0]; + } + } else { + // many traces each in a different random direction + for ( k = 0; k < cm_testTimes.GetInteger(); k++ ) { + for ( i = 0; i < 3; i++ ) { + testend[k][i] = start[i] + random.CRandomFloat() * cm_testRadius.GetFloat(); + } + } + } + + if ( cm_testRotation.GetBool() ) { + // rotational collision detection + idVec3 vec( random.CRandomFloat(), random.CRandomFloat(), random.RandomFloat() ); + vec.Normalize(); + idRotation rotation( vec3_origin, vec, cm_testAngle.GetFloat() ); + + timer.Clear(); + timer.Start(); + for ( i = 0; i < cm_testTimes.GetInteger(); i++ ) { + rotation.SetOrigin( testend[i] ); + Rotation( &trace, start, rotation, &itm, boxAxis, CONTENTS_SOLID|CONTENTS_PLAYERCLIP, cm_testModel.GetInteger(), vec3_origin, modelAxis ); + } + timer.Stop(); + t = timer.Milliseconds(); + if ( t < min_rotation ) min_rotation = t; + if ( t > max_rotation ) max_rotation = t; + num_rotation++; + total_rotation += t; + if ( cm_testTimes.GetInteger() > 9999 ) { + sprintf( buf, "%3dK", (int ) ( cm_testTimes.GetInteger() / 1000 ) ); + } else { + sprintf( buf, "%4d", cm_testTimes.GetInteger() ); + } + common->Printf("%s rotation: %4d milliseconds, (min = %d, max = %d, av = %1.1f)\n", buf, t, min_rotation, max_rotation, (float) total_rotation / num_rotation ); + } + + Mem_Free( testend ); + testend = NULL; +} diff --git a/neo/cm/CollisionModel_files.cpp b/neo/cm/CollisionModel_files.cpp new file mode 100644 index 0000000..ca6ab27 --- /dev/null +++ b/neo/cm/CollisionModel_files.cpp @@ -0,0 +1,616 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ + +/* +=============================================================================== + + Trace model vs. polygonal model collision detection. + +=============================================================================== +*/ + +#include "../idlib/precompiled.h" +#pragma hdrstop + +#include "CollisionModel_local.h" + +#define CM_FILE_EXT "cm" +#define CM_FILEID "CM" +#define CM_FILEVERSION "1.00" + + +/* +=============================================================================== + +Writing of collision model file + +=============================================================================== +*/ + +void CM_GetNodeBounds( idBounds *bounds, cm_node_t *node ); +int CM_GetNodeContents( cm_node_t *node ); + + +/* +================ +idCollisionModelManagerLocal::WriteNodes +================ +*/ +void idCollisionModelManagerLocal::WriteNodes( idFile *fp, cm_node_t *node ) { + fp->WriteFloatString( "\t( %d %f )\n", node->planeType, node->planeDist ); + if ( node->planeType != -1 ) { + WriteNodes( fp, node->children[0] ); + WriteNodes( fp, node->children[1] ); + } +} + +/* +================ +idCollisionModelManagerLocal::CountPolygonMemory +================ +*/ +int idCollisionModelManagerLocal::CountPolygonMemory( cm_node_t *node ) const { + cm_polygonRef_t *pref; + cm_polygon_t *p; + int memory; + + memory = 0; + for ( pref = node->polygons; pref; pref = pref->next ) { + p = pref->p; + if ( p->checkcount == checkCount ) { + continue; + } + p->checkcount = checkCount; + + memory += sizeof( cm_polygon_t ) + ( p->numEdges - 1 ) * sizeof( p->edges[0] ); + } + if ( node->planeType != -1 ) { + memory += CountPolygonMemory( node->children[0] ); + memory += CountPolygonMemory( node->children[1] ); + } + return memory; +} + +/* +================ +idCollisionModelManagerLocal::WritePolygons +================ +*/ +void idCollisionModelManagerLocal::WritePolygons( idFile *fp, cm_node_t *node ) { + cm_polygonRef_t *pref; + cm_polygon_t *p; + int i; + + for ( pref = node->polygons; pref; pref = pref->next ) { + p = pref->p; + if ( p->checkcount == checkCount ) { + continue; + } + p->checkcount = checkCount; + fp->WriteFloatString( "\t%d (", p->numEdges ); + for ( i = 0; i < p->numEdges; i++ ) { + fp->WriteFloatString( " %d", p->edges[i] ); + } + fp->WriteFloatString( " ) ( %f %f %f ) %f", p->plane.Normal()[0], p->plane.Normal()[1], p->plane.Normal()[2], p->plane.Dist() ); + fp->WriteFloatString( " ( %f %f %f )", p->bounds[0][0], p->bounds[0][1], p->bounds[0][2] ); + fp->WriteFloatString( " ( %f %f %f )", p->bounds[1][0], p->bounds[1][1], p->bounds[1][2] ); + fp->WriteFloatString( " \"%s\"\n", p->material->GetName() ); + } + if ( node->planeType != -1 ) { + WritePolygons( fp, node->children[0] ); + WritePolygons( fp, node->children[1] ); + } +} + +/* +================ +idCollisionModelManagerLocal::CountBrushMemory +================ +*/ +int idCollisionModelManagerLocal::CountBrushMemory( cm_node_t *node ) const { + cm_brushRef_t *bref; + cm_brush_t *b; + int memory; + + memory = 0; + for ( bref = node->brushes; bref; bref = bref->next ) { + b = bref->b; + if ( b->checkcount == checkCount ) { + continue; + } + b->checkcount = checkCount; + + memory += sizeof( cm_brush_t ) + ( b->numPlanes - 1 ) * sizeof( b->planes[0] ); + } + if ( node->planeType != -1 ) { + memory += CountBrushMemory( node->children[0] ); + memory += CountBrushMemory( node->children[1] ); + } + return memory; +} + +/* +================ +idCollisionModelManagerLocal::WriteBrushes +================ +*/ +void idCollisionModelManagerLocal::WriteBrushes( idFile *fp, cm_node_t *node ) { + cm_brushRef_t *bref; + cm_brush_t *b; + int i; + + for ( bref = node->brushes; bref; bref = bref->next ) { + b = bref->b; + if ( b->checkcount == checkCount ) { + continue; + } + b->checkcount = checkCount; + fp->WriteFloatString( "\t%d {\n", b->numPlanes ); + for ( i = 0; i < b->numPlanes; i++ ) { + fp->WriteFloatString( "\t\t( %f %f %f ) %f\n", b->planes[i].Normal()[0], b->planes[i].Normal()[1], b->planes[i].Normal()[2], b->planes[i].Dist() ); + } + fp->WriteFloatString( "\t} ( %f %f %f )", b->bounds[0][0], b->bounds[0][1], b->bounds[0][2] ); + fp->WriteFloatString( " ( %f %f %f ) \"%s\"\n", b->bounds[1][0], b->bounds[1][1], b->bounds[1][2], StringFromContents( b->contents ) ); + } + if ( node->planeType != -1 ) { + WriteBrushes( fp, node->children[0] ); + WriteBrushes( fp, node->children[1] ); + } +} + +/* +================ +idCollisionModelManagerLocal::WriteCollisionModel +================ +*/ +void idCollisionModelManagerLocal::WriteCollisionModel( idFile *fp, cm_model_t *model ) { + int i, polygonMemory, brushMemory; + + fp->WriteFloatString( "collisionModel \"%s\" {\n", model->name.c_str() ); + // vertices + fp->WriteFloatString( "\tvertices { /* numVertices = */ %d\n", model->numVertices ); + for ( i = 0; i < model->numVertices; i++ ) { + fp->WriteFloatString( "\t/* %d */ ( %f %f %f )\n", i, model->vertices[i].p[0], model->vertices[i].p[1], model->vertices[i].p[2] ); + } + fp->WriteFloatString( "\t}\n" ); + // edges + fp->WriteFloatString( "\tedges { /* numEdges = */ %d\n", model->numEdges ); + for ( i = 0; i < model->numEdges; i++ ) { + fp->WriteFloatString( "\t/* %d */ ( %d %d ) %d %d\n", i, model->edges[i].vertexNum[0], model->edges[i].vertexNum[1], model->edges[i].internal, model->edges[i].numUsers ); + } + fp->WriteFloatString( "\t}\n" ); + // nodes + fp->WriteFloatString( "\tnodes {\n" ); + WriteNodes( fp, model->node ); + fp->WriteFloatString( "\t}\n" ); + // polygons + checkCount++; + polygonMemory = CountPolygonMemory( model->node ); + fp->WriteFloatString( "\tpolygons /* polygonMemory = */ %d {\n", polygonMemory ); + checkCount++; + WritePolygons( fp, model->node ); + fp->WriteFloatString( "\t}\n" ); + // brushes + checkCount++; + brushMemory = CountBrushMemory( model->node ); + fp->WriteFloatString( "\tbrushes /* brushMemory = */ %d {\n", brushMemory ); + checkCount++; + WriteBrushes( fp, model->node ); + fp->WriteFloatString( "\t}\n" ); + // closing brace + fp->WriteFloatString( "}\n" ); +} + +/* +================ +idCollisionModelManagerLocal::WriteCollisionModelsToFile +================ +*/ +void idCollisionModelManagerLocal::WriteCollisionModelsToFile( const char *filename, int firstModel, int lastModel, unsigned int mapFileCRC ) { + int i; + idFile *fp; + idStr name; + + name = filename; + name.SetFileExtension( CM_FILE_EXT ); + + common->Printf( "writing %s\n", name.c_str() ); + // _D3XP was saving to fs_cdpath + fp = fileSystem->OpenFileWrite( name, "fs_devpath" ); + if ( !fp ) { + common->Warning( "idCollisionModelManagerLocal::WriteCollisionModelsToFile: Error opening file %s\n", name.c_str() ); + return; + } + + // write file id and version + fp->WriteFloatString( "%s \"%s\"\n\n", CM_FILEID, CM_FILEVERSION ); + // write the map file crc + fp->WriteFloatString( "%u\n\n", mapFileCRC ); + + // write the collision models + for ( i = firstModel; i < lastModel; i++ ) { + WriteCollisionModel( fp, models[ i ] ); + } + + fileSystem->CloseFile( fp ); +} + +/* +================ +idCollisionModelManagerLocal::WriteCollisionModelForMapEntity +================ +*/ +bool idCollisionModelManagerLocal::WriteCollisionModelForMapEntity( const idMapEntity *mapEnt, const char *filename, const bool testTraceModel ) { + idFile *fp; + idStr name; + cm_model_t *model; + + SetupHash(); + model = CollisionModelForMapEntity( mapEnt ); + model->name = filename; + + name = filename; + name.SetFileExtension( CM_FILE_EXT ); + + common->Printf( "writing %s\n", name.c_str() ); + fp = fileSystem->OpenFileWrite( name, "fs_devpath" ); + if ( !fp ) { + common->Printf( "idCollisionModelManagerLocal::WriteCollisionModelForMapEntity: Error opening file %s\n", name.c_str() ); + FreeModel( model ); + return false; + } + + // write file id and version + fp->WriteFloatString( "%s \"%s\"\n\n", CM_FILEID, CM_FILEVERSION ); + // write the map file crc + fp->WriteFloatString( "%u\n\n", 0 ); + + // write the collision model + WriteCollisionModel( fp, model ); + + fileSystem->CloseFile( fp ); + + if ( testTraceModel ) { + idTraceModel trm; + TrmFromModel( model, trm ); + } + + FreeModel( model ); + + return true; +} + + +/* +=============================================================================== + +Loading of collision model file + +=============================================================================== +*/ + +/* +================ +idCollisionModelManagerLocal::ParseVertices +================ +*/ +void idCollisionModelManagerLocal::ParseVertices( idLexer *src, cm_model_t *model ) { + int i; + + src->ExpectTokenString( "{" ); + model->numVertices = src->ParseInt(); + model->maxVertices = model->numVertices; + model->vertices = (cm_vertex_t *) Mem_Alloc( model->maxVertices * sizeof( cm_vertex_t ) ); + for ( i = 0; i < model->numVertices; i++ ) { + src->Parse1DMatrix( 3, model->vertices[i].p.ToFloatPtr() ); + model->vertices[i].side = 0; + model->vertices[i].sideSet = 0; + model->vertices[i].checkcount = 0; + } + src->ExpectTokenString( "}" ); +} + +/* +================ +idCollisionModelManagerLocal::ParseEdges +================ +*/ +void idCollisionModelManagerLocal::ParseEdges( idLexer *src, cm_model_t *model ) { + int i; + + src->ExpectTokenString( "{" ); + model->numEdges = src->ParseInt(); + model->maxEdges = model->numEdges; + model->edges = (cm_edge_t *) Mem_Alloc( model->maxEdges * sizeof( cm_edge_t ) ); + for ( i = 0; i < model->numEdges; i++ ) { + src->ExpectTokenString( "(" ); + model->edges[i].vertexNum[0] = src->ParseInt(); + model->edges[i].vertexNum[1] = src->ParseInt(); + src->ExpectTokenString( ")" ); + model->edges[i].side = 0; + model->edges[i].sideSet = 0; + model->edges[i].internal = src->ParseInt(); + model->edges[i].numUsers = src->ParseInt(); + model->edges[i].normal = vec3_origin; + model->edges[i].checkcount = 0; + model->numInternalEdges += model->edges[i].internal; + } + src->ExpectTokenString( "}" ); +} + +/* +================ +idCollisionModelManagerLocal::ParseNodes +================ +*/ +cm_node_t *idCollisionModelManagerLocal::ParseNodes( idLexer *src, cm_model_t *model, cm_node_t *parent ) { + cm_node_t *node; + + model->numNodes++; + node = AllocNode( model, model->numNodes < NODE_BLOCK_SIZE_SMALL ? NODE_BLOCK_SIZE_SMALL : NODE_BLOCK_SIZE_LARGE ); + node->brushes = NULL; + node->polygons = NULL; + node->parent = parent; + src->ExpectTokenString( "(" ); + node->planeType = src->ParseInt(); + node->planeDist = src->ParseFloat(); + src->ExpectTokenString( ")" ); + if ( node->planeType != -1 ) { + node->children[0] = ParseNodes( src, model, node ); + node->children[1] = ParseNodes( src, model, node ); + } + return node; +} + +/* +================ +idCollisionModelManagerLocal::ParsePolygons +================ +*/ +void idCollisionModelManagerLocal::ParsePolygons( idLexer *src, cm_model_t *model ) { + cm_polygon_t *p; + int i, numEdges; + idVec3 normal; + idToken token; + + if ( src->CheckTokenType( TT_NUMBER, 0, &token ) ) { + model->polygonBlock = (cm_polygonBlock_t *) Mem_Alloc( sizeof( cm_polygonBlock_t ) + token.GetIntValue() ); + model->polygonBlock->bytesRemaining = token.GetIntValue(); + model->polygonBlock->next = ( (byte *) model->polygonBlock ) + sizeof( cm_polygonBlock_t ); + } + + src->ExpectTokenString( "{" ); + while ( !src->CheckTokenString( "}" ) ) { + // parse polygon + numEdges = src->ParseInt(); + p = AllocPolygon( model, numEdges ); + p->numEdges = numEdges; + src->ExpectTokenString( "(" ); + for ( i = 0; i < p->numEdges; i++ ) { + p->edges[i] = src->ParseInt(); + } + src->ExpectTokenString( ")" ); + src->Parse1DMatrix( 3, normal.ToFloatPtr() ); + p->plane.SetNormal( normal ); + p->plane.SetDist( src->ParseFloat() ); + src->Parse1DMatrix( 3, p->bounds[0].ToFloatPtr() ); + src->Parse1DMatrix( 3, p->bounds[1].ToFloatPtr() ); + src->ExpectTokenType( TT_STRING, 0, &token ); + // get material + p->material = declManager->FindMaterial( token ); + p->contents = p->material->GetContentFlags(); + p->checkcount = 0; + // filter polygon into tree + R_FilterPolygonIntoTree( model, model->node, NULL, p ); + } +} + +/* +================ +idCollisionModelManagerLocal::ParseBrushes +================ +*/ +void idCollisionModelManagerLocal::ParseBrushes( idLexer *src, cm_model_t *model ) { + cm_brush_t *b; + int i, numPlanes; + idVec3 normal; + idToken token; + + if ( src->CheckTokenType( TT_NUMBER, 0, &token ) ) { + model->brushBlock = (cm_brushBlock_t *) Mem_Alloc( sizeof( cm_brushBlock_t ) + token.GetIntValue() ); + model->brushBlock->bytesRemaining = token.GetIntValue(); + model->brushBlock->next = ( (byte *) model->brushBlock ) + sizeof( cm_brushBlock_t ); + } + + src->ExpectTokenString( "{" ); + while ( !src->CheckTokenString( "}" ) ) { + // parse brush + numPlanes = src->ParseInt(); + b = AllocBrush( model, numPlanes ); + b->numPlanes = numPlanes; + src->ExpectTokenString( "{" ); + for ( i = 0; i < b->numPlanes; i++ ) { + src->Parse1DMatrix( 3, normal.ToFloatPtr() ); + b->planes[i].SetNormal( normal ); + b->planes[i].SetDist( src->ParseFloat() ); + } + src->ExpectTokenString( "}" ); + src->Parse1DMatrix( 3, b->bounds[0].ToFloatPtr() ); + src->Parse1DMatrix( 3, b->bounds[1].ToFloatPtr() ); + src->ReadToken( &token ); + if ( token.type == TT_NUMBER ) { + b->contents = token.GetIntValue(); // old .cm files use a single integer + } else { + b->contents = ContentsFromString( token ); + } + b->checkcount = 0; + b->primitiveNum = 0; + // filter brush into tree + R_FilterBrushIntoTree( model, model->node, NULL, b ); + } +} + +/* +================ +idCollisionModelManagerLocal::ParseCollisionModel +================ +*/ +bool idCollisionModelManagerLocal::ParseCollisionModel( idLexer *src ) { + cm_model_t *model; + idToken token; + + if ( numModels >= MAX_SUBMODELS ) { + common->Error( "LoadModel: no free slots" ); + return false; + } + model = AllocModel(); + models[numModels ] = model; + numModels++; + // parse the file + src->ExpectTokenType( TT_STRING, 0, &token ); + model->name = token; + src->ExpectTokenString( "{" ); + while ( !src->CheckTokenString( "}" ) ) { + + src->ReadToken( &token ); + + if ( token == "vertices" ) { + ParseVertices( src, model ); + continue; + } + + if ( token == "edges" ) { + ParseEdges( src, model ); + continue; + } + + if ( token == "nodes" ) { + src->ExpectTokenString( "{" ); + model->node = ParseNodes( src, model, NULL ); + src->ExpectTokenString( "}" ); + continue; + } + + if ( token == "polygons" ) { + ParsePolygons( src, model ); + continue; + } + + if ( token == "brushes" ) { + ParseBrushes( src, model ); + continue; + } + + src->Error( "ParseCollisionModel: bad token \"%s\"", token.c_str() ); + } + // calculate edge normals + checkCount++; + CalculateEdgeNormals( model, model->node ); + // get model bounds from brush and polygon bounds + CM_GetNodeBounds( &model->bounds, model->node ); + // get model contents + model->contents = CM_GetNodeContents( model->node ); + // total memory used by this model + model->usedMemory = model->numVertices * sizeof(cm_vertex_t) + + model->numEdges * sizeof(cm_edge_t) + + model->polygonMemory + + model->brushMemory + + model->numNodes * sizeof(cm_node_t) + + model->numPolygonRefs * sizeof(cm_polygonRef_t) + + model->numBrushRefs * sizeof(cm_brushRef_t); + + return true; +} + +/* +================ +idCollisionModelManagerLocal::LoadCollisionModelFile +================ +*/ +bool idCollisionModelManagerLocal::LoadCollisionModelFile( const char *name, unsigned int mapFileCRC ) { + idStr fileName; + idToken token; + idLexer *src; + unsigned int crc; + + // load it + fileName = name; + fileName.SetFileExtension( CM_FILE_EXT ); + src = new idLexer( fileName ); + src->SetFlags( LEXFL_NOSTRINGCONCAT | LEXFL_NODOLLARPRECOMPILE ); + if ( !src->IsLoaded() ) { + delete src; + return false; + } + + if ( !src->ExpectTokenString( CM_FILEID ) ) { + common->Warning( "%s is not an CM file.", fileName.c_str() ); + delete src; + return false; + } + + if ( !src->ReadToken( &token ) || token != CM_FILEVERSION ) { + common->Warning( "%s has version %s instead of %s", fileName.c_str(), token.c_str(), CM_FILEVERSION ); + delete src; + return false; + } + + if ( !src->ExpectTokenType( TT_NUMBER, TT_INTEGER, &token ) ) { + common->Warning( "%s has no map file CRC", fileName.c_str() ); + delete src; + return false; + } + + crc = token.GetUnsignedLongValue(); + if ( mapFileCRC && crc != mapFileCRC ) { + common->Printf( "%s is out of date\n", fileName.c_str() ); + delete src; + return false; + } + + // parse the file + while ( 1 ) { + if ( !src->ReadToken( &token ) ) { + break; + } + + if ( token == "collisionModel" ) { + if ( !ParseCollisionModel( src ) ) { + delete src; + return false; + } + continue; + } + + src->Error( "idCollisionModelManagerLocal::LoadCollisionModelFile: bad token \"%s\"", token.c_str() ); + } + + delete src; + + return true; +} diff --git a/neo/cm/CollisionModel_load.cpp b/neo/cm/CollisionModel_load.cpp new file mode 100644 index 0000000..b93bd68 --- /dev/null +++ b/neo/cm/CollisionModel_load.cpp @@ -0,0 +1,3693 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ + +/* +=============================================================================== + + Trace model vs. polygonal model collision detection. + + It is more important to minimize the number of collision polygons + than it is to minimize the number of edges used for collision + detection (total edges - internal edges). + + Stitching the world tends to minimize the number of edges used + for collision detection (more internal edges). However stitching + also results in more collision polygons which usually makes a + stitched world slower. + + In an average map over 30% of all edges is internal. + +=============================================================================== +*/ + +#include "../idlib/precompiled.h" +#pragma hdrstop + +#include "CollisionModel_local.h" + + +idCollisionModelManagerLocal collisionModelManagerLocal; +idCollisionModelManager * collisionModelManager = &collisionModelManagerLocal; + +cm_windingList_t * cm_windingList; +cm_windingList_t * cm_outList; +cm_windingList_t * cm_tmpList; + +idHashIndex * cm_vertexHash; +idHashIndex * cm_edgeHash; + +idBounds cm_modelBounds; +int cm_vertexShift; + + +/* +=============================================================================== + +Proc BSP tree for data pruning + +=============================================================================== +*/ + +/* +================ +idCollisionModelManagerLocal::ParseProcNodes +================ +*/ +void idCollisionModelManagerLocal::ParseProcNodes( idLexer *src ) { + int i; + + src->ExpectTokenString( "{" ); + + numProcNodes = src->ParseInt(); + if ( numProcNodes < 0 ) { + src->Error( "ParseProcNodes: bad numProcNodes" ); + } + procNodes = (cm_procNode_t *)Mem_ClearedAlloc( numProcNodes * sizeof( cm_procNode_t ) ); + + for ( i = 0; i < numProcNodes; i++ ) { + cm_procNode_t *node; + + node = &procNodes[i]; + + src->Parse1DMatrix( 4, node->plane.ToFloatPtr() ); + node->children[0] = src->ParseInt(); + node->children[1] = src->ParseInt(); + } + + src->ExpectTokenString( "}" ); +} + +/* +================ +idCollisionModelManagerLocal::LoadProcBSP + + FIXME: if the nodes would be at the start of the .proc file it would speed things up considerably +================ +*/ +void idCollisionModelManagerLocal::LoadProcBSP( const char *name ) { + idStr filename; + idToken token; + idLexer *src; + + // load it + filename = name; + filename.SetFileExtension( PROC_FILE_EXT ); + src = new idLexer( filename, LEXFL_NOSTRINGCONCAT | LEXFL_NODOLLARPRECOMPILE ); + if ( !src->IsLoaded() ) { + common->Warning( "idCollisionModelManagerLocal::LoadProcBSP: couldn't load %s", filename.c_str() ); + delete src; + return; + } + + if ( !src->ReadToken( &token ) || token.Icmp( PROC_FILE_ID ) ) { + common->Warning( "idCollisionModelManagerLocal::LoadProcBSP: bad id '%s' instead of '%s'", token.c_str(), PROC_FILE_ID ); + delete src; + return; + } + + // parse the file + while ( 1 ) { + if ( !src->ReadToken( &token ) ) { + break; + } + + if ( token == "model" ) { + src->SkipBracedSection(); + continue; + } + + if ( token == "shadowModel" ) { + src->SkipBracedSection(); + continue; + } + + if ( token == "interAreaPortals" ) { + src->SkipBracedSection(); + continue; + } + + if ( token == "nodes" ) { + ParseProcNodes( src ); + break; + } + + src->Error( "idCollisionModelManagerLocal::LoadProcBSP: bad token \"%s\"", token.c_str() ); + } + + delete src; +} + +/* +=============================================================================== + +Free map + +=============================================================================== +*/ + +/* +================ +idCollisionModelManagerLocal::Clear +================ +*/ +void idCollisionModelManagerLocal::Clear( void ) { + mapName.Clear(); + mapFileTime = 0; + loaded = 0; + checkCount = 0; + maxModels = 0; + numModels = 0; + models = NULL; + memset( trmPolygons, 0, sizeof( trmPolygons ) ); + trmBrushes[0] = NULL; + trmMaterial = NULL; + numProcNodes = 0; + procNodes = NULL; + getContacts = false; + contacts = NULL; + maxContacts = 0; + numContacts = 0; +} + +/* +================ +idCollisionModelManagerLocal::RemovePolygonReferences_r +================ +*/ +void idCollisionModelManagerLocal::RemovePolygonReferences_r( cm_node_t *node, cm_polygon_t *p ) { + cm_polygonRef_t *pref; + + while( node ) { + for ( pref = node->polygons; pref; pref = pref->next ) { + if ( pref->p == p ) { + pref->p = NULL; + // cannot return here because we can have links down the tree due to polygon merging + //return; + } + } + // if leaf node + if ( node->planeType == -1 ) { + break; + } + if ( p->bounds[0][node->planeType] > node->planeDist ) { + node = node->children[0]; + } + else if ( p->bounds[1][node->planeType] < node->planeDist ) { + node = node->children[1]; + } + else { + RemovePolygonReferences_r( node->children[1], p ); + node = node->children[0]; + } + } +} + +/* +================ +idCollisionModelManagerLocal::RemoveBrushReferences_r +================ +*/ +void idCollisionModelManagerLocal::RemoveBrushReferences_r( cm_node_t *node, cm_brush_t *b ) { + cm_brushRef_t *bref; + + while( node ) { + for ( bref = node->brushes; bref; bref = bref->next ) { + if ( bref->b == b ) { + bref->b = NULL; + return; + } + } + // if leaf node + if ( node->planeType == -1 ) { + break; + } + if ( b->bounds[0][node->planeType] > node->planeDist ) { + node = node->children[0]; + } + else if ( b->bounds[1][node->planeType] < node->planeDist ) { + node = node->children[1]; + } + else { + RemoveBrushReferences_r( node->children[1], b ); + node = node->children[0]; + } + } +} + +/* +================ +idCollisionModelManagerLocal::FreeNode +================ +*/ +void idCollisionModelManagerLocal::FreeNode( cm_node_t *node ) { + // don't free the node here + // the nodes are allocated in blocks which are freed when the model is freed +} + +/* +================ +idCollisionModelManagerLocal::FreePolygonReference +================ +*/ +void idCollisionModelManagerLocal::FreePolygonReference( cm_polygonRef_t *pref ) { + // don't free the polygon reference here + // the polygon references are allocated in blocks which are freed when the model is freed +} + +/* +================ +idCollisionModelManagerLocal::FreeBrushReference +================ +*/ +void idCollisionModelManagerLocal::FreeBrushReference( cm_brushRef_t *bref ) { + // don't free the brush reference here + // the brush references are allocated in blocks which are freed when the model is freed +} + +/* +================ +idCollisionModelManagerLocal::FreePolygon +================ +*/ +void idCollisionModelManagerLocal::FreePolygon( cm_model_t *model, cm_polygon_t *poly ) { + model->numPolygons--; + model->polygonMemory -= sizeof( cm_polygon_t ) + ( poly->numEdges - 1 ) * sizeof( poly->edges[0] ); + if ( model->polygonBlock == NULL ) { + Mem_Free( poly ); + } +} + +/* +================ +idCollisionModelManagerLocal::FreeBrush +================ +*/ +void idCollisionModelManagerLocal::FreeBrush( cm_model_t *model, cm_brush_t *brush ) { + model->numBrushes--; + model->brushMemory -= sizeof( cm_brush_t ) + ( brush->numPlanes - 1 ) * sizeof( brush->planes[0] ); + if ( model->brushBlock == NULL ) { + Mem_Free( brush ); + } +} + +/* +================ +idCollisionModelManagerLocal::FreeTree_r +================ +*/ +void idCollisionModelManagerLocal::FreeTree_r( cm_model_t *model, cm_node_t *headNode, cm_node_t *node ) { + cm_polygonRef_t *pref; + cm_polygon_t *p; + cm_brushRef_t *bref; + cm_brush_t *b; + + // free all polygons at this node + for ( pref = node->polygons; pref; pref = node->polygons ) { + p = pref->p; + if ( p ) { + // remove all other references to this polygon + RemovePolygonReferences_r( headNode, p ); + FreePolygon( model, p ); + } + node->polygons = pref->next; + FreePolygonReference( pref ); + } + // free all brushes at this node + for ( bref = node->brushes; bref; bref = node->brushes ) { + b = bref->b; + if ( b ) { + // remove all other references to this brush + RemoveBrushReferences_r( headNode, b ); + FreeBrush( model, b ); + } + node->brushes = bref->next; + FreeBrushReference( bref ); + } + // recurse down the tree + if ( node->planeType != -1 ) { + FreeTree_r( model, headNode, node->children[0] ); + node->children[0] = NULL; + FreeTree_r( model, headNode, node->children[1] ); + node->children[1] = NULL; + } + FreeNode( node ); +} + +/* +================ +idCollisionModelManagerLocal::FreeModel +================ +*/ +void idCollisionModelManagerLocal::FreeModel( cm_model_t *model ) { + cm_polygonRefBlock_t *polygonRefBlock, *nextPolygonRefBlock; + cm_brushRefBlock_t *brushRefBlock, *nextBrushRefBlock; + cm_nodeBlock_t *nodeBlock, *nextNodeBlock; + + // free the tree structure + if ( model->node ) { + FreeTree_r( model, model->node, model->node ); + } + // free blocks with polygon references + for ( polygonRefBlock = model->polygonRefBlocks; polygonRefBlock; polygonRefBlock = nextPolygonRefBlock ) { + nextPolygonRefBlock = polygonRefBlock->next; + Mem_Free( polygonRefBlock ); + } + // free blocks with brush references + for ( brushRefBlock = model->brushRefBlocks; brushRefBlock; brushRefBlock = nextBrushRefBlock ) { + nextBrushRefBlock = brushRefBlock->next; + Mem_Free( brushRefBlock ); + } + // free blocks with nodes + for ( nodeBlock = model->nodeBlocks; nodeBlock; nodeBlock = nextNodeBlock ) { + nextNodeBlock = nodeBlock->next; + Mem_Free( nodeBlock ); + } + // free block allocated polygons + Mem_Free( model->polygonBlock ); + // free block allocated brushes + Mem_Free( model->brushBlock ); + // free edges + Mem_Free( model->edges ); + // free vertices + Mem_Free( model->vertices ); + // free the model + delete model; +} + +/* +================ +idCollisionModelManagerLocal::FreeMap +================ +*/ +void idCollisionModelManagerLocal::FreeMap( void ) { + int i; + + if ( !loaded ) { + Clear(); + return; + } + + for ( i = 0; i < maxModels; i++ ) { + if ( !models[i] ) { + continue; + } + FreeModel( models[i] ); + } + + FreeTrmModelStructure(); + + Mem_Free( models ); + + Clear(); + + ShutdownHash(); +} + +/* +================ +idCollisionModelManagerLocal::FreeTrmModelStructure +================ +*/ +void idCollisionModelManagerLocal::FreeTrmModelStructure( void ) { + int i; + + assert( models ); + if ( !models[MAX_SUBMODELS] ) { + return; + } + + for ( i = 0; i < MAX_TRACEMODEL_POLYS; i++ ) { + FreePolygon( models[MAX_SUBMODELS], trmPolygons[i]->p ); + } + FreeBrush( models[MAX_SUBMODELS], trmBrushes[0]->b ); + + models[MAX_SUBMODELS]->node->polygons = NULL; + models[MAX_SUBMODELS]->node->brushes = NULL; + FreeModel( models[MAX_SUBMODELS] ); +} + + +/* +=============================================================================== + +Edge normals + +=============================================================================== +*/ + +/* +================ +idCollisionModelManagerLocal::CalculateEdgeNormals +================ +*/ +#define SHARP_EDGE_DOT -0.7f + +void idCollisionModelManagerLocal::CalculateEdgeNormals( cm_model_t *model, cm_node_t *node ) { + cm_polygonRef_t *pref; + cm_polygon_t *p; + cm_edge_t *edge; + float dot, s; + int i, edgeNum; + idVec3 dir; + + while( 1 ) { + for ( pref = node->polygons; pref; pref = pref->next ) { + p = pref->p; + // if we checked this polygon already + if ( p->checkcount == checkCount ) { + continue; + } + p->checkcount = checkCount; + + for ( i = 0; i < p->numEdges; i++ ) { + edgeNum = p->edges[i]; + edge = model->edges + abs( edgeNum ); + if ( edge->normal[0] == 0.0f && edge->normal[1] == 0.0f && edge->normal[2] == 0.0f ) { + // if the edge is only used by this polygon + if ( edge->numUsers == 1 ) { + dir = model->vertices[ edge->vertexNum[edgeNum < 0]].p - model->vertices[ edge->vertexNum[edgeNum > 0]].p; + edge->normal = p->plane.Normal().Cross( dir ); + edge->normal.Normalize(); + } else { + // the edge is used by more than one polygon + edge->normal = p->plane.Normal(); + } + } else { + dot = edge->normal * p->plane.Normal(); + // if the two planes make a very sharp edge + if ( dot < SHARP_EDGE_DOT ) { + // max length normal pointing outside both polygons + dir = model->vertices[ edge->vertexNum[edgeNum > 0]].p - model->vertices[ edge->vertexNum[edgeNum < 0]].p; + edge->normal = edge->normal.Cross( dir ) + p->plane.Normal().Cross( -dir ); + edge->normal *= ( 0.5f / ( 0.5f + 0.5f * SHARP_EDGE_DOT ) ) / edge->normal.Length(); + model->numSharpEdges++; + } else { + s = 0.5f / ( 0.5f + 0.5f * dot ); + edge->normal = s * ( edge->normal + p->plane.Normal() ); + } + } + } + } + // if leaf node + if ( node->planeType == -1 ) { + break; + } + CalculateEdgeNormals( model, node->children[1] ); + node = node->children[0]; + } +} + +/* +=============================================================================== + +Trace model to general collision model + +=============================================================================== +*/ + +/* +================ +idCollisionModelManagerLocal::AllocModel +================ +*/ +cm_model_t *idCollisionModelManagerLocal::AllocModel( void ) { + cm_model_t *model; + + model = new cm_model_t; + model->contents = 0; + model->isConvex = false; + model->maxVertices = 0; + model->numVertices = 0; + model->vertices = NULL; + model->maxEdges = 0; + model->numEdges = 0; + model->edges= NULL; + model->node = NULL; + model->nodeBlocks = NULL; + model->polygonRefBlocks = NULL; + model->brushRefBlocks = NULL; + model->polygonBlock = NULL; + model->brushBlock = NULL; + model->numPolygons = model->polygonMemory = + model->numBrushes = model->brushMemory = + model->numNodes = model->numBrushRefs = + model->numPolygonRefs = model->numInternalEdges = + model->numSharpEdges = model->numRemovedPolys = + model->numMergedPolys = model->usedMemory = 0; + + return model; +} + +/* +================ +idCollisionModelManagerLocal::AllocNode +================ +*/ +cm_node_t *idCollisionModelManagerLocal::AllocNode( cm_model_t *model, int blockSize ) { + int i; + cm_node_t *node; + cm_nodeBlock_t *nodeBlock; + + if ( !model->nodeBlocks || !model->nodeBlocks->nextNode ) { + nodeBlock = (cm_nodeBlock_t *) Mem_ClearedAlloc( sizeof( cm_nodeBlock_t ) + blockSize * sizeof(cm_node_t) ); + nodeBlock->nextNode = (cm_node_t *) ( ( (byte *) nodeBlock ) + sizeof( cm_nodeBlock_t ) ); + nodeBlock->next = model->nodeBlocks; + model->nodeBlocks = nodeBlock; + node = nodeBlock->nextNode; + for ( i = 0; i < blockSize - 1; i++ ) { + node->parent = node + 1; + node = node->parent; + } + node->parent = NULL; + } + + node = model->nodeBlocks->nextNode; + model->nodeBlocks->nextNode = node->parent; + node->parent = NULL; + + return node; +} + +/* +================ +idCollisionModelManagerLocal::AllocPolygonReference +================ +*/ +cm_polygonRef_t *idCollisionModelManagerLocal::AllocPolygonReference( cm_model_t *model, int blockSize ) { + int i; + cm_polygonRef_t *pref; + cm_polygonRefBlock_t *prefBlock; + + if ( !model->polygonRefBlocks || !model->polygonRefBlocks->nextRef ) { + prefBlock = (cm_polygonRefBlock_t *) Mem_Alloc( sizeof( cm_polygonRefBlock_t ) + blockSize * sizeof(cm_polygonRef_t) ); + prefBlock->nextRef = (cm_polygonRef_t *) ( ( (byte *) prefBlock ) + sizeof( cm_polygonRefBlock_t ) ); + prefBlock->next = model->polygonRefBlocks; + model->polygonRefBlocks = prefBlock; + pref = prefBlock->nextRef; + for ( i = 0; i < blockSize - 1; i++ ) { + pref->next = pref + 1; + pref = pref->next; + } + pref->next = NULL; + } + + pref = model->polygonRefBlocks->nextRef; + model->polygonRefBlocks->nextRef = pref->next; + + return pref; +} + +/* +================ +idCollisionModelManagerLocal::AllocBrushReference +================ +*/ +cm_brushRef_t *idCollisionModelManagerLocal::AllocBrushReference( cm_model_t *model, int blockSize ) { + int i; + cm_brushRef_t *bref; + cm_brushRefBlock_t *brefBlock; + + if ( !model->brushRefBlocks || !model->brushRefBlocks->nextRef ) { + brefBlock = (cm_brushRefBlock_t *) Mem_Alloc( sizeof(cm_brushRefBlock_t) + blockSize * sizeof(cm_brushRef_t) ); + brefBlock->nextRef = (cm_brushRef_t *) ( ( (byte *) brefBlock ) + sizeof(cm_brushRefBlock_t) ); + brefBlock->next = model->brushRefBlocks; + model->brushRefBlocks = brefBlock; + bref = brefBlock->nextRef; + for ( i = 0; i < blockSize - 1; i++ ) { + bref->next = bref + 1; + bref = bref->next; + } + bref->next = NULL; + } + + bref = model->brushRefBlocks->nextRef; + model->brushRefBlocks->nextRef = bref->next; + + return bref; +} + +/* +================ +idCollisionModelManagerLocal::AllocPolygon +================ +*/ +cm_polygon_t *idCollisionModelManagerLocal::AllocPolygon( cm_model_t *model, int numEdges ) { + cm_polygon_t *poly; + int size; + + size = sizeof( cm_polygon_t ) + ( numEdges - 1 ) * sizeof( poly->edges[0] ); + model->numPolygons++; + model->polygonMemory += size; + if ( model->polygonBlock && model->polygonBlock->bytesRemaining >= size ) { + poly = (cm_polygon_t *) model->polygonBlock->next; + model->polygonBlock->next += size; + model->polygonBlock->bytesRemaining -= size; + } else { + poly = (cm_polygon_t *) Mem_Alloc( size ); + } + return poly; +} + +/* +================ +idCollisionModelManagerLocal::AllocBrush +================ +*/ +cm_brush_t *idCollisionModelManagerLocal::AllocBrush( cm_model_t *model, int numPlanes ) { + cm_brush_t *brush; + int size; + + size = sizeof( cm_brush_t ) + ( numPlanes - 1 ) * sizeof( brush->planes[0] ); + model->numBrushes++; + model->brushMemory += size; + if ( model->brushBlock && model->brushBlock->bytesRemaining >= size ) { + brush = (cm_brush_t *) model->brushBlock->next; + model->brushBlock->next += size; + model->brushBlock->bytesRemaining -= size; + } else { + brush = (cm_brush_t *) Mem_Alloc( size ); + } + return brush; +} + +/* +================ +idCollisionModelManagerLocal::AddPolygonToNode +================ +*/ +void idCollisionModelManagerLocal::AddPolygonToNode( cm_model_t *model, cm_node_t *node, cm_polygon_t *p ) { + cm_polygonRef_t *pref; + + pref = AllocPolygonReference( model, model->numPolygonRefs < REFERENCE_BLOCK_SIZE_SMALL ? REFERENCE_BLOCK_SIZE_SMALL : REFERENCE_BLOCK_SIZE_LARGE ); + pref->p = p; + pref->next = node->polygons; + node->polygons = pref; + model->numPolygonRefs++; +} + +/* +================ +idCollisionModelManagerLocal::AddBrushToNode +================ +*/ +void idCollisionModelManagerLocal::AddBrushToNode( cm_model_t *model, cm_node_t *node, cm_brush_t *b ) { + cm_brushRef_t *bref; + + bref = AllocBrushReference( model, model->numBrushRefs < REFERENCE_BLOCK_SIZE_SMALL ? REFERENCE_BLOCK_SIZE_SMALL : REFERENCE_BLOCK_SIZE_LARGE ); + bref->b = b; + bref->next = node->brushes; + node->brushes = bref; + model->numBrushRefs++; +} + +/* +================ +idCollisionModelManagerLocal::SetupTrmModelStructure +================ +*/ +void idCollisionModelManagerLocal::SetupTrmModelStructure( void ) { + int i; + cm_node_t *node; + cm_model_t *model; + + // setup model + model = AllocModel(); + + assert( models ); + models[MAX_SUBMODELS] = model; + // create node to hold the collision data + node = (cm_node_t *) AllocNode( model, 1 ); + node->planeType = -1; + model->node = node; + // allocate vertex and edge arrays + model->numVertices = 0; + model->maxVertices = MAX_TRACEMODEL_VERTS; + model->vertices = (cm_vertex_t *) Mem_ClearedAlloc( model->maxVertices * sizeof(cm_vertex_t) ); + model->numEdges = 0; + model->maxEdges = MAX_TRACEMODEL_EDGES+1; + model->edges = (cm_edge_t *) Mem_ClearedAlloc( model->maxEdges * sizeof(cm_edge_t) ); + // create a material for the trace model polygons + trmMaterial = declManager->FindMaterial( "_tracemodel", false ); + if ( !trmMaterial ) { + common->FatalError( "_tracemodel material not found" ); + } + + // allocate polygons + for ( i = 0; i < MAX_TRACEMODEL_POLYS; i++ ) { + trmPolygons[i] = AllocPolygonReference( model, MAX_TRACEMODEL_POLYS ); + trmPolygons[i]->p = AllocPolygon( model, MAX_TRACEMODEL_POLYEDGES ); + trmPolygons[i]->p->bounds.Clear(); + trmPolygons[i]->p->plane.Zero(); + trmPolygons[i]->p->checkcount = 0; + trmPolygons[i]->p->contents = -1; // all contents + trmPolygons[i]->p->material = trmMaterial; + trmPolygons[i]->p->numEdges = 0; + } + // allocate brush for position test + trmBrushes[0] = AllocBrushReference( model, 1 ); + trmBrushes[0]->b = AllocBrush( model, MAX_TRACEMODEL_POLYS ); + trmBrushes[0]->b->primitiveNum = 0; + trmBrushes[0]->b->bounds.Clear(); + trmBrushes[0]->b->checkcount = 0; + trmBrushes[0]->b->contents = -1; // all contents + trmBrushes[0]->b->numPlanes = 0; +} + +/* +================ +idCollisionModelManagerLocal::SetupTrmModel + +Trace models (item boxes, etc) are converted to collision models on the fly, using the last model slot +as a reusable temporary buffer +================ +*/ +cmHandle_t idCollisionModelManagerLocal::SetupTrmModel( const idTraceModel &trm, const idMaterial *material ) { + int i, j; + cm_vertex_t *vertex; + cm_edge_t *edge; + cm_polygon_t *poly; + cm_model_t *model; + const traceModelVert_t *trmVert; + const traceModelEdge_t *trmEdge; + const traceModelPoly_t *trmPoly; + + assert( models ); + + if ( material == NULL ) { + material = trmMaterial; + } + + model = models[MAX_SUBMODELS]; + model->node->brushes = NULL; + model->node->polygons = NULL; + // if not a valid trace model + if ( trm.type == TRM_INVALID || !trm.numPolys ) { + return TRACE_MODEL_HANDLE; + } + // vertices + model->numVertices = trm.numVerts; + vertex = model->vertices; + trmVert = trm.verts; + for ( i = 0; i < trm.numVerts; i++, vertex++, trmVert++ ) { + vertex->p = *trmVert; + vertex->sideSet = 0; + } + // edges + model->numEdges = trm.numEdges; + edge = model->edges + 1; + trmEdge = trm.edges + 1; + for ( i = 0; i < trm.numEdges; i++, edge++, trmEdge++ ) { + edge->vertexNum[0] = trmEdge->v[0]; + edge->vertexNum[1] = trmEdge->v[1]; + edge->normal = trmEdge->normal; + edge->internal = false; + edge->sideSet = 0; + } + // polygons + model->numPolygons = trm.numPolys; + trmPoly = trm.polys; + for ( i = 0; i < trm.numPolys; i++, trmPoly++ ) { + poly = trmPolygons[i]->p; + poly->numEdges = trmPoly->numEdges; + for ( j = 0; j < trmPoly->numEdges; j++ ) { + poly->edges[j] = trmPoly->edges[j]; + } + poly->plane.SetNormal( trmPoly->normal ); + poly->plane.SetDist( trmPoly->dist ); + poly->bounds = trmPoly->bounds; + poly->material = material; + // link polygon at node + trmPolygons[i]->next = model->node->polygons; + model->node->polygons = trmPolygons[i]; + } + // if the trace model is convex + if ( trm.isConvex ) { + // setup brush for position test + trmBrushes[0]->b->numPlanes = trm.numPolys; + for ( i = 0; i < trm.numPolys; i++ ) { + trmBrushes[0]->b->planes[i] = trmPolygons[i]->p->plane; + } + trmBrushes[0]->b->bounds = trm.bounds; + // link brush at node + trmBrushes[0]->next = model->node->brushes; + model->node->brushes = trmBrushes[0]; + } + // model bounds + model->bounds = trm.bounds; + // convex + model->isConvex = trm.isConvex; + + return TRACE_MODEL_HANDLE; +} + +/* +=============================================================================== + +Optimisation, removal of polygons contained within brushes or solid + +=============================================================================== +*/ + +/* +============ +idCollisionModelManagerLocal::R_ChoppedAwayByProcBSP +============ +*/ +int idCollisionModelManagerLocal::R_ChoppedAwayByProcBSP( int nodeNum, idFixedWinding *w, const idVec3 &normal, const idVec3 &origin, const float radius ) { + int res; + idFixedWinding back; + cm_procNode_t *node; + float dist; + + do { + node = procNodes + nodeNum; + dist = node->plane.Normal() * origin + node->plane[3]; + if ( dist > radius ) { + res = SIDE_FRONT; + } + else if ( dist < -radius ) { + res = SIDE_BACK; + } + else { + res = w->Split( &back, node->plane, CHOP_EPSILON ); + } + if ( res == SIDE_FRONT ) { + nodeNum = node->children[0]; + } + else if ( res == SIDE_BACK ) { + nodeNum = node->children[1]; + } + else if ( res == SIDE_ON ) { + // continue with the side the winding faces + if ( node->plane.Normal() * normal > 0.0f ) { + nodeNum = node->children[0]; + } + else { + nodeNum = node->children[1]; + } + } + else { + // if either node is not solid + if ( node->children[0] < 0 || node->children[1] < 0 ) { + return false; + } + // only recurse if the node is not solid + if ( node->children[1] > 0 ) { + if ( !R_ChoppedAwayByProcBSP( node->children[1], &back, normal, origin, radius ) ) { + return false; + } + } + nodeNum = node->children[0]; + } + } while ( nodeNum > 0 ); + if ( nodeNum < 0 ) { + return false; + } + return true; +} + +/* +============ +idCollisionModelManagerLocal::ChoppedAwayByProcBSP +============ +*/ +int idCollisionModelManagerLocal::ChoppedAwayByProcBSP( const idFixedWinding &w, const idPlane &plane, int contents ) { + idFixedWinding neww; + idBounds bounds; + float radius; + idVec3 origin; + + // if the .proc file has no BSP tree + if ( procNodes == NULL ) { + return false; + } + // don't chop if the polygon is not solid + if ( !(contents & CONTENTS_SOLID) ) { + return false; + } + // make a local copy of the winding + neww = w; + neww.GetBounds( bounds ); + origin = (bounds[1] - bounds[0]) * 0.5f; + radius = origin.Length() + CHOP_EPSILON; + origin = bounds[0] + origin; + // + return R_ChoppedAwayByProcBSP( 0, &neww, plane.Normal(), origin, radius ); +} + +/* +============= +idCollisionModelManagerLocal::ChopWindingWithBrush + + returns the least number of winding fragments outside the brush +============= +*/ +void idCollisionModelManagerLocal::ChopWindingListWithBrush( cm_windingList_t *list, cm_brush_t *b ) { + int i, k, res, startPlane, planeNum, bestNumWindings; + idFixedWinding back, front; + idPlane plane; + bool chopped; + int sidedness[MAX_POINTS_ON_WINDING]; + float dist; + + if ( b->numPlanes > MAX_POINTS_ON_WINDING ) { + return; + } + + // get sidedness for the list of windings + for ( i = 0; i < b->numPlanes; i++ ) { + plane = -b->planes[i]; + + dist = plane.Distance( list->origin ); + if ( dist > list->radius ) { + sidedness[i] = SIDE_FRONT; + } + else if ( dist < -list->radius ) { + sidedness[i] = SIDE_BACK; + } + else { + sidedness[i] = list->bounds.PlaneSide( plane ); + if ( sidedness[i] == PLANESIDE_FRONT ) { + sidedness[i] = SIDE_FRONT; + } + else if ( sidedness[i] == PLANESIDE_BACK ) { + sidedness[i] = SIDE_BACK; + } + else { + sidedness[i] = SIDE_CROSS; + } + } + } + + cm_outList->numWindings = 0; + for ( k = 0; k < list->numWindings; k++ ) { + // + startPlane = 0; + bestNumWindings = 1 + b->numPlanes; + chopped = false; + do { + front = list->w[k]; + cm_tmpList->numWindings = 0; + for ( planeNum = startPlane, i = 0; i < b->numPlanes; i++, planeNum++ ) { + + if ( planeNum >= b->numPlanes ) { + planeNum = 0; + } + + res = sidedness[planeNum]; + + if ( res == SIDE_CROSS ) { + plane = -b->planes[planeNum]; + res = front.Split( &back, plane, CHOP_EPSILON ); + } + + // NOTE: disabling this can create gaps at places where Z-fighting occurs + // Z-fighting should not occur but what if there is a decal brush side + // with exactly the same size as another brush side ? + // only leave windings on a brush if the winding plane and brush side plane face the same direction + if ( res == SIDE_ON && list->primitiveNum >= 0 && (list->normal * b->planes[planeNum].Normal()) > 0 ) { + // return because all windings in the list will be on this brush side plane + return; + } + + if ( res == SIDE_BACK ) { + if ( cm_outList->numWindings >= MAX_WINDING_LIST ) { + common->Warning( "idCollisionModelManagerLocal::ChopWindingWithBrush: primitive %d more than %d windings", list->primitiveNum, MAX_WINDING_LIST ); + return; + } + // winding and brush didn't intersect, store the original winding + cm_outList->w[cm_outList->numWindings] = list->w[k]; + cm_outList->numWindings++; + chopped = false; + break; + } + + if ( res == SIDE_CROSS ) { + if ( cm_tmpList->numWindings >= MAX_WINDING_LIST ) { + common->Warning( "idCollisionModelManagerLocal::ChopWindingWithBrush: primitive %d more than %d windings", list->primitiveNum, MAX_WINDING_LIST ); + return; + } + // store the front winding in the temporary list + cm_tmpList->w[cm_tmpList->numWindings] = back; + cm_tmpList->numWindings++; + chopped = true; + } + + // if already found a start plane which generates less fragments + if ( cm_tmpList->numWindings >= bestNumWindings ) { + break; + } + } + + // find the best start plane to get the least number of fragments outside the brush + if ( cm_tmpList->numWindings < bestNumWindings ) { + bestNumWindings = cm_tmpList->numWindings; + // store windings from temporary list in the out list + for ( i = 0; i < cm_tmpList->numWindings; i++ ) { + if ( cm_outList->numWindings + i >= MAX_WINDING_LIST ) { + common->Warning( "idCollisionModelManagerLocal::ChopWindingWithBrush: primitive %d more than %d windings", list->primitiveNum, MAX_WINDING_LIST ); + return; + } + cm_outList->w[cm_outList->numWindings+i] = cm_tmpList->w[i]; + } + // if only one winding left then we can't do any better + if ( bestNumWindings == 1 ) { + break; + } + } + + // try the next start plane + startPlane++; + + } while ( chopped && startPlane < b->numPlanes ); + // + if ( chopped ) { + cm_outList->numWindings += bestNumWindings; + } + } + for ( k = 0; k < cm_outList->numWindings; k++ ) { + list->w[k] = cm_outList->w[k]; + } + list->numWindings = cm_outList->numWindings; +} + +/* +============ +idCollisionModelManagerLocal::R_ChopWindingListWithTreeBrushes +============ +*/ +void idCollisionModelManagerLocal::R_ChopWindingListWithTreeBrushes( cm_windingList_t *list, cm_node_t *node ) { + int i; + cm_brushRef_t *bref; + cm_brush_t *b; + + while( 1 ) { + for ( bref = node->brushes; bref; bref = bref->next ) { + b = bref->b; + // if we checked this brush already + if ( b->checkcount == checkCount ) { + continue; + } + b->checkcount = checkCount; + // if the windings in the list originate from this brush + if ( b->primitiveNum == list->primitiveNum ) { + continue; + } + // if brush has a different contents + if ( b->contents != list->contents ) { + continue; + } + // brush bounds and winding list bounds should overlap + for ( i = 0; i < 3; i++ ) { + if ( list->bounds[0][i] > b->bounds[1][i] ) { + break; + } + if ( list->bounds[1][i] < b->bounds[0][i] ) { + break; + } + } + if ( i < 3 ) { + continue; + } + // chop windings in the list with brush + ChopWindingListWithBrush( list, b ); + // if all windings are chopped away we're done + if ( !list->numWindings ) { + return; + } + } + // if leaf node + if ( node->planeType == -1 ) { + break; + } + if ( list->bounds[0][node->planeType] > node->planeDist ) { + node = node->children[0]; + } + else if ( list->bounds[1][node->planeType] < node->planeDist ) { + node = node->children[1]; + } + else { + R_ChopWindingListWithTreeBrushes( list, node->children[1] ); + if ( !list->numWindings ) { + return; + } + node = node->children[0]; + } + } +} + +/* +============ +idCollisionModelManagerLocal::WindingOutsideBrushes + + Returns one winding which is not fully contained in brushes. + We always favor less polygons over a stitched world. + If the winding is partly contained and the contained pieces can be chopped off + without creating multiple winding fragments then the chopped winding is returned. +============ +*/ +idFixedWinding *idCollisionModelManagerLocal::WindingOutsideBrushes( idFixedWinding *w, const idPlane &plane, int contents, int primitiveNum, cm_node_t *headNode ) { + int i, windingLeft; + + cm_windingList->bounds.Clear(); + for ( i = 0; i < w->GetNumPoints(); i++ ) { + cm_windingList->bounds.AddPoint( (*w)[i].ToVec3() ); + } + + cm_windingList->origin = (cm_windingList->bounds[1] - cm_windingList->bounds[0]) * 0.5; + cm_windingList->radius = cm_windingList->origin.Length() + CHOP_EPSILON; + cm_windingList->origin = cm_windingList->bounds[0] + cm_windingList->origin; + cm_windingList->bounds[0] -= idVec3( CHOP_EPSILON, CHOP_EPSILON, CHOP_EPSILON ); + cm_windingList->bounds[1] += idVec3( CHOP_EPSILON, CHOP_EPSILON, CHOP_EPSILON ); + + cm_windingList->w[0] = *w; + cm_windingList->numWindings = 1; + cm_windingList->normal = plane.Normal(); + cm_windingList->contents = contents; + cm_windingList->primitiveNum = primitiveNum; + // + checkCount++; + R_ChopWindingListWithTreeBrushes( cm_windingList, headNode ); + // + if ( !cm_windingList->numWindings ) { + return NULL; + } + if ( cm_windingList->numWindings == 1 ) { + return &cm_windingList->w[0]; + } + // if not the world model + if ( numModels != 0 ) { + return w; + } + // check if winding fragments would be chopped away by the proc BSP tree + windingLeft = -1; + for ( i = 0; i < cm_windingList->numWindings; i++ ) { + if ( !ChoppedAwayByProcBSP( cm_windingList->w[i], plane, contents ) ) { + if ( windingLeft >= 0 ) { + return w; + } + windingLeft = i; + } + } + if ( windingLeft >= 0 ) { + return &cm_windingList->w[windingLeft]; + } + return NULL; +} + +/* +=============================================================================== + +Merging polygons + +=============================================================================== +*/ + +/* +============= +idCollisionModelManagerLocal::ReplacePolygons + + does not allow for a node to have multiple references to the same polygon +============= +*/ +void idCollisionModelManagerLocal::ReplacePolygons( cm_model_t *model, cm_node_t *node, cm_polygon_t *p1, cm_polygon_t *p2, cm_polygon_t *newp ) { + cm_polygonRef_t *pref, *lastpref, *nextpref; + cm_polygon_t *p; + bool linked; + + while( 1 ) { + linked = false; + lastpref = NULL; + for ( pref = node->polygons; pref; pref = nextpref ) { + nextpref = pref->next; + // + p = pref->p; + // if this polygon reference should change + if ( p == p1 || p == p2 ) { + // if the new polygon is already linked at this node + if ( linked ) { + if ( lastpref ) { + lastpref->next = nextpref; + } + else { + node->polygons = nextpref; + } + FreePolygonReference( pref ); + model->numPolygonRefs--; + } + else { + pref->p = newp; + linked = true; + lastpref = pref; + } + } + else { + lastpref = pref; + } + } + // if leaf node + if ( node->planeType == -1 ) { + break; + } + if ( p1->bounds[0][node->planeType] > node->planeDist && p2->bounds[0][node->planeType] > node->planeDist ) { + node = node->children[0]; + } + else if ( p1->bounds[1][node->planeType] < node->planeDist && p2->bounds[1][node->planeType] < node->planeDist ) { + node = node->children[1]; + } + else { + ReplacePolygons( model, node->children[1], p1, p2, newp ); + node = node->children[0]; + } + } +} + +/* +============= +idCollisionModelManagerLocal::TryMergePolygons +============= +*/ +#define CONTINUOUS_EPSILON 0.005f +#define NORMAL_EPSILON 0.01f + +cm_polygon_t *idCollisionModelManagerLocal::TryMergePolygons( cm_model_t *model, cm_polygon_t *p1, cm_polygon_t *p2 ) { + int i, j, nexti, prevj; + int p1BeforeShare, p1AfterShare, p2BeforeShare, p2AfterShare; + int newEdges[CM_MAX_POLYGON_EDGES], newNumEdges; + int edgeNum, edgeNum1, edgeNum2, newEdgeNum1, newEdgeNum2; + cm_edge_t *edge; + cm_polygon_t *newp; + idVec3 delta, normal; + float dot; + bool keep1, keep2; + + if ( p1->material != p2->material ) { + return NULL; + } + if ( idMath::Fabs( p1->plane.Dist() - p2->plane.Dist() ) > NORMAL_EPSILON ) { + return NULL; + } + for ( i = 0; i < 3; i++ ) { + if ( idMath::Fabs( p1->plane.Normal()[i] - p2->plane.Normal()[i] ) > NORMAL_EPSILON ) { + return NULL; + } + if ( p1->bounds[0][i] > p2->bounds[1][i] ) { + return NULL; + } + if ( p1->bounds[1][i] < p2->bounds[0][i] ) { + return NULL; + } + } + // this allows for merging polygons with multiple shared edges + // polygons with multiple shared edges probably never occur tho ;) + p1BeforeShare = p1AfterShare = p2BeforeShare = p2AfterShare = -1; + for ( i = 0; i < p1->numEdges; i++ ) { + nexti = (i+1)%p1->numEdges; + for ( j = 0; j < p2->numEdges; j++ ) { + prevj = (j+p2->numEdges-1)%p2->numEdges; + // + if ( abs(p1->edges[i]) != abs(p2->edges[j]) ) { + // if the next edge of p1 and the previous edge of p2 are the same + if ( abs(p1->edges[nexti]) == abs(p2->edges[prevj]) ) { + // if both polygons don't use the edge in the same direction + if ( p1->edges[nexti] != p2->edges[prevj] ) { + p1BeforeShare = i; + p2AfterShare = j; + } + break; + } + } + // if both polygons don't use the edge in the same direction + else if ( p1->edges[i] != p2->edges[j] ) { + // if the next edge of p1 and the previous edge of p2 are not the same + if ( abs(p1->edges[nexti]) != abs(p2->edges[prevj]) ) { + p1AfterShare = nexti; + p2BeforeShare = prevj; + break; + } + } + } + } + if ( p1BeforeShare < 0 || p1AfterShare < 0 || p2BeforeShare < 0 || p2AfterShare < 0 ) { + return NULL; + } + + // check if the new polygon would still be convex + edgeNum = p1->edges[p1BeforeShare]; + edge = model->edges + abs(edgeNum); + delta = model->vertices[edge->vertexNum[INTSIGNBITNOTSET(edgeNum)]].p - + model->vertices[edge->vertexNum[INTSIGNBITSET(edgeNum)]].p; + normal = p1->plane.Normal().Cross( delta ); + normal.Normalize(); + + edgeNum = p2->edges[p2AfterShare]; + edge = model->edges + abs(edgeNum); + delta = model->vertices[edge->vertexNum[INTSIGNBITNOTSET(edgeNum)]].p - + model->vertices[edge->vertexNum[INTSIGNBITSET(edgeNum)]].p; + + dot = delta * normal; + if (dot < -CONTINUOUS_EPSILON) + return NULL; // not a convex polygon + keep1 = (bool)(dot > CONTINUOUS_EPSILON); + + edgeNum = p2->edges[p2BeforeShare]; + edge = model->edges + abs(edgeNum); + delta = model->vertices[edge->vertexNum[INTSIGNBITNOTSET(edgeNum)]].p - + model->vertices[edge->vertexNum[INTSIGNBITSET(edgeNum)]].p; + normal = p1->plane.Normal().Cross( delta ); + normal.Normalize(); + + edgeNum = p1->edges[p1AfterShare]; + edge = model->edges + abs(edgeNum); + delta = model->vertices[edge->vertexNum[INTSIGNBITNOTSET(edgeNum)]].p - + model->vertices[edge->vertexNum[INTSIGNBITSET(edgeNum)]].p; + + dot = delta * normal; + if (dot < -CONTINUOUS_EPSILON) + return NULL; // not a convex polygon + keep2 = (bool)(dot > CONTINUOUS_EPSILON); + + newEdgeNum1 = newEdgeNum2 = 0; + // get new edges if we need to replace colinear ones + if ( !keep1 ) { + edgeNum1 = p1->edges[p1BeforeShare]; + edgeNum2 = p2->edges[p2AfterShare]; + GetEdge( model, model->vertices[model->edges[abs(edgeNum1)].vertexNum[INTSIGNBITSET(edgeNum1)]].p, + model->vertices[model->edges[abs(edgeNum2)].vertexNum[INTSIGNBITNOTSET(edgeNum2)]].p, + &newEdgeNum1, -1 ); + if ( newEdgeNum1 == 0 ) { + keep1 = true; + } + } + if ( !keep2 ) { + edgeNum1 = p2->edges[p2BeforeShare]; + edgeNum2 = p1->edges[p1AfterShare]; + GetEdge( model, model->vertices[model->edges[abs(edgeNum1)].vertexNum[INTSIGNBITSET(edgeNum1)]].p, + model->vertices[model->edges[abs(edgeNum2)].vertexNum[INTSIGNBITNOTSET(edgeNum2)]].p, + &newEdgeNum2, -1 ); + if ( newEdgeNum2 == 0 ) { + keep2 = true; + } + } + // set edges for new polygon + newNumEdges = 0; + if ( !keep2 ) { + newEdges[newNumEdges++] = newEdgeNum2; + } + if ( p1AfterShare < p1BeforeShare ) { + for ( i = p1AfterShare + (!keep2); i <= p1BeforeShare - (!keep1); i++ ) { + newEdges[newNumEdges++] = p1->edges[i]; + } + } + else { + for ( i = p1AfterShare + (!keep2); i < p1->numEdges; i++ ) { + newEdges[newNumEdges++] = p1->edges[i]; + } + for ( i = 0; i <= p1BeforeShare - (!keep1); i++ ) { + newEdges[newNumEdges++] = p1->edges[i]; + } + } + if ( !keep1 ) { + newEdges[newNumEdges++] = newEdgeNum1; + } + if ( p2AfterShare < p2BeforeShare ) { + for ( i = p2AfterShare + (!keep1); i <= p2BeforeShare - (!keep2); i++ ) { + newEdges[newNumEdges++] = p2->edges[i]; + } + } + else { + for ( i = p2AfterShare + (!keep1); i < p2->numEdges; i++ ) { + newEdges[newNumEdges++] = p2->edges[i]; + } + for ( i = 0; i <= p2BeforeShare - (!keep2); i++ ) { + newEdges[newNumEdges++] = p2->edges[i]; + } + } + + newp = AllocPolygon( model, newNumEdges ); + memcpy( newp, p1, sizeof(cm_polygon_t) ); + memcpy( newp->edges, newEdges, newNumEdges * sizeof(int) ); + newp->numEdges = newNumEdges; + newp->checkcount = 0; + // increase usage count for the edges of this polygon + for ( i = 0; i < newp->numEdges; i++ ) { + if ( !keep1 && newp->edges[i] == newEdgeNum1 ) { + continue; + } + if ( !keep2 && newp->edges[i] == newEdgeNum2 ) { + continue; + } + model->edges[abs(newp->edges[i])].numUsers++; + } + // create new bounds from the merged polygons + newp->bounds = p1->bounds + p2->bounds; + + return newp; +} + +/* +============= +idCollisionModelManagerLocal::MergePolygonWithTreePolygons +============= +*/ +bool idCollisionModelManagerLocal::MergePolygonWithTreePolygons( cm_model_t *model, cm_node_t *node, cm_polygon_t *polygon ) { + int i; + cm_polygonRef_t *pref; + cm_polygon_t *p, *newp; + + while( 1 ) { + for ( pref = node->polygons; pref; pref = pref->next ) { + p = pref->p; + // + if ( p == polygon ) { + continue; + } + // + newp = TryMergePolygons( model, polygon, p ); + // if polygons were merged + if ( newp ) { + model->numMergedPolys++; + // replace links to the merged polygons with links to the new polygon + ReplacePolygons( model, model->node, polygon, p, newp ); + // decrease usage count for edges of both merged polygons + for ( i = 0; i < polygon->numEdges; i++ ) { + model->edges[abs(polygon->edges[i])].numUsers--; + } + for ( i = 0; i < p->numEdges; i++ ) { + model->edges[abs(p->edges[i])].numUsers--; + } + // free merged polygons + FreePolygon( model, polygon ); + FreePolygon( model, p ); + + return true; + } + } + // if leaf node + if ( node->planeType == -1 ) { + break; + } + if ( polygon->bounds[0][node->planeType] > node->planeDist ) { + node = node->children[0]; + } + else if ( polygon->bounds[1][node->planeType] < node->planeDist ) { + node = node->children[1]; + } + else { + if ( MergePolygonWithTreePolygons( model, node->children[1], polygon ) ) { + return true; + } + node = node->children[0]; + } + } + return false; +} + +/* +============= +idCollisionModelManagerLocal::MergeTreePolygons + + try to merge any two polygons with the same surface flags and the same contents +============= +*/ +void idCollisionModelManagerLocal::MergeTreePolygons( cm_model_t *model, cm_node_t *node ) { + cm_polygonRef_t *pref; + cm_polygon_t *p; + bool merge; + + while( 1 ) { + do { + merge = false; + for ( pref = node->polygons; pref; pref = pref->next ) { + p = pref->p; + // if we checked this polygon already + if ( p->checkcount == checkCount ) { + continue; + } + p->checkcount = checkCount; + // try to merge this polygon with other polygons in the tree + if ( MergePolygonWithTreePolygons( model, model->node, p ) ) { + merge = true; + break; + } + } + } while (merge); + // if leaf node + if ( node->planeType == -1 ) { + break; + } + MergeTreePolygons( model, node->children[1] ); + node = node->children[0]; + } +} + +/* +=============================================================================== + +Find internal edges + +=============================================================================== +*/ + +/* + + if (two polygons have the same contents) + if (the normals of the two polygon planes face towards each other) + if (an edge is shared between the polygons) + if (the edge is not shared in the same direction) + then this is an internal edge + else + if (this edge is on the plane of the other polygon) + if (this edge if fully inside the winding of the other polygon) + then this edge is an internal edge + +*/ + +/* +============= +idCollisionModelManagerLocal::PointInsidePolygon +============= +*/ +bool idCollisionModelManagerLocal::PointInsidePolygon( cm_model_t *model, cm_polygon_t *p, idVec3 &v ) { + int i, edgeNum; + idVec3 *v1, *v2, dir1, dir2, vec; + cm_edge_t *edge; + + for ( i = 0; i < p->numEdges; i++ ) { + edgeNum = p->edges[i]; + edge = model->edges + abs(edgeNum); + // + v1 = &model->vertices[edge->vertexNum[INTSIGNBITSET(edgeNum)]].p; + v2 = &model->vertices[edge->vertexNum[INTSIGNBITNOTSET(edgeNum)]].p; + dir1 = (*v2) - (*v1); + vec = v - (*v1); + dir2 = dir1.Cross( p->plane.Normal() ); + if ( vec * dir2 > VERTEX_EPSILON ) { + return false; + } + } + return true; +} + +/* +============= +idCollisionModelManagerLocal::FindInternalEdgesOnPolygon +============= +*/ +void idCollisionModelManagerLocal::FindInternalEdgesOnPolygon( cm_model_t *model, cm_polygon_t *p1, cm_polygon_t *p2 ) { + int i, j, k, edgeNum; + cm_edge_t *edge; + idVec3 *v1, *v2, dir1, dir2; + float d; + + // bounds of polygons should overlap or touch + for ( i = 0; i < 3; i++ ) { + if ( p1->bounds[0][i] > p2->bounds[1][i] ) { + return; + } + if ( p1->bounds[1][i] < p2->bounds[0][i] ) { + return; + } + } + // + // FIXME: doubled geometry causes problems + // + for ( i = 0; i < p1->numEdges; i++ ) { + edgeNum = p1->edges[i]; + edge = model->edges + abs(edgeNum); + // if already an internal edge + if ( edge->internal ) { + continue; + } + // + v1 = &model->vertices[edge->vertexNum[INTSIGNBITSET(edgeNum)]].p; + v2 = &model->vertices[edge->vertexNum[INTSIGNBITNOTSET(edgeNum)]].p; + // if either of the two vertices is outside the bounds of the other polygon + for ( k = 0; k < 3; k++ ) { + d = p2->bounds[1][k] + VERTEX_EPSILON; + if ( (*v1)[k] > d || (*v2)[k] > d ) { + break; + } + d = p2->bounds[0][k] - VERTEX_EPSILON; + if ( (*v1)[k] < d || (*v2)[k] < d ) { + break; + } + } + if ( k < 3 ) { + continue; + } + // + k = abs(edgeNum); + for ( j = 0; j < p2->numEdges; j++ ) { + if ( k == abs(p2->edges[j]) ) { + break; + } + } + // if the edge is shared between the two polygons + if ( j < p2->numEdges ) { + // if the edge is used by more than 2 polygons + if ( edge->numUsers > 2 ) { + // could still be internal but we'd have to test all polygons using the edge + continue; + } + // if the edge goes in the same direction for both polygons + if ( edgeNum == p2->edges[j] ) { + // the polygons can lay ontop of each other or one can obscure the other + continue; + } + } + // the edge was not shared + else { + // both vertices should be on the plane of the other polygon + d = p2->plane.Distance( *v1 ); + if ( idMath::Fabs(d) > VERTEX_EPSILON ) { + continue; + } + d = p2->plane.Distance( *v2 ); + if ( idMath::Fabs(d) > VERTEX_EPSILON ) { + continue; + } + } + // the two polygon plane normals should face towards each other + dir1 = (*v2) - (*v1); + dir2 = p1->plane.Normal().Cross( dir1 ); + if ( p2->plane.Normal() * dir2 < 0 ) { + //continue; + break; + } + // if the edge was not shared + if ( j >= p2->numEdges ) { + // both vertices of the edge should be inside the winding of the other polygon + if ( !PointInsidePolygon( model, p2, *v1 ) ) { + continue; + } + if ( !PointInsidePolygon( model, p2, *v2 ) ) { + continue; + } + } + // we got another internal edge + edge->internal = true; + model->numInternalEdges++; + } +} + +/* +============= +idCollisionModelManagerLocal::FindInternalPolygonEdges +============= +*/ +void idCollisionModelManagerLocal::FindInternalPolygonEdges( cm_model_t *model, cm_node_t *node, cm_polygon_t *polygon ) { + cm_polygonRef_t *pref; + cm_polygon_t *p; + + if ( polygon->material->GetCullType() == CT_TWO_SIDED || polygon->material->ShouldCreateBackSides() ) { + return; + } + + while( 1 ) { + for ( pref = node->polygons; pref; pref = pref->next ) { + p = pref->p; + // + // FIXME: use some sort of additional checkcount because currently + // polygons can be checked multiple times + // + // if the polygons don't have the same contents + if ( p->contents != polygon->contents ) { + continue; + } + if ( p == polygon ) { + continue; + } + FindInternalEdgesOnPolygon( model, polygon, p ); + } + // if leaf node + if ( node->planeType == -1 ) { + break; + } + if ( polygon->bounds[0][node->planeType] > node->planeDist ) { + node = node->children[0]; + } + else if ( polygon->bounds[1][node->planeType] < node->planeDist ) { + node = node->children[1]; + } + else { + FindInternalPolygonEdges( model, node->children[1], polygon ); + node = node->children[0]; + } + } +} + +/* +============= +idCollisionModelManagerLocal::FindContainedEdges +============= +*/ +void idCollisionModelManagerLocal::FindContainedEdges( cm_model_t *model, cm_polygon_t *p ) { + int i, edgeNum; + cm_edge_t *edge; + idFixedWinding w; + + for ( i = 0; i < p->numEdges; i++ ) { + edgeNum = p->edges[i]; + edge = model->edges + abs(edgeNum); + if ( edge->internal ) { + continue; + } + w.Clear(); + w += model->vertices[edge->vertexNum[INTSIGNBITSET(edgeNum)]].p; + w += model->vertices[edge->vertexNum[INTSIGNBITNOTSET(edgeNum)]].p; + if ( ChoppedAwayByProcBSP( w, p->plane, p->contents ) ) { + edge->internal = true; + } + } +} + +/* +============= +idCollisionModelManagerLocal::FindInternalEdges +============= +*/ +void idCollisionModelManagerLocal::FindInternalEdges( cm_model_t *model, cm_node_t *node ) { + cm_polygonRef_t *pref; + cm_polygon_t *p; + + while( 1 ) { + for ( pref = node->polygons; pref; pref = pref->next ) { + p = pref->p; + // if we checked this polygon already + if ( p->checkcount == checkCount ) { + continue; + } + p->checkcount = checkCount; + + FindInternalPolygonEdges( model, model->node, p ); + + //FindContainedEdges( model, p ); + } + // if leaf node + if ( node->planeType == -1 ) { + break; + } + FindInternalEdges( model, node->children[1] ); + node = node->children[0]; + } +} + +/* +=============================================================================== + +Spatial subdivision + +=============================================================================== +*/ + +/* +================ +CM_FindSplitter +================ +*/ +static int CM_FindSplitter( const cm_node_t *node, const idBounds &bounds, int *planeType, float *planeDist ) { + int i, j, type, axis[3], polyCount; + float dist, t, bestt, size[3]; + cm_brushRef_t *bref; + cm_polygonRef_t *pref; + const cm_node_t *n; + bool forceSplit = false; + + for ( i = 0; i < 3; i++ ) { + size[i] = bounds[1][i] - bounds[0][i]; + axis[i] = i; + } + // sort on largest axis + for ( i = 0; i < 2; i++ ) { + if ( size[i] < size[i+1] ) { + t = size[i]; + size[i] = size[i+1]; + size[i+1] = t; + j = axis[i]; + axis[i] = axis[i+1]; + axis[i+1] = j; + i = -1; + } + } + // if the node is too small for further splits + if ( size[0] < MIN_NODE_SIZE ) { + polyCount = 0; + for ( pref = node->polygons; pref; pref = pref->next) { + polyCount++; + } + if ( polyCount > MAX_NODE_POLYGONS ) { + forceSplit = true; + } + } + // find an axial aligned splitter + for ( i = 0; i < 3; i++ ) { + // start with the largest axis first + type = axis[i]; + bestt = size[i]; + // if the node is small anough in this axis direction + if ( !forceSplit && bestt < MIN_NODE_SIZE ) { + break; + } + // find an axial splitter from the brush bounding boxes + // also try brushes from parent nodes + for ( n = node; n; n = n->parent ) { + for ( bref = n->brushes; bref; bref = bref->next) { + for ( j = 0; j < 2; j++ ) { + dist = bref->b->bounds[j][type]; + // if the splitter is already used or outside node bounds + if ( dist >= bounds[1][type] || dist <= bounds[0][type] ) { + continue; + } + // find the most centered splitter + t = abs((bounds[1][type] - dist) - (dist - bounds[0][type])); + if ( t < bestt ) { + bestt = t; + *planeType = type; + *planeDist = dist; + } + } + } + } + // find an axial splitter from the polygon bounding boxes + // also try brushes from parent nodes + for ( n = node; n; n = n->parent ) { + for ( pref = n->polygons; pref; pref = pref->next) { + for ( j = 0; j < 2; j++ ) { + dist = pref->p->bounds[j][type]; + // if the splitter is already used or outside node bounds + if ( dist >= bounds[1][type] || dist <= bounds[0][type] ) { + continue; + } + // find the most centered splitter + t = abs((bounds[1][type] - dist) - (dist - bounds[0][type])); + if ( t < bestt ) { + bestt = t; + *planeType = type; + *planeDist = dist; + } + } + } + } + // if we found a splitter on the largest axis + if ( bestt < size[i] ) { + // if forced split due to lots of polygons + if ( forceSplit ) { + return true; + } + // don't create splitters real close to the bounds + if ( bounds[1][type] - *planeDist > (MIN_NODE_SIZE*0.5f) && + *planeDist - bounds[0][type] > (MIN_NODE_SIZE*0.5f) ) { + return true; + } + } + } + return false; +} + +/* +================ +CM_R_InsideAllChildren +================ +*/ +static int CM_R_InsideAllChildren( cm_node_t *node, const idBounds &bounds ) { + assert(node != NULL); + if ( node->planeType != -1 ) { + if ( bounds[0][node->planeType] >= node->planeDist ) { + return false; + } + if ( bounds[1][node->planeType] <= node->planeDist ) { + return false; + } + if ( !CM_R_InsideAllChildren( node->children[0], bounds ) ) { + return false; + } + if ( !CM_R_InsideAllChildren( node->children[1], bounds ) ) { + return false; + } + } + return true; +} + +/* +================ +idCollisionModelManagerLocal::R_FilterPolygonIntoTree +================ +*/ +void idCollisionModelManagerLocal::R_FilterPolygonIntoTree( cm_model_t *model, cm_node_t *node, cm_polygonRef_t *pref, cm_polygon_t *p ) { + assert(node != NULL); + while ( node->planeType != -1 ) { + if ( CM_R_InsideAllChildren( node, p->bounds ) ) { + break; + } + if ( p->bounds[0][node->planeType] >= node->planeDist ) { + node = node->children[0]; + } + else if ( p->bounds[1][node->planeType] <= node->planeDist ) { + node = node->children[1]; + } + else { + R_FilterPolygonIntoTree( model, node->children[1], NULL, p ); + node = node->children[0]; + } + } + if ( pref ) { + pref->next = node->polygons; + node->polygons = pref; + } + else { + AddPolygonToNode( model, node, p ); + } +} + +/* +================ +idCollisionModelManagerLocal::R_FilterBrushIntoTree +================ +*/ +void idCollisionModelManagerLocal::R_FilterBrushIntoTree( cm_model_t *model, cm_node_t *node, cm_brushRef_t *pref, cm_brush_t *b ) { + assert(node != NULL); + while ( node->planeType != -1 ) { + if ( CM_R_InsideAllChildren( node, b->bounds ) ) { + break; + } + if ( b->bounds[0][node->planeType] >= node->planeDist ) { + node = node->children[0]; + } + else if ( b->bounds[1][node->planeType] <= node->planeDist ) { + node = node->children[1]; + } + else { + R_FilterBrushIntoTree( model, node->children[1], NULL, b ); + node = node->children[0]; + } + } + if ( pref ) { + pref->next = node->brushes; + node->brushes = pref; + } + else { + AddBrushToNode( model, node, b ); + } +} + +/* +================ +idCollisionModelManagerLocal::R_CreateAxialBSPTree + + a brush or polygon is linked in the node closest to the root where + the brush or polygon is inside all children +================ +*/ +cm_node_t *idCollisionModelManagerLocal::R_CreateAxialBSPTree( cm_model_t *model, cm_node_t *node, const idBounds &bounds ) { + int planeType; + float planeDist; + cm_polygonRef_t *pref, *nextpref, *prevpref; + cm_brushRef_t *bref, *nextbref, *prevbref; + cm_node_t *frontNode, *backNode, *n; + idBounds frontBounds, backBounds; + + if ( !CM_FindSplitter( node, bounds, &planeType, &planeDist ) ) { + node->planeType = -1; + return node; + } + // create two child nodes + frontNode = AllocNode( model, NODE_BLOCK_SIZE_LARGE ); + memset( frontNode, 0, sizeof(cm_node_t) ); + frontNode->parent = node; + frontNode->planeType = -1; + // + backNode = AllocNode( model, NODE_BLOCK_SIZE_LARGE ); + memset( backNode, 0, sizeof(cm_node_t) ); + backNode->parent = node; + backNode->planeType = -1; + // + model->numNodes += 2; + // set front node bounds + frontBounds = bounds; + frontBounds[0][planeType] = planeDist; + // set back node bounds + backBounds = bounds; + backBounds[1][planeType] = planeDist; + // + node->planeType = planeType; + node->planeDist = planeDist; + node->children[0] = frontNode; + node->children[1] = backNode; + // filter polygons and brushes down the tree if necesary + for ( n = node; n; n = n->parent ) { + prevpref = NULL; + for ( pref = n->polygons; pref; pref = nextpref) { + nextpref = pref->next; + // if polygon is not inside all children + if ( !CM_R_InsideAllChildren( n, pref->p->bounds ) ) { + // filter polygon down the tree + R_FilterPolygonIntoTree( model, n, pref, pref->p ); + if ( prevpref ) { + prevpref->next = nextpref; + } + else { + n->polygons = nextpref; + } + } + else { + prevpref = pref; + } + } + prevbref = NULL; + for ( bref = n->brushes; bref; bref = nextbref) { + nextbref = bref->next; + // if brush is not inside all children + if ( !CM_R_InsideAllChildren( n, bref->b->bounds ) ) { + // filter brush down the tree + R_FilterBrushIntoTree( model, n, bref, bref->b ); + if ( prevbref ) { + prevbref->next = nextbref; + } + else { + n->brushes = nextbref; + } + } + else { + prevbref = bref; + } + } + } + R_CreateAxialBSPTree( model, frontNode, frontBounds ); + R_CreateAxialBSPTree( model, backNode, backBounds ); + return node; +} + +/* +int cm_numSavedPolygonLinks; +int cm_numSavedBrushLinks; + +int CM_R_CountChildren( cm_node_t *node ) { + if ( node->planeType == -1 ) { + return 0; + } + return 2 + CM_R_CountChildren(node->children[0]) + CM_R_CountChildren(node->children[1]); +} + +void CM_R_TestOptimisation( cm_node_t *node ) { + int polyCount, brushCount, numChildren; + cm_polygonRef_t *pref; + cm_brushRef_t *bref; + + if ( node->planeType == -1 ) { + return; + } + polyCount = 0; + for ( pref = node->polygons; pref; pref = pref->next) { + polyCount++; + } + brushCount = 0; + for ( bref = node->brushes; bref; bref = bref->next) { + brushCount++; + } + if ( polyCount || brushCount ) { + numChildren = CM_R_CountChildren( node ); + cm_numSavedPolygonLinks += (numChildren - 1) * polyCount; + cm_numSavedBrushLinks += (numChildren - 1) * brushCount; + } + CM_R_TestOptimisation( node->children[0] ); + CM_R_TestOptimisation( node->children[1] ); +} +*/ + +/* +================ +idCollisionModelManagerLocal::CreateAxialBSPTree +================ +*/ +cm_node_t *idCollisionModelManagerLocal::CreateAxialBSPTree( cm_model_t *model, cm_node_t *node ) { + cm_polygonRef_t *pref; + cm_brushRef_t *bref; + idBounds bounds; + + // get head node bounds + bounds.Clear(); + for ( pref = node->polygons; pref; pref = pref->next) { + bounds += pref->p->bounds; + } + for ( bref = node->brushes; bref; bref = bref->next) { + bounds += bref->b->bounds; + } + + // create axial BSP tree from head node + node = R_CreateAxialBSPTree( model, node, bounds ); + + return node; +} + +/* +=============================================================================== + +Raw polygon and brush data + +=============================================================================== +*/ + +/* +================ +idCollisionModelManagerLocal::SetupHash +================ +*/ +void idCollisionModelManagerLocal::SetupHash( void ) { + if ( !cm_vertexHash ) { + cm_vertexHash = new idHashIndex( VERTEX_HASH_SIZE, 1024 ); + } + if ( !cm_edgeHash ) { + cm_edgeHash = new idHashIndex( EDGE_HASH_SIZE, 1024 ); + } + // init variables used during loading and optimization + if ( !cm_windingList ) { + cm_windingList = new cm_windingList_t; + } + if ( !cm_outList ) { + cm_outList = new cm_windingList_t; + } + if ( !cm_tmpList ) { + cm_tmpList = new cm_windingList_t; + } +} + +/* +================ +idCollisionModelManagerLocal::ShutdownHash +================ +*/ +void idCollisionModelManagerLocal::ShutdownHash( void ) { + delete cm_vertexHash; + cm_vertexHash = NULL; + delete cm_edgeHash; + cm_edgeHash = NULL; + delete cm_tmpList; + cm_tmpList = NULL; + delete cm_outList; + cm_outList = NULL; + delete cm_windingList; + cm_windingList = NULL; +} + +/* +================ +idCollisionModelManagerLocal::ClearHash +================ +*/ +void idCollisionModelManagerLocal::ClearHash( idBounds &bounds ) { + int i; + float f, max; + + cm_vertexHash->Clear(); + cm_edgeHash->Clear(); + + cm_modelBounds = bounds; + max = bounds[1].x - bounds[0].x; + f = bounds[1].y - bounds[0].y; + if ( f > max ) { + max = f; + } + cm_vertexShift = (float) max / VERTEX_HASH_BOXSIZE; + for ( i = 0; (1<> cm_vertexShift) & (VERTEX_HASH_BOXSIZE-1); + y = (((int)(vec[1] - cm_modelBounds[0].y + 0.5 )) >> cm_vertexShift) & (VERTEX_HASH_BOXSIZE-1); + + assert (x >= 0 && x < VERTEX_HASH_BOXSIZE && y >= 0 && y < VERTEX_HASH_BOXSIZE); + + return y * VERTEX_HASH_BOXSIZE + x; + */ + int x, y, z; + + x = (((int) (vec[0] - cm_modelBounds[0].x + 0.5)) + 2) >> 2; + y = (((int) (vec[1] - cm_modelBounds[0].y + 0.5)) + 2) >> 2; + z = (((int) (vec[2] - cm_modelBounds[0].z + 0.5)) + 2) >> 2; + return (x + y * VERTEX_HASH_BOXSIZE + z) & (VERTEX_HASH_SIZE-1); +} + +/* +================ +idCollisionModelManagerLocal::GetVertex +================ +*/ +int idCollisionModelManagerLocal::GetVertex( cm_model_t *model, const idVec3 &v, int *vertexNum ) { + int i, hashKey, vn; + idVec3 vert, *p; + + for (i = 0; i < 3; i++) { + if ( idMath::Fabs(v[i] - idMath::Rint(v[i])) < INTEGRAL_EPSILON ) + vert[i] = idMath::Rint(v[i]); + else + vert[i] = v[i]; + } + + hashKey = HashVec( vert ); + + for (vn = cm_vertexHash->First( hashKey ); vn >= 0; vn = cm_vertexHash->Next( vn ) ) { + p = &model->vertices[vn].p; + // first compare z-axis because hash is based on x-y plane + if (idMath::Fabs(vert[2] - (*p)[2]) < VERTEX_EPSILON && + idMath::Fabs(vert[0] - (*p)[0]) < VERTEX_EPSILON && + idMath::Fabs(vert[1] - (*p)[1]) < VERTEX_EPSILON ) + { + *vertexNum = vn; + return true; + } + } + + if ( model->numVertices >= model->maxVertices ) { + cm_vertex_t *oldVertices; + + // resize vertex array + model->maxVertices = (float) model->maxVertices * 1.5f + 1; + oldVertices = model->vertices; + model->vertices = (cm_vertex_t *) Mem_ClearedAlloc( model->maxVertices * sizeof(cm_vertex_t) ); + memcpy( model->vertices, oldVertices, model->numVertices * sizeof(cm_vertex_t) ); + Mem_Free( oldVertices ); + + cm_vertexHash->ResizeIndex( model->maxVertices ); + } + model->vertices[model->numVertices].p = vert; + model->vertices[model->numVertices].checkcount = 0; + *vertexNum = model->numVertices; + // add vertice to hash + cm_vertexHash->Add( hashKey, model->numVertices ); + // + model->numVertices++; + return false; +} + +/* +================ +idCollisionModelManagerLocal::GetEdge +================ +*/ +int idCollisionModelManagerLocal::GetEdge( cm_model_t *model, const idVec3 &v1, const idVec3 &v2, int *edgeNum, int v1num ) { + int v2num, hashKey, e; + int found, *vertexNum; + + // the first edge is a dummy + if ( model->numEdges == 0 ) { + model->numEdges = 1; + } + + if ( v1num != -1 ) { + found = 1; + } + else { + found = GetVertex( model, v1, &v1num ); + } + found &= GetVertex( model, v2, &v2num ); + // if both vertices are the same or snapped onto each other + if ( v1num == v2num ) { + *edgeNum = 0; + return true; + } + hashKey = cm_edgeHash->GenerateKey( v1num, v2num ); + // if both vertices where already stored + if (found) { + for (e = cm_edgeHash->First( hashKey ); e >= 0; e = cm_edgeHash->Next( e ) ) + { + // NOTE: only allow at most two users that use the edge in opposite direction + if ( model->edges[e].numUsers != 1 ) { + continue; + } + + vertexNum = model->edges[e].vertexNum; + if ( vertexNum[0] == v2num ) { + if ( vertexNum[1] == v1num ) { + // negative for a reversed edge + *edgeNum = -e; + break; + } + } + /* + else if ( vertexNum[0] == v1num ) { + if ( vertexNum[1] == v2num ) { + *edgeNum = e; + break; + } + } + */ + } + // if edge found in hash + if ( e >= 0 ) { + model->edges[e].numUsers++; + return true; + } + } + if ( model->numEdges >= model->maxEdges ) { + cm_edge_t *oldEdges; + + // resize edge array + model->maxEdges = (float) model->maxEdges * 1.5f + 1; + oldEdges = model->edges; + model->edges = (cm_edge_t *) Mem_ClearedAlloc( model->maxEdges * sizeof(cm_edge_t) ); + memcpy( model->edges, oldEdges, model->numEdges * sizeof(cm_edge_t) ); + Mem_Free( oldEdges ); + + cm_edgeHash->ResizeIndex( model->maxEdges ); + } + // setup edge + model->edges[model->numEdges].vertexNum[0] = v1num; + model->edges[model->numEdges].vertexNum[1] = v2num; + model->edges[model->numEdges].internal = false; + model->edges[model->numEdges].checkcount = 0; + model->edges[model->numEdges].numUsers = 1; // used by one polygon atm + model->edges[model->numEdges].normal.Zero(); + // + *edgeNum = model->numEdges; + // add edge to hash + cm_edgeHash->Add( hashKey, model->numEdges ); + + model->numEdges++; + + return false; +} + +/* +================ +idCollisionModelManagerLocal::CreatePolygon +================ +*/ +void idCollisionModelManagerLocal::CreatePolygon( cm_model_t *model, idFixedWinding *w, const idPlane &plane, const idMaterial *material, int primitiveNum ) { + int i, j, edgeNum, v1num; + int numPolyEdges, polyEdges[MAX_POINTS_ON_WINDING]; + idBounds bounds; + cm_polygon_t *p; + + // turn the winding into a sequence of edges + numPolyEdges = 0; + v1num = -1; // first vertex unknown + for ( i = 0, j = 1; i < w->GetNumPoints(); i++, j++ ) { + if ( j >= w->GetNumPoints() ) { + j = 0; + } + GetEdge( model, (*w)[i].ToVec3(), (*w)[j].ToVec3(), &polyEdges[numPolyEdges], v1num ); + if ( polyEdges[numPolyEdges] ) { + // last vertex of this edge is the first vertex of the next edge + v1num = model->edges[ abs(polyEdges[numPolyEdges]) ].vertexNum[ INTSIGNBITNOTSET(polyEdges[numPolyEdges]) ]; + // this edge is valid so keep it + numPolyEdges++; + } + } + // should have at least 3 edges + if ( numPolyEdges < 3 ) { + return; + } + // the polygon is invalid if some edge is found twice + for ( i = 0; i < numPolyEdges; i++ ) { + for ( j = i+1; j < numPolyEdges; j++ ) { + if ( abs(polyEdges[i]) == abs(polyEdges[j]) ) { + return; + } + } + } + // don't overflow max edges + if ( numPolyEdges > CM_MAX_POLYGON_EDGES ) { + common->Warning( "idCollisionModelManagerLocal::CreatePolygon: polygon has more than %d edges", numPolyEdges ); + numPolyEdges = CM_MAX_POLYGON_EDGES; + } + + w->GetBounds( bounds ); + + p = AllocPolygon( model, numPolyEdges ); + p->numEdges = numPolyEdges; + p->contents = material->GetContentFlags(); + p->material = material; + p->checkcount = 0; + p->plane = plane; + p->bounds = bounds; + for ( i = 0; i < numPolyEdges; i++ ) { + edgeNum = polyEdges[i]; + p->edges[i] = edgeNum; + } + R_FilterPolygonIntoTree( model, model->node, NULL, p ); +} + +/* +================ +idCollisionModelManagerLocal::PolygonFromWinding + + NOTE: for patches primitiveNum < 0 and abs(primitiveNum) is the real number +================ +*/ +void idCollisionModelManagerLocal::PolygonFromWinding( cm_model_t *model, idFixedWinding *w, const idPlane &plane, const idMaterial *material, int primitiveNum ) { + int contents; + + contents = material->GetContentFlags(); + + // if this polygon is part of the world model + if ( numModels == 0 ) { + // if the polygon is fully chopped away by the proc bsp tree + if ( ChoppedAwayByProcBSP( *w, plane, contents ) ) { + model->numRemovedPolys++; + return; + } + } + + // get one winding that is not or only partly contained in brushes + w = WindingOutsideBrushes( w, plane, contents, primitiveNum, model->node ); + + // if the polygon is fully contained within a brush + if ( !w ) { + model->numRemovedPolys++; + return; + } + + if ( w->IsHuge() ) { + common->Warning( "idCollisionModelManagerLocal::PolygonFromWinding: model %s primitive %d is degenerate", model->name.c_str(), abs(primitiveNum) ); + return; + } + + CreatePolygon( model, w, plane, material, primitiveNum ); + + if ( material->GetCullType() == CT_TWO_SIDED || material->ShouldCreateBackSides() ) { + w->ReverseSelf(); + CreatePolygon( model, w, -plane, material, primitiveNum ); + } +} + +/* +================= +idCollisionModelManagerLocal::CreatePatchPolygons +================= +*/ +void idCollisionModelManagerLocal::CreatePatchPolygons( cm_model_t *model, idSurface_Patch &mesh, const idMaterial *material, int primitiveNum ) { + int i, j; + float dot; + int v1, v2, v3, v4; + idFixedWinding w; + idPlane plane; + idVec3 d1, d2; + + for ( i = 0; i < mesh.GetWidth() - 1; i++ ) { + for ( j = 0; j < mesh.GetHeight() - 1; j++ ) { + + v1 = j * mesh.GetWidth() + i; + v2 = v1 + 1; + v3 = v1 + mesh.GetWidth() + 1; + v4 = v1 + mesh.GetWidth(); + + d1 = mesh[v2].xyz - mesh[v1].xyz; + d2 = mesh[v3].xyz - mesh[v1].xyz; + plane.SetNormal( d1.Cross(d2) ); + if ( plane.Normalize() != 0.0f ) { + plane.FitThroughPoint( mesh[v1].xyz ); + dot = plane.Distance( mesh[v4].xyz ); + // if we can turn it into a quad + if ( idMath::Fabs(dot) < 0.1f ) { + w.Clear(); + w += mesh[v1].xyz; + w += mesh[v2].xyz; + w += mesh[v3].xyz; + w += mesh[v4].xyz; + + PolygonFromWinding( model, &w, plane, material, -primitiveNum ); + continue; + } + else { + // create one of the triangles + w.Clear(); + w += mesh[v1].xyz; + w += mesh[v2].xyz; + w += mesh[v3].xyz; + + PolygonFromWinding( model, &w, plane, material, -primitiveNum ); + } + } + // create the other triangle + d1 = mesh[v3].xyz - mesh[v1].xyz; + d2 = mesh[v4].xyz - mesh[v1].xyz; + plane.SetNormal( d1.Cross(d2) ); + if ( plane.Normalize() != 0.0f ) { + plane.FitThroughPoint( mesh[v1].xyz ); + + w.Clear(); + w += mesh[v1].xyz; + w += mesh[v3].xyz; + w += mesh[v4].xyz; + + PolygonFromWinding( model, &w, plane, material, -primitiveNum ); + } + } + } +} + +/* +================= +CM_EstimateVertsAndEdges +================= +*/ +static void CM_EstimateVertsAndEdges( const idMapEntity *mapEnt, int *numVerts, int *numEdges ) { + int j, width, height; + + *numVerts = *numEdges = 0; + for ( j = 0; j < mapEnt->GetNumPrimitives(); j++ ) { + const idMapPrimitive *mapPrim; + mapPrim = mapEnt->GetPrimitive(j); + if ( mapPrim->GetType() == idMapPrimitive::TYPE_PATCH ) { + // assume maximum tesselation without adding verts + width = static_cast(mapPrim)->GetWidth(); + height = static_cast(mapPrim)->GetHeight(); + *numVerts += width * height; + *numEdges += (width-1) * height + width * (height-1) + (width-1) * (height-1); + continue; + } + if ( mapPrim->GetType() == idMapPrimitive::TYPE_BRUSH ) { + // assume cylinder with a polygon with (numSides - 2) edges ontop and on the bottom + *numVerts += (static_cast(mapPrim)->GetNumSides() - 2) * 2; + *numEdges += (static_cast(mapPrim)->GetNumSides() - 2) * 3; + continue; + } + } +} + +/* +================= +idCollisionModelManagerLocal::ConverPatch +================= +*/ +void idCollisionModelManagerLocal::ConvertPatch( cm_model_t *model, const idMapPatch *patch, int primitiveNum ) { + const idMaterial *material; + idSurface_Patch *cp; + + material = declManager->FindMaterial( patch->GetMaterial() ); + if ( !( material->GetContentFlags() & CONTENTS_REMOVE_UTIL ) ) { + return; + } + + // copy the patch + cp = new idSurface_Patch( *patch ); + + // if the patch has an explicit number of subdivisions use it to avoid cracks + if ( patch->GetExplicitlySubdivided() ) { + cp->SubdivideExplicit( patch->GetHorzSubdivisions(), patch->GetVertSubdivisions(), false, true ); + } else { + cp->Subdivide( DEFAULT_CURVE_MAX_ERROR_CD, DEFAULT_CURVE_MAX_ERROR_CD, DEFAULT_CURVE_MAX_LENGTH_CD, false ); + } + + // create collision polygons for the patch + CreatePatchPolygons( model, *cp, material, primitiveNum ); + + delete cp; +} + +/* +================ +idCollisionModelManagerLocal::ConvertBrushSides +================ +*/ +void idCollisionModelManagerLocal::ConvertBrushSides( cm_model_t *model, const idMapBrush *mapBrush, int primitiveNum ) { + int i, j; + idMapBrushSide *mapSide; + idFixedWinding w; + idPlane *planes; + const idMaterial *material; + + // fix degenerate planes + planes = (idPlane *) _alloca16( mapBrush->GetNumSides() * sizeof( planes[0] ) ); + for ( i = 0; i < mapBrush->GetNumSides(); i++ ) { + planes[i] = mapBrush->GetSide(i)->GetPlane(); + planes[i].FixDegeneracies( DEGENERATE_DIST_EPSILON ); + } + + // create a collision polygon for each brush side + for ( i = 0; i < mapBrush->GetNumSides(); i++ ) { + mapSide = mapBrush->GetSide(i); + material = declManager->FindMaterial( mapSide->GetMaterial() ); + if ( !( material->GetContentFlags() & CONTENTS_REMOVE_UTIL ) ) { + continue; + } + w.BaseForPlane( -planes[i] ); + for ( j = 0; j < mapBrush->GetNumSides() && w.GetNumPoints(); j++ ) { + if ( i == j ) { + continue; + } + w.ClipInPlace( -planes[j], 0 ); + } + + if ( w.GetNumPoints() ) { + PolygonFromWinding( model, &w, planes[i], material, primitiveNum ); + } + } +} + +/* +================ +idCollisionModelManagerLocal::ConvertBrush +================ +*/ +void idCollisionModelManagerLocal::ConvertBrush( cm_model_t *model, const idMapBrush *mapBrush, int primitiveNum ) { + int i, j, contents; + idBounds bounds; + idMapBrushSide *mapSide; + cm_brush_t *brush; + idPlane *planes; + idFixedWinding w; + const idMaterial *material = NULL; + + contents = 0; + bounds.Clear(); + + // fix degenerate planes + planes = (idPlane *) _alloca16( mapBrush->GetNumSides() * sizeof( planes[0] ) ); + for ( i = 0; i < mapBrush->GetNumSides(); i++ ) { + planes[i] = mapBrush->GetSide(i)->GetPlane(); + planes[i].FixDegeneracies( DEGENERATE_DIST_EPSILON ); + } + + // we are only getting the bounds for the brush so there's no need + // to create a winding for the last brush side + for ( i = 0; i < mapBrush->GetNumSides() - 1; i++ ) { + mapSide = mapBrush->GetSide(i); + material = declManager->FindMaterial( mapSide->GetMaterial() ); + contents |= ( material->GetContentFlags() & CONTENTS_REMOVE_UTIL ); + w.BaseForPlane( -planes[i] ); + for ( j = 0; j < mapBrush->GetNumSides() && w.GetNumPoints(); j++ ) { + if ( i == j ) { + continue; + } + w.ClipInPlace( -planes[j], 0 ); + } + + for ( j = 0; j < w.GetNumPoints(); j++ ) { + bounds.AddPoint( w[j].ToVec3() ); + } + } + if ( !contents ) { + return; + } + // create brush for position test + brush = AllocBrush( model, mapBrush->GetNumSides() ); + brush->checkcount = 0; + brush->contents = contents; + brush->material = material; + brush->primitiveNum = primitiveNum; + brush->bounds = bounds; + brush->numPlanes = mapBrush->GetNumSides(); + for (i = 0; i < mapBrush->GetNumSides(); i++) { + brush->planes[i] = planes[i]; + } + AddBrushToNode( model, model->node, brush ); +} + +/* +================ +CM_CountNodeBrushes +================ +*/ +static int CM_CountNodeBrushes( const cm_node_t *node ) { + int count; + cm_brushRef_t *bref; + + count = 0; + for ( bref = node->brushes; bref; bref = bref->next ) { + count++; + } + return count; +} + +/* +================ +CM_R_GetModelBounds +================ +*/ +static void CM_R_GetNodeBounds( idBounds *bounds, cm_node_t *node ) { + cm_polygonRef_t *pref; + cm_brushRef_t *bref; + + while ( 1 ) { + for ( pref = node->polygons; pref; pref = pref->next ) { + bounds->AddPoint( pref->p->bounds[0] ); + bounds->AddPoint( pref->p->bounds[1] ); + } + for ( bref = node->brushes; bref; bref = bref->next ) { + bounds->AddPoint( bref->b->bounds[0] ); + bounds->AddPoint( bref->b->bounds[1] ); + } + if ( node->planeType == -1 ) { + break; + } + CM_R_GetNodeBounds( bounds, node->children[1] ); + node = node->children[0]; + } +} + +/* +================ +CM_GetNodeBounds +================ +*/ +void CM_GetNodeBounds( idBounds *bounds, cm_node_t *node ) { + bounds->Clear(); + CM_R_GetNodeBounds( bounds, node ); + if ( bounds->IsCleared() ) { + bounds->Zero(); + } +} + +/* +================ +CM_GetNodeContents +================ +*/ +int CM_GetNodeContents( cm_node_t *node ) { + int contents; + cm_polygonRef_t *pref; + cm_brushRef_t *bref; + + contents = 0; + while ( 1 ) { + for ( pref = node->polygons; pref; pref = pref->next ) { + contents |= pref->p->contents; + } + for ( bref = node->brushes; bref; bref = bref->next ) { + contents |= bref->b->contents; + } + if ( node->planeType == -1 ) { + break; + } + contents |= CM_GetNodeContents( node->children[1] ); + node = node->children[0]; + } + return contents; +} + +/* +================== +idCollisionModelManagerLocal::RemapEdges +================== +*/ +void idCollisionModelManagerLocal::RemapEdges( cm_node_t *node, int *edgeRemap ) { + cm_polygonRef_t *pref; + cm_polygon_t *p; + int i; + + while ( 1 ) { + for ( pref = node->polygons; pref; pref = pref->next ) { + p = pref->p; + // if we checked this polygon already + if ( p->checkcount == checkCount ) { + continue; + } + p->checkcount = checkCount; + for ( i = 0; i < p->numEdges; i++ ) { + if ( p->edges[i] < 0 ) { + p->edges[i] = -edgeRemap[ abs(p->edges[i]) ]; + } + else { + p->edges[i] = edgeRemap[ p->edges[i] ]; + } + } + } + if ( node->planeType == -1 ) { + break; + } + + RemapEdges( node->children[1], edgeRemap ); + node = node->children[0]; + } +} + +/* +================== +idCollisionModelManagerLocal::OptimizeArrays + + due to polygon merging and polygon removal the vertex and edge array + can have a lot of unused entries. +================== +*/ +void idCollisionModelManagerLocal::OptimizeArrays( cm_model_t *model ) { + int i, newNumVertices, newNumEdges, *v; + int *remap; + cm_edge_t *oldEdges; + cm_vertex_t *oldVertices; + + remap = (int *) Mem_ClearedAlloc( Max( model->numVertices, model->numEdges ) * sizeof( int ) ); + // get all used vertices + for ( i = 0; i < model->numEdges; i++ ) { + remap[ model->edges[i].vertexNum[0] ] = true; + remap[ model->edges[i].vertexNum[1] ] = true; + } + // create remap index and move vertices + newNumVertices = 0; + for ( i = 0; i < model->numVertices; i++ ) { + if ( remap[ i ] ) { + remap[ i ] = newNumVertices; + model->vertices[ newNumVertices ] = model->vertices[ i ]; + newNumVertices++; + } + } + model->numVertices = newNumVertices; + // change edge vertex indexes + for ( i = 1; i < model->numEdges; i++ ) { + v = model->edges[i].vertexNum; + v[0] = remap[ v[0] ]; + v[1] = remap[ v[1] ]; + } + + // create remap index and move edges + newNumEdges = 1; + for ( i = 1; i < model->numEdges; i++ ) { + // if the edge is used + if ( model->edges[ i ].numUsers ) { + remap[ i ] = newNumEdges; + model->edges[ newNumEdges ] = model->edges[ i ]; + newNumEdges++; + } + } + // change polygon edge indexes + checkCount++; + RemapEdges( model->node, remap ); + model->numEdges = newNumEdges; + + Mem_Free( remap ); + + // realloc vertices + oldVertices = model->vertices; + if ( oldVertices ) { + model->vertices = (cm_vertex_t *) Mem_ClearedAlloc( model->numVertices * sizeof(cm_vertex_t) ); + memcpy( model->vertices, oldVertices, model->numVertices * sizeof(cm_vertex_t) ); + Mem_Free( oldVertices ); + } + + // realloc edges + oldEdges = model->edges; + if ( oldEdges ) { + model->edges = (cm_edge_t *) Mem_ClearedAlloc( model->numEdges * sizeof(cm_edge_t) ); + memcpy( model->edges, oldEdges, model->numEdges * sizeof(cm_edge_t) ); + Mem_Free( oldEdges ); + } +} + +/* +================ +idCollisionModelManagerLocal::FinishModel +================ +*/ +void idCollisionModelManagerLocal::FinishModel( cm_model_t *model ) { + // try to merge polygons + checkCount++; + MergeTreePolygons( model, model->node ); + // find internal edges (no mesh can ever collide with internal edges) + checkCount++; + FindInternalEdges( model, model->node ); + // calculate edge normals + checkCount++; + CalculateEdgeNormals( model, model->node ); + + //common->Printf( "%s vertex hash spread is %d\n", model->name.c_str(), cm_vertexHash->GetSpread() ); + //common->Printf( "%s edge hash spread is %d\n", model->name.c_str(), cm_edgeHash->GetSpread() ); + + // remove all unused vertices and edges + OptimizeArrays( model ); + // get model bounds from brush and polygon bounds + CM_GetNodeBounds( &model->bounds, model->node ); + // get model contents + model->contents = CM_GetNodeContents( model->node ); + // total memory used by this model + model->usedMemory = model->numVertices * sizeof(cm_vertex_t) + + model->numEdges * sizeof(cm_edge_t) + + model->polygonMemory + + model->brushMemory + + model->numNodes * sizeof(cm_node_t) + + model->numPolygonRefs * sizeof(cm_polygonRef_t) + + model->numBrushRefs * sizeof(cm_brushRef_t); +} + +/* +================ +idCollisionModelManagerLocal::LoadRenderModel +================ +*/ +cm_model_t *idCollisionModelManagerLocal::LoadRenderModel( const char *fileName ) { + int i, j; + idRenderModel *renderModel; + const modelSurface_t *surf; + idFixedWinding w; + cm_node_t *node; + cm_model_t *model; + idPlane plane; + idBounds bounds; + bool collisionSurface; + idStr extension; + + // only load ASE and LWO models + idStr( fileName ).ExtractFileExtension( extension ); + if ( ( extension.Icmp( "ase" ) != 0 ) && ( extension.Icmp( "lwo" ) != 0 ) && ( extension.Icmp( "ma" ) != 0 ) ) { + return NULL; + } + + if ( !renderModelManager->CheckModel( fileName ) ) { + return NULL; + } + + renderModel = renderModelManager->FindModel( fileName ); + + model = AllocModel(); + model->name = fileName; + node = AllocNode( model, NODE_BLOCK_SIZE_SMALL ); + node->planeType = -1; + model->node = node; + + model->maxVertices = 0; + model->numVertices = 0; + model->maxEdges = 0; + model->numEdges = 0; + + bounds = renderModel->Bounds( NULL ); + + collisionSurface = false; + for ( i = 0; i < renderModel->NumSurfaces(); i++ ) { + surf = renderModel->Surface( i ); + if ( surf->shader->GetSurfaceFlags() & SURF_COLLISION ) { + collisionSurface = true; + } + } + + for ( i = 0; i < renderModel->NumSurfaces(); i++ ) { + surf = renderModel->Surface( i ); + // if this surface has no contents + if ( ! ( surf->shader->GetContentFlags() & CONTENTS_REMOVE_UTIL ) ) { + continue; + } + // if the model has a collision surface and this surface is not a collision surface + if ( collisionSurface && !( surf->shader->GetSurfaceFlags() & SURF_COLLISION ) ) { + continue; + } + // get max verts and edges + model->maxVertices += surf->geometry->numVerts; + model->maxEdges += surf->geometry->numIndexes; + } + + model->vertices = (cm_vertex_t *) Mem_ClearedAlloc( model->maxVertices * sizeof(cm_vertex_t) ); + model->edges = (cm_edge_t *) Mem_ClearedAlloc( model->maxEdges * sizeof(cm_edge_t) ); + + // setup hash to speed up finding shared vertices and edges + SetupHash(); + + cm_vertexHash->ResizeIndex( model->maxVertices ); + cm_edgeHash->ResizeIndex( model->maxEdges ); + + ClearHash( bounds ); + + for ( i = 0; i < renderModel->NumSurfaces(); i++ ) { + surf = renderModel->Surface( i ); + // if this surface has no contents + if ( ! ( surf->shader->GetContentFlags() & CONTENTS_REMOVE_UTIL ) ) { + continue; + } + // if the model has a collision surface and this surface is not a collision surface + if ( collisionSurface && !( surf->shader->GetSurfaceFlags() & SURF_COLLISION ) ) { + continue; + } + + for ( j = 0; j < surf->geometry->numIndexes; j += 3 ) { + w.Clear(); + w += surf->geometry->verts[ surf->geometry->indexes[ j + 2 ] ].xyz; + w += surf->geometry->verts[ surf->geometry->indexes[ j + 1 ] ].xyz; + w += surf->geometry->verts[ surf->geometry->indexes[ j + 0 ] ].xyz; + w.GetPlane( plane ); + plane = -plane; + PolygonFromWinding( model, &w, plane, surf->shader, 1 ); + } + } + + // create a BSP tree for the model + model->node = CreateAxialBSPTree( model, model->node ); + + model->isConvex = false; + + FinishModel( model ); + + // shutdown the hash + ShutdownHash(); + + common->Printf( "loaded collision model %s\n", model->name.c_str() ); + + return model; +} + +/* +================ +idCollisionModelManagerLocal::CollisionModelForMapEntity +================ +*/ +cm_model_t *idCollisionModelManagerLocal::CollisionModelForMapEntity( const idMapEntity *mapEnt ) { + cm_model_t *model; + idBounds bounds; + const char *name; + int i, brushCount; + + // if the entity has no primitives + if ( mapEnt->GetNumPrimitives() < 1 ) { + return NULL; + } + + // get a name for the collision model + mapEnt->epairs.GetString( "model", "", &name ); + if ( !name[0] ) { + mapEnt->epairs.GetString( "name", "", &name ); + if ( !name[0] ) { + if ( !numModels ) { + // first model is always the world + name = "worldMap"; + } + else { + name = "unnamed inline model"; + } + } + } + + model = AllocModel(); + model->node = AllocNode( model, NODE_BLOCK_SIZE_SMALL ); + + CM_EstimateVertsAndEdges( mapEnt, &model->maxVertices, &model->maxEdges ); + model->numVertices = 0; + model->numEdges = 0; + model->vertices = (cm_vertex_t *) Mem_ClearedAlloc( model->maxVertices * sizeof(cm_vertex_t) ); + model->edges = (cm_edge_t *) Mem_ClearedAlloc( model->maxEdges * sizeof(cm_edge_t) ); + + cm_vertexHash->ResizeIndex( model->maxVertices ); + cm_edgeHash->ResizeIndex( model->maxEdges ); + + model->name = name; + model->isConvex = false; + + // convert brushes + for ( i = 0; i < mapEnt->GetNumPrimitives(); i++ ) { + idMapPrimitive *mapPrim; + + mapPrim = mapEnt->GetPrimitive(i); + if ( mapPrim->GetType() == idMapPrimitive::TYPE_BRUSH ) { + ConvertBrush( model, static_cast(mapPrim), i ); + continue; + } + } + + // create an axial bsp tree for the model if it has more than just a bunch brushes + brushCount = CM_CountNodeBrushes( model->node ); + if ( brushCount > 4 ) { + model->node = CreateAxialBSPTree( model, model->node ); + } else { + model->node->planeType = -1; + } + + // get bounds for hash + if ( brushCount ) { + CM_GetNodeBounds( &bounds, model->node ); + } else { + bounds[0].Set( -256, -256, -256 ); + bounds[1].Set( 256, 256, 256 ); + } + + // different models do not share edges and vertices with each other, so clear the hash + ClearHash( bounds ); + + // create polygons from patches and brushes + for ( i = 0; i < mapEnt->GetNumPrimitives(); i++ ) { + idMapPrimitive *mapPrim; + + mapPrim = mapEnt->GetPrimitive(i); + if ( mapPrim->GetType() == idMapPrimitive::TYPE_PATCH ) { + ConvertPatch( model, static_cast(mapPrim), i ); + continue; + } + if ( mapPrim->GetType() == idMapPrimitive::TYPE_BRUSH ) { + ConvertBrushSides( model, static_cast(mapPrim), i ); + continue; + } + } + + FinishModel( model ); + + return model; +} + +/* +================ +idCollisionModelManagerLocal::FindModel +================ +*/ +cmHandle_t idCollisionModelManagerLocal::FindModel( const char *name ) { + int i; + + // check if this model is already loaded + for ( i = 0; i < numModels; i++ ) { + if ( !models[i]->name.Icmp( name ) ) { + break; + } + } + // if the model is already loaded + if ( i < numModels ) { + return i; + } + return -1; +} + +/* +================== +idCollisionModelManagerLocal::PrintModelInfo +================== +*/ +void idCollisionModelManagerLocal::PrintModelInfo( const cm_model_t *model ) { + common->Printf( "%6i vertices (%i KB)\n", model->numVertices, (model->numVertices * sizeof(cm_vertex_t))>>10 ); + common->Printf( "%6i edges (%i KB)\n", model->numEdges, (model->numEdges * sizeof(cm_edge_t))>>10 ); + common->Printf( "%6i polygons (%i KB)\n", model->numPolygons, model->polygonMemory>>10 ); + common->Printf( "%6i brushes (%i KB)\n", model->numBrushes, model->brushMemory>>10 ); + common->Printf( "%6i nodes (%i KB)\n", model->numNodes, (model->numNodes * sizeof(cm_node_t))>>10 ); + common->Printf( "%6i polygon refs (%i KB)\n", model->numPolygonRefs, (model->numPolygonRefs * sizeof(cm_polygonRef_t))>>10 ); + common->Printf( "%6i brush refs (%i KB)\n", model->numBrushRefs, (model->numBrushRefs * sizeof(cm_brushRef_t))>>10 ); + common->Printf( "%6i internal edges\n", model->numInternalEdges ); + common->Printf( "%6i sharp edges\n", model->numSharpEdges ); + common->Printf( "%6i contained polygons removed\n", model->numRemovedPolys ); + common->Printf( "%6i polygons merged\n", model->numMergedPolys ); + common->Printf( "%6i KB total memory used\n", model->usedMemory>>10 ); +} + +/* +================ +idCollisionModelManagerLocal::AccumulateModelInfo +================ +*/ +void idCollisionModelManagerLocal::AccumulateModelInfo( cm_model_t *model ) { + int i; + + memset( model, 0, sizeof( *model ) ); + // accumulate statistics of all loaded models + for ( i = 0; i < numModels; i++ ) { + model->numVertices += models[i]->numVertices; + model->numEdges += models[i]->numEdges; + model->numPolygons += models[i]->numPolygons; + model->polygonMemory += models[i]->polygonMemory; + model->numBrushes += models[i]->numBrushes; + model->brushMemory += models[i]->brushMemory; + model->numNodes += models[i]->numNodes; + model->numBrushRefs += models[i]->numBrushRefs; + model->numPolygonRefs += models[i]->numPolygonRefs; + model->numInternalEdges += models[i]->numInternalEdges; + model->numSharpEdges += models[i]->numSharpEdges; + model->numRemovedPolys += models[i]->numRemovedPolys; + model->numMergedPolys += models[i]->numMergedPolys; + model->usedMemory += models[i]->usedMemory; + } +} + +/* +================ +idCollisionModelManagerLocal::ModelInfo +================ +*/ +void idCollisionModelManagerLocal::ModelInfo( cmHandle_t model ) { + cm_model_t modelInfo; + + if ( model == -1 ) { + AccumulateModelInfo( &modelInfo ); + PrintModelInfo( &modelInfo ); + return; + } + if ( model < 0 || model > MAX_SUBMODELS || model > maxModels ) { + common->Printf( "idCollisionModelManagerLocal::ModelInfo: invalid model handle\n" ); + return; + } + if ( !models[model] ) { + common->Printf( "idCollisionModelManagerLocal::ModelInfo: invalid model\n" ); + return; + } + + PrintModelInfo( models[model] ); +} + +/* +================ +idCollisionModelManagerLocal::ListModels +================ +*/ +void idCollisionModelManagerLocal::ListModels( void ) { + int i, totalMemory; + + totalMemory = 0; + for ( i = 0; i < numModels; i++ ) { + common->Printf( "%4d: %5d KB %s\n", i, (models[i]->usedMemory>>10), models[i]->name.c_str() ); + totalMemory += models[i]->usedMemory; + } + common->Printf( "%4d KB in %d models\n", (totalMemory>>10), numModels ); +} + +/* +================ +idCollisionModelManagerLocal::BuildModels +================ +*/ +void idCollisionModelManagerLocal::BuildModels( const idMapFile *mapFile ) { + int i; + const idMapEntity *mapEnt; + + idTimer timer; + timer.Start(); + + if ( !LoadCollisionModelFile( mapFile->GetName(), mapFile->GetGeometryCRC() ) ) { + + if ( !mapFile->GetNumEntities() ) { + return; + } + + // load the .proc file bsp for data optimisation + LoadProcBSP( mapFile->GetName() ); + + // convert brushes and patches to collision data + for ( i = 0; i < mapFile->GetNumEntities(); i++ ) { + mapEnt = mapFile->GetEntity(i); + + if ( numModels >= MAX_SUBMODELS ) { + common->Error( "idCollisionModelManagerLocal::BuildModels: more than %d collision models", MAX_SUBMODELS ); + break; + } + models[numModels] = CollisionModelForMapEntity( mapEnt ); + if ( models[ numModels] ) { + numModels++; + } + } + + // free the proc bsp which is only used for data optimization + Mem_Free( procNodes ); + procNodes = NULL; + + // write the collision models to a file + WriteCollisionModelsToFile( mapFile->GetName(), 0, numModels, mapFile->GetGeometryCRC() ); + } + + timer.Stop(); + + // print statistics on collision data + cm_model_t model; + AccumulateModelInfo( &model ); + common->Printf( "collision data:\n" ); + common->Printf( "%6i models\n", numModels ); + PrintModelInfo( &model ); + common->Printf( "%.0f msec to load collision data.\n", timer.Milliseconds() ); +} + + +/* +================ +idCollisionModelManagerLocal::LoadMap +================ +*/ +void idCollisionModelManagerLocal::LoadMap( const idMapFile *mapFile ) { + + if ( mapFile == NULL ) { + common->Error( "idCollisionModelManagerLocal::LoadMap: NULL mapFile" ); + } + + // check whether we can keep the current collision map based on the mapName and mapFileTime + if ( loaded ) { + if ( mapName.Icmp( mapFile->GetName() ) == 0 ) { + if ( mapFile->GetFileTime() == mapFileTime ) { + common->DPrintf( "Using loaded version\n" ); + return; + } + common->DPrintf( "Reloading modified map\n" ); + } + FreeMap(); + } + + // clear the collision map + Clear(); + + // models + maxModels = MAX_SUBMODELS; + numModels = 0; + models = (cm_model_t **) Mem_ClearedAlloc( (maxModels+1) * sizeof(cm_model_t *) ); + + // setup hash to speed up finding shared vertices and edges + SetupHash(); + + // setup trace model structure + SetupTrmModelStructure(); + + // build collision models + BuildModels( mapFile ); + + // save name and time stamp + mapName = mapFile->GetName(); + mapFileTime = mapFile->GetFileTime(); + loaded = true; + + // shutdown the hash + ShutdownHash(); +} + +/* +=================== +idCollisionModelManagerLocal::GetModelName +=================== +*/ +const char *idCollisionModelManagerLocal::GetModelName( cmHandle_t model ) const { + if ( model < 0 || model > MAX_SUBMODELS || model >= numModels || !models[model] ) { + common->Printf( "idCollisionModelManagerLocal::GetModelBounds: invalid model handle\n" ); + return ""; + } + return models[model]->name.c_str(); +} + +/* +=================== +idCollisionModelManagerLocal::GetModelBounds +=================== +*/ +bool idCollisionModelManagerLocal::GetModelBounds( cmHandle_t model, idBounds &bounds ) const { + + if ( model < 0 || model > MAX_SUBMODELS || model >= numModels || !models[model] ) { + common->Printf( "idCollisionModelManagerLocal::GetModelBounds: invalid model handle\n" ); + return false; + } + + bounds = models[model]->bounds; + return true; +} + +/* +=================== +idCollisionModelManagerLocal::GetModelContents +=================== +*/ +bool idCollisionModelManagerLocal::GetModelContents( cmHandle_t model, int &contents ) const { + if ( model < 0 || model > MAX_SUBMODELS || model >= numModels || !models[model] ) { + common->Printf( "idCollisionModelManagerLocal::GetModelContents: invalid model handle\n" ); + return false; + } + + contents = models[model]->contents; + + return true; +} + +/* +=================== +idCollisionModelManagerLocal::GetModelVertex +=================== +*/ +bool idCollisionModelManagerLocal::GetModelVertex( cmHandle_t model, int vertexNum, idVec3 &vertex ) const { + if ( model < 0 || model > MAX_SUBMODELS || model >= numModels || !models[model] ) { + common->Printf( "idCollisionModelManagerLocal::GetModelVertex: invalid model handle\n" ); + return false; + } + + if ( vertexNum < 0 || vertexNum >= models[model]->numVertices ) { + common->Printf( "idCollisionModelManagerLocal::GetModelVertex: invalid vertex number\n" ); + return false; + } + + vertex = models[model]->vertices[vertexNum].p; + + return true; +} + +/* +=================== +idCollisionModelManagerLocal::GetModelEdge +=================== +*/ +bool idCollisionModelManagerLocal::GetModelEdge( cmHandle_t model, int edgeNum, idVec3 &start, idVec3 &end ) const { + if ( model < 0 || model > MAX_SUBMODELS || model >= numModels || !models[model] ) { + common->Printf( "idCollisionModelManagerLocal::GetModelEdge: invalid model handle\n" ); + return false; + } + + edgeNum = abs( edgeNum ); + if ( edgeNum >= models[model]->numEdges ) { + common->Printf( "idCollisionModelManagerLocal::GetModelEdge: invalid edge number\n" ); + return false; + } + + start = models[model]->vertices[models[model]->edges[edgeNum].vertexNum[0]].p; + end = models[model]->vertices[models[model]->edges[edgeNum].vertexNum[1]].p; + + return true; +} + +/* +=================== +idCollisionModelManagerLocal::GetModelPolygon +=================== +*/ +bool idCollisionModelManagerLocal::GetModelPolygon( cmHandle_t model, int polygonNum, idFixedWinding &winding ) const { + int i, edgeNum; + cm_polygon_t *poly; + + if ( model < 0 || model > MAX_SUBMODELS || model >= numModels || !models[model] ) { + common->Printf( "idCollisionModelManagerLocal::GetModelPolygon: invalid model handle\n" ); + return false; + } + + poly = *reinterpret_cast(&polygonNum); + winding.Clear(); + for ( i = 0; i < poly->numEdges; i++ ) { + edgeNum = poly->edges[i]; + winding += models[model]->vertices[ models[model]->edges[abs(edgeNum)].vertexNum[INTSIGNBITSET(edgeNum)] ].p; + } + + return true; +} + +/* +================== +idCollisionModelManagerLocal::LoadModel +================== +*/ +cmHandle_t idCollisionModelManagerLocal::LoadModel( const char *modelName, const bool precache ) { + int handle; + + handle = FindModel( modelName ); + if ( handle >= 0 ) { + return handle; + } + + if ( numModels >= MAX_SUBMODELS ) { + common->Error( "idCollisionModelManagerLocal::LoadModel: no free slots\n" ); + return 0; + } + + // try to load a .cm file + if ( LoadCollisionModelFile( modelName, 0 ) ) { + handle = FindModel( modelName ); + if ( handle >= 0 ) { + return handle; + } else { + common->Warning( "idCollisionModelManagerLocal::LoadModel: collision file for '%s' contains different model", modelName ); + } + } + + // if only precaching .cm files do not waste memory converting render models + if ( precache ) { + return 0; + } + + // try to load a .ASE or .LWO model and convert it to a collision model + models[numModels] = LoadRenderModel( modelName ); + if ( models[numModels] != NULL ) { + numModels++; + return ( numModels - 1 ); + } + + return 0; +} + +/* +================== +idCollisionModelManagerLocal::TrmFromModel_r +================== +*/ +bool idCollisionModelManagerLocal::TrmFromModel_r( idTraceModel &trm, cm_node_t *node ) { + cm_polygonRef_t *pref; + cm_polygon_t *p; + int i; + + while ( 1 ) { + for ( pref = node->polygons; pref; pref = pref->next ) { + p = pref->p; + + if ( p->checkcount == checkCount ) { + continue; + } + + p->checkcount = checkCount; + + if ( trm.numPolys >= MAX_TRACEMODEL_POLYS ) { + return false; + } + // copy polygon properties + trm.polys[ trm.numPolys ].bounds = p->bounds; + trm.polys[ trm.numPolys ].normal = p->plane.Normal(); + trm.polys[ trm.numPolys ].dist = p->plane.Dist(); + trm.polys[ trm.numPolys ].numEdges = p->numEdges; + // copy edge index + for ( i = 0; i < p->numEdges; i++ ) { + trm.polys[ trm.numPolys ].edges[ i ] = p->edges[ i ]; + } + trm.numPolys++; + } + if ( node->planeType == -1 ) { + break; + } + if ( !TrmFromModel_r( trm, node->children[1] ) ) { + return false; + } + node = node->children[0]; + } + return true; +} + +/* +================== +idCollisionModelManagerLocal::TrmFromModel + + NOTE: polygon merging can merge colinear edges and as such might cause dangling edges. +================== +*/ +bool idCollisionModelManagerLocal::TrmFromModel( const cm_model_t *model, idTraceModel &trm ) { + int i, j, numEdgeUsers[MAX_TRACEMODEL_EDGES+1]; + + // if the model has too many vertices to fit in a trace model + if ( model->numVertices > MAX_TRACEMODEL_VERTS ) { + common->Printf( "idCollisionModelManagerLocal::TrmFromModel: model %s has too many vertices.\n", model->name.c_str() ); + PrintModelInfo( model ); + return false; + } + + // plus one because the collision model accounts for the first unused edge + if ( model->numEdges > MAX_TRACEMODEL_EDGES+1 ) { + common->Printf( "idCollisionModelManagerLocal::TrmFromModel: model %s has too many edges.\n", model->name.c_str() ); + PrintModelInfo( model ); + return false; + } + + trm.type = TRM_CUSTOM; + trm.numVerts = 0; + trm.numEdges = 1; + trm.numPolys = 0; + trm.bounds.Clear(); + + // copy polygons + checkCount++; + if ( !TrmFromModel_r( trm, model->node ) ) { + common->Printf( "idCollisionModelManagerLocal::TrmFromModel: model %s has too many polygons.\n", model->name.c_str() ); + PrintModelInfo( model ); + return false; + } + + // copy vertices + for ( i = 0; i < model->numVertices; i++ ) { + trm.verts[ i ] = model->vertices[ i ].p; + trm.bounds.AddPoint( trm.verts[ i ] ); + } + trm.numVerts = model->numVertices; + + // copy edges + for ( i = 0; i < model->numEdges; i++ ) { + trm.edges[ i ].v[0] = model->edges[ i ].vertexNum[0]; + trm.edges[ i ].v[1] = model->edges[ i ].vertexNum[1]; + } + // minus one because the collision model accounts for the first unused edge + trm.numEdges = model->numEdges - 1; + + // each edge should be used exactly twice + memset( numEdgeUsers, 0, sizeof(numEdgeUsers) ); + for ( i = 0; i < trm.numPolys; i++ ) { + for ( j = 0; j < trm.polys[i].numEdges; j++ ) { + numEdgeUsers[ abs( trm.polys[i].edges[j] ) ]++; + } + } + for ( i = 1; i <= trm.numEdges; i++ ) { + if ( numEdgeUsers[i] != 2 ) { + common->Printf( "idCollisionModelManagerLocal::TrmFromModel: model %s has dangling edges, the model has to be an enclosed hull.\n", model->name.c_str() ); + PrintModelInfo( model ); + return false; + } + } + + // assume convex + trm.isConvex = true; + // check if really convex + for ( i = 0; i < trm.numPolys; i++ ) { + // to be convex no vertices should be in front of any polygon plane + for ( j = 0; j < trm.numVerts; j++ ) { + if ( trm.polys[ i ].normal * trm.verts[ j ] - trm.polys[ i ].dist > 0.01f ) { + trm.isConvex = false; + break; + } + } + if ( j < trm.numVerts ) { + break; + } + } + + // offset to center of model + trm.offset = trm.bounds.GetCenter(); + + trm.GenerateEdgeNormals(); + + return true; +} + +/* +================== +idCollisionModelManagerLocal::TrmFromModel +================== +*/ +bool idCollisionModelManagerLocal::TrmFromModel( const char *modelName, idTraceModel &trm ) { + cmHandle_t handle; + + handle = LoadModel( modelName, false ); + if ( !handle ) { + common->Printf( "idCollisionModelManagerLocal::TrmFromModel: model %s not found.\n", modelName ); + return false; + } + + return TrmFromModel( models[ handle ], trm ); +} diff --git a/neo/cm/CollisionModel_local.h b/neo/cm/CollisionModel_local.h new file mode 100644 index 0000000..bafa50f --- /dev/null +++ b/neo/cm/CollisionModel_local.h @@ -0,0 +1,527 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ + +/* +=============================================================================== + + Trace model vs. polygonal model collision detection. + +=============================================================================== +*/ + +#include "CollisionModel.h" + +#define MIN_NODE_SIZE 64.0f +#define MAX_NODE_POLYGONS 128 +#define CM_MAX_POLYGON_EDGES 64 +#define CIRCLE_APPROXIMATION_LENGTH 64.0f + +#define MAX_SUBMODELS 2048 +#define TRACE_MODEL_HANDLE MAX_SUBMODELS + +#define VERTEX_HASH_BOXSIZE (1<<6) // must be power of 2 +#define VERTEX_HASH_SIZE (VERTEX_HASH_BOXSIZE*VERTEX_HASH_BOXSIZE) +#define EDGE_HASH_SIZE (1<<14) + +#define NODE_BLOCK_SIZE_SMALL 8 +#define NODE_BLOCK_SIZE_LARGE 256 +#define REFERENCE_BLOCK_SIZE_SMALL 8 +#define REFERENCE_BLOCK_SIZE_LARGE 256 + +#define MAX_WINDING_LIST 128 // quite a few are generated at times +#define INTEGRAL_EPSILON 0.01f +#define VERTEX_EPSILON 0.1f +#define CHOP_EPSILON 0.1f + + +typedef struct cm_windingList_s { + int numWindings; // number of windings + idFixedWinding w[MAX_WINDING_LIST]; // windings + idVec3 normal; // normal for all windings + idBounds bounds; // bounds of all windings in list + idVec3 origin; // origin for radius + float radius; // radius relative to origin for all windings + int contents; // winding surface contents + int primitiveNum; // number of primitive the windings came from +} cm_windingList_t; + +/* +=============================================================================== + +Collision model + +=============================================================================== +*/ + +typedef struct cm_vertex_s { + idVec3 p; // vertex point + int checkcount; // for multi-check avoidance + unsigned long side; // each bit tells at which side this vertex passes one of the trace model edges + unsigned long sideSet; // each bit tells if sidedness for the trace model edge has been calculated yet +} cm_vertex_t; + +typedef struct cm_edge_s { + int checkcount; // for multi-check avoidance + unsigned short internal; // a trace model can never collide with internal edges + unsigned short numUsers; // number of polygons using this edge + unsigned long side; // each bit tells at which side of this edge one of the trace model vertices passes + unsigned long sideSet; // each bit tells if sidedness for the trace model vertex has been calculated yet + int vertexNum[2]; // start and end point of edge + idVec3 normal; // edge normal +} cm_edge_t; + +typedef struct cm_polygonBlock_s { + int bytesRemaining; + byte * next; +} cm_polygonBlock_t; + +typedef struct cm_polygon_s { + idBounds bounds; // polygon bounds + int checkcount; // for multi-check avoidance + int contents; // contents behind polygon + const idMaterial * material; // material + idPlane plane; // polygon plane + int numEdges; // number of edges + int edges[1]; // variable sized, indexes into cm_edge_t list +} cm_polygon_t; + +typedef struct cm_polygonRef_s { + cm_polygon_t * p; // pointer to polygon + struct cm_polygonRef_s *next; // next polygon in chain +} cm_polygonRef_t; + +typedef struct cm_polygonRefBlock_s { + cm_polygonRef_t * nextRef; // next polygon reference in block + struct cm_polygonRefBlock_s *next; // next block with polygon references +} cm_polygonRefBlock_t; + +typedef struct cm_brushBlock_s { + int bytesRemaining; + byte * next; +} cm_brushBlock_t; + +typedef struct cm_brush_s { + int checkcount; // for multi-check avoidance + idBounds bounds; // brush bounds + int contents; // contents of brush + const idMaterial * material; // material + int primitiveNum; // number of brush primitive + int numPlanes; // number of bounding planes + idPlane planes[1]; // variable sized +} cm_brush_t; + +typedef struct cm_brushRef_s { + cm_brush_t * b; // pointer to brush + struct cm_brushRef_s * next; // next brush in chain +} cm_brushRef_t; + +typedef struct cm_brushRefBlock_s { + cm_brushRef_t * nextRef; // next brush reference in block + struct cm_brushRefBlock_s *next; // next block with brush references +} cm_brushRefBlock_t; + +typedef struct cm_node_s { + int planeType; // node axial plane type + float planeDist; // node plane distance + cm_polygonRef_t * polygons; // polygons in node + cm_brushRef_t * brushes; // brushes in node + struct cm_node_s * parent; // parent of this node + struct cm_node_s * children[2]; // node children +} cm_node_t; + +typedef struct cm_nodeBlock_s { + cm_node_t * nextNode; // next node in block + struct cm_nodeBlock_s *next; // next block with nodes +} cm_nodeBlock_t; + +typedef struct cm_model_s { + idStr name; // model name + idBounds bounds; // model bounds + int contents; // all contents of the model ored together + bool isConvex; // set if model is convex + // model geometry + int maxVertices; // size of vertex array + int numVertices; // number of vertices + cm_vertex_t * vertices; // array with all vertices used by the model + int maxEdges; // size of edge array + int numEdges; // number of edges + cm_edge_t * edges; // array with all edges used by the model + cm_node_t * node; // first node of spatial subdivision + // blocks with allocated memory + cm_nodeBlock_t * nodeBlocks; // list with blocks of nodes + cm_polygonRefBlock_t * polygonRefBlocks; // list with blocks of polygon references + cm_brushRefBlock_t * brushRefBlocks; // list with blocks of brush references + cm_polygonBlock_t * polygonBlock; // memory block with all polygons + cm_brushBlock_t * brushBlock; // memory block with all brushes + // statistics + int numPolygons; + int polygonMemory; + int numBrushes; + int brushMemory; + int numNodes; + int numBrushRefs; + int numPolygonRefs; + int numInternalEdges; + int numSharpEdges; + int numRemovedPolys; + int numMergedPolys; + int usedMemory; +} cm_model_t; + +/* +=============================================================================== + +Data used during collision detection calculations + +=============================================================================== +*/ + +typedef struct cm_trmVertex_s { + int used; // true if this vertex is used for collision detection + idVec3 p; // vertex position + idVec3 endp; // end point of vertex after movement + int polygonSide; // side of polygon this vertex is on (rotational collision) + idPluecker pl; // pluecker coordinate for vertex movement + idVec3 rotationOrigin; // rotation origin for this vertex + idBounds rotationBounds; // rotation bounds for this vertex +} cm_trmVertex_t; + +typedef struct cm_trmEdge_s { + int used; // true when vertex is used for collision detection + idVec3 start; // start of edge + idVec3 end; // end of edge + int vertexNum[2]; // indexes into cm_traceWork_t->vertices + idPluecker pl; // pluecker coordinate for edge + idVec3 cross; // (z,-y,x) of cross product between edge dir and movement dir + idBounds rotationBounds; // rotation bounds for this edge + idPluecker plzaxis; // pluecker coordinate for rotation about the z-axis + unsigned short bitNum; // vertex bit number +} cm_trmEdge_t; + +typedef struct cm_trmPolygon_s { + int used; + idPlane plane; // polygon plane + int numEdges; // number of edges + int edges[MAX_TRACEMODEL_POLYEDGES]; // index into cm_traceWork_t->edges + idBounds rotationBounds; // rotation bounds for this polygon +} cm_trmPolygon_t; + +typedef struct cm_traceWork_s { + int numVerts; + cm_trmVertex_t vertices[MAX_TRACEMODEL_VERTS]; // trm vertices + int numEdges; + cm_trmEdge_t edges[MAX_TRACEMODEL_EDGES+1]; // trm edges + int numPolys; + cm_trmPolygon_t polys[MAX_TRACEMODEL_POLYS]; // trm polygons + cm_model_t *model; // model colliding with + idVec3 start; // start of trace + idVec3 end; // end of trace + idVec3 dir; // trace direction + idBounds bounds; // bounds of full trace + idBounds size; // bounds of transformed trm relative to start + idVec3 extents; // largest of abs(size[0]) and abs(size[1]) for BSP trace + int contents; // ignore polygons that do not have any of these contents flags + trace_t trace; // collision detection result + + bool rotation; // true if calculating rotational collision + bool pointTrace; // true if only tracing a point + bool positionTest; // true if not tracing but doing a position test + bool isConvex; // true if the trace model is convex + bool axisIntersectsTrm; // true if the rotation axis intersects the trace model + bool getContacts; // true if retrieving contacts + bool quickExit; // set to quickly stop the collision detection calculations + + idVec3 origin; // origin of rotation in model space + idVec3 axis; // rotation axis in model space + idMat3 matrix; // rotates axis of rotation to the z-axis + float angle; // angle for rotational collision + float maxTan; // max tangent of half the positive angle used instead of fraction + float radius; // rotation radius of trm start + idRotation modelVertexRotation; // inverse rotation for model vertices + + contactInfo_t *contacts; // array with contacts + int maxContacts; // max size of contact array + int numContacts; // number of contacts found + + idPlane heartPlane1; // polygons should be near anough the trace heart planes + float maxDistFromHeartPlane1; + idPlane heartPlane2; + float maxDistFromHeartPlane2; + idPluecker polygonEdgePlueckerCache[CM_MAX_POLYGON_EDGES]; + idPluecker polygonVertexPlueckerCache[CM_MAX_POLYGON_EDGES]; + idVec3 polygonRotationOriginCache[CM_MAX_POLYGON_EDGES]; +} cm_traceWork_t; + +/* +=============================================================================== + +Collision Map + +=============================================================================== +*/ + +typedef struct cm_procNode_s { + idPlane plane; + int children[2]; // negative numbers are (-1 - areaNumber), 0 = solid +} cm_procNode_t; + +class idCollisionModelManagerLocal : public idCollisionModelManager { +public: + // load collision models from a map file + void LoadMap( const idMapFile *mapFile ); + // frees all the collision models + void FreeMap( void ); + + // get clip handle for model + cmHandle_t LoadModel( const char *modelName, const bool precache ); + // sets up a trace model for collision with other trace models + cmHandle_t SetupTrmModel( const idTraceModel &trm, const idMaterial *material ); + // create trace model from a collision model, returns true if succesfull + bool TrmFromModel( const char *modelName, idTraceModel &trm ); + + // name of the model + const char * GetModelName( cmHandle_t model ) const; + // bounds of the model + bool GetModelBounds( cmHandle_t model, idBounds &bounds ) const; + // all contents flags of brushes and polygons ored together + bool GetModelContents( cmHandle_t model, int &contents ) const; + // get the vertex of a model + bool GetModelVertex( cmHandle_t model, int vertexNum, idVec3 &vertex ) const; + // get the edge of a model + bool GetModelEdge( cmHandle_t model, int edgeNum, idVec3 &start, idVec3 &end ) const; + // get the polygon of a model + bool GetModelPolygon( cmHandle_t model, int polygonNum, idFixedWinding &winding ) const; + + // translates a trm and reports the first collision if any + void Translation( trace_t *results, const idVec3 &start, const idVec3 &end, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ); + // rotates a trm and reports the first collision if any + void Rotation( trace_t *results, const idVec3 &start, const idRotation &rotation, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ); + // returns the contents the trm is stuck in or 0 if the trm is in free space + int Contents( const idVec3 &start, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ); + // stores all contact points of the trm with the model, returns the number of contacts + int Contacts( contactInfo_t *contacts, const int maxContacts, const idVec3 &start, const idVec6 &dir, const float depth, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ); + // test collision detection + void DebugOutput( const idVec3 &origin ); + // draw a model + void DrawModel( cmHandle_t model, const idVec3 &origin, const idMat3 &axis, + const idVec3 &viewOrigin, const float radius ); + // print model information, use -1 handle for accumulated model info + void ModelInfo( cmHandle_t model ); + // list all loaded models + void ListModels( void ); + // write a collision model file for the map entity + bool WriteCollisionModelForMapEntity( const idMapEntity *mapEnt, const char *filename, const bool testTraceModel = true ); + +private: // CollisionMap_translate.cpp + int TranslateEdgeThroughEdge( idVec3 &cross, idPluecker &l1, idPluecker &l2, float *fraction ); + void TranslateTrmEdgeThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmEdge_t *trmEdge ); + void TranslateTrmVertexThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmVertex_t *v, int bitNum ); + void TranslatePointThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmVertex_t *v ); + void TranslateVertexThroughTrmPolygon( cm_traceWork_t *tw, cm_trmPolygon_t *trmpoly, cm_polygon_t *poly, cm_vertex_t *v, idVec3 &endp, idPluecker &pl ); + bool TranslateTrmThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *p ); + void SetupTranslationHeartPlanes( cm_traceWork_t *tw ); + void SetupTrm( cm_traceWork_t *tw, const idTraceModel *trm ); + +private: // CollisionMap_rotate.cpp + int CollisionBetweenEdgeBounds( cm_traceWork_t *tw, const idVec3 &va, const idVec3 &vb, + const idVec3 &vc, const idVec3 &vd, float tanHalfAngle, + idVec3 &collisionPoint, idVec3 &collisionNormal ); + int RotateEdgeThroughEdge( cm_traceWork_t *tw, const idPluecker &pl1, + const idVec3 &vc, const idVec3 &vd, + const float minTan, float &tanHalfAngle ); + int EdgeFurthestFromEdge( cm_traceWork_t *tw, const idPluecker &pl1, + const idVec3 &vc, const idVec3 &vd, + float &tanHalfAngle, float &dir ); + void RotateTrmEdgeThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmEdge_t *trmEdge ); + int RotatePointThroughPlane( const cm_traceWork_t *tw, const idVec3 &point, const idPlane &plane, + const float angle, const float minTan, float &tanHalfAngle ); + int PointFurthestFromPlane( const cm_traceWork_t *tw, const idVec3 &point, const idPlane &plane, + const float angle, float &tanHalfAngle, float &dir ); + int RotatePointThroughEpsilonPlane( const cm_traceWork_t *tw, const idVec3 &point, const idVec3 &endPoint, + const idPlane &plane, const float angle, const idVec3 &origin, + float &tanHalfAngle, idVec3 &collisionPoint, idVec3 &endDir ); + void RotateTrmVertexThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmVertex_t *v, int vertexNum); + void RotateVertexThroughTrmPolygon( cm_traceWork_t *tw, cm_trmPolygon_t *trmpoly, cm_polygon_t *poly, + cm_vertex_t *v, idVec3 &rotationOrigin ); + bool RotateTrmThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *p ); + void BoundsForRotation( const idVec3 &origin, const idVec3 &axis, const idVec3 &start, const idVec3 &end, idBounds &bounds ); + void Rotation180( trace_t *results, const idVec3 &rorg, const idVec3 &axis, + const float startAngle, const float endAngle, const idVec3 &start, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &origin, const idMat3 &modelAxis ); + +private: // CollisionMap_contents.cpp + bool TestTrmVertsInBrush( cm_traceWork_t *tw, cm_brush_t *b ); + bool TestTrmInPolygon( cm_traceWork_t *tw, cm_polygon_t *p ); + cm_node_t * PointNode( const idVec3 &p, cm_model_t *model ); + int PointContents( const idVec3 p, cmHandle_t model ); + int TransformedPointContents( const idVec3 &p, cmHandle_t model, const idVec3 &origin, const idMat3 &modelAxis ); + int ContentsTrm( trace_t *results, const idVec3 &start, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ); + +private: // CollisionMap_trace.cpp + void TraceTrmThroughNode( cm_traceWork_t *tw, cm_node_t *node ); + void TraceThroughAxialBSPTree_r( cm_traceWork_t *tw, cm_node_t *node, float p1f, float p2f, idVec3 &p1, idVec3 &p2); + void TraceThroughModel( cm_traceWork_t *tw ); + void RecurseProcBSP_r( trace_t *results, int parentNodeNum, int nodeNum, float p1f, float p2f, const idVec3 &p1, const idVec3 &p2 ); + +private: // CollisionMap_load.cpp + void Clear( void ); + void FreeTrmModelStructure( void ); + // model deallocation + void RemovePolygonReferences_r( cm_node_t *node, cm_polygon_t *p ); + void RemoveBrushReferences_r( cm_node_t *node, cm_brush_t *b ); + void FreeNode( cm_node_t *node ); + void FreePolygonReference( cm_polygonRef_t *pref ); + void FreeBrushReference( cm_brushRef_t *bref ); + void FreePolygon( cm_model_t *model, cm_polygon_t *poly ); + void FreeBrush( cm_model_t *model, cm_brush_t *brush ); + void FreeTree_r( cm_model_t *model, cm_node_t *headNode, cm_node_t *node ); + void FreeModel( cm_model_t *model ); + // merging polygons + void ReplacePolygons( cm_model_t *model, cm_node_t *node, cm_polygon_t *p1, cm_polygon_t *p2, cm_polygon_t *newp ); + cm_polygon_t * TryMergePolygons( cm_model_t *model, cm_polygon_t *p1, cm_polygon_t *p2 ); + bool MergePolygonWithTreePolygons( cm_model_t *model, cm_node_t *node, cm_polygon_t *polygon ); + void MergeTreePolygons( cm_model_t *model, cm_node_t *node ); + // finding internal edges + bool PointInsidePolygon( cm_model_t *model, cm_polygon_t *p, idVec3 &v ); + void FindInternalEdgesOnPolygon( cm_model_t *model, cm_polygon_t *p1, cm_polygon_t *p2 ); + void FindInternalPolygonEdges( cm_model_t *model, cm_node_t *node, cm_polygon_t *polygon ); + void FindInternalEdges( cm_model_t *model, cm_node_t *node ); + void FindContainedEdges( cm_model_t *model, cm_polygon_t *p ); + // loading of proc BSP tree + void ParseProcNodes( idLexer *src ); + void LoadProcBSP( const char *name ); + // removal of contained polygons + int R_ChoppedAwayByProcBSP( int nodeNum, idFixedWinding *w, const idVec3 &normal, const idVec3 &origin, const float radius ); + int ChoppedAwayByProcBSP( const idFixedWinding &w, const idPlane &plane, int contents ); + void ChopWindingListWithBrush( cm_windingList_t *list, cm_brush_t *b ); + void R_ChopWindingListWithTreeBrushes( cm_windingList_t *list, cm_node_t *node ); + idFixedWinding *WindingOutsideBrushes( idFixedWinding *w, const idPlane &plane, int contents, int patch, cm_node_t *headNode ); + // creation of axial BSP tree + cm_model_t * AllocModel( void ); + cm_node_t * AllocNode( cm_model_t *model, int blockSize ); + cm_polygonRef_t*AllocPolygonReference( cm_model_t *model, int blockSize ); + cm_brushRef_t * AllocBrushReference( cm_model_t *model, int blockSize ); + cm_polygon_t * AllocPolygon( cm_model_t *model, int numEdges ); + cm_brush_t * AllocBrush( cm_model_t *model, int numPlanes ); + void AddPolygonToNode( cm_model_t *model, cm_node_t *node, cm_polygon_t *p ); + void AddBrushToNode( cm_model_t *model, cm_node_t *node, cm_brush_t *b ); + void SetupTrmModelStructure( void ); + void R_FilterPolygonIntoTree( cm_model_t *model, cm_node_t *node, cm_polygonRef_t *pref, cm_polygon_t *p ); + void R_FilterBrushIntoTree( cm_model_t *model, cm_node_t *node, cm_brushRef_t *pref, cm_brush_t *b ); + cm_node_t * R_CreateAxialBSPTree( cm_model_t *model, cm_node_t *node, const idBounds &bounds ); + cm_node_t * CreateAxialBSPTree( cm_model_t *model, cm_node_t *node ); + // creation of raw polygons + void SetupHash(void); + void ShutdownHash(void); + void ClearHash( idBounds &bounds ); + int HashVec(const idVec3 &vec); + int GetVertex( cm_model_t *model, const idVec3 &v, int *vertexNum ); + int GetEdge( cm_model_t *model, const idVec3 &v1, const idVec3 &v2, int *edgeNum, int v1num ); + void CreatePolygon( cm_model_t *model, idFixedWinding *w, const idPlane &plane, const idMaterial *material, int primitiveNum ); + void PolygonFromWinding( cm_model_t *model, idFixedWinding *w, const idPlane &plane, const idMaterial *material, int primitiveNum ); + void CalculateEdgeNormals( cm_model_t *model, cm_node_t *node ); + void CreatePatchPolygons( cm_model_t *model, idSurface_Patch &mesh, const idMaterial *material, int primitiveNum ); + void ConvertPatch( cm_model_t *model, const idMapPatch *patch, int primitiveNum ); + void ConvertBrushSides( cm_model_t *model, const idMapBrush *mapBrush, int primitiveNum ); + void ConvertBrush( cm_model_t *model, const idMapBrush *mapBrush, int primitiveNum ); + void PrintModelInfo( const cm_model_t *model ); + void AccumulateModelInfo( cm_model_t *model ); + void RemapEdges( cm_node_t *node, int *edgeRemap ); + void OptimizeArrays( cm_model_t *model ); + void FinishModel( cm_model_t *model ); + void BuildModels( const idMapFile *mapFile ); + cmHandle_t FindModel( const char *name ); + cm_model_t * CollisionModelForMapEntity( const idMapEntity *mapEnt ); // brush/patch model from .map + cm_model_t * LoadRenderModel( const char *fileName ); // ASE/LWO models + bool TrmFromModel_r( idTraceModel &trm, cm_node_t *node ); + bool TrmFromModel( const cm_model_t *model, idTraceModel &trm ); + +private: // CollisionMap_files.cpp + // writing + void WriteNodes( idFile *fp, cm_node_t *node ); + int CountPolygonMemory( cm_node_t *node ) const; + void WritePolygons( idFile *fp, cm_node_t *node ); + int CountBrushMemory( cm_node_t *node ) const; + void WriteBrushes( idFile *fp, cm_node_t *node ); + void WriteCollisionModel( idFile *fp, cm_model_t *model ); + void WriteCollisionModelsToFile( const char *filename, int firstModel, int lastModel, unsigned int mapFileCRC ); + // loading + cm_node_t * ParseNodes( idLexer *src, cm_model_t *model, cm_node_t *parent ); + void ParseVertices( idLexer *src, cm_model_t *model ); + void ParseEdges( idLexer *src, cm_model_t *model ); + void ParsePolygons( idLexer *src, cm_model_t *model ); + void ParseBrushes( idLexer *src, cm_model_t *model ); + bool ParseCollisionModel( idLexer *src ); + bool LoadCollisionModelFile( const char *name, unsigned int mapFileCRC ); + +private: // CollisionMap_debug + int ContentsFromString( const char *string ) const; + const char * StringFromContents( const int contents ) const; + void DrawEdge( cm_model_t *model, int edgeNum, const idVec3 &origin, const idMat3 &axis ); + void DrawPolygon( cm_model_t *model, cm_polygon_t *p, const idVec3 &origin, const idMat3 &axis, + const idVec3 &viewOrigin ); + void DrawNodePolygons( cm_model_t *model, cm_node_t *node, const idVec3 &origin, const idMat3 &axis, + const idVec3 &viewOrigin, const float radius ); + +private: // collision map data + idStr mapName; + ID_TIME_T mapFileTime; + int loaded; + // for multi-check avoidance + int checkCount; + // models + int maxModels; + int numModels; + cm_model_t ** models; + // polygons and brush for trm model + cm_polygonRef_t*trmPolygons[MAX_TRACEMODEL_POLYS]; + cm_brushRef_t * trmBrushes[1]; + const idMaterial *trmMaterial; + // for data pruning + int numProcNodes; + cm_procNode_t * procNodes; + // for retrieving contact points + bool getContacts; + contactInfo_t * contacts; + int maxContacts; + int numContacts; +}; + +// for debugging +extern idCVar cm_debugCollision; diff --git a/neo/cm/CollisionModel_rotate.cpp b/neo/cm/CollisionModel_rotate.cpp new file mode 100644 index 0000000..a8111fc --- /dev/null +++ b/neo/cm/CollisionModel_rotate.cpp @@ -0,0 +1,1694 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ + +/* +=============================================================================== + + Trace model vs. polygonal model collision detection. + +=============================================================================== +*/ + +#include "../idlib/precompiled.h" +#pragma hdrstop + +#include "CollisionModel_local.h" + +/* +=============================================================================== + +Collision detection for rotational motion + +=============================================================================== +*/ + +// epsilon for round-off errors in epsilon calculations +#define CM_PL_RANGE_EPSILON 1e-4f +// if the collision point is this close to the rotation axis it is not considered a collision +#define ROTATION_AXIS_EPSILON (CM_CLIP_EPSILON*0.25f) + + +/* +================ +CM_RotatePoint + + rotates a point about an arbitrary axis using the tangent of half the rotation angle +================ +*/ +void CM_RotatePoint( idVec3 &point, const idVec3 &origin, const idVec3 &axis, const float tanHalfAngle ) { + double d, t, s, c; + idVec3 proj, v1, v2; + + point -= origin; + proj = axis * ( point * axis ); + v1 = point - proj; + v2 = axis.Cross( v1 ); + + // r = tan( a / 2 ); + // sin(a) = 2*r/(1+r*r); + // cos(a) = (1-r*r)/(1+r*r); + t = tanHalfAngle * tanHalfAngle; + d = 1.0f / ( 1.0f + t ); + s = 2.0f * tanHalfAngle * d; + c = ( 1.0f - t ) * d; + + point = v1 * c - v2 * s + proj + origin; +} + +/* +================ +CM_RotateEdge + + rotates an edge about an arbitrary axis using the tangent of half the rotation angle +================ +*/ +void CM_RotateEdge( idVec3 &start, idVec3 &end, const idVec3 &origin, const idVec3 &axis, const float tanHalfAngle ) { + double d, t, s, c; + idVec3 proj, v1, v2; + + // r = tan( a / 2 ); + // sin(a) = 2*r/(1+r*r); + // cos(a) = (1-r*r)/(1+r*r); + t = tanHalfAngle * tanHalfAngle; + d = 1.0f / ( 1.0f + t ); + s = 2.0f * tanHalfAngle * d; + c = ( 1.0f - t ) * d; + + start -= origin; + proj = axis * ( start * axis ); + v1 = start - proj; + v2 = axis.Cross( v1 ); + start = v1 * c - v2 * s + proj + origin; + + end -= origin; + proj = axis * ( end * axis ); + v1 = end - proj; + v2 = axis.Cross( v1 ); + end = v1 * c - v2 * s + proj + origin; +} + +/* +================ +idCollisionModelManagerLocal::CollisionBetweenEdgeBounds + + verifies if the collision of two edges occurs between the edge bounds + also calculates the collision point and collision plane normal if the collision occurs between the bounds +================ +*/ +int idCollisionModelManagerLocal::CollisionBetweenEdgeBounds( cm_traceWork_t *tw, const idVec3 &va, const idVec3 &vb, + const idVec3 &vc, const idVec3 &vd, float tanHalfAngle, + idVec3 &collisionPoint, idVec3 &collisionNormal ) { + float d1, d2, d; + idVec3 at, bt, dir, dir1, dir2; + idPluecker pl1, pl2; + + at = va; + bt = vb; + if ( tanHalfAngle != 0.0f ) { + CM_RotateEdge( at, bt, tw->origin, tw->axis, tanHalfAngle ); + } + + dir1 = (at - tw->origin).Cross( tw->axis ); + dir2 = (bt - tw->origin).Cross( tw->axis ); + if ( dir1 * dir1 > dir2 * dir2 ) { + dir = dir1; + } + else { + dir = dir2; + } + if ( tw->angle < 0.0f ) { + dir = -dir; + } + + pl1.FromLine( at, bt ); + pl2.FromRay( vc, dir ); + d1 = pl1.PermutedInnerProduct( pl2 ); + pl2.FromRay( vd, dir ); + d2 = pl1.PermutedInnerProduct( pl2 ); + if ( ( d1 > 0.0f && d2 > 0.0f ) || ( d1 < 0.0f && d2 < 0.0f ) ) { + return false; + } + + pl1.FromLine( vc, vd ); + pl2.FromRay( at, dir ); + d1 = pl1.PermutedInnerProduct( pl2 ); + pl2.FromRay( bt, dir ); + d2 = pl1.PermutedInnerProduct( pl2 ); + if ( ( d1 > 0.0f && d2 > 0.0f ) || ( d1 < 0.0f && d2 < 0.0f ) ) { + return false; + } + + // collision point on the edge at-bt + dir1 = (vd - vc).Cross( dir ); + d = dir1 * vc; + d1 = dir1 * at - d; + d2 = dir1 * bt - d; + if ( d1 == d2 ) { + return false; + } + collisionPoint = at + ( d1 / (d1 - d2) ) * ( bt - at ); + + // normal is cross product of the rotated edge va-vb and the edge vc-vd + collisionNormal.Cross( bt-at, vd-vc ); + + return true; +} + +/* +================ +idCollisionModelManagerLocal::RotateEdgeThroughEdge + + calculates the tangent of half the rotation angle at which the edges collide +================ +*/ +int idCollisionModelManagerLocal::RotateEdgeThroughEdge( cm_traceWork_t *tw, const idPluecker &pl1, + const idVec3 &vc, const idVec3 &vd, + const float minTan, float &tanHalfAngle ) { + double v0, v1, v2, a, b, c, d, sqrtd, q, frac1, frac2; + idVec3 ct, dt; + idPluecker pl2; + + /* + + a = start of line being rotated + b = end of line being rotated + pl1 = pluecker coordinate for line (a - b) + pl2 = pluecker coordinate for edge we might collide with (c - d) + t = rotation angle around the z-axis + solve pluecker inner product for t of rotating line a-b and line l2 + + // start point of rotated line during rotation + an[0] = a[0] * cos(t) + a[1] * sin(t) + an[1] = a[0] * -sin(t) + a[1] * cos(t) + an[2] = a[2]; + // end point of rotated line during rotation + bn[0] = b[0] * cos(t) + b[1] * sin(t) + bn[1] = b[0] * -sin(t) + b[1] * cos(t) + bn[2] = b[2]; + + pl1[0] = a[0] * b[1] - b[0] * a[1]; + pl1[1] = a[0] * b[2] - b[0] * a[2]; + pl1[2] = a[0] - b[0]; + pl1[3] = a[1] * b[2] - b[1] * a[2]; + pl1[4] = a[2] - b[2]; + pl1[5] = b[1] - a[1]; + + v[0] = (a[0] * cos(t) + a[1] * sin(t)) * (b[0] * -sin(t) + b[1] * cos(t)) - (b[0] * cos(t) + b[1] * sin(t)) * (a[0] * -sin(t) + a[1] * cos(t)); + v[1] = (a[0] * cos(t) + a[1] * sin(t)) * b[2] - (b[0] * cos(t) + b[1] * sin(t)) * a[2]; + v[2] = (a[0] * cos(t) + a[1] * sin(t)) - (b[0] * cos(t) + b[1] * sin(t)); + v[3] = (a[0] * -sin(t) + a[1] * cos(t)) * b[2] - (b[0] * -sin(t) + b[1] * cos(t)) * a[2]; + v[4] = a[2] - b[2]; + v[5] = (b[0] * -sin(t) + b[1] * cos(t)) - (a[0] * -sin(t) + a[1] * cos(t)); + + pl2[0] * v[4] + pl2[1] * v[5] + pl2[2] * v[3] + pl2[4] * v[0] + pl2[5] * v[1] + pl2[3] * v[2] = 0; + + v[0] = (a[0] * cos(t) + a[1] * sin(t)) * (b[0] * -sin(t) + b[1] * cos(t)) - (b[0] * cos(t) + b[1] * sin(t)) * (a[0] * -sin(t) + a[1] * cos(t)); + v[0] = (a[1] * b[1] - a[0] * b[0]) * cos(t) * sin(t) + (a[0] * b[1] + a[1] * b[0] * cos(t)^2) - (a[1] * b[0]) - ((b[1] * a[1] - b[0] * a[0]) * cos(t) * sin(t) + (b[0] * a[1] + b[1] * a[0]) * cos(t)^2 - (b[1] * a[0])) + v[0] = - (a[1] * b[0]) - ( - (b[1] * a[0])) + v[0] = (b[1] * a[0]) - (a[1] * b[0]) + + v[0] = (a[0]*b[1]) - (a[1]*b[0]); + v[1] = (a[0]*b[2] - b[0]*a[2]) * cos(t) + (a[1]*b[2] - b[1]*a[2]) * sin(t); + v[2] = (a[0]-b[0]) * cos(t) + (a[1]-b[1]) * sin(t); + v[3] = (b[0]*a[2] - a[0]*b[2]) * sin(t) + (a[1]*b[2] - b[1]*a[2]) * cos(t); + v[4] = a[2] - b[2]; + v[5] = (a[0]-b[0]) * sin(t) + (b[1]-a[1]) * cos(t); + + v[0] = (a[0]*b[1]) - (a[1]*b[0]); + v[1] = (a[0]*b[2] - b[0]*a[2]) * cos(t) + (a[1]*b[2] - b[1]*a[2]) * sin(t); + v[2] = (a[0]-b[0]) * cos(t) - (b[1]-a[1]) * sin(t); + v[3] = (a[0]*b[2] - b[0]*a[2]) * -sin(t) + (a[1]*b[2] - b[1]*a[2]) * cos(t); + v[4] = a[2] - b[2]; + v[5] = (a[0]-b[0]) * sin(t) + (b[1]-a[1]) * cos(t); + + v[0] = pl1[0]; + v[1] = pl1[1] * cos(t) + pl1[3] * sin(t); + v[2] = pl1[2] * cos(t) - pl1[5] * sin(t); + v[3] = pl1[3] * cos(t) - pl1[1] * sin(t); + v[4] = pl1[4]; + v[5] = pl1[5] * cos(t) + pl1[2] * sin(t); + + pl2[0] * v[4] + pl2[1] * v[5] + pl2[2] * v[3] + pl2[4] * v[0] + pl2[5] * v[1] + pl2[3] * v[2] = 0; + + 0 = pl2[0] * pl1[4] + + pl2[1] * (pl1[5] * cos(t) + pl1[2] * sin(t)) + + pl2[2] * (pl1[3] * cos(t) - pl1[1] * sin(t)) + + pl2[4] * pl1[0] + + pl2[5] * (pl1[1] * cos(t) + pl1[3] * sin(t)) + + pl2[3] * (pl1[2] * cos(t) - pl1[5] * sin(t)); + + v2 * cos(t) + v1 * sin(t) + v0 = 0; + + // rotation about the z-axis + v0 = pl2[0] * pl1[4] + pl2[4] * pl1[0]; + v1 = pl2[1] * pl1[2] - pl2[2] * pl1[1] + pl2[5] * pl1[3] - pl2[3] * pl1[5]; + v2 = pl2[1] * pl1[5] + pl2[2] * pl1[3] + pl2[5] * pl1[1] + pl2[3] * pl1[2]; + + // rotation about the x-axis + //v0 = pl2[3] * pl1[2] + pl2[2] * pl1[3]; + //v1 = -pl2[5] * pl1[0] + pl2[4] * pl1[1] - pl2[1] * pl1[4] + pl2[0] * pl1[5]; + //v2 = pl2[4] * pl1[0] + pl2[5] * pl1[1] + pl2[0] * pl1[4] + pl2[1] * pl1[5]; + + r = tan(t / 2); + sin(t) = 2*r/(1+r*r); + cos(t) = (1-r*r)/(1+r*r); + + v1 * 2 * r / (1 + r*r) + v2 * (1 - r*r) / (1 + r*r) + v0 = 0 + (v1 * 2 * r + v2 * (1 - r*r)) / (1 + r*r) = -v0 + (v1 * 2 * r + v2 - v2 * r*r) / (1 + r*r) = -v0 + v1 * 2 * r + v2 - v2 * r*r = -v0 * (1 + r*r) + v1 * 2 * r + v2 - v2 * r*r = -v0 + -v0 * r*r + (v0 - v2) * r * r + (2 * v1) * r + (v0 + v2) = 0; + + MrE gives Pluecker a banana.. good monkey + + */ + + tanHalfAngle = tw->maxTan; + + // transform rotation axis to z-axis + ct = (vc - tw->origin) * tw->matrix; + dt = (vd - tw->origin) * tw->matrix; + + pl2.FromLine( ct, dt ); + + v0 = pl2[0] * pl1[4] + pl2[4] * pl1[0]; + v1 = pl2[1] * pl1[2] - pl2[2] * pl1[1] + pl2[5] * pl1[3] - pl2[3] * pl1[5]; + v2 = pl2[1] * pl1[5] + pl2[2] * pl1[3] + pl2[5] * pl1[1] + pl2[3] * pl1[2]; + + a = v0 - v2; + b = v1; + c = v0 + v2; + if ( a == 0.0f ) { + if ( b == 0.0f ) { + return false; + } + frac1 = -c / ( 2.0f * b ); + frac2 = 1e10; // = tan( idMath::HALF_PI ) + } + else { + d = b * b - c * a; + if ( d <= 0.0f ) { + return false; + } + sqrtd = sqrt( d ); + if ( b > 0.0f ) { + q = - b + sqrtd; + } + else { + q = - b - sqrtd; + } + frac1 = q / a; + frac2 = c / q; + } + + if ( tw->angle < 0.0f ) { + frac1 = -frac1; + frac2 = -frac2; + } + + // get smallest tangent for which a collision occurs + if ( frac1 >= minTan && frac1 < tanHalfAngle ) { + tanHalfAngle = frac1; + } + if ( frac2 >= minTan && frac2 < tanHalfAngle ) { + tanHalfAngle = frac2; + } + + if ( tw->angle < 0.0f ) { + tanHalfAngle = -tanHalfAngle; + } + + return true; +} + +/* +================ +idCollisionModelManagerLocal::EdgeFurthestFromEdge + + calculates the direction of motion at the initial position, where dir < 0 means the edges move towards each other + if the edges move away from each other the tangent of half the rotation angle at which + the edges are furthest apart is also calculated +================ +*/ +int idCollisionModelManagerLocal::EdgeFurthestFromEdge( cm_traceWork_t *tw, const idPluecker &pl1, + const idVec3 &vc, const idVec3 &vd, + float &tanHalfAngle, float &dir ) { + double v0, v1, v2, a, b, c, d, sqrtd, q, frac1, frac2; + idVec3 ct, dt; + idPluecker pl2; + + /* + + v2 * cos(t) + v1 * sin(t) + v0 = 0; + + // rotation about the z-axis + v0 = pl2[0] * pl1[4] + pl2[4] * pl1[0]; + v1 = pl2[1] * pl1[2] - pl2[2] * pl1[1] + pl2[5] * pl1[3] - pl2[3] * pl1[5]; + v2 = pl2[1] * pl1[5] + pl2[2] * pl1[3] + pl2[5] * pl1[1] + pl2[3] * pl1[2]; + + derivative: + v1 * cos(t) - v2 * sin(t) = 0; + + r = tan(t / 2); + sin(t) = 2*r/(1+r*r); + cos(t) = (1-r*r)/(1+r*r); + + -v2 * 2 * r / (1 + r*r) + v1 * (1 - r*r)/(1+r*r); + -v2 * 2 * r + v1 * (1 - r*r) / (1 + r*r) = 0; + -v2 * 2 * r + v1 * (1 - r*r) = 0; + (-v1) * r * r + (-2 * v2) * r + (v1) = 0; + + */ + + tanHalfAngle = 0.0f; + + // transform rotation axis to z-axis + ct = (vc - tw->origin) * tw->matrix; + dt = (vd - tw->origin) * tw->matrix; + + pl2.FromLine( ct, dt ); + + v0 = pl2[0] * pl1[4] + pl2[4] * pl1[0]; + v1 = pl2[1] * pl1[2] - pl2[2] * pl1[1] + pl2[5] * pl1[3] - pl2[3] * pl1[5]; + v2 = pl2[1] * pl1[5] + pl2[2] * pl1[3] + pl2[5] * pl1[1] + pl2[3] * pl1[2]; + + // get the direction of motion at the initial position + c = v0 + v2; + if ( tw->angle > 0.0f ) { + if ( c > 0.0f ) { + dir = v1; + } + else { + dir = -v1; + } + } + else { + if ( c > 0.0f ) { + dir = -v1; + } + else { + dir = v1; + } + } + // negative direction means the edges move towards each other at the initial position + if ( dir <= 0.0f ) { + return true; + } + + a = -v1; + b = -v2; + c = v1; + if ( a == 0.0f ) { + if ( b == 0.0f ) { + return false; + } + frac1 = -c / ( 2.0f * b ); + frac2 = 1e10; // = tan( idMath::HALF_PI ) + } + else { + d = b * b - c * a; + if ( d <= 0.0f ) { + return false; + } + sqrtd = sqrt( d ); + if ( b > 0.0f ) { + q = - b + sqrtd; + } + else { + q = - b - sqrtd; + } + frac1 = q / a; + frac2 = c / q; + } + + if ( tw->angle < 0.0f ) { + frac1 = -frac1; + frac2 = -frac2; + } + + if ( frac1 < 0.0f && frac2 < 0.0f ) { + return false; + } + + if ( frac1 > frac2 ) { + tanHalfAngle = frac1; + } + else { + tanHalfAngle = frac2; + } + + if ( tw->angle < 0.0f ) { + tanHalfAngle = -tanHalfAngle; + } + + return true; +} + +/* +================ +idCollisionModelManagerLocal::RotateTrmEdgeThroughPolygon +================ +*/ +void idCollisionModelManagerLocal::RotateTrmEdgeThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmEdge_t *trmEdge ) { + int i, j, edgeNum; + float f1, f2, startTan, dir, tanHalfAngle; + cm_edge_t *edge; + cm_vertex_t *v1, *v2; + idVec3 collisionPoint, collisionNormal, origin, epsDir; + idPluecker epsPl; + idBounds bounds; + + // if the trm is convex and the rotation axis intersects the trm + if ( tw->isConvex && tw->axisIntersectsTrm ) { + // if both points are behind the polygon the edge cannot collide within a 180 degrees rotation + if ( tw->vertices[trmEdge->vertexNum[0]].polygonSide & tw->vertices[trmEdge->vertexNum[1]].polygonSide ) { + return; + } + } + + // if the trace model edge rotation bounds do not intersect the polygon bounds + if ( !trmEdge->rotationBounds.IntersectsBounds( poly->bounds ) ) { + return; + } + + // edge rotation bounds should cross polygon plane + if ( trmEdge->rotationBounds.PlaneSide( poly->plane ) != SIDE_CROSS ) { + return; + } + + // check edges for a collision + for ( i = 0; i < poly->numEdges; i++ ) { + edgeNum = poly->edges[i]; + edge = tw->model->edges + abs(edgeNum); + + // if this edge is already checked + if ( edge->checkcount == idCollisionModelManagerLocal::checkCount ) { + continue; + } + + // can never collide with internal edges + if ( edge->internal ) { + continue; + } + + v1 = tw->model->vertices + edge->vertexNum[INTSIGNBITSET(edgeNum)]; + v2 = tw->model->vertices + edge->vertexNum[INTSIGNBITNOTSET(edgeNum)]; + + // edge bounds + for ( j = 0; j < 3; j++ ) { + if ( v1->p[j] > v2->p[j] ) { + bounds[0][j] = v2->p[j]; + bounds[1][j] = v1->p[j]; + } + else { + bounds[0][j] = v1->p[j]; + bounds[1][j] = v2->p[j]; + } + } + + // if the trace model edge rotation bounds do not intersect the polygon edge bounds + if ( !trmEdge->rotationBounds.IntersectsBounds( bounds ) ) { + continue; + } + + f1 = trmEdge->pl.PermutedInnerProduct( tw->polygonEdgePlueckerCache[i] ); + + // pluecker coordinate for epsilon expanded edge + epsDir = edge->normal * (CM_CLIP_EPSILON+CM_PL_RANGE_EPSILON); + epsPl.FromLine( tw->model->vertices[edge->vertexNum[0]].p + epsDir, + tw->model->vertices[edge->vertexNum[1]].p + epsDir ); + + f2 = trmEdge->pl.PermutedInnerProduct( epsPl ); + + // if the rotating edge is inbetween the polygon edge and the epsilon expanded edge + if ( ( f1 < 0.0f && f2 > 0.0f ) || ( f1 > 0.0f && f2 < 0.0f ) ) { + + if ( !EdgeFurthestFromEdge( tw, trmEdge->plzaxis, v1->p, v2->p, startTan, dir ) ) { + continue; + } + + if ( dir <= 0.0f ) { + // moving towards the polygon edge so stop immediately + tanHalfAngle = 0.0f; + } + else if ( idMath::Fabs( startTan ) >= tw->maxTan ) { + // never going to get beyond the start tangent during the current rotation + continue; + } + else { + // collide with the epsilon expanded edge + if ( !RotateEdgeThroughEdge(tw, trmEdge->plzaxis, v1->p + epsDir, v2->p + epsDir, idMath::Fabs( startTan ), tanHalfAngle ) ) { + tanHalfAngle = startTan; + } + } + } + else { + // collide with the epsilon expanded edge + epsDir = edge->normal * CM_CLIP_EPSILON; + if ( !RotateEdgeThroughEdge(tw, trmEdge->plzaxis, v1->p + epsDir, v2->p + epsDir, 0.0f, tanHalfAngle ) ) { + continue; + } + } + + if ( idMath::Fabs( tanHalfAngle ) >= tw->maxTan ) { + continue; + } + + // check if the collision is between the edge bounds + if ( !CollisionBetweenEdgeBounds( tw, trmEdge->start, trmEdge->end, v1->p, v2->p, + tanHalfAngle, collisionPoint, collisionNormal ) ) { + continue; + } + + // allow rotation if the rotation axis goes through the collisionPoint + origin = tw->origin + tw->axis * ( tw->axis * ( collisionPoint - tw->origin ) ); + if ( ( collisionPoint - origin ).LengthSqr() < ROTATION_AXIS_EPSILON * ROTATION_AXIS_EPSILON ) { + continue; + } + + // fill in trace structure + tw->maxTan = idMath::Fabs( tanHalfAngle ); + tw->trace.c.normal = collisionNormal; + tw->trace.c.normal.Normalize(); + tw->trace.c.dist = tw->trace.c.normal * v1->p; + // make sure the collision plane faces the trace model + if ( (tw->trace.c.normal * trmEdge->start) - tw->trace.c.dist < 0 ) { + tw->trace.c.normal = -tw->trace.c.normal; + tw->trace.c.dist = -tw->trace.c.dist; + } + tw->trace.c.contents = poly->contents; + tw->trace.c.material = poly->material; + tw->trace.c.type = CONTACT_EDGE; + tw->trace.c.modelFeature = edgeNum; + tw->trace.c.trmFeature = trmEdge - tw->edges; + tw->trace.c.point = collisionPoint; + // if no collision can be closer + if ( tw->maxTan == 0.0f ) { + break; + } + } +} + +/* +================ +idCollisionModelManagerLocal::RotatePointThroughPlane + + calculates the tangent of half the rotation angle at which the point collides with the plane +================ +*/ +int idCollisionModelManagerLocal::RotatePointThroughPlane( const cm_traceWork_t *tw, const idVec3 &point, const idPlane &plane, + const float angle, const float minTan, float &tanHalfAngle ) { + double v0, v1, v2, a, b, c, d, sqrtd, q, frac1, frac2; + idVec3 p, normal; + + /* + + p[0] = point[0] * cos(t) + point[1] * sin(t) + p[1] = point[0] * -sin(t) + point[1] * cos(t) + p[2] = point[2]; + + normal[0] * (p[0] * cos(t) + p[1] * sin(t)) + + normal[1] * (p[0] * -sin(t) + p[1] * cos(t)) + + normal[2] * p[2] + dist = 0 + + normal[0] * p[0] * cos(t) + normal[0] * p[1] * sin(t) + + -normal[1] * p[0] * sin(t) + normal[1] * p[1] * cos(t) + + normal[2] * p[2] + dist = 0 + + v2 * cos(t) + v1 * sin(t) + v0 + + // rotation about the z-axis + v0 = normal[2] * p[2] + dist + v1 = normal[0] * p[1] - normal[1] * p[0] + v2 = normal[0] * p[0] + normal[1] * p[1] + + r = tan(t / 2); + sin(t) = 2*r/(1+r*r); + cos(t) = (1-r*r)/(1+r*r); + + v1 * 2 * r / (1 + r*r) + v2 * (1 - r*r) / (1 + r*r) + v0 = 0 + (v1 * 2 * r + v2 * (1 - r*r)) / (1 + r*r) = -v0 + (v1 * 2 * r + v2 - v2 * r*r) / (1 + r*r) = -v0 + v1 * 2 * r + v2 - v2 * r*r = -v0 * (1 + r*r) + v1 * 2 * r + v2 - v2 * r*r = -v0 + -v0 * r*r + (v0 - v2) * r * r + (2 * v1) * r + (v0 + v2) = 0; + + */ + + tanHalfAngle = tw->maxTan; + + // transform rotation axis to z-axis + p = (point - tw->origin) * tw->matrix; + d = plane[3] + plane.Normal() * tw->origin; + normal = plane.Normal() * tw->matrix; + + v0 = normal[2] * p[2] + d; + v1 = normal[0] * p[1] - normal[1] * p[0]; + v2 = normal[0] * p[0] + normal[1] * p[1]; + + a = v0 - v2; + b = v1; + c = v0 + v2; + if ( a == 0.0f ) { + if ( b == 0.0f ) { + return false; + } + frac1 = -c / ( 2.0f * b ); + frac2 = 1e10; // = tan( idMath::HALF_PI ) + } + else { + d = b * b - c * a; + if ( d <= 0.0f ) { + return false; + } + sqrtd = sqrt( d ); + if ( b > 0.0f ) { + q = - b + sqrtd; + } + else { + q = - b - sqrtd; + } + frac1 = q / a; + frac2 = c / q; + } + + if ( angle < 0.0f ) { + frac1 = -frac1; + frac2 = -frac2; + } + + // get smallest tangent for which a collision occurs + if ( frac1 >= minTan && frac1 < tanHalfAngle ) { + tanHalfAngle = frac1; + } + if ( frac2 >= minTan && frac2 < tanHalfAngle ) { + tanHalfAngle = frac2; + } + + if ( angle < 0.0f ) { + tanHalfAngle = -tanHalfAngle; + } + + return true; +} + +/* +================ +idCollisionModelManagerLocal::PointFurthestFromPlane + + calculates the direction of motion at the initial position, where dir < 0 means the point moves towards the plane + if the point moves away from the plane the tangent of half the rotation angle at which + the point is furthest away from the plane is also calculated +================ +*/ +int idCollisionModelManagerLocal::PointFurthestFromPlane( const cm_traceWork_t *tw, const idVec3 &point, const idPlane &plane, + const float angle, float &tanHalfAngle, float &dir ) { + + double v1, v2, a, b, c, d, sqrtd, q, frac1, frac2; + idVec3 p, normal; + + /* + + v2 * cos(t) + v1 * sin(t) + v0 = 0; + + // rotation about the z-axis + v0 = normal[2] * p[2] + dist + v1 = normal[0] * p[1] - normal[1] * p[0] + v2 = normal[0] * p[0] + normal[1] * p[1] + + derivative: + v1 * cos(t) - v2 * sin(t) = 0; + + r = tan(t / 2); + sin(t) = 2*r/(1+r*r); + cos(t) = (1-r*r)/(1+r*r); + + -v2 * 2 * r / (1 + r*r) + v1 * (1 - r*r)/(1+r*r); + -v2 * 2 * r + v1 * (1 - r*r) / (1 + r*r) = 0; + -v2 * 2 * r + v1 * (1 - r*r) = 0; + (-v1) * r * r + (-2 * v2) * r + (v1) = 0; + + */ + + tanHalfAngle = 0.0f; + + // transform rotation axis to z-axis + p = (point - tw->origin) * tw->matrix; + normal = plane.Normal() * tw->matrix; + + v1 = normal[0] * p[1] - normal[1] * p[0]; + v2 = normal[0] * p[0] + normal[1] * p[1]; + + // the point will always start at the front of the plane, therefore v0 + v2 > 0 is always true + if ( angle < 0.0f ) { + dir = -v1; + } + else { + dir = v1; + } + // negative direction means the point moves towards the plane at the initial position + if ( dir <= 0.0f ) { + return true; + } + + a = -v1; + b = -v2; + c = v1; + if ( a == 0.0f ) { + if ( b == 0.0f ) { + return false; + } + frac1 = -c / ( 2.0f * b ); + frac2 = 1e10; // = tan( idMath::HALF_PI ) + } + else { + d = b * b - c * a; + if ( d <= 0.0f ) { + return false; + } + sqrtd = sqrt( d ); + if ( b > 0.0f ) { + q = - b + sqrtd; + } + else { + q = - b - sqrtd; + } + frac1 = q / a; + frac2 = c / q; + } + + if ( angle < 0.0f ) { + frac1 = -frac1; + frac2 = -frac2; + } + + if ( frac1 < 0.0f && frac2 < 0.0f ) { + return false; + } + + if ( frac1 > frac2 ) { + tanHalfAngle = frac1; + } + else { + tanHalfAngle = frac2; + } + + if ( angle < 0.0f ) { + tanHalfAngle = -tanHalfAngle; + } + + return true; +} + +/* +================ +idCollisionModelManagerLocal::RotatePointThroughEpsilonPlane +================ +*/ +int idCollisionModelManagerLocal::RotatePointThroughEpsilonPlane( const cm_traceWork_t *tw, const idVec3 &point, const idVec3 &endPoint, + const idPlane &plane, const float angle, const idVec3 &origin, + float &tanHalfAngle, idVec3 &collisionPoint, idVec3 &endDir ) { + float d, dir, startTan; + idVec3 vec, startDir; + idPlane epsPlane; + + // epsilon expanded plane + epsPlane = plane; + epsPlane.SetDist( epsPlane.Dist() + CM_CLIP_EPSILON ); + + // if the rotation sphere at the rotation origin is too far away from the polygon plane + d = epsPlane.Distance( origin ); + vec = point - origin; + if ( d * d > vec * vec ) { + return false; + } + + // calculate direction of motion at vertex start position + startDir = ( point - origin ).Cross( tw->axis ); + if ( angle < 0.0f ) { + startDir = -startDir; + } + // if moving away from plane at start position + if ( startDir * epsPlane.Normal() >= 0.0f ) { + // if end position is outside epsilon range + d = epsPlane.Distance( endPoint ); + if ( d >= 0.0f ) { + return false; // no collision + } + // calculate direction of motion at vertex end position + endDir = ( endPoint - origin ).Cross( tw->axis ); + if ( angle < 0.0f ) { + endDir = -endDir; + } + // if also moving away from plane at end position + if ( endDir * epsPlane.Normal() > 0.0f ) { + return false; // no collision + } + } + + // if the start position is in the epsilon range + d = epsPlane.Distance( point ); + if ( d <= CM_PL_RANGE_EPSILON ) { + + // calculate tangent of half the rotation for which the vertex is furthest away from the plane + if ( !PointFurthestFromPlane( tw, point, plane, angle, startTan, dir ) ) { + return false; + } + + if ( dir <= 0.0f ) { + // moving towards the polygon plane so stop immediately + tanHalfAngle = 0.0f; + } + else if ( idMath::Fabs( startTan ) >= tw->maxTan ) { + // never going to get beyond the start tangent during the current rotation + return false; + } + else { + // calculate collision with epsilon expanded plane + if ( !RotatePointThroughPlane( tw, point, epsPlane, angle, idMath::Fabs( startTan ), tanHalfAngle ) ) { + tanHalfAngle = startTan; + } + } + } + else { + // calculate collision with epsilon expanded plane + if ( !RotatePointThroughPlane( tw, point, epsPlane, angle, 0.0f, tanHalfAngle ) ) { + return false; + } + } + + // calculate collision point + collisionPoint = point; + if ( tanHalfAngle != 0.0f ) { + CM_RotatePoint( collisionPoint, tw->origin, tw->axis, tanHalfAngle ); + } + // calculate direction of motion at collision point + endDir = ( collisionPoint - origin ).Cross( tw->axis ); + if ( angle < 0.0f ) { + endDir = -endDir; + } + return true; +} + +/* +================ +idCollisionModelManagerLocal::RotateTrmVertexThroughPolygon +================ +*/ +void idCollisionModelManagerLocal::RotateTrmVertexThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmVertex_t *v, int vertexNum ) { + int i; + float tanHalfAngle; + idVec3 endDir, collisionPoint; + idPluecker pl; + + // if the trm vertex is behind the polygon plane it cannot collide with the polygon within a 180 degrees rotation + if ( tw->isConvex && tw->axisIntersectsTrm && v->polygonSide ) { + return; + } + + // if the trace model vertex rotation bounds do not intersect the polygon bounds + if ( !v->rotationBounds.IntersectsBounds( poly->bounds ) ) { + return; + } + + // vertex rotation bounds should cross polygon plane + if ( v->rotationBounds.PlaneSide( poly->plane ) != SIDE_CROSS ) { + return; + } + + // rotate the vertex through the epsilon plane + if ( !RotatePointThroughEpsilonPlane( tw, v->p, v->endp, poly->plane, tw->angle, v->rotationOrigin, + tanHalfAngle, collisionPoint, endDir ) ) { + return; + } + + if ( idMath::Fabs( tanHalfAngle ) < tw->maxTan ) { + // verify if 'collisionPoint' moving along 'endDir' moves between polygon edges + pl.FromRay( collisionPoint, endDir ); + for ( i = 0; i < poly->numEdges; i++ ) { + if ( poly->edges[i] < 0 ) { + if ( pl.PermutedInnerProduct( tw->polygonEdgePlueckerCache[i] ) > 0.0f ) { + return; + } + } + else { + if ( pl.PermutedInnerProduct( tw->polygonEdgePlueckerCache[i] ) < 0.0f ) { + return; + } + } + } + tw->maxTan = idMath::Fabs( tanHalfAngle ); + // collision plane is the polygon plane + tw->trace.c.normal = poly->plane.Normal(); + tw->trace.c.dist = poly->plane.Dist(); + tw->trace.c.contents = poly->contents; + tw->trace.c.material = poly->material; + tw->trace.c.type = CONTACT_TRMVERTEX; + tw->trace.c.modelFeature = *reinterpret_cast(&poly); + tw->trace.c.trmFeature = v - tw->vertices; + tw->trace.c.point = collisionPoint; + } +} + +/* +================ +idCollisionModelManagerLocal::RotateVertexThroughTrmPolygon +================ +*/ +void idCollisionModelManagerLocal::RotateVertexThroughTrmPolygon( cm_traceWork_t *tw, cm_trmPolygon_t *trmpoly, cm_polygon_t *poly, cm_vertex_t *v, idVec3 &rotationOrigin ) { + int i, edgeNum; + float tanHalfAngle; + idVec3 dir, endp, endDir, collisionPoint; + idPluecker pl; + cm_trmEdge_t *edge; + + // if the polygon vertex is behind the trm plane it cannot collide with the trm polygon within a 180 degrees rotation + if ( tw->isConvex && tw->axisIntersectsTrm && trmpoly->plane.Distance( v->p ) < 0.0f ) { + return; + } + + // if the model vertex is outside the trm polygon rotation bounds + if ( !trmpoly->rotationBounds.ContainsPoint( v->p ) ) { + return; + } + + // if the rotation axis goes through the polygon vertex + dir = v->p - rotationOrigin; + if ( dir * dir < ROTATION_AXIS_EPSILON * ROTATION_AXIS_EPSILON ) { + return; + } + + // calculate vertex end position + endp = v->p; + tw->modelVertexRotation.RotatePoint( endp ); + + // rotate the vertex through the epsilon plane + if ( !RotatePointThroughEpsilonPlane( tw, v->p, endp, trmpoly->plane, -tw->angle, rotationOrigin, + tanHalfAngle, collisionPoint, endDir ) ) { + return; + } + + if ( idMath::Fabs( tanHalfAngle ) < tw->maxTan ) { + // verify if 'collisionPoint' moving along 'endDir' moves between polygon edges + pl.FromRay( collisionPoint, endDir ); + for ( i = 0; i < trmpoly->numEdges; i++ ) { + edgeNum = trmpoly->edges[i]; + edge = tw->edges + abs(edgeNum); + if ( edgeNum < 0 ) { + if ( pl.PermutedInnerProduct( edge->pl ) > 0.0f ) { + return; + } + } + else { + if ( pl.PermutedInnerProduct( edge->pl ) < 0.0f ) { + return; + } + } + } + tw->maxTan = idMath::Fabs( tanHalfAngle ); + // collision plane is the flipped trm polygon plane + tw->trace.c.normal = -trmpoly->plane.Normal(); + tw->trace.c.dist = tw->trace.c.normal * v->p; + tw->trace.c.contents = poly->contents; + tw->trace.c.material = poly->material; + tw->trace.c.type = CONTACT_MODELVERTEX; + tw->trace.c.modelFeature = v - tw->model->vertices; + tw->trace.c.trmFeature = trmpoly - tw->polys; + tw->trace.c.point = v->p; + } +} + +/* +================ +idCollisionModelManagerLocal::RotateTrmThroughPolygon + + returns true if the polygon blocks the complete rotation +================ +*/ +bool idCollisionModelManagerLocal::RotateTrmThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *p ) { + int i, j, k, edgeNum; + float d; + cm_trmVertex_t *bv; + cm_trmEdge_t *be; + cm_trmPolygon_t *bp; + cm_vertex_t *v; + cm_edge_t *e; + idVec3 *rotationOrigin; + + // if already checked this polygon + if ( p->checkcount == idCollisionModelManagerLocal::checkCount ) { + return false; + } + p->checkcount = idCollisionModelManagerLocal::checkCount; + + // if this polygon does not have the right contents behind it + if ( !(p->contents & tw->contents) ) { + return false; + } + + // if the the trace bounds do not intersect the polygon bounds + if ( !tw->bounds.IntersectsBounds( p->bounds ) ) { + return false; + } + + // back face culling + if ( tw->isConvex ) { + // if the center of the convex trm is behind the polygon plane + if ( p->plane.Distance( tw->start ) < 0.0f ) { + // if the rotation axis intersects the trace model + if ( tw->axisIntersectsTrm ) { + return false; + } + else { + // if the direction of motion at the start and end position of the + // center of the trm both go towards or away from the polygon plane + // or if the intersections of the rotation axis with the expanded heart planes + // are both in front of the polygon plane + } + } + } + + // if the polygon is too far from the first heart plane + d = p->bounds.PlaneDistance( tw->heartPlane1 ); + if ( idMath::Fabs(d) > tw->maxDistFromHeartPlane1 ) { + return false; + } + + // rotation bounds should cross polygon plane + switch( tw->bounds.PlaneSide( p->plane ) ) { + case PLANESIDE_CROSS: + break; + case PLANESIDE_FRONT: + if ( tw->model->isConvex ) { + tw->quickExit = true; + return true; + } + default: + return false; + } + + for ( i = 0; i < tw->numVerts; i++ ) { + bv = tw->vertices + i; + // calculate polygon side this vertex is on + d = p->plane.Distance( bv->p ); + bv->polygonSide = FLOATSIGNBITSET( d ); + } + + for ( i = 0; i < p->numEdges; i++ ) { + edgeNum = p->edges[i]; + e = tw->model->edges + abs(edgeNum); + v = tw->model->vertices + e->vertexNum[INTSIGNBITSET(edgeNum)]; + + // pluecker coordinate for edge + tw->polygonEdgePlueckerCache[i].FromLine( tw->model->vertices[e->vertexNum[0]].p, + tw->model->vertices[e->vertexNum[1]].p ); + + // calculate rotation origin projected into rotation plane through the vertex + tw->polygonRotationOriginCache[i] = tw->origin + tw->axis * ( tw->axis * ( v->p - tw->origin ) ); + } + // copy first to last so we can easily cycle through + tw->polygonRotationOriginCache[p->numEdges] = tw->polygonRotationOriginCache[0]; + + // fast point rotation + if ( tw->pointTrace ) { + RotateTrmVertexThroughPolygon( tw, p, &tw->vertices[0], 0 ); + } + else { + // rotate trm vertices through polygon + for ( i = 0; i < tw->numVerts; i++ ) { + bv = tw->vertices + i; + if ( bv->used ) { + RotateTrmVertexThroughPolygon( tw, p, bv, i ); + } + } + + // rotate trm edges through polygon + for ( i = 1; i <= tw->numEdges; i++ ) { + be = tw->edges + i; + if ( be->used ) { + RotateTrmEdgeThroughPolygon( tw, p, be ); + } + } + + // rotate all polygon vertices through the trm + for ( i = 0; i < p->numEdges; i++ ) { + edgeNum = p->edges[i]; + e = tw->model->edges + abs(edgeNum); + + if ( e->checkcount == idCollisionModelManagerLocal::checkCount ) { + continue; + } + // set edge check count + e->checkcount = idCollisionModelManagerLocal::checkCount; + // can never collide with internal edges + if ( e->internal ) { + continue; + } + // got to check both vertices because we skip internal edges + for ( k = 0; k < 2; k++ ) { + + v = tw->model->vertices + e->vertexNum[k ^ INTSIGNBITSET(edgeNum)]; + + // if this vertex is already checked + if ( v->checkcount == idCollisionModelManagerLocal::checkCount ) { + continue; + } + // set vertex check count + v->checkcount = idCollisionModelManagerLocal::checkCount; + + // if the vertex is outside the trm rotation bounds + if ( !tw->bounds.ContainsPoint( v->p ) ) { + continue; + } + + rotationOrigin = &tw->polygonRotationOriginCache[i+k]; + + for ( j = 0; j < tw->numPolys; j++ ) { + bp = tw->polys + j; + if ( bp->used ) { + RotateVertexThroughTrmPolygon( tw, bp, p, v, *rotationOrigin ); + } + } + } + } + } + + return ( tw->maxTan == 0.0f ); +} + +/* +================ +idCollisionModelManagerLocal::BoundsForRotation + + only for rotations < 180 degrees +================ +*/ +void idCollisionModelManagerLocal::BoundsForRotation( const idVec3 &origin, const idVec3 &axis, const idVec3 &start, const idVec3 &end, idBounds &bounds ) { + int i; + float radiusSqr; + idVec3 v1, v2; + + radiusSqr = ( start - origin ).LengthSqr(); + v1 = ( start - origin ).Cross( axis ); + v2 = ( end - origin ).Cross( axis ); + + for ( i = 0; i < 3; i++ ) { + // if the derivative changes sign along this axis during the rotation from start to end + if ( ( v1[i] > 0.0f && v2[i] < 0.0f ) || ( v1[i] < 0.0f && v2[i] > 0.0f ) ) { + if ( ( 0.5f * (start[i] + end[i]) - origin[i] ) > 0.0f ) { + bounds[0][i] = Min( start[i], end[i] ); + bounds[1][i] = origin[i] + idMath::Sqrt( radiusSqr * ( 1.0f - axis[i] * axis[i] ) ); + } + else { + bounds[0][i] = origin[i] - idMath::Sqrt( radiusSqr * ( 1.0f - axis[i] * axis[i] ) ); + bounds[1][i] = Max( start[i], end[i] ); + } + } + else if ( start[i] > end[i] ) { + bounds[0][i] = end[i]; + bounds[1][i] = start[i]; + } + else { + bounds[0][i] = start[i]; + bounds[1][i] = end[i]; + } + // expand for epsilons + bounds[0][i] -= CM_BOX_EPSILON; + bounds[1][i] += CM_BOX_EPSILON; + } +} + +/* +================ +idCollisionModelManagerLocal::Rotation180 +================ +*/ +void idCollisionModelManagerLocal::Rotation180( trace_t *results, const idVec3 &rorg, const idVec3 &axis, + const float startAngle, const float endAngle, const idVec3 &start, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) { + int i, j, edgeNum; + float d, maxErr, initialTan; + bool model_rotated, trm_rotated; + idVec3 dir, dir1, dir2, tmp, vr, vup, org, at, bt; + idMat3 invModelAxis, endAxis, tmpAxis; + idRotation startRotation, endRotation; + idPluecker plaxis; + cm_trmPolygon_t *poly; + cm_trmEdge_t *edge; + cm_trmVertex_t *vert; + ALIGN16( static cm_traceWork_t tw ); + + if ( model < 0 || model > MAX_SUBMODELS || model > idCollisionModelManagerLocal::maxModels ) { + common->Printf("idCollisionModelManagerLocal::Rotation180: invalid model handle\n"); + return; + } + if ( !idCollisionModelManagerLocal::models[model] ) { + common->Printf("idCollisionModelManagerLocal::Rotation180: invalid model\n"); + return; + } + + idCollisionModelManagerLocal::checkCount++; + + tw.trace.fraction = 1.0f; + tw.trace.c.contents = 0; + tw.trace.c.type = CONTACT_NONE; + tw.contents = contentMask; + tw.isConvex = true; + tw.rotation = true; + tw.positionTest = false; + tw.axisIntersectsTrm = false; + tw.quickExit = false; + tw.angle = endAngle - startAngle; + assert( tw.angle > -180.0f && tw.angle < 180.0f ); + tw.maxTan = initialTan = idMath::Fabs( tan( ( idMath::PI / 360.0f ) * tw.angle ) ); + tw.model = idCollisionModelManagerLocal::models[model]; + tw.start = start - modelOrigin; + // rotation axis, axis is assumed to be normalized + tw.axis = axis; + assert( tw.axis[0] * tw.axis[0] + tw.axis[1] * tw.axis[1] + tw.axis[2] * tw.axis[2] > 0.99f ); + // rotation origin projected into rotation plane through tw.start + tw.origin = rorg - modelOrigin; + d = (tw.axis * tw.origin) - ( tw.axis * tw.start ); + tw.origin = tw.origin - d * tw.axis; + // radius of rotation + tw.radius = ( tw.start - tw.origin ).Length(); + // maximum error of the circle approximation traced through the axial BSP tree + d = tw.radius * tw.radius - (CIRCLE_APPROXIMATION_LENGTH*CIRCLE_APPROXIMATION_LENGTH*0.25f); + if ( d > 0.0f ) { + maxErr = tw.radius - idMath::Sqrt( d ); + } else { + maxErr = tw.radius; + } + + model_rotated = modelAxis.IsRotated(); + if ( model_rotated ) { + invModelAxis = modelAxis.Transpose(); + tw.axis *= invModelAxis; + tw.origin *= invModelAxis; + } + + startRotation.Set( tw.origin, tw.axis, startAngle ); + endRotation.Set( tw.origin, tw.axis, endAngle ); + + // create matrix which rotates the rotation axis to the z-axis + tw.axis.NormalVectors( vr, vup ); + tw.matrix[0][0] = vr[0]; + tw.matrix[1][0] = vr[1]; + tw.matrix[2][0] = vr[2]; + tw.matrix[0][1] = -vup[0]; + tw.matrix[1][1] = -vup[1]; + tw.matrix[2][1] = -vup[2]; + tw.matrix[0][2] = tw.axis[0]; + tw.matrix[1][2] = tw.axis[1]; + tw.matrix[2][2] = tw.axis[2]; + + // if optimized point trace + if ( !trm || ( trm->bounds[1][0] - trm->bounds[0][0] <= 0.0f && + trm->bounds[1][1] - trm->bounds[0][1] <= 0.0f && + trm->bounds[1][2] - trm->bounds[0][2] <= 0.0f ) ) { + + if ( model_rotated ) { + // rotate trace instead of model + tw.start *= invModelAxis; + } + tw.end = tw.start; + // if we start at a specific angle + if ( startAngle != 0.0f ) { + startRotation.RotatePoint( tw.start ); + } + // calculate end position of rotation + endRotation.RotatePoint( tw.end ); + + // calculate rotation origin projected into rotation plane through the vertex + tw.numVerts = 1; + tw.vertices[0].p = tw.start; + tw.vertices[0].endp = tw.end; + tw.vertices[0].used = true; + tw.vertices[0].rotationOrigin = tw.origin + tw.axis * ( tw.axis * ( tw.vertices[0].p - tw.origin ) ); + BoundsForRotation( tw.vertices[0].rotationOrigin, tw.axis, tw.start, tw.end, tw.vertices[0].rotationBounds ); + // rotation bounds + tw.bounds = tw.vertices[0].rotationBounds; + tw.numEdges = tw.numPolys = 0; + + // collision with single point + tw.pointTrace = true; + + // extents is set to maximum error of the circle approximation traced through the axial BSP tree + tw.extents[0] = tw.extents[1] = tw.extents[2] = maxErr + CM_BOX_EPSILON; + + // setup rotation heart plane + tw.heartPlane1.SetNormal( tw.axis ); + tw.heartPlane1.FitThroughPoint( tw.start ); + tw.maxDistFromHeartPlane1 = CM_BOX_EPSILON; + + // trace through the model + idCollisionModelManagerLocal::TraceThroughModel( &tw ); + + // store results + *results = tw.trace; + results->endpos = start; + if ( tw.maxTan == initialTan ) { + results->fraction = 1.0f; + } else { + results->fraction = idMath::Fabs( atan( tw.maxTan ) * ( 2.0f * 180.0f / idMath::PI ) / tw.angle ); + } + assert( results->fraction <= 1.0f ); + endRotation.Set( rorg, axis, startAngle + (endAngle-startAngle) * results->fraction ); + endRotation.RotatePoint( results->endpos ); + results->endAxis.Identity(); + + if ( results->fraction < 1.0f ) { + // rotate trace plane normal if there was a collision with a rotated model + if ( model_rotated ) { + results->c.normal *= modelAxis; + results->c.point *= modelAxis; + } + results->c.point += modelOrigin; + results->c.dist += modelOrigin * results->c.normal; + } + return; + } + + tw.pointTrace = false; + + // setup trm structure + idCollisionModelManagerLocal::SetupTrm( &tw, trm ); + + trm_rotated = trmAxis.IsRotated(); + + // calculate vertex positions + if ( trm_rotated ) { + for ( i = 0; i < tw.numVerts; i++ ) { + // rotate trm around the start position + tw.vertices[i].p *= trmAxis; + } + } + for ( i = 0; i < tw.numVerts; i++ ) { + // set trm at start position + tw.vertices[i].p += tw.start; + } + if ( model_rotated ) { + for ( i = 0; i < tw.numVerts; i++ ) { + tw.vertices[i].p *= invModelAxis; + } + } + for ( i = 0; i < tw.numVerts; i++ ) { + tw.vertices[i].endp = tw.vertices[i].p; + } + // if we start at a specific angle + if ( startAngle != 0.0f ) { + for ( i = 0; i < tw.numVerts; i++ ) { + startRotation.RotatePoint( tw.vertices[i].p ); + } + } + for ( i = 0; i < tw.numVerts; i++ ) { + // end position of vertex + endRotation.RotatePoint( tw.vertices[i].endp ); + } + + // add offset to start point + if ( trm_rotated ) { + tw.start += trm->offset * trmAxis; + } else { + tw.start += trm->offset; + } + // if the model is rotated + if ( model_rotated ) { + // rotate trace instead of model + tw.start *= invModelAxis; + } + tw.end = tw.start; + // if we start at a specific angle + if ( startAngle != 0.0f ) { + startRotation.RotatePoint( tw.start ); + } + // calculate end position of rotation + endRotation.RotatePoint( tw.end ); + + // setup trm vertices + for ( vert = tw.vertices, i = 0; i < tw.numVerts; i++, vert++ ) { + // calculate rotation origin projected into rotation plane through the vertex + vert->rotationOrigin = tw.origin + tw.axis * ( tw.axis * ( vert->p - tw.origin ) ); + // calculate rotation bounds for this vertex + BoundsForRotation( vert->rotationOrigin, tw.axis, vert->p, vert->endp, vert->rotationBounds ); + // if the rotation axis goes through the vertex then the vertex is not used + d = ( vert->p - vert->rotationOrigin ).LengthSqr(); + if ( d > ROTATION_AXIS_EPSILON * ROTATION_AXIS_EPSILON ) { + vert->used = true; + } + } + + // setup trm edges + for ( edge = tw.edges + 1, i = 1; i <= tw.numEdges; i++, edge++ ) { + // if the rotation axis goes through both the edge vertices then the edge is not used + if ( tw.vertices[edge->vertexNum[0]].used | tw.vertices[edge->vertexNum[1]].used ) { + edge->used = true; + } + // edge start, end and pluecker coordinate + edge->start = tw.vertices[edge->vertexNum[0]].p; + edge->end = tw.vertices[edge->vertexNum[1]].p; + edge->pl.FromLine( edge->start, edge->end ); + // pluecker coordinate for edge being rotated about the z-axis + at = ( edge->start - tw.origin ) * tw.matrix; + bt = ( edge->end - tw.origin ) * tw.matrix; + edge->plzaxis.FromLine( at, bt ); + // get edge rotation bounds from the rotation bounds of both vertices + edge->rotationBounds = tw.vertices[edge->vertexNum[0]].rotationBounds; + edge->rotationBounds.AddBounds( tw.vertices[edge->vertexNum[1]].rotationBounds ); + // used to calculate if the rotation axis intersects the trm + edge->bitNum = 0; + } + + tw.bounds.Clear(); + + // rotate trm polygon planes + if ( trm_rotated & model_rotated ) { + tmpAxis = trmAxis * invModelAxis; + for ( poly = tw.polys, i = 0; i < tw.numPolys; i++, poly++ ) { + poly->plane *= tmpAxis; + } + } else if ( trm_rotated ) { + for ( poly = tw.polys, i = 0; i < tw.numPolys; i++, poly++ ) { + poly->plane *= trmAxis; + } + } else if ( model_rotated ) { + for ( poly = tw.polys, i = 0; i < tw.numPolys; i++, poly++ ) { + poly->plane *= invModelAxis; + } + } + + // setup trm polygons + for ( poly = tw.polys, i = 0; i < tw.numPolys; i++, poly++ ) { + poly->used = true; + // set trm polygon plane distance + poly->plane.FitThroughPoint( tw.edges[abs(poly->edges[0])].start ); + // get polygon bounds from edge bounds + poly->rotationBounds.Clear(); + for ( j = 0; j < poly->numEdges; j++ ) { + // add edge rotation bounds to polygon rotation bounds + edge = &tw.edges[abs( poly->edges[j] )]; + poly->rotationBounds.AddBounds( edge->rotationBounds ); + } + // get trace bounds from polygon bounds + tw.bounds.AddBounds( poly->rotationBounds ); + } + + // extents including the maximum error of the circle approximation traced through the axial BSP tree + for ( i = 0; i < 3; i++ ) { + tw.size[0][i] = tw.bounds[0][i] - tw.start[i]; + tw.size[1][i] = tw.bounds[1][i] - tw.start[i]; + if ( idMath::Fabs( tw.size[0][i] ) > idMath::Fabs( tw.size[1][i] ) ) { + tw.extents[i] = idMath::Fabs( tw.size[0][i] ) + maxErr + CM_BOX_EPSILON; + } else { + tw.extents[i] = idMath::Fabs( tw.size[1][i] ) + maxErr + CM_BOX_EPSILON; + } + } + + // for back-face culling + if ( tw.isConvex ) { + if ( tw.start == tw.origin ) { + tw.axisIntersectsTrm = true; + } else { + // determine if the rotation axis intersects the trm + plaxis.FromRay( tw.origin, tw.axis ); + for ( poly = tw.polys, i = 0; i < tw.numPolys; i++, poly++ ) { + // back face cull polygons + if ( poly->plane.Normal() * tw.axis > 0.0f ) { + continue; + } + // test if the axis goes between the polygon edges + for ( j = 0; j < poly->numEdges; j++ ) { + edgeNum = poly->edges[j]; + edge = tw.edges + abs(edgeNum); + if ( !(edge->bitNum & 2) ) { + d = plaxis.PermutedInnerProduct( edge->pl ); + edge->bitNum = FLOATSIGNBITSET( d ) | 2; + } + if ( ( edge->bitNum ^ INTSIGNBITSET( edgeNum ) ) & 1 ) { + break; + } + } + if ( j >= poly->numEdges ) { + tw.axisIntersectsTrm = true; + break; + } + } + } + } + + // setup rotation heart plane + tw.heartPlane1.SetNormal( tw.axis ); + tw.heartPlane1.FitThroughPoint( tw.start ); + tw.maxDistFromHeartPlane1 = 0.0f; + for ( i = 0; i < tw.numVerts; i++ ) { + d = idMath::Fabs( tw.heartPlane1.Distance( tw.vertices[i].p ) ); + if ( d > tw.maxDistFromHeartPlane1 ) { + tw.maxDistFromHeartPlane1 = d; + } + } + tw.maxDistFromHeartPlane1 += CM_BOX_EPSILON; + + // inverse rotation to rotate model vertices towards trace model + tw.modelVertexRotation.Set( tw.origin, tw.axis, -tw.angle ); + + // trace through the model + idCollisionModelManagerLocal::TraceThroughModel( &tw ); + + // store results + *results = tw.trace; + results->endpos = start; + if ( tw.maxTan == initialTan ) { + results->fraction = 1.0f; + } else { + results->fraction = idMath::Fabs( atan( tw.maxTan ) * ( 2.0f * 180.0f / idMath::PI ) / tw.angle ); + } + assert( results->fraction <= 1.0f ); + endRotation.Set( rorg, axis, startAngle + (endAngle-startAngle) * results->fraction ); + endRotation.RotatePoint( results->endpos ); + results->endAxis = trmAxis * endRotation.ToMat3(); + + if ( results->fraction < 1.0f ) { + // rotate trace plane normal if there was a collision with a rotated model + if ( model_rotated ) { + results->c.normal *= modelAxis; + results->c.point *= modelAxis; + } + results->c.point += modelOrigin; + results->c.dist += modelOrigin * results->c.normal; + } +} + +/* +================ +idCollisionModelManagerLocal::Rotation +================ +*/ +#ifdef _DEBUG +static int entered = 0; +#endif + +void idCollisionModelManagerLocal::Rotation( trace_t *results, const idVec3 &start, const idRotation &rotation, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) { + idVec3 tmp; + float maxa, stepa, a, lasta; + + assert( ((byte *)&start) < ((byte *)results) || ((byte *)&start) > (((byte *)results) + sizeof( trace_t )) ); + assert( ((byte *)&trmAxis) < ((byte *)results) || ((byte *)&trmAxis) > (((byte *)results) + sizeof( trace_t )) ); + + memset( results, 0, sizeof( *results ) ); + + // if special position test + if ( rotation.GetAngle() == 0.0f ) { + idCollisionModelManagerLocal::ContentsTrm( results, start, trm, trmAxis, contentMask, model, modelOrigin, modelAxis ); + return; + } + +#ifdef _DEBUG + bool startsolid = false; + // test whether or not stuck to begin with + if ( cm_debugCollision.GetBool() ) { + if ( !entered ) { + entered = 1; + // if already messed up to begin with + if ( idCollisionModelManagerLocal::Contents( start, trm, trmAxis, -1, model, modelOrigin, modelAxis ) & contentMask ) { + startsolid = true; + } + entered = 0; + } + } +#endif + + if ( rotation.GetAngle() >= 180.0f || rotation.GetAngle() <= -180.0f) { + if ( rotation.GetAngle() >= 360.0f ) { + maxa = 360.0f; + stepa = 120.0f; // three steps strictly < 180 degrees + } else if ( rotation.GetAngle() <= -360.0f ) { + maxa = -360.0f; + stepa = -120.0f; // three steps strictly < 180 degrees + } else { + maxa = rotation.GetAngle(); + stepa = rotation.GetAngle() * 0.5f; // two steps strictly < 180 degrees + } + for ( lasta = 0.0f, a = stepa; fabs( a ) < fabs( maxa ) + 1.0f; lasta = a, a += stepa ) { + // partial rotation + idCollisionModelManagerLocal::Rotation180( results, rotation.GetOrigin(), rotation.GetVec(), lasta, a, start, trm, trmAxis, contentMask, model, modelOrigin, modelAxis ); + // if there is a collision + if ( results->fraction < 1.0f ) { + // fraction of total rotation + results->fraction = (lasta + stepa * results->fraction) / rotation.GetAngle(); + return; + } + } + results->fraction = 1.0f; + return; + } + + idCollisionModelManagerLocal::Rotation180( results, rotation.GetOrigin(), rotation.GetVec(), 0.0f, rotation.GetAngle(), start, trm, trmAxis, contentMask, model, modelOrigin, modelAxis ); + +#ifdef _DEBUG + // test for missed collisions + if ( cm_debugCollision.GetBool() ) { + if ( !entered ) { + entered = 1; + // if the trm is stuck in the model + if ( idCollisionModelManagerLocal::Contents( results->endpos, trm, results->endAxis, -1, model, modelOrigin, modelAxis ) & contentMask ) { + trace_t tr; + + // test where the trm is stuck in the model + idCollisionModelManagerLocal::Contents( results->endpos, trm, results->endAxis, -1, model, modelOrigin, modelAxis ); + // re-run collision detection to find out where it failed + idCollisionModelManagerLocal::Rotation( &tr, start, rotation, trm, trmAxis, contentMask, model, modelOrigin, modelAxis ); + } + entered = 0; + } + } +#endif +} diff --git a/neo/cm/CollisionModel_trace.cpp b/neo/cm/CollisionModel_trace.cpp new file mode 100644 index 0000000..1514305 --- /dev/null +++ b/neo/cm/CollisionModel_trace.cpp @@ -0,0 +1,256 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ + +/* +=============================================================================== + + Trace model vs. polygonal model collision detection. + +=============================================================================== +*/ + +#include "../idlib/precompiled.h" +#pragma hdrstop + +#include "CollisionModel_local.h" + +/* +=============================================================================== + +Trace through the spatial subdivision + +=============================================================================== +*/ + +/* +================ +idCollisionModelManagerLocal::TraceTrmThroughNode +================ +*/ +void idCollisionModelManagerLocal::TraceTrmThroughNode( cm_traceWork_t *tw, cm_node_t *node ) { + cm_polygonRef_t *pref; + cm_brushRef_t *bref; + + // position test + if ( tw->positionTest ) { + // if already stuck in solid + if ( tw->trace.fraction == 0.0f ) { + return; + } + // test if any of the trm vertices is inside a brush + for ( bref = node->brushes; bref; bref = bref->next ) { + if ( idCollisionModelManagerLocal::TestTrmVertsInBrush( tw, bref->b ) ) { + return; + } + } + // if just testing a point we're done + if ( tw->pointTrace ) { + return; + } + // test if the trm is stuck in any polygons + for ( pref = node->polygons; pref; pref = pref->next ) { + if ( idCollisionModelManagerLocal::TestTrmInPolygon( tw, pref->p ) ) { + return; + } + } + } + else if ( tw->rotation ) { + // rotate through all polygons in this leaf + for ( pref = node->polygons; pref; pref = pref->next ) { + if ( idCollisionModelManagerLocal::RotateTrmThroughPolygon( tw, pref->p ) ) { + return; + } + } + } + else { + // trace through all polygons in this leaf + for ( pref = node->polygons; pref; pref = pref->next ) { + if ( idCollisionModelManagerLocal::TranslateTrmThroughPolygon( tw, pref->p ) ) { + return; + } + } + } +} + +/* +================ +idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r +================ +*/ +//#define NO_SPATIAL_SUBDIVISION + +void idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( cm_traceWork_t *tw, cm_node_t *node, float p1f, float p2f, idVec3 &p1, idVec3 &p2) { + float t1, t2, offset; + float frac, frac2; + float idist; + idVec3 mid; + int side; + float midf; + + if ( !node ) { + return; + } + + if ( tw->quickExit ) { + return; // stop immediately + } + + if ( tw->trace.fraction <= p1f ) { + return; // already hit something nearer + } + + // if we need to test this node for collisions + if ( node->polygons || (tw->positionTest && node->brushes) ) { + // trace through node with collision data + idCollisionModelManagerLocal::TraceTrmThroughNode( tw, node ); + } + // if already stuck in solid + if ( tw->positionTest && tw->trace.fraction == 0.0f ) { + return; + } + // if this is a leaf node + if ( node->planeType == -1 ) { + return; + } +#ifdef NO_SPATIAL_SUBDIVISION + idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, node->children[0], p1f, p2f, p1, p2 ); + idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, node->children[1], p1f, p2f, p1, p2 ); + return; +#endif + // distance from plane for trace start and end + t1 = p1[node->planeType] - node->planeDist; + t2 = p2[node->planeType] - node->planeDist; + // adjust the plane distance appropriately for mins/maxs + offset = tw->extents[node->planeType]; + // see which sides we need to consider + if ( t1 >= offset && t2 >= offset ) { + idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, node->children[0], p1f, p2f, p1, p2 ); + return; + } + + if ( t1 < -offset && t2 < -offset ) { + idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, node->children[1], p1f, p2f, p1, p2 ); + return; + } + + if ( t1 < t2 ) { + idist = 1.0f / (t1-t2); + side = 1; + frac2 = (t1 + offset) * idist; + frac = (t1 - offset) * idist; + } else if (t1 > t2) { + idist = 1.0f / (t1-t2); + side = 0; + frac2 = (t1 - offset) * idist; + frac = (t1 + offset) * idist; + } else { + side = 0; + frac = 1.0f; + frac2 = 0.0f; + } + + // move up to the node + if ( frac < 0.0f ) { + frac = 0.0f; + } + else if ( frac > 1.0f ) { + frac = 1.0f; + } + + midf = p1f + (p2f - p1f)*frac; + + mid[0] = p1[0] + frac*(p2[0] - p1[0]); + mid[1] = p1[1] + frac*(p2[1] - p1[1]); + mid[2] = p1[2] + frac*(p2[2] - p1[2]); + + idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, node->children[side], p1f, midf, p1, mid ); + + + // go past the node + if ( frac2 < 0.0f ) { + frac2 = 0.0f; + } + else if ( frac2 > 1.0f ) { + frac2 = 1.0f; + } + + midf = p1f + (p2f - p1f)*frac2; + + mid[0] = p1[0] + frac2*(p2[0] - p1[0]); + mid[1] = p1[1] + frac2*(p2[1] - p1[1]); + mid[2] = p1[2] + frac2*(p2[2] - p1[2]); + + idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, node->children[side^1], midf, p2f, mid, p2 ); +} + +/* +================ +idCollisionModelManagerLocal::TraceThroughModel +================ +*/ +void idCollisionModelManagerLocal::TraceThroughModel( cm_traceWork_t *tw ) { + float d; + int i, numSteps; + idVec3 start, end; + idRotation rot; + + if ( !tw->rotation ) { + // trace through spatial subdivision and then through leafs + idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, tw->model->node, 0, 1, tw->start, tw->end ); + } + else { + // approximate the rotation with a series of straight line movements + // total length covered along circle + d = tw->radius * DEG2RAD( tw->angle ); + // if more than one step + if ( d > CIRCLE_APPROXIMATION_LENGTH ) { + // number of steps for the approximation + numSteps = (int) (CIRCLE_APPROXIMATION_LENGTH / d); + // start of approximation + start = tw->start; + // trace circle approximation steps through the BSP tree + for ( i = 0; i < numSteps; i++ ) { + // calculate next point on approximated circle + rot.Set( tw->origin, tw->axis, tw->angle * ((float) (i+1) / numSteps) ); + end = start * rot; + // trace through spatial subdivision and then through leafs + idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, tw->model->node, 0, 1, start, end ); + // no need to continue if something was hit already + if ( tw->trace.fraction < 1.0f ) { + return; + } + start = end; + } + } + else { + start = tw->start; + } + // last step of the approximation + idCollisionModelManagerLocal::TraceThroughAxialBSPTree_r( tw, tw->model->node, 0, 1, start, tw->end ); + } +} diff --git a/neo/cm/CollisionModel_translate.cpp b/neo/cm/CollisionModel_translate.cpp new file mode 100644 index 0000000..a2beea2 --- /dev/null +++ b/neo/cm/CollisionModel_translate.cpp @@ -0,0 +1,1120 @@ +/* +=========================================================================== + +Doom 3 GPL Source Code +Copyright (C) 1999-2011 id Software LLC, a ZeniMax Media company. + +This file is part of the Doom 3 GPL Source Code (?Doom 3 Source Code?). + +Doom 3 Source Code 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. + +Doom 3 Source Code 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 Doom 3 Source Code. If not, see . + +In addition, the Doom 3 Source Code is also subject to certain additional terms. You should have received a copy of these additional terms immediately following the terms and conditions of the GNU General Public License which accompanied the Doom 3 Source Code. If not, please request a copy in writing from id Software at the address below. + +If you have questions concerning this license or the applicable additional terms, you may contact in writing id Software LLC, c/o ZeniMax Media Inc., Suite 120, Rockville, Maryland 20850 USA. + +=========================================================================== +*/ + +/* +=============================================================================== + + Trace model vs. polygonal model collision detection. + +=============================================================================== +*/ + +#include "../idlib/precompiled.h" +#pragma hdrstop + +#include "CollisionModel_local.h" + +/* +=============================================================================== + +Collision detection for translational motion + +=============================================================================== +*/ + +/* +================ +idCollisionModelManagerLocal::TranslateEdgeThroughEdge + + calculates fraction of the translation completed at which the edges collide +================ +*/ +ID_INLINE int idCollisionModelManagerLocal::TranslateEdgeThroughEdge( idVec3 &cross, idPluecker &l1, idPluecker &l2, float *fraction ) { + + float d, t; + + /* + + a = start of line + b = end of line + dir = movement direction + l1 = pluecker coordinate for line + l2 = pluecker coordinate for edge we might collide with + a+dir = start of line after movement + b+dir = end of line after movement + t = scale factor + solve pluecker inner product for t of line (a+t*dir : b+t*dir) and line l2 + + v[0] = (a[0]+t*dir[0]) * (b[1]+t*dir[1]) - (b[0]+t*dir[0]) * (a[1]+t*dir[1]); + v[1] = (a[0]+t*dir[0]) * (b[2]+t*dir[2]) - (b[0]+t*dir[0]) * (a[2]+t*dir[2]); + v[2] = (a[0]+t*dir[0]) - (b[0]+t*dir[0]); + v[3] = (a[1]+t*dir[1]) * (b[2]+t*dir[2]) - (b[1]+t*dir[1]) * (a[2]+t*dir[2]); + v[4] = (a[2]+t*dir[2]) - (b[2]+t*dir[2]); + v[5] = (b[1]+t*dir[1]) - (a[1]+t*dir[1]); + + l2[0] * v[4] + l2[1] * v[5] + l2[2] * v[3] + l2[4] * v[0] + l2[5] * v[1] + l2[3] * v[2] = 0; + + solve t + + v[0] = (a[0]+t*dir[0]) * (b[1]+t*dir[1]) - (b[0]+t*dir[0]) * (a[1]+t*dir[1]); + v[0] = (a[0]*b[1]) + a[0]*t*dir[1] + b[1]*t*dir[0] + (t*t*dir[0]*dir[1]) - + ((b[0]*a[1]) + b[0]*t*dir[1] + a[1]*t*dir[0] + (t*t*dir[0]*dir[1])); + v[0] = a[0]*b[1] + a[0]*t*dir[1] + b[1]*t*dir[0] - b[0]*a[1] - b[0]*t*dir[1] - a[1]*t*dir[0]; + + v[1] = (a[0]+t*dir[0]) * (b[2]+t*dir[2]) - (b[0]+t*dir[0]) * (a[2]+t*dir[2]); + v[1] = (a[0]*b[2]) + a[0]*t*dir[2] + b[2]*t*dir[0] + (t*t*dir[0]*dir[2]) - + ((b[0]*a[2]) + b[0]*t*dir[2] + a[2]*t*dir[0] + (t*t*dir[0]*dir[2])); + v[1] = a[0]*b[2] + a[0]*t*dir[2] + b[2]*t*dir[0] - b[0]*a[2] - b[0]*t*dir[2] - a[2]*t*dir[0]; + + v[2] = (a[0]+t*dir[0]) - (b[0]+t*dir[0]); + v[2] = a[0] - b[0]; + + v[3] = (a[1]+t*dir[1]) * (b[2]+t*dir[2]) - (b[1]+t*dir[1]) * (a[2]+t*dir[2]); + v[3] = (a[1]*b[2]) + a[1]*t*dir[2] + b[2]*t*dir[1] + (t*t*dir[1]*dir[2]) - + ((b[1]*a[2]) + b[1]*t*dir[2] + a[2]*t*dir[1] + (t*t*dir[1]*dir[2])); + v[3] = a[1]*b[2] + a[1]*t*dir[2] + b[2]*t*dir[1] - b[1]*a[2] - b[1]*t*dir[2] - a[2]*t*dir[1]; + + v[4] = (a[2]+t*dir[2]) - (b[2]+t*dir[2]); + v[4] = a[2] - b[2]; + + v[5] = (b[1]+t*dir[1]) - (a[1]+t*dir[1]); + v[5] = b[1] - a[1]; + + + v[0] = a[0]*b[1] + a[0]*t*dir[1] + b[1]*t*dir[0] - b[0]*a[1] - b[0]*t*dir[1] - a[1]*t*dir[0]; + v[1] = a[0]*b[2] + a[0]*t*dir[2] + b[2]*t*dir[0] - b[0]*a[2] - b[0]*t*dir[2] - a[2]*t*dir[0]; + v[2] = a[0] - b[0]; + v[3] = a[1]*b[2] + a[1]*t*dir[2] + b[2]*t*dir[1] - b[1]*a[2] - b[1]*t*dir[2] - a[2]*t*dir[1]; + v[4] = a[2] - b[2]; + v[5] = b[1] - a[1]; + + v[0] = (a[0]*dir[1] + b[1]*dir[0] - b[0]*dir[1] - a[1]*dir[0]) * t + a[0]*b[1] - b[0]*a[1]; + v[1] = (a[0]*dir[2] + b[2]*dir[0] - b[0]*dir[2] - a[2]*dir[0]) * t + a[0]*b[2] - b[0]*a[2]; + v[2] = a[0] - b[0]; + v[3] = (a[1]*dir[2] + b[2]*dir[1] - b[1]*dir[2] - a[2]*dir[1]) * t + a[1]*b[2] - b[1]*a[2]; + v[4] = a[2] - b[2]; + v[5] = b[1] - a[1]; + + l2[4] * (a[0]*dir[1] + b[1]*dir[0] - b[0]*dir[1] - a[1]*dir[0]) * t + l2[4] * (a[0]*b[1] - b[0]*a[1]) + + l2[5] * (a[0]*dir[2] + b[2]*dir[0] - b[0]*dir[2] - a[2]*dir[0]) * t + l2[5] * (a[0]*b[2] - b[0]*a[2]) + + l2[3] * (a[0] - b[0]) + + l2[2] * (a[1]*dir[2] + b[2]*dir[1] - b[1]*dir[2] - a[2]*dir[1]) * t + l2[2] * (a[1]*b[2] - b[1]*a[2]) + + l2[0] * (a[2] - b[2]) + + l2[1] * (b[1] - a[1]) = 0 + + t = (- l2[4] * (a[0]*b[1] - b[0]*a[1]) - + l2[5] * (a[0]*b[2] - b[0]*a[2]) - + l2[3] * (a[0] - b[0]) - + l2[2] * (a[1]*b[2] - b[1]*a[2]) - + l2[0] * (a[2] - b[2]) - + l2[1] * (b[1] - a[1])) / + (l2[4] * (a[0]*dir[1] + b[1]*dir[0] - b[0]*dir[1] - a[1]*dir[0]) + + l2[5] * (a[0]*dir[2] + b[2]*dir[0] - b[0]*dir[2] - a[2]*dir[0]) + + l2[2] * (a[1]*dir[2] + b[2]*dir[1] - b[1]*dir[2] - a[2]*dir[1])); + + d = l2[4] * (a[0]*dir[1] + b[1]*dir[0] - b[0]*dir[1] - a[1]*dir[0]) + + l2[5] * (a[0]*dir[2] + b[2]*dir[0] - b[0]*dir[2] - a[2]*dir[0]) + + l2[2] * (a[1]*dir[2] + b[2]*dir[1] - b[1]*dir[2] - a[2]*dir[1]); + + t = - ( l2[4] * (a[0]*b[1] - b[0]*a[1]) + + l2[5] * (a[0]*b[2] - b[0]*a[2]) + + l2[3] * (a[0] - b[0]) + + l2[2] * (a[1]*b[2] - b[1]*a[2]) + + l2[0] * (a[2] - b[2]) + + l2[1] * (b[1] - a[1])); + t /= d; + + MrE pats Pluecker on the head.. good monkey + + edgeDir = a - b; + d = l2[4] * (edgeDir[0]*dir[1] - edgeDir[1]*dir[0]) + + l2[5] * (edgeDir[0]*dir[2] - edgeDir[2]*dir[0]) + + l2[2] * (edgeDir[1]*dir[2] - edgeDir[2]*dir[1]); + */ + + d = l2[4] * cross[0] + l2[5] * cross[1] + l2[2] * cross[2]; + + if ( d == 0.0f ) { + *fraction = 1.0f; + // no collision ever + return false; + } + + t = -l1.PermutedInnerProduct( l2 ); + // if the lines cross each other to begin with + if ( t == 0.0f ) { + *fraction = 0.0f; + return true; + } + // fraction of movement at the time the lines cross each other + *fraction = t / d; + return true; +} + +/* +================ +CM_AddContact +================ +*/ +ID_INLINE void CM_AddContact( cm_traceWork_t *tw ) { + + if ( tw->numContacts >= tw->maxContacts ) { + return; + } + // copy contact information from trace_t + tw->contacts[tw->numContacts] = tw->trace.c; + tw->numContacts++; + // set fraction back to 1 to find all other contacts + tw->trace.fraction = 1.0f; +} + +/* +================ +CM_SetVertexSidedness + + stores for the given model vertex at which side of one of the trm edges it passes +================ +*/ +ID_INLINE void CM_SetVertexSidedness( cm_vertex_t *v, const idPluecker &vpl, const idPluecker &epl, const int bitNum ) { + if ( !(v->sideSet & (1<side = (v->side & ~(1<sideSet |= (1 << bitNum); + } +} + +/* +================ +CM_SetEdgeSidedness + + stores for the given model edge at which side one of the trm vertices +================ +*/ +ID_INLINE void CM_SetEdgeSidedness( cm_edge_t *edge, const idPluecker &vpl, const idPluecker &epl, const int bitNum ) { + if ( !(edge->sideSet & (1<side = (edge->side & ~(1<sideSet |= (1 << bitNum); + } +} + +/* +================ +idCollisionModelManagerLocal::TranslateTrmEdgeThroughPolygon +================ +*/ +void idCollisionModelManagerLocal::TranslateTrmEdgeThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmEdge_t *trmEdge ) { + int i, edgeNum; + float f1, f2, dist, d1, d2; + idVec3 start, end, normal; + cm_edge_t *edge; + cm_vertex_t *v1, *v2; + idPluecker *pl, epsPl; + + // check edges for a collision + for ( i = 0; i < poly->numEdges; i++) { + edgeNum = poly->edges[i]; + edge = tw->model->edges + abs(edgeNum); + // if this edge is already checked + if ( edge->checkcount == idCollisionModelManagerLocal::checkCount ) { + continue; + } + // can never collide with internal edges + if ( edge->internal ) { + continue; + } + pl = &tw->polygonEdgePlueckerCache[i]; + // get the sides at which the trm edge vertices pass the polygon edge + CM_SetEdgeSidedness( edge, *pl, tw->vertices[trmEdge->vertexNum[0]].pl, trmEdge->vertexNum[0] ); + CM_SetEdgeSidedness( edge, *pl, tw->vertices[trmEdge->vertexNum[1]].pl, trmEdge->vertexNum[1] ); + // if the trm edge start and end vertex do not pass the polygon edge at different sides + if ( !(((edge->side >> trmEdge->vertexNum[0]) ^ (edge->side >> trmEdge->vertexNum[1])) & 1) ) { + continue; + } + // get the sides at which the polygon edge vertices pass the trm edge + v1 = tw->model->vertices + edge->vertexNum[INTSIGNBITSET(edgeNum)]; + CM_SetVertexSidedness( v1, tw->polygonVertexPlueckerCache[i], trmEdge->pl, trmEdge->bitNum ); + v2 = tw->model->vertices + edge->vertexNum[INTSIGNBITNOTSET(edgeNum)]; + CM_SetVertexSidedness( v2, tw->polygonVertexPlueckerCache[i+1], trmEdge->pl, trmEdge->bitNum ); + // if the polygon edge start and end vertex do not pass the trm edge at different sides + if ( !((v1->side ^ v2->side) & (1<bitNum)) ) { + continue; + } + // if there is no possible collision between the trm edge and the polygon edge + if ( !idCollisionModelManagerLocal::TranslateEdgeThroughEdge( trmEdge->cross, trmEdge->pl, *pl, &f1 ) ) { + continue; + } + // if moving away from edge + if ( f1 < 0.0f ) { + continue; + } + + // pluecker coordinate for epsilon expanded edge + epsPl.FromLine( tw->model->vertices[edge->vertexNum[0]].p + edge->normal * CM_CLIP_EPSILON, + tw->model->vertices[edge->vertexNum[1]].p + edge->normal * CM_CLIP_EPSILON ); + // calculate collision fraction with epsilon expanded edge + if ( !idCollisionModelManagerLocal::TranslateEdgeThroughEdge( trmEdge->cross, trmEdge->pl, epsPl, &f2 ) ) { + continue; + } + // if no collision with epsilon edge or moving away from edge + if ( f2 > 1.0f || f1 < f2 ) { + continue; + } + + if ( f2 < 0.0f ) { + f2 = 0.0f; + } + + if ( f2 < tw->trace.fraction ) { + tw->trace.fraction = f2; + // create plane with normal vector orthogonal to both the polygon edge and the trm edge + start = tw->model->vertices[edge->vertexNum[0]].p; + end = tw->model->vertices[edge->vertexNum[1]].p; + tw->trace.c.normal = ( end - start ).Cross( trmEdge->end - trmEdge->start ); + // FIXME: do this normalize when we know the first collision + tw->trace.c.normal.Normalize(); + tw->trace.c.dist = tw->trace.c.normal * start; + // make sure the collision plane faces the trace model + if ( tw->trace.c.normal * trmEdge->start - tw->trace.c.dist < 0.0f ) { + tw->trace.c.normal = -tw->trace.c.normal; + tw->trace.c.dist = -tw->trace.c.dist; + } + tw->trace.c.contents = poly->contents; + tw->trace.c.material = poly->material; + tw->trace.c.type = CONTACT_EDGE; + tw->trace.c.modelFeature = edgeNum; + tw->trace.c.trmFeature = trmEdge - tw->edges; + // calculate collision point + normal[0] = trmEdge->cross[2]; + normal[1] = -trmEdge->cross[1]; + normal[2] = trmEdge->cross[0]; + dist = normal * trmEdge->start; + d1 = normal * start - dist; + d2 = normal * end - dist; + f1 = d1 / ( d1 - d2 ); + //assert( f1 >= 0.0f && f1 <= 1.0f ); + tw->trace.c.point = start + f1 * ( end - start ); + // if retrieving contacts + if ( tw->getContacts ) { + CM_AddContact( tw ); + } + } + } +} + +/* +================ +CM_TranslationPlaneFraction +================ +*/ + +#if 0 + +float CM_TranslationPlaneFraction( idPlane &plane, idVec3 &start, idVec3 &end ) { + float d1, d2; + + d2 = plane.Distance( end ); + // if the end point is closer to the plane than an epsilon we still take it for a collision + if ( d2 >= CM_CLIP_EPSILON ) { + return 1.0f; + } + d1 = plane.Distance( start ); + + // if completely behind the polygon + if ( d1 <= 0.0f ) { + return 1.0f; + } + // leaves polygon + if ( d1 <= d2 ) { + return 1.0f; + } + return (d1-CM_CLIP_EPSILON) / (d1-d2); +} + +#else + +float CM_TranslationPlaneFraction( idPlane &plane, idVec3 &start, idVec3 &end ) { + float d1, d2, d2eps; + + d2 = plane.Distance( end ); + // if the end point is closer to the plane than an epsilon we still take it for a collision + // if ( d2 >= CM_CLIP_EPSILON ) { + d2eps = d2 - CM_CLIP_EPSILON; + if ( FLOATSIGNBITNOTSET(d2eps) ) { + return 1.0f; + } + d1 = plane.Distance( start ); + + // if completely behind the polygon + if ( FLOATSIGNBITSET(d1) ) { + return 1.0f; + } + // if going towards the front of the plane and + // the start and end point are not at equal distance from the plane + // if ( d1 > d2 ) + d2 = d1 - d2; + if ( d2 <= 0.0f ) { + return 1.0f; + } + return (d1-CM_CLIP_EPSILON) / d2; +} + +#endif + +/* +================ +idCollisionModelManagerLocal::TranslateTrmVertexThroughPolygon +================ +*/ +void idCollisionModelManagerLocal::TranslateTrmVertexThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmVertex_t *v, int bitNum ) { + int i, edgeNum; + float f; + cm_edge_t *edge; + + f = CM_TranslationPlaneFraction( poly->plane, v->p, v->endp ); + if ( f < tw->trace.fraction ) { + + for ( i = 0; i < poly->numEdges; i++ ) { + edgeNum = poly->edges[i]; + edge = tw->model->edges + abs(edgeNum); + CM_SetEdgeSidedness( edge, tw->polygonEdgePlueckerCache[i], v->pl, bitNum ); + if ( INTSIGNBITSET(edgeNum) ^ ((edge->side >> bitNum) & 1) ) { + return; + } + } + if ( f < 0.0f ) { + f = 0.0f; + } + tw->trace.fraction = f; + // collision plane is the polygon plane + tw->trace.c.normal = poly->plane.Normal(); + tw->trace.c.dist = poly->plane.Dist(); + tw->trace.c.contents = poly->contents; + tw->trace.c.material = poly->material; + tw->trace.c.type = CONTACT_TRMVERTEX; + tw->trace.c.modelFeature = *reinterpret_cast(&poly); + tw->trace.c.trmFeature = v - tw->vertices; + tw->trace.c.point = v->p + tw->trace.fraction * ( v->endp - v->p ); + // if retrieving contacts + if ( tw->getContacts ) { + CM_AddContact( tw ); + // no need to store the trm vertex more than once as a contact + v->used = false; + } + } +} + +/* +================ +idCollisionModelManagerLocal::TranslatePointThroughPolygon +================ +*/ +void idCollisionModelManagerLocal::TranslatePointThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *poly, cm_trmVertex_t *v ) { + int i, edgeNum; + float f; + cm_edge_t *edge; + idPluecker pl; + + f = CM_TranslationPlaneFraction( poly->plane, v->p, v->endp ); + if ( f < tw->trace.fraction ) { + + for ( i = 0; i < poly->numEdges; i++ ) { + edgeNum = poly->edges[i]; + edge = tw->model->edges + abs(edgeNum); + // if we didn't yet calculate the sidedness for this edge + if ( edge->checkcount != idCollisionModelManagerLocal::checkCount ) { + float fl; + edge->checkcount = idCollisionModelManagerLocal::checkCount; + pl.FromLine(tw->model->vertices[edge->vertexNum[0]].p, tw->model->vertices[edge->vertexNum[1]].p); + fl = v->pl.PermutedInnerProduct( pl ); + edge->side = FLOATSIGNBITSET(fl); + } + // if the point passes the edge at the wrong side + //if ( (edgeNum > 0) == edge->side ) { + if ( INTSIGNBITSET(edgeNum) ^ edge->side ) { + return; + } + } + if ( f < 0.0f ) { + f = 0.0f; + } + tw->trace.fraction = f; + // collision plane is the polygon plane + tw->trace.c.normal = poly->plane.Normal(); + tw->trace.c.dist = poly->plane.Dist(); + tw->trace.c.contents = poly->contents; + tw->trace.c.material = poly->material; + tw->trace.c.type = CONTACT_TRMVERTEX; + tw->trace.c.modelFeature = *reinterpret_cast(&poly); + tw->trace.c.trmFeature = v - tw->vertices; + tw->trace.c.point = v->p + tw->trace.fraction * ( v->endp - v->p ); + // if retrieving contacts + if ( tw->getContacts ) { + CM_AddContact( tw ); + // no need to store the trm vertex more than once as a contact + v->used = false; + } + } +} + +/* +================ +idCollisionModelManagerLocal::TranslateVertexThroughTrmPolygon +================ +*/ +void idCollisionModelManagerLocal::TranslateVertexThroughTrmPolygon( cm_traceWork_t *tw, cm_trmPolygon_t *trmpoly, cm_polygon_t *poly, cm_vertex_t *v, idVec3 &endp, idPluecker &pl ) { + int i, edgeNum; + float f; + cm_trmEdge_t *edge; + + f = CM_TranslationPlaneFraction( trmpoly->plane, v->p, endp ); + if ( f < tw->trace.fraction ) { + + for ( i = 0; i < trmpoly->numEdges; i++ ) { + edgeNum = trmpoly->edges[i]; + edge = tw->edges + abs(edgeNum); + + CM_SetVertexSidedness( v, pl, edge->pl, edge->bitNum ); + if ( INTSIGNBITSET(edgeNum) ^ ((v->side >> edge->bitNum) & 1) ) { + return; + } + } + if ( f < 0.0f ) { + f = 0.0f; + } + tw->trace.fraction = f; + // collision plane is the inverse trm polygon plane + tw->trace.c.normal = -trmpoly->plane.Normal(); + tw->trace.c.dist = -trmpoly->plane.Dist(); + tw->trace.c.contents = poly->contents; + tw->trace.c.material = poly->material; + tw->trace.c.type = CONTACT_MODELVERTEX; + tw->trace.c.modelFeature = v - tw->model->vertices; + tw->trace.c.trmFeature = trmpoly - tw->polys; + tw->trace.c.point = v->p + tw->trace.fraction * ( endp - v->p ); + // if retrieving contacts + if ( tw->getContacts ) { + CM_AddContact( tw ); + } + } +} + +/* +================ +idCollisionModelManagerLocal::TranslateTrmThroughPolygon + + returns true if the polygon blocks the complete translation +================ +*/ +bool idCollisionModelManagerLocal::TranslateTrmThroughPolygon( cm_traceWork_t *tw, cm_polygon_t *p ) { + int i, j, k, edgeNum; + float fraction, d; + idVec3 endp; + idPluecker *pl; + cm_trmVertex_t *bv; + cm_trmEdge_t *be; + cm_trmPolygon_t *bp; + cm_vertex_t *v; + cm_edge_t *e; + + // if already checked this polygon + if ( p->checkcount == idCollisionModelManagerLocal::checkCount ) { + return false; + } + p->checkcount = idCollisionModelManagerLocal::checkCount; + + // if this polygon does not have the right contents behind it + if ( !(p->contents & tw->contents) ) { + return false; + } + + // if the the trace bounds do not intersect the polygon bounds + if ( !tw->bounds.IntersectsBounds( p->bounds ) ) { + return false; + } + + // only collide with the polygon if approaching at the front + if ( ( p->plane.Normal() * tw->dir ) > 0.0f ) { + return false; + } + + // if the polygon is too far from the first heart plane + d = p->bounds.PlaneDistance( tw->heartPlane1 ); + if ( idMath::Fabs(d) > tw->maxDistFromHeartPlane1 ) { + return false; + } + + // if the polygon is too far from the second heart plane + d = p->bounds.PlaneDistance( tw->heartPlane2 ); + if ( idMath::Fabs(d) > tw->maxDistFromHeartPlane2 ) { + return false; + } + fraction = tw->trace.fraction; + + // fast point trace + if ( tw->pointTrace ) { + idCollisionModelManagerLocal::TranslatePointThroughPolygon( tw, p, &tw->vertices[0] ); + } + else { + + // trace bounds should cross polygon plane + switch ( tw->bounds.PlaneSide( p->plane ) ) { + case PLANESIDE_CROSS: + break; + case PLANESIDE_FRONT: + if ( tw->model->isConvex ) { + tw->quickExit = true; + return true; + } + default: + return false; + } + + // calculate pluecker coordinates for the polygon edges and polygon vertices + for ( i = 0; i < p->numEdges; i++ ) { + edgeNum = p->edges[i]; + e = tw->model->edges + abs(edgeNum); + // reset sidedness cache if this is the first time we encounter this edge during this trace + if ( e->checkcount != idCollisionModelManagerLocal::checkCount ) { + e->sideSet = 0; + } + // pluecker coordinate for edge + tw->polygonEdgePlueckerCache[i].FromLine( tw->model->vertices[e->vertexNum[0]].p, + tw->model->vertices[e->vertexNum[1]].p ); + + v = &tw->model->vertices[e->vertexNum[INTSIGNBITSET(edgeNum)]]; + // reset sidedness cache if this is the first time we encounter this vertex during this trace + if ( v->checkcount != idCollisionModelManagerLocal::checkCount ) { + v->sideSet = 0; + } + // pluecker coordinate for vertex movement vector + tw->polygonVertexPlueckerCache[i].FromRay( v->p, -tw->dir ); + } + // copy first to last so we can easily cycle through for the edges + tw->polygonVertexPlueckerCache[p->numEdges] = tw->polygonVertexPlueckerCache[0]; + + // trace trm vertices through polygon + for ( i = 0; i < tw->numVerts; i++ ) { + bv = tw->vertices + i; + if ( bv->used ) { + idCollisionModelManagerLocal::TranslateTrmVertexThroughPolygon( tw, p, bv, i ); + } + } + + // trace trm edges through polygon + for ( i = 1; i <= tw->numEdges; i++ ) { + be = tw->edges + i; + if ( be->used ) { + idCollisionModelManagerLocal::TranslateTrmEdgeThroughPolygon( tw, p, be); + } + } + + // trace all polygon vertices through the trm + for ( i = 0; i < p->numEdges; i++ ) { + edgeNum = p->edges[i]; + e = tw->model->edges + abs(edgeNum); + + if ( e->checkcount == idCollisionModelManagerLocal::checkCount ) { + continue; + } + // set edge check count + e->checkcount = idCollisionModelManagerLocal::checkCount; + // can never collide with internal edges + if ( e->internal ) { + continue; + } + // got to check both vertices because we skip internal edges + for ( k = 0; k < 2; k++ ) { + + v = tw->model->vertices + e->vertexNum[k ^ INTSIGNBITSET(edgeNum)]; + // if this vertex is already checked + if ( v->checkcount == idCollisionModelManagerLocal::checkCount ) { + continue; + } + // set vertex check count + v->checkcount = idCollisionModelManagerLocal::checkCount; + + // if the vertex is outside the trace bounds + if ( !tw->bounds.ContainsPoint( v->p ) ) { + continue; + } + + // vertex end point after movement + endp = v->p - tw->dir; + // pluecker coordinate for vertex movement vector + pl = &tw->polygonVertexPlueckerCache[i+k]; + + for ( j = 0; j < tw->numPolys; j++ ) { + bp = tw->polys + j; + if ( bp->used ) { + idCollisionModelManagerLocal::TranslateVertexThroughTrmPolygon( tw, bp, p, v, endp, *pl ); + } + } + } + } + } + + // if there was a collision with this polygon and we are not retrieving contacts + if ( tw->trace.fraction < fraction && !tw->getContacts ) { + fraction = tw->trace.fraction; + endp = tw->start + fraction * tw->dir; + // decrease bounds + for ( i = 0; i < 3; i++ ) { + if ( tw->start[i] < endp[i] ) { + tw->bounds[0][i] = tw->start[i] + tw->size[0][i] - CM_BOX_EPSILON; + tw->bounds[1][i] = endp[i] + tw->size[1][i] + CM_BOX_EPSILON; + } + else { + tw->bounds[0][i] = endp[i] + tw->size[0][i] - CM_BOX_EPSILON; + tw->bounds[1][i] = tw->start[i] + tw->size[1][i] + CM_BOX_EPSILON; + } + } + } + + return ( tw->trace.fraction == 0.0f ); +} + +/* +================ +idCollisionModelManagerLocal::SetupTrm +================ +*/ +void idCollisionModelManagerLocal::SetupTrm( cm_traceWork_t *tw, const idTraceModel *trm ) { + int i, j; + + // vertices + tw->numVerts = trm->numVerts; + for ( i = 0; i < trm->numVerts; i++ ) { + tw->vertices[i].p = trm->verts[i]; + tw->vertices[i].used = false; + } + // edges + tw->numEdges = trm->numEdges; + for ( i = 1; i <= trm->numEdges; i++ ) { + tw->edges[i].vertexNum[0] = trm->edges[i].v[0]; + tw->edges[i].vertexNum[1] = trm->edges[i].v[1]; + tw->edges[i].used = false; + } + // polygons + tw->numPolys = trm->numPolys; + for ( i = 0; i < trm->numPolys; i++ ) { + tw->polys[i].numEdges = trm->polys[i].numEdges; + for ( j = 0; j < trm->polys[i].numEdges; j++ ) { + tw->polys[i].edges[j] = trm->polys[i].edges[j]; + } + tw->polys[i].plane.SetNormal( trm->polys[i].normal ); + tw->polys[i].used = false; + } + // is the trace model convex or not + tw->isConvex = trm->isConvex; +} + +/* +================ +idCollisionModelManagerLocal::SetupTranslationHeartPlanes +================ +*/ +void idCollisionModelManagerLocal::SetupTranslationHeartPlanes( cm_traceWork_t *tw ) { + idVec3 dir, normal1, normal2; + + // calculate trace heart planes + dir = tw->dir; + dir.Normalize(); + dir.NormalVectors( normal1, normal2 ); + tw->heartPlane1.SetNormal( normal1 ); + tw->heartPlane1.FitThroughPoint( tw->start ); + tw->heartPlane2.SetNormal( normal2 ); + tw->heartPlane2.FitThroughPoint( tw->start ); +} + +/* +================ +idCollisionModelManagerLocal::Translation +================ +*/ +#ifdef _DEBUG +static int entered = 0; +#endif + +void idCollisionModelManagerLocal::Translation( trace_t *results, const idVec3 &start, const idVec3 &end, + const idTraceModel *trm, const idMat3 &trmAxis, int contentMask, + cmHandle_t model, const idVec3 &modelOrigin, const idMat3 &modelAxis ) { + + int i, j; + float dist; + bool model_rotated, trm_rotated; + idVec3 dir1, dir2, dir; + idMat3 invModelAxis, tmpAxis; + cm_trmPolygon_t *poly; + cm_trmEdge_t *edge; + cm_trmVertex_t *vert; + ALIGN16( static cm_traceWork_t tw ); + + assert( ((byte *)&start) < ((byte *)results) || ((byte *)&start) >= (((byte *)results) + sizeof( trace_t )) ); + assert( ((byte *)&end) < ((byte *)results) || ((byte *)&end) >= (((byte *)results) + sizeof( trace_t )) ); + assert( ((byte *)&trmAxis) < ((byte *)results) || ((byte *)&trmAxis) >= (((byte *)results) + sizeof( trace_t )) ); + + memset( results, 0, sizeof( *results ) ); + + if ( model < 0 || model > MAX_SUBMODELS || model > idCollisionModelManagerLocal::maxModels ) { + common->Printf("idCollisionModelManagerLocal::Translation: invalid model handle\n"); + return; + } + if ( !idCollisionModelManagerLocal::models[model] ) { + common->Printf("idCollisionModelManagerLocal::Translation: invalid model\n"); + return; + } + + // if case special position test + if ( start[0] == end[0] && start[1] == end[1] && start[2] == end[2] ) { + idCollisionModelManagerLocal::ContentsTrm( results, start, trm, trmAxis, contentMask, model, modelOrigin, modelAxis ); + return; + } + +#ifdef _DEBUG + bool startsolid = false; + // test whether or not stuck to begin with + if ( cm_debugCollision.GetBool() ) { + if ( !entered && !idCollisionModelManagerLocal::getContacts ) { + entered = 1; + // if already messed up to begin with + if ( idCollisionModelManagerLocal::Contents( start, trm, trmAxis, -1, model, modelOrigin, modelAxis ) & contentMask ) { + startsolid = true; + } + entered = 0; + } + } +#endif + + idCollisionModelManagerLocal::checkCount++; + + tw.trace.fraction = 1.0f; + tw.trace.c.contents = 0; + tw.trace.c.type = CONTACT_NONE; + tw.contents = contentMask; + tw.isConvex = true; + tw.rotation = false; + tw.positionTest = false; + tw.quickExit = false; + tw.getContacts = idCollisionModelManagerLocal::getContacts; + tw.contacts = idCollisionModelManagerLocal::contacts; + tw.maxContacts = idCollisionModelManagerLocal::maxContacts; + tw.numContacts = 0; + tw.model = idCollisionModelManagerLocal::models[model]; + tw.start = start - modelOrigin; + tw.end = end - modelOrigin; + tw.dir = end - start; + + model_rotated = modelAxis.IsRotated(); + if ( model_rotated ) { + invModelAxis = modelAxis.Transpose(); + } + + // if optimized point trace + if ( !trm || ( trm->bounds[1][0] - trm->bounds[0][0] <= 0.0f && + trm->bounds[1][1] - trm->bounds[0][1] <= 0.0f && + trm->bounds[1][2] - trm->bounds[0][2] <= 0.0f ) ) { + + if ( model_rotated ) { + // rotate trace instead of model + tw.start *= invModelAxis; + tw.end *= invModelAxis; + tw.dir *= invModelAxis; + } + + // trace bounds + for ( i = 0; i < 3; i++ ) { + if ( tw.start[i] < tw.end[i] ) { + tw.bounds[0][i] = tw.start[i] - CM_BOX_EPSILON; + tw.bounds[1][i] = tw.end[i] + CM_BOX_EPSILON; + } + else { + tw.bounds[0][i] = tw.end[i] - CM_BOX_EPSILON; + tw.bounds[1][i] = tw.start[i] + CM_BOX_EPSILON; + } + } + tw.extents[0] = tw.extents[1] = tw.extents[2] = CM_BOX_EPSILON; + tw.size.Zero(); + + // setup trace heart planes + idCollisionModelManagerLocal::SetupTranslationHeartPlanes( &tw ); + tw.maxDistFromHeartPlane1 = CM_BOX_EPSILON; + tw.maxDistFromHeartPlane2 = CM_BOX_EPSILON; + // collision with single point + tw.numVerts = 1; + tw.vertices[0].p = tw.start; + tw.vertices[0].endp = tw.vertices[0].p + tw.dir; + tw.vertices[0].pl.FromRay( tw.vertices[0].p, tw.dir ); + tw.numEdges = tw.numPolys = 0; + tw.pointTrace = true; + // trace through the model + idCollisionModelManagerLocal::TraceThroughModel( &tw ); + // store results + *results = tw.trace; + results->endpos = start + results->fraction * (end - start); + results->endAxis = mat3_identity; + + if ( results->fraction < 1.0f ) { + // rotate trace plane normal if there was a collision with a rotated model + if ( model_rotated ) { + results->c.normal *= modelAxis; + results->c.point *= modelAxis; + } + results->c.point += modelOrigin; + results->c.dist += modelOrigin * results->c.normal; + } + idCollisionModelManagerLocal::numContacts = tw.numContacts; + return; + } + + // the trace fraction is too inaccurate to describe translations over huge distances + if ( tw.dir.LengthSqr() > Square( CM_MAX_TRACE_DIST ) ) { + results->fraction = 0.0f; + results->endpos = start; + results->endAxis = trmAxis; + results->c.normal = vec3_origin; + results->c.material = NULL; + results->c.point = start; + if ( session->rw ) { + session->rw->DebugArrow( colorRed, start, end, 1 ); + } + common->Printf( "idCollisionModelManagerLocal::Translation: huge translation\n" ); + return; + } + + tw.pointTrace = false; + tw.size.Clear(); + + // setup trm structure + idCollisionModelManagerLocal::SetupTrm( &tw, trm ); + + trm_rotated = trmAxis.IsRotated(); + + // calculate vertex positions + if ( trm_rotated ) { + for ( i = 0; i < tw.numVerts; i++ ) { + // rotate trm around the start position + tw.vertices[i].p *= trmAxis; + } + } + for ( i = 0; i < tw.numVerts; i++ ) { + // set trm at start position + tw.vertices[i].p += tw.start; + } + if ( model_rotated ) { + for ( i = 0; i < tw.numVerts; i++ ) { + // rotate trm around model instead of rotating the model + tw.vertices[i].p *= invModelAxis; + } + } + + // add offset to start point + if ( trm_rotated ) { + dir = trm->offset * trmAxis; + tw.start += dir; + tw.end += dir; + } else { + tw.start += trm->offset; + tw.end += trm->offset; + } + if ( model_rotated ) { + // rotate trace instead of model + tw.start *= invModelAxis; + tw.end *= invModelAxis; + tw.dir *= invModelAxis; + } + + // rotate trm polygon planes + if ( trm_rotated & model_rotated ) { + tmpAxis = trmAxis * invModelAxis; + for ( poly = tw.polys, i = 0; i < tw.numPolys; i++, poly++ ) { + poly->plane *= tmpAxis; + } + } else if ( trm_rotated ) { + for ( poly = tw.polys, i = 0; i < tw.numPolys; i++, poly++ ) { + poly->plane *= trmAxis; + } + } else if ( model_rotated ) { + for ( poly = tw.polys, i = 0; i < tw.numPolys; i++, poly++ ) { + poly->plane *= invModelAxis; + } + } + + // setup trm polygons + for ( poly = tw.polys, i = 0; i < tw.numPolys; i++, poly++ ) { + // if the trm poly plane is facing in the movement direction + dist = poly->plane.Normal() * tw.dir; + if ( dist > 0.0f || ( !trm->isConvex && dist == 0.0f ) ) { + // this trm poly and it's edges and vertices need to be used for collision + poly->used = true; + for ( j = 0; j < poly->numEdges; j++ ) { + edge = &tw.edges[abs( poly->edges[j] )]; + edge->used = true; + tw.vertices[edge->vertexNum[0]].used = true; + tw.vertices[edge->vertexNum[1]].used = true; + } + } + } + + // setup trm vertices + for ( vert = tw.vertices, i = 0; i < tw.numVerts; i++, vert++ ) { + if ( !vert->used ) { + continue; + } + // get axial trm size after rotations + tw.size.AddPoint( vert->p - tw.start ); + // calculate the end position of each vertex for a full trace + vert->endp = vert->p + tw.dir; + // pluecker coordinate for vertex movement line + vert->pl.FromRay( vert->p, tw.dir ); + } + + // setup trm edges + for ( edge = tw.edges + 1, i = 1; i <= tw.numEdges; i++, edge++ ) { + if ( !edge->used ) { + continue; + } + // edge start, end and pluecker coordinate + edge->start = tw.vertices[edge->vertexNum[0]].p; + edge->end = tw.vertices[edge->vertexNum[1]].p; + edge->pl.FromLine( edge->start, edge->end ); + // calculate normal of plane through movement plane created by the edge + dir = edge->start - edge->end; + edge->cross[0] = dir[0] * tw.dir[1] - dir[1] * tw.dir[0]; + edge->cross[1] = dir[0] * tw.dir[2] - dir[2] * tw.dir[0]; + edge->cross[2] = dir[1] * tw.dir[2] - dir[2] * tw.dir[1]; + // bit for vertex sidedness bit cache + edge->bitNum = i; + } + + // set trm plane distances + for ( poly = tw.polys, i = 0; i < tw.numPolys; i++, poly++ ) { + if ( poly->used ) { + poly->plane.FitThroughPoint( tw.edges[abs(poly->edges[0])].start ); + } + } + + // bounds for full trace, a little bit larger for epsilons + for ( i = 0; i < 3; i++ ) { + if ( tw.start[i] < tw.end[i] ) { + tw.bounds[0][i] = tw.start[i] + tw.size[0][i] - CM_BOX_EPSILON; + tw.bounds[1][i] = tw.end[i] + tw.size[1][i] + CM_BOX_EPSILON; + } else { + tw.bounds[0][i] = tw.end[i] + tw.size[0][i] - CM_BOX_EPSILON; + tw.bounds[1][i] = tw.start[i] + tw.size[1][i] + CM_BOX_EPSILON; + } + if ( idMath::Fabs( tw.size[0][i] ) > idMath::Fabs( tw.size[1][i] ) ) { + tw.extents[i] = idMath::Fabs( tw.size[0][i] ) + CM_BOX_EPSILON; + } else { + tw.extents[i] = idMath::Fabs( tw.size[1][i] ) + CM_BOX_EPSILON; + } + } + + // setup trace heart planes + idCollisionModelManagerLocal::SetupTranslationHeartPlanes( &tw ); + tw.maxDistFromHeartPlane1 = 0; + tw.maxDistFromHeartPlane2 = 0; + // calculate maximum trm vertex distance from both heart planes + for ( vert = tw.vertices, i = 0; i < tw.numVerts; i++, vert++ ) { + if ( !vert->used ) { + continue; + } + dist = idMath::Fabs( tw.heartPlane1.Distance( vert->p ) ); + if ( dist > tw.maxDistFromHeartPlane1 ) { + tw.maxDistFromHeartPlane1 = dist; + } + dist = idMath::Fabs( tw.heartPlane2.Distance( vert->p ) ); + if ( dist > tw.maxDistFromHeartPlane2 ) { + tw.maxDistFromHeartPlane2 = dist; + } + } + // for epsilons + tw.maxDistFromHeartPlane1 += CM_BOX_EPSILON; + tw.maxDistFromHeartPlane2 += CM_BOX_EPSILON; + + // trace through the model + idCollisionModelManagerLocal::TraceThroughModel( &tw ); + + // if we're getting contacts + if ( tw.getContacts ) { + // move all contacts to world space + if ( model_rotated ) { + for ( i = 0; i < tw.numContacts; i++ ) { + tw.contacts[i].normal *= modelAxis; + tw.contacts[i].point *= modelAxis; + } + } + if ( modelOrigin != vec3_origin ) { + for ( i = 0; i < tw.numContacts; i++ ) { + tw.contacts[i].point += modelOrigin; + tw.contacts[i].dist += modelOrigin * tw.contacts[i].normal; + } + } + idCollisionModelManagerLocal::numContacts = tw.numContacts; + } else { + // store results + *results = tw.trace; + results->endpos = start + results->fraction * ( end - start ); + results->endAxis = trmAxis; + + if ( results->fraction < 1.0f ) { + // if the fraction is tiny the actual movement could end up zero + if ( results->fraction > 0.0f && results->endpos.Compare( start ) ) { + results->fraction = 0.0f; + } + // rotate trace plane normal if there was a collision with a rotated model + if ( model_rotated ) { + results->c.normal *= modelAxis; + results->c.point *= modelAxis; + } + results->c.point += modelOrigin; + results->c.dist += modelOrigin * results->c.normal; + } + } + +#ifdef _DEBUG + // test for missed collisions + if ( cm_debugCollision.GetBool() ) { + if ( !entered && !idCollisionModelManagerLocal::getContacts ) { + entered = 1; + // if the trm is stuck in the model + if ( idCollisionModelManagerLocal::Contents( results->endpos, trm, trmAxis, -1, model, modelOrigin, modelAxis ) & contentMask ) { + trace_t tr; + + // test where the trm is stuck in the model + idCollisionModelManagerLocal::Contents( results->endpos, trm, trmAxis, -1, model, modelOrigin, modelAxis ); + // re-run collision detection to find out where it failed + idCollisionModelManagerLocal::Translation( &tr, start, end, trm, trmAxis, contentMask, model, modelOrigin, modelAxis ); + } + entered = 0; + } + } +#endif +} diff --git a/neo/curl/CHANGES b/neo/curl/CHANGES new file mode 100644 index 0000000..3ada834 --- /dev/null +++ b/neo/curl/CHANGES @@ -0,0 +1,2078 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + Changelog + +Daniel (18 March 2004) +- Tor Arntsen brought some info about SGI IRIX: + + IRIX supports 3 different executable/object formats, -32, -n32 and -64. + -n32 is default 32-bit format, -32 is the "old" 32-bit format, and -64 is + the 64-bit format. Libraries for the different formats are in lib, lib32 + and lib64 respectively. + + We've now adjusted the configure script to adapt to this when scanning for + 3rd party libs, such as OpenSSL. + +Daniel (17 March 2004) +- Watz pointed out a few missing files in the MSVC project description file. + +- Günter Knauf brought patches, code and makefiles to build curl on Novell + NetWare. + +Daniel (15 March 2004) +- Lots of libcurl man pages were updated to contain references to other man + pages the recognized way so that they appear as nice hyperlinks in the HTML + versions. + +- buildconf now checks the m4 version too, since autoconf requires a GNU m4 + version to build proper configure scripts. + +Daniel (12 March 2004) +- Added CURLOPT_POSTFIELDSIZE_LARGE, the large file version of + CURLOPT_POSTFIELDSIZE to allow POSTs larger than 2GB. + +- David Byron fixed an uninitialized variable case/crash. + +Daniel (10 March 2004) +- Jeff Lawson fixed the SSL connection to deal with received signals during the + connect. + +- Changed the OS string for win32 to become "i386-pc-win32". + +Daniel (9 March 2004) +- Changed the internals to use curl_socket_t for socket variable type. This + should enable us to build with less warnings on Windows, where SOCKET is + used which is an unsigned int, while most other platforms use a mere int. + +- Modified lib/config-win32.h to build fine on MSVC again. + +Version 7.11.1-pre1 (8 March 2004) + +Daniel (8 March 2004) +- Minor fix to make curl CURL_VERSION_LARGEFILE is only set if curl_off_t is + larger than 4 bytes. + +Daniel (4 March 2004) +- Improved PUT/POST with NTLM/Digest authentication, the so called issue 12. + +- Modified the test HTTP server a lot to work with the upcoming changes for + PUT/POST with NTLM/Digest authentication (like test case 88). Added Andrés + García's win32-changes. Improved the logging. + +- Fixed the file:-related progress/getinfo stuff a bit more. + +Daniel (4 March 2004) +- I corrected a problem with the multi interface when following a Location: + header or when doing multiple-request authentications. A subsequent request + could erroneously re-use a previous connection that was sent with + Connection: close. Christopher R. Palmer reported. + +- Andrés García patched curl to prevent warnings while compiling with mingw, + mainly because it is now possible to have both WIN32 and HAVE_CONFIG_H + defined. + +- When transferring files from a file: URL, the progress meter and other + transfer metrics were not updated properly. + +- David Byron provided a "version resource" file to the curl executable for + the windows builds. + +Daniel (3 March 2004) +- David Byron's work on making libcurl only require winsock 1.1 on Windows + machines. + +- More variable cleanups based on compiler warnings generated by Tor Arntsen's + autobuilds with MIPSPro. + +- Joe Halpin helped us fix some pedantic compiler warnings on FreeBSD. + +- Applied Tom Bates' patch to build on nsr-tandem-nsk. + +- Dan Fandrich corrected some flaws in the configure GSS detection. + +Daniel (2 March 2004) +- Fixed the libcurl code to use FORMAT_OFF_T for printf() formatting + curl_off_t types internally. + +Daniel (1 March 2004) +- Added CURL_VERSION_LARGEFILE as a feature-bit in the curl_version_info() + response, that signals if this libcurl supports >2GB files. curl -V now + outputs 'Largefile' in the Features: field if this is the case. Most systems + are likely to support this. + +- We offer a CURL_FORMAT_OFF_T define in the public header, which can be used + to printf() curl_off_t variables. We also modified the libcurl sources to + use this define instead of the previous %Od approach (although I've left the + O-flag functional in the code). This should also prevent compilers to warn + on the home-grown option. + +- Fixed the resume-check code to test for a working resume at the end of the + headers and not at the first body-byte. + +- CURLOPT_DNS_USE_GLOBAL_CACHE is now considered obsolete. Stop using it. If + you need a global DNS cache for whatever reason, use the share interface and + you'll get a global cache that works the way it should work. You can even + have any number of global caches, all at your command. This is now also + mentioned in the docs. + +- Made the *printf code support the z-flag to enable size_t printf() in a + manner similar to how glibc allows it. To make printfing of this work on + platforms with 64bit size_t and 32bit ints. If there even are any! ;-) + +- Christopher R. Palmer discovered that if you CURLOPT_FRESH_CONNECT and + CURLAUTH_NTLM (or CURLAUTH_ANY and libcurl then picked NTLM), libcurl would + loop without succeeding to authenticate due to the new connection that was + made for all round-trips in the authentication. Now, the FRESH_CONNECT is + remade to only matter for the first connection made with curl_easy_perform() + and all the rest that might follow due to FOLLOWLOCATION or HTTP + authentication are now ignoring that option. + +- Adjusted the QUIT code slightly since it could core-dump. + +- Corrected the test suite's FTP server to provide a correct size to the + 'verifiedserver' request. + +Daniel (27 February 2004) +- Joe Halpin made the FTP code send QUIT on the control connection before + disconnecting the TCP connection. This is what good-behaving ftp clients + should do. + +Daniel (26 February 2004) +- David Byron updated several files to make curl build fine on MSVC 6. He + also added the 'buildconf.bat' that works like the 'buildconf + configure' + combo does on unixes. + +- Gisle Vanem made the memdebug stuff support calloc() as well. + +- Tor Arntsen pointed out that testcurl.sh needed to remove the generated + files in order to have them re-generated in each build. + +- Andy Serpa found out that the share interface did not enjoy life when not + having the lock and unlock callbacks set, even though documented to be + OK. It still is OK, and now the code won't segfault anymore! + +Daniel (25 February 2004) +- Based on a patch by Greg Hewgill I modified how long long is used in the + mprintf code, as we can use a 64bit type with MSVC that is a long long + equivalent. This corrects some weird large file behaviors on windows. + +- Tor Arntsen helped me work out --enable-debug to work better with different + versions of the gcc and icc compilers. + +- Added CURLOPT_SHARE to the curl_easy_setopt.3 man page. + +Daniel (22 February 2004) +- Applied the final pieces of Gisle Vanem's patch that brings a working name + resolve timeout to the windows versions of curl! + +Daniel (21 February 2004) +- David Byron's fix to allow the speed-limit logic work even if you set + limit-rate. It does work on the expense of the rate limiter. + +Daniel (20 February 2004) +- configure --enable-debug with gcc now also tries to detect the icc compiler + (which somehow gets treated as if it is a gcc) to stop using all the gcc + options with it, and we also provide -isystem options for each extra -I + option the configure script has figured out (for OpenSSL, kerberos, zlib, + Heimdal etc). This of course to prevent warnings on headers we don't have + control of. + +Daniel (19 February 2004) +- Doug Porter made libcurl use the HOME environment variable before the + getpwuid results when looking for .netrc files. + +- If 'configure --enable-debug' is used with gcc, it now checks which gcc + version it is and uses as picky compiler options as possible for the + particular version. + +- Code that can be used in both the lib and in the curl app is now made to use + the curlx_ prefix. The first function to be available like this is the + curlx_strtoll() function. This is made to allow the app to use existing code, + but without polluting the libcurl API. Further explanations posted here: + + http://curl.haxx.se/mail/lib-2004-02/0215.html + +Daniel (18 February 2004) +- Fixed buildconf to not use "which" as AIX and Tru64 have what have been + referred to as "horribly broken 'which' programs". + +- Made sure dns cache timeout set to -1 really means caching forever. + +Daniel (17 February 2004) +- Made it possibly to build c-ares with the libcurl memdebug system to better + track memory. + +Daniel (16 February 2004) +- When using ares, we now initialize the ares 'channel' in curl_easy_init() + and re-use that same handle during the entire curl handle's life-time. It + improves performance. + +- Fixed a problem when displaying verbose for ipv6-enabled libcurls and + re-used connections. Problem reported and fix verified by Grigory Entin. + +- Jeff Lawson fixed the version-check in the SOCKS5 code. + +Daniel (15 February 2004) +- Fixed a case where a host cache entry was not flagged in-use properly when a + cached entry was used. + +- Andrés García's patch that checks for winmm in the configure script was + applied. + +Daniel (13 February 2004) +- Ben Greear's SO_BINDTODEVICE patch for the binding of the local end to a + specific network interface. + +- Greg Hewgill found out that the variable holding 'contentlength' wasn't big + enough to hold a large file! + +- Tor Arntsen fixed a 64bit-related problem in date-related code in the ftp + department, and there was another potential problem in the name resolve code + too. + +Daniel (11 February 2004) +- Removed a few variables that were only set but never used, as some compilers + warn about that and we do not like compiler warnings! + +- Removed the need for symlinks in the tests/data directory if curl is built + outside of the source directory and the 'make test' is used. This was done + by providing a "source dir path" to the scripts/servers. + +- Now, if the configure script can't find an nroff tool or an option to nroff + to use to convert man pages with, it will completely switch off the built-in + manual. + +- 'configure --disable-manual' completely disables the built-in manual from + the curl command tool. + +- Andrés García fixed the configure script and a minor source edit, and now + he has managed to get msys/mingw to run configure and then build! + +Daniel (9 February 2004) +- The default HTTP Accept: header was modified to the much simpler + "Accept: */*". + +- P R Schaffner updated the curl-ssl spec file for RPMs. + +- Dominick Meglio brought lots of documentation for the share interface's man + pages that were previously missing. + +- Tor Arntsen provided a patch that makes libcurl work-around a bug in the + AIX5 implementation of getaddrinfo(). This makes the FTP PORT stuff work on + ipv6-enabled AIX builds. + +- Ken Rastatter provided portability fixes for the curlgtk.c example, and now + it runs on windows with GTK as well! + +Daniel (6 February 2004) +- Andrés García made the configure script find gethostbyname() fine when run + with mingw on windows. + +- Modified the ldap code to use proper function pointers all over (instead of + mixed data and function pointers) to work-around the picky MIPSPro compiler + warnings. + +- A custom Host: header is only considered if the request is not made by + following a location. After discussions with Tim Baker. + +Daniel (5 February 2004) +- The libz part of the configure script now only set the two libz-related + define HAVE_ZLIB_H and HAVE_LIBZ if both the lib and the header is found. + If one is missing, none of the defines is set. + +- Andrés García fixed the Mingw makefiles. + +- Len Krause reported that curl 7.9.X could do uploading from stdin without + doing chunked encoding, which current curl cannot do even if you disable + the transfer-encoding chunked header. Now it can again, and test case 98 + verifies this functionality. + +- Tor Arntsen fixed a weird getaddrinfo() usage in the FTP code, preventing + the ipv6-code for PORT work on AIX 5.2. We now also provide (better) error + messages when bailing out in the that function. + +- Tor Arntsen now provides AIX and IRIX (using gcc, xlc and the MIPSPro + compilers) automated build logs (http://curl.haxx.se/auto/) and we've fixed + numerous minor quirks to make less warnings appear. + +Daniel (4 February 2004) +- Based on a patch by Gilad, we now use the custom timeouts when waiting for a + server to connect when using FTP PORT. Previously we always waited 10 + seconds, no more no less. We now also changed the default (if no timeout is + set) to wait 60 seconds for the connect before we fail. + +Daniel (3 February 2004) +- Modified to link with c-ares instead of ares. + +Daniel (2 February 2004) +- Added a configure test to check for which option the (g)nroff tool wants + to extract plain text from the man pages. Tor Arntsen told us the AIX + version of GNU gnroff doesn't support -man! + +- Added an undef of accept in memdebug.h to make curl build with --enable-debug + on AIX 5.2 which seems to have accept defined. Reported by Tor Arntsen. + +- curl_version() now includes c-ares version info, and curl_version_info() now + returns a struct with version SECOND that also includes that info. + +- We are now officially using c-ares for asynch name resolves. c-ares is the + new library, based on the existing ares but with an extended and slightly + modified API. + +- Dirk improved the ares timeout code, and now we also include the ares error + string when we fail to resolve a name. + +- Another tweak to make test case 91 run fine. Now we have another bit on a + connection that is set true if the connection is marked for 'retry'. That + makes the connection get closed and re-opened and the HTTP-done code must + not complain on the fact that no data was received. + +- Based on Dirk Manske's patch, I modified the name resolving with ares to + feature a timeout for really slow lookups. It now defaults to 300 seconds, + but is now adjusted to the CONNECTTIMEOUT/TIMOUE timeouts if one of them + is set. + +- Fixed the inclusion of ca-bundle.h to really use the one in the build dir + before the one in the source dir. Domenico Andreoli found out and reported. + +- Added test case 97, a simple POST with a custom Content-Type header + replacing the original application/x-www-form-urlencoded one. + +Daniel (30 January 2004) +- Added code that attempts to fix the test 91 failure. As has been figured out + by Patrick Smith, the error happens because we re-use a connection that the + server is just about to close and we even manage to send away the request + without seeing an error. On the first read attempt we get a ECONNRESET. + Starting now, we attempt to detect this and if so, we retry the request on a + fresh connection. + +- I added test case 510 which is a custom program that does a POST using a + read callback, with chunked transfer-encoding. + +- Adjusted one of the MPE/iX changes as it made test case 504 fail all over. + +- Added --socks as a recognized option. It works just like --proxy but sets a + SOCKS5 proxy to use. SOCKS5 support has been available in libcurl for a + while, just not provided by the curl tool. This does not currently work for + IPv6-enabled libcurls. + +Daniel (29 January 2004) +- Stadler Stephan pointed out that src/hugehelp.c included config.h without + checking the define if its present... + +- Ken Hirsch provided patches to make curl build fine on the MPE/iX operating + system. + +- Dan Fandrich compiled curl with lots of aggressively pedantic compiler + options and thus found a few minor errors and did some general cleanups to + avoid them. + +- Dirk Manske fixed a flaw in ares that prevented it to use non-blocking + sockets properly. + +Daniel (28 January 2004) +- Richard Bramante fixed chunked transfer-encoded "uploads" to send a final + CRLF combo properly. + +Daniel (27 January 2004) +- Made the response-headers during a CONNECT request to a proxy get passed on + as regular headers, so they appear with -i/-I options and similar. + +- Based on a patch by Gisle Vanem, I've made the progress meter display + properly switch to a GB-display when more than 9999MB have been transfered. + +Daniel (23 January 2004) +- Gisle Vanem pointed out a curlrc parser problem/crash when an option with a + required didn't have one and was on the last line of a file. + +- More Windows fixes for large files. We now build and link with + ../lib/strtoofft.c in the app code since Curl_strtoll() is not a provided + libcurl function... Perhaps we should consider a 'common' dir or similar + where we put source code used in both the lib and the client. Or perhaps + we'll just make this function available in the library... + +- Vincent Bronner found out the socks5 code crashed when no username was + set. + +- Vincent Bronner spotted a problem with proxy username/password when re-using + a persistent connection. + +- Fixed the progress meter display for files larger than 2^31 bytes. Gisle + Vanem reported. + +Daniel (22 January 2004) +- Gisle Vanem made strtoll() get used when curl is built with the mingw + compiler. + +- Gisle Vanem fixed the compressed help text code to display properly. + +- Removed the '#define HttpPost' from the public header file, as curl_httppost + is the proper name and it has been for quite some time now. Fixes another + name space pollution. + +- Added 'curl_off_t' typedef in the public header file, to be used to provide + large file sizes to the *_LARGE options. Adjusted the code all over to use + this variable type instead of 'off_t'. This is an attempt to make the large + file support work on more platforms. The configure script now checks the + size of the curl_off_t instead of the plain off_t. + +Version 7.11.0 (22 January 2004) + +Daniel (21 January 2004) +- Removed the defines in the public header file with TIMECOND_ prefixes. They + have been obsolete since April 22nd 2002, and if this causes anyone any + problems now it is very easy to just add CURL_ to the names. This corrects + this name space pollution. + +Daniel (19 January 2004) +- David Byron cleaned up how --trace with no option was treated, and also + arguments in a config file without a required parameter! + +Daniel (16 January 2004) +- Gisle Vanem fixed a few issues where compilers warned about variables + possibly being used unassigned. + +- Minor Interix build problem fixed. + +Daniel (15 January 2004) +- Peter Sylvester pointed out some necessary escaping needed in the + acinclude.m4 file when automake 1.8 or later is used. + +Daniel (14 January 2004) +- Vincent Bronner fixed the Curl_resolv() return code. This extends the fix + Steve Green provided on december 3... + +Daniel (13 January 2004) +- Luke Call made the win32 version of the password prompting function support + backspace. + +- Dan Fandrich fixed the hugehelp source file to contain both a compressed and + an uncompressed version in the distribution, so that more people easier can + build curl with the compressed version. + +- Diego Casorran brought another AmigaOS build patch for native Amiga builds. + +- Matt Veenstra updated the Mac OS X framework files. + +- Brian R Duffy brought a section to the INSTALL file on how to build a + SSL-enabled curl using the free Borland C++ compiler. He also updated the + Borland lib/Makefile.b32. + +- I fixed the test case 509 which I broke yesterday. Now the libtest are + compiled with an include path that points to the library's source dir, so + that the libtests can include files from the source tree. This was made to + make it possible to use the USE_SSLEAY define in the library test files. + +Daniel (12 January 2004) +- Peter Sylvester brought code that now allows a callback to modified the URL + even when the multi interface is used, and then libcurl will simulate a + "follow location" to that new URL. Test 509 was added to test this feature. + +- Extended the time we retry servers in the test script, and I also made it + retry the https and ftps servers before they are considered bad. I believe + the previous approach could turn problematic on really slow hosts. + +Version 7.11.0-pre1 (12 January 2004) + +Daniel (11 January 2004) +- Dominick Meglio pointed out FTPS should use default port 990 according to + IANA. + +Daniel (8 January 2004) +- Fixed the SPNEGO configure check to not use -R or other non-portable options + in the LDFLAGS. Reported by Pierre in bug report #872930. + +Daniel (5 January 2004) +- Dan Fandrich provided a fix on our zlib usage. + +- David J Meyer's patch that introduce large file support to libcurl was + applied. New curl_easy_setopt options that accept 'off_t' arguments are: + + INFILESIZE_LARGE + RESUME_FROM_LARGE + MAXFILESIZE_LARGE + +Daniel (4 January 2004) +- Based on Dominick Meglio's comments, I made our private version of + gettimeofday() declared static. This would otherwise collide with the same + function in other libs (like ares for example). + +- Added Dominick Meglio's description on how to build libcurl with ares + on win32. + +Daniel (19 December) +- CURLOPT_IPRESOLVE was not possible to set. + +- Gisle Vanem updated the djgpp build files. + +Daniel (18 December) +- John McGowan reported a redirect-problem that happened if a site used a URL + like "url.com?var=content" (without a proper slash) and from that address + redirected the user-agent to an absolute directory. + +- David Byron made libcurl build fine with both the .NET and VC6 versions of + MSVC + +Daniel (16 December) +- Updated test 506 since it started to fail after the cache prune change + yesterday. I also changed it slightly to feature a counter in each debug + output for easier tracing. + +Daniel (15 December) +- Old DNS cache entries are now only pruned after curl is done with a request, + and not in the actual name resolve call. + +- corrected the --enable-ares patch + +- Giuseppe Attardi found and fixed a problem within libcurl that re-used + already freed memory. + +Daniel (10 December) +- Gisle Vanem reported that the dict support was broken. I broke it during my + ftps-changes overhaul. I've now added a 'curlassert' function that can be + used to verify expressions, to prevent future errors of the same + kind. They're only present in debug-builds. + +- Diego Casorran made curl and libcurl possible to build natively (no more + need for the ixemul library) on AmigaOS. + +- Dominick Meglio made configure --enable-ares support a given path to the + installed ares lib, instead of always using it in the curl source tree. + This also fixed the curl-config --libs output. + +- Eric S. Raymond patched a very minor man page format error in + libcurl-errors.3 + +Daniel (8 December) +- Fixed the flaw that made -lz appear twice on the link command line. + +- After correspondence with Gisle Vanem, I changed the 'connection aborted' + error text when the FTP response reader failed to more specificly identify + what the problem is. + +- Based on a patch from Dominick Meglio, curl-config --feature now outputs + 'AsynchDNS' as a feature if libcurl was built with ares. The feature name + is the same that 'curl -V' outputs, for simplicity. + +Daniel (3 December) +- Marty Kuhrt made the build up-to-date on VMS, and moved most of the VMS- + specific stuff in the client code to a separate header file. + +- Steve Green fixed a return code bug in Curl_resolv(), that made the socks5 + code fail. + +- swalkaus at yahoo.com patched libcurl to ignore Content-Length: headers + when Transfer-Encoding: chunked is used, as mandated by RFC2616. + +Daniel (2 December) +- --ftp-pasv was added, which serves the only purpose of overriding a + previously set --ftpport option. Starting now, --ftp-port is a recognized + alias for --ftpport for consistency. + +- Giuseppe Attardi pointed out that we should use MSG_NOSIGNAL when we use + send() and recv(). I added checks for the define in the configure script and + adjusted the code accordingly. If the symbol is present, we won't attempt + to ignore the SIGPIPE signal. + +Daniel (1 December) +- Mathias Axelsson set up a bsdftpd-ssl server for me and I could make curl + run fine against its FTPS implementation. Now these FTPS-related things + work: + o explicit and implicit FTPS + o active (PORT) and passive (PASV) + o upload and download + o verified against bsdftpd-ssl and RaidenFTPD + +Daniel (27 November) +- James Clancy made the Borland Makefiles up to date. + +- Markus Moeller improved the SPNEGO detection in the configure script. + +Daniel (25 November) +- Dave May filed bug report #848371, identifying that if you'd do POST over a + proxy to a https server, libcurl didn't POST at all, it just made a GET! It + turned out to be because libcurl wrongly didn't consider the authentication + "negotiation phase" to be complete yet. + + I added test case 95 to verify my fix for this. + +Daniel (24 November) +- Thanks to Mathias Axelsson, I've been able to work on FTPS for libcurl and it + seems to work somewhat fine now. + + The FTPS stuff is based on RFC2228 and the murray-auth-ftp-ssl draft + (version 12). There seems to exist quite a few servers that have implemented + the server side of this. + + We can now use ftps:// URLs to explicitly switch on SSL/TSL for the control + connection and the data connection (dealing with two SSL connections forced + me to change a lot of stuff in libcurl). + + Alternatively, and what seems to be the recommended way, we can set the new + option CURLOPT_FTP_SSL to one of these values: + + CURLFTPSSL_NOPE, - do not attempt to use SSL + CURLFTPSSL_TRY - try using SSL, proceed anyway otherwise + CURLFTPSSL_CONTROL - SSL for the control connection or fail + CURLFTPSSL_ALL - SSL for all communication or fail + + Any failure to set the desired level will make libcurl fail with the error + code CURLE_FTP_SSL_FAILED. This new option makes a "normal" ftp:// transfer + attempt to be made securely. + + I've been able to login and get files (passively) from Mathias' server using + both ftps:// and CURLOPT_FTP_SSL. (I've made 'curl' understand the --ftp-ssl + option that sets CURLFTPSSL_TRY.) + +- Gaz Iqbal fixed a range string memory leak. + +- Gisle Vanem fixed the Windows builds. + +- Added the new FTPSSL defines in curl/curl.h + +Daniel (20 November) +- Josh Kapell filed bug report #845247 as he found an endless loop when + getting a 407 back from a proxy when no user+password was given. Added test + case 94 to verify the fix. + +Daniel (19 November) +- Kevin Roth fixed a progress-bar problem on Windows. + +- While working with Nicolas Croiset's bug report #843739, I noticed two minor + problems related to ftp partial downloads: if a partial transfer is + detected, we must close the connection as we cannot know in what state it is + anymore. This looks like a ProFTPD bug: + http://curl.haxx.se/mail/lib-2003-11/0079.html + +Daniel (17 November) +- Maciej W. Rozycki made the configure script use a cache variable for the + writable argv test. This way, the default can be overridden better (for + cross-compiles etc) + +Daniel (15 November) +- Mathias Axelsson found out libcurl sometimes freed the server certificate + twice, leading to crashes! + +Daniel (14 November) +- Siddhartha Prakash Jain found a case with a bad resolve that we didn't + properly bail out from, when using ares. + +Daniel (13 November) +- Default Content-Type for parts in multipart formposts has changed to + "application/octet-stream". This seems more appropriate, and I believe + mozilla and the likes do this. In the same area: .html files now get + text/html as Content-Type. (Pointed out in bug report #839806) + +- Gisle Vanem corrected the --progress-bar output by doing a flush of the + output, which apparently makes it look better on at least windows, but + possibly other platforms too. + +- Peter Sylvester identified a problem in the connect code, which made the + multi interface on a ipv6-enabled solaris box do bad. Test case 504 to be + specific. I've spent some time to clean-up the Curl_connecthost() function + now to use less duplicated code for the two different sections: ipv6 and + ipv4. + +Daniel (11 November) +- Added CURLOPT_NETRC_FILE. Use this to tell libcurl which file to use instead + of trying to find a .netrc in the current user's home directory. The + existing .netrc file finder is somewhat naive and is far from perfect on + several platforms that aren't unix-style. If this option isn't set when + CURLOPT_NETRC is set, the previous approach will still be used. + + The current .netrc check code now also support longer than 256 bytes path + names. + +Daniel (10 November) +- Kang-Jin Lee pointed out that the generated ca-bundle.h file shouldn't be + written in the source dir if a different build dir is used. + +- After Sébastien Willemijns' bug report, we now check the separators properly + in the 229-reply servers respond on a EPSV command and bail out better if + the reply string is not RFC2428-compliant. + +Daniel (7 November) +- Based on Gisle Vanem's patch, I made curl try harder to get the home + directory of the current user, in order to find the default .curlrc file. + We're also considering moving out the HOME-dir code from libcurl, and + instead have the app pass in the path to the .netrc file (which is the only + logic left in libcurl that uses the HOME dir). Then curl can use the home + dir for that purpose too. + +- Ralph Mitchell's updated testcurl.sh to the script to take an existing + directory name and build/run/test curl in there instead of trying to update + from CVS. Using this approach, the script can now be used to test daily + tarballs etc. + +- Gisle Vanem added a "resource file" to the Windows DLL builds, to contain + information such as version number, library name, copyright info etc. + +Daniel (6 November) +- curl checks if the existing libcurl supports things like --ntlm, --negotiate + and --krb4 and returns error if not. + +- I added three new global defines in the curl/curl.h header: + LIBCURL_VERSION_MAJOR, LIBCURL_VERSION_MINOR and LIBCURL_VERSION_PATCH. They + are the three numbers in the library's version number, separated for easier + usage. 'maketgz' was updated accordingly to generate these numbers properly + when building release-archives. + +- Uninitialized variable fix, reported by both Marty Kuhrt and Benjamin + Gerard. + +- Matt Veenstra provided build files to build libcurl as a "framework" under + Mac OS X. See the lib/libcurl.framework.make for details. + +- Removed the defines of TRUE and FALSE from the curl/curl.h header file. + They're not in our name space so we should not fiddle with them. + +Daniel (5 November) +- Replaced the man page to HTML converter program with a new one: roffit. + Makes nicer web pages. + +Daniel (4 November) +- Troels Walsted Hansen fixed the MSVC makefiles to let them build curl fine + on Windows. + +- Kevin Roth corrected the cygwin package generator and spell-fixed the + comment in the ca-bundle.h file. + +Version 7.10.8 (1 November 2003) + +Daniel (31 October) +- Assume that MDTM on an FTP server returns the timestamp using the UTC time + zone. This changes the time CURLINFO_FILETIME returns for a given file over + FTP, and will change existing uses of CURLOPT_TIMECONDITION. It will make + the functionality more similar to how the HTTP one is already working. + +- Command line options that take numerical parameters (such as -y, -Y, -C etc) + now report error and exit if the parameter isn't truly a number greater than + or equal to zero. This helps users to notice bad usage earlier. Before, when + a user forgot or missed to add a numerical parameter to an option, the + command line parser would simply "eat" the following option and it would + cause great confusion. + +Daniel (30 October) +- David Hull made libcurl deal with NOBODY and HEADER for file:// the same way + it already does for FTP: it provides HTTP-looking headers that provide info + only about the file, without doing the actual transfer. The curl tool then + lets --head do this. + +Daniel (29 October) +- runtests.pl now checks for and use valgrind if present. It will redirect the + valgrind results in log/valgrind[num] but it currently doesn't scan that + file for any errors or anything, that is still only made manually. + +- David Hull made the file: URL parser also accept the somewhat sloppy file + syntax: file:/path. I added test case 203 to verify this. + +Daniel (28 October) +- Dan C tracked down yet another weird behavior in the glibc gethostbyname_r() + function for some specific versions (reported on 2.2.5 and 2.1.1), and + provided a fix. On Linux machines with these glibc versions, non-ipv6 + builds of libcurl would often fail to resolve perfectly resolvable host + names. + +Daniel (26 October) +- James Bursa found out that curl_msnprintf() could write the trailing + zero-byte outside its given buffer size. This could happen if you generated + a very long error message as then libcurl would overwrite the ERRORBUFFER + with one byte. Using a non-existing very long local file:// name is one case + that could make this occur. + +Daniel (24 October) +- David Hull filed bug report #829827. It identified a problem with -C - if + the full file already was downloaded and thus the server responded with a + 416. libcurl would then wrongly use the Content-Length: header and expect + that size to get transfer, causing a "hang" until the server closed the + connection and then an error 18 ("still N bytes data left of the transfer"). + + Now we don't return any error at all, but I think libcurl should perhaps + return some kind of info since the requested range was out of the size of + the document. + +- Based on David Hull's fix in bug report #804599, we now check for solaris and + gcc in configure and set the -mimpure-text link flag for linking the lib + better. + +- I've introduced a -t option to the runtests.pl script. With that option set, + the script runs special "memory torture" tests. For each test command line + in that section, the script first runs the command line and counts the total + amount of allocations made. It then runs the exact same command line again, + forcing allocation number N to fail. It will try every N from 1 to the total + number of amounts made. For every invoke, it checks that no memory was + leaked as that would indicate a bad cleanup somewhere in the code. + + This is just beginning to work, and I've already made some corrections in + libcurl code. When this code works somewhat fine, I'll make sure 'make test' + in the root dir will run these tests as well. + +Daniel (23 October) +- Georg Horn fixed how the CA verification is made. Verifications can now be + made while at the same time the result of it can be ignored. This also + affects the curl tool as -k can now be used together with --cacert or + --capath. + +Daniel (22 October) +- Gisle Vanem found out --disable-eprt didn't work and patched it. + +- Test case 91 was modified and could now repeat the problem Kevin Roth has + reported, and the bug was fixed. + +- Dylan Ellicott added vc-libcurl-ssl-dll as a target to the root makefile + to build a static libcurl that links with a shared OpenSSL using MSVC. + +Daniel (21 October) +- Andrés García updated the mingw32 makefiles. + +Version 7.10.8-pre5 (21 October 2003) + +Daniel (19 October) +- Georg Horn made libcurl output more info on SSL failures when receiving + data. + +Version 7.10.8-pre4 (18 October 2003) + +Daniel (17 October) +- Dominick Meglio implemented CURLOPT_MAXFILESIZE and --max-filesize. + +- Made libcurl show verbose info about what auth type and user name that is + being sent in its HTTP request-headers. + +Daniel (16 October) +- Removed support for CURLOPT_PASSWDFUNCTION and CURLOPT_PASSWDDATA. libcurl + no longer prompt for passwords under any circumstances. Password prompting + was instead moved to curl, which now prompts for password if -u or -U lack + it. This solves the problem Kevin Roth reported when curl prompted for + password twice when doing NTLM authentication. + +- I rewrote the SSL subjectAltName check to avoid having to rely on OpenLDAP- + licensed derivate code. + +Daniel (15 October) +- Avoid doing getsockopt() on Windows to verify connects. It seems that this + hogs Windows machines when libcurl is being used multi-threaded (with > ~50 + threads). Andrew Fuller helped us verify and test this. + +Daniel (14 October) +- Kimmo Kinnunen fixed a crash with duphandle() when CURLDEBUG is set. + +- Gisle Vanem made libcurl build and work with IPv6 on Windows. + +Daniel (13 October) +- Giuseppe Attardi reported yet another segfault with ares and the multi + interface. Me fixed. + +- Domenico Andreoli removed the extra LDFLAGS assignment in lib/Makefile.am + that was reported about in the debian bug report #212086. + + Domenico also fixed two makefiles where we used 'gnroff' instead of the more + portable $(NROFF). + +Daniel (12 October) +- Dirk Manske made the share locking around DNS lookups slightly different to + allow the share system's DNS lookups to run somewhat more + independent/faster. + +Daniel (9 October) +- Lachlan O'Dea fixed a resume problem: "If I set CURLOPT_RESUME_FROM, perform + an HTTP download, then reset CURLOPT_RESUME_FROM to 0, the next download + still has a Range header with a garbage value." bug report #820502 + +- Dominick Meglio made the inet_pton.c file build fine using MSVC. + +- The 'sws' test suite web server now #include setup.h from the lib directory. + This makes it more portable easier. + +Version 7.10.8-pre3 (8 October 2003) + +Daniel (8 October) +- Frank Ticheler provided a patch that fixes how libcurl connects to multiple + addresses, if one of them fails (ipv4-code). + +Daniel (7 October) +- Neil Dunbar provided a patch that now makes libcurl check SSL + subjectAltNames when matching certs. This is apparently detailed in RFC2818 + as the right thing to do. I had to add configure checks for inet_pton() and + our own (strictly speaking, code from BIND written by Paul Vixie) provided + code for the function for platforms that miss it. + +- HTTP POST using the read callback didn't work, as Florian Schoppmann + reported. + +Daniel (5 October) +- Shared provided a few fixes to make libcurl build on BeOS + out-of-the-box. New code for BeOS-style non-blocking sockets, provided by + Shard and Jeremy Friesner. Modified the autoconf check for non-blocking + sockets to check for this kind too. + +Daniel (4 October) +- Vincent Bronner pointed out that if you set CURLOPT_COOKIE for a transfer + and then set it to NULL in a subsequent one, the previous cookie was still + sent off! + +- Jon Turner fixed a problem libcurl had when it failed on an FTP transfer due + to a bad path, it would cause the next transfer to use a bad path as well. + +- Siddhartha Prakash Jain provided a patch with a fix for libcurl with ares, + when working on IP-only names as we then could return "wait" status when the + name in fact already was resolved. I edited the patch slightly to not expose + asynch details to non-ares aware source code. + +Daniel (3 October) +- Neil Spring posted the debian bug report #213180, and pointed out that using + the name 'access' in a function prototype is not very wise as some compilers + complain. + +- Peter Sylvester provided his and Jean-Paul Merlin's curlx.c example source + code that shows how they use ssl and callbacks. + +Daniel (2 October) +- James MacMillan's patch makes curl build on QNX 6.2.x. + +Daniel (26 September) +- My daughter was born! + +Daniel (23 September) +- Added support for -4/--ipv4 and -6/--ipv6 to force names to resolve to that + particular IP version. They only work for IPv6-enabled libcurls. + +- curl -V now outputs 'SPNEGO' as a feature in case libcurl was built to + support that. + +Version 7.10.8-pre2 (22 September 2003) + +Daniel (22 September) +- Giuseppe Attardi found a segfault in libcurl when using the multi interface + with ares and doing repeated operations against a non-resolving host name. + +Daniel (19 September) +- Added the CURLOPT_IPRESOLVE option, that allows an application to select + what kind of IP addresses he wants to use when resolving host names. This + is only interesting when using host names that resolve addresses using more + than one version of IP. + +- Applied Markus Moeller's patch that introduces SPNEGO support if libcurl + is built with the FBopenssl libraries. curl_version_info() now returns + info on SPNEGO availability. The patch also made the GSSAPI stuff work fine + with the MIT GSS-library (the Heimdal one still works too). + +Daniel (16 September) +- Doing PUT with --digest failed, as reported in bug report #805853. + +- Using --anyauth that picked NTLM, and then a redirect closed the connection + and took curl to a second NTLM page made curl fail. Bug report #806328 + identified the problem, test case 90 was added to verify the fix. + +Daniel (14 September) +- codemastr brought a patch for ares to make the Windows portions of it work + properly on NT4. I uploaded a new diff and updated the docs on where to get + it etc. + +- Jeff Pohlmeyer tracked down a very hard-to-find bug where we removed a + cached DNS entry even though it may be in use, which caused "random" memory + to get overwritten and thus "random" crashes. + +Daniel (12 September) +- Based on a bug report by David Kimdon, I made the runtests.pl script clear + all possible proxy environment variables before the tests are run. + +- By default, easy handles within a multi handle now share DNS cache. + +- Tim Bartley brought a patch that makes the GSSNEGOTIATE option work for + Microsoft's "Negotiate" authentication as well. + +Daniel (11 September) +- A zero-length proxy string confused FTP transfers. + +- Bjorn Reese found a case with an uninitialized pointer, only present when + built for ares. + +Version 7.10.8-pre1 (8 September 2003) + +Daniel (7 September) +- Jurij Smakov found out that the non-OpenSSL MD5 code was not working on + Alpha (or ia64). Only the OpenSSL-version did. I made a fix I think corrects + the problem. + +Daniel (5 September) +- Kevin Fisk reported that configure --enable-thread didn't work. I fixed. + +- De-macrofied the lib/hash.c source code somewhat. + +Daniel (4 September) +- CURLINFO_HTTPAUTH_AVAIL and CURLINFO_PROXYAUTH_AVAIL added, Based on Joerg + Mueller-Tolk's patch, + +Early (4 September) +- Added CURLOPT_FTP_RESPONSE_TIMEOUT - allows user to set strict timeout + requirements on the FTP server's ability to respond to individual commands + without placing global requirements on transfer or connect time. Files + affected: + - include/curl/curl.h + Added option CURLOPT_FTP_RESPONSE_TIMEOUT + - lib/ftp.c + Added branch inside Curl_GetFTPResponse to check for + data->set.ftp_response_timeout + - lib/url.c + Modified Curl_setopt to recognize CURLOPT_FTP_RESPONSE_TIMEOUT + - lib/urldata.h + Added ftp_response_timeout to struct UserDefined + +Daniel (3 September) +- Peter Pentchev found and fixed two problems in the test suite's web server + code, that made it segfault at times. + +- Jörg Mueller-Tolk improved the proxy user+password handling, especially + when providing a blank password. + +Daniel (2 September) +- Fix for making CONNECT to proxies do the correct magic to allow NTLM, Digest + and similar to work. + +Daniel (1 September) +- Henrik Storner made libcurl work fine with OpenLDAP 2.1.22 (current). + +- Jeff Pohlmeyer added a proper error message for non-resolving hosts when + using ares for lookups. + +Daniel (25 August) +- John McGowan reported that curl -k still failed if the HTTPS server's CN + field wasn't obtainable. This was due to the CURLOPT_SSL_VERIFYHOST being + set to 1, and libcurl failed if the CN was missing. Starting now, having it + set to 1 will simply output a warning if no CN could be obtained (as having + a mismatch is OK). + +Daniel (21 August) +- Vincent Sanders provided a fix for name resolving when linked with uClibc. + +Daniel (20 August) +- Gerd v. Egidy provided a patch that makes libcurl store the FTP response + code from ftp servers. Using curl_easy_getinfo() with CURLINFO_HTTP_CODE + returns that data. The option is therefore now also known as + CURLINFO_RESPONSE_CODE. + +- Antoine Calando found a segfault when doing multi-part/formpost using + the multi interface. + +- Antoine Calando pointed out that curl_multi_info_read() didn't set the + msgs_in_queue to 0 properly when returning NULL. + +Daniel (19 August) +- I made curl support multiple -T options, as well as -T "{file1,file2}" + style globbing. One -T for each URL is supported. + +- Jeff Pohlmeyer found a segfault when using ares-enabled libcurl and the + multi interface when trying a non-existing host name. + +- Made the libcurl printf code support long longs if available. + +- Loren Kirkby pointed out that we did not clean up all SSL-allocated memory + in curl_global_cleanup(). + +Daniel (17 August) +- Setting CURLOPT_WRITEFUNCTION or CURLOPT_READFUNCTION to NULL will now make + them get the internal defaults restored. Previously this could cause a + segfault. We should aim at having all pointer-related options get restored + to default/safe values when set to NULL. + +Version 7.10.7 (15 August 2003) + +Daniel (14 August) +- I modified the memdebug system to return failure on memory allocation + functions after a set amount of successful ones. This enables us to test + out-of-memory situations in a controlled manner and we can make sure that + curl/libcurl behaves good in those. + + This made me find and fix several spots where we did not cleanup properly + when bailing out due to errors (low memory). + +- Corrected test case 74. Made using -o with bad #[num] codes complain and + bail out. Made #[num] support numbers larger than 9 as well. Added test + case 86 for a proper range globbing test as well. + +Version 7.10.7-pre4 (12 August 2003) + +Daniel (12 August) +- curl_version_info() now returns a flag if libcurl was built with asynch DNS + support, and this is now also displayed with 'curl -V'. + +- Added a few new man pages to the docs/libcurl dir: curl_share_init, + curl_share_setopt, curl_share_cleanup, libcurl-easy and libcurl-share. + +Daniel (11 August) +- Mike Cherepov made the local binding code work for Windows, which makes + the option CURLOPT_INTERFACE work on Windows as well. + +- Vincent Sanders updated the fopen.c example code a lot. + +- --proxy-ntlm is now supported by the curl tool. It forces the proxy + authentication to be made using NTLM. It does not yet work for HTTPS over + proxies (or other proxy-tunneling options). Test case 81 and 82 do some + simple initial ntlm testing. + +- Found and fixed a minor memory leak on re-used connections with + proxy-authentication. + +- I removed -@ and -Z as valid short options. They were very rarely used (@ + wasn't even documented). + +- Serge Semashko introduced CURLOPT_PROXYAUTH, and make it work when set to + CURLAUTH_NTLM and/or CURLAUTH_BASIC. The PROXAUTH is similar to HTTPAUTH, + but is for the proxy connection only, and HTTPAUTH is for the remote host. + +- Fixed loading of cookies with blank contents from a cookie jar. Also made the + cookie functions inform on added and skipped cookies (for cookie debugging). + +Version 7.10.7-pre3 (8 August 2003) + +Daniel (8 August) +- Applied David Byron's fix for file:// URLs with drive letters included. + +- I added the --ftp-create-dirs to the client code, which activates Early's + CURLOPT_FTP_CREATE_MISSING_DIRS option, and wrote test case 147 to verify + it. Added the option to the curl.1 man page too. Added the option to the + curl_easy_setopt.3 man page too. + +Daniel (7 August) +- Test case 60 failed on ia64 and AMD Opteron. Fixed now. + +- Fixed a printf problem that resulted in urlglobbing bugs (bug #203827 in the + debian bug tracker). Added test case 74 to verify the fix and to discover if + this breaks in the future. + +- "make distcheck" works again. + +Version 7.10.7-pre2 (6 August 2003) + +Daniel (5 August) +- Duncan Wilcox helped me verify that the latest incarnation of my ares patch + builds fine on Mac OS X (see the new lib/README.ares) file for all details. + +- Salvatore Sorrentino filed bug report #783116 and Early Ehlinger posted a + bug report to the libcurl list, both identifying a problem with FTP + persistent connections and how the dir hierarchy was not properly reset + between files. + +- David Byron's thoughts on a fixed Makefile in tests/ were applied. + +- Jan Sundin reported a case where curl ignored a cookie that browsers don't, + which turned up to be due to the number of dots in the 'domain'. I've now + made curl follow the the original netscape cookie spec less strict on that + part. + +Daniel (4 August) +- Dirk Manske added cookie support for the experimental, hidden and still + undocumented share feature! + +- Mark Fletcher provided an excellent bug report that identified a problem + with FOLLOWLOCATION and chunked transfer-encoding, as libcurl would not + properly ignore the body contents of 3XX response that included the + Location: header. + +Early (6 August) +- Added option CURLOPT_FTP_CREATE_MISSING_DIRS + This option will force the target file's path to be created if it + does not already exist on the remote system. + + Files affected: + - include/curl/curl.h + Added option CURLOPT_FTP_CREATE_MISSING_DIRS + - lib/ftp.c + Added function ftp_mkd, which issues a MKD command + Added function ftp_force_cwd, which attempts a CWD, + and does a MKD and retries the CWD if the original CWD + fails + Modified ftp_perform() to call its change directory function + through a pointer. The pointer points to ftp_cwd by default, + and is modified to point to ftp_force_cwd IFF + data->set.ftp_create_missing_dirs is not 0. + - lib/url.c + Modified Curl_setopt to recognize CURLOPT_FTP_CREATE_MISSING_DIRS + - lib/urldata.h + Added ftp_create_missing_dirs to struct UserDefined + +- Minor Bugfix for CURLOPT_TIMECONDITION with FTP - if the file was not + present to do the time comparison, it would fail. + Files affected: + - lib/ftp.c + In ftp_perform(), the call to ftp_getfiletime() used to be followed + by + if (result) + return result; + And then by the code that actually did the time comparison. + The code that did the comparison handled the case where the filetime + was not available (as indicated by info.filetime < 0 or set.timevalue + < 0), so I replaced the if (result) return result with a switch(result) + that allows CURLE_FTP_COULDNT_RETR_FILE to fall through to the + normal time comparison. + +Daniel (3 August) +- When proxy authentication is used in a CONNECT request (as used for all SSL + connects and otherwise enforced tunnel-thru-proxy requests), the same + authentication header is also wrongly sent to the remote host. + + This is a rather significant info leak. I've fixed it now and mailed a patch + and warning to the mailing lists. + +Daniel (1 August) +- David Byron provided a patch to make 7.10.6 build correctly with the + compressed hugehelp.c source file. + +Version 7.10.7-pre1 (31 July 2003) + +Daniel (30 July) +- Jörg Müller-Tolk updated the VC makefile. + +- Daniel Noguerol made the ftp code output "Accept-Ranges: bytes" in similar + style like other faked HTTP headers when NOBODY and HEADER are used. I + updated two corresponding test cases too. + +- Marty Kuhrt pointed out a compilation problem on VMS due to my having + changed a type from long to time_t, and I'm now changing it back to work + more portably... + + He also indicated that distributing the src/hugehelp.c in a compressed state + like I accidentally did may not be the smartest move... I've now fixed the + distribute procedure to automatically generate an uncompressed version when I + make release archives. + +Daniel (29 July) +- Gisle Vanem brought changes to the mkhelp script for the generation of the + compressed help text on some platforms. + +Version 7.10.6 (28 July 2003) + +Daniel (28 July) +- François Pons brought a patch that once again made curl deal with ftp and + "double slash" as indicating the root directory. In the RFC1738-fix of April + 30, that ability was removed (since it is not the "right" way). So, starting + now we can list the root dir of an ftp server both these ways: + + curl ftp://server.com/%2f as well as + curl ftp://server.com// + +Daniel (24 July) +- Henry Bland pointed out that we included sys/resource.h without good reason + in several source files. Without it included, QNX builds better... + +- Andrés García updated the mingw makefiles. + +Daniel (23 July) +- Tracy Boehrer experienced DNS cache problems and did some nice debugging + and tracking which made it easy for me to correct the problem and Tracy + could verify that it did cure the problem! When re-using a connection we + now make sure we don't re-use the 'connect_addr' struct. + +- Daniel Kouril corrected the GSS-Negotiate code. + +- Juan F. Codagnone provided fixes to allow curl to build fine on Windows + again. + +Daniel (22 July) +- Edited the curl/curl.h include file to build on Windows properly. + +Daniel (21 July) +- Moved the proxy credentials from the SessionHandle struct to the connectdata + struct, to make multiple proxy connections with differerent user names work. + +- Adjusted the NTLM code to support proxy functionality. + +- Made the krb4 stuff compile with the user+password fields moved. + +Version 7.10.6-pre4 (21 July 2003) + +Daniel (20 July) +- David Gardner pointed out in bug report 770755 that using the FTP command + CWD with a blank argument is a bad idea and I made libcurl skip empty path + segments starting now. + +Daniel (18 July) +- Cris pointed out that my fix on July 16th didn't work fully. His pointing + out this (and his patch) also made me realize that we have a very similar + bug in the FTP connection re-use code. We must store a separate user and + password field for each connection we keep (at least for FTP and HTTP+NTLM + connections, so I made us do this unconditionally). + +- Since NTLM authenticates connections instead of single requests, I had to + re-arrange how we store the NTLM data and I had to improve the test suite to + finally work properly with persistency to make the NTLM tests run fine + again. This also forced me to have to update lots of HTTP test cases. + +Daniel (16 July) +- Cris Bailiff's bug report 768275 pointed out that using Basic auth with + wrong user+password caused an endless loop. Fixed now. He also found out that + we didn't properly authenticate connections with NTLM. Fixed too. + +- Dan Winship provided fixes for the NTLM code. + +Daniel (5 July) +- Doug Kaufman provided additional fixes for the DOS port. + +Daniel (4 July) +- Rick Richardson pointed out that using setvbuf() to achieve non-buffering + on output is no-good for SCO Xenix and other unixes. We switched over to + using plain fflush() instead. + +- Dan Grayson pointed out that we set the CURL_CA_BUNDLE variable wrongly in + the configure script, and I had to change some build stuff to make the new + way work. + +- Peter Sylvester's patch was applied that introduces the following: + + CURLOPT_SSL_CTX_FUNCTION to set a callback that gets called with the + OpenSSL's ssl_ctx pointer passed in and allow a callback to act on it. If + anything but CURLE_OK is returned, that will also be returned by libcurl + all the way back. If this function changes the CURLOPT_URL, libcurl will + detect this and instead go use the new URL. + + CURLOPT_SSL_CTX_DATA is a pointer you set to get passed to the callback set + with CURLOPT_SSL_CTX_FUNCTION. + +Daniel (1 July) +- David Byron provided a patch that allows a client to quit the test suite's + HTTP server. + +- Gisle Vanem found and patched a lib handle leak in the ldap code. + +Daniel (25 June) +- More NTLM-improvements. Less code. Smaller packets back and forth. + +Daniel (23 June) +- Eric Glass provided us with a better doc on NTLM details, and I added more + comments and clarified the current code more. Using the new knowledge, we + should be able to make the NTLM stuff work even better. + Eric's original URL: http://davenport.sourceforge.net/ntlm.html + Version stored and provided at curl site: http://curl.haxx.se/rfc/ntlm.html + +- Fixed the minor compile problems pre3 had if built without GSSAPI and/or + SSL. + +Version 7.10.6-pre3 (19 June 2003) + +Daniel (19 June) +- Made curl use curl_free() on memory returned by curl_getenv(), as this + should theoreticly make it possibly to build and run curl and libcurl with + different memory allocation schemes with no problems. + +Daniel (18 June) +- Improved the mkhelp.pl a bit further to make a nicer hugehelp text and to + include a better comment in the top for the gzip compressed version. + +Daniel (17 June) +- CURLOPT_HTTPAUTH is now a bitmask, in which you set which authentication + type(s) you want to use. If more than one is set, libcurl will use one of + the selected one and the one it considers is more secure. Test case 67 and + 68 (for NTLM) were fixed and we've reduced a round-trip for specific --ntlm + fetches, and test case 69 and 70 were added for testing authentication + "picking". --anyauth is the new command line tool option, and I also added + --basic for completeness (that's the default type). + +- Fixed the runtests.pl script to use the info provided by the new curl -V + output. + +- --enable-debug now sets the CURLDEBUG define instead of MALLOCDEBUG, as it + is meant to be a generic debug conditional. + +- curl_version_info() can now return CURL_VERSION_DEBUG as a feature bit, to + indicate that the library was built with CURLDEBUG set. + +- Ralph Mitchell found out that some web applications very badly uses white + spaces in Location: redirects, and apparently IE is a browser (the only + one?) that supports this abomination. Based on Ralph's patch, I added code + that now attempts to replace white spaces with the proper "%20" or "+". + Test case 40 and 42 were added to verify my changes. + +- curl -V now also outputs a list of features the available library offers (if + any). + +- The curl_version() string now includes "GSS" if libcurl is built with GSSAPI + support. + +- David Orrell reported that libcurl still crashed when sending HUGE requests + over HTTPS... I fixed. + +Version 7.10.6-pre2 (16 June 2003) + +Daniel (16 June) +- curl_version_info() now returns bitmasked information weather NTLM and + GSSNEGOTIATE are supported, since it is doomed to vary on different + installations. + +- I remade the HTTP Digest code to use the MD5-code provided by OpenSSL if + that is present, and only use our own MD5-code if it isn't. + +Daniel (13 June) +- More NTLM help, fixes and patches from Cris Bailiff. + +- Marty Kuhrt brought include fixes for making VMS builds warning-free. + +Daniel (12 June) +- NTLM authentication works somewhat against the test servers provided by + Mathias Axelsson and Cris Bailiff. Use by setting CURLOPT_HTTPAUTH to + CURLAUTH_NTLM to libcurl, or --ntlm for the curl tool. Test case 67 and 68 + were added for this. NTLM-support requires OpenSSL. + +- Dan Fandrich provided a patch, that granted that gzip and libz are available + at build-time, compresses the hugehelp text in the curl command line and + uncompresses it at request. Saves some ~60K in the final output executable. + +Daniel (11 June) +- Long day of fighting the NTLM demons. + +Daniel (10 June) +- Modified how to set auth type to libcurl. Now use CURLOPT_HTTPAUTH instead, + and pick method. Supported ones currently are: + CURLAUTH_BASIC - default selection + CURLAUTH_DIGEST - formerly CURLOPT_HTTPDIGEST + CURLAUTH_GSSNEGOTIATE + +- Daniel Kouril added HTTP GSS-Negotiate authentication support, as defined in + the IETF draft draft-brezak-spnego-http-04.txt. In use already by various + Microsoft web applications. --negotiate is the new family member. To take + advantage of this, you need one of these packages: + + o Heimdal Kerberos5 http://www.pdc.kth.se/heimdal/heimdal.html + o GSSAPI from Globus http://www.globus.org/ + o GSSAPI libraries from MIT Kerberos5 http://web.mit.edu/kerberos/www/ + +- A missing ending bracket (']') while doing URL globbing could lead to a + segfault. While fixing this, I also introduced better error reporting in the + globbing code. (All this is application code outside libcurl.) + +Daniel (6 June) +- David Orrell found out that sending a huge GET request over HTTPS could + make libcurl fail and return an error code. + +Daniel (2 June) +- Richard Bramante found out that "Content-Length: 0" was not properly used by + libcurl if the response-headers indicated that the connection would be + closed. + +- David Byron's patch was applied, that makes the --progress-bar take the + local size into account when doing resumed downloads. + +- Feedback from Serge Semashko made me change the error message returned when + CURLE_HTTP_RETURNED_ERROR is returned. + +- Anonymous in bug report #745122 pointed out that we should really be using + SSL_CTX_set_options(... SSL_OP_ALL) to work around flaws in existing SSL + implementations. + +Daniel (27 May) +- Andreas Ley and Rich Gray helped me point out that no version of HP-UX has + the sys/select.h header file so including it unconditionally in curl/multi.h + is not a good thing. Now we check for HPUX and avoid using that header on + such systems. + +- Rudy Koento experienced problems with curl's recent habit of POSTing data in + two separate send() calls, first the headers and then the data. I've now + made a fix that for static and known content that is less than 100K in size, + everything is now sent in one single system call again. This is also better + for network performance reasons. + +- I modified the main makefile to not build the test suite and a few other + unnecessary things by default. Now, the test suite is built when 'make test' + is run. This reduces build time for those who don't care for the test + suite, and it also reduces confusion for people using platforms where the + test suite build fails! + +Daniel (26 May) +- Chris Lewis pointed out a flaw in the #ifdefs in curl/multi.h for Windows, + which is now corrected. + +- Jis Joy found another flaw in the SOCK5 code, as libcurl treated the socks5 + proxy a little too much like as if it was a http proxy. + +Daniel (23 May) +- Ricardo Cadime found a socket leak when listing directories without + contents. Test cases 144 and 145 were added to verify the fix. + +- Rudy Koento found yet another problem when a HTTP server returns only a + single-line of contents without any headers at all. libcurl then failed to + count the data, thus returning error 52 "no contents". Test case 66 was + added to verify that we now do right. + +Version 7.10.6-pre1 (23 May 2003) + +Daniel (23 May) +- Jis in bug report #741841, fixed a bug in the SOCKS5 proxy-using code. + +Daniel (22 May) +- David Remahl set up a test-server for me providing Digest authentication, + and I wrote the first working code that support it. The test suite was + modified slightly as well to work better for it and --digest was added to + the command line options (and CURLOPT_HTTPDIGEST to the library)... RFC2617 + has all the gory details. + +Daniel (21 May) +- David Balazic pointed out that curl_unescape() didn't check that %-codes + were correctly followed by two hexadecimal digits when it unescape strings. + Now, we do the check and only %XX codes are unescaped if the X letters are + hexadecimals. + +- Gisle Vanem made curl build with djgpp on DOS. + +- Gisle Vanem improved the mkhelp.pl script to make a nicer manual that is + shown with curl -M. + +Daniel (20 May) +- Gisle Vanem provided a fix that makes libcurl more conservative, not + expecting h_aliases of the hostent struct to always be non-NULL. + +Daniel (19 May) +- As requested by Martin Michlmayr in Debian bug report #193630, libcurl now + supports user name and password in the proxy environment variables. Added + test case 63 to verify this. + +Version 7.10.5 (19 May 2003) + +Daniel (15 May) +- Changed the order for the in_addr_t testing, as 'unsigned long' seems to be + a very common type inet_addr() returns. + +Daniel (14 May) +- George Comninos provided a fix that calls the progress meter when waiting + for FTP command responses take >1 second. It'll make applications more + "responsive" even when dealing with very slow ftp servers. + +Daniel (12 May) +- George Comninos pointed out that libcurl uploads had two quirks: + o when using FTP PORT command, it used blocking sockets! + o it could loop a long time without doing progress meter updates + Both items are fixed now. + +Daniel (9 May) +- Dan Fandrich changed CURLOPT_ENCODING to select all supported encodings if + set to "". This frees the application from having to know which encodings + the library supports. + +- Dan Fandrich pointed out we had three unnecessary files in CVS that is + generated with libtoolize, so they're now removed and libtoolize is invoked + accordingly in the buildconf script. + +- Avery Fay found out that the CURLOPT_INTERFACE way of first checking if the + given name is a network interface gave a real performance penalty on Linux, + so now we more appropriately first check if it is an IP number and if so + we don't check for a network interface with that name. + +- CURLOPT_FTP_USE_EPRT added. Set this to FALSE to disable libcurl's attempts + to use EPRT and LPRT before the traditional PORT command. The command line + tool sets this option with '--disable-eprt'. + +Version 7.10.5-pre2 (6 May 2003) + +Daniel (6 May) +- Kevin Delafield reported another case where we didn't correctly check for + EAGAIN but only EWOULDBLOCK, which caused badness on HPUX. + +Daniel (4 May) +- Ben Greear noticed that the check for 'writable argv' exited the configure + script when run for cross-compiling, which wasn't nice. Now it'll default to + no and output a warning about the fact that it was not checked for. + +Daniel (2 May) +- Added test case 62 and fixed some more on the cookie sending with a custom + Host: header set. + +Daniel (1 May) +- Andy Cedilnik fixed a few compiler warnings. + +- Made the "SSL read error: 5" error message more verbose, by adding code that + queries the OpenSSL library to fill in the error buffer. + +Daniel (30 Apr) +- Added sys/select.h include in the curl/multi.h file, after having been + reminded about this by Rich Gray. + +- I made each test set its own server requirements, thus abandoning the + previous system where the test number implied what server(s) to use for a + specific test. + +- David Balazic made curl more RFC1738-compliant for FTP URLs, by fixing so + that libcurl now uses one CWD command for each path part. A bunch of test + cases were fixed to work accordingly. + +- Cookie fixes: + + A. Save domains in jars like Mozilla does. It means all domains set in + Set-Cookie: headers are dot-prefixed. + B. Save and use the 'tailmatch' field in the Mozilla/Netscape cookie jars + (the second column). + C. Reject cookies using illegal domains in the Set-Cookie: line. Concerns + both domains with too few dots or domains that are outside the currently + operating server host's domain. + D. Set the path part by default to the one used in the request, if none was + set in the Set-Cookie line. + + To make item C really good, I also made libcurl notice custom Host: headers + and extract the host name set in there and use that as the host name for the + site we're getting the cookies from. This allows user to specify a site's + IP-address, but still be able to receive and send its cookies properly if + you provide a valid Host: name for the site. + +Daniel (29 Apr) +- Peter Kovacs provided a patch that makes the CURLINFO_CONNECT_TIME work fine + when using the multi interface (too). + +Version 7.10.5-pre1 (23 Apr 2003) + +Daniel (23 Apr) +- Upgraded to libtool 1.5. + +Daniel (22 Apr) +- Peter Sylvester pointed out that curl_easy_setopt() will always (wrongly) + return CURLE_OK no matter what happens. + +- Dan Fandrich fixed some gzip decompression bugs and flaws. + +Daniel (16 Apr) +- Fixed minor typo in man page, reported in the Debian bug tracker. + +Daniel (15 Apr) +- Fixed some FTP tests in the test suite that failed on my Solaris host, due + to the config.h not being included before the system headers. When done that + way, it did get a mixed sense of if big files are supported or not and then + stat() and fstat() (as used in test case 505) got confused and failed to + return a proper file size. + +- Formposting a file using a .html suffix is now properly set to Content-Type: text/html. + +Daniel (14 Apr) +- Fixed the SSL error handling to return proper SSL error messages again, they + broke in 7.10.4. I also attempt to track down CA cert problems and then + return the CURLE_SSL_CACERT error code. + +- The curl tool now intercepts the CURLE_SSL_CACERT error code and displays + a fairly big and explanatory error message. Kevin Roth helped me out with + the wording. + +Daniel (11 Apr) +- Nic Hines provided a second patch for gzip decompression, and fixed a bug + when deflate or gzip contents were downloaded using chunked encoding. + +- Dan Fandrich made libcurl support automatic decompression of gzip contents + (as an addition to the previous deflate support). + +- I made the CWD command during FTP session consider all 2xy codes to be OK + responses. + +Daniel (10 Apr) +- Vlad Krupin fixed a URL parsing issue. URLs that were not using a slash + after the host name, but still had "?" and parameters appended, as in + "http://hostname.com?foobar=moo", were not properly parsed by libcurl. + +Daniel (9 Apr) +- Made CURLOPT_TIMECONDITION work for FTP transfers, using the same syntax as + for HTTP. This then made -z work for ftp transfers too. Added test case 139 + and 140 for verifying this. + +- Getting the file date of an ftp file used the wrong time zone when + displayed. It is supposedly always GMT. Added test case 141 for this. + +- Made the test suite's FTP server support MDTM. + +- The default DEBUGFUNCTION, as enabled with CURLOPT_VERBOSE now outputs + CURLINFO_HEADER_IN data as well. The most notable effect from this is that + using curl -v, you get to see the incoming "headers" as well. This is + perhaps most useful when doing ftp. + +Daniel (8 Apr) +- James Bursa fixed a flaw in the Content-Type extraction code, which missed + the first letter if no space followed the colon. + +- Magnus Nilsson pointed out that share.c was missing in the MSVC project + file. + +Daniel (6 Apr) +- Ryan Weaver provided a patch that makes the CA cert bundle not get installed + anymore when 'configure --without-ssl' has been used. + +Daniel (4 Apr) +- Martijn Broenland found another cases where a server application didn't + like the boundary string used by curl when doing a multi-part/formpost. We + modified the boundary string to look like the one IE uses, as this is + probably gonna make curl work with more applications. + +Daniel (3 Apr) +- Kevin Roth reported that a bunch of tests fails on cygwin. One set fails + when using perl 5.8 (and they run fine with perl 5.6), and another set + failed because of an artifact in the test suite's FTP server that I + corrected. It turned out the FTP server code was still having a file opened + while the main test script removed it and invoked the HTTP server that + attempted to create the same file name of the file the FTP server kept open. + This operation works fine on unix, but not on cygwin. + +Version 7.10.4 (2 Apr 2003) + +Daniel (1 Apr) +- Added test case 505 to exercise FTP upload with rename done with libcurl, + and for that I had to extend the test suite's FTP server to deal with the + RNFR and RNTO commands. + +Daniel (31 Mar) +- Even more SSL config check modifications after Richard's testing. + +Version 7.10.4-pre6 (31 Mar 2003) + +Daniel (31 Mar) +- More fixes for the SSL session ID cache checks when SSL configs are changed + between connections. Based on tests and talks with Richard Bramante. + +- Guillaume Cottenceau provided a patch that added CURLOPT_UNRESTRICTED_AUTH. + When enabled, it will prevent libcurl from limiting to which host it sends + user+password to when following locations. By default, libcurl only sends + name and password to the original host used in the first URL, but with this + option set it will send the auth info to all hosts it follows location + headers to. The new tool command line option for this is named + "--location-trusted". + +- Frankie Fong reported a problem with libcurl if you re-used an easy handle + with a proxy, and you first made a https:// connection to a host and then + switched to a http:// one to the same host. libcurl would then wrongly re-use + the same connection for it and fail to get the second URL properly + +Daniel (29 Mar) +- Dan Shearer's fix that makes curl complain if invoked with nothing but "curl + -O" was applied. + +Daniel (26 Mar) +- Bryan Kemp was friendly enough to lend me an account on his Redhat 9 box and + I could fix the configure problems on redhat 8.1 and 9 in no time thanks to + this. Thanks a bunch Bryan! + +Daniel (25 Mar) +- Renamed configure.in to configure.ac + +Version 7.10.4-pre5 (25 Mar 2003) + +Daniel (25 Mar) +- Richard Bramante provided a fix for a handle re-use problem seen when you + change options on an SSL-enabled connection between requests. Previously, + changing peer verification or host verification and similar things was not + taken into account when a connection were checked for re-use and thus + enabling stricter check between requests on a re-used connection made no + difference and the connection would thus be used erroneously. + +Daniel (24 Mar) +- Götz Babin-Ebell pointed out that the ca-bundle.crt file contained a + certificate from Trustcenter that was a demo certificate only that was never + intended to be part of a CA bundle. + +Daniel (21 Mar) +- Life is a mystery. Within a time period of 17 hours, Tim Pope and Michael + Churchill filed one bug report each, both identifying problems with a second + transfer when doing persistent transfers re-using a connection. Tim's one is + #706624, labeled "Multiple uploads per handle fail" and Michael's #707003 + "Does not send Authorization: header when reusing connection". I could track + both down to the same piece of logic and it turned out libcurl was not using + new settings properly when re-using an existing connection. This concerned + both uploading and downloading and involved exactly those pieces these two + reports identified. This code has been this faulty since the day I + introduced persistent connection support in libcurl, more than 2 years ago. + +Daniel (20 Mar 2003) +- Five year anniversary. Today five years ago, the first ever curl release saw + the light of day. + +Daniel (17 Mar) +- Andy Cedilnik corrected flaws in some libcurl example-usage sources. + +Daniel (16 Mar) +- Juan F. Codagnone reported that the fix from March 2nd was incomplete. + +- Added code to the configure.in to check for select() argument types. I've + not made any code use the results just yet though. + +Daniel (15 Mar) +- Gisle Vanem provided two patches to build better on Windows. + +- Adjusted the test suite code to better make sure that the server(s) required + for a specific test is properly started before the test case is attempted. + Many tests now run a lot faster than before. + +Daniel (14 Mar) +- Another configure.in adjustment made the configure detect functions properly + on HPUX now. + +Daniel (13 Mar) +- Philippe Raoult fixed pre4-compile quirks for FreeBSD. + +Version 7.10.4-pre4 (13 Mar 2003) + +Daniel (13 Mar) +- Added a backup-check for functions that aren't found by AC_CHECK_FUNCS() + as I believe some checks on HPUX need this. At least some of the info given + to us by Rick Jones seemed to indicate this. + +Daniel (12 Mar) +- Thomas Tonino found out that if you used the curl tool to do PUT operations + as in 'curl www.foo.com/dir/ -T file' and the file name included for example + space or other characters that don't belong in URLs, curl did not properly + URL encode them before using them in the URL. + +- Added an option to configure called --enable-libgcc that simply adds -lgcc + to the LIBS variable, as this seems to be a common problem. + +- I modified the configure.in file, so that the headers are now checked in an + order of "viality". We must also make sure to use the "default headers" + parameter to AC_CHECK_HEADERS() so that headers are checked with the proper + prerequisites included (i.e all the major and generally important header + files are included there by default). This might be what we need for various + Sun, HP, AIX and Tru64 systems to behave good again on the header check + front. + +- Rick Jones pointed out a few compiler warnings on HP-UX that I addressed. + +- I made the configure --help output nicer by using AC_HELP_STRING() a lot + more. + +Daniel (11 Mar) +- Christophe Demory fixed the socket sending code to work better on HP-UX + when sending data to a socket that would block. It then returns EAGAIN, not + EWOULDBLOCK. + +- Richard Gorton improved the seeding function for systems without a good + and reliable random source. + +- Richard Gorton fixed a few warnings that popped up when you built curl + using the Sun compiler on a 64bit SPARC platform. + +- Martin C. Martin fixed a case where a connect failure using the multi + interface didn't produce a human readable error string. + +Daniel (10 Mar) +- Reverted ltmain.sh back to libtool 1.4.2 status again, as the 1.4.3 version + broke the build on numerous platforms. It seems that libtool 1.4.3 puts some + requirements on what versions of the other tools (autoconf + automake) that + I am not familiar with and thus I couldn't fulfill at this point. + + Yes, this is more than mildly frustrating. + +Daniel (7 Mar) +- Run libtoolize version 1.4.3. + +Version 7.10.4-pre3 (4 Mar 2003) + +Daniel (3 Mar) +- Added share.obj to the VC6 and Borland libcurl makefiles. + +- Troels Walsted Hansen found and investigated a problem with libcurl on AIX, + presumably only on 4.3 or later. gethostbyname_r() is not returning data + that is possible to "keep" and cache the way libcurl does. But instead these + versions of AIX uses a gethostbyname() that works thread-safely we can + instead use the ordinary gethostbyname() and our pack_hostent() approach to + achieve what we want. The configure script now attempts to detect AIX 4.3 or + later to adjust for this. + +Daniel (2 Mar) +- Juan F. Codagnone found a problem introduced in 7.10.3 when you first did a + POST and then back to a GET using the same easy handle. + +Daniel (28 Feb) +- Removed the strequal and strnequal defines from curl/curl.h header. They + were never meant for the public header anyway. Philippe Raoult brought it + up. + +- James Bursa fixed the RISC OS build. + +Daniel (27 Feb) +- Avery Fay pointed out the very misleading curl_multi_info_read man page, and + I updated it to become more accurate. + +- Salvatore Sorrentino found a problem with FTP downloading that turned out to + be his FTP server returning size zero (0 bytes) when SIZE was used on a file + while being in BINARY mode. We now make a second check for the actual size + by scanning the RETR reply anyway, even if the SIZE command returned 0. + +Daniel (26 Feb) +- Kyle Sallee reported a case where he would do a transfer that didn't update + the progress meter properly. It turned out to be a case where libcurl would + loop a little too eagerly in the transfer loop, which isn't really good for + the APIs, especially not the multi API. + +Version 7.10.4-pre2 (24 Feb 2003) + +Daniel (24 Feb) +- Kjetil Jacobsen found out that setting CURLOPT_MAXCONNECTS to a value higher + than 5 could cause a segfault. + +- I believe I fixed the 'Expect: 100-continue' behavior that has been broken + for a while (I think since my change dated Dec 10 2002). When this header is + used, libcurl should wait for a HTTP 100 (or timeout) before sending the + post/put data. + +Daniel (14 Feb) +- Matthew Clarke provided some info what to modify to make curl build + flawlessly on AIX 3.2.5. + +- Martin C. Martin found and fixed a problem in the multi interface when + running on Windows and trying to connect to a port without a listener. + +Daniel (13 Feb) +- Christopher R. Palmer fixed Curl_base64_encode() to deal with zeroes in the + data to encode. + +Daniel (4 Feb) +- Jean-Philippe added the first code that enables the 'share' system. This + should now enable sharing of DNS data between two curl easy handles. + +- Incorporated Nico Baggus' fixes to again compile flawlessly on VMS. + +- James Bursa corrected a bad comment in the public include file curl/multi.h + +- Peter Forret reported one of those error:00000000 cases in libcurl again + when connecting to a HTTPS site, and this time I did discover some oddities + in how curl reports SSL errors back. It could miss showing the actual error. + +Version 7.10.4-pre1 (3 Feb 2003) + +Daniel (3 Feb) +- Removed things in the docs saying capath doesn't work on Windows, as Julian + Noble told us it works fine. + +Daniel (31 Jan) +- Kevin Roth fixed the zlib build stuff in the Mingw32 makefile. + +Daniel (30 Jan) +- Kevin Roth found out that curl on Windows always checked for the CA cert + bundle using the environment variable and the path scan, even though + -k/--insecure was used. + +- Hamish Mackenzie pointed out that curl only did strict host name verifying + if capath or cainfo was used. Now it'll always do it unless -k / --insecure + is used! + +- Pavel Cenek pointed out that the Content-Type extraction was done wrongly + as the full string was not fetched. Added test case 57 to verify that curl + does it right now. + +Daniel (29 Jan) +- Jamie Wilkinson provided a patch that now makes curl attempt to clear out + "sensitive" command line arguments so that they don't appear in ps outputs + (only on platforms that allow writing to argv[]). + +- John McGowan found out that the DEBUGFUNCTION could be called with bad + arguments and thus cause the --trace outputs to go wrong. + +- Removed all the emacs local variables from all files. Mats Lidell provided + the new sample.emacs file (for a sample of what to include in your .emacs) + and the curl-style.el that sets a better c-style for editing curl sources. + +- Dave Halbakken found a problem with FTP downloads that could accidently + return CURLE_PARTIAL_FILE when curl_easy_perform() was called with NOBODY + set TRUE. + +Daniel (27 Jan) +- The fopen.c example was flawed as Nick Humfrey noticed, and I fixed it to + work again. + +Daniel (24 Jan) +- Bertrand Demiddelaer found and fixed a memory leak (the content-type string) + when following locations. + +Daniel (22 Jan 2003) +- Ian Wilkes and Legoff Vincent both independently provided fixes for making + curl/multi.h work properly when compiled with a C++ compiler. + +Daniel (20 Jan 2003) +- Fixed 'buildconf' to check version number of the required tools before + they're actually used. + +- Wrote 'testcurl.sh', a script targeted for automatic and distributed curl + tests on various platforms. + +- David Thiel pointed out that the .netrc file was not being dealt with + properly anymore. I broke this in the password prompting "fix". + +- Markus F.X.J. Oberhumer patched libcurl to allocate the scratch buffer only + on demand and thus we save 32KB in each curl handle that don't use that + buffer. This need appeared when some people started using thousands of + simultaneous curl handles... :-) + +Daniel (16 Jan 2003) +- Markus Oberhumer fixed curl-config --cflags when the includedir was not + /usr/include. + +- Markus Oberhumer fixed CURLINFO_PRIVATE to properly return NULL if it was + set to NULL! + +Version 7.10.3 (14 Jan 2003) + +Daniel (10 Jan 2003) +- Steve Oliphant pointed out that test case 105 did not work anymore and this + was due to a missing fix for the password prompting. + +Version 7.10.3-pre6 (10 Jan 2003) + +Daniel (9 Jan 2003) +- Bryan Kemp pointed out that curl -u could not provide a blank password + without prompting the user. It can now. -u username: makes the password + empty, while -u username makes curl prompt the user for a password. + +- Kjetil Jacobsen found a remaining connect problem in the multi interface on + ipv4 systems (Linux only?), that I fixed and Kjetil verified that it fixed + his problems. + +- memanalyze.pl now reads a file name from the command line, and no longer + takes the data on stdin as before. + +Version 7.10.3-pre5 (9 Jan 2003) + +Daniel (9 Jan 2003) +- Fixed tests/memanalyze.pl to work with file names that contain colons (as on + Windows). + +- Kjetil Jacobsen quickly pointed out that lib/share.h was missing... + +Version 7.10.3-pre4 (9 Jan 2003) + +Daniel (9 Jan 2003) +- Updated lib/share.c quite a bit to match the design document at + http://curl.haxx.se/dev/sharing.txt a lot more. + + I'll try to update the document soonish. share.c is still not actually used + by libcurl, but the API is slowly getting there and we can start + implementing code that takes advantage of this system. + +Daniel (8 Jan 2003) +- Updated share stuff in curl/curl.h, including data types, structs and + function prototypes. The corresponding files in lib/ were also modified + of course to remain compilable. Based on input from Jean-Philippe and also + to make it more in line with the design document. + +- Jean-Philippe Barrette-LaPierre patched a very trivial memory leak in + curl_escape() that would happen when realloc() returns NULL... + +- Matthew Blain provided feedback to make the --create-dirs stuff build + properly on Windows. + +- Fixed the #include in tests/libtest/first.c as Legoff Vincent pointed out. + +Daniel (7 Jan 2003) +- Philippe Raoult provided a patch that now makes libcurl properly support + wildcard checks for certificate names. + +- Simon Liu added CURLOPT_HTTP200ALIASES, to let an application set other + strings recognized as "HTTP 200" to allow http-like protocols to get + downloaded fine by curl. + +- Now using autoconf 2.57 and automake 1.7.2 + +- Doing "curl -I ftp://domain/non-existing-file" still outputed a date! + Wayne Haigh reported. + +- The error message is now written properly with a newline in the --trace + file. + +Daniel (6 Jan 2003) +- Sterling Hughes fixed a possible bug: previously, if you called + curl_easy_perform and then set the global dns cache, the global cache + wouldn't be used. Pointed out by Jean-Philippe Barrette-LaPierre. + +- Matthew Blain's fixed the VC6 libcurl makefile to include better debug data + on debug builds. diff --git a/neo/curl/COPYING b/neo/curl/COPYING new file mode 100644 index 0000000..d7ad261 --- /dev/null +++ b/neo/curl/COPYING @@ -0,0 +1,21 @@ +COPYRIGHT AND PERMISSION NOTICE + +Copyright (c) 1996 - 2004, Daniel Stenberg, . + +All rights reserved. + +Permission to use, copy, modify, and distribute this software for any purpose +with or without fee is hereby granted, provided that the above copyright +notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN +NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, +DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR +OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE +OR OTHER DEALINGS IN THE SOFTWARE. + +Except as contained in this notice, the name of a copyright holder shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in this Software without prior written authorization of the copyright holder. diff --git a/neo/curl/Makefile.am b/neo/curl/Makefile.am new file mode 100644 index 0000000..6988fc8 --- /dev/null +++ b/neo/curl/Makefile.am @@ -0,0 +1,113 @@ +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at http://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +# $Id: Makefile.am,v 1.49 2004/03/15 10:18:38 bagder Exp $ +########################################################################### + +AUTOMAKE_OPTIONS = foreign + +EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist \ + curl-config.in curl-style.el sample.emacs testcurl.sh RELEASE-NOTES + +bin_SCRIPTS = curl-config + +SUBDIRS = lib src +DIST_SUBDIRS = $(SUBDIRS) tests include packages docs + +dist-hook: + rm -rf $(top_builddir)/tests/log + find $(distdir) -name "*.dist" -exec rm {} \; + (distit=`find $(srcdir) -name "*.dist"`; \ + for file in $$distit; do \ + strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \ + cp $$file $(distdir)$$strip; \ + done) + +html: + cd docs; make html + +pdf: + cd docs; make pdf + +check: test + +test: + @(cd tests; $(MAKE) all quiet-test) + +test-full: + @(cd tests; $(MAKE) all full-test) + +# +# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros +# must contain the following line: +# %_topdir /home/loic/local/rpm +# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc. +# +# cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS +# +# If additional configure flags are needed to build the package, add the +# following in ~/.rpmmacros +# %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS} +# and run make rpm in the following way: +# AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm +# + +rpms: + $(MAKE) RPMDIST=curl rpm + $(MAKE) RPMDIST=curl-ssl rpm + +rpm: + RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \ + cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \ + cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \ + rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \ + mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \ + mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm . + +# +# Build a Solaris pkkgadd format file +# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format +# file (which ends up back in this directory). +# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do +# pkgadd -d ./HAXXcurl-* +# + +# gak - libtool requires an absoulte directory, hence the pwd below... +pkgadd: + umask 022 ; \ + make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \ + cat COPYING > $(srcdir)/packages/Solaris/copyright ; \ + cd $(srcdir)/packages/Solaris && $(MAKE) package + +# +# Build a cygwin binary tarball installation file +# resulting .tar.bz2 file will end up at packages/Win32/cygwin +cygwinbin: + $(MAKE) -C packages/Win32/cygwin cygwinbin + +# We extend the standard install with a custom hook: +install-data-hook: + cd include && $(MAKE) install + cd docs && $(MAKE) install + +# We extend the standard uninstall with a custom hook: +uninstall-hook: + cd include && $(MAKE) uninstall + cd docs && $(MAKE) uninstall diff --git a/neo/curl/Makefile.in b/neo/curl/Makefile.in new file mode 100644 index 0000000..e316436 --- /dev/null +++ b/neo/curl/Makefile.in @@ -0,0 +1,756 @@ +# Makefile.in generated by automake 1.8.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +#*************************************************************************** +# _ _ ____ _ +# Project ___| | | | _ \| | +# / __| | | | |_) | | +# | (__| |_| | _ <| |___ +# \___|\___/|_| \_\_____| +# +# Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. The terms +# are also available at http://curl.haxx.se/docs/copyright.html. +# +# You may opt to use, copy, modify, merge, publish, distribute and/or sell +# copies of the Software, and permit persons to whom the Software is +# furnished to do so, under the terms of the COPYING file. +# +# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY +# KIND, either express or implied. +# +# $Id: Makefile.am,v 1.49 2004/03/15 10:18:38 bagder Exp $ +########################################################################### + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = . +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ +DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ + $(srcdir)/Makefile.in $(srcdir)/curl-config.in \ + $(top_srcdir)/configure COPYING config.guess config.sub \ + depcomp install-sh ltmain.sh missing mkinstalldirs +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno configure.status.lineno +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/lib/config.h \ + $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = curl-config +am__installdirs = "$(DESTDIR)$(bindir)" +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +SCRIPTS = $(bin_SCRIPTS) +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +ETAGS = etags +CTAGS = ctags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +distdir = $(PACKAGE)-$(VERSION) +top_distdir = $(distdir) +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } +DIST_ARCHIVES = $(distdir).tar.gz +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CABUNDLE_FALSE = @CABUNDLE_FALSE@ +CABUNDLE_TRUE = @CABUNDLE_TRUE@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CA_BUNDLE = @CURL_CA_BUNDLE@ +CURL_DISABLE_DICT = @CURL_DISABLE_DICT@ +CURL_DISABLE_FILE = @CURL_DISABLE_FILE@ +CURL_DISABLE_FTP = @CURL_DISABLE_FTP@ +CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@ +CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@ +CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@ +CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +HAVE_ARES = @HAVE_ARES@ +HAVE_LIBZ = @HAVE_LIBZ@ +HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@ +HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IPV6_ENABLED = @IPV6_ENABLED@ +KRB4_ENABLED = @KRB4_ENABLED@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MANOPT = @MANOPT@ +MIMPURE_FALSE = @MIMPURE_FALSE@ +MIMPURE_TRUE = @MIMPURE_TRUE@ +NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@ +NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@ +NROFF = @NROFF@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_ENABLED = @OPENSSL_ENABLED@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKGADD_NAME = @PKGADD_NAME@ +PKGADD_PKG = @PKGADD_PKG@ +PKGADD_VENDOR = @PKGADD_VENDOR@ +PKGCONFIG = @PKGCONFIG@ +RANDOM_FILE = @RANDOM_FILE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_MANUAL_FALSE = @USE_MANUAL_FALSE@ +USE_MANUAL_TRUE = @USE_MANUAL_TRUE@ +VERSION = @VERSION@ +VERSIONNUM = @VERSIONNUM@ +YACC = @YACC@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_AS = @ac_ct_AS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +subdirs = @subdirs@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +AUTOMAKE_OPTIONS = foreign +EXTRA_DIST = CHANGES COPYING maketgz reconf Makefile.dist \ + curl-config.in curl-style.el sample.emacs testcurl.sh RELEASE-NOTES + +bin_SCRIPTS = curl-config +SUBDIRS = lib src +DIST_SUBDIRS = $(SUBDIRS) tests include packages docs +all: all-recursive + +.SUFFIXES: +am--refresh: + @: +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + echo ' cd $(srcdir) && $(AUTOMAKE) --foreign '; \ + cd $(srcdir) && $(AUTOMAKE) --foreign \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + echo ' $(SHELL) ./config.status'; \ + $(SHELL) ./config.status;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(srcdir) && $(AUTOCONF) +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +curl-config: $(top_builddir)/config.status $(srcdir)/curl-config.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + test -z "$(bindir)" || $(mkdir_p) "$(DESTDIR)$(bindir)" + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(binSCRIPT_INSTALL) '$$d$$p' '$(DESTDIR)$(bindir)/$$f'"; \ + $(binSCRIPT_INSTALL) "$$d$$p" "$(DESTDIR)$(bindir)/$$f"; \ + else :; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f '$(DESTDIR)$(bindir)/$$f'"; \ + rm -f "$(DESTDIR)$(bindir)/$$f"; \ + done + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if (etags --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + else \ + include_option=--include; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) + $(mkdir_p) $(distdir)/. $(distdir)/packages/EPM $(distdir)/packages/Linux/RPM + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || mkdir "$(distdir)/$$subdir" \ + || exit 1; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="../$(top_distdir)" \ + distdir="../$(distdir)/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist-bzip2: distdir + $(AMTAR) chof - $(distdir) | bzip2 -9 -c >$(distdir).tar.bz2 + $(am__remove_distdir) + +dist-tarZ: distdir + $(AMTAR) chof - $(distdir) | compress -c >$(distdir).tar.Z + $(am__remove_distdir) + +dist-shar: distdir + shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz + $(am__remove_distdir) + +dist-zip: distdir + -rm -f $(distdir).zip + zip -rq $(distdir).zip $(distdir) + $(am__remove_distdir) + +dist dist-all: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + case '$(DIST_ARCHIVES)' in \ + *.tar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - ;;\ + *.tar.bz2*) \ + bunzip2 -c $(distdir).tar.bz2 | $(AMTAR) xf - ;;\ + *.tar.Z*) \ + uncompress -c $(distdir).tar.Z | $(AMTAR) xf - ;;\ + *.shar.gz*) \ + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | unshar ;;\ + *.zip*) \ + unzip $(distdir).zip ;;\ + esac + chmod -R a-w $(distdir); chmod a+w $(distdir) + mkdir $(distdir)/_build + mkdir $(distdir)/_inst + chmod a-w $(distdir) + dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ + && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ + && cd $(distdir)/_build \ + && ../configure --srcdir=.. --prefix="$$dc_install_base" \ + $(DISTCHECK_CONFIGURE_FLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) \ + && $(MAKE) $(AM_MAKEFLAGS) dvi \ + && $(MAKE) $(AM_MAKEFLAGS) check \ + && $(MAKE) $(AM_MAKEFLAGS) install \ + && $(MAKE) $(AM_MAKEFLAGS) installcheck \ + && $(MAKE) $(AM_MAKEFLAGS) uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ + distuninstallcheck \ + && chmod -R a-w "$$dc_install_base" \ + && ({ \ + (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ + && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ + distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ + } || { rm -rf "$$dc_destdir"; exit 1; }) \ + && rm -rf "$$dc_destdir" \ + && $(MAKE) $(AM_MAKEFLAGS) dist \ + && rm -rf $(DIST_ARCHIVES) \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @(echo "$(distdir) archives ready for distribution: "; \ + list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ + sed -e '1{h;s/./=/g;p;x;}' -e '$${p;x;}' +distuninstallcheck: + @cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + @if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(SCRIPTS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(bindir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +info: info-recursive + +info-am: + +install-data-am: + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) install-data-hook + +install-exec-am: install-binSCRIPTS + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf $(top_srcdir)/autom4te.cache + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binSCRIPTS uninstall-info-am + @$(NORMAL_INSTALL) + $(MAKE) $(AM_MAKEFLAGS) uninstall-hook + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am am--refresh check \ + check-am clean clean-generic clean-libtool clean-recursive \ + ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ + dist-shar dist-tarZ dist-zip distcheck distclean \ + distclean-generic distclean-libtool distclean-recursive \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am html html-am info info-am install install-am \ + install-binSCRIPTS install-data install-data-am install-exec \ + install-exec-am install-info install-info-am install-man \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-generic \ + mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am \ + uninstall-binSCRIPTS uninstall-info-am + + +dist-hook: + rm -rf $(top_builddir)/tests/log + find $(distdir) -name "*.dist" -exec rm {} \; + (distit=`find $(srcdir) -name "*.dist"`; \ + for file in $$distit; do \ + strip=`echo $$file | sed -e s/^$(srcdir)// -e s/\.dist//`; \ + cp $$file $(distdir)$$strip; \ + done) + +html: + cd docs; make html + +pdf: + cd docs; make pdf + +check: test + +test: + @(cd tests; $(MAKE) all quiet-test) + +test-full: + @(cd tests; $(MAKE) all full-test) + +# +# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros +# must contain the following line: +# %_topdir /home/loic/local/rpm +# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc. +# +# cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS +# +# If additional configure flags are needed to build the package, add the +# following in ~/.rpmmacros +# %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS} +# and run make rpm in the following way: +# AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm +# + +rpms: + $(MAKE) RPMDIST=curl rpm + $(MAKE) RPMDIST=curl-ssl rpm + +rpm: + RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \ + cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \ + cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \ + rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \ + mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \ + mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm . + +# +# Build a Solaris pkkgadd format file +# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format +# file (which ends up back in this directory). +# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do +# pkgadd -d ./HAXXcurl-* +# + +# gak - libtool requires an absoulte directory, hence the pwd below... +pkgadd: + umask 022 ; \ + make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \ + cat COPYING > $(srcdir)/packages/Solaris/copyright ; \ + cd $(srcdir)/packages/Solaris && $(MAKE) package + +# +# Build a cygwin binary tarball installation file +# resulting .tar.bz2 file will end up at packages/Win32/cygwin +cygwinbin: + $(MAKE) -C packages/Win32/cygwin cygwinbin + +# We extend the standard install with a custom hook: +install-data-hook: + cd include && $(MAKE) install + cd docs && $(MAKE) install + +# We extend the standard uninstall with a custom hook: +uninstall-hook: + cd include && $(MAKE) uninstall + cd docs && $(MAKE) uninstall +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/neo/curl/README b/neo/curl/README new file mode 100644 index 0000000..bbd447c --- /dev/null +++ b/neo/curl/README @@ -0,0 +1,75 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +README + + Curl is a command line tool for transfering data specified with URL + syntax. Find out how to use Curl by reading the curl.1 man page or the + MANUAL document. Find out how to install Curl by reading the INSTALL + document. + + libcurl is the library curl is using to do its job. It is readily + available to be used by your software. Read the libcurl.3 man page to + learn how! + + You find answers to the most frequent questions we get in the FAQ document. + + Study the COPYING file for distribution terms and similar. + +CONTACT + + If you have problems, questions, ideas or suggestions, please contact us + by posting to a suitable mailing list. See http://curl.haxx.se/mail/ + + Many major contributors to the project are listed in the THANKS document. + +WEB SITE + + Visit the curl web site or mirrors for the latest news: + + Sweden -- http://curl.haxx.se/ + Australia -- http://curl.planetmirror.com/ + Estonia -- http://curl.dope-brothers.com/ + Germany -- http://curl.mirror.at.stealer.net/ + Russia -- http://curl.tsuren.net/ + Thailand -- http://curl.siamu.ac.th/ + US (CA) -- http://curl.mirror.redwire.net/ + +DOWNLOAD + + The official download mirror sites are: + + Australia -- http://curl.planetmirror.com/download/ + Estonia -- http://curl.dope-brothers.com/download/ + Germany -- ftp://ftp.fu-berlin.de/pub/unix/network/curl/ + Hongkong -- http://www.execve.net/curl/ + Russia -- http://curl.tsuren.net/download/ + Sweden -- ftp://ftp.sunet.se/pub/www/utilities/curl/ + Sweden -- http://cool.haxx.se/curl/ + Thailand -- http://curl.siamu.ac.th/download/ + US (CA) -- http://curl.mirror.redwire.net/download/ + +CVS + + To download the very latest source off the CVS server do this: + + cvs -d :pserver:cvsread@cvs.php.net:/repository login + + (enter "phpfi" when asked for password) + + cvs -d :pserver:cvsread@cvs.php.net:/repository co curl + + (you'll get a directory named curl created, filled with the source code) + + cvs -d :pserver:cvsread@cvs.php.net:/repository logout + + (you're off the hook!) + +NOTICE + + Curl contains pieces of source code that is Copyright (c) 1998, 1999 + Kungliga Tekniska Högskolan. This notice is included here to comply with the + distribution terms. diff --git a/neo/curl/RELEASE-NOTES b/neo/curl/RELEASE-NOTES new file mode 100644 index 0000000..e5a933c --- /dev/null +++ b/neo/curl/RELEASE-NOTES @@ -0,0 +1,89 @@ +Curl and libcurl 7.11.1. A bugfix release. + + Public curl release number: 79 + Releases counted from the very beginning: 106 + Available command line options: 94 + Available curl_easy_setopt() options: 112 + +This release includes the following changes: + + o CURLOPT_POSTFIELDSIZE_LARGE added to offer POSTs larger than 2GB + o CURL_VERSION_LARGEFILE is a feature bit returned by libcurls that feature + large file support + o libcurl only requires winsock 1.1 on windows now + o when doing FTP, curl now sends QUIT before disconnecting + o name resolves can now timeout on windows too + o $HOME is now recognized better when looking for .netrc files + o now re-uses the ares handle when re-using curl handles + o SO_BINDTODEVICE is used for network interface binding + o configure --disable-manual disables the built-in huge manual from the + command line tool + o the default Accept: header used in HTTP requests changed + o asynch dns lookups now require the c-ares library + o curl --socks can be used to set a SOCKS5 proxy to use + o response-headers received after a (proxy) CONNECT request are now passed + to the header callback just like other headers + +This release includes the following bugfixes: + + o builds and runs on Novell NetWare + o Windows builds now report OS as "i386-pc-win32" + o received signals during SSL connect is handled better + o improved PUT/POST with NTLM/Digest authentication + o following redirects and doing NTLM/Digest (where the first connection gets + closed) with the multi interface work better now + o file: progress meter and getinfo variables work now + o CURLOPT_FRESH_CONNECT and CURLAUTH_NTLM now work when set together + o share interface usage without (un)lock functions segfaulted + o --limit-rate no longer cripples the --speed-limit feature + o fixed verbose output problem with ipv6-enabled re-used connections + o fixed the socks5 code to check version in the socks response properly + o dns cache bug - fixed the 'inuse' counter + o large file fix for Content-Length + o better docs for the share interface + o several configure fixes for mingw/msys + o setting a Host: header is no longer affecting the Host: header used when + libcurl follows a Location: + o fixed numerous compiler warnings on several operating systems and compilers + o PUTing from stdin couldn't disable chunked transfer-encoding + o corrected the mingw makefiles + o improved the configure libz detection + o fixed EPRT/PORT use when doing FTP on ipv6-enabled AIX hosts + o *nroff commands that only support -mandoc and not -man are now supported + (for the built-in manual text in the command line tool) + o fixed the unconditional #include of config.h in hugehelp.c + o builds fine on MPE/iX + o upload using chunked transfer-encoding now sends the last chunk properly + teriminated with an extra CRLF + o Fixed the progress meter display for files >2GB + o persistant connections over a proxy messed up the proxy name/password + o the socks5 code segfaulted if no username/password was set + o the *_LARGE options now take curl_off_t types as parameters and this will + make it possible to handle large files on windows too + o builds with large file support even on systems without strtoll() + +Other curl-related news since the previous public release: + + o Many platforms are being used to autobuild and autotest curl on a daily + basis. Please join in and test curl on your systems: + http://curl.haxx.se/auto/ + o the curl mailing lists moved, (re-)subscribe to the new ones from here: + http://curl.haxx.se/mail/ + o c-ares 1.1.0 was relased: http://daniel.haxx.se/projects/c-ares/ + o TclCurl 0.11.0 was released: + http://personal1.iddeo.es/andresgarci/tclcurl/english/ + o PycURL 7.11.0 was released: http://pycurl.sourceforge.net/ + o the libcurl D binding was released: + http://www.atari-soldiers.com/libcurl.html + o new Estonian web site mirror: http://curl.dope-brothers.com/ + +This release would not have looked like this without help, code, reports and +advice from friends like these: + + Gisle Vanem, Vincent Bronner, Richard Bramante, Dirk Manske, Dan Fandrich, + Ken Hirsch, Stadler Stephan, Domenico Andreoli, Patrick Smith, Tor Arntsen, + Andrés García, Tim Baker, Len Krause, Gilad, Ken Rastatter, P R Schaffner, + Greg Hewgill, Ben Greear, Jeff Lawson, Grigory Entin, Doug Porter, David + Byron, Andy Serpa, Joe Halpin, Christopher R. Palmer, Günter Knauf + + Thanks! (and sorry if I forgot to mention someone) diff --git a/neo/curl/acinclude.m4 b/neo/curl/acinclude.m4 new file mode 100644 index 0000000..5acec28 --- /dev/null +++ b/neo/curl/acinclude.m4 @@ -0,0 +1,592 @@ +dnl Check for how to set a socket to non-blocking state. There seems to exist +dnl four known different ways, with the one used almost everywhere being POSIX +dnl and XPG3, while the other different ways for different systems (old BSD, +dnl Windows and Amiga). +dnl +dnl There are two known platforms (AIX 3.x and SunOS 4.1.x) where the +dnl O_NONBLOCK define is found but does not work. This condition is attempted +dnl to get caught in this script by using an excessive number of #ifdefs... +dnl +AC_DEFUN([CURL_CHECK_NONBLOCKING_SOCKET], +[ + AC_MSG_CHECKING([non-blocking sockets style]) + + AC_TRY_COMPILE([ +/* headers for O_NONBLOCK test */ +#include +#include +#include +],[ +/* try to compile O_NONBLOCK */ + +#if defined(sun) || defined(__sun__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) +# if defined(__SVR4) || defined(__srv4__) +# define PLATFORM_SOLARIS +# else +# define PLATFORM_SUNOS4 +# endif +#endif +#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX4) +# define PLATFORM_AIX_V3 +#endif + +#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__) +#error "O_NONBLOCK does not work on this platform" +#endif + int socket; + int flags = fcntl(socket, F_SETFL, flags | O_NONBLOCK); +],[ +dnl the O_NONBLOCK test was fine +nonblock="O_NONBLOCK" +AC_DEFINE(HAVE_O_NONBLOCK, 1, [use O_NONBLOCK for non-blocking sockets]) +],[ +dnl the code was bad, try a different program now, test 2 + + AC_TRY_COMPILE([ +/* headers for FIONBIO test */ +#include +#include +],[ +/* FIONBIO source test (old-style unix) */ + int socket; + int flags = ioctl(socket, FIONBIO, &flags); +],[ +dnl FIONBIO test was good +nonblock="FIONBIO" +AC_DEFINE(HAVE_FIONBIO, 1, [use FIONBIO for non-blocking sockets]) +],[ +dnl FIONBIO test was also bad +dnl the code was bad, try a different program now, test 3 + + AC_TRY_COMPILE([ +/* headers for ioctlsocket test (cygwin?) */ +#include +],[ +/* ioctlsocket source code */ + int socket; + int flags = ioctlsocket(socket, FIONBIO, &flags); +],[ +dnl ioctlsocket test was good +nonblock="ioctlsocket" +AC_DEFINE(HAVE_IOCTLSOCKET, 1, [use ioctlsocket() for non-blocking sockets]) +],[ +dnl ioctlsocket didnt compile!, go to test 4 + + AC_TRY_LINK([ +/* headers for IoctlSocket test (Amiga?) */ +#include +],[ +/* IoctlSocket source code */ + int socket; + int flags = IoctlSocket(socket, FIONBIO, (long)1); +],[ +dnl ioctlsocket test was good +nonblock="IoctlSocket" +AC_DEFINE(HAVE_IOCTLSOCKET_CASE, 1, [use Ioctlsocket() for non-blocking sockets]) +],[ +dnl Ioctlsocket didnt compile, do test 5! + AC_TRY_COMPILE([ +/* headers for SO_NONBLOCK test (BeOS) */ +#include +#include +#include +],[ +/* SO_NONBLOCK source code */ + long b = 1; + int socket; + int flags = setsockopt(socket, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b)); +],[ +dnl the SO_NONBLOCK test was good +nonblock="SO_NONBLOCK" +AC_DEFINE(HAVE_SO_NONBLOCK, 1, [use SO_NONBLOCK for non-blocking sockets]) +],[ +dnl test 5 didnt compile! +nonblock="nada" +AC_DEFINE(HAVE_DISABLED_NONBLOCKING, 1, [disabled non-blocking sockets]) +]) +dnl end of fifth test + +]) +dnl end of forth test + +]) +dnl end of third test + +]) +dnl end of second test + +]) +dnl end of non-blocking try-compile test + AC_MSG_RESULT($nonblock) + + if test "$nonblock" = "nada"; then + AC_MSG_WARN([non-block sockets disabled]) + fi +]) + +dnl Check for socklen_t: historically on BSD it is an int, and in +dnl POSIX 1g it is a type of its own, but some platforms use different +dnl types for the argument to getsockopt, getpeername, etc. So we +dnl have to test to find something that will work. +AC_DEFUN([TYPE_SOCKLEN_T], +[ + AC_CHECK_TYPE([socklen_t], ,[ + AC_MSG_CHECKING([for socklen_t equivalent]) + AC_CACHE_VAL([curl_cv_socklen_t_equiv], + [ + # Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + curl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t unsigned long "unsigned long"; do + AC_TRY_COMPILE([ + #ifdef HAVE_SYS_TYPES_H + #include + #endif + #ifdef HAVE_SYS_SOCKET_H + #include + #endif + + int getpeername (int, $arg2 *, $t *); + ],[ + $t len; + getpeername(0,0,&len); + ],[ + curl_cv_socklen_t_equiv="$t" + break + ]) + done + done + + if test "x$curl_cv_socklen_t_equiv" = x; then + AC_MSG_ERROR([Cannot find a type to use in place of socklen_t]) + fi + ]) + AC_MSG_RESULT($curl_cv_socklen_t_equiv) + AC_DEFINE_UNQUOTED(socklen_t, $curl_cv_socklen_t_equiv, + [type to use in place of socklen_t if not defined])], + [#include +#include ]) +]) + +dnl Check for in_addr_t: it is used to receive the return code of inet_addr() +dnl and a few other things. If not found, we set it to unsigned int, as even +dnl 64-bit implementations use to set it to a 32-bit type. +AC_DEFUN([TYPE_IN_ADDR_T], +[ + AC_CHECK_TYPE([in_addr_t], ,[ + AC_MSG_CHECKING([for in_addr_t equivalent]) + AC_CACHE_VAL([curl_cv_in_addr_t_equiv], + [ + curl_cv_in_addr_t_equiv= + for t in "unsigned long" int size_t unsigned long; do + AC_TRY_COMPILE([ + #ifdef HAVE_SYS_TYPES_H + #include + #endif + #ifdef HAVE_SYS_SOCKET_H + #include + #endif + #ifdef HAVE_ARPA_INET_H + #include + #endif + ],[ + $t data = inet_addr ("1.2.3.4"); + ],[ + curl_cv_in_addr_t_equiv="$t" + break + ]) + done + + if test "x$curl_cv_in_addr_t_equiv" = x; then + AC_MSG_ERROR([Cannot find a type to use in place of in_addr_t]) + fi + ]) + AC_MSG_RESULT($curl_cv_in_addr_t_equiv) + AC_DEFINE_UNQUOTED(in_addr_t, $curl_cv_in_addr_t_equiv, + [type to use in place of in_addr_t if not defined])], + [#include +#include +#include ]) +]) + +dnl ************************************************************ +dnl check for "localhost", if it doesn't exist, we can't do the +dnl gethostbyname_r tests! +dnl + +AC_DEFUN([CURL_CHECK_WORKING_RESOLVER],[ +AC_MSG_CHECKING([if "localhost" resolves]) +AC_TRY_RUN([ +#include +#include +#include + +int +main () { +struct hostent *h; +h = gethostbyname("localhost"); +exit (h == NULL ? 1 : 0); }],[ + AC_MSG_RESULT(yes)],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([can't figure out gethostbyname_r() since localhost doesn't resolve]) + + ] +) +]) + +dnl ************************************************************ +dnl check for working getaddrinfo() +dnl +AC_DEFUN([CURL_CHECK_WORKING_GETADDRINFO],[ + AC_CACHE_CHECK(for working getaddrinfo, ac_cv_working_getaddrinfo,[ + AC_TRY_RUN( [ +#include +#include +#include + +void main(void) { + struct addrinfo hints, *ai; + int error; + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + error = getaddrinfo("127.0.0.1", "8080", &hints, &ai); + if (error) { + exit(1); + } + else { + exit(0); + } +} +],[ + ac_cv_working_getaddrinfo="yes" +],[ + ac_cv_working_getaddrinfo="no" +],[ + ac_cv_working_getaddrinfo="yes" +])]) +if test "$ac_cv_working_getaddrinfo" = "yes"; then + AC_DEFINE(HAVE_GETADDRINFO, 1, [Define if getaddrinfo exists and works]) + AC_DEFINE(ENABLE_IPV6, 1, [Define if you want to enable IPv6 support]) + + IPV6_ENABLED=1 + AC_SUBST(IPV6_ENABLED) +fi +]) + + +AC_DEFUN([CURL_CHECK_LOCALTIME_R], +[ + dnl check for a few thread-safe functions + AC_CHECK_FUNCS(localtime_r,[ + AC_MSG_CHECKING(whether localtime_r is declared) + AC_EGREP_CPP(localtime_r,[ +#include ],[ + AC_MSG_RESULT(yes)],[ + AC_MSG_RESULT(no) + AC_MSG_CHECKING(whether localtime_r with -D_REENTRANT is declared) + AC_EGREP_CPP(localtime_r,[ +#define _REENTRANT +#include ],[ + AC_DEFINE(NEED_REENTRANT) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no))])]) +]) + +AC_DEFUN([CURL_CHECK_INET_NTOA_R], +[ + dnl determine if function definition for inet_ntoa_r exists. + AC_CHECK_FUNCS(inet_ntoa_r,[ + AC_MSG_CHECKING(whether inet_ntoa_r is declared) + AC_EGREP_CPP(inet_ntoa_r,[ +#include ],[ + AC_DEFINE(HAVE_INET_NTOA_R_DECL, 1, [inet_ntoa_r() is declared]) + AC_MSG_RESULT(yes)],[ + AC_MSG_RESULT(no) + AC_MSG_CHECKING(whether inet_ntoa_r with -D_REENTRANT is declared) + AC_EGREP_CPP(inet_ntoa_r,[ +#define _REENTRANT +#include ],[ + AC_DEFINE(HAVE_INET_NTOA_R_DECL, 1, [inet_ntoa_r() is declared]) + AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT defined]) + AC_MSG_RESULT(yes)], + AC_MSG_RESULT(no))])]) +]) + +AC_DEFUN([CURL_CHECK_GETHOSTBYADDR_R], +[ + dnl check for number of arguments to gethostbyaddr_r. it might take + dnl either 5, 7, or 8 arguments. + AC_CHECK_FUNCS(gethostbyaddr_r,[ + AC_MSG_CHECKING(if gethostbyaddr_r takes 5 arguments) + AC_TRY_COMPILE([ +#include +#include ],[ +char * address; +int length; +int type; +struct hostent h; +struct hostent_data hdata; +int rc; +rc = gethostbyaddr_r(address, length, type, &h, &hdata);],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GETHOSTBYADDR_R_5, 1, [gethostbyaddr_r() takes 5 args]) + ac_cv_gethostbyaddr_args=5],[ + AC_MSG_RESULT(no) + AC_MSG_CHECKING(if gethostbyaddr_r with -D_REENTRANT takes 5 arguments) + AC_TRY_COMPILE([ +#define _REENTRANT +#include +#include ],[ +char * address; +int length; +int type; +struct hostent h; +struct hostent_data hdata; +int rc; +rc = gethostbyaddr_r(address, length, type, &h, &hdata);],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GETHOSTBYADDR_R_5, 1, [gethostbyaddr_r() takes 5 args]) + AC_DEFINE(NEED_REENTRANT, 1, [need REENTRANT]) + ac_cv_gethostbyaddr_args=5],[ + AC_MSG_RESULT(no) + AC_MSG_CHECKING(if gethostbyaddr_r takes 7 arguments) + AC_TRY_COMPILE([ +#include +#include ],[ +char * address; +int length; +int type; +struct hostent h; +char buffer[8192]; +int h_errnop; +struct hostent * hp; + +hp = gethostbyaddr_r(address, length, type, &h, + buffer, 8192, &h_errnop);],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GETHOSTBYADDR_R_7, 1, [gethostbyaddr_r() takes 7 args] ) + ac_cv_gethostbyaddr_args=7],[ + AC_MSG_RESULT(no) + AC_MSG_CHECKING(if gethostbyaddr_r takes 8 arguments) + AC_TRY_COMPILE([ +#include +#include ],[ +char * address; +int length; +int type; +struct hostent h; +char buffer[8192]; +int h_errnop; +struct hostent * hp; +int rc; + +rc = gethostbyaddr_r(address, length, type, &h, + buffer, 8192, &hp, &h_errnop);],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GETHOSTBYADDR_R_8, 1, [gethostbyaddr_r() takes 8 args]) + ac_cv_gethostbyaddr_args=8],[ + AC_MSG_RESULT(no) + have_missing_r_funcs="$have_missing_r_funcs gethostbyaddr_r"])])])])]) +]) + +AC_DEFUN([CURL_CHECK_GETHOSTBYNAME_R], +[ + dnl check for number of arguments to gethostbyname_r. it might take + dnl either 3, 5, or 6 arguments. + AC_CHECK_FUNCS(gethostbyname_r,[ + AC_MSG_CHECKING([if gethostbyname_r takes 3 arguments]) + AC_TRY_COMPILE([ +#include +#include +#include +#undef NULL +#define NULL (void *)0 + +int +gethostbyname_r(const char *, struct hostent *, struct hostent_data *);],[ +struct hostent_data data; +gethostbyname_r(NULL, NULL, NULL);],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GETHOSTBYNAME_R_3, 1, [gethostbyname_r() takes 3 args]) + ac_cv_gethostbyname_args=3],[ + AC_MSG_RESULT(no) + AC_MSG_CHECKING([if gethostbyname_r with -D_REENTRANT takes 3 arguments]) + AC_TRY_COMPILE([ +#define _REENTRANT + +#include +#include +#include +#undef NULL +#define NULL (void *)0 + +int +gethostbyname_r(const char *,struct hostent *, struct hostent_data *);],[ +struct hostent_data data; +gethostbyname_r(NULL, NULL, NULL);],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GETHOSTBYNAME_R_3, 1, [gethostbyname_r() takes 3 args]) + AC_DEFINE(NEED_REENTRANT, 1, [needs REENTRANT]) + ac_cv_gethostbyname_args=3],[ + AC_MSG_RESULT(no) + AC_MSG_CHECKING([if gethostbyname_r takes 5 arguments]) + AC_TRY_COMPILE([ +#include +#include +#undef NULL +#define NULL (void *)0 + +struct hostent * +gethostbyname_r(const char *, struct hostent *, char *, int, int *);],[ +gethostbyname_r(NULL, NULL, NULL, 0, NULL);],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GETHOSTBYNAME_R_5, 1, [gethostbyname_r() takes 5 args]) + ac_cv_gethostbyname_args=5],[ + AC_MSG_RESULT(no) + AC_MSG_CHECKING([if gethostbyname_r takes 6 arguments]) + AC_TRY_COMPILE([ +#include +#include +#undef NULL +#define NULL (void *)0 + +int +gethostbyname_r(const char *, struct hostent *, char *, size_t, +struct hostent **, int *);],[ +gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL);],[ + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GETHOSTBYNAME_R_6, 1, [gethostbyname_r() takes 6 args]) + ac_cv_gethostbyname_args=6],[ + AC_MSG_RESULT(no) + have_missing_r_funcs="$have_missing_r_funcs gethostbyname_r"], + [ac_cv_gethostbyname_args=0])], + [ac_cv_gethostbyname_args=0])], + [ac_cv_gethostbyname_args=0])], + [ac_cv_gethostbyname_args=0])]) + +if test "$ac_cv_func_gethostbyname_r" = "yes"; then + if test "$ac_cv_gethostbyname_args" = "0"; then + dnl there's a gethostbyname_r() function, but we don't know how + dnl many arguments it wants! + AC_MSG_ERROR([couldn't figure out how to use gethostbyname_r()]) + fi +fi +]) + +dnl We create a function for detecting which compiler we use and then set as +dnl pendantic compiler options as possible for that particular compiler. The +dnl options are only used for debug-builds. + +AC_DEFUN([CURL_CC_DEBUG_OPTS], +[ + if test "$GCC" = "yes"; then + + dnl figure out gcc version! + AC_MSG_CHECKING([gcc version]) + gccver=`$CC -dumpversion` + num1=`echo $gccver | cut -d . -f1` + num2=`echo $gccver | cut -d . -f2` + gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null` + AC_MSG_RESULT($gccver) + + AC_MSG_CHECKING([if this is icc in disguise]) + AC_EGREP_CPP([^__INTEL_COMPILER], [__INTEL_COMPILER], + dnl action if the text is found, this it has not been replaced by the + dnl cpp + ICC="no" + AC_MSG_RESULT([no]), + dnl the text was not found, it was replaced by the cpp + ICC="yes" + AC_MSG_RESULT([yes]) + ) + + if test "$ICC" = "yes"; then + dnl this is icc, not gcc. + + dnl ICC warnings we ignore: + dnl * 269 warns on our "%Od" printf formatters for curl_off_t output: + dnl "invalid format string conversion" + dnl * 279 warns on static conditions in while expressions + dnl * 981 warns on "operands are evaluated in unspecified order" + dnl * 1419 warns on "external declaration in primary source file" + dnl which we know and do on purpose. + + WARN="-wd279,269,1419,981" + + if test "$gccnum" -gt "600"; then + dnl icc 6.0 and older doesn't have the -Wall flag + WARN="-Wall $WARN" + fi + else dnl $ICC = yes + dnl this is a set of options we believe *ALL* gcc versions support: + WARN="-W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wpointer-arith -Wnested-externs -Winline -Wmissing-declarations -Wmissing-prototypes -Wsign-compare" + + dnl -Wcast-align is a bit too annoying on all gcc versions ;-) + + if test "$gccnum" -gt "295"; then + dnl only if the compiler is newer than 2.95 since we got lots of + dnl "`_POSIX_C_SOURCE' is not defined" in system headers with + dnl gcc 2.95.4 on FreeBSD 4.9! + WARN="$WARN -Wundef" + fi + + if test "$gccnum" -ge "296"; then + dnl gcc 2.96 or later + WARN="$WARN -Wfloat-equal" + fi + + if test "$gccnum" -gt "296"; then + dnl this option does not exist in 2.96 + WARN="$WARN -Wno-format-nonliteral" + fi + + dnl -Wunreachable-code seems totally unreliable on my gcc 3.3.2 on + dnl on i686-Linux as it gives us heaps with false positives + if test "$gccnum" -ge "303"; then + dnl gcc 3.3 and later + WARN="$WARN -Wendif-labels -Wstrict-prototypes" + fi + + for flag in $CPPFLAGS; do + case "$flag" in + -I*) + dnl Include path, provide a -isystem option for the same dir + dnl to prevent warnings in those dirs. The -isystem was not very + dnl reliable on earlier gcc versions. + add=`echo $flag | sed 's/^-I/-isystem /g'` + WARN="$WARN $add" + ;; + esac + done + + fi dnl $ICC = no + + CFLAGS="$CFLAGS $WARN" + + AC_MSG_NOTICE([Added this set of compiler options: $WARN]) + + else dnl $GCC = yes + + AC_MSG_NOTICE([Added no extra compiler options]) + + fi dnl $GCC = yes + + dnl strip off optimizer flags + NEWFLAGS="" + for flag in $CFLAGS; do + case "$flag" in + -O*) + dnl echo "cut off $flag" + ;; + *) + NEWFLAGS="$NEWFLAGS $flag" + ;; + esac + done + CFLAGS=$NEWFLAGS + +]) dnl end of AC_DEFUN() + diff --git a/neo/curl/aclocal.m4 b/neo/curl/aclocal.m4 new file mode 100644 index 0000000..32db1ad --- /dev/null +++ b/neo/curl/aclocal.m4 @@ -0,0 +1,6876 @@ +# generated automatically by aclocal 1.8.3 -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. +# This file is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- + +# serial 47 AC_PROG_LIBTOOL + + +# AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) +# ----------------------------------------------------------- +# If this macro is not defined by Autoconf, define it here. +m4_ifdef([AC_PROVIDE_IFELSE], + [], + [m4_define([AC_PROVIDE_IFELSE], + [m4_ifdef([AC_PROVIDE_$1], + [$2], [$3])])]) + + +# AC_PROG_LIBTOOL +# --------------- +AC_DEFUN([AC_PROG_LIBTOOL], +[AC_REQUIRE([_AC_PROG_LIBTOOL])dnl +dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX +dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. + AC_PROVIDE_IFELSE([AC_PROG_CXX], + [AC_LIBTOOL_CXX], + [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX + ])]) +dnl And a similar setup for Fortran 77 support + AC_PROVIDE_IFELSE([AC_PROG_F77], + [AC_LIBTOOL_F77], + [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 +])]) + +dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. +dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run +dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. + AC_PROVIDE_IFELSE([AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], + [AC_LIBTOOL_GCJ], + [ifdef([AC_PROG_GCJ], + [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([A][M_PROG_GCJ], + [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) + ifdef([LT_AC_PROG_GCJ], + [define([LT_AC_PROG_GCJ], + defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) +])])# AC_PROG_LIBTOOL + + +# _AC_PROG_LIBTOOL +# ---------------- +AC_DEFUN([_AC_PROG_LIBTOOL], +[AC_REQUIRE([AC_LIBTOOL_SETUP])dnl +AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl +AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl +AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' +AC_SUBST(LIBTOOL)dnl + +# Prevent multiple expansion +define([AC_PROG_LIBTOOL], []) +])# _AC_PROG_LIBTOOL + + +# AC_LIBTOOL_SETUP +# ---------------- +AC_DEFUN([AC_LIBTOOL_SETUP], +[AC_PREREQ(2.50)dnl +AC_REQUIRE([AC_ENABLE_SHARED])dnl +AC_REQUIRE([AC_ENABLE_STATIC])dnl +AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_PROG_LD])dnl +AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl +AC_REQUIRE([AC_PROG_NM])dnl + +AC_REQUIRE([AC_PROG_LN_S])dnl +AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! +AC_REQUIRE([AC_OBJEXT])dnl +AC_REQUIRE([AC_EXEEXT])dnl +dnl + +AC_LIBTOOL_SYS_MAX_CMD_LEN +AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +AC_LIBTOOL_OBJDIR + +AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +_LT_AC_PROG_ECHO_BACKSLASH + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e s/^X//' +[sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] + +# Same as above, but do not quote variable references. +[double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +AC_CHECK_TOOL(AR, ar, false) +AC_CHECK_TOOL(RANLIB, ranlib, :) +AC_CHECK_TOOL(STRIP, strip, :) + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + ;; + *) + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + AC_PATH_MAGIC + fi + ;; +esac + +AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +enable_win32_dll=yes, enable_win32_dll=no) + +AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +AC_ARG_WITH([pic], + [AC_HELP_STRING([--with-pic], + [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], + [pic_mode="$withval"], + [pic_mode=default]) +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +AC_LIBTOOL_LANG_C_CONFIG +_LT_AC_TAGCONFIG +])# AC_LIBTOOL_SETUP + + +# _LT_AC_SYS_COMPILER +# ------------------- +AC_DEFUN([_LT_AC_SYS_COMPILER], +[AC_REQUIRE([AC_PROG_CC])dnl + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC +])# _LT_AC_SYS_COMPILER + + +# _LT_AC_SYS_LIBPATH_AIX +# ---------------------- +# Links a minimal program and checks the executable +# for the system default hardcoded library path. In most cases, +# this is /usr/lib:/lib, but when the MPI compilers are used +# the location of the communication and MPI libs are included too. +# If we don't find anything, use the default library path according +# to the aix ld manual. +AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], +[AC_LINK_IFELSE(AC_LANG_PROGRAM,[ +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi],[]) +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi +])# _LT_AC_SYS_LIBPATH_AIX + + +# _LT_AC_SHELL_INIT(ARG) +# ---------------------- +AC_DEFUN([_LT_AC_SHELL_INIT], +[ifdef([AC_DIVERSION_NOTICE], + [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], + [AC_DIVERT_PUSH(NOTICE)]) +$1 +AC_DIVERT_POP +])# _LT_AC_SHELL_INIT + + +# _LT_AC_PROG_ECHO_BACKSLASH +# -------------------------- +# Add some code to the start of the generated configure script which +# will find an echo command which doesn't interpret backslashes. +AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], +[_LT_AC_SHELL_INIT([ +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` + ;; +esac + +echo=${ECHO-echo} +if test "X[$]1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X[$]1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} +fi + +if test "X[$]1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null && + echo_test_string="`eval $cmd`" && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL [$]0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL [$]0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "[$]0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" +fi + +AC_SUBST(ECHO) +])])# _LT_AC_PROG_ECHO_BACKSLASH + + +# _LT_AC_LOCK +# ----------- +AC_DEFUN([_LT_AC_LOCK], +[AC_ARG_ENABLE([libtool-lock], + [AC_HELP_STRING([--disable-libtool-lock], + [avoid locking (might break parallel builds)])]) +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '[#]line __oline__ "configure"' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if AC_TRY_EVAL(ac_compile); then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, + [AC_LANG_PUSH(C) + AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) + AC_LANG_POP]) + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], +[*-*-cygwin* | *-*-mingw* | *-*-pw32*) + AC_CHECK_TOOL(DLLTOOL, dlltool, false) + AC_CHECK_TOOL(AS, as, false) + AC_CHECK_TOOL(OBJDUMP, objdump, false) + ;; + ]) +esac + +need_locks="$enable_libtool_lock" + +])# _LT_AC_LOCK + + +# AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) +# ---------------------------------------------------------------- +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], +[AC_REQUIRE([LT_AC_PROG_SED]) +AC_CACHE_CHECK([$1], [$2], + [$2=no + ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$3" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + $2=yes + fi + fi + $rm conftest* +]) + +if test x"[$]$2" = xyes; then + ifelse([$5], , :, [$5]) +else + ifelse([$6], , :, [$6]) +fi +])# AC_LIBTOOL_COMPILER_OPTION + + +# AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, +# [ACTION-SUCCESS], [ACTION-FAILURE]) +# ------------------------------------------------------------ +# Check whether the given compiler option works +AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], +[AC_CACHE_CHECK([$1], [$2], + [$2=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $3" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&AS_MESSAGE_LOG_FD + else + $2=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" +]) + +if test x"[$]$2" = xyes; then + ifelse([$4], , :, [$4]) +else + ifelse([$5], , :, [$5]) +fi +])# AC_LIBTOOL_LINKER_OPTION + + +# AC_LIBTOOL_SYS_MAX_CMD_LEN +# -------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], +[# find the maximum length of command line arguments +AC_MSG_CHECKING([the maximum length of command line arguments]) +AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl + i=0 + testring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \ + = "XX$testring") >/dev/null 2>&1 && + new_result=`expr "X$testring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + testring=$testring$testring + done + testring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac +]) +if test -n $lt_cv_sys_max_cmd_len ; then + AC_MSG_RESULT($lt_cv_sys_max_cmd_len) +else + AC_MSG_RESULT(none) +fi +])# AC_LIBTOOL_SYS_MAX_CMD_LEN + + +# _LT_AC_CHECK_DLFCN +# -------------------- +AC_DEFUN([_LT_AC_CHECK_DLFCN], +[AC_CHECK_HEADERS(dlfcn.h)dnl +])# _LT_AC_CHECK_DLFCN + + +# _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, +# ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) +# ------------------------------------------------------------------ +AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "$cross_compiling" = yes; then : + [$4] +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +}] +EOF + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) $1 ;; + x$lt_dlneed_uscore) $2 ;; + x$lt_unknown|x*) $3 ;; + esac + else : + # compilation failed + $3 + fi +fi +rm -fr conftest* +])# _LT_AC_TRY_DLOPEN_SELF + + +# AC_LIBTOOL_DLOPEN_SELF +# ------------------- +AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], +[AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ]) + ;; + + *) + AC_CHECK_FUNC([shl_load], + [lt_cv_dlopen="shl_load"], + [AC_CHECK_LIB([dld], [shl_load], + [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], + [AC_CHECK_FUNC([dlopen], + [lt_cv_dlopen="dlopen"], + [AC_CHECK_LIB([dl], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], + [AC_CHECK_LIB([svld], [dlopen], + [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], + [AC_CHECK_LIB([dld], [dld_link], + [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) + ]) + ]) + ]) + ]) + ]) + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + AC_CACHE_CHECK([whether a program can dlopen itself], + lt_cv_dlopen_self, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, + lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) + ]) + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + AC_CACHE_CHECK([whether a statically linked program can dlopen itself], + lt_cv_dlopen_self_static, [dnl + _LT_AC_TRY_DLOPEN_SELF( + lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, + lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) + ]) + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi +])# AC_LIBTOOL_DLOPEN_SELF + + +# AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) +# --------------------------------- +# Check to see if options -c and -o are simultaneously supported by compiler +AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl +AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], + [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&AS_MESSAGE_LOG_FD + echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes + fi + fi + chmod u+w . + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* +]) +])# AC_LIBTOOL_PROG_CC_C_O + + +# AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) +# ----------------------------------------- +# Check to see if we can do hard links to lock some files if needed +AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], +[AC_REQUIRE([_LT_AC_LOCK])dnl + +hard_links="nottested" +if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + AC_MSG_CHECKING([if we can lock with hard links]) + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + AC_MSG_RESULT([$hard_links]) + if test "$hard_links" = no; then + AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) + need_locks=warn + fi +else + need_locks=no +fi +])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS + + +# AC_LIBTOOL_OBJDIR +# ----------------- +AC_DEFUN([AC_LIBTOOL_OBJDIR], +[AC_CACHE_CHECK([for objdir], [lt_cv_objdir], +[rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null]) +objdir=$lt_cv_objdir +])# AC_LIBTOOL_OBJDIR + + +# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) +# ---------------------------------------------- +# Check hardcoding attributes. +AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], +[AC_MSG_CHECKING([how to hardcode library paths into programs]) +_LT_AC_TAGVAR(hardcode_action, $1)= +if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ + test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ + test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then + + # We can hardcode non-existant directories. + if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && + test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then + # Linking always hardcodes the temporary library directory. + _LT_AC_TAGVAR(hardcode_action, $1)=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + _LT_AC_TAGVAR(hardcode_action, $1)=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + _LT_AC_TAGVAR(hardcode_action, $1)=unsupported +fi +AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) + +if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi +])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH + + +# AC_LIBTOOL_SYS_LIB_STRIP +# ------------------------ +AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], +[striplib= +old_striplib= +AC_MSG_CHECKING([whether stripping libraries is possible]) +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + AC_MSG_RESULT([yes]) +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) +fi + ;; + *) + AC_MSG_RESULT([no]) + ;; + esac +fi +])# AC_LIBTOOL_SYS_LIB_STRIP + + +# AC_LIBTOOL_SYS_DYNAMIC_LINKER +# ----------------------------- +# PORTME Fill in your ld.so characteristics +AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], +[AC_MSG_CHECKING([dynamic linker characteristics]) +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[[01]] | aix4.[[01]].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.[01]* | freebsdelf3.[01]*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + ld_extra=`$SED -e 's/[:,\t]/ /g;s/=[^=]*$//;s/=[^= ]* / /g' /etc/ld.so.conf` + sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=yes + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[[89]] | openbsd2.[[89]].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +AC_MSG_RESULT([$dynamic_linker]) +test "$dynamic_linker" = no && can_build_shared=no +])# AC_LIBTOOL_SYS_DYNAMIC_LINKER + + +# _LT_AC_TAGCONFIG +# ---------------- +AC_DEFUN([_LT_AC_TAGCONFIG], +[AC_ARG_WITH([tags], + [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], + [include additional configurations @<:@automatic@:>@])], + [tagnames="$withval"]) + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + AC_MSG_WARN([output file `$ofile' does not exist]) + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) + else + AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) + fi + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in + "") ;; + *) AC_MSG_ERROR([invalid tag name: $tagname]) + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + AC_MSG_ERROR([tag name \"$tagname\" already exists]) + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && test "X$CXX" != "Xno"; then + AC_LIBTOOL_LANG_CXX_CONFIG + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + AC_LIBTOOL_LANG_F77_CONFIG + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + AC_LIBTOOL_LANG_GCJ_CONFIG + else + tagname="" + fi + ;; + + RC) + AC_LIBTOOL_LANG_RC_CONFIG + ;; + + *) + AC_MSG_ERROR([Unsupported tag name: $tagname]) + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + AC_MSG_ERROR([unable to update list of available tagged configurations.]) + fi +fi +])# _LT_AC_TAGCONFIG + + +# AC_LIBTOOL_DLOPEN +# ----------------- +# enable checks for dlopen support +AC_DEFUN([AC_LIBTOOL_DLOPEN], + [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_DLOPEN + + +# AC_LIBTOOL_WIN32_DLL +# -------------------- +# declare package support for building win32 dll's +AC_DEFUN([AC_LIBTOOL_WIN32_DLL], +[AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) +])# AC_LIBTOOL_WIN32_DLL + + +# AC_ENABLE_SHARED([DEFAULT]) +# --------------------------- +# implement the --enable-shared flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_SHARED], +[define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([shared], + [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], + [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_shared=]AC_ENABLE_SHARED_DEFAULT) +])# AC_ENABLE_SHARED + + +# AC_DISABLE_SHARED +# ----------------- +#- set the default shared flag to --disable-shared +AC_DEFUN([AC_DISABLE_SHARED], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_SHARED(no) +])# AC_DISABLE_SHARED + + +# AC_ENABLE_STATIC([DEFAULT]) +# --------------------------- +# implement the --enable-static flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_STATIC], +[define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([static], + [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], + [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_static=]AC_ENABLE_STATIC_DEFAULT) +])# AC_ENABLE_STATIC + + +# AC_DISABLE_STATIC +# ----------------- +# set the default static flag to --disable-static +AC_DEFUN([AC_DISABLE_STATIC], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_STATIC(no) +])# AC_DISABLE_STATIC + + +# AC_ENABLE_FAST_INSTALL([DEFAULT]) +# --------------------------------- +# implement the --enable-fast-install flag +# DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. +AC_DEFUN([AC_ENABLE_FAST_INSTALL], +[define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl +AC_ARG_ENABLE([fast-install], + [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], + [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], + [p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac], + [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) +])# AC_ENABLE_FAST_INSTALL + + +# AC_DISABLE_FAST_INSTALL +# ----------------------- +# set the default to --disable-fast-install +AC_DEFUN([AC_DISABLE_FAST_INSTALL], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +AC_ENABLE_FAST_INSTALL(no) +])# AC_DISABLE_FAST_INSTALL + + +# AC_LIBTOOL_PICMODE([MODE]) +# -------------------------- +# implement the --with-pic flag +# MODE is either `yes' or `no'. If omitted, it defaults to `both'. +AC_DEFUN([AC_LIBTOOL_PICMODE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl +pic_mode=ifelse($#,1,$1,default) +])# AC_LIBTOOL_PICMODE + + +# AC_PROG_EGREP +# ------------- +# This is predefined starting with Autoconf 2.54, so this conditional +# definition can be removed once we require Autoconf 2.54 or later. +m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], +[AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], + [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi]) + EGREP=$ac_cv_prog_egrep + AC_SUBST([EGREP]) +])]) + + +# AC_PATH_TOOL_PREFIX +# ------------------- +# find a file program which can recognise shared library +AC_DEFUN([AC_PATH_TOOL_PREFIX], +[AC_REQUIRE([AC_PROG_EGREP])dnl +AC_MSG_CHECKING([for $1]) +AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, +[case $MAGIC_CMD in +[[\\/*] | ?:[\\/]*]) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR +dnl $ac_dummy forces splitting on constant user-supplied paths. +dnl POSIX.2 word splitting is done only on the output of word expansions, +dnl not every word. This closes a longstanding sh security hole. + ac_dummy="ifelse([$2], , $PATH, [$2])" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/$1; then + lt_cv_path_MAGIC_CMD="$ac_dir/$1" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac]) +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + AC_MSG_RESULT($MAGIC_CMD) +else + AC_MSG_RESULT(no) +fi +])# AC_PATH_TOOL_PREFIX + + +# AC_PATH_MAGIC +# ------------- +# find a file program which can recognise a shared library +AC_DEFUN([AC_PATH_MAGIC], +[AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) + else + MAGIC_CMD=: + fi +fi +])# AC_PATH_MAGIC + + +# AC_PROG_LD +# ---------- +# find the pathname to the GNU or non-GNU linker +AC_DEFUN([AC_PROG_LD], +[AC_ARG_WITH([gnu-ld], + [AC_HELP_STRING([--with-gnu-ld], + [assume the C compiler uses GNU ld @<:@default=no@:>@])], + [test "$withval" = no || with_gnu_ld=yes], + [with_gnu_ld=no]) +AC_REQUIRE([LT_AC_PROG_SED])dnl +AC_REQUIRE([AC_PROG_CC])dnl +AC_REQUIRE([AC_CANONICAL_HOST])dnl +AC_REQUIRE([AC_CANONICAL_BUILD])dnl +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + AC_MSG_CHECKING([for ld used by $CC]) + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [[\\/]]* | ?:[[\\/]]*) + re_direlt='/[[^/]][[^/]]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + AC_MSG_CHECKING([for GNU ld]) +else + AC_MSG_CHECKING([for non-GNU ld]) +fi +AC_CACHE_VAL(lt_cv_path_LD, +[if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case "$host_cpu" in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + case $host_cpu in + alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; + esac + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' + else + lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac +]) +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown +])# AC_DEPLIBS_CHECK_METHOD + + +# AC_PROG_NM +# ---------- +# find the pathname to a BSD-compatible name lister +AC_DEFUN([AC_PROG_NM], +[AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, +[if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/${ac_tool_prefix}nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + esac + fi + done + IFS="$lt_save_ifs" + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi]) +NM="$lt_cv_path_NM" +])# AC_PROG_NM + + +# AC_CHECK_LIBM +# ------------- +# check for math library +AC_DEFUN([AC_CHECK_LIBM], +[AC_REQUIRE([AC_CANONICAL_HOST])dnl +LIBM= +case $host in +*-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) + # These system don't have libm, or don't need it + ;; +*-ncr-sysv4.3*) + AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") + AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") + ;; +*) + AC_CHECK_LIB(m, cos, LIBM="-lm") + ;; +esac +])# AC_CHECK_LIBM + + +# AC_LIBLTDL_CONVENIENCE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl convenience library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL +# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If +# DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will +# be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with +# '${top_srcdir}/' (note the single quotes!). If your package is not +# flat and you're not using automake, define top_builddir and +# top_srcdir appropriately in the Makefiles. +AC_DEFUN([AC_LIBLTDL_CONVENIENCE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + case $enable_ltdl_convenience in + no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; + "") enable_ltdl_convenience=yes + ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; + esac + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_CONVENIENCE + + +# AC_LIBLTDL_INSTALLABLE([DIRECTORY]) +# ----------------------------------- +# sets LIBLTDL to the link flags for the libltdl installable library and +# LTDLINCL to the include flags for the libltdl header and adds +# --enable-ltdl-install to the configure arguments. Note that LIBLTDL +# and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If +# DIRECTORY is not provided and an installed libltdl is not found, it is +# assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' +# and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single +# quotes!). If your package is not flat and you're not using automake, +# define top_builddir and top_srcdir appropriately in the Makefiles. +# In the future, this macro may have to be called after AC_PROG_LIBTOOL. +AC_DEFUN([AC_LIBLTDL_INSTALLABLE], +[AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl + AC_CHECK_LIB(ltdl, lt_dlinit, + [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], + [if test x"$enable_ltdl_install" = xno; then + AC_MSG_WARN([libltdl not installed, but installation disabled]) + else + enable_ltdl_install=yes + fi + ]) + if test x"$enable_ltdl_install" = x"yes"; then + ac_configure_args="$ac_configure_args --enable-ltdl-install" + LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la + LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) + else + ac_configure_args="$ac_configure_args --enable-ltdl-install=no" + LIBLTDL="-lltdl" + LTDLINCL= + fi + # For backwards non-gettext consistent compatibility... + INCLTDL="$LTDLINCL" +])# AC_LIBLTDL_INSTALLABLE + + +# AC_LIBTOOL_CXX +# -------------- +# enable support for C++ libraries +AC_DEFUN([AC_LIBTOOL_CXX], +[AC_REQUIRE([_LT_AC_LANG_CXX]) +])# AC_LIBTOOL_CXX + + +# _LT_AC_LANG_CXX +# --------------- +AC_DEFUN([_LT_AC_LANG_CXX], +[AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([AC_PROG_CXXCPP]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) +])# _LT_AC_LANG_CXX + + +# AC_LIBTOOL_F77 +# -------------- +# enable support for Fortran 77 libraries +AC_DEFUN([AC_LIBTOOL_F77], +[AC_REQUIRE([_LT_AC_LANG_F77]) +])# AC_LIBTOOL_F77 + + +# _LT_AC_LANG_F77 +# --------------- +AC_DEFUN([_LT_AC_LANG_F77], +[AC_REQUIRE([AC_PROG_F77]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) +])# _LT_AC_LANG_F77 + + +# AC_LIBTOOL_GCJ +# -------------- +# enable support for GCJ libraries +AC_DEFUN([AC_LIBTOOL_GCJ], +[AC_REQUIRE([_LT_AC_LANG_GCJ]) +])# AC_LIBTOOL_GCJ + + +# _LT_AC_LANG_GCJ +# --------------- +AC_DEFUN([_LT_AC_LANG_GCJ], +[AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], + [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], + [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], + [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], + [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) +])# _LT_AC_LANG_GCJ + + +# AC_LIBTOOL_RC +# -------------- +# enable support for Windows resource files +AC_DEFUN([AC_LIBTOOL_RC], +[AC_REQUIRE([LT_AC_PROG_RC]) +_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) +])# AC_LIBTOOL_RC + + +# AC_LIBTOOL_LANG_C_CONFIG +# ------------------------ +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) +AC_DEFUN([_LT_AC_LANG_C_CONFIG], +[lt_save_CC="$CC" +AC_LANG_PUSH(C) + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + +_LT_AC_SYS_COMPILER + +# +# Check for any special shared library compilation flags. +# +_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= +if test "$GCC" = no; then + case $host_os in + sco3.2v5*) + _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' + ;; + esac +fi +if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then + AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) + if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[ ]]" >/dev/null; then : + else + AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) + _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no + fi +fi + + +# +# Check to make sure the static flag actually works. +# +AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), + $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), + [], + [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) + + +AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF($1) + +# Report which librarie types wil actually be built +AC_MSG_CHECKING([if libtool supports shared libraries]) +AC_MSG_RESULT([$can_build_shared]) + +AC_MSG_CHECKING([whether to build shared libraries]) +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case "$host_os" in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + darwin* | rhapsody*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case "$host_os" in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + output_verbose_link_cmd='echo' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' + _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; +esac +AC_MSG_RESULT([$enable_shared]) + +AC_MSG_CHECKING([whether to build static libraries]) +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +AC_MSG_RESULT([$enable_static]) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC="$lt_save_CC" +])# AC_LIBTOOL_LANG_C_CONFIG + + +# AC_LIBTOOL_LANG_CXX_CONFIG +# -------------------------- +# Ensure that the configuration vars for the C compiler are +# suitably defined. Those variables are subsequently used by +# AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. +AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) +AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], +[AC_LANG_PUSH(C++) +AC_REQUIRE([AC_PROG_CXX]) +AC_REQUIRE([AC_PROG_CXXCPP]) + +_LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no +_LT_AC_TAGVAR(allow_undefined_flag, $1)= +_LT_AC_TAGVAR(always_export_symbols, $1)=no +_LT_AC_TAGVAR(archive_expsym_cmds, $1)= +_LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_direct, $1)=no +_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= +_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= +_LT_AC_TAGVAR(hardcode_libdir_separator, $1)= +_LT_AC_TAGVAR(hardcode_minus_L, $1)=no +_LT_AC_TAGVAR(hardcode_automatic, $1)=no +_LT_AC_TAGVAR(module_cmds, $1)= +_LT_AC_TAGVAR(module_expsym_cmds, $1)= +_LT_AC_TAGVAR(link_all_deplibs, $1)=unknown +_LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds +_LT_AC_TAGVAR(no_undefined_flag, $1)= +_LT_AC_TAGVAR(whole_archive_flag_spec, $1)= +_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + +# Dependencies to place before and after the object being linked: +_LT_AC_TAGVAR(predep_objects, $1)= +_LT_AC_TAGVAR(postdep_objects, $1)= +_LT_AC_TAGVAR(predeps, $1)= +_LT_AC_TAGVAR(postdeps, $1)= +_LT_AC_TAGVAR(compiler_lib_search_path, $1)= + +# Source file extension for C++ test sources. +ac_ext=cc + +# Object file extension for compiled C++ test sources. +objext=o +_LT_AC_TAGVAR(objext, $1)=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. +_LT_AC_SYS_COMPILER + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +_LT_AC_TAGVAR(compiler, $1)=$CC +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' +else + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + AC_PROG_LD + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +_LT_AC_TAGVAR(ld_shlibs, $1)=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GXX" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds it's shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + darwin* | rhapsody*) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case "$host_os" in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + dgux*) + case $cc_basename in + ec++) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + ghcx) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + freebsd[12]*) + # C++ shared libraries reported to be fairly broken before switch to ELF + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + freebsd-elf*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + freebsd* | kfreebsd*-gnu) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + ;; + gnu*) + ;; + hpux9*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + case "$host_cpu" in + hppa*64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + ;; + *) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + esac + fi + case "$host_cpu" in + hppa*64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + ia64*) + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + *) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + aCC) + case "$host_cpu" in + hppa*64*|ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case "$host_cpu" in + ia64*|hppa*64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + irix5* | irix6*) + case $cc_basename in + CC) + # SGI C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + esac + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + linux*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc) + # Intel C++ + with_gnu_ld=yes + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + cxx) + # Compaq C++ + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + m88k*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + mvs*) + case $cc_basename in + cxx) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + osf3*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + cxx) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + sco*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + lcc) + # Lucid + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. + # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' + ;; + gcx) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + *) + # FIXME: insert proper C++ library support + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; +esac +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +_LT_AC_TAGVAR(GCC, $1)="$GXX" +_LT_AC_TAGVAR(LD, $1)="$LD" + +AC_LIBTOOL_POSTDEP_PREDEP($1) +AC_LIBTOOL_PROG_COMPILER_PIC($1) +AC_LIBTOOL_PROG_CC_C_O($1) +AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) +AC_LIBTOOL_PROG_LD_SHLIBS($1) +AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) +AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) +AC_LIBTOOL_SYS_LIB_STRIP +AC_LIBTOOL_DLOPEN_SELF($1) + +AC_LIBTOOL_CONFIG($1) + +AC_LANG_POP +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld +])# AC_LIBTOOL_LANG_CXX_CONFIG + +# AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) +# ------------------------ +# Figure out "hidden" library dependencies from verbose +# compiler output when linking a shared library. +# Parse the compiler output and extract the necessary +# objects, libraries and library flags. +AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ +dnl we can't use the lt_simple_compile_test_code here, +dnl because it contains code intended for an executable, +dnl not a library. It's possible we should let each +dnl tag define a new lt_????_link_test_code variable, +dnl but it's only used here... +ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" +ifelse([$1], [], +[#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG], +[# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) + +# Is the compiler the GNU C compiler? +with_gcc=$_LT_AC_TAGVAR(GCC, $1) + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_[]_LT_AC_TAGVAR(LD, $1) + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext='$shrext' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) + +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) + +# Commands used to build and install a shared archive. +archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) +archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) +module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" + +# Set to yes if exported symbols are required. +always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) + +# The commands to list exported symbols. +export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) + +# Symbols that must always be exported. +include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) + +ifelse([$1],[], +[# ### END LIBTOOL CONFIG], +[# ### END LIBTOOL TAG CONFIG: $tagname]) + +__EOF__ + +ifelse([$1],[], [ + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" +]) +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi +])# AC_LIBTOOL_CONFIG + + +# AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) +# ------------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], +[AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl + +_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= + +if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' + + AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], + lt_cv_prog_compiler_rtti_exceptions, + [-fno-rtti -fno-exceptions], [], + [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) +fi +])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI + + +# AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE +# --------------------------------- +AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], +[AC_REQUIRE([AC_CANONICAL_HOST]) +AC_REQUIRE([AC_PROG_NM]) +AC_REQUIRE([AC_OBJEXT]) +# Check for command to grab the raw symbol name followed by C symbol from nm. +AC_MSG_CHECKING([command to parse $NM output from $compiler object]) +AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], +[ +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[[BCDEGRST]]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' + +# Transform the above into a raw symbol and a C symbol. +symxfrm='\1 \2\3 \3' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[[BCDT]]' + ;; +cygwin* | mingw* | pw32*) + symcode='[[ABCDGISTW]]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[[ABCDEGRST]]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +irix* | nonstopux*) + symcode='[[BCDEGRST]]' + ;; +osf*) + symcode='[[BCDEGQRST]]' + ;; +solaris* | sysv5*) + symcode='[[BDRT]]' + ;; +sysv4) + symcode='[[DFNSTU]]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[[ABCDGIRSTW]]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[[]] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" + if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD + fi + else + echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done +]) +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + AC_MSG_RESULT(failed) +else + AC_MSG_RESULT(ok) +fi +]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE + + +# AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) +# --------------------------------------- +AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], +[_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= +_LT_AC_TAGVAR(lt_prog_compiler_static, $1)= + +AC_MSG_CHECKING([for $compiler option to produce PIC]) + ifelse([$1],[CXX],[ + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + ghcx) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + fi + ;; + aCC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC) + # KAI C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + icpc) + # Intel C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + cxx) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' + ;; + RCC) + # Rational C++ 2.4.1 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + cxx) + # Digital/Compaq C++ + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + sco*) + case $cc_basename in + CC) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + *) + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + ;; + gcx) + # Green Hills C++ Compiler + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + lcc) + # Lucid + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + ;; + *) + ;; + esac + ;; + unixware*) + ;; + vxworks*) + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +], +[ + if test "$GCC" = yes; then + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + else + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # PIC (with -KPIC) is the default. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + newsos6) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + linux*) + case $CC in + icc* | ecc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' + ;; + ccc*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All Alpha code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + # All OSF/1 code is PIC. + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' + ;; + + sco3.2v5*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' + ;; + + solaris*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sunos4*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + fi + ;; + + uts4*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' + _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' + ;; + + *) + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then + AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], + _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), + [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], + [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in + "" | " "*) ;; + *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; + esac], + [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) +fi +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= + ;; + *) + _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" + ;; +esac +]) + + +# AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) +# ------------------------------------ +# See if the linker supports building shared libraries. +AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], +[AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) +ifelse([$1],[CXX],[ + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" + ;; + cygwin* | mingw*) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac +],[ + runpath_var= + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no + _LT_AC_TAGVAR(archive_cmds, $1)= + _LT_AC_TAGVAR(archive_expsym_cmds, $1)= + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= + _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown + _LT_AC_TAGVAR(hardcode_automatic, $1)=no + _LT_AC_TAGVAR(module_cmds, $1)= + _LT_AC_TAGVAR(module_expsym_cmds, $1)= + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + _LT_AC_TAGVAR(include_expsyms, $1)= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, + # as there is no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=no + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + _LT_AC_TAGVAR(ld_shlibs, $1)=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + sunos4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + linux*) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds" + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + if test $supports_anon_versioning = yes; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +$echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds" + fi + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + esac + + if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then + runpath_var=LD_RUN_PATH + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= + fi + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + else + _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + _LT_AC_TAGVAR(archive_cmds, $1)='' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + + if test "$GCC" = yes; then + case $host_os in aix4.[012]|aix4.[012].*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + else + # We have old collect2 + _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' + _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + _LT_AC_SYS_LIBPATH_AIX + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + _LT_AC_TAGVAR(always_export_symbols, $1)=yes + # Exported symbols can be pulled into shared objects from archives + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + # This is similar to how AIX traditionally builds it's shared libraries. + _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + # see comment about different semantics on the GNU ld section + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + bsdi4*) + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext=".dll" + # FIXME: Setting linknames here is a bad hack. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' + # FIXME: Should let the user specify the lib program. + _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes + ;; + + darwin* | rhapsody*) + if test "$GXX" = yes ; then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + case "$host_os" in + rhapsody* | darwin1.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[[012]]) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' + ;; + 10.*) + _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + _LT_AC_TAGVAR(module_cmds, $1)='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_automatic, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + else + _LT_AC_TAGVAR(ld_shlibs, $1)=no + fi + ;; + + dgux*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + freebsd1*) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + hpux9*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + ;; + + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*|ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case "$host_cpu" in + hppa*64*|ia64*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + ia64*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + *) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + newsos6) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + openbsd*) + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' + else + case $host_os in + openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + ;; + *) + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported + _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' + else + _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' + fi + _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: + ;; + + sco3.2v5*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + case $host_os in + solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; + esac + _LT_AC_TAGVAR(link_all_deplibs, $1)=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4) + case $host_vendor in + sni) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' + _LT_AC_TAGVAR(hardcode_direct, $1)=no + ;; + motorola) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv4.3*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + _LT_AC_TAGVAR(ld_shlibs, $1)=yes + fi + ;; + + sysv4.2uw2*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_direct, $1)=yes + _LT_AC_TAGVAR(hardcode_minus_L, $1)=no + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) + _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' + if test "$GCC" = yes; then + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + runpath_var='LD_RUN_PATH' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + sysv5*) + _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) + _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' + _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no + ;; + + *) + _LT_AC_TAGVAR(ld_shlibs, $1)=no + ;; + esac + fi +]) +AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) +test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in +x|xyes) + # Assume -lc should be added + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $_LT_AC_TAGVAR(archive_cmds, $1) in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + AC_MSG_CHECKING([whether -lc should be explicitly linked in]) + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if AC_TRY_EVAL(ac_compile) 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) + _LT_AC_TAGVAR(allow_undefined_flag, $1)= + if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) + then + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no + else + _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes + fi + _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) + ;; + esac + fi + ;; +esac +])# AC_LIBTOOL_PROG_LD_SHLIBS + + +# _LT_AC_FILE_LTDLL_C +# ------------------- +# Be careful that the start marker always follows a newline. +AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ +# /* ltdll.c starts here */ +# #define WIN32_LEAN_AND_MEAN +# #include +# #undef WIN32_LEAN_AND_MEAN +# #include +# +# #ifndef __CYGWIN__ +# # ifdef __CYGWIN32__ +# # define __CYGWIN__ __CYGWIN32__ +# # endif +# #endif +# +# #ifdef __cplusplus +# extern "C" { +# #endif +# BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); +# #ifdef __cplusplus +# } +# #endif +# +# #ifdef __CYGWIN__ +# #include +# DECLARE_CYGWIN_DLL( DllMain ); +# #endif +# HINSTANCE __hDllInstance_base; +# +# BOOL APIENTRY +# DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) +# { +# __hDllInstance_base = hInst; +# return TRUE; +# } +# /* ltdll.c ends here */ +])# _LT_AC_FILE_LTDLL_C + + +# _LT_AC_TAGVAR(VARNAME, [TAGNAME]) +# --------------------------------- +AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) + + +# old names +AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) +AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) +AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) +AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) +AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) +AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) +AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) + +# This is just to silence aclocal about the macro not being used +ifelse([AC_DISABLE_FAST_INSTALL]) + +AC_DEFUN([LT_AC_PROG_GCJ], +[AC_CHECK_TOOL(GCJ, gcj, no) + test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" + AC_SUBST(GCJFLAGS) +]) + +AC_DEFUN([LT_AC_PROG_RC], +[AC_CHECK_TOOL(RC, windres, no) +]) + +# NOTE: This macro has been submitted for inclusion into # +# GNU Autoconf as AC_PROG_SED. When it is available in # +# a released version of Autoconf we should remove this # +# macro and use it instead. # +# LT_AC_PROG_SED +# -------------- +# Check for a fully-functional sed program, that truncates +# as few characters as possible. Prefer GNU sed if found. +AC_DEFUN([LT_AC_PROG_SED], +[AC_MSG_CHECKING([for a sed that does not truncate output]) +AC_CACHE_VAL(lt_cv_path_SED, +[# Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && break + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +SED=$lt_cv_path_SED +]) +AC_MSG_RESULT([$SED]) +]) + +# -*- Autoconf -*- +# Copyright (C) 2002, 2003 Free Software Foundation, Inc. +# Generated from amversion.in; do not edit by hand. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA + +# AM_AUTOMAKE_VERSION(VERSION) +# ---------------------------- +# Automake X.Y traces this macro to ensure aclocal.m4 has been +# generated from the m4 files accompanying Automake X.Y. +AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) + +# AM_SET_CURRENT_AUTOMAKE_VERSION +# ------------------------------- +# Call AM_AUTOMAKE_VERSION so it can be traced. +# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. +AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], + [AM_AUTOMAKE_VERSION([1.8.3])]) + +# AM_AUX_DIR_EXPAND + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets +# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to +# `$srcdir', `$srcdir/..', or `$srcdir/../..'. +# +# Of course, Automake must honor this variable whenever it calls a +# tool from the auxiliary directory. The problem is that $srcdir (and +# therefore $ac_aux_dir as well) can be either absolute or relative, +# depending on how configure is run. This is pretty annoying, since +# it makes $ac_aux_dir quite unusable in subdirectories: in the top +# source directory, any form will work fine, but in subdirectories a +# relative path needs to be adjusted first. +# +# $ac_aux_dir/missing +# fails when called from a subdirectory if $ac_aux_dir is relative +# $top_srcdir/$ac_aux_dir/missing +# fails if $ac_aux_dir is absolute, +# fails when called from a subdirectory in a VPATH build with +# a relative $ac_aux_dir +# +# The reason of the latter failure is that $top_srcdir and $ac_aux_dir +# are both prefixed by $srcdir. In an in-source build this is usually +# harmless because $srcdir is `.', but things will broke when you +# start a VPATH build or use an absolute $srcdir. +# +# So we could use something similar to $top_srcdir/$ac_aux_dir/missing, +# iff we strip the leading $srcdir from $ac_aux_dir. That would be: +# am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` +# and then we would define $MISSING as +# MISSING="\${SHELL} $am_aux_dir/missing" +# This will work as long as MISSING is not called from configure, because +# unfortunately $(top_srcdir) has no meaning in configure. +# However there are other variables, like CC, which are often used in +# configure, and could therefore not use this "fixed" $ac_aux_dir. +# +# Another solution, used here, is to always expand $ac_aux_dir to an +# absolute PATH. The drawback is that using absolute paths prevent a +# configured tree to be moved without reconfiguration. + +AC_DEFUN([AM_AUX_DIR_EXPAND], +[dnl Rely on autoconf to set up CDPATH properly. +AC_PREREQ([2.50])dnl +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` +]) + +# AM_CONDITIONAL -*- Autoconf -*- + +# Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 6 + +# AM_CONDITIONAL(NAME, SHELL-CONDITION) +# ------------------------------------- +# Define a conditional. +AC_DEFUN([AM_CONDITIONAL], +[AC_PREREQ(2.52)dnl + ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], + [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl +AC_SUBST([$1_TRUE]) +AC_SUBST([$1_FALSE]) +if $2; then + $1_TRUE= + $1_FALSE='#' +else + $1_TRUE='#' + $1_FALSE= +fi +AC_CONFIG_COMMANDS_PRE( +[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then + AC_MSG_ERROR([conditional "$1" was never defined. +Usually this means the macro was only invoked conditionally.]) +fi])]) + +# serial 7 -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + + +# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be +# written in clear, in which case automake, when reading aclocal.m4, +# will think it sees a *use*, and therefore will trigger all it's +# C support machinery. Also note that it means that autoscan, seeing +# CC etc. in the Makefile, will ask for an AC_PROG_CC use... + + + +# _AM_DEPENDENCIES(NAME) +# ---------------------- +# See how the compiler implements dependency checking. +# NAME is "CC", "CXX", "GCJ", or "OBJC". +# We try a few techniques and use that to set a single cache variable. +# +# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was +# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular +# dependency, and given that the user is not expected to run this macro, +# just rely on AC_PROG_CC. +AC_DEFUN([_AM_DEPENDENCIES], +[AC_REQUIRE([AM_SET_DEPDIR])dnl +AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl +AC_REQUIRE([AM_MAKE_INCLUDE])dnl +AC_REQUIRE([AM_DEP_TRACK])dnl + +ifelse([$1], CC, [depcc="$CC" am_compiler_list=], + [$1], CXX, [depcc="$CXX" am_compiler_list=], + [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], + [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], + [depcc="$$1" am_compiler_list=]) + +AC_CACHE_CHECK([dependency style of $depcc], + [am_cv_$1_dependencies_compiler_type], +[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_$1_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + am_cv_$1_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_$1_dependencies_compiler_type=none +fi +]) +AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) +AM_CONDITIONAL([am__fastdep$1], [ + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) +]) + + +# AM_SET_DEPDIR +# ------------- +# Choose a directory name for dependency files. +# This macro is AC_REQUIREd in _AM_DEPENDENCIES +AC_DEFUN([AM_SET_DEPDIR], +[AC_REQUIRE([AM_SET_LEADING_DOT])dnl +AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl +]) + + +# AM_DEP_TRACK +# ------------ +AC_DEFUN([AM_DEP_TRACK], +[AC_ARG_ENABLE(dependency-tracking, +[ --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors]) +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi +AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) +AC_SUBST([AMDEPBACKSLASH]) +]) + +# Generate code to set up dependency tracking. -*- Autoconf -*- + +# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +#serial 2 + +# _AM_OUTPUT_DEPENDENCY_COMMANDS +# ------------------------------ +AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], +[for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`AS_DIRNAME("$mf")` + else + continue + fi + grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" + # We invoke sed twice because it is the simplest approach to + # changing $(DEPDIR) to its actual value in the expansion. + for file in `sed -n ' + /^DEP_FILES = .*\\\\$/ { + s/^DEP_FILES = // + :loop + s/\\\\$// + p + n + /\\\\$/ b loop + p + } + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`AS_DIRNAME(["$file"])` + AS_MKDIR_P([$dirpart/$fdir]) + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done +])# _AM_OUTPUT_DEPENDENCY_COMMANDS + + +# AM_OUTPUT_DEPENDENCY_COMMANDS +# ----------------------------- +# This macro should only be invoked once -- use via AC_REQUIRE. +# +# This code is only required when automatic dependency tracking +# is enabled. FIXME. This creates each `.P' file that we will +# need in order to bootstrap the dependency handling code. +AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], +[AC_CONFIG_COMMANDS([depfiles], + [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], + [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) +]) + +# Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- + +# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 7 + +# AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. +AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) + +# Do all the work for Automake. -*- Autoconf -*- + +# This macro actually does too much some checks are only needed if +# your package does certain things. But this isn't really a big deal. + +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 11 + +# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) +# AM_INIT_AUTOMAKE([OPTIONS]) +# ----------------------------------------------- +# The call with PACKAGE and VERSION arguments is the old style +# call (pre autoconf-2.50), which is being phased out. PACKAGE +# and VERSION should now be passed to AC_INIT and removed from +# the call to AM_INIT_AUTOMAKE. +# We support both call styles for the transition. After +# the next Automake release, Autoconf can make the AC_INIT +# arguments mandatory, and then we can depend on a new Autoconf +# release and drop the old call support. +AC_DEFUN([AM_INIT_AUTOMAKE], +[AC_PREREQ([2.58])dnl +dnl Autoconf wants to disallow AM_ names. We explicitly allow +dnl the ones we care about. +m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl +AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl +AC_REQUIRE([AC_PROG_INSTALL])dnl +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi +AC_SUBST([CYGPATH_W]) + +# Define the identity of the package. +dnl Distinguish between old-style and new-style calls. +m4_ifval([$2], +[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl + AC_SUBST([PACKAGE], [$1])dnl + AC_SUBST([VERSION], [$2])], +[_AM_SET_OPTIONS([$1])dnl + AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl + AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl + +_AM_IF_OPTION([no-define],, +[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) + AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl + +# Some tools Automake needs. +AC_REQUIRE([AM_SANITY_CHECK])dnl +AC_REQUIRE([AC_ARG_PROGRAM])dnl +AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) +AM_MISSING_PROG(AUTOCONF, autoconf) +AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) +AM_MISSING_PROG(AUTOHEADER, autoheader) +AM_MISSING_PROG(MAKEINFO, makeinfo) +AM_MISSING_PROG(AMTAR, tar) +AM_PROG_INSTALL_SH +AM_PROG_INSTALL_STRIP +AC_REQUIRE([AM_PROG_MKDIR_P])dnl +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. +AC_REQUIRE([AC_PROG_AWK])dnl +AC_REQUIRE([AC_PROG_MAKE_SET])dnl +AC_REQUIRE([AM_SET_LEADING_DOT])dnl + +_AM_IF_OPTION([no-dependencies],, +[AC_PROVIDE_IFELSE([AC_PROG_CC], + [_AM_DEPENDENCIES(CC)], + [define([AC_PROG_CC], + defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl +AC_PROVIDE_IFELSE([AC_PROG_CXX], + [_AM_DEPENDENCIES(CXX)], + [define([AC_PROG_CXX], + defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl +]) +]) + + +# When config.status generates a header, we must update the stamp-h file. +# This file resides in the same directory as the config header +# that is generated. The stamp files are numbered to have different names. + +# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the +# loop where config.status creates the headers, so we can generate +# our stamp files there. +AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], +[# Compute $1's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $1 | $1:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) + +# AM_PROG_INSTALL_SH +# ------------------ +# Define $install_sh. + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +AC_DEFUN([AM_PROG_INSTALL_SH], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +install_sh=${install_sh-"$am_aux_dir/install-sh"} +AC_SUBST(install_sh)]) + +# -*- Autoconf -*- +# Copyright (C) 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 1 + +# Check whether the underlying file-system supports filenames +# with a leading dot. For instance MS-DOS doesn't. +AC_DEFUN([AM_SET_LEADING_DOT], +[rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null +AC_SUBST([am__leading_dot])]) + +# Add --enable-maintainer-mode option to configure. +# From Jim Meyering + +# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2004 +# Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +AC_DEFUN([AM_MAINTAINER_MODE], +[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) + dnl maintainer-mode is disabled by default + AC_ARG_ENABLE(maintainer-mode, +[ --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer], + USE_MAINTAINER_MODE=$enableval, + USE_MAINTAINER_MODE=no) + AC_MSG_RESULT([$USE_MAINTAINER_MODE]) + AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) + MAINT=$MAINTAINER_MODE_TRUE + AC_SUBST(MAINT)dnl +] +) + +AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) + +# Check to see how 'make' treats includes. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# AM_MAKE_INCLUDE() +# ----------------- +# Check to see how make treats includes. +AC_DEFUN([AM_MAKE_INCLUDE], +[am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +AC_MSG_CHECKING([for style of include used by $am_make]) +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi +AC_SUBST([am__include]) +AC_SUBST([am__quote]) +AC_MSG_RESULT([$_am_result]) +rm -f confinc confmf +]) + +# -*- Autoconf -*- + + +# Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +# AM_MISSING_PROG(NAME, PROGRAM) +# ------------------------------ +AC_DEFUN([AM_MISSING_PROG], +[AC_REQUIRE([AM_MISSING_HAS_RUN]) +$1=${$1-"${am_missing_run}$2"} +AC_SUBST($1)]) + + +# AM_MISSING_HAS_RUN +# ------------------ +# Define MISSING if not defined so far and test if it supports --run. +# If it does, set am_missing_run to use it, otherwise, to nothing. +AC_DEFUN([AM_MISSING_HAS_RUN], +[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + AC_MSG_WARN([`missing' script is too old or missing]) +fi +]) + +# AM_PROG_MKDIR_P +# --------------- +# Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. + +# Copyright (C) 2003, 2004 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories +# created by `make install' are always world readable, even if the +# installer happens to have an overly restrictive umask (e.g. 077). +# This was a mistake. There are at least two reasons why we must not +# use `-m 0755': +# - it causes special bits like SGID to be ignored, +# - it may be too restrictive (some setups expect 775 directories). +# +# Do not use -m 0755 and let people choose whatever they expect by +# setting umask. +# +# We cannot accept any implementation of `mkdir' that recognizes `-p'. +# Some implementations (such as Solaris 8's) are not thread-safe: if a +# parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c' +# concurrently, both version can detect that a/ is missing, but only +# one can create it and the other will error out. Consequently we +# restrict ourselves to GNU make (using the --version option ensures +# this.) +AC_DEFUN([AM_PROG_MKDIR_P], +[if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # Keeping the `.' argument allows $(mkdir_p) to be used without + # argument. Indeed, we sometimes output rules like + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. + # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more + # expensive solution, as it forces Make to start a sub-shell.) + mkdir_p='mkdir -p -- .' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi +AC_SUBST([mkdir_p])]) + +# Helper functions for option handling. -*- Autoconf -*- + +# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 2 + +# _AM_MANGLE_OPTION(NAME) +# ----------------------- +AC_DEFUN([_AM_MANGLE_OPTION], +[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) + +# _AM_SET_OPTION(NAME) +# ------------------------------ +# Set option NAME. Presently that only means defining a flag for this option. +AC_DEFUN([_AM_SET_OPTION], +[m4_define(_AM_MANGLE_OPTION([$1]), 1)]) + +# _AM_SET_OPTIONS(OPTIONS) +# ---------------------------------- +# OPTIONS is a space-separated list of Automake options. +AC_DEFUN([_AM_SET_OPTIONS], +[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) + +# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) +# ------------------------------------------- +# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. +AC_DEFUN([_AM_IF_OPTION], +[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) + +# +# Check to make sure that the build environment is sane. +# + +# Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# serial 3 + +# AM_SANITY_CHECK +# --------------- +AC_DEFUN([AM_SANITY_CHECK], +[AC_MSG_CHECKING([whether build environment is sane]) +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$[*]" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$[*]" != "X $srcdir/configure conftest.file" \ + && test "$[*]" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken +alias in your environment]) + fi + + test "$[2]" = conftest.file + ) +then + # Ok. + : +else + AC_MSG_ERROR([newly created file is older than distributed files! +Check your system clock]) +fi +AC_MSG_RESULT(yes)]) + +# AM_PROG_INSTALL_STRIP + +# Copyright (C) 2001, 2003 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# One issue with vendor `install' (even GNU) is that you can't +# specify the program used to strip binaries. This is especially +# annoying in cross-compiling environments, where the build's strip +# is unlikely to handle the host's binaries. +# Fortunately install-sh will honor a STRIPPROG variable, so we +# always use install-sh in `make install-strip', and initialize +# STRIPPROG with the value of the STRIP variable (set by the user). +AC_DEFUN([AM_PROG_INSTALL_STRIP], +[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +dnl Don't test for $cross_compiling = yes, because it might be `maybe'. +if test "$cross_compiling" != no; then + AC_CHECK_TOOL([STRIP], [strip], :) +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" +AC_SUBST([INSTALL_STRIP_PROGRAM])]) + +m4_include([acinclude.m4]) diff --git a/neo/curl/config.guess b/neo/curl/config.guess new file mode 100644 index 0000000..6e51082 --- /dev/null +++ b/neo/curl/config.guess @@ -0,0 +1,1435 @@ +#! /bin/sh +# Attempt to guess a canonical system name. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2004-01-24' + +# This file is free software; you can redistribute it and/or modify it +# under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Originally written by Per Bothner . +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# This script attempts to guess a canonical system name similar to +# config.sub. If it succeeds, it prints the system name on stdout, and +# exits with 0. Otherwise, it exits with 1. +# +# The plan is that this can be called by configure scripts if you +# don't specify an explicit build system type. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] + +Output the configuration name of the system \`$me' is run on. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.guess ($timestamp) + +Originally written by Per Bothner. +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" >&2 + exit 1 ;; + * ) + break ;; + esac +done + +if test $# != 0; then + echo "$me: too many arguments$help" >&2 + exit 1 +fi + +trap 'exit 1' 1 2 15 + +# CC_FOR_BUILD -- compiler used by this script. Note that the use of a +# compiler to aid in system detection is discouraged as it requires +# temporary files to be created and, as you can see below, it is a +# headache to deal with in a portable fashion. + +# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still +# use `HOST_CC' if defined, but it is deprecated. + +# Portable tmp directory creation inspired by the Autoconf team. + +set_cc_for_build=' +trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; +trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; +: ${TMPDIR=/tmp} ; + { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || + { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || + { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || + { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; +dummy=$tmp/dummy ; +tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; +case $CC_FOR_BUILD,$HOST_CC,$CC in + ,,) echo "int x;" > $dummy.c ; + for c in cc gcc c89 c99 ; do + if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then + CC_FOR_BUILD="$c"; break ; + fi ; + done ; + if test x"$CC_FOR_BUILD" = x ; then + CC_FOR_BUILD=no_compiler_found ; + fi + ;; + ,,*) CC_FOR_BUILD=$CC ;; + ,*,*) CC_FOR_BUILD=$HOST_CC ;; +esac ;' + +# This is needed to find uname on a Pyramid OSx when run in the BSD universe. +# (ghazi@noc.rutgers.edu 1994-08-24) +if (test -f /.attbin/uname) >/dev/null 2>&1 ; then + PATH=$PATH:/.attbin ; export PATH +fi + +UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown +UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown +UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown +UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown + +# Note: order is significant - the case branches are not exclusive. + +case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in + *:NetBSD:*:*) + # NetBSD (nbsd) targets should (where applicable) match one or + # more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*, + # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently + # switched to ELF, *-*-netbsd* would select the old + # object file format. This provides both forward + # compatibility and a consistent mechanism for selecting the + # object file format. + # + # Note: NetBSD doesn't particularly care about the vendor + # portion of the name. We always set it to "unknown". + sysctl="sysctl -n hw.machine_arch" + UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ + /usr/sbin/$sysctl 2>/dev/null || echo unknown)` + case "${UNAME_MACHINE_ARCH}" in + armeb) machine=armeb-unknown ;; + arm*) machine=arm-unknown ;; + sh3el) machine=shl-unknown ;; + sh3eb) machine=sh-unknown ;; + *) machine=${UNAME_MACHINE_ARCH}-unknown ;; + esac + # The Operating System including object format, if it has switched + # to ELF recently, or will in the future. + case "${UNAME_MACHINE_ARCH}" in + arm*|i386|m68k|ns32k|sh3*|sparc|vax) + eval $set_cc_for_build + if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ + | grep __ELF__ >/dev/null + then + # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). + # Return netbsd for either. FIX? + os=netbsd + else + os=netbsdelf + fi + ;; + *) + os=netbsd + ;; + esac + # The OS release + # Debian GNU/NetBSD machines have a different userland, and + # thus, need a distinct triplet. However, they do not need + # kernel version information, so it can be replaced with a + # suitable tag, in the style of linux-gnu. + case "${UNAME_VERSION}" in + Debian*) + release='-gnu' + ;; + *) + release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` + ;; + esac + # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: + # contains redundant information, the shorter form: + # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. + echo "${machine}-${os}${release}" + exit 0 ;; + amiga:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + arc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + hp300:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mac68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + macppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme68k:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvme88k:OpenBSD:*:*) + echo m88k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + mvmeppc:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pegasos:OpenBSD:*:*) + echo powerpc-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + pmax:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sgi:OpenBSD:*:*) + echo mipseb-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + sun3:OpenBSD:*:*) + echo m68k-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + wgrisc:OpenBSD:*:*) + echo mipsel-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + *:OpenBSD:*:*) + echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE} + exit 0 ;; + alpha:OSF1:*:*) + if test $UNAME_RELEASE = "V4.0"; then + UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` + fi + # According to Compaq, /usr/sbin/psrinfo has been available on + # OSF/1 and Tru64 systems produced since 1995. I hope that + # covers most systems running today. This code pipes the CPU + # types through head -n 1, so we only detect the type of CPU 0. + ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` + case "$ALPHA_CPU_TYPE" in + "EV4 (21064)") + UNAME_MACHINE="alpha" ;; + "EV4.5 (21064)") + UNAME_MACHINE="alpha" ;; + "LCA4 (21066/21068)") + UNAME_MACHINE="alpha" ;; + "EV5 (21164)") + UNAME_MACHINE="alphaev5" ;; + "EV5.6 (21164A)") + UNAME_MACHINE="alphaev56" ;; + "EV5.6 (21164PC)") + UNAME_MACHINE="alphapca56" ;; + "EV5.7 (21164PC)") + UNAME_MACHINE="alphapca57" ;; + "EV6 (21264)") + UNAME_MACHINE="alphaev6" ;; + "EV6.7 (21264A)") + UNAME_MACHINE="alphaev67" ;; + "EV6.8CB (21264C)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8AL (21264B)") + UNAME_MACHINE="alphaev68" ;; + "EV6.8CX (21264D)") + UNAME_MACHINE="alphaev68" ;; + "EV6.9A (21264/EV69A)") + UNAME_MACHINE="alphaev69" ;; + "EV7 (21364)") + UNAME_MACHINE="alphaev7" ;; + "EV7.9 (21364A)") + UNAME_MACHINE="alphaev79" ;; + esac + # A Vn.n version is a released version. + # A Tn.n version is a released field test version. + # A Xn.n version is an unreleased experimental baselevel. + # 1.2 uses "1.2" for uname -r. + echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + exit 0 ;; + Alpha*:OpenVMS:*:*) + echo alpha-hp-vms + exit 0 ;; + Alpha\ *:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # Should we change UNAME_MACHINE based on the output of uname instead + # of the specific Alpha model? + echo alpha-pc-interix + exit 0 ;; + 21064:Windows_NT:50:3) + echo alpha-dec-winnt3.5 + exit 0 ;; + Amiga*:UNIX_System_V:4.0:*) + echo m68k-unknown-sysv4 + exit 0;; + *:[Aa]miga[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-amigaos + exit 0 ;; + *:[Mm]orph[Oo][Ss]:*:*) + echo ${UNAME_MACHINE}-unknown-morphos + exit 0 ;; + *:OS/390:*:*) + echo i370-ibm-openedition + exit 0 ;; + *:OS400:*:*) + echo powerpc-ibm-os400 + exit 0 ;; + arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) + echo arm-acorn-riscix${UNAME_RELEASE} + exit 0;; + SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) + echo hppa1.1-hitachi-hiuxmpp + exit 0;; + Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) + # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. + if test "`(/bin/universe) 2>/dev/null`" = att ; then + echo pyramid-pyramid-sysv3 + else + echo pyramid-pyramid-bsd + fi + exit 0 ;; + NILE*:*:*:dcosx) + echo pyramid-pyramid-svr4 + exit 0 ;; + DRS?6000:unix:4.0:6*) + echo sparc-icl-nx6 + exit 0 ;; + DRS?6000:UNIX_SV:4.2*:7*) + case `/usr/bin/uname -p` in + sparc) echo sparc-icl-nx7 && exit 0 ;; + esac ;; + sun4H:SunOS:5.*:*) + echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) + echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + i86pc:SunOS:5.*:*) + echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:6*:*) + # According to config.sub, this is the proper way to canonicalize + # SunOS6. Hard to guess exactly what SunOS6 will be like, but + # it's likely to be more like Solaris than SunOS4. + echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + sun4*:SunOS:*:*) + case "`/usr/bin/arch -k`" in + Series*|S4*) + UNAME_RELEASE=`uname -v` + ;; + esac + # Japanese Language versions have a version number like `4.1.3-JL'. + echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` + exit 0 ;; + sun3*:SunOS:*:*) + echo m68k-sun-sunos${UNAME_RELEASE} + exit 0 ;; + sun*:*:4.2BSD:*) + UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` + test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 + case "`/bin/arch`" in + sun3) + echo m68k-sun-sunos${UNAME_RELEASE} + ;; + sun4) + echo sparc-sun-sunos${UNAME_RELEASE} + ;; + esac + exit 0 ;; + aushp:SunOS:*:*) + echo sparc-auspex-sunos${UNAME_RELEASE} + exit 0 ;; + # The situation for MiNT is a little confusing. The machine name + # can be virtually everything (everything which is not + # "atarist" or "atariste" at least should have a processor + # > m68000). The system name ranges from "MiNT" over "FreeMiNT" + # to the lowercase version "mint" (or "freemint"). Finally + # the system name "TOS" denotes a system which is actually not + # MiNT. But MiNT is downward compatible to TOS, so this should + # be no problem. + atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) + echo m68k-atari-mint${UNAME_RELEASE} + exit 0 ;; + milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) + echo m68k-milan-mint${UNAME_RELEASE} + exit 0 ;; + hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) + echo m68k-hades-mint${UNAME_RELEASE} + exit 0 ;; + *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) + echo m68k-unknown-mint${UNAME_RELEASE} + exit 0 ;; + m68k:machten:*:*) + echo m68k-apple-machten${UNAME_RELEASE} + exit 0 ;; + powerpc:machten:*:*) + echo powerpc-apple-machten${UNAME_RELEASE} + exit 0 ;; + RISC*:Mach:*:*) + echo mips-dec-mach_bsd4.3 + exit 0 ;; + RISC*:ULTRIX:*:*) + echo mips-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + VAX*:ULTRIX*:*:*) + echo vax-dec-ultrix${UNAME_RELEASE} + exit 0 ;; + 2020:CLIX:*:* | 2430:CLIX:*:*) + echo clipper-intergraph-clix${UNAME_RELEASE} + exit 0 ;; + mips:*:*:UMIPS | mips:*:*:RISCos) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c +#ifdef __cplusplus +#include /* for printf() prototype */ + int main (int argc, char *argv[]) { +#else + int main (argc, argv) int argc; char *argv[]; { +#endif + #if defined (host_mips) && defined (MIPSEB) + #if defined (SYSTYPE_SYSV) + printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_SVR4) + printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); + #endif + #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) + printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); + #endif + #endif + exit (-1); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c \ + && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \ + && exit 0 + echo mips-mips-riscos${UNAME_RELEASE} + exit 0 ;; + Motorola:PowerMAX_OS:*:*) + echo powerpc-motorola-powermax + exit 0 ;; + Motorola:*:4.3:PL8-*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) + echo powerpc-harris-powermax + exit 0 ;; + Night_Hawk:Power_UNIX:*:*) + echo powerpc-harris-powerunix + exit 0 ;; + m88k:CX/UX:7*:*) + echo m88k-harris-cxux7 + exit 0 ;; + m88k:*:4*:R4*) + echo m88k-motorola-sysv4 + exit 0 ;; + m88k:*:3*:R3*) + echo m88k-motorola-sysv3 + exit 0 ;; + AViiON:dgux:*:*) + # DG/UX returns AViiON for all architectures + UNAME_PROCESSOR=`/usr/bin/uname -p` + if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] + then + if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ + [ ${TARGET_BINARY_INTERFACE}x = x ] + then + echo m88k-dg-dgux${UNAME_RELEASE} + else + echo m88k-dg-dguxbcs${UNAME_RELEASE} + fi + else + echo i586-dg-dgux${UNAME_RELEASE} + fi + exit 0 ;; + M88*:DolphinOS:*:*) # DolphinOS (SVR3) + echo m88k-dolphin-sysv3 + exit 0 ;; + M88*:*:R3*:*) + # Delta 88k system running SVR3 + echo m88k-motorola-sysv3 + exit 0 ;; + XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) + echo m88k-tektronix-sysv3 + exit 0 ;; + Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) + echo m68k-tektronix-bsd + exit 0 ;; + *:IRIX*:*:*) + echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` + exit 0 ;; + ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. + echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id + exit 0 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' + i*86:AIX:*:*) + echo i386-ibm-aix + exit 0 ;; + ia64:AIX:*:*) + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:2:3) + if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + + main() + { + if (!__power_pc()) + exit(1); + puts("powerpc-ibm-aix3.2.5"); + exit(0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo rs6000-ibm-aix3.2.5 + elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then + echo rs6000-ibm-aix3.2.4 + else + echo rs6000-ibm-aix3.2 + fi + exit 0 ;; + *:AIX:*:[45]) + IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` + if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then + IBM_ARCH=rs6000 + else + IBM_ARCH=powerpc + fi + if [ -x /usr/bin/oslevel ] ; then + IBM_REV=`/usr/bin/oslevel` + else + IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} + fi + echo ${IBM_ARCH}-ibm-aix${IBM_REV} + exit 0 ;; + *:AIX:*:*) + echo rs6000-ibm-aix + exit 0 ;; + ibmrt:4.4BSD:*|romp-ibm:BSD:*) + echo romp-ibm-bsd4.4 + exit 0 ;; + ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and + echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to + exit 0 ;; # report: romp-ibm BSD 4.3 + *:BOSX:*:*) + echo rs6000-bull-bosx + exit 0 ;; + DPX/2?00:B.O.S.:*:*) + echo m68k-bull-sysv3 + exit 0 ;; + 9000/[34]??:4.3bsd:1.*:*) + echo m68k-hp-bsd + exit 0 ;; + hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) + echo m68k-hp-bsd4.4 + exit 0 ;; + 9000/[34678]??:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + case "${UNAME_MACHINE}" in + 9000/31? ) HP_ARCH=m68000 ;; + 9000/[34]?? ) HP_ARCH=m68k ;; + 9000/[678][0-9][0-9]) + if [ -x /usr/bin/getconf ]; then + sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` + sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` + case "${sc_cpu_version}" in + 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 + 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 + 532) # CPU_PA_RISC2_0 + case "${sc_kernel_bits}" in + 32) HP_ARCH="hppa2.0n" ;; + 64) HP_ARCH="hppa2.0w" ;; + '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 + esac ;; + esac + fi + if [ "${HP_ARCH}" = "" ]; then + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + + #define _HPUX_SOURCE + #include + #include + + int main () + { + #if defined(_SC_KERNEL_BITS) + long bits = sysconf(_SC_KERNEL_BITS); + #endif + long cpu = sysconf (_SC_CPU_VERSION); + + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1"); break; + case CPU_PA_RISC2_0: + #if defined(_SC_KERNEL_BITS) + switch (bits) + { + case 64: puts ("hppa2.0w"); break; + case 32: puts ("hppa2.0n"); break; + default: puts ("hppa2.0"); break; + } break; + #else /* !defined(_SC_KERNEL_BITS) */ + puts ("hppa2.0"); break; + #endif + default: puts ("hppa1.0"); break; + } + exit (0); + } +EOF + (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` + test -z "$HP_ARCH" && HP_ARCH=hppa + fi ;; + esac + if [ ${HP_ARCH} = "hppa2.0w" ] + then + # avoid double evaluation of $set_cc_for_build + test -n "$CC_FOR_BUILD" || eval $set_cc_for_build + if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null + then + HP_ARCH="hppa2.0w" + else + HP_ARCH="hppa64" + fi + fi + echo ${HP_ARCH}-hp-hpux${HPUX_REV} + exit 0 ;; + ia64:HP-UX:*:*) + HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` + echo ia64-hp-hpux${HPUX_REV} + exit 0 ;; + 3050*:HI-UX:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + int + main () + { + long cpu = sysconf (_SC_CPU_VERSION); + /* The order matters, because CPU_IS_HP_MC68K erroneously returns + true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct + results, however. */ + if (CPU_IS_PA_RISC (cpu)) + { + switch (cpu) + { + case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; + case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; + case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; + default: puts ("hppa-hitachi-hiuxwe2"); break; + } + } + else if (CPU_IS_HP_MC68K (cpu)) + puts ("m68k-hitachi-hiuxwe2"); + else puts ("unknown-hitachi-hiuxwe2"); + exit (0); + } +EOF + $CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0 + echo unknown-hitachi-hiuxwe2 + exit 0 ;; + 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) + echo hppa1.1-hp-bsd + exit 0 ;; + 9000/8??:4.3bsd:*:*) + echo hppa1.0-hp-bsd + exit 0 ;; + *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) + echo hppa1.0-hp-mpeix + exit 0 ;; + hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) + echo hppa1.1-hp-osf + exit 0 ;; + hp8??:OSF1:*:*) + echo hppa1.0-hp-osf + exit 0 ;; + i*86:OSF1:*:*) + if [ -x /usr/sbin/sysversion ] ; then + echo ${UNAME_MACHINE}-unknown-osf1mk + else + echo ${UNAME_MACHINE}-unknown-osf1 + fi + exit 0 ;; + parisc*:Lites*:*:*) + echo hppa1.1-hp-lites + exit 0 ;; + C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) + echo c1-convex-bsd + exit 0 ;; + C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) + echo c34-convex-bsd + exit 0 ;; + C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) + echo c38-convex-bsd + exit 0 ;; + C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) + echo c4-convex-bsd + exit 0 ;; + CRAY*Y-MP:*:*:*) + echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*[A-Z]90:*:*:*) + echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ + | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ + -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ + -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*TS:*:*:*) + echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*T3E:*:*:*) + echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + CRAY*SV1:*:*:*) + echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + *:UNICOS/mp:*:*) + echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' + exit 0 ;; + F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) + FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` + echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + 5000:UNIX_System_V:4.*:*) + FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` + FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` + echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" + exit 0 ;; + i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) + echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} + exit 0 ;; + sparc*:BSD/OS:*:*) + echo sparc-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:BSD/OS:*:*) + echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} + exit 0 ;; + *:FreeBSD:*:*) + # Determine whether the default compiler uses glibc. + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #if __GLIBC__ >= 2 + LIBC=gnu + #else + LIBC= + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + # GNU/KFreeBSD systems have a "k" prefix to indicate we are using + # FreeBSD's kernel, but not the complete OS. + case ${LIBC} in gnu) kernel_only='k' ;; esac + echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC} + exit 0 ;; + i*:CYGWIN*:*) + echo ${UNAME_MACHINE}-pc-cygwin + exit 0 ;; + i*:MINGW*:*) + echo ${UNAME_MACHINE}-pc-mingw32 + exit 0 ;; + i*:PW*:*) + echo ${UNAME_MACHINE}-pc-pw32 + exit 0 ;; + x86:Interix*:[34]*) + echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//' + exit 0 ;; + [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) + echo i${UNAME_MACHINE}-pc-mks + exit 0 ;; + i*:Windows_NT*:* | Pentium*:Windows_NT*:*) + # How do we know it's Interix rather than the generic POSIX subsystem? + # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we + # UNAME_MACHINE based on the output of uname instead of i386? + echo i586-pc-interix + exit 0 ;; + i*:UWIN*:*) + echo ${UNAME_MACHINE}-pc-uwin + exit 0 ;; + p*:CYGWIN*:*) + echo powerpcle-unknown-cygwin + exit 0 ;; + prep*:SunOS:5.*:*) + echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` + exit 0 ;; + *:GNU:*:*) + # the GNU system + echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` + exit 0 ;; + *:GNU/*:*:*) + # other systems with GNU libc and userland + echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu + exit 0 ;; + i*86:Minix:*:*) + echo ${UNAME_MACHINE}-pc-minix + exit 0 ;; + arm*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + cris:Linux:*:*) + echo cris-axis-linux-gnu + exit 0 ;; + ia64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + m68*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + mips:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips + #undef mipsel + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mipsel + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + mips64:Linux:*:*) + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #undef CPU + #undef mips64 + #undef mips64el + #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) + CPU=mips64el + #else + #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) + CPU=mips64 + #else + CPU= + #endif + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=` + test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0 + ;; + ppc:Linux:*:*) + echo powerpc-unknown-linux-gnu + exit 0 ;; + ppc64:Linux:*:*) + echo powerpc64-unknown-linux-gnu + exit 0 ;; + alpha:Linux:*:*) + case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in + EV5) UNAME_MACHINE=alphaev5 ;; + EV56) UNAME_MACHINE=alphaev56 ;; + PCA56) UNAME_MACHINE=alphapca56 ;; + PCA57) UNAME_MACHINE=alphapca56 ;; + EV6) UNAME_MACHINE=alphaev6 ;; + EV67) UNAME_MACHINE=alphaev67 ;; + EV68*) UNAME_MACHINE=alphaev68 ;; + esac + objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null + if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi + echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC} + exit 0 ;; + parisc:Linux:*:* | hppa:Linux:*:*) + # Look for CPU level + case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in + PA7*) echo hppa1.1-unknown-linux-gnu ;; + PA8*) echo hppa2.0-unknown-linux-gnu ;; + *) echo hppa-unknown-linux-gnu ;; + esac + exit 0 ;; + parisc64:Linux:*:* | hppa64:Linux:*:*) + echo hppa64-unknown-linux-gnu + exit 0 ;; + s390:Linux:*:* | s390x:Linux:*:*) + echo ${UNAME_MACHINE}-ibm-linux + exit 0 ;; + sh64*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sh*:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + sparc:Linux:*:* | sparc64:Linux:*:*) + echo ${UNAME_MACHINE}-unknown-linux-gnu + exit 0 ;; + x86_64:Linux:*:*) + echo x86_64-unknown-linux-gnu + exit 0 ;; + i*86:Linux:*:*) + # The BFD linker knows what the default object file format is, so + # first see if it will tell us. cd to the root directory to prevent + # problems with other programs or directories called `ld' in the path. + # Set LC_ALL=C to ensure ld outputs messages in English. + ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ + | sed -ne '/supported targets:/!d + s/[ ][ ]*/ /g + s/.*supported targets: *// + s/ .*// + p'` + case "$ld_supported_targets" in + elf32-i386) + TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" + ;; + a.out-i386-linux) + echo "${UNAME_MACHINE}-pc-linux-gnuaout" + exit 0 ;; + coff-i386) + echo "${UNAME_MACHINE}-pc-linux-gnucoff" + exit 0 ;; + "") + # Either a pre-BFD a.out linker (linux-gnuoldld) or + # one that does not give us useful --help. + echo "${UNAME_MACHINE}-pc-linux-gnuoldld" + exit 0 ;; + esac + # Determine whether the default compiler is a.out or elf + eval $set_cc_for_build + sed 's/^ //' << EOF >$dummy.c + #include + #ifdef __ELF__ + # ifdef __GLIBC__ + # if __GLIBC__ >= 2 + LIBC=gnu + # else + LIBC=gnulibc1 + # endif + # else + LIBC=gnulibc1 + # endif + #else + #ifdef __INTEL_COMPILER + LIBC=gnu + #else + LIBC=gnuaout + #endif + #endif + #ifdef __dietlibc__ + LIBC=dietlibc + #endif +EOF + eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` + test x"${LIBC}" != x && echo "${UNAME_MACHINE}-pc-linux-${LIBC}" && exit 0 + test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0 + ;; + i*86:DYNIX/ptx:4*:*) + # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. + # earlier versions are messed up and put the nodename in both + # sysname and nodename. + echo i386-sequent-sysv4 + exit 0 ;; + i*86:UNIX_SV:4.2MP:2.*) + # Unixware is an offshoot of SVR4, but it has its own version + # number series starting with 2... + # I am not positive that other SVR4 systems won't match this, + # I just have to hope. -- rms. + # Use sysv4.2uw... so that sysv4* matches it. + echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} + exit 0 ;; + i*86:OS/2:*:*) + # If we were able to find `uname', then EMX Unix compatibility + # is probably installed. + echo ${UNAME_MACHINE}-pc-os2-emx + exit 0 ;; + i*86:XTS-300:*:STOP) + echo ${UNAME_MACHINE}-unknown-stop + exit 0 ;; + i*86:atheos:*:*) + echo ${UNAME_MACHINE}-unknown-atheos + exit 0 ;; + i*86:syllable:*:*) + echo ${UNAME_MACHINE}-pc-syllable + exit 0 ;; + i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) + echo i386-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + i*86:*DOS:*:*) + echo ${UNAME_MACHINE}-pc-msdosdjgpp + exit 0 ;; + i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) + UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` + if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then + echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} + else + echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} + fi + exit 0 ;; + i*86:*:5:[78]*) + case `/bin/uname -X | grep "^Machine"` in + *486*) UNAME_MACHINE=i486 ;; + *Pentium) UNAME_MACHINE=i586 ;; + *Pent*|*Celeron) UNAME_MACHINE=i686 ;; + esac + echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} + exit 0 ;; + i*86:*:3.2:*) + if test -f /usr/options/cb.name; then + UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then + UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` + (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 + (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ + && UNAME_MACHINE=i586 + (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ + && UNAME_MACHINE=i686 + (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ + && UNAME_MACHINE=i686 + echo ${UNAME_MACHINE}-pc-sco$UNAME_REL + else + echo ${UNAME_MACHINE}-pc-sysv32 + fi + exit 0 ;; + pc:*:*:*) + # Left here for compatibility: + # uname -m prints for DJGPP always 'pc', but it prints nothing about + # the processor, so we play safe by assuming i386. + echo i386-pc-msdosdjgpp + exit 0 ;; + Intel:Mach:3*:*) + echo i386-pc-mach3 + exit 0 ;; + paragon:*:*:*) + echo i860-intel-osf1 + exit 0 ;; + i860:*:4.*:*) # i860-SVR4 + if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then + echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 + else # Add other i860-SVR4 vendors below as they are discovered. + echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 + fi + exit 0 ;; + mini*:CTIX:SYS*5:*) + # "miniframe" + echo m68010-convergent-sysv + exit 0 ;; + mc68k:UNIX:SYSTEM5:3.51m) + echo m68k-convergent-sysv + exit 0 ;; + M680?0:D-NIX:5.3:*) + echo m68k-diab-dnix + exit 0 ;; + M68*:*:R3V[567]*:*) + test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;; + 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0) + OS_REL='' + test -r /etc/.relid \ + && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4.3${OS_REL} && exit 0 + /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ + && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;; + 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) + /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ + && echo i486-ncr-sysv4 && exit 0 ;; + m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) + echo m68k-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + mc68030:UNIX_System_V:4.*:*) + echo m68k-atari-sysv4 + exit 0 ;; + TSUNAMI:LynxOS:2.*:*) + echo sparc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + rs6000:LynxOS:2.*:*) + echo rs6000-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) + echo powerpc-unknown-lynxos${UNAME_RELEASE} + exit 0 ;; + SM[BE]S:UNIX_SV:*:*) + echo mips-dde-sysv${UNAME_RELEASE} + exit 0 ;; + RM*:ReliantUNIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + RM*:SINIX-*:*:*) + echo mips-sni-sysv4 + exit 0 ;; + *:SINIX-*:*:*) + if uname -p 2>/dev/null >/dev/null ; then + UNAME_MACHINE=`(uname -p) 2>/dev/null` + echo ${UNAME_MACHINE}-sni-sysv4 + else + echo ns32k-sni-sysv + fi + exit 0 ;; + PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort + # says + echo i586-unisys-sysv4 + exit 0 ;; + *:UNIX_System_V:4*:FTX*) + # From Gerald Hewes . + # How about differentiating between stratus architectures? -djm + echo hppa1.1-stratus-sysv4 + exit 0 ;; + *:*:*:FTX*) + # From seanf@swdc.stratus.com. + echo i860-stratus-sysv4 + exit 0 ;; + *:VOS:*:*) + # From Paul.Green@stratus.com. + echo hppa1.1-stratus-vos + exit 0 ;; + mc68*:A/UX:*:*) + echo m68k-apple-aux${UNAME_RELEASE} + exit 0 ;; + news*:NEWS-OS:6*:*) + echo mips-sony-newsos6 + exit 0 ;; + R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) + if [ -d /usr/nec ]; then + echo mips-nec-sysv${UNAME_RELEASE} + else + echo mips-unknown-sysv${UNAME_RELEASE} + fi + exit 0 ;; + BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. + echo powerpc-be-beos + exit 0 ;; + BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. + echo powerpc-apple-beos + exit 0 ;; + BePC:BeOS:*:*) # BeOS running on Intel PC compatible. + echo i586-pc-beos + exit 0 ;; + SX-4:SUPER-UX:*:*) + echo sx4-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-5:SUPER-UX:*:*) + echo sx5-nec-superux${UNAME_RELEASE} + exit 0 ;; + SX-6:SUPER-UX:*:*) + echo sx6-nec-superux${UNAME_RELEASE} + exit 0 ;; + Power*:Rhapsody:*:*) + echo powerpc-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Rhapsody:*:*) + echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} + exit 0 ;; + *:Darwin:*:*) + case `uname -p` in + *86) UNAME_PROCESSOR=i686 ;; + powerpc) UNAME_PROCESSOR=powerpc ;; + esac + echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} + exit 0 ;; + *:procnto*:*:* | *:QNX:[0123456789]*:*) + UNAME_PROCESSOR=`uname -p` + if test "$UNAME_PROCESSOR" = "x86"; then + UNAME_PROCESSOR=i386 + UNAME_MACHINE=pc + fi + echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} + exit 0 ;; + *:QNX:*:4*) + echo i386-pc-qnx + exit 0 ;; + NSR-?:NONSTOP_KERNEL:*:*) + echo nsr-tandem-nsk${UNAME_RELEASE} + exit 0 ;; + *:NonStop-UX:*:*) + echo mips-compaq-nonstopux + exit 0 ;; + BS2000:POSIX*:*:*) + echo bs2000-siemens-sysv + exit 0 ;; + DS/*:UNIX_System_V:*:*) + echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} + exit 0 ;; + *:Plan9:*:*) + # "uname -m" is not consistent, so use $cputype instead. 386 + # is converted to i386 for consistency with other x86 + # operating systems. + if test "$cputype" = "386"; then + UNAME_MACHINE=i386 + else + UNAME_MACHINE="$cputype" + fi + echo ${UNAME_MACHINE}-unknown-plan9 + exit 0 ;; + *:TOPS-10:*:*) + echo pdp10-unknown-tops10 + exit 0 ;; + *:TENEX:*:*) + echo pdp10-unknown-tenex + exit 0 ;; + KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) + echo pdp10-dec-tops20 + exit 0 ;; + XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) + echo pdp10-xkl-tops20 + exit 0 ;; + *:TOPS-20:*:*) + echo pdp10-unknown-tops20 + exit 0 ;; + *:ITS:*:*) + echo pdp10-unknown-its + exit 0 ;; + SEI:*:*:SEIUX) + echo mips-sei-seiux${UNAME_RELEASE} + exit 0 ;; + *:DragonFly:*:*) + echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` + exit 0 ;; +esac + +#echo '(No uname command or uname output not recognized.)' 1>&2 +#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 + +eval $set_cc_for_build +cat >$dummy.c < +# include +#endif +main () +{ +#if defined (sony) +#if defined (MIPSEB) + /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, + I don't know.... */ + printf ("mips-sony-bsd\n"); exit (0); +#else +#include + printf ("m68k-sony-newsos%s\n", +#ifdef NEWSOS4 + "4" +#else + "" +#endif + ); exit (0); +#endif +#endif + +#if defined (__arm) && defined (__acorn) && defined (__unix) + printf ("arm-acorn-riscix"); exit (0); +#endif + +#if defined (hp300) && !defined (hpux) + printf ("m68k-hp-bsd\n"); exit (0); +#endif + +#if defined (NeXT) +#if !defined (__ARCHITECTURE__) +#define __ARCHITECTURE__ "m68k" +#endif + int version; + version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; + if (version < 4) + printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); + else + printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); + exit (0); +#endif + +#if defined (MULTIMAX) || defined (n16) +#if defined (UMAXV) + printf ("ns32k-encore-sysv\n"); exit (0); +#else +#if defined (CMU) + printf ("ns32k-encore-mach\n"); exit (0); +#else + printf ("ns32k-encore-bsd\n"); exit (0); +#endif +#endif +#endif + +#if defined (__386BSD__) + printf ("i386-pc-bsd\n"); exit (0); +#endif + +#if defined (sequent) +#if defined (i386) + printf ("i386-sequent-dynix\n"); exit (0); +#endif +#if defined (ns32000) + printf ("ns32k-sequent-dynix\n"); exit (0); +#endif +#endif + +#if defined (_SEQUENT_) + struct utsname un; + + uname(&un); + + if (strncmp(un.version, "V2", 2) == 0) { + printf ("i386-sequent-ptx2\n"); exit (0); + } + if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ + printf ("i386-sequent-ptx1\n"); exit (0); + } + printf ("i386-sequent-ptx\n"); exit (0); + +#endif + +#if defined (vax) +# if !defined (ultrix) +# include +# if defined (BSD) +# if BSD == 43 + printf ("vax-dec-bsd4.3\n"); exit (0); +# else +# if BSD == 199006 + printf ("vax-dec-bsd4.3reno\n"); exit (0); +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# endif +# else + printf ("vax-dec-bsd\n"); exit (0); +# endif +# else + printf ("vax-dec-ultrix\n"); exit (0); +# endif +#endif + +#if defined (alliant) && defined (i860) + printf ("i860-alliant-bsd\n"); exit (0); +#endif + + exit (1); +} +EOF + +$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0 + +# Apollos put the system type in the environment. + +test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; } + +# Convex versions that predate uname can use getsysinfo(1) + +if [ -x /usr/convex/getsysinfo ] +then + case `getsysinfo -f cpu_type` in + c1*) + echo c1-convex-bsd + exit 0 ;; + c2*) + if getsysinfo -f scalar_acc + then echo c32-convex-bsd + else echo c2-convex-bsd + fi + exit 0 ;; + c34*) + echo c34-convex-bsd + exit 0 ;; + c38*) + echo c38-convex-bsd + exit 0 ;; + c4*) + echo c4-convex-bsd + exit 0 ;; + esac +fi + +cat >&2 < in order to provide the needed +information to handle your system. + +config.guess timestamp = $timestamp + +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null` + +hostinfo = `(hostinfo) 2>/dev/null` +/bin/universe = `(/bin/universe) 2>/dev/null` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` +/bin/arch = `(/bin/arch) 2>/dev/null` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` + +UNAME_MACHINE = ${UNAME_MACHINE} +UNAME_RELEASE = ${UNAME_RELEASE} +UNAME_SYSTEM = ${UNAME_SYSTEM} +UNAME_VERSION = ${UNAME_VERSION} +EOF + +exit 1 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/neo/curl/config.sub b/neo/curl/config.sub new file mode 100644 index 0000000..463186d --- /dev/null +++ b/neo/curl/config.sub @@ -0,0 +1,1537 @@ +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002, 2003 Free Software Foundation, Inc. + +timestamp='2004-01-05' + +# This file is (in principle) common to ALL GNU software. +# The presence of a machine in this file suggests that SOME GNU software +# can handle that machine. It does not imply ALL GNU software can. +# +# This file is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, +# Boston, MA 02111-1307, USA. + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# Please send patches to . Submit a context +# diff and a properly formatted ChangeLog entry. +# +# Configuration subroutine to validate and canonicalize a configuration type. +# Supply the specified configuration type as an argument. +# If it is invalid, we print an error message on stderr and exit with code 1. +# Otherwise, we print the canonical config type on stdout and succeed. + +# This file is supposed to be the same for all GNU packages +# and recognize all the CPU types, system types and aliases +# that are meaningful with *any* GNU software. +# Each package is responsible for reporting which valid configurations +# it does not support. The user should be able to distinguish +# a failure to support a valid configuration from a meaningless +# configuration. + +# The goal of this file is to map all the various variations of a given +# machine specification into a single specification in the form: +# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM +# or in some cases, the newer four-part form: +# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM +# It is wrong to echo any other type of specification. + +me=`echo "$0" | sed -e 's,.*/,,'` + +usage="\ +Usage: $0 [OPTION] CPU-MFR-OPSYS + $0 [OPTION] ALIAS + +Canonicalize a configuration name. + +Operation modes: + -h, --help print this help, then exit + -t, --time-stamp print date of last modification, then exit + -v, --version print version number, then exit + +Report bugs and patches to ." + +version="\ +GNU config.sub ($timestamp) + +Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +Free Software Foundation, Inc. + +This is free software; see the source for copying conditions. There is NO +warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." + +help=" +Try \`$me --help' for more information." + +# Parse command line +while test $# -gt 0 ; do + case $1 in + --time-stamp | --time* | -t ) + echo "$timestamp" ; exit 0 ;; + --version | -v ) + echo "$version" ; exit 0 ;; + --help | --h* | -h ) + echo "$usage"; exit 0 ;; + -- ) # Stop option processing + shift; break ;; + - ) # Use stdin as input. + break ;; + -* ) + echo "$me: invalid option $1$help" + exit 1 ;; + + *local*) + # First pass through any local machine types. + echo $1 + exit 0;; + + * ) + break ;; + esac +done + +case $# in + 0) echo "$me: missing argument$help" >&2 + exit 1;; + 1) ;; + *) echo "$me: too many arguments$help" >&2 + exit 1;; +esac + +# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). +# Here we must recognize all the valid KERNEL-OS combinations. +maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` +case $maybe_os in + nto-qnx* | linux-gnu* | linux-dietlibc | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | \ + kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*) + os=-$maybe_os + basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` + ;; + *) + basic_machine=`echo $1 | sed 's/-[^-]*$//'` + if [ $basic_machine != $1 ] + then os=`echo $1 | sed 's/.*-/-/'` + else os=; fi + ;; +esac + +### Let's recognize common machines as not being operating systems so +### that things like config.sub decstation-3100 work. We also +### recognize some manufacturers as not being operating systems, so we +### can provide default operating systems below. +case $os in + -sun*os*) + # Prevent following clause from handling this invalid input. + ;; + -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ + -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ + -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ + -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ + -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ + -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ + -apple | -axis) + os= + basic_machine=$1 + ;; + -sim | -cisco | -oki | -wec | -winbond) + os= + basic_machine=$1 + ;; + -scout) + ;; + -wrs) + os=-vxworks + basic_machine=$1 + ;; + -chorusos*) + os=-chorusos + basic_machine=$1 + ;; + -chorusrdb) + os=-chorusrdb + basic_machine=$1 + ;; + -hiux*) + os=-hiuxwe2 + ;; + -sco5) + os=-sco3.2v5 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco4) + os=-sco3.2v4 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2.[4-9]*) + os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco3.2v[4-9]*) + # Don't forget version if it is 3.2v4 or newer. + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -sco*) + os=-sco3.2v2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -udk*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -isc) + os=-isc2.2 + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -clix*) + basic_machine=clipper-intergraph + ;; + -isc*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` + ;; + -lynx*) + os=-lynxos + ;; + -ptx*) + basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` + ;; + -windowsnt*) + os=`echo $os | sed -e 's/windowsnt/winnt/'` + ;; + -psos*) + os=-psos + ;; + -mint | -mint[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; +esac + +# Decode aliases for certain CPU-COMPANY combinations. +case $basic_machine in + # Recognize the basic CPU types without company name. + # Some are omitted here because they have special meanings below. + 1750a | 580 \ + | a29k \ + | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ + | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ + | am33_2.0 \ + | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \ + | c4x | clipper \ + | d10v | d30v | dlx | dsp16xx \ + | fr30 | frv \ + | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ + | i370 | i860 | i960 | ia64 \ + | ip2k | iq2000 \ + | m32r | m68000 | m68k | m88k | mcore \ + | mips | mipsbe | mipseb | mipsel | mipsle \ + | mips16 \ + | mips64 | mips64el \ + | mips64vr | mips64vrel \ + | mips64orion | mips64orionel \ + | mips64vr4100 | mips64vr4100el \ + | mips64vr4300 | mips64vr4300el \ + | mips64vr5000 | mips64vr5000el \ + | mipsisa32 | mipsisa32el \ + | mipsisa32r2 | mipsisa32r2el \ + | mipsisa64 | mipsisa64el \ + | mipsisa64r2 | mipsisa64r2el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | msp430 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | tic4x | tic80 | tron \ + | v850 | v850e \ + | we32k \ + | x86 | xscale | xstormy16 | xtensa \ + | z8k) + basic_machine=$basic_machine-unknown + ;; + m6811 | m68hc11 | m6812 | m68hc12) + # Motorola 68HC11/12. + basic_machine=$basic_machine-unknown + os=-none + ;; + m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) + ;; + + # We use `pc' rather than `unknown' + # because (1) that's what they normally are, and + # (2) the word "unknown" tends to confuse beginning users. + i*86 | x86_64) + basic_machine=$basic_machine-pc + ;; + # Object if more than one company name word. + *-*-*) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; + # Recognize the basic CPU types with company name. + 580-* \ + | a29k-* \ + | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ + | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ + | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ + | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ + | avr-* \ + | bs2000-* \ + | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ + | clipper-* | cydra-* \ + | d10v-* | d30v-* | dlx-* \ + | elxsi-* \ + | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ + | h8300-* | h8500-* \ + | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ + | i*86-* | i860-* | i960-* | ia64-* \ + | ip2k-* | iq2000-* \ + | m32r-* \ + | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ + | m88110-* | m88k-* | mcore-* \ + | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ + | mips16-* \ + | mips64-* | mips64el-* \ + | mips64vr-* | mips64vrel-* \ + | mips64orion-* | mips64orionel-* \ + | mips64vr4100-* | mips64vr4100el-* \ + | mips64vr4300-* | mips64vr4300el-* \ + | mips64vr5000-* | mips64vr5000el-* \ + | mipsisa32-* | mipsisa32el-* \ + | mipsisa32r2-* | mipsisa32r2el-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64r2-* | mipsisa64r2el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39-* | mipstx39el-* \ + | msp430-* \ + | none-* | np1-* | nv1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* \ + | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ + | tron-* \ + | v850-* | v850e-* | vax-* \ + | we32k-* \ + | x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \ + | xtensa-* \ + | ymp-* \ + | z8k-*) + ;; + # Recognize the various machine names and aliases which stand + # for a CPU type and a company and sometimes even an OS. + 386bsd) + basic_machine=i386-unknown + os=-bsd + ;; + 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) + basic_machine=m68000-att + ;; + 3b*) + basic_machine=we32k-att + ;; + a29khif) + basic_machine=a29k-amd + os=-udi + ;; + adobe68k) + basic_machine=m68010-adobe + os=-scout + ;; + alliant | fx80) + basic_machine=fx80-alliant + ;; + altos | altos3068) + basic_machine=m68k-altos + ;; + am29k) + basic_machine=a29k-none + os=-bsd + ;; + amd64) + basic_machine=x86_64-pc + ;; + amd64-*) + basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + amdahl) + basic_machine=580-amdahl + os=-sysv + ;; + amiga | amiga-*) + basic_machine=m68k-unknown + ;; + amigaos | amigados) + basic_machine=m68k-unknown + os=-amigaos + ;; + amigaunix | amix) + basic_machine=m68k-unknown + os=-sysv4 + ;; + apollo68) + basic_machine=m68k-apollo + os=-sysv + ;; + apollo68bsd) + basic_machine=m68k-apollo + os=-bsd + ;; + aux) + basic_machine=m68k-apple + os=-aux + ;; + balance) + basic_machine=ns32k-sequent + os=-dynix + ;; + c90) + basic_machine=c90-cray + os=-unicos + ;; + convex-c1) + basic_machine=c1-convex + os=-bsd + ;; + convex-c2) + basic_machine=c2-convex + os=-bsd + ;; + convex-c32) + basic_machine=c32-convex + os=-bsd + ;; + convex-c34) + basic_machine=c34-convex + os=-bsd + ;; + convex-c38) + basic_machine=c38-convex + os=-bsd + ;; + cray | j90) + basic_machine=j90-cray + os=-unicos + ;; + crds | unos) + basic_machine=m68k-crds + ;; + cris | cris-* | etrax*) + basic_machine=cris-axis + ;; + da30 | da30-*) + basic_machine=m68k-da30 + ;; + decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) + basic_machine=mips-dec + ;; + decsystem10* | dec10*) + basic_machine=pdp10-dec + os=-tops10 + ;; + decsystem20* | dec20*) + basic_machine=pdp10-dec + os=-tops20 + ;; + delta | 3300 | motorola-3300 | motorola-delta \ + | 3300-motorola | delta-motorola) + basic_machine=m68k-motorola + ;; + delta88) + basic_machine=m88k-motorola + os=-sysv3 + ;; + dpx20 | dpx20-*) + basic_machine=rs6000-bull + os=-bosx + ;; + dpx2* | dpx2*-bull) + basic_machine=m68k-bull + os=-sysv3 + ;; + ebmon29k) + basic_machine=a29k-amd + os=-ebmon + ;; + elxsi) + basic_machine=elxsi-elxsi + os=-bsd + ;; + encore | umax | mmax) + basic_machine=ns32k-encore + ;; + es1800 | OSE68k | ose68k | ose | OSE) + basic_machine=m68k-ericsson + os=-ose + ;; + fx2800) + basic_machine=i860-alliant + ;; + genix) + basic_machine=ns32k-ns + ;; + gmicro) + basic_machine=tron-gmicro + os=-sysv + ;; + go32) + basic_machine=i386-pc + os=-go32 + ;; + h3050r* | hiux*) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + h8300hms) + basic_machine=h8300-hitachi + os=-hms + ;; + h8300xray) + basic_machine=h8300-hitachi + os=-xray + ;; + h8500hms) + basic_machine=h8500-hitachi + os=-hms + ;; + harris) + basic_machine=m88k-harris + os=-sysv3 + ;; + hp300-*) + basic_machine=m68k-hp + ;; + hp300bsd) + basic_machine=m68k-hp + os=-bsd + ;; + hp300hpux) + basic_machine=m68k-hp + os=-hpux + ;; + hp3k9[0-9][0-9] | hp9[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k2[0-9][0-9] | hp9k31[0-9]) + basic_machine=m68000-hp + ;; + hp9k3[2-9][0-9]) + basic_machine=m68k-hp + ;; + hp9k6[0-9][0-9] | hp6[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hp9k7[0-79][0-9] | hp7[0-79][0-9]) + basic_machine=hppa1.1-hp + ;; + hp9k78[0-9] | hp78[0-9]) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) + # FIXME: really hppa2.0-hp + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][13679] | hp8[0-9][13679]) + basic_machine=hppa1.1-hp + ;; + hp9k8[0-9][0-9] | hp8[0-9][0-9]) + basic_machine=hppa1.0-hp + ;; + hppa-next) + os=-nextstep3 + ;; + hppaosf) + basic_machine=hppa1.1-hp + os=-osf + ;; + hppro) + basic_machine=hppa1.1-hp + os=-proelf + ;; + i370-ibm* | ibm*) + basic_machine=i370-ibm + ;; +# I'm not sure what "Sysv32" means. Should this be sysv3.2? + i*86v32) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv32 + ;; + i*86v4*) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv4 + ;; + i*86v) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-sysv + ;; + i*86sol2) + basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` + os=-solaris2 + ;; + i386mach) + basic_machine=i386-mach + os=-mach + ;; + i386-vsta | vsta) + basic_machine=i386-unknown + os=-vsta + ;; + iris | iris4d) + basic_machine=mips-sgi + case $os in + -irix*) + ;; + *) + os=-irix4 + ;; + esac + ;; + isi68 | isi) + basic_machine=m68k-isi + os=-sysv + ;; + m88k-omron*) + basic_machine=m88k-omron + ;; + magnum | m3230) + basic_machine=mips-mips + os=-sysv + ;; + merlin) + basic_machine=ns32k-utek + os=-sysv + ;; + mingw32) + basic_machine=i386-pc + os=-mingw32 + ;; + miniframe) + basic_machine=m68000-convergent + ;; + *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) + basic_machine=m68k-atari + os=-mint + ;; + mips3*-*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` + ;; + mips3*) + basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown + ;; + mmix*) + basic_machine=mmix-knuth + os=-mmixware + ;; + monitor) + basic_machine=m68k-rom68k + os=-coff + ;; + morphos) + basic_machine=powerpc-unknown + os=-morphos + ;; + msdos) + basic_machine=i386-pc + os=-msdos + ;; + mvs) + basic_machine=i370-ibm + os=-mvs + ;; + ncr3000) + basic_machine=i486-ncr + os=-sysv4 + ;; + netbsd386) + basic_machine=i386-unknown + os=-netbsd + ;; + netwinder) + basic_machine=armv4l-rebel + os=-linux + ;; + news | news700 | news800 | news900) + basic_machine=m68k-sony + os=-newsos + ;; + news1000) + basic_machine=m68030-sony + os=-newsos + ;; + news-3600 | risc-news) + basic_machine=mips-sony + os=-newsos + ;; + necv70) + basic_machine=v70-nec + os=-sysv + ;; + next | m*-next ) + basic_machine=m68k-next + case $os in + -nextstep* ) + ;; + -ns2*) + os=-nextstep2 + ;; + *) + os=-nextstep3 + ;; + esac + ;; + nh3000) + basic_machine=m68k-harris + os=-cxux + ;; + nh[45]000) + basic_machine=m88k-harris + os=-cxux + ;; + nindy960) + basic_machine=i960-intel + os=-nindy + ;; + mon960) + basic_machine=i960-intel + os=-mon960 + ;; + nonstopux) + basic_machine=mips-compaq + os=-nonstopux + ;; + np1) + basic_machine=np1-gould + ;; + nv1) + basic_machine=nv1-cray + os=-unicosmp + ;; + nsr-tandem) + basic_machine=nsr-tandem + ;; + op50n-* | op60c-*) + basic_machine=hppa1.1-oki + os=-proelf + ;; + or32 | or32-*) + basic_machine=or32-unknown + os=-coff + ;; + os400) + basic_machine=powerpc-ibm + os=-os400 + ;; + OSE68000 | ose68000) + basic_machine=m68000-ericsson + os=-ose + ;; + os68k) + basic_machine=m68k-none + os=-os68k + ;; + pa-hitachi) + basic_machine=hppa1.1-hitachi + os=-hiuxwe2 + ;; + paragon) + basic_machine=i860-intel + os=-osf + ;; + pbd) + basic_machine=sparc-tti + ;; + pbb) + basic_machine=m68k-tti + ;; + pc532 | pc532-*) + basic_machine=ns32k-pc532 + ;; + pentium | p5 | k5 | k6 | nexgen | viac3) + basic_machine=i586-pc + ;; + pentiumpro | p6 | 6x86 | athlon | athlon_*) + basic_machine=i686-pc + ;; + pentiumii | pentium2 | pentiumiii | pentium3) + basic_machine=i686-pc + ;; + pentium4) + basic_machine=i786-pc + ;; + pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) + basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumpro-* | p6-* | 6x86-* | athlon-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pentium4-*) + basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sei) + basic_machine=mips-sei + os=-seiux + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparclite-wrs | simso-wrs) + basic_machine=sparclite-wrs + os=-vxworks + ;; + sps7) + basic_machine=m68k-bull + os=-sysv2 + ;; + spur) + basic_machine=spur-unknown + ;; + st2000) + basic_machine=m68k-tandem + ;; + stratus) + basic_machine=i860-stratus + os=-sysv4 + ;; + sun2) + basic_machine=m68000-sun + ;; + sun2os3) + basic_machine=m68000-sun + os=-sunos3 + ;; + sun2os4) + basic_machine=m68000-sun + os=-sunos4 + ;; + sun3os3) + basic_machine=m68k-sun + os=-sunos3 + ;; + sun3os4) + basic_machine=m68k-sun + os=-sunos4 + ;; + sun4os3) + basic_machine=sparc-sun + os=-sunos3 + ;; + sun4os4) + basic_machine=sparc-sun + os=-sunos4 + ;; + sun4sol2) + basic_machine=sparc-sun + os=-solaris2 + ;; + sun3 | sun3-*) + basic_machine=m68k-sun + ;; + sun4) + basic_machine=sparc-sun + ;; + sun386 | sun386i | roadrunner) + basic_machine=i386-sun + ;; + sv1) + basic_machine=sv1-cray + os=-unicos + ;; + symmetry) + basic_machine=i386-sequent + os=-dynix + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic54x | c54x*) + basic_machine=tic54x-unknown + os=-coff + ;; + tic55x | c55x*) + basic_machine=tic55x-unknown + os=-coff + ;; + tic6x | c6x*) + basic_machine=tic6x-unknown + os=-coff + ;; + tx39) + basic_machine=mipstx39-unknown + ;; + tx39el) + basic_machine=mipstx39el-unknown + ;; + toad1) + basic_machine=pdp10-xkl + os=-tops20 + ;; + tower | tower-32) + basic_machine=m68k-ncr + ;; + tpf) + basic_machine=s390x-ibm + os=-tpf + ;; + udi29k) + basic_machine=a29k-amd + os=-udi + ;; + ultra3) + basic_machine=a29k-nyu + os=-sym1 + ;; + v810 | necv810) + basic_machine=v810-nec + os=-none + ;; + vaxv) + basic_machine=vax-dec + os=-sysv + ;; + vms) + basic_machine=vax-dec + os=-vms + ;; + vpp*|vx|vx-*) + basic_machine=f301-fujitsu + ;; + vxworks960) + basic_machine=i960-wrs + os=-vxworks + ;; + vxworks68) + basic_machine=m68k-wrs + os=-vxworks + ;; + vxworks29k) + basic_machine=a29k-wrs + os=-vxworks + ;; + w65*) + basic_machine=w65-wdc + os=-none + ;; + w89k-*) + basic_machine=hppa1.1-winbond + os=-proelf + ;; + xps | xps100) + basic_machine=xps100-honeywell + ;; + ymp) + basic_machine=ymp-cray + os=-unicos + ;; + z8k-*-coff) + basic_machine=z8k-unknown + os=-sim + ;; + none) + basic_machine=none-none + os=-none + ;; + +# Here we handle the default manufacturer of certain CPU types. It is in +# some cases the only manufacturer, in others, it is the most popular. + w89k) + basic_machine=hppa1.1-winbond + ;; + op50n) + basic_machine=hppa1.1-oki + ;; + op60c) + basic_machine=hppa1.1-oki + ;; + romp) + basic_machine=romp-ibm + ;; + rs6000) + basic_machine=rs6000-ibm + ;; + vax) + basic_machine=vax-dec + ;; + pdp10) + # there are many clones, so DEC is not a safe bet + basic_machine=pdp10-unknown + ;; + pdp11) + basic_machine=pdp11-dec + ;; + we32k) + basic_machine=we32k-att + ;; + sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele) + basic_machine=sh-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -knetbsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \ + | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ + | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ + | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ + | -chorusos* | -chorusrdb* \ + | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ + | -mingw32* | -linux-gnu* | -linux-uclibc* | -uxpv* | -beos* | -mpeix* | -udk* \ + | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ + | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ + | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ + | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ + | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ + | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly*) + # Remember, each alternative MUST END IN *, to match a version number. + ;; + -qnx*) + case $basic_machine in + x86-* | i*86-*) + ;; + *) + os=-nto$os + ;; + esac + ;; + -nto-qnx*) + ;; + -nto*) + os=`echo $os | sed -e 's|nto|nto-qnx|'` + ;; + -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ + | -windows* | -osx | -abug | -netware* | -os9* | -beos* \ + | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) + ;; + -mac*) + os=`echo $os | sed -e 's|mac|macos|'` + ;; + -linux-dietlibc) + os=-linux-dietlibc + ;; + -linux*) + os=`echo $os | sed -e 's|linux|linux-gnu|'` + ;; + -sunos5*) + os=`echo $os | sed -e 's|sunos5|solaris2|'` + ;; + -sunos6*) + os=`echo $os | sed -e 's|sunos6|solaris3|'` + ;; + -opened*) + os=-openedition + ;; + -os400*) + os=-os400 + ;; + -wince*) + os=-wince + ;; + -osfrose*) + os=-osfrose + ;; + -osf*) + os=-osf + ;; + -utek*) + os=-bsd + ;; + -dynix*) + os=-bsd + ;; + -acis*) + os=-aos + ;; + -atheos*) + os=-atheos + ;; + -syllable*) + os=-syllable + ;; + -386bsd) + os=-bsd + ;; + -ctix* | -uts*) + os=-sysv + ;; + -nova*) + os=-rtmk-nova + ;; + -ns2 ) + os=-nextstep2 + ;; + -nsk*) + os=-nsk + ;; + # Preserve the version number of sinix5. + -sinix5.*) + os=`echo $os | sed -e 's|sinix|sysv|'` + ;; + -sinix*) + os=-sysv4 + ;; + -tpf*) + os=-tpf + ;; + -triton*) + os=-sysv3 + ;; + -oss*) + os=-sysv3 + ;; + -svr4) + os=-sysv4 + ;; + -svr3) + os=-sysv3 + ;; + -sysvr4) + os=-sysv4 + ;; + # This must come after -sysvr4. + -sysv*) + ;; + -ose*) + os=-ose + ;; + -es1800*) + os=-ose + ;; + -xenix) + os=-xenix + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + os=-mint + ;; + -aros*) + os=-aros + ;; + -kaos*) + os=-kaos + ;; + -none) + ;; + *) + # Get rid of the `-' at the beginning of $os. + os=`echo $os | sed 's/[^-]*-//'` + echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 + exit 1 + ;; +esac +else + +# Here we handle the default operating systems that come with various machines. +# The value should be what the vendor currently ships out the door with their +# machine or put another way, the most popular os provided with the machine. + +# Note that if you're going to try to match "-MANUFACTURER" here (say, +# "-sun"), then you have to tell the case statement up towards the top +# that MANUFACTURER isn't an operating system. Otherwise, code above +# will signal an error saying that MANUFACTURER isn't an operating +# system, and we'll never get to this point. + +case $basic_machine in + *-acorn) + os=-riscix1.2 + ;; + arm*-rebel) + os=-linux + ;; + arm*-semi) + os=-aout + ;; + c4x-* | tic4x-*) + os=-coff + ;; + # This must come before the *-dec entry. + pdp10-*) + os=-tops20 + ;; + pdp11-*) + os=-none + ;; + *-dec | vax-*) + os=-ultrix4.2 + ;; + m68*-apollo) + os=-domain + ;; + i386-sun) + os=-sunos4.0.2 + ;; + m68000-sun) + os=-sunos3 + # This also exists in the configure program, but was not the + # default. + # os=-sunos4 + ;; + m68*-cisco) + os=-aout + ;; + mips*-cisco) + os=-elf + ;; + mips*-*) + os=-elf + ;; + or32-*) + os=-coff + ;; + *-tti) # must be before sparc entry or we get the wrong os. + os=-sysv3 + ;; + sparc-* | *-sun) + os=-sunos4.1.1 + ;; + *-be) + os=-beos + ;; + *-ibm) + os=-aix + ;; + *-wec) + os=-proelf + ;; + *-winbond) + os=-proelf + ;; + *-oki) + os=-proelf + ;; + *-hp) + os=-hpux + ;; + *-hitachi) + os=-hiux + ;; + i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) + os=-sysv + ;; + *-cbm) + os=-amigaos + ;; + *-dg) + os=-dgux + ;; + *-dolphin) + os=-sysv3 + ;; + m68k-ccur) + os=-rtu + ;; + m88k-omron*) + os=-luna + ;; + *-next ) + os=-nextstep + ;; + *-sequent) + os=-ptx + ;; + *-crds) + os=-unos + ;; + *-ns) + os=-genix + ;; + i370-*) + os=-mvs + ;; + *-next) + os=-nextstep3 + ;; + *-gould) + os=-sysv + ;; + *-highlevel) + os=-bsd + ;; + *-encore) + os=-bsd + ;; + *-sgi) + os=-irix + ;; + *-siemens) + os=-sysv4 + ;; + *-masscomp) + os=-rtu + ;; + f30[01]-fujitsu | f700-fujitsu) + os=-uxpv + ;; + *-rom68k) + os=-coff + ;; + *-*bug) + os=-coff + ;; + *-apple) + os=-macos + ;; + *-atari*) + os=-mint + ;; + *) + os=-none + ;; +esac +fi + +# Here we handle the case where we know the os, and the CPU type, but not the +# manufacturer. We pick the logical manufacturer. +vendor=unknown +case $basic_machine in + *-unknown) + case $os in + -riscix*) + vendor=acorn + ;; + -sunos*) + vendor=sun + ;; + -aix*) + vendor=ibm + ;; + -beos*) + vendor=be + ;; + -hpux*) + vendor=hp + ;; + -mpeix*) + vendor=hp + ;; + -hiux*) + vendor=hitachi + ;; + -unos*) + vendor=crds + ;; + -dgux*) + vendor=dg + ;; + -luna*) + vendor=omron + ;; + -genix*) + vendor=ns + ;; + -mvs* | -opened*) + vendor=ibm + ;; + -os400*) + vendor=ibm + ;; + -ptx*) + vendor=sequent + ;; + -tpf*) + vendor=ibm + ;; + -vxsim* | -vxworks* | -windiss*) + vendor=wrs + ;; + -aux*) + vendor=apple + ;; + -hms*) + vendor=hitachi + ;; + -mpw* | -macos*) + vendor=apple + ;; + -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) + vendor=atari + ;; + -vos*) + vendor=stratus + ;; + esac + basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` + ;; +esac + +echo $basic_machine$os +exit 0 + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "timestamp='" +# time-stamp-format: "%:y-%02m-%02d" +# time-stamp-end: "'" +# End: diff --git a/neo/curl/configure b/neo/curl/configure new file mode 100755 index 0000000..6cd87b6 --- /dev/null +++ b/neo/curl/configure @@ -0,0 +1,31052 @@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. +# Generated by GNU Autoconf 2.59 for curl -. +# +# Report bugs to . +# +# Copyright (C) 2003 Free Software Foundation, Inc. +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +# +# Copyright (c) 1998 - 2004 Daniel Stenberg, +# This configure script may be copied, distributed and modified under the +# terms of the curl license; see COPYING for more details +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + + + +# Check that we are running under the correct shell. +SHELL=${CONFIG_SHELL-/bin/sh} + +case X$ECHO in +X*--fallback-echo) + # Remove one level of quotation (which was required for Make). + ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` + ;; +esac + +echo=${ECHO-echo} +if test "X$1" = X--no-reexec; then + # Discard the --no-reexec flag, and continue. + shift +elif test "X$1" = X--fallback-echo; then + # Avoid inline document here, it may be left over + : +elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then + # Yippee, $echo works! + : +else + # Restart under the correct shell. + exec $SHELL "$0" --no-reexec ${1+"$@"} +fi + +if test "X$1" = X--fallback-echo; then + # used as fallback echo + shift + cat </dev/null && + echo_test_string="`eval $cmd`" && + (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null + then + break + fi + done +fi + +if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + : +else + # The Solaris, AIX, and Digital Unix default echo programs unquote + # backslashes. This makes it impossible to quote backslashes using + # echo "$something" | sed 's/\\/\\\\/g' + # + # So, first we look for a working echo in the user's PATH. + + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for dir in $PATH /usr/ucb; do + IFS="$lt_save_ifs" + if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && + test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$dir/echo" + break + fi + done + IFS="$lt_save_ifs" + + if test "X$echo" = Xecho; then + # We didn't find a better echo, so look for alternatives. + if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # This shell has a builtin print -r that does the trick. + echo='print -r' + elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && + test "X$CONFIG_SHELL" != X/bin/ksh; then + # If we have ksh, try running configure again with it. + ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} + export ORIGINAL_CONFIG_SHELL + CONFIG_SHELL=/bin/ksh + export CONFIG_SHELL + exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} + else + # Try using printf. + echo='printf %s\n' + if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && + echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + # Cool, printf works + : + elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL + export CONFIG_SHELL + SHELL="$CONFIG_SHELL" + export SHELL + echo="$CONFIG_SHELL $0 --fallback-echo" + elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && + test "X$echo_testing_string" = 'X\t' && + echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && + test "X$echo_testing_string" = "X$echo_test_string"; then + echo="$CONFIG_SHELL $0 --fallback-echo" + else + # maybe with a smaller string... + prev=: + + for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do + if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null + then + break + fi + prev="$cmd" + done + + if test "$prev" != 'sed 50q "$0"'; then + echo_test_string=`eval $prev` + export echo_test_string + exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} + else + # Oops. We lost completely, so just stick with echo. + echo=echo + fi + fi + fi + fi +fi +fi + +# Copy echo and quote the copy suitably for passing to libtool from +# the Makefile, instead of quoting the original, which is used later. +ECHO=$echo +if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then + ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" +fi + + + + +tagnames=${tagnames+${tagnames},}CXX + +tagnames=${tagnames+${tagnames},}F77 + +# Name of the host. +# hostname on some systems (SVR3.2, Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +exec 6>&1 + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_config_libobj_dir=. +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= +SHELL=${CONFIG_SHELL-/bin/sh} + +# Maximum number of lines to put in a shell here document. +# This variable seems obsolete. It should probably be removed, and +# only ac_max_sed_lines should be used. +: ${ac_max_here_lines=38} + +# Identity of this package. +PACKAGE_NAME='curl' +PACKAGE_TARNAME='curl' +PACKAGE_VERSION='-' +PACKAGE_STRING='curl -' +PACKAGE_BUGREPORT='curl-bug@haxx.se' + +ac_unique_file="lib/urldata.h" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#if HAVE_SYS_TYPES_H +# include +#endif +#if HAVE_SYS_STAT_H +# include +#endif +#if STDC_HEADERS +# include +# include +#else +# if HAVE_STDLIB_H +# include +# endif +#endif +#if HAVE_STRING_H +# if !STDC_HEADERS && HAVE_MEMORY_H +# include +# endif +# include +#endif +#if HAVE_STRINGS_H +# include +#endif +#if HAVE_INTTYPES_H +# include +#else +# if HAVE_STDINT_H +# include +# endif +#endif +#if HAVE_UNISTD_H +# include +#endif" + +ac_subdirs_all="$ac_subdirs_all ares" +ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT SED AR INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot VERSIONNUM PKGADD_PKG PKGADD_NAME PKGADD_VENDOR build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP LN_S ECHO ac_ct_AR RANLIB ac_ct_RANLIB DLLTOOL ac_ct_DLLTOOL AS ac_ct_AS OBJDUMP ac_ct_OBJDUMP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL NO_UNDEFINED_TRUE NO_UNDEFINED_FALSE MIMPURE_TRUE MIMPURE_FALSE CURL_DISABLE_HTTP CURL_DISABLE_GOPHER CURL_DISABLE_FTP CURL_DISABLE_FILE CURL_DISABLE_LDAP CURL_DISABLE_DICT CURL_DISABLE_TELNET IPV6_ENABLED RANDOM_FILE KRB4_ENABLED PKGCONFIG OPENSSL_ENABLED CURL_CA_BUNDLE CABUNDLE_TRUE CABUNDLE_FALSE HAVE_LIBZ HAVE_LIBZ_TRUE HAVE_LIBZ_FALSE PERL NROFF MANOPT YACC USE_MANUAL_TRUE USE_MANUAL_FALSE HAVE_ARES subdirs LIBOBJS LTLIBOBJS' +ac_subst_files='' + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datadir='${prefix}/share' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +libdir='${exec_prefix}/lib' +includedir='${prefix}/include' +oldincludedir='/usr/include' +infodir='${prefix}/info' +mandir='${prefix}/man' + +ac_prev= +for ac_option +do + # If the previous option needs an argument, assign it. + if test -n "$ac_prev"; then + eval "$ac_prev=\$ac_option" + ac_prev= + continue + fi + + ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` + + # Accept the important Cygnus configure options, so we can diagnose typos. + + case $ac_option in + + -bindir | --bindir | --bindi | --bind | --bin | --bi) + ac_prev=bindir ;; + -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) + bindir=$ac_optarg ;; + + -build | --build | --buil | --bui | --bu) + ac_prev=build_alias ;; + -build=* | --build=* | --buil=* | --bui=* | --bu=*) + build_alias=$ac_optarg ;; + + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) + cache_file=$ac_optarg ;; + + --config-cache | -C) + cache_file=config.cache ;; + + -datadir | --datadir | --datadi | --datad | --data | --dat | --da) + ac_prev=datadir ;; + -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ + | --da=*) + datadir=$ac_optarg ;; + + -disable-* | --disable-*) + ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + eval "enable_$ac_feature=no" ;; + + -enable-* | --enable-*) + ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid feature name: $ac_feature" >&2 + { (exit 1); exit 1; }; } + ac_feature=`echo $ac_feature | sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "enable_$ac_feature='$ac_optarg'" ;; + + -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ + | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ + | --exec | --exe | --ex) + ac_prev=exec_prefix ;; + -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ + | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ + | --exec=* | --exe=* | --ex=*) + exec_prefix=$ac_optarg ;; + + -gas | --gas | --ga | --g) + # Obsolete; use --with-gas. + with_gas=yes ;; + + -help | --help | --hel | --he | -h) + ac_init_help=long ;; + -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) + ac_init_help=recursive ;; + -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) + ac_init_help=short ;; + + -host | --host | --hos | --ho) + ac_prev=host_alias ;; + -host=* | --host=* | --hos=* | --ho=*) + host_alias=$ac_optarg ;; + + -includedir | --includedir | --includedi | --included | --include \ + | --includ | --inclu | --incl | --inc) + ac_prev=includedir ;; + -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ + | --includ=* | --inclu=* | --incl=* | --inc=*) + includedir=$ac_optarg ;; + + -infodir | --infodir | --infodi | --infod | --info | --inf) + ac_prev=infodir ;; + -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) + infodir=$ac_optarg ;; + + -libdir | --libdir | --libdi | --libd) + ac_prev=libdir ;; + -libdir=* | --libdir=* | --libdi=* | --libd=*) + libdir=$ac_optarg ;; + + -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ + | --libexe | --libex | --libe) + ac_prev=libexecdir ;; + -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ + | --libexe=* | --libex=* | --libe=*) + libexecdir=$ac_optarg ;; + + -localstatedir | --localstatedir | --localstatedi | --localstated \ + | --localstate | --localstat | --localsta | --localst \ + | --locals | --local | --loca | --loc | --lo) + ac_prev=localstatedir ;; + -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ + | --localstate=* | --localstat=* | --localsta=* | --localst=* \ + | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) + localstatedir=$ac_optarg ;; + + -mandir | --mandir | --mandi | --mand | --man | --ma | --m) + ac_prev=mandir ;; + -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) + mandir=$ac_optarg ;; + + -nfp | --nfp | --nf) + # Obsolete; use --without-fp. + with_fp=no ;; + + -no-create | --no-create | --no-creat | --no-crea | --no-cre \ + | --no-cr | --no-c | -n) + no_create=yes ;; + + -no-recursion | --no-recursion | --no-recursio | --no-recursi \ + | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) + no_recursion=yes ;; + + -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ + | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ + | --oldin | --oldi | --old | --ol | --o) + ac_prev=oldincludedir ;; + -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ + | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ + | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) + oldincludedir=$ac_optarg ;; + + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + prefix=$ac_optarg ;; + + -program-prefix | --program-prefix | --program-prefi | --program-pref \ + | --program-pre | --program-pr | --program-p) + ac_prev=program_prefix ;; + -program-prefix=* | --program-prefix=* | --program-prefi=* \ + | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) + program_prefix=$ac_optarg ;; + + -program-suffix | --program-suffix | --program-suffi | --program-suff \ + | --program-suf | --program-su | --program-s) + ac_prev=program_suffix ;; + -program-suffix=* | --program-suffix=* | --program-suffi=* \ + | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) + program_suffix=$ac_optarg ;; + + -program-transform-name | --program-transform-name \ + | --program-transform-nam | --program-transform-na \ + | --program-transform-n | --program-transform- \ + | --program-transform | --program-transfor \ + | --program-transfo | --program-transf \ + | --program-trans | --program-tran \ + | --progr-tra | --program-tr | --program-t) + ac_prev=program_transform_name ;; + -program-transform-name=* | --program-transform-name=* \ + | --program-transform-nam=* | --program-transform-na=* \ + | --program-transform-n=* | --program-transform-=* \ + | --program-transform=* | --program-transfor=* \ + | --program-transfo=* | --program-transf=* \ + | --program-trans=* | --program-tran=* \ + | --progr-tra=* | --program-tr=* | --program-t=*) + program_transform_name=$ac_optarg ;; + + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + silent=yes ;; + + -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) + ac_prev=sbindir ;; + -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ + | --sbi=* | --sb=*) + sbindir=$ac_optarg ;; + + -sharedstatedir | --sharedstatedir | --sharedstatedi \ + | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ + | --sharedst | --shareds | --shared | --share | --shar \ + | --sha | --sh) + ac_prev=sharedstatedir ;; + -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ + | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ + | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ + | --sha=* | --sh=*) + sharedstatedir=$ac_optarg ;; + + -site | --site | --sit) + ac_prev=site ;; + -site=* | --site=* | --sit=*) + site=$ac_optarg ;; + + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + srcdir=$ac_optarg ;; + + -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ + | --syscon | --sysco | --sysc | --sys | --sy) + ac_prev=sysconfdir ;; + -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ + | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) + sysconfdir=$ac_optarg ;; + + -target | --target | --targe | --targ | --tar | --ta | --t) + ac_prev=target_alias ;; + -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) + target_alias=$ac_optarg ;; + + -v | -verbose | --verbose | --verbos | --verbo | --verb) + verbose=yes ;; + + -version | --version | --versio | --versi | --vers | -V) + ac_init_version=: ;; + + -with-* | --with-*) + ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package| sed 's/-/_/g'` + case $ac_option in + *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; + *) ac_optarg=yes ;; + esac + eval "with_$ac_package='$ac_optarg'" ;; + + -without-* | --without-*) + ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` + # Reject names that are not valid shell variable names. + expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid package name: $ac_package" >&2 + { (exit 1); exit 1; }; } + ac_package=`echo $ac_package | sed 's/-/_/g'` + eval "with_$ac_package=no" ;; + + --x) + # Obsolete; use --with-x. + with_x=yes ;; + + -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ + | --x-incl | --x-inc | --x-in | --x-i) + ac_prev=x_includes ;; + -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ + | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) + x_includes=$ac_optarg ;; + + -x-libraries | --x-libraries | --x-librarie | --x-librari \ + | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) + ac_prev=x_libraries ;; + -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ + | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) + x_libraries=$ac_optarg ;; + + -*) { echo "$as_me: error: unrecognized option: $ac_option +Try \`$0 --help' for more information." >&2 + { (exit 1); exit 1; }; } + ;; + + *=*) + ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` + # Reject names that are not valid shell variable names. + expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && + { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 + { (exit 1); exit 1; }; } + ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` + eval "$ac_envvar='$ac_optarg'" + export $ac_envvar ;; + + *) + # FIXME: should be removed in autoconf 3.0. + echo "$as_me: WARNING: you should use --build, --host, --target" >&2 + expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && + echo "$as_me: WARNING: invalid host type: $ac_option" >&2 + : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} + ;; + + esac +done + +if test -n "$ac_prev"; then + ac_option=--`echo $ac_prev | sed 's/_/-/g'` + { echo "$as_me: error: missing argument to $ac_option" >&2 + { (exit 1); exit 1; }; } +fi + +# Be sure to have absolute paths. +for ac_var in exec_prefix prefix +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* | NONE | '' ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# Be sure to have absolute paths. +for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ + localstatedir libdir includedir oldincludedir infodir mandir +do + eval ac_val=$`echo $ac_var` + case $ac_val in + [\\/$]* | ?:[\\/]* ) ;; + *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 + { (exit 1); exit 1; }; };; + esac +done + +# There might be people who depend on the old broken behavior: `$host' +# used to hold the argument of --host etc. +# FIXME: To remove some day. +build=$build_alias +host=$host_alias +target=$target_alias + +# FIXME: To remove some day. +if test "x$host_alias" != x; then + if test "x$build_alias" = x; then + cross_compiling=maybe + echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. + If a cross compiler is detected then cross compile mode will be used." >&2 + elif test "x$build_alias" != "x$host_alias"; then + cross_compiling=yes + fi +fi + +ac_tool_prefix= +test -n "$host_alias" && ac_tool_prefix=$host_alias- + +test "$silent" = yes && exec 6>/dev/null + + +# Find the source files, if location was not specified. +if test -z "$srcdir"; then + ac_srcdir_defaulted=yes + # Try the directory containing this script, then its parent. + ac_confdir=`(dirname "$0") 2>/dev/null || +$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$0" : 'X\(//\)[^/]' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$0" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + srcdir=$ac_confdir + if test ! -r $srcdir/$ac_unique_file; then + srcdir=.. + fi +else + ac_srcdir_defaulted=no +fi +if test ! -r $srcdir/$ac_unique_file; then + if test "$ac_srcdir_defaulted" = yes; then + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 + { (exit 1); exit 1; }; } + else + { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 + { (exit 1); exit 1; }; } + fi +fi +(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || + { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 + { (exit 1); exit 1; }; } +srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` +ac_env_build_alias_set=${build_alias+set} +ac_env_build_alias_value=$build_alias +ac_cv_env_build_alias_set=${build_alias+set} +ac_cv_env_build_alias_value=$build_alias +ac_env_host_alias_set=${host_alias+set} +ac_env_host_alias_value=$host_alias +ac_cv_env_host_alias_set=${host_alias+set} +ac_cv_env_host_alias_value=$host_alias +ac_env_target_alias_set=${target_alias+set} +ac_env_target_alias_value=$target_alias +ac_cv_env_target_alias_set=${target_alias+set} +ac_cv_env_target_alias_value=$target_alias +ac_env_CC_set=${CC+set} +ac_env_CC_value=$CC +ac_cv_env_CC_set=${CC+set} +ac_cv_env_CC_value=$CC +ac_env_CFLAGS_set=${CFLAGS+set} +ac_env_CFLAGS_value=$CFLAGS +ac_cv_env_CFLAGS_set=${CFLAGS+set} +ac_cv_env_CFLAGS_value=$CFLAGS +ac_env_LDFLAGS_set=${LDFLAGS+set} +ac_env_LDFLAGS_value=$LDFLAGS +ac_cv_env_LDFLAGS_set=${LDFLAGS+set} +ac_cv_env_LDFLAGS_value=$LDFLAGS +ac_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_env_CPPFLAGS_value=$CPPFLAGS +ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} +ac_cv_env_CPPFLAGS_value=$CPPFLAGS +ac_env_CPP_set=${CPP+set} +ac_env_CPP_value=$CPP +ac_cv_env_CPP_set=${CPP+set} +ac_cv_env_CPP_value=$CPP +ac_env_CXX_set=${CXX+set} +ac_env_CXX_value=$CXX +ac_cv_env_CXX_set=${CXX+set} +ac_cv_env_CXX_value=$CXX +ac_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_env_CXXFLAGS_value=$CXXFLAGS +ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set} +ac_cv_env_CXXFLAGS_value=$CXXFLAGS +ac_env_CXXCPP_set=${CXXCPP+set} +ac_env_CXXCPP_value=$CXXCPP +ac_cv_env_CXXCPP_set=${CXXCPP+set} +ac_cv_env_CXXCPP_value=$CXXCPP +ac_env_F77_set=${F77+set} +ac_env_F77_value=$F77 +ac_cv_env_F77_set=${F77+set} +ac_cv_env_F77_value=$F77 +ac_env_FFLAGS_set=${FFLAGS+set} +ac_env_FFLAGS_value=$FFLAGS +ac_cv_env_FFLAGS_set=${FFLAGS+set} +ac_cv_env_FFLAGS_value=$FFLAGS + +# +# Report the --help message. +# +if test "$ac_init_help" = "long"; then + # Omit some internal or obsolete options to make the list less imposing. + # This message is too long to be a string in the A/UX 3.1 sh. + cat <<_ACEOF +\`configure' configures curl - to adapt to many kinds of systems. + +Usage: $0 [OPTION]... [VAR=VALUE]... + +To assign environment variables (e.g., CC, CFLAGS...), specify them as +VAR=VALUE. See below for descriptions of some of the useful variables. + +Defaults for the options are specified in brackets. + +Configuration: + -h, --help display this help and exit + --help=short display options specific to this package + --help=recursive display the short help of all the included packages + -V, --version display version information and exit + -q, --quiet, --silent do not print \`checking...' messages + --cache-file=FILE cache test results in FILE [disabled] + -C, --config-cache alias for \`--cache-file=config.cache' + -n, --no-create do not create output files + --srcdir=DIR find the sources in DIR [configure dir or \`..'] + +_ACEOF + + cat <<_ACEOF +Installation directories: + --prefix=PREFIX install architecture-independent files in PREFIX + [$ac_default_prefix] + --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX + [PREFIX] + +By default, \`make install' will install all the files in +\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify +an installation prefix other than \`$ac_default_prefix' using \`--prefix', +for instance \`--prefix=\$HOME'. + +For better control, use the options below. + +Fine tuning of the installation directories: + --bindir=DIR user executables [EPREFIX/bin] + --sbindir=DIR system admin executables [EPREFIX/sbin] + --libexecdir=DIR program executables [EPREFIX/libexec] + --datadir=DIR read-only architecture-independent data [PREFIX/share] + --sysconfdir=DIR read-only single-machine data [PREFIX/etc] + --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] + --localstatedir=DIR modifiable single-machine data [PREFIX/var] + --libdir=DIR object code libraries [EPREFIX/lib] + --includedir=DIR C header files [PREFIX/include] + --oldincludedir=DIR C header files for non-gcc [/usr/include] + --infodir=DIR info documentation [PREFIX/info] + --mandir=DIR man documentation [PREFIX/man] +_ACEOF + + cat <<\_ACEOF + +Program names: + --program-prefix=PREFIX prepend PREFIX to installed program names + --program-suffix=SUFFIX append SUFFIX to installed program names + --program-transform-name=PROGRAM run sed PROGRAM on installed program names + +System types: + --build=BUILD configure for building on BUILD [guessed] + --host=HOST cross-compile to build programs to run on HOST [BUILD] +_ACEOF +fi + +if test -n "$ac_init_help"; then + case $ac_init_help in + short | recursive ) echo "Configuration of curl -:";; + esac + cat <<\_ACEOF + +Optional Features: + --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) + --enable-FEATURE[=ARG] include FEATURE [ARG=yes] + --enable-maintainer-mode enable make rules and dependencies not useful + (and sometimes confusing) to the casual installer + --disable-dependency-tracking speeds up one-time build + --enable-dependency-tracking do not reject slow dependency extractors + --disable-largefile omit support for large files + --enable-shared[=PKGS] + build shared libraries [default=yes] + --enable-static[=PKGS] + build static libraries [default=yes] + --enable-fast-install[=PKGS] + optimize for fast installation [default=yes] + --disable-libtool-lock avoid locking (might break parallel builds) + --enable-http Enable HTTP support + --disable-http Disable HTTP support + --enable-ftp Enable FTP support + --disable-ftp Disable FTP support + --enable-gopher Enable GOPHER support + --disable-gopher Disable GOPHER support + --enable-file Enable FILE support + --disable-file Disable FILE support + --enable-ldap Enable LDAP support + --disable-ldap Disable LDAP support + --enable-dict Enable DICT support + --disable-dict Disable DICT support + --enable-telnet Enable TELNET support + --disable-telnet Disable TELNET support + --enable-manual Enable built-in manual + --disable-manual Disable built-in manual + --enable-libgcc use libgcc when linking + --enable-ipv6 Enable ipv6 (with ipv4) support + --disable-ipv6 Disable ipv6 support + --enable-nonblocking Enable detecting how to do it + --disable-nonblocking Disable non-blocking socket detection + --disable-thread don't look for thread-safe functions + --enable-thread look for thread-safe functions + --enable-debug Enable pedantic debug options + --disable-debug Disable debug options + --enable-ares=PATH Enable ares for name lookups + --disable-ares Disable ares for name lookups + +Optional Packages: + --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] + --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) + --with-gnu-ld assume the C compiler uses GNU ld [default=no] + --with-pic try to use only PIC/non-PIC objects [default=use + both] + --with-tags[=TAGS] + include additional configurations [automatic] + --with-egd-socket=FILE Entropy Gathering Daemon socket pathname + --with-random=FILE read randomness from FILE (default=/dev/urandom) + --with-krb4-includes=DIR + Specify location of kerberos4 headers + --with-krb4-libs=DIR Specify location of kerberos4 libs + --with-krb4=DIR where to look for Kerberos4 + --with-spnego=DIR Specify location of SPNEGO library fbopenssl + --with-gssapi-includes=DIR + Specify location of GSSAPI header + --with-gssapi-libs=DIR Specify location of GSSAPI libs + --with-gssapi=DIR Where to look for GSSAPI + --with-ssl=PATH where to look for SSL, PATH points to the SSL + installation (default: /usr/local/ssl) + --without-ssl disable SSL + --with-ca-bundle=FILE File name to install the CA bundle as + --without-ca-bundle Don't install the CA bundle + --with-zlib=PATH search for zlib in PATH + --without-zlib disable use of zlib + +Some influential environment variables: + CC C compiler command + CFLAGS C compiler flags + LDFLAGS linker flags, e.g. -L if you have libraries in a + nonstandard directory + CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have + headers in a nonstandard directory + CPP C preprocessor + CXX C++ compiler command + CXXFLAGS C++ compiler flags + CXXCPP C++ preprocessor + F77 Fortran 77 compiler command + FFLAGS Fortran 77 compiler flags + +Use these variables to override the choices made by `configure' or to help +it to find libraries and programs with nonstandard names/locations. + +Report bugs to . +_ACEOF +fi + +if test "$ac_init_help" = "recursive"; then + # If there are subdirs, report their specific --help. + ac_popdir=`pwd` + for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue + test -d $ac_dir || continue + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + cd $ac_dir + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + echo + $SHELL $ac_srcdir/configure.gnu --help=recursive + elif test -f $ac_srcdir/configure; then + echo + $SHELL $ac_srcdir/configure --help=recursive + elif test -f $ac_srcdir/configure.ac || + test -f $ac_srcdir/configure.in; then + echo + $ac_configure --help + else + echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 + fi + cd $ac_popdir + done +fi + +test -n "$ac_init_help" && exit 0 +if $ac_init_version; then + cat <<\_ACEOF +curl configure - +generated by GNU Autoconf 2.59 + +Copyright (C) 2003 Free Software Foundation, Inc. +This configure script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it. + +Copyright (c) 1998 - 2004 Daniel Stenberg, +This configure script may be copied, distributed and modified under the +terms of the curl license; see COPYING for more details +_ACEOF + exit 0 +fi +exec 5>config.log +cat >&5 <<_ACEOF +This file contains any messages produced by compilers while +running configure, to aid debugging if configure makes a mistake. + +It was created by curl $as_me -, which was +generated by GNU Autoconf 2.59. Invocation command line was + + $ $0 $@ + +_ACEOF +{ +cat <<_ASUNAME +## --------- ## +## Platform. ## +## --------- ## + +hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` +uname -m = `(uname -m) 2>/dev/null || echo unknown` +uname -r = `(uname -r) 2>/dev/null || echo unknown` +uname -s = `(uname -s) 2>/dev/null || echo unknown` +uname -v = `(uname -v) 2>/dev/null || echo unknown` + +/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` +/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` + +/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` +/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` +/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` +hostinfo = `(hostinfo) 2>/dev/null || echo unknown` +/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` +/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` +/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` + +_ASUNAME + +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + echo "PATH: $as_dir" +done + +} >&5 + +cat >&5 <<_ACEOF + + +## ----------- ## +## Core tests. ## +## ----------- ## + +_ACEOF + + +# Keep a trace of the command line. +# Strip out --no-create and --no-recursion so they do not pile up. +# Strip out --silent because we don't want to record it for future runs. +# Also quote any args containing shell meta-characters. +# Make two passes to allow for proper duplicate-argument suppression. +ac_configure_args= +ac_configure_args0= +ac_configure_args1= +ac_sep= +ac_must_keep_next=false +for ac_pass in 1 2 +do + for ac_arg + do + case $ac_arg in + -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil) + continue ;; + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; + esac + case $ac_pass in + 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; + 2) + ac_configure_args1="$ac_configure_args1 '$ac_arg'" + if test $ac_must_keep_next = true; then + ac_must_keep_next=false # Got value, back to normal. + else + case $ac_arg in + *=* | --config-cache | -C | -disable-* | --disable-* \ + | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ + | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ + | -with-* | --with-* | -without-* | --without-* | --x) + case "$ac_configure_args0 " in + "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; + esac + ;; + -* ) ac_must_keep_next=true ;; + esac + fi + ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" + # Get rid of the leading space. + ac_sep=" " + ;; + esac + done +done +$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } +$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } + +# When interrupted or exit'd, cleanup temporary files, and complete +# config.log. We remove comments because anyway the quotes in there +# would cause problems or look ugly. +# WARNING: Be sure not to use single quotes in there, as some shells, +# such as our DU 5.0 friend, will then `close' the trap. +trap 'exit_status=$? + # Save into config.log some information that might help in debugging. + { + echo + + cat <<\_ASBOX +## ---------------- ## +## Cache variables. ## +## ---------------- ## +_ASBOX + echo + # The following way of writing the cache mishandles newlines in values, +{ + (set) 2>&1 | + case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in + *ac_space=\ *) + sed -n \ + "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" + ;; + *) + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} + echo + + cat <<\_ASBOX +## ----------------- ## +## Output variables. ## +## ----------------- ## +_ASBOX + echo + for ac_var in $ac_subst_vars + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + + if test -n "$ac_subst_files"; then + cat <<\_ASBOX +## ------------- ## +## Output files. ## +## ------------- ## +_ASBOX + echo + for ac_var in $ac_subst_files + do + eval ac_val=$`echo $ac_var` + echo "$ac_var='"'"'$ac_val'"'"'" + done | sort + echo + fi + + if test -s confdefs.h; then + cat <<\_ASBOX +## ----------- ## +## confdefs.h. ## +## ----------- ## +_ASBOX + echo + sed "/^$/d" confdefs.h | sort + echo + fi + test "$ac_signal" != 0 && + echo "$as_me: caught signal $ac_signal" + echo "$as_me: exit $exit_status" + } >&5 + rm -f core *.core && + rm -rf conftest* confdefs* conf$$* $ac_clean_files && + exit $exit_status + ' 0 +for ac_signal in 1 2 13 15; do + trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal +done +ac_signal=0 + +# confdefs.h avoids OS command line length limits that DEFS can exceed. +rm -rf conftest* confdefs.h +# AIX cpp loses on an empty file, so make sure it contains at least a newline. +echo >confdefs.h + +# Predefined preprocessor variables. + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_NAME "$PACKAGE_NAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_TARNAME "$PACKAGE_TARNAME" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_VERSION "$PACKAGE_VERSION" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_STRING "$PACKAGE_STRING" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" +_ACEOF + + +# Let the site file select an alternate cache file if it wants to. +# Prefer explicitly selected file to automatically selected ones. +if test -z "$CONFIG_SITE"; then + if test "x$prefix" != xNONE; then + CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" + else + CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" + fi +fi +for ac_site_file in $CONFIG_SITE; do + if test -r "$ac_site_file"; then + { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 +echo "$as_me: loading site script $ac_site_file" >&6;} + sed 's/^/| /' "$ac_site_file" >&5 + . "$ac_site_file" + fi +done + +if test -r "$cache_file"; then + # Some versions of bash will fail to source /dev/null (special + # files actually), so we avoid doing that. + if test -f "$cache_file"; then + { echo "$as_me:$LINENO: loading cache $cache_file" >&5 +echo "$as_me: loading cache $cache_file" >&6;} + case $cache_file in + [\\/]* | ?:[\\/]* ) . $cache_file;; + *) . ./$cache_file;; + esac + fi +else + { echo "$as_me:$LINENO: creating cache $cache_file" >&5 +echo "$as_me: creating cache $cache_file" >&6;} + >$cache_file +fi + +# Check that the precious variables saved in the cache have kept the same +# value. +ac_cache_corrupted=false +for ac_var in `(set) 2>&1 | + sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do + eval ac_old_set=\$ac_cv_env_${ac_var}_set + eval ac_new_set=\$ac_env_${ac_var}_set + eval ac_old_val="\$ac_cv_env_${ac_var}_value" + eval ac_new_val="\$ac_env_${ac_var}_value" + case $ac_old_set,$ac_new_set in + set,) + { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,set) + { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 +echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} + ac_cache_corrupted=: ;; + ,);; + *) + if test "x$ac_old_val" != "x$ac_new_val"; then + { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 +echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} + { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 +echo "$as_me: former value: $ac_old_val" >&2;} + { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 +echo "$as_me: current value: $ac_new_val" >&2;} + ac_cache_corrupted=: + fi;; + esac + # Pass precious variables to config.status. + if test "$ac_new_set" = set; then + case $ac_new_val in + *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) + ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; + *) ac_arg=$ac_var=$ac_new_val ;; + esac + case " $ac_configure_args " in + *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. + *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; + esac + fi +done +if $ac_cache_corrupted; then + { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 +echo "$as_me: error: changes in the environment can compromise the build" >&2;} + { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 +echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ac_config_headers="$ac_config_headers lib/config.h src/config.h" + +echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 +echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 + # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. +if test "${enable_maintainer_mode+set}" = set; then + enableval="$enable_maintainer_mode" + USE_MAINTAINER_MODE=$enableval +else + USE_MAINTAINER_MODE=no +fi; + echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 +echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 + + +if test $USE_MAINTAINER_MODE = yes; then + MAINTAINER_MODE_TRUE= + MAINTAINER_MODE_FALSE='#' +else + MAINTAINER_MODE_TRUE='#' + MAINTAINER_MODE_FALSE= +fi + + MAINT=$MAINTAINER_MODE_TRUE + + + +# Extract the first word of "sed", so it can be a program name with args. +set dummy sed; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $SED in + [\\/]* | ?:[\\/]*) + ac_cv_path_SED="$SED" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +SED=$ac_cv_path_SED + +if test -n "$SED"; then + echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + +# Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $AR in + [\\/]* | ?:[\\/]*) + ac_cv_path_AR="$AR" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin:/usr/ccs/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +AR=$ac_cv_path_AR + +if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + +VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curl.h` +am__api_version="1.8" +ac_aux_dir= +for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do + if test -f $ac_dir/install-sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install-sh -c" + break + elif test -f $ac_dir/install.sh; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/install.sh -c" + break + elif test -f $ac_dir/shtool; then + ac_aux_dir=$ac_dir + ac_install_sh="$ac_aux_dir/shtool install -c" + break + fi +done +if test -z "$ac_aux_dir"; then + { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 +echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} + { (exit 1); exit 1; }; } +fi +ac_config_guess="$SHELL $ac_aux_dir/config.guess" +ac_config_sub="$SHELL $ac_aux_dir/config.sub" +ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. + +# Find a good install program. We prefer a C program (faster), +# so one script is as good as another. But avoid the broken or +# incompatible versions: +# SysV /etc/install, /usr/sbin/install +# SunOS /usr/etc/install +# IRIX /sbin/install +# AIX /bin/install +# AmigaOS /C/install, which installs bootblocks on floppy discs +# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag +# AFS /usr/afsws/bin/install, which mishandles nonexistent args +# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" +# OS/2's system install, which has a completely different semantic +# ./install, which can be erroneously created by make from ./install.sh. +echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 +echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 +if test -z "$INSTALL"; then +if test "${ac_cv_path_install+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + # Account for people who put trailing slashes in PATH elements. +case $as_dir/ in + ./ | .// | /cC/* | \ + /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ + ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ + /usr/ucb/* ) ;; + *) + # OSF1 and SCO ODT 3.0 have their own names for install. + # Don't use installbsd from OSF since it installs stuff as root + # by default. + for ac_prog in ginstall scoinst install; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then + if test $ac_prog = install && + grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # AIX install. It has an incompatible calling convention. + : + elif test $ac_prog = install && + grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then + # program-specific install script used by HP pwplus--don't use. + : + else + ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" + break 3 + fi + fi + done + done + ;; +esac +done + + +fi + if test "${ac_cv_path_install+set}" = set; then + INSTALL=$ac_cv_path_install + else + # As a last resort, use the slow shell script. We don't cache a + # path for INSTALL within a source directory, because that will + # break other packages using the cache if that directory is + # removed, or if the path is relative. + INSTALL=$ac_install_sh + fi +fi +echo "$as_me:$LINENO: result: $INSTALL" >&5 +echo "${ECHO_T}$INSTALL" >&6 + +# Use test -z because SunOS4 sh mishandles braces in ${var-val}. +# It thinks the first close brace ends the variable substitution. +test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' + +test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' + +test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' + +echo "$as_me:$LINENO: checking whether build environment is sane" >&5 +echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 +# Just in case +sleep 1 +echo timestamp > conftest.file +# Do `set' in a subshell so we don't clobber the current shell's +# arguments. Must try -L first in case configure is actually a +# symlink; some systems play weird games with the mod time of symlinks +# (eg FreeBSD returns the mod time of the symlink's containing +# directory). +if ( + set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` + if test "$*" = "X"; then + # -L didn't work. + set X `ls -t $srcdir/configure conftest.file` + fi + rm -f conftest.file + if test "$*" != "X $srcdir/configure conftest.file" \ + && test "$*" != "X conftest.file $srcdir/configure"; then + + # If neither matched, then we have a broken ls. This can happen + # if, for instance, CONFIG_SHELL is bash and it inherits a + # broken ls alias from the environment. This has actually + # happened. Such a system could not be considered "sane". + { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&5 +echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken +alias in your environment" >&2;} + { (exit 1); exit 1; }; } + fi + + test "$2" = conftest.file + ) +then + # Ok. + : +else + { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! +Check your system clock" >&5 +echo "$as_me: error: newly created file is older than distributed files! +Check your system clock" >&2;} + { (exit 1); exit 1; }; } +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +test "$program_prefix" != NONE && + program_transform_name="s,^,$program_prefix,;$program_transform_name" +# Use a double $ so make ignores it. +test "$program_suffix" != NONE && + program_transform_name="s,\$,$program_suffix,;$program_transform_name" +# Double any \ or $. echo might interpret backslashes. +# By default was `s,x,x', remove it if useless. +cat <<\_ACEOF >conftest.sed +s/[\\$]/&&/g;s/;s,x,x,$// +_ACEOF +program_transform_name=`echo $program_transform_name | sed -f conftest.sed` +rm conftest.sed + +# expand $ac_aux_dir to an absolute path +am_aux_dir=`cd $ac_aux_dir && pwd` + +test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" +# Use eval to expand $SHELL +if eval "$MISSING --run true"; then + am_missing_run="$MISSING --run " +else + am_missing_run= + { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 +echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} +fi + +if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then + # Keeping the `.' argument allows $(mkdir_p) to be used without + # argument. Indeed, we sometimes output rules like + # $(mkdir_p) $(somedir) + # where $(somedir) is conditionally defined. + # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more + # expensive solution, as it forces Make to start a sub-shell.) + mkdir_p='mkdir -p -- .' +else + # On NextStep and OpenStep, the `mkdir' command does not + # recognize any option. It will interpret all options as + # directories to create, and then abort because `.' already + # exists. + for d in ./-p ./--version; + do + test -d $d && rmdir $d + done + # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. + if test -f "$ac_aux_dir/mkinstalldirs"; then + mkdir_p='$(mkinstalldirs)' + else + mkdir_p='$(install_sh) -d' + fi +fi + +for ac_prog in gawk mawk nawk awk +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AWK+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AWK"; then + ac_cv_prog_AWK="$AWK" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AWK="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AWK=$ac_cv_prog_AWK +if test -n "$AWK"; then + echo "$as_me:$LINENO: result: $AWK" >&5 +echo "${ECHO_T}$AWK" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$AWK" && break +done + +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="$(MAKE)"' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + +rm -rf .tst 2>/dev/null +mkdir .tst 2>/dev/null +if test -d .tst; then + am__leading_dot=. +else + am__leading_dot=_ +fi +rmdir .tst 2>/dev/null + +# test to see if srcdir already configured +if test "`cd $srcdir && pwd`" != "`pwd`" && + test -f $srcdir/config.status; then + { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 +echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} + { (exit 1); exit 1; }; } +fi + +# test whether we have cygpath +if test -z "$CYGPATH_W"; then + if (cygpath --version) >/dev/null 2>/dev/null; then + CYGPATH_W='cygpath -w' + else + CYGPATH_W=echo + fi +fi + + +# Define the identity of the package. + PACKAGE=curl + VERSION=$VERSION + + +cat >>confdefs.h <<_ACEOF +#define PACKAGE "$PACKAGE" +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define VERSION "$VERSION" +_ACEOF + +# Some tools Automake needs. + +ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} + + +AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} + + +AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} + + +AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} + + +MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} + + +AMTAR=${AMTAR-"${am_missing_run}tar"} + +install_sh=${install_sh-"$am_aux_dir/install-sh"} + +# Installed binaries are usually stripped using `strip' when the user +# run `make install-strip'. However `strip' might not be the right +# tool to use in cross-compilation environments, therefore Automake +# will honor the `STRIP' environment variable to overrule this program. +if test "$cross_compiling" != no; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi + +fi +INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" + +# We need awk for the "check" target. The system "awk" is bad on +# some platforms. + + + +echo "$as_me:$LINENO: checking curl version" >&5 +echo $ECHO_N "checking curl version... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $VERSION" >&5 +echo "${ECHO_T}$VERSION" >&6 + +VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curl.h` + + +PKGADD_PKG="HAXXcurl" +PKGADD_NAME="cURL - a client that groks URLs" +PKGADD_VENDOR="curl.haxx.se" + + + + + + +# Make sure we can run config.sub. +$ac_config_sub sun4 >/dev/null 2>&1 || + { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5 +echo "$as_me: error: cannot run $ac_config_sub" >&2;} + { (exit 1); exit 1; }; } + +echo "$as_me:$LINENO: checking build system type" >&5 +echo $ECHO_N "checking build system type... $ECHO_C" >&6 +if test "${ac_cv_build+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_build_alias=$build_alias +test -z "$ac_cv_build_alias" && + ac_cv_build_alias=`$ac_config_guess` +test -z "$ac_cv_build_alias" && + { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 +echo "$as_me: error: cannot guess build type; you must specify one" >&2;} + { (exit 1); exit 1; }; } +ac_cv_build=`$ac_config_sub $ac_cv_build_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_build" >&5 +echo "${ECHO_T}$ac_cv_build" >&6 +build=$ac_cv_build +build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + +echo "$as_me:$LINENO: checking host system type" >&5 +echo $ECHO_N "checking host system type... $ECHO_C" >&6 +if test "${ac_cv_host+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_host_alias=$host_alias +test -z "$ac_cv_host_alias" && + ac_cv_host_alias=$ac_cv_build_alias +ac_cv_host=`$ac_config_sub $ac_cv_host_alias` || + { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5 +echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;} + { (exit 1); exit 1; }; } + +fi +echo "$as_me:$LINENO: result: $ac_cv_host" >&5 +echo "${ECHO_T}$ac_cv_host" >&6 +host=$ac_cv_host +host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` +host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` +host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` + + + +cat >>confdefs.h <<_ACEOF +#define OS "${host}" +_ACEOF + + +DEPDIR="${am__leading_dot}deps" + + ac_config_commands="$ac_config_commands depfiles" + + +am_make=${MAKE-make} +cat > confinc << 'END' +am__doit: + @echo done +.PHONY: am__doit +END +# If we don't find an include directive, just comment out the code. +echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 +echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 +am__include="#" +am__quote= +_am_result=none +# First try GNU make style include. +echo "include confinc" > confmf +# We grep out `Entering directory' and `Leaving directory' +# messages which can occur if `w' ends up in MAKEFLAGS. +# In particular we don't look at `^make:' because GNU make might +# be invoked under some other name (usually "gmake"), in which +# case it prints its new name instead of `make'. +if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then + am__include=include + am__quote= + _am_result=GNU +fi +# Now try BSD make style include. +if test "$am__include" = "#"; then + echo '.include "confinc"' > confmf + if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then + am__include=.include + am__quote="\"" + _am_result=BSD + fi +fi + + +echo "$as_me:$LINENO: result: $_am_result" >&5 +echo "${ECHO_T}$_am_result" >&6 +rm -f confinc confmf + +# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. +if test "${enable_dependency_tracking+set}" = set; then + enableval="$enable_dependency_tracking" + +fi; +if test "x$enable_dependency_tracking" != xno; then + am_depcomp="$ac_aux_dir/depcomp" + AMDEPBACKSLASH='\' +fi + + +if test "x$enable_dependency_tracking" != xno; then + AMDEP_TRUE= + AMDEP_FALSE='#' +else + AMDEP_TRUE='#' + AMDEP_FALSE= +fi + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files a.out a.exe b.out" +# Try to create an executable without -o first, disregard a.out. +# It will help us diagnose broken compilers, and finding out an intuition +# of exeext. +echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 +echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6 +ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` +if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 + (eval $ac_link_default) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Find the output, starting from the most likely. This scheme is +# not robust to junk in `.', hence go to wildcards (a.*) only as a last +# resort. + +# Be careful to initialize this variable, since it used to be cached. +# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. +ac_cv_exeext= +# b.out is created by i960 compilers. +for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out +do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) + ;; + conftest.$ac_ext ) + # This is the source file. + ;; + [ab].out ) + # We found the default executable, but exeext='' is most + # certainly right. + break;; + *.* ) + ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + # FIXME: I believe we export ac_cv_exeext for Libtool, + # but it would be cool to find out if it's true. Does anybody + # maintain Libtool? --akim. + export ac_cv_exeext + break;; + * ) + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: C compiler cannot create executables +See \`config.log' for more details." >&5 +echo "$as_me: error: C compiler cannot create executables +See \`config.log' for more details." >&2;} + { (exit 77); exit 77; }; } +fi + +ac_exeext=$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_file" >&5 +echo "${ECHO_T}$ac_file" >&6 + +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether the C compiler works" >&5 +echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 +# FIXME: These cross compiler hacks should be removed for Autoconf 3.0 +# If not cross compiling, check that we can run a simple program. +if test "$cross_compiling" != yes; then + if { ac_try='./$ac_file' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + cross_compiling=no + else + if test "$cross_compiling" = maybe; then + cross_compiling=yes + else + { { echo "$as_me:$LINENO: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run C compiled programs. +If you meant to cross compile, use \`--host'. +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + fi + fi +fi +echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +rm -f a.out a.exe conftest$ac_cv_exeext b.out +ac_clean_files=$ac_clean_files_save +# Check the compiler produces executables we can run. If not, either +# the compiler is broken, or we cross compile. +echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 +echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $cross_compiling" >&5 +echo "${ECHO_T}$cross_compiling" >&6 + +echo "$as_me:$LINENO: checking for suffix of executables" >&5 +echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # If both `conftest.exe' and `conftest' are `present' (well, observable) +# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will +# work properly (i.e., refer to `conftest.exe'), while it won't with +# `rm'. +for ac_file in conftest.exe conftest conftest.*; do + test -f "$ac_file" || continue + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; + *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` + export ac_cv_exeext + break;; + * ) break;; + esac +done +else + { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of executables: cannot compile and link +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest$ac_cv_exeext +echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 +echo "${ECHO_T}$ac_cv_exeext" >&6 + +rm -f conftest.$ac_ext +EXEEXT=$ac_cv_exeext +ac_exeext=$EXEEXT +echo "$as_me:$LINENO: checking for suffix of object files" >&5 +echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 +if test "${ac_cv_objext+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.o conftest.obj +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do + case $ac_file in + *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; + *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` + break;; + esac +done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute suffix of object files: cannot compile +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +rm -f conftest.$ac_cv_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 +echo "${ECHO_T}$ac_cv_objext" >&6 +OBJEXT=$ac_cv_objext +ac_objext=$OBJEXT +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 +echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 +# On Suns, sometimes $CPP names a directory. +if test -n "$CPP" && test -d "$CPP"; then + CPP= +fi +if test -z "$CPP"; then + if test "${ac_cv_prog_CPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CPP needs to be expanded + for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" + do + ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CPP=$CPP + +fi + CPP=$ac_cv_prog_CPP +else + ac_cv_prog_CPP=$CPP +fi +echo "$as_me:$LINENO: result: $CPP" >&5 +echo "${ECHO_T}$CPP" >&6 +ac_preproc_ok=false +for ac_c_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +echo "$as_me:$LINENO: checking for egrep" >&5 +echo $ECHO_N "checking for egrep... $ECHO_C" >&6 +if test "${ac_cv_prog_egrep+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if echo a | (grep -E '(a|b)') >/dev/null 2>&1 + then ac_cv_prog_egrep='grep -E' + else ac_cv_prog_egrep='egrep' + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 +echo "${ECHO_T}$ac_cv_prog_egrep" >&6 + EGREP=$ac_cv_prog_egrep + + + +echo "$as_me:$LINENO: checking for AIX" >&5 +echo $ECHO_N "checking for AIX... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef _AIX + yes +#endif + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "yes" >/dev/null 2>&1; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +cat >>confdefs.h <<\_ACEOF +#define _ALL_SOURCE 1 +_ACEOF + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest* + + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. +set dummy ${ac_tool_prefix}gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "gcc", so it can be a program name with args. +set dummy gcc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="gcc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. +set dummy ${ac_tool_prefix}cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="${ac_tool_prefix}cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_CC"; then + ac_ct_CC=$CC + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + CC=$ac_ct_CC +else + CC="$ac_cv_prog_CC" +fi + +fi +if test -z "$CC"; then + # Extract the first word of "cc", so it can be a program name with args. +set dummy cc; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else + ac_prog_rejected=no +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then + ac_prog_rejected=yes + continue + fi + ac_cv_prog_CC="cc" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +if test $ac_prog_rejected = yes; then + # We found a bogon in the path, so make sure we never use it. + set dummy $ac_cv_prog_CC + shift + if test $# != 0; then + # We chose a different compiler from the bogus one. + # However, it has the same basename, so the bogon will be chosen + # first if we set CC to just the basename; use the full file name. + shift + ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" + fi +fi +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$CC"; then + if test -n "$ac_tool_prefix"; then + for ac_prog in cl + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CC"; then + ac_cv_prog_CC="$CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CC="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CC=$ac_cv_prog_CC +if test -n "$CC"; then + echo "$as_me:$LINENO: result: $CC" >&5 +echo "${ECHO_T}$CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CC" && break + done +fi +if test -z "$CC"; then + ac_ct_CC=$CC + for ac_prog in cl +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CC"; then + ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CC=$ac_cv_prog_ac_ct_CC +if test -n "$ac_ct_CC"; then + echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 +echo "${ECHO_T}$ac_ct_CC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CC" && break +done + + CC=$ac_ct_CC +fi + +fi + + +test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&5 +echo "$as_me: error: no acceptable C compiler found in \$PATH +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 +if test "${ac_cv_c_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_c_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 +GCC=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CFLAGS=${CFLAGS+set} +ac_save_CFLAGS=$CFLAGS +CFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 +echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cc_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 +if test "$ac_test_CFLAGS" = set; then + CFLAGS=$ac_save_CFLAGS +elif test $ac_cv_prog_cc_g = yes; then + if test "$GCC" = yes; then + CFLAGS="-g -O2" + else + CFLAGS="-g" + fi +else + if test "$GCC" = yes; then + CFLAGS="-O2" + else + CFLAGS= + fi +fi +echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 +echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 +if test "${ac_cv_prog_cc_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_prog_cc_stdc=no +ac_save_CC=$CC +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include +/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ +struct buf { int x; }; +FILE * (*rcsopen) (struct buf *, struct stat *, int); +static char *e (p, i) + char **p; + int i; +{ + return p[i]; +} +static char *f (char * (*g) (char **, int), char **p, ...) +{ + char *s; + va_list v; + va_start (v,p); + s = g (p, va_arg (v,int)); + va_end (v); + return s; +} + +/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has + function prototypes and stuff, but not '\xHH' hex character constants. + These don't provoke an error unfortunately, instead are silently treated + as 'x'. The following induces an error, until -std1 is added to get + proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an + array size at least. It's necessary to write '\x00'==0 to get something + that's true only with -std1. */ +int osf4_cc_array ['\x00' == 0 ? 1 : -1]; + +int test (int i, double x); +struct s1 {int (*f) (int a);}; +struct s2 {int (*f) (double a);}; +int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); +int argc; +char **argv; +int +main () +{ +return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; + ; + return 0; +} +_ACEOF +# Don't try gcc -ansi; that turns off useful extensions and +# breaks some systems' header files. +# AIX -qlanglvl=ansi +# Ultrix and OSF/1 -std1 +# HP-UX 10.20 and later -Ae +# HP-UX older versions -Aa -D_HPUX_SOURCE +# SVR4 -Xc -D__EXTENSIONS__ +for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" +do + CC="$ac_save_CC $ac_arg" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cc_stdc=$ac_arg +break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext +done +rm -f conftest.$ac_ext conftest.$ac_objext +CC=$ac_save_CC + +fi + +case "x$ac_cv_prog_cc_stdc" in + x|xno) + echo "$as_me:$LINENO: result: none needed" >&5 +echo "${ECHO_T}none needed" >&6 ;; + *) + echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 +echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 + CC="$CC $ac_cv_prog_cc_stdc" ;; +esac + +# Some people use a C++ compiler to compile C. Since we use `exit', +# in C++ we need to declare it. In case someone uses the same compiler +# for both compiling C and C++ we need to have the C++ compiler decide +# the declaration of exit, since it's the most demanding environment. +cat >conftest.$ac_ext <<_ACEOF +#ifndef __cplusplus + choke me +#endif +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +depcc="$CC" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CC_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + am_cv_CC_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CC_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 +CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then + am__fastdepCC_TRUE= + am__fastdepCC_FALSE='#' +else + am__fastdepCC_TRUE='#' + am__fastdepCC_FALSE= +fi + + + +# Check whether --enable-largefile or --disable-largefile was given. +if test "${enable_largefile+set}" = set; then + enableval="$enable_largefile" + +fi; +if test "$enable_largefile" != no; then + + echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 +echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_largefile_CC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_sys_largefile_CC=no + if test "$GCC" != yes; then + ac_save_CC=$CC + while :; do + # IRIX 6.2 and later do not support large files by default, + # so use the C compiler's -n32 option if that helps. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext + CC="$CC -n32" + rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_largefile_CC=' -n32'; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext + break + done + CC=$ac_save_CC + rm -f conftest.$ac_ext + fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 +echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6 + if test "$ac_cv_sys_largefile_CC" != no; then + CC=$CC$ac_cv_sys_largefile_CC + fi + + echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 +echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_file_offset_bits+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + ac_cv_sys_file_offset_bits=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _FILE_OFFSET_BITS 64 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_file_offset_bits=64; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + break +done +fi +echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 +echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6 +if test "$ac_cv_sys_file_offset_bits" != no; then + +cat >>confdefs.h <<_ACEOF +#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits +_ACEOF + +fi +rm -f conftest* + echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 +echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6 +if test "${ac_cv_sys_large_files+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + while :; do + ac_cv_sys_large_files=no + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#define _LARGE_FILES 1 +#include + /* Check that off_t can represent 2**63 - 1 correctly. + We can't simply define LARGE_OFF_T to be 9223372036854775807, + since some C++ compilers masquerading as C compilers + incorrectly reject 9223372036854775807. */ +#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) + int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 + && LARGE_OFF_T % 2147483647 == 1) + ? 1 : -1]; +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sys_large_files=1; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + break +done +fi +echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 +echo "${ECHO_T}$ac_cv_sys_large_files" >&6 +if test "$ac_cv_sys_large_files" != no; then + +cat >>confdefs.h <<_ACEOF +#define _LARGE_FILES $ac_cv_sys_large_files +_ACEOF + +fi +rm -f conftest* +fi + + + + + +# Check whether --enable-shared or --disable-shared was given. +if test "${enable_shared+set}" = set; then + enableval="$enable_shared" + p=${PACKAGE-default} + case $enableval in + yes) enable_shared=yes ;; + no) enable_shared=no ;; + *) + enable_shared=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_shared=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_shared=yes +fi; + +# Check whether --enable-static or --disable-static was given. +if test "${enable_static+set}" = set; then + enableval="$enable_static" + p=${PACKAGE-default} + case $enableval in + yes) enable_static=yes ;; + no) enable_static=no ;; + *) + enable_static=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_static=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_static=yes +fi; + +# Check whether --enable-fast-install or --disable-fast-install was given. +if test "${enable_fast_install+set}" = set; then + enableval="$enable_fast_install" + p=${PACKAGE-default} + case $enableval in + yes) enable_fast_install=yes ;; + no) enable_fast_install=no ;; + *) + enable_fast_install=no + # Look at the argument we got. We use all the common list separators. + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for pkg in $enableval; do + IFS="$lt_save_ifs" + if test "X$pkg" = "X$p"; then + enable_fast_install=yes + fi + done + IFS="$lt_save_ifs" + ;; + esac +else + enable_fast_install=yes +fi; + +echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 +echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6 +if test "${lt_cv_path_SED+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Loop through the user's path and test for sed and gsed. +# Then use that list of sed's as ones to test for truncation. +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for lt_ac_prog in sed gsed; do + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then + lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" + fi + done + done +done +lt_ac_max=0 +lt_ac_count=0 +# Add /usr/xpg4/bin/sed as it is typically found on Solaris +# along with /bin/sed that truncates output. +for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do + test ! -f $lt_ac_sed && break + cat /dev/null > conftest.in + lt_ac_count=0 + echo $ECHO_N "0123456789$ECHO_C" >conftest.in + # Check for GNU sed and select it if it is found. + if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then + lt_cv_path_SED=$lt_ac_sed + break + fi + while true; do + cat conftest.in conftest.in >conftest.tmp + mv conftest.tmp conftest.in + cp conftest.in conftest.nl + echo >>conftest.nl + $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break + cmp -s conftest.out conftest.nl || break + # 10000 chars as input seems more than enough + test $lt_ac_count -gt 10 && break + lt_ac_count=`expr $lt_ac_count + 1` + if test $lt_ac_count -gt $lt_ac_max; then + lt_ac_max=$lt_ac_count + lt_cv_path_SED=$lt_ac_sed + fi + done +done +SED=$lt_cv_path_SED + +fi + +echo "$as_me:$LINENO: result: $SED" >&5 +echo "${ECHO_T}$SED" >&6 + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld + + +echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 +echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6 +if test "${lt_cv_ld_reload_flag+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_ld_reload_flag='-r' +fi +echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 +echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6 +reload_flag=$lt_cv_ld_reload_flag +case $reload_flag in +"" | " "*) ;; +*) reload_flag=" $reload_flag" ;; +esac +reload_cmds='$LD$reload_flag -o $output$reload_objs' + +echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 +echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6 +if test "${lt_cv_path_NM+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$NM"; then + # Let the user override the test. + lt_cv_path_NM="$NM" +else + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + tmp_nm="$ac_dir/${ac_tool_prefix}nm" + if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then + # Check to see if the nm accepts a BSD-compat flag. + # Adding the `sed 1q' prevents false positives on HP-UX, which says: + # nm: unknown option "B" ignored + # Tru64's nm complains that /dev/null is an invalid object file + case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in + */dev/null* | *'Invalid file or object type'*) + lt_cv_path_NM="$tmp_nm -B" + break + ;; + *) + case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in + */dev/null*) + lt_cv_path_NM="$tmp_nm -p" + break + ;; + *) + lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but + continue # so that we can try to find one that supports BSD flags + ;; + esac + esac + fi + done + IFS="$lt_save_ifs" + test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm +fi +fi +echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 +echo "${ECHO_T}$lt_cv_path_NM" >&6 +NM="$lt_cv_path_NM" + +echo "$as_me:$LINENO: checking whether ln -s works" >&5 +echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6 +LN_S=$as_ln_s +if test "$LN_S" = "ln -s"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no, using $LN_S" >&5 +echo "${ECHO_T}no, using $LN_S" >&6 +fi + +echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 +echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6 +if test "${lt_cv_deplibs_check_method+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_file_magic_cmd='$MAGIC_CMD' +lt_cv_file_magic_test_file= +lt_cv_deplibs_check_method='unknown' +# Need to set the preceding variable on all platforms that support +# interlibrary dependencies. +# 'none' -- dependencies not supported. +# `unknown' -- same as none, but documents that we really don't know. +# 'pass_all' -- all dependencies passed with no checks. +# 'test_compile' -- check by making test program. +# 'file_magic [[regex]]' -- check by looking for files in library path +# which responds to the $file_magic_cmd with a given extended regex. +# If you have `file' or equivalent on your system and you're not sure +# whether `pass_all' will *always* work, you probably want this one. + +case $host_os in +aix4* | aix5*) + lt_cv_deplibs_check_method=pass_all + ;; + +beos*) + lt_cv_deplibs_check_method=pass_all + ;; + +bsdi4*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' + lt_cv_file_magic_cmd='/usr/bin/file -L' + lt_cv_file_magic_test_file=/shlib/libc.so + ;; + +cygwin*) + # win32_libid is a shell function defined in ltmain.sh + lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' + lt_cv_file_magic_cmd='win32_libid' + ;; + +mingw* | pw32*) + # Base MSYS/MinGW do not provide the 'file' command needed by + # win32_libid shell function, so use a weaker test based on 'objdump'. + lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' + lt_cv_file_magic_cmd='$OBJDUMP -f' + ;; + +darwin* | rhapsody*) + lt_cv_deplibs_check_method=pass_all + ;; + +freebsd* | kfreebsd*-gnu) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + case $host_cpu in + i*86 ) + # Not sure whether the presence of OpenBSD here was a mistake. + # Let's accept both of them until this is cleared up. + lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[3-9]86 (compact )?demand paged shared library' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + ;; + esac + else + lt_cv_deplibs_check_method=pass_all + fi + ;; + +gnu*) + lt_cv_deplibs_check_method=pass_all + ;; + +hpux10.20* | hpux11*) + lt_cv_file_magic_cmd=/usr/bin/file + case "$host_cpu" in + ia64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' + lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so + ;; + hppa*64*) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' + lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl + ;; + *) + lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' + lt_cv_file_magic_test_file=/usr/lib/libc.sl + ;; + esac + ;; + +irix5* | irix6* | nonstopux*) + case $LD in + *-32|*"-32 ") libmagic=32-bit;; + *-n32|*"-n32 ") libmagic=N32;; + *-64|*"-64 ") libmagic=64-bit;; + *) libmagic=never-match;; + esac + lt_cv_deplibs_check_method=pass_all + ;; + +# This must be Linux ELF. +linux*) + case $host_cpu in + alpha*|hppa*|i*86|ia64*|m68*|mips*|powerpc*|sparc*|s390*|sh*) + lt_cv_deplibs_check_method=pass_all ;; + *) + # glibc up to 2.1.1 does not perform some relocations on ARM + # this will be overridden with pass_all, but let us keep it just in case + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; + esac + lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` + lt_cv_deplibs_check_method=pass_all + ;; + +netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' + else + lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' + fi + ;; + +newos6*) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=/usr/lib/libnls.so + ;; + +nto-qnx*) + lt_cv_deplibs_check_method=unknown + ;; + +openbsd*) + lt_cv_file_magic_cmd=/usr/bin/file + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB shared object' + else + lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' + fi + ;; + +osf3* | osf4* | osf5*) + lt_cv_deplibs_check_method=pass_all + ;; + +sco3.2v5*) + lt_cv_deplibs_check_method=pass_all + ;; + +solaris*) + lt_cv_deplibs_check_method=pass_all + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + case $host_vendor in + motorola) + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' + lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` + ;; + ncr) + lt_cv_deplibs_check_method=pass_all + ;; + sequent) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' + ;; + sni) + lt_cv_file_magic_cmd='/bin/file' + lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" + lt_cv_file_magic_test_file=/lib/libc.so + ;; + siemens) + lt_cv_deplibs_check_method=pass_all + ;; + esac + ;; + +sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7* | sysv4*uw2*) + lt_cv_deplibs_check_method=pass_all + ;; +esac + +fi +echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 +echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6 +file_magic_cmd=$lt_cv_file_magic_cmd +deplibs_check_method=$lt_cv_deplibs_check_method +test -z "$deplibs_check_method" && deplibs_check_method=unknown + + + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" + +fi; +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + +# Some flags need to be propagated to the compiler or linker for good +# libtool support. +case $host in +ia64-*-hpux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case `/usr/bin/file conftest.$ac_objext` in + *ELF-32*) + HPUX_IA64_MODE="32" + ;; + *ELF-64*) + HPUX_IA64_MODE="64" + ;; + esac + fi + rm -rf conftest* + ;; +*-*-irix6*) + # Find out which ABI we are using. + echo '#line 5307 "configure"' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + if test "$lt_cv_prog_gnu_ld" = yes; then + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -melf32bsmip" + ;; + *N32*) + LD="${LD-ld} -melf32bmipn32" + ;; + *64-bit*) + LD="${LD-ld} -melf64bmip" + ;; + esac + else + case `/usr/bin/file conftest.$ac_objext` in + *32-bit*) + LD="${LD-ld} -32" + ;; + *N32*) + LD="${LD-ld} -n32" + ;; + *64-bit*) + LD="${LD-ld} -64" + ;; + esac + fi + fi + rm -rf conftest* + ;; + +x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) + # Find out which ABI we are using. + echo 'int i;' > conftest.$ac_ext + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + case "`/usr/bin/file conftest.o`" in + *32-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_i386" + ;; + ppc64-*linux*|powerpc64-*linux*) + LD="${LD-ld} -m elf32ppclinux" + ;; + s390x-*linux*) + LD="${LD-ld} -m elf_s390" + ;; + sparc64-*linux*) + LD="${LD-ld} -m elf32_sparc" + ;; + esac + ;; + *64-bit*) + case $host in + x86_64-*linux*) + LD="${LD-ld} -m elf_x86_64" + ;; + ppc*-*linux*|powerpc*-*linux*) + LD="${LD-ld} -m elf64ppc" + ;; + s390*-*linux*) + LD="${LD-ld} -m elf64_s390" + ;; + sparc*-*linux*) + LD="${LD-ld} -m elf64_sparc" + ;; + esac + ;; + esac + fi + rm -rf conftest* + ;; + +*-*-sco3.2v5*) + # On SCO OpenServer 5, we need -belf to get full-featured binaries. + SAVE_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -belf" + echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 +echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6 +if test "${lt_cv_cc_needs_belf+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + lt_cv_cc_needs_belf=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +lt_cv_cc_needs_belf=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 +echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6 + if test x"$lt_cv_cc_needs_belf" != x"yes"; then + # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf + CFLAGS="$SAVE_CFLAGS" + fi + ;; +*-*-cygwin* | *-*-mingw* | *-*-pw32*) + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. +set dummy ${ac_tool_prefix}dlltool; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$DLLTOOL"; then + ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +DLLTOOL=$ac_cv_prog_DLLTOOL +if test -n "$DLLTOOL"; then + echo "$as_me:$LINENO: result: $DLLTOOL" >&5 +echo "${ECHO_T}$DLLTOOL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_DLLTOOL"; then + ac_ct_DLLTOOL=$DLLTOOL + # Extract the first word of "dlltool", so it can be a program name with args. +set dummy dlltool; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_DLLTOOL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_DLLTOOL"; then + ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_DLLTOOL="dlltool" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_DLLTOOL" && ac_cv_prog_ac_ct_DLLTOOL="false" +fi +fi +ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL +if test -n "$ac_ct_DLLTOOL"; then + echo "$as_me:$LINENO: result: $ac_ct_DLLTOOL" >&5 +echo "${ECHO_T}$ac_ct_DLLTOOL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + DLLTOOL=$ac_ct_DLLTOOL +else + DLLTOOL="$ac_cv_prog_DLLTOOL" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. +set dummy ${ac_tool_prefix}as; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AS"; then + ac_cv_prog_AS="$AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AS="${ac_tool_prefix}as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AS=$ac_cv_prog_AS +if test -n "$AS"; then + echo "$as_me:$LINENO: result: $AS" >&5 +echo "${ECHO_T}$AS" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_AS"; then + ac_ct_AS=$AS + # Extract the first word of "as", so it can be a program name with args. +set dummy as; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_AS+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AS"; then + ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AS="as" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_AS" && ac_cv_prog_ac_ct_AS="false" +fi +fi +ac_ct_AS=$ac_cv_prog_ac_ct_AS +if test -n "$ac_ct_AS"; then + echo "$as_me:$LINENO: result: $ac_ct_AS" >&5 +echo "${ECHO_T}$ac_ct_AS" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + AS=$ac_ct_AS +else + AS="$ac_cv_prog_AS" +fi + + if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. +set dummy ${ac_tool_prefix}objdump; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$OBJDUMP"; then + ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +OBJDUMP=$ac_cv_prog_OBJDUMP +if test -n "$OBJDUMP"; then + echo "$as_me:$LINENO: result: $OBJDUMP" >&5 +echo "${ECHO_T}$OBJDUMP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_OBJDUMP"; then + ac_ct_OBJDUMP=$OBJDUMP + # Extract the first word of "objdump", so it can be a program name with args. +set dummy objdump; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_OBJDUMP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_OBJDUMP"; then + ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_OBJDUMP="objdump" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_OBJDUMP" && ac_cv_prog_ac_ct_OBJDUMP="false" +fi +fi +ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP +if test -n "$ac_ct_OBJDUMP"; then + echo "$as_me:$LINENO: result: $ac_ct_OBJDUMP" >&5 +echo "${ECHO_T}$ac_ct_OBJDUMP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + OBJDUMP=$ac_ct_OBJDUMP +else + OBJDUMP="$ac_cv_prog_OBJDUMP" +fi + + ;; + +esac + +need_locks="$enable_libtool_lock" + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + +# On IRIX 5.3, sys/types and inttypes.h are conflicting. + + + + + + + + + +for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ + inttypes.h stdint.h unistd.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + +for ac_header in dlfcn.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to curl-bug@haxx.se ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$CXX"; then + ac_cv_prog_CXX="$CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +CXX=$ac_cv_prog_CXX +if test -n "$CXX"; then + echo "$as_me:$LINENO: result: $CXX" >&5 +echo "${ECHO_T}$CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$CXX" && break + done +fi +if test -z "$CXX"; then + ac_ct_CXX=$CXX + for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_CXX"; then + ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_CXX="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_CXX=$ac_cv_prog_ac_ct_CXX +if test -n "$ac_ct_CXX"; then + echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 +echo "${ECHO_T}$ac_ct_CXX" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_CXX" && break +done +test -n "$ac_ct_CXX" || ac_ct_CXX="g++" + + CXX=$ac_ct_CXX +fi + + +# Provide some information about the compiler. +echo "$as_me:$LINENO:" \ + "checking for C++ compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + +echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6 +if test "${ac_cv_cxx_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +#ifndef __GNUC__ + choke me +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_cxx_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6 +GXX=`test $ac_compiler_gnu = yes && echo yes` +ac_test_CXXFLAGS=${CXXFLAGS+set} +ac_save_CXXFLAGS=$CXXFLAGS +CXXFLAGS="-g" +echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 +echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_cxx_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_cxx_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_cxx_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 +echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6 +if test "$ac_test_CXXFLAGS" = set; then + CXXFLAGS=$ac_save_CXXFLAGS +elif test $ac_cv_prog_cxx_g = yes; then + if test "$GXX" = yes; then + CXXFLAGS="-g -O2" + else + CXXFLAGS="-g" + fi +else + if test "$GXX" = yes; then + CXXFLAGS="-O2" + else + CXXFLAGS= + fi +fi +for ac_declaration in \ + '' \ + 'extern "C" void std::exit (int) throw (); using std::exit;' \ + 'extern "C" void std::exit (int); using std::exit;' \ + 'extern "C" void exit (int) throw ();' \ + 'extern "C" void exit (int);' \ + 'void exit (int);' +do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +#include +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +continue +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_declaration +int +main () +{ +exit (42); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +rm -f conftest* +if test -n "$ac_declaration"; then + echo '#ifdef __cplusplus' >>confdefs.h + echo $ac_declaration >>confdefs.h + echo '#endif' >>confdefs.h +fi + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + +depcc="$CXX" am_compiler_list= + +echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 +echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 +if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then + # We make a subdir and do the tests there. Otherwise we can end up + # making bogus files that we don't know about and never remove. For + # instance it was reported that on HP-UX the gcc test will end up + # making a dummy file named `D' -- because `-MD' means `put the output + # in D'. + mkdir conftest.dir + # Copy depcomp to subdir because otherwise we won't find it if we're + # using a relative directory. + cp "$am_depcomp" conftest.dir + cd conftest.dir + # We will build objects and dependencies in a subdirectory because + # it helps to detect inapplicable dependency modes. For instance + # both Tru64's cc and ICC support -MD to output dependencies as a + # side effect of compilation, but ICC will put the dependencies in + # the current directory while Tru64 will put them in the object + # directory. + mkdir sub + + am_cv_CXX_dependencies_compiler_type=none + if test "$am_compiler_list" = ""; then + am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` + fi + for depmode in $am_compiler_list; do + # Setup a source with many dependencies, because some compilers + # like to wrap large dependency lists on column 80 (with \), and + # we should not choose a depcomp mode which is confused by this. + # + # We need to recreate these files for each test, as the compiler may + # overwrite some of them when testing with obscure command lines. + # This happens at least with the AIX C compiler. + : > sub/conftest.c + for i in 1 2 3 4 5 6; do + echo '#include "conftst'$i'.h"' >> sub/conftest.c + # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with + # Solaris 8's {/usr,}/bin/sh. + touch sub/conftst$i.h + done + echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf + + case $depmode in + nosideeffect) + # after this tag, mechanisms are not by side-effect, so they'll + # only be used when explicitly requested + if test "x$enable_dependency_tracking" = xyes; then + continue + else + break + fi + ;; + none) break ;; + esac + # We check with `-c' and `-o' for the sake of the "dashmstdout" + # mode. It turns out that the SunPro C++ compiler does not properly + # handle `-M -o', and we need to detect this. + if depmode=$depmode \ + source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ + depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ + $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ + >/dev/null 2>conftest.err && + grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && + grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && + ${MAKE-make} -s -f confmf > /dev/null 2>&1; then + # icc doesn't choke on unknown options, it will just issue warnings + # (even with -Werror). So we grep stderr for any message + # that says an option was ignored. + if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else + am_cv_CXX_dependencies_compiler_type=$depmode + break + fi + fi + done + + cd .. + rm -rf conftest.dir +else + am_cv_CXX_dependencies_compiler_type=none +fi + +fi +echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5 +echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6 +CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type + + + +if + test "x$enable_dependency_tracking" != xno \ + && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then + am__fastdepCXX_TRUE= + am__fastdepCXX_FALSE='#' +else + am__fastdepCXX_TRUE='#' + am__fastdepCXX_FALSE= +fi + + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu +echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 +echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6 +if test -z "$CXXCPP"; then + if test "${ac_cv_prog_CXXCPP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # Double quotes because CXXCPP needs to be expanded + for CXXCPP in "$CXX -E" "/lib/cpp" + do + ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + break +fi + + done + ac_cv_prog_CXXCPP=$CXXCPP + +fi + CXXCPP=$ac_cv_prog_CXXCPP +else + ac_cv_prog_CXXCPP=$CXXCPP +fi +echo "$as_me:$LINENO: result: $CXXCPP" >&5 +echo "${ECHO_T}$CXXCPP" >&6 +ac_preproc_ok=false +for ac_cxx_preproc_warn_flag in '' yes +do + # Use a header file that comes with gcc, so configuring glibc + # with a fresh cross-compiler works. + # Prefer to if __STDC__ is defined, since + # exists even on freestanding compilers. + # On the NeXT, cc -E runs the code through the compiler's parser, + # not just through cpp. "Syntax error" is here to catch this case. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#ifdef __STDC__ +# include +#else +# include +#endif + Syntax error +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + : +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Broken: fails on valid input. +continue +fi +rm -f conftest.err conftest.$ac_ext + + # OK, works on sane cases. Now check whether non-existent headers + # can be detected and how. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_cxx_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_cxx_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + # Broken: success on invalid input. +continue +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + # Passes both tests. +ac_preproc_ok=: +break +fi +rm -f conftest.err conftest.$ac_ext + +done +# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. +rm -f conftest.err conftest.$ac_ext +if $ac_preproc_ok; then + : +else + { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&5 +echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi + +ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu +if test -n "$ac_tool_prefix"; then + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran + do + # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. +set dummy $ac_tool_prefix$ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$F77"; then + ac_cv_prog_F77="$F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_F77="$ac_tool_prefix$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +F77=$ac_cv_prog_F77 +if test -n "$F77"; then + echo "$as_me:$LINENO: result: $F77" >&5 +echo "${ECHO_T}$F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$F77" && break + done +fi +if test -z "$F77"; then + ac_ct_F77=$F77 + for ac_prog in g77 f77 xlf frt pgf77 fort77 fl32 af77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 ifc efc pgf95 lf95 gfortran +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_F77"; then + ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_F77="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +ac_ct_F77=$ac_cv_prog_ac_ct_F77 +if test -n "$ac_ct_F77"; then + echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 +echo "${ECHO_T}$ac_ct_F77" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$ac_ct_F77" && break +done + + F77=$ac_ct_F77 +fi + + +# Provide some information about the compiler. +echo "$as_me:6881:" \ + "checking for Fortran 77 compiler version" >&5 +ac_compiler=`set X $ac_compile; echo $2` +{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 + (eval $ac_compiler --version &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 + (eval $ac_compiler -v &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 + (eval $ac_compiler -V &5) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } +rm -f a.out + +# If we don't use `.F' as extension, the preprocessor is not run on the +# input file. (Note that this only needs to work for GNU compilers.) +ac_save_ext=$ac_ext +ac_ext=F +echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 +echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6 +if test "${ac_cv_f77_compiler_gnu+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF + program main +#ifndef __GNUC__ + choke me +#endif + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_compiler_gnu=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_compiler_gnu=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +ac_cv_f77_compiler_gnu=$ac_compiler_gnu + +fi +echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 +echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6 +ac_ext=$ac_save_ext +ac_test_FFLAGS=${FFLAGS+set} +ac_save_FFLAGS=$FFLAGS +FFLAGS= +echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 +echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6 +if test "${ac_cv_prog_f77_g+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + FFLAGS=-g +cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_prog_f77_g=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_prog_f77_g=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +fi +echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 +echo "${ECHO_T}$ac_cv_prog_f77_g" >&6 +if test "$ac_test_FFLAGS" = set; then + FFLAGS=$ac_save_FFLAGS +elif test $ac_cv_prog_f77_g = yes; then + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-g -O2" + else + FFLAGS="-g" + fi +else + if test "x$ac_cv_f77_compiler_gnu" = xyes; then + FFLAGS="-O2" + else + FFLAGS= + fi +fi + +G77=`test $ac_compiler_gnu = yes && echo yes` +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + + +# Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! + +# find the maximum length of command line arguments +echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 +echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6 +if test "${lt_cv_sys_max_cmd_len+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + i=0 + testring="ABCD" + + case $build_os in + msdosdjgpp*) + # On DJGPP, this test can blow up pretty badly due to problems in libc + # (any single argument exceeding 2000 bytes causes a buffer overrun + # during glob expansion). Even if it were fixed, the result of this + # check would be larger than it should be. + lt_cv_sys_max_cmd_len=12288; # 12K is about right + ;; + + gnu*) + # Under GNU Hurd, this test is not required because there is + # no limit to the length of command line arguments. + # Libtool will interpret -1 as no limit whatsoever + lt_cv_sys_max_cmd_len=-1; + ;; + + cygwin* | mingw*) + # On Win9x/ME, this test blows up -- it succeeds, but takes + # about 5 minutes as the teststring grows exponentially. + # Worse, since 9x/ME are not pre-emptively multitasking, + # you end up with a "frozen" computer, even though with patience + # the test eventually succeeds (with a max line length of 256k). + # Instead, let's just punt: use the minimum linelength reported by + # all of the supported platforms: 8192 (on NT/2K/XP). + lt_cv_sys_max_cmd_len=8192; + ;; + + amigaos*) + # On AmigaOS with pdksh, this test takes hours, literally. + # So we just punt and use a minimum line length of 8192. + lt_cv_sys_max_cmd_len=8192; + ;; + + *) + # If test is not a shell built-in, we'll probably end up computing a + # maximum length that is only half of the actual maximum length, but + # we can't tell. + while (test "X"`$CONFIG_SHELL $0 --fallback-echo "X$testring" 2>/dev/null` \ + = "XX$testring") >/dev/null 2>&1 && + new_result=`expr "X$testring" : ".*" 2>&1` && + lt_cv_sys_max_cmd_len=$new_result && + test $i != 17 # 1/2 MB should be enough + do + i=`expr $i + 1` + testring=$testring$testring + done + testring= + # Add a significant safety factor because C++ compilers can tack on massive + # amounts of additional arguments before passing them to the linker. + # It appears as though 1/2 is a usable value. + lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` + ;; + esac + +fi + +if test -n $lt_cv_sys_max_cmd_len ; then + echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 +echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6 +else + echo "$as_me:$LINENO: result: none" >&5 +echo "${ECHO_T}none" >&6 +fi + + + + +# Check for command to grab the raw symbol name followed by C symbol from nm. +echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 +echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6 +if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +# These are sane defaults that work on at least a few old systems. +# [They come from Ultrix. What could be older than Ultrix?!! ;)] + +# Character class describing NM global symbol codes. +symcode='[BCDEGRST]' + +# Regexp to match symbols that can be accessed directly from C. +sympat='\([_A-Za-z][_A-Za-z0-9]*\)' + +# Transform the above into a raw symbol and a C symbol. +symxfrm='\1 \2\3 \3' + +# Transform an extracted symbol line into a proper C declaration +lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" + +# Transform an extracted symbol line into symbol name and symbol address +lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + +# Define system-specific variables. +case $host_os in +aix*) + symcode='[BCDT]' + ;; +cygwin* | mingw* | pw32*) + symcode='[ABCDGISTW]' + ;; +hpux*) # Its linker distinguishes data from code symbols + if test "$host_cpu" = ia64; then + symcode='[ABCDEGRST]' + fi + lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" + lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" + ;; +irix* | nonstopux*) + symcode='[BCDEGRST]' + ;; +osf*) + symcode='[BCDEGQRST]' + ;; +solaris* | sysv5*) + symcode='[BDRT]' + ;; +sysv4) + symcode='[DFNSTU]' + ;; +esac + +# Handle CRLF in mingw tool chain +opt_cr= +case $build_os in +mingw*) + opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp + ;; +esac + +# If we're using GNU nm, then use its standard symbol codes. +case `$NM -V 2>&1` in +*GNU* | *'with BFD'*) + symcode='[ABCDGIRSTW]' ;; +esac + +# Try without a prefix undercore, then with it. +for ac_symprfx in "" "_"; do + + # Write the raw and C identifiers. + lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" + + # Check to see that the pipe works correctly. + pipe_works=no + + rm -f conftest* + cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Now try to grab the symbols. + nlist=conftest.nm + if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 + (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s "$nlist"; then + # Try sorting and uniquifying the output. + if sort "$nlist" | uniq > "$nlist"T; then + mv -f "$nlist"T "$nlist" + else + rm -f "$nlist"T + fi + + # Make sure that we snagged all the symbols we need. + if grep ' nm_test_var$' "$nlist" >/dev/null; then + if grep ' nm_test_func$' "$nlist" >/dev/null; then + cat < conftest.$ac_ext +#ifdef __cplusplus +extern "C" { +#endif + +EOF + # Now generate the symbol file. + eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' + + cat <> conftest.$ac_ext +#if defined (__STDC__) && __STDC__ +# define lt_ptr_t void * +#else +# define lt_ptr_t char * +# define const +#endif + +/* The mapping between symbol names and symbols. */ +const struct { + const char *name; + lt_ptr_t address; +} +lt_preloaded_symbols[] = +{ +EOF + $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext + cat <<\EOF >> conftest.$ac_ext + {0, (lt_ptr_t) 0} +}; + +#ifdef __cplusplus +} +#endif +EOF + # Now try linking the two files. + mv conftest.$ac_objext conftstm.$ac_objext + lt_save_LIBS="$LIBS" + lt_save_CFLAGS="$CFLAGS" + LIBS="conftstm.$ac_objext" + CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext}; then + pipe_works=yes + fi + LIBS="$lt_save_LIBS" + CFLAGS="$lt_save_CFLAGS" + else + echo "cannot find nm_test_func in $nlist" >&5 + fi + else + echo "cannot find nm_test_var in $nlist" >&5 + fi + else + echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 + fi + else + echo "$progname: failed program was:" >&5 + cat conftest.$ac_ext >&5 + fi + rm -f conftest* conftst* + + # Do not use the global_symbol_pipe unless it works. + if test "$pipe_works" = yes; then + break + else + lt_cv_sys_global_symbol_pipe= + fi +done + +fi + +if test -z "$lt_cv_sys_global_symbol_pipe"; then + lt_cv_sys_global_symbol_to_cdecl= +fi +if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then + echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6 +else + echo "$as_me:$LINENO: result: ok" >&5 +echo "${ECHO_T}ok" >&6 +fi + +echo "$as_me:$LINENO: checking for objdir" >&5 +echo $ECHO_N "checking for objdir... $ECHO_C" >&6 +if test "${lt_cv_objdir+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + rm -f .libs 2>/dev/null +mkdir .libs 2>/dev/null +if test -d .libs; then + lt_cv_objdir=.libs +else + # MS-DOS does not allow filenames that begin with a dot. + lt_cv_objdir=_libs +fi +rmdir .libs 2>/dev/null +fi +echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 +echo "${ECHO_T}$lt_cv_objdir" >&6 +objdir=$lt_cv_objdir + + + + + +case $host_os in +aix3*) + # AIX sometimes has problems with the GCC collect2 program. For some + # reason, if we set the COLLECT_NAMES environment variable, the problems + # vanish in a puff of smoke. + if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES + fi + ;; +esac + +# Sed substitution that helps us do robust quoting. It backslashifies +# metacharacters that are still active within double-quoted strings. +Xsed='sed -e s/^X//' +sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' + +# Same as above, but do not quote variable references. +double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' + +# Sed substitution to delay expansion of an escaped shell variable in a +# double_quote_subst'ed string. +delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' + +# Sed substitution to avoid accidental globbing in evaled expressions +no_glob_subst='s/\*/\\\*/g' + +# Constants: +rm="rm -f" + +# Global variables: +default_ofile=libtool +can_build_shared=yes + +# All known linkers require a `.a' archive for static linking (except M$VC, +# which needs '.lib'). +libext=a +ltmain="$ac_aux_dir/ltmain.sh" +ofile="$default_ofile" +with_gnu_ld="$lt_cv_prog_gnu_ld" + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. +set dummy ${ac_tool_prefix}ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$AR"; then + ac_cv_prog_AR="$AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_AR="${ac_tool_prefix}ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +AR=$ac_cv_prog_AR +if test -n "$AR"; then + echo "$as_me:$LINENO: result: $AR" >&5 +echo "${ECHO_T}$AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_AR"; then + ac_ct_AR=$AR + # Extract the first word of "ar", so it can be a program name with args. +set dummy ar; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_AR+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_AR"; then + ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_AR="ar" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="false" +fi +fi +ac_ct_AR=$ac_cv_prog_ac_ct_AR +if test -n "$ac_ct_AR"; then + echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 +echo "${ECHO_T}$ac_ct_AR" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + AR=$ac_ct_AR +else + AR="$ac_cv_prog_AR" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. +set dummy ${ac_tool_prefix}ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$RANLIB"; then + ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +RANLIB=$ac_cv_prog_RANLIB +if test -n "$RANLIB"; then + echo "$as_me:$LINENO: result: $RANLIB" >&5 +echo "${ECHO_T}$RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_RANLIB"; then + ac_ct_RANLIB=$RANLIB + # Extract the first word of "ranlib", so it can be a program name with args. +set dummy ranlib; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_RANLIB"; then + ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_RANLIB="ranlib" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":" +fi +fi +ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB +if test -n "$ac_ct_RANLIB"; then + echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 +echo "${ECHO_T}$ac_ct_RANLIB" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + RANLIB=$ac_ct_RANLIB +else + RANLIB="$ac_cv_prog_RANLIB" +fi + +if test -n "$ac_tool_prefix"; then + # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. +set dummy ${ac_tool_prefix}strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$STRIP"; then + ac_cv_prog_STRIP="$STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_STRIP="${ac_tool_prefix}strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +STRIP=$ac_cv_prog_STRIP +if test -n "$STRIP"; then + echo "$as_me:$LINENO: result: $STRIP" >&5 +echo "${ECHO_T}$STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +fi +if test -z "$ac_cv_prog_STRIP"; then + ac_ct_STRIP=$STRIP + # Extract the first word of "strip", so it can be a program name with args. +set dummy strip; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$ac_ct_STRIP"; then + ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_ac_ct_STRIP="strip" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" +fi +fi +ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP +if test -n "$ac_ct_STRIP"; then + echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 +echo "${ECHO_T}$ac_ct_STRIP" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + STRIP=$ac_ct_STRIP +else + STRIP="$ac_cv_prog_STRIP" +fi + + +old_CC="$CC" +old_CFLAGS="$CFLAGS" + +# Set sane defaults for various variables +test -z "$AR" && AR=ar +test -z "$AR_FLAGS" && AR_FLAGS=cru +test -z "$AS" && AS=as +test -z "$CC" && CC=cc +test -z "$LTCC" && LTCC=$CC +test -z "$DLLTOOL" && DLLTOOL=dlltool +test -z "$LD" && LD=ld +test -z "$LN_S" && LN_S="ln -s" +test -z "$MAGIC_CMD" && MAGIC_CMD=file +test -z "$NM" && NM=nm +test -z "$SED" && SED=sed +test -z "$OBJDUMP" && OBJDUMP=objdump +test -z "$RANLIB" && RANLIB=: +test -z "$STRIP" && STRIP=: +test -z "$ac_objext" && ac_objext=o + +# Determine commands to create old-style static archives. +old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' +old_postinstall_cmds='chmod 644 $oldlib' +old_postuninstall_cmds= + +if test -n "$RANLIB"; then + case $host_os in + openbsd*) + old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" + ;; + *) + old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" + ;; + esac + old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" +fi + +# Only perform the check for file, if the check method requires it +case $deplibs_check_method in +file_magic*) + if test "$file_magic_cmd" = '$MAGIC_CMD'; then + echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 +echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/${ac_tool_prefix}file; then + lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test -z "$lt_cv_path_MAGIC_CMD"; then + if test -n "$ac_tool_prefix"; then + echo "$as_me:$LINENO: checking for file" >&5 +echo $ECHO_N "checking for file... $ECHO_C" >&6 +if test "${lt_cv_path_MAGIC_CMD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $MAGIC_CMD in +[\\/*] | ?:[\\/]*) + lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. + ;; +*) + lt_save_MAGIC_CMD="$MAGIC_CMD" + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" + for ac_dir in $ac_dummy; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f $ac_dir/file; then + lt_cv_path_MAGIC_CMD="$ac_dir/file" + if test -n "$file_magic_test_file"; then + case $deplibs_check_method in + "file_magic "*) + file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" + MAGIC_CMD="$lt_cv_path_MAGIC_CMD" + if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | + $EGREP "$file_magic_regex" > /dev/null; then + : + else + cat <&2 + +*** Warning: the command libtool uses to detect shared libraries, +*** $file_magic_cmd, produces output that libtool cannot recognize. +*** The result is that libtool may fail to recognize shared libraries +*** as such. This will affect the creation of libtool libraries that +*** depend on shared libraries, but programs linked with such libtool +*** libraries will work regardless of this problem. Nevertheless, you +*** may want to report the problem to your system manager and/or to +*** bug-libtool@gnu.org + +EOF + fi ;; + esac + fi + break + fi + done + IFS="$lt_save_ifs" + MAGIC_CMD="$lt_save_MAGIC_CMD" + ;; +esac +fi + +MAGIC_CMD="$lt_cv_path_MAGIC_CMD" +if test -n "$MAGIC_CMD"; then + echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 +echo "${ECHO_T}$MAGIC_CMD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + else + MAGIC_CMD=: + fi +fi + + fi + ;; +esac + +enable_dlopen=no +enable_win32_dll=yes + +# Check whether --enable-libtool-lock or --disable-libtool-lock was given. +if test "${enable_libtool_lock+set}" = set; then + enableval="$enable_libtool_lock" + +fi; +test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes + + +# Check whether --with-pic or --without-pic was given. +if test "${with_pic+set}" = set; then + withval="$with_pic" + pic_mode="$withval" +else + pic_mode=default +fi; +test -z "$pic_mode" && pic_mode=default + +# Use C for the default configuration in the libtool script +tagname= +lt_save_CC="$CC" +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + + +# Source file extension for C test sources. +ac_ext=c + +# Object file extension for compiled C test sources. +objext=o +objext=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(){return(0);}\n' + + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# +# Check for any special shared library compilation flags. +# +lt_prog_cc_shlib= +if test "$GCC" = no; then + case $host_os in + sco3.2v5*) + lt_prog_cc_shlib='-belf' + ;; + esac +fi +if test -n "$lt_prog_cc_shlib"; then + { echo "$as_me:$LINENO: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&5 +echo "$as_me: WARNING: \`$CC' requires \`$lt_prog_cc_shlib' to build shared libraries" >&2;} + if echo "$old_CC $old_CFLAGS " | grep "[ ]$lt_prog_cc_shlib[ ]" >/dev/null; then : + else + { echo "$as_me:$LINENO: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&5 +echo "$as_me: WARNING: add \`$lt_prog_cc_shlib' to the CC or CFLAGS env variable and reconfigure" >&2;} + lt_cv_prog_cc_can_build_shared=no + fi +fi + + +# +# Check to make sure the static flag actually works. +# +echo "$as_me:$LINENO: checking if $compiler static flag $lt_prog_compiler_static works" >&5 +echo $ECHO_N "checking if $compiler static flag $lt_prog_compiler_static works... $ECHO_C" >&6 +if test "${lt_prog_compiler_static_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_static_works=no + save_LDFLAGS="$LDFLAGS" + LDFLAGS="$LDFLAGS $lt_prog_compiler_static" + printf "$lt_simple_link_test_code" > conftest.$ac_ext + if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test -s conftest.err; then + # Append any errors to the config.log. + cat conftest.err 1>&5 + else + lt_prog_compiler_static_works=yes + fi + fi + $rm conftest* + LDFLAGS="$save_LDFLAGS" + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_static_works" >&6 + +if test x"$lt_prog_compiler_static_works" = xyes; then + : +else + lt_prog_compiler_static= +fi + + + + +lt_prog_compiler_no_builtin_flag= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag=' -fno-builtin' + + +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:7915: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:7919: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl= +lt_prog_compiler_pic= +lt_prog_compiler_static= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_static='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic='-fno-common' + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static='-Bstatic' + else + lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + linux*) + case $CC in + icc* | ecc*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-static' + ;; + ccc*) + lt_prog_compiler_wl='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static='-non_shared' + ;; + + sco3.2v5*) + lt_prog_compiler_pic='-Kpic' + lt_prog_compiler_static='-dn' + ;; + + solaris*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sunos4*) + lt_prog_compiler_wl='-Qoption ld ' + lt_prog_compiler_pic='-PIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + lt_prog_compiler_wl='-Wl,' + lt_prog_compiler_pic='-KPIC' + lt_prog_compiler_static='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic='-Kconform_pic' + lt_prog_compiler_static='-Bstatic' + fi + ;; + + uts4*) + lt_prog_compiler_pic='-pic' + lt_prog_compiler_static='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8148: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:8152: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_prog_compiler_pic_works=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6 + +if test x"$lt_prog_compiler_pic_works" = xyes; then + case $lt_prog_compiler_pic in + "" | " "*) ;; + *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; + esac +else + lt_prog_compiler_pic= + lt_prog_compiler_can_build_shared=no +fi + +fi +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic= + ;; + *) + lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" + ;; +esac + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:8208: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:8212: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + lt_cv_prog_compiler_c_o=yes + fi + fi + chmod u+w . + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag= + enable_shared_with_static_runtimes=no + archive_cmds= + archive_expsym_cmds= + old_archive_From_new_cmds= + old_archive_from_expsyms_cmds= + export_dynamic_flag_spec= + whole_archive_flag_spec= + thread_safe_flag_spec= + hardcode_libdir_flag_spec= + hardcode_libdir_flag_spec_ld= + hardcode_libdir_separator= + hardcode_direct=no + hardcode_minus_L=no + hardcode_shlibpath_var=unsupported + link_all_deplibs=unknown + hardcode_automatic=no + module_cmds= + module_expsym_cmds= + always_export_symbols=no + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec='-L$libdir' + allow_undefined_flag=unsupported + always_export_symbols=no + enable_shared_with_static_runtimes=yes + export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + + sunos4*) + archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + linux*) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds="$tmp_archive_cmds" + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + if test $supports_anon_versioning = yes; then + archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +$echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + else + archive_expsym_cmds="$tmp_archive_cmds" + fi + else + ld_shlibs=no + fi + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs=no + fi + ;; + esac + + if test "$ld_shlibs" = yes; then + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec= + fi + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag=unsupported + always_export_symbols=yes + archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds='' + hardcode_direct=yes + hardcode_libdir_separator=':' + link_all_deplibs=yes + + if test "$GCC" = yes; then + case $host_os in aix4.012|aix4.012.*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct=yes + else + # We have old collect2 + hardcode_direct=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L=yes + hardcode_libdir_flag_spec='-L$libdir' + hardcode_libdir_separator= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag="-z nodefs" + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag=' ${wl}-bernotok' + allow_undefined_flag=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec=' ' + archive_cmds_need_lc=yes + # This is similar to how AIX traditionally builds it's shared libraries. + archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + # see comment about different semantics on the GNU ld section + ld_shlibs=no + ;; + + bsdi4*) + export_dynamic_flag_spec=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec=' ' + allow_undefined_flag=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes=yes + ;; + + darwin* | rhapsody*) + if test "$GXX" = yes ; then + archive_cmds_need_lc=no + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='-flat_namespace -undefined suppress' + ;; + 10.*) + allow_undefined_flag='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='-all_load $convenience' + link_all_deplibs=yes + else + ld_shlibs=no + fi + ;; + + dgux*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + freebsd1*) + ld_shlibs=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu) + archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + export_dynamic_flag_spec='${wl}-E' + ;; + + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld='+b $libdir' + hardcode_libdir_separator=: + hardcode_direct=no + hardcode_shlibpath_var=no + ;; + ia64*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=no + hardcode_shlibpath_var=no + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + *) + hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_direct=yes + export_dynamic_flag_spec='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld='-rpath $libdir' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + link_all_deplibs=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_direct=yes + hardcode_shlibpath_var=no + ;; + + newsos6) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + hardcode_shlibpath_var=no + ;; + + openbsd*) + hardcode_direct=yes + hardcode_shlibpath_var=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + export_dynamic_flag_spec='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-R$libdir' + ;; + *) + archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec='-L$libdir' + hardcode_minus_L=yes + allow_undefined_flag=unsupported + archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag=' -expect_unresolved \*' + archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec='-rpath $libdir' + fi + hardcode_libdir_separator=: + ;; + + sco3.2v5*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + no_undefined_flag=' -z text' + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec='-R$libdir' + hardcode_shlibpath_var=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; + esac + link_all_deplibs=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec='-L$libdir' + hardcode_direct=yes + hardcode_minus_L=yes + hardcode_shlibpath_var=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds='$CC -r -o $output$reload_objs' + hardcode_direct=no + ;; + motorola) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv4.3*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + export_dynamic_flag_spec='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct=yes + hardcode_minus_L=no + hardcode_shlibpath_var=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + no_undefined_flag='${wl}-z ${wl}text' + if test "$GCC" = yes; then + archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var=no + ;; + + sysv5*) + no_undefined_flag=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + hardcode_libdir_flag_spec= + hardcode_shlibpath_var=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) + archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec='-L$libdir' + hardcode_shlibpath_var=no + ;; + + *) + ld_shlibs=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs" >&5 +echo "${ECHO_T}$ld_shlibs" >&6 +test "$ld_shlibs" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag + allow_undefined_flag= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc=no + else + archive_cmds_need_lc=yes + fi + allow_undefined_flag=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 +echo "${ECHO_T}$archive_cmds_need_lc" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.01* | freebsdelf3.01*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf` + sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=yes + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action= +if test -n "$hardcode_libdir_flag_spec" || \ + test -n "$runpath_var " || \ + test "X$hardcode_automatic"="Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && + test "$hardcode_minus_L" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action" >&5 +echo "${ECHO_T}$hardcode_action" >&6 + +if test "$hardcode_action" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +char (*f) () = shl_load; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != shl_load; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +char (*f) () = dlopen; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != dlopen; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_svld_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_dld_link=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# Report which librarie types wil actually be built +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case "$host_os" in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; + +aix4*) + if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then + test "$enable_shared" = yes && enable_static=no + fi + ;; + darwin* | rhapsody*) + if test "$GCC" = yes; then + archive_cmds_need_lc=no + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag='-flat_namespace -undefined suppress' + ;; + 10.*) + allow_undefined_flag='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + output_verbose_link_cmd='echo' + archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' + module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + hardcode_direct=no + hardcode_automatic=yes + hardcode_shlibpath_var=unsupported + whole_archive_flag_spec='-all_load $convenience' + link_all_deplibs=yes + else + ld_shlibs=no + fi + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler \ + CC \ + LD \ + lt_prog_compiler_wl \ + lt_prog_compiler_pic \ + lt_prog_compiler_static \ + lt_prog_compiler_no_builtin_flag \ + export_dynamic_flag_spec \ + thread_safe_flag_spec \ + whole_archive_flag_spec \ + enable_shared_with_static_runtimes \ + old_archive_cmds \ + old_archive_from_new_cmds \ + predep_objects \ + postdep_objects \ + predeps \ + postdeps \ + compiler_lib_search_path \ + archive_cmds \ + archive_expsym_cmds \ + postinstall_cmds \ + postuninstall_cmds \ + old_archive_from_expsyms_cmds \ + allow_undefined_flag \ + no_undefined_flag \ + export_symbols_cmds \ + hardcode_libdir_flag_spec \ + hardcode_libdir_flag_spec_ld \ + hardcode_libdir_separator \ + hardcode_automatic \ + module_cmds \ + module_expsym_cmds \ + lt_cv_prog_compiler_c_o \ + exclude_expsyms \ + include_expsyms; do + + case $var in + old_archive_cmds | \ + old_archive_from_new_cmds | \ + archive_cmds | \ + archive_expsym_cmds | \ + module_cmds | \ + module_expsym_cmds | \ + old_archive_from_expsyms_cmds | \ + export_symbols_cmds | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="${ofile}T" + trap "$rm \"$cfgfile\"; exit 1" 1 2 15 + $rm -f "$cfgfile" + { echo "$as_me:$LINENO: creating $ofile" >&5 +echo "$as_me: creating $ofile" >&6;} + + cat <<__EOF__ >> "$cfgfile" +#! $SHELL + +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +# A sed program that does not truncate output. +SED=$lt_SED + +# Sed that helps us avoid accidentally triggering echo(1) options like -n. +Xsed="$SED -e s/^X//" + +# The HP-UX ksh and POSIX shell print the target directory to stdout +# if CDPATH is set. +if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi + +# The names of the tagged configurations supported by this script. +available_tags= + +# ### BEGIN LIBTOOL CONFIG + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_compiler + +# Is the compiler the GNU C compiler? +with_gcc=$GCC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext='$shrext' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o + +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds +archive_expsym_cmds=$lt_archive_expsym_cmds +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds +module_expsym_cmds=$lt_module_expsym_cmds + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms + +# ### END LIBTOOL CONFIG + +__EOF__ + + + case $host_os in + aix3*) + cat <<\EOF >> "$cfgfile" + +# AIX sometimes has problems with the GCC collect2 program. For some +# reason, if we set the COLLECT_NAMES environment variable, the problems +# vanish in a puff of smoke. +if test "X${COLLECT_NAMES+set}" != Xset; then + COLLECT_NAMES= + export COLLECT_NAMES +fi +EOF + ;; + esac + + # We use sed instead of cat because bash on DJGPP gets confused if + # if finds mixed CR/LF and LF-only lines. Since sed operates in + # text mode, it properly converts lines to CR/LF. This bash problem + # is reportedly fixed, but why not run on old versions too? + sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) + + mv -f "$cfgfile" "$ofile" || \ + (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") + chmod +x "$ofile" + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + +# Check whether --with-tags or --without-tags was given. +if test "${with_tags+set}" = set; then + withval="$with_tags" + tagnames="$withval" +fi; + +if test -f "$ltmain" && test -n "$tagnames"; then + if test ! -f "${ofile}"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} + fi + + if test -z "$LTCC"; then + eval "`$SHELL ${ofile} --config | grep '^LTCC='`" + if test -z "$LTCC"; then + { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 +echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} + else + { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 +echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} + fi + fi + + # Extract list of available tagged configurations in $ofile. + # Note that this assumes the entire list is on one line. + available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` + + lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," + for tagname in $tagnames; do + IFS="$lt_save_ifs" + # Check whether tagname contains only valid characters + case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in + "") ;; + *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 +echo "$as_me: error: invalid tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null + then + { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 +echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} + { (exit 1); exit 1; }; } + fi + + # Update the list of available tags. + if test -n "$tagname"; then + echo appending configuration tag \"$tagname\" to $ofile + + case $tagname in + CXX) + if test -n "$CXX" && test "X$CXX" != "Xno"; then + ac_ext=cc +ac_cpp='$CXXCPP $CPPFLAGS' +ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_cxx_compiler_gnu + + + + +archive_cmds_need_lc_CXX=no +allow_undefined_flag_CXX= +always_export_symbols_CXX=no +archive_expsym_cmds_CXX= +export_dynamic_flag_spec_CXX= +hardcode_direct_CXX=no +hardcode_libdir_flag_spec_CXX= +hardcode_libdir_flag_spec_ld_CXX= +hardcode_libdir_separator_CXX= +hardcode_minus_L_CXX=no +hardcode_automatic_CXX=no +module_cmds_CXX= +module_expsym_cmds_CXX= +link_all_deplibs_CXX=unknown +old_archive_cmds_CXX=$old_archive_cmds +no_undefined_flag_CXX= +whole_archive_flag_spec_CXX= +enable_shared_with_static_runtimes_CXX=no + +# Dependencies to place before and after the object being linked: +predep_objects_CXX= +postdep_objects_CXX= +predeps_CXX= +postdeps_CXX= +compiler_lib_search_path_CXX= + +# Source file extension for C++ test sources. +ac_ext=cc + +# Object file extension for compiled C++ test sources. +objext=o +objext_CXX=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="int some_variable = 0;\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='int main(int, char *) { return(0); }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Allow CC to be a program name with arguments. +lt_save_CC=$CC +lt_save_LD=$LD +lt_save_GCC=$GCC +GCC=$GXX +lt_save_with_gnu_ld=$with_gnu_ld +lt_save_path_LD=$lt_cv_path_LD +if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then + lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx +else + unset lt_cv_prog_gnu_ld +fi +if test -n "${lt_cv_path_LDCXX+set}"; then + lt_cv_path_LD=$lt_cv_path_LDCXX +else + unset lt_cv_path_LD +fi +test -z "${LDCXX+set}" || LD=$LDCXX +CC=${CXX-"c++"} +compiler=$CC +compiler_CXX=$CC +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` + +# We don't want -fno-exception wen compiling C++ code, so set the +# no_builtin_flag separately +if test "$GXX" = yes; then + lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' +else + lt_prog_compiler_no_builtin_flag_CXX= +fi + +if test "$GXX" = yes; then + # Set up default GNU C++ configuration + + +# Check whether --with-gnu-ld or --without-gnu-ld was given. +if test "${with_gnu_ld+set}" = set; then + withval="$with_gnu_ld" + test "$withval" = no || with_gnu_ld=yes +else + with_gnu_ld=no +fi; +ac_prog=ld +if test "$GCC" = yes; then + # Check if gcc -print-prog-name=ld gives a path. + echo "$as_me:$LINENO: checking for ld used by $CC" >&5 +echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6 + case $host in + *-*-mingw*) + # gcc leaves a trailing carriage return which upsets mingw + ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; + *) + ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; + esac + case $ac_prog in + # Accept absolute paths. + [\\/]* | ?:[\\/]*) + re_direlt='/[^/][^/]*/\.\./' + # Canonicalize the pathname of ld + ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` + while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do + ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` + done + test -z "$LD" && LD="$ac_prog" + ;; + "") + # If it fails, then pretend we aren't using GCC. + ac_prog=ld + ;; + *) + # If it is relative, then search for the first ld in PATH. + with_gnu_ld=unknown + ;; + esac +elif test "$with_gnu_ld" = yes; then + echo "$as_me:$LINENO: checking for GNU ld" >&5 +echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6 +else + echo "$as_me:$LINENO: checking for non-GNU ld" >&5 +echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6 +fi +if test "${lt_cv_path_LD+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -z "$LD"; then + lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR + for ac_dir in $PATH; do + IFS="$lt_save_ifs" + test -z "$ac_dir" && ac_dir=. + if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then + lt_cv_path_LD="$ac_dir/$ac_prog" + # Check to see if the program is GNU ld. I'd rather use --version, + # but apparently some GNU ld's only accept -v. + # Break only if it was the GNU/non-GNU ld that we prefer. + case `"$lt_cv_path_LD" -v 2>&1 &5 +echo "${ECHO_T}$LD" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 +echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} + { (exit 1); exit 1; }; } +echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 +echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6 +if test "${lt_cv_prog_gnu_ld+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + # I'd rather use --version here, but apparently some GNU ld's only accept -v. +case `$LD -v 2>&1 &5 +echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6 +with_gnu_ld=$lt_cv_prog_gnu_ld + + + + # Check if GNU C++ uses GNU ld as the underlying linker, since the + # archiving commands below assume that GNU ld is being used. + if test "$with_gnu_ld" = yes; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # If archive_cmds runs LD, not CC, wlarc should be empty + # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to + # investigate it a little bit more. (MM) + wlarc='${wl}' + + # ancient GNU ld didn't support --whole-archive et. al. + if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ + grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_CXX= + fi + else + with_gnu_ld=no + wlarc= + + # A generic and very simple default shared library creation + # command for GNU C++ for the case where it uses the native + # linker, instead of GNU ld. If possible, this setting should + # overridden to take advantage of the native linker features on + # the platform it is being used on. + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' + fi + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + +else + GXX=no + with_gnu_ld=no + wlarc= +fi + +# PORTME: fill in a description of your system's C++ link characteristics +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 +ld_shlibs_CXX=yes +case $host_os in + aix3*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + case $ld_flag in + *-brtl*) + aix_use_runtimelinking=yes + break + ;; + esac + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_CXX='' + hardcode_direct_CXX=yes + hardcode_libdir_separator_CXX=':' + link_all_deplibs_CXX=yes + + if test "$GXX" = yes; then + case $host_os in aix4.012|aix4.012.*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_CXX=yes + else + # We have old collect2 + hardcode_direct_CXX=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_CXX=yes + hardcode_libdir_flag_spec_CXX='-L$libdir' + hardcode_libdir_separator_CXX= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_CXX=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_CXX='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + + archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_CXX="-z nodefs" + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_CXX=' ${wl}-bernotok' + allow_undefined_flag_CXX=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols_CXX=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_CXX=' ' + archive_cmds_need_lc_CXX=yes + # This is similar to how AIX traditionally builds it's shared libraries. + archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + chorus*) + case $cc_basename in + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_CXX='-L$libdir' + allow_undefined_flag_CXX=unsupported + always_export_symbols_CXX=no + enable_shared_with_static_runtimes_CXX=yes + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs_CXX=no + fi + ;; + + darwin* | rhapsody*) + if test "$GXX" = yes; then + archive_cmds_need_lc_CXX=no + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag_CXX='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_CXX='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_CXX='-flat_namespace -undefined suppress' + ;; + 10.*) + allow_undefined_flag_CXX='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_CXX='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_CXX='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + hardcode_direct_CXX=no + hardcode_automatic_CXX=yes + hardcode_shlibpath_var_CXX=unsupported + whole_archive_flag_spec_CXX='-all_load $convenience' + link_all_deplibs_CXX=yes + else + ld_shlibs_CXX=no + fi + ;; + + dgux*) + case $cc_basename in + ec++) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + ghcx) + # Green Hills C++ Compiler + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + freebsd12*) + # C++ shared libraries reported to be fairly broken before switch to ELF + ld_shlibs_CXX=no + ;; + freebsd-elf*) + archive_cmds_need_lc_CXX=no + ;; + freebsd* | kfreebsd*-gnu) + # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF + # conventions + ld_shlibs_CXX=yes + ;; + gnu*) + ;; + hpux9*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC) + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + hpux10*|hpux11*) + if test $with_gnu_ld = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld_CXX='+b $libdir' + hardcode_libdir_separator_CXX=: + ;; + ia64*) + hardcode_libdir_flag_spec_CXX='-L$libdir' + ;; + *) + hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_CXX=: + export_dynamic_flag_spec_CXX='${wl}-E' + ;; + esac + fi + case "$host_cpu" in + hppa*64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + ;; + ia64*) + hardcode_direct_CXX=no + hardcode_shlibpath_var_CXX=no + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + *) + hardcode_direct_CXX=yes + hardcode_minus_L_CXX=yes # Not in the search PATH, + # but as the default + # location of the library. + ;; + esac + + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + aCC) + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes; then + if test $with_gnu_ld = no; then + case "$host_cpu" in + ia64*|hppa*64*) + archive_cmds_CXX='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' + ;; + *) + archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + ;; + esac + fi + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + irix5* | irix6*) + case $cc_basename in + CC) + # SGI C++ + archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + # Archives containing C++ object files must be created using + # "CC -ar", where "CC" is the IRIX C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' + ;; + *) + if test "$GXX" = yes; then + if test "$with_gnu_ld" = no; then + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + else + archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' + fi + fi + link_all_deplibs_CXX=yes + ;; + esac + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + ;; + linux*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + ;; + icpc) + # Intel C++ + with_gnu_ld=yes + archive_cmds_need_lc_CXX=no + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + export_dynamic_flag_spec_CXX='${wl}--export-dynamic' + whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' + ;; + cxx) + # Compaq C++ + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' + + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + esac + ;; + lynxos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + m88k*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + mvs*) + case $cc_basename in + cxx) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' + wlarc= + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_direct_CXX=yes + hardcode_shlibpath_var_CXX=no + fi + # Workaround some broken pre-1.5 toolchains + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' + ;; + osf3*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # "CC -Bstatic", where "CC" is the KAI C++ compiler. + old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' + + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx) + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + osf4* | osf5*) + case $cc_basename in + KCC) + # Kuck and Associates, Inc. (KAI) C++ Compiler + + # KCC will only create a shared library if the output file + # ends with ".so" (or ".sl" for HP-UX), so rename the library + # to its proper name (with version) after linking. + archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' + hardcode_libdir_separator_CXX=: + + # Archives containing C++ object files must be created using + # the KAI C++ compiler. + old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' + ;; + RCC) + # Rational C++ 2.4.1 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + cxx) + allow_undefined_flag_CXX=' -expect_unresolved \*' + archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' + archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ + echo "-hidden">> $lib.exp~ + $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ + $rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-rpath $libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + ;; + *) + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' + + hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_CXX=: + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' + + else + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + fi + ;; + esac + ;; + psos*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + sco*) + archive_cmds_need_lc_CXX=no + case $cc_basename in + CC) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + lcc) + # Lucid + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + no_undefined_flag_CXX=' -zdefs' + archive_cmds_CXX='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + hardcode_libdir_flag_spec_CXX='-R$libdir' + hardcode_shlibpath_var_CXX=no + case $host_os in + solaris2.0-5 | solaris2.0-5.*) ;; + *) + # The C++ compiler is used as linker so we must use $wl + # flag to pass the commands to the underlying system + # linker. + # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' + ;; + esac + link_all_deplibs_CXX=yes + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + # + # There doesn't appear to be a way to prevent this compiler from + # explicitly linking system object files so we need to strip them + # from the output so that they don't get included in the library + # dependencies. + output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[LR]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' + + # Archives containing C++ object files must be created using + # "CC -xar", where "CC" is the Sun C++ compiler. This is + # necessary to make sure instantiated templates are included + # in the archive. + old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' + ;; + gcx) + # Green Hills C++ Compiler + archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + + # The C++ compiler must be used to create the archive. + old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' + ;; + *) + # GNU C++ compiler with Solaris linker + if test "$GXX" = yes && test "$with_gnu_ld" = no; then + no_undefined_flag_CXX=' ${wl}-z ${wl}defs' + if $CC --version | grep -v '^2\.7' > /dev/null; then + archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + else + # g++ 2.7 appears to require `-G' NOT `-shared' on this + # platform. + archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' + archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' + + # Commands to make compiler produce verbose output that lists + # what "hidden" libraries, object files and flags are used when + # linking a shared library. + output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" + fi + + hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' + fi + ;; + esac + ;; + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + archive_cmds_need_lc_CXX=no + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + esac + ;; + vxworks*) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; + *) + # FIXME: insert proper C++ library support + ld_shlibs_CXX=no + ;; +esac +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no + +GCC_CXX="$GXX" +LD_CXX="$LD" + + +cat > conftest.$ac_ext <&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; then + # Parse the compiler output and extract the necessary + # objects, libraries and library flags. + + # Sentinel used to keep track of whether or not we are before + # the conftest object file. + pre_test_object_deps_done=no + + # The `*' in the case matches for architectures that use `case' in + # $output_verbose_cmd can trigger glob expansion during the loop + # eval without this substitution. + output_verbose_link_cmd="`$echo \"X$output_verbose_link_cmd\" | $Xsed -e \"$no_glob_subst\"`" + + for p in `eval $output_verbose_link_cmd`; do + case $p in + + -L* | -R* | -l*) + # Some compilers place space between "-{L,R}" and the path. + # Remove the space. + if test $p = "-L" \ + || test $p = "-R"; then + prev=$p + continue + else + prev= + fi + + if test "$pre_test_object_deps_done" = no; then + case $p in + -L* | -R*) + # Internal compiler library paths should come after those + # provided the user. The postdeps already come after the + # user supplied libs so there is no need to process them. + if test -z "$compiler_lib_search_path_CXX"; then + compiler_lib_search_path_CXX="${prev}${p}" + else + compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" + fi + ;; + # The "-l" case would never come before the object being + # linked, so don't bother handling this case. + esac + else + if test -z "$postdeps_CXX"; then + postdeps_CXX="${prev}${p}" + else + postdeps_CXX="${postdeps_CXX} ${prev}${p}" + fi + fi + ;; + + *.$objext) + # This assumes that the test object file only shows up + # once in the compiler output. + if test "$p" = "conftest.$objext"; then + pre_test_object_deps_done=yes + continue + fi + + if test "$pre_test_object_deps_done" = no; then + if test -z "$predep_objects_CXX"; then + predep_objects_CXX="$p" + else + predep_objects_CXX="$predep_objects_CXX $p" + fi + else + if test -z "$postdep_objects_CXX"; then + postdep_objects_CXX="$p" + else + postdep_objects_CXX="$postdep_objects_CXX $p" + fi + fi + ;; + + *) ;; # Ignore the rest. + + esac + done + + # Clean up. + rm -f a.out a.exe +else + echo "libtool.m4: error: problem compiling CXX test program" +fi + +$rm -f confest.$objext + +case " $postdeps_CXX " in +*" -lc "*) archive_cmds_need_lc_CXX=no ;; +esac + +lt_prog_compiler_wl_CXX= +lt_prog_compiler_pic_CXX= +lt_prog_compiler_static_CXX= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + # C++ specific cases for pic, static, wl, etc. + if test "$GXX" = yes; then + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + fi + ;; + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' + ;; + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + mingw* | os2* | pw32*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_CXX='-DDLL_EXPORT' + ;; + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_CXX='-fno-common' + ;; + *djgpp*) + # DJGPP does not support shared libraries at all + lt_prog_compiler_pic_CXX= + ;; + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_CXX=-Kconform_pic + fi + ;; + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + ;; + *) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + esac + else + case $host_os in + aix4* | aix5*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_CXX='-Bstatic' + else + lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' + fi + ;; + chorus*) + case $cc_basename in + cxch68) + # Green Hills C++ Compiler + # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" + ;; + esac + ;; + dgux*) + case $cc_basename in + ec++) + lt_prog_compiler_pic_CXX='-KPIC' + ;; + ghcx) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + freebsd* | kfreebsd*-gnu) + # FreeBSD uses GNU C++ + ;; + hpux9* | hpux10* | hpux11*) + case $cc_basename in + CC) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + if test "$host_cpu" != ia64; then + lt_prog_compiler_pic_CXX='+Z' + fi + ;; + aCC) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_CXX='+Z' + ;; + esac + ;; + *) + ;; + esac + ;; + irix5* | irix6* | nonstopux*) + case $cc_basename in + CC) + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_static_CXX='-non_shared' + # CC pic flag -KPIC is the default. + ;; + *) + ;; + esac + ;; + linux*) + case $cc_basename in + KCC) + # KAI C++ Compiler + lt_prog_compiler_wl_CXX='--backend -Wl,' + lt_prog_compiler_pic_CXX='-fPIC' + ;; + icpc) + # Intel C++ + lt_prog_compiler_wl_CXX='-Wl,' + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-static' + ;; + cxx) + # Compaq C++ + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + lynxos*) + ;; + m88k*) + ;; + mvs*) + case $cc_basename in + cxx) + lt_prog_compiler_pic_CXX='-W c,exportall' + ;; + *) + ;; + esac + ;; + netbsd*) + ;; + osf3* | osf4* | osf5*) + case $cc_basename in + KCC) + lt_prog_compiler_wl_CXX='--backend -Wl,' + ;; + RCC) + # Rational C++ 2.4.1 + lt_prog_compiler_pic_CXX='-pic' + ;; + cxx) + # Digital/Compaq C++ + lt_prog_compiler_wl_CXX='-Wl,' + # Make sure the PIC flag is empty. It appears that all Alpha + # Linux and Compaq Tru64 Unix objects are PIC. + lt_prog_compiler_pic_CXX= + lt_prog_compiler_static_CXX='-non_shared' + ;; + *) + ;; + esac + ;; + psos*) + ;; + sco*) + case $cc_basename in + CC) + lt_prog_compiler_pic_CXX='-fPIC' + ;; + *) + ;; + esac + ;; + solaris*) + case $cc_basename in + CC) + # Sun C++ 4.2, 5.x and Centerline C++ + lt_prog_compiler_pic_CXX='-KPIC' + lt_prog_compiler_static_CXX='-Bstatic' + lt_prog_compiler_wl_CXX='-Qoption ld ' + ;; + gcx) + # Green Hills C++ Compiler + lt_prog_compiler_pic_CXX='-PIC' + ;; + *) + ;; + esac + ;; + sunos4*) + case $cc_basename in + CC) + # Sun C++ 4.x + lt_prog_compiler_pic_CXX='-pic' + lt_prog_compiler_static_CXX='-Bstatic' + ;; + lcc) + # Lucid + lt_prog_compiler_pic_CXX='-pic' + ;; + *) + ;; + esac + ;; + tandem*) + case $cc_basename in + NCC) + # NonStop-UX NCC 3.20 + lt_prog_compiler_pic_CXX='-KPIC' + ;; + *) + ;; + esac + ;; + unixware*) + ;; + vxworks*) + ;; + *) + lt_prog_compiler_can_build_shared_CXX=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_CXX"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_CXX=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:12669: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:12673: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_prog_compiler_pic_works_CXX=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6 + +if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then + case $lt_prog_compiler_pic_CXX in + "" | " "*) ;; + *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; + esac +else + lt_prog_compiler_pic_CXX= + lt_prog_compiler_can_build_shared_CXX=no +fi + +fi +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_CXX= + ;; + *) + lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" + ;; +esac + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_CXX=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:12729: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:12733: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + lt_cv_prog_compiler_c_o_CXX=yes + fi + fi + chmod u+w . + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + case $host_os in + aix4* | aix5*) + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + ;; + pw32*) + export_symbols_cmds_CXX="$ltdll_cmds" + ;; + cygwin* | mingw*) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + ;; + *) + export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + ;; + esac + +echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 +echo "${ECHO_T}$ld_shlibs_CXX" >&6 +test "$ld_shlibs_CXX" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_CXX" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_CXX=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_CXX in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_CXX + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_CXX + allow_undefined_flag_CXX= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_CXX=no + else + archive_cmds_need_lc_CXX=yes + fi + allow_undefined_flag_CXX=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.01* | freebsdelf3.01*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf` + sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=yes + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_CXX= +if test -n "$hardcode_libdir_flag_spec_CXX" || \ + test -n "$runpath_var CXX" || \ + test "X$hardcode_automatic_CXX"="Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_CXX" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && + test "$hardcode_minus_L_CXX" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_CXX=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_CXX=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_CXX=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 +echo "${ECHO_T}$hardcode_action_CXX" >&6 + +if test "$hardcode_action_CXX" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +char (*f) () = shl_load; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != shl_load; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +char (*f) () = dlopen; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != dlopen; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_svld_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_cxx_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_dld_link=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_CXX \ + CC_CXX \ + LD_CXX \ + lt_prog_compiler_wl_CXX \ + lt_prog_compiler_pic_CXX \ + lt_prog_compiler_static_CXX \ + lt_prog_compiler_no_builtin_flag_CXX \ + export_dynamic_flag_spec_CXX \ + thread_safe_flag_spec_CXX \ + whole_archive_flag_spec_CXX \ + enable_shared_with_static_runtimes_CXX \ + old_archive_cmds_CXX \ + old_archive_from_new_cmds_CXX \ + predep_objects_CXX \ + postdep_objects_CXX \ + predeps_CXX \ + postdeps_CXX \ + compiler_lib_search_path_CXX \ + archive_cmds_CXX \ + archive_expsym_cmds_CXX \ + postinstall_cmds_CXX \ + postuninstall_cmds_CXX \ + old_archive_from_expsyms_cmds_CXX \ + allow_undefined_flag_CXX \ + no_undefined_flag_CXX \ + export_symbols_cmds_CXX \ + hardcode_libdir_flag_spec_CXX \ + hardcode_libdir_flag_spec_ld_CXX \ + hardcode_libdir_separator_CXX \ + hardcode_automatic_CXX \ + module_cmds_CXX \ + module_expsym_cmds_CXX \ + lt_cv_prog_compiler_c_o_CXX \ + exclude_expsyms_CXX \ + include_expsyms_CXX; do + + case $var in + old_archive_cmds_CXX | \ + old_archive_from_new_cmds_CXX | \ + archive_cmds_CXX | \ + archive_expsym_cmds_CXX | \ + module_cmds_CXX | \ + module_expsym_cmds_CXX | \ + old_archive_from_expsyms_cmds_CXX | \ + export_symbols_cmds_CXX | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_CXX + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_compiler_CXX + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_CXX + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_CXX + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_CXX + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext='$shrext' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_CXX +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX + +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_CXX + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_CXX +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_CXX +archive_expsym_cmds=$lt_archive_expsym_cmds_CXX +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_CXX +module_expsym_cmds=$lt_module_expsym_cmds_CXX + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_CXX + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_CXX + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_CXX + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_CXX + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_CXX + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_CXX + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_CXX + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_CXX + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_CXX + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_CXX + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_CXX + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_CXX" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_CXX + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_CXX + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_CXX + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_CXX + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC=$lt_save_CC +LDCXX=$LD +LD=$lt_save_LD +GCC=$lt_save_GCC +with_gnu_ldcxx=$with_gnu_ld +with_gnu_ld=$lt_save_with_gnu_ld +lt_cv_path_LDCXX=$lt_cv_path_LD +lt_cv_path_LD=$lt_save_path_LD +lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld +lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld + + else + tagname="" + fi + ;; + + F77) + if test -n "$F77" && test "X$F77" != "Xno"; then + +ac_ext=f +ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' +ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_f77_compiler_gnu + + +archive_cmds_need_lc_F77=no +allow_undefined_flag_F77= +always_export_symbols_F77=no +archive_expsym_cmds_F77= +export_dynamic_flag_spec_F77= +hardcode_direct_F77=no +hardcode_libdir_flag_spec_F77= +hardcode_libdir_flag_spec_ld_F77= +hardcode_libdir_separator_F77= +hardcode_minus_L_F77=no +hardcode_automatic_F77=no +module_cmds_F77= +module_expsym_cmds_F77= +link_all_deplibs_F77=unknown +old_archive_cmds_F77=$old_archive_cmds +no_undefined_flag_F77= +whole_archive_flag_spec_F77= +enable_shared_with_static_runtimes_F77=no + +# Source file extension for f77 test sources. +ac_ext=f + +# Object file extension for compiled f77 test sources. +objext=o +objext_F77=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code=" subroutine t\n return\n end\n" + +# Code to be used in simple link tests +lt_simple_link_test_code=" program t\n end\n" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${F77-"f77"} +compiler=$CC +compiler_F77=$CC +cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` + +echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 +echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6 +echo "$as_me:$LINENO: result: $can_build_shared" >&5 +echo "${ECHO_T}$can_build_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 +echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6 +test "$can_build_shared" = "no" && enable_shared=no + +# On AIX, shared libraries and static libraries use the same namespace, and +# are all built from PIC. +case "$host_os" in +aix3*) + test "$enable_shared" = yes && enable_static=no + if test -n "$RANLIB"; then + archive_cmds="$archive_cmds~\$RANLIB \$lib" + postinstall_cmds='$RANLIB $lib' + fi + ;; +aix4*) + test "$enable_shared" = yes && enable_static=no + ;; +esac +echo "$as_me:$LINENO: result: $enable_shared" >&5 +echo "${ECHO_T}$enable_shared" >&6 + +echo "$as_me:$LINENO: checking whether to build static libraries" >&5 +echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6 +# Make sure either enable_shared or enable_static is yes. +test "$enable_shared" = yes || enable_static=yes +echo "$as_me:$LINENO: result: $enable_static" >&5 +echo "${ECHO_T}$enable_static" >&6 + +test "$ld_shlibs_F77" = no && can_build_shared=no + +GCC_F77="$G77" +LD_F77="$LD" + +lt_prog_compiler_wl_F77= +lt_prog_compiler_pic_F77= +lt_prog_compiler_static_F77= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_static_F77='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_F77='-fno-common' + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_F77=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_F77=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_F77='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_F77='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_F77='-Bstatic' + else + lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_F77='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_F77='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_F77='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_F77='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_F77='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + linux*) + case $CC in + icc* | ecc*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-static' + ;; + ccc*) + lt_prog_compiler_wl_F77='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_F77='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_F77='-non_shared' + ;; + + sco3.2v5*) + lt_prog_compiler_pic_F77='-Kpic' + lt_prog_compiler_static_F77='-dn' + ;; + + solaris*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sunos4*) + lt_prog_compiler_wl_F77='-Qoption ld ' + lt_prog_compiler_pic_F77='-PIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + lt_prog_compiler_wl_F77='-Wl,' + lt_prog_compiler_pic_F77='-KPIC' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_F77='-Kconform_pic' + lt_prog_compiler_static_F77='-Bstatic' + fi + ;; + + uts4*) + lt_prog_compiler_pic_F77='-pic' + lt_prog_compiler_static_F77='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_F77=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_F77"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_F77=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_F77" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:15015: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:15019: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_prog_compiler_pic_works_F77=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6 + +if test x"$lt_prog_compiler_pic_works_F77" = xyes; then + case $lt_prog_compiler_pic_F77 in + "" | " "*) ;; + *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; + esac +else + lt_prog_compiler_pic_F77= + lt_prog_compiler_can_build_shared_F77=no +fi + +fi +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_F77= + ;; + *) + lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" + ;; +esac + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_F77=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:15075: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:15079: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + lt_cv_prog_compiler_c_o_F77=yes + fi + fi + chmod u+w . + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag_F77= + enable_shared_with_static_runtimes_F77=no + archive_cmds_F77= + archive_expsym_cmds_F77= + old_archive_From_new_cmds_F77= + old_archive_from_expsyms_cmds_F77= + export_dynamic_flag_spec_F77= + whole_archive_flag_spec_F77= + thread_safe_flag_spec_F77= + hardcode_libdir_flag_spec_F77= + hardcode_libdir_flag_spec_ld_F77= + hardcode_libdir_separator_F77= + hardcode_direct_F77=no + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=unsupported + link_all_deplibs_F77=unknown + hardcode_automatic_F77=no + module_cmds_F77= + module_expsym_cmds_F77= + always_export_symbols_F77=no + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_F77= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_F77=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_F77=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_F77=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_F77='-L$libdir' + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=no + enable_shared_with_static_runtimes_F77=yes + export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_F77=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + + sunos4*) + archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + linux*) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds_F77="$tmp_archive_cmds" + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +$echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + else + archive_expsym_cmds_F77="$tmp_archive_cmds" + fi + else + ld_shlibs_F77=no + fi + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_F77=no + fi + ;; + esac + + if test "$ld_shlibs_F77" = yes; then + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_F77='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_F77= + fi + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_F77=unsupported + always_export_symbols_F77=yes + archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_F77=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_F77=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_F77='' + hardcode_direct_F77=yes + hardcode_libdir_separator_F77=':' + link_all_deplibs_F77=yes + + if test "$GCC" = yes; then + case $host_os in aix4.012|aix4.012.*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_F77=yes + else + # We have old collect2 + hardcode_direct_F77=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_F77=yes + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_libdir_separator_F77= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_F77=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_F77='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_F77="-z nodefs" + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF + program main + + end +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_f77_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_F77=' ${wl}-bernotok' + allow_undefined_flag_F77=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols_F77=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_F77=' ' + archive_cmds_need_lc_F77=yes + # This is similar to how AIX traditionally builds it's shared libraries. + archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_F77=no + ;; + + bsdi4*) + export_dynamic_flag_spec_F77=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_F77=' ' + allow_undefined_flag_F77=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_F77='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_F77=yes + ;; + + darwin* | rhapsody*) + if test "$GXX" = yes ; then + archive_cmds_need_lc_F77=no + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag_F77='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_F77='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_F77='-flat_namespace -undefined suppress' + ;; + 10.*) + allow_undefined_flag_F77='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_F77='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_F77='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_F77='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + hardcode_direct_F77=no + hardcode_automatic_F77=yes + hardcode_shlibpath_var_F77=unsupported + whole_archive_flag_spec_F77='-all_load $convenience' + link_all_deplibs_F77=yes + else + ld_shlibs_F77=no + fi + ;; + + dgux*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + freebsd1*) + ld_shlibs_F77=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu) + archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + ;; + + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_F77='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld_F77='+b $libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + ;; + ia64*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=no + hardcode_shlibpath_var_F77=no + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + *) + hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_direct_F77=yes + export_dynamic_flag_spec_F77='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_F77=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + link_all_deplibs_F77=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + newsos6) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + hardcode_shlibpath_var_F77=no + ;; + + openbsd*) + hardcode_direct_F77=yes + hardcode_shlibpath_var_F77=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + export_dynamic_flag_spec_F77='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-R$libdir' + ;; + *) + archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_minus_L_F77=yes + allow_undefined_flag_F77=unsupported + archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_F77=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_F77=' -expect_unresolved \*' + archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_F77='-rpath $libdir' + fi + hardcode_libdir_separator_F77=: + ;; + + sco3.2v5*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + no_undefined_flag_F77=' -z text' + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_F77='-R$libdir' + hardcode_shlibpath_var_F77=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; + esac + link_all_deplibs_F77=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_direct_F77=yes + hardcode_minus_L_F77=yes + hardcode_shlibpath_var_F77=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_F77='$CC -r -o $output$reload_objs' + hardcode_direct_F77=no + ;; + motorola) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv4.3*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + export_dynamic_flag_spec_F77='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_F77=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_F77=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_F77=yes + hardcode_minus_L_F77=no + hardcode_shlibpath_var_F77=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + no_undefined_flag_F77='${wl}-z ${wl}text' + if test "$GCC" = yes; then + archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_F77='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_F77=no + ;; + + sysv5*) + no_undefined_flag_F77=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + hardcode_libdir_flag_spec_F77= + hardcode_shlibpath_var_F77=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) + archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_F77='-L$libdir' + hardcode_shlibpath_var_F77=no + ;; + + *) + ld_shlibs_F77=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 +echo "${ECHO_T}$ld_shlibs_F77" >&6 +test "$ld_shlibs_F77" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_F77" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_F77=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_F77 in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_F77 + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_F77 + allow_undefined_flag_F77= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_F77=no + else + archive_cmds_need_lc_F77=yes + fi + allow_undefined_flag_F77=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.01* | freebsdelf3.01*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf` + sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=yes + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_F77= +if test -n "$hardcode_libdir_flag_spec_F77" || \ + test -n "$runpath_var F77" || \ + test "X$hardcode_automatic_F77"="Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_F77" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && + test "$hardcode_minus_L_F77" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_F77=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_F77=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_F77=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 +echo "${ECHO_T}$hardcode_action_F77" >&6 + +if test "$hardcode_action_F77" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi + + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_F77 \ + CC_F77 \ + LD_F77 \ + lt_prog_compiler_wl_F77 \ + lt_prog_compiler_pic_F77 \ + lt_prog_compiler_static_F77 \ + lt_prog_compiler_no_builtin_flag_F77 \ + export_dynamic_flag_spec_F77 \ + thread_safe_flag_spec_F77 \ + whole_archive_flag_spec_F77 \ + enable_shared_with_static_runtimes_F77 \ + old_archive_cmds_F77 \ + old_archive_from_new_cmds_F77 \ + predep_objects_F77 \ + postdep_objects_F77 \ + predeps_F77 \ + postdeps_F77 \ + compiler_lib_search_path_F77 \ + archive_cmds_F77 \ + archive_expsym_cmds_F77 \ + postinstall_cmds_F77 \ + postuninstall_cmds_F77 \ + old_archive_from_expsyms_cmds_F77 \ + allow_undefined_flag_F77 \ + no_undefined_flag_F77 \ + export_symbols_cmds_F77 \ + hardcode_libdir_flag_spec_F77 \ + hardcode_libdir_flag_spec_ld_F77 \ + hardcode_libdir_separator_F77 \ + hardcode_automatic_F77 \ + module_cmds_F77 \ + module_expsym_cmds_F77 \ + lt_cv_prog_compiler_c_o_F77 \ + exclude_expsyms_F77 \ + include_expsyms_F77; do + + case $var in + old_archive_cmds_F77 | \ + old_archive_from_new_cmds_F77 | \ + archive_cmds_F77 | \ + archive_expsym_cmds_F77 | \ + module_cmds_F77 | \ + module_expsym_cmds_F77 | \ + old_archive_from_expsyms_cmds_F77 | \ + export_symbols_cmds_F77 | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_F77 + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_compiler_F77 + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_F77 + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_F77 + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_F77 + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext='$shrext' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_F77 +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 + +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_F77 + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_F77 +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_F77 +archive_expsym_cmds=$lt_archive_expsym_cmds_F77 +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_F77 +module_expsym_cmds=$lt_module_expsym_cmds_F77 + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_F77 + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_F77 + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_F77 + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_F77 + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_F77 + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_F77 + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_F77 + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_F77 + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_F77 + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_F77 + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_F77 + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_F77" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_F77 + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_F77 + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_F77 + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_F77 + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + GCJ) + if test -n "$GCJ" && test "X$GCJ" != "Xno"; then + + + +# Source file extension for Java test sources. +ac_ext=java + +# Object file extension for compiled Java test sources. +objext=o +objext_GCJ=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code="class foo {}\n" + +# Code to be used in simple link tests +lt_simple_link_test_code='public class conftest { public static void main(String argv) {}; }\n' + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${GCJ-"gcj"} +compiler=$CC +compiler_GCJ=$CC + +# GCJ did not exist at the time GCC didn't implicitly link libc in. +archive_cmds_need_lc_GCJ=no + + +lt_prog_compiler_no_builtin_flag_GCJ= + +if test "$GCC" = yes; then + lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' + + +echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 +echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_rtti_exceptions=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="-fno-rtti -fno-exceptions" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:17109: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:17113: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_cv_prog_compiler_rtti_exceptions=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6 + +if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then + lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" +else + : +fi + +fi + +lt_prog_compiler_wl_GCJ= +lt_prog_compiler_pic_GCJ= +lt_prog_compiler_static_GCJ= + +echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 +echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6 + + if test "$GCC" = yes; then + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_static_GCJ='-static' + + case $host_os in + aix*) + # All AIX code is PIC. + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + amigaos*) + # FIXME: we need at least 68020 code to build shared libraries, but + # adding the `-m68020' flag to GCC prevents building anything better, + # like `-m68040'. + lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' + ;; + + beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) + # PIC is the default for these OSes. + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + darwin* | rhapsody*) + # PIC is the default on this platform + # Common symbols not allowed in MH_DYLIB files + lt_prog_compiler_pic_GCJ='-fno-common' + ;; + + msdosdjgpp*) + # Just because we use GCC doesn't mean we suddenly get shared libraries + # on systems that don't support them. + lt_prog_compiler_can_build_shared_GCJ=no + enable_shared=no + ;; + + sysv4*MP*) + if test -d /usr/nec; then + lt_prog_compiler_pic_GCJ=-Kconform_pic + fi + ;; + + hpux*) + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + ;; + + *) + lt_prog_compiler_pic_GCJ='-fPIC' + ;; + esac + else + # PORTME Check for flag to pass linker flags through the system compiler. + case $host_os in + aix*) + lt_prog_compiler_wl_GCJ='-Wl,' + if test "$host_cpu" = ia64; then + # AIX 5 now supports IA64 processor + lt_prog_compiler_static_GCJ='-Bstatic' + else + lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' + fi + ;; + + mingw* | pw32* | os2*) + # This hack is so that the source file can tell whether it is being + # built for inclusion in a dll (and should export symbols for example). + lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' + ;; + + hpux9* | hpux10* | hpux11*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but + # not for PA HP-UX. + case "$host_cpu" in + hppa*64*|ia64*) + # +Z the default + ;; + *) + lt_prog_compiler_pic_GCJ='+Z' + ;; + esac + # Is there a better lt_prog_compiler_static that works with the bundled CC? + lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' + ;; + + irix5* | irix6* | nonstopux*) + lt_prog_compiler_wl_GCJ='-Wl,' + # PIC (with -KPIC) is the default. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + newsos6) + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + linux*) + case $CC in + icc* | ecc*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-static' + ;; + ccc*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All Alpha code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + esac + ;; + + osf3* | osf4* | osf5*) + lt_prog_compiler_wl_GCJ='-Wl,' + # All OSF/1 code is PIC. + lt_prog_compiler_static_GCJ='-non_shared' + ;; + + sco3.2v5*) + lt_prog_compiler_pic_GCJ='-Kpic' + lt_prog_compiler_static_GCJ='-dn' + ;; + + solaris*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sunos4*) + lt_prog_compiler_wl_GCJ='-Qoption ld ' + lt_prog_compiler_pic_GCJ='-PIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + lt_prog_compiler_wl_GCJ='-Wl,' + lt_prog_compiler_pic_GCJ='-KPIC' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + sysv4*MP*) + if test -d /usr/nec ;then + lt_prog_compiler_pic_GCJ='-Kconform_pic' + lt_prog_compiler_static_GCJ='-Bstatic' + fi + ;; + + uts4*) + lt_prog_compiler_pic_GCJ='-pic' + lt_prog_compiler_static_GCJ='-Bstatic' + ;; + + *) + lt_prog_compiler_can_build_shared_GCJ=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6 + +# +# Check to make sure the PIC flag actually works. +# +if test -n "$lt_prog_compiler_pic_GCJ"; then + +echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 +echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6 +if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_prog_compiler_pic_works_GCJ=no + ac_outfile=conftest.$ac_objext + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + lt_compiler_flag="$lt_prog_compiler_pic_GCJ" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + # The option is referenced via a variable to avoid confusing sed. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:17342: $lt_compile\"" >&5) + (eval "$lt_compile" 2>conftest.err) + ac_status=$? + cat conftest.err >&5 + echo "$as_me:17346: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s "$ac_outfile"; then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s conftest.err; then + lt_prog_compiler_pic_works_GCJ=yes + fi + fi + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 +echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6 + +if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then + case $lt_prog_compiler_pic_GCJ in + "" | " "*) ;; + *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; + esac +else + lt_prog_compiler_pic_GCJ= + lt_prog_compiler_can_build_shared_GCJ=no +fi + +fi +case "$host_os" in + # For platforms which do not support PIC, -DPIC is meaningless: + *djgpp*) + lt_prog_compiler_pic_GCJ= + ;; + *) + lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" + ;; +esac + +echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 +echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6 +if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + lt_cv_prog_compiler_c_o_GCJ=no + $rm -r conftest 2>/dev/null + mkdir conftest + cd conftest + mkdir out + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + lt_compiler_flag="-o out/conftest2.$ac_objext" + # Insert the option either (1) after the last *FLAGS variable, or + # (2) before a word containing "conftest.", or (3) at the end. + # Note that $ac_compile itself does not contain backslashes and begins + # with a dollar sign (not a hyphen), so the echo should work correctly. + lt_compile=`echo "$ac_compile" | $SED \ + -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ + -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ + -e 's:$: $lt_compiler_flag:'` + (eval echo "\"\$as_me:17402: $lt_compile\"" >&5) + (eval "$lt_compile" 2>out/conftest.err) + ac_status=$? + cat out/conftest.err >&5 + echo "$as_me:17406: \$? = $ac_status" >&5 + if (exit $ac_status) && test -s out/conftest2.$ac_objext + then + # The compiler can only warn and ignore the option if not recognized + # So say no if there are warnings + if test ! -s out/conftest.err; then + lt_cv_prog_compiler_c_o_GCJ=yes + fi + fi + chmod u+w . + $rm conftest* + # SGI C++ compiler will create directory out/ii_files/ for + # template instantiation + test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files + $rm out/* && rmdir out + cd .. + rmdir conftest + $rm conftest* + +fi +echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 +echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6 + + +hard_links="nottested" +if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then + # do not overwrite the value of need_locks provided by the user + echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 +echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6 + hard_links=yes + $rm conftest* + ln conftest.a conftest.b 2>/dev/null && hard_links=no + touch conftest.a + ln conftest.a conftest.b 2>&5 || hard_links=no + ln conftest.a conftest.b 2>/dev/null && hard_links=no + echo "$as_me:$LINENO: result: $hard_links" >&5 +echo "${ECHO_T}$hard_links" >&6 + if test "$hard_links" = no; then + { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 +echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} + need_locks=warn + fi +else + need_locks=no +fi + +echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 +echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6 + + runpath_var= + allow_undefined_flag_GCJ= + enable_shared_with_static_runtimes_GCJ=no + archive_cmds_GCJ= + archive_expsym_cmds_GCJ= + old_archive_From_new_cmds_GCJ= + old_archive_from_expsyms_cmds_GCJ= + export_dynamic_flag_spec_GCJ= + whole_archive_flag_spec_GCJ= + thread_safe_flag_spec_GCJ= + hardcode_libdir_flag_spec_GCJ= + hardcode_libdir_flag_spec_ld_GCJ= + hardcode_libdir_separator_GCJ= + hardcode_direct_GCJ=no + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=unsupported + link_all_deplibs_GCJ=unknown + hardcode_automatic_GCJ=no + module_cmds_GCJ= + module_expsym_cmds_GCJ= + always_export_symbols_GCJ=no + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' + # include_expsyms should be a list of space-separated symbols to be *always* + # included in the symbol list + include_expsyms_GCJ= + # exclude_expsyms can be an extended regexp of symbols to exclude + # it will be wrapped by ` (' and `)$', so one must not match beginning or + # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', + # as well as any symbol that contains `d'. + exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" + # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out + # platforms (ab)use it in PIC code, but their linkers get confused if + # the symbol is explicitly referenced. Since portable code cannot + # rely on this symbol name, it's probably fine to never include it in + # preloaded symbol tables. + extract_expsyms_cmds= + + case $host_os in + cygwin* | mingw* | pw32*) + # FIXME: the MSVC++ port hasn't been tested in a loooong time + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + if test "$GCC" != yes; then + with_gnu_ld=no + fi + ;; + openbsd*) + with_gnu_ld=no + ;; + esac + + ld_shlibs_GCJ=yes + if test "$with_gnu_ld" = yes; then + # If archive_cmds runs LD, not CC, wlarc should be empty + wlarc='${wl}' + + # See if GNU ld supports shared libraries. + case $host_os in + aix3* | aix4* | aix5*) + # On AIX/PPC, the GNU linker is very broken + if test "$host_cpu" != ia64; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: the GNU linker, at least up to release 2.9.1, is reported +*** to be unable to reliably create shared libraries on AIX. +*** Therefore, libtool is disabling shared libraries support. If you +*** really care for shared libraries, you may want to modify your PATH +*** so that a non-GNU linker is found, and then restart. + +EOF + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + + # Samuel A. Falvo II reports + # that the semantics of dynamic libraries on AmigaOS, at least up + # to version 4, is to share data among multiple programs linked + # with the same dynamic library. Since this doesn't match the + # behavior of shared libraries on other platforms, we can't use + # them. + ld_shlibs_GCJ=no + ;; + + beos*) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + allow_undefined_flag_GCJ=unsupported + # Joseph Beckenbach says some releases of gcc + # support --undefined. This deserves some investigation. FIXME + archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + cygwin* | mingw* | pw32*) + # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, + # as there is no search path for DLLs. + hardcode_libdir_flag_spec_GCJ='-L$libdir' + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=no + enable_shared_with_static_runtimes_GCJ=yes + export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' + + if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + # If the export-symbols file already is a .def file (1st line + # is EXPORTS), use it as is; otherwise, prepend... + archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then + cp $export_symbols $output_objdir/$soname.def; + else + echo EXPORTS > $output_objdir/$soname.def; + cat $export_symbols >> $output_objdir/$soname.def; + fi~ + $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' + else + ld_shlibs=no + fi + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' + wlarc= + else + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + fi + ;; + + solaris* | sysv5*) + if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then + ld_shlibs_GCJ=no + cat <&2 + +*** Warning: The releases 2.8.* of the GNU linker cannot reliably +*** create shared libraries on Solaris systems. Therefore, libtool +*** is disabling shared libraries support. We urge you to upgrade GNU +*** binutils to release 2.9.1 or newer. Another option is to modify +*** your PATH or compiler configuration so that the native linker is +*** used, and then restart. + +EOF + elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + + sunos4*) + archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' + wlarc= + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + linux*) + if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then + tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_cmds_GCJ="$tmp_archive_cmds" + supports_anon_versioning=no + case `$LD -v 2>/dev/null` in + *\ 01.* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 + *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... + *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... + *\ 2.11.*) ;; # other 2.11 versions + *) supports_anon_versioning=yes ;; + esac + if test $supports_anon_versioning = yes; then + archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ +cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ +$echo "local: *; };" >> $output_objdir/$libname.ver~ + $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' + else + archive_expsym_cmds_GCJ="$tmp_archive_cmds" + fi + else + ld_shlibs_GCJ=no + fi + ;; + + *) + if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + else + ld_shlibs_GCJ=no + fi + ;; + esac + + if test "$ld_shlibs_GCJ" = yes; then + runpath_var=LD_RUN_PATH + hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' + export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' + # ancient GNU ld didn't support --whole-archive et. al. + if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then + whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' + else + whole_archive_flag_spec_GCJ= + fi + fi + else + # PORTME fill in a description of your system's linker (not GNU ld) + case $host_os in + aix3*) + allow_undefined_flag_GCJ=unsupported + always_export_symbols_GCJ=yes + archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' + # Note: this linker hardcodes the directories in LIBPATH if there + # are no directories specified by -L. + hardcode_minus_L_GCJ=yes + if test "$GCC" = yes && test -z "$link_static_flag"; then + # Neither direct hardcoding nor static linking is supported with a + # broken collect2. + hardcode_direct_GCJ=unsupported + fi + ;; + + aix4* | aix5*) + if test "$host_cpu" = ia64; then + # On IA64, the linker does run time linking by default, so we don't + # have to do anything special. + aix_use_runtimelinking=no + exp_sym_flag='-Bexport' + no_entry_flag="" + else + # If we're using GNU nm, then we don't want the "-C" option. + # -C means demangle to AIX nm, but means don't demangle with GNU nm + if $NM -V 2>&1 | grep 'GNU' > /dev/null; then + export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + else + export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' + fi + aix_use_runtimelinking=no + + # Test if we are trying to use run time linking or normal + # AIX style linking. If -brtl is somewhere in LDFLAGS, we + # need to do runtime linking. + case $host_os in aix4.[23]|aix4.[23].*|aix5*) + for ld_flag in $LDFLAGS; do + if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then + aix_use_runtimelinking=yes + break + fi + done + esac + + exp_sym_flag='-bexport' + no_entry_flag='-bnoentry' + fi + + # When large executables or shared objects are built, AIX ld can + # have problems creating the table of contents. If linking a library + # or program results in "error TOC overflow" add -mminimal-toc to + # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not + # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. + + archive_cmds_GCJ='' + hardcode_direct_GCJ=yes + hardcode_libdir_separator_GCJ=':' + link_all_deplibs_GCJ=yes + + if test "$GCC" = yes; then + case $host_os in aix4.012|aix4.012.*) + # We only want to do this on AIX 4.2 and lower, the check + # below for broken collect2 doesn't work under 4.3+ + collect2name=`${CC} -print-prog-name=collect2` + if test -f "$collect2name" && \ + strings "$collect2name" | grep resolve_lib_name >/dev/null + then + # We have reworked collect2 + hardcode_direct_GCJ=yes + else + # We have old collect2 + hardcode_direct_GCJ=unsupported + # It fails to find uninstalled libraries when the uninstalled + # path is not listed in the libpath. Setting hardcode_minus_L + # to unsupported forces relinking + hardcode_minus_L_GCJ=yes + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_libdir_separator_GCJ= + fi + esac + shared_flag='-shared' + else + # not using gcc + if test "$host_cpu" = ia64; then + # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release + # chokes on -Wl,-G. The following line is correct: + shared_flag='-G' + else + if test "$aix_use_runtimelinking" = yes; then + shared_flag='${wl}-G' + else + shared_flag='${wl}-bM:SRE' + fi + fi + fi + + # It seems that -bexpall does not export symbols beginning with + # underscore (_), so it is better to generate a list of symbols to export. + always_export_symbols_GCJ=yes + if test "$aix_use_runtimelinking" = yes; then + # Warning - without using the other runtime loading flags (-brtl), + # -berok will link without error, but may produce a broken library. + allow_undefined_flag_GCJ='-berok' + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" + else + if test "$host_cpu" = ia64; then + hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' + allow_undefined_flag_GCJ="-z nodefs" + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" + else + # Determine the default libpath from the value encoded in an empty executable. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'` +# Check for a 64-bit object if we didn't find anything. +if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } +}'`; fi +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi + + hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" + # Warning - without using the other run time loading flags, + # -berok will link without error, but may produce a broken library. + no_undefined_flag_GCJ=' ${wl}-bernotok' + allow_undefined_flag_GCJ=' ${wl}-berok' + # -bexpall does not export symbols beginning with underscore (_) + always_export_symbols_GCJ=yes + # Exported symbols can be pulled into shared objects from archives + whole_archive_flag_spec_GCJ=' ' + archive_cmds_need_lc_GCJ=yes + # This is similar to how AIX traditionally builds it's shared libraries. + archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' + fi + fi + ;; + + amigaos*) + archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + # see comment about different semantics on the GNU ld section + ld_shlibs_GCJ=no + ;; + + bsdi4*) + export_dynamic_flag_spec_GCJ=-rdynamic + ;; + + cygwin* | mingw* | pw32*) + # When not using gcc, we currently assume that we are using + # Microsoft Visual C++. + # hardcode_libdir_flag_spec is actually meaningless, as there is + # no search path for DLLs. + hardcode_libdir_flag_spec_GCJ=' ' + allow_undefined_flag_GCJ=unsupported + # Tell ltmain to make .lib files, not .a files. + libext=lib + # Tell ltmain to make .dll files, not .so files. + shrext=".dll" + # FIXME: Setting linknames here is a bad hack. + archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' + # The linker will automatically build a .lib file if we build a DLL. + old_archive_From_new_cmds_GCJ='true' + # FIXME: Should let the user specify the lib program. + old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' + fix_srcfile_path='`cygpath -w "$srcfile"`' + enable_shared_with_static_runtimes_GCJ=yes + ;; + + darwin* | rhapsody*) + if test "$GXX" = yes ; then + archive_cmds_need_lc_GCJ=no + case "$host_os" in + rhapsody* | darwin1.[012]) + allow_undefined_flag_GCJ='-undefined suppress' + ;; + *) # Darwin 1.3 on + if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then + allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' + else + case ${MACOSX_DEPLOYMENT_TARGET} in + 10.[012]) + allow_undefined_flag_GCJ='-flat_namespace -undefined suppress' + ;; + 10.*) + allow_undefined_flag_GCJ='-undefined dynamic_lookup' + ;; + esac + fi + ;; + esac + lt_int_apple_cc_single_mod=no + output_verbose_link_cmd='echo' + if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then + lt_int_apple_cc_single_mod=yes + fi + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_cmds_GCJ='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + else + archive_cmds_GCJ='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' + fi + module_cmds_GCJ='$CC ${wl}-bind_at_load $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' + # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's + if test "X$lt_int_apple_cc_single_mod" = Xyes ; then + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + else + archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + fi + module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' + hardcode_direct_GCJ=no + hardcode_automatic_GCJ=yes + hardcode_shlibpath_var_GCJ=unsupported + whole_archive_flag_spec_GCJ='-all_load $convenience' + link_all_deplibs_GCJ=yes + else + ld_shlibs_GCJ=no + fi + ;; + + dgux*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + freebsd1*) + ld_shlibs_GCJ=no + ;; + + # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor + # support. Future versions do this automatically, but an explicit c++rt0.o + # does not break anything, and helps significantly (at the cost of a little + # extra space). + freebsd2.2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # Unfortunately, older versions of FreeBSD 2 do not have this feature. + freebsd2*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + # FreeBSD 3 and greater uses gcc -shared to do shared libraries. + freebsd* | kfreebsd*-gnu) + archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + hpux9*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + else + archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + ;; + + hpux10* | hpux11*) + if test "$GCC" = yes -a "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + ;; + *) + archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' + ;; + esac + else + case "$host_cpu" in + hppa*64*|ia64*) + archive_cmds_GCJ='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' + ;; + *) + archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' + ;; + esac + fi + if test "$with_gnu_ld" = no; then + case "$host_cpu" in + hppa*64*) + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + ;; + ia64*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=no + hardcode_shlibpath_var_GCJ=no + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + *) + hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_direct_GCJ=yes + export_dynamic_flag_spec_GCJ='${wl}-E' + + # hardcode_minus_L: Not really in the search PATH, + # but as the default location of the library. + hardcode_minus_L_GCJ=yes + ;; + esac + fi + ;; + + irix5* | irix6* | nonstopux*) + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + link_all_deplibs_GCJ=yes + ;; + + netbsd*) + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out + else + archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + newsos6) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + hardcode_shlibpath_var_GCJ=no + ;; + + openbsd*) + hardcode_direct_GCJ=yes + hardcode_shlibpath_var_GCJ=no + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + export_dynamic_flag_spec_GCJ='${wl}-E' + else + case $host_os in + openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) + archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-R$libdir' + ;; + *) + archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' + ;; + esac + fi + ;; + + os2*) + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_minus_L_GCJ=yes + allow_undefined_flag_GCJ=unsupported + archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' + old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' + ;; + + osf3*) + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + fi + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + hardcode_libdir_separator_GCJ=: + ;; + + osf4* | osf5*) # as osf3* with the addition of -msym flag + if test "$GCC" = yes; then + allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' + archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' + hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' + else + allow_undefined_flag_GCJ=' -expect_unresolved \*' + archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' + archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ + $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' + + # Both c and cxx compiler support -rpath directly + hardcode_libdir_flag_spec_GCJ='-rpath $libdir' + fi + hardcode_libdir_separator_GCJ=: + ;; + + sco3.2v5*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='${wl}-Bexport' + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ;; + + solaris*) + no_undefined_flag_GCJ=' -z text' + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' + else + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + fi + hardcode_libdir_flag_spec_GCJ='-R$libdir' + hardcode_shlibpath_var_GCJ=no + case $host_os in + solaris2.[0-5] | solaris2.[0-5].*) ;; + *) # Supported since Solaris 2.6 (maybe 2.5.1?) + whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; + esac + link_all_deplibs_GCJ=yes + ;; + + sunos4*) + if test "x$host_vendor" = xsequent; then + # Use $CC to link under sequent, because it throws in some extra .o + # files that make .init and .fini sections work. + archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' + fi + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=yes + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4) + case $host_vendor in + sni) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes # is this really true??? + ;; + siemens) + ## LD is ld it makes a PLAMLIB + ## CC just makes a GrossModule. + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + reload_cmds_GCJ='$CC -r -o $output$reload_objs' + hardcode_direct_GCJ=no + ;; + motorola) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie + ;; + esac + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv4.3*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + export_dynamic_flag_spec_GCJ='-Bexport' + ;; + + sysv4*MP*) + if test -d /usr/nec; then + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_shlibpath_var_GCJ=no + runpath_var=LD_RUN_PATH + hardcode_runpath_var=yes + ld_shlibs_GCJ=yes + fi + ;; + + sysv4.2uw2*) + archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' + hardcode_direct_GCJ=yes + hardcode_minus_L_GCJ=no + hardcode_shlibpath_var_GCJ=no + hardcode_runpath_var=yes + runpath_var=LD_RUN_PATH + ;; + + sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) + no_undefined_flag_GCJ='${wl}-z ${wl}text' + if test "$GCC" = yes; then + archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + else + archive_cmds_GCJ='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' + fi + runpath_var='LD_RUN_PATH' + hardcode_shlibpath_var_GCJ=no + ;; + + sysv5*) + no_undefined_flag_GCJ=' -z text' + # $CC -shared without GNU ld will not create a library from C++ + # object files and a static libstdc++, better avoid it by now + archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' + archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ + $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' + hardcode_libdir_flag_spec_GCJ= + hardcode_shlibpath_var_GCJ=no + runpath_var='LD_RUN_PATH' + ;; + + uts4*) + archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' + hardcode_libdir_flag_spec_GCJ='-L$libdir' + hardcode_shlibpath_var_GCJ=no + ;; + + *) + ld_shlibs_GCJ=no + ;; + esac + fi + +echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 +echo "${ECHO_T}$ld_shlibs_GCJ" >&6 +test "$ld_shlibs_GCJ" = no && can_build_shared=no + +variables_saved_for_relink="PATH $shlibpath_var $runpath_var" +if test "$GCC" = yes; then + variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" +fi + +# +# Do we need to explicitly link libc? +# +case "x$archive_cmds_need_lc_GCJ" in +x|xyes) + # Assume -lc should be added + archive_cmds_need_lc_GCJ=yes + + if test "$enable_shared" = yes && test "$GCC" = yes; then + case $archive_cmds_GCJ in + *'~'*) + # FIXME: we may have to deal with multi-command sequences. + ;; + '$CC '*) + # Test whether the compiler implicitly links with -lc since on some + # systems, -lgcc has to come before -lc. If gcc already passes -lc + # to ld, don't add -lc before -lgcc. + echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 +echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6 + $rm conftest* + printf "$lt_simple_compile_test_code" > conftest.$ac_ext + + if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } 2>conftest.err; then + soname=conftest + lib=conftest + libobjs=conftest.$ac_objext + deplibs= + wl=$lt_prog_compiler_wl_GCJ + compiler_flags=-v + linker_flags=-v + verstring= + output_objdir=. + libname=conftest + lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ + allow_undefined_flag_GCJ= + if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 + (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } + then + archive_cmds_need_lc_GCJ=no + else + archive_cmds_need_lc_GCJ=yes + fi + allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag + else + cat conftest.err 1>&5 + fi + $rm conftest* + echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 +echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6 + ;; + esac + fi + ;; +esac + +echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 +echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6 +library_names_spec= +libname_spec='lib$name' +soname_spec= +shrext=".so" +postinstall_cmds= +postuninstall_cmds= +finish_cmds= +finish_eval= +shlibpath_var= +shlibpath_overrides_runpath=unknown +version_type=none +dynamic_linker="$host_os ld.so" +sys_lib_dlsearch_path_spec="/lib /usr/lib" +if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then + # if the path contains ";" then we assume it to be the separator + # otherwise default to the standard path separator (i.e. ":") - it is + # assumed that no part of a normal pathname contains ";" but that should + # okay in the real world where ";" in dirpaths is itself problematic. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi +else + sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" +fi +need_lib_prefix=unknown +hardcode_into_libs=no + +# when you set need_version to no, make sure it does not cause -set_version +# flags to be left without arguments +need_version=unknown + +case $host_os in +aix3*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' + shlibpath_var=LIBPATH + + # AIX 3 has no versioning support, so we append a major version to the name. + soname_spec='${libname}${release}${shared_ext}$major' + ;; + +aix4* | aix5*) + version_type=linux + need_lib_prefix=no + need_version=no + hardcode_into_libs=yes + if test "$host_cpu" = ia64; then + # AIX 5 supports IA64 + library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + else + # With GCC up to 2.95.x, collect2 would create an import file + # for dependence libraries. The import file would start with + # the line `#! .'. This would cause the generated library to + # depend on `.', always an invalid library. This was fixed in + # development snapshots of GCC prior to 3.0. + case $host_os in + aix4 | aix4.[01] | aix4.[01].*) + if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' + echo ' yes ' + echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then + : + else + can_build_shared=no + fi + ;; + esac + # AIX (on Power*) has no versioning support, so currently we can not hardcode correct + # soname into executable. Probably we can add versioning support to + # collect2, so additional links can be useful in future. + if test "$aix_use_runtimelinking" = yes; then + # If using run time linking (on AIX 4.2 or later) use lib.so + # instead of lib.a to let people know that these are not + # typical AIX shared libraries. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + else + # We preserve .a as extension for shared libraries through AIX4.2 + # and later when we are not doing run time linking. + library_names_spec='${libname}${release}.a $libname.a' + soname_spec='${libname}${release}${shared_ext}$major' + fi + shlibpath_var=LIBPATH + fi + ;; + +amigaos*) + library_names_spec='$libname.ixlibrary $libname.a' + # Create ${libname}_ixlibrary.a entries in /sys/libs. + finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' + ;; + +beos*) + library_names_spec='${libname}${shared_ext}' + dynamic_linker="$host_os ld.so" + shlibpath_var=LIBRARY_PATH + ;; + +bsdi4*) + version_type=linux + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" + sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" + # the default ld.so.conf also contains /usr/contrib/lib and + # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow + # libtool to hard-code these into programs + ;; + +cygwin* | mingw* | pw32*) + version_type=windows + shrext=".dll" + need_version=no + need_lib_prefix=no + + case $GCC,$host_os in + yes,cygwin* | yes,mingw* | yes,pw32*) + library_names_spec='$libname.dll.a' + # DLL is installed to $(libdir)/../bin by postinstall_cmds + postinstall_cmds='base_file=`basename \${file}`~ + dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ + dldir=$destdir/`dirname \$dlpath`~ + test -d \$dldir || mkdir -p \$dldir~ + $install_prog $dir/$dlname \$dldir/$dlname' + postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ + dlpath=$dir/\$dldll~ + $rm \$dlpath' + shlibpath_overrides_runpath=yes + + case $host_os in + cygwin*) + # Cygwin DLLs use 'cyg' prefix rather than 'lib' + soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" + ;; + mingw*) + # MinGW DLLs use traditional 'lib' prefix + soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' + sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` + if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then + # It is most probably a Windows format PATH printed by + # mingw gcc, but we are running on Cygwin. Gcc prints its search + # path with ; separators, and with drive letters. We can handle the + # drive letters (cygwin fileutils understands them), so leave them, + # especially as we might pass files found there to a mingw objdump, + # which wouldn't understand a cygwinified path. Ahh. + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` + else + sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` + fi + ;; + pw32*) + # pw32 DLLs use 'pw' prefix rather than 'lib' + library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/./-/g'`${versuffix}${shared_ext}' + ;; + esac + ;; + + *) + library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' + ;; + esac + dynamic_linker='Win32 ld.exe' + # FIXME: first we should search . and the directory the executable is in + shlibpath_var=PATH + ;; + +darwin* | rhapsody*) + dynamic_linker="$host_os dyld" + version_type=darwin + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' + soname_spec='${libname}${release}${major}$shared_ext' + shlibpath_overrides_runpath=yes + shlibpath_var=DYLD_LIBRARY_PATH + shrext='$(test .$module = .yes && echo .so || echo .dylib)' + # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. + if test "$GCC" = yes; then + sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` + else + sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' + fi + sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' + ;; + +dgux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +freebsd1*) + dynamic_linker=no + ;; + +kfreebsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +freebsd*) + objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` + version_type=freebsd-$objformat + case $version_type in + freebsd-elf*) + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' + need_version=no + need_lib_prefix=no + ;; + freebsd-*) + library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' + need_version=yes + ;; + esac + shlibpath_var=LD_LIBRARY_PATH + case $host_os in + freebsd2*) + shlibpath_overrides_runpath=yes + ;; + freebsd3.01* | freebsdelf3.01*) + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + *) # from 3.2 on + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + ;; + esac + ;; + +gnu*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + hardcode_into_libs=yes + ;; + +hpux9* | hpux10* | hpux11*) + # Give a soname corresponding to the major version so that dld.sl refuses to + # link against other versions. + version_type=sunos + need_lib_prefix=no + need_version=no + case "$host_cpu" in + ia64*) + shrext='.so' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.so" + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + if test "X$HPUX_IA64_MODE" = X32; then + sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" + else + sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" + fi + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + hppa*64*) + shrext='.sl' + hardcode_into_libs=yes + dynamic_linker="$host_os dld.sl" + shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH + shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" + sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec + ;; + *) + shrext='.sl' + dynamic_linker="$host_os dld.sl" + shlibpath_var=SHLIB_PATH + shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + ;; + esac + # HP-UX runs *really* slowly unless shared libraries are mode 555. + postinstall_cmds='chmod 555 $lib' + ;; + +irix5* | irix6* | nonstopux*) + case $host_os in + nonstopux*) version_type=nonstopux ;; + *) + if test "$lt_cv_prog_gnu_ld" = yes; then + version_type=linux + else + version_type=irix + fi ;; + esac + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' + case $host_os in + irix5* | nonstopux*) + libsuff= shlibsuff= + ;; + *) + case $LD in # libtool.m4 will add one of these switches to LD + *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") + libsuff= shlibsuff= libmagic=32-bit;; + *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") + libsuff=32 shlibsuff=N32 libmagic=N32;; + *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") + libsuff=64 shlibsuff=64 libmagic=64-bit;; + *) libsuff= shlibsuff= libmagic=never-match;; + esac + ;; + esac + shlibpath_var=LD_LIBRARY${shlibsuff}_PATH + shlibpath_overrides_runpath=no + sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" + sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" + hardcode_into_libs=yes + ;; + +# No shared lib support for Linux oldld, aout, or coff. +linux*oldld* | linux*aout* | linux*coff*) + dynamic_linker=no + ;; + +# This must be Linux ELF. +linux*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + # This implies no fast_install, which is unacceptable. + # Some rework will be needed to allow for fast_install + # before this can be enabled. + hardcode_into_libs=yes + + # Append ld.so.conf contents to the search path + if test -f /etc/ld.so.conf; then + ld_extra=`$SED -e 's/:,\t/ /g;s/=^=*$//;s/=^= * / /g' /etc/ld.so.conf` + sys_lib_dlsearch_path_spec="/lib /usr/lib $ld_extra" + fi + + # We used to test for /lib/ld.so.1 and disable shared libraries on + # powerpc, because MkLinux only supported shared libraries with the + # GNU dynamic linker. Since this was broken with cross compilers, + # most powerpc-linux boxes support dynamic linking these days and + # people can always --disable-shared, the test was removed, and we + # assume the GNU/Linux dynamic linker is in use. + dynamic_linker='GNU/Linux ld.so' + ;; + +knetbsd*-gnu) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=no + hardcode_into_libs=yes + dynamic_linker='GNU ld.so' + ;; + +netbsd*) + version_type=sunos + need_lib_prefix=no + need_version=no + if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + dynamic_linker='NetBSD (a.out) ld.so' + else + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + dynamic_linker='NetBSD ld.elf_so' + fi + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + ;; + +newsos6) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +nto-qnx*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + ;; + +openbsd*) + version_type=sunos + need_lib_prefix=no + need_version=yes + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' + shlibpath_var=LD_LIBRARY_PATH + if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then + case $host_os in + openbsd2.[89] | openbsd2.[89].*) + shlibpath_overrides_runpath=no + ;; + *) + shlibpath_overrides_runpath=yes + ;; + esac + else + shlibpath_overrides_runpath=yes + fi + ;; + +os2*) + libname_spec='$name' + shrext=".dll" + need_lib_prefix=no + library_names_spec='$libname${shared_ext} $libname.a' + dynamic_linker='OS/2 ld.exe' + shlibpath_var=LIBPATH + ;; + +osf3* | osf4* | osf5*) + version_type=osf + need_lib_prefix=no + need_version=no + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" + sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" + ;; + +sco3.2v5*) + version_type=osf + soname_spec='${libname}${release}${shared_ext}$major' + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + shlibpath_var=LD_LIBRARY_PATH + ;; + +solaris*) + version_type=linux + need_lib_prefix=no + need_version=no + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + hardcode_into_libs=yes + # ldd complains unless libraries are executable + postinstall_cmds='chmod +x $lib' + ;; + +sunos4*) + version_type=sunos + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' + finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' + shlibpath_var=LD_LIBRARY_PATH + shlibpath_overrides_runpath=yes + if test "$with_gnu_ld" = yes; then + need_lib_prefix=no + fi + need_version=yes + ;; + +sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + case $host_vendor in + sni) + shlibpath_overrides_runpath=no + need_lib_prefix=no + export_dynamic_flag_spec='${wl}-Blargedynsym' + runpath_var=LD_RUN_PATH + ;; + siemens) + need_lib_prefix=no + ;; + motorola) + need_lib_prefix=no + need_version=no + shlibpath_overrides_runpath=no + sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' + ;; + esac + ;; + +sysv4*MP*) + if test -d /usr/nec ;then + version_type=linux + library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' + soname_spec='$libname${shared_ext}.$major' + shlibpath_var=LD_LIBRARY_PATH + fi + ;; + +uts4*) + version_type=linux + library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' + soname_spec='${libname}${release}${shared_ext}$major' + shlibpath_var=LD_LIBRARY_PATH + ;; + +*) + dynamic_linker=no + ;; +esac +echo "$as_me:$LINENO: result: $dynamic_linker" >&5 +echo "${ECHO_T}$dynamic_linker" >&6 +test "$dynamic_linker" = no && can_build_shared=no + +echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 +echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6 +hardcode_action_GCJ= +if test -n "$hardcode_libdir_flag_spec_GCJ" || \ + test -n "$runpath_var GCJ" || \ + test "X$hardcode_automatic_GCJ"="Xyes" ; then + + # We can hardcode non-existant directories. + if test "$hardcode_direct_GCJ" != no && + # If the only mechanism to avoid hardcoding is shlibpath_var, we + # have to relink, otherwise we might link with an installed library + # when we should be linking with a yet-to-be-installed one + ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && + test "$hardcode_minus_L_GCJ" != no; then + # Linking always hardcodes the temporary library directory. + hardcode_action_GCJ=relink + else + # We can link without hardcoding, and we can hardcode nonexisting dirs. + hardcode_action_GCJ=immediate + fi +else + # We cannot hardcode anything, or else we can only hardcode existing + # directories. + hardcode_action_GCJ=unsupported +fi +echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 +echo "${ECHO_T}$hardcode_action_GCJ" >&6 + +if test "$hardcode_action_GCJ" = relink; then + # Fast installation is not supported + enable_fast_install=no +elif test "$shlibpath_overrides_runpath" = yes || + test "$enable_shared" = no; then + # Fast installation is not necessary + enable_fast_install=needless +fi + +striplib= +old_striplib= +echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 +echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6 +if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then + test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" + test -z "$striplib" && striplib="$STRIP --strip-unneeded" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else +# FIXME - insert some real tests, host_os isn't really good enough + case $host_os in + darwin*) + if test -n "$STRIP" ; then + striplib="$STRIP -x" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + ;; + *) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +fi + +if test "x$enable_dlopen" != xyes; then + enable_dlopen=unknown + enable_dlopen_self=unknown + enable_dlopen_self_static=unknown +else + lt_cv_dlopen=no + lt_cv_dlopen_libs= + + case $host_os in + beos*) + lt_cv_dlopen="load_add_on" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + ;; + + mingw* | pw32*) + lt_cv_dlopen="LoadLibrary" + lt_cv_dlopen_libs= + ;; + + cygwin*) + lt_cv_dlopen="dlopen" + lt_cv_dlopen_libs= + ;; + + darwin*) + # if libdl is installed we need to link against it + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + + lt_cv_dlopen="dyld" + lt_cv_dlopen_libs= + lt_cv_dlopen_self=yes + +fi + + ;; + + *) + echo "$as_me:$LINENO: checking for shl_load" >&5 +echo $ECHO_N "checking for shl_load... $ECHO_C" >&6 +if test "${ac_cv_func_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define shl_load to an innocuous variant, in case declares shl_load. + For example, HP-UX 11i declares gettimeofday. */ +#define shl_load innocuous_shl_load + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char shl_load (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef shl_load + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_shl_load) || defined (__stub___shl_load) +choke me +#else +char (*f) () = shl_load; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != shl_load; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 +echo "${ECHO_T}$ac_cv_func_shl_load" >&6 +if test $ac_cv_func_shl_load = yes; then + lt_cv_dlopen="shl_load" +else + echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 +echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_shl_load+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char shl_load (); +int +main () +{ +shl_load (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_shl_load=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_shl_load=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6 +if test $ac_cv_lib_dld_shl_load = yes; then + lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" +else + echo "$as_me:$LINENO: checking for dlopen" >&5 +echo $ECHO_N "checking for dlopen... $ECHO_C" >&6 +if test "${ac_cv_func_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlopen to an innocuous variant, in case declares dlopen. + For example, HP-UX 11i declares gettimeofday. */ +#define dlopen innocuous_dlopen + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlopen (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlopen + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlopen) || defined (__stub___dlopen) +choke me +#else +char (*f) () = dlopen; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != dlopen; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 +echo "${ECHO_T}$ac_cv_func_dlopen" >&6 +if test $ac_cv_func_dlopen = yes; then + lt_cv_dlopen="dlopen" +else + echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" +else + echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 +echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6 +if test "${ac_cv_lib_svld_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsvld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_svld_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_svld_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6 +if test $ac_cv_lib_svld_dlopen = yes; then + lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" +else + echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 +echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6 +if test "${ac_cv_lib_dld_dld_link+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldld $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dld_link (); +int +main () +{ +dld_link (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dld_dld_link=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dld_dld_link=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 +echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6 +if test $ac_cv_lib_dld_dld_link = yes; then + lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" +fi + + +fi + + +fi + + +fi + + +fi + + +fi + + ;; + esac + + if test "x$lt_cv_dlopen" != xno; then + enable_dlopen=yes + else + enable_dlopen=no + fi + + case $lt_cv_dlopen in + dlopen) + save_CPPFLAGS="$CPPFLAGS" + test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" + + save_LDFLAGS="$LDFLAGS" + eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" + + save_LIBS="$LIBS" + LIBS="$lt_cv_dlopen_libs $LIBS" + + echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 +echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self" >&6 + + if test "x$lt_cv_dlopen_self" = xyes; then + LDFLAGS="$LDFLAGS $link_static_flag" + echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 +echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6 +if test "${lt_cv_dlopen_self_static+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$cross_compiling" = yes; then : + lt_cv_dlopen_self_static=cross +else + lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 + lt_status=$lt_dlunknown + cat > conftest.$ac_ext < +#endif + +#include + +#ifdef RTLD_GLOBAL +# define LT_DLGLOBAL RTLD_GLOBAL +#else +# ifdef DL_GLOBAL +# define LT_DLGLOBAL DL_GLOBAL +# else +# define LT_DLGLOBAL 0 +# endif +#endif + +/* We may have to define LT_DLLAZY_OR_NOW in the command line if we + find out it does not work in some platform. */ +#ifndef LT_DLLAZY_OR_NOW +# ifdef RTLD_LAZY +# define LT_DLLAZY_OR_NOW RTLD_LAZY +# else +# ifdef DL_LAZY +# define LT_DLLAZY_OR_NOW DL_LAZY +# else +# ifdef RTLD_NOW +# define LT_DLLAZY_OR_NOW RTLD_NOW +# else +# ifdef DL_NOW +# define LT_DLLAZY_OR_NOW DL_NOW +# else +# define LT_DLLAZY_OR_NOW 0 +# endif +# endif +# endif +# endif +#endif + +#ifdef __cplusplus +extern "C" void exit (int); +#endif + +void fnord() { int i=42;} +int main () +{ + void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); + int status = $lt_dlunknown; + + if (self) + { + if (dlsym (self,"fnord")) status = $lt_dlno_uscore; + else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; + /* dlclose (self); */ + } + + exit (status); +} +EOF + if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then + (./conftest; exit; ) 2>/dev/null + lt_status=$? + case x$lt_status in + x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; + x$lt_unknown|x*) lt_cv_dlopen_self_static=no ;; + esac + else : + # compilation failed + lt_cv_dlopen_self_static=no + fi +fi +rm -fr conftest* + + +fi +echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 +echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6 + fi + + CPPFLAGS="$save_CPPFLAGS" + LDFLAGS="$save_LDFLAGS" + LIBS="$save_LIBS" + ;; + esac + + case $lt_cv_dlopen_self in + yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; + *) enable_dlopen_self=unknown ;; + esac + + case $lt_cv_dlopen_self_static in + yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; + *) enable_dlopen_self_static=unknown ;; + esac +fi + + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_GCJ \ + CC_GCJ \ + LD_GCJ \ + lt_prog_compiler_wl_GCJ \ + lt_prog_compiler_pic_GCJ \ + lt_prog_compiler_static_GCJ \ + lt_prog_compiler_no_builtin_flag_GCJ \ + export_dynamic_flag_spec_GCJ \ + thread_safe_flag_spec_GCJ \ + whole_archive_flag_spec_GCJ \ + enable_shared_with_static_runtimes_GCJ \ + old_archive_cmds_GCJ \ + old_archive_from_new_cmds_GCJ \ + predep_objects_GCJ \ + postdep_objects_GCJ \ + predeps_GCJ \ + postdeps_GCJ \ + compiler_lib_search_path_GCJ \ + archive_cmds_GCJ \ + archive_expsym_cmds_GCJ \ + postinstall_cmds_GCJ \ + postuninstall_cmds_GCJ \ + old_archive_from_expsyms_cmds_GCJ \ + allow_undefined_flag_GCJ \ + no_undefined_flag_GCJ \ + export_symbols_cmds_GCJ \ + hardcode_libdir_flag_spec_GCJ \ + hardcode_libdir_flag_spec_ld_GCJ \ + hardcode_libdir_separator_GCJ \ + hardcode_automatic_GCJ \ + module_cmds_GCJ \ + module_expsym_cmds_GCJ \ + lt_cv_prog_compiler_c_o_GCJ \ + exclude_expsyms_GCJ \ + include_expsyms_GCJ; do + + case $var in + old_archive_cmds_GCJ | \ + old_archive_from_new_cmds_GCJ | \ + archive_cmds_GCJ | \ + archive_expsym_cmds_GCJ | \ + module_cmds_GCJ | \ + module_expsym_cmds_GCJ | \ + old_archive_from_expsyms_cmds_GCJ | \ + export_symbols_cmds_GCJ | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_GCJ + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_compiler_GCJ + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_GCJ + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_GCJ + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_GCJ + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext='$shrext' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_GCJ +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ + +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_GCJ + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_GCJ +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_GCJ +archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_GCJ +module_expsym_cmds=$lt_module_expsym_cmds_GCJ + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_GCJ + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_GCJ + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_GCJ + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_GCJ + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_GCJ + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_GCJ + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_GCJ + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_GCJ + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_GCJ + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_GCJ + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_GCJ" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_GCJ + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_GCJ + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_GCJ + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_GCJ + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + else + tagname="" + fi + ;; + + RC) + + + +# Source file extension for RC test sources. +ac_ext=rc + +# Object file extension for compiled RC test sources. +objext=o +objext_RC=$objext + +# Code to be used in simple compile tests +lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' + +# Code to be used in simple link tests +lt_simple_link_test_code="$lt_simple_compile_test_code" + +# ltmain only uses $CC for tagged configurations so make sure $CC is set. + +# If no C compiler was specified, use CC. +LTCC=${LTCC-"$CC"} + +# Allow CC to be a program name with arguments. +compiler=$CC + + +# Allow CC to be a program name with arguments. +lt_save_CC="$CC" +CC=${RC-"windres"} +compiler=$CC +compiler_RC=$CC +lt_cv_prog_compiler_c_o_RC=yes + +# The else clause should only fire when bootstrapping the +# libtool distribution, otherwise you forgot to ship ltmain.sh +# with your package, and you will get complaints that there are +# no rules to generate ltmain.sh. +if test -f "$ltmain"; then + # See if we are running on zsh, and set the options which allow our commands through + # without removal of \ escapes. + if test -n "${ZSH_VERSION+set}" ; then + setopt NO_GLOB_SUBST + fi + # Now quote all the things that may contain metacharacters while being + # careful not to overquote the AC_SUBSTed values. We take copies of the + # variables and quote the copies for generation of the libtool script. + for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC NM \ + SED SHELL STRIP \ + libname_spec library_names_spec soname_spec extract_expsyms_cmds \ + old_striplib striplib file_magic_cmd finish_cmds finish_eval \ + deplibs_check_method reload_flag reload_cmds need_locks \ + lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ + lt_cv_sys_global_symbol_to_c_name_address \ + sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ + old_postinstall_cmds old_postuninstall_cmds \ + compiler_RC \ + CC_RC \ + LD_RC \ + lt_prog_compiler_wl_RC \ + lt_prog_compiler_pic_RC \ + lt_prog_compiler_static_RC \ + lt_prog_compiler_no_builtin_flag_RC \ + export_dynamic_flag_spec_RC \ + thread_safe_flag_spec_RC \ + whole_archive_flag_spec_RC \ + enable_shared_with_static_runtimes_RC \ + old_archive_cmds_RC \ + old_archive_from_new_cmds_RC \ + predep_objects_RC \ + postdep_objects_RC \ + predeps_RC \ + postdeps_RC \ + compiler_lib_search_path_RC \ + archive_cmds_RC \ + archive_expsym_cmds_RC \ + postinstall_cmds_RC \ + postuninstall_cmds_RC \ + old_archive_from_expsyms_cmds_RC \ + allow_undefined_flag_RC \ + no_undefined_flag_RC \ + export_symbols_cmds_RC \ + hardcode_libdir_flag_spec_RC \ + hardcode_libdir_flag_spec_ld_RC \ + hardcode_libdir_separator_RC \ + hardcode_automatic_RC \ + module_cmds_RC \ + module_expsym_cmds_RC \ + lt_cv_prog_compiler_c_o_RC \ + exclude_expsyms_RC \ + include_expsyms_RC; do + + case $var in + old_archive_cmds_RC | \ + old_archive_from_new_cmds_RC | \ + archive_cmds_RC | \ + archive_expsym_cmds_RC | \ + module_cmds_RC | \ + module_expsym_cmds_RC | \ + old_archive_from_expsyms_cmds_RC | \ + export_symbols_cmds_RC | \ + extract_expsyms_cmds | reload_cmds | finish_cmds | \ + postinstall_cmds | postuninstall_cmds | \ + old_postinstall_cmds | old_postuninstall_cmds | \ + sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) + # Double-quote double-evaled strings. + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" + ;; + *) + eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" + ;; + esac + done + + case $lt_echo in + *'\$0 --fallback-echo"') + lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` + ;; + esac + +cfgfile="$ofile" + + cat <<__EOF__ >> "$cfgfile" +# ### BEGIN LIBTOOL TAG CONFIG: $tagname + +# Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: + +# Shell to use when invoking shell scripts. +SHELL=$lt_SHELL + +# Whether or not to build shared libraries. +build_libtool_libs=$enable_shared + +# Whether or not to build static libraries. +build_old_libs=$enable_static + +# Whether or not to add -lc for building shared libraries. +build_libtool_need_lc=$archive_cmds_need_lc_RC + +# Whether or not to disallow shared libs when runtime libs are static +allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC + +# Whether or not to optimize for fast installation. +fast_install=$enable_fast_install + +# The host system. +host_alias=$host_alias +host=$host + +# An echo program that does not interpret backslashes. +echo=$lt_echo + +# The archiver. +AR=$lt_AR +AR_FLAGS=$lt_AR_FLAGS + +# A C compiler. +LTCC=$lt_LTCC + +# A language-specific compiler. +CC=$lt_compiler_RC + +# Is the compiler the GNU C compiler? +with_gcc=$GCC_RC + +# An ERE matcher. +EGREP=$lt_EGREP + +# The linker used to build libraries. +LD=$lt_LD_RC + +# Whether we need hard or soft links. +LN_S=$lt_LN_S + +# A BSD-compatible nm program. +NM=$lt_NM + +# A symbol stripping program +STRIP=$lt_STRIP + +# Used to examine libraries when file_magic_cmd begins "file" +MAGIC_CMD=$MAGIC_CMD + +# Used on cygwin: DLL creation program. +DLLTOOL="$DLLTOOL" + +# Used on cygwin: object dumper. +OBJDUMP="$OBJDUMP" + +# Used on cygwin: assembler. +AS="$AS" + +# The name of the directory that contains temporary libtool files. +objdir=$objdir + +# How to create reloadable object files. +reload_flag=$lt_reload_flag +reload_cmds=$lt_reload_cmds + +# How to pass a linker flag through the compiler. +wl=$lt_lt_prog_compiler_wl_RC + +# Object file suffix (normally "o"). +objext="$ac_objext" + +# Old archive suffix (normally "a"). +libext="$libext" + +# Shared library suffix (normally ".so"). +shrext='$shrext' + +# Executable file suffix (normally ""). +exeext="$exeext" + +# Additional compiler flags for building library objects. +pic_flag=$lt_lt_prog_compiler_pic_RC +pic_mode=$pic_mode + +# What is the maximum length of a command? +max_cmd_len=$lt_cv_sys_max_cmd_len + +# Does compiler simultaneously support -c and -o options? +compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC + +# Must we lock files when doing compilation ? +need_locks=$lt_need_locks + +# Do we need the lib prefix for modules? +need_lib_prefix=$need_lib_prefix + +# Do we need a version for libraries? +need_version=$need_version + +# Whether dlopen is supported. +dlopen_support=$enable_dlopen + +# Whether dlopen of programs is supported. +dlopen_self=$enable_dlopen_self + +# Whether dlopen of statically linked programs is supported. +dlopen_self_static=$enable_dlopen_self_static + +# Compiler flag to prevent dynamic linking. +link_static_flag=$lt_lt_prog_compiler_static_RC + +# Compiler flag to turn off builtin functions. +no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC + +# Compiler flag to allow reflexive dlopens. +export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC + +# Compiler flag to generate shared objects directly from archives. +whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC + +# Compiler flag to generate thread-safe objects. +thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC + +# Library versioning type. +version_type=$version_type + +# Format of library name prefix. +libname_spec=$lt_libname_spec + +# List of archive names. First name is the real one, the rest are links. +# The last name is the one that the linker finds with -lNAME. +library_names_spec=$lt_library_names_spec + +# The coded name of the library, if different from the real name. +soname_spec=$lt_soname_spec + +# Commands used to build and install an old-style archive. +RANLIB=$lt_RANLIB +old_archive_cmds=$lt_old_archive_cmds_RC +old_postinstall_cmds=$lt_old_postinstall_cmds +old_postuninstall_cmds=$lt_old_postuninstall_cmds + +# Create an old-style archive from a shared archive. +old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC + +# Create a temporary old-style archive to link instead of a shared archive. +old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC + +# Commands used to build and install a shared archive. +archive_cmds=$lt_archive_cmds_RC +archive_expsym_cmds=$lt_archive_expsym_cmds_RC +postinstall_cmds=$lt_postinstall_cmds +postuninstall_cmds=$lt_postuninstall_cmds + +# Commands used to build a loadable module (assumed same as above if empty) +module_cmds=$lt_module_cmds_RC +module_expsym_cmds=$lt_module_expsym_cmds_RC + +# Commands to strip libraries. +old_striplib=$lt_old_striplib +striplib=$lt_striplib + +# Dependencies to place before the objects being linked to create a +# shared library. +predep_objects=$lt_predep_objects_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdep_objects=$lt_postdep_objects_RC + +# Dependencies to place before the objects being linked to create a +# shared library. +predeps=$lt_predeps_RC + +# Dependencies to place after the objects being linked to create a +# shared library. +postdeps=$lt_postdeps_RC + +# The library search path used internally by the compiler when linking +# a shared library. +compiler_lib_search_path=$lt_compiler_lib_search_path_RC + +# Method to check whether dependent libraries are shared objects. +deplibs_check_method=$lt_deplibs_check_method + +# Command to use when deplibs_check_method == file_magic. +file_magic_cmd=$lt_file_magic_cmd + +# Flag that allows shared libraries with undefined symbols to be built. +allow_undefined_flag=$lt_allow_undefined_flag_RC + +# Flag that forces no undefined symbols. +no_undefined_flag=$lt_no_undefined_flag_RC + +# Commands used to finish a libtool library installation in a directory. +finish_cmds=$lt_finish_cmds + +# Same as above, but a single script fragment to be evaled but not shown. +finish_eval=$lt_finish_eval + +# Take the output of nm and produce a listing of raw symbols and C names. +global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe + +# Transform the output of nm in a proper C declaration +global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl + +# Transform the output of nm in a C name address pair +global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address + +# This is the shared library runtime path variable. +runpath_var=$runpath_var + +# This is the shared library path variable. +shlibpath_var=$shlibpath_var + +# Is shlibpath searched before the hard-coded library search path? +shlibpath_overrides_runpath=$shlibpath_overrides_runpath + +# How to hardcode a shared library path into an executable. +hardcode_action=$hardcode_action_RC + +# Whether we should hardcode library paths into libraries. +hardcode_into_libs=$hardcode_into_libs + +# Flag to hardcode \$libdir into a binary during linking. +# This must work even if \$libdir does not exist. +hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC + +# If ld is used when linking, flag to hardcode \$libdir into +# a binary during linking. This must work even if \$libdir does +# not exist. +hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC + +# Whether we need a single -rpath flag with a separated argument. +hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC + +# Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the +# resulting binary. +hardcode_direct=$hardcode_direct_RC + +# Set to yes if using the -LDIR flag during linking hardcodes DIR into the +# resulting binary. +hardcode_minus_L=$hardcode_minus_L_RC + +# Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into +# the resulting binary. +hardcode_shlibpath_var=$hardcode_shlibpath_var_RC + +# Set to yes if building a shared library automatically hardcodes DIR into the library +# and all subsequent libraries and executables linked against it. +hardcode_automatic=$hardcode_automatic_RC + +# Variables whose values should be saved in libtool wrapper scripts and +# restored at relink time. +variables_saved_for_relink="$variables_saved_for_relink" + +# Whether libtool must link a program against all its dependency libraries. +link_all_deplibs=$link_all_deplibs_RC + +# Compile-time system search path for libraries +sys_lib_search_path_spec=$lt_sys_lib_search_path_spec + +# Run-time system search path for libraries +sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec + +# Fix the shell variable \$srcfile for the compiler. +fix_srcfile_path="$fix_srcfile_path_RC" + +# Set to yes if exported symbols are required. +always_export_symbols=$always_export_symbols_RC + +# The commands to list exported symbols. +export_symbols_cmds=$lt_export_symbols_cmds_RC + +# The commands to extract the exported symbol list from a shared archive. +extract_expsyms_cmds=$lt_extract_expsyms_cmds + +# Symbols that should not be listed in the preloaded symbols. +exclude_expsyms=$lt_exclude_expsyms_RC + +# Symbols that must always be exported. +include_expsyms=$lt_include_expsyms_RC + +# ### END LIBTOOL TAG CONFIG: $tagname + +__EOF__ + + +else + # If there is no Makefile yet, we rely on a make rule to execute + # `config.status --recheck' to rerun these tests and create the + # libtool script then. + ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` + if test -f "$ltmain_in"; then + test -f Makefile && make "$ltmain" + fi +fi + + +ac_ext=c +ac_cpp='$CPP $CPPFLAGS' +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' +ac_compiler_gnu=$ac_cv_c_compiler_gnu + +CC="$lt_save_CC" + + ;; + + *) + { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 +echo "$as_me: error: Unsupported tag name: $tagname" >&2;} + { (exit 1); exit 1; }; } + ;; + esac + + # Append the new tag name to the list of available tags. + if test -n "$tagname" ; then + available_tags="$available_tags $tagname" + fi + fi + done + IFS="$lt_save_ifs" + + # Now substitute the updated list of available tags. + if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then + mv "${ofile}T" "$ofile" + chmod +x "$ofile" + else + rm -f "${ofile}T" + { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 +echo "$as_me: error: unable to update list of available tagged configurations." >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + +# This can be used to rebuild libtool when needed +LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" + +# Always use our own libtool. +LIBTOOL='$(SHELL) $(top_builddir)/libtool' + +# Prevent multiple expansion + + + + + + + + + + + + + + + + + + + + + +echo "$as_me:$LINENO: checking if we need -no-undefined" >&5 +echo $ECHO_N "checking if we need -no-undefined... $ECHO_C" >&6 +case $host in + *-*-cygwin | *-*-mingw* | *-*-pw32*) + need_no_undefined=yes + ;; + *) + need_no_undefined=no + ;; +esac +echo "$as_me:$LINENO: result: $need_no_undefined" >&5 +echo "${ECHO_T}$need_no_undefined" >&6 + + +if test x$need_no_undefined = xyes; then + NO_UNDEFINED_TRUE= + NO_UNDEFINED_FALSE='#' +else + NO_UNDEFINED_TRUE='#' + NO_UNDEFINED_FALSE= +fi + + +echo "$as_me:$LINENO: checking if we need -mimpure-text" >&5 +echo $ECHO_N "checking if we need -mimpure-text... $ECHO_C" >&6 +case $host in + *-*-solaris2*) + if test "$GCC" = "yes"; then + mimpure="yes" + fi + ;; + *) + mimpure=no + ;; +esac +echo "$as_me:$LINENO: result: $mimpure" >&5 +echo "${ECHO_T}$mimpure" >&6 + + +if test x$mimpure = xyes; then + MIMPURE_TRUE= + MIMPURE_FALSE='#' +else + MIMPURE_TRUE='#' + MIMPURE_FALSE= +fi + + +echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 +echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 +set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,:./+-,___p_,'` +if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.make <<\_ACEOF +all: + @echo 'ac_maketemp="$(MAKE)"' +_ACEOF +# GNU make sometimes prints "make[1]: Entering...", which would confuse us. +eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` +if test -n "$ac_maketemp"; then + eval ac_cv_prog_make_${ac_make}_set=yes +else + eval ac_cv_prog_make_${ac_make}_set=no +fi +rm -f conftest.make +fi +if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + SET_MAKE= +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + SET_MAKE="MAKE=${MAKE-make}" +fi + + +echo "$as_me:$LINENO: checking whether to support http" >&5 +echo $ECHO_N "checking whether to support http... $ECHO_C" >&6 +# Check whether --enable-http or --disable-http was given. +if test "${enable_http+set}" = set; then + enableval="$enable_http" + case "$enableval" in + no) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +cat >>confdefs.h <<\_ACEOF +#define CURL_DISABLE_HTTP 1 +_ACEOF + + { echo "$as_me:$LINENO: WARNING: disable HTTP disables FTP over proxy and GOPHER too" >&5 +echo "$as_me: WARNING: disable HTTP disables FTP over proxy and GOPHER too" >&2;} + +cat >>confdefs.h <<\_ACEOF +#define CURL_DISABLE_GOPHER 1 +_ACEOF + + + + ;; + *) echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + esac +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +fi; +echo "$as_me:$LINENO: checking whether to support ftp" >&5 +echo $ECHO_N "checking whether to support ftp... $ECHO_C" >&6 +# Check whether --enable-ftp or --disable-ftp was given. +if test "${enable_ftp+set}" = set; then + enableval="$enable_ftp" + case "$enableval" in + no) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +cat >>confdefs.h <<\_ACEOF +#define CURL_DISABLE_FTP 1 +_ACEOF + + + ;; + *) echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + esac +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +fi; +echo "$as_me:$LINENO: checking whether to support gopher" >&5 +echo $ECHO_N "checking whether to support gopher... $ECHO_C" >&6 +# Check whether --enable-gopher or --disable-gopher was given. +if test "${enable_gopher+set}" = set; then + enableval="$enable_gopher" + case "$enableval" in + no) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +cat >>confdefs.h <<\_ACEOF +#define CURL_DISABLE_GOPHER 1 +_ACEOF + + + ;; + *) echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + esac +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +fi; +echo "$as_me:$LINENO: checking whether to support file" >&5 +echo $ECHO_N "checking whether to support file... $ECHO_C" >&6 +# Check whether --enable-file or --disable-file was given. +if test "${enable_file+set}" = set; then + enableval="$enable_file" + case "$enableval" in + no) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +cat >>confdefs.h <<\_ACEOF +#define CURL_DISABLE_FILE 1 +_ACEOF + + + ;; + *) echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + esac +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +fi; +echo "$as_me:$LINENO: checking whether to support ldap" >&5 +echo $ECHO_N "checking whether to support ldap... $ECHO_C" >&6 +# Check whether --enable-ldap or --disable-ldap was given. +if test "${enable_ldap+set}" = set; then + enableval="$enable_ldap" + case "$enableval" in + no) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +cat >>confdefs.h <<\_ACEOF +#define CURL_DISABLE_LDAP 1 +_ACEOF + + + ;; + *) echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + esac +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +fi; +echo "$as_me:$LINENO: checking whether to support dict" >&5 +echo $ECHO_N "checking whether to support dict... $ECHO_C" >&6 +# Check whether --enable-dict or --disable-dict was given. +if test "${enable_dict+set}" = set; then + enableval="$enable_dict" + case "$enableval" in + no) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +cat >>confdefs.h <<\_ACEOF +#define CURL_DISABLE_DICT 1 +_ACEOF + + + ;; + *) echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + esac +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +fi; +echo "$as_me:$LINENO: checking whether to support telnet" >&5 +echo $ECHO_N "checking whether to support telnet... $ECHO_C" >&6 +# Check whether --enable-telnet or --disable-telnet was given. +if test "${enable_telnet+set}" = set; then + enableval="$enable_telnet" + case "$enableval" in + no) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +cat >>confdefs.h <<\_ACEOF +#define CURL_DISABLE_TELNET 1 +_ACEOF + + + ;; + *) echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + esac +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +fi; + + +echo "$as_me:$LINENO: checking whether to provide built-in manual" >&5 +echo $ECHO_N "checking whether to provide built-in manual... $ECHO_C" >&6 +# Check whether --enable-manual or --disable-manual was given. +if test "${enable_manual+set}" = set; then + enableval="$enable_manual" + case "$enableval" in + no) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + *) echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + USE_MANUAL="1" + ;; + esac +else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + USE_MANUAL="1" + +fi; + + + +echo "$as_me:$LINENO: checking for gethostbyname" >&5 +echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6 +if test "${ac_cv_func_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define gethostbyname to an innocuous variant, in case declares gethostbyname. + For example, HP-UX 11i declares gettimeofday. */ +#define gethostbyname innocuous_gethostbyname + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char gethostbyname (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef gethostbyname + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname) +choke me +#else +char (*f) () = gethostbyname; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != gethostbyname; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_gethostbyname=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6 +if test $ac_cv_func_gethostbyname = yes; then + HAVE_GETHOSTBYNAME="1" + +else + echo "$as_me:$LINENO: checking for gethostbyname in -lnsl" >&5 +echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6 +if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_nsl_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_nsl_gethostbyname=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6 +if test $ac_cv_lib_nsl_gethostbyname = yes; then + HAVE_GETHOSTBYNAME="1" + LIBS="$LIBS -lnsl" + +fi + + +fi + + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + echo "$as_me:$LINENO: checking for gethostbyname in -lsocket" >&5 +echo $ECHO_N "checking for gethostbyname in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_gethostbyname+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gethostbyname (); +int +main () +{ +gethostbyname (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_gethostbyname=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_socket_gethostbyname=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_gethostbyname" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_gethostbyname" >&6 +if test $ac_cv_lib_socket_gethostbyname = yes; then + HAVE_GETHOSTBYNAME="1" + LIBS="$LIBS -lsocket" + +fi + +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + echo "$as_me:$LINENO: checking trying gethostbyname with both nsl and socket libs" >&5 +echo $ECHO_N "checking trying gethostbyname with both nsl and socket libs... $ECHO_C" >&6 + my_ac_save_LIBS=$LIBS + LIBS="-lnsl -lsocket $LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +gethostbyname(); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + HAVE_GETHOSTBYNAME="1", + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + LIBS=$my_ac_save_LIBS + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + echo "$as_me:$LINENO: checking for gethostbyname in ws2_32" >&5 +echo $ECHO_N "checking for gethostbyname in ws2_32... $ECHO_C" >&6 + my_ac_save_LIBS=$LIBS + LIBS="-lws2_32 $LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +gethostbyname("www.dummysite.com"); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + HAVE_GETHOSTBYNAME="1" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS=$my_ac_save_LIBS + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +if test "$HAVE_GETHOSTBYNAME" = "1"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYNAME 1 +_ACEOF + +else + { { echo "$as_me:$LINENO: error: couldn't find libraries for gethostbyname()" >&5 +echo "$as_me: error: couldn't find libraries for gethostbyname()" >&2;} + { (exit 1); exit 1; }; } +fi + +echo "$as_me:$LINENO: checking for strcasecmp" >&5 +echo $ECHO_N "checking for strcasecmp... $ECHO_C" >&6 +if test "${ac_cv_func_strcasecmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define strcasecmp to an innocuous variant, in case declares strcasecmp. + For example, HP-UX 11i declares gettimeofday. */ +#define strcasecmp innocuous_strcasecmp + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char strcasecmp (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef strcasecmp + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strcasecmp (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_strcasecmp) || defined (__stub___strcasecmp) +choke me +#else +char (*f) () = strcasecmp; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != strcasecmp; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_strcasecmp=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_strcasecmp=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_strcasecmp" >&5 +echo "${ECHO_T}$ac_cv_func_strcasecmp" >&6 +if test $ac_cv_func_strcasecmp = yes; then + : +else + +echo "$as_me:$LINENO: checking for strcasecmp in -lresolve" >&5 +echo $ECHO_N "checking for strcasecmp in -lresolve... $ECHO_C" >&6 +if test "${ac_cv_lib_resolve_strcasecmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolve $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strcasecmp (); +int +main () +{ +strcasecmp (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_resolve_strcasecmp=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_resolve_strcasecmp=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_resolve_strcasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_resolve_strcasecmp" >&6 +if test $ac_cv_lib_resolve_strcasecmp = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRESOLVE 1 +_ACEOF + + LIBS="-lresolve $LIBS" + +fi + +fi + + +if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then + echo "$as_me:$LINENO: checking for strcasecmp in -lresolve" >&5 +echo $ECHO_N "checking for strcasecmp in -lresolve... $ECHO_C" >&6 +if test "${ac_cv_lib_resolve_strcasecmp+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolve -lnsl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char strcasecmp (); +int +main () +{ +strcasecmp (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_resolve_strcasecmp=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_resolve_strcasecmp=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_resolve_strcasecmp" >&5 +echo "${ECHO_T}$ac_cv_lib_resolve_strcasecmp" >&6 +if test $ac_cv_lib_resolve_strcasecmp = yes; then + LIBS="-lresolve $LIBS" +fi + +fi + +echo "$as_me:$LINENO: checking for connect" >&5 +echo $ECHO_N "checking for connect... $ECHO_C" >&6 +if test "${ac_cv_func_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define connect to an innocuous variant, in case declares connect. + For example, HP-UX 11i declares gettimeofday. */ +#define connect innocuous_connect + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char connect (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef connect + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_connect) || defined (__stub___connect) +choke me +#else +char (*f) () = connect; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != connect; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_connect=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_connect" >&5 +echo "${ECHO_T}$ac_cv_func_connect" >&6 +if test $ac_cv_func_connect = yes; then + : +else + +echo "$as_me:$LINENO: checking for connect in -lsocket" >&5 +echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6 +if test "${ac_cv_lib_socket_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lsocket $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char connect (); +int +main () +{ +connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_socket_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_socket_connect=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_socket_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6 +if test $ac_cv_lib_socket_connect = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSOCKET 1 +_ACEOF + + LIBS="-lsocket $LIBS" + +fi + +fi + + +echo "$as_me:$LINENO: checking for dlclose" >&5 +echo $ECHO_N "checking for dlclose... $ECHO_C" >&6 +if test "${ac_cv_func_dlclose+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define dlclose to an innocuous variant, in case declares dlclose. + For example, HP-UX 11i declares gettimeofday. */ +#define dlclose innocuous_dlclose + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char dlclose (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef dlclose + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlclose (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_dlclose) || defined (__stub___dlclose) +choke me +#else +char (*f) () = dlclose; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != dlclose; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_dlclose=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_dlclose=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_dlclose" >&5 +echo "${ECHO_T}$ac_cv_func_dlclose" >&6 +if test $ac_cv_func_dlclose = yes; then + : +else + +echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 +echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6 +if test "${ac_cv_lib_dl_dlopen+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char dlopen (); +int +main () +{ +dlopen (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_dl_dlopen=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_dl_dlopen=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 +echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6 +if test $ac_cv_lib_dl_dlopen = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBDL 1 +_ACEOF + + LIBS="-ldl $LIBS" + +fi + +fi + + +echo "$as_me:$LINENO: checking whether to use libgcc" >&5 +echo $ECHO_N "checking whether to use libgcc... $ECHO_C" >&6 +# Check whether --enable-libgcc or --disable-libgcc was given. +if test "${enable_libgcc+set}" = set; then + enableval="$enable_libgcc" + case "$enableval" in + yes) + LIBS="$LIBS -lgcc" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; + *) echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + esac +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi; + + +echo "$as_me:$LINENO: checking for timeGetTime in winmm" >&5 +echo $ECHO_N "checking for timeGetTime in winmm... $ECHO_C" >&6 +my_ac_save_LIBS=$LIBS +LIBS="-lwinmm $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include + +int +main () +{ +timeGetTime(); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS=$my_ac_save_LIBS + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + +echo "$as_me:$LINENO: checking whether to enable ipv6" >&5 +echo $ECHO_N "checking whether to enable ipv6... $ECHO_C" >&6 +# Check whether --enable-ipv6 or --disable-ipv6 was given. +if test "${enable_ipv6+set}" = set; then + enableval="$enable_ipv6" + case "$enableval" in + no) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ipv6=no + ;; + *) echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ipv6=yes + ;; + esac +else + if test "$cross_compiling" = yes; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ipv6=no + +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + /* is AF_INET6 available? */ +#include +#include +main() +{ + if (socket(AF_INET6, SOCK_STREAM, 0) < 0) + exit(1); + else + exit(0); +} + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ipv6=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ipv6=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi; + +if test "$ipv6" = "yes"; then + + echo "$as_me:$LINENO: checking for working getaddrinfo" >&5 +echo $ECHO_N "checking for working getaddrinfo... $ECHO_C" >&6 +if test "${ac_cv_working_getaddrinfo+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + if test "$cross_compiling" = yes; then + + ac_cv_working_getaddrinfo="yes" + +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include + +void main(void) { + struct addrinfo hints, *ai; + int error; + + memset(&hints, 0, sizeof(hints)); + hints.ai_family = AF_UNSPEC; + hints.ai_socktype = SOCK_STREAM; + error = getaddrinfo("127.0.0.1", "8080", &hints, &ai); + if (error) { + exit(1); + } + else { + exit(0); + } +} + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + ac_cv_working_getaddrinfo="yes" + +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) + + ac_cv_working_getaddrinfo="no" + +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_working_getaddrinfo" >&5 +echo "${ECHO_T}$ac_cv_working_getaddrinfo" >&6 +if test "$ac_cv_working_getaddrinfo" = "yes"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETADDRINFO 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define ENABLE_IPV6 1 +_ACEOF + + + IPV6_ENABLED=1 + +fi + +fi + +# Check whether --enable-nonblocking or --disable-nonblocking was given. +if test "${enable_nonblocking+set}" = set; then + enableval="$enable_nonblocking" + + if test "$enableval" = "no" ; then + { echo "$as_me:$LINENO: WARNING: non-blocking sockets disabled" >&5 +echo "$as_me: WARNING: non-blocking sockets disabled" >&2;} + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DISABLED_NONBLOCKING 1 +_ACEOF + + else + + echo "$as_me:$LINENO: checking non-blocking sockets style" >&5 +echo $ECHO_N "checking non-blocking sockets style... $ECHO_C" >&6 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* headers for O_NONBLOCK test */ +#include +#include +#include + +int +main () +{ + +/* try to compile O_NONBLOCK */ + +#if defined(sun) || defined(__sun__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) +# if defined(__SVR4) || defined(__srv4__) +# define PLATFORM_SOLARIS +# else +# define PLATFORM_SUNOS4 +# endif +#endif +#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX4) +# define PLATFORM_AIX_V3 +#endif + +#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__) +#error "O_NONBLOCK does not work on this platform" +#endif + int socket; + int flags = fcntl(socket, F_SETFL, flags | O_NONBLOCK); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +nonblock="O_NONBLOCK" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_O_NONBLOCK 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* headers for FIONBIO test */ +#include +#include + +int +main () +{ + +/* FIONBIO source test (old-style unix) */ + int socket; + int flags = ioctl(socket, FIONBIO, &flags); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +nonblock="FIONBIO" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FIONBIO 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* headers for ioctlsocket test (cygwin?) */ +#include + +int +main () +{ + +/* ioctlsocket source code */ + int socket; + int flags = ioctlsocket(socket, FIONBIO, &flags); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +nonblock="ioctlsocket" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_IOCTLSOCKET 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* headers for IoctlSocket test (Amiga?) */ +#include + +int +main () +{ + +/* IoctlSocket source code */ + int socket; + int flags = IoctlSocket(socket, FIONBIO, (long)1); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +nonblock="IoctlSocket" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_IOCTLSOCKET_CASE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* headers for SO_NONBLOCK test (BeOS) */ +#include +#include +#include + +int +main () +{ + +/* SO_NONBLOCK source code */ + long b = 1; + int socket; + int flags = setsockopt(socket, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b)); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +nonblock="SO_NONBLOCK" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SO_NONBLOCK 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +nonblock="nada" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DISABLED_NONBLOCKING 1 +_ACEOF + + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: result: $nonblock" >&5 +echo "${ECHO_T}$nonblock" >&6 + + if test "$nonblock" = "nada"; then + { echo "$as_me:$LINENO: WARNING: non-block sockets disabled" >&5 +echo "$as_me: WARNING: non-block sockets disabled" >&2;} + fi + + fi + +else + + + echo "$as_me:$LINENO: checking non-blocking sockets style" >&5 +echo $ECHO_N "checking non-blocking sockets style... $ECHO_C" >&6 + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* headers for O_NONBLOCK test */ +#include +#include +#include + +int +main () +{ + +/* try to compile O_NONBLOCK */ + +#if defined(sun) || defined(__sun__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) +# if defined(__SVR4) || defined(__srv4__) +# define PLATFORM_SOLARIS +# else +# define PLATFORM_SUNOS4 +# endif +#endif +#if (defined(_AIX) || defined(__xlC__)) && !defined(_AIX4) +# define PLATFORM_AIX_V3 +#endif + +#if defined(PLATFORM_SUNOS4) || defined(PLATFORM_AIX_V3) || defined(__BEOS__) +#error "O_NONBLOCK does not work on this platform" +#endif + int socket; + int flags = fcntl(socket, F_SETFL, flags | O_NONBLOCK); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +nonblock="O_NONBLOCK" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_O_NONBLOCK 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* headers for FIONBIO test */ +#include +#include + +int +main () +{ + +/* FIONBIO source test (old-style unix) */ + int socket; + int flags = ioctl(socket, FIONBIO, &flags); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +nonblock="FIONBIO" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_FIONBIO 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* headers for ioctlsocket test (cygwin?) */ +#include + +int +main () +{ + +/* ioctlsocket source code */ + int socket; + int flags = ioctlsocket(socket, FIONBIO, &flags); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +nonblock="ioctlsocket" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_IOCTLSOCKET 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* headers for IoctlSocket test (Amiga?) */ +#include + +int +main () +{ + +/* IoctlSocket source code */ + int socket; + int flags = IoctlSocket(socket, FIONBIO, (long)1); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +nonblock="IoctlSocket" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_IOCTLSOCKET_CASE 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* headers for SO_NONBLOCK test (BeOS) */ +#include +#include +#include + +int +main () +{ + +/* SO_NONBLOCK source code */ + long b = 1; + int socket; + int flags = setsockopt(socket, SOL_SOCKET, SO_NONBLOCK, &b, sizeof(b)); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + +nonblock="SO_NONBLOCK" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SO_NONBLOCK 1 +_ACEOF + + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + +nonblock="nada" + +cat >>confdefs.h <<\_ACEOF +#define HAVE_DISABLED_NONBLOCKING 1 +_ACEOF + + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + echo "$as_me:$LINENO: result: $nonblock" >&5 +echo "${ECHO_T}$nonblock" >&6 + + if test "$nonblock" = "nada"; then + { echo "$as_me:$LINENO: WARNING: non-block sockets disabled" >&5 +echo "$as_me: WARNING: non-block sockets disabled" >&2;} + fi + + +fi; + + + +# Check whether --with-egd-socket or --without-egd-socket was given. +if test "${with_egd_socket+set}" = set; then + withval="$with_egd_socket" + EGD_SOCKET="$withval" + +fi; +if test -n "$EGD_SOCKET" ; then + +cat >>confdefs.h <<_ACEOF +#define EGD_SOCKET "$EGD_SOCKET" +_ACEOF + +fi + + +# Check whether --with-random or --without-random was given. +if test "${with_random+set}" = set; then + withval="$with_random" + RANDOM_FILE="$withval" +else + + echo "$as_me:$LINENO: checking for \"/dev/urandom\"" >&5 +echo $ECHO_N "checking for \"/dev/urandom\"... $ECHO_C" >&6 +if test "${ac_cv_file___dev_urandom_+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + test "$cross_compiling" = yes && + { { echo "$as_me:$LINENO: error: cannot check for file existence when cross compiling" >&5 +echo "$as_me: error: cannot check for file existence when cross compiling" >&2;} + { (exit 1); exit 1; }; } +if test -r ""/dev/urandom""; then + ac_cv_file___dev_urandom_=yes +else + ac_cv_file___dev_urandom_=no +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_file___dev_urandom_" >&5 +echo "${ECHO_T}$ac_cv_file___dev_urandom_" >&6 +if test $ac_cv_file___dev_urandom_ = yes; then + RANDOM_FILE="/dev/urandom" +fi + + + +fi; +if test -n "$RANDOM_FILE" ; then + + +cat >>confdefs.h <<_ACEOF +#define RANDOM_FILE "$RANDOM_FILE" +_ACEOF + +fi + + +echo "$as_me:$LINENO: checking if argv can be written to" >&5 +echo $ECHO_N "checking if argv can be written to... $ECHO_C" >&6 +if test "${curl_cv_writable_argv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + +if test "$cross_compiling" = yes; then + curl_cv_writable_argv=cross +else + cat >conftest.$ac_ext <<_ACEOF + +int main(int argc, char ** argv) { + argv[0][0] = ' '; + return (argv[0][0] == ' ')?0:1; +} + +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + curl_cv_writable_argv=yes +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +curl_cv_writable_argv=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi + +fi + +case $curl_cv_writable_argv in +yes) + +cat >>confdefs.h <<\_ACEOF +#define HAVE_WRITABLE_ARGV 1 +_ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + ;; +no) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; +*) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { echo "$as_me:$LINENO: WARNING: the previous check could not be made default was used" >&5 +echo "$as_me: WARNING: the previous check could not be made default was used" >&2;} + ;; +esac + + + +# Check whether --with-krb4-includes or --without-krb4-includes was given. +if test "${with_krb4_includes+set}" = set; then + withval="$with_krb4_includes" + + CPPFLAGS="$CPPFLAGS -I$withval" + KRB4INC="$withval" + want_krb4=yes + +fi; + + +# Check whether --with-krb4-libs or --without-krb4-libs was given. +if test "${with_krb4_libs+set}" = set; then + withval="$with_krb4_libs" + + LDFLAGS="$LDFLAGS -L$withval" + KRB4LIB="$withval" + want_krb4=yes + +fi; + + +OPT_KRB4=off + +# Check whether --with-krb4 or --without-krb4 was given. +if test "${with_krb4+set}" = set; then + withval="$with_krb4" + + OPT_KRB4="$withval" + if test X"$OPT_KRB4" != Xyes + then + LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib$libsuff" + KRB4LIB="$OPT_KRB4/lib$libsuff" + CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include" + KRB4INC="$OPT_KRB4/include" + fi + want_krb4="yes" + +fi; + +echo "$as_me:$LINENO: checking if Kerberos4 support is requested" >&5 +echo $ECHO_N "checking if Kerberos4 support is requested... $ECHO_C" >&6 + +if test "$want_krb4" = yes +then + if test "$ipv6" = "yes"; then + echo krb4 is not compatible with IPv6 + exit 1 + fi + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + + echo "$as_me:$LINENO: checking where to look for Kerberos4" >&5 +echo $ECHO_N "checking where to look for Kerberos4... $ECHO_C" >&6 + if test X"$OPT_KRB4" = Xyes + then + echo "$as_me:$LINENO: result: defaults" >&5 +echo "${ECHO_T}defaults" >&6 + else + echo "$as_me:$LINENO: result: libs in $KRB4LIB, headers in $KRB4INC" >&5 +echo "${ECHO_T}libs in $KRB4LIB, headers in $KRB4INC" >&6 + fi + + echo "$as_me:$LINENO: checking for des_pcbc_encrypt in -ldes" >&5 +echo $ECHO_N "checking for des_pcbc_encrypt in -ldes... $ECHO_C" >&6 +if test "${ac_cv_lib_des_des_pcbc_encrypt+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-ldes $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char des_pcbc_encrypt (); +int +main () +{ +des_pcbc_encrypt (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_des_des_pcbc_encrypt=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_des_des_pcbc_encrypt=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_des_des_pcbc_encrypt" >&5 +echo "${ECHO_T}$ac_cv_lib_des_des_pcbc_encrypt" >&6 +if test $ac_cv_lib_des_des_pcbc_encrypt = yes; then + + +for ac_header in des.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to curl-bug@haxx.se ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + echo "$as_me:$LINENO: checking for res_search" >&5 +echo $ECHO_N "checking for res_search... $ECHO_C" >&6 +if test "${ac_cv_func_res_search+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define res_search to an innocuous variant, in case declares res_search. + For example, HP-UX 11i declares gettimeofday. */ +#define res_search innocuous_res_search + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char res_search (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef res_search + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char res_search (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_res_search) || defined (__stub___res_search) +choke me +#else +char (*f) () = res_search; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != res_search; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_res_search=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_res_search=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_res_search" >&5 +echo "${ECHO_T}$ac_cv_func_res_search" >&6 +if test $ac_cv_func_res_search = yes; then + : +else + +echo "$as_me:$LINENO: checking for res_search in -lresolv" >&5 +echo $ECHO_N "checking for res_search in -lresolv... $ECHO_C" >&6 +if test "${ac_cv_lib_resolv_res_search+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lresolv $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char res_search (); +int +main () +{ +res_search (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_resolv_res_search=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_resolv_res_search=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_resolv_res_search" >&5 +echo "${ECHO_T}$ac_cv_lib_resolv_res_search" >&6 +if test $ac_cv_lib_resolv_res_search = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBRESOLV 1 +_ACEOF + + LIBS="-lresolv $LIBS" + +fi + +fi + + + echo "$as_me:$LINENO: checking for krb_net_read in -lkrb" >&5 +echo $ECHO_N "checking for krb_net_read in -lkrb... $ECHO_C" >&6 +if test "${ac_cv_lib_krb_krb_net_read+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lkrb $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char krb_net_read (); +int +main () +{ +krb_net_read (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_krb_krb_net_read=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_krb_krb_net_read=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_krb_krb_net_read" >&5 +echo "${ECHO_T}$ac_cv_lib_krb_krb_net_read" >&6 +if test $ac_cv_lib_krb_krb_net_read = yes; then + + +for ac_header in krb.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to curl-bug@haxx.se ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + + LIBS="-lkrb -ldes $LIBS" + + +for ac_func in krb_get_our_ip_for_realm +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_KRB4 1 +_ACEOF + + + KRB4_ENABLED=1 + + + +for ac_func in strlcpy +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + +fi + + +fi + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + +# Check whether --with-spnego or --without-spnego was given. +if test "${with_spnego+set}" = set; then + withval="$with_spnego" + SPNEGO_ROOT="$withval" + want_spnego="yes" + +fi; +echo "$as_me:$LINENO: checking if SPNEGO support is requested" >&5 +echo $ECHO_N "checking if SPNEGO support is requested... $ECHO_C" >&6 +if test x"$want_spnego" = xyes; then + + if test X"$SPNEGO_ROOT" = Xyes; then + { { echo "$as_me:$LINENO: error: FBOpenSSL libs and/or directories were not found where specified!" >&5 +echo "$as_me: error: FBOpenSSL libs and/or directories were not found where specified!" >&2;} + { (exit 1); exit 1; }; } + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + else + if test -z "$SPNEGO_LIB_DIR"; then + LDFLAGS="$LDFLAGS -L$SPNEGO_ROOT -lfbopenssl" + else + LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR" + fi + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SPNEGO 1 +_ACEOF + + fi +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + +# Check whether --with-gssapi-includes or --without-gssapi-includes was given. +if test "${with_gssapi_includes+set}" = set; then + withval="$with_gssapi_includes" + GSSAPI_INCS="-I$withval" + want_gss="yes" + +fi; + + +# Check whether --with-gssapi-libs or --without-gssapi-libs was given. +if test "${with_gssapi_libs+set}" = set; then + withval="$with_gssapi_libs" + GSSAPI_LIBS="-L$withval -lgssapi" + want_gss="yes" + +fi; + + +# Check whether --with-gssapi or --without-gssapi was given. +if test "${with_gssapi+set}" = set; then + withval="$with_gssapi" + GSSAPI_ROOT="$withval" + want_gss="yes" + +fi; + +echo "$as_me:$LINENO: checking if GSSAPI support is requested" >&5 +echo $ECHO_N "checking if GSSAPI support is requested... $ECHO_C" >&6 +if test x"$want_gss" = xyes; then + if test -z "$GSSAPI_INCS"; then + if test -f "$GSSAPI_ROOT/bin/krb5-config"; then + GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi` + else + GSSAPI_INCS="-I$GSSAPI_ROOT/include" + fi + fi + CPPFLAGS="$CPPFLAGS $GSSAPI_INCS" + + if test -z "$GSSAPI_LIB_DIR"; then + if test -f "$GSSAPI_ROOT/bin/krb5-config"; then + gss_ldflags=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi` + LDFLAGS="$LDFLAGS $gss_ldflags" + else + LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff -lgssapi" + fi + else + LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" + fi + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GSSAPI 1 +_ACEOF + + + if test -n "$GSSAPI_INCS"; then + # cut off the preceding -I from the include path + GSSAPI_INCS=`echo $GSSAPI_INCS | sed -e s/^-I//g` + fi + + if test -f "$GSSAPI_INCS/gssapi.h"; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GSSHEIMDAL 1 +_ACEOF + + else + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GSSMIT 1 +_ACEOF + + fi + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + +# Extract the first word of "pkg-config", so it can be a program name with args. +set dummy pkg-config; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PKGCONFIG+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PKGCONFIG in + [\\/]* | ?:[\\/]*) + ac_cv_path_PKGCONFIG="$PKGCONFIG" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin:/usr/local/bin" +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PKGCONFIG="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_path_PKGCONFIG" && ac_cv_path_PKGCONFIG="no" + ;; +esac +fi +PKGCONFIG=$ac_cv_path_PKGCONFIG + +if test -n "$PKGCONFIG"; then + echo "$as_me:$LINENO: result: $PKGCONFIG" >&5 +echo "${ECHO_T}$PKGCONFIG" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + +if test "$PKGCONFIG" != "no" ; then + echo "$as_me:$LINENO: checking for OpenSSL options using pkg-config" >&5 +echo $ECHO_N "checking for OpenSSL options using pkg-config... $ECHO_C" >&6 + + $PKGCONFIG --exists openssl + SSL_EXISTS=$? + + if test "$SSL_EXISTS" -eq "0"; then + SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null` + SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null` + SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null` + + LIBS="$LIBS $SSL_LIBS" + CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS" + LDFLAGS="$LDFLAGS $SSL_LDFLAGS" + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + fi + +fi + + +OPT_SSL=off +ca="no" + +# Check whether --with-ssl or --without-ssl was given. +if test "${with_ssl+set}" = set; then + withval="$with_ssl" + OPT_SSL=$withval +fi; + +if test X"$OPT_SSL" = Xno +then + { echo "$as_me:$LINENO: WARNING: SSL/https support disabled" >&5 +echo "$as_me: WARNING: SSL/https support disabled" >&2;} +else + + + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + + case "$OPT_SSL" in + yes) + EXTRA_SSL=/usr/local/ssl ;; + off) + EXTRA_SSL= ;; + *) + EXTRA_SSL=$OPT_SSL + LDFLAGS="$LDFLAGS -L$EXTRA_SSL/lib$libsuff" + CPPFLAGS="$CPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include" + ;; + esac + + echo "$as_me:$LINENO: checking for CRYPTO_lock in -lcrypto" >&5 +echo $ECHO_N "checking for CRYPTO_lock in -lcrypto... $ECHO_C" >&6 +if test "${ac_cv_lib_crypto_CRYPTO_lock+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char CRYPTO_lock (); +int +main () +{ +CRYPTO_lock (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_crypto_CRYPTO_lock=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_crypto_CRYPTO_lock=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_lock" >&5 +echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_lock" >&6 +if test $ac_cv_lib_crypto_CRYPTO_lock = yes; then + + HAVECRYPTO="yes" + +else + + OLDLDFLAGS="$LDFLAGS" + OLDCPPFLAGS="$CPPFLAGS" + LDFLAGS="$CLEANLDFLAGS -L$EXTRA_SSL/lib$libsuff" + CPPFLAGS="$CLEANCPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include" + echo "$as_me:$LINENO: checking for CRYPTO_add_lock in -lcrypto" >&5 +echo $ECHO_N "checking for CRYPTO_add_lock in -lcrypto... $ECHO_C" >&6 +if test "${ac_cv_lib_crypto_CRYPTO_add_lock+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char CRYPTO_add_lock (); +int +main () +{ +CRYPTO_add_lock (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_crypto_CRYPTO_add_lock=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_crypto_CRYPTO_add_lock=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_add_lock" >&5 +echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_add_lock" >&6 +if test $ac_cv_lib_crypto_CRYPTO_add_lock = yes; then + + HAVECRYPTO="yes" +else + + LDFLAGS="$OLDLDFLAGS" + CPPFLAGS="$OLDCPPFLAGS" + +fi + + +fi + + + + if test "$HAVECRYPTO" = "yes"; then + + echo "$as_me:$LINENO: checking for gdi32" >&5 +echo $ECHO_N "checking for gdi32... $ECHO_C" >&6 + my_ac_save_LIBS=$LIBS + LIBS="-lgdi32 $LIBS" + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + #include +int +main () +{ +GdiFlush(); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + LIBS=$my_ac_save_LIBS + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + +echo "$as_me:$LINENO: checking for CRYPTO_add_lock in -lcrypto" >&5 +echo $ECHO_N "checking for CRYPTO_add_lock in -lcrypto... $ECHO_C" >&6 +if test "${ac_cv_lib_crypto_CRYPTO_add_lock+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lcrypto $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char CRYPTO_add_lock (); +int +main () +{ +CRYPTO_add_lock (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_crypto_CRYPTO_add_lock=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_crypto_CRYPTO_add_lock=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_crypto_CRYPTO_add_lock" >&5 +echo "${ECHO_T}$ac_cv_lib_crypto_CRYPTO_add_lock" >&6 +if test $ac_cv_lib_crypto_CRYPTO_add_lock = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBCRYPTO 1 +_ACEOF + + LIBS="-lcrypto $LIBS" + +fi + + +echo "$as_me:$LINENO: checking for SSL_connect in -lssl" >&5 +echo $ECHO_N "checking for SSL_connect in -lssl... $ECHO_C" >&6 +if test "${ac_cv_lib_ssl_SSL_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char SSL_connect (); +int +main () +{ +SSL_connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ssl_SSL_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ssl_SSL_connect=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_ssl_SSL_connect" >&6 +if test $ac_cv_lib_ssl_SSL_connect = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSSL 1 +_ACEOF + + LIBS="-lssl $LIBS" + +fi + + + if test "$ac_cv_lib_ssl_SSL_connect" != yes; then + echo "$as_me:$LINENO: checking for ssl with RSAglue/rsaref libs in use" >&5 +echo $ECHO_N "checking for ssl with RSAglue/rsaref libs in use... $ECHO_C" >&6; + OLIBS=$LIBS + LIBS="$LIBS -lRSAglue -lrsaref" + +echo "$as_me:$LINENO: checking for SSL_connect in -lssl" >&5 +echo $ECHO_N "checking for SSL_connect in -lssl... $ECHO_C" >&6 +if test "${ac_cv_lib_ssl_SSL_connect+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lssl $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char SSL_connect (); +int +main () +{ +SSL_connect (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_ssl_SSL_connect=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_ssl_SSL_connect=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_ssl_SSL_connect" >&5 +echo "${ECHO_T}$ac_cv_lib_ssl_SSL_connect" >&6 +if test $ac_cv_lib_ssl_SSL_connect = yes; then + cat >>confdefs.h <<_ACEOF +#define HAVE_LIBSSL 1 +_ACEOF + + LIBS="-lssl $LIBS" + +fi + + if test "$ac_cv_lib_ssl_SSL_connect" != yes; then + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + LIBS=$OLIBS + else + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + fi + fi + + + + + + + + +for ac_header in openssl/x509.h openssl/rsa.h openssl/crypto.h \ + openssl/pem.h openssl/ssl.h openssl/err.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to curl-bug@haxx.se ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + OPENSSL_ENABLED=1 +fi + +done + + + if test $ac_cv_header_openssl_x509_h = no; then + + + + + + +for ac_header in x509.h rsa.h crypto.h pem.h ssl.h err.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to curl-bug@haxx.se ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + OPENSSL_ENABLED=1 +fi + +done + + fi + + echo "$as_me:$LINENO: checking for ENGINE_init" >&5 +echo $ECHO_N "checking for ENGINE_init... $ECHO_C" >&6 +if test "${ac_cv_func_ENGINE_init+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define ENGINE_init to an innocuous variant, in case declares ENGINE_init. + For example, HP-UX 11i declares gettimeofday. */ +#define ENGINE_init innocuous_ENGINE_init + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char ENGINE_init (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef ENGINE_init + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char ENGINE_init (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_ENGINE_init) || defined (__stub___ENGINE_init) +choke me +#else +char (*f) () = ENGINE_init; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != ENGINE_init; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_ENGINE_init=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_func_ENGINE_init=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_func_ENGINE_init" >&5 +echo "${ECHO_T}$ac_cv_func_ENGINE_init" >&6 +if test $ac_cv_func_ENGINE_init = yes; then + +for ac_header in openssl/engine.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to curl-bug@haxx.se ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +fi + + + + + echo "$as_me:$LINENO: checking CA cert bundle install path" >&5 +echo $ECHO_N "checking CA cert bundle install path... $ECHO_C" >&6 + + +# Check whether --with-ca-bundle or --without-ca-bundle was given. +if test "${with_ca_bundle+set}" = set; then + withval="$with_ca_bundle" + ca="$withval" +else + + if test "x$prefix" != xNONE; then + ca="\${prefix}/share/curl/curl-ca-bundle.crt" + else + ca="$ac_default_prefix/share/curl/curl-ca-bundle.crt" + fi + +fi; + + if test X"$OPT_SSL" = Xno; then + ca="no" + fi + + if test "x$ca" != "xno"; then + CURL_CA_BUNDLE='"'$ca'"' + + fi + echo "$as_me:$LINENO: result: $ca" >&5 +echo "${ECHO_T}$ca" >&6 + + + + + + +for ac_func in RAND_status \ + RAND_screen \ + RAND_egd \ + CRYPTO_cleanup_all_ex_data +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + + fi + + if test X"$OPT_SSL" != Xoff && + test "$OPENSSL_ENABLED" != "1"; then + { { echo "$as_me:$LINENO: error: OpenSSL libs and/or directories were not found where specified!" >&5 +echo "$as_me: error: OpenSSL libs and/or directories were not found where specified!" >&2;} + { (exit 1); exit 1; }; } + fi + +fi + + + +if test x$ca != xno; then + CABUNDLE_TRUE= + CABUNDLE_FALSE='#' +else + CABUNDLE_TRUE='#' + CABUNDLE_FALSE= +fi + + + + +_cppflags=$CPPFLAGS +_ldflags=$LDFLAGS +OPT_ZLIB="/usr/local" + +# Check whether --with-zlib or --without-zlib was given. +if test "${with_zlib+set}" = set; then + withval="$with_zlib" + OPT_ZLIB="$withval" +fi; + +case "$OPT_ZLIB" in + no) + { echo "$as_me:$LINENO: WARNING: zlib disabled" >&5 +echo "$as_me: WARNING: zlib disabled" >&2;} ;; + *) + + echo "$as_me:$LINENO: checking for inflateEnd in -lz" >&5 +echo $ECHO_N "checking for inflateEnd in -lz... $ECHO_C" >&6 +if test "${ac_cv_lib_z_inflateEnd+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char inflateEnd (); +int +main () +{ +inflateEnd (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_z_inflateEnd=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_z_inflateEnd=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_z_inflateEnd" >&5 +echo "${ECHO_T}$ac_cv_lib_z_inflateEnd" >&6 +if test $ac_cv_lib_z_inflateEnd = yes; then + HAVE_LIBZ="1" +else + if test -d "$OPT_ZLIB"; then + CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include" + LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff" + fi +fi + + + if test "${ac_cv_header_zlib_h+set}" = set; then + echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_zlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking zlib.h usability" >&5 +echo $ECHO_N "checking zlib.h usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking zlib.h presence" >&5 +echo $ECHO_N "checking zlib.h presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: zlib.h: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: zlib.h: present but cannot be compiled" >&5 +echo "$as_me: WARNING: zlib.h: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: zlib.h: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: zlib.h: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: zlib.h: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: zlib.h: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: zlib.h: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: zlib.h: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to curl-bug@haxx.se ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for zlib.h" >&5 +echo $ECHO_N "checking for zlib.h... $ECHO_C" >&6 +if test "${ac_cv_header_zlib_h+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_cv_header_zlib_h=$ac_header_preproc +fi +echo "$as_me:$LINENO: result: $ac_cv_header_zlib_h" >&5 +echo "${ECHO_T}$ac_cv_header_zlib_h" >&6 + +fi +if test $ac_cv_header_zlib_h = yes; then + + HAVE_ZLIB_H="1" + if test "$HAVE_LIBZ" != "1"; then + echo "$as_me:$LINENO: checking for gzread in -lz" >&5 +echo $ECHO_N "checking for gzread in -lz... $ECHO_C" >&6 +if test "${ac_cv_lib_z_gzread+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + ac_check_lib_save_LIBS=$LIBS +LIBS="-lz $LIBS" +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char gzread (); +int +main () +{ +gzread (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_lib_z_gzread=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_lib_z_gzread=no +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +LIBS=$ac_check_lib_save_LIBS +fi +echo "$as_me:$LINENO: result: $ac_cv_lib_z_gzread" >&5 +echo "${ECHO_T}$ac_cv_lib_z_gzread" >&6 +if test $ac_cv_lib_z_gzread = yes; then + + HAVE_LIBZ="1" + +else + CPPFLAGS=$_cppflags + LDFLAGS=$_ldflags +fi + + fi + +else + + CPPFLAGS=$_cppflags + LDFLAGS=$_ldflags + +fi + + + + if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1" + then + { echo "$as_me:$LINENO: WARNING: configure found only the libz lib, not the header file!" >&5 +echo "$as_me: WARNING: configure found only the libz lib, not the header file!" >&2;} + elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1" + then + { echo "$as_me:$LINENO: WARNING: configure found only the libz header file, not the lib!" >&5 +echo "$as_me: WARNING: configure found only the libz header file, not the lib!" >&2;} + elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1" + then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_ZLIB_H 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LIBZ 1 +_ACEOF + + + LIBS="$LIBS -lz" + + AMFIXLIB="1" + { echo "$as_me:$LINENO: found both libz and libz.h header" >&5 +echo "$as_me: found both libz and libz.h header" >&6;} + fi + ;; +esac + + + +if test x"$AMFIXLIB" = x1; then + HAVE_LIBZ_TRUE= + HAVE_LIBZ_FALSE='#' +else + HAVE_LIBZ_TRUE='#' + HAVE_LIBZ_FALSE= +fi + + +OPT_THREAD=on + +echo "$as_me:$LINENO: checking AIX 4.3 or later" >&5 +echo $ECHO_N "checking AIX 4.3 or later... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF + +#if defined(_AIX) && defined(_AIX43) +printf("just fine"); +#else +#error "this is not AIX 4.3 or later" +#endif + +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + OPT_THREAD=off +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_ext + +# Check whether --enable-thread or --disable-thread was given. +if test "${enable_thread+set}" = set; then + enableval="$enable_thread" + case "$enableval" in + no) + OPT_THREAD=off + { echo "$as_me:$LINENO: WARNING: libcurl will not get built using thread-safe functions" >&5 +echo "$as_me: WARNING: libcurl will not get built using thread-safe functions" >&2;} + ;; + *) + ;; + esac + + +fi; + +if test X"$OPT_THREAD" = Xoff +then + +cat >>confdefs.h <<\_ACEOF +#define DISABLED_THREADSAFE 1 +_ACEOF + +else + if test "$ipv6" != "yes"; then + + +for ac_func in gethostbyname_r +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + + echo "$as_me:$LINENO: checking if gethostbyname_r takes 3 arguments" >&5 +echo $ECHO_N "checking if gethostbyname_r takes 3 arguments... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#include +#undef NULL +#define NULL (void *)0 + +int +gethostbyname_r(const char *, struct hostent *, struct hostent_data *); +int +main () +{ + +struct hostent_data data; +gethostbyname_r(NULL, NULL, NULL); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYNAME_R_3 1 +_ACEOF + + ac_cv_gethostbyname_args=3 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "$as_me:$LINENO: checking if gethostbyname_r with -D_REENTRANT takes 3 arguments" >&5 +echo $ECHO_N "checking if gethostbyname_r with -D_REENTRANT takes 3 arguments... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define _REENTRANT + +#include +#include +#include +#undef NULL +#define NULL (void *)0 + +int +gethostbyname_r(const char *,struct hostent *, struct hostent_data *); +int +main () +{ + +struct hostent_data data; +gethostbyname_r(NULL, NULL, NULL); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYNAME_R_3 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define NEED_REENTRANT 1 +_ACEOF + + ac_cv_gethostbyname_args=3 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "$as_me:$LINENO: checking if gethostbyname_r takes 5 arguments" >&5 +echo $ECHO_N "checking if gethostbyname_r takes 5 arguments... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#undef NULL +#define NULL (void *)0 + +struct hostent * +gethostbyname_r(const char *, struct hostent *, char *, int, int *); +int +main () +{ + +gethostbyname_r(NULL, NULL, NULL, 0, NULL); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYNAME_R_5 1 +_ACEOF + + ac_cv_gethostbyname_args=5 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "$as_me:$LINENO: checking if gethostbyname_r takes 6 arguments" >&5 +echo $ECHO_N "checking if gethostbyname_r takes 6 arguments... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +#undef NULL +#define NULL (void *)0 + +int +gethostbyname_r(const char *, struct hostent *, char *, size_t, +struct hostent **, int *); +int +main () +{ + +gethostbyname_r(NULL, NULL, NULL, 0, NULL, NULL); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYNAME_R_6 1 +_ACEOF + + ac_cv_gethostbyname_args=6 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + have_missing_r_funcs="$have_missing_r_funcs gethostbyname_r" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +done + + +if test "$ac_cv_func_gethostbyname_r" = "yes"; then + if test "$ac_cv_gethostbyname_args" = "0"; then + { { echo "$as_me:$LINENO: error: couldn't figure out how to use gethostbyname_r()" >&5 +echo "$as_me: error: couldn't figure out how to use gethostbyname_r()" >&2;} + { (exit 1); exit 1; }; } + fi +fi + + + + +for ac_func in gethostbyaddr_r +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + + echo "$as_me:$LINENO: checking if gethostbyaddr_r takes 5 arguments" >&5 +echo $ECHO_N "checking if gethostbyaddr_r takes 5 arguments... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int +main () +{ + +char * address; +int length; +int type; +struct hostent h; +struct hostent_data hdata; +int rc; +rc = gethostbyaddr_r(address, length, type, &h, &hdata); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYADDR_R_5 1 +_ACEOF + + ac_cv_gethostbyaddr_args=5 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "$as_me:$LINENO: checking if gethostbyaddr_r with -D_REENTRANT takes 5 arguments" >&5 +echo $ECHO_N "checking if gethostbyaddr_r with -D_REENTRANT takes 5 arguments... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define _REENTRANT +#include +#include +int +main () +{ + +char * address; +int length; +int type; +struct hostent h; +struct hostent_data hdata; +int rc; +rc = gethostbyaddr_r(address, length, type, &h, &hdata); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYADDR_R_5 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define NEED_REENTRANT 1 +_ACEOF + + ac_cv_gethostbyaddr_args=5 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "$as_me:$LINENO: checking if gethostbyaddr_r takes 7 arguments" >&5 +echo $ECHO_N "checking if gethostbyaddr_r takes 7 arguments... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int +main () +{ + +char * address; +int length; +int type; +struct hostent h; +char buffer[8192]; +int h_errnop; +struct hostent * hp; + +hp = gethostbyaddr_r(address, length, type, &h, + buffer, 8192, &h_errnop); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYADDR_R_7 1 +_ACEOF + + ac_cv_gethostbyaddr_args=7 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "$as_me:$LINENO: checking if gethostbyaddr_r takes 8 arguments" >&5 +echo $ECHO_N "checking if gethostbyaddr_r takes 8 arguments... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include +int +main () +{ + +char * address; +int length; +int type; +struct hostent h; +char buffer[8192]; +int h_errnop; +struct hostent * hp; +int rc; + +rc = gethostbyaddr_r(address, length, type, &h, + buffer, 8192, &hp, &h_errnop); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_GETHOSTBYADDR_R_8 1 +_ACEOF + + ac_cv_gethostbyaddr_args=8 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + have_missing_r_funcs="$have_missing_r_funcs gethostbyaddr_r" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +done + + + fi + + + +for ac_func in inet_ntoa_r +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + + echo "$as_me:$LINENO: checking whether inet_ntoa_r is declared" >&5 +echo $ECHO_N "checking whether inet_ntoa_r is declared... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "inet_ntoa_r" >/dev/null 2>&1; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INET_NTOA_R_DECL 1 +_ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "$as_me:$LINENO: checking whether inet_ntoa_r with -D_REENTRANT is declared" >&5 +echo $ECHO_N "checking whether inet_ntoa_r with -D_REENTRANT is declared... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define _REENTRANT +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "inet_ntoa_r" >/dev/null 2>&1; then + + +cat >>confdefs.h <<\_ACEOF +#define HAVE_INET_NTOA_R_DECL 1 +_ACEOF + + +cat >>confdefs.h <<\_ACEOF +#define NEED_REENTRANT 1 +_ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest* + +fi +rm -f conftest* + +fi +done + + + + + +for ac_func in localtime_r +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + + echo "$as_me:$LINENO: checking whether localtime_r is declared" >&5 +echo $ECHO_N "checking whether localtime_r is declared... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "localtime_r" >/dev/null 2>&1; then + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + echo "$as_me:$LINENO: checking whether localtime_r with -D_REENTRANT is declared" >&5 +echo $ECHO_N "checking whether localtime_r with -D_REENTRANT is declared... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#define _REENTRANT +#include +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "localtime_r" >/dev/null 2>&1; then + + cat >>confdefs.h <<\_ACEOF +#define NEED_REENTRANT 1 +_ACEOF + + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi +rm -f conftest* + +fi +rm -f conftest* + +fi +done + + + + +for ac_func in gmtime_r +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +fi +done + + +fi + + +echo "$as_me:$LINENO: checking for ANSI C header files" >&5 +echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 +if test "${ac_cv_header_stdc+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include +#include + +int +main () +{ + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_stdc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_stdc=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + +if test $ac_cv_header_stdc = yes; then + # SunOS 4.x string.h does not declare mem*, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "memchr" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include + +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "free" >/dev/null 2>&1; then + : +else + ac_cv_header_stdc=no +fi +rm -f conftest* + +fi + +if test $ac_cv_header_stdc = yes; then + # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. + if test "$cross_compiling" = yes; then + : +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#if ((' ' & 0x0FF) == 0x020) +# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') +# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) +#else +# define ISLOWER(c) \ + (('a' <= (c) && (c) <= 'i') \ + || ('j' <= (c) && (c) <= 'r') \ + || ('s' <= (c) && (c) <= 'z')) +# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) +#endif + +#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) +int +main () +{ + int i; + for (i = 0; i < 256; i++) + if (XOR (islower (i), ISLOWER (i)) + || toupper (i) != TOUPPER (i)) + exit(2); + exit (0); +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + : +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +ac_cv_header_stdc=no +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 +echo "${ECHO_T}$ac_cv_header_stdc" >&6 +if test $ac_cv_header_stdc = yes; then + +cat >>confdefs.h <<\_ACEOF +#define STDC_HEADERS 1 +_ACEOF + +fi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +for ac_header in sys/types.h \ + sys/time.h \ + sys/select.h \ + sys/socket.h \ + sys/ioctl.h \ + assert.h \ + unistd.h \ + malloc.h \ + stdlib.h \ + limits.h \ + arpa/inet.h \ + net/if.h \ + netinet/in.h \ + netdb.h \ + sys/sockio.h \ + sys/stat.h \ + sys/param.h \ + termios.h \ + termio.h \ + sgtty.h \ + fcntl.h \ + dlfcn.h \ + alloca.h \ + winsock.h \ + time.h \ + io.h \ + pwd.h \ + utime.h \ + sys/utime.h \ + sys/poll.h \ + setjmp.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif + + + +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_Header=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_Header=no" +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + + +echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 +echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6 +if test "${ac_cv_c_const+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ +/* FIXME: Include the comments suggested by Paul. */ +#ifndef __cplusplus + /* Ultrix mips cc rejects this. */ + typedef int charset[2]; + const charset x; + /* SunOS 4.1.1 cc rejects this. */ + char const *const *ccp; + char **p; + /* NEC SVR4.0.2 mips cc rejects this. */ + struct point {int x, y;}; + static struct point const zero = {0,0}; + /* AIX XL C 1.02.0.0 rejects this. + It does not let you subtract one const X* pointer from another in + an arm of an if-expression whose if-part is not a constant + expression */ + const char *g = "string"; + ccp = &g + (g ? g-g : 0); + /* HPUX 7.0 cc rejects these. */ + ++ccp; + p = (char**) ccp; + ccp = (char const *const *) p; + { /* SCO 3.2v4 cc rejects this. */ + char *t; + char const *s = 0 ? (char *) 0 : (char const *) 0; + + *t++ = 0; + } + { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ + int x[] = {25, 17}; + const int *foo = &x[0]; + ++foo; + } + { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ + typedef const int *iptr; + iptr p = 0; + ++p; + } + { /* AIX XL C 1.02.0.0 rejects this saying + "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ + struct s { int j; const int *ap[3]; }; + struct s *b; b->j = 5; + } + { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ + const int foo = 10; + } +#endif + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_c_const=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_c_const=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 +echo "${ECHO_T}$ac_cv_c_const" >&6 +if test $ac_cv_c_const = no; then + +cat >>confdefs.h <<\_ACEOF +#define const +_ACEOF + +fi + +echo "$as_me:$LINENO: checking for size_t" >&5 +echo $ECHO_N "checking for size_t... $ECHO_C" >&6 +if test "${ac_cv_type_size_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((size_t *) 0) + return 0; +if (sizeof (size_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_size_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_size_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 +echo "${ECHO_T}$ac_cv_type_size_t" >&6 +if test $ac_cv_type_size_t = yes; then + : +else + +cat >>confdefs.h <<_ACEOF +#define size_t unsigned +_ACEOF + +fi + +echo "$as_me:$LINENO: checking whether time.h and sys/time.h may both be included" >&5 +echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6 +if test "${ac_cv_header_time+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((struct tm *) 0) +return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_header_time=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_header_time=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_header_time" >&5 +echo "${ECHO_T}$ac_cv_header_time" >&6 +if test $ac_cv_header_time = yes; then + +cat >>confdefs.h <<\_ACEOF +#define TIME_WITH_SYS_TIME 1 +_ACEOF + +fi + + +echo "$as_me:$LINENO: checking for curl_off_t" >&5 +echo $ECHO_N "checking for curl_off_t... $ECHO_C" >&6 +if test "${ac_cv_type_curl_off_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include "$srcdir/include/curl/curl.h" + + +int +main () +{ +if ((curl_off_t *) 0) + return 0; +if (sizeof (curl_off_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_curl_off_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_curl_off_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_curl_off_t" >&5 +echo "${ECHO_T}$ac_cv_type_curl_off_t" >&6 + +echo "$as_me:$LINENO: checking size of curl_off_t" >&5 +echo $ECHO_N "checking size of curl_off_t... $ECHO_C" >&6 +if test "${ac_cv_sizeof_curl_off_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test "$ac_cv_type_curl_off_t" = yes; then + # The cast to unsigned long works around a bug in the HP C Compiler + # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects + # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. + # This bug is HP SR number 8606223364. + if test "$cross_compiling" = yes; then + # Depending upon the size, compute the lo and hi bounds. +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include "$srcdir/include/curl/curl.h" + + +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (curl_off_t))) >= 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=0 ac_mid=0 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include "$srcdir/include/curl/curl.h" + + +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (curl_off_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr $ac_mid + 1` + if test $ac_lo -le $ac_mid; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include "$srcdir/include/curl/curl.h" + + +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (curl_off_t))) < 0)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=-1 ac_mid=-1 + while :; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include "$srcdir/include/curl/curl.h" + + +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (curl_off_t))) >= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_lo=$ac_mid; break +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_hi=`expr '(' $ac_mid ')' - 1` + if test $ac_mid -le $ac_hi; then + ac_lo= ac_hi= + break + fi + ac_mid=`expr 2 '*' $ac_mid` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo= ac_hi= +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +# Binary search between lo and hi bounds. +while test "x$ac_lo" != "x$ac_hi"; do + ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include "$srcdir/include/curl/curl.h" + + +int +main () +{ +static int test_array [1 - 2 * !(((long) (sizeof (curl_off_t))) <= $ac_mid)]; +test_array [0] = 0 + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_hi=$ac_mid +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_lo=`expr '(' $ac_mid ')' + 1` +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +done +case $ac_lo in +?*) ac_cv_sizeof_curl_off_t=$ac_lo;; +'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (curl_off_t), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (curl_off_t), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } ;; +esac +else + if test "$cross_compiling" = yes; then + { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot run test program while cross compiling +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +#include +#include "$srcdir/include/curl/curl.h" + + +long longval () { return (long) (sizeof (curl_off_t)); } +unsigned long ulongval () { return (long) (sizeof (curl_off_t)); } +#include +#include +int +main () +{ + + FILE *f = fopen ("conftest.val", "w"); + if (! f) + exit (1); + if (((long) (sizeof (curl_off_t))) < 0) + { + long i = longval (); + if (i != ((long) (sizeof (curl_off_t)))) + exit (1); + fprintf (f, "%ld\n", i); + } + else + { + unsigned long i = ulongval (); + if (i != ((long) (sizeof (curl_off_t)))) + exit (1); + fprintf (f, "%lu\n", i); + } + exit (ferror (f) || fclose (f) != 0); + + ; + return 0; +} +_ACEOF +rm -f conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && { ac_try='./conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_sizeof_curl_off_t=`cat conftest.val` +else + echo "$as_me: program exited with status $ac_status" >&5 +echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +( exit $ac_status ) +{ { echo "$as_me:$LINENO: error: cannot compute sizeof (curl_off_t), 77 +See \`config.log' for more details." >&5 +echo "$as_me: error: cannot compute sizeof (curl_off_t), 77 +See \`config.log' for more details." >&2;} + { (exit 1); exit 1; }; } +fi +rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext +fi +fi +rm -f conftest.val +else + ac_cv_sizeof_curl_off_t=0 +fi +fi +echo "$as_me:$LINENO: result: $ac_cv_sizeof_curl_off_t" >&5 +echo "${ECHO_T}$ac_cv_sizeof_curl_off_t" >&6 +cat >>confdefs.h <<_ACEOF +#define SIZEOF_CURL_OFF_T $ac_cv_sizeof_curl_off_t +_ACEOF + + + +echo "$as_me:$LINENO: checking for long long" >&5 +echo $ECHO_N "checking for long long... $ECHO_C" >&6 +if test "${ac_cv_type_long_long+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((long long *) 0) + return 0; +if (sizeof (long long)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_long_long=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_long_long=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_long_long" >&5 +echo "${ECHO_T}$ac_cv_type_long_long" >&6 +if test $ac_cv_type_long_long = yes; then + +cat >>confdefs.h <<\_ACEOF +#define HAVE_LONGLONG 1 +_ACEOF + +fi + + +# check for ssize_t +echo "$as_me:$LINENO: checking for ssize_t" >&5 +echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6 +if test "${ac_cv_type_ssize_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +int +main () +{ +if ((ssize_t *) 0) + return 0; +if (sizeof (ssize_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_ssize_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_ssize_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_ssize_t" >&5 +echo "${ECHO_T}$ac_cv_type_ssize_t" >&6 +if test $ac_cv_type_ssize_t = yes; then + : +else + +cat >>confdefs.h <<\_ACEOF +#define ssize_t int +_ACEOF + +fi + + + + echo "$as_me:$LINENO: checking for socklen_t" >&5 +echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6 +if test "${ac_cv_type_socklen_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include + +int +main () +{ +if ((socklen_t *) 0) + return 0; +if (sizeof (socklen_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_socklen_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_socklen_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5 +echo "${ECHO_T}$ac_cv_type_socklen_t" >&6 +if test $ac_cv_type_socklen_t = yes; then + : +else + + echo "$as_me:$LINENO: checking for socklen_t equivalent" >&5 +echo $ECHO_N "checking for socklen_t equivalent... $ECHO_C" >&6 + if test "${curl_cv_socklen_t_equiv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + # Systems have either "struct sockaddr *" or + # "void *" as the second argument to getpeername + curl_cv_socklen_t_equiv= + for arg2 in "struct sockaddr" void; do + for t in int size_t unsigned long "unsigned long"; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #ifdef HAVE_SYS_TYPES_H + #include + #endif + #ifdef HAVE_SYS_SOCKET_H + #include + #endif + + int getpeername (int, $arg2 *, $t *); + +int +main () +{ + + $t len; + getpeername(0,0,&len); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + curl_cv_socklen_t_equiv="$t" + break + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done + done + + if test "x$curl_cv_socklen_t_equiv" = x; then + { { echo "$as_me:$LINENO: error: Cannot find a type to use in place of socklen_t" >&5 +echo "$as_me: error: Cannot find a type to use in place of socklen_t" >&2;} + { (exit 1); exit 1; }; } + fi + +fi + + echo "$as_me:$LINENO: result: $curl_cv_socklen_t_equiv" >&5 +echo "${ECHO_T}$curl_cv_socklen_t_equiv" >&6 + +cat >>confdefs.h <<_ACEOF +#define socklen_t $curl_cv_socklen_t_equiv +_ACEOF + +fi + + + + echo "$as_me:$LINENO: checking for in_addr_t" >&5 +echo $ECHO_N "checking for in_addr_t... $ECHO_C" >&6 +if test "${ac_cv_type_in_addr_t+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#include + +int +main () +{ +if ((in_addr_t *) 0) + return 0; +if (sizeof (in_addr_t)) + return 0; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_in_addr_t=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_in_addr_t=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_in_addr_t" >&5 +echo "${ECHO_T}$ac_cv_type_in_addr_t" >&6 +if test $ac_cv_type_in_addr_t = yes; then + : +else + + echo "$as_me:$LINENO: checking for in_addr_t equivalent" >&5 +echo $ECHO_N "checking for in_addr_t equivalent... $ECHO_C" >&6 + if test "${curl_cv_in_addr_t_equiv+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + + curl_cv_in_addr_t_equiv= + for t in "unsigned long" int size_t unsigned long; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + + #ifdef HAVE_SYS_TYPES_H + #include + #endif + #ifdef HAVE_SYS_SOCKET_H + #include + #endif + #ifdef HAVE_ARPA_INET_H + #include + #endif + +int +main () +{ + + $t data = inet_addr ("1.2.3.4"); + + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + + curl_cv_in_addr_t_equiv="$t" + break + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done + + if test "x$curl_cv_in_addr_t_equiv" = x; then + { { echo "$as_me:$LINENO: error: Cannot find a type to use in place of in_addr_t" >&5 +echo "$as_me: error: Cannot find a type to use in place of in_addr_t" >&2;} + { (exit 1); exit 1; }; } + fi + +fi + + echo "$as_me:$LINENO: result: $curl_cv_in_addr_t_equiv" >&5 +echo "${ECHO_T}$curl_cv_in_addr_t_equiv" >&6 + +cat >>confdefs.h <<_ACEOF +#define in_addr_t $curl_cv_in_addr_t_equiv +_ACEOF + +fi + + + + + +for ac_header in sys/select.h sys/socket.h +do +as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 +else + # Is the header compilable? +echo "$as_me:$LINENO: checking $ac_header usability" >&5 +echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#include <$ac_header> +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_header_compiler=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_header_compiler=no +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 +echo "${ECHO_T}$ac_header_compiler" >&6 + +# Is the header present? +echo "$as_me:$LINENO: checking $ac_header presence" >&5 +echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6 +cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include <$ac_header> +_ACEOF +if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 + (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } >/dev/null; then + if test -s conftest.err; then + ac_cpp_err=$ac_c_preproc_warn_flag + ac_cpp_err=$ac_cpp_err$ac_c_werror_flag + else + ac_cpp_err= + fi +else + ac_cpp_err=yes +fi +if test -z "$ac_cpp_err"; then + ac_header_preproc=yes +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + + ac_header_preproc=no +fi +rm -f conftest.err conftest.$ac_ext +echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 +echo "${ECHO_T}$ac_header_preproc" >&6 + +# So? What about this header? +case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in + yes:no: ) + { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 +echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} + ac_header_preproc=yes + ;; + no:yes:* ) + { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 +echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 +echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 +echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 +echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 +echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} + { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 +echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} + ( + cat <<\_ASBOX +## ------------------------------- ## +## Report this to curl-bug@haxx.se ## +## ------------------------------- ## +_ASBOX + ) | + sed "s/^/$as_me: WARNING: /" >&2 + ;; +esac +echo "$as_me:$LINENO: checking for $ac_header" >&5 +echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6 +if eval "test \"\${$as_ac_Header+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + eval "$as_ac_Header=\$ac_header_preproc" +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6 + +fi +if test `eval echo '${'$as_ac_Header'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 +_ACEOF + +fi + +done + +echo "$as_me:$LINENO: checking types of arguments for select" >&5 +echo $ECHO_N "checking types of arguments for select... $ECHO_C" >&6 +if test "${ac_cv_func_select_args+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + for ac_arg234 in 'fd_set *' 'int *' 'void *'; do + for ac_arg1 in 'int' 'size_t' 'unsigned long' 'unsigned'; do + for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +$ac_includes_default +#if HAVE_SYS_SELECT_H +# include +#endif +#if HAVE_SYS_SOCKET_H +# include +#endif + +int +main () +{ +extern int select ($ac_arg1, + $ac_arg234, $ac_arg234, $ac_arg234, + $ac_arg5); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext + done + done +done +# Provide a safe default value. +: ${ac_cv_func_select_args='int,int *,struct timeval *'} + +fi +echo "$as_me:$LINENO: result: $ac_cv_func_select_args" >&5 +echo "${ECHO_T}$ac_cv_func_select_args" >&6 +ac_save_IFS=$IFS; IFS=',' +set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` +IFS=$ac_save_IFS +shift + +cat >>confdefs.h <<_ACEOF +#define SELECT_TYPE_ARG1 $1 +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SELECT_TYPE_ARG234 ($2) +_ACEOF + + +cat >>confdefs.h <<_ACEOF +#define SELECT_TYPE_ARG5 ($3) +_ACEOF + +rm -f conftest* + + +echo "$as_me:$LINENO: checking return type of signal handlers" >&5 +echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6 +if test "${ac_cv_type_signal+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +#include +#ifdef signal +# undef signal +#endif +#ifdef __cplusplus +extern "C" void (*signal (int, void (*)(int)))(int); +#else +void (*signal ()) (); +#endif + +int +main () +{ +int i; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext +if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 + (eval $ac_compile) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest.$ac_objext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + ac_cv_type_signal=void +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +ac_cv_type_signal=int +fi +rm -f conftest.err conftest.$ac_objext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: $ac_cv_type_signal" >&5 +echo "${ECHO_T}$ac_cv_type_signal" >&6 + +cat >>confdefs.h <<_ACEOF +#define RETSIGTYPE $ac_cv_type_signal +_ACEOF + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +for ac_func in strtoll \ + socket \ + select \ + strdup \ + strstr \ + strtok_r \ + strftime \ + uname \ + strcasecmp \ + stricmp \ + strcmpi \ + gethostbyaddr \ + gettimeofday \ + inet_addr \ + inet_ntoa \ + inet_pton \ + tcsetattr \ + tcgetattr \ + perror \ + closesocket \ + siginterrupt \ + sigaction \ + signal \ + getpass_r \ + strlcat \ + getpwuid \ + geteuid \ + dlopen \ + utime \ + sigsetjmp \ + poll +do +as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` +echo "$as_me:$LINENO: checking for $ac_func" >&5 +echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6 +if eval "test \"\${$as_ac_var+set}\" = set"; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +/* Define $ac_func to an innocuous variant, in case declares $ac_func. + For example, HP-UX 11i declares gettimeofday. */ +#define $ac_func innocuous_$ac_func + +/* System header to define __stub macros and hopefully few prototypes, + which can conflict with char $ac_func (); below. + Prefer to if __STDC__ is defined, since + exists even on freestanding compilers. */ + +#ifdef __STDC__ +# include +#else +# include +#endif + +#undef $ac_func + +/* Override any gcc2 internal prototype to avoid an error. */ +#ifdef __cplusplus +extern "C" +{ +#endif +/* We use char because int might match the return type of a gcc2 + builtin and then its argument prototype would still apply. */ +char $ac_func (); +/* The GNU C library defines this for functions which it implements + to always fail with ENOSYS. Some functions are actually named + something starting with __ and the normal name is an alias. */ +#if defined (__stub_$ac_func) || defined (__stub___$ac_func) +choke me +#else +char (*f) () = $ac_func; +#endif +#ifdef __cplusplus +} +#endif + +int +main () +{ +return f != $ac_func; + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + eval "$as_ac_var=yes" +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +eval "$as_ac_var=no" +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi +echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5 +echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6 +if test `eval echo '${'$as_ac_var'}'` = yes; then + cat >>confdefs.h <<_ACEOF +#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 +_ACEOF + +else + func="$ac_func" + echo "$as_me:$LINENO: checking deeper for $func" >&5 +echo $ECHO_N "checking deeper for $func... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ + +int +main () +{ + $func (); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes!" >&5 +echo "${ECHO_T}yes!" >&6 + eval "ac_cv_func_$func=yes" + def=`echo "HAVE_$func" | tr 'a-z' 'A-Z'` + +cat >>confdefs.h <<_ACEOF +#define $def 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: but still no" >&5 +echo "${ECHO_T}but still no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + + +fi +done + + +if test "$ac_cv_func_sigsetjmp" != "yes"; then + echo "$as_me:$LINENO: checking for sigsetjmp defined as macro" >&5 +echo $ECHO_N "checking for sigsetjmp defined as macro... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +#include +int +main () +{ +sigjmp_buf jmpenv; + sigsetjmp(jmpenv, 1); + ; + return 0; +} +_ACEOF +rm -f conftest.$ac_objext conftest$ac_exeext +if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 + (eval $ac_link) 2>conftest.er1 + ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); } && + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; }; then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +cat >>confdefs.h <<\_ACEOF +#define HAVE_SIGSETJMP 1 +_ACEOF + +else + echo "$as_me: failed program was:" >&5 +sed 's/^/| /' conftest.$ac_ext >&5 + +echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext +fi + +# Extract the first word of "perl", so it can be a program name with args. +set dummy perl; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_PERL+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $PERL in + [\\/]* | ?:[\\/]*) + ac_cv_path_PERL="$PERL" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin " +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +PERL=$ac_cv_path_PERL + +if test -n "$PERL"; then + echo "$as_me:$LINENO: result: $PERL" >&5 +echo "${ECHO_T}$PERL" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + + +for ac_prog in gnroff nroff +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_path_NROFF+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + case $NROFF in + [\\/]* | ?:[\\/]*) + ac_cv_path_NROFF="$NROFF" # Let the user override the test with a path. + ;; + *) + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_dummy="$PATH:/usr/bin/:/usr/local/bin " +for as_dir in $as_dummy +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_path_NROFF="$as_dir/$ac_word$ac_exec_ext" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + ;; +esac +fi +NROFF=$ac_cv_path_NROFF + +if test -n "$NROFF"; then + echo "$as_me:$LINENO: result: $NROFF" >&5 +echo "${ECHO_T}$NROFF" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$NROFF" && break +done + + + +if test -n "$NROFF"; then + + echo "$as_me:$LINENO: checking how to use *nroff to get plain text from man pages" >&5 +echo $ECHO_N "checking how to use *nroff to get plain text from man pages... $ECHO_C" >&6 + MANOPT="-man" + mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null` + if test -z "$mancheck"; then + MANOPT="-mandoc" + mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null` + if test -z "$mancheck"; then + MANOPT="" + echo "$as_me:$LINENO: result: failed" >&5 +echo "${ECHO_T}failed" >&6 + { echo "$as_me:$LINENO: WARNING: found no *nroff option to get plaintext from man pages" >&5 +echo "$as_me: WARNING: found no *nroff option to get plaintext from man pages" >&2;} + else + echo "$as_me:$LINENO: result: $MANOPT" >&5 +echo "${ECHO_T}$MANOPT" >&6 + fi + else + echo "$as_me:$LINENO: result: $MANOPT" >&5 +echo "${ECHO_T}$MANOPT" >&6 + fi + +fi + +if test -z "$MANOPT" +then + { echo "$as_me:$LINENO: WARNING: disabling built-in manual" >&5 +echo "$as_me: WARNING: disabling built-in manual" >&2;} + USE_MANUAL="no"; +fi + +for ac_prog in 'bison -y' byacc +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_YACC+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$YACC"; then + ac_cv_prog_YACC="$YACC" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_YACC="$ac_prog" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + +fi +fi +YACC=$ac_cv_prog_YACC +if test -n "$YACC"; then + echo "$as_me:$LINENO: result: $YACC" >&5 +echo "${ECHO_T}$YACC" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + test -n "$YACC" && break +done +test -n "$YACC" || YACC="yacc" + + +if test -z "$YACC" +then + echo "$as_me:$LINENO: checking if OK to build without bison/yacc" >&5 +echo $ECHO_N "checking if OK to build without bison/yacc... $ECHO_C" >&6 + if test -r "$srcdir/lib/getdate.c" + then + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + { { echo "$as_me:$LINENO: error: no yacc or bison found, can't build libcurl!" >&5 +echo "$as_me: error: no yacc or bison found, can't build libcurl!" >&2;} + { (exit 1); exit 1; }; } + fi +fi + + +if test "$USE_MANUAL" = "1"; then + +cat >>confdefs.h <<\_ACEOF +#define USE_MANUAL 1 +_ACEOF + +fi + + + +if test x"$USE_MANUAL" = x1; then + USE_MANUAL_TRUE= + USE_MANUAL_FALSE='#' +else + USE_MANUAL_TRUE='#' + USE_MANUAL_FALSE= +fi + + + + +echo "$as_me:$LINENO: checking whether to enable debug options" >&5 +echo $ECHO_N "checking whether to enable debug options... $ECHO_C" >&6 +# Check whether --enable-debug or --disable-debug was given. +if test "${enable_debug+set}" = set; then + enableval="$enable_debug" + case "$enableval" in + no) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + *) echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + CPPFLAGS="$CPPFLAGS -DCURLDEBUG" + CFLAGS="$CFLAGS -g" + + + if test "$GCC" = "yes"; then + + echo "$as_me:$LINENO: checking gcc version" >&5 +echo $ECHO_N "checking gcc version... $ECHO_C" >&6 + gccver=`$CC -dumpversion` + num1=`echo $gccver | cut -d . -f1` + num2=`echo $gccver | cut -d . -f2` + gccnum=`(expr $num1 "*" 100 + $num2) 2>/dev/null` + echo "$as_me:$LINENO: result: $gccver" >&5 +echo "${ECHO_T}$gccver" >&6 + + echo "$as_me:$LINENO: checking if this is icc in disguise" >&5 +echo $ECHO_N "checking if this is icc in disguise... $ECHO_C" >&6 + cat >conftest.$ac_ext <<_ACEOF +/* confdefs.h. */ +_ACEOF +cat confdefs.h >>conftest.$ac_ext +cat >>conftest.$ac_ext <<_ACEOF +/* end confdefs.h. */ +__INTEL_COMPILER +_ACEOF +if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | + $EGREP "^__INTEL_COMPILER" >/dev/null 2>&1; then + ICC="no" + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +else + ICC="yes" + echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + +fi +rm -f conftest* + + + if test "$ICC" = "yes"; then + + + WARN="-wd279,269,1419,981" + + if test "$gccnum" -gt "600"; then + WARN="-Wall $WARN" + fi + else WARN="-W -Wall -Wwrite-strings -pedantic -Wno-long-long -Wpointer-arith -Wnested-externs -Winline -Wmissing-declarations -Wmissing-prototypes -Wsign-compare" + + + if test "$gccnum" -gt "295"; then + WARN="$WARN -Wundef" + fi + + if test "$gccnum" -ge "296"; then + WARN="$WARN -Wfloat-equal" + fi + + if test "$gccnum" -gt "296"; then + WARN="$WARN -Wno-format-nonliteral" + fi + + if test "$gccnum" -ge "303"; then + WARN="$WARN -Wendif-labels -Wstrict-prototypes" + fi + + for flag in $CPPFLAGS; do + case "$flag" in + -I*) + add=`echo $flag | sed 's/^-I/-isystem /g'` + WARN="$WARN $add" + ;; + esac + done + + fi + CFLAGS="$CFLAGS $WARN" + + { echo "$as_me:$LINENO: Added this set of compiler options: $WARN" >&5 +echo "$as_me: Added this set of compiler options: $WARN" >&6;} + + else + { echo "$as_me:$LINENO: Added no extra compiler options" >&5 +echo "$as_me: Added no extra compiler options" >&6;} + + fi + NEWFLAGS="" + for flag in $CFLAGS; do + case "$flag" in + -O*) + ;; + *) + NEWFLAGS="$NEWFLAGS $flag" + ;; + esac + done + CFLAGS=$NEWFLAGS + + + ;; + esac + +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi; + +echo "$as_me:$LINENO: checking whether to enable ares" >&5 +echo $ECHO_N "checking whether to enable ares... $ECHO_C" >&6 +# Check whether --enable-ares or --disable-ares was given. +if test "${enable_ares+set}" = set; then + enableval="$enable_ares" + case "$enableval" in + no) + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + ;; + *) echo "$as_me:$LINENO: result: yes" >&5 +echo "${ECHO_T}yes" >&6 + + if test "x$IPV6_ENABLED" = "x1"; then + { { echo "$as_me:$LINENO: error: ares doesn't work with ipv6, disable ipv6 to use ares" >&5 +echo "$as_me: error: ares doesn't work with ipv6, disable ipv6 to use ares" >&2;} + { (exit 1); exit 1; }; } + fi + + +cat >>confdefs.h <<\_ACEOF +#define USE_ARES 1 +_ACEOF + + HAVE_ARES="1" + + + LIBS="$LIBS -lcares" + + if test "x$enableval" = "xyes" ; then + if test -d "$srcdir/ares"; then + + +subdirs="$subdirs ares" + + aresinc=`cd $srcdir/ares && pwd` + CPPFLAGS="$CPPFLAGS -I$aresinc" + + pwd=`pwd` + LDFLAGS="$LDFLAGS -L$pwd/ares" + fi + else + CPPFLAGS="$CPPFLAGS -I$enableval/include" + LDFLAGS="$LDFLAGS -L$enableval/lib" + fi + ;; + esac +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 + +fi; + + ac_config_files="$ac_config_files Makefile docs/Makefile docs/examples/Makefile docs/libcurl/Makefile include/Makefile include/curl/Makefile src/Makefile lib/Makefile tests/Makefile tests/data/Makefile tests/server/Makefile tests/libtest/Makefile packages/Makefile packages/Win32/Makefile packages/Win32/cygwin/Makefile packages/Linux/Makefile packages/Linux/RPM/Makefile packages/Linux/RPM/curl.spec packages/Linux/RPM/curl-ssl.spec packages/Solaris/Makefile packages/DOS/Makefile packages/EPM/curl.list packages/EPM/Makefile packages/vms/Makefile curl-config" + +cat >confcache <<\_ACEOF +# This file is a shell script that caches the results of configure +# tests run on this system so they can be shared between configure +# scripts and configure runs, see configure's option --config-cache. +# It is not useful on other systems. If it contains results you don't +# want to keep, you may remove or edit it. +# +# config.status only pays attention to the cache file if you give it +# the --recheck option to rerun configure. +# +# `ac_cv_env_foo' variables (set or unset) will be overridden when +# loading this file, other *unset* `ac_cv_foo' will be assigned the +# following values. + +_ACEOF + +# The following way of writing the cache mishandles newlines in values, +# but we know of no workaround that is simple, portable, and efficient. +# So, don't put newlines in cache variables' values. +# Ultrix sh set writes to stderr and can't be redirected directly, +# and sets the high bit in the cache file unless we assign to the vars. +{ + (set) 2>&1 | + case `(ac_space=' '; set | grep ac_space) 2>&1` in + *ac_space=\ *) + # `set' does not quote correctly, so add quotes (double-quote + # substitution turns \\\\ into \\, and sed turns \\ into \). + sed -n \ + "s/'/'\\\\''/g; + s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" + ;; + *) + # `set' quotes correctly as required by POSIX, so do not add quotes. + sed -n \ + "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" + ;; + esac; +} | + sed ' + t clear + : clear + s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ + t end + /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ + : end' >>confcache +if diff $cache_file confcache >/dev/null 2>&1; then :; else + if test -w $cache_file; then + test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" + cat confcache >$cache_file + else + echo "not updating unwritable cache $cache_file" + fi +fi +rm -f confcache + +test "x$prefix" = xNONE && prefix=$ac_default_prefix +# Let make expand exec_prefix. +test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' + +# VPATH may cause trouble with some makes, so we remove $(srcdir), +# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and +# trailing colons and then remove the whole line if VPATH becomes empty +# (actually we leave an empty line to preserve line numbers). +if test "x$srcdir" = x.; then + ac_vpsub='/^[ ]*VPATH[ ]*=/{ +s/:*\$(srcdir):*/:/; +s/:*\${srcdir}:*/:/; +s/:*@srcdir@:*/:/; +s/^\([^=]*=[ ]*\):*/\1/; +s/:*$//; +s/^[^=]*=[ ]*$//; +}' +fi + +DEFS=-DHAVE_CONFIG_H + +ac_libobjs= +ac_ltlibobjs= +for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue + # 1. Remove the extension, and $U if already installed. + ac_i=`echo "$ac_i" | + sed 's/\$U\././;s/\.o$//;s/\.obj$//'` + # 2. Add them. + ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" + ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' +done +LIBOBJS=$ac_libobjs + +LTLIBOBJS=$ac_ltlibobjs + + +if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"AMDEP\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${NO_UNDEFINED_TRUE}" && test -z "${NO_UNDEFINED_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"NO_UNDEFINED\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"NO_UNDEFINED\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${MIMPURE_TRUE}" && test -z "${MIMPURE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"MIMPURE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"MIMPURE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${CABUNDLE_TRUE}" && test -z "${CABUNDLE_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"CABUNDLE\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"CABUNDLE\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${HAVE_LIBZ_TRUE}" && test -z "${HAVE_LIBZ_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"HAVE_LIBZ\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"HAVE_LIBZ\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi +if test -z "${USE_MANUAL_TRUE}" && test -z "${USE_MANUAL_FALSE}"; then + { { echo "$as_me:$LINENO: error: conditional \"USE_MANUAL\" was never defined. +Usually this means the macro was only invoked conditionally." >&5 +echo "$as_me: error: conditional \"USE_MANUAL\" was never defined. +Usually this means the macro was only invoked conditionally." >&2;} + { (exit 1); exit 1; }; } +fi + +: ${CONFIG_STATUS=./config.status} +ac_clean_files_save=$ac_clean_files +ac_clean_files="$ac_clean_files $CONFIG_STATUS" +{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 +echo "$as_me: creating $CONFIG_STATUS" >&6;} +cat >$CONFIG_STATUS <<_ACEOF +#! $SHELL +# Generated by $as_me. +# Run this file to recreate the current configuration. +# Compiler output produced by configure, useful for debugging +# configure, is in config.log if it exists. + +debug=false +ac_cs_recheck=false +ac_cs_silent=false +SHELL=\${CONFIG_SHELL-$SHELL} +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +## --------------------- ## +## M4sh Initialization. ## +## --------------------- ## + +# Be Bourne compatible +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then + emulate sh + NULLCMD=: + # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' +elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then + set -o posix +fi +DUALCASE=1; export DUALCASE # for MKS sh + +# Support unset when possible. +if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then + as_unset=unset +else + as_unset=false +fi + + +# Work around bugs in pre-3.0 UWIN ksh. +$as_unset ENV MAIL MAILPATH +PS1='$ ' +PS2='> ' +PS4='+ ' + +# NLS nuisances. +for as_var in \ + LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ + LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ + LC_TELEPHONE LC_TIME +do + if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then + eval $as_var=C; export $as_var + else + $as_unset $as_var + fi +done + +# Required to use basename. +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + + +# Name of the executable. +as_me=`$as_basename "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)$' \| \ + . : '\(.\)' 2>/dev/null || +echo X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } + /^X\/\(\/\/\)$/{ s//\1/; q; } + /^X\/\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + + +# PATH needs CR, and LINENO needs CR and PATH. +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + +# The user is always right. +if test "${PATH_SEPARATOR+set}" != set; then + echo "#! /bin/sh" >conf$$.sh + echo "exit 0" >>conf$$.sh + chmod +x conf$$.sh + if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then + PATH_SEPARATOR=';' + else + PATH_SEPARATOR=: + fi + rm -f conf$$.sh +fi + + + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" || { + # Find who we are. Look in the path if we contain no path at all + # relative or not. + case $0 in + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break +done + + ;; + esac + # We did not find ourselves, most probably we were run as `sh COMMAND' + # in which case we are not to be found in the path. + if test "x$as_myself" = x; then + as_myself=$0 + fi + if test ! -f "$as_myself"; then + { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 +echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} + { (exit 1); exit 1; }; } + fi + case $CONFIG_SHELL in + '') + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for as_base in sh bash ksh sh5; do + case $as_dir in + /*) + if ("$as_dir/$as_base" -c ' + as_lineno_1=$LINENO + as_lineno_2=$LINENO + as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` + test "x$as_lineno_1" != "x$as_lineno_2" && + test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then + $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } + $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } + CONFIG_SHELL=$as_dir/$as_base + export CONFIG_SHELL + exec "$CONFIG_SHELL" "$0" ${1+"$@"} + fi;; + esac + done +done +;; + esac + + # Create $as_me.lineno as a copy of $as_myself, but with $LINENO + # uniformly replaced by the line number. The first 'sed' inserts a + # line-number line before each line; the second 'sed' does the real + # work. The second script uses 'N' to pair each line-number line + # with the numbered line, and appends trailing '-' during + # substitution so that $LINENO is not a special case at line end. + # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the + # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) + sed '=' <$as_myself | + sed ' + N + s,$,-, + : loop + s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, + t loop + s,-$,, + s,^['$as_cr_digits']*\n,, + ' >$as_me.lineno && + chmod +x $as_me.lineno || + { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 +echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} + { (exit 1); exit 1; }; } + + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensible to this). + . ./$as_me.lineno + # Exit status is that of the last command. + exit +} + + +case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in + *c*,-n*) ECHO_N= ECHO_C=' +' ECHO_T=' ' ;; + *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; + *) ECHO_N= ECHO_C='\c' ECHO_T= ;; +esac + +if expr a : '\(a\)' >/dev/null 2>&1; then + as_expr=expr +else + as_expr=false +fi + +rm -f conf$$ conf$$.exe conf$$.file +echo >conf$$.file +if ln -s conf$$.file conf$$ 2>/dev/null; then + # We could just check for DJGPP; but this test a) works b) is more generic + # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). + if test -f conf$$.exe; then + # Don't use ln at all; we don't have any links + as_ln_s='cp -p' + else + as_ln_s='ln -s' + fi +elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln +else + as_ln_s='cp -p' +fi +rm -f conf$$ conf$$.exe conf$$.file + +if mkdir -p . 2>/dev/null; then + as_mkdir_p=: +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_executable_p="test -f" + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + + +# IFS +# We need space, tab and new line, in precisely that order. +as_nl=' +' +IFS=" $as_nl" + +# CDPATH. +$as_unset CDPATH + +exec 6>&1 + +# Open the log real soon, to keep \$[0] and so on meaningful, and to +# report actual input values of CONFIG_FILES etc. instead of their +# values after options handling. Logging --version etc. is OK. +exec 5>>config.log +{ + echo + sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX +## Running $as_me. ## +_ASBOX +} >&5 +cat >&5 <<_CSEOF + +This file was extended by curl $as_me -, which was +generated by GNU Autoconf 2.59. Invocation command line was + + CONFIG_FILES = $CONFIG_FILES + CONFIG_HEADERS = $CONFIG_HEADERS + CONFIG_LINKS = $CONFIG_LINKS + CONFIG_COMMANDS = $CONFIG_COMMANDS + $ $0 $@ + +_CSEOF +echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 +echo >&5 +_ACEOF + +# Files that config.status was made for. +if test -n "$ac_config_files"; then + echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_headers"; then + echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_links"; then + echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS +fi + +if test -n "$ac_config_commands"; then + echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS +fi + +cat >>$CONFIG_STATUS <<\_ACEOF + +ac_cs_usage="\ +\`$as_me' instantiates files from templates according to the +current configuration. + +Usage: $0 [OPTIONS] [FILE]... + + -h, --help print this help, then exit + -V, --version print version number, then exit + -q, --quiet do not print progress messages + -d, --debug don't remove temporary files + --recheck update $as_me by reconfiguring in the same conditions + --file=FILE[:TEMPLATE] + instantiate the configuration file FILE + --header=FILE[:TEMPLATE] + instantiate the configuration header FILE + +Configuration files: +$config_files + +Configuration headers: +$config_headers + +Configuration commands: +$config_commands + +Report bugs to ." +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +ac_cs_version="\\ +curl config.status - +configured by $0, generated by GNU Autoconf 2.59, + with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" + +Copyright (C) 2003 Free Software Foundation, Inc. +This config.status script is free software; the Free Software Foundation +gives unlimited permission to copy, distribute and modify it." +srcdir=$srcdir +INSTALL="$INSTALL" +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF +# If no file are specified by the user, then we need to provide default +# value. By we need to know if files were specified by the user. +ac_need_defaults=: +while test $# != 0 +do + case $1 in + --*=*) + ac_option=`expr "x$1" : 'x\([^=]*\)='` + ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` + ac_shift=: + ;; + -*) + ac_option=$1 + ac_optarg=$2 + ac_shift=shift + ;; + *) # This is not an option, so the user has probably given explicit + # arguments. + ac_option=$1 + ac_need_defaults=false;; + esac + + case $ac_option in + # Handling of the options. +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) + ac_cs_recheck=: ;; + --version | --vers* | -V ) + echo "$ac_cs_version"; exit 0 ;; + --he | --h) + # Conflict between --help and --header + { { echo "$as_me:$LINENO: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: ambiguous option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; };; + --help | --hel | -h ) + echo "$ac_cs_usage"; exit 0 ;; + --debug | --d* | -d ) + debug=: ;; + --file | --fil | --fi | --f ) + $ac_shift + CONFIG_FILES="$CONFIG_FILES $ac_optarg" + ac_need_defaults=false;; + --header | --heade | --head | --hea ) + $ac_shift + CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" + ac_need_defaults=false;; + -q | -quiet | --quiet | --quie | --qui | --qu | --q \ + | -silent | --silent | --silen | --sile | --sil | --si | --s) + ac_cs_silent=: ;; + + # This is an error. + -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&5 +echo "$as_me: error: unrecognized option: $1 +Try \`$0 --help' for more information." >&2;} + { (exit 1); exit 1; }; } ;; + + *) ac_config_targets="$ac_config_targets $1" ;; + + esac + shift +done + +ac_configure_extra_args= + +if $ac_cs_silent; then + exec 6>/dev/null + ac_configure_extra_args="$ac_configure_extra_args --silent" +fi + +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF +if \$ac_cs_recheck; then + echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 + exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion +fi + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF +# +# INIT-COMMANDS section. +# + +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" + +_ACEOF + + + +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_config_target in $ac_config_targets +do + case "$ac_config_target" in + # Handling of arguments. + "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; + "docs/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/Makefile" ;; + "docs/examples/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/examples/Makefile" ;; + "docs/libcurl/Makefile" ) CONFIG_FILES="$CONFIG_FILES docs/libcurl/Makefile" ;; + "include/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/Makefile" ;; + "include/curl/Makefile" ) CONFIG_FILES="$CONFIG_FILES include/curl/Makefile" ;; + "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; + "lib/Makefile" ) CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; + "tests/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; + "tests/data/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/data/Makefile" ;; + "tests/server/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/server/Makefile" ;; + "tests/libtest/Makefile" ) CONFIG_FILES="$CONFIG_FILES tests/libtest/Makefile" ;; + "packages/Makefile" ) CONFIG_FILES="$CONFIG_FILES packages/Makefile" ;; + "packages/Win32/Makefile" ) CONFIG_FILES="$CONFIG_FILES packages/Win32/Makefile" ;; + "packages/Win32/cygwin/Makefile" ) CONFIG_FILES="$CONFIG_FILES packages/Win32/cygwin/Makefile" ;; + "packages/Linux/Makefile" ) CONFIG_FILES="$CONFIG_FILES packages/Linux/Makefile" ;; + "packages/Linux/RPM/Makefile" ) CONFIG_FILES="$CONFIG_FILES packages/Linux/RPM/Makefile" ;; + "packages/Linux/RPM/curl.spec" ) CONFIG_FILES="$CONFIG_FILES packages/Linux/RPM/curl.spec" ;; + "packages/Linux/RPM/curl-ssl.spec" ) CONFIG_FILES="$CONFIG_FILES packages/Linux/RPM/curl-ssl.spec" ;; + "packages/Solaris/Makefile" ) CONFIG_FILES="$CONFIG_FILES packages/Solaris/Makefile" ;; + "packages/DOS/Makefile" ) CONFIG_FILES="$CONFIG_FILES packages/DOS/Makefile" ;; + "packages/EPM/curl.list" ) CONFIG_FILES="$CONFIG_FILES packages/EPM/curl.list" ;; + "packages/EPM/Makefile" ) CONFIG_FILES="$CONFIG_FILES packages/EPM/Makefile" ;; + "packages/vms/Makefile" ) CONFIG_FILES="$CONFIG_FILES packages/vms/Makefile" ;; + "curl-config" ) CONFIG_FILES="$CONFIG_FILES curl-config" ;; + "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; + "lib/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h" ;; + "src/config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS src/config.h" ;; + *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 +echo "$as_me: error: invalid argument: $ac_config_target" >&2;} + { (exit 1); exit 1; }; };; + esac +done + +# If the user did not use the arguments to specify the items to instantiate, +# then the envvar interface is used. Set only those that are not. +# We use the long form for the default assignment because of an extremely +# bizarre bug on SunOS 4.1.3. +if $ac_need_defaults; then + test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files + test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers + test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands +fi + +# Have a temporary directory for convenience. Make it in the build tree +# simply because there is no reason to put it here, and in addition, +# creating and moving files from /tmp can sometimes cause problems. +# Create a temporary directory, and hook for its removal unless debugging. +$debug || +{ + trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 + trap '{ (exit 1); exit 1; }' 1 2 13 15 +} + +# Create a (secure) tmp directory for tmp files. + +{ + tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && + test -n "$tmp" && test -d "$tmp" +} || +{ + tmp=./confstat$$-$RANDOM + (umask 077 && mkdir $tmp) +} || +{ + echo "$me: cannot create a temporary directory in ." >&2 + { (exit 1); exit 1; } +} + +_ACEOF + +cat >>$CONFIG_STATUS <<_ACEOF + +# +# CONFIG_FILES section. +# + +# No need to generate the scripts if there are no CONFIG_FILES. +# This happens for instance when ./config.status config.h +if test -n "\$CONFIG_FILES"; then + # Protect against being on the right side of a sed subst in config.status. + sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; + s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF +s,@SHELL@,$SHELL,;t t +s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t +s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t +s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t +s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t +s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t +s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t +s,@exec_prefix@,$exec_prefix,;t t +s,@prefix@,$prefix,;t t +s,@program_transform_name@,$program_transform_name,;t t +s,@bindir@,$bindir,;t t +s,@sbindir@,$sbindir,;t t +s,@libexecdir@,$libexecdir,;t t +s,@datadir@,$datadir,;t t +s,@sysconfdir@,$sysconfdir,;t t +s,@sharedstatedir@,$sharedstatedir,;t t +s,@localstatedir@,$localstatedir,;t t +s,@libdir@,$libdir,;t t +s,@includedir@,$includedir,;t t +s,@oldincludedir@,$oldincludedir,;t t +s,@infodir@,$infodir,;t t +s,@mandir@,$mandir,;t t +s,@build_alias@,$build_alias,;t t +s,@host_alias@,$host_alias,;t t +s,@target_alias@,$target_alias,;t t +s,@DEFS@,$DEFS,;t t +s,@ECHO_C@,$ECHO_C,;t t +s,@ECHO_N@,$ECHO_N,;t t +s,@ECHO_T@,$ECHO_T,;t t +s,@LIBS@,$LIBS,;t t +s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t +s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t +s,@MAINT@,$MAINT,;t t +s,@SED@,$SED,;t t +s,@AR@,$AR,;t t +s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t +s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t +s,@INSTALL_DATA@,$INSTALL_DATA,;t t +s,@CYGPATH_W@,$CYGPATH_W,;t t +s,@PACKAGE@,$PACKAGE,;t t +s,@VERSION@,$VERSION,;t t +s,@ACLOCAL@,$ACLOCAL,;t t +s,@AUTOCONF@,$AUTOCONF,;t t +s,@AUTOMAKE@,$AUTOMAKE,;t t +s,@AUTOHEADER@,$AUTOHEADER,;t t +s,@MAKEINFO@,$MAKEINFO,;t t +s,@AMTAR@,$AMTAR,;t t +s,@install_sh@,$install_sh,;t t +s,@STRIP@,$STRIP,;t t +s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t +s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t +s,@mkdir_p@,$mkdir_p,;t t +s,@AWK@,$AWK,;t t +s,@SET_MAKE@,$SET_MAKE,;t t +s,@am__leading_dot@,$am__leading_dot,;t t +s,@VERSIONNUM@,$VERSIONNUM,;t t +s,@PKGADD_PKG@,$PKGADD_PKG,;t t +s,@PKGADD_NAME@,$PKGADD_NAME,;t t +s,@PKGADD_VENDOR@,$PKGADD_VENDOR,;t t +s,@build@,$build,;t t +s,@build_cpu@,$build_cpu,;t t +s,@build_vendor@,$build_vendor,;t t +s,@build_os@,$build_os,;t t +s,@host@,$host,;t t +s,@host_cpu@,$host_cpu,;t t +s,@host_vendor@,$host_vendor,;t t +s,@host_os@,$host_os,;t t +s,@CC@,$CC,;t t +s,@CFLAGS@,$CFLAGS,;t t +s,@LDFLAGS@,$LDFLAGS,;t t +s,@CPPFLAGS@,$CPPFLAGS,;t t +s,@ac_ct_CC@,$ac_ct_CC,;t t +s,@EXEEXT@,$EXEEXT,;t t +s,@OBJEXT@,$OBJEXT,;t t +s,@DEPDIR@,$DEPDIR,;t t +s,@am__include@,$am__include,;t t +s,@am__quote@,$am__quote,;t t +s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t +s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t +s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t +s,@CCDEPMODE@,$CCDEPMODE,;t t +s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t +s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t +s,@CPP@,$CPP,;t t +s,@EGREP@,$EGREP,;t t +s,@LN_S@,$LN_S,;t t +s,@ECHO@,$ECHO,;t t +s,@ac_ct_AR@,$ac_ct_AR,;t t +s,@RANLIB@,$RANLIB,;t t +s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t +s,@DLLTOOL@,$DLLTOOL,;t t +s,@ac_ct_DLLTOOL@,$ac_ct_DLLTOOL,;t t +s,@AS@,$AS,;t t +s,@ac_ct_AS@,$ac_ct_AS,;t t +s,@OBJDUMP@,$OBJDUMP,;t t +s,@ac_ct_OBJDUMP@,$ac_ct_OBJDUMP,;t t +s,@CXX@,$CXX,;t t +s,@CXXFLAGS@,$CXXFLAGS,;t t +s,@ac_ct_CXX@,$ac_ct_CXX,;t t +s,@CXXDEPMODE@,$CXXDEPMODE,;t t +s,@am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t +s,@am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t +s,@CXXCPP@,$CXXCPP,;t t +s,@F77@,$F77,;t t +s,@FFLAGS@,$FFLAGS,;t t +s,@ac_ct_F77@,$ac_ct_F77,;t t +s,@LIBTOOL@,$LIBTOOL,;t t +s,@NO_UNDEFINED_TRUE@,$NO_UNDEFINED_TRUE,;t t +s,@NO_UNDEFINED_FALSE@,$NO_UNDEFINED_FALSE,;t t +s,@MIMPURE_TRUE@,$MIMPURE_TRUE,;t t +s,@MIMPURE_FALSE@,$MIMPURE_FALSE,;t t +s,@CURL_DISABLE_HTTP@,$CURL_DISABLE_HTTP,;t t +s,@CURL_DISABLE_GOPHER@,$CURL_DISABLE_GOPHER,;t t +s,@CURL_DISABLE_FTP@,$CURL_DISABLE_FTP,;t t +s,@CURL_DISABLE_FILE@,$CURL_DISABLE_FILE,;t t +s,@CURL_DISABLE_LDAP@,$CURL_DISABLE_LDAP,;t t +s,@CURL_DISABLE_DICT@,$CURL_DISABLE_DICT,;t t +s,@CURL_DISABLE_TELNET@,$CURL_DISABLE_TELNET,;t t +s,@IPV6_ENABLED@,$IPV6_ENABLED,;t t +s,@RANDOM_FILE@,$RANDOM_FILE,;t t +s,@KRB4_ENABLED@,$KRB4_ENABLED,;t t +s,@PKGCONFIG@,$PKGCONFIG,;t t +s,@OPENSSL_ENABLED@,$OPENSSL_ENABLED,;t t +s,@CURL_CA_BUNDLE@,$CURL_CA_BUNDLE,;t t +s,@CABUNDLE_TRUE@,$CABUNDLE_TRUE,;t t +s,@CABUNDLE_FALSE@,$CABUNDLE_FALSE,;t t +s,@HAVE_LIBZ@,$HAVE_LIBZ,;t t +s,@HAVE_LIBZ_TRUE@,$HAVE_LIBZ_TRUE,;t t +s,@HAVE_LIBZ_FALSE@,$HAVE_LIBZ_FALSE,;t t +s,@PERL@,$PERL,;t t +s,@NROFF@,$NROFF,;t t +s,@MANOPT@,$MANOPT,;t t +s,@YACC@,$YACC,;t t +s,@USE_MANUAL_TRUE@,$USE_MANUAL_TRUE,;t t +s,@USE_MANUAL_FALSE@,$USE_MANUAL_FALSE,;t t +s,@HAVE_ARES@,$HAVE_ARES,;t t +s,@subdirs@,$subdirs,;t t +s,@LIBOBJS@,$LIBOBJS,;t t +s,@LTLIBOBJS@,$LTLIBOBJS,;t t +CEOF + +_ACEOF + + cat >>$CONFIG_STATUS <<\_ACEOF + # Split the substitutions into bite-sized pieces for seds with + # small command number limits, like on Digital OSF/1 and HP-UX. + ac_max_sed_lines=48 + ac_sed_frag=1 # Number of current file. + ac_beg=1 # First line for current file. + ac_end=$ac_max_sed_lines # Line after last line for current file. + ac_more_lines=: + ac_sed_cmds= + while $ac_more_lines; do + if test $ac_beg -gt 1; then + sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + else + sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag + fi + if test ! -s $tmp/subs.frag; then + ac_more_lines=false + else + # The purpose of the label and of the branching condition is to + # speed up the sed processing (if there are no `@' at all, there + # is no need to browse any of the substitutions). + # These are the two extra sed commands mentioned above. + (echo ':t + /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed + if test -z "$ac_sed_cmds"; then + ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" + else + ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" + fi + ac_sed_frag=`expr $ac_sed_frag + 1` + ac_beg=$ac_end + ac_end=`expr $ac_end + $ac_max_sed_lines` + fi + done + if test -z "$ac_sed_cmds"; then + ac_sed_cmds=cat + fi +fi # test -n "$CONFIG_FILES" + +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + case $INSTALL in + [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; + *) ac_INSTALL=$ac_top_builddir$INSTALL ;; + esac + + if test x"$ac_file" != x-; then + { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + rm -f "$ac_file" + fi + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + configure_input= + else + configure_input="$ac_file. " + fi + configure_input=$configure_input"Generated from `echo $ac_file_in | + sed 's,.*/,,'` by configure." + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } +_ACEOF +cat >>$CONFIG_STATUS <<_ACEOF + sed "$ac_vpsub +$extrasub +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF +:t +/@[a-zA-Z_][a-zA-Z_0-9]*@/!b +s,@configure_input@,$configure_input,;t t +s,@srcdir@,$ac_srcdir,;t t +s,@abs_srcdir@,$ac_abs_srcdir,;t t +s,@top_srcdir@,$ac_top_srcdir,;t t +s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t +s,@builddir@,$ac_builddir,;t t +s,@abs_builddir@,$ac_abs_builddir,;t t +s,@top_builddir@,$ac_top_builddir,;t t +s,@abs_top_builddir@,$ac_abs_top_builddir,;t t +s,@INSTALL@,$ac_INSTALL,;t t +" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out + rm -f $tmp/stdin + if test x"$ac_file" != x-; then + mv $tmp/out $ac_file + else + cat $tmp/out + rm -f $tmp/out + fi + +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_HEADER section. +# + +# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where +# NAME is the cpp macro being defined and VALUE is the value it is being given. +# +# ac_d sets the value in "#define NAME VALUE" lines. +ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' +ac_dB='[ ].*$,\1#\2' +ac_dC=' ' +ac_dD=',;t' +# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". +ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' +ac_uB='$,\1#\2define\3' +ac_uC=' ' +ac_uD=',;t' + +for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue + # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". + case $ac_file in + - | *:- | *:-:* ) # input from stdin + cat >$tmp/stdin + ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; + * ) ac_file_in=$ac_file.in ;; + esac + + test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 +echo "$as_me: creating $ac_file" >&6;} + + # First look for the input files in the build tree, otherwise in the + # src tree. + ac_file_inputs=`IFS=: + for f in $ac_file_in; do + case $f in + -) echo $tmp/stdin ;; + [\\/$]*) + # Absolute (can't be DOS-style, as IFS=:) + test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + # Do quote $f, to prevent DOS paths from being IFS'd. + echo "$f";; + *) # Relative + if test -f "$f"; then + # Build tree + echo "$f" + elif test -f "$srcdir/$f"; then + # Source tree + echo "$srcdir/$f" + else + # /dev/null tree + { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 +echo "$as_me: error: cannot find input file: $f" >&2;} + { (exit 1); exit 1; }; } + fi;; + esac + done` || { (exit 1); exit 1; } + # Remove the trailing spaces. + sed 's/[ ]*$//' $ac_file_inputs >$tmp/in + +_ACEOF + +# Transform confdefs.h into two sed scripts, `conftest.defines' and +# `conftest.undefs', that substitutes the proper values into +# config.h.in to produce config.h. The first handles `#define' +# templates, and the second `#undef' templates. +# And first: Protect against being on the right side of a sed subst in +# config.status. Protect against being in an unquoted here document +# in config.status. +rm -f conftest.defines conftest.undefs +# Using a here document instead of a string reduces the quoting nightmare. +# Putting comments in sed scripts is not portable. +# +# `end' is used to avoid that the second main sed command (meant for +# 0-ary CPP macros) applies to n-ary macro definitions. +# See the Autoconf documentation for `clear'. +cat >confdef2sed.sed <<\_ACEOF +s/[\\&,]/\\&/g +s,[\\$`],\\&,g +t clear +: clear +s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp +t end +s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp +: end +_ACEOF +# If some macros were called several times there might be several times +# the same #defines, which is useless. Nevertheless, we may not want to +# sort them, since we want the *last* AC-DEFINE to be honored. +uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines +sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs +rm -f confdef2sed.sed + +# This sed command replaces #undef with comments. This is necessary, for +# example, in the case of _POSIX_SOURCE, which is predefined and required +# on some systems where configure will not decide to define it. +cat >>conftest.undefs <<\_ACEOF +s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, +_ACEOF + +# Break up conftest.defines because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS +echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS +echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS +echo ' :' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.defines >/dev/null +do + # Write a limited-size here document to $tmp/defines.sed. + echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#define' lines. + echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/defines.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail + rm -f conftest.defines + mv conftest.tail conftest.defines +done +rm -f conftest.defines +echo ' fi # grep' >>$CONFIG_STATUS +echo >>$CONFIG_STATUS + +# Break up conftest.undefs because some shells have a limit on the size +# of here documents, and old seds have small limits too (100 cmds). +echo ' # Handle all the #undef templates' >>$CONFIG_STATUS +rm -f conftest.tail +while grep . conftest.undefs >/dev/null +do + # Write a limited-size here document to $tmp/undefs.sed. + echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS + # Speed up: don't consider the non `#undef' + echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS + # Work around the forget-to-reset-the-flag bug. + echo 't clr' >>$CONFIG_STATUS + echo ': clr' >>$CONFIG_STATUS + sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS + echo 'CEOF + sed -f $tmp/undefs.sed $tmp/in >$tmp/out + rm -f $tmp/in + mv $tmp/out $tmp/in +' >>$CONFIG_STATUS + sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail + rm -f conftest.undefs + mv conftest.tail conftest.undefs +done +rm -f conftest.undefs + +cat >>$CONFIG_STATUS <<\_ACEOF + # Let's still pretend it is `configure' which instantiates (i.e., don't + # use $as_me), people would be surprised to read: + # /* config.h. Generated by config.status. */ + if test x"$ac_file" = x-; then + echo "/* Generated by configure. */" >$tmp/config.h + else + echo "/* $ac_file. Generated by configure. */" >$tmp/config.h + fi + cat $tmp/in >>$tmp/config.h + rm -f $tmp/in + if test x"$ac_file" != x-; then + if diff $ac_file $tmp/config.h >/dev/null 2>&1; then + { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 +echo "$as_me: $ac_file is unchanged" >&6;} + else + ac_dir=`(dirname "$ac_file") 2>/dev/null || +$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_file" : 'X\(//\)[^/]' \| \ + X"$ac_file" : 'X\(//\)$' \| \ + X"$ac_file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + rm -f $ac_file + mv $tmp/config.h $ac_file + fi + else + cat $tmp/config.h + rm -f $tmp/config.h + fi +# Compute $ac_file's index in $config_headers. +_am_stamp_count=1 +for _am_header in $config_headers :; do + case $_am_header in + $ac_file | $ac_file:* ) + break ;; + * ) + _am_stamp_count=`expr $_am_stamp_count + 1` ;; + esac +done +echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || +$as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X$ac_file : 'X\(//\)[^/]' \| \ + X$ac_file : 'X\(//\)$' \| \ + X$ac_file : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X$ac_file | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'`/stamp-h$_am_stamp_count +done +_ACEOF +cat >>$CONFIG_STATUS <<\_ACEOF + +# +# CONFIG_COMMANDS section. +# +for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue + ac_dest=`echo "$ac_file" | sed 's,:.*,,'` + ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` + ac_dir=`(dirname "$ac_dest") 2>/dev/null || +$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$ac_dest" : 'X\(//\)[^/]' \| \ + X"$ac_dest" : 'X\(//\)$' \| \ + X"$ac_dest" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$ac_dest" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 +echo "$as_me: executing $ac_dest commands" >&6;} + case $ac_dest in + depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do + # Strip MF so we end up with the name of the file. + mf=`echo "$mf" | sed -e 's/:.*$//'` + # Check whether this is an Automake generated Makefile or not. + # We used to match only the files named `Makefile.in', but + # some people rename them; so instead we look at the file content. + # Grep'ing the first line is not enough: some people post-process + # each Makefile.in and add a new line on top of each file to say so. + # So let's grep whole file. + if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then + dirpart=`(dirname "$mf") 2>/dev/null || +$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$mf" : 'X\(//\)[^/]' \| \ + X"$mf" : 'X\(//\)$' \| \ + X"$mf" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$mf" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + else + continue + fi + grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue + # Extract the definition of DEP_FILES from the Makefile without + # running `make'. + DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` + test -z "$DEPDIR" && continue + # When using ansi2knr, U may be empty or an underscore; expand it + U=`sed -n 's/^U = //p' < "$mf"` + test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" + # We invoke sed twice because it is the simplest approach to + # changing $(DEPDIR) to its actual value in the expansion. + for file in `sed -n ' + /^DEP_FILES = .*\\\\$/ { + s/^DEP_FILES = // + :loop + s/\\\\$// + p + n + /\\\\$/ b loop + p + } + /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ + sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do + # Make sure the directory exists. + test -f "$dirpart/$file" && continue + fdir=`(dirname "$file") 2>/dev/null || +$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$file" : 'X\(//\)[^/]' \| \ + X"$file" : 'X\(//\)$' \| \ + X"$file" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$file" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + { if $as_mkdir_p; then + mkdir -p $dirpart/$fdir + else + as_dir=$dirpart/$fdir + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 +echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} + { (exit 1); exit 1; }; }; } + + # echo "creating $dirpart/$file" + echo '# dummy' > "$dirpart/$file" + done +done + ;; + esac +done +_ACEOF + +cat >>$CONFIG_STATUS <<\_ACEOF + +{ (exit 0); exit 0; } +_ACEOF +chmod +x $CONFIG_STATUS +ac_clean_files=$ac_clean_files_save + + +# configure is writing to config.log, and then calls config.status. +# config.status does its own redirection, appending to config.log. +# Unfortunately, on DOS this fails, as config.log is still kept open +# by configure, so config.status won't be able to write to it; its +# output is simply discarded. So we exec the FD to /dev/null, +# effectively closing config.log, so it can be properly (re)opened and +# appended to by config.status. When coming back to configure, we +# need to make the FD available again. +if test "$no_create" != yes; then + ac_cs_success=: + ac_config_status_args= + test "$silent" = yes && + ac_config_status_args="$ac_config_status_args --quiet" + exec 5>/dev/null + $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false + exec 5>>config.log + # Use ||, not &&, to avoid exiting from the if with $? = 1, which + # would make configure fail if this is the last instruction. + $ac_cs_success || { (exit 1); exit 1; } +fi + +# +# CONFIG_SUBDIRS section. +# +if test "$no_recursion" != yes; then + + # Remove --cache-file and --srcdir arguments so they do not pile up. + ac_sub_configure_args= + ac_prev= + for ac_arg in $ac_configure_args; do + if test -n "$ac_prev"; then + ac_prev= + continue + fi + case $ac_arg in + -cache-file | --cache-file | --cache-fil | --cache-fi \ + | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) + ac_prev=cache_file ;; + -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ + | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ + | --c=*) + ;; + --config-cache | -C) + ;; + -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) + ac_prev=srcdir ;; + -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) + ;; + -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) + ac_prev=prefix ;; + -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) + ;; + *) ac_sub_configure_args="$ac_sub_configure_args $ac_arg" ;; + esac + done + + # Always prepend --prefix to ensure using the same prefix + # in subdir configurations. + ac_sub_configure_args="--prefix=$prefix $ac_sub_configure_args" + + ac_popdir=`pwd` + for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue + + # Do not complain, so a configure script can configure whichever + # parts of a large source tree are present. + test -d $srcdir/$ac_dir || continue + + { echo "$as_me:$LINENO: configuring in $ac_dir" >&5 +echo "$as_me: configuring in $ac_dir" >&6;} + { if $as_mkdir_p; then + mkdir -p "$ac_dir" + else + as_dir="$ac_dir" + as_dirs= + while test ! -d "$as_dir"; do + as_dirs="$as_dir $as_dirs" + as_dir=`(dirname "$as_dir") 2>/dev/null || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| \ + . : '\(.\)' 2>/dev/null || +echo X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } + /^X\(\/\/\)[^/].*/{ s//\1/; q; } + /^X\(\/\/\)$/{ s//\1/; q; } + /^X\(\/\).*/{ s//\1/; q; } + s/.*/./; q'` + done + test ! -n "$as_dirs" || mkdir $as_dirs + fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 +echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} + { (exit 1); exit 1; }; }; } + + ac_builddir=. + +if test "$ac_dir" != .; then + ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` + # A "../" for each directory in $ac_dir_suffix. + ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` +else + ac_dir_suffix= ac_top_builddir= +fi + +case $srcdir in + .) # No --srcdir option. We are building in place. + ac_srcdir=. + if test -z "$ac_top_builddir"; then + ac_top_srcdir=. + else + ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` + fi ;; + [\\/]* | ?:[\\/]* ) # Absolute path. + ac_srcdir=$srcdir$ac_dir_suffix; + ac_top_srcdir=$srcdir ;; + *) # Relative path. + ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix + ac_top_srcdir=$ac_top_builddir$srcdir ;; +esac + +# Do not use `cd foo && pwd` to compute absolute paths, because +# the directories may not exist. +case `pwd` in +.) ac_abs_builddir="$ac_dir";; +*) + case "$ac_dir" in + .) ac_abs_builddir=`pwd`;; + [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";; + *) ac_abs_builddir=`pwd`/"$ac_dir";; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_builddir=${ac_top_builddir}.;; +*) + case ${ac_top_builddir}. in + .) ac_abs_top_builddir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;; + *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_srcdir=$ac_srcdir;; +*) + case $ac_srcdir in + .) ac_abs_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;; + *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;; + esac;; +esac +case $ac_abs_builddir in +.) ac_abs_top_srcdir=$ac_top_srcdir;; +*) + case $ac_top_srcdir in + .) ac_abs_top_srcdir=$ac_abs_builddir;; + [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;; + *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;; + esac;; +esac + + + cd $ac_dir + + # Check for guested configure; otherwise get Cygnus style configure. + if test -f $ac_srcdir/configure.gnu; then + ac_sub_configure="$SHELL '$ac_srcdir/configure.gnu'" + elif test -f $ac_srcdir/configure; then + ac_sub_configure="$SHELL '$ac_srcdir/configure'" + elif test -f $ac_srcdir/configure.in; then + ac_sub_configure=$ac_configure + else + { echo "$as_me:$LINENO: WARNING: no configuration information is in $ac_dir" >&5 +echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} + ac_sub_configure= + fi + + # The recursion is here. + if test -n "$ac_sub_configure"; then + # Make the cache file name correct relative to the subdirectory. + case $cache_file in + [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; + *) # Relative path. + ac_sub_cache_file=$ac_top_builddir$cache_file ;; + esac + + { echo "$as_me:$LINENO: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 +echo "$as_me: running $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} + # The eval makes quoting arguments work. + eval $ac_sub_configure $ac_sub_configure_args \ + --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir || + { { echo "$as_me:$LINENO: error: $ac_sub_configure failed for $ac_dir" >&5 +echo "$as_me: error: $ac_sub_configure failed for $ac_dir" >&2;} + { (exit 1); exit 1; }; } + fi + + cd $ac_popdir + done +fi + diff --git a/neo/curl/configure.ac b/neo/curl/configure.ac new file mode 100644 index 0000000..a635874 --- /dev/null +++ b/neo/curl/configure.ac @@ -0,0 +1,1274 @@ +dnl $Id: configure.ac,v 1.62 2004/03/18 10:03:34 bagder Exp $ +dnl Process this file with autoconf to produce a configure script. + +AC_PREREQ(2.57) + +dnl We don't know the version number "staticly" so we use a dash here +AC_INIT(curl, [-], [curl-bug@haxx.se]) + +dnl configure script copyright +AC_COPYRIGHT([Copyright (c) 1998 - 2004 Daniel Stenberg, +This configure script may be copied, distributed and modified under the +terms of the curl license; see COPYING for more details]) + +AC_CONFIG_SRCDIR([lib/urldata.h]) +AM_CONFIG_HEADER(lib/config.h src/config.h) +AM_MAINTAINER_MODE + +dnl SED is needed by some of the tools +AC_PATH_PROG( SED, sed, , $PATH:/usr/bin:/usr/local/bin) +AC_SUBST(SED) + +dnl AR is used by libtool, and try the odd Solaris path too +AC_PATH_PROG( AR, ar, , $PATH:/usr/bin:/usr/local/bin:/usr/ccs/bin) +AC_SUBST(AR) + +dnl figure out the libcurl version +VERSION=`$SED -ne 's/^#define LIBCURL_VERSION "\(.*\)"/\1/p' ${srcdir}/include/curl/curl.h` +AM_INIT_AUTOMAKE(curl,$VERSION) +AC_MSG_CHECKING([curl version]) +AC_MSG_RESULT($VERSION) + +dnl +dnl we extract the numerical version for curl-config only +VERSIONNUM=`$SED -ne 's/^#define LIBCURL_VERSION_NUM 0x\(.*\)/\1/p' ${srcdir}/include/curl/curl.h` +AC_SUBST(VERSIONNUM) + +dnl Solaris pkgadd support definitions +PKGADD_PKG="HAXXcurl" +PKGADD_NAME="cURL - a client that groks URLs" +PKGADD_VENDOR="curl.haxx.se" +AC_SUBST(PKGADD_PKG) +AC_SUBST(PKGADD_NAME) +AC_SUBST(PKGADD_VENDOR) + + +dnl +dnl Detect the canonical host and target build environment +dnl + +AC_CANONICAL_HOST +dnl Get system canonical name +AC_DEFINE_UNQUOTED(OS, "${host}", [cpu-machine-OS]) + +dnl Check for AIX weirdos +AC_AIX + +dnl Checks for programs. +AC_PROG_CC + +dnl check for how to do large files +AC_SYS_LARGEFILE + +dnl check for cygwin stuff +AC_LIBTOOL_WIN32_DLL + +dnl libtool setup +AM_PROG_LIBTOOL + +AC_MSG_CHECKING([if we need -no-undefined]) +case $host in + *-*-cygwin | *-*-mingw* | *-*-pw32*) + need_no_undefined=yes + ;; + *) + need_no_undefined=no + ;; +esac +AC_MSG_RESULT($need_no_undefined) +AM_CONDITIONAL(NO_UNDEFINED, test x$need_no_undefined = xyes) + +AC_MSG_CHECKING([if we need -mimpure-text]) +case $host in + *-*-solaris2*) + if test "$GCC" = "yes"; then + mimpure="yes" + fi + ;; + *) + mimpure=no + ;; +esac +AC_MSG_RESULT($mimpure) +AM_CONDITIONAL(MIMPURE, test x$mimpure = xyes) + +dnl The install stuff has already been taken care of by the automake stuff +dnl AC_PROG_INSTALL +AC_PROG_MAKE_SET + +dnl ************************************************************ +dnl switch off particular protocols +dnl +AC_MSG_CHECKING([whether to support http]) +AC_ARG_ENABLE(http, +AC_HELP_STRING([--enable-http],[Enable HTTP support]) +AC_HELP_STRING([--disable-http],[Disable HTTP support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_HTTP, 1, [to disable HTTP]) + AC_MSG_WARN([disable HTTP disables FTP over proxy and GOPHER too]) + AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable GOPHER]) + AC_SUBST(CURL_DISABLE_HTTP) + AC_SUBST(CURL_DISABLE_GOPHER) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) +AC_MSG_CHECKING([whether to support ftp]) +AC_ARG_ENABLE(ftp, +AC_HELP_STRING([--enable-ftp],[Enable FTP support]) +AC_HELP_STRING([--disable-ftp],[Disable FTP support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_FTP, 1, [to disable FTP]) + AC_SUBST(CURL_DISABLE_FTP) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) +AC_MSG_CHECKING([whether to support gopher]) +AC_ARG_ENABLE(gopher, +AC_HELP_STRING([--enable-gopher],[Enable GOPHER support]) +AC_HELP_STRING([--disable-gopher],[Disable GOPHER support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_GOPHER, 1, [to disable GOPHER]) + AC_SUBST(CURL_DISABLE_GOPHER) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) +AC_MSG_CHECKING([whether to support file]) +AC_ARG_ENABLE(file, +AC_HELP_STRING([--enable-file],[Enable FILE support]) +AC_HELP_STRING([--disable-file],[Disable FILE support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_FILE, 1, [to disable FILE]) + AC_SUBST(CURL_DISABLE_FILE) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) +AC_MSG_CHECKING([whether to support ldap]) +AC_ARG_ENABLE(ldap, +AC_HELP_STRING([--enable-ldap],[Enable LDAP support]) +AC_HELP_STRING([--disable-ldap],[Disable LDAP support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_LDAP, 1, [to disable LDAP]) + AC_SUBST(CURL_DISABLE_LDAP) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) +AC_MSG_CHECKING([whether to support dict]) +AC_ARG_ENABLE(dict, +AC_HELP_STRING([--enable-dict],[Enable DICT support]) +AC_HELP_STRING([--disable-dict],[Disable DICT support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_DICT, 1, [to disable DICT]) + AC_SUBST(CURL_DISABLE_DICT) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) +AC_MSG_CHECKING([whether to support telnet]) +AC_ARG_ENABLE(telnet, +AC_HELP_STRING([--enable-telnet],[Enable TELNET support]) +AC_HELP_STRING([--disable-telnet],[Disable TELNET support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + AC_DEFINE(CURL_DISABLE_TELNET, 1, [to disable TELNET]) + AC_SUBST(CURL_DISABLE_TELNET) + ;; + *) AC_MSG_RESULT(yes) + ;; + esac ], + AC_MSG_RESULT(yes) +) + +dnl ********************************************************************** +dnl Check for built-in manual +dnl ********************************************************************** + +AC_MSG_CHECKING([whether to provide built-in manual]) +AC_ARG_ENABLE(manual, +AC_HELP_STRING([--enable-manual],[Enable built-in manual]) +AC_HELP_STRING([--disable-manual],[Disable built-in manual]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + ;; + *) AC_MSG_RESULT(yes) + USE_MANUAL="1" + ;; + esac ], + AC_MSG_RESULT(yes) + USE_MANUAL="1" +) +dnl The actual use of the USE_MANUAL variable is done much later in this +dnl script to allow other actions to disable it as well. + + +dnl ********************************************************************** +dnl Checks for libraries. +dnl ********************************************************************** + +dnl gethostbyname without lib or in the nsl lib? +AC_CHECK_FUNC(gethostbyname, + [HAVE_GETHOSTBYNAME="1" + ], + [ AC_CHECK_LIB(nsl, gethostbyname, + [HAVE_GETHOSTBYNAME="1" + LIBS="$LIBS -lnsl" + ]) + ]) + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + dnl gethostbyname in the socket lib? + AC_CHECK_LIB(socket, gethostbyname, + [HAVE_GETHOSTBYNAME="1" + LIBS="$LIBS -lsocket" + ]) +fi + +dnl At least one system has been identified to require BOTH nsl and socket +dnl libs at the same time to link properly. +if test "$HAVE_GETHOSTBYNAME" != "1" +then + AC_MSG_CHECKING([trying gethostbyname with both nsl and socket libs]) + my_ac_save_LIBS=$LIBS + LIBS="-lnsl -lsocket $LIBS" + AC_TRY_LINK( , + [gethostbyname();], + [ dnl found it! + HAVE_GETHOSTBYNAME="1", + AC_MSG_RESULT([yes])], + [ dnl failed! + AC_MSG_RESULT([no]) + dnl restore LIBS + LIBS=$my_ac_save_LIBS] + ) +fi + +if test "$HAVE_GETHOSTBYNAME" != "1" +then + dnl This is for Msys/Mingw + AC_MSG_CHECKING([for gethostbyname in ws2_32]) + my_ac_save_LIBS=$LIBS + LIBS="-lws2_32 $LIBS" + AC_TRY_LINK([#include ], + [gethostbyname("www.dummysite.com");], + [ dnl worked! + AC_MSG_RESULT([yes]) + HAVE_GETHOSTBYNAME="1"], + [ dnl failed, restore LIBS + LIBS=$my_ac_save_LIBS + AC_MSG_RESULT(no)] + ) +fi + +if test "$HAVE_GETHOSTBYNAME" = "1"; then + AC_DEFINE(HAVE_GETHOSTBYNAME, 1, [If you have gethostbyname]) +else + AC_MSG_ERROR([couldn't find libraries for gethostbyname()]) +fi + +dnl resolve lib? +AC_CHECK_FUNC(strcasecmp, , [ AC_CHECK_LIB(resolve, strcasecmp) ]) + +if test "$ac_cv_lib_resolve_strcasecmp" = "$ac_cv_func_strcasecmp"; then + AC_CHECK_LIB(resolve, strcasecmp, + [LIBS="-lresolve $LIBS"], + , + -lnsl) +fi + +dnl socket lib? +AC_CHECK_FUNC(connect, , [ AC_CHECK_LIB(socket, connect) ]) + +dnl dl lib? +AC_CHECK_FUNC(dlclose, , [ AC_CHECK_LIB(dl, dlopen) ]) + +AC_MSG_CHECKING([whether to use libgcc]) +AC_ARG_ENABLE(libgcc, +AC_HELP_STRING([--enable-libgcc],[use libgcc when linking]), +[ case "$enableval" in + yes) + LIBS="$LIBS -lgcc" + AC_MSG_RESULT(yes) + ;; + *) AC_MSG_RESULT(no) + ;; + esac ], + AC_MSG_RESULT(no) +) + +dnl ********************************************************************** +dnl Check for the presence of the winmm library. +dnl ********************************************************************** + +AC_MSG_CHECKING([for timeGetTime in winmm]) +my_ac_save_LIBS=$LIBS +LIBS="-lwinmm $LIBS" +AC_TRY_LINK([#include + #include + ], + [timeGetTime();], + [ dnl worked! + AC_MSG_RESULT([yes]) + ], + [ dnl failed, restore LIBS + LIBS=$my_ac_save_LIBS + AC_MSG_RESULT(no)] + ) + +dnl ********************************************************************** +dnl Checks for IPv6 +dnl ********************************************************************** + +AC_MSG_CHECKING([whether to enable ipv6]) +AC_ARG_ENABLE(ipv6, +AC_HELP_STRING([--enable-ipv6],[Enable ipv6 (with ipv4) support]) +AC_HELP_STRING([--disable-ipv6],[Disable ipv6 support]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + ipv6=no + ;; + *) AC_MSG_RESULT(yes) + ipv6=yes + ;; + esac ], + + AC_TRY_RUN([ /* is AF_INET6 available? */ +#include +#include +main() +{ + if (socket(AF_INET6, SOCK_STREAM, 0) < 0) + exit(1); + else + exit(0); +} +], + AC_MSG_RESULT(yes) + ipv6=yes, + AC_MSG_RESULT(no) + ipv6=no, + AC_MSG_RESULT(no) + ipv6=no +)) + +if test "$ipv6" = "yes"; then + CURL_CHECK_WORKING_GETADDRINFO +fi + +dnl ********************************************************************** +dnl Check how non-blocking sockets are set +dnl ********************************************************************** +AC_ARG_ENABLE(nonblocking, +AC_HELP_STRING([--enable-nonblocking],[Enable detecting how to do it]) +AC_HELP_STRING([--disable-nonblocking],[Disable non-blocking socket detection]), +[ + if test "$enableval" = "no" ; then + AC_MSG_WARN([non-blocking sockets disabled]) + AC_DEFINE(HAVE_DISABLED_NONBLOCKING, 1, + [to disable NON-BLOCKING connections]) + else + CURL_CHECK_NONBLOCKING_SOCKET + fi +], +[ + CURL_CHECK_NONBLOCKING_SOCKET +]) + +dnl ********************************************************************** +dnl Check for the random seed preferences +dnl ********************************************************************** + +AC_ARG_WITH(egd-socket, +AC_HELP_STRING([--with-egd-socket=FILE], + [Entropy Gathering Daemon socket pathname]), + [ EGD_SOCKET="$withval" ] +) +if test -n "$EGD_SOCKET" ; then + AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET", + [your Entropy Gathering Daemon socket pathname] ) +fi + +dnl Check for user-specified random device +AC_ARG_WITH(random, +AC_HELP_STRING([--with-random=FILE],[read randomness from FILE (default=/dev/urandom)]), + [ RANDOM_FILE="$withval" ], + [ + dnl Check for random device + AC_CHECK_FILE("/dev/urandom", [ RANDOM_FILE="/dev/urandom"] ) + ] +) +if test -n "$RANDOM_FILE" ; then + AC_SUBST(RANDOM_FILE) + AC_DEFINE_UNQUOTED(RANDOM_FILE, "$RANDOM_FILE", + [a suitable file to read random data from]) +fi + +dnl ********************************************************************** +dnl Check if the operating system allows programs to write to their own argv[] +dnl ********************************************************************** + +AC_MSG_CHECKING([if argv can be written to]) +AC_CACHE_VAL(curl_cv_writable_argv, [ +AC_RUN_IFELSE([[ +int main(int argc, char ** argv) { + argv[0][0] = ' '; + return (argv[0][0] == ' ')?0:1; +} + ]], + curl_cv_writable_argv=yes, + curl_cv_writable_argv=no, + curl_cv_writable_argv=cross) +]) +case $curl_cv_writable_argv in +yes) + AC_DEFINE(HAVE_WRITABLE_ARGV, 1, [Define this symbol if your OS supports changing the contents of argv]) + AC_MSG_RESULT(yes) + ;; +no) + AC_MSG_RESULT(no) + ;; +*) + AC_MSG_RESULT(no) + AC_MSG_WARN([the previous check could not be made default was used]) + ;; +esac + +dnl ********************************************************************** +dnl Check for the presence of Kerberos4 libraries and headers +dnl ********************************************************************** + +AC_ARG_WITH(krb4-includes, +AC_HELP_STRING([--with-krb4-includes=DIR], + [Specify location of kerberos4 headers]),[ + CPPFLAGS="$CPPFLAGS -I$withval" + KRB4INC="$withval" + want_krb4=yes + ]) + +AC_ARG_WITH(krb4-libs, +AC_HELP_STRING([--with-krb4-libs=DIR],[Specify location of kerberos4 libs]),[ + LDFLAGS="$LDFLAGS -L$withval" + KRB4LIB="$withval" + want_krb4=yes + ]) + + +OPT_KRB4=off +AC_ARG_WITH(krb4,dnl +AC_HELP_STRING([--with-krb4=DIR],[where to look for Kerberos4]),[ + OPT_KRB4="$withval" + if test X"$OPT_KRB4" != Xyes + then + LDFLAGS="$LDFLAGS -L$OPT_KRB4/lib$libsuff" + KRB4LIB="$OPT_KRB4/lib$libsuff" + CPPFLAGS="$CPPFLAGS -I$OPT_KRB4/include" + KRB4INC="$OPT_KRB4/include" + fi + want_krb4="yes" + ]) + +AC_MSG_CHECKING([if Kerberos4 support is requested]) + +if test "$want_krb4" = yes +then + if test "$ipv6" = "yes"; then + echo krb4 is not compatible with IPv6 + exit 1 + fi + AC_MSG_RESULT(yes) + + dnl Check for & handle argument to --with-krb4 + + AC_MSG_CHECKING(where to look for Kerberos4) + if test X"$OPT_KRB4" = Xyes + then + AC_MSG_RESULT([defaults]) + else + AC_MSG_RESULT([libs in $KRB4LIB, headers in $KRB4INC]) + fi + + dnl Check for DES library + AC_CHECK_LIB(des, des_pcbc_encrypt, + [ + AC_CHECK_HEADERS(des.h) + + dnl resolv lib? + AC_CHECK_FUNC(res_search, , [AC_CHECK_LIB(resolv, res_search)]) + + dnl Check for the Kerberos4 library + AC_CHECK_LIB(krb, krb_net_read, + [ + dnl Check for header files + AC_CHECK_HEADERS(krb.h) + + dnl we found the required libraries, add to LIBS + LIBS="-lkrb -ldes $LIBS" + + dnl Check for function krb_get_our_ip_for_realm + dnl this is needed for NAT networks + AC_CHECK_FUNCS(krb_get_our_ip_for_realm) + + dnl add define KRB4 + AC_DEFINE(HAVE_KRB4, 1, + [if you have the Kerberos4 libraries (including -ldes)]) + + dnl substitute it too! + KRB4_ENABLED=1 + AC_SUBST(KRB4_ENABLED) + + dnl the krb4 stuff needs a strlcpy() + AC_CHECK_FUNCS(strlcpy) + + ]) + ]) +else + AC_MSG_RESULT(no) +fi + +dnl ********************************************************************** +dnl Check for FBopenssl(SPNEGO) libraries +dnl ********************************************************************** + +AC_ARG_WITH(spnego, + AC_HELP_STRING([--with-spnego=DIR], + [Specify location of SPNEGO library fbopenssl]), + [ SPNEGO_ROOT="$withval" + want_spnego="yes" ] +) +AC_MSG_CHECKING([if SPNEGO support is requested]) +if test x"$want_spnego" = xyes; then + + if test X"$SPNEGO_ROOT" = Xyes; then + AC_MSG_ERROR([FBOpenSSL libs and/or directories were not found where specified!]) + AC_MSG_RESULT(no) + else + if test -z "$SPNEGO_LIB_DIR"; then + LDFLAGS="$LDFLAGS -L$SPNEGO_ROOT -lfbopenssl" + else + LDFLAGS="$LDFLAGS $SPNEGO_LIB_DIR" + fi + + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SPNEGO, 1, [Define this if you have the SPNEGO library fbopenssl]) + fi +else + AC_MSG_RESULT(no) +fi + +dnl ********************************************************************** +dnl Check for GSS-API libraries +dnl ********************************************************************** + +AC_ARG_WITH(gssapi-includes, + AC_HELP_STRING([--with-gssapi-includes=DIR], + [Specify location of GSSAPI header]), + [ GSSAPI_INCS="-I$withval" + want_gss="yes" ] +) + +AC_ARG_WITH(gssapi-libs, + AC_HELP_STRING([--with-gssapi-libs=DIR], + [Specify location of GSSAPI libs]), + [ GSSAPI_LIBS="-L$withval -lgssapi" + want_gss="yes" ] +) + +AC_ARG_WITH(gssapi, + AC_HELP_STRING([--with-gssapi=DIR], + [Where to look for GSSAPI]), + [ GSSAPI_ROOT="$withval" + want_gss="yes" ] +) + +AC_MSG_CHECKING([if GSSAPI support is requested]) +if test x"$want_gss" = xyes; then + if test -z "$GSSAPI_INCS"; then + if test -f "$GSSAPI_ROOT/bin/krb5-config"; then + GSSAPI_INCS=`$GSSAPI_ROOT/bin/krb5-config --cflags gssapi` + else + GSSAPI_INCS="-I$GSSAPI_ROOT/include" + fi + fi + CPPFLAGS="$CPPFLAGS $GSSAPI_INCS" + + if test -z "$GSSAPI_LIB_DIR"; then + if test -f "$GSSAPI_ROOT/bin/krb5-config"; then + gss_ldflags=`$GSSAPI_ROOT/bin/krb5-config --libs gssapi` + LDFLAGS="$LDFLAGS $gss_ldflags" + else + LDFLAGS="$LDFLAGS -L$GSSAPI_ROOT/lib$libsuff -lgssapi" + fi + else + LDFLAGS="$LDFLAGS $GSSAPI_LIB_DIR" + fi + + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_GSSAPI, 1, [if you have the gssapi libraries]) + + if test -n "$GSSAPI_INCS"; then + # cut off the preceding -I from the include path + GSSAPI_INCS=`echo $GSSAPI_INCS | sed -e s/^-I//g` + fi + + if test -f "$GSSAPI_INCS/gssapi.h"; then + AC_DEFINE(HAVE_GSSHEIMDAL, 1, [if you have the Heimdal gssapi libraries]) + else + AC_DEFINE(HAVE_GSSMIT, 1, [if you have the MIT gssapi libraries]) + fi + +else + AC_MSG_RESULT(no) +fi + + +dnl Detect the pkg-config tool, as it may have extra info about the +dnl openssl installation we can use. I *believe* this is what we are +dnl expected to do on really recent Redhat Linux hosts. +AC_PATH_PROG( PKGCONFIG, pkg-config, no, $PATH:/usr/bin:/usr/local/bin) +if test "$PKGCONFIG" != "no" ; then + AC_MSG_CHECKING([for OpenSSL options using pkg-config]) + + $PKGCONFIG --exists openssl + SSL_EXISTS=$? + + if test "$SSL_EXISTS" -eq "0"; then + SSL_LIBS=`$PKGCONFIG --libs-only-l openssl 2>/dev/null` + SSL_LDFLAGS=`$PKGCONFIG --libs-only-L openssl 2>/dev/null` + SSL_CPPFLAGS=`$PKGCONFIG --cflags-only-I openssl 2>/dev/null` + + LIBS="$LIBS $SSL_LIBS" + CPPFLAGS="$CPPFLAGS $SSL_CPPFLAGS" + LDFLAGS="$LDFLAGS $SSL_LDFLAGS" + + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + fi + +fi + +dnl ********************************************************************** +dnl Check for the presence of SSL libraries and headers +dnl ********************************************************************** + +dnl Default to compiler & linker defaults for SSL files & libraries. +OPT_SSL=off +dnl Default to no CA bundle +ca="no" +AC_ARG_WITH(ssl,dnl +AC_HELP_STRING([--with-ssl=PATH],[where to look for SSL, PATH points to the SSL installation (default: /usr/local/ssl)]) +AC_HELP_STRING([--without-ssl], [disable SSL]), + OPT_SSL=$withval) + +if test X"$OPT_SSL" = Xno +then + AC_MSG_WARN(SSL/https support disabled) +else + + dnl Check for and handle argument to --with-ssl. + + dnl save the pre-ssl check flags for a while + CLEANLDFLAGS="$LDFLAGS" + CLEANCPPFLAGS="$CPPFLAGS" + + case "$OPT_SSL" in + yes) + EXTRA_SSL=/usr/local/ssl ;; + off) + EXTRA_SSL= ;; + *) + dnl check the given spot right away! + EXTRA_SSL=$OPT_SSL + LDFLAGS="$LDFLAGS -L$EXTRA_SSL/lib$libsuff" + CPPFLAGS="$CPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include" + ;; + esac + + AC_CHECK_LIB(crypto, CRYPTO_lock,[ + HAVECRYPTO="yes" + ],[ + OLDLDFLAGS="$LDFLAGS" + OLDCPPFLAGS="$CPPFLAGS" + LDFLAGS="$CLEANLDFLAGS -L$EXTRA_SSL/lib$libsuff" + CPPFLAGS="$CLEANCPPFLAGS -I$EXTRA_SSL/include/openssl -I$EXTRA_SSL/include" + AC_CHECK_LIB(crypto, CRYPTO_add_lock,[ + HAVECRYPTO="yes" ], [ + LDFLAGS="$OLDLDFLAGS" + CPPFLAGS="$OLDCPPFLAGS" + ]) + ]) + + + if test "$HAVECRYPTO" = "yes"; then + dnl This is only reasonable to do if crypto actually is there: check for + dnl SSL libs NOTE: it is important to do this AFTER the crypto lib + + dnl This is for Msys/Mingw + AC_MSG_CHECKING([for gdi32]) + my_ac_save_LIBS=$LIBS + LIBS="-lgdi32 $LIBS" + AC_TRY_LINK([#include + #include ], + [GdiFlush();], + [ dnl worked! + AC_MSG_RESULT([yes])], + [ dnl failed, restore LIBS + LIBS=$my_ac_save_LIBS + AC_MSG_RESULT(no)] + ) + + AC_CHECK_LIB(crypto, CRYPTO_add_lock) + AC_CHECK_LIB(ssl, SSL_connect) + + if test "$ac_cv_lib_ssl_SSL_connect" != yes; then + dnl we didn't find the SSL lib, try the RSAglue/rsaref stuff + AC_MSG_CHECKING(for ssl with RSAglue/rsaref libs in use); + OLIBS=$LIBS + LIBS="$LIBS -lRSAglue -lrsaref" + AC_CHECK_LIB(ssl, SSL_connect) + if test "$ac_cv_lib_ssl_SSL_connect" != yes; then + dnl still no SSL_connect + AC_MSG_RESULT(no) + LIBS=$OLIBS + else + AC_MSG_RESULT(yes) + fi + fi + + + dnl Check for SSLeay headers + AC_CHECK_HEADERS(openssl/x509.h openssl/rsa.h openssl/crypto.h \ + openssl/pem.h openssl/ssl.h openssl/err.h, + OPENSSL_ENABLED=1) + + if test $ac_cv_header_openssl_x509_h = no; then + AC_CHECK_HEADERS(x509.h rsa.h crypto.h pem.h ssl.h err.h, + OPENSSL_ENABLED=1) + fi + + dnl If the ENGINE library seems to be around, check for the OpenSSL engine + dnl header, it is kind of "separated" from the main SSL check + AC_CHECK_FUNC(ENGINE_init, [ AC_CHECK_HEADERS(openssl/engine.h) ]) + + AC_SUBST(OPENSSL_ENABLED) + + AC_MSG_CHECKING([CA cert bundle install path]) + + AC_ARG_WITH(ca-bundle, +AC_HELP_STRING([--with-ca-bundle=FILE], [File name to install the CA bundle as]) +AC_HELP_STRING([--without-ca-bundle], [Don't install the CA bundle]), + [ ca="$withval" ], + [ + if test "x$prefix" != xNONE; then + ca="\${prefix}/share/curl/curl-ca-bundle.crt" + else + ca="$ac_default_prefix/share/curl/curl-ca-bundle.crt" + fi + ] ) + + if test X"$OPT_SSL" = Xno; then + ca="no" + fi + + if test "x$ca" != "xno"; then + CURL_CA_BUNDLE='"'$ca'"' + AC_SUBST(CURL_CA_BUNDLE) + fi + AC_MSG_RESULT([$ca]) + + dnl these can only exist if openssl exists + + AC_CHECK_FUNCS( RAND_status \ + RAND_screen \ + RAND_egd \ + CRYPTO_cleanup_all_ex_data ) + + fi + + if test X"$OPT_SSL" != Xoff && + test "$OPENSSL_ENABLED" != "1"; then + AC_MSG_ERROR([OpenSSL libs and/or directories were not found where specified!]) + fi + +fi + +AM_CONDITIONAL(CABUNDLE, test x$ca != xno) + +dnl ********************************************************************** +dnl Check for the presence of ZLIB libraries and headers +dnl ********************************************************************** + +dnl Check for & handle argument to --with-zlib. + +_cppflags=$CPPFLAGS +_ldflags=$LDFLAGS +OPT_ZLIB="/usr/local" +AC_ARG_WITH(zlib, +AC_HELP_STRING([--with-zlib=PATH],[search for zlib in PATH]) +AC_HELP_STRING([--without-zlib],[disable use of zlib]), + [OPT_ZLIB="$withval"]) + +case "$OPT_ZLIB" in + no) + AC_MSG_WARN([zlib disabled]) ;; + *) + dnl check for the lib first without setting any new path, since many + dnl people have it in the default path + + AC_CHECK_LIB(z, inflateEnd, + dnl libz found, set the variable + [HAVE_LIBZ="1"], + dnl if no lib found, try to add the given library + [if test -d "$OPT_ZLIB"; then + CPPFLAGS="$CPPFLAGS -I$OPT_ZLIB/include" + LDFLAGS="$LDFLAGS -L$OPT_ZLIB/lib$libsuff" + fi]) + + AC_CHECK_HEADER(zlib.h, + [ + dnl zlib.h was found + HAVE_ZLIB_H="1" + dnl if the lib wasn't found already, try again with the new paths + if test "$HAVE_LIBZ" != "1"; then + AC_CHECK_LIB(z, gzread, + [ + dnl the lib was found! + HAVE_LIBZ="1" + ], + [ CPPFLAGS=$_cppflags + LDFLAGS=$_ldflags]) + fi + ], + [ + dnl zlib.h was not found, restore the flags + CPPFLAGS=$_cppflags + LDFLAGS=$_ldflags] + ) + + if test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" != "1" + then + AC_MSG_WARN([configure found only the libz lib, not the header file!]) + elif test "$HAVE_LIBZ" != "1" && test "$HAVE_ZLIB_H" = "1" + then + AC_MSG_WARN([configure found only the libz header file, not the lib!]) + elif test "$HAVE_LIBZ" = "1" && test "$HAVE_ZLIB_H" = "1" + then + dnl both header and lib were found! + AC_SUBST(HAVE_LIBZ) + AC_DEFINE(HAVE_ZLIB_H, 1, [if you have the zlib.h header file]) + AC_DEFINE(HAVE_LIBZ, 1, [if zlib is available]) + + LIBS="$LIBS -lz" + + dnl replace 'HAVE_LIBZ' in the automake makefile.ams + AMFIXLIB="1" + AC_MSG_NOTICE([found both libz and libz.h header]) + fi + ;; +esac + +dnl set variable for use in automakefile(s) +AM_CONDITIONAL(HAVE_LIBZ, test x"$AMFIXLIB" = x1) + +dnl Default is to try the thread-safe versions of a few functions +OPT_THREAD=on + +dnl detect AIX 4.3 or later +dnl see full docs on this reasoning in the lib/hostip.c source file +AC_MSG_CHECKING([AIX 4.3 or later]) +AC_PREPROC_IFELSE([ +#if defined(_AIX) && defined(_AIX43) +printf("just fine"); +#else +#error "this is not AIX 4.3 or later" +#endif +], + [ AC_MSG_RESULT([yes]) + OPT_THREAD=off ], + [ AC_MSG_RESULT([no]) ] +) + +AC_ARG_ENABLE(thread,dnl +AC_HELP_STRING([--disable-thread],[don't look for thread-safe functions]) +AC_HELP_STRING([--enable-thread],[look for thread-safe functions]), +[ case "$enableval" in + no) + OPT_THREAD=off + AC_MSG_WARN(libcurl will not get built using thread-safe functions) + ;; + *) + ;; + esac +] +) + +if test X"$OPT_THREAD" = Xoff +then + AC_DEFINE(DISABLED_THREADSAFE, 1, \ +Set to explicitly specify we don't want to use thread-safe functions) +else + if test "$ipv6" != "yes"; then + dnl dig around for gethostbyname_r() + CURL_CHECK_GETHOSTBYNAME_R() + + dnl dig around for gethostbyaddr_r() + CURL_CHECK_GETHOSTBYADDR_R() + fi + + dnl poke around for inet_ntoa_r() + CURL_CHECK_INET_NTOA_R() + + dnl is there a localtime_r() + CURL_CHECK_LOCALTIME_R() + + AC_CHECK_FUNCS( gmtime_r ) + +fi + +dnl ********************************************************************** +dnl Back to "normal" configuring +dnl ********************************************************************** + +dnl Checks for header files. +AC_HEADER_STDC + +dnl First check for the very most basic headers. Then we can use these +dnl ones as default-headers when checking for the rest! +AC_CHECK_HEADERS( + sys/types.h \ + sys/time.h \ + sys/select.h \ + sys/socket.h \ + sys/ioctl.h \ + assert.h \ + unistd.h \ + malloc.h \ + stdlib.h \ + limits.h \ + arpa/inet.h \ + net/if.h \ + netinet/in.h \ + netdb.h \ + sys/sockio.h \ + sys/stat.h \ + sys/param.h \ + termios.h \ + termio.h \ + sgtty.h \ + fcntl.h \ + dlfcn.h \ + alloca.h \ + winsock.h \ + time.h \ + io.h \ + pwd.h \ + utime.h \ + sys/utime.h \ + sys/poll.h \ + setjmp.h, +dnl to do if not found +[], +dnl to do if found +[], +dnl default includes +[ +#ifdef HAVE_SYS_TYPES_H +#include +#endif +#ifdef HAVE_SYS_TIME_H +#include +#endif +#ifdef HAVE_SYS_SELECT_H +#include +#endif +#ifdef HAVE_SYS_SOCKET_H +#include +#endif +] +) + +dnl Checks for typedefs, structures, and compiler characteristics. +AC_C_CONST +AC_TYPE_SIZE_T +AC_HEADER_TIME + +AC_CHECK_SIZEOF(curl_off_t, ,[ +#include +#include "$srcdir/include/curl/curl.h" +]) + +AC_CHECK_TYPE(long long, + [AC_DEFINE(HAVE_LONGLONG, 1, [if your compiler supports 'long long'])]) + +# check for ssize_t +AC_CHECK_TYPE(ssize_t, , + AC_DEFINE(ssize_t, int, [the signed version of size_t])) + +TYPE_SOCKLEN_T +TYPE_IN_ADDR_T + +AC_FUNC_SELECT_ARGTYPES + +dnl Checks for library functions. +dnl AC_PROG_GCC_TRADITIONAL +AC_TYPE_SIGNAL +dnl AC_FUNC_VPRINTF +AC_CHECK_FUNCS( strtoll \ + socket \ + select \ + strdup \ + strstr \ + strtok_r \ + strftime \ + uname \ + strcasecmp \ + stricmp \ + strcmpi \ + gethostbyaddr \ + gettimeofday \ + inet_addr \ + inet_ntoa \ + inet_pton \ + tcsetattr \ + tcgetattr \ + perror \ + closesocket \ + siginterrupt \ + sigaction \ + signal \ + getpass_r \ + strlcat \ + getpwuid \ + geteuid \ + dlopen \ + utime \ + sigsetjmp \ + poll, +dnl if found +[], +dnl if not found, $ac_func is the name we check for + func="$ac_func" + AC_MSG_CHECKING([deeper for $func]) + AC_TRY_LINK( [], + [ $func ();], + AC_MSG_RESULT(yes!) + eval "ac_cv_func_$func=yes" + def=`echo "HAVE_$func" | tr 'a-z' 'A-Z'` + AC_DEFINE_UNQUOTED($def, 1, [If you have $func]), + AC_MSG_RESULT(but still no) + ) + +) + +dnl sigsetjmp() might be a macro and no function so if it isn't found already +dnl we make an extra check here! +if test "$ac_cv_func_sigsetjmp" != "yes"; then + AC_MSG_CHECKING([for sigsetjmp defined as macro]) + AC_TRY_LINK( [#include ], + [sigjmp_buf jmpenv; + sigsetjmp(jmpenv, 1);], + AC_MSG_RESULT(yes) + AC_DEFINE(HAVE_SIGSETJMP, 1, [If you have sigsetjmp]), + AC_MSG_RESULT(no) + ) +fi + +AC_PATH_PROG( PERL, perl, , + $PATH:/usr/local/bin/perl:/usr/bin/:/usr/local/bin ) +AC_SUBST(PERL) + +AC_PATH_PROGS( NROFF, gnroff nroff, , + $PATH:/usr/bin/:/usr/local/bin ) +AC_SUBST(NROFF) + +if test -n "$NROFF"; then + dnl only check for nroff options if an nroff command was found + + AC_MSG_CHECKING([how to use *nroff to get plain text from man pages]) + MANOPT="-man" + mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null` + if test -z "$mancheck"; then + MANOPT="-mandoc" + mancheck=`echo foo | $NROFF $MANOPT 2>/dev/null` + if test -z "$mancheck"; then + MANOPT="" + AC_MSG_RESULT([failed]) + AC_MSG_WARN([found no *nroff option to get plaintext from man pages]) + else + AC_MSG_RESULT([$MANOPT]) + fi + else + AC_MSG_RESULT([$MANOPT]) + fi + AC_SUBST(MANOPT) +fi + +if test -z "$MANOPT" +then + dnl if no nroff tool was found, or no option that could convert man pages + dnl was found, then disable the built-in manual stuff + AC_MSG_WARN([disabling built-in manual]) + USE_MANUAL="no"; +fi + +AC_PROG_YACC + +if test -z "$YACC" +then + AC_MSG_CHECKING([if OK to build without bison/yacc]) + dnl no yacc is a big deal if we have no pre-fixed getdate.y + if test -r "$srcdir/lib/getdate.c" + then + dnl all is well, we don't have to generate it! + AC_MSG_RESULT(yes) + else + AC_MSG_RESULT(no) + AC_MSG_ERROR([no yacc or bison found, can't build libcurl!]) + fi +fi + +dnl ************************************************************************* +dnl If the manual variable still is set, then we go with providing a built-in +dnl manual + +if test "$USE_MANUAL" = "1"; then + AC_DEFINE(USE_MANUAL, 1, [If you want to build curl with the built-in manual]) +fi + +dnl set variable for use in automakefile(s) +AM_CONDITIONAL(USE_MANUAL, test x"$USE_MANUAL" = x1) + + +dnl AC_PATH_PROG( RANLIB, ranlib, /usr/bin/ranlib, +dnl $PATH:/usr/bin/:/usr/local/bin ) +dnl AC_SUBST(RANLIB) + +dnl ************************************************************ +dnl lame option to switch on debug options +dnl +AC_MSG_CHECKING([whether to enable debug options]) +AC_ARG_ENABLE(debug, +AC_HELP_STRING([--enable-debug],[Enable pedantic debug options]) +AC_HELP_STRING([--disable-debug],[Disable debug options]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + ;; + *) AC_MSG_RESULT(yes) + + CPPFLAGS="$CPPFLAGS -DCURLDEBUG" + CFLAGS="$CFLAGS -g" + + dnl set compiler "debug" options to become more picky, and remove + dnl optimize options from CFLAGS + CURL_CC_DEBUG_OPTS + ;; + esac + ], + AC_MSG_RESULT(no) +) + +AC_MSG_CHECKING([whether to enable ares]) +AC_ARG_ENABLE(ares, +AC_HELP_STRING([--enable-ares=PATH],[Enable ares for name lookups]) +AC_HELP_STRING([--disable-ares],[Disable ares for name lookups]), +[ case "$enableval" in + no) + AC_MSG_RESULT(no) + ;; + *) AC_MSG_RESULT(yes) + + if test "x$IPV6_ENABLED" = "x1"; then + AC_MSG_ERROR([ares doesn't work with ipv6, disable ipv6 to use ares]) + fi + + AC_DEFINE(USE_ARES, 1, [Define if you want to enable ares support]) + dnl substitute HAVE_ARES for curl-config and similar + HAVE_ARES="1" + AC_SUBST(HAVE_ARES) + + LIBS="$LIBS -lcares" + + dnl For backwards compatibility default to includes/lib in srcdir/ares + dnl If a value is specified it is assumed that the libs are in $val/lib + dnl and the includes are in $val/include. This is the default setup for + dnl ares so it should not be a problem. + if test "x$enableval" = "xyes" ; then + if test -d "$srcdir/ares"; then + AC_CONFIG_SUBDIRS(ares) + aresinc=`cd $srcdir/ares && pwd` + CPPFLAGS="$CPPFLAGS -I$aresinc" + + dnl the pwd= below cannot 'cd' into the ares dir to get the full + dnl path to it, since it may not exist yet if we build outside of + dnl the source tree + pwd=`pwd` + LDFLAGS="$LDFLAGS -L$pwd/ares" + fi + else + CPPFLAGS="$CPPFLAGS -I$enableval/include" + LDFLAGS="$LDFLAGS -L$enableval/lib" + fi + ;; + esac ], + AC_MSG_RESULT(no) +) + +AC_CONFIG_FILES([Makefile \ + docs/Makefile \ + docs/examples/Makefile \ + docs/libcurl/Makefile \ + include/Makefile \ + include/curl/Makefile \ + src/Makefile \ + lib/Makefile \ + tests/Makefile \ + tests/data/Makefile \ + tests/server/Makefile \ + tests/libtest/Makefile \ + packages/Makefile \ + packages/Win32/Makefile \ + packages/Win32/cygwin/Makefile \ + packages/Linux/Makefile \ + packages/Linux/RPM/Makefile \ + packages/Linux/RPM/curl.spec \ + packages/Linux/RPM/curl-ssl.spec \ + packages/Solaris/Makefile \ + packages/DOS/Makefile \ + packages/EPM/curl.list \ + packages/EPM/Makefile \ + packages/vms/Makefile \ + curl-config +]) +AC_OUTPUT diff --git a/neo/curl/curl-config.in b/neo/curl/curl-config.in new file mode 100644 index 0000000..740725a --- /dev/null +++ b/neo/curl/curl-config.in @@ -0,0 +1,133 @@ +#! /bin/sh +# +# The idea to this kind of setup info script was stolen from numerous +# other packages, such as neon, libxml and gnome. +# +# $Id: curl-config.in,v 1.18 2003/12/08 10:00:21 bagder Exp $ +# +prefix=@prefix@ +exec_prefix=@exec_prefix@ +includedir=@includedir@ + +usage() +{ + cat <. + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi +# `libtool' can also be set to `yes' or `no'. + +if test -z "$depfile"; then + base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` + dir=`echo "$object" | sed 's,/.*$,/,'` + if test "$dir" = "$object"; then + dir= + fi + # FIXME: should be _deps on DOS. + depfile="$dir.deps/$base" +fi + +tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} + +rm -f "$tmpdepfile" + +# Some modes work just like other modes, but use different flags. We +# parameterize here, but still list the modes in the big case below, +# to make depend.m4 easier to write. Note that we *cannot* use a case +# here, because this file can only contain one case statement. +if test "$depmode" = hp; then + # HP compiler uses -M and no extra arg. + gccflag=-M + depmode=gcc +fi + +if test "$depmode" = dashXmstdout; then + # This is just like dashmstdout with a different argument. + dashmflag=-xM + depmode=dashmstdout +fi + +case "$depmode" in +gcc3) +## gcc 3 implements dependency tracking that does exactly what +## we want. Yay! Note: for some reason libtool 1.4 doesn't like +## it if -MD -MP comes after the -MF stuff. Hmm. + "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + mv "$tmpdepfile" "$depfile" + ;; + +gcc) +## There are various ways to get dependency output from gcc. Here's +## why we pick this rather obscure method: +## - Don't want to use -MD because we'd like the dependencies to end +## up in a subdir. Having to rename by hand is ugly. +## (We might end up doing this anyway to support other compilers.) +## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like +## -MM, not -M (despite what the docs say). +## - Using -M directly means running the compiler twice (even worse +## than renaming). + if test -z "$gccflag"; then + gccflag=-MD, + fi + "$@" -Wp,"$gccflag$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz +## The second -e expression handles DOS-style file names with drive letters. + sed -e 's/^[^:]*: / /' \ + -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" +## This next piece of magic avoids the `deleted header file' problem. +## The problem is that when a header file which appears in a .P file +## is deleted, the dependency causes make to die (because there is +## typically no way to rebuild the header). We avoid this by adding +## dummy dependencies for each header file. Too bad gcc doesn't do +## this for us directly. + tr ' ' ' +' < "$tmpdepfile" | +## Some versions of gcc put a space before the `:'. On the theory +## that the space means something, we add a space to the output as +## well. +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +hp) + # This case exists only to let depend.m4 do its work. It works by + # looking at the text of this script. This case will never be run, + # since it is checked for above. + exit 1 + ;; + +sgi) + if test "$libtool" = yes; then + "$@" "-Wp,-MDupdate,$tmpdepfile" + else + "$@" -MDupdate "$tmpdepfile" + fi + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + + if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files + echo "$object : \\" > "$depfile" + + # Clip off the initial element (the dependent). Don't try to be + # clever and replace this with sed code, as IRIX sed won't handle + # lines with more than a fixed number of characters (4096 in + # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; + # the IRIX cc adds comments like `#:fec' to the end of the + # dependency line. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ + tr ' +' ' ' >> $depfile + echo >> $depfile + + # The second pass generates a dummy entry for each header file. + tr ' ' ' +' < "$tmpdepfile" \ + | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ + >> $depfile + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +aix) + # The C for AIX Compiler uses -M and outputs the dependencies + # in a .u file. In older versions, this file always lives in the + # current directory. Also, the AIX compiler puts `$object:' at the + # start of each line; $object doesn't have directory information. + # Version 6 uses the directory in both cases. + stripped=`echo "$object" | sed 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + stat=$? + + if test -f "$tmpdepfile"; then : + else + stripped=`echo "$stripped" | sed 's,^.*/,,'` + tmpdepfile="$stripped.u" + fi + + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + outname="$stripped.o" + # Each line is of the form `foo.o: dependent.h'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" + sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" + else + # The sourcefile does not contain any dependencies, so just + # store a dummy comment line, to avoid errors with the Makefile + # "include basename.Plo" scheme. + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +icc) + # Intel's C compiler understands `-MD -MF file'. However on + # icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c + # ICC 7.0 will fill foo.d with something like + # foo.o: sub/foo.c + # foo.o: sub/foo.h + # which is wrong. We want: + # sub/foo.o: sub/foo.c + # sub/foo.o: sub/foo.h + # sub/foo.c: + # sub/foo.h: + # ICC 7.1 will output + # foo.o: sub/foo.c sub/foo.h + # and will wrap long lines using \ : + # foo.o: sub/foo.c ... \ + # sub/foo.h ... \ + # ... + + "$@" -MD -MF "$tmpdepfile" + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + rm -f "$depfile" + # Each line is of the form `foo.o: dependent.h', + # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. + # Do two passes, one to just change these to + # `$object: dependent.h' and one to simply `dependent.h:'. + sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" + # Some versions of the HPUX 10.20 sed can't process this invocation + # correctly. Breaking it into two sed invocations is a workaround. + sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" | + sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +tru64) + # The Tru64 compiler uses -MD to generate dependencies as a side + # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. + # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put + # dependencies in `foo.d' instead, so we check for that too. + # Subdirectories are respected. + dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` + test "x$dir" = "x$object" && dir= + base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` + + if test "$libtool" = yes; then + tmpdepfile1="$dir.libs/$base.lo.d" + tmpdepfile2="$dir.libs/$base.d" + "$@" -Wc,-MD + else + tmpdepfile1="$dir$base.o.d" + tmpdepfile2="$dir$base.d" + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + if test -f "$tmpdepfile1"; then + tmpdepfile="$tmpdepfile1" + else + tmpdepfile="$tmpdepfile2" + fi + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a tab and a space in the []. + sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" + else + echo "#dummy" > "$depfile" + fi + rm -f "$tmpdepfile" + ;; + +#nosideeffect) + # This comment above is used by automake to tell side-effect + # dependency tracking mechanisms from slower ones. + +dashmstdout) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + test -z "$dashmflag" && dashmflag=-M + # Require at least two characters before searching for `:' + # in the target name. This is to cope with DOS-style filenames: + # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise. + "$@" $dashmflag | + sed 's:^[ ]*[^: ][^:][^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tr ' ' ' +' < "$tmpdepfile" | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +dashXmstdout) + # This case only exists to satisfy depend.m4. It is never actually + # run, as this mode is specially recognized in the preamble. + exit 1 + ;; + +makedepend) + "$@" || exit $? + # Remove any Libtool call + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + # X makedepend + shift + cleared=no + for arg in "$@"; do + case $cleared in + no) + set ""; shift + cleared=yes ;; + esac + case "$arg" in + -D*|-I*) + set fnord "$@" "$arg"; shift ;; + # Strip any option that makedepend may not understand. Remove + # the object too, otherwise makedepend will parse it as a source file. + -*|$object) + ;; + *) + set fnord "$@" "$arg"; shift ;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + sed '1,2d' "$tmpdepfile" | tr ' ' ' +' | \ +## Some versions of the HPUX 10.20 sed can't process this invocation +## correctly. Breaking it into two sed invocations is a workaround. + sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" "$tmpdepfile".bak + ;; + +cpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout. + "$@" || exit $? + + # Remove the call to Libtool. + if test "$libtool" = yes; then + while test $1 != '--mode=compile'; do + shift + done + shift + fi + + # Remove `-o $object'. + IFS=" " + for arg + do + case $arg in + -o) + shift + ;; + $object) + shift + ;; + *) + set fnord "$@" "$arg" + shift # fnord + shift # $arg + ;; + esac + done + + "$@" -E | + sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + cat < "$tmpdepfile" >> "$depfile" + sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +msvisualcpp) + # Important note: in order to support this mode, a compiler *must* + # always write the preprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + "$@" || exit $? + IFS=" " + for arg + do + case "$arg" in + "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") + set fnord "$@" + shift + shift + ;; + *) + set fnord "$@" "$arg" + shift + shift + ;; + esac + done + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 diff --git a/neo/curl/docs/BINDINGS b/neo/curl/docs/BINDINGS new file mode 100644 index 0000000..400ebfc --- /dev/null +++ b/neo/curl/docs/BINDINGS @@ -0,0 +1,119 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + libcurl bindings + +Creative people have written bindings or interfaces for various environments +and programming languages. Using one of these allows you to take advantage of +curl powers from within your favourite language or system. + +This is a list of all known interfaces as of this writing. + +The bindings listed below are not part of the curl/libcurl distribution +archives, but must be downloaded and installed separately. + +Ada95 + + Writtten by Andreas Almroth. + http://www.almroth.com/adacurl/index.html + +Basic + + ScriptBasic bindings to libcurl. Writtten by Peter Verhas. + http://scriptbasic.com/ + +C++ + + Written by Jean-Philippe Barrette-LaPierre. + http://www.sourceforge.net/projects/curlpp + +Cocoa + + Written by Dan Wood. + http://curlhandle.sourceforge.net/ + +D + + Written by Charles Sanders and James Wavro + http://www.atari-soldiers.com/libcurl.html + +Dylan + + Written by Chris Double. + http://dylanlibs.sourceforge.net/ + +Euphoria + + Written by Ray Smith. + http://rays-web.com/eulibcurl.htm + +Ferite + http://www.ferite.org/ + +Java + + Written by Daniel Stenberg. + http://curl.haxx.se/libcurl/java/ + +Lua + + Written by Steve Dekorte. + http://curl.haxx.se/libcurl/lua/ + +Object-Pascal + + Free Pascal, Delphi and Kylix binding written by Christophe Espern. + http://www.tekool.com/opcurl + +O'Caml + + Written by Lars Nilsson. + http://sourceforge.net/projects/ocurl/ + +Pascal + + Free Pascal, Delphi and Kylix binding written by Jeffrey Pohlmeyer. + http://houston.quik.com/jkp/curlpas/ + +Perl + + Maintained by Cris Bailiff. + http://curl.haxx.se/libcurl/perl/ + +PHP + + Written by Sterling Hughes. + http://curl.haxx.se/libcurl/php/ + +PostgreSQL + + Written by Gian Paolo Ciceri. + http://gborg.postgresql.org/project/pgcurl/projdisplay.php + +Python + + Written by Kjetil Jacobsen. + http://pycurl.sourceforge.net/ + +Rexx + + Written Mark Hessling. + http://rexxcurl.sourceforge.net/ + +Ruby + + Written by Hirotaka Matsuyuki. + http://www.d1.dion.ne.jp/~matuyuki/ruby.html + +Scheme + + Bigloo binding written by Kirill Lisovsky. + http://curl.haxx.se/libcurl/scheme/ + +Tcl + + Written by Andrés García. + http://personal1.iddeo.es/andresgarci/tclcurl/english/docs.html diff --git a/neo/curl/docs/BUGS b/neo/curl/docs/BUGS new file mode 100644 index 0000000..d1448a0 --- /dev/null +++ b/neo/curl/docs/BUGS @@ -0,0 +1,81 @@ +$Id: BUGS,v 1.7 2003/08/18 15:24:46 bagder Exp $ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +BUGS + + Curl and libcurl have grown substantially since the beginning. At the time + of writing (August 2003), there are about 40000 lines of source code, and by + the time you read this it has probably grown even more. + + Of course there are lots of bugs left. And lots of misfeatures. + + To help us make curl the stable and solid product we want it to be, we need + bug reports and bug fixes. + +WHERE TO REPORT + + If you can't fix a bug yourself and submit a fix for it, try to report an as + detailed report as possible to a curl mailing list to allow one of us to + have a go at a solution. You should also post your bug/problem at curl's bug + tracking system over at + + http://sourceforge.net/bugs/?group_id=976 + + (but please read the sections below first before doing that) + + If you feel you need to ask around first, find a suitable mailing list and + post there. The lists are available on http://curl.haxx.se/mail/ + +WHAT TO REPORT + + When reporting a bug, you should include all information that will help us + understand what's wrong, what you expected to happen and how to repeat the + bad behavior. You therefore need to tell us: + + - your operating system's name and version number (uname -a under a unix + is fine) + - what version of curl you're using (curl -V is fine) + - what URL you were working with (if possible), at least which protocol + + and anything and everything else you think matters. Tell us what you + expected to happen, tell use what did happen, tell us how you could make it + work another way. Dig around, try out, test. Then include all the tiny bits + and pieces in your report. You will benefit from this yourself, as it will + enable us to help you quicker and more accurately. + + Since curl deals with networks, it often helps us if you include a protocol + debug dump with your bug report. The output you get by using the -v or + --trace options. + + If curl crashed, causing a core dump (in unix), there is hardly any use to + send that huge file to anyone of us. Unless we have an exact same system + setup as you, we can't do much with it. Instead we ask you to get a stack + trace and send that (much smaller) output to us instead! + + The address and how to subscribe to the mailing lists are detailed in the + MANUAL file. + +HOW TO GET A STACK TRACE + + First, you must make sure that you compile all sources with -g and that you + don't 'strip' the final executable. Try to avoid optimizing the code as + well, remove -O, -O2 etc from the compiler options. + + Run the program until it cores. + + Run your debugger on the core file, like ' curl core'. + should be replaced with the name of your debugger, in most cases that will + be 'gdb', but 'dbx' and others also occur. + + When the debugger has finished loading the core file and presents you a + prompt, enter 'where' (without the quotes) and press return. + + The list that is presented is the stack trace. If everything worked, it is + supposed to contain the chain of functions that were called when curl + crashed. Include the stack trace with your detailed bug report. It'll help a + lot. + diff --git a/neo/curl/docs/CONTRIBUTE b/neo/curl/docs/CONTRIBUTE new file mode 100644 index 0000000..be2d8e3 --- /dev/null +++ b/neo/curl/docs/CONTRIBUTE @@ -0,0 +1,159 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +To Think About When Contributing Source Code + + This document is intended to offer some simple guidelines that can be useful + to keep in mind when you decide to contribute to the project. This concerns + new features as well as corrections to existing flaws or bugs. + +Join the Community + + Skip over to http://curl.haxx.se/mail/ and join the appropriate mailing + list(s). Read up on details before you post questions. Read this file before + you start sending patches! We prefer patches and discussions being held on + the mailing list(s), not sent to individuals. + +The License Issue + + When contributing with code, you agree to put your changes and new code under + the same license curl and libcurl is already using unless stated otherwise. + + If you add a larger piece of code, you can opt to make that file or set of + files to use a different license as long as they don't enforce any changes to + the rest of the package and they make sense. Such "separate parts" can not be + GPL (as we don't want the GPL virus to attack users of libcurl) but they must + use "GPL compatible" licenses. + +What To Read + + Source code, the man pages, the INTERNALS document, the TODO, the most recent + CHANGES. Just lurking on the libcurl mailing list is gonna give you a lot of + insights on what's going on right now. Asking there is a good idea too. + +Naming + + Try using a non-confusing naming scheme for your new functions and variable + names. It doesn't necessarily have to mean that you should use the same as in + other places of the code, just that the names should be logical, + understandable and be named according to what they're used for. File-local + functions should be made static. We like lower case names. + + See the INTERNALS document on how we name non-exported library-global + symbols. + +Indenting + + Please try using the same indenting levels and bracing method as all the + other code already does. It makes the source code a lot easier to follow if + all of it is written using the same style. We don't ask you to like it, we + just ask you to follow the tradition! ;-) This mainly means: 2-level indents, + using spaces only (no tabs) and having the opening brace ({) on the same line + as the if() or while(). + +Commenting + + Comment your source code extensively using C comments (/* comment */), DO NOT + use C++ comments (// this style). Commented code is quality code and enables + future modifications much more. Uncommented code risk having to be completely + replaced when someone wants to extend things, since other persons' source + code can get quite hard to read. + +General Style + + Keep your functions small. If they're small you avoid a lot of mistakes and + you don't accidentally mix up variables etc. + +Non-clobbering All Over + + When you write new functionality or fix bugs, it is important that you don't + fiddle all over the source files and functions. Remember that it is likely + that other people have done changes in the same source files as you have and + possibly even in the same functions. If you bring completely new + functionality, try writing it in a new source file. If you fix bugs, try to + fix one bug at a time and send them as separate patches. + +Platform Dependent Code + + Use #ifdef HAVE_FEATURE to do conditional code. We avoid checking for + particular operating systems or hardware in the #ifdef lines. The + HAVE_FEATURE shall be generated by the configure script for unix-like systems + and they are hard-coded in the config-[system].h files for the others. + +Separate Patches + + It is annoying when you get a huge patch from someone that is said to fix 511 + odd problems, but discussions and opinions don't agree with 510 of them - or + 509 of them were already fixed in a different way. Then the patcher needs to + extract the single interesting patch from somewhere within the huge pile of + source, and that gives a lot of extra work. Preferably, all fixes that + correct different problems should be in their own patch with an attached + description exactly what they correct so that all patches can be selectively + applied by the maintainer or other interested parties. + +Patch Against Recent Sources + + Please try to get the latest available sources to make your patches + against. It makes the life of the developers so much easier. The very best is + if you get the most up-to-date sources from the CVS repository, but the + latest release archive is quite OK as well! + +Document + + Writing docs is dead boring and one of the big problems with many open source + projects. Someone's gotta do it. It makes it a lot easier if you submit a + small description of your fix or your new features with every contribution so + that it can be swiftly added to the package documentation. + + The documentation is always made in man pages (nroff formatted) or plain + ASCII files. All HTML files on the web site and in the release archives are + generated from the nroff/ASCII versions. + +Write Access to CVS Repository + + If you are a frequent contributor, or have another good reason, you can of + course get write access to the CVS repository and then you'll be able to + check-in all your changes straight into the CVS tree instead of sending all + changes by mail as patches. Just ask if this is what you'd want. You will be + required to have posted a few quality patches first, before you can be + granted write access. + +Test Cases + + Since the introduction of the test suite, we can quickly verify that the main + features are working as they're supposed to. To maintain this situation and + improve it, all new features and functions that are added need to be tested + in the test suite. Every feature that is added should get at least one valid + test case that verifies that it works as documented. If every submitter also + posts a few test cases, it won't end up as a heavy burden on a single person! + +How To Make a Patch + + Keep a copy of the unmodified curl sources. Make your changes in a separate + source tree. When you think you have something that you want to offer the + curl community, use GNU diff to generate patches. + + If you have modified a single file, try something like: + + diff -u undmodified-file.c my-changed-one.c > my-fixes.diff + + If you have modified several files, possibly in different directories, you + can use diff recursively: + + diff -ur curl-original-dir curl-modfied-sources-dir > my-fixes.diff + + The GNU diff and GNU patch tools exist for virtually all platforms, including + all kinds of unixes and Windows: + + For unix-like operating systems: + + http://www.fsf.org/software/patch/patch.html + http://www.gnu.org/directory/diffutils.html + + For Windows: + + http://gnuwin32.sourceforge.net/packages/patch.htm + http://gnuwin32.sourceforge.net/packages/diffutils.htm diff --git a/neo/curl/docs/FAQ b/neo/curl/docs/FAQ new file mode 100644 index 0000000..47d6044 --- /dev/null +++ b/neo/curl/docs/FAQ @@ -0,0 +1,796 @@ +Updated: March 16, 2004 (http://curl.haxx.se/docs/faq.html) + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +FAQ + + 1. Philosophy + 1.1 What is cURL? + 1.2 What is libcurl? + 1.3 What is cURL not? + 1.4 When will you make curl do XXXX ? + 1.5 Who makes cURL? + 1.6 What do you get for making cURL? + 1.7 What about CURL from curl.com? + 1.8 I have a problem who do I mail? + + 2. Install Related Problems + 2.1 configure doesn't find OpenSSL even when it is installed + 2.1.1. native linker doesn't find OpenSSL + 2.1.2. only the libssl lib is missing + 2.2 Does curl work/build with other SSL libraries? + 2.3 Where can I find a copy of LIBEAY32.DLL? + 2.4 Does cURL support Socks (RFC 1928) ? + + 3. Usage Problems + 3.1 curl: (1) SSL is disabled, https: not supported + 3.2 How do I tell curl to resume a transfer? + 3.3 Why doesn't my posting using -F work? + 3.4 How do I tell curl to run custom FTP commands? + 3.5 How can I disable the Pragma: nocache header? + 3.6 Does curl support ASP, XML, XHTML or HTML version Y? + 3.7 Can I use curl to delete/rename a file through FTP? + 3.8 How do I tell curl to follow HTTP redirects? + 3.9 How do I use curl in my favorite programming language? + 3.10 What about SOAP, WebDAV, XML-RPC or similar protocols over HTTP? + 3.11 How do I POST with a different Content-Type? + 3.12 Why do FTP specific features over HTTP proxy fail? + 3.13 Why does my single/double quotes fail? + 3.14 Does curl support javascript or pac (automated proxy config)? + 3.15 Can I do recursive fetches with curl? + + 4. Running Problems + 4.1 Problems connecting to SSL servers. + 4.2 Why do I get problems when I use & or % in the URL? + 4.3 How can I use {, }, [ or ] to specify multiple URLs? + 4.4 Why do I get downloaded data even though the web page doesn't exist? + 4.5 Why do I get return code XXX from a HTTP server? + 4.5.1 "400 Bad Request" + 4.5.2 "401 Unauthorized" + 4.5.3 "403 Forbidden" + 4.5.4 "404 Not Found" + 4.5.5 "405 Method Not Allowed" + 4.5.6 "301 Moved Permanently" + 4.6 Can you tell me what error code 142 means? + 4.7 How do I keep user names and passwords secret in Curl command lines? + 4.8 I found a bug! + 4.9 Curl can't authenticate to the server that requires NTLM? + 4.10 My HTTP request using HEAD, PUT or DELETE doesn't work! + 4.11 Why does my HTTP range requests return the full document? + 4.12 Why do I get "certificate verify failed" ? + + 5. libcurl Issues + 5.1 Is libcurl thread-safe? + 5.2 How can I receive all data into a large memory chunk? + 5.3 How do I fetch multiple files with libcurl? + 5.4 Does libcurl do Winsock initing on win32 systems? + 5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ? + 5.6 What about Keep-Alive or persistent connections? + 5.7 Link errors when building libcurl on Windows! + + 6. License Issues + 6.1 I have a GPL program, can I use the libcurl library? + 6.2 I have a closed-source program, can I use the libcurl library? + 6.3 I have a BSD licensed program, can I use the libcurl library? + 6.4 I have a program that uses LGPL libraries, can I use libcurl? + 6.5 Can I modify curl/libcurl for my program and keep the changes secret? + 6.6 Can you please change the curl/libcurl license to XXXX? + +============================================================================== + +1. Philosophy + + 1.1 What is cURL? + + cURL (or simply just 'curl') is a command line tool for getting or sending + files using URL syntax. The name is a play on 'Client for URLs', originally + with URL spelled in uppercase to make it obvious it deals with URLs. The + fact it can also be pronounced 'see URL' also helped, it works as an + abbrivation for "Client URL Request Library" or why not the recursive + version: "Curl URL Request Library". + + Curl supports a range of common Internet protocols, currently including + HTTP, HTTPS, FTP, FTPS, GOPHER, LDAP, DICT, TELNET and FILE. + + We spell it cURL or just curl. We pronounce it with an initial k sound: + [kurl]. + + NOTE: there are numerous sub-projects and related projects that also use the + word curl in the project names in various combinations, but you should take + notice that this FAQ is directed at the command-line tool named curl (and + libcurl the library), and may therefore not be valid for other curl-related + projects. + + 1.2 What is libcurl? + + libcurl is a reliable and portable library which provides you with an easy + interface to a range of common Internet protocols. + + You can use libcurl for free in your application, be it open source, + commercial or closed-source. + + 1.3 What is cURL not? + + Curl is *not* a wget clone. That is a common misconception. Never, during + curl's development, have we intended curl to replace wget or compete on its + market. Curl is targeted at single-shot file transfers. + + Curl is not a web site mirroring program. If you want to use curl to mirror + something: fine, go ahead and write a script that wraps around curl to make + it reality (like curlmirror.pl does). + + Curl is not an FTP site mirroring program. Sure, get and send FTP with curl + but if you want systematic and sequential behavior you should write a + script (or write a new program that interfaces libcurl) and do it. + + Curl is not a PHP tool, even though it works perfectly well when used from + or with PHP. + + Curl is not a single-OS program. Curl exists, compiles, builds and runs + under a wide range of operating systems, including all modern Unixes (and a + bunch of older ones too), Windows, Amiga, BeOS, OS/2, OS X, QNX etc. + + 1.4 When will you make curl do XXXX ? + + We love suggestions of what to change in order to make curl and libcurl + better. We do however believe in a few rules when it comes to the future of + curl: + + * Curl -- the command line tool -- is to remain a non-graphical command line + tool. If you want GUIs or fancy scripting capabilities, you should look + for another tool that uses libcurl. + + * We do not add things to curl that other small and available tools already + do very fine at the side. Curl's output is fine to pipe into another + program or redirect to another file for the next program to interpret. + + * We focus on protocol related issues and improvements. If you wanna do more + magic with the supported protocols than curl currently does, chances are + big we will agree. If you wanna add more protocols, we may very well + agree. + + * If you want someone else to make all the work while you wait for us to + implement it for you, that is not a very friendly attitude. We spend a + considerable time already on maintaining and developing curl. In order to + get more out of us, you should consider trading in some of your time and + efforts in return. + + * If you write the code, chances are bigger that it will get into curl + faster. + + 1.5 Who makes cURL? + + cURL and libcurl are not made by any single individual. Sure, Daniel + Stenberg writes the major parts, but other persons' submissions are + important and crucial. Anyone can contribute and post their changes and + improvements and have them inserted in the main sources (of course on the + condition that developers agree on that the fixes are good). + + The list of contributors in the docs/THANKS file is only a small part of all + the people that every day provide us with bug reports, suggestions, ideas + and source code. + + curl is developed by a community, with Daniel at the wheel. + + 1.6 What do you get for making cURL? + + Project cURL is entirely free and open. No person gets paid for developing + curl. We do this voluntarily on our spare time. + + We get some help from companies. Contactor Data hosts the curl web site, + Haxx owns the curl web site's domain and sourceforge.net hosts project + services we take advantage from, like the bug tracker. + + If you want to support our project with a donation or similar, one way of + doing that would be to buy "gift certificates" at useful online shopping + sites, such as amazon.com or thinkgeek.com. Another way would be to sponsor + us through a banner-program or even better: by helping us coding, + documenting, testing etc. You're welcome to send us a buck using paypal, as + described here: http://curl.haxx.se/donation.html + + 1.7 What about CURL from curl.com? + + During the summer 2001, curl.com was busy advertising their client-side + programming language for the web, named CURL. + + We are in no way associated with curl.com or their CURL programming + language. + + Our project name curl has been in effective use since 1998. We were not the + first computer related project to use the name "curl" and do not claim any + first-hand rights to the name. + + We recognize that we will be living in parallel with curl.com and wish them + every success. + + 1.8 I have a problem who do I mail? + + Please do not mail any single individual unless you really need to. Keep + curl-related questions on a suitable mailing list. All available mailing + lists are listed in the MANUAL document and online at + http://curl.haxx.se/mail/ + + Keeping curl-related questions and discussions on mailing lists allows + others to join in and help, to share their ideas, contribute their + suggestions and spread their wisdom. Keeping discussions on public mailing + lists also allows for others to learn from this (both current and future + users thanks to the web based archives of the mailing lists), thus saving us + from having to repeat ourselves even more. Thanks for respecting this. + + +2. Install Related Problems + + 2.1. configure doesn't find OpenSSL even when it is installed + + This may be because of several reasons. + + 2.1.1. native linker doesn't find openssl + + Affected platforms: + Solaris (native cc compiler) + HPUX (native cc compiler) + SGI IRIX (native cc compiler) + SCO UNIX (native cc compiler) + + When configuring curl, I specify --with-ssl. OpenSSL is installed in + /usr/local/ssl Configure reports SSL in /usr/local/ssl, but fails to find + CRYPTO_lock in -lcrypto + + Cause: The cc for this test places the -L/usr/local/ssl/lib AFTER + -lcrypto, so ld can't find the library. This is due to a bug in the GNU + autoconf tool. + + Workaround: Specifying "LDFLAGS=-L/usr/local/ssl/lib" in front of + ./configure places the -L/usr/local/ssl/lib early enough in the command + line to make things work + + Solution submitted by: Bob Allison + + 2.1.2. only the libssl lib is missing + + If all include files and the libcrypto lib is present, with only the + libssl being missing according to configure, this is mostly likely because + a few functions are left out from the libssl. + + If the function names missing include RSA or RSAREF you can be certain + that this is because libssl requires the RSA and RSAREF libs to build. + + See the INSTALL file section that explains how to add those libs to + configure. Make sure that you remove the config.cache file before you + rerun configure with the new flags. + + 2.2. Does curl work/build with other SSL libraries? + + Curl has been written to use OpenSSL, although there should not be much + problems using a different library. If anyone does "port" curl to use a + different SSL library, we are of course very interested in getting the + patch! + + 2.3. Where can I find a copy of LIBEAY32.DLL? + + That is an OpenSSL binary built for Windows. + + Curl uses OpenSSL to do the SSL stuff. The LIBEAY32.DLL is what curl needs + on a windows machine to do https://. Check out the curl web site to find + accurate and up-to-date pointers to recent OpenSSL DLLs and other binary + packages. + + 2.4. Does cURL support Socks (RFC 1928) ? + + Yes, SOCKS5 is supported when curl is built with IPv6 support disabled. + + +3. Usage problems + + 3.1. curl: (1) SSL is disabled, https: not supported + + If you get this output when trying to get anything from a https:// server, + it means that the configure script couldn't find all libs and include files + it requires for SSL to work. If the configure script fails to find them, + curl is simply built without SSL support. + + To get the https:// support into a curl that was previously built but that + reports that https:// is not supported, you should dig through the document + and logs and check out why the configure script doesn't find the SSL libs + and/or include files. + + Also, check out the other paragraph in this FAQ labeled "configure doesn't + find OpenSSL even when it is installed". + + 3.2. How do I tell curl to resume a transfer? + + Curl supports resumed transfers both ways on both FTP and HTTP. + + Try the -C option. + + 3.3. Why doesn't my posting using -F work? + + You can't simply use -F or -d at your choice. The web server that will + receive your post assumes one of the formats. If the form you're trying to + "fake" sets the type to 'multipart/form-data', then and only then you must + use the -F type. In all the most common cases, you should use -d which then + causes a posting with the type 'application/x-www-form-urlencoded'. + + This is described in some detail in the MANUAL and TheArtOfHttpScripting + documents, and if you don't understand it the first time, read it again + before you post questions about this to the mailing list. Also, try reading + through the mailing list archives for old postings and questions regarding + this. + + 3.4. How do I tell curl to run custom FTP commands? + + You can tell curl to perform optional commands both before and/or after a + file transfer. Study the -Q/--quote option. + + Since curl is used for file transfers, you don't use curl to just perform + FTP commands without transferring anything. Therefore you must always specify + a URL to transfer to/from even when doing custom FTP commands. + + 3.5. How can I disable the Pragma: nocache header? + + You can change all internally generated headers by adding a replacement with + the -H/--header option. By adding a header with empty contents you safely + disable that one. Use -H "Pragma:" to disable that specific header. + + 3.6. Does curl support ASP, XML, XHTML or HTML version Y? + + To curl, all contents are alike. It doesn't matter how the page was + generated. It may be ASP, PHP, Perl, shell-script, SSI or plain + HTML-files. There's no difference to curl and it doesn't even know what kind + of language that generated the page. + + See also item 3.14 regarding javascript. + + 3.7. Can I use curl to delete/rename a file through FTP? + + Yes. You specify custom FTP commands with -Q/--quote. + + One example would be to delete a file after you have downloaded it: + + curl -O ftp://download.com/coolfile -Q '-DELE coolfile' + + 3.8 How do I tell curl to follow HTTP redirects? + + Curl does not follow so-called redirects by default. The Location: header + that informs the client about this is only interpreted if you're using the + -L/--location option. As in: + + curl -L http://redirector.com + + 3.9 How do I use curl in my favorite programming language? + + There exist many language interfaces/bindings for curl that integrates it + better with various languages. If you are fluid in a script language, you + may very well opt to use such an interface instead of using the command line + tool. + + Find out more about which languages that support curl directly, and how to + install and use them, in the libcurl section of the curl web site: + + http://curl.haxx.se/libcurl/ + + In February 2003, there are interfaces available for the following + languages: Basic, C, C++, Cocoa, Dylan, Euphoria, Java, Lua, Object-Pascal, + Pascal, Perl, PHP, PostgreSQL, Python, Rexx, Ruby, Scheme and Tcl. By the + time you read this, additional ones may have appeared! + + 3.10 What about SOAP, WebDAV, XML-RPC or similar protocols over HTTP? + + Curl adheres to the HTTP spec, which basically means you can play with *any* + protocol that is built on top of HTTP. Protocols such as SOAP, WEBDAV and + XML-RPC are all such ones. You can use -X to set custom requests and -H to + set custom headers (or replace internally generated ones). + + Using libcurl is of course just as fine and you'd just use the proper + library options to do the same. + + 3.11 How do I POST with a different Content-Type? + + You can always replace the internally generated headers with -H/--header. + To make a simple HTTP POST with text/xml as content-type, do something like: + + curl -d "datatopost" -H "Content-Type: text/xml" [URL] + + 3.12 Why do FTP specific features over HTTP proxy fail? + + Because when you use a HTTP proxy, the protocol spoken on the network will + be HTTP, even if you specify a FTP URL. This effectively means that you + normally can't use FTP specific features such as FTP upload and FTP quote + etc. + + There is one exception to this rule, and that is if you can "tunnel through" + the given HTTP proxy. Proxy tunneling is enabled with a special option (-p) + and is generally not available as proxy admins usually disable tunneling to + other ports than 443 (which is used for HTTPS access through proxies). + + 3.13 Why does my single/double quotes fail? + + To specify a command line option that includes spaces, you might need to + put the entire option within quotes. Like in: + + curl -d " with spaces " url.com + + or perhaps + + curl -d ' with spaces ' url.com + + Exactly what kind of quotes and how to do this is entirely up to the shell + or command line interpreter that you are using. For most unix shells, you + can more or less pick either single (') or double (") quotes. For + Windows/DOS prompts I believe you're forced to use double (") quotes. + + Please study the documentation for your particular environment. Examples in + the curl docs will use a mix of both these ones as shown above. You must + adjust them to work in your environment. + + Remember that curl works and runs on more operating systems than most single + individuals have ever tried. + + 3.14 Does curl support javascript or pac (automated proxy config)? + + Many web pages do magic stuff using embedded javascript. Curl and libcurl + have no built-in support for that, so it will be treated just like any other + contents. + + .pac files are a netscape invention and are sometimes used by organizations + to allow them to differentiate which proxies to use. The .pac contents is + just a javascript program that gets invoked by the browser and that returns + the name of the proxy to connect to. Since curl doesn't support javascript, + it can't support .pac proxy configuration either. + + Some work-arounds usually suggested to overcome this javascript dependency: + + - Depending on the javascript complexity, write up a script that + translates it to another language and execute that. + + - Read the javascript code and rewrite the same logic in another language. + + - Implement a javascript interpreter, people have successfully used the + Mozilla javascript engine in the past. + + - Ask your admins to stop this, for a static proxy setup or similar. + + 3.15 Can I do recursive fetches with curl? + + No. curl itself has no code that performs recursive operations, such as + those performed by wget. + + There exist wrapper scripts with that functionality (for example the + curlmirror perl script), and you can write programs based on libcurl to do + it, but the command line tool curl itself cannot. + +4. Running Problems + + 4.1. Problems connecting to SSL servers. + + It took a very long time before we could sort out why curl had problems to + connect to certain SSL servers when using SSLeay or OpenSSL v0.9+. The + error sometimes showed up similar to: + + 16570:error:1407D071:SSL routines:SSL2_READ:bad mac decode:s2_pkt.c:233: + + It turned out to be because many older SSL servers don't deal with SSLv3 + requests properly. To correct this problem, tell curl to select SSLv2 from + the command line (-2/--sslv2). + + There have also been examples where the remote server didn't like the SSLv2 + request and instead you had to force curl to use SSLv3 with -3/--sslv3. + + 4.2. Why do I get problems when I use & or % in the URL? + + In general unix shells, the & letter is treated special and when used, it + runs the specified command in the background. To safely send the & as a part + of a URL, you should quote the entire URL by using single (') or double (") + quotes around it. + + An example that would invoke a remote CGI that uses &-letters could be: + + curl 'http://www.altavista.com/cgi-bin/query?text=yes&q=curl' + + In Windows, the standard DOS shell treats the %-letter specially and you + need to use TWO %-letters for each single one you want to use in the URL. + + Also note that if you want the literal %-letter to be part of the data you + pass in a POST using -d/--data you must encode it as '%25' (which then also + needs the %-letter doubled on Windows machines). + + 4.3. How can I use {, }, [ or ] to specify multiple URLs? + + Because those letters have a special meaning to the shell, and to be used in + a URL specified to curl you must quote them. + + An example that downloads two URLs (sequentially) would do: + + curl '{curl,www}.haxx.se' + + To be able to use those letters as actual parts of the URL (without using + them for the curl URL "globbing" system), use the -g/--globoff option: + + curl -g 'www.site.com/weirdname[].html' + + 4.4. Why do I get downloaded data even though the web page doesn't exist? + + Curl asks remote servers for the page you specify. If the page doesn't exist + at the server, the HTTP protocol defines how the server should respond and + that means that headers and a "page" will be returned. That's simply how + HTTP works. + + By using the --fail option you can tell curl explicitly to not get any data + if the HTTP return code doesn't say success. + + 4.5 Why do I get return code XXX from a HTTP server? + + RFC2616 clearly explains the return codes. This is a short transcript. Go + read the RFC for exact details: + + 4.5.1 "400 Bad Request" + + The request could not be understood by the server due to malformed + syntax. The client SHOULD NOT repeat the request without modifications. + + 4.5.2 "401 Unauthorized" + + The request requires user authentication. + + 4.5.3 "403 Forbidden" + + The server understood the request, but is refusing to fulfill it. + Authorization will not help and the request SHOULD NOT be repeated. + + 4.5.4 "404 Not Found" + + The server has not found anything matching the Request-URI. No indication + is given of whether the condition is temporary or permanent. + + 4.5.5 "405 Method Not Allowed" + + The method specified in the Request-Line is not allowed for the resource + identified by the Request-URI. The response MUST include an Allow header + containing a list of valid methods for the requested resource. + + 4.5.6 "301 Moved Permanently" + + If you get this return code and an HTML output similar to this: + +

Moved Permanently

The document has moved here. + + it might be because you request a directory URL but without the trailing + slash. Try the same operation again _with_ the trailing URL, or use the + -L/--location option to follow the redirection. + + 4.6. Can you tell me what error code 142 means? + + All error codes that are larger than the highest documented error code means + that curl has exited due to a crash. This is a serious error, and we + appreciate a detailed bug report from you that describes how we could go + ahead and repeat this! + + 4.7. How do I keep user names and passwords secret in Curl command lines? + + This problem has two sides: + + The first part is to avoid having clear-text passwords in the command line + so that they don't appear in 'ps' outputs and similar. That is easily + avoided by using the "-K" option to tell curl to read parameters from a file + or stdin to which you can pass the secret info. curl itself will also + attempt to "hide" the given password by blanking out the option - this + doesn't work on all platforms. + + To keep the passwords in your account secret from the rest of the world is + not a task that curl addresses. You could of course encrypt them somehow to + at least hide them from being read by human eyes, but that is not what + anyone would call security. + + Also note that regular HTTP (using Basic authentication) and FTP passwords + are sent in clear across the network. All it takes for anyone to fetch them + is to listen on the network. Eavesdropping is very easy. Use more secure + authentication methods (like Digest, Negotiate or even NTLM) or consider the + SSL-based alternatives HTTPS and FTPS. + + 4.8 I found a bug! + + It is not a bug if the behavior is documented. Read the docs first. + Especially check out the KNOWN_BUGS file, it may be a documented bug! + + If it is a problem with a binary you've downloaded or a package for your + particular platform, try contacting the person who built the package/archive + you have. + + If there is a bug, read the BUGS document first. Then report it as described + in there. + + 4.9. Curl can't authenticate to the server that requires NTLM? + + This is supported in curl 7.10.6 or later. No earlier curl version knows + of this magic. + + NTLM is a Microsoft proprietary protocol. Proprietary formats are evil. You + should not use such ones. + + 4.10 My HTTP request using HEAD, PUT or DELETE doesn't work! + + Many web servers allow or demand that the administrator configures the + server properly for these requests to work on the web server. + + Some servers seem to support HEAD only on certain kinds of URLs. + + To fully grasp this, try the documentation for the particular server + software you're trying to interact with. This is not anything curl can do + anything about. + + 4.11 Why does my HTTP range requests return the full document? + + Because the range may not be supported by the server, or the server may + choose to ignore it and return the full document anyway. + + 4.12 Why do I get "certificate verify failed" ? + + You invoke curl 7.10 or later to communicate on a https:// URL and get an + error back looking something similar to this: + + curl: (35) SSL: error:14090086:SSL routines: + SSL3_GET_SERVER_CERTIFICATE:certificate verify failed + + Then it means that curl couldn't verify that the server's certificate was + good. Curl verifies the certificate using the CA cert bundle that comes with + the curl installation. + + To disable the verification (which makes it act like curl did before 7.10), + use -k. This does however enable man-in-the-middle attacks. + + If you get this failure but are having a CA cert bundle installed and used, + the server's certificate is not signed by one of the CA's in the bundle. It + might for example be self-signed. You then correct this problem by obtaining + a valid CA cert for the server. Or again, decrease the security by disabling + this check. + + Details are also in the SSLCERTS file in the release archives, found online + here: http://curl.haxx.se/docs/sslcerts.html + +5. libcurl Issues + + 5.1. Is libcurl thread-safe? + + Yes. + + We have written the libcurl code specificly adjusted for multi-threaded + programs. libcurl will use thread-safe functions instead of non-safe ones if + your system has such. + + We would appreciate some kind of report or README file from those who have + used libcurl in a threaded environment. + + 5.2 How can I receive all data into a large memory chunk? + + [ See also the examples/getinmemory.c source ] + + You are in full control of the callback function that gets called every time + there is data received from the remote server. You can make that callback do + whatever you want. You do not have to write the received data to a file. + + One solution to this problem could be to have a pointer to a struct that you + pass to the callback function. You set the pointer using the + curl_easy_setopt(CURLOPT_FILE) function. Then that pointer will be passed to + the callback instead of a FILE * to a file: + + /* imaginary struct */ + struct MemoryStruct { + char *memory; + size_t size; + }; + + /* imaginary callback function */ + size_t + WriteMemoryCallback(void *ptr, size_t size, size_t nmemb, void *data) + { + register int realsize = size * nmemb; + struct MemoryStruct *mem = (struct MemoryStruct *)data; + + mem->memory = (char *)realloc(mem->memory, mem->size + realsize + 1); + if (mem->memory) { + memcpy(&(mem->memory[mem->size]), ptr, realsize); + mem->size += realsize; + mem->memory[mem->size] = 0; + } + return realsize; + } + + 5.3 How do I fetch multiple files with libcurl? + + libcurl has excellent support for transferring multiple files. You should + just repeatedly set new URLs with curl_easy_setopt() and then transfer it + with curl_easy_perform(). The handle you get from curl_easy_init() is not + only reusable, but you're even encouraged to reuse it if you can, as that + will enable libcurl to use persistent connections. + + 5.4 Does libcurl do Winsock initialization on win32 systems? + + Yes, if told to in the curl_global_init() call. + + 5.5 Does CURLOPT_WRITEDATA and CURLOPT_READDATA work on win32 ? + + Yes, but you cannot open a FILE * and pass the pointer to a DLL and have + that DLL use the FILE * (as the DLL and the client application cannot access + each others' variable memory areas). If you set CURLOPT_WRITEDATA you must + also use CURLOPT_WRITEFUNCTION as well to set a function that writes the + file, even if that simply writes the data to the specified FILE *. + Similarly, if you use CURLOPT_READDATA you must also specify + CURLOPT_READFUNCTION. + + (Provided by Joel DeYoung and Bob Schader) + + 5.6 What about Keep-Alive or persistent connections? + + curl and libcurl have excellent support for persistent connections when + transferring several files from the same server. Curl will attempt to reuse + connections for all URLs specified on the same command line/config file, and + libcurl will reuse connections for all transfers that are made using the + same libcurl handle. + + 5.7 Link errors when building libcurl on Windows! + + You need to make sure that your project, and all the libraries (both static + and dynamic) that it links against, are compiled/linked against the same run + time library. + + This is determined by the /MD, /ML, /MT (and their corresponding /M?d) + options to the command line compiler. /MD (linking against MSVCRT dll) seems + to be the most commonly used option. + + (Provided by Andrew Francis) + + +6. License Issues + + Curl and libcurl are released under a MIT/X derivate license. The license is + very liberal and should not impose a problem for your project. This section + is just a brief summary for the cases we get the most questions. (Parts of + this section was much enhanced by Bjorn Reese.) + + 6.1. I have a GPL program, can I use the libcurl library? + + Yes! + + Since libcurl may be distributed under the MIT/X derivate license, it can be + used together with GPL in any software. + + 6.2. I have a closed-source program, can I use the libcurl library? + + Yes! + + libcurl does not put any restrictions on the program that uses the library. + + 6.3. I have a BSD licensed program, can I use the libcurl library? + + Yes! + + libcurl does not put any restrictions on the program that uses the library. + + 6.4. I have a program that uses LGPL libraries, can I use libcurl? + + Yes! + + The LGPL license doesn't clash with other licenses. + + 6.5. Can I modify curl/libcurl for my program and keep the changes secret? + + Yes! + + The MIT/X derivate license practically allows you to do almost anything with + the sources, on the condition that the copyright texts in the sources are + left intact. + + 6.6. Can you please change the curl/libcurl license to XXXX? + + No. + + We have carefully picked this license after years of development and + discussions and a large amount of people have contributed with source code + knowing that this is the license we use. This license puts the restrictions + we want on curl/libcurl and it does not spread to other programs or + libraries that use it. It should be possible for everyone to use libcurl or + curl in their projects, no matter what license they already have in use. diff --git a/neo/curl/docs/FEATURES b/neo/curl/docs/FEATURES new file mode 100644 index 0000000..e7a3d62 --- /dev/null +++ b/neo/curl/docs/FEATURES @@ -0,0 +1,114 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +FEATURES + +Misc + - full URL syntax + - custom maximum download time + - custom least download speed acceptable + - custom output result after completion + - multiple URLs + - guesses protocol from host name unless specified + - uses .netrc + - progress bar/time specs while downloading + - "standard" proxy environment variables support + - config file support + - compiles on win32 (reported builds on 40+ operating systems) + - redirectable stderr + - selectable network interface for outgoing traffic + - IPv6 support + - persistant connections + - socks5 support + - supports user name + password in proxy environment variables + - operations through proxy "tunnel" (using CONNECT) + - supports transfers of large files (>2GB and >4GB) + +HTTP + - HTTP/1.1 compliant (optionally uses 1.0) + - GET + - PUT + - HEAD + - POST + - multipart formpost (RFC1867-style) + - authentication: Basic, Digest, NTLM(*1), GSS-Negotiate/Negotiate(*3) and + SPNEGO (*4) + - resume (both GET and PUT) + - follow redirects + - maximum amount of redirects to follow + - custom HTTP request + - cookie get/send fully parsed + - reads/writes the netscape cookie file format + - custom headers (replace/remove internally generated headers) + - custom user-agent string + - custom referer string + - range + - proxy authentication + - time conditions + - via http-proxy + - retrieve file modification date + - Content-Encoding support for deflate and gzip + - "Transfer-Encoding: chunked" support for "uploads" + +HTTPS (*1) + - (all the HTTP features) + - using certificates + - verify server certificate + - via http-proxy + - select desired encryption + - force usage of a specific SSL version (SSLv2, SSLv3 or TLSv1) + +FTP + - download + - authentication + - kerberos4 (*5) + - active/passive using PORT, EPRT, PASV or EPSV + - single file size information (compare to HTTP HEAD) + - 'type=' URL support + - dir listing + - dir listing names-only + - upload + - upload append + - upload via http-proxy as HTTP PUT + - download resume + - upload resume + - custom ftp commands (before and/or after the transfer) + - simple "range" support + - via http-proxy + - all operations can be tunneled through a http-proxy + - customizable to retrieve file modification date + +FTPS (*1) + - explicit ftps:// support that use SSL on both connections + - implicit "AUTH TSL" and "AUTH SSL" usage to "upgrade" plain ftp:// + connection to use SSL for both or one of the connections + +TELNET + - connection negotiation + - custom telnet options + - stdin/stdout I/O + +LDAP (*2) + - full LDAP URL support + +DICT + - extended DICT URL support + +GOPHER + - GET + - via http-proxy + +FILE + - URL support + +FOOTNOTES +========= + + *1 = requires OpenSSL + *2 = requires OpenLDAP + *3 = requires a GSSAPI-compliant library, such as Heimdal or similar. + *4 = requires FBopenssl + *5 = requires a krb4 library, such as the MIT one or similar. diff --git a/neo/curl/docs/HISTORY b/neo/curl/docs/HISTORY new file mode 100644 index 0000000..f04d1e4 --- /dev/null +++ b/neo/curl/docs/HISTORY @@ -0,0 +1,128 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + How cURL Became Like This + + +In the second half of 1997, Daniel Stenberg came up with the idea to make +currency-exchange calculations available to Internet Relay Chat (IRC) +users. All the necessary data are published on the Web; he just needed to +automate their retrieval. + +Daniel simply adopted an existing command-line open-source tool, httpget, that +Brazilian Rafael Sagula had written. After a few minor adjustments, it did +just what he needed. + +Soon, he found currencies on a GOPHER site, so support for that had to go in, +and not before long FTP download support was added as well. The name of the +project was changed to urlget to better fit what it actually did now, since +the http-only days were already passed. + +The project slowly grew bigger. When upload capabilities were added and the +name once again was misleading, a second name change was made and on March 20, +1998 curl 4 was released. (The version numbering from the previous names was +kept.) + +(Unrelated to this project a company called Curl Corporation registered a US +trademark on the name "CURL" on May 18 1998. That company had then already +registered the curl.com domain back in November of the previous year. All this +was revealed to us much later.) + +SSL support was added, powered by the SSLeay library. + +August 1998, first announcement of curl on freshmeat.net. + +October 1998, with the curl 4.9 release and the introduction of cookie +support, curl was no longer released under the GPL license. Now we're at 4000 +lines of code, we switched over to the MPL license to restrict the effects of +"copyleft". + +November 1998, configure script and reported successful compiles on several +major operating systems. The never-quite-understood -F option was added and +curl could now simulate quite a lot of a browser. TELNET support was added. + +Curl 5 was released in December 1998 and introduced the first ever curl man +page. People started making Linux RPM packages out of it. + +January 1999, DICT support added. + +OpenSSL took over where SSLeay was abandoned. + +May 1999, first Debian package. + +August 1999, LDAP:// and FILE:// support added. The curl web site gets 1300 +visits weekly. + +Released curl 6.0 in September. 15000 lines of code. + +December 28 1999, added the project on Sourceforge and started using its +services for managing the project. + +Spring 2000, major internal overhaul to provide a suitable library interface. +The first non-beta release was named 7.1 and arrived in August. This offered +the easy interface and turned out to be the beginning of actually getting +other software and programs to get based on and powered by libcurl. Almost +20000 lines of code. + +August 2000, the curl web site gets 4000 visits weekly. + +The PHP guys adopted libcurl already the same month, when the first ever third +party libcurl binding showed up. CURL has been a supported module in PHP since +the release of PHP 4.0.2. This would soon get followers. More than 16 +different bindings exist at the time of this writing. + +September 2000, kerberos4 support was added. + +In November 2000 started the work on a test suite for curl. It was later +re-written from scratch again. + +January 2001, Daniel released curl 7.5.2 under a new license again: MIT (or +MPL). The MIT license is extremely liberal and can be used combined with GPL +in other projects. This would finally put an end to the "complaints" from +people involved in GPLed projects that previously were prohibited from using +libcurl while it was released under MPL only. (Due to the fact that MPL is +deemed "GPL incompatible".) + +curl supports HTTP 1.1 starting with the release of 7.7, March 22 2001. This +also introduced libcurl's ability to do persistent connections. 24000 lines of +code. + +The first experimental ftps:// support was added in March 2001. + +August 2001. curl is bundled in Mac OS X, 10.1. It was already becoming more +and more of a standard utility of Linux distributions and a regular in the BSD +ports collections. The curl web site gets 8000 visits weekly. Curl Corporation +contacted Daniel to discuss "the name issue". After Daniel's reply, they have +never since got in touch again. + +September 2001, libcurl 7.9 introduces cookie jar and curl_formadd(). During +the forthcoming 7.9.x releases, we introduced the multi interface slowly and +without much whistles. + +June 2002, the curl web site gets 13000 visits weekly. curl and libcurl is +35000 lines of code. Reported successful compiles on more than 40 combinations +of CPUs and operating systems. + +To estimate number of users of the curl tool or libcurl library is next to +impossible. Around 5000 downloaded packages each week from the main site gives +a hint, but the packages are mirrored extensively, bundled with numerous OS +distributions and otherwise retrieved as part of other software. + +September 2002, with the release of curl 7.10 it is released under the MIT +license only. + +February 2003, the curl site averages at 20000 visits weekly. At any given +moment, there's an average of 3 people browsing the curl.haxx.se site. + +Multiple new authentication schemes are supported: Digest (May), NTLM (June) +and Negotiate (June). + +November 2003: curl 7.10.8 is released. 45000 lines of code. ~55000 unique +visitors to the curl.haxx.se site. Five official web mirrors. + +December 2003, full-fledged SSL for FTP is supported. + +January 2004: curl 7.11.0 introduced large file support. diff --git a/neo/curl/docs/INSTALL b/neo/curl/docs/INSTALL new file mode 100644 index 0000000..d16b039 --- /dev/null +++ b/neo/curl/docs/INSTALL @@ -0,0 +1,551 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + How To Compile + +Installing Binary Packages +========================== + + Lots of people download binary distributions of curl and libcurl. This + document does not describe how to install curl or libcurl using such a + binary package. This document describes how to compile, build and install + curl and libcurl from source code. + +UNIX +==== + + A normal unix installation is made in three or four steps (after you've + unpacked the source archive): + + ./configure + make + make test (optional) + make install + + You probably need to be root when doing the last command. + + If you have checked out the sources from the CVS repository, read the + CVS-INFO on how to proceed. + + Get a full listing of all available configure options by invoking it like: + + ./configure --help + + If you want to install curl in a different file hierarchy than /usr/local, + you need to specify that already when running configure: + + ./configure --prefix=/path/to/curl/tree + + If you happen to have write permission in that directory, you can do 'make + install' without being root. An example of this would be to make a local + install in your own home directory: + + ./configure --prefix=$HOME + make + make install + + The configure script always tries to find a working SSL library unless + explicitly told not to. If you have OpenSSL installed in the default search + path for your compiler/linker, you don't need to do anything special. If + you have OpenSSL installed in /usr/local/ssl, you can run configure like: + + ./configure --with-ssl + + If you have OpenSSL installed somewhere else (for example, /opt/OpenSSL,) + you can run configure like this: + + ./configure --with-ssl=/opt/OpenSSL + + If you insist on forcing a build without SSL support, even though you may + have OpenSSL installed in your system, you can run configure like this: + + ./configure --without-ssl + + If you have OpenSSL installed, but with the libraries in one place and the + header files somewhere else, you have to set the LDFLAGS and CPPFLAGS + environment variables prior to running configure. Something like this + should work: + + (with the Bourne shell and its clones): + + CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \ + ./configure + + (with csh, tcsh and their clones): + + env CPPFLAGS="-I/path/to/ssl/include" LDFLAGS="-L/path/to/ssl/lib" \ + ./configure + + If your SSL library was compiled with rsaref (usually for use in the United + States), you may also need to set: + + LIBS=-lRSAglue -lrsaref + (as suggested by Doug Kaufman) + + MORE OPTIONS + + To force configure to use the standard cc compiler if both cc and gcc are + present, run configure like + + CC=cc ./configure + or + env Cc=cc ./configure + + To force a static library compile, disable the shared library creation + by running configure like: + + ./configure --disable-shared + + To tell the configure script to skip searching for thread-safe functions, + add an option like: + + ./configure --disable-thread + + To build curl with kerberos4 support enabled, curl requires the krb4 libs + and headers installed. You can then use a set of options to tell + configure where those are: + + --with-krb4-includes[=DIR] Specify location of kerberos4 headers + --with-krb4-libs[=DIR] Specify location of kerberos4 libs + --with-krb4[=DIR] where to look for Kerberos4 + + In most cases, /usr/athena is the install prefix and then it works with + + ./configure --with-krb4=/usr/athena + + If you're a curl developer and use gcc, you might want to enable more + debug options with the --enable-debug option. + +Win32 +===== + + Without SSL: + + MingW32 (GCC-2.95) style + ------------------------ + Run the 'mingw32.bat' file to get the proper environment variables + set, then run 'make mingw32' in the root dir. + + If you have any problems linking libraries or finding header files, be + sure to verify that the provided "Makefile.m32" files use the proper + paths, and adjust as necessary. + + Cygwin style + ------------ + Almost identical to the unix installation. Run the configure script in + the curl root with 'sh configure'. Make sure you have the sh + executable in /bin/ or you'll see the configure fail towards the end. + + Run 'make' + + Microsoft command line style + ---------------------------- + Run the 'vcvars32.bat' file to get the proper environment variables + set, then run 'nmake vc' in the root dir. + + The vcvars32.bat file is part of the Microsoft development + environment. + + IDE-style + ------------------------- + If you use VC++, Borland or similar compilers. Include all lib source + files in a static lib "project" (all .c and .h files that is). + (you should name it libcurl or similar) + + Make the sources in the src/ drawer be a "win32 console application" + project. Name it curl. + + With VC++, add 'ws2_32.lib' to the link libs when you build curl! + Borland seems to do that itself magically. Of course you have to make + sure it links with the libcurl too! + + For VC++ 6, there's an included Makefile.vc6 that should be possible + to use out-of-the-box. + + Microsoft note: add /Zm200 to the compiler options to increase the + compiler's memory allocation limit, as the hugehelp.c won't compile + due to "too long puts string". + + + With SSL: + + MingW32 (GCC-2.95) style + ------------------------ + Run the 'mingw32.bat' file to get the proper environment variables + set, then run 'make mingw32-ssl' in the root dir. + + If you have any problems linking libraries or finding header files, be + sure to look at the provided "Makefile.m32" files for the proper + paths, and adjust as necessary. + + Cygwin style + ------------ + Haven't done, nor got any reports on how to do. It should although be + identical to the unix setup for the same purpose. See above. + + Microsoft command line style + ---------------------------- + + Please read the OpenSSL documentation on how to compile and install + the OpenSSL libraries. The build process of OpenSSL generates the + libeay32.dll and ssleay32.dll files in the out32dll subdirectory in + the OpenSSL home directory. OpenSSL static libraries (libeay32.lib, + ssleay32.lib, RSAglue.lib) are created in the out32 subdirectory. + + Run the 'vcvars32.bat' file to get a proper environment. The + vcvars32.bat file is part of the Microsoft development environment and + you may find it in 'C:\Program Files\Microsoft Visual Studio\vc98\bin' + provided that you installed Visual C/C++ 6 in the default directory. + + Before running nmake define the OPENSSL_PATH environment variable with + the root/base directory of OpenSSL, for example: + + set OPENSSL_PATH=c:\openssl-0.9.7a + + lib/Makefile.vc6 depends on zlib (http://www.gzip.org/zlib/) as well. + Please read the zlib documentation on how to compile zlib. Define the + ZLIB_PATH environment variable to the location of zlib.h and zlib.lib, + for example: + + set ZLIB_PATH=c:\zlib-1.1.4 + + Then run 'nmake vc-ssl' or 'nmake vc-ssl-dll' in curl's root + directory. 'nmake vc-ssl' will create a libcurl static and dynamic + libraries in the lib subdirectory, as well as a statically linked + version of curl.exe in the src subdirectory. This statically linked + version is a standalone executable not requiring any DLL at + runtime. This make method requires that you have the static OpenSSL + libraries available in OpenSSL's out32 subdirectory. + 'nmake vc-ssl-dll' creates the libcurl dynamic library and + links curl.exe against libcurl and OpenSSL dynamically. + This executable requires libcurl.dll and the OpenSSL DLLs + at runtime. + + Microsoft / Borland style + ------------------------- + If you have OpenSSL, and want curl to take advantage of it, edit your + project properties to use the SSL include path, link with the SSL libs + and define the USE_SSLEAY symbol. + + Using Borland C++ compiler version 5.5.1 (available as free download + from Borland's site) + --------------------------------------------------------------------- + + compile openssl + + Make sure you include the paths to curl/include and openssl/inc32 in + your bcc32.cnf file + + + eg : -I"c:\Bcc55\include;c:\path_curl\include;c:\path_openssl\inc32" + + Check to make sure that all of the sources listed in lib/Makefile.b32 + are present in the /path_to_curl/lib directory. (Check the src + directory for missing ones.) + + Make sure the environment variable "BCCDIR" is set to the install + location for the compiler eg : c:\Borland\BCC55 + + command line: + make -f /path_to_curl/lib/Makefile-ssl.b32 + + compile simplessl.c with appropriate links + + c:\curl\docs\examples\> bcc32 -L c:\path_to_curl\lib\libcurl.lib + -L c:\borland\bcc55\lib\psdk\ws2_32.lib + -L c:\openssl\out32\libeay32.lib + -L c:\openssl\out32\ssleay32.lib + simplessl.c + + Disabling Specific Protocols: + + The configure utility, unfortunately, is not available for the Windows + environment, therefore, you cannot use the various disable-protocol + options of the configure utility on this platform. + + However, you can use the following defines to disable specific + protocols: + + HTTP_ONLY disables all protocols except HTTP + CURL_DISABLE_FTP disables FTP + CURL_DISABLE_LDAP disables LDAP + CURL_DISABLE_TELNET disables TELNET + CURL_DISABLE_DICT disables DICT + CURL_DISABLE_FILE disables FILE + CURL_DISABLE_GOPHER disables GOPHER + + If you want to set any of these defines you have the following + possibilities: + + - Modify lib/setup.h + - Modify lib/Makefile.vc6 + - Add defines to Project/Settings/C/C++/General/Preprocessor Definitions + in the curllib.dsw/curllib.dsp Visual C++ 6 IDE project. + +IBM OS/2 +======== + + Building under OS/2 is not much different from building under unix. + You need: + + - emx 0.9d + - GNU make + - GNU patch + - ksh + - GNU bison + - GNU file utilities + - GNU sed + - autoconf 2.13 + + If you want to build with OpenSSL or OpenLDAP support, you'll need to + download those libraries, too. Dirk Ohme has done some work to port SSL + libraries under OS/2, but it looks like he doesn't care about emx. You'll + find his patches on: http://come.to/Dirk_Ohme + + If during the linking you get an error about _errno being an undefined + symbol referenced from the text segment, you need to add -D__ST_MT_ERRNO__ + in your definitions. + + If everything seems to work fine but there's no curl.exe, you need to add + -Zexe to your linker flags. + + If you're getting huge binaries, probably your makefiles have the -g in + CFLAGS. + +VMS +=== + (The VMS section is in whole contributed by the friendly Nico Baggus) + + Curl seems to work with FTP & HTTP other protocols are not tested. (the + perl http/ftp testing server supplied as testing too cannot work on VMS + because vms has no concept of fork(). [ I tried to give it a whack, but + thats of no use. + + SSL stuff has not been ported. + + Telnet has about the same issues as for Win32. When the changes for Win32 + are clear maybe they'll work for VMS too. The basic problem is that select + ONLY works for sockets. + + Marked instances of fopen/[f]stat that might become a problem, especially + for non stream files. In this regard, the files opened for writing will be + created stream/lf and will thus be safe. Just keep in mind that non-binary + read/wring from/to files will have a records size limit of 32767 bytes + imposed. + + Stat to get the size of the files is again only safe for stream files & + fixed record files without implied CC. + + -- My guess is that only allowing access to stream files is the quickest + way to get around the most issues. Therefore all files need to to be + checked to be sure they will be stream/lf before processing them. This is + the easiest way out, I know. The reason for this is that code that needs to + report the filesize will become a pain in the ass otherwise. + + Exit status.... Well we needed something done here, + + VMS has a structured exist status: + | 3 | 2 | 1 | 0| + |1098|765432109876|5432109876543|210| + +----+------------+-------------+---+ + |Ctrl| Facility | Error code |sev| + +----+------------+-------------+---+ + + With the Ctrl-bits an application can tell if part or the whole message has + allready been printed from the program, DCL doesn't need to print it again. + + Facility - basicaly the program ID. A code assigned to the program + the name can be fetched from external or internal message libraries + Errorcode - the errodes assigned by the application + Sev. - severity: Even = error, off = non error + 0 = Warning + 1 = Success + 2 = Error + 3 = Information + 4 = Fatal + <5-7> reserved. + + This all presents itself with: + %--, + + See also the src/curlmsg.msg file, it has the source for the messages In + src/main.c a section is devoted to message status values, the globalvalues + create symbols with certain values, referenced from a compiled message + file. Have all exit function use a exit status derived from a translation + table with the compiled message codes. + + This was all compiled with: + + Compaq C V6.2-003 on OpenVMS Alpha V7.1-1H2 + + So far for porting notes as of: + 13-jul-2001 + N. Baggus + +QNX +=== + (This section was graciously brought to us by David Bentham) + + As QNX is targetted for resource constrained environments, the QNX headers + set conservative limits. This includes the FD_SETSIZE macro, set by default + to 32. Socket descriptors returned within the CURL library may exceed this, + resulting in memory faults/SIGSEGV crashes when passed into select(..) + calls using fd_set macros. + + A good all-round solution to this is to override the default when building + libcurl, by overriding CFLAGS during configure, example + # configure CFLAGS='-DFD_SETSIZE=64 -g -O2' + +CROSS COMPILE +============= + + (This section was graciously brought to us by Jim Duey, 23-oct-2001) + + Download and unpack the cURL package. Version should be 7.9.1 or later. + + 'cd' to the new directory. (ie. curl-7.9.1-pre4) + + Set environment variables to point to the cross-compile toolchain and call + configure with any options you need. Be sure and specify the '--host' and + '--build' parameters at configuration time. The following script is an + example of cross-compiling for the IBM 405GP PowerPC processor using the + toolchain from MonteVista for Hardhat Linux. + + (begin script) + + #! /bin/sh + + export PATH=$PATH:/opt/hardhat/devkit/ppc/405/bin + export CPPFLAGS="-I/opt/hardhat/devkit/ppc/405/target/usr/include" + export AR=ppc_405-ar + export AS=ppc_405-as + export LD=ppc_405-ld + export RANLIB=ppc_405-ranlib + export CC=ppc_405-gcc + export NM=ppc_405-nm + + configure --target=powerpc-hardhat-linux \ + --host=powerpc-hardhat-linux \ + --build=i586-pc-linux-gnu \ + --prefix=/opt/hardhat/devkit/ppc/405/target/usr/local \ + --exec-prefix=/usr/local + + (end script) + + The '--prefix' parameter specifies where cURL will be installed. If + 'configure' completes successfully, do 'make' and 'make install' as usual. + +RISC OS +======= + The library can be cross-compiled using gccsdk as follows: + + CC=riscos-gcc AR=riscos-ar RANLIB='riscos-ar -s' ./configure \ + --host=arm-riscos-aof --without-random --disable-shared + make + + where riscos-gcc and riscos-ar are links to the gccsdk tools. + You can then link your program with curl/lib/.libs/libcurl.a + + +AmigaOS +======= + (This section was graciously brought to us by Diego Casorran) + + To build cURL/libcurl on AmigaOS just type 'make amiga' ... + + What you need is: (not tested with others versions) + + GeekGadgets / gcc 2.95.3 (http://www.geekgadgets.org/) + + AmiTCP SDK v4.3 (http://www.aminet.net/comm/tcp/AmiTCP-SDK-4.3.lha) + + Native Developer Kit (http://www.amiga.com/3.9/download/NDK3.9.lha) + + As no ixemul.library is required you will be able to build it for + WarpOS/PowerPC (not tested by me), as well a MorphOS version should be + possible with no problems. + + To enable SSL support, you need a OpenSSL native version (without ixemul), + you can find a precompiled package at http://amiga.sourceforge.net/OpenSSL/ + + +PORTS +===== + This is a probably incomplete list of known hardware and operating systems + that curl has been compiled for. If you know a system curl compiles and + runs on, that isn't listed, please let us know! + + - Alpha DEC OSF 4 + - Alpha Digital UNIX v3.2 + - Alpha FreeBSD 4.1, 4.5 + - Alpha Linux 2.2, 2.4 + - Alpha NetBSD 1.5.2 + - Alpha OpenBSD 3.0 + - Alpha OpenVMS V7.1-1H2 + - Alpha Tru64 v5.0 5.1 + - HP-PA HP-UX 9.X 10.X 11.X + - HP-PA Linux + - HP3000 MPE/iX + - MIPS IRIX 6.2, 6.5 + - MIPS Linux + - Pocket PC/Win CE 3.0 + - Power AIX 3.2.5, 4.2, 4.3.1, 4.3.2, 5.1 + - PowerPC Darwin 1.0 + - PowerPC Linux + - PowerPC Mac OS 9 + - PowerPC Mac OS X + - SINIX-Z v5 + - Sparc Linux + - Sparc Solaris 2.4, 2.5, 2.5.1, 2.6, 7, 8 + - Sparc SunOS 4.1.X + - StrongARM (and other ARM) RISC OS 3.1, 4.02 + - StrongARM Linux 2.4 + - StrongARM NetBSD 1.4.1 + - Ultrix 4.3a + - i386 BeOS + - i386 DOS + - i386 FreeBSD + - i386 HURD + - i386 Linux 1.3, 2.0, 2.2, 2.3, 2.4 + - i386 NetBSD + - i386 Novell NetWare + - i386 OS/2 + - i386 OpenBSD + - i386 SCO unix + - i386 Solaris 2.7 + - i386 Windows 95, 98, ME, NT, 2000 + - i386 QNX 6 + - i486 ncr-sysv4.3.03 (NCR MP-RAS) + - ia64 Linux 2.3.99 + - m68k AmigaOS 3 + - m68k Linux + - m68k OpenBSD + - m88k dg-dgux5.4R3.00 + - s390 Linux + - XScale/PXA250 Linux 2.4 + +OpenSSL +======= + + You'll find OpenSSL information at: + + http://www.openssl.org + + +MingW32/Cygwin +============== + + You'll find MingW32 and Cygwin information at: + + http://www.mingw.org + +OpenLDAP +======== + + You'll find OpenLDAP information at: + + http://www.openldap.org + diff --git a/neo/curl/docs/INTERNALS b/neo/curl/docs/INTERNALS new file mode 100644 index 0000000..42ac450 --- /dev/null +++ b/neo/curl/docs/INTERNALS @@ -0,0 +1,381 @@ + Updated for curl 7.9.1 on November 2, 2001 + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +INTERNALS + + The project is split in two. The library and the client. The client part uses + the library, but the library is designed to allow other applications to use + it. + + The largest amount of code and complexity is in the library part. + +CVS +=== + All changes to the sources are committed to the CVS repository as soon as + they're somewhat verified to work. Changes shall be commited as independently + as possible so that individual changes can be easier spotted and tracked + afterwards. + + Tagging shall be used extensively, and by the time we release new archives we + should tag the sources with a name similar to the released version number. + +Windows vs Unix +=============== + + There are a few differences in how to program curl the unix way compared to + the Windows way. The four perhaps most notable details are: + + 1. Different function names for socket operations. + + In curl, this is solved with defines and macros, so that the source looks + the same at all places except for the header file that defines them. The + macros in use are sclose(), sread() and swrite(). + + 2. Windows requires a couple of init calls for the socket stuff. + + Those must be made by the application that uses libcurl, in curl that means + src/main.c has some code #ifdef'ed to do just that. + + 3. The file descriptors for network communication and file operations are + not easily interchangable as in unix. + + We avoid this by not trying any funny tricks on file descriptors. + + 4. When writing data to stdout, Windows makes end-of-lines the DOS way, thus + destroying binary data, although you do want that conversion if it is + text coming through... (sigh) + + We set stdout to binary under windows + + Inside the source code, We make an effort to avoid '#ifdef [Your OS]'. All + conditionals that deal with features *should* instead be in the format + '#ifdef HAVE_THAT_WEIRD_FUNCTION'. Since Windows can't run configure scripts, + we maintain two config-win32.h files (one in lib/ and one in src/) that are + supposed to look exactly as a config.h file would have looked like on a + Windows machine! + + Generally speaking: always remember that this will be compiled on dozens of + operating systems. Don't walk on the edge. + +Library +======= + + There are plenty of entry points to the library, namely each publicly defined + function that libcurl offers to applications. All of those functions are + rather small and easy-to-follow. All the ones prefixed with 'curl_easy' are + put in the lib/easy.c file. + + curl_global_init_() and curl_global_cleanup() should be called by the + application to initialize and clean up global stuff in the library. As of + today, it can handle the global SSL initing if SSL is enabled and it can init + the socket layer on windows machines. libcurl itself has no "global" scope. + + All printf()-style functions use the supplied clones in lib/mprintf.c. This + makes sure we stay absolutely platform independent. + + curl_easy_init() allocates an internal struct and makes some initializations. + The returned handle does not reveal internals. This is the 'SessionHandle' + struct which works as an "anchor" struct for all curl_easy functions. All + connections performed will get connect-specific data allocated that should be + used for things related to particular connections/requests. + + curl_easy_setopt() takes three arguments, where the option stuff must be + passed in pairs: the parameter-ID and the parameter-value. The list of + options is documented in the man page. This function mainly sets things in + the 'SessionHandle' struct. + + curl_easy_perform() does a whole lot of things: + + It starts off in the lib/easy.c file by calling Curl_perform() and the main + work then continues in lib/url.c. The flow continues with a call to + Curl_connect() to connect to the remote site. + + o Curl_connect() + + ... analyzes the URL, it separates the different components and connects to + the remote host. This may involve using a proxy and/or using SSL. The + Curl_gethost() function in lib/hostip.c is used for looking up host names. + + When Curl_connect is done, we are connected to the remote site. Then it is + time to tell the server to get a document/file. Curl_do() arranges this. + + This function makes sure there's an allocated and initiated 'connectdata' + struct that is used for this particular connection only (although there may + be several requests performed on the same connect). A bunch of things are + inited/inherited from the SessionHandle struct. + + o Curl_do() + + Curl_do() makes sure the proper protocol-specific function is called. The + functions are named after the protocols they handle. Curl_ftp(), + Curl_http(), Curl_dict(), etc. They all reside in their respective files + (ftp.c, http.c and dict.c). HTTPS is handled by Curl_http() and FTPS by + Curl_ftp(). + + The protocol-specific functions of course deal with protocol-specific + negotiations and setup. They have access to the Curl_sendf() (from + lib/sendf.c) function to send printf-style formatted data to the remote + host and when they're ready to make the actual file transfer they call the + Curl_Transfer() function (in lib/transfer.c) to setup the transfer and + returns. + + Starting in 7.9.1, if this DO function fails and the connection is being + re-used, libcurl will then close this connection, setup a new connection + and re-issue the DO request on that. This is because there is no way to be + perfectly sure that we have discovered a dead connection before the DO + function and thus we might wrongly be re-using a connection that was closed + by the remote peer. + + o Transfer() + + Curl_perform() then calls Transfer() in lib/transfer.c that performs + the entire file transfer. + + During transfer, the progress functions in lib/progress.c are called at a + frequent interval (or at the user's choice, a specified callback might get + called). The speedcheck functions in lib/speedcheck.c are also used to + verify that the transfer is as fast as required. + + o Curl_done() + + Called after a transfer is done. This function takes care of everything + that has to be done after a transfer. This function attempts to leave + matters in a state so that Curl_do() should be possible to call again on + the same connection (in a persistent connection case). It might also soon + be closed with Curl_disconnect(). + + o Curl_disconnect() + + When doing normal connections and transfers, no one ever tries to close any + connections so this is not normally called when curl_easy_perform() is + used. This function is only used when we are certain that no more transfers + is going to be made on the connection. It can be also closed by force, or + it can be called to make sure that libcurl doesn't keep too many + connections alive at the same time (there's a default amount of 5 but that + can be changed with the CURLOPT_MAXCONNECTS option). + + This function cleans up all resources that are associated with a single + connection. + + Curl_perform() is the function that does the main "connect - do - transfer - + done" loop. It loops if there's a Location: to follow. + + When completed, the curl_easy_cleanup() should be called to free up used + resources. It runs Curl_disconnect() on all open connectons. + + A quick roundup on internal function sequences (many of these call + protocol-specific function-pointers): + + curl_connect - connects to a remote site and does initial connect fluff + This also checks for an existing connection to the requested site and uses + that one if it is possible. + + curl_do - starts a transfer + curl_transfer() - transfers data + curl_done - ends a transfer + + curl_disconnect - disconnects from a remote site. This is called when the + disconnect is really requested, which doesn't necessarily have to be + exactly after curl_done in case we want to keep the connection open for + a while. + + HTTP(S) + + HTTP offers a lot and is the protocol in curl that uses the most lines of + code. There is a special file (lib/formdata.c) that offers all the multipart + post functions. + + base64-functions for user+password stuff (and more) is in (lib/base64.c) and + all functions for parsing and sending cookies are found in (lib/cookie.c). + + HTTPS uses in almost every means the same procedure as HTTP, with only two + exceptions: the connect procedure is different and the function used to read + or write from the socket is different, although the latter fact is hidden in + the source by the use of curl_read() for reading and curl_write() for writing + data to the remote server. + + http_chunks.c contains functions that understands HTTP 1.1 chunked transfer + encoding. + + An interesting detail with the HTTP(S) request, is the add_buffer() series of + functions we use. They append data to one single buffer, and when the + building is done the entire request is sent off in one single write. This is + done this way to overcome problems with flawed firewalls and lame servers. + + FTP + + The Curl_if2ip() function can be used for getting the IP number of a + specified network interface, and it resides in lib/if2ip.c. + + Curl_ftpsendf() is used for sending FTP commands to the remote server. It was + made a separate function to prevent us programmers from forgetting that they + must be CRLF terminated. They must also be sent in one single write() to make + firewalls and similar happy. + + Kerberos + + The kerberos support is mainly in lib/krb4.c and lib/security.c. + + TELNET + + Telnet is implemented in lib/telnet.c. + + FILE + + The file:// protocol is dealt with in lib/file.c. + + LDAP + + Everything LDAP is in lib/ldap.c. + + GENERAL + + URL encoding and decoding, called escaping and unescaping in the source code, + is found in lib/escape.c. + + While transfering data in Transfer() a few functions might get + used. curl_getdate() in lib/getdate.c is for HTTP date comparisons (and + more). + + lib/getenv.c offers curl_getenv() which is for reading environment variables + in a neat platform independent way. That's used in the client, but also in + lib/url.c when checking the proxy environment variables. Note that contrary + to the normal unix getenv(), this returns an allocated buffer that must be + free()ed after use. + + lib/netrc.c holds the .netrc parser + + lib/timeval.c features replacement functions for systems that don't have + gettimeofday() and a few support functions for timeval convertions. + + A function named curl_version() that returns the full curl version string is + found in lib/version.c. + + If authentication is requested but no password is given, a getpass_r() clone + exists in lib/getpass.c. libcurl offers a custom callback that can be used + instead of this, but it doesn't change much to us. + +Persistent Connections +====================== + + The persistent connection support in libcurl requires some considerations on + how to do things inside of the library. + + o The 'SessionHandle' struct returned in the curl_easy_init() call must never + hold connection-oriented data. It is meant to hold the root data as well as + all the options etc that the library-user may choose. + o The 'SessionHandle' struct holds the "connection cache" (an array of + pointers to 'connectdata' structs). There's one connectdata struct + allocated for each connection that libcurl knows about. + o This also enables the 'curl handle' to be reused on subsequent transfers, + something that was illegal before libcurl 7.7. + o When we are about to perform a transfer with curl_easy_perform(), we first + check for an already existing connection in the cache that we can use, + otherwise we create a new one and add to the cache. If the cache is full + already when we add a new connection, we close one of the present ones. We + select which one to close dependent on the close policy that may have been + previously set. + o When the transfer operation is complete, we try to leave the connection + open. Particular options may tell us not to, and protocols may signal + closure on connections and then we don't keep it open of course. + o When curl_easy_cleanup() is called, we close all still opened connections. + + You do realize that the curl handle must be re-used in order for the + persistent connections to work. + +Library Symbols +=============== + + All symbols used internally in libcurl must use a 'Curl_' prefix if they're + used in more than a single file. Single-file symbols must be made static. + Public ("exported") symbols must use a 'curl_' prefix. (There are exceptions, + but they are to be changed to follow this pattern in future versions.) + +Return Codes and Informationals +=============================== + + I've made things simple. Almost every function in libcurl returns a CURLcode, + that must be CURLE_OK if everything is OK or otherwise a suitable error code + as the curl/curl.h include file defines. The very spot that detects an error + must use the Curl_failf() function to set the human-readable error + description. + + In aiding the user to understand what's happening and to debug curl usage, we + must supply a fair amount of informational messages by using the Curl_infof() + function. Those messages are only displayed when the user explicitly asks for + them. They are best used when revealing information that isn't otherwise + obvious. + +Client +====== + + main() resides in src/main.c together with most of the client code. + + src/hugehelp.c is automatically generated by the mkhelp.pl perl script to + display the complete "manual" and the src/urlglob.c file holds the functions + used for the URL-"globbing" support. Globbing in the sense that the {} and [] + expansion stuff is there. + + The client mostly messes around to setup its 'config' struct properly, then + it calls the curl_easy_*() functions of the library and when it gets back + control after the curl_easy_perform() it cleans up the library, checks status + and exits. + + When the operation is done, the ourWriteOut() function in src/writeout.c may + be called to report about the operation. That function is using the + curl_easy_getinfo() function to extract useful information from the curl + session. + + Recent versions may loop and do all this several times if many URLs were + specified on the command line or config file. + +Memory Debugging +================ + + The file lib/memdebug.c contains debug-versions of a few functions. Functions + such as malloc, free, fopen, fclose, etc that somehow deal with resources + that might give us problems if we "leak" them. The functions in the memdebug + system do nothing fancy, they do their normal function and then log + information about what they just did. The logged data can then be analyzed + after a complete session, + + memanalyze.pl is the perl script present only present in CVS (not part of the + release archives) that analyzes a log file generated by the memdebug + system. It detects if resources are allocated but never freed and other kinds + of errors related to resource management. + + Use -DMALLOCDEBUG when compiling to enable memory debugging, this is also + switched on by running configure with --enable-debug. + +Test Suite +========== + + Since November 2000, a test suite has evolved. It is placed in its own + subdirectory directly off the root in the curl archive tree, and it contains + a bunch of scripts and a lot of test case data. + + The main test script is runtests.pl that will invoke the two servers + httpserver.pl and ftpserver.pl before all the test cases are performed. The + test suite currently only runs on unix-like platforms. + + You'll find a complete description of the test case data files in the + tests/README file. + + The test suite automatically detects if curl was built with the memory + debugging enabled, and if it was it will detect memory leaks too. + +Building Releases +================= + + There's no magic to this. When you consider everything stable enough to be + released, run the 'maketgz' script (using 'make distcheck' will give you a + pretty good view on the status of the current sources). maketgz prompts for + version number of the client and the library before it creates a release + archive. maketgz uses 'make dist' for the actual archive building, why you + need to fill in the Makefile.am files properly for which files that should + be included in the release archives. + diff --git a/neo/curl/docs/KNOWN_BUGS b/neo/curl/docs/KNOWN_BUGS new file mode 100644 index 0000000..35f6fc9 --- /dev/null +++ b/neo/curl/docs/KNOWN_BUGS @@ -0,0 +1,60 @@ +These are problems known to exist at the time of this release. Feel free to +join in and help us correct one or more of these! Also be sure to check the +changelog of the current development status, as one or more of these problems +may have been fixed since this was written! + +* NTLM authentication with passwords longer than 14 letters fail. There is + a known fix for this, planned to come in curl 7.11.2 + +* Doing resumed upload over HTTP does not work with '-C -', because curl + doesn't do a HEAD first to get the initial size. This needs to be done + manually for HTTP PUT resume to work, and then '-C [index]'. + +* CURLOPT_USERPWD and CURLOPT_PROXYUSERPWD have no way of providing user names + that contain a colon. This can't be fixed easily in a backwards compatible + way without adding new options (and then, they should most probably allow + setting user name and password separately). + +* libcurl ignores empty path parts in FTP URLs, whereas RFC1738 states that + such parts should be sent to the server as 'CWD ' (without an argument). + The only exception to this rule, is that we knowingly break this if the + empty part is first in the path, as then we use the double slashes to + indicate that the user wants to reach the root dir (this exception SHALL + remain even when this bug is fixed). + +* 1) libcurl does a POST + 2) receives a 100-continue + 3) sends away the POST + Now, if nothing else is returned from the server, libcurl MUST return + CURLE_GOT_NOTHING, but it seems it returns CURLE_OK as it seems to count + the 100-continue reply as a good enough reply. + +* libcurl doesn't treat the content-length of compressed data properly, as + it seems HTTP servers send the *uncompressed* length in that header and + libcurl thinks of it as the *compressed* lenght. Some explanations are here: + http://curl.haxx.se/mail/lib-2003-06/0146.html + +* Downloading 0 (zero) bytes files over FTP will not create a zero byte file + locally, which is because libcurl doesn't call the write callback with zero + bytes. Explained here: http://curl.haxx.se/mail/archive-2003-04/0143.html + +* Using CURLOPT_FAILONERROR (-f/--fail) will make authentication to stop + working if you use anything but plain Basic auth. + +* IPv6 support on AIX 4.3.3 doesn't work due to a missing sockaddr_storage + struct. It has been reported to work on AIX 5.1 though. + +* GOPHER transfers seem broken + +* configure --disable-http is not fully supported. All other protocols seem + to work to disable. + +* If a HTTP server responds to a HEAD request and includes a body (thus + violating the RFC2616), curl won't wait to read the response but just stop + reading and return back. If a second request (let's assume a GET) is then + immediately made to the same server again, the connection will be re-used + fine of course, and the second request will be sent off but when the + response is to get read, the previous response-body is what curl will read + and havoc is what happens. + More details on this is found in this libcurl mailing list thread: + http://curl.haxx.se/mail/lib-2002-08/0000.html diff --git a/neo/curl/docs/MANUAL b/neo/curl/docs/MANUAL new file mode 100644 index 0000000..4e37657 --- /dev/null +++ b/neo/curl/docs/MANUAL @@ -0,0 +1,877 @@ +LATEST VERSION + + You always find news about what's going on as well as the latest versions + from the curl web pages, located at: + + http://curl.haxx.se + +SIMPLE USAGE + + Get the main page from netscape's web-server: + + curl http://www.netscape.com/ + + Get the README file the user's home directory at funet's ftp-server: + + curl ftp://ftp.funet.fi/README + + Get a web page from a server using port 8000: + + curl http://www.weirdserver.com:8000/ + + Get a list of a directory of an FTP site: + + curl ftp://cool.haxx.se/ + + Get a gopher document from funet's gopher server: + + curl gopher://gopher.funet.fi + + Get the definition of curl from a dictionary: + + curl dict://dict.org/m:curl + + Fetch two documents at once: + + curl ftp://cool.haxx.se/ http://www.weirdserver.com:8000/ + +DOWNLOAD TO A FILE + + Get a web page and store in a local file: + + curl -o thatpage.html http://www.netscape.com/ + + Get a web page and store in a local file, make the local file get the name + of the remote document (if no file name part is specified in the URL, this + will fail): + + curl -O http://www.netscape.com/index.html + + Fetch two files and store them with their remote names: + + curl -O www.haxx.se/index.html -O curl.haxx.se/download.html + +USING PASSWORDS + + FTP + + To ftp files using name+passwd, include them in the URL like: + + curl ftp://name:passwd@machine.domain:port/full/path/to/file + + or specify them with the -u flag like + + curl -u name:passwd ftp://machine.domain:port/full/path/to/file + + HTTP + + The HTTP URL doesn't support user and password in the URL string. Curl + does support that anyway to provide a ftp-style interface and thus you can + pick a file like: + + curl http://name:passwd@machine.domain/full/path/to/file + + or specify user and password separately like in + + curl -u name:passwd http://machine.domain/full/path/to/file + + NOTE! Since HTTP URLs don't support user and password, you can't use that + style when using Curl via a proxy. You _must_ use the -u style fetch + during such circumstances. + + HTTPS + + Probably most commonly used with private certificates, as explained below. + + GOPHER + + Curl features no password support for gopher. + +PROXY + + Get an ftp file using a proxy named my-proxy that uses port 888: + + curl -x my-proxy:888 ftp://ftp.leachsite.com/README + + Get a file from a HTTP server that requires user and password, using the + same proxy as above: + + curl -u user:passwd -x my-proxy:888 http://www.get.this/ + + Some proxies require special authentication. Specify by using -U as above: + + curl -U user:passwd -x my-proxy:888 http://www.get.this/ + + See also the environment variables Curl support that offer further proxy + control. + +RANGES + + With HTTP 1.1 byte-ranges were introduced. Using this, a client can request + to get only one or more subparts of a specified document. Curl supports + this with the -r flag. + + Get the first 100 bytes of a document: + + curl -r 0-99 http://www.get.this/ + + Get the last 500 bytes of a document: + + curl -r -500 http://www.get.this/ + + Curl also supports simple ranges for FTP files as well. Then you can only + specify start and stop position. + + Get the first 100 bytes of a document using FTP: + + curl -r 0-99 ftp://www.get.this/README + +UPLOADING + + FTP + + Upload all data on stdin to a specified ftp site: + + curl -T - ftp://ftp.upload.com/myfile + + Upload data from a specified file, login with user and password: + + curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile + + Upload a local file to the remote site, and use the local file name remote + too: + + curl -T uploadfile -u user:passwd ftp://ftp.upload.com/ + + Upload a local file to get appended to the remote file using ftp: + + curl -T localfile -a ftp://ftp.upload.com/remotefile + + Curl also supports ftp upload through a proxy, but only if the proxy is + configured to allow that kind of tunneling. If it does, you can run curl in + a fashion similar to: + + curl --proxytunnel -x proxy:port -T localfile ftp.upload.com + + HTTP + + Upload all data on stdin to a specified http site: + + curl -T - http://www.upload.com/myfile + + Note that the http server must've been configured to accept PUT before this + can be done successfully. + + For other ways to do http data upload, see the POST section below. + +VERBOSE / DEBUG + + If curl fails where it isn't supposed to, if the servers don't let you in, + if you can't understand the responses: use the -v flag to get verbose + fetching. Curl will output lots of info and what it sends and receives in + order to let the user see all client-server interaction (but it won't show + you the actual data). + + curl -v ftp://ftp.upload.com/ + + To get even more details and information on what curl does, try using the + --trace or --trace-ascii options with a given file name to log to, like + this: + + curl --trace trace.txt www.haxx.se + + +DETAILED INFORMATION + + Different protocols provide different ways of getting detailed information + about specific files/documents. To get curl to show detailed information + about a single file, you should use -I/--head option. It displays all + available info on a single file for HTTP and FTP. The HTTP information is a + lot more extensive. + + For HTTP, you can get the header information (the same as -I would show) + shown before the data by using -i/--include. Curl understands the + -D/--dump-header option when getting files from both FTP and HTTP, and it + will then store the headers in the specified file. + + Store the HTTP headers in a separate file (headers.txt in the example): + + curl --dump-header headers.txt curl.haxx.se + + Note that headers stored in a separate file can be very useful at a later + time if you want curl to use cookies sent by the server. More about that in + the cookies section. + +POST (HTTP) + + It's easy to post data using curl. This is done using the -d + option. The post data must be urlencoded. + + Post a simple "name" and "phone" guestbook. + + curl -d "name=Rafael%20Sagula&phone=3320780" \ + http://www.where.com/guest.cgi + + How to post a form with curl, lesson #1: + + Dig out all the tags in the form that you want to fill in. (There's + a perl program called formfind.pl on the curl site that helps with this). + + If there's a "normal" post, you use -d to post. -d takes a full "post + string", which is in the format + + =&=&... + + The 'variable' names are the names set with "name=" in the tags, and + the data is the contents you want to fill in for the inputs. The data *must* + be properly URL encoded. That means you replace space with + and that you + write weird letters with %XX where XX is the hexadecimal representation of + the letter's ASCII code. + + Example: + + (page located at http://www.formpost.com/getthis/ + +
+ + + + +
+ + We want to enter user 'foobar' with password '12345'. + + To post to this, you enter a curl command line like: + + curl -d "user=foobar&pass=12345&id=blablabla&ding=submit" (continues) + http://www.formpost.com/getthis/post.cgi + + + While -d uses the application/x-www-form-urlencoded mime-type, generally + understood by CGI's and similar, curl also supports the more capable + multipart/form-data type. This latter type supports things like file upload. + + -F accepts parameters like -F "name=contents". If you want the contents to + be read from a file, use <@filename> as contents. When specifying a file, + you can also specify the file content type by appending ';type=' + to the file name. You can also post the contents of several files in one + field. For example, the field name 'coolfiles' is used to send three files, + with different content types using the following syntax: + + curl -F "coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html" \ + http://www.post.com/postit.cgi + + If the content-type is not specified, curl will try to guess from the file + extension (it only knows a few), or use the previously specified type (from + an earlier file if several files are specified in a list) or else it will + using the default type 'text/plain'. + + Emulate a fill-in form with -F. Let's say you fill in three fields in a + form. One field is a file name which to post, one field is your name and one + field is a file description. We want to post the file we have written named + "cooltext.txt". To let curl do the posting of this data instead of your + favourite browser, you have to read the HTML source of the form page and + find the names of the input fields. In our example, the input field names + are 'file', 'yourname' and 'filedescription'. + + curl -F "file=@cooltext.txt" -F "yourname=Daniel" \ + -F "filedescription=Cool text file with cool text inside" \ + http://www.post.com/postit.cgi + + To send two files in one post you can do it in two ways: + + 1. Send multiple files in a single "field" with a single field name: + + curl -F "pictures=@dog.gif,cat.gif" + + 2. Send two fields with two field names: + + curl -F "docpicture=@dog.gif" -F "catpicture=@cat.gif" + +REFERRER + + A HTTP request has the option to include information about which address + that referred to actual page. Curl allows you to specify the + referrer to be used on the command line. It is especially useful to + fool or trick stupid servers or CGI scripts that rely on that information + being available or contain certain data. + + curl -e www.coolsite.com http://www.showme.com/ + + NOTE: The referer field is defined in the HTTP spec to be a full URL. + +USER AGENT + + A HTTP request has the option to include information about the browser + that generated the request. Curl allows it to be specified on the command + line. It is especially useful to fool or trick stupid servers or CGI + scripts that only accept certain browsers. + + Example: + + curl -A 'Mozilla/3.0 (Win95; I)' http://www.nationsbank.com/ + + Other common strings: + 'Mozilla/3.0 (Win95; I)' Netscape Version 3 for Windows 95 + 'Mozilla/3.04 (Win95; U)' Netscape Version 3 for Windows 95 + 'Mozilla/2.02 (OS/2; U)' Netscape Version 2 for OS/2 + 'Mozilla/4.04 [en] (X11; U; AIX 4.2; Nav)' NS for AIX + 'Mozilla/4.05 [en] (X11; U; Linux 2.0.32 i586)' NS for Linux + + Note that Internet Explorer tries hard to be compatible in every way: + 'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)' MSIE for W95 + + Mozilla is not the only possible User-Agent name: + 'Konqueror/1.0' KDE File Manager desktop client + 'Lynx/2.7.1 libwww-FM/2.14' Lynx command line browser + +COOKIES + + Cookies are generally used by web servers to keep state information at the + client's side. The server sets cookies by sending a response line in the + headers that looks like 'Set-Cookie: ' where the data part then + typically contains a set of NAME=VALUE pairs (separated by semicolons ';' + like "NAME1=VALUE1; NAME2=VALUE2;"). The server can also specify for what + path the "cookie" should be used for (by specifying "path=value"), when the + cookie should expire ("expire=DATE"), for what domain to use it + ("domain=NAME") and if it should be used on secure connections only + ("secure"). + + If you've received a page from a server that contains a header like: + Set-Cookie: sessionid=boo123; path="/foo"; + + it means the server wants that first pair passed on when we get anything in + a path beginning with "/foo". + + Example, get a page that wants my name passed in a cookie: + + curl -b "name=Daniel" www.sillypage.com + + Curl also has the ability to use previously received cookies in following + sessions. If you get cookies from a server and store them in a file in a + manner similar to: + + curl --dump-header headers www.example.com + + ... you can then in a second connect to that (or another) site, use the + cookies from the 'headers' file like: + + curl -b headers www.example.com + + While saving headers to a file is a working way to store cookies, it is + however error-prone and not the prefered way to do this. Instead, make curl + save the incoming cookies using the well-known netscape cookie format like + this: + + curl -c cookies.txt www.example.com + + Note that by specifying -b you enable the "cookie awareness" and with -L + you can make curl follow a location: (which often is used in combination + with cookies). So that if a site sends cookies and a location, you can + use a non-existing file to trigger the cookie awareness like: + + curl -L -b empty.txt www.example.com + + The file to read cookies from must be formatted using plain HTTP headers OR + as netscape's cookie file. Curl will determine what kind it is based on the + file contents. In the above command, curl will parse the header and store + the cookies received from www.example.com. curl will send to the server the + stored cookies which match the request as it follows the location. The + file "empty.txt" may be a non-existant file. + + Alas, to both read and write cookies from a netscape cookie file, you can + set both -b and -c to use the same file: + + curl -b cookies.txt -c cookies.txt www.example.com + +PROGRESS METER + + The progress meter exists to show a user that something actually is + happening. The different fields in the output have the following meaning: + + % Total % Received % Xferd Average Speed Time Curr. + Dload Upload Total Current Left Speed + 0 151M 0 38608 0 0 9406 0 4:41:43 0:00:04 4:41:39 9287 + + From left-to-right: + % - percentage completed of the whole transfer + Total - total size of the whole expected transfer + % - percentage completed of the download + Received - currently downloaded amount of bytes + % - percentage completed of the upload + Xferd - currently uploaded amount of bytes + Average Speed + Dload - the average transfer speed of the download + Average Speed + Upload - the average transfer speed of the upload + Time Total - expected time to complete the operation + Time Current - time passed since the invoke + Time Left - expected time left to completetion + Curr.Speed - the average transfer speed the last 5 seconds (the first + 5 seconds of a transfer is based on less time of course.) + + The -# option will display a totally different progress bar that doesn't + need much explanation! + +SPEED LIMIT + + Curl allows the user to set the transfer speed conditions that must be met + to let the transfer keep going. By using the switch -y and -Y you + can make curl abort transfers if the transfer speed is below the specified + lowest limit for a specified time. + + To have curl abort the download if the speed is slower than 3000 bytes per + second for 1 minute, run: + + curl -Y 3000 -y 60 www.far-away-site.com + + This can very well be used in combination with the overall time limit, so + that the above operatioin must be completed in whole within 30 minutes: + + curl -m 1800 -Y 3000 -y 60 www.far-away-site.com + + Forcing curl not to transfer data faster than a given rate is also possible, + which might be useful if you're using a limited bandwidth connection and you + don't want your transfer to use all of it (sometimes referred to as + "bandwith throttle"). + + Make curl transfer data no faster than 10 kilobytes per second: + + curl --limit-rate 10K www.far-away-site.com + + or + + curl --limit-rate 10240 www.far-away-site.com + + Or prevent curl from uploading data faster than 1 megabyte per second: + + curl -T upload --limit-rate 1M ftp://uploadshereplease.com + + When using the --limit-rate option, the transfer rate is regulated on a + per-second basis, which will cause the total transfer speed to become lower + than the given number. Sometimes of course substantially lower, if your + transfer stalls during periods. + +CONFIG FILE + + Curl automatically tries to read the .curlrc file (or _curlrc file on win32 + systems) from the user's home dir on startup. + + The config file could be made up with normal command line switches, but you + can also specify the long options without the dashes to make it more + readable. You can separate the options and the parameter with spaces, or + with = or :. Comments can be used within the file. If the first letter on a + line is a '#'-letter the rest of the line is treated as a comment. + + If you want the parameter to contain spaces, you must inclose the entire + parameter within double quotes ("). Within those quotes, you specify a + quote as \". + + NOTE: You must specify options and their arguments on the same line. + + Example, set default time out and proxy in a config file: + + # We want a 30 minute timeout: + -m 1800 + # ... and we use a proxy for all accesses: + proxy = proxy.our.domain.com:8080 + + White spaces ARE significant at the end of lines, but all white spaces + leading up to the first characters of each line are ignored. + + Prevent curl from reading the default file by using -q as the first command + line parameter, like: + + curl -q www.thatsite.com + + Force curl to get and display a local help page in case it is invoked + without URL by making a config file similar to: + + # default url to get + url = "http://help.with.curl.com/curlhelp.html" + + You can specify another config file to be read by using the -K/--config + flag. If you set config file name to "-" it'll read the config from stdin, + which can be handy if you want to hide options from being visible in process + tables etc: + + echo "user = user:passwd" | curl -K - http://that.secret.site.com + +EXTRA HEADERS + + When using curl in your own very special programs, you may end up needing + to pass on your own custom headers when getting a web page. You can do + this by using the -H flag. + + Example, send the header "X-you-and-me: yes" to the server when getting a + page: + + curl -H "X-you-and-me: yes" www.love.com + + This can also be useful in case you want curl to send a different text in a + header than it normally does. The -H header you specify then replaces the + header curl would normally send. If you replace an internal header with an + empty one, you prevent that header from being sent. To prevent the Host: + header from being used: + + curl -H "Host:" www.server.com + +FTP and PATH NAMES + + Do note that when getting files with the ftp:// URL, the given path is + relative the directory you enter. To get the file 'README' from your home + directory at your ftp site, do: + + curl ftp://user:passwd@my.site.com/README + + But if you want the README file from the root directory of that very same + site, you need to specify the absolute file name: + + curl ftp://user:passwd@my.site.com//README + + (I.e with an extra slash in front of the file name.) + +FTP and firewalls + + The FTP protocol requires one of the involved parties to open a second + connction as soon as data is about to get transfered. There are two ways to + do this. + + The default way for curl is to issue the PASV command which causes the + server to open another port and await another connection performed by the + client. This is good if the client is behind a firewall that don't allow + incoming connections. + + curl ftp.download.com + + If the server for example, is behind a firewall that don't allow connections + on other ports than 21 (or if it just doesn't support the PASV command), the + other way to do it is to use the PORT command and instruct the server to + connect to the client on the given (as parameters to the PORT command) IP + number and port. + + The -P flag to curl supports a few different options. Your machine may have + several IP-addresses and/or network interfaces and curl allows you to select + which of them to use. Default address can also be used: + + curl -P - ftp.download.com + + Download with PORT but use the IP address of our 'le0' interface (this does + not work on windows): + + curl -P le0 ftp.download.com + + Download with PORT but use 192.168.0.10 as our IP address to use: + + curl -P 192.168.0.10 ftp.download.com + +NETWORK INTERFACE + + Get a web page from a server using a specified port for the interface: + + curl --interface eth0:1 http://www.netscape.com/ + + or + + curl --interface 192.168.1.10 http://www.netscape.com/ + +HTTPS + + Secure HTTP requires SSL libraries to be installed and used when curl is + built. If that is done, curl is capable of retrieving and posting documents + using the HTTPS procotol. + + Example: + + curl https://www.secure-site.com + + Curl is also capable of using your personal certificates to get/post files + from sites that require valid certificates. The only drawback is that the + certificate needs to be in PEM-format. PEM is a standard and open format to + store certificates with, but it is not used by the most commonly used + browsers (Netscape and MSIE both use the so called PKCS#12 format). If you + want curl to use the certificates you use with your (favourite) browser, you + may need to download/compile a converter that can convert your browser's + formatted certificates to PEM formatted ones. This kind of converter is + included in recent versions of OpenSSL, and for older versions Dr Stephen + N. Henson has written a patch for SSLeay that adds this functionality. You + can get his patch (that requires an SSLeay installation) from his site at: + http://www.drh-consultancy.demon.co.uk/ + + Example on how to automatically retrieve a document using a certificate with + a personal password: + + curl -E /path/to/cert.pem:password https://secure.site.com/ + + If you neglect to specify the password on the command line, you will be + prompted for the correct password before any data can be received. + + Many older SSL-servers have problems with SSLv3 or TLS, that newer versions + of OpenSSL etc is using, therefore it is sometimes useful to specify what + SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL + version to use (for SSLv3, SSLv2 or TLSv1 respectively): + + curl -2 https://secure.site.com/ + + Otherwise, curl will first attempt to use v3 and then v2. + + To use OpenSSL to convert your favourite browser's certificate into a PEM + formatted one that curl can use, do something like this (assuming netscape, + but IE is likely to work similarly): + + You start with hitting the 'security' menu button in netscape. + + Select 'certificates->yours' and then pick a certificate in the list + + Press the 'export' button + + enter your PIN code for the certs + + select a proper place to save it + + Run the 'openssl' application to convert the certificate. If you cd to the + openssl installation, you can do it like: + + # ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile] + + +RESUMING FILE TRANSFERS + + To continue a file transfer where it was previously aborted, curl supports + resume on http(s) downloads as well as ftp uploads and downloads. + + Continue downloading a document: + + curl -C - -o file ftp://ftp.server.com/path/file + + Continue uploading a document(*1): + + curl -C - -T file ftp://ftp.server.com/path/file + + Continue downloading a document from a web server(*2): + + curl -C - -o file http://www.server.com/ + + (*1) = This requires that the ftp server supports the non-standard command + SIZE. If it doesn't, curl will say so. + + (*2) = This requires that the web server supports at least HTTP/1.1. If it + doesn't, curl will say so. + +TIME CONDITIONS + + HTTP allows a client to specify a time condition for the document it + requests. It is If-Modified-Since or If-Unmodified-Since. Curl allow you to + specify them with the -z/--time-cond flag. + + For example, you can easily make a download that only gets performed if the + remote file is newer than a local copy. It would be made like: + + curl -z local.html http://remote.server.com/remote.html + + Or you can download a file only if the local file is newer than the remote + one. Do this by prepending the date string with a '-', as in: + + curl -z -local.html http://remote.server.com/remote.html + + You can specify a "free text" date as condition. Tell curl to only download + the file if it was updated since yesterday: + + curl -z yesterday http://remote.server.com/remote.html + + Curl will then accept a wide range of date formats. You always make the date + check the other way around by prepending it with a dash '-'. + +DICT + + For fun try + + curl dict://dict.org/m:curl + curl dict://dict.org/d:heisenbug:jargon + curl dict://dict.org/d:daniel:web1913 + + Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define' + and 'lookup'. For example, + + curl dict://dict.org/find:curl + + Commands that break the URL description of the RFC (but not the DICT + protocol) are + + curl dict://dict.org/show:db + curl dict://dict.org/show:strat + + Authentication is still missing (but this is not required by the RFC) + +LDAP + + If you have installed the OpenLDAP library, curl can take advantage of it + and offer ldap:// support. + + LDAP is a complex thing and writing an LDAP query is not an easy task. I do + advice you to dig up the syntax description for that elsewhere. Two places + that might suit you are: + + Netscape's "Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10: + Working with LDAP URLs": + http://developer.netscape.com/docs/manuals/dirsdk/csdk30/url.htm + + RFC 2255, "The LDAP URL Format" http://www.rfc-editor.org/rfc/rfc2255.txt + + To show you an example, this is now I can get all people from my local LDAP + server that has a certain sub-domain in their email address: + + curl -B "ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se" + + If I want the same info in HTML format, I can get it by not using the -B + (enforce ASCII) flag. + +ENVIRONMENT VARIABLES + + Curl reads and understands the following environment variables: + + http_proxy, HTTPS_PROXY, FTP_PROXY, GOPHER_PROXY + + They should be set for protocol-specific proxies. General proxy should be + set with + + ALL_PROXY + + A comma-separated list of host names that shouldn't go through any proxy is + set in (only an asterisk, '*' matches all hosts) + + NO_PROXY + + If a tail substring of the domain-path for a host matches one of these + strings, transactions with that node will not be proxied. + + + The usage of the -x/--proxy flag overrides the environment variables. + +NETRC + + Unix introduced the .netrc concept a long time ago. It is a way for a user + to specify name and password for commonly visited ftp sites in a file so + that you don't have to type them in each time you visit those sites. You + realize this is a big security risk if someone else gets hold of your + passwords, so therefor most unix programs won't read this file unless it is + only readable by yourself (curl doesn't care though). + + Curl supports .netrc files if told so (using the -n/--netrc and + --netrc-optional options). This is not restricted to only ftp, + but curl can use it for all protocols where authentication is used. + + A very simple .netrc file could look something like: + + machine curl.haxx.se login iamdaniel password mysecret + +CUSTOM OUTPUT + + To better allow script programmers to get to know about the progress of + curl, the -w/--write-out option was introduced. Using this, you can specify + what information from the previous transfer you want to extract. + + To display the amount of bytes downloaded together with some text and an + ending newline: + + curl -w 'We downloaded %{size_download} bytes\n' www.download.com + +KERBEROS4 FTP TRANSFER + + Curl supports kerberos4 for FTP transfers. You need the kerberos package + installed and used at curl build time for it to be used. + + First, get the krb-ticket the normal way, like with the kauth tool. Then use + curl in way similar to: + + curl --krb4 private ftp://krb4site.com -u username:fakepwd + + There's no use for a password on the -u switch, but a blank one will make + curl ask for one and you already entered the real password to kauth. + +TELNET + + The curl telnet support is basic and very easy to use. Curl passes all data + passed to it on stdin to the remote server. Connect to a remote telnet + server using a command line similar to: + + curl telnet://remote.server.com + + And enter the data to pass to the server on stdin. The result will be sent + to stdout or to the file you specify with -o. + + You might want the -N/--no-buffer option to switch off the buffered output + for slow connections or similar. + + Pass options to the telnet protocol negotiation, by using the -t option. To + tell the server we use a vt100 terminal, try something like: + + curl -tTTYPE=vt100 telnet://remote.server.com + + Other interesting options for it -t include: + + - XDISPLOC= Sets the X display location. + + - NEW_ENV= Sets an environment variable. + + NOTE: the telnet protocol does not specify any way to login with a specified + user and password so curl can't do that automatically. To do that, you need + to track when the login prompt is received and send the username and + password accordingly. + +PERSISTANT CONNECTIONS + + Specifying multiple files on a single command line will make curl transfer + all of them, one after the other in the specified order. + + libcurl will attempt to use persistant connections for the transfers so that + the second transfer to the same host can use the same connection that was + already initiated and was left open in the previous transfer. This greatly + decreases connection time for all but the first transfer and it makes a far + better use of the network. + + Note that curl cannot use persistant connections for transfers that are used + in subsequence curl invokes. Try to stuff as many URLs as possible on the + same command line if they are using the same host, as that'll make the + transfers faster. If you use a http proxy for file transfers, practicly + all transfers will be persistant. + +MAILING LISTS + + For your convenience, we have several open mailing lists to discuss curl, + its development and things relevant to this. Get all info at + http://curl.haxx.se/mail/. The lists available are: + + curl-users + + Users of the command line tool. How to use it, what doesn't work, new + features, related tools, questions, news, installations, compilations, + running, porting etc. + + curl-library + + Developers using or developing libcurl. Bugs, extensions, improvements. + + curl-announce + + Low-traffic. Only announcements of new public versions. + + curl-and-PHP + + Using the curl functions in PHP. Everything curl with a PHP angle. Or PHP + with a curl angle. + + curl-commits + + Receives notifications on all CVS commits done to the curl source module. + This can become quite a large amount of mails during intense development, + be aware. This is for us who like email... + + curl-www-commits + + Receives notifications on all CVS commits done to the curl www module + (basicly the web site). This can become quite a large amount of mails + during intense changing, be aware. This is for us who like email... + + Please direct curl questions, feature requests and trouble reports to one of + these mailing lists instead of mailing any individual. diff --git a/neo/curl/docs/Makefile.am b/neo/curl/docs/Makefile.am new file mode 100644 index 0000000..f90f9a0 --- /dev/null +++ b/neo/curl/docs/Makefile.am @@ -0,0 +1,49 @@ +# +# $Id: Makefile.am,v 1.31 2004/03/05 08:01:55 bagder Exp $ +# + +AUTOMAKE_OPTIONS = foreign no-dependencies + +man_MANS = \ + curl.1 \ + curl-config.1 + +GENHTMLPAGES = \ + curl.html \ + curl-config.html + +HTMLPAGES = $(GENHTMLPAGES) index.html + +PDFPAGES = \ + curl.pdf \ + curl-config.pdf + +SUBDIRS = examples libcurl + +CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) + +EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \ + README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS \ + VERSIONS KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) \ + HISTORY INSTALL libcurl-the-guide $(PDFPAGES) + +MAN2HTML= roffit < $< >$@ + +SUFFIXES = .1 .html .pdf + +html: $(HTMLPAGES) + cd libcurl; make html + +pdf: $(PDFPAGES) + cd libcurl; make pdf + +.1.html: + $(MAN2HTML) + +.1.pdf: + @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \ + groff -Tps -man $< >$$foo.ps; \ + ps2pdf $$foo.ps $@; \ + rm $$foo.ps; \ + echo "converted $< to $@") + diff --git a/neo/curl/docs/Makefile.in b/neo/curl/docs/Makefile.in new file mode 100644 index 0000000..f0de09b --- /dev/null +++ b/neo/curl/docs/Makefile.in @@ -0,0 +1,588 @@ +# Makefile.in generated by automake 1.8.3 from Makefile.am. +# @configure_input@ + +# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, +# 2003, 2004 Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +# +# $Id: Makefile.am,v 1.31 2004/03/05 08:01:55 bagder Exp $ +# +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = .. +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = @INSTALL@ +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = @host@ +subdir = docs +DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in INSTALL \ + THANKS TODO +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \ + $(top_srcdir)/configure.ac +am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ + $(ACLOCAL_M4) +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/lib/config.h \ + $(top_builddir)/src/config.h +CONFIG_CLEAN_FILES = +depcomp = +am__depfiles_maybe = +SOURCES = +DIST_SOURCES = +RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ + html-recursive info-recursive install-data-recursive \ + install-exec-recursive install-info-recursive \ + install-recursive installcheck-recursive installdirs-recursive \ + pdf-recursive ps-recursive uninstall-info-recursive \ + uninstall-recursive +man1dir = $(mandir)/man1 +am__installdirs = "$(DESTDIR)$(man1dir)" +MANS = $(man_MANS) +ETAGS = etags +CTAGS = ctags +DIST_SUBDIRS = $(SUBDIRS) +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +ACLOCAL = @ACLOCAL@ +AMDEP_FALSE = @AMDEP_FALSE@ +AMDEP_TRUE = @AMDEP_TRUE@ +AMTAR = @AMTAR@ +AR = @AR@ +AS = @AS@ +AUTOCONF = @AUTOCONF@ +AUTOHEADER = @AUTOHEADER@ +AUTOMAKE = @AUTOMAKE@ +AWK = @AWK@ +CABUNDLE_FALSE = @CABUNDLE_FALSE@ +CABUNDLE_TRUE = @CABUNDLE_TRUE@ +CC = @CC@ +CCDEPMODE = @CCDEPMODE@ +CFLAGS = @CFLAGS@ +CPP = @CPP@ +CPPFLAGS = @CPPFLAGS@ +CURL_CA_BUNDLE = @CURL_CA_BUNDLE@ +CURL_DISABLE_DICT = @CURL_DISABLE_DICT@ +CURL_DISABLE_FILE = @CURL_DISABLE_FILE@ +CURL_DISABLE_FTP = @CURL_DISABLE_FTP@ +CURL_DISABLE_GOPHER = @CURL_DISABLE_GOPHER@ +CURL_DISABLE_HTTP = @CURL_DISABLE_HTTP@ +CURL_DISABLE_LDAP = @CURL_DISABLE_LDAP@ +CURL_DISABLE_TELNET = @CURL_DISABLE_TELNET@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +CXXDEPMODE = @CXXDEPMODE@ +CXXFLAGS = @CXXFLAGS@ +CYGPATH_W = @CYGPATH_W@ +DEFS = @DEFS@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +ECHO = @ECHO@ +ECHO_C = @ECHO_C@ +ECHO_N = @ECHO_N@ +ECHO_T = @ECHO_T@ +EGREP = @EGREP@ +EXEEXT = @EXEEXT@ +F77 = @F77@ +FFLAGS = @FFLAGS@ +HAVE_ARES = @HAVE_ARES@ +HAVE_LIBZ = @HAVE_LIBZ@ +HAVE_LIBZ_FALSE = @HAVE_LIBZ_FALSE@ +HAVE_LIBZ_TRUE = @HAVE_LIBZ_TRUE@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +IPV6_ENABLED = @IPV6_ENABLED@ +KRB4_ENABLED = @KRB4_ENABLED@ +LDFLAGS = @LDFLAGS@ +LIBOBJS = @LIBOBJS@ +LIBS = @LIBS@ +LIBTOOL = @LIBTOOL@ +LN_S = @LN_S@ +LTLIBOBJS = @LTLIBOBJS@ +MAINT = @MAINT@ +MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ +MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ +MAKEINFO = @MAKEINFO@ +MANOPT = @MANOPT@ +MIMPURE_FALSE = @MIMPURE_FALSE@ +MIMPURE_TRUE = @MIMPURE_TRUE@ +NO_UNDEFINED_FALSE = @NO_UNDEFINED_FALSE@ +NO_UNDEFINED_TRUE = @NO_UNDEFINED_TRUE@ +NROFF = @NROFF@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +OPENSSL_ENABLED = @OPENSSL_ENABLED@ +PACKAGE = @PACKAGE@ +PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ +PACKAGE_NAME = @PACKAGE_NAME@ +PACKAGE_STRING = @PACKAGE_STRING@ +PACKAGE_TARNAME = @PACKAGE_TARNAME@ +PACKAGE_VERSION = @PACKAGE_VERSION@ +PATH_SEPARATOR = @PATH_SEPARATOR@ +PERL = @PERL@ +PKGADD_NAME = @PKGADD_NAME@ +PKGADD_PKG = @PKGADD_PKG@ +PKGADD_VENDOR = @PKGADD_VENDOR@ +PKGCONFIG = @PKGCONFIG@ +RANDOM_FILE = @RANDOM_FILE@ +RANLIB = @RANLIB@ +SED = @SED@ +SET_MAKE = @SET_MAKE@ +SHELL = @SHELL@ +STRIP = @STRIP@ +USE_MANUAL_FALSE = @USE_MANUAL_FALSE@ +USE_MANUAL_TRUE = @USE_MANUAL_TRUE@ +VERSION = @VERSION@ +VERSIONNUM = @VERSIONNUM@ +YACC = @YACC@ +ac_ct_AR = @ac_ct_AR@ +ac_ct_AS = @ac_ct_AS@ +ac_ct_CC = @ac_ct_CC@ +ac_ct_CXX = @ac_ct_CXX@ +ac_ct_DLLTOOL = @ac_ct_DLLTOOL@ +ac_ct_F77 = @ac_ct_F77@ +ac_ct_OBJDUMP = @ac_ct_OBJDUMP@ +ac_ct_RANLIB = @ac_ct_RANLIB@ +ac_ct_STRIP = @ac_ct_STRIP@ +am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ +am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ +am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@ +am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@ +am__include = @am__include@ +am__leading_dot = @am__leading_dot@ +am__quote = @am__quote@ +bindir = @bindir@ +build = @build@ +build_alias = @build_alias@ +build_cpu = @build_cpu@ +build_os = @build_os@ +build_vendor = @build_vendor@ +datadir = @datadir@ +exec_prefix = @exec_prefix@ +host = @host@ +host_alias = @host_alias@ +host_cpu = @host_cpu@ +host_os = @host_os@ +host_vendor = @host_vendor@ +includedir = @includedir@ +infodir = @infodir@ +install_sh = @install_sh@ +libdir = @libdir@ +libexecdir = @libexecdir@ +localstatedir = @localstatedir@ +mandir = @mandir@ +mkdir_p = @mkdir_p@ +oldincludedir = @oldincludedir@ +prefix = @prefix@ +program_transform_name = @program_transform_name@ +sbindir = @sbindir@ +sharedstatedir = @sharedstatedir@ +subdirs = @subdirs@ +sysconfdir = @sysconfdir@ +target_alias = @target_alias@ +AUTOMAKE_OPTIONS = foreign no-dependencies +man_MANS = \ + curl.1 \ + curl-config.1 + +GENHTMLPAGES = \ + curl.html \ + curl-config.html + +HTMLPAGES = $(GENHTMLPAGES) index.html +PDFPAGES = \ + curl.pdf \ + curl-config.pdf + +SUBDIRS = examples libcurl +CLEANFILES = $(GENHTMLPAGES) $(PDFPAGES) +EXTRA_DIST = MANUAL BUGS CONTRIBUTE FAQ FEATURES INTERNALS SSLCERTS \ + README.win32 RESOURCES TODO TheArtOfHttpScripting THANKS \ + VERSIONS KNOWN_BUGS BINDINGS $(man_MANS) $(HTMLPAGES) \ + HISTORY INSTALL libcurl-the-guide $(PDFPAGES) + +MAN2HTML = roffit < $< >$@ +SUFFIXES = .1 .html .pdf +all: all-recursive + +.SUFFIXES: +.SUFFIXES: .1 .html .pdf +$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps) + @for dep in $?; do \ + case '$(am__configure_deps)' in \ + *$$dep*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \ + && exit 0; \ + exit 1;; \ + esac; \ + done; \ + echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \ + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign docs/Makefile +.PRECIOUS: Makefile +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + @case '$?' in \ + *config.status*) \ + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ + *) \ + echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ + cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ + esac; + +$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh +$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) + cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: +install-man1: $(man1_MANS) $(man_MANS) + @$(NORMAL_INSTALL) + test -z "$(man1dir)" || $(mkdir_p) "$(DESTDIR)$(man1dir)" + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \ + else file=$$i; fi; \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ + $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst"; \ + done +uninstall-man1: + @$(NORMAL_UNINSTALL) + @list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \ + l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \ + for i in $$l2; do \ + case "$$i" in \ + *.1*) list="$$list $$i" ;; \ + esac; \ + done; \ + for i in $$list; do \ + ext=`echo $$i | sed -e 's/^.*\\.//'`; \ + case "$$ext" in \ + 1*) ;; \ + *) ext='1' ;; \ + esac; \ + inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \ + inst=`echo $$inst | sed -e 's/^.*\///'`; \ + inst=`echo $$inst | sed '$(transform)'`.$$ext; \ + echo " rm -f '$(DESTDIR)$(man1dir)/$$inst'"; \ + rm -f "$(DESTDIR)$(man1dir)/$$inst"; \ + done + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + mkid -fID $$unique +tags: TAGS + +TAGS: tags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + if (etags --etags-include --version) >/dev/null 2>&1; then \ + include_option=--etags-include; \ + else \ + include_option=--include; \ + fi; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && \ + tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags + +distdir: $(DISTFILES) + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkdir_p) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d "$(distdir)/$$subdir" \ + || mkdir "$(distdir)/$$subdir" \ + || exit 1; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="../$(top_distdir)" \ + distdir="../$(distdir)/$$subdir" \ + distdir) \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-recursive +all-am: Makefile $(MANS) +installdirs: installdirs-recursive +installdirs-am: + for dir in "$(DESTDIR)$(man1dir)"; do \ + test -z "$$dir" || $(mkdir_p) "$$dir"; \ + done +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) + +distclean-generic: + -rm -f $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f Makefile +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +info: info-recursive + +info-am: + +install-data-am: install-man + +install-exec-am: + +install-info: install-info-recursive + +install-man: install-man1 + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f Makefile +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-info-am uninstall-man + +uninstall-info: uninstall-info-recursive + +uninstall-man: uninstall-man1 + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am \ + clean clean-generic clean-libtool clean-recursive ctags \ + ctags-recursive distclean distclean-generic distclean-libtool \ + distclean-recursive distclean-tags distdir dvi dvi-am html \ + html-am info info-am install install-am install-data \ + install-data-am install-exec install-exec-am install-info \ + install-info-am install-man install-man1 install-strip \ + installcheck installcheck-am installdirs installdirs-am \ + maintainer-clean maintainer-clean-generic \ + maintainer-clean-recursive mostlyclean mostlyclean-generic \ + mostlyclean-libtool mostlyclean-recursive pdf pdf-am ps ps-am \ + tags tags-recursive uninstall uninstall-am uninstall-info-am \ + uninstall-man uninstall-man1 + + +html: $(HTMLPAGES) + cd libcurl; make html + +pdf: $(PDFPAGES) + cd libcurl; make pdf + +.1.html: + $(MAN2HTML) + +.1.pdf: + @(foo=`echo $@ | sed -e 's/\.[0-9]$$//g'`; \ + groff -Tps -man $< >$$foo.ps; \ + ps2pdf $$foo.ps $@; \ + rm $$foo.ps; \ + echo "converted $< to $@") +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: diff --git a/neo/curl/docs/README.win32 b/neo/curl/docs/README.win32 new file mode 100644 index 0000000..110af3c --- /dev/null +++ b/neo/curl/docs/README.win32 @@ -0,0 +1,22 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +README.win32 + + Read the README file first. + + Curl has been compiled, built and run on all sorts of Windows and win32 + systems. While not being the main develop target, a fair share of curl users + are win32-based. + + The unix-style man pages are tricky to read on windows, so therefore are all + those pages converted to HTML as well as pdf, and included in the release + archives. + + The main curl.1 man page is also "built-in" in the command line tool. Use a + command line similar to this in order to extract a separate text file: + + curl -M >manual.txt diff --git a/neo/curl/docs/RESOURCES b/neo/curl/docs/RESOURCES new file mode 100644 index 0000000..408efe1 --- /dev/null +++ b/neo/curl/docs/RESOURCES @@ -0,0 +1,72 @@ + _ _ ____ _ + Project ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + +This document lists documents and standards used by curl. + + RFC 959 - The FTP protocol + + RFC 1635 - How to Use Anonymous FTP + + RFC 1738 - Uniform Resource Locators + + RFC 1777 - defines the LDAP protocol + + RFC 1808 - Relative Uniform Resource Locators + + RFC 1867 - Form-based File Upload in HTML + + RFC 1950 - ZLIB Compressed Data Format Specification + + RFC 1951 - DEFLATE Compressed Data Format Specification + + RFC 1952 - gzip compression format + + RFC 1959 - LDAP URL syntax + + RFC 2045-2049 - Everything you need to know about MIME! (needed for form + based upload) + + RFC 2068 - HTTP 1.1 (obsoleted by RFC 2616) + + RFC 2109 - HTTP State Management Mechanism (cookie stuff) + - Also, read Netscape's specification at + http://curl.haxx.se/rfc/cookie_spec.html + + RFC 2183 - The Content-Disposition Header Field + + RFC 2229 - A Dictionary Server Protocol + + RFC 2255 - Newer LDAP URL syntax document. + + RFC 2231 - MIME Parameter Value and Encoded Word Extensions: + Character Sets, Languages, and Continuations + + RFC 2388 - "Returning Values from Forms: multipart/form-data" + Use this as an addition to the RFC1867 + + RFC 2396 - "Uniform Resource Identifiers: Generic Syntax and Semantics" This + one obsoletes RFC 1738, but since RFC 1738 is often mentioned + I've left it in this list. + + RFC 2428 - FTP Extensions for IPv6 and NATs + + RFC 2577 - FTP Security Considerations + + RFC 2616 - HTTP 1.1, the latest + + RFC 2617 - HTTP Authentication + + RFC 2718 - Guidelines for new URL Schemes + + RFC 2732 - Format for Literal IPv6 Addresses in URL's + + RFC 2818 - HTTP Over TLS (TLS is the successor to SSL) + + RFC 2964 - Use of HTTP State Management + + RFC 2965 - HTTP State Management Mechanism. Cookies. Obsoletes RFC2109 + diff --git a/neo/curl/docs/SSLCERTS b/neo/curl/docs/SSLCERTS new file mode 100644 index 0000000..f9028c4 --- /dev/null +++ b/neo/curl/docs/SSLCERTS @@ -0,0 +1,46 @@ + Peer SSL Certificate Verification + ================================= + +Since version 7.10, libcurl performs peer SSL certificate verification by +default. This is done by installing a default CA cert bundle on 'make install' +(or similar), that CA bundle package is used by default on operations against +SSL servers. + +Alas, if you communicate with HTTPS servers using certificates that are signed +by CAs present in the bundle, you will not notice any changed behavior and you +will seamlessly get a higher security level on your SSL connections since you +can be sure that the remote server really is the one it claims to be. + +If the remote server uses a self-signed certificate, if you don't install +curl's CA cert bundle, if the server uses a certificate signed by a CA that +isn't included in the bundle or if the remoste host is an imposter +impersonating your favourite site, and you want to transfer files from this +server, do one of the following: + + 1. Tell libcurl to *not* verify the peer. With libcurl you disable with with + curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, FALSE); + + With the curl command tool, you disable this with -k/--insecure. + + 2. Get a CA certificate that can verify the remote server and use the proper + option to point out this CA cert for verification when connecting. For + libcurl hackers: curl_easy_setopt(curl, CURLOPT_CAPATH, capath); + + With the curl command tool: --cacert [file] + +Neglecting to use one of the above menthods when dealing with a server using a +certficate that isn't signed by one of the certficates in the installed CA +cert bundle, will cause SSL to report an error ("certificate verify failed") +during the handshake and SSL will then refuse further communication with that +server. + +This procedure has been deemed The Right Thing even though it adds this extra +trouble for some users, since it adds security to a majority of the SSL +connections that previously weren't really secure. It turned out many people +were using previous versions of curl/libcurl without realizing the need for +the CA cert options to get truly secure SSL connections. + +The default path of the CA bundle installed with the curl package is: +/usr/local/share/curl/curl-ca-bundle.crt, which can be changed by running +configure with the --with-ca-bundle option pointing out the path of your +choice. diff --git a/neo/curl/docs/THANKS b/neo/curl/docs/THANKS new file mode 100644 index 0000000..5fe5cf2 --- /dev/null +++ b/neo/curl/docs/THANKS @@ -0,0 +1,100 @@ + This project has been alive for several years. Countless people have provided + feedback that have improved curl. Here follows a (incomplete) list of people + that have contributed with non-trivial parts: + +Daniel Stenberg +Rafael Sagula +Sampo Kellomaki +Linas Vepstas +Bjorn Reese +Johan Anderson +Kjell Ericson +Troy Engel +Ryan Nelson +Björn Stenberg +Angus Mackay +Eric Young +Simon Dick +Oren Tirosh +Steven G. Johnson +Gilbert Ramirez Jr. +Andrés García +Douglas E. Wegscheid +Mark Butler +Eric Thelin +Marc Boucher +Greg Onufer +Doug Kaufman +David Eriksson +Ralph Beckmann +T. Yamada +Lars J. Aas +Jörn Hartroth +Matthew Clarke +Linus Nielsen Feltzing +Felix von Leitner +Dan Zitter +Jongki Suwandi +Chris Maltby +Ron Zapp +Paul Marquis +Ellis Pritchard +Damien Adant +Chris +Marco G. Salvagno +Paul Marquis +David LeBlanc +Rich Gray at Plus Technologies +Luong Dinh Dung +Torsten Foertsch +Kristian Köhntopp +Fred Noz +Caolan McNamara +Albert Chin-A-Young +Stephen Kick +Martin Hedenfalk +Richard Prescott +Jason S. Priebe +T. Bharath +Alexander Kourakos +James Griffiths +Loic Dachary +Robert Weaver +Ingo Ralf Blum +Jun-ichiro itojun Hagino +Frederic Lepied +Georg Horn +Cris Bailiff +Sterling Hughes +S. Moonesamy +Ingo Wilken +Pawel A. Gajda +Patrick Bihan-Faou +Nico Baggus +Sergio Ballestrero +Andrew Francis +Tomasz Lacki +Georg Huettenegger +John Lask +Eric Lavigne +Marcus Webster +Götz Babin-Ebell +Andreas Damm +Jacky Lam +James Gallagher +Kjetil Jacobsen +Markus F.X.J. Oberhumer +Miklos Nemeth +Kevin Roth +Ralph Mitchell +Dan Fandrich +Jean-Philippe Barrette-LaPierre +Richard Bramante +Daniel Kouril +Dirk Manske +David Meyer +Dominick Meglio +Gisle Vanem +Giuseppe Attardi +Tor Arntsen +David Byron diff --git a/neo/curl/docs/TODO b/neo/curl/docs/TODO new file mode 100644 index 0000000..3906d9c --- /dev/null +++ b/neo/curl/docs/TODO @@ -0,0 +1,199 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +TODO + + Things to do in project cURL. Please tell us what you think, contribute and + send us patches that improve things! Also check the http://curl.haxx.se/dev + web section for various technical development notes. + + All bugs documented in the KNOWN_BUGS document are subject for fixing! + + LIBCURL + + * Introduce an interface to libcurl that allows applications to easier get to + know what cookies that are received. Pushing interface that calls a + callback on each received cookie? Querying interface that asks about + existing cookies? We probably need both. Enable applications to modify + existing cookies as well. http://curl.haxx.se/dev/COOKIES + + * Introduce another callback interface for upload/download that makes one + less copy of data and thus a faster operation. + [http://curl.haxx.se/dev/no_copy_callbacks.txt] + + * More data sharing. curl_share_* functions already exist and work, and they + can be extended to share more. For example, enable sharing of the ares + channel. + + * Introduce a new error code indicating authentication problems (for proxy + CONNECT error 407 for example). This cannot be an error code, we must not + return informational stuff as errors, consider a new info returned by + curl_easy_getinfo() #845941 + + * Option to set the SO_KEEPALIVE socket option to make libcurl notice and + disconnect very long time idle connections. + + LIBCURL - multi interface + + * Add curl_multi_timeout() to make libcurl's ares-functionality better. + + * Make sure we don't ever loop because of non-blocking sockets return + EWOULDBLOCK or similar. This FTP command sending, the SSL connection etc. + + * Make transfers treated more carefully. We need a way to tell libcurl we + have data to write, as the current system expects us to upload data each + time the socket is writable and there is no way to say that we want to + upload data soon just not right now, without that aborting the upload. The + opposite situation should be possible as well, that we tell libcurl we're + ready to accept read data. Today libcurl feeds the data as soon as it is + available for reading, no matter what. + + DOCUMENTATION + + * More and better + + FTP + + * Support the most common FTP proxies, Philip Newton provided a list + allegedly from ncftp: + http://curl.haxx.se/mail/archive-2003-04/0126.html + + * Make CURLOPT_FTPPORT support an additional port number on the IP/if/name, + like "blabla:[port]" or possibly even "blabla:[portfirst]-[portsecond]". + + * FTP ASCII transfers do not follow RFC959. They don't convert the data + accordingly. + + * Since USERPWD always override the user and password specified in URLs, we + might need another way to specify user+password for anonymous ftp logins. + + HTTP + + * Digest and GSS-Negotiate support for HTTP proxies. They only work on + direct-connections to the server. + + * Pipelining. Sending multiple requests before the previous one(s) are done. + This could possibly be implemented using the multi interface to queue + requests and the response data. + + TELNET + + * Reading input (to send to the remote server) on stdin is a crappy solution + for library purposes. We need to invent a good way for the application to + be able to provide the data to send. + + * Move the telnet support's network select() loop go away and merge the code + into the main transfer loop. Until this is done, the multi interface won't + work for telnet. + + SSL + + * If you really want to improve the SSL situation, you should probably have a + look at SSL cafile loading as well - quick traces look to me like these are + done on every request as well, when they should only be necessary once per + ssl context (or once per handle). Even better would be to support the SSL + CAdir option - instead of loading all of the root CA certs for every + request, this option allows you to only read the CA chain that is actually + required (into the cache)... + + * Add an interface to libcurl that enables "session IDs" to get + exported/imported. Cris Bailiff said: "OpenSSL has functions which can + serialise the current SSL state to a buffer of your choice, and + recover/reset the state from such a buffer at a later date - this is used + by mod_ssl for apache to implement and SSL session ID cache". This whole + idea might become moot if we enable the 'data sharing' as mentioned in the + LIBCURL label above. + + * OpenSSL supports a callback for customised verification of the peer + certificate, but this doesn't seem to be exposed in the libcurl APIs. Could + it be? There's so much that could be done if it were! (brought by Chris + Clark) + + * Make curl's SSL layer option capable of using other free SSL libraries. + Such as the Mozilla Security Services + (http://www.mozilla.org/projects/security/pki/nss/) and GNUTLS + (http://gnutls.hellug.gr/) + + LDAP + + * Look over the implementation. The looping will have to "go away" from the + lib/ldap.c source file and get moved to the main network code so that the + multi interface and friends will work for LDAP as well. + + CLIENT + + * Add an option that prevents cURL from overwiting existing local files. When + used, and there already is an existing file with the target file name + (either -O or -o), a number should be appended (and increased if already + existing). So that index.html becomes first index.html.1 and then + index.html.2 etc. Jeff Pohlmeyer suggested. + + * "curl ftp://site.com/*.txt" + + * The client could be told to use maximum N simultaneous transfers and then + just make sure that happens. It should of course not make more than one + connection to the same remote host. This would require the client to use + the multi interface. + + * Extending the capabilities of the multipart formposting. How about leaving + the ';type=foo' syntax as it is and adding an extra tag (headers) which + works like this: curl -F "coolfiles=@fil1.txt;headers=@fil1.hdr" where + fil1.hdr contains extra headers like + + Content-Type: text/plain; charset=KOI8-R" + Content-Transfer-Encoding: base64 + X-User-Comment: Please don't use browser specific HTML code + + which should overwrite the program reasonable defaults (plain/text, + 8bit...) (Idea brough to us by kromJx) + + * ability to specify the classic computing suffixes on the range + specifications. For example, to download the first 500 Kilobytes of a file, + be able to specify the following for the -r option: "-r 0-500K" or for the + first 2 Megabytes of a file: "-r 0-2M". (Mark Smith suggested) + + * --data-encode that URL encodes the data before posting + http://curl.haxx.se/mail/archive-2003-11/0091.html (Kevin Roth suggested) + + BUILD + + * Consider extending 'roffit' to produce decent ASCII output, and use that + instead of (g)nroff when building src/hugehelp.c + + TEST SUITE + + * Make the test servers able to serve multiple running test suites. Like if + two users run 'make test' at once. + + * Make runtests.pl capable of changing port numbers for the servers. This was + the intention from the start, but in practise it is now hard. + + * If perl wasn't found by the configure script, don't attempt to run the + tests but explain something nice why it doesn't. + + * Extend the test suite to include more protocols. The telnet could just do + ftp or http operations (for which we have test servers). + + * Make the test suite work on more platforms. OpenBSD and Mac OS. Remove + fork()s and it should become even more portable. + + NEXT MAJOR RELEASE + + * curl_easy_cleanup() returns void, but curl_multi_cleanup() returns a + CURLMcode. These should be changed to be the same. + + * curl_formparse() should be removed + + * remove obsolete defines from curl/curl.h + + * remove the following functions from the public API: + curl_getenv + curl_mprintf (and variations) + curl_strequal + curl_strnequal + + They will instead become curlx_ - alternatives. That makes the curl app + still capable of building with them from source. diff --git a/neo/curl/docs/TheArtOfHttpScripting b/neo/curl/docs/TheArtOfHttpScripting new file mode 100644 index 0000000..1499df0 --- /dev/null +++ b/neo/curl/docs/TheArtOfHttpScripting @@ -0,0 +1,399 @@ +Online: http://curl.haxx.se/docs/httpscripting.shtml +Author: Daniel Stenberg +Date: November 6, 2001 +Version: 0.6 + + The Art Of Scripting HTTP Requests Using Curl + ============================================= + + This document will assume that you're familiar with HTML and general + networking. + + The possibility to write scripts is essential to make a good computer + system. Unix' capability to be extended by shell scripts and various tools to + run various automated commands and scripts is one reason why it has succeeded + so well. + + The increasing amount of applications moving to the web has made "HTTP + Scripting" more frequently requested and wanted. To be able to automatically + extract information from the web, to fake users, to post or upload data to + web servers are all important tasks today. + + Curl is a command line tool for doing all sorts of URL manipulations and + transfers, but this particular document will focus on how to use it when + doing HTTP requests for fun and profit. I'll assume that you know how to + invoke 'curl --help' or 'curl --manual' to get basic information about it. + + Curl is not written to do everything for you. It makes the requests, it gets + the data, it sends data and it retrieves the information. You probably need + to glue everything together using some kind of script language or repeated + manual invokes. + +1. The HTTP Protocol + + HTTP is the protocol used to fetch data from web servers. It is a very simple + protocol that is built upon TCP/IP. The protocol also allows information to + get sent to the server from the client using a few different methods, as will + be shown here. + + HTTP is plain ASCII text lines being sent by the client to a server to + request a particular action, and then the server replies a few text lines + before the actual requested content is sent to the client. + + Using curl's option -v will display what kind of commands curl sends to the + server, as well as a few other informational texts. -v is the single most + useful option when it comes to debug or even understand the curl<->server + interaction. + +2. URL + + The Uniform Resource Locator format is how you specify the address of a + particular resource on the Internet. You know these, you've seen URLs like + http://curl.haxx.se or https://yourbank.com a million times. + +3. GET a page + + The simplest and most common request/operation made using HTTP is to get a + URL. The URL could itself refer to a web page, an image or a file. The client + issues a GET request to the server and receives the document it asked for. + If you issue the command line + + curl http://curl.haxx.se + + you get a web page returned in your terminal window. The entire HTML document + that that URL holds. + + All HTTP replies contain a set of headers that are normally hidden, use + curl's -i option to display them as well as the rest of the document. You can + also ask the remote server for ONLY the headers by using the -I option (which + will make curl issue a HEAD request). + +4. Forms + + Forms are the general way a web site can present a HTML page with fields for + the user to enter data in, and then press some kind of 'OK' or 'submit' + button to get that data sent to the server. The server then typically uses + the posted data to decide how to act. Like using the entered words to search + in a database, or to add the info in a bug track system, display the entered + address on a map or using the info as a login-prompt verifying that the user + is allowed to see what it is about to see. + + Of course there has to be some kind of program in the server end to receive + the data you send. You cannot just invent something out of the air. + + 4.1 GET + + A GET-form uses the method GET, as specified in HTML like: + +
+ + +
+ + In your favorite browser, this form will appear with a text box to fill in + and a press-button labeled "OK". If you fill in '1905' and press the OK + button, your browser will then create a new URL to get for you. The URL will + get "junk.cgi?birthyear=1905&press=OK" appended to the path part of the + previous URL. + + If the original form was seen on the page "www.hotmail.com/when/birth.html", + the second page you'll get will become + "www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK". + + Most search engines work this way. + + To make curl do the GET form post for you, just enter the expected created + URL: + + curl "www.hotmail.com/when/junk.cgi?birthyear=1905&press=OK" + + 4.2 POST + + The GET method makes all input field names get displayed in the URL field of + your browser. That's generally a good thing when you want to be able to + bookmark that page with your given data, but it is an obvious disadvantage + if you entered secret information in one of the fields or if there are a + large amount of fields creating a very long and unreadable URL. + + The HTTP protocol then offers the POST method. This way the client sends the + data separated from the URL and thus you won't see any of it in the URL + address field. + + The form would look very similar to the previous one: + +
+ + +
+ + And to use curl to post this form with the same data filled in as before, we + could do it like: + + curl -d "birthyear=1905&press=%20OK%20" www.hotmail.com/when/junk.cgi + + This kind of POST will use the Content-Type + application/x-www-form-urlencoded and is the most widely used POST kind. + + The data you send to the server MUST already be properly encoded, curl will + not do that for you. For example, if you want the data to contain a space, + you need to replace that space with %20 etc. Failing to comply with this + will most likely cause your data to be received wrongly and messed up. + + 4.3 FILE UPLOAD POST + + Back in late 1995 they defined a new way to post data over HTTP. It was + documented in the RFC 1867, why this method sometimes is referred to as + a RFC1867-posting. + + This method is mainly designed to better support file uploads. A form that + allows a user to upload a file could be written like this in HTML: + +
+ + +
+ + This clearly shows that the Content-Type about to be sent is + multipart/form-data. + + To post to a form like this with curl, you enter a command line like: + + curl -F upload=@localfilename -F press=OK [URL] + + 4.4 HIDDEN FIELDS + + A very common way for HTML based application to pass state information + between pages is to add hidden fields to the forms. Hidden fields are + already filled in, they aren't displayed to the user and they get passed + along just as all the other fields. + + A similar example form with one visible field, one hidden field and one + submit button could look like: + +
+ + + +
+ + To post this with curl, you won't have to think about if the fields are + hidden or not. To curl they're all the same: + + curl -d "birthyear=1905&press=OK&person=daniel" [URL] + + 4.5 FIGURE OUT WHAT A POST LOOKS LIKE + + When you're about fill in a form and send to a server by using curl instead + of a browser, you're of course very interested in sending a POST exactly the + way your browser does. + + An easy way to get to see this, is to save the HTML page with the form on + your local disk, modify the 'method' to a GET, and press the submit button + (you could also change the action URL if you want to). + + You will then clearly see the data get appended to the URL, separated with a + '?'-letter as GET forms are supposed to. + +5. PUT + + The perhaps best way to upload data to a HTTP server is to use PUT. Then + again, this of course requires that someone put a program or script on the + server end that knows how to receive a HTTP PUT stream. + + Put a file to a HTTP server with curl: + + curl -T uploadfile www.uploadhttp.com/receive.cgi + +6. AUTHENTICATION + + Authentication is the ability to tell the server your username and password + so that it can verify that you're allowed to do the request you're doing. The + Basic authentication used in HTTP (which is the type curl uses by default) is + *plain* *text* based, which means it sends username and password only + slightly obfuscated, but still fully readable by anyone that sniffs on the + network between you and the remote server. + + To tell curl to use a user and password for authentication: + + curl -u name:password www.secrets.com + + The site might require a different authentication method (check the headers + returned by the server), and then --ntlm, --digest, --negotiate or even + --anyauth might be options that suit you. + + Sometimes your HTTP access is only available through the use of a HTTP + proxy. This seems to be especially common at various companies. A HTTP proxy + may require its own user and password to allow the client to get through to + the Internet. To specify those with curl, run something like: + + curl -U proxyuser:proxypassword curl.haxx.se + + If your proxy requires the authentication to be done using the NTLM method, + use --proxy-ntlm. + + If you use any one these user+password options but leave out the password + part, curl will prompt for the password interactively. + + Do note that when a program is run, its parameters are possible to see when + listing the running processes of the system. Thus, other users may be able to + watch your passwords if you pass them as plain command line options. There + are ways to circumvent this. + +7. REFERER + + A HTTP request may include a 'referer' field, which can be used to tell from + which URL the client got to this particular resource. Some programs/scripts + check the referer field of requests to verify that this wasn't arriving from + an external site or an unknown page. While this is a stupid way to check + something so easily forged, many scripts still do it. Using curl, you can put + anything you want in the referer-field and thus more easily be able to fool + the server into serving your request. + + Use curl to set the referer field with: + + curl -e http://curl.haxx.se daniel.haxx.se + +8. USER AGENT + + Very similar to the referer field, all HTTP requests may set the User-Agent + field. It names what user agent (client) that is being used. Many + applications use this information to decide how to display pages. Silly web + programmers try to make different pages for users of different browsers to + make them look the best possible for their particular browsers. They usually + also do different kinds of javascript, vbscript etc. + + At times, you will see that getting a page with curl will not return the same + page that you see when getting the page with your browser. Then you know it + is time to set the User Agent field to fool the server into thinking you're + one of those browsers. + + To make curl look like Internet Explorer on a Windows 2000 box: + + curl -A "Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)" [URL] + + Or why not look like you're using Netscape 4.73 on a Linux (PIII) box: + + curl -A "Mozilla/4.73 [en] (X11; U; Linux 2.2.15 i686)" [URL] + +9. REDIRECTS + + When a resource is requested from a server, the reply from the server may + include a hint about where the browser should go next to find this page, or a + new page keeping newly generated output. The header that tells the browser + to redirect is Location:. + + Curl does not follow Location: headers by default, but will simply display + such pages in the same manner it display all HTTP replies. It does however + feature an option that will make it attempt to follow the Location: pointers. + + To tell curl to follow a Location: + + curl -L www.sitethatredirects.com + + If you use curl to POST to a site that immediately redirects you to another + page, you can safely use -L and -d/-F together. Curl will only use POST in + the first request, and then revert to GET in the following operations. + +10. COOKIES + + The way the web browsers do "client side state control" is by using + cookies. Cookies are just names with associated contents. The cookies are + sent to the client by the server. The server tells the client for what path + and host name it wants the cookie sent back, and it also sends an expiration + date and a few more properties. + + When a client communicates with a server with a name and path as previously + specified in a received cookie, the client sends back the cookies and their + contents to the server, unless of course they are expired. + + Many applications and servers use this method to connect a series of requests + into a single logical session. To be able to use curl in such occasions, we + must be able to record and send back cookies the way the web application + expects them. The same way browsers deal with them. + + The simplest way to send a few cookies to the server when getting a page with + curl is to add them on the command line like: + + curl -b "name=Daniel" www.cookiesite.com + + Cookies are sent as common HTTP headers. This is practical as it allows curl + to record cookies simply by recording headers. Record cookies with curl by + using the -D option like: + + curl -D headers_and_cookies www.cookiesite.com + + (Take note that the -c option described below is a better way to store + cookies.) + + Curl has a full blown cookie parsing engine built-in that comes to use if you + want to reconnect to a server and use cookies that were stored from a + previous connection (or handicrafted manually to fool the server into + believing you had a previous connection). To use previously stored cookies, + you run curl like: + + curl -b stored_cookies_in_file www.cookiesite.com + + Curl's "cookie engine" gets enabled when you use the -b option. If you only + want curl to understand received cookies, use -b with a file that doesn't + exist. Example, if you want to let curl understand cookies from a page and + follow a location (and thus possibly send back cookies it received), you can + invoke it like: + + curl -b nada -L www.cookiesite.com + + Curl has the ability to read and write cookie files that use the same file + format that Netscape and Mozilla do. It is a convenient way to share cookies + between browsers and automatic scripts. The -b switch automatically detects + if a given file is such a cookie file and parses it, and by using the + -c/--cookie-jar option you'll make curl write a new cookie file at the end of + an operation: + + curl -b cookies.txt -c newcookies.txt www.cookiesite.com + +11. HTTPS + + There are a few ways to do secure HTTP transfers. The by far most common + protocol for doing this is what is generally known as HTTPS, HTTP over + SSL. SSL encrypts all the data that is sent and received over the network and + thus makes it harder for attackers to spy on sensitive information. + + SSL (or TLS as the latest version of the standard is called) offers a + truckload of advanced features to allow all those encryptions and key + infrastructure mechanisms encrypted HTTP requires. + + Curl supports encrypted fetches thanks to the freely available OpenSSL + libraries. To get a page from a HTTPS server, simply run curl like: + + curl https://that.secure.server.com + + 11.1 CERTIFICATES + + In the HTTPS world, you use certificates to validate that you are the one + you you claim to be, as an addition to normal passwords. Curl supports + client-side certificates. All certificates are locked with a PIN-code, why + you need to enter the unlock-code before the certificate can be used by + curl. The PIN-code can be specified on the command line or if not, entered + interactively when curl queries for it. Use a certificate with curl on a + HTTPS server like: + + curl -E mycert.pem https://that.secure.server.com + + curl also tries to verify that the server is who it claims to be, by + verifying the server's certificate against a CA cert bundle. Failing the + verification will cause curl to deny the connection. You must then use -k in + case you want to tell curl to ignore that the server can't be verified. + +12. REFERENCES + + RFC 2616 is a must to read if you want in-depth understanding of the HTTP + protocol. + + RFC 2396 explains the URL syntax. + + RFC 2109 defines how cookies are supposed to work. + + RFC 1867 defines the HTTP post upload format. + + http://www.openssl.org is the home of the OpenSSL project + + http://curl.haxx.se is the home of the cURL project diff --git a/neo/curl/docs/VERSIONS b/neo/curl/docs/VERSIONS new file mode 100644 index 0000000..0145571 --- /dev/null +++ b/neo/curl/docs/VERSIONS @@ -0,0 +1,64 @@ + _ _ ____ _ + ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + +Version Numbers and Releases + + Curl is not only curl. Curl is also libcurl. They're actually individually + versioned, but they mostly follow each other rather closely. + + The version numbering is always built up using the same system: + + X.Y[.Z][-preN] + + Where + X is main version number + Y is release number + Z is patch number + N is pre-release number + + One of these numbers will get bumped in each new release. The numbers to the + right of a bumped number will be reset to zero. If Z is zero, it is not + included in the version number. The pre release number is only included in + pre releases (they're never used in public, official, releases). + + The main version number will get bumped when *really* big, world colliding + changes are made. The release number is bumped when big changes are + performed. The patch number is bumped when the changes are mere bugfixes and + only minor feature changes. The pre-release is a counter, to identify which + pre-release a certain release is. + + When reaching the end of a pre-release period, the version without the + pre-release part will be released as a public release. + + It means that after release 1.2.3, we can release 2.0 if something really big + has been made, 1.3 if not that big changes were made or 1.2.4 if mostly bugs + were fixed. Before 1.2.4 is released, we might release a 1.2.4-pre1 release + for the brave people to try before the actual release. + + Bumping, as in increasing the number with 1, is unconditionally only + affecting one of the numbers (except the ones to the right of it, that may be + set to zero). 1 becomes 2, 3 becomes 4, 9 becomes 10, 88 becomes 89 and 99 + becomes 100. So, after 1.2.9 comes 1.2.10. After 3.99.3, 3.100 might come. + + All original curl source release archives are named according to the libcurl + version (not according to the curl client version that, as said before, might + differ). + + As a service to any application that might want to support new libcurl + features while still being able to build with older versions, all releases + have the libcurl version stored in the curl/curl.h file using a static + numbering scheme that can be used for comparison. The version number is + defined as: + + #define LIBCURL_VERSION_NUM 0xXXYYZZ + + Where XX, YY and ZZ are the main version, release and patch numbers in + hexadecimal. All three numbers are always represented using two digits. 1.2 + would appear as "0x010200" while version 9.11.7 appears as "0x090b07". + + This 6-digit hexadecimal number does not show pre-release number, and it is + always a greater number in a more recent release. It makes comparisons with + greater than and less than work. diff --git a/neo/curl/docs/curl-config.1 b/neo/curl/docs/curl-config.1 new file mode 100644 index 0000000..bc1935f --- /dev/null +++ b/neo/curl/docs/curl-config.1 @@ -0,0 +1,64 @@ +.\" You can view this file with: +.\" nroff -man curl-config.1 +.\" Written by Daniel Stenberg +.\" +.TH curl-config 1 "8 Oct 2002" "Curl 7.10" "curl-config manual" +.SH NAME +curl-config \- Get information about a libcurl installation +.SH SYNOPSIS +.B curl-config [options] +.SH DESCRIPTION +.B curl-config +displays information about a previous curl and libcurl installation. +.SH OPTIONS +.IP "--ca" +Displays the built-in path to the CA cert bundle this libcurl uses. +.IP "--cc" +Displays the compiler used to build libcurl. +.IP "--cflags" +Set of compiler options (CFLAGS) to use when compiling files that use +libcurl. Currently that is only thw include path to the curl include files. +.IP "--feature" +Lists what particular main features the installed libcurl was built with. At +the time of writing, this list may include SSL, KRB4 or IPv6. Do not assume +any particular order. The keywords will be separated by newlines. There may be +none, one or several keywords in the list. +.IP "--help" +Displays the available options. +.IP "--libs" +Shows the complete set of libs and other linker options you will need in order +to link your application with libcurl. +.IP "--prefix" +This is the prefix used when libcurl was installed. Libcurl is then installed +in $prefix/lib and its header files are installed in $prefix/include and so +on. The prefix is set with "configure --prefix". +.IP "--version" +Outputs version information about the installed libcurl. +.IP "--vernum" +Outputs version information about the installed libcurl, in numerical mode. +This outputs the version number, in hexadecimal, with 8 bits for each part; +major, minor, patch. So that libcurl 7.7.4 would appear as 070704 and libcurl +12.13.14 would appear as 0c0d0e... +.SH "EXAMPLES" +What linker options do I need when I link with libcurl? + + $ curl-config --libs + +What compiler options do I need when I compile using libcurl functions? + + $ curl-config --cflags + +How do I know if libcurl was built with SSL support? + + $ curl-config --feature | grep SSL + +What's the installed libcurl version? + + $ curl-config --version + +How do I build a single file with a one-line command? + + $ `curl-config --cc --cflags --libs` -o example example.c + +.SH "SEE ALSO" +.BR curl (1) diff --git a/neo/curl/docs/curl-config.html b/neo/curl/docs/curl-config.html new file mode 100644 index 0000000..b2e7fa7 --- /dev/null +++ b/neo/curl/docs/curl-config.html @@ -0,0 +1,82 @@ + +curl-config man page + + + + +

NAME

+

curl-config - Get information about a libcurl installation

SYNOPSIS

+

curl-config [options]

DESCRIPTION

+

curl-config displays information about a previous curl and libcurl installation.

OPTIONS

+

+

--ca +

Displays the built-in path to the CA cert bundle this libcurl uses. +

--cc +

Displays the compiler used to build libcurl. +

--cflags +

Set of compiler options (CFLAGS) to use when compiling files that use libcurl. Currently that is only thw include path to the curl include files. +

--feature +

Lists what particular main features the installed libcurl was built with. At the time of writing, this list may include SSL, KRB4 or IPv6. Do not assume any particular order. The keywords will be separated by newlines. There may be none, one or several keywords in the list. +

--help +

Displays the available options. +

--libs +

Shows the complete set of libs and other linker options you will need in order to link your application with libcurl. +

--prefix +

This is the prefix used when libcurl was installed. Libcurl is then installed in $prefix/lib and its header files are installed in $prefix/include and so on. The prefix is set with "configure --prefix". +

--version +

Outputs version information about the installed libcurl. +

--vernum +

Outputs version information about the installed libcurl, in numerical mode. This outputs the version number, in hexadecimal, with 8 bits for each part; major, minor, patch. So that libcurl 7.7.4 would appear as 070704 and libcurl 12.13.14 would appear as 0c0d0e...

EXAMPLES

+

What linker options do I need when I link with libcurl? +

  $ curl-config --libs +

What compiler options do I need when I compile using libcurl functions? +

  $ curl-config --cflags +

How do I know if libcurl was built with SSL support? +

  $ curl-config --feature | grep SSL +

What's the installed libcurl version? +

  $ curl-config --version +

How do I build a single file with a one-line command? +

  $ `curl-config --cc --cflags --libs` -o example example.c +

SEE ALSO

+

curl (1)

+ This HTML page was made with roffit. + diff --git a/neo/curl/docs/curl-config.pdf b/neo/curl/docs/curl-config.pdf new file mode 100644 index 0000000000000000000000000000000000000000..eeccc59c29c6285afeda964e1f74a8e5e5dba063 GIT binary patch literal 8389 zcmeGiXIKCu}z3=wE`{8`w`|5SQSM@4&RrLdX7aKcM z+>DOsmp)6(L|7;dmH34qlP6g*MB!F*Wfym@i zK2L;1?n?Ej5!cxDi@N2Z74w68H`y8QdspI0!tc6e4V;v;{75hoV4GuVFz7&w-#IHw zowlu?{DXp$b&V&4`Sx(=*ZjO9C4~{R+N`0j$@16xa>o0~i^H4Gh|J$>?b=WjeYMYt z`E|U^XwSP&6`I# z*0RVlKScQHQB8UFd!fa#{n(Y!uPo(l9>;I6o}L+IFL6{=HlF4YhL;q~iyi7fs*4$m{k^H^YtRnu4cS7Zipk+Fn3o9J^bN9ryI~ z>oxj1?&rf@HS$cHqRd};=I3EP!8ehlRSe#Wd|Hi(WY?kPIl`M&Thp=BRO^EW&->U3 zeX45B<{U4XeZ3e$3xznv!dN<&9NV%@uS%`_Q~0fMv<20A0L*;)gM*NwE0}N z+dl76b^03ZSta5eBvf~TxIQ#D#A$=@alRT7ByvBHdErH+*PM}$b**35A1l5XBW~Vk zAh?%%JrET4M&<(y&8iQ4U?Mc?$e&6 zr#GO-kWhEyi;b?li%3NGcgfBHB0WvQY(w8E_l-3tI&Ti>(Z_z~P~oGe4u{$fzla}v ze1ClAQ*o@G#&*lcO{-!{7PiiPSYyA~#LXv=YqgKf(ibfmvo&&VeYED5OEfDd zp5*LLC05DL%WrPXbn%oq4KHwaTzMoTal*zLQQF?C_+$UK89!HDzuL@Ax{|Rn>k- zrpdJ9mXDZ_I%S=U_6Wb6JIUQJk zdsfcL!wLQ5^I{H$6gR1lJ$&ju&8#M{CbQ+L8pg{VX3i;e8#S1xri;A!XdgDHxv`s8 za%>u7A|w+?o_0TYG}77?Oov6&tTfo z#u3^}<9+MHY}BvK?=fIBmgD1J`tGEU=I&dD!<+k>$j2QmcPx0mZ$)I*^#vQ&rY#J; zIZV%Uhe+@I483?>{JI`agN;&h1?itw&HY$#Xq`>dxoL0mt<^&Pbyn3@{e-wx2b~T} zh)Ap$#Bk}A7_jBRp48;P!;g1pmyUm(vspT1%j)49SDV1N6e-t%kkt|)T8{FxIaiwOTzIb+d>;`l2@`|PJ? zjH~i7@X)VVXR}$Wa@|Dj!7qZ&m@Ked^hWpC4)wrcEt8uKPFOlgKi}rb?~BtuBoV&p z=GFRRmlv>I3|ot;AHLpa>bk_LD#kE9)BCOZp#|m75Ac@;$&S*`j6HfMS9*Bn!jL8R zs%FgEk-H{FO*4h>VmO+;_?9?scLYsi@|8TJkF9uBp*-KBX>Z@Ag~g`X=iSydc&r_3 zp~GF67aLu7#C4wN-N>H5WejwR9u-nsy|+HBdFe5|El1AHk3QX}=Reo}VEAfacXaoP z(%%ZE@ARr`O8wWgR-ZddUe7xDWTaz^L9p|J;rm9p=B?l0GoFZN8}&YtIAH6Z-gwmG z>mdOXN6%t4M}`(Rsd4nTr(R$Cwwu!_hm%$-+R}I>Bik;yj+4DJeYm9VtPUfd!=RUW zk2f~ZODNTd$NCQN(_x|WJ+@zt54$YNjpi))rT9Yeh0kWl{b_u0fTEy*87zXZ^g)QT z83dxh;q=Z5>B>ZyusVWDNUbuIR&gA`ak!4TauKe|Mv8Z5p~X4m-an|c-Wv)wl+d(R zFS3j+rJp@3zVpV86ESsSx8Ytc&Si@4t)Ecmn}JCyCN*}?&w*f z<~!2eu8ZkOV?f)}aTaAL;gVMk*DPJr{p$}aFnlFP?PXV?PmfWc7GVlotS6a>i7c?fA<1aDWv8wH#qfTnaM4obdhXE2o~=Lsc2 z6sHcODBcwK;wXEl!OsUS=)k&+%D z8Mp~Ve3_}WL>Qn%4E_Ee6RS%6?UP+4BA&SOX!vgb`IA+M$v{_7&yMhu!-$4P#xZN2 zj1T3&I@KjtNINJjNvDDCT`H4L4dzKfkUQ}dQ#wIl9)bXQunhQ@gQEmEh9Fodi^WD6 z94^XaGEp|2j^Z>L4W+X=D4hWC_XqM7{MYuY;z@c2g8>8}Py(C>2YE0DAmIWv$VGO$ zAP`3$%;q2z(I3GMK7a>74H^yMGH9f>P^+1{z3Jw`66a!2VI46Y%E`X+oOdwRoQ#5c5&Y^MO9MY4Jq5*=EbnR=T zG9+&xJjs*GMCriY3;^LiV8qVz!5#+iGTe^?B}w5aViHNl1Ka_*gQ4&}Ld6K=__aYX zg4TfhI~W49bOr%9n%W2<6cs|ql+6UushCs#BXJA{!i03dr{p@d2MWpTjF)y=1uvik zTQLBCgmRH8?C>8M5HKhd0|tcB=wtviqk@KlP%v_?2rlJAVDJD-el>{UUg$T~L0TM~ zrGV}93ZE+*ketI{hXzu3tpidx8qHfdpDQKwzn*h&{Cmz(m|GEtFm|bUCE@p+^F8N$ z&p9CHV76j#ohT3ofjkeoB&Dw@@>#iSqIP07g1|sNXx2e@J`cf}G%Qfy-PvrBUju)p zUn2XgE)5e-{BiPPvOp`qB(pZzA}BXZTn?z5V0@z|`mgm%Oj>&lg_#|81F*s<*IqK? zvp}^6We(y=nf^k%L{%69@Sp~$LI@XpR=}!6RYG#!Ud1}vCsGbjA*nTvVh*0kZiS+U zm56Mg06&Q9XsaN9z>}0)NiU!i*{#582=!Bja4)Gdz<0>5m_yqr);cOJB_rHR(Loug zIazU`FX1@=lCu2Ix+U^-pe2+DN(i5!6@gX0-Yfx0q4ZEvHVayTMb0VjK^$0XZ`2m>}@T>Hs^?_UzKUGNf zEg%9Y+o(bqk*YZOOhtnNc0>T>=`SFRc7+|k0>8*xgXQ!x)Ah=K1}ODQ}4ecyQ0+Xvs=?^&xoGyXqjEtR`#y6Oejx3U%% zD1_JIm`EUwkSVoZO1Ii9GgvmjQJ&wPO!iwr3#J(3b!hb&g#OCMuUyx zm$WzsUcP;aqjT{t=d$1(gX%suw~H)HyemJP)0GzIfX{VRejEba+kPnv!RTriIupEj zD*JFQD90)|I?nB)2Oa#Wqsu<7pnC!{&f4NMGM}rXBKcMh`3V literal 0 HcmV?d00001 diff --git a/neo/curl/docs/curl.1 b/neo/curl/docs/curl.1 new file mode 100644 index 0000000..9ed4528 --- /dev/null +++ b/neo/curl/docs/curl.1 @@ -0,0 +1,1148 @@ +.\" You can view this file with: +.\" nroff -man curl.1 +.\" Written by Daniel Stenberg +.\" +.TH curl 1 "5 Mar 2004" "Curl 7.11.1" "Curl Manual" +.SH NAME +curl \- transfer a URL +.SH SYNOPSIS +.B curl [options] +.I [URL...] +.SH DESCRIPTION +.B curl +is a tool to transfer data from or to a server, using one of the supported +protocols (HTTP, HTTPS, FTP, FTPS, GOPHER, DICT, TELNET, LDAP or FILE). The +command is designed to work without user interaction. + +curl offers a busload of useful tricks like proxy support, user +authentication, ftp upload, HTTP post, SSL (https:) connections, cookies, file +transfer resume and more. As you will see below, the amount of features will +make your head spin! + +curl is powered by libcurl for all transfer-related features. See +.BR libcurl (3) +for details. +.SH URL +The URL syntax is protocol dependent. You'll find a detailed description in +RFC 2396. + +You can specify multiple URLs or parts of URLs by writing part sets within +braces as in: + + http://site.{one,two,three}.com + +or you can get sequences of alphanumeric series by using [] as in: + + ftp://ftp.numericals.com/file[1-100].txt + ftp://ftp.numericals.com/file[001-100].txt (with leading zeros) + ftp://ftp.letters.com/file[a-z].txt + +No nesting of the sequences is supported at the moment: + + http://www.any.org/archive[1996-1999]/volume[1-4]part{a,b,c,index}.html + +You can specify any amount of URLs on the command line. They will be fetched +in a sequential manner in the specified order. + +Curl will attempt to re-use connections for multiple file transfers, so that +getting many files from the same server will not do multiple connects / +handshakes. This improves speed. Of course this is only done on files +specified on a single command line and cannot be used between separate curl +invokes. +.SH OPTIONS +.IP "-a/--append" +(FTP) When used in an FTP upload, this will tell curl to append to the target +file instead of overwriting it. If the file doesn't exist, it will be created. + +If this option is used twice, the second one will disable append mode again. +.IP "-A/--user-agent " +(HTTP) Specify the User-Agent string to send to the HTTP server. Some badly +done CGIs fail if its not set to "Mozilla/4.0". To encode blanks in the +string, surround the string with single quote marks. This can also be set +with the \fI-H/--header\fP option of course. + +If this option is set more than once, the last one will be the one that's +used. +.IP "--anyauth" +(HTTP) Tells curl to figure out authentication method by itself, and use the +most secure one the remote site claims it supports. This is done by first +doing a request and checking the response-headers, thus inducing an extra +network round-trip. This is used instead of setting a specific authentication +method, which you can do with \fI--basic\fP, \fI--digest\fP, \fI--ntlm\fP, and +\fI--negotiate\fP. (Added in 7.10.6) + +If this option is used several times, the following occurrences make no +difference. +.IP "-b/--cookie " +(HTTP) +Pass the data to the HTTP server as a cookie. It is supposedly the +data previously received from the server in a "Set-Cookie:" line. +The data should be in the format "NAME1=VALUE1; NAME2=VALUE2". + +If no '=' letter is used in the line, it is treated as a filename to use to +read previously stored cookie lines from, which should be used in this session +if they match. Using this method also activates the "cookie parser" which will +make curl record incoming cookies too, which may be handy if you're using this +in combination with the \fI-L/--location\fP option. The file format of the +file to read cookies from should be plain HTTP headers or the Netscape/Mozilla +cookie file format. + +\fBNOTE\fP that the file specified with \fI-b/--cookie\fP is only used as +input. No cookies will be stored in the file. To store cookies, use the +\fI-c/--cookie-jar\fP option or you could even save the HTTP headers to a file +using \fI-D/--dump-header\fP! + +If this option is set more than once, the last one will be the one that's +used. +.IP "-B/--use-ascii" +Use ASCII transfer when getting an FTP file or LDAP info. For FTP, this can +also be enforced by using an URL that ends with ";type=A". This option causes +data sent to stdout to be in text mode for win32 systems. + +If this option is used twice, the second one will disable ASCII usage. +.IP "--basic" +(HTTP) Tells curl to use HTTP Basic authentication. This is the default and +this option is usually pointless, unless you use it to override a previously +set option that sets a different authentication method (such as \fI--ntlm\fP, +\fI--digest\fP and \fI--negotiate\fP). (Added in 7.10.6) + +If this option is used several times, the following occurrences make no +difference. +.IP "--ciphers " +(SSL) Specifies which ciphers to use in the connection. The list of ciphers +must be using valid ciphers. Read up on SSL cipher list details on this URL: +\fIhttp://www.openssl.org/docs/apps/ciphers.html\fP + +If this option is used several times, the last one will override the others. +.IP "--compressed" +(HTTP) Request a compressed response using one of the algorithms libcurl +supports, and return the uncompressed document. If this option is used and +the server sends an unsupported encoding, Curl will report an error. + +If this option is used several times, each occurrence will toggle it on/off. +.IP "--connect-timeout " +Maximum time in seconds that you allow the connection to the server to take. +This only limits the connection phase, once curl has connected this option is +of no more use. See also the \fI--max-time\fP option. + +If this option is used several times, the last one will be used. +.IP "-c/--cookie-jar " +Specify to which file you want curl to write all cookies after a completed +operation. Curl writes all cookies previously read from a specified file as +well as all cookies received from remote server(s). If no cookies are known, +no file will be written. The file will be written using the Netscape cookie +file format. If you set the file name to a single dash, "-", the cookies will +be written to stdout. + +.B NOTE +If the cookie jar can't be created or written to, the whole curl operation +won't fail or even report an error clearly. Using -v will get a warning +displayed, but that is the only visible feedback you get about this possibly +lethal situation. + +If this option is used several times, the last specfied file name will be +used. +.IP "-C/--continue-at " +Continue/Resume a previous file transfer at the given offset. The given offset +is the exact number of bytes that will be skipped counted from the beginning +of the source file before it is transfered to the destination. If used with +uploads, the ftp server command SIZE will not be used by curl. + +Use "-C -" to tell curl to automatically find out where/how to resume the +transfer. It then uses the given output/input files to figure that out. + +If this option is used several times, the last one will be used. +.IP "--create-dirs" +When used in conjunction with the -o option, curl will create the necessary +local directory hierarchy as needed. +.IP "--crlf" +(FTP) Convert LF to CRLF in upload. Useful for MVS (OS/390). + +If this option is used twice, the second will again disable crlf converting. +.IP "-d/--data " +(HTTP) Sends the specified data in a POST request to the HTTP server, in a way +that can emulate as if a user has filled in a HTML form and pressed the submit +button. Note that the data is sent exactly as specified with no extra +processing (with all newlines cut off). The data is expected to be +\&"url-encoded". This will cause curl to pass the data to the server using the +content-type application/x-www-form-urlencoded. Compare to \fI-F/--form\fP. If +this option is used more than once on the same command line, the data pieces +specified will be merged together with a separating &-letter. Thus, using '-d +name=daniel -d skill=lousy' would generate a post chunk that looks like +\&'name=daniel&skill=lousy'. + +If you start the data with the letter @, the rest should be a file name to +read the data from, or - if you want curl to read the data from stdin. The +contents of the file must already be url-encoded. Multiple files can also be +specified. Posting data from a file named 'foobar' would thus be done with +\fI--data\fP @foobar". + +To post data purely binary, you should instead use the \fI--data-binary\fP +option. + +\fI-d/--data\fP is the same as \fI--data-ascii\fP. + +If this option is used several times, the ones following the first will +append data. +.IP "--data-ascii " +(HTTP) This is an alias for the \fI-d/--data\fP option. + +If this option is used several times, the ones following the first will +append data. +.IP "--data-binary " +(HTTP) This posts data in a similar manner as \fI--data-ascii\fP does, +although when using this option the entire context of the posted data is kept +as-is. If you want to post a binary file without the strip-newlines feature of +the \fI--data-ascii\fP option, this is for you. + +If this option is used several times, the ones following the first will +append data. +.IP "--digest" +(HTTP) Enables HTTP Digest authentication. This is a authentication that +prevents the password from being sent over the wire in clear text. Use this in +combination with the normal \fI-u/--user\fP option to set user name and +password. See also \fI--ntlm\fP, \fI--negotiate\fP and \fI--anyauth\fP for +related options. (Added in curl 7.10.6) + +If this option is used several times, the following occurrences make no +difference. +.IP "--disable-eprt" +(FTP) Tell curl to disable the use of the EPRT and LPRT commands when doing +active FTP transfers. Curl will normally always first attempt to use EPRT, +then LPRT before using PORT, but with this option, it will use PORT right +away. EPRT and LPRT are extensions to the original FTP protocol, may not work +on all servers but enable more functionality in a better way than the +traditional PORT command. (Aded in 7.10.5) + +If this option is used several times, each occurrence will toggle this on/off. +.IP "--disable-epsv" +(FTP) Tell curl to disable the use of the EPSV command when doing passive FTP +transfers. Curl will normally always first attempt to use EPSV before PASV, +but with this option, it will not try using EPSV. + +If this option is used several times, each occurrence will toggle this on/off. +.IP "-D/--dump-header " +Write the protocol headers to the specified file. + +This option is handy to use when you want to store the headers that a HTTP +site sends to you. Cookies from the headers could then be read in a second +curl invoke by using the \fI-b/--cookie\fP option! The \fI-c/--cookie-jar\fP +option is however a better way to store cookies. + +When used on FTP, the ftp server response lines are considered being "headers" +and thus are saved there. + +If this option is used several times, the last one will be used. +.IP "-e/--referer " +(HTTP) Sends the "Referer Page" information to the HTTP server. This can also +be set with the \fI-H/--header\fP flag of course. When used with +\fI-L/--location\fP you can append ";auto" to the referer URL to make curl +automatically set the previous URL when it follows a Location: header. The +";auto" string can be used alone, even if you don't set an initial referer. + +If this option is used several times, the last one will be used. +.IP "--environment" +(RISC OS ONLY) Sets a range of environment variables, using the names the -w +option supports, to easier allow extraction of useful information after having +run curl. + +If this option is used several times, each occurrence will toggle this on/off. +.IP "--egd-file " +(HTTPS) Specify the path name to the Entropy Gathering Daemon socket. The +socket is used to seed the random engine for SSL connections. See also the +\fI--random-file\fP option. +.IP "-E/--cert " +(HTTPS) +Tells curl to use the specified certificate file when getting a file +with HTTPS. The certificate must be in PEM format. +If the optional password isn't specified, it will be queried for on +the terminal. Note that this certificate is the private key and the private +certificate concatenated! + +If this option is used several times, the last one will be used. +.IP "--cert-type " +(SSL) Tells curl what certificate type the provided certificate is in. PEM, +DER and ENG are recognized types. + +If this option is used several times, the last one will be used. +.IP "--cacert " +(HTTPS) Tells curl to use the specified certificate file to verify the +peer. The file may contain multiple CA certificates. The certificate(s) must +be in PEM format. + +curl recognizes the environment variable named 'CURL_CA_BUNDLE' if that is +set, and uses the given path as a path to a CA cert bundle. This option +overrides that variable. + +The windows version of curl will automatically look for a CA certs file named +\'curl-ca-bundle.crt\', either in the same directory as curl.exe, or in the +Current Working Directory, or in any folder along your PATH. + +If this option is used several times, the last one will be used. +.IP "--capath " +(HTTPS) Tells curl to use the specified certificate directory to verify the +peer. The certificates must be in PEM format, and the directory must have been +processed using the c_rehash utility supplied with openssl. Using +\fI--capath\fP can allow curl to make https connections much more efficiently +than using \fI--cacert\fP if the \fI--cacert\fP file contains many CA +certificates. + +If this option is used several times, the last one will be used. +.IP "-f/--fail" +(HTTP) Fail silently (no output at all) on server errors. This is mostly done +like this to better enable scripts etc to better deal with failed attempts. In +normal cases when a HTTP server fails to deliver a document, it returns a HTML +document stating so (which often also describes why and more). This flag will +prevent curl from outputting that and fail silently instead. + +If this option is used twice, the second will again disable silent failure. +.IP "--ftp-create-dirs" +(FTP) When an FTP URL/operation uses a path that doesn't currently exist on +the server, the standard behavior of curl is to fail. Using this option, curl +will instead attempt to create missing directories. (Added in 7.10.7) + +If this option is used twice, the second will again disable silent failure. +.IP "--ftp-pasv" +(FTP) Use PASV when transfering. PASV is the internal default behavior, but +using this option can be used to override a previos --ftp-port option. (Added +in 7.11.0) + +If this option is used twice, the second will again disable silent failure. +.IP "--ftp-ssl" +(FTP) Make the FTP connection switch to use SSL/TLS. (Added in 7.11.0) + +If this option is used twice, the second will again disable silent failure. +.IP "-F/--form " +(HTTP) This lets curl emulate a filled in form in which a user has pressed the +submit button. This causes curl to POST data using the content-type +multipart/form-data according to RFC1867. This enables uploading of binary +files etc. To force the 'content' part to be be a file, prefix the file name +with an @ sign. To just get the content part from a file, prefix the file name +with the letter <. The difference between @ and < is then that @ makes a file +get attached in the post as a file upload, while the < makes a text field and +just get the contents for that text field from a file. + +Example, to send your password file to the server, where +\&'password' is the name of the form-field to which /etc/passwd will be the +input: + +\fBcurl\fP -F password=@/etc/passwd www.mypasswords.com + +To read the file's content from stdin insted of a file, use - where the file +name should've been. This goes for both @ and < constructs. + +You can also tell curl what Content-Type to use for the file upload part, by +using 'type=', in a manner similar to: + +\fBcurl\fP -F "web=@index.html;type=text/html" url.com + +See further examples and details in the MANUAL. + +This option can be used multiple times. +.IP "-g/--globoff" +This option switches off the "URL globbing parser". When you set this option, +you can specify URLs that contain the letters {}[] without having them being +interpreted by curl itself. Note that these letters are not normal legal URL +contents but they should be encoded according to the URI standard. +.IP "-G/--get" +When used, this option will make all data specified with \fI-d/--data\fP or +\fI--data-binary\fP to be used in a HTTP GET request instead of the POST +request that otherwise would be used. The data will be appended to the URL +with a '?' separator. + +If used in combination with -I, the POST data will instead be appended to the +URL with a HEAD request. + +If used multiple times, nothing special happens. +.IP "-h/--help" +Usage help. +.IP "-H/--header

" +(HTTP) Extra header to use when getting a web page. You may specify any number +of extra headers. Note that if you should add a custom header that has the +same name as one of the internal ones curl would use, your externally set +header will be used instead of the internal one. This allows you to make even +trickier stuff than curl would normally do. You should not replace internally +set headers without knowing perfectly well what you're doing. Replacing an +internal header with one without content on the right side of the colon will +prevent that header from appearing. + +See also the \fI-A/--user-agent\fP and \fI-e/--referer\fP options. + +This option can be used multiple times to add/replace/remove multiple headers. +.IP "-i/--include" +(HTTP) +Include the HTTP-header in the output. The HTTP-header includes things +like server-name, date of the document, HTTP-version and more... + +If this option is used twice, the second will again disable header include. +.IP "--interface " +Perform an operation using a specified interface. You can enter interface +name, IP address or host name. An example could look like: + + curl --interface eth0:1 http://www.netscape.com/ + +If this option is used several times, the last one will be used. +.IP "-I/--head" +(HTTP/FTP/FILE) +Fetch the HTTP-header only! HTTP-servers feature the command HEAD +which this uses to get nothing but the header of a document. When used +on a FTP or FILE file, curl displays the file size and last modification +time only. + +If this option is used twice, the second will again disable header only. +.IP "-j/--junk-session-cookies" +(HTTP) When curl is told to read cookies from a given file, this option will +make it discard all "session cookies". This will basicly have the same effect +as if a new session is started. Typical browsers always discard session +cookies when they're closed down. (Added in 7.9.7) + +If this option is used several times, each occurrence will toggle this on/off. +.IP "-k/--insecure" +(SSL) This option explicitly allows curl to perform "insecure" SSL connections +and transfers. Starting with curl 7.10, all SSL connections will be attempted +to be made secure by using the CA certificate bundle installed by +default. This makes all connections considered "insecure" to fail unless +\fI-k/--insecure\fP is used. + +If this option is used twice, the second time will again disable it. +.IP "--key " +(SSL) Private key file name. Allows you to provide your private key in this +separate file. + +If this option is used several times, the last one will be used. +.IP "--key-type " +(SSL) Private key file type. Specify which type your \fI--key\fP provided +private key is. DER, PEM and ENG are supported. + +If this option is used several times, the last one will be used. +.IP "--krb4 " +(FTP) Enable kerberos4 authentication and use. The level must be entered and +should be one of 'clear', 'safe', 'confidential' or 'private'. Should you use +a level that is not one of these, 'private' will instead be used. + +This option requiures that the library was built with kerberos4 support. This +is not very common. Use \fI-V/--version\fP to see if your curl supports it. + +If this option is used several times, the last one will be used. +.IP "-K/--config " +Specify which config file to read curl arguments from. The config file is a +text file in which command line arguments can be written which then will be +used as if they were written on the actual command line. Options and their +parameters must be specified on the same config file line. If the parameter is +to contain white spaces, the parameter must be inclosed within quotes. If the +first column of a config line is a '#' character, the rest of the line will be +treated as a comment. + +Specify the filename as '-' to make curl read the file from stdin. + +Note that to be able to specify a URL in the config file, you need to specify +it using the \fI--url\fP option, and not by simply writing the URL on its own +line. So, it could look similar to this: + +url = "http://curl.haxx.se/docs/" + +This option can be used multiple times. +.IP "--limit-rate " +Specify the maximum transfer rate you want curl to use. This feature is useful +if you have a limited pipe and you'd like your transfer not use your entire +bandwidth. + +The given speed is measured in bytes/second, unless a suffix is appended. +Appending 'k' or 'K' will count the number as kilobytes, 'm' or M' makes it +megabytes while 'g' or 'G' makes it gigabytes. Examples: 200K, 3m and 1G. + +If you are also using the \fI-Y/--speed-limit\fP option, that option will take +precedence and might cripple the rate-limiting slightly, to help keeping the +speed-limit logic working. + +This option was introduced in curl 7.10. + +If this option is used several times, the last one will be used. +.IP "-l/--list-only" +(FTP) +When listing an FTP directory, this switch forces a name-only view. +Especially useful if you want to machine-parse the contents of an FTP +directory since the normal directory view doesn't use a standard look +or format. + +This option causes an FTP NLST command to be sent. Some FTP servers +list only files in their response to NLST; they do not include +subdirectories and symbolic links. + +If this option is used twice, the second will again disable list only. +.IP "-L/--location" +(HTTP/HTTPS) If the server reports that the requested page has a different +location (indicated with the header line Location:) this flag will let curl +attempt to reattempt the get on the new place. If used together with +\fI-i/--include\fP or \fI-I/--head\fP, headers from all requested pages will +be shown. If authentication is used, curl will only send its credentials to +the initial host, so if a redirect takes curl to a different host, it won't +intercept the user+password. See also \fI--location-trusted\fP on how to +change this. + +If this option is used twice, the second will again disable location following. +.IP "--location-trusted" +(HTTP/HTTPS) Like \fI-L/--location\fP, but will allow sending the name + +password to all hosts that the site may redirect to. This may or may not +introduce a security breach if the site redirects you do a site to which +you'll send your authentication info (which is plaintext in the case of HTTP +Basic authentication). + +If this option is used twice, the second will again disable location following. +.IP "--max-filesize " +Specify the maximum size (in bytes) of a file to download. If the file +requested is larger than this value, the transfer will not start and curl will +return with exit code 63. + +NOTE: The file size is not always known prior to download, and for such files +this option has no effect even if the file transfer ends up being larger than +this given limit. This concerns both FTP and HTTP transfers. +.IP "-m/--max-time " +Maximum time in seconds that you allow the whole operation to take. This is +useful for preventing your batch jobs from hanging for hours due to slow +networks or links going down. This doesn't work fully in win32 systems. See +also the \fI--connect-timeout\fP option. + +If this option is used several times, the last one will be used. +.IP "-M/--manual" +Manual. Display the huge help text. +.IP "-n/--netrc" +Makes curl scan the \fI.netrc\fP file in the user's home directory for login +name and password. This is typically used for ftp on unix. If used with http, +curl will enable user authentication. See +.BR netrc(4) +or +.BR ftp(1) +for details on the file format. Curl will not complain if that file +hasn't the right permissions (it should not be world nor group +readable). The environment variable "HOME" is used to find the home +directory. + +A quick and very simple example of how to setup a \fI.netrc\fP to allow curl +to ftp to the machine host.domain.com with user name \&'myself' and password +'secret' should look similar to: + +.B "machine host.domain.com login myself password secret" + +If this option is used twice, the second will again disable netrc usage. +.IP "--netrc-optional" +Very similar to \fI--netrc\fP, but this option makes the .netrc usage +\fBoptional\fP and not mandatory as the \fI--netrc\fP does. +.IP "--negotiate" +(HTTP) Enables GSS-Negotiate authentication. The GSS-Negotiate method was +designed by Microsoft and is used in their web aplications. It is primarily +meant as a support for Kerberos5 authentication but may be also used along +with another authentication methods. For more information see IETF draft +draft-brezak-spnego-http-04.txt. (Added in 7.10.6) + +This option requiures that the library was built with GSSAPI support. This is +not very common. Use \fI-V/--version\fP to see if your version supports +GSS-Negotiate. + +If this option is used several times, the following occurrences make no +difference. +.IP "-N/--no-buffer" +Disables the buffering of the output stream. In normal work situations, curl +will use a standard buffered output stream that will have the effect that it +will output the data in chunks, not necessarily exactly when the data arrives. +Using this option will disable that buffering. + +If this option is used twice, the second will again switch on buffering. +.IP "--ntlm" +(HTTP) Enables NTLM authentication. The NTLM authentication method was +designed by Microsoft and is used by IIS web servers. It is a proprietary +protocol, reversed engineered by clever people and implemented in curl based +on their efforts. This kind of behavior should not be endorsed, you should +encourage everyone who uses NTLM to switch to a public and documented +authentication method instead. Such as Digest. (Added in 7.10.6) + +If you want to enable NTLM for your proxy authentication, then use +\fI--proxy-ntlm\fP. + +This option requiures that the library was built with SSL support. Use +\fI-V/--version\fP to see if your curl supports NTLM. + +If this option is used several times, the following occurrences make no +difference. +.IP "-o/--output " +Write output to instead of stdout. If you are using {} or [] to fetch +multiple documents, you can use '#' followed by a number in the +specifier. That variable will be replaced with the current string for the URL +being fetched. Like in: + + curl http://{one,two}.site.com -o "file_#1.txt" + +or use several variables like: + + curl http://{site,host}.host[1-5].com -o "#1_#2" + +You may use this option as many times as you have number of URLs. + +See also the \fI--create-dirs\fP option to create the local directories +dynamically. +.IP "-O/--remote-name" +Write output to a local file named like the remote file we get. (Only the file +part of the remote file is used, the path is cut off.) + +You may use this option as many times as you have number of URLs. +.IP "--pass " +(SSL) Pass phrase for the private key + +If this option is used several times, the last one will be used. +.IP "--proxy-ntlm" +Tells curl to use NTLM authentication when communicating with the given +proxy. Use \fI--ntlm\fP for enabling NTLM with a remote host. + +If this option is used twice, the second will again disable proxy NTLM. +.IP "-p/--proxytunnel" +When an HTTP proxy is used (\fI-x/--proxy\fP), this option will cause non-HTTP +protocols to attempt to tunnel through the proxy instead of merely using it to +do HTTP-like operations. The tunnel approach is made with the HTTP proxy +CONNECT request and requires that the proxy allows direct connect to the +remote port number curl wants to tunnel through to. + +If this option is used twice, the second will again disable proxy tunnel. +.IP "-P/--ftp-port
" +(FTP) Reverses the initiator/listener roles when connecting with ftp. This +switch makes Curl use the PORT command instead of PASV. In practice, PORT +tells the server to connect to the client's specified address and port, while +PASV asks the server for an ip address and port to connect to.
+should be one of: +.RS +.IP interface +i.e "eth0" to specify which interface's IP address you want to use (Unix only) +.IP "IP address" +i.e "192.168.10.1" to specify exact IP number +.IP "host name" +i.e "my.host.domain" to specify machine +.IP "-" +(any single-letter string) to make it pick the machine's default +.RE + +If this option is used several times, the last one will be used. Disable the +use of PORT with \fI--ftp-pasv\fP. Disable the attempt to use the EPRT command +instead of PORT by using \fI--disable-eprt\fP. EPRT is really PORT++. +.IP "-q" +If used as the first parameter on the command line, the \fI$HOME/.curlrc\fP +file will not be read and used as a config file. +.IP "-Q/--quote " +(FTP) Send an arbitrary command to the remote FTP server, by using the QUOTE +command of the server. Not all servers support this command, and the set of +QUOTE commands are server specific! Quote commands are sent BEFORE the +transfer is taking place. To make commands take place after a successful +transfer, prefix them with a dash '-'. You may specify any amount of commands +to be run before and after the transfer. If the server returns failure for one +of the commands, the entire operation will be aborted. + +This option can be used multiple times. +.IP "--random-file " +(HTTPS) Specify the path name to file containing what will be considered as +random data. The data is used to seed the random engine for SSL connections. +See also the \fI--egd-file\fP option. +.IP "-r/--range " +(HTTP/FTP) +Retrieve a byte range (i.e a partial document) from a HTTP/1.1 or FTP +server. Ranges can be specified in a number of ways. +.RS +.TP 10 +.B 0-499 +specifies the first 500 bytes +.TP +.B 500-999 +specifies the second 500 bytes +.TP +.B -500 +specifies the last 500 bytes +.TP +.B 9500 +specifies the bytes from offset 9500 and forward +.TP +.B 0-0,-1 +specifies the first and last byte only(*)(H) +.TP +.B 500-700,600-799 +specifies 300 bytes from offset 500(H) +.TP +.B 100-199,500-599 +specifies two separate 100 bytes ranges(*)(H) +.RE + +(*) = NOTE that this will cause the server to reply with a multipart +response! + +You should also be aware that many HTTP/1.1 servers do not have this feature +enabled, so that when you attempt to get a range, you'll instead get the whole +document. + +FTP range downloads only support the simple syntax 'start-stop' (optionally +with one of the numbers omitted). It depends on the non-RFC command SIZE. + +If this option is used several times, the last one will be used. +.IP "-R/--remote-time" +When used, this will make libcurl attempt to figure out the timestamp of the +remote file, and if that is available make the local file get that same +timestamp. + +If this option is used twice, the second time disables this again. +.IP "-s/--silent" +Silent mode. Don't show progress meter or error messages. Makes +Curl mute. + +If this option is used twice, the second will again disable mute. +.IP "-S/--show-error" +When used with -s it makes curl show error message if it fails. + +If this option is used twice, the second will again disable show error. +.IP "--socks " +Use the specified SOCKS5 proxy. If the port number is not specified, it is +assumed at port 1080. (Option added in 7.11.1) + +This option overrides any previous use of \fI-x/--proxy\fP, as they are +mutually exclusive. + +If this option is used several times, the last one will be used. +.IP "--stderr " +Redirect all writes to stderr to the specified file instead. If the file name +is a plain '-', it is instead written to stdout. This option has no point when +you're using a shell with decent redirecting capabilities. + +If this option is used several times, the last one will be used. +.IP "-t/--telnet-option " +Pass options to the telnet protocol. Supported options are: + +TTYPE= Sets the terminal type. + +XDISPLOC= Sets the X display location. + +NEW_ENV= Sets an environment variable. +.IP "-T/--upload-file " +This transfers the specified local file to the remote URL. If there is no file +part in the specified URL, Curl will append the local file name. NOTE that you +must use a trailing / on the last directory to really prove to Curl that there +is no file name or curl will think that your last directory name is the remote +file name to use. That will most likely cause the upload operation to fail. If +this is used on a http(s) server, the PUT command will be used. + +Use the file name "-" (a single dash) to use stdin instead of a given file. + +Before 7.10.8, when this option was used several times, the last one was used. + +In curl 7.10.8 and later, you can specify one -T for each URL on the command +line. Each -T + URL pair specifies what to upload and to where. curl also +supports "globbing" of the -T argument, meaning that you can upload multiple +files to a single URL by using the same URL globbing style supported in the +URL, like this: + +curl -T "{file1,file2}" http://www.uploadtothissite.com + +or even + +curl -T "img[1-1000].png" ftp://ftp.picturemania.com/upload/ +.IP "--trace " +Enables a full trace dump of all incoming and outgoing data, including +descriptive information, to the given output file. Use "-" as filename to have +the output sent to stdout. + +If this option is used several times, the last one will be used. (Added in +7.9.7) +.IP "--trace-ascii " +Enables a full trace dump of all incoming and outgoing data, including +descriptive information, to the given output file. Use "-" as filename to have +the output sent to stdout. + +This is very similar to \fI--trace\fP, but leaves out the hex part and only +shows the ASCII part of the dump. It makes smaller output that might be easier +to read for untrained humans. + +If this option is used several times, the last one will be used. (Added in +7.9.7) +.IP "-u/--user " +Specify user and password to use for server authentication. + +If this option is used several times, the last one will be used. +.IP "-U/--proxy-user " +Specify user and password to use for proxy authentication. + +If this option is used several times, the last one will be used. +.IP "--url " +Specify a URL to fetch. This option is mostly handy when you want to specify +URL(s) in a config file. + +This option may be used any number of times. To control where this URL is +written, use the \fI-o/--output\fP or the \fI-O/--remote-name\fP options. +.IP "-v/--verbose" +Makes the fetching more verbose/talkative. Mostly usable for debugging. Lines +starting with '>' means data sent by curl, '<' means data received by curl +that is hidden in normal cases and lines starting with '*' means additional +info provided by curl. + +Note that if you want to see HTTP headers in the output, \fI-i/--include\fP +might be option you're looking for. + +If you think this option still doesn't give you enough details, consider using +\fI--trace\fP or \fI--trace-ascii\fP instead. + +If this option is used twice, the second will again disable verbose. +.IP "-V/--version" +Displays information about curl and the libcurl version it uses. + +The first line includes the full version of curl, libcurl and other 3rd party +libraries linked with the executable. + +The second line (starts with "Protocols:") shows all protocols that libcurl +reports to support. + +The third line (starts with "Features:") shows specific features libcurl +reports to offer. Available features include: +.RS +.IP "IPv6" +You can use IPv6 with this. +.IP "krb4" +Krb4 for ftp is supported. +.IP "SSL" +HTTPS and FTPS are supported. +.IP "libz" +Automatic decompression of compressed files over HTTP is supported. +.IP "NTLM" +NTLM authenticaion is supported. +.IP "GSS-Negotiate" +Negotiate authenticaion is supported. +.IP "Debug" +This curl uses a libcurl built with Debug. This enables more error-tracking +and memory debugging etc. For curl-developers only! +.IP "AsynchDNS" +This curl uses asynchronous name resolves. +.IP "SPNEGO" +SPNEGO Negotiate authenticaion is supported. +.IP "Largefile" +This curl supports transfers of large files, files larger than 2GB. +.RE +.IP "-w/--write-out " +Defines what to display after a completed and successful operation. The format +is a string that may contain plain text mixed with any number of variables. The +string can be specified as "string", to get read from a particular file you +specify it "@filename" and to tell curl to read the format from stdin you +write "@-". + +The variables present in the output format will be substituted by the value or +text that curl thinks fit, as described below. All variables are specified +like %{variable_name} and to output a normal % you just write them like +%%. You can output a newline by using \\n, a carriage return with \\r and a tab +space with \\t. + +.B NOTE: +The %-letter is a special letter in the win32-environment, where all +occurrences of % must be doubled when using this option. + +Available variables are at this point: +.RS +.TP 15 +.B url_effective +The URL that was fetched last. This is mostly meaningful if you've told curl +to follow location: headers. +.TP +.B http_code +The numerical code that was found in the last retrieved HTTP(S) page. +.TP +.B time_total +The total time, in seconds, that the full operation lasted. The time will be +displayed with millisecond resolution. +.TP +.B time_namelookup +The time, in seconds, it took from the start until the name resolving was +completed. +.TP +.B time_connect +The time, in seconds, it took from the start until the connect to the remote +host (or proxy) was completed. +.TP +.B time_pretransfer +The time, in seconds, it took from the start until the file transfer is just +about to begin. This includes all pre-transfer commands and negotiations that +are specific to the particular protocol(s) involved. +.TP +.B time_starttransfer +The time, in seconds, it took from the start until the first byte is just about +to be transfered. This includes time_pretransfer and also the time the +server needs to calculate the result. +.TP +.B size_download +The total amount of bytes that were downloaded. +.TP +.B size_upload +The total amount of bytes that were uploaded. +.TP +.B size_header +The total amount of bytes of the downloaded headers. +.TP +.B size_request +The total amount of bytes that were sent in the HTTP request. +.TP +.B speed_download +The average download speed that curl measured for the complete download. +.TP +.B speed_upload +The average upload speed that curl measured for the complete upload. +.TP +.B content_type +The Content-Type of the requested document, if there was any. (Added in 7.9.5) +.RE + +If this option is used several times, the last one will be used. +.IP "-x/--proxy " +Use specified HTTP proxy. If the port number is not specified, it is assumed +at port 1080. + +This option overrides existing environment variables that sets proxy to +use. If there's an environment variable setting a proxy, you can set proxy to +\&"" to override it. + +\fBNote\fP that all operations that are performed over a HTTP proxy will +transparantly be converted to HTTP. It means that certain protocol specific +operations might not be available. This is not the case if you can tunnel +through the proxy, as done with the \fI-p/--proxytunnel\fP option. + +If this option is used several times, the last one will be used. +.IP "-X/--request " +(HTTP) +Specifies a custom request to use when communicating with the HTTP server. +The specified request will be used instead of the standard GET. Read the +HTTP 1.1 specification for details and explanations. + +(FTP) +Specifies a custom FTP command to use instead of LIST when doing file lists +with ftp. + +If this option is used several times, the last one will be used. +.IP "-y/--speed-time