From fc872ea38ebbd9c336b20346e7d4f592e38c354b Mon Sep 17 00:00:00 2001 From: "Minor.Gordon" Date: Mon, 23 Mar 2009 14:04:18 +0000 Subject: [PATCH] Deleting the old client git-svn-id: https://xtreemfs.googlecode.com/svn/trunk@271 f8528748-c2c0-11dd-ba5c-d3b7c2b3b534 --- client/.cproject | 213 - client/.project | 77 - client/AUTHORS | 0 client/COPYING | 340 - client/ChangeLog | 0 client/Doxyfile | 1475 - client/Makefile | 103 - client/Makefile.am | 1 - client/NEWS | 0 client/README | 0 client/bin/xtfs_showmount | 4 - client/bin/xtfs_umount | 12 - client/bootstrap.sh | 7 - client/config.h.in | 0 client/configure.ac | 82 - client/json-c-0.7/AUTHORS | 2 - client/json-c-0.7/COPYING | 19 - client/json-c-0.7/ChangeLog | 61 - client/json-c-0.7/Doxyfile | 1153 - client/json-c-0.7/INSTALL | 229 - client/json-c-0.7/Makefile.am | 36 - client/json-c-0.7/Makefile.in | 714 - client/json-c-0.7/NEWS | 1 - client/json-c-0.7/README | 20 - client/json-c-0.7/README-WIN32.html | 61 - client/json-c-0.7/README.html | 32 - client/json-c-0.7/aclocal.m4 | 7270 ---- client/json-c-0.7/arraylist.c | 93 - client/json-c-0.7/arraylist.h | 45 - client/json-c-0.7/autogen.sh | 1 - client/json-c-0.7/bits.h | 27 - client/json-c-0.7/config.guess | 1500 - client/json-c-0.7/config.h.in | 117 - client/json-c-0.7/config.h.win32 | 94 - client/json-c-0.7/config.sub | 1616 - client/json-c-0.7/configure | 21818 ---------- client/json-c-0.7/configure.in | 33 - client/json-c-0.7/debug.c | 94 - client/json-c-0.7/debug.h | 24 - client/json-c-0.7/depcomp | 530 - client/json-c-0.7/install-sh | 323 - client/json-c-0.7/json-c.vcproj | 179 - client/json-c-0.7/json.h | 31 - client/json-c-0.7/json.pc.in | 11 - client/json-c-0.7/json_object.c | 513 - client/json-c-0.7/json_object.h | 310 - client/json-c-0.7/json_object_private.h | 44 - client/json-c-0.7/json_tokener.c | 516 - client/json-c-0.7/json_tokener.h | 89 - client/json-c-0.7/json_util.c | 121 - client/json-c-0.7/json_util.h | 23 - client/json-c-0.7/linkhash.c | 217 - client/json-c-0.7/linkhash.h | 261 - client/json-c-0.7/ltmain.sh | 6871 ---- client/json-c-0.7/missing | 360 - client/json-c-0.7/mkinstalldirs | 99 - client/json-c-0.7/printbuf.c | 144 - client/json-c-0.7/printbuf.h | 38 - client/json-c-0.7/stamp-h.in | 1 - client/json-c-0.7/test1.c | 163 - client/json-c-0.7/test2.c | 19 - client/make.config | 131 - client/man/man1/xtfs_lsvol.1 | 33 - client/man/man1/xtfs_mkvol.1 | 99 - client/man/man1/xtfs_mount.1 | 78 - client/man/man1/xtfs_rmvol.1 | 33 - client/man/man1/xtfs_showmount.1 | 26 - client/man/man1/xtfs_stat.1 | 34 - client/man/man1/xtfs_umount.1 | 32 - client/neon-0.27.2/.package | 1 - client/neon-0.27.2/.release.sh | 35 - client/neon-0.27.2/.version | 1 - client/neon-0.27.2/AUTHORS | 8 - client/neon-0.27.2/BUGS | 38 - client/neon-0.27.2/ChangeLog | 4287 -- client/neon-0.27.2/ChangeLog.CVS | 737 - client/neon-0.27.2/INSTALL.win32 | 136 - client/neon-0.27.2/Makefile.in | 210 - client/neon-0.27.2/NEWS | 1126 - client/neon-0.27.2/README | 48 - client/neon-0.27.2/THANKS | 16 - client/neon-0.27.2/TODO | 39 - client/neon-0.27.2/aclocal.m4 | 6440 --- client/neon-0.27.2/autogen.sh | 24 - client/neon-0.27.2/config.guess | 1411 - client/neon-0.27.2/config.h.in | 423 - client/neon-0.27.2/config.hw | 79 - client/neon-0.27.2/config.hw.in | 79 - client/neon-0.27.2/config.sub | 1500 - client/neon-0.27.2/configure | 33480 ---------------- client/neon-0.27.2/configure.in | 185 - client/neon-0.27.2/doc/TODO | 156 - client/neon-0.27.2/doc/biblio.xml | 73 - client/neon-0.27.2/doc/date.xml | 1 - client/neon-0.27.2/doc/feat.xml | 78 - client/neon-0.27.2/doc/html.xsl | 70 - client/neon-0.27.2/doc/html/api.html | 4 - client/neon-0.27.2/doc/html/biblio.html | 4 - client/neon-0.27.2/doc/html/compliance.html | 34 - client/neon-0.27.2/doc/html/features.html | 33 - client/neon-0.27.2/doc/html/index.html | 14 - client/neon-0.27.2/doc/html/intro.html | 7 - client/neon-0.27.2/doc/html/ref.html | 2 - client/neon-0.27.2/doc/html/refalloc.html | 12 - client/neon-0.27.2/doc/html/refauth.html | 38 - client/neon-0.27.2/doc/html/refbuf.html | 20 - client/neon-0.27.2/doc/html/refbufapp.html | 22 - client/neon-0.27.2/doc/html/refbufcr.html | 7 - client/neon-0.27.2/doc/html/refbufdest.html | 17 - client/neon-0.27.2/doc/html/refbufutil.html | 11 - client/neon-0.27.2/doc/html/refcert.html | 33 - client/neon-0.27.2/doc/html/refclicert.html | 55 - client/neon-0.27.2/doc/html/refconfig.html | 32 - client/neon-0.27.2/doc/html/referr.html | 18 - client/neon-0.27.2/doc/html/reffeat.html | 10 - client/neon-0.27.2/doc/html/refgetst.html | 13 - client/neon-0.27.2/doc/html/refi18n.html | 18 - client/neon-0.27.2/doc/html/refiaddr.html | 37 - client/neon-0.27.2/doc/html/refneon.html | 92 - client/neon-0.27.2/doc/html/refopts.html | 28 - client/neon-0.27.2/doc/html/refreq.html | 42 - client/neon-0.27.2/doc/html/refreqbody.html | 28 - client/neon-0.27.2/doc/html/refreqhdr.html | 8 - client/neon-0.27.2/doc/html/refreqopts.html | 16 - client/neon-0.27.2/doc/html/refresolve.html | 48 - client/neon-0.27.2/doc/html/refresphdr.html | 26 - client/neon-0.27.2/doc/html/refsess.html | 35 - client/neon-0.27.2/doc/html/refshave.html | 7 - client/neon-0.27.2/doc/html/refsockinit.html | 51 - client/neon-0.27.2/doc/html/refsslca.html | 15 - client/neon-0.27.2/doc/html/refsslcert2.html | 5 - client/neon-0.27.2/doc/html/refsslcertio.html | 24 - client/neon-0.27.2/doc/html/refssldname.html | 9 - client/neon-0.27.2/doc/html/refsslvfy.html | 66 - client/neon-0.27.2/doc/html/refstatus.html | 22 - client/neon-0.27.2/doc/html/reftok.html | 20 - client/neon-0.27.2/doc/html/refvers.html | 11 - client/neon-0.27.2/doc/html/refxml.html | 4 - client/neon-0.27.2/doc/html/using.html | 40 - client/neon-0.27.2/doc/html/xml.html | 90 - .../doc/man/ne_add_request_header.3 | 55 - client/neon-0.27.2/doc/man/ne_addr_destroy.3 | 1 - client/neon-0.27.2/doc/man/ne_addr_error.3 | 1 - client/neon-0.27.2/doc/man/ne_addr_first.3 | 1 - client/neon-0.27.2/doc/man/ne_addr_next.3 | 1 - client/neon-0.27.2/doc/man/ne_addr_resolve.3 | 128 - client/neon-0.27.2/doc/man/ne_addr_result.3 | 1 - client/neon-0.27.2/doc/man/ne_buffer.3 | 68 - .../neon-0.27.2/doc/man/ne_buffer_altered.3 | 1 - client/neon-0.27.2/doc/man/ne_buffer_append.3 | 84 - client/neon-0.27.2/doc/man/ne_buffer_clear.3 | 58 - client/neon-0.27.2/doc/man/ne_buffer_concat.3 | 1 - client/neon-0.27.2/doc/man/ne_buffer_create.3 | 50 - .../neon-0.27.2/doc/man/ne_buffer_destroy.3 | 74 - client/neon-0.27.2/doc/man/ne_buffer_finish.3 | 1 - client/neon-0.27.2/doc/man/ne_buffer_grow.3 | 1 - .../neon-0.27.2/doc/man/ne_buffer_ncreate.3 | 1 - .../neon-0.27.2/doc/man/ne_buffer_zappend.3 | 1 - client/neon-0.27.2/doc/man/ne_calloc.3 | 1 - .../neon-0.27.2/doc/man/ne_close_connection.3 | 1 - client/neon-0.27.2/doc/man/ne_forget_auth.3 | 1 - client/neon-0.27.2/doc/man/ne_get_error.3 | 76 - .../doc/man/ne_get_response_header.3 | 87 - client/neon-0.27.2/doc/man/ne_get_scheme.3 | 1 - .../doc/man/ne_get_server_hostport.3 | 1 - client/neon-0.27.2/doc/man/ne_get_status.3 | 62 - client/neon-0.27.2/doc/man/ne_has_support.3 | 76 - client/neon-0.27.2/doc/man/ne_i18n_init.3 | 60 - client/neon-0.27.2/doc/man/ne_iaddr_cmp.3 | 1 - client/neon-0.27.2/doc/man/ne_iaddr_free.3 | 1 - client/neon-0.27.2/doc/man/ne_iaddr_make.3 | 102 - client/neon-0.27.2/doc/man/ne_iaddr_print.3 | 1 - client/neon-0.27.2/doc/man/ne_iaddr_typeof.3 | 1 - client/neon-0.27.2/doc/man/ne_malloc.3 | 61 - client/neon-0.27.2/doc/man/ne_oom_callback.3 | 1 - .../doc/man/ne_print_request_header.3 | 1 - client/neon-0.27.2/doc/man/ne_qtoken.3 | 1 - client/neon-0.27.2/doc/man/ne_realloc.3 | 1 - .../neon-0.27.2/doc/man/ne_request_create.3 | 152 - .../neon-0.27.2/doc/man/ne_request_destroy.3 | 1 - .../neon-0.27.2/doc/man/ne_request_dispatch.3 | 1 - .../doc/man/ne_response_header_iterate.3 | 1 - .../neon-0.27.2/doc/man/ne_session_create.3 | 108 - .../neon-0.27.2/doc/man/ne_session_destroy.3 | 1 - client/neon-0.27.2/doc/man/ne_session_proxy.3 | 1 - client/neon-0.27.2/doc/man/ne_set_error.3 | 1 - client/neon-0.27.2/doc/man/ne_set_persist.3 | 1 - .../neon-0.27.2/doc/man/ne_set_proxy_auth.3 | 1 - .../neon-0.27.2/doc/man/ne_set_read_timeout.3 | 1 - .../doc/man/ne_set_request_body_buffer.3 | 82 - .../doc/man/ne_set_request_body_fd.3 | 1 - .../doc/man/ne_set_request_body_fd64.3 | 1 - .../doc/man/ne_set_request_expect100.3 | 53 - .../neon-0.27.2/doc/man/ne_set_server_auth.3 | 104 - client/neon-0.27.2/doc/man/ne_set_useragent.3 | 102 - client/neon-0.27.2/doc/man/ne_shave.3 | 53 - client/neon-0.27.2/doc/man/ne_sock_exit.3 | 1 - client/neon-0.27.2/doc/man/ne_sock_init.3 | 97 - client/neon-0.27.2/doc/man/ne_ssl_cert_cmp.3 | 42 - .../neon-0.27.2/doc/man/ne_ssl_cert_export.3 | 1 - client/neon-0.27.2/doc/man/ne_ssl_cert_free.3 | 1 - .../doc/man/ne_ssl_cert_identity.3 | 100 - .../neon-0.27.2/doc/man/ne_ssl_cert_import.3 | 1 - .../neon-0.27.2/doc/man/ne_ssl_cert_issuer.3 | 1 - client/neon-0.27.2/doc/man/ne_ssl_cert_read.3 | 80 - .../doc/man/ne_ssl_cert_signedby.3 | 1 - .../neon-0.27.2/doc/man/ne_ssl_cert_subject.3 | 1 - .../neon-0.27.2/doc/man/ne_ssl_cert_write.3 | 1 - .../doc/man/ne_ssl_clicert_decrypt.3 | 1 - .../doc/man/ne_ssl_clicert_encrypted.3 | 1 - .../neon-0.27.2/doc/man/ne_ssl_clicert_free.3 | 1 - .../neon-0.27.2/doc/man/ne_ssl_clicert_name.3 | 1 - .../doc/man/ne_ssl_clicert_owner.3 | 1 - .../neon-0.27.2/doc/man/ne_ssl_clicert_read.3 | 126 - client/neon-0.27.2/doc/man/ne_ssl_dname_cmp.3 | 1 - .../doc/man/ne_ssl_readable_dname.3 | 61 - .../neon-0.27.2/doc/man/ne_ssl_set_verify.3 | 136 - .../neon-0.27.2/doc/man/ne_ssl_trust_cert.3 | 64 - .../doc/man/ne_ssl_trust_default_ca.3 | 1 - client/neon-0.27.2/doc/man/ne_status.3 | 87 - client/neon-0.27.2/doc/man/ne_strdup.3 | 1 - client/neon-0.27.2/doc/man/ne_strndup.3 | 1 - client/neon-0.27.2/doc/man/ne_token.3 | 68 - client/neon-0.27.2/doc/man/ne_version_match.3 | 57 - .../neon-0.27.2/doc/man/ne_version_string.3 | 1 - client/neon-0.27.2/doc/man/ne_xml_create.3 | 46 - client/neon-0.27.2/doc/man/ne_xml_destroy.3 | 1 - client/neon-0.27.2/doc/man/neon-config.1 | 104 - client/neon-0.27.2/doc/man/neon.3 | 170 - client/neon-0.27.2/doc/manual.css | 42 - client/neon-0.27.2/doc/manual.xml | 203 - client/neon-0.27.2/doc/parsing-xml.txt | 170 - client/neon-0.27.2/doc/ref/alloc.xml | 87 - client/neon-0.27.2/doc/ref/auth.xml | 114 - client/neon-0.27.2/doc/ref/buf.xml | 53 - client/neon-0.27.2/doc/ref/bufapp.xml | 89 - client/neon-0.27.2/doc/ref/bufcr.xml | 60 - client/neon-0.27.2/doc/ref/bufdest.xml | 81 - client/neon-0.27.2/doc/ref/bufutil.xml | 62 - client/neon-0.27.2/doc/ref/clicert.xml | 153 - client/neon-0.27.2/doc/ref/config.xml | 124 - client/neon-0.27.2/doc/ref/err.xml | 80 - client/neon-0.27.2/doc/ref/feat.xml | 95 - client/neon-0.27.2/doc/ref/getst.xml | 63 - client/neon-0.27.2/doc/ref/i18n.xml | 71 - client/neon-0.27.2/doc/ref/iaddr.xml | 133 - client/neon-0.27.2/doc/ref/init.xml | 132 - client/neon-0.27.2/doc/ref/neon.xml | 244 - client/neon-0.27.2/doc/ref/opts.xml | 110 - client/neon-0.27.2/doc/ref/req.xml | 169 - client/neon-0.27.2/doc/ref/reqbody.xml | 94 - client/neon-0.27.2/doc/ref/reqhdr.xml | 63 - client/neon-0.27.2/doc/ref/reqopts.xml | 60 - client/neon-0.27.2/doc/ref/resolve.xml | 145 - client/neon-0.27.2/doc/ref/resphdr.xml | 98 - client/neon-0.27.2/doc/ref/sess.xml | 123 - client/neon-0.27.2/doc/ref/shave.xml | 52 - client/neon-0.27.2/doc/ref/sslca.xml | 81 - client/neon-0.27.2/doc/ref/sslcert.xml | 111 - client/neon-0.27.2/doc/ref/sslcert2.xml | 49 - client/neon-0.27.2/doc/ref/sslcertio.xml | 95 - client/neon-0.27.2/doc/ref/ssldname.xml | 73 - client/neon-0.27.2/doc/ref/ssltrust.xml | 72 - client/neon-0.27.2/doc/ref/sslvfy.xml | 163 - client/neon-0.27.2/doc/ref/status.xml | 78 - client/neon-0.27.2/doc/ref/tok.xml | 76 - client/neon-0.27.2/doc/ref/vers.xml | 63 - client/neon-0.27.2/doc/ref/xml.xml | 56 - client/neon-0.27.2/doc/refentry.xml | 56 - client/neon-0.27.2/doc/ssl.xml | 24 - client/neon-0.27.2/doc/using-neon.txt | 166 - client/neon-0.27.2/doc/using.xml | 140 - client/neon-0.27.2/doc/version.xml | 1 - client/neon-0.27.2/doc/xml.xml | 206 - client/neon-0.27.2/install-sh | 250 - client/neon-0.27.2/ltmain.sh | 6911 ---- client/neon-0.27.2/macros/ChangeLog | 1085 - client/neon-0.27.2/macros/neon-test.m4 | 46 - client/neon-0.27.2/macros/neon-xml-parser.m4 | 154 - client/neon-0.27.2/macros/neon.m4 | 1142 - client/neon-0.27.2/macros/socklen-arg-type.m4 | 43 - client/neon-0.27.2/neon-config.in | 110 - client/neon-0.27.2/neon.mak | 250 - client/neon-0.27.2/neon.pc.in | 11 - client/neon-0.27.2/po/cs.gmo | Bin 1556 -> 0 bytes client/neon-0.27.2/po/cs.po | 480 - client/neon-0.27.2/po/de.gmo | Bin 1702 -> 0 bytes client/neon-0.27.2/po/de.po | 464 - client/neon-0.27.2/po/fr.gmo | Bin 377 -> 0 bytes client/neon-0.27.2/po/fr.po | 471 - client/neon-0.27.2/po/ja.gmo | Bin 867 -> 0 bytes client/neon-0.27.2/po/ja.po | 465 - client/neon-0.27.2/po/neon.pot | 447 - client/neon-0.27.2/po/nn.gmo | Bin 1616 -> 0 bytes client/neon-0.27.2/po/nn.po | 479 - client/neon-0.27.2/po/ru.gmo | Bin 373 -> 0 bytes client/neon-0.27.2/po/ru.po | 457 - client/neon-0.27.2/po/tr.gmo | Bin 1513 -> 0 bytes client/neon-0.27.2/po/tr.po | 473 - client/neon-0.27.2/po/zh.gmo | Bin 5753 -> 0 bytes client/neon-0.27.2/po/zh.po | 458 - client/neon-0.27.2/src/COPYING.LIB | 482 - client/neon-0.27.2/src/ChangeLog | 5563 --- client/neon-0.27.2/src/Makefile.in | 154 - client/neon-0.27.2/src/README | 15 - client/neon-0.27.2/src/memleak.h | 55 - client/neon-0.27.2/src/ne_207.c | 371 - client/neon-0.27.2/src/ne_207.h | 103 - client/neon-0.27.2/src/ne_acl.c | 132 - client/neon-0.27.2/src/ne_acl.h | 56 - client/neon-0.27.2/src/ne_alloc.c | 215 - client/neon-0.27.2/src/ne_alloc.h | 56 - client/neon-0.27.2/src/ne_auth.c | 1456 - client/neon-0.27.2/src/ne_auth.h | 113 - client/neon-0.27.2/src/ne_basic.c | 456 - client/neon-0.27.2/src/ne_basic.h | 128 - client/neon-0.27.2/src/ne_compress.c | 449 - client/neon-0.27.2/src/ne_compress.h | 48 - client/neon-0.27.2/src/ne_dates.c | 248 - client/neon-0.27.2/src/ne_dates.h | 54 - client/neon-0.27.2/src/ne_defs.h | 64 - client/neon-0.27.2/src/ne_gnutls.c | 1138 - client/neon-0.27.2/src/ne_i18n.c | 47 - client/neon-0.27.2/src/ne_i18n.h | 55 - client/neon-0.27.2/src/ne_internal.h | 86 - client/neon-0.27.2/src/ne_locks.c | 816 - client/neon-0.27.2/src/ne_locks.h | 165 - client/neon-0.27.2/src/ne_md5.c | 472 - client/neon-0.27.2/src/ne_md5.h | 98 - client/neon-0.27.2/src/ne_openssl.c | 1105 - client/neon-0.27.2/src/ne_private.h | 123 - client/neon-0.27.2/src/ne_privssl.h | 85 - client/neon-0.27.2/src/ne_props.c | 651 - client/neon-0.27.2/src/ne_props.h | 249 - client/neon-0.27.2/src/ne_redirect.c | 141 - client/neon-0.27.2/src/ne_redirect.h | 42 - client/neon-0.27.2/src/ne_request.c | 1516 - client/neon-0.27.2/src/ne_request.h | 309 - client/neon-0.27.2/src/ne_session.c | 493 - client/neon-0.27.2/src/ne_session.h | 276 - client/neon-0.27.2/src/ne_socket.c | 1510 - client/neon-0.27.2/src/ne_socket.h | 214 - client/neon-0.27.2/src/ne_ssl.h | 180 - client/neon-0.27.2/src/ne_sspi.c | 615 - client/neon-0.27.2/src/ne_sspi.h | 48 - client/neon-0.27.2/src/ne_string.c | 487 - client/neon-0.27.2/src/ne_string.h | 177 - client/neon-0.27.2/src/ne_stubssl.c | 145 - client/neon-0.27.2/src/ne_uri.c | 617 - client/neon-0.27.2/src/ne_uri.h | 100 - client/neon-0.27.2/src/ne_utils.c | 213 - client/neon-0.27.2/src/ne_utils.h | 117 - client/neon-0.27.2/src/ne_xml.c | 674 - client/neon-0.27.2/src/ne_xml.h | 165 - client/neon-0.27.2/src/ne_xmlreq.c | 110 - client/neon-0.27.2/src/ne_xmlreq.h | 51 - client/neon-0.27.2/test/COPYING | 339 - client/neon-0.27.2/test/ChangeLog | 1548 - client/neon-0.27.2/test/Makefile.in | 222 - client/neon-0.27.2/test/README | 39 - client/neon-0.27.2/test/STATUS | 74 - client/neon-0.27.2/test/acl.c | 101 - client/neon-0.27.2/test/auth.c | 1028 - client/neon-0.27.2/test/basic.c | 278 - client/neon-0.27.2/test/common/ChangeLog | 245 - client/neon-0.27.2/test/common/README | 4 - client/neon-0.27.2/test/common/child.c | 478 - client/neon-0.27.2/test/common/child.h | 117 - client/neon-0.27.2/test/common/run.sh | 19 - client/neon-0.27.2/test/common/tests.c | 362 - client/neon-0.27.2/test/common/tests.h | 128 - client/neon-0.27.2/test/compress.c | 447 - client/neon-0.27.2/test/expired.pem | 20 - client/neon-0.27.2/test/htdocs/plain | 1 - client/neon-0.27.2/test/largefile.c | 194 - client/neon-0.27.2/test/lock.c | 625 - client/neon-0.27.2/test/makekeys.sh | 175 - client/neon-0.27.2/test/notvalid.pem | 20 - client/neon-0.27.2/test/openssl.conf | 104 - client/neon-0.27.2/test/props.c | 672 - client/neon-0.27.2/test/redirect.c | 189 - client/neon-0.27.2/test/request.c | 2161 - client/neon-0.27.2/test/resolve.c | 59 - client/neon-0.27.2/test/run-tests.sh | 32 - client/neon-0.27.2/test/run.sh | 25 - client/neon-0.27.2/test/server.key | 9 - client/neon-0.27.2/test/session.c | 200 - client/neon-0.27.2/test/skeleton.c | 51 - client/neon-0.27.2/test/socket.c | 1105 - client/neon-0.27.2/test/ssl.c | 1587 - client/neon-0.27.2/test/string-tests.c | 643 - client/neon-0.27.2/test/stubs.c | 173 - client/neon-0.27.2/test/uri-tests.c | 571 - client/neon-0.27.2/test/util-tests.c | 311 - client/neon-0.27.2/test/utils.c | 149 - client/neon-0.27.2/test/utils.h | 78 - client/neon-0.27.2/test/xml.c | 561 - client/neon-0.27.2/test/xmlreq.c | 176 - client/src/Makefile | 124 - client/src/Makefile.am | 28 - client/src/acl.c | 440 - client/src/acl.h | 74 - client/src/bench_timer.c | 261 - client/src/bench_timer.h | 129 - client/src/creds.c | 234 - client/src/creds.h | 79 - client/src/dirservice.c | 1611 - client/src/dirservice.h | 285 - client/src/file.c | 510 - client/src/file.h | 272 - client/src/file_inv.c | 549 - client/src/file_inv.h | 106 - client/src/fileobj.c | 341 - client/src/fileobj.h | 69 - client/src/fileops.h | 28 - client/src/filerw.c | 382 - client/src/filerw.h | 86 - client/src/fobj_cache.c | 356 - client/src/fobj_cache.h | 117 - client/src/hashtable.c | 406 - client/src/hashtable.h | 142 - client/src/kernel_substitutes.h | 39 - client/src/kernel_substitutes_arm.h | 120 - client/src/kernel_substitutes_ppc.h | 493 - client/src/kernel_substitutes_x86.h | 150 - client/src/lease.c | 179 - client/src/lease.h | 71 - client/src/list.h | 175 - client/src/lock_utils.c | 143 - client/src/lock_utils.h | 112 - client/src/logger.c | 194 - client/src/logger.h | 105 - client/src/main.c | 310 - client/src/metadata_cache.c | 187 - client/src/metadata_cache.h | 56 - client/src/mods/Makefile | 34 - client/src/mods/raid0.c | 59 - client/src/mods/raid5.c | 41 - client/src/mrc.h | 56 - client/src/mrc_channel.c | 1580 - client/src/mrc_channel.h | 105 - client/src/mrc_comm.c | 232 - client/src/mrc_comm.h | 46 - client/src/mrc_request.c | 724 - client/src/mrc_request.h | 474 - client/src/obj_set.c | 159 - client/src/obj_set.h | 69 - client/src/osd.c | 86 - client/src/osd.h | 53 - client/src/osd_channel.c | 760 - client/src/osd_channel.h | 133 - client/src/osd_manager.c | 164 - client/src/osd_manager.h | 69 - client/src/osd_proxy.c | 282 - client/src/osd_proxy.h | 81 - client/src/osd_request.c | 100 - client/src/osd_request.h | 84 - client/src/platforms.c | 129 - client/src/platforms.h | 80 - client/src/pseudo_rcu.h | 64 - client/src/radix-tree.c | 370 - client/src/radix-tree.h | 132 - client/src/request.c | 232 - client/src/request.h | 295 - client/src/signals.c | 144 - client/src/sobj_cache.c | 568 - client/src/sobj_cache.h | 121 - client/src/statinfo.c | 256 - client/src/statinfo.h | 92 - client/src/stripe.c | 295 - client/src/stripe.h | 100 - client/src/stripingpolicy.c | 188 - client/src/stripingpolicy.h | 69 - client/src/transl_engine.c | 103 - client/src/transl_engine.h | 26 - client/src/transl_mod.c | 116 - client/src/transl_mod.h | 39 - client/src/workqueue.c | 548 - client/src/workqueue.h | 201 - client/src/xattr.c | 293 - client/src/xattr.h | 73 - client/src/xcap.c | 282 - client/src/xcap.h | 80 - client/src/xcap_inv.c | 379 - client/src/xcap_inv.h | 70 - client/src/xloc.c | 573 - client/src/xloc.h | 124 - client/src/xtreemfs.c | 471 - client/src/xtreemfs.h | 164 - client/src/xtreemfs_conf.c | 566 - client/src/xtreemfs_conf.h | 101 - client/src/xtreemfs_fuse.c | 2044 - client/src/xtreemfs_fuse.h | 83 - client/src/xtreemfs_itac.c | 57 - client/src/xtreemfs_prot.c | 535 - client/src/xtreemfs_prot.h | 72 - client/src/xtreemfs_security.c | 65 - client/src/xtreemfs_security.h | 44 - client/src/xtreemfs_utils.c | 543 - client/src/xtreemfs_utils.h | 70 - client/tests/Makefile | 8 - client/tests/acl/Makefile | 29 - client/tests/acl/main.c | 60 - client/tests/bench_timer/Makefile | 31 - client/tests/bench_timer/main.c | 37 - client/tests/client-ng/Makefile | 8 - client/tests/client-ng/multi-stage/Makefile | 34 - client/tests/client-ng/multi-stage/main.c | 69 - client/tests/client-ng/multi-stage/stage1.c | 184 - client/tests/client-ng/multi-stage/stage1.h | 30 - client/tests/client-ng/multi-stage/stage2.c | 149 - client/tests/client-ng/multi-stage/stage2.h | 30 - client/tests/client-ng/simple/Makefile | 34 - client/tests/client-ng/simple/main.c | 33 - client/tests/client-ng/simple/work.c | 62 - client/tests/client-ng/simple/work.h | 13 - client/tests/file/Makefile | 8 - client/tests/file/cache/Makefile | 33 - client/tests/file/cache/main.c | 63 - client/tests/file/inv/Makefile | 36 - client/tests/file/inv/main.c | 21 - client/tests/hashtable/Makefile | 31 - client/tests/hashtable/main.c | 109 - client/tests/json/Makefile | 8 - client/tests/json/striping_policy/Makefile | 32 - client/tests/json/striping_policy/main.c | 47 - client/tests/json/xlocs/Makefile | 32 - client/tests/json/xlocs/main.c | 56 - client/tests/logger/Makefile | 31 - client/tests/logger/main.c | 19 - client/tests/mrc/Makefile | 8 - client/tests/mrc/channel/Makefile | 34 - client/tests/mrc/channel/main.c | 47 - client/tests/mrc/proxy/Makefile | 34 - client/tests/mrc/proxy/main.c | 93 - client/tests/osd/Makefile | 8 - client/tests/osd/channel/Makefile | 35 - client/tests/osd/channel/main.c | 167 - client/tests/pseudocomm/Makefile | 32 - client/tests/pseudocomm/main.c | 72 - client/tests/radix-tree/Makefile | 8 - client/tests/radix-tree/simple/Makefile | 31 - client/tests/radix-tree/simple/main.c | 59 - client/tests/suite/createFiles.sh | 105 - client/tests/suite/ddwrite.sh | 88 - client/tests/suite/ltp_fs/Makefile | 59 - client/tests/suite/ltp_fs/include/dataascii.h | 65 - client/tests/suite/ltp_fs/include/databin.h | 44 - client/tests/suite/ltp_fs/include/file_lock.h | 46 - client/tests/suite/ltp_fs/include/forker.h | 63 - .../tests/suite/ltp_fs/include/open_flags.h | 73 - client/tests/suite/ltp_fs/include/pattern.h | 90 - .../tests/suite/ltp_fs/include/random_range.h | 45 - client/tests/suite/ltp_fs/include/rmobj.h | 12 - .../tests/suite/ltp_fs/include/search_path.h | 36 - .../tests/suite/ltp_fs/include/str_to_bytes.h | 39 - .../suite/ltp_fs/include/string_to_tokens.h | 48 - client/tests/suite/ltp_fs/include/test.h | 247 - client/tests/suite/ltp_fs/include/tlibio.h | 148 - client/tests/suite/ltp_fs/include/usctest.h | 326 - client/tests/suite/ltp_fs/include/write_log.h | 170 - client/tests/suite/ltp_fs/kernel_fs/Makefile | 12 - .../suite/ltp_fs/kernel_fs/acl/tacl_xattr.sh | 875 - .../suite/ltp_fs/kernel_fs/acls/Makefile | 23 - .../ltp_fs/kernel_fs/acls/acl_file_test.c | 69 - .../ltp_fs/kernel_fs/acls/acl_link_test.c | 52 - .../suite/ltp_fs/kernel_fs/acls/acl_test01 | 161 - .../suite/ltp_fs/kernel_fs/doio/Makefile | 28 - .../tests/suite/ltp_fs/kernel_fs/doio/README | 79 - .../tests/suite/ltp_fs/kernel_fs/doio/doio.c | 5454 --- .../tests/suite/ltp_fs/kernel_fs/doio/doio.h | 200 - .../suite/ltp_fs/kernel_fs/doio/growfiles.c | 2856 -- .../tests/suite/ltp_fs/kernel_fs/doio/iogen.c | 1988 - .../suite/ltp_fs/kernel_fs/doio/rwtest.sh | 401 - .../suite/ltp_fs/kernel_fs/fs-bench/Makefile | 25 - .../suite/ltp_fs/kernel_fs/fs-bench/README | 45 - .../ltp_fs/kernel_fs/fs-bench/boxmuler.c | 25 - .../tests/suite/ltp_fs/kernel_fs/fs-bench/cr | Bin 16630 -> 0 bytes .../ltp_fs/kernel_fs/fs-bench/create-files.c | 113 - .../ltp_fs/kernel_fs/fs-bench/modaltr.sh | 124 - .../tests/suite/ltp_fs/kernel_fs/fs-bench/ra | Bin 11940 -> 0 bytes .../suite/ltp_fs/kernel_fs/fs-bench/radc | Bin 16653 -> 0 bytes .../ltp_fs/kernel_fs/fs-bench/random-access.c | 91 - .../kernel_fs/fs-bench/random-del-create.c | 134 - .../suite/ltp_fs/kernel_fs/fs-bench/test.sh | 50 - .../suite/ltp_fs/kernel_fs/fs-bench/test2.sh | 63 - .../suite/ltp_fs/kernel_fs/fs_di/Makefile | 11 - .../ltp_fs/kernel_fs/fs_di/create_datafile.c | 76 - .../tests/suite/ltp_fs/kernel_fs/fs_di/fs_di | 235 - .../suite/ltp_fs/kernel_fs/fs_inod/Makefile | 8 - .../suite/ltp_fs/kernel_fs/fs_inod/fs_inod | 255 - .../kernel_fs/fs_inod/fs_inod_readme.txt | 73 - .../suite/ltp_fs/kernel_fs/fs_perms/Makefile | 16 - .../ltp_fs/kernel_fs/fs_perms/fs_perms.c | 131 - .../ltp_fs/kernel_fs/fs_perms/simpletest.sh | 18 - .../suite/ltp_fs/kernel_fs/fs_perms/testx.c | 4 - .../suite/ltp_fs/kernel_fs/fsstress/Makefile | 15 - .../ltp_fs/kernel_fs/fsstress/fsstress.c | 2643 -- .../suite/ltp_fs/kernel_fs/fsstress/global.h | 66 - .../ltp_fs/kernel_fs/fsstress/xfscompat.h | 7 - .../suite/ltp_fs/kernel_fs/ftest/Makefile | 37 - .../suite/ltp_fs/kernel_fs/ftest/ftest01.c | 679 - .../suite/ltp_fs/kernel_fs/ftest/ftest02.c | 532 - .../suite/ltp_fs/kernel_fs/ftest/ftest03.c | 720 - .../suite/ltp_fs/kernel_fs/ftest/ftest04.c | 599 - .../suite/ltp_fs/kernel_fs/ftest/ftest05.c | 673 - .../suite/ltp_fs/kernel_fs/ftest/ftest06.c | 557 - .../suite/ltp_fs/kernel_fs/ftest/ftest07.c | 721 - .../suite/ltp_fs/kernel_fs/ftest/ftest08.c | 633 - .../suite/ltp_fs/kernel_fs/inode/Makefile | 36 - .../suite/ltp_fs/kernel_fs/inode/inode01.c | 778 - .../suite/ltp_fs/kernel_fs/inode/inode02.c | 916 - .../suite/ltp_fs/kernel_fs/lftest/Makefile | 11 - .../suite/ltp_fs/kernel_fs/lftest/lftest.c | 94 - .../suite/ltp_fs/kernel_fs/linktest/Makefile | 8 - .../suite/ltp_fs/kernel_fs/linktest/README | 64 - .../ltp_fs/kernel_fs/linktest/linktest.pl | 56 - .../suite/ltp_fs/kernel_fs/openfile/Makefile | 13 - .../ltp_fs/kernel_fs/openfile/openfile.c | 242 - .../suite/ltp_fs/kernel_fs/racer/Makefile | 8 - .../ltp_fs/kernel_fs/racer/dir_create.sh | 33 - .../suite/ltp_fs/kernel_fs/racer/dir_test.sh | 31 - .../ltp_fs/kernel_fs/racer/file_concat.sh | 35 - .../ltp_fs/kernel_fs/racer/file_create.sh | 36 - .../suite/ltp_fs/kernel_fs/racer/file_link.sh | 30 - .../suite/ltp_fs/kernel_fs/racer/file_list.sh | 40 - .../ltp_fs/kernel_fs/racer/file_rename.sh | 29 - .../suite/ltp_fs/kernel_fs/racer/file_rm.sh | 31 - .../ltp_fs/kernel_fs/racer/file_symlink.sh | 30 - .../suite/ltp_fs/kernel_fs/racer/racer.sh | 84 - .../suite/ltp_fs/kernel_fs/stream/Makefile | 37 - .../suite/ltp_fs/kernel_fs/stream/stream01.c | 131 - .../suite/ltp_fs/kernel_fs/stream/stream02.c | 123 - .../suite/ltp_fs/kernel_fs/stream/stream03.c | 237 - .../suite/ltp_fs/kernel_fs/stream/stream04.c | 125 - .../suite/ltp_fs/kernel_fs/stream/stream05.c | 225 - client/tests/suite/ltp_fs/lib/Makefile | 22 - client/tests/suite/ltp_fs/lib/dataascii.c | 218 - client/tests/suite/ltp_fs/lib/databin.c | 298 - client/tests/suite/ltp_fs/lib/datapid.c | 374 - client/tests/suite/ltp_fs/lib/file_lock.c | 209 - client/tests/suite/ltp_fs/lib/forker.c | 284 - .../tests/suite/ltp_fs/lib/get_high_address.c | 41 - client/tests/suite/ltp_fs/lib/open_flags.c | 330 - client/tests/suite/ltp_fs/lib/parse_opts.c | 898 - client/tests/suite/ltp_fs/lib/pattern.c | 168 - client/tests/suite/ltp_fs/lib/random_range.c | 917 - client/tests/suite/ltp_fs/lib/rmobj.c | 211 - client/tests/suite/ltp_fs/lib/search_path.c | 278 - client/tests/suite/ltp_fs/lib/self_exec.c | 215 - client/tests/suite/ltp_fs/lib/str_to_bytes.c | 210 - .../tests/suite/ltp_fs/lib/string_to_tokens.c | 109 - client/tests/suite/ltp_fs/lib/tlibio.c | 2003 - .../tests/suite/ltp_fs/lib/tst_cwd_has_free.c | 22 - .../tests/suite/ltp_fs/lib/tst_is_cwd_tmpfs.c | 25 - client/tests/suite/ltp_fs/lib/tst_kvercmp.c | 68 - client/tests/suite/ltp_fs/lib/tst_res.c | 968 - client/tests/suite/ltp_fs/lib/tst_sig.c | 288 - client/tests/suite/ltp_fs/lib/tst_tmpdir.c | 392 - client/tests/suite/ltp_fs/lib/write_log.c | 464 - client/tests/suite/marked_block.pl | 196 - client/tests/suite/marked_loop.sh | 30 - client/tests/thread_pool/Makefile | 32 - client/tests/thread_pool/main.c | 64 - client/tools/Makefile | 106 - client/tools/addrepl.c | 304 - client/tools/lsvol.c | 330 - client/tools/mkvol.c | 563 - client/tools/mount.xtreemfs.c | 45 - client/tools/rmvol.c | 228 - client/tools/tool_utils.c | 128 - client/tools/tool_utils.h | 67 - client/tools/xtfs_stat.c | 193 - 673 files changed, 226241 deletions(-) delete mode 100644 client/.cproject delete mode 100644 client/.project delete mode 100644 client/AUTHORS delete mode 100644 client/COPYING delete mode 100644 client/ChangeLog delete mode 100644 client/Doxyfile delete mode 100644 client/Makefile delete mode 100644 client/Makefile.am delete mode 100644 client/NEWS delete mode 100644 client/README delete mode 100755 client/bin/xtfs_showmount delete mode 100755 client/bin/xtfs_umount delete mode 100755 client/bootstrap.sh delete mode 100644 client/config.h.in delete mode 100644 client/configure.ac delete mode 100644 client/json-c-0.7/AUTHORS delete mode 100644 client/json-c-0.7/COPYING delete mode 100644 client/json-c-0.7/ChangeLog delete mode 100644 client/json-c-0.7/Doxyfile delete mode 100644 client/json-c-0.7/INSTALL delete mode 100644 client/json-c-0.7/Makefile.am delete mode 100644 client/json-c-0.7/Makefile.in delete mode 100644 client/json-c-0.7/NEWS delete mode 100644 client/json-c-0.7/README delete mode 100644 client/json-c-0.7/README-WIN32.html delete mode 100644 client/json-c-0.7/README.html delete mode 100644 client/json-c-0.7/aclocal.m4 delete mode 100644 client/json-c-0.7/arraylist.c delete mode 100644 client/json-c-0.7/arraylist.h delete mode 100644 client/json-c-0.7/autogen.sh delete mode 100644 client/json-c-0.7/bits.h delete mode 100755 client/json-c-0.7/config.guess delete mode 100644 client/json-c-0.7/config.h.in delete mode 100644 client/json-c-0.7/config.h.win32 delete mode 100755 client/json-c-0.7/config.sub delete mode 100755 client/json-c-0.7/configure delete mode 100644 client/json-c-0.7/configure.in delete mode 100644 client/json-c-0.7/debug.c delete mode 100644 client/json-c-0.7/debug.h delete mode 100755 client/json-c-0.7/depcomp delete mode 100755 client/json-c-0.7/install-sh delete mode 100644 client/json-c-0.7/json-c.vcproj delete mode 100644 client/json-c-0.7/json.h delete mode 100644 client/json-c-0.7/json.pc.in delete mode 100644 client/json-c-0.7/json_object.c delete mode 100644 client/json-c-0.7/json_object.h delete mode 100644 client/json-c-0.7/json_object_private.h delete mode 100644 client/json-c-0.7/json_tokener.c delete mode 100644 client/json-c-0.7/json_tokener.h delete mode 100644 client/json-c-0.7/json_util.c delete mode 100644 client/json-c-0.7/json_util.h delete mode 100644 client/json-c-0.7/linkhash.c delete mode 100644 client/json-c-0.7/linkhash.h delete mode 100644 client/json-c-0.7/ltmain.sh delete mode 100755 client/json-c-0.7/missing delete mode 100755 client/json-c-0.7/mkinstalldirs delete mode 100644 client/json-c-0.7/printbuf.c delete mode 100644 client/json-c-0.7/printbuf.h delete mode 100644 client/json-c-0.7/stamp-h.in delete mode 100644 client/json-c-0.7/test1.c delete mode 100644 client/json-c-0.7/test2.c delete mode 100644 client/make.config delete mode 100644 client/man/man1/xtfs_lsvol.1 delete mode 100644 client/man/man1/xtfs_mkvol.1 delete mode 100644 client/man/man1/xtfs_mount.1 delete mode 100644 client/man/man1/xtfs_rmvol.1 delete mode 100644 client/man/man1/xtfs_showmount.1 delete mode 100644 client/man/man1/xtfs_stat.1 delete mode 100644 client/man/man1/xtfs_umount.1 delete mode 100644 client/neon-0.27.2/.package delete mode 100755 client/neon-0.27.2/.release.sh delete mode 100644 client/neon-0.27.2/.version delete mode 100644 client/neon-0.27.2/AUTHORS delete mode 100644 client/neon-0.27.2/BUGS delete mode 100644 client/neon-0.27.2/ChangeLog delete mode 100644 client/neon-0.27.2/ChangeLog.CVS delete mode 100644 client/neon-0.27.2/INSTALL.win32 delete mode 100644 client/neon-0.27.2/Makefile.in delete mode 100644 client/neon-0.27.2/NEWS delete mode 100644 client/neon-0.27.2/README delete mode 100644 client/neon-0.27.2/THANKS delete mode 100644 client/neon-0.27.2/TODO delete mode 100644 client/neon-0.27.2/aclocal.m4 delete mode 100755 client/neon-0.27.2/autogen.sh delete mode 100755 client/neon-0.27.2/config.guess delete mode 100644 client/neon-0.27.2/config.h.in delete mode 100644 client/neon-0.27.2/config.hw delete mode 100644 client/neon-0.27.2/config.hw.in delete mode 100755 client/neon-0.27.2/config.sub delete mode 100755 client/neon-0.27.2/configure delete mode 100644 client/neon-0.27.2/configure.in delete mode 100644 client/neon-0.27.2/doc/TODO delete mode 100644 client/neon-0.27.2/doc/biblio.xml delete mode 100644 client/neon-0.27.2/doc/date.xml delete mode 100644 client/neon-0.27.2/doc/feat.xml delete mode 100644 client/neon-0.27.2/doc/html.xsl delete mode 100644 client/neon-0.27.2/doc/html/api.html delete mode 100644 client/neon-0.27.2/doc/html/biblio.html delete mode 100644 client/neon-0.27.2/doc/html/compliance.html delete mode 100644 client/neon-0.27.2/doc/html/features.html delete mode 100644 client/neon-0.27.2/doc/html/index.html delete mode 100644 client/neon-0.27.2/doc/html/intro.html delete mode 100644 client/neon-0.27.2/doc/html/ref.html delete mode 100644 client/neon-0.27.2/doc/html/refalloc.html delete mode 100644 client/neon-0.27.2/doc/html/refauth.html delete mode 100644 client/neon-0.27.2/doc/html/refbuf.html delete mode 100644 client/neon-0.27.2/doc/html/refbufapp.html delete mode 100644 client/neon-0.27.2/doc/html/refbufcr.html delete mode 100644 client/neon-0.27.2/doc/html/refbufdest.html delete mode 100644 client/neon-0.27.2/doc/html/refbufutil.html delete mode 100644 client/neon-0.27.2/doc/html/refcert.html delete mode 100644 client/neon-0.27.2/doc/html/refclicert.html delete mode 100644 client/neon-0.27.2/doc/html/refconfig.html delete mode 100644 client/neon-0.27.2/doc/html/referr.html delete mode 100644 client/neon-0.27.2/doc/html/reffeat.html delete mode 100644 client/neon-0.27.2/doc/html/refgetst.html delete mode 100644 client/neon-0.27.2/doc/html/refi18n.html delete mode 100644 client/neon-0.27.2/doc/html/refiaddr.html delete mode 100644 client/neon-0.27.2/doc/html/refneon.html delete mode 100644 client/neon-0.27.2/doc/html/refopts.html delete mode 100644 client/neon-0.27.2/doc/html/refreq.html delete mode 100644 client/neon-0.27.2/doc/html/refreqbody.html delete mode 100644 client/neon-0.27.2/doc/html/refreqhdr.html delete mode 100644 client/neon-0.27.2/doc/html/refreqopts.html delete mode 100644 client/neon-0.27.2/doc/html/refresolve.html delete mode 100644 client/neon-0.27.2/doc/html/refresphdr.html delete mode 100644 client/neon-0.27.2/doc/html/refsess.html delete mode 100644 client/neon-0.27.2/doc/html/refshave.html delete mode 100644 client/neon-0.27.2/doc/html/refsockinit.html delete mode 100644 client/neon-0.27.2/doc/html/refsslca.html delete mode 100644 client/neon-0.27.2/doc/html/refsslcert2.html delete mode 100644 client/neon-0.27.2/doc/html/refsslcertio.html delete mode 100644 client/neon-0.27.2/doc/html/refssldname.html delete mode 100644 client/neon-0.27.2/doc/html/refsslvfy.html delete mode 100644 client/neon-0.27.2/doc/html/refstatus.html delete mode 100644 client/neon-0.27.2/doc/html/reftok.html delete mode 100644 client/neon-0.27.2/doc/html/refvers.html delete mode 100644 client/neon-0.27.2/doc/html/refxml.html delete mode 100644 client/neon-0.27.2/doc/html/using.html delete mode 100644 client/neon-0.27.2/doc/html/xml.html delete mode 100644 client/neon-0.27.2/doc/man/ne_add_request_header.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_addr_destroy.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_addr_error.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_addr_first.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_addr_next.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_addr_resolve.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_addr_result.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_buffer.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_buffer_altered.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_buffer_append.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_buffer_clear.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_buffer_concat.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_buffer_create.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_buffer_destroy.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_buffer_finish.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_buffer_grow.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_buffer_ncreate.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_buffer_zappend.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_calloc.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_close_connection.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_forget_auth.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_get_error.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_get_response_header.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_get_scheme.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_get_server_hostport.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_get_status.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_has_support.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_i18n_init.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_iaddr_cmp.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_iaddr_free.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_iaddr_make.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_iaddr_print.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_iaddr_typeof.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_malloc.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_oom_callback.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_print_request_header.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_qtoken.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_realloc.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_request_create.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_request_destroy.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_request_dispatch.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_response_header_iterate.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_session_create.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_session_destroy.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_session_proxy.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_set_error.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_set_persist.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_set_proxy_auth.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_set_read_timeout.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_set_request_body_buffer.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_set_request_body_fd.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_set_request_body_fd64.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_set_request_expect100.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_set_server_auth.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_set_useragent.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_shave.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_sock_exit.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_sock_init.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_cert_cmp.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_cert_export.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_cert_free.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_cert_identity.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_cert_import.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_cert_issuer.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_cert_read.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_cert_signedby.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_cert_subject.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_cert_write.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_clicert_decrypt.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_clicert_encrypted.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_clicert_free.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_clicert_name.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_clicert_owner.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_clicert_read.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_dname_cmp.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_readable_dname.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_set_verify.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_trust_cert.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_ssl_trust_default_ca.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_status.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_strdup.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_strndup.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_token.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_version_match.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_version_string.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_xml_create.3 delete mode 100644 client/neon-0.27.2/doc/man/ne_xml_destroy.3 delete mode 100644 client/neon-0.27.2/doc/man/neon-config.1 delete mode 100644 client/neon-0.27.2/doc/man/neon.3 delete mode 100644 client/neon-0.27.2/doc/manual.css delete mode 100644 client/neon-0.27.2/doc/manual.xml delete mode 100644 client/neon-0.27.2/doc/parsing-xml.txt delete mode 100644 client/neon-0.27.2/doc/ref/alloc.xml delete mode 100644 client/neon-0.27.2/doc/ref/auth.xml delete mode 100644 client/neon-0.27.2/doc/ref/buf.xml delete mode 100644 client/neon-0.27.2/doc/ref/bufapp.xml delete mode 100644 client/neon-0.27.2/doc/ref/bufcr.xml delete mode 100644 client/neon-0.27.2/doc/ref/bufdest.xml delete mode 100644 client/neon-0.27.2/doc/ref/bufutil.xml delete mode 100644 client/neon-0.27.2/doc/ref/clicert.xml delete mode 100644 client/neon-0.27.2/doc/ref/config.xml delete mode 100644 client/neon-0.27.2/doc/ref/err.xml delete mode 100644 client/neon-0.27.2/doc/ref/feat.xml delete mode 100644 client/neon-0.27.2/doc/ref/getst.xml delete mode 100644 client/neon-0.27.2/doc/ref/i18n.xml delete mode 100644 client/neon-0.27.2/doc/ref/iaddr.xml delete mode 100644 client/neon-0.27.2/doc/ref/init.xml delete mode 100644 client/neon-0.27.2/doc/ref/neon.xml delete mode 100644 client/neon-0.27.2/doc/ref/opts.xml delete mode 100644 client/neon-0.27.2/doc/ref/req.xml delete mode 100644 client/neon-0.27.2/doc/ref/reqbody.xml delete mode 100644 client/neon-0.27.2/doc/ref/reqhdr.xml delete mode 100644 client/neon-0.27.2/doc/ref/reqopts.xml delete mode 100644 client/neon-0.27.2/doc/ref/resolve.xml delete mode 100644 client/neon-0.27.2/doc/ref/resphdr.xml delete mode 100644 client/neon-0.27.2/doc/ref/sess.xml delete mode 100644 client/neon-0.27.2/doc/ref/shave.xml delete mode 100644 client/neon-0.27.2/doc/ref/sslca.xml delete mode 100644 client/neon-0.27.2/doc/ref/sslcert.xml delete mode 100644 client/neon-0.27.2/doc/ref/sslcert2.xml delete mode 100644 client/neon-0.27.2/doc/ref/sslcertio.xml delete mode 100644 client/neon-0.27.2/doc/ref/ssldname.xml delete mode 100644 client/neon-0.27.2/doc/ref/ssltrust.xml delete mode 100644 client/neon-0.27.2/doc/ref/sslvfy.xml delete mode 100644 client/neon-0.27.2/doc/ref/status.xml delete mode 100644 client/neon-0.27.2/doc/ref/tok.xml delete mode 100644 client/neon-0.27.2/doc/ref/vers.xml delete mode 100644 client/neon-0.27.2/doc/ref/xml.xml delete mode 100644 client/neon-0.27.2/doc/refentry.xml delete mode 100644 client/neon-0.27.2/doc/ssl.xml delete mode 100644 client/neon-0.27.2/doc/using-neon.txt delete mode 100644 client/neon-0.27.2/doc/using.xml delete mode 100644 client/neon-0.27.2/doc/version.xml delete mode 100644 client/neon-0.27.2/doc/xml.xml delete mode 100755 client/neon-0.27.2/install-sh delete mode 100644 client/neon-0.27.2/ltmain.sh delete mode 100644 client/neon-0.27.2/macros/ChangeLog delete mode 100644 client/neon-0.27.2/macros/neon-test.m4 delete mode 100644 client/neon-0.27.2/macros/neon-xml-parser.m4 delete mode 100644 client/neon-0.27.2/macros/neon.m4 delete mode 100644 client/neon-0.27.2/macros/socklen-arg-type.m4 delete mode 100644 client/neon-0.27.2/neon-config.in delete mode 100644 client/neon-0.27.2/neon.mak delete mode 100644 client/neon-0.27.2/neon.pc.in delete mode 100644 client/neon-0.27.2/po/cs.gmo delete mode 100644 client/neon-0.27.2/po/cs.po delete mode 100644 client/neon-0.27.2/po/de.gmo delete mode 100644 client/neon-0.27.2/po/de.po delete mode 100644 client/neon-0.27.2/po/fr.gmo delete mode 100644 client/neon-0.27.2/po/fr.po delete mode 100644 client/neon-0.27.2/po/ja.gmo delete mode 100644 client/neon-0.27.2/po/ja.po delete mode 100644 client/neon-0.27.2/po/neon.pot delete mode 100644 client/neon-0.27.2/po/nn.gmo delete mode 100644 client/neon-0.27.2/po/nn.po delete mode 100644 client/neon-0.27.2/po/ru.gmo delete mode 100644 client/neon-0.27.2/po/ru.po delete mode 100644 client/neon-0.27.2/po/tr.gmo delete mode 100644 client/neon-0.27.2/po/tr.po delete mode 100644 client/neon-0.27.2/po/zh.gmo delete mode 100644 client/neon-0.27.2/po/zh.po delete mode 100644 client/neon-0.27.2/src/COPYING.LIB delete mode 100644 client/neon-0.27.2/src/ChangeLog delete mode 100644 client/neon-0.27.2/src/Makefile.in delete mode 100644 client/neon-0.27.2/src/README delete mode 100644 client/neon-0.27.2/src/memleak.h delete mode 100644 client/neon-0.27.2/src/ne_207.c delete mode 100644 client/neon-0.27.2/src/ne_207.h delete mode 100644 client/neon-0.27.2/src/ne_acl.c delete mode 100644 client/neon-0.27.2/src/ne_acl.h delete mode 100644 client/neon-0.27.2/src/ne_alloc.c delete mode 100644 client/neon-0.27.2/src/ne_alloc.h delete mode 100644 client/neon-0.27.2/src/ne_auth.c delete mode 100644 client/neon-0.27.2/src/ne_auth.h delete mode 100644 client/neon-0.27.2/src/ne_basic.c delete mode 100644 client/neon-0.27.2/src/ne_basic.h delete mode 100644 client/neon-0.27.2/src/ne_compress.c delete mode 100644 client/neon-0.27.2/src/ne_compress.h delete mode 100644 client/neon-0.27.2/src/ne_dates.c delete mode 100644 client/neon-0.27.2/src/ne_dates.h delete mode 100644 client/neon-0.27.2/src/ne_defs.h delete mode 100644 client/neon-0.27.2/src/ne_gnutls.c delete mode 100644 client/neon-0.27.2/src/ne_i18n.c delete mode 100644 client/neon-0.27.2/src/ne_i18n.h delete mode 100644 client/neon-0.27.2/src/ne_internal.h delete mode 100644 client/neon-0.27.2/src/ne_locks.c delete mode 100644 client/neon-0.27.2/src/ne_locks.h delete mode 100644 client/neon-0.27.2/src/ne_md5.c delete mode 100644 client/neon-0.27.2/src/ne_md5.h delete mode 100644 client/neon-0.27.2/src/ne_openssl.c delete mode 100644 client/neon-0.27.2/src/ne_private.h delete mode 100644 client/neon-0.27.2/src/ne_privssl.h delete mode 100644 client/neon-0.27.2/src/ne_props.c delete mode 100644 client/neon-0.27.2/src/ne_props.h delete mode 100644 client/neon-0.27.2/src/ne_redirect.c delete mode 100644 client/neon-0.27.2/src/ne_redirect.h delete mode 100644 client/neon-0.27.2/src/ne_request.c delete mode 100644 client/neon-0.27.2/src/ne_request.h delete mode 100644 client/neon-0.27.2/src/ne_session.c delete mode 100644 client/neon-0.27.2/src/ne_session.h delete mode 100644 client/neon-0.27.2/src/ne_socket.c delete mode 100644 client/neon-0.27.2/src/ne_socket.h delete mode 100644 client/neon-0.27.2/src/ne_ssl.h delete mode 100644 client/neon-0.27.2/src/ne_sspi.c delete mode 100644 client/neon-0.27.2/src/ne_sspi.h delete mode 100644 client/neon-0.27.2/src/ne_string.c delete mode 100644 client/neon-0.27.2/src/ne_string.h delete mode 100644 client/neon-0.27.2/src/ne_stubssl.c delete mode 100644 client/neon-0.27.2/src/ne_uri.c delete mode 100644 client/neon-0.27.2/src/ne_uri.h delete mode 100644 client/neon-0.27.2/src/ne_utils.c delete mode 100644 client/neon-0.27.2/src/ne_utils.h delete mode 100644 client/neon-0.27.2/src/ne_xml.c delete mode 100644 client/neon-0.27.2/src/ne_xml.h delete mode 100644 client/neon-0.27.2/src/ne_xmlreq.c delete mode 100644 client/neon-0.27.2/src/ne_xmlreq.h delete mode 100644 client/neon-0.27.2/test/COPYING delete mode 100644 client/neon-0.27.2/test/ChangeLog delete mode 100644 client/neon-0.27.2/test/Makefile.in delete mode 100644 client/neon-0.27.2/test/README delete mode 100644 client/neon-0.27.2/test/STATUS delete mode 100644 client/neon-0.27.2/test/acl.c delete mode 100644 client/neon-0.27.2/test/auth.c delete mode 100644 client/neon-0.27.2/test/basic.c delete mode 100644 client/neon-0.27.2/test/common/ChangeLog delete mode 100644 client/neon-0.27.2/test/common/README delete mode 100644 client/neon-0.27.2/test/common/child.c delete mode 100644 client/neon-0.27.2/test/common/child.h delete mode 100755 client/neon-0.27.2/test/common/run.sh delete mode 100644 client/neon-0.27.2/test/common/tests.c delete mode 100644 client/neon-0.27.2/test/common/tests.h delete mode 100644 client/neon-0.27.2/test/compress.c delete mode 100644 client/neon-0.27.2/test/expired.pem delete mode 100644 client/neon-0.27.2/test/htdocs/plain delete mode 100644 client/neon-0.27.2/test/largefile.c delete mode 100644 client/neon-0.27.2/test/lock.c delete mode 100755 client/neon-0.27.2/test/makekeys.sh delete mode 100644 client/neon-0.27.2/test/notvalid.pem delete mode 100644 client/neon-0.27.2/test/openssl.conf delete mode 100644 client/neon-0.27.2/test/props.c delete mode 100644 client/neon-0.27.2/test/redirect.c delete mode 100644 client/neon-0.27.2/test/request.c delete mode 100644 client/neon-0.27.2/test/resolve.c delete mode 100644 client/neon-0.27.2/test/run-tests.sh delete mode 100644 client/neon-0.27.2/test/run.sh delete mode 100644 client/neon-0.27.2/test/server.key delete mode 100644 client/neon-0.27.2/test/session.c delete mode 100644 client/neon-0.27.2/test/skeleton.c delete mode 100644 client/neon-0.27.2/test/socket.c delete mode 100644 client/neon-0.27.2/test/ssl.c delete mode 100644 client/neon-0.27.2/test/string-tests.c delete mode 100644 client/neon-0.27.2/test/stubs.c delete mode 100644 client/neon-0.27.2/test/uri-tests.c delete mode 100644 client/neon-0.27.2/test/util-tests.c delete mode 100644 client/neon-0.27.2/test/utils.c delete mode 100644 client/neon-0.27.2/test/utils.h delete mode 100644 client/neon-0.27.2/test/xml.c delete mode 100644 client/neon-0.27.2/test/xmlreq.c delete mode 100644 client/src/Makefile delete mode 100644 client/src/Makefile.am delete mode 100644 client/src/acl.c delete mode 100644 client/src/acl.h delete mode 100644 client/src/bench_timer.c delete mode 100644 client/src/bench_timer.h delete mode 100644 client/src/creds.c delete mode 100644 client/src/creds.h delete mode 100644 client/src/dirservice.c delete mode 100644 client/src/dirservice.h delete mode 100644 client/src/file.c delete mode 100644 client/src/file.h delete mode 100644 client/src/file_inv.c delete mode 100644 client/src/file_inv.h delete mode 100644 client/src/fileobj.c delete mode 100644 client/src/fileobj.h delete mode 100644 client/src/fileops.h delete mode 100644 client/src/filerw.c delete mode 100644 client/src/filerw.h delete mode 100644 client/src/fobj_cache.c delete mode 100644 client/src/fobj_cache.h delete mode 100644 client/src/hashtable.c delete mode 100644 client/src/hashtable.h delete mode 100644 client/src/kernel_substitutes.h delete mode 100644 client/src/kernel_substitutes_arm.h delete mode 100644 client/src/kernel_substitutes_ppc.h delete mode 100644 client/src/kernel_substitutes_x86.h delete mode 100644 client/src/lease.c delete mode 100644 client/src/lease.h delete mode 100644 client/src/list.h delete mode 100644 client/src/lock_utils.c delete mode 100644 client/src/lock_utils.h delete mode 100644 client/src/logger.c delete mode 100644 client/src/logger.h delete mode 100644 client/src/main.c delete mode 100644 client/src/metadata_cache.c delete mode 100644 client/src/metadata_cache.h delete mode 100644 client/src/mods/Makefile delete mode 100644 client/src/mods/raid0.c delete mode 100644 client/src/mods/raid5.c delete mode 100644 client/src/mrc.h delete mode 100644 client/src/mrc_channel.c delete mode 100644 client/src/mrc_channel.h delete mode 100644 client/src/mrc_comm.c delete mode 100644 client/src/mrc_comm.h delete mode 100644 client/src/mrc_request.c delete mode 100644 client/src/mrc_request.h delete mode 100644 client/src/obj_set.c delete mode 100644 client/src/obj_set.h delete mode 100644 client/src/osd.c delete mode 100644 client/src/osd.h delete mode 100644 client/src/osd_channel.c delete mode 100644 client/src/osd_channel.h delete mode 100644 client/src/osd_manager.c delete mode 100644 client/src/osd_manager.h delete mode 100644 client/src/osd_proxy.c delete mode 100644 client/src/osd_proxy.h delete mode 100644 client/src/osd_request.c delete mode 100644 client/src/osd_request.h delete mode 100644 client/src/platforms.c delete mode 100644 client/src/platforms.h delete mode 100644 client/src/pseudo_rcu.h delete mode 100644 client/src/radix-tree.c delete mode 100644 client/src/radix-tree.h delete mode 100644 client/src/request.c delete mode 100644 client/src/request.h delete mode 100644 client/src/signals.c delete mode 100644 client/src/sobj_cache.c delete mode 100644 client/src/sobj_cache.h delete mode 100644 client/src/statinfo.c delete mode 100644 client/src/statinfo.h delete mode 100644 client/src/stripe.c delete mode 100644 client/src/stripe.h delete mode 100644 client/src/stripingpolicy.c delete mode 100644 client/src/stripingpolicy.h delete mode 100644 client/src/transl_engine.c delete mode 100644 client/src/transl_engine.h delete mode 100644 client/src/transl_mod.c delete mode 100644 client/src/transl_mod.h delete mode 100644 client/src/workqueue.c delete mode 100644 client/src/workqueue.h delete mode 100644 client/src/xattr.c delete mode 100644 client/src/xattr.h delete mode 100644 client/src/xcap.c delete mode 100644 client/src/xcap.h delete mode 100644 client/src/xcap_inv.c delete mode 100644 client/src/xcap_inv.h delete mode 100644 client/src/xloc.c delete mode 100644 client/src/xloc.h delete mode 100644 client/src/xtreemfs.c delete mode 100644 client/src/xtreemfs.h delete mode 100644 client/src/xtreemfs_conf.c delete mode 100644 client/src/xtreemfs_conf.h delete mode 100644 client/src/xtreemfs_fuse.c delete mode 100644 client/src/xtreemfs_fuse.h delete mode 100644 client/src/xtreemfs_itac.c delete mode 100644 client/src/xtreemfs_prot.c delete mode 100644 client/src/xtreemfs_prot.h delete mode 100644 client/src/xtreemfs_security.c delete mode 100644 client/src/xtreemfs_security.h delete mode 100644 client/src/xtreemfs_utils.c delete mode 100644 client/src/xtreemfs_utils.h delete mode 100644 client/tests/Makefile delete mode 100644 client/tests/acl/Makefile delete mode 100644 client/tests/acl/main.c delete mode 100644 client/tests/bench_timer/Makefile delete mode 100644 client/tests/bench_timer/main.c delete mode 100644 client/tests/client-ng/Makefile delete mode 100644 client/tests/client-ng/multi-stage/Makefile delete mode 100644 client/tests/client-ng/multi-stage/main.c delete mode 100644 client/tests/client-ng/multi-stage/stage1.c delete mode 100644 client/tests/client-ng/multi-stage/stage1.h delete mode 100644 client/tests/client-ng/multi-stage/stage2.c delete mode 100644 client/tests/client-ng/multi-stage/stage2.h delete mode 100644 client/tests/client-ng/simple/Makefile delete mode 100644 client/tests/client-ng/simple/main.c delete mode 100644 client/tests/client-ng/simple/work.c delete mode 100644 client/tests/client-ng/simple/work.h delete mode 100644 client/tests/file/Makefile delete mode 100644 client/tests/file/cache/Makefile delete mode 100644 client/tests/file/cache/main.c delete mode 100644 client/tests/file/inv/Makefile delete mode 100644 client/tests/file/inv/main.c delete mode 100644 client/tests/hashtable/Makefile delete mode 100644 client/tests/hashtable/main.c delete mode 100644 client/tests/json/Makefile delete mode 100644 client/tests/json/striping_policy/Makefile delete mode 100644 client/tests/json/striping_policy/main.c delete mode 100644 client/tests/json/xlocs/Makefile delete mode 100644 client/tests/json/xlocs/main.c delete mode 100644 client/tests/logger/Makefile delete mode 100644 client/tests/logger/main.c delete mode 100644 client/tests/mrc/Makefile delete mode 100644 client/tests/mrc/channel/Makefile delete mode 100644 client/tests/mrc/channel/main.c delete mode 100644 client/tests/mrc/proxy/Makefile delete mode 100644 client/tests/mrc/proxy/main.c delete mode 100644 client/tests/osd/Makefile delete mode 100644 client/tests/osd/channel/Makefile delete mode 100644 client/tests/osd/channel/main.c delete mode 100644 client/tests/pseudocomm/Makefile delete mode 100644 client/tests/pseudocomm/main.c delete mode 100644 client/tests/radix-tree/Makefile delete mode 100644 client/tests/radix-tree/simple/Makefile delete mode 100644 client/tests/radix-tree/simple/main.c delete mode 100755 client/tests/suite/createFiles.sh delete mode 100755 client/tests/suite/ddwrite.sh delete mode 100644 client/tests/suite/ltp_fs/Makefile delete mode 100644 client/tests/suite/ltp_fs/include/dataascii.h delete mode 100644 client/tests/suite/ltp_fs/include/databin.h delete mode 100644 client/tests/suite/ltp_fs/include/file_lock.h delete mode 100644 client/tests/suite/ltp_fs/include/forker.h delete mode 100644 client/tests/suite/ltp_fs/include/open_flags.h delete mode 100644 client/tests/suite/ltp_fs/include/pattern.h delete mode 100644 client/tests/suite/ltp_fs/include/random_range.h delete mode 100644 client/tests/suite/ltp_fs/include/rmobj.h delete mode 100644 client/tests/suite/ltp_fs/include/search_path.h delete mode 100644 client/tests/suite/ltp_fs/include/str_to_bytes.h delete mode 100644 client/tests/suite/ltp_fs/include/string_to_tokens.h delete mode 100644 client/tests/suite/ltp_fs/include/test.h delete mode 100644 client/tests/suite/ltp_fs/include/tlibio.h delete mode 100644 client/tests/suite/ltp_fs/include/usctest.h delete mode 100644 client/tests/suite/ltp_fs/include/write_log.h delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/Makefile delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/acl/tacl_xattr.sh delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/acls/Makefile delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/acls/acl_file_test.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/acls/acl_link_test.c delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/acls/acl_test01 delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/doio/Makefile delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/doio/README delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/doio/doio.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/doio/doio.h delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/doio/growfiles.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/doio/iogen.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/doio/rwtest.sh delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fs-bench/Makefile delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fs-bench/README delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fs-bench/boxmuler.c delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/fs-bench/cr delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fs-bench/create-files.c delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/fs-bench/modaltr.sh delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/fs-bench/ra delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/fs-bench/radc delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fs-bench/random-access.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fs-bench/random-del-create.c delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/fs-bench/test.sh delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/fs-bench/test2.sh delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fs_di/Makefile delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fs_di/create_datafile.c delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/fs_di/fs_di delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fs_inod/Makefile delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/fs_inod/fs_inod delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fs_inod/fs_inod_readme.txt delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fs_perms/Makefile delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fs_perms/fs_perms.c delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/fs_perms/simpletest.sh delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fs_perms/testx.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fsstress/Makefile delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fsstress/fsstress.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fsstress/global.h delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/fsstress/xfscompat.h delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/ftest/Makefile delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/ftest/ftest01.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/ftest/ftest02.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/ftest/ftest03.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/ftest/ftest04.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/ftest/ftest05.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/ftest/ftest06.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/ftest/ftest07.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/ftest/ftest08.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/inode/Makefile delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/inode/inode01.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/inode/inode02.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/lftest/Makefile delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/lftest/lftest.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/linktest/Makefile delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/linktest/README delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/linktest/linktest.pl delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/openfile/Makefile delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/openfile/openfile.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/racer/Makefile delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/racer/dir_create.sh delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/racer/dir_test.sh delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/racer/file_concat.sh delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/racer/file_create.sh delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/racer/file_link.sh delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/racer/file_list.sh delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/racer/file_rename.sh delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/racer/file_rm.sh delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/racer/file_symlink.sh delete mode 100755 client/tests/suite/ltp_fs/kernel_fs/racer/racer.sh delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/stream/Makefile delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/stream/stream01.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/stream/stream02.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/stream/stream03.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/stream/stream04.c delete mode 100644 client/tests/suite/ltp_fs/kernel_fs/stream/stream05.c delete mode 100644 client/tests/suite/ltp_fs/lib/Makefile delete mode 100644 client/tests/suite/ltp_fs/lib/dataascii.c delete mode 100644 client/tests/suite/ltp_fs/lib/databin.c delete mode 100644 client/tests/suite/ltp_fs/lib/datapid.c delete mode 100644 client/tests/suite/ltp_fs/lib/file_lock.c delete mode 100644 client/tests/suite/ltp_fs/lib/forker.c delete mode 100644 client/tests/suite/ltp_fs/lib/get_high_address.c delete mode 100644 client/tests/suite/ltp_fs/lib/open_flags.c delete mode 100644 client/tests/suite/ltp_fs/lib/parse_opts.c delete mode 100644 client/tests/suite/ltp_fs/lib/pattern.c delete mode 100644 client/tests/suite/ltp_fs/lib/random_range.c delete mode 100644 client/tests/suite/ltp_fs/lib/rmobj.c delete mode 100644 client/tests/suite/ltp_fs/lib/search_path.c delete mode 100644 client/tests/suite/ltp_fs/lib/self_exec.c delete mode 100644 client/tests/suite/ltp_fs/lib/str_to_bytes.c delete mode 100644 client/tests/suite/ltp_fs/lib/string_to_tokens.c delete mode 100644 client/tests/suite/ltp_fs/lib/tlibio.c delete mode 100644 client/tests/suite/ltp_fs/lib/tst_cwd_has_free.c delete mode 100644 client/tests/suite/ltp_fs/lib/tst_is_cwd_tmpfs.c delete mode 100644 client/tests/suite/ltp_fs/lib/tst_kvercmp.c delete mode 100644 client/tests/suite/ltp_fs/lib/tst_res.c delete mode 100644 client/tests/suite/ltp_fs/lib/tst_sig.c delete mode 100644 client/tests/suite/ltp_fs/lib/tst_tmpdir.c delete mode 100644 client/tests/suite/ltp_fs/lib/write_log.c delete mode 100755 client/tests/suite/marked_block.pl delete mode 100755 client/tests/suite/marked_loop.sh delete mode 100644 client/tests/thread_pool/Makefile delete mode 100644 client/tests/thread_pool/main.c delete mode 100644 client/tools/Makefile delete mode 100644 client/tools/addrepl.c delete mode 100644 client/tools/lsvol.c delete mode 100644 client/tools/mkvol.c delete mode 100644 client/tools/mount.xtreemfs.c delete mode 100644 client/tools/rmvol.c delete mode 100644 client/tools/tool_utils.c delete mode 100644 client/tools/tool_utils.h delete mode 100644 client/tools/xtfs_stat.c diff --git a/client/.cproject b/client/.cproject deleted file mode 100644 index 333290c7a..000000000 --- a/client/.cproject +++ /dev/null @@ -1,213 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/client/.project b/client/.project deleted file mode 100644 index 0083c5ae6..000000000 --- a/client/.project +++ /dev/null @@ -1,77 +0,0 @@ - - - client - - - - - - org.eclipse.cdt.managedbuilder.core.genmakebuilder - clean,full,incremental, - - - ?name? - - - - org.eclipse.cdt.make.core.append_environment - true - - - org.eclipse.cdt.make.core.autoBuildTarget - all - - - org.eclipse.cdt.make.core.buildArguments - - - - org.eclipse.cdt.make.core.buildCommand - make - - - org.eclipse.cdt.make.core.cleanBuildTarget - clean - - - org.eclipse.cdt.make.core.contents - org.eclipse.cdt.make.core.activeConfigSettings - - - org.eclipse.cdt.make.core.enableAutoBuild - false - - - org.eclipse.cdt.make.core.enableCleanBuild - true - - - org.eclipse.cdt.make.core.enableFullBuild - true - - - org.eclipse.cdt.make.core.fullBuildTarget - all - - - org.eclipse.cdt.make.core.stopOnError - true - - - org.eclipse.cdt.make.core.useDefaultBuildCmd - true - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.core.cnature - - diff --git a/client/AUTHORS b/client/AUTHORS deleted file mode 100644 index e69de29bb..000000000 diff --git a/client/COPYING b/client/COPYING deleted file mode 100644 index 5b6e7c66c..000000000 --- a/client/COPYING +++ /dev/null @@ -1,340 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) 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 -this service 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 make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. 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. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -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 -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE 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. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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 - - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/client/ChangeLog b/client/ChangeLog deleted file mode 100644 index e69de29bb..000000000 diff --git a/client/Doxyfile b/client/Doxyfile deleted file mode 100644 index c9dcad8f2..000000000 --- a/client/Doxyfile +++ /dev/null @@ -1,1475 +0,0 @@ -# Doxyfile 1.5.6 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all -# text before the first occurrence of this tag. Doxygen uses libiconv (or the -# iconv built into libc) for the transcoding. See -# http://www.gnu.org/software/libiconv for the list of possible encodings. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = "XtreemFS Access Layer" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = docs/refman - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of -# source files, where putting all generated files in the same directory would -# otherwise cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, -# Croatian, Czech, Danish, Dutch, Farsi, Finnish, French, German, Greek, -# Hungarian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, Polish, -# Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, Swedish, -# and Ukrainian. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is -# used as the annotated text. Otherwise, the brief description is used as-is. -# If left blank, the following values are used ("$name" is automatically -# replaced with the name of the entity): "The $name class" "The $name widget" -# "The $name file" "is" "provides" "specifies" "contains" -# "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = "The $name class" \ - "The $name widget" \ - "The $name file" \ - is \ - provides \ - specifies \ - contains \ - represents \ - a \ - an \ - the - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = /home/mhess/tests/neon_and_json-c/ - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like regular Qt-style comments -# (thus requiring an explicit @brief command for a brief description.) - -JAVADOC_AUTOBRIEF = YES - -# If the QT_AUTOBRIEF tag is set to YES then Doxygen will -# interpret the first line (until the first dot) of a Qt-style -# comment as the brief description. If set to NO, the comments -# will behave just like regular Qt-style comments (thus requiring -# an explicit \brief command for a brief description.) - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce -# a new page for each member. If set to NO, the documentation of a member will -# be part of the file/class/namespace that contains it. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C -# sources only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java -# sources only. Doxygen will then generate output that is more tailored for -# Java. For instance, namespaces will be presented as packages, qualified -# scopes will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources only. Doxygen will then generate output that is more tailored for -# Fortran. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for -# VHDL. - -OPTIMIZE_OUTPUT_VHDL = NO - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should -# set this tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. -# func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. -# Doxygen will parse them like normal C++ but will assume all classes use public -# instead of private inheritance when no explicit protection keyword is present. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate getter -# and setter methods for a property. Setting this option to YES (the default) -# will make doxygen to replace the get and set methods by a property in the -# documentation. This will only work if the methods are indeed getting or -# setting a simple type. If this is not the case, or you want to show the -# methods anyway, you should set this option to NO. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum -# is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically -# be useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. - -TYPEDEF_HIDES_STRUCT = NO - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = YES - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = YES - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = YES - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base -# name of the file that contains the anonymous namespace. By default -# anonymous namespace are hidden. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = YES - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = YES - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the -# hierarchy of group names into alphabetical order. If set to NO (the default) -# the group names will appear in their defined order. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -# If the sources in your project are distributed over multiple directories -# then setting the SHOW_DIRECTORIES tag to YES will show the directory hierarchy -# in the documentation. The default is NO. - -SHOW_DIRECTORIES = NO - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. -# This will remove the Files entry from the Quick Index and from the -# Folder Tree View (if specified). The default is YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the -# Namespaces page. This will remove the Namespaces entry from the Quick Index -# and from the Folder Tree View (if specified). The default is YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command , where is the value of -# the FILE_VERSION_FILTER tag, and is the name of an input file -# provided by doxygen. Whatever the program writes to standard output -# is used as the file version. See the manual for examples. - -FILE_VERSION_FILTER = svnversion - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be abled to get warnings for -# functions that are documented, but have no documentation for their parameters -# or return value. If set to NO (the default) doxygen will only warn about -# wrong or incomplete parameter documentation, but not about the absence of -# documentation. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. Optionally the format may contain -# $version, which will be replaced by the version of the file (if it could -# be obtained via FILE_VERSION_FILTER) - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = /home/mhess/tests/neon_and_json-c/src - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is -# also the default input encoding. Doxygen uses libiconv (or the iconv built -# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for -# the list of possible encodings. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx -# *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.py *.f90 - -FILE_PATTERNS = *.c \ - *.cc \ - *.cxx \ - *.cpp \ - *.c++ \ - *.d \ - *.java \ - *.ii \ - *.ixx \ - *.ipp \ - *.i++ \ - *.inl \ - *.h \ - *.hh \ - *.hxx \ - *.hpp \ - *.h++ \ - *.idl \ - *.odl \ - *.cs \ - *.php \ - *.php3 \ - *.inc \ - *.m \ - *.mm \ - *.dox \ - *.py \ - *.C \ - *.CC \ - *.C++ \ - *.II \ - *.I++ \ - *.H \ - *.HH \ - *.H++ \ - *.CS \ - *.PHP \ - *.PHP3 \ - *.M \ - *.MM \ - *.PY \ - *.C \ - *.H \ - *.tlh \ - *.diff \ - *.patch \ - *.moc \ - *.xpm \ - *.dox - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or -# directories that are symbolic links (a Unix filesystem feature) are excluded -# from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. Note that the wildcards are matched -# against the file with absolute path, so to exclude all test directories -# for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = * - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = YES - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = YES - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) -# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from -# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will -# link to the source code. Otherwise they will link to the documentstion. - -REFERENCES_LINK_SOURCE = YES - -# If the USE_HTAGS tag is set to YES then the references to source code -# will point to the HTML generated by the htags(1) tool instead of doxygen -# built-in source browser. The htags tool is part of GNU's global source -# tagging system (see http://www.gnu.org/software/global/global.html). You -# will need version 4.8.6 or higher. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = YES - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_DOCSET tag is set to YES, additional index files -# will be generated that can be used as input for Apple's Xcode 3 -# integrated development environment, introduced with OSX 10.5 (Leopard). -# To create a documentation set, doxygen will generate a Makefile in the -# HTML output directory. Running make will produce the docset in that -# directory and running "make install" will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find -# it at startup. - -GENERATE_DOCSET = NO - -# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the -# feed. A documentation feed provides an umbrella under which multiple -# documentation sets from a single provider (such as a company or product suite) -# can be grouped. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that -# should uniquely identify the documentation set bundle. This should be a -# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen -# will append .docset to the name. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. For this to work a browser that supports -# JavaScript and DHTML is required (for instance Mozilla 1.0+, Firefox -# Netscape 6.0+, Internet explorer 5.0+, Konqueror, or Safari). - -HTML_DYNAMIC_SECTIONS = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING -# is used to encode HtmlHelp index (hhk), content (hhc) and project file -# content. - -CHM_INDEX_ENCODING = - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. -# If the tag value is set to FRAME, a side panel will be generated -# containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. Other possible values -# for this tag are: HIERARCHIES, which will generate the Groups, Directories, -# and Class Hiererachy pages using a tree view instead of an ordered list; -# ALL, which combines the behavior of FRAME and HIERARCHIES; and NONE, which -# disables this behavior completely. For backwards compatibility with previous -# releases of Doxygen, the values YES and NO are equivalent to FRAME and NONE -# respectively. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -# Use this tag to change the font size of Latex formulas included -# as images in the HTML documentation. The default is 10. Note that -# when you change the font size after a successful doxygen run you need -# to manually remove any form_*.png images from the HTML output directory -# to force them to be regenerated. - -FORMULA_FONTSIZE = 10 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = YES - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = YES - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = YES - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_DEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. To prevent a macro definition from being -# undefined via #undef or recursively expanded use the := operator -# instead of the = operator. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse -# the parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = access_layer.tag - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base -# or super classes. Setting the tag to NO turns the diagrams off. Note that -# this option is superseded by the HAVE_DOT option below. This is only a -# fallback. It is recommended to install and use dot, since it yields more -# powerful graphs. - -CLASS_DIAGRAMS = YES - -# You can define message sequence charts within doxygen comments using the \msc -# command. Doxygen will then run the mscgen tool (see -# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the -# documentation. The MSCGEN_PATH tag allows you to specify the directory where -# the mscgen tool resides. If left empty the tool is assumed to be found in the -# default search path. - -MSCGEN_PATH = - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = NO - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = YES - -# By default doxygen will write a font called FreeSans.ttf to the output -# directory and reference it in all dot files that doxygen generates. This -# font does not include all possible unicode characters however, so when you need -# these (or just want a differently looking font) you can specify the font name -# using DOT_FONTNAME. You need need to make sure dot is able to find the font, -# which can be done by putting it in a standard location or by setting the -# DOTFONTPATH environment variable or by setting DOT_FONTPATH to the directory -# containing the font. - -DOT_FONTNAME = FreeSans - -# By default doxygen will tell dot to use the output directory to look for the -# FreeSans.ttf font (which doxygen will put there itself). If you specify a -# different font using DOT_FONTNAME you can set the path where dot -# can find it using this tag. - -DOT_FONTPATH = - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for groups, showing the direct groups dependencies - -GROUP_GRAPHS = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = YES - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT options are set to YES then -# doxygen will generate a call dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable call graphs -# for selected functions only using the \callgraph command. - -CALL_GRAPH = YES - -# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then -# doxygen will generate a caller dependency graph for every global function -# or class method. Note that enabling this option will significantly increase -# the time of a run. So in most cases it will be better to enable caller -# graphs for selected functions only using the \callergraph command. - -CALLER_GRAPH = YES - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# If the DIRECTORY_GRAPH, SHOW_DIRECTORIES and HAVE_DOT tags are set to YES -# then doxygen will show the dependencies a directory has on other directories -# in a graphical way. The dependency relations are determined by the #include -# relations between the files in the directories. - -DIRECTORY_GRAPH = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found in the path. - -DOT_PATH = /usr/bin/dot - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of -# nodes that will be shown in the graph. If the number of nodes in a graph -# becomes larger than this value, doxygen will truncate the graph, which is -# visualized by representing a node as a red box. Note that doxygen if the -# number of direct children of the root node in a graph is already larger than -# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note -# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. - -DOT_GRAPH_MAX_NODES = 50 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes -# that lay further from the root node will be omitted. Note that setting this -# option to 1 or 2 may greatly reduce the computation time needed for large -# code bases. Also note that the size of a graph can be further restricted by -# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. - -MAX_DOT_GRAPH_DEPTH = 1000 - -# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent -# background. This is enabled by default, which results in a transparent -# background. Warning: Depending on the platform used, enabling this option -# may lead to badly anti-aliased labels on the edges of a graph (i.e. they -# become hard to read). - -DOT_TRANSPARENT = NO - -# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output -# files in one run (i.e. multiple -o and -T options on the command line). This -# makes dot run faster, but since only newer versions of dot (>1.8.10) -# support this, this feature is disabled by default. - -DOT_MULTI_TARGETS = NO - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/client/Makefile b/client/Makefile deleted file mode 100644 index 1f4a463c1..000000000 --- a/client/Makefile +++ /dev/null @@ -1,103 +0,0 @@ -# Copyright (c) 2007, 2008 Matthias Hess, Erich Focht -# This file is part of XtreemFS. -# -# XtreemFS is part of XtreemOS, a Linux-based Grid Operating -# System, see for more details. The -# XtreemOS project has been developed with the financial support -# of the European Commission's IST program under contract -# #FP6-033576. -# -# XtreemFS 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. -# -# XtreemFS 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 XtreemFS. If not, see . - - -TOPDIR = $(shell pwd) -export TOPDIR --include make.config - -XTFS_BINDIR = $(shell pwd)/bin -export XTFS_BINDIR - -TARGETS = client tools tests json neon -.PHONY: clean distclean - -all: $(TARGETS) - -clean: $(patsubst %,%_clean,$(TARGETS)) - -distclean: $(patsubst %,%_distclean,$(TARGETS)) - - -.PHONY: client client_clean client_distclean -client: json neon - $(MAKE) -C src all || exit 1; -client_clean: - $(MAKE) -C src clean || exit 1; -client_distclean: - $(MAKE) -C src distclean || exit 1; - - -.PHONY: tools tools_clean tools_distclean -tools: json neon - $(MAKE) -C tools all || exit 1; -tools_clean: - $(MAKE) -C tools clean || exit 1; -tools_distclean: - $(MAKE) -C tools distclean || exit 1; - - -.PHONY: tests tests_clean tests_distclean -tests: json neon - $(MAKE) -C tests all || exit 1; -tests_clean: - $(MAKE) -C tests clean || exit 1; -tests_distclean: - $(MAKE) -C tests distclean || exit 1; - -.PHONY: docs -docs: - doxygen - -### JSON library targets - -.PHONY: json json_clean json_distclean -$(JSON_LIBDIR)/libjson.a: - cd $(JSON_BASEDIR) && \ - ./configure && \ - make || exit 1 -json: $(JSON_LIBDIR)/libjson.a -json_clean: - $(MAKE) -C $(JSON_BASEDIR) clean || exit 1 -json_distclean: - $(MAKE) -C $(JSON_BASEDIR) distclean || exit 1 - -### NEON library targets - -.PHONY: neon neon_clean neon_distclean -$(NEON_LIBDIR)/libneon.a: - cd $(NEON_BASEDIR) && \ - ./configure --with-ssl=openssl \ - --without-libxml2 \ - --without-expat \ - --disable-webdav \ - --enable-threadsafe-ssl=posix \ - CFLAGS="-O3 -funroll-loops $(CC_FLAGS)" && \ - make || exit 1 -neon: $(NEON_LIBDIR)/libneon.a -neon_clean: - $(MAKE) -C $(NEON_BASEDIR) clean || exit 1 -neon_distclean: - $(MAKE) -C $(NEON_BASEDIR) distclean || exit 1 - - - diff --git a/client/Makefile.am b/client/Makefile.am deleted file mode 100644 index af437a64d..000000000 --- a/client/Makefile.am +++ /dev/null @@ -1 +0,0 @@ -SUBDIRS = src diff --git a/client/NEWS b/client/NEWS deleted file mode 100644 index e69de29bb..000000000 diff --git a/client/README b/client/README deleted file mode 100644 index e69de29bb..000000000 diff --git a/client/bin/xtfs_showmount b/client/bin/xtfs_showmount deleted file mode 100755 index ab3c818dd..000000000 --- a/client/bin/xtfs_showmount +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -# a simple wrapper around mount + grep - -mount | grep 'xtfs_mount' \ No newline at end of file diff --git a/client/bin/xtfs_umount b/client/bin/xtfs_umount deleted file mode 100755 index 10e91b924..000000000 --- a/client/bin/xtfs_umount +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash -# a simple wrapper around fusermount -u - -if [ $# -ne 1 ] -then - echo "usage: xtfs_umount " - echo "" - exit 1 -fi - -fusermount -u $1 -exit $? \ No newline at end of file diff --git a/client/bootstrap.sh b/client/bootstrap.sh deleted file mode 100755 index 41376f040..000000000 --- a/client/bootstrap.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh - -libtoolize --force -automake --add-missing -aclocal -autoconf - diff --git a/client/config.h.in b/client/config.h.in deleted file mode 100644 index e69de29bb..000000000 diff --git a/client/configure.ac b/client/configure.ac deleted file mode 100644 index 8caaa96f4..000000000 --- a/client/configure.ac +++ /dev/null @@ -1,82 +0,0 @@ -# -*- Autoconf -*- -# Process this file with autoconf to produce a configure script. - -AC_PREREQ(2.61) -AC_INIT(XtreemFS Access Layer, 0.1, efocht@hpce.nec.com) -AM_INIT_AUTOMAKE -# AC_CONFIG_AUX_DIR([]) -AC_CONFIG_SRCDIR([src]) -AC_CONFIG_HEADER([config.h]) - -# Checks for programs. -AC_PROG_CXX -AC_PROG_AWK -AC_PROG_CC -AC_PROG_INSTALL -AC_PROG_LN_S -AC_PROG_MAKE_SET -AC_PROG_LIBTOOL -AM_PROG_CC_C_O - -# Checks for libraries. -# FIXME: Replace `main' with a function in `-lltp': -AC_CHECK_LIB([ltp], [main]) -# FIXME: Replace `main' with a function in `-lm': -AC_CHECK_LIB([m], [main]) -# FIXME: Replace `main' with a function in `-lpthread': -AC_CHECK_LIB([pthread], [main]) -# FIXME: Replace `main' with a function in `-lxtreemfs': -AC_CHECK_LIB([xtreemfs], [main]) - -# Checks for header files. -AC_HEADER_DIRENT -AC_HEADER_STDC -AC_HEADER_SYS_WAIT -AC_CHECK_HEADERS([fcntl.h inttypes.h limits.h malloc.h netdb.h netinet/in.h stddef.h stdint.h stdlib.h string.h sys/file.h sys/ioctl.h sys/mount.h sys/param.h sys/socket.h sys/statvfs.h sys/time.h sys/vfs.h syslog.h unistd.h]) - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_UID_T -AC_C_INLINE -AC_TYPE_INT64_T -AC_TYPE_MODE_T -AC_TYPE_OFF_T -AC_TYPE_PID_T -AC_TYPE_SIZE_T -AC_TYPE_SSIZE_T -AC_CHECK_MEMBERS([struct stat.st_blksize]) -AC_STRUCT_ST_BLOCKS -AC_HEADER_TIME -AC_STRUCT_TM -AC_TYPE_UINT16_T -AC_TYPE_UINT64_T -AC_C_VOLATILE -AC_CHECK_TYPES([ptrdiff_t]) - -# Checks for library functions. -AC_FUNC_CHOWN -AC_FUNC_CLOSEDIR_VOID -AC_FUNC_FORK -AC_FUNC_FSEEKO -AC_FUNC_GETPGRP -AC_PROG_GCC_TRADITIONAL -AC_FUNC_LSTAT -AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK -AC_FUNC_MALLOC -AC_FUNC_MEMCMP -AC_FUNC_MMAP -AC_FUNC_REALLOC -AC_FUNC_SELECT_ARGTYPES -AC_FUNC_SETPGRP -AC_TYPE_SIGNAL -AC_FUNC_STAT -AC_FUNC_STRFTIME -AC_FUNC_VPRINTF -AC_CHECK_FUNCS([alarm fdatasync ftruncate getcwd gethostbyname gethostname getpagesize gettimeofday lchown memmove memset mkdir mkfifo munmap rmdir select socket sqrt strcasecmp strchr strdup strerror strndup strrchr strstr strtol strtoul uname]) - -AC_CONFIG_FILES([Makefile - src/Makefile -]) -AC_CONFIG_SUBDIRS([json-c-0.7 - neon-0.26.3]) -AC_OUTPUT diff --git a/client/json-c-0.7/AUTHORS b/client/json-c-0.7/AUTHORS deleted file mode 100644 index 38f2ce02a..000000000 --- a/client/json-c-0.7/AUTHORS +++ /dev/null @@ -1,2 +0,0 @@ -Michael Clark -C. Watford (christopher.watford@gmail.com) diff --git a/client/json-c-0.7/COPYING b/client/json-c-0.7/COPYING deleted file mode 100644 index f8ff2e196..000000000 --- a/client/json-c-0.7/COPYING +++ /dev/null @@ -1,19 +0,0 @@ -Copyright (c) 2004, 2005 Metaparadigm Pte Ltd - -Permission is hereby granted, free of charge, to any person obtaining a -copy of this software and associated documentation files (the "Software"), -to deal in the Software without restriction, including without limitation -the rights to use, copy, modify, merge, publish, distribute, sublicense, -and/or sell copies of the Software, and to permit persons to whom the -Software is furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included -in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -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. diff --git a/client/json-c-0.7/ChangeLog b/client/json-c-0.7/ChangeLog deleted file mode 100644 index 1523c6cea..000000000 --- a/client/json-c-0.7/ChangeLog +++ /dev/null @@ -1,61 +0,0 @@ -0.7 - * Add escaping of backslash to json output - * Add escaping of foward slash on tokenizing and output - * Changes to internal tokenizer from using recursion to - using a depth state structure to allow incremental parsing - -0.6 - * Fix bug in escaping of control characters - Johan Bjrklund, johbjo09 at kth dot se - * Remove include "config.h" from headers (should only - be included from .c files) - Michael Clark - -0.5 - * Make headers C++ compatible by change *this to *obj - * Add ifdef C++ extern "C" to headers - * Use simpler definition of min and max in bits.h - Larry Lansing, llansing at fuzzynerd dot com - - * Remove automake 1.6 requirement - * Move autogen commands into autogen.sh. Update README - * Remove error pointer special case for Windows - * Change license from LGPL to MIT - Michael Clark - -0.4 - * Fix additional error case in object parsing - * Add back sign reversal in nested object parse as error pointer - value is negative, while error value is positive. - Michael Clark - -0.3 - * fix pointer arithmetic bug for error pointer check in is_error() macro - * fix type passed to printbuf_memappend in json_tokener - * update autotools bootstrap instructions in README - Michael Clark - -0.2 - * printbuf.c - C. Watford (christopher.watford@gmail.com) - Added a Win32/Win64 compliant implementation of vasprintf - * debug.c - C. Watford (christopher.watford@gmail.com) - Removed usage of vsyslog on Win32/Win64 systems, needs to be handled - by a configure script - * json_object.c - C. Watford (christopher.watford@gmail.com) - Added scope operator to wrap usage of json_object_object_foreach, this - needs to be rethought to be more ANSI C friendly - * json_object.h - C. Watford (christopher.watford@gmail.com) - Added Microsoft C friendly version of json_object_object_foreach - * json_tokener.c - C. Watford (christopher.watford@gmail.com) - Added a Win32/Win64 compliant implementation of strndup - * json_util.c - C. Watford (christopher.watford@gmail.com) - Added cast and mask to suffice size_t v. unsigned int conversion - correctness - * json_tokener.c - sign reversal issue on error info for nested object parse - spotted by Johan Bjrklund (johbjo09 at kth.se) - * json_object.c - escape " in json_escape_str - * Change to automake and libtool to build shared and static library - Michael Clark - -0.1 - * initial release diff --git a/client/json-c-0.7/Doxyfile b/client/json-c-0.7/Doxyfile deleted file mode 100644 index 7e5f306df..000000000 --- a/client/json-c-0.7/Doxyfile +++ /dev/null @@ -1,1153 +0,0 @@ -# Doxyfile 1.3.8 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project -# -# All text after a hash (#) is considered a comment and will be ignored -# The format is: -# TAG = value [value, ...] -# For lists items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (" ") - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded -# by quotes) that should identify the project. - -PROJECT_NAME = json-c - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. -# This could be handy for archiving the generated documentation or -# if some version control system is used. - -PROJECT_NUMBER = 0.2 - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) -# base path where the generated documentation will be put. -# If a relative path is entered, it will be relative to the location -# where doxygen was started. If left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create -# 4096 sub-directories (in 2 levels) under the output directory of each output -# format and will distribute the generated files over these directories. -# Enabling this option can be useful when feeding doxygen a huge amount of source -# files, where putting all generated files in the same directory would otherwise -# cause performance problems for the file system. - -CREATE_SUBDIRS = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# The default language is English, other supported languages are: -# Brazilian, Catalan, Chinese, Chinese-Traditional, Croatian, Czech, Danish, -# Dutch, Finnish, French, German, Greek, Hungarian, Italian, Japanese, -# Japanese-en (Japanese with English messages), Korean, Korean-en, Norwegian, -# Polish, Portuguese, Romanian, Russian, Serbian, Slovak, Slovene, Spanish, -# Swedish, and Ukrainian. - -OUTPUT_LANGUAGE = English - -# This tag can be used to specify the encoding used in the generated output. -# The encoding is not always determined by the language that is chosen, -# but also whether or not the output is meant for Windows or non-Windows users. -# In case there is a difference, setting the USE_WINDOWS_ENCODING tag to YES -# forces the Windows encoding (this is the default for the Windows binary), -# whereas setting the tag to NO uses a Unix-style encoding (the default for -# all platforms other than Windows). - -USE_WINDOWS_ENCODING = NO - -# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will -# include brief member descriptions after the members that are listed in -# the file and class documentation (similar to JavaDoc). -# Set to NO to disable this. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend -# the brief description of a member or function before the detailed description. -# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator -# that is used to form the text in various listings. Each string -# in this list, if found as the leading text of the brief description, will be -# stripped from the text and the result after processing the whole list, is used -# as the annotated text. Otherwise, the brief description is used as-is. If left -# blank, the following values are used ("$name" is automatically replaced with the -# name of the entity): "The $name class" "The $name widget" "The $name file" -# "is" "provides" "specifies" "contains" "represents" "a" "an" "the" - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# Doxygen will generate a detailed section even if there is only a brief -# description. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited -# members of a class in the documentation of that class as if those members were -# ordinary class members. Constructors, destructors and assignment operators of -# the base classes will not be shown. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full -# path before files name in the file list and in the header files. If set -# to NO the shortest path that makes the file name unique will be used. - -FULL_PATH_NAMES = YES - -# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag -# can be used to strip a user-defined part of the path. Stripping is -# only done if one of the specified strings matches the left-hand part of -# the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the -# path to strip. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of -# the path mentioned in the documentation of a class, which tells -# the reader which header file to include in order to use a class. -# If left blank only the name of the header file containing the class -# definition is used. Otherwise one should specify the include paths that -# are normally passed to the compiler using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter -# (but less readable) file names. This can be useful is your file systems -# doesn't support long names like on DOS, Mac, or CD-ROM. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen -# will interpret the first line (until the first dot) of a JavaDoc-style -# comment as the brief description. If set to NO, the JavaDoc -# comments will behave just like the Qt-style comments (thus requiring an -# explicit @brief command for a brief description. - -JAVADOC_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen -# treat a multi-line C++ special comment block (i.e. a block of //! or /// -# comments) as a brief description. This used to be the default behaviour. -# The new default is to treat a multi-line C++ comment block as a detailed -# description. Set this tag to YES if you prefer the old behaviour instead. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the DETAILS_AT_TOP tag is set to YES then Doxygen -# will output the detailed description near the top, like JavaDoc. -# If set to NO, the detailed description appears after the member -# documentation. - -DETAILS_AT_TOP = NO - -# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented -# member inherits the documentation from any documented member that it -# re-implements. - -INHERIT_DOCS = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. - -DISTRIBUTE_GROUP_DOC = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. -# Doxygen uses this value to replace tabs by spaces in code fragments. - -TAB_SIZE = 8 - -# This tag can be used to specify a number of aliases that acts -# as commands in the documentation. An alias has the form "name=value". -# For example adding "sideeffect=\par Side Effects:\n" will allow you to -# put the command \sideeffect (or @sideeffect) in the documentation, which -# will result in a user-defined paragraph with heading "Side Effects:". -# You can put \n's in the value part of an alias to insert newlines. - -ALIASES = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. -# For instance, some of the names that are used will be different. The list -# of all members will be omitted, etc. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java sources -# only. Doxygen will then generate output that is more tailored for Java. -# For instance, namespaces will be presented as packages, qualified scopes -# will look different, etc. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the SUBGROUPING tag to YES (the default) to allow class member groups of -# the same type (for instance a group of public functions) to be put as a -# subgroup of that type (e.g. under the Public Functions section). Set it to -# NO to prevent subgrouping. Alternatively, this can be done per class using -# the \nosubgrouping command. - -SUBGROUPING = YES - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. -# Private class members and static file members will be hidden unless -# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class -# will be included in the documentation. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file -# will be included in the documentation. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) -# defined locally in source files will be included in the documentation. -# If set to NO only classes defined in header files are included. - -EXTRACT_LOCAL_CLASSES = NO - -# This flag is only useful for Objective-C code. When set to YES local -# methods, which are defined in the implementation section but not in -# the interface are included in the documentation. -# If set to NO (the default) only methods in the interface are included. - -EXTRACT_LOCAL_METHODS = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all -# undocumented members of documented classes, files or namespaces. -# If set to NO (the default) these members will be included in the -# various overviews, but no documentation section is generated. -# This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. -# If set to NO (the default) these classes will be included in the various -# overviews. This option has no effect if EXTRACT_ALL is enabled. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all -# friend (class|struct|union) declarations. -# If set to NO (the default) these declarations will be included in the -# documentation. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any -# documentation blocks found inside the body of a function. -# If set to NO (the default) these blocks will be appended to the -# function's detailed documentation block. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation -# that is typed after a \internal command is included. If the tag is set -# to NO (the default) then the documentation will be excluded. -# Set it to YES to include the internal documentation. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate -# file names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen -# will show members with their full class and namespace scopes in the -# documentation. If set to YES the scope will be hidden. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen -# will put a list of the files that are included by a file in the documentation -# of that file. - -SHOW_INCLUDE_FILES = NO - -# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] -# is inserted in the documentation for inline members. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen -# will sort the (detailed) documentation of file and class members -# alphabetically by member name. If set to NO the members will appear in -# declaration order. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the -# brief documentation of file, namespace and class members alphabetically -# by member name. If set to NO (the default) the members will appear in -# declaration order. - -SORT_BRIEF_DOCS = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be -# sorted by fully-qualified names, including namespaces. If set to -# NO (the default), the class list will be sorted only by class name, -# not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the -# alphabetical list. - -SORT_BY_SCOPE_NAME = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or -# disable (NO) the todo list. This list is created by putting \todo -# commands in the documentation. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or -# disable (NO) the test list. This list is created by putting \test -# commands in the documentation. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or -# disable (NO) the bug list. This list is created by putting \bug -# commands in the documentation. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or -# disable (NO) the deprecated list. This list is created by putting -# \deprecated commands in the documentation. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional -# documentation sections, marked by \if sectionname ... \endif. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines -# the initial value of a variable or define consists of for it to appear in -# the documentation. If the initializer consists of more lines than specified -# here it will be hidden. Use a value of 0 to hide initializers completely. -# The appearance of the initializer of individual variables and defines in the -# documentation can be controlled using \showinitializer or \hideinitializer -# command in the documentation regardless of this setting. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated -# at the bottom of the documentation of classes and structs. If set to YES the -# list will mention the files that were used to generate the documentation. - -SHOW_USED_FILES = YES - -#--------------------------------------------------------------------------- -# configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated -# by doxygen. Possible values are YES and NO. If left blank NO is used. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated by doxygen. Possible values are YES and NO. If left blank -# NO is used. - -WARNINGS = YES - -# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings -# for undocumented members. If EXTRACT_ALL is set to YES then this flag will -# automatically be disabled. - -WARN_IF_UNDOCUMENTED = YES - -# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some -# parameters in a documented function, or documenting parameters that -# don't exist or using markup commands wrongly. - -WARN_IF_DOC_ERROR = YES - -# The WARN_FORMAT tag determines the format of the warning messages that -# doxygen can produce. The string should contain the $file, $line, and $text -# tags, which will be replaced by the file and line number from which the -# warning originated and the warning text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning -# and error messages should be written. If left blank the output is written -# to stderr. - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag can be used to specify the files and/or directories that contain -# documented source files. You may enter file names like "myfile.cpp" or -# directories like "/usr/src/myproject". Separate the files or directories -# with spaces. - -INPUT = - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank the following patterns are tested: -# *.c *.cc *.cxx *.cpp *.c++ *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh *.hxx *.hpp -# *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm - -FILE_PATTERNS = *.h - -# The RECURSIVE tag can be used to turn specify whether or not subdirectories -# should be searched for input files as well. Possible values are YES and NO. -# If left blank NO is used. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used select whether or not files or directories -# that are symbolic links (a Unix filesystem feature) are excluded from the input. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. - -EXCLUDE_PATTERNS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or -# directories that contain example code fragments that are included (see -# the \include command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp -# and *.h) to filter out the source-files in the directories. If left -# blank all files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude -# commands irrespective of the value of the RECURSIVE tag. -# Possible values are YES and NO. If left blank NO is used. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or -# directories that contain image that are included in the documentation (see -# the \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command , where -# is the value of the INPUT_FILTER tag, and is the name of an -# input file. Doxygen will then use the output that the filter program writes -# to standard output. If FILTER_PATTERNS is specified, this tag will be -# ignored. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: -# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further -# info on how filters are used. If FILTER_PATTERNS is empty, INPUT_FILTER -# is applied to all files. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will be used to filter the input files when producing source -# files to browse (i.e. when SOURCE_BROWSER is set to YES). - -FILTER_SOURCE_FILES = NO - -#--------------------------------------------------------------------------- -# configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will -# be generated. Documented entities will be cross-referenced with these sources. -# Note: To get rid of all source code in the generated output, make sure also -# VERBATIM_HEADERS is set to NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body -# of functions and classes directly in the documentation. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct -# doxygen to hide any special comment blocks from generated source code -# fragments. Normal C and C++ comments will always remain visible. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES (the default) -# then for each documented function all documented -# functions referencing it will be listed. - -REFERENCED_BY_RELATION = YES - -# If the REFERENCES_RELATION tag is set to YES (the default) -# then for each documented function all documented entities -# called/used by that function will be listed. - -REFERENCES_RELATION = YES - -# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen -# will generate a verbatim copy of the header file for each class for -# which an include is specified. Set to NO to disable this. - -VERBATIM_HEADERS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index -# of all compounds will be generated. Enable this if the project -# contains a lot of classes, structs, unions or interfaces. - -ALPHABETICAL_INDEX = NO - -# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then -# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns -# in which this list will be split (can be a number in the range [1..20]) - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all -# classes will be put under the same header in the alphabetical index. -# The IGNORE_PREFIX tag can be used to specify one or more prefixes that -# should be ignored while generating the index headers. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES (the default) Doxygen will -# generate HTML output. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `html' will be used as the default path. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for -# each generated HTML page (for example: .htm,.php,.asp). If it is left blank -# doxygen will generate files with .html extension. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a personal HTML header for -# each generated HTML page. If it is left blank doxygen will generate a -# standard header. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a personal HTML footer for -# each generated HTML page. If it is left blank doxygen will generate a -# standard footer. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading -# style sheet that is used by each HTML page. It can be used to -# fine-tune the look of the HTML output. If the tag is left blank doxygen -# will generate a default style sheet. Note that doxygen will try to copy -# the style sheet file to the HTML output directory, so don't put your own -# stylesheet in the HTML output directory as well, or it will be erased! - -HTML_STYLESHEET = - -# If the HTML_ALIGN_MEMBERS tag is set to YES, the members of classes, -# files or namespaces will be aligned in HTML using tables. If set to -# NO a bullet list will be used. - -HTML_ALIGN_MEMBERS = YES - -# If the GENERATE_HTMLHELP tag is set to YES, additional index files -# will be generated that can be used as input for tools like the -# Microsoft HTML help workshop to generate a compressed HTML help file (.chm) -# of the generated HTML documentation. - -GENERATE_HTMLHELP = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can -# be used to specify the file name of the resulting .chm file. You -# can add a path in front of the file if the result should not be -# written to the html output directory. - -CHM_FILE = - -# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can -# be used to specify the location (absolute path including file name) of -# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run -# the HTML help compiler on the generated index.hhp. - -HHC_LOCATION = - -# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag -# controls if a separate .chi index file is generated (YES) or that -# it should be included in the master .chm file (NO). - -GENERATE_CHI = NO - -# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag -# controls whether a binary table of contents is generated (YES) or a -# normal table of contents (NO) in the .chm file. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members -# to the contents of the HTML help documentation and to the tree view. - -TOC_EXPAND = NO - -# The DISABLE_INDEX tag can be used to turn on/off the condensed index at -# top of each HTML page. The value NO (the default) enables the index and -# the value YES disables it. - -DISABLE_INDEX = NO - -# This tag can be used to set the number of enum values (range [1..20]) -# that doxygen will group on one line in the generated HTML documentation. - -ENUM_VALUES_PER_LINE = 4 - -# If the GENERATE_TREEVIEW tag is set to YES, a side panel will be -# generated containing a tree-like index structure (just like the one that -# is generated for HTML Help). For this to work a browser that supports -# JavaScript, DHTML, CSS and frames is required (for instance Mozilla 1.0+, -# Netscape 6.0+, Internet explorer 5.0+, or Konqueror). Windows users are -# probably better off using the HTML help feature. - -GENERATE_TREEVIEW = NO - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be -# used to set the initial width (in pixels) of the frame in which the tree -# is shown. - -TREEVIEW_WIDTH = 250 - -#--------------------------------------------------------------------------- -# configuration options related to the LaTeX output -#--------------------------------------------------------------------------- - -# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will -# generate Latex output. - -GENERATE_LATEX = NO - -# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `latex' will be used as the default path. - -LATEX_OUTPUT = latex - -# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be -# invoked. If left blank `latex' will be used as the default command name. - -LATEX_CMD_NAME = latex - -# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to -# generate index for LaTeX. If left blank `makeindex' will be used as the -# default command name. - -MAKEINDEX_CMD_NAME = makeindex - -# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact -# LaTeX documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_LATEX = NO - -# The PAPER_TYPE tag can be used to set the paper type that is used -# by the printer. Possible values are: a4, a4wide, letter, legal and -# executive. If left blank a4wide will be used. - -PAPER_TYPE = a4wide - -# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX -# packages that should be included in the LaTeX output. - -EXTRA_PACKAGES = - -# The LATEX_HEADER tag can be used to specify a personal LaTeX header for -# the generated latex document. The header should contain everything until -# the first chapter. If it is left blank doxygen will generate a -# standard header. Notice: only use this tag if you know what you are doing! - -LATEX_HEADER = - -# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated -# is prepared for conversion to pdf (using ps2pdf). The pdf file will -# contain links (just like the HTML output) instead of page references -# This makes the output suitable for online browsing using a pdf viewer. - -PDF_HYPERLINKS = NO - -# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of -# plain latex in the generated Makefile. Set this option to YES to get a -# higher quality PDF documentation. - -USE_PDFLATEX = NO - -# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. -# command to the generated LaTeX files. This will instruct LaTeX to keep -# running if errors occur, instead of asking the user for help. -# This option is also used when generating formulas in HTML. - -LATEX_BATCHMODE = NO - -# If LATEX_HIDE_INDICES is set to YES then doxygen will not -# include the index chapters (such as File Index, Compound Index, etc.) -# in the output. - -LATEX_HIDE_INDICES = NO - -#--------------------------------------------------------------------------- -# configuration options related to the RTF output -#--------------------------------------------------------------------------- - -# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output -# The RTF output is optimized for Word 97 and may not look very pretty with -# other RTF readers or editors. - -GENERATE_RTF = NO - -# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `rtf' will be used as the default path. - -RTF_OUTPUT = rtf - -# If the COMPACT_RTF tag is set to YES Doxygen generates more compact -# RTF documents. This may be useful for small projects and may help to -# save some trees in general. - -COMPACT_RTF = NO - -# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated -# will contain hyperlink fields. The RTF file will -# contain links (just like the HTML output) instead of page references. -# This makes the output suitable for online browsing using WORD or other -# programs which support those fields. -# Note: wordpad (write) and others do not support links. - -RTF_HYPERLINKS = NO - -# Load stylesheet definitions from file. Syntax is similar to doxygen's -# config file, i.e. a series of assignments. You only have to provide -# replacements, missing definitions are set to their default value. - -RTF_STYLESHEET_FILE = - -# Set optional variables used in the generation of an rtf document. -# Syntax is similar to doxygen's config file. - -RTF_EXTENSIONS_FILE = - -#--------------------------------------------------------------------------- -# configuration options related to the man page output -#--------------------------------------------------------------------------- - -# If the GENERATE_MAN tag is set to YES (the default) Doxygen will -# generate man pages - -GENERATE_MAN = NO - -# The MAN_OUTPUT tag is used to specify where the man pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `man' will be used as the default path. - -MAN_OUTPUT = man - -# The MAN_EXTENSION tag determines the extension that is added to -# the generated man pages (default is the subroutine's section .3) - -MAN_EXTENSION = .3 - -# If the MAN_LINKS tag is set to YES and Doxygen generates man output, -# then it will generate one additional man file for each entity -# documented in the real man page(s). These additional files -# only source the real man page, but without them the man command -# would be unable to find the correct page. The default is NO. - -MAN_LINKS = NO - -#--------------------------------------------------------------------------- -# configuration options related to the XML output -#--------------------------------------------------------------------------- - -# If the GENERATE_XML tag is set to YES Doxygen will -# generate an XML file that captures the structure of -# the code including all documentation. - -GENERATE_XML = NO - -# The XML_OUTPUT tag is used to specify where the XML pages will be put. -# If a relative path is entered the value of OUTPUT_DIRECTORY will be -# put in front of it. If left blank `xml' will be used as the default path. - -XML_OUTPUT = xml - -# The XML_SCHEMA tag can be used to specify an XML schema, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_SCHEMA = - -# The XML_DTD tag can be used to specify an XML DTD, -# which can be used by a validating XML parser to check the -# syntax of the XML files. - -XML_DTD = - -# If the XML_PROGRAMLISTING tag is set to YES Doxygen will -# dump the program listings (including syntax highlighting -# and cross-referencing information) to the XML output. Note that -# enabling this will significantly increase the size of the XML output. - -XML_PROGRAMLISTING = YES - -#--------------------------------------------------------------------------- -# configuration options for the AutoGen Definitions output -#--------------------------------------------------------------------------- - -# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will -# generate an AutoGen Definitions (see autogen.sf.net) file -# that captures the structure of the code including all -# documentation. Note that this feature is still experimental -# and incomplete at the moment. - -GENERATE_AUTOGEN_DEF = NO - -#--------------------------------------------------------------------------- -# configuration options related to the Perl module output -#--------------------------------------------------------------------------- - -# If the GENERATE_PERLMOD tag is set to YES Doxygen will -# generate a Perl module file that captures the structure of -# the code including all documentation. Note that this -# feature is still experimental and incomplete at the -# moment. - -GENERATE_PERLMOD = NO - -# If the PERLMOD_LATEX tag is set to YES Doxygen will generate -# the necessary Makefile rules, Perl scripts and LaTeX code to be able -# to generate PDF and DVI output from the Perl module output. - -PERLMOD_LATEX = NO - -# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be -# nicely formatted so it can be parsed by a human reader. This is useful -# if you want to understand what is going on. On the other hand, if this -# tag is set to NO the size of the Perl module output will be much smaller -# and Perl will parse it just the same. - -PERLMOD_PRETTY = YES - -# The names of the make variables in the generated doxyrules.make file -# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. -# This is useful so different doxyrules.make files included by the same -# Makefile don't overwrite each other's variables. - -PERLMOD_MAKEVAR_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the preprocessor -#--------------------------------------------------------------------------- - -# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will -# evaluate all C-preprocessor directives found in the sources and include -# files. - -ENABLE_PREPROCESSING = YES - -# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro -# names in the source code. If set to NO (the default) only conditional -# compilation will be performed. Macro expansion can be done in a controlled -# way by setting EXPAND_ONLY_PREDEF to YES. - -MACRO_EXPANSION = NO - -# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES -# then the macro expansion is limited to the macros specified with the -# PREDEFINED and EXPAND_AS_PREDEFINED tags. - -EXPAND_ONLY_PREDEF = NO - -# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files -# in the INCLUDE_PATH (see below) will be search if a #include is found. - -SEARCH_INCLUDES = YES - -# The INCLUDE_PATH tag can be used to specify one or more directories that -# contain include files that are not input files but should be processed by -# the preprocessor. - -INCLUDE_PATH = - -# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard -# patterns (like *.h and *.hpp) to filter out the header-files in the -# directories. If left blank, the patterns specified with FILE_PATTERNS will -# be used. - -INCLUDE_FILE_PATTERNS = - -# The PREDEFINED tag can be used to specify one or more macro names that -# are defined before the preprocessor is started (similar to the -D option of -# gcc). The argument of the tag is a list of macros of the form: name -# or name=definition (no spaces). If the definition and the = are -# omitted =1 is assumed. - -PREDEFINED = - -# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then -# this tag can be used to specify a list of macro names that should be expanded. -# The macro definition that is found in the sources will be used. -# Use the PREDEFINED tag if you want to use a different macro definition. - -EXPAND_AS_DEFINED = - -# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then -# doxygen's preprocessor will remove all function-like macros that are alone -# on a line, have an all uppercase name, and do not end with a semicolon. Such -# function macros are typically used for boiler-plate code, and will confuse the -# parser if not removed. - -SKIP_FUNCTION_MACROS = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to external references -#--------------------------------------------------------------------------- - -# The TAGFILES option can be used to specify one or more tagfiles. -# Optionally an initial location of the external documentation -# can be added for each tagfile. The format of a tag file without -# this location is as follows: -# TAGFILES = file1 file2 ... -# Adding location for the tag files is done as follows: -# TAGFILES = file1=loc1 "file2 = loc2" ... -# where "loc1" and "loc2" can be relative or absolute paths or -# URLs. If a location is present for each tag, the installdox tool -# does not have to be run to correct the links. -# Note that each tag file must have a unique name -# (where the name does NOT include the path) -# If a tag file is not located in the directory in which doxygen -# is run, you must also specify the path to the tagfile here. - -TAGFILES = - -# When a file name is specified after GENERATE_TAGFILE, doxygen will create -# a tag file that is based on the input files it reads. - -GENERATE_TAGFILE = - -# If the ALLEXTERNALS tag is set to YES all external classes will be listed -# in the class index. If set to NO only the inherited external classes -# will be listed. - -ALLEXTERNALS = NO - -# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed -# in the modules index. If set to NO, only the current project's groups will -# be listed. - -EXTERNAL_GROUPS = YES - -# The PERL_PATH should be the absolute path and name of the perl script -# interpreter (i.e. the result of `which perl'). - -PERL_PATH = /usr/bin/perl - -#--------------------------------------------------------------------------- -# Configuration options related to the dot tool -#--------------------------------------------------------------------------- - -# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will -# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base or -# super classes. Setting the tag to NO turns the diagrams off. Note that this -# option is superseded by the HAVE_DOT option below. This is only a fallback. It is -# recommended to install and use dot, since it yields more powerful graphs. - -CLASS_DIAGRAMS = YES - -# If set to YES, the inheritance and collaboration graphs will hide -# inheritance and usage relations if the target is undocumented -# or is not a class. - -HIDE_UNDOC_RELATIONS = YES - -# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is -# available from the path. This tool is part of Graphviz, a graph visualization -# toolkit from AT&T and Lucent Bell Labs. The other options in this section -# have no effect if this option is set to NO (the default) - -HAVE_DOT = NO - -# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect inheritance relations. Setting this tag to YES will force the -# the CLASS_DIAGRAMS tag to NO. - -CLASS_GRAPH = YES - -# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen -# will generate a graph for each documented class showing the direct and -# indirect implementation dependencies (inheritance, containment, and -# class references variables) of the class with other documented classes. - -COLLABORATION_GRAPH = YES - -# If the UML_LOOK tag is set to YES doxygen will generate inheritance and -# collaboration diagrams in a style similar to the OMG's Unified Modeling -# Language. - -UML_LOOK = NO - -# If set to YES, the inheritance and collaboration graphs will show the -# relations between templates and their instances. - -TEMPLATE_RELATIONS = NO - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT -# tags are set to YES then doxygen will generate a graph for each documented -# file showing the direct and indirect include dependencies of the file with -# other documented files. - -INCLUDE_GRAPH = YES - -# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and -# HAVE_DOT tags are set to YES then doxygen will generate a graph for each -# documented header file showing the documented files that directly or -# indirectly include this file. - -INCLUDED_BY_GRAPH = YES - -# If the CALL_GRAPH and HAVE_DOT tags are set to YES then doxygen will -# generate a call dependency graph for every global function or class method. -# Note that enabling this option will significantly increase the time of a run. -# So in most cases it will be better to enable call graphs for selected -# functions only using the \callgraph command. - -CALL_GRAPH = NO - -# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen -# will graphical hierarchy of all classes instead of a textual one. - -GRAPHICAL_HIERARCHY = YES - -# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images -# generated by dot. Possible values are png, jpg, or gif -# If left blank png will be used. - -DOT_IMAGE_FORMAT = png - -# The tag DOT_PATH can be used to specify the path where the dot tool can be -# found. If left blank, it is assumed the dot tool can be found on the path. - -DOT_PATH = - -# The DOTFILE_DIRS tag can be used to specify one or more directories that -# contain dot files that are included in the documentation (see the -# \dotfile command). - -DOTFILE_DIRS = - -# The MAX_DOT_GRAPH_WIDTH tag can be used to set the maximum allowed width -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_WIDTH = 1024 - -# The MAX_DOT_GRAPH_HEIGHT tag can be used to set the maximum allows height -# (in pixels) of the graphs generated by dot. If a graph becomes larger than -# this value, doxygen will try to truncate the graph, so that it fits within -# the specified constraint. Beware that most browsers cannot cope with very -# large images. - -MAX_DOT_GRAPH_HEIGHT = 1024 - -# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the -# graphs generated by dot. A depth value of 3 means that only nodes reachable -# from the root by following a path via at most 3 edges will be shown. Nodes that -# lay further from the root node will be omitted. Note that setting this option to -# 1 or 2 may greatly reduce the computation time needed for large code bases. Also -# note that a graph may be further truncated if the graph's image dimensions are -# not sufficient to fit the graph (see MAX_DOT_GRAPH_WIDTH and MAX_DOT_GRAPH_HEIGHT). -# If 0 is used for the depth value (the default), the graph is not depth-constrained. - -MAX_DOT_GRAPH_DEPTH = 0 - -# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will -# generate a legend page explaining the meaning of the various boxes and -# arrows in the dot generated graphs. - -GENERATE_LEGEND = YES - -# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will -# remove the intermediate dot files that are used to generate -# the various graphs. - -DOT_CLEANUP = YES - -#--------------------------------------------------------------------------- -# Configuration::additions related to the search engine -#--------------------------------------------------------------------------- - -# The SEARCHENGINE tag specifies whether or not a search engine should be -# used. If set to NO the values of all tags below this one will be ignored. - -SEARCHENGINE = NO diff --git a/client/json-c-0.7/INSTALL b/client/json-c-0.7/INSTALL deleted file mode 100644 index a4b34144d..000000000 --- a/client/json-c-0.7/INSTALL +++ /dev/null @@ -1,229 +0,0 @@ -Copyright 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software -Foundation, Inc. - - This file is free documentation; the Free Software Foundation gives -unlimited permission to copy, distribute and modify it. - -Basic Installation -================== - - These are generic installation instructions. - - The `configure' shell script attempts to guess correct values for -various system-dependent variables used during compilation. It uses -those values to create a `Makefile' in each directory of the package. -It may also create one or more `.h' files containing system-dependent -definitions. Finally, it creates a shell script `config.status' that -you can run in the future to recreate the current configuration, and a -file `config.log' containing compiler output (useful mainly for -debugging `configure'). - - It can also use an optional file (typically called `config.cache' -and enabled with `--cache-file=config.cache' or simply `-C') that saves -the results of its tests to speed up reconfiguring. (Caching is -disabled by default to prevent problems with accidental use of stale -cache files.) - - If you need to do unusual things to compile the package, please try -to figure out how `configure' could check whether to do them, and mail -diffs or instructions to the address given in the `README' so they can -be considered for the next release. If you are using the cache, and at -some point `config.cache' contains results you don't want to keep, you -may remove or edit it. - - The file `configure.ac' (or `configure.in') is used to create -`configure' by a program called `autoconf'. You only need -`configure.ac' if you want to change it or regenerate `configure' using -a newer version of `autoconf'. - -The simplest way to compile this package is: - - 1. `cd' to the directory containing the package's source code and type - `./configure' to configure the package for your system. If you're - using `csh' on an old version of System V, you might need to type - `sh ./configure' instead to prevent `csh' from trying to execute - `configure' itself. - - Running `configure' takes awhile. While running, it prints some - messages telling which features it is checking for. - - 2. Type `make' to compile the package. - - 3. Optionally, type `make check' to run any self-tests that come with - the package. - - 4. Type `make install' to install the programs and any data files and - documentation. - - 5. You can remove the program binaries and object files from the - source code directory by typing `make clean'. To also remove the - files that `configure' created (so you can compile the package for - a different kind of computer), type `make distclean'. There is - also a `make maintainer-clean' target, but that is intended mainly - for the package's developers. If you use it, you may have to get - all sorts of other programs in order to regenerate files that came - with the distribution. - -Compilers and Options -===================== - - Some systems require unusual options for compilation or linking that -the `configure' script does not know about. Run `./configure --help' -for details on some of the pertinent environment variables. - - You can give `configure' initial values for configuration parameters -by setting variables in the command line or in the environment. Here -is an example: - - ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix - - *Note Defining Variables::, for more details. - -Compiling For Multiple Architectures -==================================== - - You can compile the package for more than one kind of computer at the -same time, by placing the object files for each architecture in their -own directory. To do this, you must use a version of `make' that -supports the `VPATH' variable, such as GNU `make'. `cd' to the -directory where you want the object files and executables to go and run -the `configure' script. `configure' automatically checks for the -source code in the directory that `configure' is in and in `..'. - - If you have to use a `make' that does not support the `VPATH' -variable, you have to compile the package for one architecture at a -time in the source code directory. After you have installed the -package for one architecture, use `make distclean' before reconfiguring -for another architecture. - -Installation Names -================== - - By default, `make install' will install the package's files in -`/usr/local/bin', `/usr/local/man', etc. You can specify an -installation prefix other than `/usr/local' by giving `configure' the -option `--prefix=PATH'. - - You can specify separate installation prefixes for -architecture-specific files and architecture-independent files. If you -give `configure' the option `--exec-prefix=PATH', the package will use -PATH as the prefix for installing programs and libraries. -Documentation and other data files will still use the regular prefix. - - In addition, if you use an unusual directory layout you can give -options like `--bindir=PATH' to specify different values for particular -kinds of files. Run `configure --help' for a list of the directories -you can set and what kinds of files go in them. - - If the package supports it, you can cause programs to be installed -with an extra prefix or suffix on their names by giving `configure' the -option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. - -Optional Features -================= - - Some packages pay attention to `--enable-FEATURE' options to -`configure', where FEATURE indicates an optional part of the package. -They may also pay attention to `--with-PACKAGE' options, where PACKAGE -is something like `gnu-as' or `x' (for the X Window System). The -`README' should mention any `--enable-' and `--with-' options that the -package recognizes. - - For packages that use the X Window System, `configure' can usually -find the X include and library files automatically, but if it doesn't, -you can use the `configure' options `--x-includes=DIR' and -`--x-libraries=DIR' to specify their locations. - -Specifying the System Type -========================== - - There may be some features `configure' cannot figure out -automatically, but needs to determine by the type of machine the package -will run on. Usually, assuming the package is built to be run on the -_same_ architectures, `configure' can figure that out, but if it prints -a message saying it cannot guess the machine type, give it the -`--build=TYPE' option. TYPE can either be a short name for the system -type, such as `sun4', or a canonical name which has the form: - - CPU-COMPANY-SYSTEM - -where SYSTEM can have one of these forms: - - OS KERNEL-OS - - See the file `config.sub' for the possible values of each field. If -`config.sub' isn't included in this package, then this package doesn't -need to know the machine type. - - If you are _building_ compiler tools for cross-compiling, you should -use the `--target=TYPE' option to select the type of system they will -produce code for. - - If you want to _use_ a cross compiler, that generates code for a -platform different from the build platform, you should specify the -"host" platform (i.e., that on which the generated programs will -eventually be run) with `--host=TYPE'. - -Sharing Defaults -================ - - If you want to set default values for `configure' scripts to share, -you can create a site shell script called `config.site' that gives -default values for variables like `CC', `cache_file', and `prefix'. -`configure' looks for `PREFIX/share/config.site' if it exists, then -`PREFIX/etc/config.site' if it exists. Or, you can set the -`CONFIG_SITE' environment variable to the location of the site script. -A warning: not all `configure' scripts look for a site script. - -Defining Variables -================== - - Variables not defined in a site shell script can be set in the -environment passed to `configure'. However, some packages may run -configure again during the build, and the customized values of these -variables may be lost. In order to avoid this problem, you should set -them in the `configure' command line, using `VAR=value'. For example: - - ./configure CC=/usr/local2/bin/gcc - -will cause the specified gcc to be used as the C compiler (unless it is -overridden in the site shell script). - -`configure' Invocation -====================== - - `configure' recognizes the following options to control how it -operates. - -`--help' -`-h' - Print a summary of the options to `configure', and exit. - -`--version' -`-V' - Print the version of Autoconf used to generate the `configure' - script, and exit. - -`--cache-file=FILE' - Enable the cache: use and save the results of the tests in FILE, - traditionally `config.cache'. FILE defaults to `/dev/null' to - disable caching. - -`--config-cache' -`-C' - Alias for `--cache-file=config.cache'. - -`--quiet' -`--silent' -`-q' - Do not print messages saying which checks are being made. To - suppress all normal output, redirect it to `/dev/null' (any error - messages will still be shown). - -`--srcdir=DIR' - Look for the package's source code in directory DIR. Usually - `configure' can determine that directory automatically. - -`configure' also accepts some other, not widely useful, options. Run -`configure --help' for more details. - diff --git a/client/json-c-0.7/Makefile.am b/client/json-c-0.7/Makefile.am deleted file mode 100644 index 98f15533c..000000000 --- a/client/json-c-0.7/Makefile.am +++ /dev/null @@ -1,36 +0,0 @@ -AM_CFLAGS = -Wall -std=gnu99 -D_GNU_SOURCE -D_REENTRANT - -lib_LTLIBRARIES = libjson.la - -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = json.pc - -libjsonincludedir = $(includedir)/json -libjsoninclude_HEADERS = \ - json.h \ - bits.h \ - debug.h \ - linkhash.h \ - arraylist.h \ - json_util.h \ - json_object.h \ - json_tokener.h - -libjson_la_LDFLAGS = -version-info 0:1:0 - -libjson_la_SOURCES = \ - arraylist.c \ - debug.c \ - json_object.c \ - json_tokener.c \ - json_util.c \ - linkhash.c \ - printbuf.c - -check_PROGRAMS = test1 test2 - -test1_SOURCES = test1.c -test1_LDADD = $(lib_LTLIBRARIES) - -test2_SOURCES = test2.c -test2_LDADD = $(lib_LTLIBRARIES) diff --git a/client/json-c-0.7/Makefile.in b/client/json-c-0.7/Makefile.in deleted file mode 100644 index b466b859a..000000000 --- a/client/json-c-0.7/Makefile.in +++ /dev/null @@ -1,714 +0,0 @@ -# Makefile.in generated by automake 1.10 from Makefile.am. -# @configure_input@ - -# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, -# 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This Makefile.in is free software; the Free Software Foundation -# gives unlimited permission to copy and/or distribute it, -# with or without modifications, as long as this notice is preserved. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY, to the extent permitted by law; without -# even the implied warranty of MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. - -@SET_MAKE@ - - - -VPATH = @srcdir@ -pkgdatadir = $(datadir)/@PACKAGE@ -pkglibdir = $(libdir)/@PACKAGE@ -pkgincludedir = $(includedir)/@PACKAGE@ -am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd -install_sh_DATA = $(install_sh) -c -m 644 -install_sh_PROGRAM = $(install_sh) -c -install_sh_SCRIPT = $(install_sh) -c -INSTALL_HEADER = $(INSTALL_DATA) -transform = $(program_transform_name) -NORMAL_INSTALL = : -PRE_INSTALL = : -POST_INSTALL = : -NORMAL_UNINSTALL = : -PRE_UNINSTALL = : -POST_UNINSTALL = : -build_triplet = @build@ -host_triplet = @host@ -check_PROGRAMS = test1$(EXEEXT) test2$(EXEEXT) -subdir = . -DIST_COMMON = README $(am__configure_deps) $(libjsoninclude_HEADERS) \ - $(srcdir)/Makefile.am $(srcdir)/Makefile.in \ - $(srcdir)/config.h.in $(srcdir)/json.pc.in \ - $(top_srcdir)/configure AUTHORS COPYING ChangeLog INSTALL NEWS \ - config.guess config.sub depcomp install-sh ltmain.sh missing \ - mkinstalldirs -ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 -am__aclocal_m4_deps = $(top_srcdir)/configure.in -am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ - $(ACLOCAL_M4) -am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ - configure.lineno config.status.lineno -mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs -CONFIG_HEADER = config.h -CONFIG_CLEAN_FILES = json.pc -am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; -am__vpath_adj = case $$p in \ - $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ - *) f=$$p;; \ - esac; -am__strip_dir = `echo $$p | sed -e 's|^.*/||'`; -am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ - "$(DESTDIR)$(libjsonincludedir)" -libLTLIBRARIES_INSTALL = $(INSTALL) -LTLIBRARIES = $(lib_LTLIBRARIES) -libjson_la_LIBADD = -am_libjson_la_OBJECTS = arraylist.lo debug.lo json_object.lo \ - json_tokener.lo json_util.lo linkhash.lo printbuf.lo -libjson_la_OBJECTS = $(am_libjson_la_OBJECTS) -libjson_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \ - $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ - $(libjson_la_LDFLAGS) $(LDFLAGS) -o $@ -am_test1_OBJECTS = test1.$(OBJEXT) -test1_OBJECTS = $(am_test1_OBJECTS) -test1_DEPENDENCIES = $(lib_LTLIBRARIES) -am_test2_OBJECTS = test2.$(OBJEXT) -test2_OBJECTS = $(am_test2_OBJECTS) -test2_DEPENDENCIES = $(lib_LTLIBRARIES) -DEFAULT_INCLUDES = -I.@am__isrc@ -depcomp = $(SHELL) $(top_srcdir)/depcomp -am__depfiles_maybe = depfiles -COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ - $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -LTCOMPILE = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ - $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -CCLD = $(CC) -LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ - --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) \ - $(LDFLAGS) -o $@ -SOURCES = $(libjson_la_SOURCES) $(test1_SOURCES) $(test2_SOURCES) -DIST_SOURCES = $(libjson_la_SOURCES) $(test1_SOURCES) $(test2_SOURCES) -pkgconfigDATA_INSTALL = $(INSTALL_DATA) -DATA = $(pkgconfig_DATA) -libjsonincludeHEADERS_INSTALL = $(INSTALL_HEADER) -HEADERS = $(libjsoninclude_HEADERS) -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@ -AMTAR = @AMTAR@ -AR = @AR@ -AUTOCONF = @AUTOCONF@ -AUTOHEADER = @AUTOHEADER@ -AUTOMAKE = @AUTOMAKE@ -AWK = @AWK@ -CC = @CC@ -CCDEPMODE = @CCDEPMODE@ -CFLAGS = @CFLAGS@ -CPP = @CPP@ -CPPFLAGS = @CPPFLAGS@ -CXX = @CXX@ -CXXCPP = @CXXCPP@ -CXXDEPMODE = @CXXDEPMODE@ -CXXFLAGS = @CXXFLAGS@ -CYGPATH_W = @CYGPATH_W@ -DEFS = @DEFS@ -DEPDIR = @DEPDIR@ -ECHO = @ECHO@ -ECHO_C = @ECHO_C@ -ECHO_N = @ECHO_N@ -ECHO_T = @ECHO_T@ -EGREP = @EGREP@ -EXEEXT = @EXEEXT@ -F77 = @F77@ -FFLAGS = @FFLAGS@ -GREP = @GREP@ -INSTALL = @INSTALL@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ -LDFLAGS = @LDFLAGS@ -LIBOBJS = @LIBOBJS@ -LIBS = @LIBS@ -LIBTOOL = @LIBTOOL@ -LN_S = @LN_S@ -LTLIBOBJS = @LTLIBOBJS@ -MAKEINFO = @MAKEINFO@ -MKDIR_P = @MKDIR_P@ -OBJEXT = @OBJEXT@ -PACKAGE = @PACKAGE@ -PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ -PACKAGE_NAME = @PACKAGE_NAME@ -PACKAGE_STRING = @PACKAGE_STRING@ -PACKAGE_TARNAME = @PACKAGE_TARNAME@ -PACKAGE_VERSION = @PACKAGE_VERSION@ -PATH_SEPARATOR = @PATH_SEPARATOR@ -RANLIB = @RANLIB@ -SED = @SED@ -SET_MAKE = @SET_MAKE@ -SHELL = @SHELL@ -STRIP = @STRIP@ -VERSION = @VERSION@ -abs_builddir = @abs_builddir@ -abs_srcdir = @abs_srcdir@ -abs_top_builddir = @abs_top_builddir@ -abs_top_srcdir = @abs_top_srcdir@ -ac_ct_CC = @ac_ct_CC@ -ac_ct_CXX = @ac_ct_CXX@ -ac_ct_F77 = @ac_ct_F77@ -am__include = @am__include@ -am__leading_dot = @am__leading_dot@ -am__quote = @am__quote@ -am__tar = @am__tar@ -am__untar = @am__untar@ -bindir = @bindir@ -build = @build@ -build_alias = @build_alias@ -build_cpu = @build_cpu@ -build_os = @build_os@ -build_vendor = @build_vendor@ -builddir = @builddir@ -datadir = @datadir@ -datarootdir = @datarootdir@ -docdir = @docdir@ -dvidir = @dvidir@ -exec_prefix = @exec_prefix@ -host = @host@ -host_alias = @host_alias@ -host_cpu = @host_cpu@ -host_os = @host_os@ -host_vendor = @host_vendor@ -htmldir = @htmldir@ -includedir = @includedir@ -infodir = @infodir@ -install_sh = @install_sh@ -libdir = @libdir@ -libexecdir = @libexecdir@ -localedir = @localedir@ -localstatedir = @localstatedir@ -mandir = @mandir@ -mkdir_p = @mkdir_p@ -oldincludedir = @oldincludedir@ -pdfdir = @pdfdir@ -prefix = @prefix@ -program_transform_name = @program_transform_name@ -psdir = @psdir@ -sbindir = @sbindir@ -sharedstatedir = @sharedstatedir@ -srcdir = @srcdir@ -sysconfdir = @sysconfdir@ -target_alias = @target_alias@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ -AM_CFLAGS = -Wall -std=gnu99 -D_GNU_SOURCE -D_REENTRANT -lib_LTLIBRARIES = libjson.la -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = json.pc -libjsonincludedir = $(includedir)/json -libjsoninclude_HEADERS = \ - json.h \ - bits.h \ - debug.h \ - linkhash.h \ - arraylist.h \ - json_util.h \ - json_object.h \ - json_tokener.h - -libjson_la_LDFLAGS = -version-info 0:1:0 -libjson_la_SOURCES = \ - arraylist.c \ - debug.c \ - json_object.c \ - json_tokener.c \ - json_util.c \ - linkhash.c \ - printbuf.c - -test1_SOURCES = test1.c -test1_LDADD = $(lib_LTLIBRARIES) -test2_SOURCES = test2.c -test2_LDADD = $(lib_LTLIBRARIES) -all: config.h - $(MAKE) $(AM_MAKEFLAGS) all-am - -.SUFFIXES: -.SUFFIXES: .c .lo .o .obj -am--refresh: - @: -$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) - @for dep in $?; do \ - case '$(am__configure_deps)' in \ - *$$dep*) \ - echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \ - cd $(srcdir) && $(AUTOMAKE) --gnu \ - && exit 0; \ - exit 1;; \ - esac; \ - done; \ - echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ - cd $(top_srcdir) && \ - $(AUTOMAKE) --gnu Makefile -.PRECIOUS: Makefile -Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status - @case '$?' in \ - *config.status*) \ - echo ' $(SHELL) ./config.status'; \ - $(SHELL) ./config.status;; \ - *) \ - echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ - cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ - esac; - -$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) - $(SHELL) ./config.status --recheck - -$(top_srcdir)/configure: $(am__configure_deps) - cd $(srcdir) && $(AUTOCONF) -$(ACLOCAL_M4): $(am__aclocal_m4_deps) - cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) - -config.h: stamp-h1 - @if test ! -f $@; then \ - rm -f stamp-h1; \ - $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ - else :; fi - -stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status - @rm -f stamp-h1 - cd $(top_builddir) && $(SHELL) ./config.status config.h -$(srcdir)/config.h.in: $(am__configure_deps) - cd $(top_srcdir) && $(AUTOHEADER) - rm -f stamp-h1 - touch $@ - -distclean-hdr: - -rm -f config.h stamp-h1 -json.pc: $(top_builddir)/config.status $(srcdir)/json.pc.in - cd $(top_builddir) && $(SHELL) ./config.status $@ -install-libLTLIBRARIES: $(lib_LTLIBRARIES) - @$(NORMAL_INSTALL) - test -z "$(libdir)" || $(MKDIR_P) "$(DESTDIR)$(libdir)" - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - if test -f $$p; then \ - f=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \ - $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \ - else :; fi; \ - done - -uninstall-libLTLIBRARIES: - @$(NORMAL_UNINSTALL) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - p=$(am__strip_dir) \ - echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \ - $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \ - done - -clean-libLTLIBRARIES: - -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) - @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ - dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \ - test "$$dir" != "$$p" || dir=.; \ - echo "rm -f \"$${dir}/so_locations\""; \ - rm -f "$${dir}/so_locations"; \ - done -libjson.la: $(libjson_la_OBJECTS) $(libjson_la_DEPENDENCIES) - $(libjson_la_LINK) -rpath $(libdir) $(libjson_la_OBJECTS) $(libjson_la_LIBADD) $(LIBS) - -clean-checkPROGRAMS: - @list='$(check_PROGRAMS)'; for p in $$list; do \ - f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ - echo " rm -f $$p $$f"; \ - rm -f $$p $$f ; \ - done -test1$(EXEEXT): $(test1_OBJECTS) $(test1_DEPENDENCIES) - @rm -f test1$(EXEEXT) - $(LINK) $(test1_OBJECTS) $(test1_LDADD) $(LIBS) -test2$(EXEEXT): $(test2_OBJECTS) $(test2_DEPENDENCIES) - @rm -f test2$(EXEEXT) - $(LINK) $(test2_OBJECTS) $(test2_LDADD) $(LIBS) - -mostlyclean-compile: - -rm -f *.$(OBJEXT) - -distclean-compile: - -rm -f *.tab.c - -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/arraylist.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/debug.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/json_object.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/json_tokener.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/json_util.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/linkhash.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/printbuf.Plo@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test1.Po@am__quote@ -@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test2.Po@am__quote@ - -.c.o: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c $< - -.c.obj: -@am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` - -.c.lo: -@am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< -@am__fastdepCC_TRUE@ mv -f $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Plo -@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ -@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ -@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $< - -mostlyclean-libtool: - -rm -f *.lo - -clean-libtool: - -rm -rf .libs _libs - -distclean-libtool: - -rm -f libtool -install-pkgconfigDATA: $(pkgconfig_DATA) - @$(NORMAL_INSTALL) - test -z "$(pkgconfigdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(pkgconfigDATA_INSTALL) '$$d$$p' '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - $(pkgconfigDATA_INSTALL) "$$d$$p" "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done - -uninstall-pkgconfigDATA: - @$(NORMAL_UNINSTALL) - @list='$(pkgconfig_DATA)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(pkgconfigdir)/$$f'"; \ - rm -f "$(DESTDIR)$(pkgconfigdir)/$$f"; \ - done -install-libjsonincludeHEADERS: $(libjsoninclude_HEADERS) - @$(NORMAL_INSTALL) - test -z "$(libjsonincludedir)" || $(MKDIR_P) "$(DESTDIR)$(libjsonincludedir)" - @list='$(libjsoninclude_HEADERS)'; for p in $$list; do \ - if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ - f=$(am__strip_dir) \ - echo " $(libjsonincludeHEADERS_INSTALL) '$$d$$p' '$(DESTDIR)$(libjsonincludedir)/$$f'"; \ - $(libjsonincludeHEADERS_INSTALL) "$$d$$p" "$(DESTDIR)$(libjsonincludedir)/$$f"; \ - done - -uninstall-libjsonincludeHEADERS: - @$(NORMAL_UNINSTALL) - @list='$(libjsoninclude_HEADERS)'; for p in $$list; do \ - f=$(am__strip_dir) \ - echo " rm -f '$(DESTDIR)$(libjsonincludedir)/$$f'"; \ - rm -f "$(DESTDIR)$(libjsonincludedir)/$$f"; \ - 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: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) config.h.in $(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; }'`; \ - if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \ - test -n "$$unique" || unique=$$empty_fix; \ - $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ - $$tags $$unique; \ - fi -ctags: CTAGS -CTAGS: $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ - $(TAGS_FILES) $(LISP) - tags=; \ - here=`pwd`; \ - list='$(SOURCES) $(HEADERS) config.h.in $(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) - test -d $(distdir) || mkdir $(distdir) - @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ - list='$(DISTFILES)'; \ - dist_files=`for file in $$list; do echo $$file; done | \ - sed -e "s|^$$srcdirstrip/||;t" \ - -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ - case $$dist_files in \ - */*) $(MKDIR_P) `echo "$$dist_files" | \ - sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ - sort -u` ;; \ - esac; \ - for file in $$dist_files; do \ - if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ - if test -d $$d/$$file; then \ - dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ - if test -d $(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 - -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 $(install_sh) -c -m a+r {} {} \; \ - || chmod -R a+r $(distdir) -dist-gzip: distdir - tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz - $(am__remove_distdir) - -dist-bzip2: distdir - tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 - $(am__remove_distdir) - -dist-tarZ: distdir - tardir=$(distdir) && $(am__tar) | 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 - tardir=$(distdir) && $(am__tar) | 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 | $(am__untar) ;;\ - *.tar.bz2*) \ - bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\ - *.tar.Z*) \ - uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ - *.shar.gz*) \ - GZIP=$(GZIP_ENV) gunzip -c $(distdir).shar.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 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$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 - $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) -check: check-am -all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) config.h -installdirs: - for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(libjsonincludedir)"; do \ - test -z "$$dir" || $(MKDIR_P) "$$dir"; \ - done -install: install-am -install-exec: install-exec-am -install-data: install-data-am -uninstall: uninstall-am - -install-am: all-am - @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am - -installcheck: installcheck-am -install-strip: - $(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: - -test -z "$(CONFIG_CLEAN_FILES)" || 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-am - -clean-am: clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool mostlyclean-am - -distclean: distclean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf ./$(DEPDIR) - -rm -f Makefile -distclean-am: clean-am distclean-compile distclean-generic \ - distclean-hdr distclean-libtool distclean-tags - -dvi: dvi-am - -dvi-am: - -html: html-am - -info: info-am - -info-am: - -install-data-am: install-libjsonincludeHEADERS install-pkgconfigDATA - -install-dvi: install-dvi-am - -install-exec-am: install-libLTLIBRARIES - -install-html: install-html-am - -install-info: install-info-am - -install-man: - -install-pdf: install-pdf-am - -install-ps: install-ps-am - -installcheck-am: - -maintainer-clean: maintainer-clean-am - -rm -f $(am__CONFIG_DISTCLEAN_FILES) - -rm -rf $(top_srcdir)/autom4te.cache - -rm -rf ./$(DEPDIR) - -rm -f Makefile -maintainer-clean-am: distclean-am maintainer-clean-generic - -mostlyclean: mostlyclean-am - -mostlyclean-am: mostlyclean-compile mostlyclean-generic \ - mostlyclean-libtool - -pdf: pdf-am - -pdf-am: - -ps: ps-am - -ps-am: - -uninstall-am: uninstall-libLTLIBRARIES uninstall-libjsonincludeHEADERS \ - uninstall-pkgconfigDATA - -.MAKE: install-am install-strip - -.PHONY: CTAGS GTAGS all all-am am--refresh check check-am clean \ - clean-checkPROGRAMS clean-generic clean-libLTLIBRARIES \ - clean-libtool ctags dist dist-all dist-bzip2 dist-gzip \ - dist-shar dist-tarZ dist-zip distcheck distclean \ - distclean-compile distclean-generic distclean-hdr \ - distclean-libtool distclean-tags distcleancheck distdir \ - distuninstallcheck dvi dvi-am html html-am info info-am \ - install install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am \ - install-libLTLIBRARIES install-libjsonincludeHEADERS \ - install-man install-pdf install-pdf-am install-pkgconfigDATA \ - install-ps install-ps-am install-strip installcheck \ - installcheck-am installdirs maintainer-clean \ - maintainer-clean-generic mostlyclean mostlyclean-compile \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - tags uninstall uninstall-am uninstall-libLTLIBRARIES \ - uninstall-libjsonincludeHEADERS uninstall-pkgconfigDATA - -# 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/client/json-c-0.7/NEWS b/client/json-c-0.7/NEWS deleted file mode 100644 index 41e843b5a..000000000 --- a/client/json-c-0.7/NEWS +++ /dev/null @@ -1 +0,0 @@ -News diff --git a/client/json-c-0.7/README b/client/json-c-0.7/README deleted file mode 100644 index beeba53d5..000000000 --- a/client/json-c-0.7/README +++ /dev/null @@ -1,20 +0,0 @@ -Building on Unix with gcc and autotools - -If checking out from CVS: - - sh autogen.sh - -Then configure, make, make install - - -Test programs - -To build the test programs run 'make check' - - -Linking to libjson - -If your system has pkgconfig then you can just add this to your makefile - -CFLAGS += $(shell pkg-config --cflags json) -LDFLAGS += $(shell pkg-config --libs json) diff --git a/client/json-c-0.7/README-WIN32.html b/client/json-c-0.7/README-WIN32.html deleted file mode 100644 index fb5015981..000000000 --- a/client/json-c-0.7/README-WIN32.html +++ /dev/null @@ -1,61 +0,0 @@ - - - - JSON-C - A JSON implementation in C - Win32 specific notes - - - -

Windows specific notes for JSON-C

-

Please send Win32 bug reports to christopher.watford@gmail.com

-

Win32 Specific Changes:

-
    -
  • - Various functions have been redefined to their Win32 version (i.e. open - on win32 is _open)
  • -
  • - Implemented missing functions from MS's libc (i.e. vasprintf and strndup)
  • -
  • - Added code to allow Win64 support without integer resizing issues, this - probably makes it much nicer on 64bit machines everywhere (i.e. using ptrdiff_t - for pointer math)
  • -
-

Porting Changelog:

-
-
printbuf.c - C. Watford (christopher.watford@gmail.com)
-
- Added a Win32/Win64 compliant implementation of vasprintf
-
debug.c - C. Watford (christopher.watford@gmail.com)
-
- Removed usage of vsyslog on Win32/Win64 systems, needs to be handled - by a configure script
-
json_object.c - C. Watford (christopher.watford@gmail.com)
-
- Added scope operator to wrap usage of json_object_object_foreach, this needs to be - rethought to be more ANSI C friendly
-
json_object.h - C. Watford (christopher.watford@gmail.com)
-
- Added Microsoft C friendly version of json_object_object_foreach
-
json_tokener.c - C. Watford (christopher.watford@gmail.com)
-
- Added a Win32/Win64 compliant implementation of strndup
-
json_util.c - C. Watford (christopher.watford@gmail.com)
-
- Added cast and mask to suffice size_t v. unsigned int - conversion correctness
-
-

Anonymous CVS

-

# export CVSROOT=:pserver:anoncvs@cvs.metaparadigm.com:/cvsroot
- # cvs login
- Logging in to :pserver:anoncvs@cvs.metaparadigm.com:2401/cvsroot
- CVS password: <enter 'anoncvs'>
- # cvs co json-c

-

Copyright Metaparadigm Pte. Ltd. 2004, 2005. Michael - Clark -

-

This program is free software; you can redistribute it and/or modify it under - the terms of the MIT License. See COPYING for details.

-
- - diff --git a/client/json-c-0.7/README.html b/client/json-c-0.7/README.html deleted file mode 100644 index 518a3c41c..000000000 --- a/client/json-c-0.7/README.html +++ /dev/null @@ -1,32 +0,0 @@ - - - - JSON-C - A JSON implementation in C - - - -

JSON-C - A JSON implementation in C

-

Latest release: json-c-0.7.tar.gz

-

JSON-C implements a reference counting object model that allows you to easily - construct JSON objects in C, output them as JSON formatted strings and parse - JSON formatted strings back into the C representation of JSON objects.

-

Minimal documentation exists here, - Although you are probably better reading the example code in test1.c.

-

To setup JSON-C to build on your system please run configure before - compiling. If you are on Win32 and are not using the VS project file, be sure - to rename config.h.win32 to config.h before building.

-

Win32 specific notes can be found here.

-

Please send bug reports to michael@metaparadigm.com

-

Please send Win32 bug reports to christopher.watford@gmail.com

-

Anonymous Subversion

-

# svn co http://svn.metaparadigm.com/svn/json-c/trunk json-c

-

Copyright Metaparadigm Pte. Ltd. 2004, 2005. Michael - Clark -

-

This program is free software; you can redistribute it and/or modify it under - the terms of the MIT License. See COPYING for details.

-
- - diff --git a/client/json-c-0.7/aclocal.m4 b/client/json-c-0.7/aclocal.m4 deleted file mode 100644 index d9357dc54..000000000 --- a/client/json-c-0.7/aclocal.m4 +++ /dev/null @@ -1,7270 +0,0 @@ -# generated automatically by aclocal 1.10 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 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. - -m4_if(m4_PACKAGE_VERSION, [2.61],, -[m4_fatal([this file was generated for autoconf 2.61. -You have another version of autoconf. If you want to use that, -you should regenerate the build system entirely.], [63])]) - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- - -# serial 48 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 1s/^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 MSVC, -# 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 "$LTCFLAGS" && LTCFLAGS=$CFLAGS -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="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -_LT_CC_BASENAME([$compiler]) - -# 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"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_DEFUN([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_LINKER_BOILERPLATE - - -# _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 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/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 - ;; -sparc*-*solaris*) - # 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 - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -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}\{0,1\} :&$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 other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; 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 linker 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 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - 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 - teststring="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; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - # 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. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # 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); */ - } - else - puts (dlerror ()); - - exit (status); -}] -EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|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" - wl=$lt_prog_compiler_wl 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 - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - 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}\{0,1\} :&$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 - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $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_cmds=".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 - ;; - -bsdi[[45]]*) - 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_cmds=".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~ - chmod a+x \$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_cmds='`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* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - 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 - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - 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_cmds='.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_cmds='.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_cmds='.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' - ;; - -interix3*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -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 - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/^[ ]*//;s/#.*//;/^[^\/]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_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 - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - 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_cmds=".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" - ;; - -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.3*) - 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 - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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 - -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 -])# 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 - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - 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" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; 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 DLLs -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 variants of GNU ld 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|DragonFly)/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 - ;; - -interix3*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -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*) - 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*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - 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 - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | 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_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_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" - done - 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 -# AC_CONFIG_SUBDIRS is not called here. 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 -# AC_CONFIG_SUBDIRS is not called here. 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 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([_LT_AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX - -# _LT_AC_PROG_CXXCPP -# ------------------ -AC_DEFUN([_LT_AC_PROG_CXXCPP], -[ -AC_REQUIRE([AC_PROG_CXX]) -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -fi -])# _LT_AC_PROG_CXXCPP - -# 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 - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -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 - -# Report which library types will 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* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=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([_LT_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_shlibpath_var, $1)=unsupported -_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=cpp - -# 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 - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# 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 - $as_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 - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# 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' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - 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 '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - 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 - ;; - - 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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _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)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP '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 -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 $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 lds - 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 -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}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $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 lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$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(ld_shlibs, $1)=no - ;; - esac - 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 | dragonfly*) - # 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) | 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 - _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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - ;; - *) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _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*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _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 - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _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 - ;; - interix3*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - 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 ${output_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}${output_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 - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _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' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _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' - ;; - pgCC*) - # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $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' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_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::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - ;; - 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 ${output_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}${output_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 ${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~ - $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 ${output_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}${output_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 - ;; - 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(archive_cmds_need_lc,$1)=yes - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -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} ${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. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' - ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # 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 - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - 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_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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# 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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# 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 - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# 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_cmds='$shrext_cmds' - -# 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 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'" - ;; -linux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDGIRSTW]]' - 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'" - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -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 - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # 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)= - ;; - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - 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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - 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 | dragonfly*) - # 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)='${wl}-a ${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)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - 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* | ecpc*) - # 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' - ;; - pgCC*) - # Portland Group C++ compiler. - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - 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*) - ;; - 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 - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _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' - ;; - esac - ;; - 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' - ;; - - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - 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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - - 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_basename 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' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - 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' - ;; - - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - 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*) - _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 - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _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' - ;; - - unicos*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - 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 - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) -]) - - -# 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 '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[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= - # Just being paranoid about ensuring that cc_basename is set. - _LT_CC_BASENAME([$compiler]) - 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 - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - 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}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - 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 - 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 - - # 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 '\''/^[[BCDGRS]] /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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix3*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - 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'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=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*) - 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 - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - 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 - ;; - - *) - 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)" = no; then - runpath_var= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - 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 "$lt_prog_compiler_static"; 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' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - 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 '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${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 - ;; - - bsdi[[45]]*) - _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_cmds=".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' - _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _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)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - if test "$GCC" = yes ; then - 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 lds - _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}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $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 lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$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(ld_shlibs, $1)=no - ;; - esac - 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 | dragonfly*) - _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*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _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 - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _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(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _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 ${output_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)=: - ;; - - solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - _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 - wlarc='' - _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]].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - 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*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - 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 - -# -# 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) - pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $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 -IFS=$as_save_IFS -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 && continue - 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_SUBST([SED]) -AC_MSG_RESULT([$SED]) -]) - -# Copyright (C) 2002, 2003, 2005, 2006 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. - -# 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. -# (This private macro should not be called outside this file.) -AC_DEFUN([AM_AUTOMAKE_VERSION], -[am__api_version='1.10' -dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to -dnl require some minimum version. Point them to the right macro. -m4_if([$1], [1.10], [], - [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl -]) - -# _AM_AUTOCONF_VERSION(VERSION) -# ----------------------------- -# aclocal traces this macro to find the Autoconf version. -# This is a private macro too. Using m4_define simplifies -# the logic in aclocal, which can simply ignore this definition. -m4_define([_AM_AUTOCONF_VERSION], []) - -# AM_SET_CURRENT_AUTOMAKE_VERSION -# ------------------------------- -# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. -# This function is AC_REQUIREd by AC_INIT_AUTOMAKE. -AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], -[AM_AUTOMAKE_VERSION([1.10])dnl -_AM_AUTOCONF_VERSION(m4_PACKAGE_VERSION)]) - -# AM_AUX_DIR_EXPAND -*- Autoconf -*- - -# Copyright (C) 2001, 2003, 2005 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. - -# 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, 2004, 2005, 2006 -# 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. - -# serial 8 - -# 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])dnl -AC_SUBST([$1_FALSE])dnl -_AM_SUBST_NOTMAKE([$1_TRUE])dnl -_AM_SUBST_NOTMAKE([$1_FALSE])dnl -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])]) - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 -# 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. - -# serial 9 - -# 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], UPC, [depcc="$UPC" am_compiler_list=], - [$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/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - 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 - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' 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])dnl -_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl -]) - -# Generate code to set up dependency tracking. -*- Autoconf -*- - -# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005 -# 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. - -#serial 3 - -# _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. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then - dirpart=`AS_DIRNAME("$mf")` - else - continue - fi - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. 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 " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/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"]) -]) - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# 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. - -# serial 8 - -# 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 -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005, 2006 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. - -# serial 12 - -# 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. - -# 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.60])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 -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl - # test to see if srcdir already configured - if test -f $srcdir/config.status; then - AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) - fi -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 -dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. -m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, - [m4_fatal([AC_INIT should be called with package and version arguments])])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_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([tar-ustar], [_AM_PROG_TAR([ustar])], - [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], - [_AM_PROG_TAR([v7])])]) -_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 -AC_PROVIDE_IFELSE([AC_PROG_OBJC], - [_AM_DEPENDENCIES(OBJC)], - [define([AC_PROG_OBJC], - defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])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]) - -# Copyright (C) 2001, 2003, 2005 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. - -# AM_PROG_INSTALL_SH -# ------------------ -# Define $install_sh. -AC_DEFUN([AM_PROG_INSTALL_SH], -[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl -install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"} -AC_SUBST(install_sh)]) - -# Copyright (C) 2003, 2005 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. - -# serial 2 - -# 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])]) - -# Check to see how 'make' treats includes. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 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. - -# serial 3 - -# 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 -]) - -# Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- - -# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005 -# 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. - -# serial 5 - -# 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 -AC_REQUIRE_AUX_FILE([missing])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 -]) - -# Copyright (C) 2003, 2004, 2005, 2006 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. - -# AM_PROG_MKDIR_P -# --------------- -# Check for `mkdir -p'. -AC_DEFUN([AM_PROG_MKDIR_P], -[AC_PREREQ([2.60])dnl -AC_REQUIRE([AC_PROG_MKDIR_P])dnl -dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, -dnl while keeping a definition of mkdir_p for backward compatibility. -dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. -dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of -dnl Makefile.ins that do not define MKDIR_P, so we do our own -dnl adjustment using top_builddir (which is defined more often than -dnl MKDIR_P). -AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl -case $mkdir_p in - [[\\/$]]* | ?:[[\\/]]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac -]) - -# Helper functions for option handling. -*- Autoconf -*- - -# Copyright (C) 2001, 2002, 2003, 2005 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. - -# serial 3 - -# _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. -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 -# 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. - -# serial 4 - -# 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)]) - -# Copyright (C) 2001, 2003, 2005 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. - -# AM_PROG_INSTALL_STRIP -# --------------------- -# 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="\$(install_sh) -c -s" -AC_SUBST([INSTALL_STRIP_PROGRAM])]) - -# Copyright (C) 2006 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. - -# _AM_SUBST_NOTMAKE(VARIABLE) -# --------------------------- -# Prevent Automake from outputing VARIABLE = @VARIABLE@ in Makefile.in. -# This macro is traced by Automake. -AC_DEFUN([_AM_SUBST_NOTMAKE]) - -# Check how to create a tarball. -*- Autoconf -*- - -# Copyright (C) 2004, 2005 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. - -# serial 2 - -# _AM_PROG_TAR(FORMAT) -# -------------------- -# Check how to create a tarball in format FORMAT. -# FORMAT should be one of `v7', `ustar', or `pax'. -# -# Substitute a variable $(am__tar) that is a command -# writing to stdout a FORMAT-tarball containing the directory -# $tardir. -# tardir=directory && $(am__tar) > result.tar -# -# Substitute a variable $(am__untar) that extract such -# a tarball read from stdin. -# $(am__untar) < result.tar -AC_DEFUN([_AM_PROG_TAR], -[# Always define AMTAR for backward compatibility. -AM_MISSING_PROG([AMTAR], [tar]) -m4_if([$1], [v7], - [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], - [m4_case([$1], [ustar],, [pax],, - [m4_fatal([Unknown tar format])]) -AC_MSG_CHECKING([how to create a $1 tar archive]) -# Loop over all known methods to create a tar archive until one works. -_am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' -_am_tools=${am_cv_prog_tar_$1-$_am_tools} -# Do not fold the above two line into one, because Tru64 sh and -# Solaris sh will not grok spaces in the rhs of `-'. -for _am_tool in $_am_tools -do - case $_am_tool in - gnutar) - for _am_tar in tar gnutar gtar; - do - AM_RUN_LOG([$_am_tar --version]) && break - done - am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' - am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' - am__untar="$_am_tar -xf -" - ;; - plaintar) - # Must skip GNU tar: if it does not support --format= it doesn't create - # ustar tarball either. - (tar --version) >/dev/null 2>&1 && continue - am__tar='tar chf - "$$tardir"' - am__tar_='tar chf - "$tardir"' - am__untar='tar xf -' - ;; - pax) - am__tar='pax -L -x $1 -w "$$tardir"' - am__tar_='pax -L -x $1 -w "$tardir"' - am__untar='pax -r' - ;; - cpio) - am__tar='find "$$tardir" -print | cpio -o -H $1 -L' - am__tar_='find "$tardir" -print | cpio -o -H $1 -L' - am__untar='cpio -i -H $1 -d' - ;; - none) - am__tar=false - am__tar_=false - am__untar=false - ;; - esac - - # If the value was cached, stop now. We just wanted to have am__tar - # and am__untar set. - test -n "${am_cv_prog_tar_$1}" && break - - # tar/untar a dummy directory, and stop if the command works - rm -rf conftest.dir - mkdir conftest.dir - echo GrepMe > conftest.dir/file - AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) - rm -rf conftest.dir - if test -s conftest.tar; then - AM_RUN_LOG([$am__untar /dev/null 2>&1 && break - fi -done -rm -rf conftest.dir - -AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) -AC_MSG_RESULT([$am_cv_prog_tar_$1])]) -AC_SUBST([am__tar]) -AC_SUBST([am__untar]) -]) # _AM_PROG_TAR - diff --git a/client/json-c-0.7/arraylist.c b/client/json-c-0.7/arraylist.c deleted file mode 100644 index dbd075d80..000000000 --- a/client/json-c-0.7/arraylist.c +++ /dev/null @@ -1,93 +0,0 @@ -/* - * $Id: arraylist.c,v 1.4 2006/01/26 02:16:28 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#include "config.h" - -#if STDC_HEADERS -# include -# include -#endif /* STDC_HEADERS */ - -#if HAVE_STRINGS_H -# include -#endif /* HAVE_STRINGS_H */ - -#include "bits.h" -#include "arraylist.h" - -struct array_list* -array_list_new(array_list_free_fn *free_fn) -{ - struct array_list *this; - - if(!(this = calloc(1, sizeof(struct array_list)))) return NULL; - this->size = ARRAY_LIST_DEFAULT_SIZE; - this->length = 0; - this->free_fn = free_fn; - if(!(this->array = calloc(sizeof(void*), this->size))) { - free(this); - return NULL; - } - return this; -} - -extern void -array_list_free(struct array_list *this) -{ - int i; - for(i = 0; i < this->length; i++) - if(this->array[i]) this->free_fn(this->array[i]); - free(this->array); - free(this); -} - -void* -array_list_get_idx(struct array_list *this, int i) -{ - if(i >= this->length) return NULL; - return this->array[i]; -} - -static int array_list_expand_internal(struct array_list *this, int max) -{ - void *t; - int new_size; - - if(max < this->size) return 0; - new_size = max(this->size << 1, max); - if(!(t = realloc(this->array, new_size*sizeof(void*)))) return -1; - this->array = t; - (void)memset(this->array + this->size, 0, (new_size-this->size)*sizeof(void*)); - this->size = new_size; - return 0; -} - -int -array_list_put_idx(struct array_list *this, int idx, void *data) -{ - if(array_list_expand_internal(this, idx)) return -1; - if(this->array[idx]) this->free_fn(this->array[idx]); - this->array[idx] = data; - if(this->length <= idx) this->length = idx + 1; - return 0; -} - -int -array_list_add(struct array_list *this, void *data) -{ - return array_list_put_idx(this, this->length, data); -} - -int -array_list_length(struct array_list *this) -{ - return this->length; -} diff --git a/client/json-c-0.7/arraylist.h b/client/json-c-0.7/arraylist.h deleted file mode 100644 index 2948e042a..000000000 --- a/client/json-c-0.7/arraylist.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * $Id: arraylist.h,v 1.4 2006/01/26 02:16:28 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#ifndef _arraylist_h_ -#define _arraylist_h_ - -#define ARRAY_LIST_DEFAULT_SIZE 32 - -typedef void (array_list_free_fn) (void *data); - -struct array_list -{ - void **array; - int length; - int size; - array_list_free_fn *free_fn; -}; - -extern struct array_list* -array_list_new(array_list_free_fn *free_fn); - -extern void -array_list_free(struct array_list *al); - -extern void* -array_list_get_idx(struct array_list *al, int i); - -extern int -array_list_put_idx(struct array_list *al, int i, void *data); - -extern int -array_list_add(struct array_list *al, void *data); - -extern int -array_list_length(struct array_list *al); - -#endif diff --git a/client/json-c-0.7/autogen.sh b/client/json-c-0.7/autogen.sh deleted file mode 100644 index c67b9034d..000000000 --- a/client/json-c-0.7/autogen.sh +++ /dev/null @@ -1 +0,0 @@ -autoreconf -v --install || exit 1 diff --git a/client/json-c-0.7/bits.h b/client/json-c-0.7/bits.h deleted file mode 100644 index 2c107cce1..000000000 --- a/client/json-c-0.7/bits.h +++ /dev/null @@ -1,27 +0,0 @@ -/* - * $Id: bits.h,v 1.10 2006/01/30 23:07:57 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#ifndef _bits_h_ -#define _bits_h_ - -#ifndef min -#define min(a,b) ((a) < (b) ? (a) : (b)) -#endif - -#ifndef max -#define max(a,b) ((a) > (b) ? (a) : (b)) -#endif - -#define hexdigit(x) (((x) <= '9') ? (x) - '0' : ((x) & 7) + 9) -#define error_ptr(error) ((void*)error) -#define is_error(ptr) ((unsigned long)ptr > (unsigned long)-4000L) - -#endif diff --git a/client/json-c-0.7/config.guess b/client/json-c-0.7/config.guess deleted file mode 100755 index 396482d6c..000000000 --- a/client/json-c-0.7/config.guess +++ /dev/null @@ -1,1500 +0,0 @@ -#! /bin/sh -# Attempt to guess a canonical system name. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2006-07-02' - -# 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., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, 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, 2002, 2003, 2004, 2005 -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 ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # 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 "$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 ; set_cc_for_build= ;' - -# 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 ;; - *:OpenBSD:*:*) - UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` - echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} - exit ;; - *:ekkoBSD:*:*) - echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} - exit ;; - *:SolidBSD:*:*) - echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} - exit ;; - macppc:MirBSD:*:*) - echo powerpc-unknown-mirbsd${UNAME_RELEASE} - exit ;; - *:MirBSD:*:*) - echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} - exit ;; - alpha:OSF1:*:*) - case $UNAME_RELEASE in - *4.0) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` - ;; - *5.*) - UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` - ;; - esac - # 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 Pn.n version is a patched version. - # 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/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` - exit ;; - 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 ;; - 21064:Windows_NT:50:3) - echo alpha-dec-winnt3.5 - exit ;; - Amiga*:UNIX_System_V:4.0:*) - echo m68k-unknown-sysv4 - exit ;; - *:[Aa]miga[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-amigaos - exit ;; - *:[Mm]orph[Oo][Ss]:*:*) - echo ${UNAME_MACHINE}-unknown-morphos - exit ;; - *:OS/390:*:*) - echo i370-ibm-openedition - exit ;; - *:z/VM:*:*) - echo s390-ibm-zvmoe - exit ;; - *:OS400:*:*) - echo powerpc-ibm-os400 - exit ;; - arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) - echo arm-acorn-riscix${UNAME_RELEASE} - exit ;; - arm:riscos:*:*|arm:RISCOS:*:*) - echo arm-unknown-riscos - exit ;; - SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) - echo hppa1.1-hitachi-hiuxmpp - exit ;; - 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 ;; - NILE*:*:*:dcosx) - echo pyramid-pyramid-svr4 - exit ;; - DRS?6000:unix:4.0:6*) - echo sparc-icl-nx6 - exit ;; - DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) - case `/usr/bin/uname -p` in - sparc) echo sparc-icl-nx7; exit ;; - esac ;; - sun4H:SunOS:5.*:*) - echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) - echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - i86pc:SunOS:5.*:*) - echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - 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 ;; - 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 ;; - sun3*:SunOS:*:*) - echo m68k-sun-sunos${UNAME_RELEASE} - exit ;; - 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 ;; - aushp:SunOS:*:*) - echo sparc-auspex-sunos${UNAME_RELEASE} - exit ;; - # 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 ;; - atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) - echo m68k-atari-mint${UNAME_RELEASE} - exit ;; - milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) - echo m68k-milan-mint${UNAME_RELEASE} - exit ;; - hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) - echo m68k-hades-mint${UNAME_RELEASE} - exit ;; - *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) - echo m68k-unknown-mint${UNAME_RELEASE} - exit ;; - m68k:machten:*:*) - echo m68k-apple-machten${UNAME_RELEASE} - exit ;; - powerpc:machten:*:*) - echo powerpc-apple-machten${UNAME_RELEASE} - exit ;; - RISC*:Mach:*:*) - echo mips-dec-mach_bsd4.3 - exit ;; - RISC*:ULTRIX:*:*) - echo mips-dec-ultrix${UNAME_RELEASE} - exit ;; - VAX*:ULTRIX*:*:*) - echo vax-dec-ultrix${UNAME_RELEASE} - exit ;; - 2020:CLIX:*:* | 2430:CLIX:*:*) - echo clipper-intergraph-clix${UNAME_RELEASE} - exit ;; - 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 && - dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && - SYSTEM_NAME=`$dummy $dummyarg` && - { echo "$SYSTEM_NAME"; exit; } - echo mips-mips-riscos${UNAME_RELEASE} - exit ;; - Motorola:PowerMAX_OS:*:*) - echo powerpc-motorola-powermax - exit ;; - Motorola:*:4.3:PL8-*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) - echo powerpc-harris-powermax - exit ;; - Night_Hawk:Power_UNIX:*:*) - echo powerpc-harris-powerunix - exit ;; - m88k:CX/UX:7*:*) - echo m88k-harris-cxux7 - exit ;; - m88k:*:4*:R4*) - echo m88k-motorola-sysv4 - exit ;; - m88k:*:3*:R3*) - echo m88k-motorola-sysv3 - exit ;; - 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 ;; - M88*:DolphinOS:*:*) # DolphinOS (SVR3) - echo m88k-dolphin-sysv3 - exit ;; - M88*:*:R3*:*) - # Delta 88k system running SVR3 - echo m88k-motorola-sysv3 - exit ;; - XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) - echo m88k-tektronix-sysv3 - exit ;; - Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) - echo m68k-tektronix-bsd - exit ;; - *:IRIX*:*:*) - echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` - exit ;; - ????????: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 ;; # Note that: echo "'`uname -s`'" gives 'AIX ' - i*86:AIX:*:*) - echo i386-ibm-aix - exit ;; - 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 ;; - *: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 - if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` - then - echo "$SYSTEM_NAME" - else - echo rs6000-ibm-aix3.2.5 - fi - 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 ;; - *: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 ;; - *:AIX:*:*) - echo rs6000-ibm-aix - exit ;; - ibmrt:4.4BSD:*|romp-ibm:BSD:*) - echo romp-ibm-bsd4.4 - exit ;; - ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and - echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to - exit ;; # report: romp-ibm BSD 4.3 - *:BOSX:*:*) - echo rs6000-bull-bosx - exit ;; - DPX/2?00:B.O.S.:*:*) - echo m68k-bull-sysv3 - exit ;; - 9000/[34]??:4.3bsd:1.*:*) - echo m68k-hp-bsd - exit ;; - hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) - echo m68k-hp-bsd4.4 - exit ;; - 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 - eval $set_cc_for_build - - # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating - # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler - # generating 64-bit code. GNU and HP use different nomenclature: - # - # $ CC_FOR_BUILD=cc ./config.guess - # => hppa2.0w-hp-hpux11.23 - # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess - # => hppa64-hp-hpux11.23 - - if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | - grep __LP64__ >/dev/null - then - HP_ARCH="hppa2.0w" - else - HP_ARCH="hppa64" - fi - fi - echo ${HP_ARCH}-hp-hpux${HPUX_REV} - exit ;; - ia64:HP-UX:*:*) - HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` - echo ia64-hp-hpux${HPUX_REV} - exit ;; - 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 && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - echo unknown-hitachi-hiuxwe2 - exit ;; - 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) - echo hppa1.1-hp-bsd - exit ;; - 9000/8??:4.3bsd:*:*) - echo hppa1.0-hp-bsd - exit ;; - *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) - echo hppa1.0-hp-mpeix - exit ;; - hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) - echo hppa1.1-hp-osf - exit ;; - hp8??:OSF1:*:*) - echo hppa1.0-hp-osf - exit ;; - i*86:OSF1:*:*) - if [ -x /usr/sbin/sysversion ] ; then - echo ${UNAME_MACHINE}-unknown-osf1mk - else - echo ${UNAME_MACHINE}-unknown-osf1 - fi - exit ;; - parisc*:Lites*:*:*) - echo hppa1.1-hp-lites - exit ;; - C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) - echo c1-convex-bsd - exit ;; - C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) - echo c34-convex-bsd - exit ;; - C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) - echo c38-convex-bsd - exit ;; - C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) - echo c4-convex-bsd - exit ;; - CRAY*Y-MP:*:*:*) - echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - 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 ;; - CRAY*TS:*:*:*) - echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*T3E:*:*:*) - echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - CRAY*SV1:*:*:*) - echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - *:UNICOS/mp:*:*) - echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' - exit ;; - 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 ;; - 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 ;; - i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) - echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} - exit ;; - sparc*:BSD/OS:*:*) - echo sparc-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:BSD/OS:*:*) - echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} - exit ;; - *:FreeBSD:*:*) - case ${UNAME_MACHINE} in - pc98) - echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - amd64) - echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - *) - echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; - esac - exit ;; - i*:CYGWIN*:*) - echo ${UNAME_MACHINE}-pc-cygwin - exit ;; - i*:MINGW*:*) - echo ${UNAME_MACHINE}-pc-mingw32 - exit ;; - i*:windows32*:*) - # uname -m includes "-pc" on this system. - echo ${UNAME_MACHINE}-mingw32 - exit ;; - i*:PW*:*) - echo ${UNAME_MACHINE}-pc-pw32 - exit ;; - x86:Interix*:[3456]*) - echo i586-pc-interix${UNAME_RELEASE} - exit ;; - EM64T:Interix*:[3456]*) - echo x86_64-unknown-interix${UNAME_RELEASE} - exit ;; - [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) - echo i${UNAME_MACHINE}-pc-mks - exit ;; - 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 ;; - i*:UWIN*:*) - echo ${UNAME_MACHINE}-pc-uwin - exit ;; - amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) - echo x86_64-unknown-cygwin - exit ;; - p*:CYGWIN*:*) - echo powerpcle-unknown-cygwin - exit ;; - prep*:SunOS:5.*:*) - echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` - exit ;; - *:GNU:*:*) - # the GNU system - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - exit ;; - *: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 ;; - i*86:Minix:*:*) - echo ${UNAME_MACHINE}-pc-minix - exit ;; - arm*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - avr32*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - cris:Linux:*:*) - echo cris-axis-linux-gnu - exit ;; - crisv32:Linux:*:*) - echo crisv32-axis-linux-gnu - exit ;; - frv:Linux:*:*) - echo frv-unknown-linux-gnu - exit ;; - ia64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m32r*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - m68*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - 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 | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - 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 | sed -n ' - /^CPU/{ - s: ::g - p - }'`" - test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } - ;; - or32:Linux:*:*) - echo or32-unknown-linux-gnu - exit ;; - ppc:Linux:*:*) - echo powerpc-unknown-linux-gnu - exit ;; - ppc64:Linux:*:*) - echo powerpc64-unknown-linux-gnu - exit ;; - 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 ;; - 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 ;; - parisc64:Linux:*:* | hppa64:Linux:*:*) - echo hppa64-unknown-linux-gnu - exit ;; - s390:Linux:*:* | s390x:Linux:*:*) - echo ${UNAME_MACHINE}-ibm-linux - exit ;; - sh64*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sh*:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - sparc:Linux:*:* | sparc64:Linux:*:*) - echo ${UNAME_MACHINE}-unknown-linux-gnu - exit ;; - vax:Linux:*:*) - echo ${UNAME_MACHINE}-dec-linux-gnu - exit ;; - x86_64:Linux:*:*) - echo x86_64-unknown-linux-gnu - exit ;; - 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 ;; - coff-i386) - echo "${UNAME_MACHINE}-pc-linux-gnucoff" - exit ;; - "") - # 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 ;; - 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 - #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) - LIBC=gnu - #else - LIBC=gnuaout - #endif - #endif - #ifdef __dietlibc__ - LIBC=dietlibc - #endif -EOF - eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' - /^LIBC/{ - s: ::g - p - }'`" - test x"${LIBC}" != x && { - echo "${UNAME_MACHINE}-pc-linux-${LIBC}" - exit - } - test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; exit; } - ;; - 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 ;; - 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 ;; - 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 ;; - i*86:XTS-300:*:STOP) - echo ${UNAME_MACHINE}-unknown-stop - exit ;; - i*86:atheos:*:*) - echo ${UNAME_MACHINE}-unknown-atheos - exit ;; - i*86:syllable:*:*) - echo ${UNAME_MACHINE}-pc-syllable - exit ;; - i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*) - echo i386-unknown-lynxos${UNAME_RELEASE} - exit ;; - i*86:*DOS:*:*) - echo ${UNAME_MACHINE}-pc-msdosdjgpp - exit ;; - 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 ;; - i*86:*:5:[678]*) - # UnixWare 7.x, OpenUNIX and OpenServer 6. - 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 ;; - 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 ;; - 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 ;; - Intel:Mach:3*:*) - echo i386-pc-mach3 - exit ;; - paragon:*:*:*) - echo i860-intel-osf1 - exit ;; - 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 ;; - mini*:CTIX:SYS*5:*) - # "miniframe" - echo m68010-convergent-sysv - exit ;; - mc68k:UNIX:SYSTEM5:3.51m) - echo m68k-convergent-sysv - exit ;; - M680?0:D-NIX:5.3:*) - echo m68k-diab-dnix - exit ;; - M68*:*:R3V[5678]*:*) - test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; - 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 | S7501*:*: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; } - /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ - && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; - 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) - /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ - && { echo i486-ncr-sysv4; exit; } ;; - m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) - echo m68k-unknown-lynxos${UNAME_RELEASE} - exit ;; - mc68030:UNIX_System_V:4.*:*) - echo m68k-atari-sysv4 - exit ;; - TSUNAMI:LynxOS:2.*:*) - echo sparc-unknown-lynxos${UNAME_RELEASE} - exit ;; - rs6000:LynxOS:2.*:*) - echo rs6000-unknown-lynxos${UNAME_RELEASE} - exit ;; - PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*) - echo powerpc-unknown-lynxos${UNAME_RELEASE} - exit ;; - SM[BE]S:UNIX_SV:*:*) - echo mips-dde-sysv${UNAME_RELEASE} - exit ;; - RM*:ReliantUNIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - RM*:SINIX-*:*:*) - echo mips-sni-sysv4 - exit ;; - *: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 ;; - PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort - # says - echo i586-unisys-sysv4 - exit ;; - *:UNIX_System_V:4*:FTX*) - # From Gerald Hewes . - # How about differentiating between stratus architectures? -djm - echo hppa1.1-stratus-sysv4 - exit ;; - *:*:*:FTX*) - # From seanf@swdc.stratus.com. - echo i860-stratus-sysv4 - exit ;; - i*86:VOS:*:*) - # From Paul.Green@stratus.com. - echo ${UNAME_MACHINE}-stratus-vos - exit ;; - *:VOS:*:*) - # From Paul.Green@stratus.com. - echo hppa1.1-stratus-vos - exit ;; - mc68*:A/UX:*:*) - echo m68k-apple-aux${UNAME_RELEASE} - exit ;; - news*:NEWS-OS:6*:*) - echo mips-sony-newsos6 - exit ;; - 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 ;; - BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. - echo powerpc-be-beos - exit ;; - BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. - echo powerpc-apple-beos - exit ;; - BePC:BeOS:*:*) # BeOS running on Intel PC compatible. - echo i586-pc-beos - exit ;; - SX-4:SUPER-UX:*:*) - echo sx4-nec-superux${UNAME_RELEASE} - exit ;; - SX-5:SUPER-UX:*:*) - echo sx5-nec-superux${UNAME_RELEASE} - exit ;; - SX-6:SUPER-UX:*:*) - echo sx6-nec-superux${UNAME_RELEASE} - exit ;; - Power*:Rhapsody:*:*) - echo powerpc-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Rhapsody:*:*) - echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} - exit ;; - *:Darwin:*:*) - UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown - case $UNAME_PROCESSOR in - unknown) UNAME_PROCESSOR=powerpc ;; - esac - echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} - exit ;; - *: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 ;; - *:QNX:*:4*) - echo i386-pc-qnx - exit ;; - NSE-?:NONSTOP_KERNEL:*:*) - echo nse-tandem-nsk${UNAME_RELEASE} - exit ;; - NSR-?:NONSTOP_KERNEL:*:*) - echo nsr-tandem-nsk${UNAME_RELEASE} - exit ;; - *:NonStop-UX:*:*) - echo mips-compaq-nonstopux - exit ;; - BS2000:POSIX*:*:*) - echo bs2000-siemens-sysv - exit ;; - DS/*:UNIX_System_V:*:*) - echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} - exit ;; - *: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 ;; - *:TOPS-10:*:*) - echo pdp10-unknown-tops10 - exit ;; - *:TENEX:*:*) - echo pdp10-unknown-tenex - exit ;; - KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) - echo pdp10-dec-tops20 - exit ;; - XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) - echo pdp10-xkl-tops20 - exit ;; - *:TOPS-20:*:*) - echo pdp10-unknown-tops20 - exit ;; - *:ITS:*:*) - echo pdp10-unknown-its - exit ;; - SEI:*:*:SEIUX) - echo mips-sei-seiux${UNAME_RELEASE} - exit ;; - *:DragonFly:*:*) - echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` - exit ;; - *:*VMS:*:*) - UNAME_MACHINE=`(uname -p) 2>/dev/null` - case "${UNAME_MACHINE}" in - A*) echo alpha-dec-vms ; exit ;; - I*) echo ia64-dec-vms ; exit ;; - V*) echo vax-dec-vms ; exit ;; - esac ;; - *:XENIX:*:SysV) - echo i386-pc-xenix - exit ;; - i*86:skyos:*:*) - echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' - exit ;; - i*86:rdos:*:*) - echo ${UNAME_MACHINE}-pc-rdos - exit ;; -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\n"); 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 && SYSTEM_NAME=`$dummy` && - { echo "$SYSTEM_NAME"; exit; } - -# Apollos put the system type in the environment. - -test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } - -# 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 ;; - c2*) - if getsysinfo -f scalar_acc - then echo c32-convex-bsd - else echo c2-convex-bsd - fi - exit ;; - c34*) - echo c34-convex-bsd - exit ;; - c38*) - echo c38-convex-bsd - exit ;; - c4*) - echo c4-convex-bsd - exit ;; - 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/client/json-c-0.7/config.h.in b/client/json-c-0.7/config.h.in deleted file mode 100644 index 44e10aab7..000000000 --- a/client/json-c-0.7/config.h.in +++ /dev/null @@ -1,117 +0,0 @@ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -#undef HAVE_DOPRNT - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and - to 0 otherwise. */ -#undef HAVE_MALLOC - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the `open' function. */ -#undef HAVE_OPEN - -/* Define to 1 if your system has a GNU libc compatible `realloc' function, - and to 0 otherwise. */ -#undef HAVE_REALLOC - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDARG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `strerror' function. */ -#undef HAVE_STRERROR - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strncasecmp' function. */ -#undef HAVE_STRNCASECMP - -/* Define to 1 if you have the `strndup' function. */ -#undef HAVE_STRNDUP - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYSLOG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `vasprintf' function. */ -#undef HAVE_VASPRINTF - -/* Define to 1 if you have the `vprintf' function. */ -#undef HAVE_VPRINTF - -/* Define to 1 if you have the `vsnprintf' function. */ -#undef HAVE_VSNPRINTF - -/* Define to 1 if you have the `vsyslog' function. */ -#undef HAVE_VSYSLOG - -/* Name of package */ -#undef PACKAGE - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Version number of package */ -#undef VERSION - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define to rpl_malloc if the replacement function should be used. */ -#undef malloc - -/* Define to rpl_realloc if the replacement function should be used. */ -#undef realloc - -/* Define to `unsigned int' if does not define. */ -#undef size_t diff --git a/client/json-c-0.7/config.h.win32 b/client/json-c-0.7/config.h.win32 deleted file mode 100644 index 7f7e6aee1..000000000 --- a/client/json-c-0.7/config.h.win32 +++ /dev/null @@ -1,94 +0,0 @@ -/* - * $Id: config.h.win32,v 1.2 2006/01/26 02:16:28 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -/* config.h.win32 Generated by configure. */ - -#define PACKAGE_STRING "JSON C Library 0.2" -#define PACKAGE_BUGREPORT "michael@metaparadigm.com" -#define PACKAGE_NAME "JSON C Library" -#define PACKAGE_TARNAME "json-c" -#define PACKAGE_VERSION "0.2" - -/* config.h.in. Generated from configure.ac by autoheader. */ - -/* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ -/* #undef HAVE_DOPRNT */ - -/* Define to 1 if you have the header file. */ -#define HAVE_FCNTL_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_INTTYPES_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_LIMITS_H 1 - -/* Define to 1 if your system has a GNU libc compatible `malloc' function, and - to 0 otherwise. */ -#define HAVE_MALLOC 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_MEMORY_H 1 - -/* Define to 1 if you have the `open' function. */ -#undef HAVE_OPEN - -/* Define to 1 if your system has a GNU libc compatible `realloc' function, - and to 0 otherwise. */ -#define HAVE_REALLOC 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDINT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_STDLIB_H 1 - -/* Define to 1 if you have the `strdup' function. */ -#undef HAVE_STRNDUP - -/* Define to 1 if you have the header file. */ -#define HAVE_STDARG_H 1 - -/* Define to 1 if you have the `strerror' function. */ -#define HAVE_STRERROR 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#define HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYSLOG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_PARAM_H - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_STAT_H 1 - -/* Define to 1 if you have the header file. */ -#define HAVE_SYS_TYPES_H 1 - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `vprintf' function. */ -#undef HAVE_VPRINTF - -/* Define to 1 if you have the `vsyslog' function. */ -#undef HAVE_VSYSLOG - -/* Define to 1 if you have the `strncasecmp' function. */ -#undef HAVE_STRNCASECMP - -/* Define to 1 if you have the ANSI C header files. */ -#define STDC_HEADERS 1 diff --git a/client/json-c-0.7/config.sub b/client/json-c-0.7/config.sub deleted file mode 100755 index fab0aa355..000000000 --- a/client/json-c-0.7/config.sub +++ /dev/null @@ -1,1616 +0,0 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, -# Inc. - -timestamp='2006-09-20' - -# 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., 51 Franklin Street - Fifth Floor, Boston, MA -# 02110-1301, 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, 2002, 2003, 2004, 2005 -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 ;; - --version | -v ) - echo "$version" ; exit ;; - --help | --h* | -h ) - echo "$usage"; exit ;; - -- ) # 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 ;; - - * ) - 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-newlib* | 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 | -knuth | -cray) - 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 - ;; - -sco6) - os=-sco5v6 - basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` - ;; - -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/'` - ;; - -sco5v6*) - # 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 | avr32 \ - | bfin \ - | 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 \ - | m32c | m32r | m32rle | m68000 | m68k | m88k \ - | maxq | mb | microblaze | mcore \ - | mips | mipsbe | mipseb | mipsel | mipsle \ - | mips16 \ - | mips64 | mips64el \ - | mips64vr | mips64vrel \ - | mips64orion | mips64orionel \ - | mips64vr4100 | mips64vr4100el \ - | mips64vr4300 | mips64vr4300el \ - | mips64vr5000 | mips64vr5000el \ - | mips64vr5900 | mips64vr5900el \ - | mipsisa32 | mipsisa32el \ - | mipsisa32r2 | mipsisa32r2el \ - | mipsisa64 | mipsisa64el \ - | mipsisa64r2 | mipsisa64r2el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | mt \ - | msp430 \ - | nios | nios2 \ - | ns16k | ns32k \ - | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | score \ - | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ - | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ - | spu | strongarm \ - | tahoe | thumb | tic4x | tic80 | tron \ - | v850 | v850e \ - | we32k \ - | x86 | xc16x | xscale | xscalee[bl] | 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) - ;; - ms1) - basic_machine=mt-unknown - ;; - - # 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-* | avr32-* \ - | bfin-* | bs2000-* \ - | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ - | clipper-* | craynv-* | 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-* \ - | m32c-* | m32r-* | m32rle-* \ - | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ - | m88110-* | m88k-* | maxq-* | mcore-* \ - | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ - | mips16-* \ - | mips64-* | mips64el-* \ - | mips64vr-* | mips64vrel-* \ - | mips64orion-* | mips64orionel-* \ - | mips64vr4100-* | mips64vr4100el-* \ - | mips64vr4300-* | mips64vr4300el-* \ - | mips64vr5000-* | mips64vr5000el-* \ - | mips64vr5900-* | mips64vr5900el-* \ - | mipsisa32-* | mipsisa32el-* \ - | mipsisa32r2-* | mipsisa32r2el-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64r2-* | mipsisa64r2el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39-* | mipstx39el-* \ - | mmix-* \ - | mt-* \ - | msp430-* \ - | nios-* | nios2-* \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ - | sparclite-* \ - | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* \ - | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ - | tron-* \ - | v850-* | v850e-* | vax-* \ - | we32k-* \ - | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ - | 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 - ;; - abacus) - basic_machine=abacus-unknown - ;; - 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 - ;; - craynv) - basic_machine=craynv-cray - os=-unicosmp - ;; - cr16c) - basic_machine=cr16c-unknown - os=-elf - ;; - crds | unos) - basic_machine=m68k-crds - ;; - crisv32 | crisv32-* | etraxfs*) - basic_machine=crisv32-axis - ;; - cris | cris-* | etrax*) - basic_machine=cris-axis - ;; - crx) - basic_machine=crx-unknown - os=-elf - ;; - 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 - ;; - djgpp) - basic_machine=i586-pc - os=-msdosdjgpp - ;; - 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 - ;; - monitor) - basic_machine=m68k-rom68k - os=-coff - ;; - morphos) - basic_machine=powerpc-unknown - os=-morphos - ;; - msdos) - basic_machine=i386-pc - os=-msdos - ;; - ms1-*) - basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` - ;; - 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 - ;; - nsr-tandem) - basic_machine=nsr-tandem - ;; - op50n-* | op60c-*) - basic_machine=hppa1.1-oki - os=-proelf - ;; - openrisc | openrisc-*) - basic_machine=or32-unknown - ;; - 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 - ;; - pc98) - basic_machine=i386-pc - ;; - pc98-*) - basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - 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 - ;; - rdos) - basic_machine=i386-pc - os=-rdos - ;; - 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 - ;; - sde) - basic_machine=mipsisa32-sde - os=-elf - ;; - 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 - ;; - xbox) - basic_machine=i686-pc - os=-mingw32 - ;; - 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 - ;; - mmix) - basic_machine=mmix-knuth - ;; - 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 - ;; - sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) - basic_machine=sh-unknown - ;; - sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) - 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* | -mirbsd* | -netbsd* \ - | -openbsd* | -solidbsd* \ - | -ekkobsd* | -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-newlib* | -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* \ - | -skyos* | -haiku* | -rdos* | -toppers*) - # 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* | -haiku* \ - | -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 - ;; - -zvmoe) - os=-zvmoe - ;; - -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 - score-*) - os=-elf - ;; - spu-*) - os=-elf - ;; - *-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 - ;; - *-haiku) - os=-haiku - ;; - *-ibm) - os=-aix - ;; - *-knuth) - os=-mmixware - ;; - *-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 - -# 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/client/json-c-0.7/configure b/client/json-c-0.7/configure deleted file mode 100755 index 52ed22b10..000000000 --- a/client/json-c-0.7/configure +++ /dev/null @@ -1,21818 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.61 for JSON C Library 0.3. -# -# Report bugs to . -# -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -# 2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -# This configure script is free software; the Free Software Foundation -# gives unlimited permission to copy, distribute and modify it. -## --------------------- ## -## M4sh Initialization. ## -## --------------------- ## - -# Be more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -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+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# 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 - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -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 -IFS=$as_save_IFS - - ;; -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_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -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) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; 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'` - -# CDPATH. -$as_unset CDPATH - - -if test "x$CONFIG_SHELL" = x; then - if (eval ":") 2>/dev/null; then - as_have_required=yes -else - as_have_required=no -fi - - if test $as_have_required = yes && (eval ": -(as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=\$LINENO - as_lineno_2=\$LINENO - test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && - test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } -") 2> /dev/null; then - : -else - as_candidate_shells= - 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=. - case $as_dir in - /*) - for as_base in sh bash ksh sh5; do - as_candidate_shells="$as_candidate_shells $as_dir/$as_base" - done;; - esac -done -IFS=$as_save_IFS - - - for as_shell in $as_candidate_shells $SHELL; do - # Try only shells that exist, to save several forks. - if { test -f "$as_shell" || test -f "$as_shell.exe"; } && - { ("$as_shell") 2> /dev/null <<\_ASEOF -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+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -_ASEOF -}; then - CONFIG_SHELL=$as_shell - as_have_required=yes - if { "$as_shell" 2> /dev/null <<\_ASEOF -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+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - -: -(as_func_return () { - (exit $1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = "$1" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test $exitcode = 0) || { (exit 1); exit 1; } - -( - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } - -_ASEOF -}; then - break -fi - -fi - - done - - if test "x$CONFIG_SHELL" != x; then - for as_var in BASH_ENV ENV - do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var - done - export CONFIG_SHELL - exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} -fi - - - if test $as_have_required = no; then - echo This script requires a shell more modern than all the - echo shells that I found on your system. Please install a - echo modern shell, or manually run the script under such a - echo shell if you do have one. - { (exit 1); exit 1; } -fi - - -fi - -fi - - - -(eval "as_func_return () { - (exit \$1) -} -as_func_success () { - as_func_return 0 -} -as_func_failure () { - as_func_return 1 -} -as_func_ret_success () { - return 0 -} -as_func_ret_failure () { - return 1 -} - -exitcode=0 -if as_func_success; then - : -else - exitcode=1 - echo as_func_success failed. -fi - -if as_func_failure; then - exitcode=1 - echo as_func_failure succeeded. -fi - -if as_func_ret_success; then - : -else - exitcode=1 - echo as_func_ret_success failed. -fi - -if as_func_ret_failure; then - exitcode=1 - echo as_func_ret_failure succeeded. -fi - -if ( set x; as_func_ret_success y && test x = \"\$1\" ); then - : -else - exitcode=1 - echo positional parameters were not saved. -fi - -test \$exitcode = 0") || { - echo No shell found that supports shell functions. - echo Please tell autoconf@gnu.org about your system, - echo including any error possibly output before this - echo message -} - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # 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 after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, 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 - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\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 sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -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$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# 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'" - - - - -# 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 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/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 - -exec 7<&0 &1 - -# 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` - -# -# Initializations. -# -ac_default_prefix=/usr/local -ac_clean_files= -ac_config_libobj_dir=. -LIBOBJS= -cross_compiling=no -subdirs= -MFLAGS= -MAKEFLAGS= -SHELL=${CONFIG_SHELL-/bin/sh} - -# Identity of this package. -PACKAGE_NAME='JSON C Library' -PACKAGE_TARNAME='json-c' -PACKAGE_VERSION='0.3' -PACKAGE_STRING='JSON C Library 0.3' -PACKAGE_BUGREPORT='michael@metaparadigm.com' - -# Factoring default headers for most tests. -ac_includes_default="\ -#include -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_STAT_H -# include -#endif -#ifdef STDC_HEADERS -# include -# include -#else -# ifdef HAVE_STDLIB_H -# include -# endif -#endif -#ifdef HAVE_STRING_H -# if !defined STDC_HEADERS && defined HAVE_MEMORY_H -# include -# endif -# include -#endif -#ifdef HAVE_STRINGS_H -# include -#endif -#ifdef HAVE_INTTYPES_H -# include -#endif -#ifdef HAVE_STDINT_H -# include -#endif -#ifdef HAVE_UNISTD_H -# include -#endif" - -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 -datarootdir -datadir -sysconfdir -sharedstatedir -localstatedir -includedir -oldincludedir -docdir -infodir -htmldir -dvidir -pdfdir -psdir -libdir -localedir -mandir -DEFS -ECHO_C -ECHO_N -ECHO_T -LIBS -build_alias -host_alias -target_alias -INSTALL_PROGRAM -INSTALL_SCRIPT -INSTALL_DATA -am__isrc -CYGPATH_W -PACKAGE -VERSION -ACLOCAL -AUTOCONF -AUTOMAKE -AUTOHEADER -MAKEINFO -install_sh -STRIP -INSTALL_STRIP_PROGRAM -mkdir_p -AWK -SET_MAKE -am__leading_dot -AMTAR -am__tar -am__untar -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 -GREP -EGREP -LIBOBJS -build -build_cpu -build_vendor -build_os -host -host_cpu -host_vendor -host_os -SED -LN_S -ECHO -AR -RANLIB -CXX -CXXFLAGS -ac_ct_CXX -CXXDEPMODE -am__fastdepCXX_TRUE -am__fastdepCXX_FALSE -CXXCPP -F77 -FFLAGS -ac_ct_F77 -LIBTOOL -LTLIBOBJS' -ac_subst_files='' - ac_precious_vars='build_alias -host_alias -target_alias -CC -CFLAGS -LDFLAGS -LIBS -CPPFLAGS -CPP -CXX -CXXFLAGS -CCC -CXXCPP -F77 -FFLAGS' - - -# 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. -# (The list follows the same order as the GNU Coding Standards.) -bindir='${exec_prefix}/bin' -sbindir='${exec_prefix}/sbin' -libexecdir='${exec_prefix}/libexec' -datarootdir='${prefix}/share' -datadir='${datarootdir}' -sysconfdir='${prefix}/etc' -sharedstatedir='${prefix}/com' -localstatedir='${prefix}/var' -includedir='${prefix}/include' -oldincludedir='/usr/include' -docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' -infodir='${datarootdir}/info' -htmldir='${docdir}' -dvidir='${docdir}' -pdfdir='${docdir}' -psdir='${docdir}' -libdir='${exec_prefix}/lib' -localedir='${datarootdir}/locale' -mandir='${datarootdir}/man' - -ac_prev= -ac_dashdash= -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 - - case $ac_option in - *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; - *) ac_optarg=yes ;; - esac - - # Accept the important Cygnus configure options, so we can diagnose typos. - - case $ac_dashdash$ac_option in - --) - ac_dashdash=yes ;; - - -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) - ac_prev=datadir ;; - -datadir=* | --datadir=* | --datadi=* | --datad=*) - datadir=$ac_optarg ;; - - -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ - | --dataroo | --dataro | --datar) - ac_prev=datarootdir ;; - -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ - | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) - datarootdir=$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 ;; - - -docdir | --docdir | --docdi | --doc | --do) - ac_prev=docdir ;; - -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) - docdir=$ac_optarg ;; - - -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) - ac_prev=dvidir ;; - -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) - dvidir=$ac_optarg ;; - - -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'` - 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 ;; - - -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) - ac_prev=htmldir ;; - -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ - | --ht=*) - htmldir=$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 ;; - - -localedir | --localedir | --localedi | --localed | --locale) - ac_prev=localedir ;; - -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) - localedir=$ac_optarg ;; - - -localstatedir | --localstatedir | --localstatedi | --localstated \ - | --localstate | --localstat | --localsta | --localst | --locals) - ac_prev=localstatedir ;; - -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ - | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) - 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 ;; - - -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) - ac_prev=pdfdir ;; - -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) - pdfdir=$ac_optarg ;; - - -psdir | --psdir | --psdi | --psd | --ps) - ac_prev=psdir ;; - -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) - psdir=$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'` - 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; }; } - 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 directory names. -for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ - datadir sysconfdir sharedstatedir localstatedir includedir \ - oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ - libdir localedir mandir -do - eval ac_val=\$$ac_var - case $ac_val in - [\\/$]* | ?:[\\/]* ) continue;; - NONE | '' ) case $ac_var in *prefix ) continue;; esac;; - esac - { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 - { (exit 1); exit 1; }; } -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 - - -ac_pwd=`pwd` && test -n "$ac_pwd" && -ac_ls_di=`ls -di .` && -ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || - { echo "$as_me: error: Working directory cannot be determined" >&2 - { (exit 1); exit 1; }; } -test "X$ac_ls_di" = "X$ac_pwd_ls_di" || - { echo "$as_me: error: pwd does not report name of working directory" >&2 - { (exit 1); exit 1; }; } - - -# 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 the parent directory. - ac_confdir=`$as_dirname -- "$0" || -$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 - test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." - { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 - { (exit 1); exit 1; }; } -fi -ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" -ac_abs_confdir=`( - cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 - { (exit 1); exit 1; }; } - pwd)` -# When building in place, set srcdir=. -if test "$ac_abs_confdir" = "$ac_pwd"; then - srcdir=. -fi -# Remove unnecessary trailing slashes from srcdir. -# Double slashes in file names in object file debugging info -# mess up M-x gdb in Emacs. -case $srcdir in -*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; -esac -for ac_var in $ac_precious_vars; do - eval ac_env_${ac_var}_set=\${${ac_var}+set} - eval ac_env_${ac_var}_value=\$${ac_var} - eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} - eval ac_cv_env_${ac_var}_value=\$${ac_var} -done - -# -# 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 JSON C Library 0.3 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 \`..'] - -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] - --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] - --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] - --datadir=DIR read-only architecture-independent data [DATAROOTDIR] - --infodir=DIR info documentation [DATAROOTDIR/info] - --localedir=DIR locale-dependent data [DATAROOTDIR/locale] - --mandir=DIR man documentation [DATAROOTDIR/man] - --docdir=DIR documentation root [DATAROOTDIR/doc/json-c] - --htmldir=DIR html documentation [DOCDIR] - --dvidir=DIR dvi documentation [DOCDIR] - --pdfdir=DIR pdf documentation [DOCDIR] - --psdir=DIR ps documentation [DOCDIR] -_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 JSON C Library 0.3:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --disable-dependency-tracking speeds up one-time build - --enable-dependency-tracking do not reject slow dependency extractors - --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) - -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] - -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 - LIBS libraries to pass to the linker, e.g. -l - CPPFLAGS C/C++/Objective 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 -ac_status=$? -fi - -if test "$ac_init_help" = "recursive"; then - # If there are subdirs, report their specific --help. - for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue - test -d "$ac_dir" || continue - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - cd "$ac_dir" || { ac_status=$?; continue; } - # Check for guested 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 - else - echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 - fi || ac_status=$? - cd "$ac_pwd" || { ac_status=$?; break; } - done -fi - -test -n "$ac_init_help" && exit $ac_status -if $ac_init_version; then - cat <<\_ACEOF -JSON C Library configure 0.3 -generated by GNU Autoconf 2.61 - -Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, -2002, 2003, 2004, 2005, 2006 Free Software Foundation, Inc. -This configure script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it. -_ACEOF - exit -fi -cat >config.log <<_ACEOF -This file contains any messages produced by compilers while -running configure, to aid debugging if configure makes a mistake. - -It was created by JSON C Library $as_me 0.3, which was -generated by GNU Autoconf 2.61. Invocation command line was - - $ $0 $@ - -_ACEOF -exec 5>>config.log -{ -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` -/usr/bin/hostinfo = `(/usr/bin/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 -IFS=$as_save_IFS - -} >&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_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_arg'" - ;; - 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: Use '\'' to represent an apostrophe within the trap. -# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. -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, -( - for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - (set) 2>&1 | - case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( - *${as_nl}ac_space=\ *) - sed -n \ - "s/'\''/'\''\\\\'\'''\''/g; - s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" - ;; #( - *) - sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) - echo - - cat <<\_ASBOX -## ----------------- ## -## Output variables. ## -## ----------------- ## -_ASBOX - echo - for ac_var in $ac_subst_vars - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - - if test -n "$ac_subst_files"; then - cat <<\_ASBOX -## ------------------- ## -## File substitutions. ## -## ------------------- ## -_ASBOX - echo - for ac_var in $ac_subst_files - do - eval ac_val=\$$ac_var - case $ac_val in - *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; - esac - echo "$ac_var='\''$ac_val'\''" - done | sort - echo - fi - - if test -s confdefs.h; then - cat <<\_ASBOX -## ----------- ## -## confdefs.h. ## -## ----------- ## -_ASBOX - echo - cat confdefs.h - echo - fi - test "$ac_signal" != 0 && - echo "$as_me: caught signal $ac_signal" - echo "$as_me: exit $exit_status" - } >&5 - rm -f core *.core core.conftest.* && - rm -f -r 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 -f -r conftest* 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 -n "$CONFIG_SITE"; then - set x "$CONFIG_SITE" -elif test "x$prefix" != xNONE; then - set x "$prefix/share/config.site" "$prefix/etc/config.site" -else - set x "$ac_default_prefix/share/config.site" \ - "$ac_default_prefix/etc/config.site" -fi -shift -for ac_site_file -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 $ac_precious_vars; 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 - - - -am__api_version='1.10' - -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 - -# These three variables are undocumented and unsupported, -# and are intended to be withdrawn in a future Autoconf release. -# They can cause serious problems if a builder's source tree is in a directory -# whose full name contains unusual characters. -ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. -ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. -ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. - - -# 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 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - - -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. Don't cache a - # value for INSTALL within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - 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 -f 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 - -{ echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5 -echo $ECHO_N "checking for a thread-safe mkdir -p... $ECHO_C" >&6; } -if test -z "$MKDIR_P"; then - if test "${ac_cv_path_mkdir+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in mkdir gmkdir; do - for ac_exec_ext in '' $ac_executable_extensions; do - { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue - case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( - 'mkdir (GNU coreutils) '* | \ - 'mkdir (coreutils) '* | \ - 'mkdir (fileutils) '4.1*) - ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext - break 3;; - esac - done - done -done -IFS=$as_save_IFS - -fi - - if test "${ac_cv_path_mkdir+set}" = set; then - MKDIR_P="$ac_cv_path_mkdir -p" - else - # As a last resort, use the slow shell script. Don't cache a - # value for MKDIR_P within a source directory, because that will - # break other packages using the cache if that directory is - # removed, or if the value is a relative name. - test -d ./--version && rmdir ./--version - MKDIR_P="$ac_install_sh -d" - fi -fi -{ echo "$as_me:$LINENO: result: $MKDIR_P" >&5 -echo "${ECHO_T}$MKDIR_P" >&6; } - -mkdir_p="$MKDIR_P" -case $mkdir_p in - [\\/$]* | ?:[\\/]*) ;; - */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; -esac - -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` -if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - cat >conftest.make <<\_ACEOF -SHELL = /bin/sh -all: - @echo '@@@%%%=$(MAKE)=@@@%%%' -_ACEOF -# GNU make sometimes prints "make[1]: Entering...", which would confuse us. -case `${MAKE-make} -f conftest.make 2>/dev/null` in - *@@@%%%=?*=@@@%%%*) - eval ac_cv_prog_make_${ac_make}_set=yes;; - *) - eval ac_cv_prog_make_${ac_make}_set=no;; -esac -rm -f conftest.make -fi -if eval test \$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 - -if test "`cd $srcdir && pwd`" != "`pwd`"; then - # Use -I$(srcdir) only when $(srcdir) != ., so that make's output - # is not polluted with repeated "-I." - am__isrc=' -I$(srcdir)' - # test to see if srcdir already configured - if 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 -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=JSON C Library - VERSION=0.3 - - -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"} - -install_sh=${install_sh-"\$(SHELL) $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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -else - STRIP="$ac_cv_prog_STRIP" -fi - -fi -INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" - -# We need awk for the "check" target. The system "awk" is bad on -# some platforms. -# Always define AMTAR for backward compatibility. - -AMTAR=${AMTAR-"${am_missing_run}tar"} - -am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' - - - - - - -# Checks for programs. - -# Checks for libraries. - -# Checks for header files. -ac_config_headers="$ac_config_headers config.h" - -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 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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.exe - 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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.exe -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 - - if test "x$ac_ct_CC" = x; then - CC="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CC=$ac_ct_CC - fi -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` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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[^ ]*//'` -# -# List of possible output files, starting from the most likely. -# The algorithm is not robust to junk in `.', hence go to wildcards (a.*) -# only as a last resort. b.out is created by i960 compilers. -ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' -# -# The IRIX 6 linker writes into existing files which may not be -# executable, retaining their permissions. Remove them first so a -# subsequent execution test works. -ac_rmfiles= -for ac_file in $ac_files -do - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;; - * ) ac_rmfiles="$ac_rmfiles $ac_file";; - esac -done -rm -f $ac_rmfiles - -if { (ac_try="$ac_link_default" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link_default") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. -# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' -# in a Makefile. We should not override ac_cv_exeext if it was cached, -# so that the user can short-circuit this test for compilers unknown to -# Autoconf. -for ac_file in $ac_files '' -do - test -f "$ac_file" || continue - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) - ;; - [ab].out ) - # We found the default executable, but exeext='' is most - # certainly right. - break;; - *.* ) - if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; - then :; else - ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - fi - # We set ac_cv_exeext here because the later test for it is not - # safe: cross compilers may not add the suffix if given an `-o' - # argument, so we may need to know it at that point already. - # Even if this section looks crufty: it has the advantage of - # actually working. - break;; - * ) - break;; - esac -done -test "$ac_cv_exeext" = no && ac_cv_exeext= - -else - ac_file='' -fi - -{ echo "$as_me:$LINENO: result: $ac_file" >&5 -echo "${ECHO_T}$ac_file" >&6; } -if test -z "$ac_file"; then - 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 - -# Check that 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' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 that 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 { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 | *.map | *.inf | *.o | *.obj ) ;; - *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` - 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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compile") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; then - for ac_file in conftest.o conftest.obj conftest.*; do - test -f "$ac_file" || continue; - case $ac_file in - *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf ) ;; - *) 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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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 core 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 -{ 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 - ac_save_c_werror_flag=$ac_c_werror_flag - ac_c_werror_flag=yes - ac_cv_prog_cc_g=no - CFLAGS="-g" - 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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CFLAGS="" - 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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_c_werror_flag=$ac_save_c_werror_flag - CFLAGS="-g" - 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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_c_werror_flag=$ac_save_c_werror_flag -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 ISO C89" >&5 -echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } -if test "${ac_cv_prog_cc_c89+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_prog_cc_c89=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 -std 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 -std. */ -int osf4_cc_array ['\x00' == 0 ? 1 : -1]; - -/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters - inside strings and character constants. */ -#define FOO(x) 'x' -int xlc6_cc_array[FOO(a) == 'x' ? 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 -for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ - -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" -do - CC="$ac_save_CC $ac_arg" - rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cc_c89=$ac_arg -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext - test "x$ac_cv_prog_cc_c89" != "xno" && break -done -rm -f conftest.$ac_ext -CC=$ac_save_CC - -fi -# AC_CACHE_VAL -case "x$ac_cv_prog_cc_c89" in - x) - { echo "$as_me:$LINENO: result: none needed" >&5 -echo "${ECHO_T}none needed" >&6; } ;; - xno) - { echo "$as_me:$LINENO: result: unsupported" >&5 -echo "${ECHO_T}unsupported" >&6; } ;; - *) - CC="$CC $ac_cv_prog_cc_c89" - { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 -echo "${ECHO_T}$ac_cv_prog_cc_c89" >&6; } ;; -esac - - -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/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - 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 - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' 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 { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.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 { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.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 grep that handles long lines and -e" >&5 -echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # Extract the first word of "grep ggrep" to use in msg output -if test -z "$GREP"; then -set dummy grep ggrep; ac_prog_name=$2 -if test "${ac_cv_path_GREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_GREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in grep ggrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue - # Check for GNU ac_path_GREP and select it if it is found. - # Check for GNU $ac_path_GREP -case `"$ac_path_GREP" --version 2>&1` in -*GNU*) - ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'GREP' >> "conftest.nl" - "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_GREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_GREP="$ac_path_GREP" - ac_path_GREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_GREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -GREP="$ac_cv_path_GREP" -if test -z "$GREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_GREP=$GREP -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 -echo "${ECHO_T}$ac_cv_path_GREP" >&6; } - GREP="$ac_cv_path_GREP" - - -{ echo "$as_me:$LINENO: checking for egrep" >&5 -echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } -if test "${ac_cv_path_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_path_EGREP="$GREP -E" - else - # Extract the first word of "egrep" to use in msg output -if test -z "$EGREP"; then -set dummy egrep; ac_prog_name=$2 -if test "${ac_cv_path_EGREP+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_path_EGREP_found=false -# Loop through the user's path and test for each of PROGNAME-LIST -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_prog in egrep; do - for ac_exec_ext in '' $ac_executable_extensions; do - ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" - { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue - # Check for GNU ac_path_EGREP and select it if it is found. - # Check for GNU $ac_path_EGREP -case `"$ac_path_EGREP" --version 2>&1` in -*GNU*) - ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; -*) - ac_count=0 - echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" - while : - do - cat "conftest.in" "conftest.in" >"conftest.tmp" - mv "conftest.tmp" "conftest.in" - cp "conftest.in" "conftest.nl" - echo 'EGREP' >> "conftest.nl" - "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break - diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break - ac_count=`expr $ac_count + 1` - if test $ac_count -gt ${ac_path_EGREP_max-0}; then - # Best one so far, save it but keep looking for a better one - ac_cv_path_EGREP="$ac_path_EGREP" - ac_path_EGREP_max=$ac_count - fi - # 10*(2^10) chars as input seems more than enough - test $ac_count -gt 10 && break - done - rm -f conftest.in conftest.tmp conftest.nl conftest.out;; -esac - - - $ac_path_EGREP_found && break 3 - done -done - -done -IFS=$as_save_IFS - - -fi - -EGREP="$ac_cv_path_EGREP" -if test -z "$EGREP"; then - { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 -echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} - { (exit 1); exit 1; }; } -fi - -else - ac_cv_path_EGREP=$EGREP -fi - - - fi -fi -{ echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 -echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } - EGREP="$ac_cv_path_EGREP" - - -{ 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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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 core 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 -#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)) - return 2; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 core.conftest.* 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 { as_var=$as_ac_Header; eval "test \"\${$as_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. */ -$ac_includes_default - -#include <$ac_header> -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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 core conftest.err conftest.$ac_objext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 fcntl.h limits.h strings.h syslog.h unistd.h sys/param.h stdarg.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.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 michael@metaparadigm.com ## -## --------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -# Checks for typedefs, structures, and compiler characteristics. -{ 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 cs; - /* SunOS 4.1.1 cc rejects this. */ - char const *const *pcpcc; - char **ppc; - /* 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"; - pcpcc = &g + (g ? g-g : 0); - /* HPUX 7.0 cc rejects these. */ - ++pcpcc; - ppc = (char**) pcpcc; - pcpcc = (char const *const *) ppc; - { /* SCO 3.2v4 cc rejects this. */ - char *t; - char const *s = 0 ? (char *) 0 : (char const *) 0; - - *t++ = 0; - if (s) return 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; - if (!foo) return 0; - } - return !cs[0] && !zero.x; -#endif - - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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 core 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 -typedef size_t ac__type_new_; -int -main () -{ -if ((ac__type_new_ *) 0) - return 0; -if (sizeof (ac__type_new_)) - return 0; - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext -if { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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 core 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 int -_ACEOF - -fi - - -# Checks for library functions. - -for ac_func in vprintf -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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -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 -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 for _doprnt" >&5 -echo $ECHO_N "checking for _doprnt... $ECHO_C" >&6; } -if test "${ac_cv_func__doprnt+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 _doprnt to an innocuous variant, in case declares _doprnt. - For example, HP-UX 11i declares gettimeofday. */ -#define _doprnt innocuous__doprnt - -/* System header to define __stub macros and hopefully few prototypes, - which can conflict with char _doprnt (); below. - Prefer to if __STDC__ is defined, since - exists even on freestanding compilers. */ - -#ifdef __STDC__ -# include -#else -# include -#endif - -#undef _doprnt - -/* Override any GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char _doprnt (); -/* 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__doprnt || defined __stub____doprnt -choke me -#endif - -int -main () -{ -return _doprnt (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; then - ac_cv_func__doprnt=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cv_func__doprnt=no -fi - -rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func__doprnt" >&5 -echo "${ECHO_T}$ac_cv_func__doprnt" >&6; } -if test $ac_cv_func__doprnt = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_DOPRNT 1 -_ACEOF - -fi - -fi -done - - -{ echo "$as_me:$LINENO: checking for working memcmp" >&5 -echo $ECHO_N "checking for working memcmp... $ECHO_C" >&6; } -if test "${ac_cv_func_memcmp_working+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_memcmp_working=no -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 () -{ - - /* Some versions of memcmp are not 8-bit clean. */ - char c0 = '\100', c1 = '\200', c2 = '\201'; - if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) - return 1; - - /* The Next x86 OpenStep bug shows up only when comparing 16 bytes - or more and with at least one buffer not starting on a 4-byte boundary. - William Lewis provided this test program. */ - { - char foo[21]; - char bar[21]; - int i; - for (i = 0; i < 4; i++) - { - char *a = foo + i; - char *b = bar + i; - strcpy (a, "--------01111111"); - strcpy (b, "--------10000000"); - if (memcmp (a, b, 16) >= 0) - return 1; - } - return 0; - } - - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_memcmp_working=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_func_memcmp_working=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_memcmp_working" >&5 -echo "${ECHO_T}$ac_cv_func_memcmp_working" >&6; } -test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in - *" memcmp.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" - ;; -esac - - - -for ac_header in stdlib.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.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 michael@metaparadigm.com ## -## --------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 GNU libc compatible malloc" >&5 -echo $ECHO_N "checking for GNU libc compatible malloc... $ECHO_C" >&6; } -if test "${ac_cv_func_malloc_0_nonnull+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_malloc_0_nonnull=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *malloc (); -#endif - -int -main () -{ -return ! malloc (0); - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_malloc_0_nonnull=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_func_malloc_0_nonnull=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_malloc_0_nonnull" >&5 -echo "${ECHO_T}$ac_cv_func_malloc_0_nonnull" >&6; } -if test $ac_cv_func_malloc_0_nonnull = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 1 -_ACEOF - -else - cat >>confdefs.h <<\_ACEOF -#define HAVE_MALLOC 0 -_ACEOF - - case " $LIBOBJS " in - *" malloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS malloc.$ac_objext" - ;; -esac - - -cat >>confdefs.h <<\_ACEOF -#define malloc rpl_malloc -_ACEOF - -fi - - - - -for ac_header in stdlib.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.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 michael@metaparadigm.com ## -## --------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 GNU libc compatible realloc" >&5 -echo $ECHO_N "checking for GNU libc compatible realloc... $ECHO_C" >&6; } -if test "${ac_cv_func_realloc_0_nonnull+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$cross_compiling" = yes; then - ac_cv_func_realloc_0_nonnull=no -else - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#if defined STDC_HEADERS || defined HAVE_STDLIB_H -# include -#else -char *realloc (); -#endif - -int -main () -{ -return ! realloc (0, 0); - ; - return 0; -} -_ACEOF -rm -f conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_link") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } && { ac_try='./conftest$ac_exeext' - { (case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_try") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); }; }; then - ac_cv_func_realloc_0_nonnull=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_func_realloc_0_nonnull=no -fi -rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi - - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_func_realloc_0_nonnull" >&5 -echo "${ECHO_T}$ac_cv_func_realloc_0_nonnull" >&6; } -if test $ac_cv_func_realloc_0_nonnull = yes; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_REALLOC 1 -_ACEOF - -else - cat >>confdefs.h <<\_ACEOF -#define HAVE_REALLOC 0 -_ACEOF - - case " $LIBOBJS " in - *" realloc.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS realloc.$ac_objext" - ;; -esac - - -cat >>confdefs.h <<\_ACEOF -#define realloc rpl_realloc -_ACEOF - -fi - - - - - - - - - - -for ac_func in strndup strerror vsnprintf vasprintf open vsyslog strncasecmp -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 { as_var=$as_ac_var; eval "test \"\${$as_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 GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -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 -#endif - -int -main () -{ -return $ac_func (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - conftest$ac_exeext conftest.$ac_ext -fi -ac_res=`eval echo '${'$as_ac_var'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 - - -# Check whether --enable-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 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 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 - - -# Make sure we can run config.sub. -$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || - { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 -echo "$as_me: error: cannot run $SHELL $ac_aux_dir/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_build_alias=$build_alias -test "x$ac_build_alias" = x && - ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` -test "x$ac_build_alias" = x && - { { 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=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_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; } -case $ac_cv_build in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 -echo "$as_me: error: invalid value of canonical build" >&2;} - { (exit 1); exit 1; }; };; -esac -build=$ac_cv_build -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_build -shift -build_cpu=$1 -build_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -build_os=$* -IFS=$ac_save_IFS -case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac - - -{ 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 - if test "x$host_alias" = x; then - ac_cv_host=$ac_cv_build -else - ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || - { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 -echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} - { (exit 1); exit 1; }; } -fi - -fi -{ echo "$as_me:$LINENO: result: $ac_cv_host" >&5 -echo "${ECHO_T}$ac_cv_host" >&6; } -case $ac_cv_host in -*-*-*) ;; -*) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 -echo "$as_me: error: invalid value of canonical host" >&2;} - { (exit 1); exit 1; }; };; -esac -host=$ac_cv_host -ac_save_IFS=$IFS; IFS='-' -set x $ac_cv_host -shift -host_cpu=$1 -host_vendor=$2 -shift; shift -# Remember, the first character of IFS is used to create $*, -# except with old shells: -host_os=$* -IFS=$ac_save_IFS -case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac - - -{ 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 -IFS=$as_save_IFS -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 && continue - 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 - -fi - -SED=$lt_cv_path_SED - -{ echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6; } - - -# Check whether --with-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 variants of GNU ld 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 lds 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' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - -{ 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_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_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" - done - 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 - ;; - -bsdi[45]*) - 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*) - # func_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='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_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 | dragonfly*) - 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|DragonFly)/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 - ;; - -interix3*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -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*) - 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*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - 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 - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | 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"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - -# Check whether --enable-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 5954 "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 { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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 - ;; -sparc*-*solaris*) - # 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 - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - - -esac - -need_locks="$enable_libtool_lock" - - - -for ac_header in dlfcn.h -do -as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - { echo "$as_me:$LINENO: checking for $ac_header" >&5 -echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } -if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || - test ! -s conftest.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 michael@metaparadigm.com ## -## --------------------------------------- ## -_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 { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - eval "$as_ac_Header=\$ac_header_preproc" -fi -ac_res=`eval echo '${'$as_ac_Header'}'` - { echo "$as_me:$LINENO: result: $ac_res" >&5 -echo "${ECHO_T}$ac_res" >&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=cpp -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 -z "$CXX"; then - if test -n "$CCC"; then - CXX=$CCC - else - if test -n "$ac_tool_prefix"; then - for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 g++ c++ gpp aCC CC cxx cc++ cl.exe 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 - - if test "x$ac_ct_CXX" = x; then - CXX="g++" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - CXX=$ac_ct_CXX - fi -fi - - fi -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` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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 core 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 -{ 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 - ac_save_cxx_werror_flag=$ac_cxx_werror_flag - ac_cxx_werror_flag=yes - ac_cv_prog_cxx_g=no - CXXFLAGS="-g" - 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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - CXXFLAGS="" - 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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - : -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - ac_cxx_werror_flag=$ac_save_cxx_werror_flag - CXXFLAGS="-g" - 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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; then - ac_cv_prog_cxx_g=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext -fi - -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - ac_cxx_werror_flag=$ac_save_cxx_werror_flag -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 -ac_ext=cpp -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/conftst1.h sub/conftest.Po > /dev/null 2>&1 && - 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 - # or remarks (even with -Werror). So we grep stderr for any message - # that says an option was ignored or not supported. - # When given -MP, icc 7.0 and 7.1 complain thusly: - # icc: Command line warning: ignoring option '-M'; no argument required - # The diagnosis changed in icc 8.0: - # icc: Command line remark: option '-MP' not supported - if (grep 'ignoring option' conftest.err || - grep 'not supported' 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 - - - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -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 { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.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 { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.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 nonexistent 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 { (ac_try="$ac_cpp conftest.$ac_ext" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 && { - test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || - test ! -s conftest.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=cpp -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 - -fi - - -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 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn - 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 - - if test "x$ac_ct_F77" = x; then - F77="" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - F77=$ac_ct_F77 - fi -fi - - -# Provide some information about the compiler. -echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 -ac_compiler=`set X $ac_compile; echo $2` -{ (ac_try="$ac_compiler --version >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler --version >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -v >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 - (eval "$ac_compiler -v >&5") 2>&5 - ac_status=$? - echo "$as_me:$LINENO: \$? = $ac_status" >&5 - (exit $ac_status); } -{ (ac_try="$ac_compiler -V >&5" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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 core 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 { (ac_try="$ac_compile" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest.$ac_objext; 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 core 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 - teststring="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; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - # 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. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # 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 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'" - ;; -linux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDGIRSTW]' - 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'" - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -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 - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # 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 1s/^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 MSVC, -# 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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 - - if test "x$ac_ct_AR" = x; then - AR="false" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - AR=$ac_ct_AR - fi -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 - - if test "x$ac_ct_RANLIB" = x; then - RANLIB=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - RANLIB=$ac_ct_RANLIB - fi -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$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 -IFS=$as_save_IFS - -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 - - if test "x$ac_ct_STRIP" = x; then - STRIP=":" - else - case $cross_compiling:$ac_tool_warned in -yes:) -{ echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&5 -echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools -whose name does not start with the host triplet. If you think this -configuration is useful to you, please write to autoconf@gnu.org." >&2;} -ac_tool_warned=yes ;; -esac - STRIP=$ac_ct_STRIP - fi -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 "$LTCFLAGS" && LTCFLAGS=$CFLAGS -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="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# 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=no - -# Check whether --enable-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 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"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - - -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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8211: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:8215: \$? = $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 other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; 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' - ;; - - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - 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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic='-qnocommon' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - - 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_basename in - icc* | ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - 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' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - 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 - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - 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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8479: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:8483: \$? = $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 other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; 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 - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag 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_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker 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 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works=yes - fi - 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 - - -{ 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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:8583: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:8587: \$? = $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 - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $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= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - 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 - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - 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}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - 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 - 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 - - # 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 '\''/^[BCDGRS] /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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix3*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - 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'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - 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*) - 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 - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - 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" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - 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 "$lt_prog_compiler_static"; 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' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - 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 { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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 '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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 { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${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 - ;; - - bsdi[45]*) - 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_cmds=".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*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - if test "$GCC" = yes ; then - 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 lds - 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}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $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 lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$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}' - ;; - *) - ld_shlibs=no - ;; - esac - 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 | dragonfly*) - 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*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - 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 - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - 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' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - 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 ${output_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=: - ;; - - solaris*) - no_undefined_flag=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - 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 - wlarc='' - 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].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - 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*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - 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 - -# -# 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 - pic_flag=$lt_prog_compiler_pic - 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_cmds=".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 - ;; - -bsdi[45]*) - 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_cmds=".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~ - chmod a+x \$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_cmds='`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* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - 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 - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - 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_cmds='.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_cmds='.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_cmds='.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' - ;; - -interix3*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -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 - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 10048 "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 - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/^ *//;s/#.*//;/^[^\/]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_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 - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - 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_cmds=".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" - ;; - -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.3*) - 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 - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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 - -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 - -{ 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 GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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 GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -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 -#endif - -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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 GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char shl_load (); -int -main () -{ -return shl_load (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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 GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -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 -#endif - -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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 GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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 GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dlopen (); -int -main () -{ -return dlopen (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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 GCC internal prototype to avoid an error. - Use char because int might match the return type of a GCC - builtin and then its argument prototype would still apply. */ -#ifdef __cplusplus -extern "C" -#endif -char dld_link (); -int -main () -{ -return dld_link (); - ; - return 0; -} -_ACEOF -rm -f conftest.$ac_objext conftest$ac_exeext -if { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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" - wl=$lt_prog_compiler_wl 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); */ - } - else - puts (dlerror ()); - - 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; ) >&5 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_dlunknown|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 - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - { 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); */ - } - else - puts (dlerror ()); - - 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; ) >&5 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_dlunknown|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 library types will 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* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=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 LTCFLAGS 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# 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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# 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 - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# 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_cmds='$shrext_cmds' - -# 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 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 - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - 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" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - ac_ext=cpp -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_shlibpath_var_CXX=unsupported -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=cpp - -# 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"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# 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 - $as_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 - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -compiler_CXX=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# 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 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 variants of GNU ld 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 lds 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' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - 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 { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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 '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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 { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_cxx_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - 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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP '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 -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 $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 lds - 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 -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}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_CXX='$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 lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - 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}' - ;; - *) - ld_shlibs_CXX=no - ;; - esac - 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 - ;; - freebsd[12]*) - # 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 | dragonfly*) - # 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) | 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 - 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 - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_CXX='+b $libdir' - ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - 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*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - 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 - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - 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 - ;; - interix3*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - 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 ${output_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}${output_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 - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - 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' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - 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' - ;; - pgCC*) - # Portland Group C++ compiler - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $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' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_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::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - openbsd*) - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - ;; - 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 ${output_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}${output_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 ${output_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 ${output_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}${output_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 - ;; - 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++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -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} ${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. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='echo' - - # 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 - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - 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 - -# PORTME: override above test on systems where it is broken -case $host_os in -interix3*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -solaris*) - case $cc_basename in - CC*) - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - postdeps_CXX='-lCstd -lCrun' - ;; - esac - ;; -esac - - -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= - ;; - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - 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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_CXX='-qnocommon' - lt_prog_compiler_wl_CXX='-Wl,' - ;; - 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 | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${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='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - 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* | ecpc*) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - 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*) - ;; - 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 - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - 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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13348: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:13352: \$? = $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 other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; 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 - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker 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 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_CXX=yes - fi - else - lt_prog_compiler_static_works_CXX=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } - -if test x"$lt_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - -{ 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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:13452: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:13456: \$? = $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 - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $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 '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[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 - -# -# 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 - pic_flag=$lt_prog_compiler_pic_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_cmds=".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 - ;; - -bsdi[45]*) - 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_cmds=".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~ - chmod a+x \$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_cmds='`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* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - 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 - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - 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_cmds='.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_cmds='.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_cmds='.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' - ;; - -interix3*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -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 - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 13988 "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 - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/^ *//;s/#.*//;/^[^\/]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_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 - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - 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_cmds=".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" - ;; - -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.3*) - 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 - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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 - -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 - -{ 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 - - -# 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 LTCFLAGS 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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# 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 - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# 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_cmds='$shrext_cmds' - -# 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"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -compiler_F77=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -{ 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* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=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; } - -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' - ;; - - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - 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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_F77='-qnocommon' - lt_prog_compiler_wl_F77='-Wl,' - ;; - esac - ;; - - 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_basename in - icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - 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' - ;; - - solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; - *) - lt_prog_compiler_wl_F77='-Wl,';; - esac - ;; - - 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*) - 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 - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; - - 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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15043: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:15047: \$? = $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 other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; 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 - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_F77=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker 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 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_F77=yes - fi - else - lt_prog_compiler_static_works_F77=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } - -if test x"$lt_prog_compiler_static_works_F77" = xyes; then - : -else - lt_prog_compiler_static_F77= -fi - - -{ 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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15147: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:15151: \$? = $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 - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_F77=yes - fi - fi - chmod u+w . 2>&5 - $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= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - 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 - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - 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}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - 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 - 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 - - # 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 '\''/^[BCDGRS] /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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_F77=no - fi - ;; - - interix3*) - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - 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'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_F77=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*) - 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 - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_F77=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - ;; - - 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 - ;; - - *) - 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" = no; then - runpath_var= - hardcode_libdir_flag_spec_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - 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 "$lt_prog_compiler_static"; 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' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - 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 { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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 '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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 { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_f77_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${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 - ;; - - bsdi[45]*) - 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_cmds=".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_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$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 lds - archive_expsym_cmds_F77='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_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}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_F77='$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 lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - 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}' - ;; - *) - ld_shlibs_F77=no - ;; - esac - 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 | dragonfly*) - 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*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - 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 - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - *) - 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' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - 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 ${output_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=: - ;; - - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - 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 - wlarc='' - 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].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - 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*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) - no_undefined_flag_F77='${wl}-z,text' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_F77='${wl}-z,text' - allow_undefined_flag_F77='${wl}-z,nodefs' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - 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 - -# -# 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 - pic_flag=$lt_prog_compiler_pic_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_cmds=".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 - ;; - -bsdi[45]*) - 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_cmds=".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~ - chmod a+x \$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_cmds='`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* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - 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 - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - 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_cmds='.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_cmds='.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_cmds='.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' - ;; - -interix3*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -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 - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 16592 "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 - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/^ *//;s/#.*//;/^[^\/]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_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 - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - 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_cmds=".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" - ;; - -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.3*) - 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 - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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 - -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 - -{ 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 - - -# 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 LTCFLAGS 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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# 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 - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# 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_cmds='$shrext_cmds' - -# 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"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -compiler_GCJ=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -archive_cmds_need_lc_GCJ=no - -old_archive_cmds_GCJ=$old_archive_cmds - - -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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17366: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:17370: \$? = $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 other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; 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' - ;; - - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - 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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_GCJ='-qnocommon' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - esac - ;; - - 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_basename in - icc* | ecc*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - 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' - ;; - - solaris*) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_GCJ='-Qoption ld ';; - *) - lt_prog_compiler_wl_GCJ='-Wl,';; - esac - ;; - - 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*) - 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 - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_can_build_shared_GCJ=no - ;; - - 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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17634: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:17638: \$? = $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 other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; 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 - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" -{ echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } -if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_GCJ=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker 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 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_GCJ=yes - fi - else - lt_prog_compiler_static_works_GCJ=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -{ echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } - -if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then - : -else - lt_prog_compiler_static_GCJ= -fi - - -{ 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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17738: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:17742: \$? = $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 - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_GCJ=yes - fi - fi - chmod u+w . 2>&5 - $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= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - 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 - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - 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}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - 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 - 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 - - # 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 '\''/^[BCDGRS] /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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - interix3*) - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - 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'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_GCJ=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*) - 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 - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_GCJ=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - ;; - - 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 - ;; - - *) - 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" = no; then - runpath_var= - hardcode_libdir_flag_spec_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - 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 "$lt_prog_compiler_static"; 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' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - 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 { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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 '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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 { (ac_try="$ac_link" -case "(($ac_try" in - *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; - *) ac_try_echo=$ac_try;; -esac -eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&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); } && { - test -z "$ac_c_werror_flag" || - test ! -s conftest.err - } && test -s conftest$ac_exeext && - $as_test_x conftest$ac_exeext; 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 core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ - 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' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ='$convenience' - archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${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 - ;; - - bsdi[45]*) - 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_cmds=".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_GCJ='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_GCJ=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_GCJ=no - hardcode_direct_GCJ=no - hardcode_automatic_GCJ=yes - hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='' - link_all_deplibs_GCJ=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_GCJ='$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 lds - archive_expsym_cmds_GCJ='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_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}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_GCJ='$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 lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - 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}' - ;; - *) - ld_shlibs_GCJ=no - ;; - esac - 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 | dragonfly*) - 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*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - 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 - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - *) - 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' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - 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 ${output_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=: - ;; - - solaris*) - no_undefined_flag_GCJ=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - 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 - wlarc='' - 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].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - 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*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) - no_undefined_flag_GCJ='${wl}-z,text' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_GCJ='${wl}-z,text' - allow_undefined_flag_GCJ='${wl}-z,nodefs' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - 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 - -# -# 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 - pic_flag=$lt_prog_compiler_pic_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_cmds=".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 - ;; - -bsdi[45]*) - 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_cmds=".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~ - chmod a+x \$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_cmds='`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* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - 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 - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - 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_cmds='.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_cmds='.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_cmds='.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' - ;; - -interix3*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -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 - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 19203 "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 - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/^ *//;s/#.*//;/^[^\/]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_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 - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - 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_cmds=".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" - ;; - -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.3*) - 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 - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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 - -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 - -{ 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 - - -# 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 LTCFLAGS 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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# 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 - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# 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_cmds='$shrext_cmds' - -# 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"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -compiler_RC=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - -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 LTCFLAGS 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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# 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 - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# 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_cmds='$shrext_cmds' - -# 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 - - - - - - - - - - - - - - - - - - - - - -ac_config_files="$ac_config_files Makefile json.pc" - -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, we kill variables containing newlines. -# 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. -( - for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do - eval ac_val=\$$ac_var - case $ac_val in #( - *${as_nl}*) - case $ac_var in #( - *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 -echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; - esac - case $ac_var in #( - _ | IFS | as_nl) ;; #( - *) $as_unset $ac_var ;; - esac ;; - esac - done - - (set) 2>&1 | - case $as_nl`(ac_space=' '; set) 2>&1` in #( - *${as_nl}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 "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" - ;; - esac | - sort -) | - sed ' - /^ac_cv_env_/b end - t clear - :clear - s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ - t end - 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 "$as_me:$LINENO: updating cache $cache_file" >&5 -echo "$as_me: updating cache $cache_file" >&6;} - cat confcache >$cache_file - else - { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 -echo "$as_me: not updating unwritable cache $cache_file" >&6;} - 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}' - -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_script='s/\$U\././;s/\.o$//;s/\.obj$//' - ac_i=`echo "$ac_i" | sed "$ac_script"` - # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR - # will be set to the directory where LIBOBJS objects are built. - ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" - ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' -done -LIBOBJS=$ac_libobjs - -LTLIBOBJS=$ac_ltlibobjs - - -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__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 - -: ${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 more Bourne compatible -DUALCASE=1; export DUALCASE # for MKS sh -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+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in - *posix*) set -o posix ;; -esac - -fi - - - - -# PATH needs CR -# 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 - -# Support unset when possible. -if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then - as_unset=unset -else - as_unset=false -fi - - -# IFS -# We need space, tab and new line, in precisely that order. Quoting is -# there to prevent editors from complaining about space-tab. -# (If _AS_PATH_WALK were called with IFS unset, it would disable word -# splitting by setting IFS to empty value.) -as_nl=' -' -IFS=" "" $as_nl" - -# Find who we are. Look in the path if we contain no directory separator. -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 -IFS=$as_save_IFS - - ;; -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_myself: error: cannot find myself; rerun with an absolute file name" >&2 - { (exit 1); exit 1; } -fi - -# Work around bugs in pre-3.0 UWIN ksh. -for as_var in ENV MAIL MAILPATH -do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var -done -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) >/dev/null 2>&1 && $as_unset $as_var - fi -done - -# Required to use basename. -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; 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'` - -# CDPATH. -$as_unset CDPATH - - - - as_lineno_1=$LINENO - as_lineno_2=$LINENO - test "x$as_lineno_1" != "x$as_lineno_2" && - test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { - - # 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 after each line using $LINENO; the second 'sed' - # does the real work. The second script uses 'N' to pair each - # line-number line with the line containing $LINENO, 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 - # scripts with optimization help from Paolo Bonzini. Blame Lee - # E. McMahon (1931-1989) for sed's syntax. :-) - sed -n ' - p - /[$]LINENO/= - ' <$as_myself | - sed ' - s/[$]LINENO.*/&-/ - t lineno - b - :lineno - N - :loop - s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ - t loop - s/-\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 sensitive to this). - . "./$as_me.lineno" - # Exit status is that of the last command. - exit -} - - -if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then - as_dirname=dirname -else - as_dirname=false -fi - -ECHO_C= ECHO_N= ECHO_T= -case `echo -n x` in --n*) - case `echo 'x\c'` in - *c*) ECHO_T=' ';; # ECHO_T is single tab character. - *) ECHO_C='\c';; - esac;; -*) - ECHO_N='-n';; -esac - -if expr a : '\(a\)' >/dev/null 2>&1 && - test "X`expr 00001 : '.*\(...\)'`" = X001; then - as_expr=expr -else - as_expr=false -fi - -rm -f conf$$ conf$$.exe conf$$.file -if test -d conf$$.dir; then - rm -f conf$$.dir/conf$$.file -else - rm -f conf$$.dir - mkdir conf$$.dir -fi -echo >conf$$.file -if ln -s conf$$.file conf$$ 2>/dev/null; then - as_ln_s='ln -s' - # ... but there are two gotchas: - # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. - # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. - # In both cases, we have to default to `cp -p'. - ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || - as_ln_s='cp -p' -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$$.dir/conf$$.file conf$$.file -rmdir conf$$.dir 2>/dev/null - -if mkdir -p . 2>/dev/null; then - as_mkdir_p=: -else - test -d ./-p && rmdir ./-p - as_mkdir_p=false -fi - -if test -x / >/dev/null 2>&1; then - as_test_x='test -x' -else - if ls -dL / >/dev/null 2>&1; then - as_ls_L_option=L - else - as_ls_L_option= - fi - as_test_x=' - eval sh -c '\'' - if test -d "$1"; then - test -d "$1/."; - else - case $1 in - -*)set "./$1";; - esac; - case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in - ???[sx]*):;;*)false;;esac;fi - '\'' sh - ' -fi -as_executable_p=$as_test_x - -# 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'" - - -exec 6>&1 - -# Save the log message, to keep $[0] and so on meaningful, and to -# report actual input values of CONFIG_FILES etc. instead of their -# values after options handling. -ac_log=" -This file was extended by JSON C Library $as_me 0.3, which was -generated by GNU Autoconf 2.61. Invocation command line was - - CONFIG_FILES = $CONFIG_FILES - CONFIG_HEADERS = $CONFIG_HEADERS - CONFIG_LINKS = $CONFIG_LINKS - CONFIG_COMMANDS = $CONFIG_COMMANDS - $ $0 $@ - -on `(hostname || uname -n) 2>/dev/null | sed 1q` -" - -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -# Files that config.status was made for. -config_files="$ac_config_files" -config_headers="$ac_config_headers" -config_commands="$ac_config_commands" - -_ACEOF - -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 and configuration settings, 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="\\ -JSON C Library config.status 0.3 -configured by $0, generated by GNU Autoconf 2.61, - with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" - -Copyright (C) 2006 Free Software Foundation, Inc. -This config.status script is free software; the Free Software Foundation -gives unlimited permission to copy, distribute and modify it." - -ac_pwd='$ac_pwd' -srcdir='$srcdir' -INSTALL='$INSTALL' -MKDIR_P='$MKDIR_P' -_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 - ;; - esac - - case $ac_option in - # Handling of the options. - -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) - ac_cs_recheck=: ;; - --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) - echo "$ac_cs_version"; exit ;; - --debug | --debu | --deb | --de | --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;; - --he | --h) - # Conflict between --help and --header - { 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 ;; - -q | -quiet | --quiet | --quie | --qui | --qu | --q \ - | -silent | --silent | --silen | --sile | --sil | --si | --s) - ac_cs_silent=: ;; - - # This is an error. - -*) { 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" - ac_need_defaults=false ;; - - 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 CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 - CONFIG_SHELL=$SHELL - export CONFIG_SHELL - exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion -fi - -_ACEOF -cat >>$CONFIG_STATUS <<\_ACEOF -exec 5>>config.log -{ - echo - sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX -## Running $as_me. ## -_ASBOX - echo "$ac_log" -} >&5 - -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF -# -# INIT-COMMANDS -# -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" - -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF - -# Handling of arguments. -for ac_config_target in $ac_config_targets -do - case $ac_config_target in - "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; - "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; - "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "json.pc") CONFIG_FILES="$CONFIG_FILES json.pc" ;; - - *) { { 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 against having it here, and in addition, -# creating and moving files from /tmp can sometimes cause problems. -# Hook for its removal unless debugging. -# Note that there is a small window in which the directory will not be cleaned: -# after its creation but before its name has been assigned to `$tmp'. -$debug || -{ - tmp= - trap 'exit_status=$? - { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$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 "./confXXXXXX") 2>/dev/null` && - test -n "$tmp" && test -d "$tmp" -} || -{ - tmp=./conf$$-$RANDOM - (umask 077 && mkdir "$tmp") -} || -{ - echo "$me: cannot create a temporary directory in ." >&2 - { (exit 1); exit 1; } -} - -# -# Set up the sed scripts for 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 - -_ACEOF - - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -SHELL!$SHELL$ac_delim -PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim -PACKAGE_NAME!$PACKAGE_NAME$ac_delim -PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim -PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim -PACKAGE_STRING!$PACKAGE_STRING$ac_delim -PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim -exec_prefix!$exec_prefix$ac_delim -prefix!$prefix$ac_delim -program_transform_name!$program_transform_name$ac_delim -bindir!$bindir$ac_delim -sbindir!$sbindir$ac_delim -libexecdir!$libexecdir$ac_delim -datarootdir!$datarootdir$ac_delim -datadir!$datadir$ac_delim -sysconfdir!$sysconfdir$ac_delim -sharedstatedir!$sharedstatedir$ac_delim -localstatedir!$localstatedir$ac_delim -includedir!$includedir$ac_delim -oldincludedir!$oldincludedir$ac_delim -docdir!$docdir$ac_delim -infodir!$infodir$ac_delim -htmldir!$htmldir$ac_delim -dvidir!$dvidir$ac_delim -pdfdir!$pdfdir$ac_delim -psdir!$psdir$ac_delim -libdir!$libdir$ac_delim -localedir!$localedir$ac_delim -mandir!$mandir$ac_delim -DEFS!$DEFS$ac_delim -ECHO_C!$ECHO_C$ac_delim -ECHO_N!$ECHO_N$ac_delim -ECHO_T!$ECHO_T$ac_delim -LIBS!$LIBS$ac_delim -build_alias!$build_alias$ac_delim -host_alias!$host_alias$ac_delim -target_alias!$target_alias$ac_delim -INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim -INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim -INSTALL_DATA!$INSTALL_DATA$ac_delim -am__isrc!$am__isrc$ac_delim -CYGPATH_W!$CYGPATH_W$ac_delim -PACKAGE!$PACKAGE$ac_delim -VERSION!$VERSION$ac_delim -ACLOCAL!$ACLOCAL$ac_delim -AUTOCONF!$AUTOCONF$ac_delim -AUTOMAKE!$AUTOMAKE$ac_delim -AUTOHEADER!$AUTOHEADER$ac_delim -MAKEINFO!$MAKEINFO$ac_delim -install_sh!$install_sh$ac_delim -STRIP!$STRIP$ac_delim -INSTALL_STRIP_PROGRAM!$INSTALL_STRIP_PROGRAM$ac_delim -mkdir_p!$mkdir_p$ac_delim -AWK!$AWK$ac_delim -SET_MAKE!$SET_MAKE$ac_delim -am__leading_dot!$am__leading_dot$ac_delim -AMTAR!$AMTAR$ac_delim -am__tar!$am__tar$ac_delim -am__untar!$am__untar$ac_delim -CC!$CC$ac_delim -CFLAGS!$CFLAGS$ac_delim -LDFLAGS!$LDFLAGS$ac_delim -CPPFLAGS!$CPPFLAGS$ac_delim -ac_ct_CC!$ac_ct_CC$ac_delim -EXEEXT!$EXEEXT$ac_delim -OBJEXT!$OBJEXT$ac_delim -DEPDIR!$DEPDIR$ac_delim -am__include!$am__include$ac_delim -am__quote!$am__quote$ac_delim -AMDEP_TRUE!$AMDEP_TRUE$ac_delim -AMDEP_FALSE!$AMDEP_FALSE$ac_delim -AMDEPBACKSLASH!$AMDEPBACKSLASH$ac_delim -CCDEPMODE!$CCDEPMODE$ac_delim -am__fastdepCC_TRUE!$am__fastdepCC_TRUE$ac_delim -am__fastdepCC_FALSE!$am__fastdepCC_FALSE$ac_delim -CPP!$CPP$ac_delim -GREP!$GREP$ac_delim -EGREP!$EGREP$ac_delim -LIBOBJS!$LIBOBJS$ac_delim -build!$build$ac_delim -build_cpu!$build_cpu$ac_delim -build_vendor!$build_vendor$ac_delim -build_os!$build_os$ac_delim -host!$host$ac_delim -host_cpu!$host_cpu$ac_delim -host_vendor!$host_vendor$ac_delim -host_os!$host_os$ac_delim -SED!$SED$ac_delim -LN_S!$LN_S$ac_delim -ECHO!$ECHO$ac_delim -AR!$AR$ac_delim -RANLIB!$RANLIB$ac_delim -CXX!$CXX$ac_delim -CXXFLAGS!$CXXFLAGS$ac_delim -ac_ct_CXX!$ac_ct_CXX$ac_delim -CXXDEPMODE!$CXXDEPMODE$ac_delim -am__fastdepCXX_TRUE!$am__fastdepCXX_TRUE$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -CEOF$ac_eof -_ACEOF - - -ac_delim='%!_!# ' -for ac_last_try in false false false false false :; do - cat >conf$$subs.sed <<_ACEOF -am__fastdepCXX_FALSE!$am__fastdepCXX_FALSE$ac_delim -CXXCPP!$CXXCPP$ac_delim -F77!$F77$ac_delim -FFLAGS!$FFLAGS$ac_delim -ac_ct_F77!$ac_ct_F77$ac_delim -LIBTOOL!$LIBTOOL$ac_delim -LTLIBOBJS!$LTLIBOBJS$ac_delim -_ACEOF - - if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 7; then - break - elif $ac_last_try; then - { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 -echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} - { (exit 1); exit 1; }; } - else - ac_delim="$ac_delim!$ac_delim _$ac_delim!! " - fi -done - -ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` -if test -n "$ac_eof"; then - ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` - ac_eof=`expr $ac_eof + 1` -fi - -cat >>$CONFIG_STATUS <<_ACEOF -cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof -/@[a-zA-Z_][a-zA-Z_0-9]*@/!b end -_ACEOF -sed ' -s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g -s/^/s,@/; s/!/@,|#_!!_#|/ -:n -t n -s/'"$ac_delim"'$/,g/; t -s/$/\\/; p -N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n -' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF -:end -s/|#_!!_#|//g -CEOF$ac_eof -_ACEOF - - -# 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 - -cat >>$CONFIG_STATUS <<\_ACEOF -fi # test -n "$CONFIG_FILES" - - -for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS -do - case $ac_tag in - :[FHLC]) ac_mode=$ac_tag; continue;; - esac - case $ac_mode$ac_tag in - :[FHL]*:*);; - :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 -echo "$as_me: error: Invalid tag $ac_tag." >&2;} - { (exit 1); exit 1; }; };; - :[FH]-) ac_tag=-:-;; - :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; - esac - ac_save_IFS=$IFS - IFS=: - set x $ac_tag - IFS=$ac_save_IFS - shift - ac_file=$1 - shift - - case $ac_mode in - :L) ac_source=$1;; - :[FH]) - ac_file_inputs= - for ac_f - do - case $ac_f in - -) ac_f="$tmp/stdin";; - *) # Look for the file first in the build tree, then in the source tree - # (if the path is not absolute). The absolute path cannot be DOS-style, - # because $ac_f cannot contain `:'. - test -f "$ac_f" || - case $ac_f in - [\\/$]*) false;; - *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; - esac || - { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 -echo "$as_me: error: cannot find input file: $ac_f" >&2;} - { (exit 1); exit 1; }; };; - esac - ac_file_inputs="$ac_file_inputs $ac_f" - done - - # 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. */ - configure_input="Generated from "`IFS=: - echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." - if test x"$ac_file" != x-; then - configure_input="$ac_file. $configure_input" - { echo "$as_me:$LINENO: creating $ac_file" >&5 -echo "$as_me: creating $ac_file" >&6;} - fi - - case $ac_tag in - *:-:* | *:-) cat >"$tmp/stdin";; - esac - ;; - esac - - ac_dir=`$as_dirname -- "$ac_file" || -$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'` - { as_dir="$ac_dir" - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$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'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - ac_builddir=. - -case "$ac_dir" in -.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; -*) - ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` - # A ".." for each directory in $ac_dir_suffix. - ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` - case $ac_top_builddir_sub in - "") ac_top_builddir_sub=. ac_top_build_prefix= ;; - *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; - esac ;; -esac -ac_abs_top_builddir=$ac_pwd -ac_abs_builddir=$ac_pwd$ac_dir_suffix -# for backward compatibility: -ac_top_builddir=$ac_top_build_prefix - -case $srcdir in - .) # We are building in place. - ac_srcdir=. - ac_top_srcdir=$ac_top_builddir_sub - ac_abs_top_srcdir=$ac_pwd ;; - [\\/]* | ?:[\\/]* ) # Absolute name. - ac_srcdir=$srcdir$ac_dir_suffix; - ac_top_srcdir=$srcdir - ac_abs_top_srcdir=$srcdir ;; - *) # Relative name. - ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix - ac_top_srcdir=$ac_top_build_prefix$srcdir - ac_abs_top_srcdir=$ac_pwd/$srcdir ;; -esac -ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix - - - case $ac_mode in - :F) - # - # CONFIG_FILE - # - - case $INSTALL in - [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; - *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; - esac - ac_MKDIR_P=$MKDIR_P - case $MKDIR_P in - [\\/$]* | ?:[\\/]* ) ;; - */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; - esac -_ACEOF - -cat >>$CONFIG_STATUS <<\_ACEOF -# If the template does not know about datarootdir, expand it. -# FIXME: This hack should be removed a few years after 2.60. -ac_datarootdir_hack=; ac_datarootdir_seen= - -case `sed -n '/datarootdir/ { - p - q -} -/@datadir@/p -/@docdir@/p -/@infodir@/p -/@localedir@/p -/@mandir@/p -' $ac_file_inputs` in -*datarootdir*) ac_datarootdir_seen=yes;; -*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) - { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 -echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} -_ACEOF -cat >>$CONFIG_STATUS <<_ACEOF - ac_datarootdir_hack=' - s&@datadir@&$datadir&g - s&@docdir@&$docdir&g - s&@infodir@&$infodir&g - s&@localedir@&$localedir&g - s&@mandir@&$mandir&g - s&\\\${datarootdir}&$datarootdir&g' ;; -esac -_ACEOF - -# Neutralize VPATH when `$srcdir' = `.'. -# Shell code in configure.ac might set extrasub. -# FIXME: do we really want to maintain this feature? -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&@top_builddir@&$ac_top_builddir_sub&;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&@abs_top_builddir@&$ac_abs_top_builddir&;t t -s&@INSTALL@&$ac_INSTALL&;t t -s&@MKDIR_P@&$ac_MKDIR_P&;t t -$ac_datarootdir_hack -" $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out - -test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && - { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && - { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && - { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&5 -echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' -which seems to be undefined. Please make sure it is defined." >&2;} - - rm -f "$tmp/stdin" - case $ac_file in - -) cat "$tmp/out"; rm -f "$tmp/out";; - *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; - esac - ;; - :H) - # - # CONFIG_HEADER - # -_ACEOF - -# Transform confdefs.h into a sed script `conftest.defines', that -# substitutes the proper values into config.h.in to produce config.h. -rm -f conftest.defines conftest.tail -# First, append a space to every undef/define line, to ease matching. -echo 's/$/ /' >conftest.defines -# Then, protect against being on the right side of a sed subst, or in -# an unquoted here document, in config.status. If some macros were -# called several times there might be several #defines for the same -# symbol, which is useless. But do not sort them, since the last -# AC_DEFINE must be honored. -ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* -# These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where -# NAME is the cpp macro being defined, VALUE is the value it is being given. -# PARAMS is the parameter list in the macro definition--in most cases, it's -# just an empty string. -ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' -ac_dB='\\)[ (].*,\\1define\\2' -ac_dC=' ' -ac_dD=' ,' - -uniq confdefs.h | - sed -n ' - t rset - :rset - s/^[ ]*#[ ]*define[ ][ ]*// - t ok - d - :ok - s/[\\&,]/\\&/g - s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p - s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p - ' >>conftest.defines - -# Remove the space that was appended to ease matching. -# Then replace #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. -# (The regexp can be short, since the line contains either #define or #undef.) -echo 's/ $// -s,^[ #]*u.*,/* & */,' >>conftest.defines - -# Break up conftest.defines: -ac_max_sed_lines=50 - -# First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" -# Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" -# Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" -# et cetera. -ac_in='$ac_file_inputs' -ac_out='"$tmp/out1"' -ac_nxt='"$tmp/out2"' - -while : -do - # Write a here document: - cat >>$CONFIG_STATUS <<_ACEOF - # First, check the format of the line: - cat >"\$tmp/defines.sed" <<\\CEOF -/^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def -/^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def -b -:def -_ACEOF - sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS - echo 'CEOF - sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS - ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in - sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail - grep . conftest.tail >/dev/null || break - rm -f conftest.defines - mv conftest.tail conftest.defines -done -rm -f conftest.defines conftest.tail - -echo "ac_result=$ac_in" >>$CONFIG_STATUS -cat >>$CONFIG_STATUS <<\_ACEOF - if test x"$ac_file" != x-; then - echo "/* $configure_input */" >"$tmp/config.h" - cat "$ac_result" >>"$tmp/config.h" - 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 - rm -f $ac_file - mv "$tmp/config.h" $ac_file - fi - else - echo "/* $configure_input */" - cat "$ac_result" - fi - rm -f "$tmp/out12" -# 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" >`$as_dirname -- $ac_file || -$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 - ;; - - :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 -echo "$as_me: executing $ac_file commands" >&6;} - ;; - esac - - - case $ac_file$ac_mode in - "depfiles":C) 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. - # Grep'ing the whole file is not good either: AIX grep has a line - # limit of 2048, but all sed's we know have understand at least 4000. - if sed 10q "$mf" | grep '^#.*generated by automake' > /dev/null 2>&1; then - dirpart=`$as_dirname -- "$mf" || -$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 - # Extract the definition of DEPDIR, am__include, and am__quote - # from the Makefile without running `make'. - DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` - test -z "$DEPDIR" && continue - am__include=`sed -n 's/^am__include = //p' < "$mf"` - test -z "am__include" && continue - am__quote=`sed -n 's/^am__quote = //p' < "$mf"` - # When using ansi2knr, U may be empty or an underscore; expand it - U=`sed -n 's/^U = //p' < "$mf"` - # Find all dependency output files, they are included files with - # $(DEPDIR) in their names. 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 " - s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/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_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'` - { as_dir=$dirpart/$fdir - case $as_dir in #( - -*) as_dir=./$as_dir;; - esac - test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { - as_dirs= - while :; do - case $as_dir in #( - *\'*) as_qdir=`echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #( - *) as_qdir=$as_dir;; - esac - as_dirs="'$as_qdir' $as_dirs" - as_dir=`$as_dirname -- "$as_dir" || -$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'` - test -d "$as_dir" && break - done - test -z "$as_dirs" || eval "mkdir $as_dirs" - } || test -d "$as_dir" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 -echo "$as_me: error: cannot create directory $as_dir" >&2;} - { (exit 1); exit 1; }; }; } - # echo "creating $dirpart/$file" - echo '# dummy' > "$dirpart/$file" - done -done - ;; - - esac -done # for ac_tag - - -{ (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 - diff --git a/client/json-c-0.7/configure.in b/client/json-c-0.7/configure.in deleted file mode 100644 index f0a7d3aa5..000000000 --- a/client/json-c-0.7/configure.in +++ /dev/null @@ -1,33 +0,0 @@ -AC_PREREQ(2.52) - -# Process this file with autoconf to produce a configure script. -AC_INIT([JSON C Library], 0.3, [michael@metaparadigm.com], [json-c]) - -AM_INIT_AUTOMAKE(AC_PACKAGE_NAME, AC_PACKAGE_VERSION) - -# Checks for programs. - -# Checks for libraries. - -# Checks for header files. -AM_CONFIG_HEADER(config.h) -AC_HEADER_STDC -AC_CHECK_HEADERS(fcntl.h limits.h strings.h syslog.h unistd.h [sys/param.h] stdarg.h) - -# Checks for typedefs, structures, and compiler characteristics. -AC_C_CONST -AC_TYPE_SIZE_T - -# Checks for library functions. -AC_FUNC_VPRINTF -AC_FUNC_MEMCMP -AC_FUNC_MALLOC -AC_FUNC_REALLOC -AC_CHECK_FUNCS(strndup strerror vsnprintf vasprintf open vsyslog strncasecmp) - -AM_PROG_LIBTOOL - -AC_OUTPUT([ -Makefile -json.pc -]) diff --git a/client/json-c-0.7/debug.c b/client/json-c-0.7/debug.c deleted file mode 100644 index eaa6fca33..000000000 --- a/client/json-c-0.7/debug.c +++ /dev/null @@ -1,94 +0,0 @@ -/* - * $Id: debug.c,v 1.5 2006/01/26 02:16:28 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#include "config.h" - -#include -#include -#include -#include - -#if HAVE_SYSLOG_H -# include -#endif /* HAVE_SYSLOG_H */ - -#if HAVE_UNISTD_H -# include -#endif /* HAVE_UNISTD_H */ - -#if HAVE_SYS_PARAM_H -#include -#endif /* HAVE_SYS_PARAM_H */ - -#include "debug.h" - -static int _syslog = 0; -static int _debug = 0; - -void mc_set_debug(int debug) { _debug = debug; } -int mc_get_debug() { return _debug; } - -extern void mc_set_syslog(int syslog) -{ - _syslog = syslog; -} - -void mc_abort(const char *msg, ...) -{ - va_list ap; - va_start(ap, msg); -#if HAVE_VSYSLOG - if(_syslog) { - vsyslog(LOG_ERR, msg, ap); - } else -#endif - vprintf(msg, ap); - exit(1); -} - - -void mc_debug(const char *msg, ...) -{ - va_list ap; - if(_debug) { - va_start(ap, msg); -#if HAVE_VSYSLOG - if(_syslog) { - vsyslog(LOG_DEBUG, msg, ap); - } else -#endif - vprintf(msg, ap); - } -} - -void mc_error(const char *msg, ...) -{ - va_list ap; - va_start(ap, msg); -#if HAVE_VSYSLOG - if(_syslog) { - vsyslog(LOG_ERR, msg, ap); - } else -#endif - vfprintf(stderr, msg, ap); -} - -void mc_info(const char *msg, ...) -{ - va_list ap; - va_start(ap, msg); -#if HAVE_VSYSLOG - if(_syslog) { - vsyslog(LOG_INFO, msg, ap); - } else -#endif - vfprintf(stderr, msg, ap); -} diff --git a/client/json-c-0.7/debug.h b/client/json-c-0.7/debug.h deleted file mode 100644 index 1db69ef01..000000000 --- a/client/json-c-0.7/debug.h +++ /dev/null @@ -1,24 +0,0 @@ -/* - * $Id: debug.h,v 1.5 2006/01/30 23:07:57 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#ifndef _DEBUG_H_ -#define _DEBUG_H_ - -extern void mc_set_debug(int debug); -extern int mc_get_debug(); - -extern void mc_set_syslog(int syslog); -extern void mc_abort(const char *msg, ...); -extern void mc_debug(const char *msg, ...); -extern void mc_error(const char *msg, ...); -extern void mc_info(const char *msg, ...); - -#endif diff --git a/client/json-c-0.7/depcomp b/client/json-c-0.7/depcomp deleted file mode 100755 index 04701da53..000000000 --- a/client/json-c-0.7/depcomp +++ /dev/null @@ -1,530 +0,0 @@ -#! /bin/sh -# depcomp - compile a program generating dependencies as side-effects - -scriptversion=2005-07-09.11 - -# Copyright (C) 1999, 2000, 2003, 2004, 2005 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., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, 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 Alexandre Oliva . - -case $1 in - '') - echo "$0: No command. Try \`$0 --help' for more information." 1>&2 - exit 1; - ;; - -h | --h*) - cat <<\EOF -Usage: depcomp [--help] [--version] PROGRAM [ARGS] - -Run PROGRAMS ARGS to compile a file, generating dependencies -as side-effects. - -Environment variables: - depmode Dependency tracking mode. - source Source file read by `PROGRAMS ARGS'. - object Object file output by `PROGRAMS ARGS'. - DEPDIR directory where to store dependencies. - depfile Dependency file to output. - tmpdepfile Temporary file to use when outputing dependencies. - libtool Whether libtool is used (yes/no). - -Report bugs to . -EOF - exit $? - ;; - -v | --v*) - echo "depcomp $scriptversion" - exit $? - ;; -esac - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi - -# Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. -depfile=${depfile-`echo "$object" | - sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} -tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} - -rm -f "$tmpdepfile" - -# 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 - # With Tru64 cc, shared objects can also be used to make a - # static library. This mecanism is used in libtool 1.4 series to - # handle both shared and static libraries in a single compilation. - # With libtool 1.4, dependencies were output in $dir.libs/$base.lo.d. - # - # With libtool 1.5 this exception was removed, and libtool now - # generates 2 separate objects for the 2 libraries. These two - # compilations output dependencies in in $dir.libs/$base.o.d and - # in $dir$base.o.d. We have to check for both files, because - # one of the two compilations can be disabled. We should prefer - # $dir$base.o.d over $dir.libs/$base.o.d because the latter is - # automatically cleaned when .libs/ is deleted, while ignoring - # the former would cause a distcleancheck panic. - tmpdepfile1=$dir.libs/$base.lo.d # libtool 1.4 - tmpdepfile2=$dir$base.o.d # libtool 1.5 - tmpdepfile3=$dir.libs/$base.o.d # libtool 1.5 - tmpdepfile4=$dir.libs/$base.d # Compaq CCC V6.2-504 - "$@" -Wc,-MD - else - tmpdepfile1=$dir$base.o.d - tmpdepfile2=$dir$base.d - tmpdepfile3=$dir$base.d - tmpdepfile4=$dir$base.d - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - exit $stat - fi - - for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" "$tmpdepfile4" - do - test -f "$tmpdepfile" && break - done - 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 -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ - -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - rm -f "$depfile" - echo "$object : \\" > "$depfile" - cat < "$tmpdepfile" >> "$depfile" - sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" - rm -f "$tmpdepfile" - ;; - -msvisualcpp) - # Important note: in order to support this mode, a compiler *must* - # always write the preprocessed file to stdout, 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 - -# Local Variables: -# mode: shell-script -# sh-indentation: 2 -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/client/json-c-0.7/install-sh b/client/json-c-0.7/install-sh deleted file mode 100755 index 4d4a9519e..000000000 --- a/client/json-c-0.7/install-sh +++ /dev/null @@ -1,323 +0,0 @@ -#!/bin/sh -# install - install a program, script, or datafile - -scriptversion=2005-05-14.22 - -# This originates from X11R5 (mit/util/scripts/install.sh), which was -# later released in X11R6 (xc/config/util/install.sh) with the -# following copyright and license. -# -# Copyright (C) 1994 X Consortium -# -# Permission is hereby granted, free of charge, to any person obtaining a copy -# of this software and associated documentation files (the "Software"), to -# deal in the Software without restriction, including without limitation the -# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or -# sell copies of the Software, and to permit persons to whom the Software is -# furnished to do so, subject to the following conditions: -# -# The above copyright notice and this permission notice shall be included in -# all copies or substantial portions of the Software. -# -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN -# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- -# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. -# -# Except as contained in this notice, the name of the X Consortium shall not -# be used in advertising or otherwise to promote the sale, use or other deal- -# ings in this Software without prior written authorization from the X Consor- -# tium. -# -# -# FSF changes to this file are in the public domain. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -chmodcmd="$chmodprog 0755" -chowncmd= -chgrpcmd= -stripcmd= -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src= -dst= -dir_arg= -dstarg= -no_target_directory= - -usage="Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE - or: $0 [OPTION]... SRCFILES... DIRECTORY - or: $0 [OPTION]... -t DIRECTORY SRCFILES... - or: $0 [OPTION]... -d DIRECTORIES... - -In the 1st form, copy SRCFILE to DSTFILE. -In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. -In the 4th, create DIRECTORIES. - -Options: --c (ignored) --d create directories instead of installing files. --g GROUP $chgrpprog installed files to GROUP. --m MODE $chmodprog installed files to MODE. --o USER $chownprog installed files to USER. --s $stripprog installed files. --t DIRECTORY install into DIRECTORY. --T report an error if DSTFILE is a directory. ---help display this help and exit. ---version display version info and exit. - -Environment variables override the default commands: - CHGRPPROG CHMODPROG CHOWNPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG -" - -while test -n "$1"; do - case $1 in - -c) shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - --help) echo "$usage"; exit $?;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -s) stripcmd=$stripprog - shift - continue;; - - -t) dstarg=$2 - shift - shift - continue;; - - -T) no_target_directory=true - shift - continue;; - - --version) echo "$0 $scriptversion"; exit $?;; - - *) # When -d is used, all remaining arguments are directories to create. - # When -t is used, the destination is already specified. - test -n "$dir_arg$dstarg" && break - # Otherwise, the last argument is the destination. Remove it from $@. - for arg - do - if test -n "$dstarg"; then - # $@ is not empty: it contains at least $arg. - set fnord "$@" "$dstarg" - shift # fnord - fi - shift # arg - dstarg=$arg - done - break;; - esac -done - -if test -z "$1"; then - if test -z "$dir_arg"; then - echo "$0: no input file specified." >&2 - exit 1 - fi - # It's OK to call `install-sh -d' without argument. - # This can happen when creating conditional directories. - exit 0 -fi - -for src -do - # Protect names starting with `-'. - case $src in - -*) src=./$src ;; - esac - - if test -n "$dir_arg"; then - dst=$src - src= - - if test -d "$dst"; then - mkdircmd=: - chmodcmd= - else - mkdircmd=$mkdirprog - fi - else - # Waiting for this to be detected by the "$cpprog $src $dsttmp" command - # might cause directories to be created, which would be especially bad - # if $src (and thus $dsttmp) contains '*'. - if test ! -f "$src" && test ! -d "$src"; then - echo "$0: $src does not exist." >&2 - exit 1 - fi - - if test -z "$dstarg"; then - echo "$0: no destination specified." >&2 - exit 1 - fi - - dst=$dstarg - # Protect names starting with `-'. - case $dst in - -*) dst=./$dst ;; - esac - - # If destination is a directory, append the input filename; won't work - # if double slashes aren't ignored. - if test -d "$dst"; then - if test -n "$no_target_directory"; then - echo "$0: $dstarg: Is a directory" >&2 - exit 1 - fi - dst=$dst/`basename "$src"` - fi - fi - - # This sed command emulates the dirname command. - dstdir=`echo "$dst" | sed -e 's,/*$,,;s,[^/]*$,,;s,/*$,,;s,^$,.,'` - - # Make sure that the destination directory exists. - - # Skip lots of stat calls in the usual case. - if test ! -d "$dstdir"; then - defaultIFS=' - ' - IFS="${IFS-$defaultIFS}" - - oIFS=$IFS - # Some sh's can't handle IFS=/ for some reason. - IFS='%' - set x `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'` - shift - IFS=$oIFS - - pathcomp= - - while test $# -ne 0 ; do - pathcomp=$pathcomp$1 - shift - if test ! -d "$pathcomp"; then - $mkdirprog "$pathcomp" - # mkdir can fail with a `File exist' error in case several - # install-sh are creating the directory concurrently. This - # is OK. - test -d "$pathcomp" || exit - fi - pathcomp=$pathcomp/ - done - fi - - if test -n "$dir_arg"; then - $doit $mkdircmd "$dst" \ - && { test -z "$chowncmd" || $doit $chowncmd "$dst"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dst"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dst"; } - - else - dstfile=`basename "$dst"` - - # Make a couple of temp file names in the proper directory. - dsttmp=$dstdir/_inst.$$_ - rmtmp=$dstdir/_rm.$$_ - - # Trap to clean up those temp files at exit. - trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 - trap '(exit $?); exit' 1 2 13 15 - - # Copy the file name to the temp name. - $doit $cpprog "$src" "$dsttmp" && - - # and set any options; do chmod last to preserve setuid bits. - # - # If any of these fail, we abort the whole thing. If we want to - # ignore errors from any of these, just make sure not to ignore - # errors from the above "$doit $cpprog $src $dsttmp" command. - # - { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } \ - && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } \ - && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } \ - && { test -z "$chmodcmd" || $doit $chmodcmd "$dsttmp"; } && - - # Now rename the file to the real destination. - { $doit $mvcmd -f "$dsttmp" "$dstdir/$dstfile" 2>/dev/null \ - || { - # The rename failed, perhaps because mv can't rename something else - # to itself, or perhaps because mv is so ancient that it does not - # support -f. - - # Now remove or move aside any old file at destination location. - # We try this two ways since rm can't unlink itself on some - # systems and the destination file might be busy for other - # reasons. In this case, the final cleanup might fail but the new - # file should still install successfully. - { - if test -f "$dstdir/$dstfile"; then - $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null \ - || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null \ - || { - echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 - (exit 1); exit 1 - } - else - : - fi - } && - - # Now rename the file to the real destination. - $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" - } - } - fi || { (exit 1); exit 1; } -done - -# The final little trick to "correctly" pass the exit status to the exit trap. -{ - (exit 0); exit 0 -} - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/client/json-c-0.7/json-c.vcproj b/client/json-c-0.7/json-c.vcproj deleted file mode 100644 index 0b8875445..000000000 --- a/client/json-c-0.7/json-c.vcproj +++ /dev/null @@ -1,179 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/client/json-c-0.7/json.h b/client/json-c-0.7/json.h deleted file mode 100644 index a5a3432b2..000000000 --- a/client/json-c-0.7/json.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * $Id: json.h,v 1.6 2006/01/26 02:16:28 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#ifndef _json_h_ -#define _json_h_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include "bits.h" -#include "debug.h" -#include "linkhash.h" -#include "arraylist.h" -#include "json_util.h" -#include "json_object.h" -#include "json_tokener.h" - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/client/json-c-0.7/json.pc.in b/client/json-c-0.7/json.pc.in deleted file mode 100644 index b3d140be9..000000000 --- a/client/json-c-0.7/json.pc.in +++ /dev/null @@ -1,11 +0,0 @@ -prefix=@prefix@ -exec_prefix=@exec_prefix@ -libdir=@libdir@ -includedir=@includedir@ - -Name: json -Description: JSON implementation in C -Version: @VERSION@ -Requires: -Libs: -L${libdir} -ljson -Cflags: -I${includedir}/json diff --git a/client/json-c-0.7/json_object.c b/client/json-c-0.7/json_object.c deleted file mode 100644 index 51139e9ad..000000000 --- a/client/json-c-0.7/json_object.c +++ /dev/null @@ -1,513 +0,0 @@ -/* - * $Id: json_object.c,v 1.17 2006/07/25 03:24:50 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#include "config.h" - -#include -#include -#include -#include - -#include "debug.h" -#include "printbuf.h" -#include "linkhash.h" -#include "arraylist.h" -#include "json_object.h" -#include "json_object_private.h" -#include "json_tokener.h" - -#if !HAVE_STRNDUP - char* strndup(const char* str, size_t n); -#endif /* !HAVE_STRNDUP */ - -/* #define REFCOUNT_DEBUG 1 */ - -char *json_number_chars = "0123456789.+-e"; -char *json_hex_chars = "0123456789abcdef"; - -#ifdef REFCOUNT_DEBUG -static char* json_type_name[] = { - "null", - "boolean", - "double", - "int", - "object", - "array", - "string", -}; -#endif /* REFCOUNT_DEBUG */ - -static void json_object_generic_delete(struct json_object* this); -static struct json_object* json_object_new(enum json_type o_type); - - -/* ref count debugging */ - -#ifdef REFCOUNT_DEBUG - -static struct lh_table *json_object_table; - -static void json_object_init() __attribute__ ((constructor)); -static void json_object_init() { - mc_debug("json_object_init: creating object table\n"); - json_object_table = lh_kptr_table_new(128, "json_object_table", NULL); -} - -static void json_object_fini() __attribute__ ((destructor)); -static void json_object_fini() { - struct lh_entry *ent; - if(mc_get_debug() && json_object_table->count) { - mc_debug("json_object_fini: %d referenced objects at exit\n", - json_object_table->count); - lh_foreach(json_object_table, ent) { - struct json_object* obj = (struct json_object*)ent->v; - mc_debug("\t%s:%p\n", json_type_name[obj->o_type], obj); - } - } - mc_debug("json_object_fini: freeing object table\n"); - lh_table_free(json_object_table); -} -#endif /* REFCOUNT_DEBUG */ - - -/* string escaping */ - -static int json_escape_str(struct printbuf *pb, char *str) -{ - int pos = 0, start_offset = 0; - unsigned char c; - do { - c = str[pos]; - switch(c) { - case '\0': - break; - case '\b': - case '\n': - case '\r': - case '\t': - // case '/': - // case '\\': - case '"': - case '\\': - case '/': - if(pos - start_offset > 0) - printbuf_memappend(pb, str + start_offset, pos - start_offset); - if(c == '\b') printbuf_memappend(pb, "\\b", 2); - else if(c == '\n') printbuf_memappend(pb, "\\n", 2); - else if(c == '\r') printbuf_memappend(pb, "\\r", 2); - else if(c == '\t') printbuf_memappend(pb, "\\t", 2); - // else if(c == '/') printbuf_memappend(pb, "\/", 2); - // else if(c == '\\') printbuf_memappend(pb, "\\\\", 2); - else if(c == '"') printbuf_memappend(pb, "\\\"", 2); - else if(c == '\\') printbuf_memappend(pb, "\\\\", 2); - else if(c == '/') printbuf_memappend(pb, "\\/", 2); - start_offset = ++pos; - break; - default: - if(c < ' ') { - if(pos - start_offset > 0) - printbuf_memappend(pb, str + start_offset, pos - start_offset); - sprintbuf(pb, "\\u00%c%c", - json_hex_chars[c >> 4], - json_hex_chars[c & 0xf]); - start_offset = ++pos; - } else pos++; - } - } while(c); - if(pos - start_offset > 0) - printbuf_memappend(pb, str + start_offset, pos - start_offset); - return 0; -} - - -/* reference counting */ - -extern struct json_object* json_object_get(struct json_object *this) -{ - if(this) { - this->_ref_count++; - } - return this; -} - -extern void json_object_put(struct json_object *this) -{ - if(this) { - this->_ref_count--; - if(!this->_ref_count) this->_delete(this); - } -} - - -/* generic object construction and destruction parts */ - -static void json_object_generic_delete(struct json_object* this) -{ -#ifdef REFCOUNT_DEBUG - mc_debug("json_object_delete_%s: %p\n", - json_type_name[this->o_type], this); - lh_table_delete(json_object_table, this); -#endif /* REFCOUNT_DEBUG */ - printbuf_free(this->_pb); - free(this); -} - -static struct json_object* json_object_new(enum json_type o_type) -{ - struct json_object *this = calloc(sizeof(struct json_object), 1); - if(!this) return NULL; - this->o_type = o_type; - this->_ref_count = 1; - this->_delete = &json_object_generic_delete; -#ifdef REFCOUNT_DEBUG - lh_table_insert(json_object_table, this, this); - mc_debug("json_object_new_%s: %p\n", json_type_name[this->o_type], this); -#endif /* REFCOUNT_DEBUG */ - return this; -} - - -/* type checking functions */ - -int json_object_is_type(struct json_object *this, enum json_type type) -{ - return (this->o_type == type); -} - -enum json_type json_object_get_type(struct json_object *this) -{ - return this->o_type; -} - - -/* json_object_to_json_string */ - -char* json_object_to_json_string(struct json_object *this) -{ - if(!this) return "null"; - if(!this->_pb) { - if(!(this->_pb = printbuf_new())) return NULL; - } else { - printbuf_reset(this->_pb); - } - if(this->_to_json_string(this, this->_pb) < 0) return NULL; - return this->_pb->buf; -} - - -/* json_object_object */ - -static int json_object_object_to_json_string(struct json_object* this, - struct printbuf *pb) -{ - int i=0; - struct json_object_iter iter; - sprintbuf(pb, "{"); - - /* CAW: scope operator to make ANSI correctness */ - /* CAW: switched to json_object_object_foreachC which uses an iterator struct */ - json_object_object_foreachC(this, iter) { - if(i) sprintbuf(pb, ","); - sprintbuf(pb, " \""); - json_escape_str(pb, iter.key); - sprintbuf(pb, "\": "); - if(iter.val == NULL) sprintbuf(pb, "null"); - else iter.val->_to_json_string(iter.val, pb); - i++; - } - - return sprintbuf(pb, " }"); -} - -static void json_object_lh_entry_free(struct lh_entry *ent) -{ - free(ent->k); - json_object_put((struct json_object*)ent->v); -} - -static void json_object_object_delete(struct json_object* this) -{ - lh_table_free(this->o.c_object); - json_object_generic_delete(this); -} - -struct json_object* json_object_new_object() -{ - struct json_object *this = json_object_new(json_type_object); - if(!this) return NULL; - this->_delete = &json_object_object_delete; - this->_to_json_string = &json_object_object_to_json_string; - this->o.c_object = lh_kchar_table_new(JSON_OBJECT_DEF_HASH_ENTIRES, - NULL, &json_object_lh_entry_free); - return this; -} - -struct lh_table* json_object_get_object(struct json_object *this) -{ - if(!this) return NULL; - switch(this->o_type) { - case json_type_object: - return this->o.c_object; - default: - return NULL; - } -} - -void json_object_object_add(struct json_object* this, char *key, - struct json_object *val) -{ - lh_table_delete(this->o.c_object, key); - lh_table_insert(this->o.c_object, strdup(key), val); -} - -struct json_object* json_object_object_get(struct json_object* this, char *key) -{ - return (struct json_object*) lh_table_lookup(this->o.c_object, key); -} - -void json_object_object_del(struct json_object* this, char *key) -{ - lh_table_delete(this->o.c_object, key); -} - - -/* json_object_boolean */ - -static int json_object_boolean_to_json_string(struct json_object* this, - struct printbuf *pb) -{ - if(this->o.c_boolean) return sprintbuf(pb, "true"); - else return sprintbuf(pb, "false"); -} - -struct json_object* json_object_new_boolean(boolean b) -{ - struct json_object *this = json_object_new(json_type_boolean); - if(!this) return NULL; - this->_to_json_string = &json_object_boolean_to_json_string; - this->o.c_boolean = b; - return this; -} - -boolean json_object_get_boolean(struct json_object *this) -{ - if(!this) return FALSE; - switch(this->o_type) { - case json_type_boolean: - return this->o.c_boolean; - case json_type_int: - return (this->o.c_int != 0); - case json_type_double: - return (this->o.c_double != 0); - case json_type_string: - if(strlen(this->o.c_string)) return TRUE; - default: - return TRUE; - } -} - - -/* json_object_int */ - -static int json_object_int_to_json_string(struct json_object* this, - struct printbuf *pb) -{ - return sprintbuf(pb, "%lld", this->o.c_int); -} - -struct json_object* json_object_new_int(int64_t i) -{ - struct json_object *this = json_object_new(json_type_int); - if(!this) return NULL; - this->_to_json_string = &json_object_int_to_json_string; - this->o.c_int = i; - return this; -} - -int64_t json_object_get_int(struct json_object *this) -{ - int64_t cint; - - if(!this) return 0; - switch(this->o_type) { - case json_type_int: - return this->o.c_int; - case json_type_double: - return (int64_t)this->o.c_double; - case json_type_boolean: - return this->o.c_boolean; - case json_type_string: - if(sscanf(this->o.c_string, "%lld", &cint) == 1) return cint; - default: - return 0; - } -} - - -/* json_object_double */ - -static int json_object_double_to_json_string(struct json_object* this, - struct printbuf *pb) -{ - return sprintbuf(pb, "%lf", this->o.c_double); -} - -struct json_object* json_object_new_double(double d) -{ - struct json_object *this = json_object_new(json_type_double); - if(!this) return NULL; - this->_to_json_string = &json_object_double_to_json_string; - this->o.c_double = d; - return this; -} - -double json_object_get_double(struct json_object *this) -{ - double cdouble; - - if(!this) return 0.0; - switch(this->o_type) { - case json_type_double: - return this->o.c_double; - case json_type_int: - return this->o.c_int; - case json_type_boolean: - return this->o.c_boolean; - case json_type_string: - if(sscanf(this->o.c_string, "%lf", &cdouble) == 1) return cdouble; - default: - return 0.0; - } -} - - -/* json_object_string */ - -static int json_object_string_to_json_string(struct json_object* this, - struct printbuf *pb) -{ - sprintbuf(pb, "\""); - json_escape_str(pb, this->o.c_string); - sprintbuf(pb, "\""); - return 0; -} - -static void json_object_string_delete(struct json_object* this) -{ - free(this->o.c_string); - json_object_generic_delete(this); -} - -struct json_object* json_object_new_string(char *s) -{ - struct json_object *this = json_object_new(json_type_string); - if(!this) return NULL; - this->_delete = &json_object_string_delete; - this->_to_json_string = &json_object_string_to_json_string; - this->o.c_string = strdup(s); - return this; -} - -struct json_object* json_object_new_string_len(char *s, int len) -{ - struct json_object *this = json_object_new(json_type_string); - if(!this) return NULL; - this->_delete = &json_object_string_delete; - this->_to_json_string = &json_object_string_to_json_string; - this->o.c_string = strndup(s, len); - return this; -} - -char* json_object_get_string(struct json_object *this) -{ - if(!this) return NULL; - switch(this->o_type) { - case json_type_string: - return this->o.c_string; - default: - return json_object_to_json_string(this); - } -} - - -/* json_object_array */ - -static int json_object_array_to_json_string(struct json_object* this, - struct printbuf *pb) -{ - int i; - sprintbuf(pb, "["); - for(i=0; i < json_object_array_length(this); i++) { - struct json_object *val; - if(i) { sprintbuf(pb, ", "); } - else { sprintbuf(pb, " "); } - - val = json_object_array_get_idx(this, i); - if(val == NULL) { sprintbuf(pb, "null"); } - else { val->_to_json_string(val, pb); } - } - return sprintbuf(pb, " ]"); -} - -static void json_object_array_entry_free(void *data) -{ - json_object_put((struct json_object*)data); -} - -static void json_object_array_delete(struct json_object* this) -{ - array_list_free(this->o.c_array); - json_object_generic_delete(this); -} - -struct json_object* json_object_new_array() -{ - struct json_object *this = json_object_new(json_type_array); - if(!this) return NULL; - this->_delete = &json_object_array_delete; - this->_to_json_string = &json_object_array_to_json_string; - this->o.c_array = array_list_new(&json_object_array_entry_free); - return this; -} - -struct array_list* json_object_get_array(struct json_object *this) -{ - if(!this) return NULL; - switch(this->o_type) { - case json_type_array: - return this->o.c_array; - default: - return NULL; - } -} - -int json_object_array_length(struct json_object *this) -{ - return array_list_length(this->o.c_array); -} - -int json_object_array_add(struct json_object *this,struct json_object *val) -{ - return array_list_add(this->o.c_array, val); -} - -int json_object_array_put_idx(struct json_object *this, int idx, - struct json_object *val) -{ - return array_list_put_idx(this->o.c_array, idx, val); -} - -struct json_object* json_object_array_get_idx(struct json_object *this, - int idx) -{ - return (struct json_object*)array_list_get_idx(this->o.c_array, idx); -} - diff --git a/client/json-c-0.7/json_object.h b/client/json-c-0.7/json_object.h deleted file mode 100644 index 9f09ef661..000000000 --- a/client/json-c-0.7/json_object.h +++ /dev/null @@ -1,310 +0,0 @@ -/* - * $Id: json_object.h,v 1.12 2006/01/30 23:07:57 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#ifndef _json_object_h_ -#define _json_object_h_ - -#define JSON_OBJECT_DEF_HASH_ENTIRES 16 - -#undef FALSE -#define FALSE ((boolean)0) - -#undef TRUE -#define TRUE ((boolean)1) - -extern char *json_number_chars; -extern char *json_hex_chars; - -/* forward structure definitions */ - -typedef int boolean; -struct printbuf; -struct lh_table; -struct array_list; -struct json_object; -struct json_object_iter; - -/* supported object types */ - -enum json_type { - json_type_null, - json_type_boolean, - json_type_double, - json_type_int, - json_type_object, - json_type_array, - json_type_string -}; - -/* reference counting functions */ - -/** - * Increment the reference count of json_object - * @param obj the json_object instance - */ -extern struct json_object* json_object_get(struct json_object *obj); - -/** - * Decrement the reference count of json_object and free if it reaches zero - * @param obj the json_object instance - */ -extern void json_object_put(struct json_object *obj); - - -/** - * Check if the json_object is of a given type - * @param obj the json_object instance - * @param type one of: - json_type_boolean, - json_type_double, - json_type_int, - json_type_object, - json_type_array, - json_type_string, - */ -extern int json_object_is_type(struct json_object *obj, enum json_type type); - -/** - * Get the type of the json_object - * @param obj the json_object instance - * @returns type being one of: - json_type_boolean, - json_type_double, - json_type_int, - json_type_object, - json_type_array, - json_type_string, - */ -extern enum json_type json_object_get_type(struct json_object *obj); - - -/** Stringify object to json format - * @param obj the json_object instance - * @returns a string in JSON format - */ -extern char* json_object_to_json_string(struct json_object *obj); - - -/* object type methods */ - -/** Create a new empty object - * @returns a json_object of type json_type_object - */ -extern struct json_object* json_object_new_object(); - -/** Get the hashtable of a json_object of type json_type_object - * @param obj the json_object instance - * @returns a linkhash - */ -extern struct lh_table* json_object_get_object(struct json_object *obj); - -/** Add an object field to a json_object of type json_type_object - * - * The reference count will *not* be incremented. This is to make adding - * fields to objects in code more compact. If you want to retain a reference - * to an added object you must wrap the passed object with json_object_get - * - * @param obj the json_object instance - * @param key the object field name (a private copy will be duplicated) - * @param val a json_object or NULL member to associate with the given field - */ -extern void json_object_object_add(struct json_object* obj, char *key, - struct json_object *val); - -/** Get the json_object associate with a given object field - * @param obj the json_object instance - * @param key the object field name - * @returns the json_object associated with the given field name - */ -extern struct json_object* json_object_object_get(struct json_object* obj, - char *key); - -/** Delete the given json_object field - * - * The reference count will be decremented for the deleted object - * - * @param obj the json_object instance - * @param key the object field name - */ -extern void json_object_object_del(struct json_object* obj, char *key); - -/** Iterate through all keys and values of an object - * @param obj the json_object instance - * @param key the local name for the char* key variable defined in the body - * @param val the local name for the json_object* object variable defined in the body - */ -#if defined(__GNUC__) && !defined(__STRICT_ANSI__) - -# define json_object_object_foreach(obj,key,val) \ - char *key; struct json_object *val; \ - for(struct lh_entry *entry = json_object_get_object(obj)->head; ({ if(entry) { key = (char*)entry->k; val = (struct json_object*)entry->v; } ; entry; }); entry = entry->next ) - -#else /* ANSI C or MSC */ - -# define json_object_object_foreach(obj,key,val) \ - char *key; struct json_object *val; struct lh_entry *entry; \ - for(entry = json_object_get_object(obj)->head; (entry ? (key = (char*)entry->k, val = (struct json_object*)entry->v, entry) : 0); entry = entry->next) - -#endif /* defined(__GNUC__) && !defined(__STRICT_ANSI__) */ - -/** Iterate through all keys and values of an object (ANSI C Safe) - * @param obj the json_object instance - * @param iter the object iterator - */ -#define json_object_object_foreachC(obj,iter) \ - for(iter.entry = json_object_get_object(obj)->head; (iter.entry ? (iter.key = (char*)iter.entry->k, iter.val = (struct json_object*)iter.entry->v, iter.entry) : 0); iter.entry = iter.entry->next) - -/* Array type methods */ - -/** Create a new empty json_object of type json_type_array - * @returns a json_object of type json_type_array - */ -extern struct json_object* json_object_new_array(); - -/** Get the arraylist of a json_object of type json_type_array - * @param obj the json_object instance - * @returns an arraylist - */ -extern struct array_list* json_object_get_array(struct json_object *obj); - -/** Get the length of a json_object of type json_type_array - * @param obj the json_object instance - * @returns an int - */ -extern int json_object_array_length(struct json_object *obj); - -/** Add an element to the end of a json_object of type json_type_array - * - * The reference count will *not* be incremented. This is to make adding - * fields to objects in code more compact. If you want to retain a reference - * to an added object you must wrap the passed object with json_object_get - * - * @param obj the json_object instance - * @param val the json_object to be added - */ -extern int json_object_array_add(struct json_object *obj, - struct json_object *val); - -/** Insert or replace an element at a specified index in an array (a json_object of type json_type_array) - * - * The reference count will *not* be incremented. This is to make adding - * fields to objects in code more compact. If you want to retain a reference - * to an added object you must wrap the passed object with json_object_get - * - * The reference count of a replaced object will be decremented. - * - * The array size will be automatically be expanded to the size of the - * index if the index is larger than the current size. - * - * @param obj the json_object instance - * @param idx the index to insert the element at - * @param val the json_object to be added - */ -extern int json_object_array_put_idx(struct json_object *obj, int idx, - struct json_object *val); - -/** Get the element at specificed index of the array (a json_object of type json_type_array) - * @param obj the json_object instance - * @param idx the index to get the element at - * @returns the json_object at the specified index (or NULL) - */ -extern struct json_object* json_object_array_get_idx(struct json_object *obj, - int idx); - -/* boolean type methods */ - -/** Create a new empty json_object of type json_type_boolean - * @param b a boolean TRUE or FALSE (0 or 1) - * @returns a json_object of type json_type_boolean - */ -extern struct json_object* json_object_new_boolean(boolean b); - -/** Get the boolean value of a json_object - * - * The type is coerced to a boolean if the passed object is not a boolean. - * integer and double objects will return FALSE if there value is zero - * or TRUE otherwise. If the passed object is a string it will return - * TRUE if it has a non zero length. If any other object type is passed - * TRUE will be returned if the object is not NULL. - * - * @param obj the json_object instance - * @returns a boolean - */ -extern boolean json_object_get_boolean(struct json_object *obj); - - -/* int type methods */ - -/** Create a new empty json_object of type json_type_int - * @param i the integer - * @returns a json_object of type json_type_int - */ -extern struct json_object* json_object_new_int(int64_t i); - -/** Get the int value of a json_object - * - * The type is coerced to a int if the passed object is not a int. - * double objects will return their integer conversion. Strings will be - * parsed as an integer. If no conversion exists then 0 is returned. - * - * @param obj the json_object instance - * @returns an int - */ -extern int64_t json_object_get_int(struct json_object *obj); - - -/* double type methods */ - -/** Create a new empty json_object of type json_type_double - * @param d the double - * @returns a json_object of type json_type_double - */ -extern struct json_object* json_object_new_double(double d); - -/** Get the double value of a json_object - * - * The type is coerced to a double if the passed object is not a double. - * integer objects will return their dboule conversion. Strings will be - * parsed as a double. If no conversion exists then 0.0 is returned. - * - * @param obj the json_object instance - * @returns an double - */ -extern double json_object_get_double(struct json_object *obj); - - -/* string type methods */ - -/** Create a new empty json_object of type json_type_string - * - * A copy of the string is made and the memory is managed by the json_object - * - * @param s the string - * @returns a json_object of type json_type_string - */ -extern struct json_object* json_object_new_string(char *s); - -extern struct json_object* json_object_new_string_len(char *s, int len); - -/** Get the string value of a json_object - * - * If the passed object is not of type json_type_string then the JSON - * representation of the object is returned. - * - * The returned string memory is managed by the json_object and will - * be freed when the reference count of the json_object drops to zero. - * - * @param obj the json_object instance - * @returns a string - */ -extern char* json_object_get_string(struct json_object *obj); - -#endif diff --git a/client/json-c-0.7/json_object_private.h b/client/json-c-0.7/json_object_private.h deleted file mode 100644 index 207276435..000000000 --- a/client/json-c-0.7/json_object_private.h +++ /dev/null @@ -1,44 +0,0 @@ -/* - * $Id: json_object_private.h,v 1.4 2006/01/26 02:16:28 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#ifndef _json_object_private_h_ -#define _json_object_private_h_ - -typedef void (json_object_delete_fn)(struct json_object *o); -typedef int (json_object_to_json_string_fn)(struct json_object *o, - struct printbuf *pb); - -struct json_object -{ - enum json_type o_type; - json_object_delete_fn *_delete; - json_object_to_json_string_fn *_to_json_string; - int _ref_count; - struct printbuf *_pb; - union data { - boolean c_boolean; - double c_double; - int64_t c_int; - struct lh_table *c_object; - struct array_list *c_array; - char *c_string; - } o; -}; - -/* CAW: added for ANSI C iteration correctness */ -struct json_object_iter -{ - char *key; - struct json_object *val; - struct lh_entry *entry; -}; - -#endif diff --git a/client/json-c-0.7/json_tokener.c b/client/json-c-0.7/json_tokener.c deleted file mode 100644 index fb8bec8d0..000000000 --- a/client/json-c-0.7/json_tokener.c +++ /dev/null @@ -1,516 +0,0 @@ -/* - * $Id: json_tokener.c,v 1.20 2006/07/25 03:24:50 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#include "config.h" - -#include -#include -#include -#include - -#include "bits.h" -#include "debug.h" -#include "printbuf.h" -#include "arraylist.h" -#include "json_object.h" -#include "json_tokener.h" - - -#if !HAVE_STRNCASECMP && defined(_MSC_VER) - /* MSC has the version as _strnicmp */ -# define strncasecmp _strnicmp -#elif !HAVE_STRNCASECMP -# error You do not have strncasecmp on your system. -#endif /* HAVE_STRNCASECMP */ - - -static const char* json_null_str = "null"; -static const char* json_true_str = "true"; -static const char* json_false_str = "false"; - -const char* json_tokener_errors[] = { - "success", - "continue", - "nesting to deep", - "unexpected end of data", - "unexpected character", - "null expected", - "boolean expected", - "number expected", - "array value separator ',' expected", - "quoted object property name expected", - "object property name separator ':' expected", - "object value separator ',' expected", - "invalid string sequence", - "expected comment", -}; - - -struct json_tokener* json_tokener_new() -{ - struct json_tokener *tok = calloc(1, sizeof(struct json_tokener)); - tok->pb = printbuf_new(); - json_tokener_reset(tok); - return tok; -} - -void json_tokener_free(struct json_tokener *tok) -{ - json_tokener_reset(tok); - if(tok) printbuf_free(tok->pb); - free(tok); -} - -static void json_tokener_reset_level(struct json_tokener *tok, int depth) -{ - tok->stack[depth].state = json_tokener_state_eatws; - tok->stack[depth].saved_state = json_tokener_state_start; - json_object_put(tok->stack[depth].current); - tok->stack[depth].current = NULL; - free(tok->stack[depth].obj_field_name); - tok->stack[depth].obj_field_name = NULL; -} - -void json_tokener_reset(struct json_tokener *tok) -{ - int i; - for(i = tok->depth; i >= 0; i--) - json_tokener_reset_level(tok, i); - tok->depth = 0; - tok->err = json_tokener_success; -} - -struct json_object* json_tokener_parse(char *str) -{ - struct json_tokener* tok; - struct json_object* obj; - - tok = json_tokener_new(); - obj = json_tokener_parse_ex(tok, str, -1); - if(tok->err != json_tokener_success) - obj = error_ptr(-tok->err); - json_tokener_free(tok); - return obj; -} - - -#if !HAVE_STRNDUP -/* CAW: compliant version of strndup() */ -char* strndup(const char* str, size_t n) -{ - if(str) { - size_t len = strlen(str); - size_t nn = min(len,n); - char* s = (char*)malloc(sizeof(char) * (nn + 1)); - - if(s) { - memcpy(s, str, nn); - s[nn] = '\0'; - } - - return s; - } - - return NULL; -} -#endif - - -#define state tok->stack[tok->depth].state -#define saved_state tok->stack[tok->depth].saved_state -#define current tok->stack[tok->depth].current -#define obj_field_name tok->stack[tok->depth].obj_field_name - -struct json_object* json_tokener_parse_ex(struct json_tokener *tok, - char *str, int len) -{ - struct json_object *obj = NULL; - char c; - - tok->char_offset = 0; - tok->err = json_tokener_success; - - do { - if(tok->char_offset == len) { - if(tok->depth == 0 && state == json_tokener_state_eatws && - saved_state == json_tokener_state_finish) - tok->err = json_tokener_success; - else - tok->err = json_tokener_continue; - goto out; - } - - c = *str; - redo_char: - switch(state) { - - case json_tokener_state_eatws: - if(isspace(c)) { - /* okay */ - } else if(c == '/') { - printbuf_reset(tok->pb); - printbuf_memappend(tok->pb, &c, 1); - state = json_tokener_state_comment_start; - } else { - state = saved_state; - goto redo_char; - } - break; - - case json_tokener_state_start: - switch(c) { - case '{': - state = json_tokener_state_eatws; - saved_state = json_tokener_state_object_field_start; - current = json_object_new_object(); - break; - case '[': - state = json_tokener_state_eatws; - saved_state = json_tokener_state_array; - current = json_object_new_array(); - break; - case 'N': - case 'n': - state = json_tokener_state_null; - printbuf_reset(tok->pb); - tok->st_pos = 0; - goto redo_char; - case '"': - case '\'': - state = json_tokener_state_string; - printbuf_reset(tok->pb); - tok->quote_char = c; - break; - case 'T': - case 't': - case 'F': - case 'f': - state = json_tokener_state_boolean; - printbuf_reset(tok->pb); - tok->st_pos = 0; - goto redo_char; -#if defined(__GNUC__) - case '0' ... '9': -#else - case '0': - case '1': - case '2': - case '3': - case '4': - case '5': - case '6': - case '7': - case '8': - case '9': -#endif - case '-': - state = json_tokener_state_number; - printbuf_reset(tok->pb); - tok->is_double = 0; - goto redo_char; - default: - tok->err = json_tokener_error_parse_unexpected; - goto out; - } - break; - - case json_tokener_state_finish: - if(tok->depth == 0) goto out; - obj = json_object_get(current); - json_tokener_reset_level(tok, tok->depth); - tok->depth--; - goto redo_char; - - case json_tokener_state_null: - printbuf_memappend(tok->pb, &c, 1); - if(strncasecmp(json_null_str, tok->pb->buf, - min(tok->st_pos+1, strlen(json_null_str))) == 0) { - if(tok->st_pos == strlen(json_null_str)) { - current = NULL; - saved_state = json_tokener_state_finish; - state = json_tokener_state_eatws; - goto redo_char; - } - } else { - tok->err = json_tokener_error_parse_null; - goto out; - } - tok->st_pos++; - break; - - case json_tokener_state_comment_start: - if(c == '*') { - state = json_tokener_state_comment; - } else if(c == '/') { - state = json_tokener_state_comment_eol; - } else { - tok->err = json_tokener_error_parse_comment; - goto out; - } - printbuf_memappend(tok->pb, &c, 1); - break; - - case json_tokener_state_comment: - if(c == '*') state = json_tokener_state_comment_end; - printbuf_memappend(tok->pb, &c, 1); - break; - - case json_tokener_state_comment_eol: - if(c == '\n') { - mc_debug("json_tokener_comment: %s\n", tok->pb->buf); - state = json_tokener_state_eatws; - } else { - printbuf_memappend(tok->pb, &c, 1); - } - break; - - case json_tokener_state_comment_end: - printbuf_memappend(tok->pb, &c, 1); - if(c == '/') { - mc_debug("json_tokener_comment: %s\n", tok->pb->buf); - state = json_tokener_state_eatws; - } else { - state = json_tokener_state_comment; - } - break; - - case json_tokener_state_string: - if(c == tok->quote_char) { - current = json_object_new_string(tok->pb->buf); - saved_state = json_tokener_state_finish; - state = json_tokener_state_eatws; - } else if(c == '\\') { - saved_state = json_tokener_state_string; - state = json_tokener_state_string_escape; - } else { - printbuf_memappend(tok->pb, &c, 1); - } - break; - - case json_tokener_state_string_escape: - switch(c) { - case '"': - case '\\': - case '/': - printbuf_memappend(tok->pb, &c, 1); - state = saved_state; - break; - case 'b': - case 'n': - case 'r': - case 't': - if(c == 'b') printbuf_memappend(tok->pb, "\b", 1); - else if(c == 'n') printbuf_memappend(tok->pb, "\n", 1); - else if(c == 'r') printbuf_memappend(tok->pb, "\r", 1); - else if(c == 't') printbuf_memappend(tok->pb, "\t", 1); - state = saved_state; - break; - case 'u': - tok->ucs_char = 0; - tok->st_pos = 0; - state = json_tokener_state_escape_unicode; - break; - default: - tok->err = json_tokener_error_parse_string; - goto out; - } - break; - - case json_tokener_state_escape_unicode: - if(strchr(json_hex_chars, c)) { - tok->ucs_char += ((unsigned int)hexdigit(c) << ((3-tok->st_pos++)*4)); - if(tok->st_pos == 4) { - unsigned char utf_out[3]; - if (tok->ucs_char < 0x80) { - utf_out[0] = tok->ucs_char; - printbuf_memappend(tok->pb, (char*)utf_out, 1); - } else if (tok->ucs_char < 0x800) { - utf_out[0] = 0xc0 | (tok->ucs_char >> 6); - utf_out[1] = 0x80 | (tok->ucs_char & 0x3f); - printbuf_memappend(tok->pb, (char*)utf_out, 2); - } else { - utf_out[0] = 0xe0 | (tok->ucs_char >> 12); - utf_out[1] = 0x80 | ((tok->ucs_char >> 6) & 0x3f); - utf_out[2] = 0x80 | (tok->ucs_char & 0x3f); - printbuf_memappend(tok->pb, (char*)utf_out, 3); - } - state = saved_state; - } - } else { - tok->err = json_tokener_error_parse_string; - goto out; - } - break; - - case json_tokener_state_boolean: - printbuf_memappend(tok->pb, &c, 1); - if(strncasecmp(json_true_str, tok->pb->buf, - min(tok->st_pos+1, strlen(json_true_str))) == 0) { - if(tok->st_pos == strlen(json_true_str)) { - current = json_object_new_boolean(1); - saved_state = json_tokener_state_finish; - state = json_tokener_state_eatws; - goto redo_char; - } - } else if(strncasecmp(json_false_str, tok->pb->buf, - min(tok->st_pos+1, strlen(json_false_str))) == 0) { - if(tok->st_pos == strlen(json_false_str)) { - current = json_object_new_boolean(0); - saved_state = json_tokener_state_finish; - state = json_tokener_state_eatws; - goto redo_char; - } - } else { - tok->err = json_tokener_error_parse_boolean; - goto out; - } - tok->st_pos++; - break; - - case json_tokener_state_number: - if(c && strchr(json_number_chars, c)) { - printbuf_memappend(tok->pb, &c, 1); - if(c == '.' || c == 'e') tok->is_double = 1; - } else { - int64_t numi; - double numd; - if(!tok->is_double && sscanf(tok->pb->buf, "%lld", &numi) == 1) { - current = json_object_new_int(numi); - } else if(tok->is_double && sscanf(tok->pb->buf, "%lf", &numd) == 1) { - current = json_object_new_double(numd); - } else { - tok->err = json_tokener_error_parse_number; - goto out; - } - saved_state = json_tokener_state_finish; - state = json_tokener_state_eatws; - goto redo_char; - } - break; - - case json_tokener_state_array: - if(c == ']') { - saved_state = json_tokener_state_finish; - state = json_tokener_state_eatws; - } else { - if(tok->depth >= JSON_TOKENER_MAX_DEPTH-1) { - tok->err = json_tokener_error_depth; - goto out; - } - state = json_tokener_state_array_add; - tok->depth++; - json_tokener_reset_level(tok, tok->depth); - goto redo_char; - } - break; - - case json_tokener_state_array_add: - json_object_array_add(current, obj); - saved_state = json_tokener_state_array_sep; - state = json_tokener_state_eatws; - goto redo_char; - - case json_tokener_state_array_sep: - if(c == ']') { - saved_state = json_tokener_state_finish; - state = json_tokener_state_eatws; - } else if(c == ',') { - saved_state = json_tokener_state_array; - state = json_tokener_state_eatws; - } else { - tok->err = json_tokener_error_parse_array; - goto out; - } - break; - - case json_tokener_state_object_field_start: - if(c == '}') { - saved_state = json_tokener_state_finish; - state = json_tokener_state_eatws; - } else if (c == '"' || c == '\'') { - tok->quote_char = c; - printbuf_reset(tok->pb); - state = json_tokener_state_object_field; - } else { - tok->err = json_tokener_error_parse_object_key_name; - goto out; - } - break; - - case json_tokener_state_object_field: - if(c == tok->quote_char) { - obj_field_name = strdup(tok->pb->buf); - saved_state = json_tokener_state_object_field_end; - state = json_tokener_state_eatws; - } else if(c == '\\') { - saved_state = json_tokener_state_object_field; - state = json_tokener_state_string_escape; - } else { - printbuf_memappend(tok->pb, &c, 1); - } - break; - - case json_tokener_state_object_field_end: - if(c == ':') { - saved_state = json_tokener_state_object_value; - state = json_tokener_state_eatws; - } else { - tok->err = json_tokener_error_parse_object_key_sep; - goto out; - } - break; - - case json_tokener_state_object_value: - if(tok->depth >= JSON_TOKENER_MAX_DEPTH-1) { - tok->err = json_tokener_error_depth; - goto out; - } - state = json_tokener_state_object_value_add; - tok->depth++; - json_tokener_reset_level(tok, tok->depth); - goto redo_char; - - case json_tokener_state_object_value_add: - json_object_object_add(current, obj_field_name, obj); - free(obj_field_name); - obj_field_name = NULL; - saved_state = json_tokener_state_object_sep; - state = json_tokener_state_eatws; - goto redo_char; - - case json_tokener_state_object_sep: - if(c == '}') { - saved_state = json_tokener_state_finish; - state = json_tokener_state_eatws; - } else if(c == ',') { - saved_state = json_tokener_state_object_field_start; - state = json_tokener_state_eatws; - } else { - tok->err = json_tokener_error_parse_object_value_sep; - goto out; - } - break; - - } - str++; - tok->char_offset++; - } while(c); - - if(state != json_tokener_state_finish && - saved_state != json_tokener_state_finish) - tok->err = json_tokener_error_parse_eof; - - out: - if(tok->err == json_tokener_success) return json_object_get(current); - mc_debug("json_tokener_parse_ex: error %s at offset %d\n", - json_tokener_errors[tok->err], tok->char_offset); - return NULL; -} diff --git a/client/json-c-0.7/json_tokener.h b/client/json-c-0.7/json_tokener.h deleted file mode 100644 index d2c21270f..000000000 --- a/client/json-c-0.7/json_tokener.h +++ /dev/null @@ -1,89 +0,0 @@ -/* - * $Id: json_tokener.h,v 1.10 2006/07/25 03:24:50 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#ifndef _json_tokener_h_ -#define _json_tokener_h_ - -#include "json_object.h" - -enum json_tokener_error { - json_tokener_success, - json_tokener_continue, - json_tokener_error_depth, - json_tokener_error_parse_eof, - json_tokener_error_parse_unexpected, - json_tokener_error_parse_null, - json_tokener_error_parse_boolean, - json_tokener_error_parse_number, - json_tokener_error_parse_array, - json_tokener_error_parse_object_key_name, - json_tokener_error_parse_object_key_sep, - json_tokener_error_parse_object_value_sep, - json_tokener_error_parse_string, - json_tokener_error_parse_comment -}; - -enum json_tokener_state { - json_tokener_state_eatws, - json_tokener_state_start, - json_tokener_state_finish, - json_tokener_state_null, - json_tokener_state_comment_start, - json_tokener_state_comment, - json_tokener_state_comment_eol, - json_tokener_state_comment_end, - json_tokener_state_string, - json_tokener_state_string_escape, - json_tokener_state_escape_unicode, - json_tokener_state_boolean, - json_tokener_state_number, - json_tokener_state_array, - json_tokener_state_array_add, - json_tokener_state_array_sep, - json_tokener_state_object_field_start, - json_tokener_state_object_field, - json_tokener_state_object_field_end, - json_tokener_state_object_value, - json_tokener_state_object_value_add, - json_tokener_state_object_sep -}; - -struct json_tokener_srec -{ - enum json_tokener_state state, saved_state; - struct json_object *obj; - struct json_object *current; - char *obj_field_name; -}; - -#define JSON_TOKENER_MAX_DEPTH 32 - -struct json_tokener -{ - char *str; - struct printbuf *pb; - int depth, is_double, st_pos, char_offset; - enum json_tokener_error err; - unsigned int ucs_char; - char quote_char; - struct json_tokener_srec stack[JSON_TOKENER_MAX_DEPTH]; -}; - -extern const char* json_tokener_errors[]; - -extern struct json_tokener* json_tokener_new(); -extern void json_tokener_free(struct json_tokener *tok); -extern void json_tokener_reset(struct json_tokener *tok); -extern struct json_object* json_tokener_parse(char *str); -extern struct json_object* json_tokener_parse_ex(struct json_tokener *tok, - char *str, int len); - -#endif diff --git a/client/json-c-0.7/json_util.c b/client/json-c-0.7/json_util.c deleted file mode 100644 index e20be2403..000000000 --- a/client/json-c-0.7/json_util.c +++ /dev/null @@ -1,121 +0,0 @@ -/* - * $Id: json_util.c,v 1.4 2006/01/30 23:07:57 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#include "config.h" - -#include -#include -#include -#include -#include - -#if HAVE_SYS_TYPES_H -#include -#endif /* HAVE_SYS_TYPES_H */ - -#if HAVE_SYS_STAT_H -#include -#endif /* HAVE_SYS_STAT_H */ - -#if HAVE_FCNTL_H -#include -#endif /* HAVE_FCNTL_H */ - -#if HAVE_UNISTD_H -# include -#endif /* HAVE_UNISTD_H */ - -#ifdef WIN32 -# define WIN32_LEAN_AND_MEAN -# include -# include -#endif /* defined(WIN32) */ - -#if !HAVE_OPEN && defined(WIN32) -# define open _open -#endif - - -#include "bits.h" -#include "debug.h" -#include "printbuf.h" -#include "json_object.h" -#include "json_tokener.h" -#include "json_util.h" - -struct json_object* json_object_from_file(char *filename) -{ - struct printbuf *pb; - struct json_object *obj; - char buf[JSON_FILE_BUF_SIZE]; - int fd, ret; - - if((fd = open(filename, O_RDONLY)) < 0) { - mc_error("json_object_from_file: error reading file %s: %s\n", - filename, strerror(errno)); - return error_ptr(-1); - } - if(!(pb = printbuf_new())) { - mc_error("json_object_from_file: printbuf_new failed\n"); - return error_ptr(-1); - } - while((ret = read(fd, buf, JSON_FILE_BUF_SIZE)) > 0) { - printbuf_memappend(pb, buf, ret); - } - close(fd); - if(ret < 0) { - mc_abort("json_object_from_file: error reading file %s: %s\n", - filename, strerror(errno)); - printbuf_free(pb); - return error_ptr(-1); - } - obj = json_tokener_parse(pb->buf); - printbuf_free(pb); - return obj; -} - -int json_object_to_file(char *filename, struct json_object *obj) -{ - char *json_str; - int fd, ret; - unsigned int wpos, wsize; - - if(!obj) { - mc_error("json_object_to_file: object is null\n"); - return -1; - } - - if((fd = open(filename, O_WRONLY | O_TRUNC | O_CREAT, 0644)) < 0) { - mc_error("json_object_to_file: error opening file %s: %s\n", - filename, strerror(errno)); - return -1; - } - - if(!(json_str = json_object_to_json_string(obj))) { return -1; } - - - wsize = (unsigned int)(strlen(json_str) & UINT_MAX); /* CAW: probably unnecessary, but the most 64bit safe */ - wpos = 0; - while(wpos < wsize) { - if((ret = write(fd, json_str + wpos, wsize-wpos)) < 0) { - close(fd); - mc_error("json_object_to_file: error writing file %s: %s\n", - filename, strerror(errno)); - return -1; - } - - /* because of the above check for ret < 0, we can safely cast and add */ - wpos += (unsigned int)ret; - } - - close(fd); - return 0; -} diff --git a/client/json-c-0.7/json_util.h b/client/json-c-0.7/json_util.h deleted file mode 100644 index 30fe2ab2c..000000000 --- a/client/json-c-0.7/json_util.h +++ /dev/null @@ -1,23 +0,0 @@ -/* - * $Id: json_util.h,v 1.4 2006/01/30 23:07:57 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#ifndef _json_util_h_ -#define _json_util_h_ - -#include "json_object.h" - -#define JSON_FILE_BUF_SIZE 4096 - -/* utlitiy functions */ -extern struct json_object* json_object_from_file(char *filename); -extern int json_object_to_file(char *filename, struct json_object *obj); - -#endif diff --git a/client/json-c-0.7/linkhash.c b/client/json-c-0.7/linkhash.c deleted file mode 100644 index 6cfc9a0ea..000000000 --- a/client/json-c-0.7/linkhash.c +++ /dev/null @@ -1,217 +0,0 @@ -/* - * $Id: linkhash.c,v 1.4 2006/01/26 02:16:28 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#include "config.h" - -#include -#include -#include -#include -#include -#include - -#include "linkhash.h" - -void lh_abort(const char *msg, ...) -{ - va_list ap; - va_start(ap, msg); - vprintf(msg, ap); - exit(1); -} - -unsigned long lh_ptr_hash(void *k) -{ - /* CAW: refactored to be 64bit nice */ - return (unsigned long)((((ptrdiff_t)k * LH_PRIME) >> 4) & ULONG_MAX); -} - -int lh_ptr_equal(void *k1, void *k2) -{ - return (k1 == k2); -} - -unsigned long lh_char_hash(void *k) -{ - unsigned int h = 0; - const char* data = k; - - while( *data!=0 ) h = h*129 + (unsigned int)(*data++) + LH_PRIME; - - return h; -} - -int lh_char_equal(void *k1, void *k2) -{ - return (strcmp((char*)k1, (char*)k2) == 0); -} - -struct lh_table* lh_table_new(int size, char *name, - lh_entry_free_fn *free_fn, - lh_hash_fn *hash_fn, - lh_equal_fn *equal_fn) -{ - int i; - struct lh_table *t; - - t = calloc(1, sizeof(struct lh_table)); - if(!t) lh_abort("lh_table_new: calloc failed\n"); - t->count = 0; - t->size = size; - t->name = name; - t->table = calloc(size, sizeof(struct lh_entry)); - if(!t->table) lh_abort("lh_table_new: calloc failed\n"); - t->free_fn = free_fn; - t->hash_fn = hash_fn; - t->equal_fn = equal_fn; - for(i = 0; i < size; i++) t->table[i].k = LH_EMPTY; - return t; -} - -struct lh_table* lh_kchar_table_new(int size, char *name, - lh_entry_free_fn *free_fn) -{ - return lh_table_new(size, name, free_fn, lh_char_hash, lh_char_equal); -} - -struct lh_table* lh_kptr_table_new(int size, char *name, - lh_entry_free_fn *free_fn) -{ - return lh_table_new(size, name, free_fn, lh_ptr_hash, lh_ptr_equal); -} - -void lh_table_resize(struct lh_table *t, int new_size) -{ - struct lh_table *new_t; - struct lh_entry *ent; - - new_t = lh_table_new(new_size, t->name, NULL, t->hash_fn, t->equal_fn); - ent = t->head; - while(ent) { - lh_table_insert(new_t, ent->k, ent->v); - ent = ent->next; - } - free(t->table); - t->table = new_t->table; - t->size = new_size; - t->head = new_t->head; - t->tail = new_t->tail; - t->resizes++; - free(new_t); -} - -void lh_table_free(struct lh_table *t) -{ - struct lh_entry *c; - for(c = t->head; c != NULL; c = c->next) { - if(t->free_fn) { - t->free_fn(c); - } - } - free(t->table); - free(t); -} - - -int lh_table_insert(struct lh_table *t, void *k, void *v) -{ - unsigned long h, n; - - t->inserts++; - if(t->count > t->size * 0.66) lh_table_resize(t, t->size * 2); - - h = t->hash_fn(k); - n = h % t->size; - - while( 1 ) { - if(t->table[n].k == LH_EMPTY || t->table[n].k == LH_FREED) break; - t->collisions++; - if(++n == t->size) n = 0; - } - - t->table[n].k = k; - t->table[n].v = v; - t->count++; - - if(t->head == NULL) { - t->head = t->tail = &t->table[n]; - t->table[n].next = t->table[n].prev = NULL; - } else { - t->tail->next = &t->table[n]; - t->table[n].prev = t->tail; - t->table[n].next = NULL; - t->tail = &t->table[n]; - } - - return 0; -} - - -struct lh_entry* lh_table_lookup_entry(struct lh_table *t, void *k) -{ - unsigned long h = t->hash_fn(k); - unsigned long n = h % t->size; - - t->lookups++; - while( 1 ) { - if(t->table[n].k == LH_EMPTY) return NULL; - if(t->table[n].k != LH_FREED && - t->equal_fn(t->table[n].k, k)) return &t->table[n]; - if(++n == t->size) n = 0; - } - return NULL; -} - - -void* lh_table_lookup(struct lh_table *t, void *k) -{ - struct lh_entry *e = lh_table_lookup_entry(t, k); - if(e) return e->v; - return NULL; -} - - -int lh_table_delete_entry(struct lh_table *t, struct lh_entry *e) -{ - ptrdiff_t n = (ptrdiff_t)(e - t->table); /* CAW: fixed to be 64bit nice, still need the crazy negative case... */ - - /* CAW: this is bad, really bad, maybe stack goes other direction on this machine... */ - if(n < 0) { return -2; } - - if(t->table[n].k == LH_EMPTY || t->table[n].k == LH_FREED) return -1; - t->count--; - if(t->free_fn) t->free_fn(e); - t->table[n].v = NULL; - t->table[n].k = LH_FREED; - if(t->tail == &t->table[n] && t->head == &t->table[n]) { - t->head = t->tail = NULL; - } else if (t->head == &t->table[n]) { - t->head->next->prev = NULL; - t->head = t->head->next; - } else if (t->tail == &t->table[n]) { - t->tail->prev->next = NULL; - t->tail = t->tail->prev; - } else { - t->table[n].prev->next = t->table[n].next; - t->table[n].next->prev = t->table[n].prev; - } - t->table[n].next = t->table[n].prev = NULL; - return 0; -} - - -int lh_table_delete(struct lh_table *t, void *k) -{ - struct lh_entry *e = lh_table_lookup_entry(t, k); - if(!e) return -1; - return lh_table_delete_entry(t, e); -} - diff --git a/client/json-c-0.7/linkhash.h b/client/json-c-0.7/linkhash.h deleted file mode 100644 index 5c9fa852d..000000000 --- a/client/json-c-0.7/linkhash.h +++ /dev/null @@ -1,261 +0,0 @@ -/* - * $Id: linkhash.h,v 1.6 2006/01/30 23:07:57 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#ifndef _linkhash_h_ -#define _linkhash_h_ - -/** - * golden prime used in hash functions - */ -#define LH_PRIME 0x9e370001UL - -/** - * sentinel pointer value for empty slots - */ -#define LH_EMPTY (void*)-1 - -/** - * sentinel pointer value for freed slots - */ -#define LH_FREED (void*)-2 - -struct lh_entry; - -/** - * callback function prototypes - */ -typedef void (lh_entry_free_fn) (struct lh_entry *e); -/** - * callback function prototypes - */ -typedef unsigned long (lh_hash_fn) (void *k); -/** - * callback function prototypes - */ -typedef int (lh_equal_fn) (void *k1, void *k2); - -/** - * An entry in the hash table - */ -struct lh_entry { - /** - * The key. - */ - void *k; - /** - * The value. - */ - void *v; - /** - * The next entry - */ - struct lh_entry *next; - /** - * The previous entry. - */ - struct lh_entry *prev; -}; - - -/** - * The hash table structure. - */ -struct lh_table { - /** - * Size of our hash. - */ - int size; - /** - * Numbers of entries. - */ - int count; - - /** - * Number of collisions. - */ - int collisions; - - /** - * Number of resizes. - */ - int resizes; - - /** - * Number of lookups. - */ - int lookups; - - /** - * Number of inserts. - */ - int inserts; - - /** - * Number of deletes. - */ - int deletes; - - /** - * Name of the hash table. - */ - char *name; - - /** - * The first entry. - */ - struct lh_entry *head; - - /** - * The last entry. - */ - struct lh_entry *tail; - - struct lh_entry *table; - - /** - * A pointer onto the function responsible for freeing an entry. - */ - lh_entry_free_fn *free_fn; - lh_hash_fn *hash_fn; - lh_equal_fn *equal_fn; -}; - - -/** - * Pre-defined hash and equality functions - */ -extern unsigned long lh_ptr_hash(void *k); -extern int lh_ptr_equal(void *k1, void *k2); - -extern unsigned long lh_char_hash(void *k); -extern int lh_char_equal(void *k1, void *k2); - - -/** - * Convenience list iterator. - */ -#define lh_foreach(table, entry) \ -for(entry = table->head; entry; entry = entry->next) - -/** - * lh_foreach_safe allows calling of deletion routine while iterating. - */ -#define lh_foreach_safe(table, entry, tmp) \ -for(entry = table->head; entry && ((tmp = entry->next) || 1); entry = tmp) - - - -/** - * Create a new linkhash table. - * @param size initial table size. The table is automatically resized - * although this incurs a performance penalty. - * @param name the table name. - * @param free_fn callback function used to free memory for entries - * when lh_table_free or lh_table_delete is called. - * If NULL is provided, then memory for keys and values - * must be freed by the caller. - * @param hash_fn function used to hash keys. 2 standard ones are defined: - * lh_ptr_hash and lh_char_hash for hashing pointer values - * and C strings respectively. - * @param equal_fn comparison function to compare keys. 2 standard ones defined: - * lh_ptr_hash and lh_char_hash for comparing pointer values - * and C strings respectively. - * @return a pointer onto the linkhash table. - */ -extern struct lh_table* lh_table_new(int size, char *name, - lh_entry_free_fn *free_fn, - lh_hash_fn *hash_fn, - lh_equal_fn *equal_fn); - -/** - * Convenience function to create a new linkhash - * table with char keys. - * @param size initial table size. - * @param name table name. - * @param free_fn callback function used to free memory for entries. - * @return a pointer onto the linkhash table. - */ -extern struct lh_table* lh_kchar_table_new(int size, char *name, - lh_entry_free_fn *free_fn); - - -/** - * Convenience function to create a new linkhash - * table with ptr keys. - * @param size initial table size. - * @param name table name. - * @param free_fn callback function used to free memory for entries. - * @return a pointer onto the linkhash table. - */ -extern struct lh_table* lh_kptr_table_new(int size, char *name, - lh_entry_free_fn *free_fn); - - -/** - * Free a linkhash table. - * If a callback free function is provided then it is called for all - * entries in the table. - * @param t table to free. - */ -extern void lh_table_free(struct lh_table *t); - - -/** - * Insert a record into the table. - * @param t the table to insert into. - * @param k a pointer to the key to insert. - * @param v a pointer to the value to insert. - */ -extern int lh_table_insert(struct lh_table *t, void *k, void *v); - - -/** - * Lookup a record into the table. - * @param t the table to lookup - * @param k a pointer to the key to lookup - * @return a pointer to the record structure of the value or NULL if it does not exist. - */ -extern struct lh_entry* lh_table_lookup_entry(struct lh_table *t, void *k); - -/** - * Lookup a record into the table - * @param t the table to lookup - * @param k a pointer to the key to lookup - * @return a pointer to the found value or NULL if it does not exist. - */ -extern void* lh_table_lookup(struct lh_table *t, void *k); - - -/** - * Delete a record from the table. - * If a callback free function is provided then it is called for the - * for the item being deleted. - * @param t the table to delete from. - * @param e a pointer to the entry to delete. - * @return 0 if the item was deleted. - * @return -1 if it was not found. - */ -extern int lh_table_delete_entry(struct lh_table *t, struct lh_entry *e); - - -/** - * Delete a record from the table. - * If a callback free function is provided then it is called for the - * for the item being deleted. - * @param t the table to delete from. - * @param k a pointer to the key to delete. - * @return 0 if the item was deleted. - * @return -1 if it was not found. - */ -extern int lh_table_delete(struct lh_table *t, void *k); - - -#endif diff --git a/client/json-c-0.7/ltmain.sh b/client/json-c-0.7/ltmain.sh deleted file mode 100644 index c715b5941..000000000 --- a/client/json-c-0.7/ltmain.sh +++ /dev/null @@ -1,6871 +0,0 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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. - -basename="s,^.*/,,g" - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION="1.5.22 Debian 1.5.22-4" -TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" - -# 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 - -# Check that we have a working $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, and then maybe $echo will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -duplicate_deps=no -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" - -##################################### -# Shell function definitions: -# This seems to be the best place for them - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $mkdir "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } - fi - - $echo "X$my_tmpdir" | $Xsed -} - - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $echo $win32_libid_type -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case "$@ " in - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE - fi -} - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - my_status="" - - $show "${rm}r $my_gentop" - $run ${rm}r "$my_gentop" - $show "$mkdir $my_gentop" - $run $mkdir "$my_gentop" - my_status=$? - if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then - exit $my_status - fi - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xdir="$my_gentop/$my_xlib" - - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - lipo -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - ${rm}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - func_extract_archives_result="$my_oldobjs" -} -# End of Shell function definitions -##################################### - -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" - -disable_libs=no - -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" - shift - - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - execute_dlfiles) - execute_dlfiles="$execute_dlfiles $arg" - ;; - tag) - tagname="$arg" - preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - ;; - *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; - - --version) - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - $echo - $echo "Copyright (C) 2005 Free Software Foundation, Inc." - $echo "This is free software; see the source for copying conditions. There is NO" - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $? - ;; - - --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) - run=: - ;; - - --features) - $echo "host: $host" - if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" - else - $echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - $echo "enable static libraries" - else - $echo "disable static libraries" - fi - exit $? - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --preserve-dup-deps) duplicate_deps="yes" ;; - - --quiet | --silent) - show=: - preserve_args="$preserve_args $arg" - ;; - - --tag) - prevopt="--tag" - prev=tag - preserve_args="$preserve_args --tag" - ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - preserve_args="$preserve_args --tag" - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi - -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE - fi - arg_mode=target - continue - ;; - - -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" - done - IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` - - # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" - continue - ;; - - * ) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" - done # for arg - - case $arg_mode in - arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE - ;; - target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE - ;; - *) - # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' - case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform=for ;; - *.java) xform=java ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi - lobj=${xdir}$objdir/$objname - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $echo "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - $echo "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - else - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - fi - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat $save_arg` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - done - else - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE - fi - arg=$save_arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - ;; - esac - continue - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs -framework System" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" - compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -pg pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ - -t[45]*|-txscale*|@*) - - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - # The PATH hackery in wrapper scripts is required on Windows - # in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -static) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done # argument parsing loop - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi - fi - - # Determine the type of output - case $output in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) - duplicate_compiler_generated_deps=$duplicate_deps - ;; - esac - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if test "X$duplicate_deps" = "Xyes" ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - case $linkmode in - lib) - passes="conv link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - for pass in $passes; do - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) - libs="$deplibs %DEPLIBS%" - test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" - ;; - esac - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue - fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - library_names= - old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $echo - $echo "*** Warning: Trying to link with static lib archive $deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because the file extensions .$libext of this argument makes me believe" - $echo "*** that it is just a static archive that I should not used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE - fi - - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - abs_ladir="$ladir" - fi - ;; - esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - $echo "$modename: warning: library \`$lib' was moved." 1>&2 - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { test "$prefer_static_libs" = no || test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $absdir" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes ; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - # This is a shared library - - # Warn about portability, can't link against -module's on - # some systems (darwin) - if test "$shouldnotlink" = yes && test "$pass" = link ; then - $echo - if test "$linkmode" = prog; then - $echo "*** Warning: Linking the executable $output against the loadable module" - else - $echo "*** Warning: Linking the shared library $output against the loadable module" - fi - $echo "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a module then we can not link against - # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | - $EGREP ": [^:]* bundle" >/dev/null ; then - $echo "** Warning, lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $echo - $echo "** And there doesn't seem to be a static archive available" - $echo "** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $echo - $echo "*** Warning: This system can not link to static lib archive $lib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $echo "*** But as you try to build a module library, libtool will still create " - $echo "*** a static module, that should work as long as the dlopening application" - $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - fi - ;; - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$path/$depdepl" ; then - depdepl="$path/$depdepl" - fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac - fi - path="" - ;; - *) - path="-L$path" - ;; - esac - ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE - else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" - $echo "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$2" - number_minor="$3" - number_revision="$4" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor - 1` - age="$number_minor" - revision="$number_minor" - ;; - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - esac - ;; - no) - current="$2" - revision="$3" - age="$4" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - - irix | nonstopux) - major=`expr $current - $age + 1` - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - fi - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$echo "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. - for path in $notinst_path; do - lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` - deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` - dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` - done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs -framework System" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for file magic test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a file magic. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval $echo \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a regex pattern. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` - done - fi - if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ - | grep . >/dev/null; then - $echo - if test "X$deplibs_check_method" = "Xnone"; then - $echo "*** Warning: inter-library dependencies are not supported in this platform." - else - $echo "*** Warning: inter-library dependencies are not known to be supported." - fi - $echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $echo - $echo "*** Warning: libtool could not satisfy all declared inter-library" - $echo "*** dependencies of module $libname. Therefore, libtool will create" - $echo "*** a static module, that should work as long as the dlopening" - $echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $echo "*** The inter-library dependencies that have been dropped here will be" - $echo "*** automatically added whenever a program is linked with this library" - $echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $echo - $echo "*** Since this library must not contain undefined symbols," - $echo "*** because either the platform does not support them or" - $echo "*** it was explicitly requested with -no-undefined," - $echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false - else - # The command line is too long to execute in one step. - $show "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$echo "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - delfiles= - last_robj= - k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - - if ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done - - $echo "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case $output in - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; - esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - case $host in - *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi - - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` - else - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` - ;; - esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` - finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` - fi - - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - exit_status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - - exit $exit_status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $run $rm $output - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - - $show "$link_command" - $run eval "$link_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - cat > $cwrappersource <> $cwrappersource<<"EOF" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#endif - -const char *program_name = NULL; - -void * xmalloc (size_t num); -char * xstrdup (const char *string); -const char * base_name (const char *name); -char * find_executable(const char *wrapper); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); - -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF - - cat >> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; - - for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - return 127; -} - -void * -xmalloc (size_t num) -{ - void * p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL -; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char)name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable(const char * path) -{ - struct stat st; - - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -char * -find_executable (const char* wrapper) -{ - int has_slash = 0; - const char* p; - const char* p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char* concat_name; - - DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char* path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char* q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR(*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - return NULL; -} - -char * -strendzap(char *str, const char *pat) -{ - size_t len, patlen; - - assert(str != NULL); - assert(pat != NULL); - - len = strlen(str); - patlen = strlen(pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp(str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char * mode, - const char * message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - $echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit $EXIT_FAILURE - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" - exit $EXIT_FAILURE - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - $echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "copying selected object files to avoid basename conflicts..." - - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status - fi - fi - - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - $echo "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $rm $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ -relink_command=\"$relink_command\"" - fi - done - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac - exit $EXIT_SUCCESS - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - if test "$inst_prefix_dir" = "$destdir"; then - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` - else - relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` - fi - - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE - fi - fi - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE - fi - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; - esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && exit $EXIT_SUCCESS - - $echo "X----------------------------------------------------------------------" | $Xsed - $echo "Libraries have been installed in:" - for libdir in $libdirs; do - $echo " $libdir" - done - $echo - $echo "If you ever happen to want to link against installed libraries" - $echo "in a given directory, LIBDIR, you must either use libtool, and" - $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - $echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - $echo " during execution" - fi - if test -n "$runpath_var"; then - $echo " - add LIBDIR to the \`$runpath_var' environment variable" - $echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $echo - $echo "See any operating system documentation about shared libraries for" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - if test "${save_LC_ALL+set}" = set; then - LC_ALL="$save_LC_ALL"; export LC_ALL - fi - if test "${save_LANG+set}" = set; then - LANG="$save_LANG"; export LANG - fi - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" - exit $EXIT_SUCCESS - fi - ;; - - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - - # Read the .lo file - . $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" \ - && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" \ - && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$noexename - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 - fi - done - - exit $exit_status - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - fi -fi # test -z "$show_help" - -if test -n "$exec_cmd"; then - eval exec $exec_cmd - exit $EXIT_FAILURE -fi - -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE. - -Report bugs to ." - exit $EXIT_SUCCESS - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -disable_libs=shared -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=static -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/client/json-c-0.7/missing b/client/json-c-0.7/missing deleted file mode 100755 index 894e786e1..000000000 --- a/client/json-c-0.7/missing +++ /dev/null @@ -1,360 +0,0 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. - -scriptversion=2005-06-08.21 - -# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# Originally by Fran,cois Pinard , 1996. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -# 02110-1301, 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. - -if test $# -eq 0; then - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 -fi - -run=: - -# In the cases where this matters, `missing' is being run in the -# srcdir already. -if test -f configure.ac; then - configure_ac=configure.ac -else - configure_ac=configure.in -fi - -msg="missing on your system" - -case "$1" in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - # Exit code 63 means version mismatch. This often happens - # when the user try to use an ancient version of a tool on - # a file that requires a minimum version. In this case we - # we should proceed has if the program had been absent, or - # if --run hadn't been passed. - if test $? = 63; then - run=: - msg="probably too old" - fi - ;; - - -h|--h|--he|--hel|--help) - echo "\ -$0 [OPTION]... PROGRAM [ARGUMENT]... - -Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an -error status if there is no known handling for PROGRAM. - -Options: - -h, --help display this help and exit - -v, --version output version information and exit - --run try to run the given command, and emulate it if it fails - -Supported PROGRAM values: - aclocal touch file \`aclocal.m4' - autoconf touch file \`configure' - autoheader touch file \`config.h.in' - automake touch all \`Makefile.in' files - bison create \`y.tab.[ch]', if possible, from existing .[ch] - flex create \`lex.yy.c', if possible, from existing .c - help2man touch the output file - lex create \`lex.yy.c', if possible, from existing .c - makeinfo touch the output file - tar try tar, gnutar, gtar, then tar without non-portable flags - yacc create \`y.tab.[ch]', if possible, from existing .[ch] - -Send bug reports to ." - exit $? - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing $scriptversion (GNU Automake)" - exit $? - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - -esac - -# Now exit if we have it, but it failed. Also exit now if we -# don't have it and --version was passed (most likely to detect -# the program). -case "$1" in - lex|yacc) - # Not GNU programs, they don't have --version. - ;; - - tar) - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - exit 1 - fi - ;; - - *) - if test -z "$run" && ($1 --version) > /dev/null 2>&1; then - # We have it, but it failed. - exit 1 - elif test "x$2" = "x--version" || test "x$2" = "x--help"; then - # Could not run --version or --help. This is probably someone - # running `$TOOL --version' or `$TOOL --help' to check whether - # $TOOL exists and not knowing $TOOL uses missing. - exit 1 - fi - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case "$1" in - aclocal*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acinclude.m4' or \`${configure_ac}'. You might want - to install the \`Automake' and \`Perl' packages. Grab them from - any GNU archive site." - touch aclocal.m4 - ;; - - autoconf) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`${configure_ac}'. You might want to install the - \`Autoconf' and \`GNU m4' packages. Grab them from any GNU - archive site." - touch configure - ;; - - autoheader) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`acconfig.h' or \`${configure_ac}'. You might want - to install the \`Autoconf' and \`GNU m4' packages. Grab them - from any GNU archive site." - files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` - test -z "$files" && files="config.h" - touch_files= - for f in $files; do - case "$f" in - *:*) touch_files="$touch_files "`echo "$f" | - sed -e 's/^[^:]*://' -e 's/:.*//'`;; - *) touch_files="$touch_files $f.in";; - esac - done - touch $touch_files - ;; - - automake*) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. - You might want to install the \`Automake' and \`Perl' packages. - Grab them from any GNU archive site." - find . -type f -name Makefile.am -print | - sed 's/\.am$/.in/' | - while read f; do touch "$f"; done - ;; - - autom4te) - echo 1>&2 "\ -WARNING: \`$1' is needed, but is $msg. - You might have modified some files without having the - proper tools for further handling them. - You can get \`$1' as part of \`Autoconf' from any GNU - archive site." - - file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` - test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` - if test -f "$file"; then - touch $file - else - test -z "$file" || exec >$file - echo "#! /bin/sh" - echo "# Created by GNU Automake missing as a replacement of" - echo "# $ $@" - echo "exit 0" - chmod +x $file - exit 1 - fi - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' $msg. You should only need it if - you modified a \`.y' file. You may need the \`Bison' package - in order for those modifications to take effect. You can get - \`Bison' from any GNU archive site." - rm -f y.tab.c y.tab.h - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.y) - SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.c - fi - SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" y.tab.h - fi - ;; - esac - fi - if [ ! -f y.tab.h ]; then - echo >y.tab.h - fi - if [ ! -f y.tab.c ]; then - echo 'main() { return 0; }' >y.tab.c - fi - ;; - - lex|flex) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.l' file. You may need the \`Flex' package - in order for those modifications to take effect. You can get - \`Flex' from any GNU archive site." - rm -f lex.yy.c - if [ $# -ne 1 ]; then - eval LASTARG="\${$#}" - case "$LASTARG" in - *.l) - SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` - if [ -f "$SRCFILE" ]; then - cp "$SRCFILE" lex.yy.c - fi - ;; - esac - fi - if [ ! -f lex.yy.c ]; then - echo 'main() { return 0; }' >lex.yy.c - fi - ;; - - help2man) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a dependency of a manual page. You may need the - \`Help2man' package in order for those modifications to take - effect. You can get \`Help2man' from any GNU archive site." - - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` - fi - if [ -f "$file" ]; then - touch $file - else - test -z "$file" || exec >$file - echo ".ab help2man is required to generate this page" - exit 1 - fi - ;; - - makeinfo) - echo 1>&2 "\ -WARNING: \`$1' is $msg. You should only need it if - you modified a \`.texi' or \`.texinfo' file, or any other file - indirectly affecting the aspect of the manual. The spurious - call might also be the consequence of using a buggy \`make' (AIX, - DU, IRIX). You might want to install the \`Texinfo' package or - the \`GNU make' package. Grab either from any GNU archive site." - # The file to touch is that specified with -o ... - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - # ... or it is the one specified with @setfilename ... - infile=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $infile` - # ... or it is derived from the source name (dir/f.texi becomes f.info) - test -z "$file" && file=`echo "$infile" | sed 's,.*/,,;s,.[^.]*$,,'`.info - fi - # If the file does not exist, the user really needs makeinfo; - # let's fail without touching anything. - test -f $file || exit 1 - touch $file - ;; - - tar) - shift - - # We have already tried tar in the generic part. - # Look for gnutar/gtar before invocation to avoid ugly error - # messages. - if (gnutar --version > /dev/null 2>&1); then - gnutar "$@" && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar "$@" && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" "$@" && exit 0 - ;; - esac - fi - - echo 1>&2 "\ -WARNING: I can't seem to be able to run \`tar' with the given arguments. - You may want to install GNU tar or Free paxutils, or check the - command line arguments." - exit 1 - ;; - - *) - echo 1>&2 "\ -WARNING: \`$1' is needed, and is $msg. - You might have modified some files without having the - proper tools for further handling them. Check the \`README' file, - it often tells you about the needed prerequisites for installing - this package. You may also peek at any GNU archive site, in case - some other package would contain this missing \`$1' program." - exit 1 - ;; -esac - -exit 0 - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-end: "$" -# End: diff --git a/client/json-c-0.7/mkinstalldirs b/client/json-c-0.7/mkinstalldirs deleted file mode 100755 index 8ab885ec9..000000000 --- a/client/json-c-0.7/mkinstalldirs +++ /dev/null @@ -1,99 +0,0 @@ -#! /bin/sh -# mkinstalldirs --- make directory hierarchy -# Author: Noah Friedman -# Created: 1993-05-16 -# Public domain - -errstatus=0 -dirmode="" - -usage="\ -Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." - -# process command line arguments -while test $# -gt 0 ; do - case "${1}" in - -h | --help | --h* ) # -h for help - echo "${usage}" 1>&2; exit 0 ;; - -m ) # -m PERM arg - shift - test $# -eq 0 && { echo "${usage}" 1>&2; exit 1; } - dirmode="${1}" - shift ;; - -- ) shift; break ;; # stop option processing - -* ) echo "${usage}" 1>&2; exit 1 ;; # unknown option - * ) break ;; # first non-opt arg - esac -done - -for file -do - if test -d "$file"; then - shift - else - break - fi -done - -case $# in -0) exit 0 ;; -esac - -case $dirmode in -'') - if mkdir -p -- . 2>/dev/null; then - echo "mkdir -p -- $*" - exec mkdir -p -- "$@" - fi ;; -*) - if mkdir -m "$dirmode" -p -- . 2>/dev/null; then - echo "mkdir -m $dirmode -p -- $*" - exec mkdir -m "$dirmode" -p -- "$@" - fi ;; -esac - -for file -do - set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` - shift - - pathcomp= - for d - do - pathcomp="$pathcomp$d" - case "$pathcomp" in - -* ) pathcomp=./$pathcomp ;; - esac - - if test ! -d "$pathcomp"; then - echo "mkdir $pathcomp" - - mkdir "$pathcomp" || lasterr=$? - - if test ! -d "$pathcomp"; then - errstatus=$lasterr - else - if test ! -z "$dirmode"; then - echo "chmod $dirmode $pathcomp" - - lasterr="" - chmod "$dirmode" "$pathcomp" || lasterr=$? - - if test ! -z "$lasterr"; then - errstatus=$lasterr - fi - fi - fi - fi - - pathcomp="$pathcomp/" - done -done - -exit $errstatus - -# Local Variables: -# mode: shell-script -# sh-indentation: 3 -# End: -# mkinstalldirs ends here diff --git a/client/json-c-0.7/printbuf.c b/client/json-c-0.7/printbuf.c deleted file mode 100644 index 79bdaf554..000000000 --- a/client/json-c-0.7/printbuf.c +++ /dev/null @@ -1,144 +0,0 @@ -/* - * $Id: printbuf.c,v 1.5 2006/01/26 02:16:28 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#include "config.h" - -#include -#include -#include - -#if HAVE_STDARG_H -# include -#else /* !HAVE_STDARG_H */ -# error Not enough var arg support! -#endif /* HAVE_STDARG_H */ - -#include "bits.h" -#include "debug.h" -#include "printbuf.h" - -struct printbuf* printbuf_new() -{ - struct printbuf *p; - - if(!(p = calloc(1, sizeof(struct printbuf)))) return NULL; - p->size = 32; - p->bpos = 0; - if(!(p->buf = malloc(p->size))) { - free(p); - return NULL; - } - return p; -} - - -int printbuf_memappend(struct printbuf *p, char *buf, int size) -{ - char *t; - if(p->size - p->bpos <= size) { - int new_size = max(p->size * 2, p->bpos + size + 8); -#ifdef PRINTBUF_DEBUG - mc_debug("printbuf_memappend: realloc " - "bpos=%d wrsize=%d old_size=%d new_size=%d\n", - p->bpos, size, p->size, new_size); -#endif /* PRINTBUF_DEBUG */ - if(!(t = realloc(p->buf, new_size))) return -1; - p->size = new_size; - p->buf = t; - } - memcpy(p->buf + p->bpos, buf, size); - p->bpos += size; - p->buf[p->bpos]= '\0'; - return size; -} - -#if !HAVE_VSNPRINTF && defined(WIN32) -# define vsnprintf _vsnprintf -#elif !HAVE_VSNPRINTF /* !HAVE_VSNPRINTF */ -# error Need vsnprintf! -#endif /* !HAVE_VSNPRINTF && defined(WIN32) */ - -#if !HAVE_VASPRINTF -/* CAW: compliant version of vasprintf */ -static int vasprintf(char **buf, const char *fmt, va_list ap) -{ -#ifndef WIN32 - static char _T_emptybuffer = '\0'; -#endif /* !defined(WIN32) */ - int chars; - char *b; - - if(!buf) { return -1; } - -#ifdef WIN32 - chars = _vscprintf(fmt, ap)+1; -#else /* !defined(WIN32) */ - /* CAW: RAWR! We have to hope to god here that vsnprintf doesn't overwrite - our buffer like on some 64bit sun systems.... but hey, its time to move on */ - chars = vsnprintf(&_T_emptybuffer, 0, fmt, ap)+1; - if(chars < 0) { chars *= -1; } /* CAW: old glibc versions have this problem */ -#endif /* defined(WIN32) */ - - b = (char*)malloc(sizeof(char)*chars); - if(!b) { return -1; } - - if((chars = vsprintf(b, fmt, ap)) < 0) - { - free(b); - } else { - *buf = b; - } - - return chars; -} -#endif /* !HAVE_VASPRINTF */ - -int sprintbuf(struct printbuf *p, const char *msg, ...) -{ - va_list ap; - char *t; - int size; - char buf[128]; - - /* user stack buffer first */ - va_start(ap, msg); - size = vsnprintf(buf, 128, msg, ap); - va_end(ap); - /* if string is greater than stack buffer, then use dynamic string - with vasprintf. Note: some implementation of vsnprintf return -1 - if output is truncated whereas some return the number of bytes that - would have been writen - this code handles both cases. */ - if(size == -1 || size > 127) { - int ret; - va_start(ap, msg); - if((size = vasprintf(&t, msg, ap)) == -1) return -1; - va_end(ap); - ret = printbuf_memappend(p, t, size); - free(t); - return ret; - } else { - return printbuf_memappend(p, buf, size); - } -} - -void printbuf_reset(struct printbuf *p) -{ - p->buf[0] = '\0'; - p->bpos = 0; -} - -void printbuf_free(struct printbuf *p) -{ - if(p) { - free(p->buf); - free(p); - } -} diff --git a/client/json-c-0.7/printbuf.h b/client/json-c-0.7/printbuf.h deleted file mode 100644 index bc1669bd1..000000000 --- a/client/json-c-0.7/printbuf.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * $Id: printbuf.h,v 1.4 2006/01/26 02:16:28 mclark Exp $ - * - * Copyright (c) 2004, 2005 Metaparadigm Pte. Ltd. - * Michael Clark - * - * This library is free software; you can redistribute it and/or modify - * it under the terms of the MIT license. See COPYING for details. - * - */ - -#ifndef _printbuf_h_ -#define _printbuf_h_ - -#undef PRINTBUF_DEBUG - -struct printbuf { - char *buf; - int bpos; - int size; -}; - -extern struct printbuf* -printbuf_new(); - -extern int -printbuf_memappend(struct printbuf *p, char *buf, int size); - -extern int -sprintbuf(struct printbuf *p, const char *msg, ...); - -extern void -printbuf_reset(struct printbuf *p); - -extern void -printbuf_free(struct printbuf *p); - -#endif diff --git a/client/json-c-0.7/stamp-h.in b/client/json-c-0.7/stamp-h.in deleted file mode 100644 index 9788f7023..000000000 --- a/client/json-c-0.7/stamp-h.in +++ /dev/null @@ -1 +0,0 @@ -timestamp diff --git a/client/json-c-0.7/test1.c b/client/json-c-0.7/test1.c deleted file mode 100644 index a1c1c358e..000000000 --- a/client/json-c-0.7/test1.c +++ /dev/null @@ -1,163 +0,0 @@ -#include -#include -#include - -#include "json.h" - -int main(int argc, char **argv) -{ - struct json_tokener *tok; - struct json_object *my_string, *my_int, *my_object, *my_array; - struct json_object *new_obj; - int i; - - mc_set_debug(1); - - my_string = json_object_new_string("\t"); - printf("my_string=%s\n", json_object_get_string(my_string)); - printf("my_string.to_string()=%s\n", json_object_to_json_string(my_string)); - json_object_put(my_string); - - my_string = json_object_new_string("\\"); - printf("my_string=%s\n", json_object_get_string(my_string)); - printf("my_string.to_string()=%s\n", json_object_to_json_string(my_string)); - json_object_put(my_string); - - my_string = json_object_new_string("foo"); - printf("my_string=%s\n", json_object_get_string(my_string)); - printf("my_string.to_string()=%s\n", json_object_to_json_string(my_string)); - - my_int = json_object_new_int(9); - printf("my_int=%d\n", json_object_get_int(my_int)); - printf("my_int.to_string()=%s\n", json_object_to_json_string(my_int)); - - my_array = json_object_new_array(); - json_object_array_add(my_array, json_object_new_int(1)); - json_object_array_add(my_array, json_object_new_int(2)); - json_object_array_add(my_array, json_object_new_int(3)); - json_object_array_put_idx(my_array, 4, json_object_new_int(5)); - printf("my_array=\n"); - for(i=0; i < json_object_array_length(my_array); i++) { - struct json_object *obj = json_object_array_get_idx(my_array, i); - printf("\t[%d]=%s\n", i, json_object_to_json_string(obj)); - } - printf("my_array.to_string()=%s\n", json_object_to_json_string(my_array)); - - my_object = json_object_new_object(); - json_object_object_add(my_object, "abc", json_object_new_int(12)); - json_object_object_add(my_object, "foo", json_object_new_string("bar")); - json_object_object_add(my_object, "bool0", json_object_new_boolean(0)); - json_object_object_add(my_object, "bool1", json_object_new_boolean(1)); - json_object_object_add(my_object, "baz", json_object_new_string("bang")); - json_object_object_add(my_object, "baz", json_object_new_string("fark")); - json_object_object_del(my_object, "baz"); - json_object_object_add(my_object, "arr", my_array); - printf("my_object=\n"); - json_object_object_foreach(my_object, key, val) { - printf("\t%s: %s\n", key, json_object_to_json_string(val)); - } - printf("my_object.to_string()=%s\n", json_object_to_json_string(my_object)); - - new_obj = json_tokener_parse("\"\003\""); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("/* hello */\"foo\""); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("// hello\n\"foo\""); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("\"\\u0041\\u0042\\u0043\""); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("null"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("True"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("12"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("12.3"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("[\"\\n\"]"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("[\"\\nabc\\n\"]"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("[null]"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("[]"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("[false]"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("[\"abc\",null,\"def\",12]"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("{}"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("{ \"foo\": \"bar\" }"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("{ \"foo\": \"bar\", \"baz\": null, \"bool0\": true }"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("{ \"foo\": [null, \"foo\"] }"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("{ \"abc\": 12, \"foo\": \"bar\", \"bool0\": false, \"bool1\": true, \"arr\": [ 1, 2, 3, null, 5 ] }"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - new_obj = json_tokener_parse("{ foo }"); - if(is_error(new_obj)) printf("got error as expected\n"); - - new_obj = json_tokener_parse("foo"); - if(is_error(new_obj)) printf("got error as expected\n"); - - new_obj = json_tokener_parse("{ \"foo"); - if(is_error(new_obj)) printf("got error as expected\n"); - - /* test incremental parsing */ - tok = json_tokener_new(); - new_obj = json_tokener_parse_ex(tok, "{ \"foo", 6); - if(is_error(new_obj)) printf("got error as expected\n"); - new_obj = json_tokener_parse_ex(tok, "\": {\"bar", 8); - if(is_error(new_obj)) printf("got error as expected\n"); - new_obj = json_tokener_parse_ex(tok, "\":13}}", 6); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - json_tokener_free(tok); - - json_object_put(my_string); - json_object_put(my_int); - json_object_put(my_object); - //json_object_put(my_array); - - return 0; -} diff --git a/client/json-c-0.7/test2.c b/client/json-c-0.7/test2.c deleted file mode 100644 index b7bdf6288..000000000 --- a/client/json-c-0.7/test2.c +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include -#include - -#include "json.h" - - -int main(int argc, char **argv) -{ - struct json_object *new_obj; - - mc_set_debug(1); - - new_obj = json_tokener_parse("/* more difficult test case */ { \"glossary\": { \"title\": \"example glossary\", \"GlossDiv\": { \"title\": \"S\", \"GlossList\": [ { \"ID\": \"SGML\", \"SortAs\": \"SGML\", \"GlossTerm\": \"Standard Generalized Markup Language\", \"Acronym\": \"SGML\", \"Abbrev\": \"ISO 8879:1986\", \"GlossDef\": \"A meta-markup language, used to create markup languages such as DocBook.\", \"GlossSeeAlso\": [\"GML\", \"XML\", \"markup\"] } ] } } }"); - printf("new_obj.to_string()=%s\n", json_object_to_json_string(new_obj)); - json_object_put(new_obj); - - return 0; -} diff --git a/client/make.config b/client/make.config deleted file mode 100644 index 208f92237..000000000 --- a/client/make.config +++ /dev/null @@ -1,131 +0,0 @@ -# Copyright (c) 2007, 2008 Matthias Hess, Erich Focht -# This file is part of XtreemFS. -# -# XtreemFS is part of XtreemOS, a Linux-based Grid Operating -# System, see for more details. The -# XtreemOS project has been developed with the financial support -# of the European Commission's IST program under contract -# #FP6-033576. -# -# XtreemFS 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. -# -# XtreemFS 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 XtreemFS. If not, see . - -ARCH := $(shell uname -i) - -# libraries are in lib64 on certain architectures -ARCHLIB64 = x86_64 -ifneq (,$(findstring $(ARCH),$(ARCHLIB64))) -LIBBASE = lib64 -else -LIBBASE = lib -endif - -PROT_VERSION = 2 -NO_DEBUG = y -# LIGHT_DEBUG = y -# PROFILING = y -XTREEMOS_ENV = n -# ITAC = yes - -# -# for building neon you'll need expat, zlib and openssl devel packages -# -NEON_BASEDIR = $(TOPDIR)/neon-0.27.2 -NEON_INCDIR = $(NEON_BASEDIR)/src -NEON_CC_INCS = -I$(NEON_INCDIR) -NEON_LIBDIR = $(NEON_BASEDIR)/src/.libs -NEON_CC_LIBS = -L$(NEON_LIBDIR) -lneon -NEON_CC_STATIC_LIBS = -L$(NEON_LIBDIR) -lneon -NEON_CC_PARTSH_LIBS = -lssl - - -JSON_BASEDIR = $(TOPDIR)/json-c-0.7 -JSON_INCDIR = $(JSON_BASEDIR) -JSON_LIBDIR = $(JSON_BASEDIR)/.libs -JSON_CC_INCS = -I$(JSON_INCDIR) -JSON_CC_STATIC_LIBS = -L$(JSON_LIBDIR) -ljson - -FUSE_BASEDIR = /usr -FUSE_CC_FLAGS = -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -I$(FUSE_BASEDIR)/include -FUSE_CC_LIBS = -L$(FUSE_BASEDIR) -lfuse - -LIBACL_CC_FLAGS = -LIBACL_CC_LIBS = -lacl - -ITAC_BASEDIR = /opt/intel/itac/7.1 -ITAC_INCDIR = $(ITAC_BASEDIR)/include -ITAC_LIBDIR = $(ITAC_BASEDIR)/lib -ITAC_CC_FLAGS = -g -finstrument-functions -ITAC_CC_INCS = -I$(ITAC_INCDIR) -ITAC_CC_LIBS = -L$(ITAC_LIBDIR) -lVTcs -lvtunwind -ldwarf -lelf -lpthread -lm - -KERNEL_VERSION = $(shell uname -r) -KERNEL_BASEDIR = /lib/modules/$(KERNEL_VERSION)/build -KERNEL_INCDIR = $(KERNEL_BASEDIR)/include -KERNEL_CC_INCS = -I$(KERNEL_INCDIR) - -XTREEMOS_BASEDIR = /opt/xtreemos-arg -XTREEMOS_LIBDIR = $(XTREEMOS_BASEDIR)/lib -XTREEMOS_INCDIR = $(XTREEMOS_BASEDIR)/include -XTREEMOS_CC_INCS = -I$(XTREEMOS_INCDIR) -XTREEMOS_CC_LIBS = -L$(XTREEMOS_LIBDIR) -lxos_ams -lxos_comsec -lkeyutils -lssl - - -CURRENT_CC_INCS = -I$(TOPDIR)/src - -CC_FLAGS = -Wall -D_GNU_SOURCE -pthread -DPROT_VERSION=$(PROT_VERSION) -CC_LDFLAGS = -pthread - -ifeq ($(NO_DEBUG),y) -CC_FLAGS += -O3 -funroll-loops -DNO_DEBUG -DNO_TRACE -CC_LDFLAGS += -g -else -ifeq ($(LIGHT_DEBUG),y) -CC_FLAGS += -O0 -g -DNO_DEBUG -DNO_TRACE -CC_LDFLAGS += -g -else -CC_FLAGS += -g -O0 -CC_LDFLAGS += -g -O0 -endif -endif - -ifdef PROFILING -CC_FLAGS += -pg -CC_LDFLAGS += -pg -endif - -ifeq ($(XTREEMOS_ENV),y) -CC_FLAGS += -DXTREEMOS_ENV -CC_INCS += $(XTREEMOS_CC_INCS) -CC_LIBS += $(XTREEMOS_CC_LIBS) -endif - -ifdef ITAC -CC_LIBS += $(ITAC_CC_LIBS) -endif - -CC = gcc -CC_LD = gcc - - -# -# EF: Hack for building an executable which is partially statically linked -# with NEON, JSON, whatever, and dynamically linked with the standard libs -# -DEFAULT_CC_LIBS = -lrt -ldl -lc - -# Usage: PARTST_LD -PARTST_LD = $(CC_LD) $(CC_LDFLAGS) -Wl,-r -nostartfiles -nostdlib -o $(1)_st \ - $(2) $(3) && \ - $(CC_LD) $(CC_LDFLAGS) -o $(1) $(1)_st --begin-group $(4) $(DEFAULT_CC_LIBS) --end-group && \ - $(RM) $(1)_st diff --git a/client/man/man1/xtfs_lsvol.1 b/client/man/man1/xtfs_lsvol.1 deleted file mode 100644 index fd6d70e1d..000000000 --- a/client/man/man1/xtfs_lsvol.1 +++ /dev/null @@ -1,33 +0,0 @@ -.TH xtfs_lsvol 1 "July 2008" "The XtreemFS Distributed File System" "XtreemFS client" -.SH NAME -xtfs_lsvol \- list all volumes on a metadata server (MRC). -.SH SYNOPSIS -\fBxtfs_lsvol \fImrc_URL\fR -.br - -.SH DESCRIPTION -.I xtfs_lsvol -lists all volumes on the Metdata Server (MRC) with the address -.I mrc_URL - -.SH EXAMPLE USAGE -.B "xtfs_lsvol http://localhost" -.br -.B "xtfs_lsvol https://some.remote.machine:12345" - - -.SH "SEE ALSO" -.BR xtfs_mount (1), -.BR xtfs_umount (1), -.BR xtfs_showmount (1), -.BR xtfs_mkvol (1), -.BR xtfs_rmvol (1), -.BR xtfs_stat (1), -.BR xtfs_sp (1), -.BR xtfs_scrub (1), -.BR xtfs_mrcdbtool (1) -.BR - - -.SH AVAILABILITY -The xtfs_lsvol command is part of the XtreemFS-client package and is available from http://www.XtreemFS.org \ No newline at end of file diff --git a/client/man/man1/xtfs_mkvol.1 b/client/man/man1/xtfs_mkvol.1 deleted file mode 100644 index a4a589e4a..000000000 --- a/client/man/man1/xtfs_mkvol.1 +++ /dev/null @@ -1,99 +0,0 @@ -.TH xtfs_mkvol 1 "July 2008" "The XtreemFS Distributed File System" "XtreemFS client" -.SH NAME -xtfs_mkvol \- create a new XtreemFS volume on an MRC -.SH SYNOPSIS -.B "xtfs_mkvol --help" -.br -\fBxtfs_mkvol [ \fIoptions\fB ] \fImrc_URL\fR/\fIvolume_name -.br - -.SH DESCRIPTION -.I xtfs_mkvol -creates a new volume named -.I volume_name -on the Metdata Server (MRC) with the address -.I mrc_URL -. - -.SH EXAMPLE USAGE -.B "xtfs_mkvol -p RAID0,256,4 -a 2 http://remote.mrc.machine/myVolume" -.PP -creates a new volume named myVolume on the MRC at remote.mrc.machine with a default stripe size of 256kB and a width of 4 storage servers (OSDs). POSIX permissions are used. - - -.SH OPTIONS -.TP -.TP -.B \-h -Print help. -.TP -\fB\-p/\-\-striping-policy=\fIpolicy -Defines the default striping policy to use for the volume. The format is \fIname\fR,\fIstripe_size\fR,\fIwidth. -.RS -.TP -.I name -the name of the striping policy to use -.RS -.B RAID0 -.RE -.TP -.I stripe_size -The size in kB of each stripe of the file. -.TP -.I width -The number of OSDs to stripe over. -.PP -The default policy if nothing is specified is RAID0,4,1 -.RE - -\fB\-s/\-\-osd-selection=\fIid\fR -.RS -.br -Defines the default OSD selection method to use for the volume. -.TP -.I 1 -random OSD selection -.TP -.I 2 -IP-address proximity-based OSD selection. -.PP -The default selection method is 1. -.RE - -\fB\-s/\-\-access-policy=\fIid\fR -.RS -.br -Defines the access policy to use for authorizing access to the volume. -.TP -.I 1 -no access policy - everyone is authorized -.TP -.I 2 -POSIX ACLs - regular POSIX permissions / ACL based authorization -.TP -.I 3 -Volume ACLs - similar to POSIX ACLs but there is only a single set of ACLs for the whole volume. Thsi means there are no individual permissions per file/directory. -.PP -The default access policy is 1. -.RE - -\fB\-c/\-\-cert=\fIfile\fR -Used to specify the PKCS#12 file with the credentials (cert + private key) to authenticate at the MRC. Must be used if SSL is used. - - - -.SH "SEE ALSO" -.BR xtfs_mount (1), -.BR xtfs_umount (1), -.BR xtfs_showmount (1), -.BR xtfs_rmvol (1), -.BR xtfs_lsvol (1), -.BR xtfs_stat (1), -.BR xtfs_sp (1), -.BR xtfs_scrub (1), -.BR xtfs_mrcdbtool (1) -.BR - - -.SH AVAILABILITY -The xtfs_mkvol command is part of the XtreemFS-client package and is available from http://www.XtreemFS.org \ No newline at end of file diff --git a/client/man/man1/xtfs_mount.1 b/client/man/man1/xtfs_mount.1 deleted file mode 100644 index ffd442688..000000000 --- a/client/man/man1/xtfs_mount.1 +++ /dev/null @@ -1,78 +0,0 @@ -.TH xtfs_mount 1 "July 2008" "The XtreemFS Distributed File System" "XtreemFS client" -.SH NAME -xtfs_mount \- mount an XtreemFS volume -.SH SYNOPSIS -.B "xtfs_mount --help" -.br -\fBxtfs_mount -o \fBvolume_url=\fIURL \fImountpoint -.br - -.SH DESCRIPTION -.I xtfs_mount -mounts an XtreemFS volume in the given directory. xtfs_mount is implemented as a FUSE user-level file system driver. Other than in-kernel drives, it operates as a detached process per mount point. - -.SH EXAMPLE USAGE -.B "xtfs_mount -o volume_url=http://remote.mrc.machine/myVolume /xtreemfs" -.PP -Mounts the volume myVolume from the metadata server (MRC) remote.mrc.machine at /xtreemfs in the local file system. - -.SH OPTIONS -.TP -.B \-V -Output version. -.TP -.B \-h -Print help. -.TP -.B \-o -flag followed by a comma separated string of options. -.RS -.TP -.B volume_url -The full URL to the volume to be mounted including the address of its hosting metadata server. Example: volume_url=http://localhost:32636/volumename -.TP -.B dirservice -The URL to the directory service to be contacted in order to resolve UUIDs. Example: dirservice=http://localhost:32638 -.TP -.B ssl_cert -Path to a PKCS#12 credentials file (private key + certificate) to use for SSL authentication. Must be present when volume_url starts with https://. -.TP -.B allow_other -Allow other users (than the one who mounted the volume) to access the mounted volume. You might need to enable this option in your /etc/fuse.conf with 'user_allow_other'. -.TP -.B allow_root -Allows root to access the mounted volume. You might need to enable this option in your /etc/fuse.conf with 'user_allow_other'. -.TP -.B direct_io -Disables all caching in the client, i.e. all reads are served directly from the server. This will reduce the read performance but ensures consistency when files are used by multiple machines. This option will -.B disable mmap -which means that no executables can be run on a volume mounted with direct_io. -.TP -.B default_permissions -FUSE mount option that enable permission checking by kernel. This is necessary for Linux kernels 2.6.18 or earlier (see KNOWN ISSUES). -.RE - -.SH "SEE ALSO" -.BR fusermount (1), -.BR xtfs_umount (1), -.BR xtfs_showmount (1), -.BR xtfs_mkvol (1), -.BR xtfs_rmvol (1), -.BR xtfs_lsvol (1), -.BR xtfs_stat (1), -.BR xtfs_sp (1), -.BR xtfs_scrub (1), -.BR xtfs_mrcdbtool (1) -.BR - -.SH "KNOWN ISSUES" -FUSE does not support mmap in connection with direct I/O. In order to get applications running on XtreemFS that rely on mmap, volumes have to be mounted without using the FUSE option -.B "-o direct_io" -. However, this might lead to inconsistencies if different clients access a file concurrently, as requests might be serviced from the local page cache. - -When run on older Linux kernels (2.6.18 or earlier), the XtreemFS client might fail to enforce access control when changing to a directory. The problem can be solved by using the -.B "-o default_permissions" -parameter when mounting the volume. - -.SH AVAILABILITY -The xtfs_mount command is part of the XtreemFS-client package and is available from http://www.XtreemFS.org \ No newline at end of file diff --git a/client/man/man1/xtfs_rmvol.1 b/client/man/man1/xtfs_rmvol.1 deleted file mode 100644 index 2f2e1d3b2..000000000 --- a/client/man/man1/xtfs_rmvol.1 +++ /dev/null @@ -1,33 +0,0 @@ -.TH xtfs_rmvol 1 "July 2008" "The XtreemFS Distributed File System" "XtreemFS client" -.SH NAME -xtfs_rmvol \- delete a volume and all files on this volume from a metadata server (MRC). -.SH SYNOPSIS -\fBxtfs_lsvol \fIvolume_URL\fR -.br - -.SH DESCRIPTION -.I xtfs_rmvol -deletes the volume specified by -.I volume_URL -from the metadata server (MRC). -.B "Be careful, this command will delete the volume and all files on it!" - -.SH EXAMPLE USAGE -.B "xtfs_rmvol http://remote.mrc.machine/myVolume" - - -.SH "SEE ALSO" -.BR xtfs_mount (1), -.BR xtfs_umount (1), -.BR xtfs_showmount (1), -.BR xtfs_mkvol (1), -.BR xtfs_lsvol (1), -.BR xtfs_stat (1), -.BR xtfs_sp (1), -.BR xtfs_scrub (1), -.BR xtfs_mrcdbtool (1) -.BR - - -.SH AVAILABILITY -The xtfs_rmvol command is part of the XtreemFS-client package and is available from http://www.XtreemFS.org \ No newline at end of file diff --git a/client/man/man1/xtfs_showmount.1 b/client/man/man1/xtfs_showmount.1 deleted file mode 100644 index 5e02ff1e3..000000000 --- a/client/man/man1/xtfs_showmount.1 +++ /dev/null @@ -1,26 +0,0 @@ -.TH xtfs_showmount 1 "July 2008" "The XtreemFS Distributed File System" "XtreemFS client" -.SH NAME -xtfs_showmount \- list the XtreemFS volumes currently mounted on the machine -.SH SYNOPSIS -.B "xtfs_showmount" -.br - -.SH DESCRIPTION -.I xtfs_showmount -lists all XtreemFS volumes currenlty mounted on the machine. - -.SH "SEE ALSO" -.BR mount (8), -.BR xtfs_mount (1), -.BR xtfs_umount (1), -.BR xtfs_mkvol (1), -.BR xtfs_rmvol (1), -.BR xtfs_lsvol (1), -.BR xtfs_stat (1), -.BR xtfs_sp (1), -.BR xtfs_scrub (1), -.BR xtfs_mrcdbtool (1) -.BR - -.SH AVAILABILITY -The xtfs_showmount command is part of the XtreemFS-client package and is available from http://www.XtreemFS.org \ No newline at end of file diff --git a/client/man/man1/xtfs_stat.1 b/client/man/man1/xtfs_stat.1 deleted file mode 100644 index 747b8018d..000000000 --- a/client/man/man1/xtfs_stat.1 +++ /dev/null @@ -1,34 +0,0 @@ -.TH xtfs_stat 1 "July 2008" "The XtreemFS Distributed File System" "XtreemFS client" -.SH NAME -xtfs_stat \- show information about an XtreemFS file or directory. -.SH SYNOPSIS -.B "xtfs_stat" -.I path -.br - -.SH DESCRIPTION -.I xtfs_stat -shows information about \fIpath\fP, where \fIpath\fP -refers to a file or directory that is part of a mounted XtreemFS volume. \I xtfs_stat -lists standard POSIX metadata, as well as specific XtreemFS-related metadata. Amongst others, the latter includes information about how the file is striped, and where single objects of the file are stored. - -.SH EXAMPLE USAGE -.B "xtfs_stat /xtreemfs/somefile.bin" -.PP -Shows information about the file -.B /xtreemfs/somefile.bin - -.SH "SEE ALSO" -.BR xtfs_mount (1), -.BR xtfs_umount (1), -.BR xtfs_showmount (1), -.BR xtfs_mkvol (1), -.BR xtfs_rmvol (1), -.BR xtfs_lsvol (1), -.BR xtfs_sp (1), -.BR xtfs_scrub (1), -.BR xtfs_mrcdbtool (1) -.BR - -.SH AVAILABILITY -The xtfs_stat command is part of the XtreemFS-client package and is available from http://www.XtreemFS.org \ No newline at end of file diff --git a/client/man/man1/xtfs_umount.1 b/client/man/man1/xtfs_umount.1 deleted file mode 100644 index 618619355..000000000 --- a/client/man/man1/xtfs_umount.1 +++ /dev/null @@ -1,32 +0,0 @@ -.TH xtfs_umount 1 "July 2008" "The XtreemFS Distributed File System" "XtreemFS client" -.SH NAME -xtfs_umount \- unmount a XtreemFS volume -.SH SYNOPSIS -.B "xtfs_umount" -.I mountpoint -.br - -.SH DESCRIPTION -.I xtfs_umount -is a wrapper around fusermount which unmounts a previosly mounted volume. Make sure that the volume is not used anymore, otherwise xtfs_umount will fail. - -.SH EXAMPLE USAGE -.B "xtfs_umount /xtreemfs" -.PP -Unmounts the XtreemFS volume mounted at /xtreemfs in the local file system. - -.SH "SEE ALSO" -.BR fusermount (1), -.BR xtfs_mount (1), -.BR xtfs_showmount (1), -.BR xtfs_mkvol (1), -.BR xtfs_rmvol (1), -.BR xtfs_lsvol (1), -.BR xtfs_stat (1), -.BR xtfs_sp (1), -.BR xtfs_scrub (1), -.BR xtfs_mrcdbtool (1) -.BR - -.SH AVAILABILITY -The xtfs_umount command is part of the XtreemFS-client package and is available from http://www.XtreemFS.org \ No newline at end of file diff --git a/client/neon-0.27.2/.package b/client/neon-0.27.2/.package deleted file mode 100644 index 493f404ab..000000000 --- a/client/neon-0.27.2/.package +++ /dev/null @@ -1 +0,0 @@ -announce-list=neon@webdav.org diff --git a/client/neon-0.27.2/.release.sh b/client/neon-0.27.2/.release.sh deleted file mode 100755 index 7e79f23eb..000000000 --- a/client/neon-0.27.2/.release.sh +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -set -ex - -major=`echo $1 | awk -F. '{print $1;}'` -minor=`echo $1 | awk -F. '{print $2;}'` -release=`echo $1 | awk -F. '{print $3;}'` -version=$1 - -for f in config.hw; do -in=$f.in -out=$f -sed -e "s/@VERSION@/$version/g" \ - -e "s/@MAJOR@/$major/g" \ - -e "s/@MINOR@/$minor/g" \ - -e "s/@RELEASE@/$release/g" \ - -e "s,@top_srcdir@,`pwd`,g" < $in > $out -done - -echo $1 > .version - -# for the documentation: -date +"%e %B %Y" | tr -d '\n' > doc/date.xml -echo -n $1 > doc/version.xml - -ALL_LINGUAS=`echo po/*.po | sed 's,po/,,g;s,\.po,,g'` - -# Try to create a valid Makefile -tmp=`mktemp /tmp/neon-XXXXXX` -sed -e 's,@SET_MAKE@,,;s,@SHELL@,/bin/sh,' \ - -e "s,@top_srcdir@,`pwd`," \ - -e "s,@ALL_LINGUAS@,${ALL_LINGUAS}," \ - < Makefile.in > $tmp -make -f $tmp docs compile-gmo -rm -f $tmp diff --git a/client/neon-0.27.2/.version b/client/neon-0.27.2/.version deleted file mode 100644 index 3edc695dc..000000000 --- a/client/neon-0.27.2/.version +++ /dev/null @@ -1 +0,0 @@ -0.27.2 diff --git a/client/neon-0.27.2/AUTHORS b/client/neon-0.27.2/AUTHORS deleted file mode 100644 index 26be6d8f8..000000000 --- a/client/neon-0.27.2/AUTHORS +++ /dev/null @@ -1,8 +0,0 @@ -neon is Copyright (C) 1999-2007 Joe Orton -Portions are: -Copyright (C) 1999-2000 Tommi Komulainen -Copyright (C) 1999-2000 Peter Boos -Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. -Copyright (C) 2004 Aleix Conchillo Flaque -Copyright (C) 2004 Jiang Lei -Copyright (C) 2004-2005 Vladimir Berezniker @ http://public.xdi.org/=vmpn diff --git a/client/neon-0.27.2/BUGS b/client/neon-0.27.2/BUGS deleted file mode 100644 index 3a7bba056..000000000 --- a/client/neon-0.27.2/BUGS +++ /dev/null @@ -1,38 +0,0 @@ - -Known problems/bugs in neon -*- text -*- ---------------------------- - -* several reports of issues with long-lived sessions causing problems - with GSSAPI auth using mod_auth_kerb. May be a server problem, but - needs further investigation to be sure. - -* 2818 requires that a on rejection of the SSL server cert, a "bad certificate" - message should be sent - this is not being done currently (and can probably - only be done with OpenSSL by actually doing cert verification in the verify - callback) - -* ne_lock_discover does not handle multiple (shared) locks on - a single resource. - -* SSL session caching issues; only cache for clean shutdowns, and - only cache on shutdown, since the SSL_SESSION may change during - an ne_session? - -* It would be nice to fail with a friendly error message if a client -cert is requested by the srever but one is not provided. Currently, -returning -1 from the provide_client_cert function would allow that -(as it forces the SSL handshake to fail), but that would prevent -opportunistic use of client certificates, of the "SSLVerifyClient -optional" variety. - -* perhaps allow a per-Server-header hack for "Darwin Streaming Server -4.0" which doesn't terminate the response headers: -http://bugzilla.gnome.org/show_bug.cgi?id=366331 - -HTTP/1.1 200 OK -Server: Darwin Streaming Server 4.0 -Content-Type: audio/mpeg -Cache-Control: no-cache -Pragma: no-cache -Connection: close -W8޳����s0�� diff --git a/client/neon-0.27.2/ChangeLog b/client/neon-0.27.2/ChangeLog deleted file mode 100644 index b033011ed..000000000 --- a/client/neon-0.27.2/ChangeLog +++ /dev/null @@ -1,4287 +0,0 @@ ------------------------------------------------------------------------- -r1260 | joe | 2007-09-25 10:27:22 +0100 (Tue, 25 Sep 2007) | 1 line - -Tag release 0.27.2. ------------------------------------------------------------------------- -r1259 | joe | 2007-09-25 10:26:58 +0100 (Tue, 25 Sep 2007) | 2 lines - -* po/: make update-po. - ------------------------------------------------------------------------- -r1258 | joe | 2007-09-25 10:25:17 +0100 (Tue, 25 Sep 2007) | 2 lines - -Bump to 0.27.2. - ------------------------------------------------------------------------- -r1257 | joe | 2007-09-25 10:23:56 +0100 (Tue, 25 Sep 2007) | 5 lines - -Merge r1256 from trunk: - -* src/ne_auth.c (verify_negotiate_response): Fix crash in GSSAPI -Negotiate response header verification. - ------------------------------------------------------------------------- -r1254 | joe | 2007-09-16 11:26:53 +0100 (Sun, 16 Sep 2007) | 11 lines - -Merge r1250, r1251, r1252, r1253 from trunk: - -* src/ne_openssl.c: Update comments. (match_hostname): Remove -debugging. - -* test/request.c (status, status_chunked): Fix memory leak. - -* test/socket.c (serve_reset): Add delay before sending RST. - -* test/run.sh: Run all test suites despite failures. - ------------------------------------------------------------------------- -r1241 | joe | 2007-08-22 13:02:46 +0100 (Wed, 22 Aug 2007) | 4 lines - -Merge r1240 from trunk: - -* macros/neon-xml-parser.m4 (NE_XML_BUNDLED_EXPAT): Define NE_FMT_XML_SIZE. - ------------------------------------------------------------------------- -r1239 | joe | 2007-08-22 13:00:06 +0100 (Wed, 22 Aug 2007) | 9 lines - -Merge r1237, r1238 from trunk: - -* src/ne_session.h: Fix description of total counter for response -progress. - -* test/request.c (status_chunked): New test. - -* src/ne_session.h: Add forward-compat note for ne_session_status enum. - ------------------------------------------------------------------------- -r1236 | joe | 2007-08-22 12:47:19 +0100 (Wed, 22 Aug 2007) | 4 lines - -Merge r1235 from trunk: - -* src/ne_request.c (ne_read_response_block): Fix response progress counter. - ------------------------------------------------------------------------- -r1234 | joe | 2007-08-22 10:10:52 +0100 (Wed, 22 Aug 2007) | 2 lines - -Create 0.27.x branch from 0.27.0 tag. - ------------------------------------------------------------------------- -r1233 | joe | 2007-08-21 20:12:49 +0100 (Tue, 21 Aug 2007) | 1 line - -Tag release 0.27.0. ------------------------------------------------------------------------- -r1232 | joe | 2007-08-21 20:12:30 +0100 (Tue, 21 Aug 2007) | 2 lines - -* NEWS: Tweak more. - ------------------------------------------------------------------------- -r1231 | joe | 2007-08-21 20:09:07 +0100 (Tue, 21 Aug 2007) | 2 lines - -* po/: make update-po. - ------------------------------------------------------------------------- -r1230 | joe | 2007-08-21 20:07:23 +0100 (Tue, 21 Aug 2007) | 2 lines - -* NEWS: Tweak. - ------------------------------------------------------------------------- -r1229 | joe | 2007-08-21 20:06:43 +0100 (Tue, 21 Aug 2007) | 2 lines - -* NEWS: Tweak, update. - ------------------------------------------------------------------------- -r1228 | joe | 2007-08-21 19:59:32 +0100 (Tue, 21 Aug 2007) | 4 lines - -* macros/neon.m4: Bump to 0.27. - -* NEWS: Update. - ------------------------------------------------------------------------- -r1227 | joe | 2007-08-21 19:59:07 +0100 (Tue, 21 Aug 2007) | 3 lines - -* BUGS: Note a broken HTTP server which would need some custom -hack to be supported. - ------------------------------------------------------------------------- -r1226 | joe | 2007-08-21 19:56:40 +0100 (Tue, 21 Aug 2007) | 11 lines - -Make the notifier and progress interfaces mutually exclusive since the -old interface is only kept for backwards-compatibility. - -* src/ne_request.c (notify_status): Don't invoke the progress -callback. - -* src/ne_session.c (progress_notifier): New function. -(ne_set_progress): Implement using a notifier callback. - -* src/ne_session.h: Note the mutual exclusivity. - ------------------------------------------------------------------------- -r1225 | joe | 2007-08-21 16:38:12 +0100 (Tue, 21 Aug 2007) | 3 lines - -* src/ne_gnutls.c [HAVE_ICONV && HAVE_GNUTLS_X509_DN_GET_RDN_AVA]: -Include errno.h, fix build. - ------------------------------------------------------------------------- -r1224 | joe | 2007-08-19 09:56:45 +0100 (Sun, 19 Aug 2007) | 6 lines - -* src/ne_session.h (ne_ssl_trust_cert): Clarify use with non-SSL session. - -* src/ne_session.c (ne_ssl_trust_cert): Do nothing for non-SSL session. - -* test/ssl.c (nonssl_trust): New test case. - ------------------------------------------------------------------------- -r1223 | joe | 2007-08-18 14:28:22 +0100 (Sat, 18 Aug 2007) | 2 lines - -* test/socket.c (addr_reverse): Remove debugging code added in r1220. - ------------------------------------------------------------------------- -r1222 | joe | 2007-08-10 16:26:08 +0100 (Fri, 10 Aug 2007) | 5 lines - -Perform hostname canonicalization for SSPI, patch by Yves Martin: - -* src/ne_sspi.c (canonical_hostname): New function. -(ne_sspi_create_context): Use the canonical hostname in the SPN. - ------------------------------------------------------------------------- -r1221 | joe | 2007-08-10 15:39:26 +0100 (Fri, 10 Aug 2007) | 2 lines - -* config.hw.in: Fix ne_xml.c build on Win32. - ------------------------------------------------------------------------- -r1220 | joe | 2007-08-10 14:05:10 +0100 (Fri, 10 Aug 2007) | 7 lines - -* src/ne_socket.h (ne_iaddr_reverse), - src/ne_socket.c (ne_iaddr_reverse): New function. - -* test/socket.c (addr_reverse): New tests. - -* macros/neon.m4 (LIBNEON_SOURCE_CHECKS): Check for getnameinfo too. - ------------------------------------------------------------------------- -r1219 | joe | 2007-08-10 11:29:26 +0100 (Fri, 10 Aug 2007) | 9 lines - -* src/ne_request.c (ne_begin_request): Ignore the "identity" -transfer-coding since "privoxy" apparently sends it. Fail for unknown -transfer-codings. - -* test/request.c (te_identity): New test, replacing any_te_header. -(fail_on_invalid): Test for failure with unknown transfer-codings. - -* doc/using.xml: Update section on transfer-encoding interpretation. - ------------------------------------------------------------------------- -r1218 | joe | 2007-08-09 10:46:36 +0100 (Thu, 09 Aug 2007) | 11 lines - -Fix compiler warnings with expat 2.x API: - -* macros/neon.m4 (NEON_FORMAT): Fix use of headers passed to -AC_CHECK_SIZEOF. - -* macros/neon-xml-parser.m4 (NE_XML_EXPAT): Check how to print -the XML_Size type, if defined. - -* src/ne_xml.c (ne_xml_parse): Use correct format string for -return value of XML_GetCurrentLineNumber. - ------------------------------------------------------------------------- -r1217 | joe | 2007-08-08 09:29:00 +0100 (Wed, 08 Aug 2007) | 10 lines - -* src/ne_session.h (ne_session_flag): Add NE_SESSFLAG_CONNAUTH. - -* src/ne_request.c (ne_begin_request): Ignore the IDEMPOTENT flag if -the session CONNAUTH flag is set. - -* src/ne_auth.c: Define AUTH_FLAG_CONN_AUTH macro, use for -Negotiate/NTLM schemes. -(ah_pre_send): Remove non-functional hack to clear IDEMPOTENT flag. -(ah_post_send): Set or clear session CONNAUTH flag appropriately. - ------------------------------------------------------------------------- -r1216 | joe | 2007-07-31 19:28:30 +0100 (Tue, 31 Jul 2007) | 4 lines - -* src/ne_uri.c (URI_FRAGMENT): Add macro. -(ne_uri_parse): Add comments and use URI_FRAGMENT; no functional -change. - ------------------------------------------------------------------------- -r1215 | joe | 2007-07-31 19:19:34 +0100 (Tue, 31 Jul 2007) | 5 lines - -* src/ne_session.h (ne_session_flag): Add NE_SESSFLAG_RFC4918. - -* src/ne_basic.c (copy_or_move): Use an abs_path in Destination -header, rather than an absoluteURI, iff the 4918 flag is enabled. - ------------------------------------------------------------------------- -r1214 | joe | 2007-07-31 19:14:25 +0100 (Tue, 31 Jul 2007) | 2 lines - -* src/ne_session.h (ne_session_status): Clarify meaning of _recv/_sending. - ------------------------------------------------------------------------- -r1213 | joe | 2007-07-29 16:38:22 +0100 (Sun, 29 Jul 2007) | 2 lines - -Changes so far. - ------------------------------------------------------------------------- -r1212 | joe | 2007-07-26 13:33:58 +0100 (Thu, 26 Jul 2007) | 4 lines - -* src/ne_gnutls.c (check_identity): Take URI object as argument; -handle URI subjectAltNames. -(check_certificate, populate_cert): Adjust accordingly. - ------------------------------------------------------------------------- -r1211 | joe | 2007-07-20 12:52:33 +0100 (Fri, 20 Jul 2007) | 3 lines - -* doc/ref/neon.xml: Add a list of the functions using global state, for clarity. -Add more symbol namespaces used by dependencies of neon. - ------------------------------------------------------------------------- -r1210 | joe | 2007-07-17 11:11:04 +0100 (Tue, 17 Jul 2007) | 2 lines - -* src/ne_session.h: Better docs for ne_session_status_info union. - ------------------------------------------------------------------------- -r1209 | joe | 2007-07-17 10:47:16 +0100 (Tue, 17 Jul 2007) | 2 lines - -* src/ne_session.h: Update ABI note for status union. - ------------------------------------------------------------------------- -r1208 | joe | 2007-07-16 11:25:10 +0100 (Mon, 16 Jul 2007) | 3 lines - -* macros/neon.m4 (NEON_SSL): Don't attempt to prevent incompatibility -with future releases of GnuTLS. - ------------------------------------------------------------------------- -r1207 | joe | 2007-07-16 08:47:28 +0100 (Mon, 16 Jul 2007) | 2 lines - -* src/ne_xml.h, src/ne_socket.h: Documentation updates. - ------------------------------------------------------------------------- -r1206 | joe | 2007-07-16 08:39:43 +0100 (Mon, 16 Jul 2007) | 3 lines - -* src/ne_alloc.h (ne_realloc): Don't mark with malloc attribute, per -GCC manual. - ------------------------------------------------------------------------- -r1205 | joe | 2007-07-16 07:54:57 +0100 (Mon, 16 Jul 2007) | 3 lines - -* src/ne_utils.h, src/ne_md5.h, src/ne_compress.h: Docs updates; -use extern-C everywhere. No functional changes. - ------------------------------------------------------------------------- -r1204 | joe | 2007-07-16 07:40:03 +0100 (Mon, 16 Jul 2007) | 2 lines - -* src/ne_redirect.h: Cleanup docs; no functional change. - ------------------------------------------------------------------------- -r1203 | joe | 2007-07-16 07:35:17 +0100 (Mon, 16 Jul 2007) | 2 lines - -* src/ne_string.h: More docco cleanup; no functional changes. - ------------------------------------------------------------------------- -r1202 | joe | 2007-07-16 06:46:30 +0100 (Mon, 16 Jul 2007) | 2 lines - -* src/ne_string.h: Update docco for ne_buffer_*; no functional change. - ------------------------------------------------------------------------- -r1198 | joe | 2007-07-14 21:35:28 +0100 (Sat, 14 Jul 2007) | 2 lines - -Update credit roll, copyright notice. - ------------------------------------------------------------------------- -r1188 | joe | 2007-07-14 10:01:23 +0100 (Sat, 14 Jul 2007) | 2 lines - -* test/auth.c (multi_handler): Use any_request(). - ------------------------------------------------------------------------- -r1187 | joe | 2007-07-14 09:55:32 +0100 (Sat, 14 Jul 2007) | 4 lines - -* src/ne_auth.c (auth_register): Fix multiple handler use (Werner Baumann) - -* test/auth.c (multi_cb, multi_handler): New test case. - ------------------------------------------------------------------------- -r1185 | joe | 2007-07-14 09:05:02 +0100 (Sat, 14 Jul 2007) | 8 lines - -Make the backwards-compat break in the status notification interface -more explicit by renaming the function: - -* src/ne_session.h, src/ne_session.c (ne_set_notifier): Renamed from - ne_set_status. - -* test/request.c (status): Adjust accordingly. - ------------------------------------------------------------------------- -r1184 | joe | 2007-07-14 09:01:58 +0100 (Sat, 14 Jul 2007) | 2 lines - -* src/ne_ssl.h: Docs cleanup. - ------------------------------------------------------------------------- -r1183 | joe | 2007-07-12 21:37:51 +0100 (Thu, 12 Jul 2007) | 6 lines - -* src/ne_string.h (ne_buffer_snprintf): New prototype. - -* src/ne_string.c (ne_buffer_snprintf): New function. - -* test/string-tests.c (buf_print): New test case. - ------------------------------------------------------------------------- -r1182 | joe | 2007-07-12 11:38:00 +0100 (Thu, 12 Jul 2007) | 6 lines - -* src/ne_session.h: Add ne_status_disconnected status type. -(ne_close_connection): Invoke the notifier callback. -(ne_session_destroy): Close the connection earlier. - -* test/request.c (status_cb, status): Test ne_status_disconnected. - ------------------------------------------------------------------------- -r1181 | joe | 2007-07-11 23:23:02 +0100 (Wed, 11 Jul 2007) | 3 lines - -* src/ne_gnutls.c (ne__ssl_exit): Implement for recent versions of -GnuTLS, per comment. - ------------------------------------------------------------------------- -r1180 | joe | 2007-07-03 13:01:39 +0100 (Tue, 03 Jul 2007) | 9 lines - -* src/ne_xml.h (ne_xml_resolve_nspace): New interface. - -* src/ne_xml.c (ne_xml_resolve_nspace): New function. - -* test/xml.c: Adjust all callbacks to take 'struct context' pointer. -(parse_match): Pass a struct context pointer. -(startelm): Add "eval-xmlns-" evaluators. -(matches): Test namespace interfaces. - ------------------------------------------------------------------------- -r1179 | joe | 2007-07-03 10:14:52 +0100 (Tue, 03 Jul 2007) | 2 lines - -* doc/ref/err.xml: Update ne_get_error docs. - ------------------------------------------------------------------------- -r1178 | joe | 2007-07-02 17:34:33 +0100 (Mon, 02 Jul 2007) | 3 lines - -* doc/manual.xml: Split name and version to silence new -docbook-xsl stylesheets. - ------------------------------------------------------------------------- -r1177 | joe | 2007-07-02 17:24:33 +0100 (Mon, 02 Jul 2007) | 2 lines - -* test/request.c (fail_statusline): Adjust for new error message. - ------------------------------------------------------------------------- -r1176 | joe | 2007-07-02 17:22:55 +0100 (Mon, 02 Jul 2007) | 9 lines - -* src/ne_openssl.c (check_identity): Take URI object as argument; -handle URI subjectAltNames. -(check_certificate, populate_cert): Adjust accordingly. - -* test/ssl.c (uri_altname, fail_bad_urialtname): Add tests. -(cert_identities): Test the URI-altname cert. - -* test/openssl.conf, test/makekeys.sh: Create new test certs. - ------------------------------------------------------------------------- -r1175 | joe | 2007-07-02 17:17:32 +0100 (Mon, 02 Jul 2007) | 3 lines - -* src/ne_request.c, src/ne_redirect.c, src/ne_basic.c: Update error -messages to omit trailing period. - ------------------------------------------------------------------------- -r1174 | joe | 2007-07-02 17:15:37 +0100 (Mon, 02 Jul 2007) | 3 lines - -* test/xml.c (parse_match): Give descriptive failures. -(fail_parse): Enable tests for ill-formed UTF-8. - ------------------------------------------------------------------------- -r1173 | joe | 2007-06-27 14:43:32 +0100 (Wed, 27 Jun 2007) | 3 lines - -* src/ne_gnutls.c (ne_ssl_clicert_read): Update code/comment on -friendly_name handling in encrypted c.certs. - ------------------------------------------------------------------------- -r1172 | joe | 2007-06-27 14:40:07 +0100 (Wed, 27 Jun 2007) | 3 lines - -* src/ne_gnutls.c (pkcs12_parse, ne_ssl_clicert_read): Remove -now-redundant code on encrypted-cert path. - ------------------------------------------------------------------------- -r1171 | joe | 2007-06-27 14:39:10 +0100 (Wed, 27 Jun 2007) | 3 lines - -* src/ne_gnutls.c (pkcs12_parse, ne_ssl_clicert_read): Fix handling of -PKCS#12 client certs with zero-length password. - ------------------------------------------------------------------------- -r1170 | joe | 2007-06-27 14:03:53 +0100 (Wed, 27 Jun 2007) | 7 lines - -* macros/neon.m4 (NEON_SSL): Check for gnutls_x509_dn_get_rdn_ava and -iconv. - -* src/ne_gnutls.c [HAVE_GNUTLS_X509_DN_GET_RDN_AVA] -(convert_dirstring, append_dirstring, ne_ssl_readable_dname): -Implement better RDN handling using GnuTLS 1.7.x interfaces. - ------------------------------------------------------------------------- -r1169 | joe | 2007-06-17 22:20:30 +0100 (Sun, 17 Jun 2007) | 2 lines - -* doc/ref/alloc.xml: Fix prototype, thanks to Joshua Swink. - ------------------------------------------------------------------------- -r1165 | joe | 2007-04-03 21:25:13 +0100 (Tue, 03 Apr 2007) | 5 lines - -* src/ne_request.c (proxy_tunnel): Pass back error string and code for -CONNECT failure. - -* test/ssl.c (auth_tunnel_fail): Add regression test for above. - ------------------------------------------------------------------------- -r1164 | joe | 2007-02-26 17:04:19 +0000 (Mon, 26 Feb 2007) | 3 lines - -* Makefile.in (install-nls-yes): Fix for VPATH builds, patch from Hans -Meine. - ------------------------------------------------------------------------- -r1162 | joe | 2007-02-08 09:45:10 +0000 (Thu, 08 Feb 2007) | 2 lines - -* config.hw.in: Define NE_FMT_NE_OFF_T. - ------------------------------------------------------------------------- -r1161 | joe | 2007-02-07 17:45:05 +0000 (Wed, 07 Feb 2007) | 4 lines - -* src/ne_auth.c (ah_post_send): Fix for SSPI to avoid invoking the -NULL response header verification callback (patch from -dicuccio@comcast.net). - ------------------------------------------------------------------------- -r1160 | joe | 2007-02-07 17:38:50 +0000 (Wed, 07 Feb 2007) | 2 lines - -* src/ne_auth.c: Update comment. - ------------------------------------------------------------------------- -r1159 | joe | 2007-02-07 17:36:25 +0000 (Wed, 07 Feb 2007) | 7 lines - -* src/ne_string.c (ne_strerror): Handle failure cases for POSIX-style -strerror_r; always use a temp buffer and copy back to truncate rather -than fail for a short input buffer. - -* test/string-tests.c (str_errors): Test for handling of bogus errno -values into too-short buffer. - ------------------------------------------------------------------------- -r1158 | joe | 2007-02-06 12:46:23 +0000 (Tue, 06 Feb 2007) | 3 lines - -* test/util-tests.c (digest_md5, md5): Meet alignment requirement of -MD5 API. - ------------------------------------------------------------------------- -r1156 | joe | 2007-02-05 14:10:27 +0000 (Mon, 05 Feb 2007) | 3 lines - -* src/ne_socket.c (write_raw): Work around QNX issue passing large -buffers to send() over loopback; send 8K at a time. - ------------------------------------------------------------------------- -r1155 | joe | 2007-02-05 13:11:00 +0000 (Mon, 05 Feb 2007) | 4 lines - -* src/ne_auth.c (verify_negotiate_response): Fix comparison -of Negotiate response header token, and set error message -on failure. - ------------------------------------------------------------------------- -r1154 | joe | 2007-02-05 13:07:09 +0000 (Mon, 05 Feb 2007) | 3 lines - -* src/ne_auth.c (ah_pre_send): Set request idempotent flag -for SSPI to prevent connection closure. - ------------------------------------------------------------------------- -r1153 | joe | 2007-02-05 10:09:27 +0000 (Mon, 05 Feb 2007) | 2 lines - -* src/ne_locks.c (lk_pre_send): Terminate If header with CRLF not LF. - ------------------------------------------------------------------------- -r1152 | joe | 2007-01-26 00:00:59 +0000 (Fri, 26 Jan 2007) | 5 lines - -Build fixes for SSPI code on MingW from Gisle Vanem: - -* src/ne_sspi.c: Define SECURITY_ENTRYPOINT if missing. -(base64ToBuffer): Fix cast. - ------------------------------------------------------------------------- -r1132 | joe | 2007-01-11 22:12:58 +0000 (Thu, 11 Jan 2007) | 13 lines - -Fix 0.26.x regression; ensure the "attempt" counter passed to creds -callbacks reflects the number of invocation of that callback only per -request: - -* src/ne_auth.c (struct auth_handler): Add attempt field. -(get_credentials): Use per-handler attempt counter and post-increment -same. -(ah_create): Reset per-request attempt counters. -(auth_register): Initialize attempt counter. - -* test/auth.c (fail_challenge): Add test for attempt handling -regression. - ------------------------------------------------------------------------- -r1131 | joe | 2007-01-11 21:33:14 +0000 (Thu, 11 Jan 2007) | 5 lines - -* src/ne_uri.c (uri_lookup): Fix cast to prevent buffer under-read on -non-ASCII characters (CVE-2007-0157, Laszlo Boszormenyi). - -* test/uri-tests.c (parse): Add test case. - ------------------------------------------------------------------------- -r1130 | joe | 2007-01-09 11:24:54 +0000 (Tue, 09 Jan 2007) | 2 lines - -* src/ne_auth.c (digest_challenge): Fix comment. - ------------------------------------------------------------------------- -r1129 | joe | 2007-01-06 14:27:18 +0000 (Sat, 06 Jan 2007) | 10 lines - -* src/ne_auth.c (digest_challenge): Fix to fail correctly for invalid -case where stale=true is given with an initial challenge; fix to not -leak sess->nonce for a valid stale challenge. - -* test/auth.c (struct digest_parms): Add stale field, enum value. -(make_digest_header): Send stale=true as appropriate. -(serve_digest): Adjust to serve challenges with stale=true. -(digest): Add test for stale=true handling. -(digest_failures): Add test for error stale=true failure case. - ------------------------------------------------------------------------- -r1128 | joe | 2007-01-05 11:07:32 +0000 (Fri, 05 Jan 2007) | 3 lines - -* src/ne_request.c (ne_begin_request): Move call to lookup_host from here... -(open_connection): ...to here; and simplify slightly as a result. - ------------------------------------------------------------------------- -r1126 | joe | 2007-01-04 18:44:49 +0000 (Thu, 04 Jan 2007) | 13 lines - -Fix nextnonce handling in Digest auth: - -* src/ne_auth.c (verify_digest_response): Reset nonce-count on receipt -of next-nonce parameter in A-I response header. - -* test/auth.c (struct digest_parms): Add send_nextnonce, num_requests -fields. -(make_authinfo_header): Invent new nonce if send_nextnonce field is -set. -(serve_digest, test_digest): Handle num_requests requests. -(digest): Set new parameter fields; test for next-nonce handling. -(digest_failure): Set new paramater fields. - ------------------------------------------------------------------------- -r1125 | joe | 2007-01-04 18:08:52 +0000 (Thu, 04 Jan 2007) | 3 lines - -* test/auth.c (make_authinfo_header, digest_failures): Add test for -failure to parse the nc paramater in an A-I response header. - ------------------------------------------------------------------------- -r1124 | joe | 2007-01-03 22:13:05 +0000 (Wed, 03 Jan 2007) | 18 lines - -Give descriptive error messages for multiple-challenge authentication -failures: - -* src/ne_auth.c (struct auth_class): Add error_noauth field. -(struct auth_protocol): Pass errmsg buffers to challenge callback; -specify error message location for verify callback. -(challenge_error): New function. -(get_credentials, basic_challenge, continue_negotiate, -negotiate_challenge, digest_challenge): Take errmsg buffer; use -challenge_error on failure. -(verify_negotiate_response): Create errmsg buffer, pass to -continue_negotiate, and set session error string on failure. -(auth_challenge): Create error buffer and build error message during -challenge parsing. - -* test/auth.c (digest_failures): Adjust for new error string. -(fail_cb, fail_challenge): Add tests for challenge parse failures. - ------------------------------------------------------------------------- -r1123 | joe | 2006-12-29 23:34:09 +0000 (Fri, 29 Dec 2006) | 2 lines - -* test/socket.c (connect_timeout): Remove redundant code. - ------------------------------------------------------------------------- -r1121 | joe | 2006-12-28 23:41:31 +0000 (Thu, 28 Dec 2006) | 3 lines - -* src/ne_session.h (ne_ssl_set_clicert, ne_ssl_trust_cert): Clarify -lack of lifetime requirement for passed-in objects. - ------------------------------------------------------------------------- -r1120 | joe | 2006-12-28 23:19:57 +0000 (Thu, 28 Dec 2006) | 2 lines - -* TODO: Remove features already added. - ------------------------------------------------------------------------- -r1119 | joe | 2006-12-28 23:12:18 +0000 (Thu, 28 Dec 2006) | 27 lines - -Add support for configurable socket connect timeouts: - -* src/ne_socket.h (ne_sock_connect_timeout): New function. -(ne_sock_connect): Clarify timeout handling. - -* src/ne_socket.c: Define USE_NONBLOCKING_CONNECT if appropriate. -Define NE_ISINPROGRESS. -(struct ne_socket_s): Add cotimeout field. -(timed_connect): New function. -(connect_socket): Renamed from raw_connect; use timed_connect; takes -socket structure and sets ->error string on failure. -(ne_sock_connect): Adapt to use connect_socket. -(ne_sock_connect_timeout): New function. - -* src/ne_private.h (struct ne_session_s): Add cotimeout field. - -* src/ne_session.h (ne_set_connect_timeout): New prototype... - -* src/ne_session.c (ne_set_connect_timeout): ...implement it. - -* src/ne_request.c (do_connect): Set socket timeout if appropriate. - -* macros/neon.m4 (LIBNEON_SOURCE_CHECKS): Check for fcntl, getsockopt, -fcntl.h and socklen_t. - -* test/socket.c (connect_timeout): Add test (disabled by default). - ------------------------------------------------------------------------- -r1118 | joe | 2006-12-28 23:04:28 +0000 (Thu, 28 Dec 2006) | 3 lines - -* src/ne_socket.c (raw_poll): Factor out from readable_raw. -(readable_raw): Use it. - ------------------------------------------------------------------------- -r1109 | joe | 2006-12-28 17:20:56 +0000 (Thu, 28 Dec 2006) | 5 lines - -Merge r1106 from 0.25.x branch: - -* macros/neon-test.m4 (NE_FORMAT_TIMET): Factor out. -(NEON_TEST): Use it. - ------------------------------------------------------------------------- -r1104 | joe | 2006-11-30 13:03:34 +0000 (Thu, 30 Nov 2006) | 3 lines - -* test/request.c (fail_double_lookup, proxy_no_resolve): Use hostname -in the .invalid TLD, reserved by RFC2606. - ------------------------------------------------------------------------- -r1103 | joe | 2006-11-08 13:41:10 +0000 (Wed, 08 Nov 2006) | 3 lines - -* test/socket.c (write_reset): Warn rather than fail for a failure -to elicit an RST. - ------------------------------------------------------------------------- -r1102 | joe | 2006-10-31 10:35:38 +0000 (Tue, 31 Oct 2006) | 2 lines - -Note the reports about a GSSAPI problem. - ------------------------------------------------------------------------- -r1098 | joe | 2006-10-30 12:35:21 +0000 (Mon, 30 Oct 2006) | 7 lines - -Fix real cause of h_errno problem on HP-UX (Albert Chin): - -* macros/neon.m4: Drop _XOPEN_SOURCE_EXTENDED definition for -HP-UX. - -* src/ne_socket.c: Use HAVE_DECL_H_ERRNO macro correctly. - ------------------------------------------------------------------------- -r1097 | joe | 2006-10-30 12:33:34 +0000 (Mon, 30 Oct 2006) | 2 lines - -* src/ne_session.h: Remove trailing comma from new enum (Albert Chin). - ------------------------------------------------------------------------- -r1096 | joe | 2006-10-30 12:32:45 +0000 (Mon, 30 Oct 2006) | 2 lines - -* src/ne_session.h: Docs clarification for new notification interface. - ------------------------------------------------------------------------- -r1095 | joe | 2006-10-24 21:32:50 +0100 (Tue, 24 Oct 2006) | 3 lines - -* test/request.c (s_progress): Fix to use ne_off_t types and format -strings. - ------------------------------------------------------------------------- -r1094 | joe | 2006-10-24 21:26:15 +0100 (Tue, 24 Oct 2006) | 20 lines - -Add add new type-safer notification/status API: - -* src/ne_session.h (ne_notify_status): Redefine callback type, -passing pointer to ne_session_status_info structure. - -* src/ne_request.c (notify_status): Invoke notify callback, and -progress callback as appropriate. -(send_request_body, ne_read_response_block, lookup_host, -ne_begin_request, do_connect): Adjust to set up and invoke -the notify callback. - -* src/ne_openssl.c (ne__negotiate_ssl): Drop notify callback -invocation. - -* src/ne_private.h (struct ne_session_s): Store status union. - -* macros/neon.m4: Define NE_FMT_NE_OFF_T. - -* test/request.c (status_cb, status): Add new test. - ------------------------------------------------------------------------- -r1093 | joe | 2006-10-24 20:45:01 +0100 (Tue, 24 Oct 2006) | 3 lines - -* src/ne_auth.c (ah_post_send): Correctly test ->flags against -AUTH_FLAG_VERIFY_NON40x flag. - ------------------------------------------------------------------------- -r1092 | joe | 2006-10-24 20:40:09 +0100 (Tue, 24 Oct 2006) | 26 lines - -Simplify LFS support, drop *64 transition functions: - -* src/ne_defs.h: Add ne_off_t typedef. - -* src/ne_request.h (ne_set_request_body_fd64, -ne_set_request_body_provider64): Removed. - -(ne_set_request_body_fd, ne_set_request_body_provider): -Take ne_off_t arguments. - -* src/ne_internal.h: Move LFS definitions here... - -* src/ne_request.c: ...from here. -(ne_set_request_body_fd64, ne_set_request_body_provider64): Removed. -(ne_set_request_body_fd, ne_set_request_body_provider): Adjust for -ne_off_t arguments. - -* src/ne_basic.h (ne_get_range64): Removed prototype. -(ne_content_range): Use ne_off_t offsets. - -* src/ne_basic.c (ne_get_range64): Removed function. -(ne_get_range): Adjust for ne_off_t offsets. - -* test/largefile.c (send_high_offset, read_large_response): Adjust to -use normal interfaces. Save and restore debug mask. - ------------------------------------------------------------------------- -r1086 | joe | 2006-10-05 19:31:18 +0100 (Thu, 05 Oct 2006) | 9 lines - -* macros/neon.m4 (NE_CHECK_OS): Split out from NE_OS_*. Conditionally -add _XOPEN_SOURCE_EXTENDED=1 to CPPFLAGS for HP-UXes. -(LIBNEON_SOURCE_CHECKS): Remove _XOPEN_SOURCE_EXTENDED definition -here. -(NE_OS_MINGW, NE_MACOSX): Removed. -(NE_SEARCH_LIBS): Adjust for ne_cv_os_uname. - -* src/ne_socket.c: Don't set _XOPEN_SOURCE_EXTENDED here. - ------------------------------------------------------------------------- -r1084 | joe | 2006-10-05 14:10:00 +0100 (Thu, 05 Oct 2006) | 7 lines - -* test/makekeys.sh: Remove hostname-based munging for wildcard cert; always -use *.example.com. - -* test/ssl.c (tunnel_server): New function. -(wildcard_match): Use a proxy to avoid using real hostnames. -(wildcard_init): Removed function. - ------------------------------------------------------------------------- -r1080 | joe | 2006-10-05 13:33:33 +0100 (Thu, 05 Oct 2006) | 3 lines - -* macros/neon.m4 (NEON_I18N): Really disable i18n if libintl.h is not -detected. - ------------------------------------------------------------------------- -r1079 | joe | 2006-10-03 22:03:31 +0100 (Tue, 03 Oct 2006) | 2 lines - -* test/request.c (fail_noheader): New regression test. - ------------------------------------------------------------------------- -r1078 | joe | 2006-10-03 21:31:28 +0100 (Tue, 03 Oct 2006) | 7 lines - -Fix error reported for LOCK responses which lack a Lock-Token header: - -* src/ne_locks.c (struct lock_ctx): Add parser pointer. -(lk_startelm): Set XML parser error when failing parse. -(ne_lock, ne_lock_refresh): Set parser in context; omit explicit XML -parse error handling already done by ne_xml_dispatch_request. - ------------------------------------------------------------------------- -r1077 | joe | 2006-09-26 10:35:46 +0100 (Tue, 26 Sep 2006) | 14 lines - -* src/ne_xmlreq.h (ne_xml_dispatch_request): Update API semantics to -constrain media type of parsed responses. - -* src/ne_xmlreq.c (media_type_is_xml): New function. -(ne_xml_dispatch_request): Use it; only parse 2xx responses with XML -media types. - -* test/xmlreq.c (startelm): New function. -(success): Check XML is actually parsed. -(types): New test. - -* test/lock.c (lock_timeout, lock_shared): Add content-type for XML -responses. - ------------------------------------------------------------------------- -r1076 | joe | 2006-09-26 10:18:09 +0100 (Tue, 26 Sep 2006) | 2 lines - -* src/ne_request.c (ne_begin_request): Remove redundant test. - ------------------------------------------------------------------------- -r1075 | joe | 2006-09-26 10:13:42 +0100 (Tue, 26 Sep 2006) | 18 lines - -Add new hook which runs after the headers have been read: - -* src/ne_request.h (ne_post_headers_fn, ne_hook_post_headers): Add -type, prototype. - -* src/ne_private.h (struct ne_session_s): Add post_headers_hooks -field. - -* src/ne_request.c (ne_begin_request): Run post_headers hooks. - -* src/ne_session.c (ne_session_destroy): Destroy post_headers hooks. -(ne_hook_post_headers, ne_unhook_post_headers): New functions. - -* test/request.c (status_to_string): New function. -(hook_post_send): Use it. -(hook_post_headers): New function. -(hooks): Test post_headers hook. - ------------------------------------------------------------------------- -r1073 | joe | 2006-09-13 18:38:32 +0100 (Wed, 13 Sep 2006) | 2 lines - -* macros/neon.m4 (NE_OS_MINGW): Update comment, thanks to Matthias Miller. - ------------------------------------------------------------------------- -r1072 | joe | 2006-09-12 22:04:31 +0100 (Tue, 12 Sep 2006) | 7 lines - -Fix library detection on MinGW, based on patch by Matthias Miller: - -* macros/neon.m4 (NE_OS_MINGW): New macro. -(NE_SEARCH_LIBS): Check for function using __stdcall calling convention if -on MinGW and library to search is -lws2_32. -(LIBNEON_SOURCE_CHECKS): Also check for gethostbyname in -lws2_32. - ------------------------------------------------------------------------- -r1071 | joe | 2006-09-12 21:54:17 +0100 (Tue, 12 Sep 2006) | 2 lines - -* src/ne_uri.c (ne_path_lower): Avoid use of min() (Matthias Miller). - ------------------------------------------------------------------------- -r1070 | joe | 2006-09-12 19:51:28 +0100 (Tue, 12 Sep 2006) | 4 lines - -* src/ne_acl.h (ne_acl_set): Take const entries array. - -* src/ne_acl.c (ne_acl_set, acl_body): Likewise. - ------------------------------------------------------------------------- -r1069 | joe | 2006-09-12 18:38:57 +0100 (Tue, 12 Sep 2006) | 7 lines - -Remove use of session-private interfaces in auth code: - -* src/ne_auth.c: Drop ne_private.h #include. -(sspi_challenge) [HAVE_SSPI]: Use ne_fill_server_uri. -(auth_register) [HAVE_GSSAPI]: Use ne_fill_proxy_uri or -ne_fill_server_uri. - ------------------------------------------------------------------------- -r1068 | joe | 2006-09-12 18:36:41 +0100 (Tue, 12 Sep 2006) | 10 lines - -Update for bleeding-edge OpenSSL thread-safety interfaces: - -* macros/neon.m4 (NEON_SSL): Check for CRYPTO_set_idptr_callback. - -* src/ne_openssl.c (thread_id_neon): Update comments. -(ID_CALLBACK_IS_OTHER, ID_CALLBACK_IS_NEON): New macros. -(ne__ssl_init, ne__ssl_exit): Update to use avoid touching the -"id" callback if the idptr interfaces exist, since the default -will be sane. - ------------------------------------------------------------------------- -r1067 | joe | 2006-09-12 14:52:39 +0100 (Tue, 12 Sep 2006) | 2 lines - -* src/ne_string.h (ne_strnzcpy): Avoid expanding argument twice. - ------------------------------------------------------------------------- -r1065 | joe | 2006-09-05 08:39:48 +0100 (Tue, 05 Sep 2006) | 4 lines - -* src/ne_string.c (ascii_tolower): Use integer constants rather than -character constants to fix warnings with Sun cc; patch from Peter -O'Gorman. - ------------------------------------------------------------------------- -r1064 | joe | 2006-08-09 15:56:04 +0100 (Wed, 09 Aug 2006) | 2 lines - -* config.hw.in: Fixes for newer SDKs; patch from Kiyo Kelvin Lee. - ------------------------------------------------------------------------- -r1063 | joe | 2006-08-09 15:54:51 +0100 (Wed, 09 Aug 2006) | 2 lines - -* src/ne_sspi.c (resetContext): Fix build with older SDKs. - ------------------------------------------------------------------------- -r1062 | joe | 2006-08-09 15:49:12 +0100 (Wed, 09 Aug 2006) | 3 lines - -* src/ne_sspi.c (ne_sspi_clear_context): Add missing return statement; -patch from Kiyo Kelvin Lee. - ------------------------------------------------------------------------- -r1058 | joe | 2006-07-17 12:52:11 +0100 (Mon, 17 Jul 2006) | 2 lines - -* config.hw.in: Enable debugging for Win32 build. - ------------------------------------------------------------------------- -r1057 | joe | 2006-06-29 16:02:03 +0100 (Thu, 29 Jun 2006) | 7 lines - -* src/ne_session.h (ne_fill_proxy_uri): New prototype. -(ne_fill_server_uri): Clarify. - -* src/ne_session.c (ne_fill_proxy_uri): New function. - -* test/session.c (fill_proxy_uri): New test. - ------------------------------------------------------------------------- -r1056 | joe | 2006-06-29 15:44:37 +0100 (Thu, 29 Jun 2006) | 2 lines - -* src/ne_auth.c (auth_session): Remove unused fields. - ------------------------------------------------------------------------- -r1055 | joe | 2006-06-26 12:25:20 +0100 (Mon, 26 Jun 2006) | 3 lines - -* src/ne_openssl.c (ne__ssl_init): Call CRYPTO_malloc_init() first per -dev@apr discussion. - ------------------------------------------------------------------------- -r1054 | joe | 2006-06-26 11:01:29 +0100 (Mon, 26 Jun 2006) | 4 lines - -* configure.in: Substitute NEON_PC_LIBS for neon.pc. - -* neon.pc.in: Define Libs.Private; use only NEON_PC_LIBS in Libs. - ------------------------------------------------------------------------- -r1049 | joe | 2006-05-23 21:17:41 +0100 (Tue, 23 May 2006) | 6 lines - -Readonly data fixes from Benoît Dejean: - -* src/ne_xml.c (empty_atts): Mark more const. - -* src/ne_dates.c (rfc1123_weekdays, short_months): Mark more const. - ------------------------------------------------------------------------- -r1046 | joe | 2006-05-11 10:43:43 +0100 (Thu, 11 May 2006) | 1 line - -* po/: make update-po. ------------------------------------------------------------------------- -r1045 | joe | 2006-05-11 10:41:55 +0100 (Thu, 11 May 2006) | 3 lines - -* configure.in, po/zh.po: Add Simplified Chinese translation, from Dongsheng -Song. - ------------------------------------------------------------------------- -r1044 | joe | 2006-05-09 08:02:43 +0100 (Tue, 09 May 2006) | 6 lines - -Win32 build fixes from D.J. Heap: - -* src/ne_auth.c: Move protocols[] array declaration up, remove -forward-declaration. -(request_sspi): Fix declaration. - ------------------------------------------------------------------------- -r1020 | joe | 2006-03-24 12:24:39 +0000 (Fri, 24 Mar 2006) | 2 lines - -* test/run.sh: Don't limit virtual memory use. - ------------------------------------------------------------------------- -r1016 | joe | 2006-03-14 16:57:43 +0000 (Tue, 14 Mar 2006) | 3 lines - -* macros/neon.m4 (LIBNEON_SOURCE_CHECKS): Make the timezone test match -the code; fix OS X build. - ------------------------------------------------------------------------- -r1004 | joe | 2006-03-11 18:51:51 +0000 (Sat, 11 Mar 2006) | 2 lines - -* po/: make update-po. - ------------------------------------------------------------------------- -r1003 | joe | 2006-03-11 18:49:46 +0000 (Sat, 11 Mar 2006) | 18 lines - -* macros/neon.m4: Bump to 0.26.0. - -* NEWS: Final updates.* macros/neon.m4: Bump to 0.26.0. - -* NEWS: Final updates.* macros/neon.m4: Bump to 0.26.0. - -* NEWS: Final updates.* macros/neon.m4: Bump to 0.26.0. - -* NEWS: Final updates.* macros/neon.m4: Bump to 0.26.0. - -* NEWS: Final updates.* macros/neon.m4: Bump to 0.26.0. - -* NEWS: Final updates.* macros/neon.m4: Bump to 0.26.0. - -* NEWS: Final updates.* macros/neon.m4: Bump to 0.26.0. - -* NEWS: Final updates. - ------------------------------------------------------------------------- -r1002 | joe | 2006-03-11 18:46:05 +0000 (Sat, 11 Mar 2006) | 2 lines - -* README, AUTHORS: Update copyright info. - ------------------------------------------------------------------------- -r1001 | joe | 2006-03-11 18:44:14 +0000 (Sat, 11 Mar 2006) | 4 lines - -* doc/manual.xml: s/GFDL/GPL/ for Debian policy compliance. - -* doc/fdl.sgml: Removed. - ------------------------------------------------------------------------- -r999 | joe | 2006-03-10 10:45:03 +0000 (Fri, 10 Mar 2006) | 2 lines - -* test/lock.c (fail_lockauth): Use many_serve_string. - ------------------------------------------------------------------------- -r998 | joe | 2006-03-10 10:23:54 +0000 (Fri, 10 Mar 2006) | 2 lines - -* doc/ref/neon.xml: Fix typo. - ------------------------------------------------------------------------- -r996 | joe | 2006-03-08 10:30:07 +0000 (Wed, 08 Mar 2006) | 3 lines - -* src/ne_auth.c (ah_post_send): Remove strdup which is now -unnecessary. - ------------------------------------------------------------------------- -r995 | joe | 2006-03-08 10:22:18 +0000 (Wed, 08 Mar 2006) | 3 lines - -* src/ne_auth.c (negotiate_challenge): Renamed from gssapi_challenge. -(request_negotiate): Renamed from request_gssapi. - ------------------------------------------------------------------------- -r994 | joe | 2006-03-07 21:38:21 +0000 (Tue, 07 Mar 2006) | 7 lines - -* src/ne_private.h (struct ne_session_s): Remove use of bitfields. - -* src/ne_auth.c (struct auth_session_s): Likewise. - -* src/ne_request.c (struct body_reader, struct ne_request_s): -Likewise. - ------------------------------------------------------------------------- -r993 | joe | 2006-03-07 21:29:19 +0000 (Tue, 07 Mar 2006) | 3 lines - -* src/ne_basic.c (ne_put) [NE_LFS]: Use ne_set_request_body_fd64, -fstat64. - ------------------------------------------------------------------------- -r992 | joe | 2006-03-07 21:25:41 +0000 (Tue, 07 Mar 2006) | 6 lines - -* src/ne_basic.h (ne_get_range64): Add prototype. - -* src/ne_basic.c (get_range_common): Factored out from ne_get_range. -(ne_get_range): Use get_range_common. -(ne_get_range64): Implement. - ------------------------------------------------------------------------- -r991 | joe | 2006-03-07 09:47:07 +0000 (Tue, 07 Mar 2006) | 2 lines - -* src/ne_request.c (read_status_line): Update comment. - ------------------------------------------------------------------------- -r990 | joe | 2006-03-07 09:36:43 +0000 (Tue, 07 Mar 2006) | 6 lines - -* src/ne_utils.h (NE_FEATURE_I18N): Add macro. - -* src/ne_utils.c (ne_has_support): Support NE_FEATURE_I18N. - -* test/util-tests.c (support): Test for NE_FEATURE_I18N. - ------------------------------------------------------------------------- -r989 | joe | 2006-03-07 09:34:43 +0000 (Tue, 07 Mar 2006) | 2 lines - -* src/ne_session.h: Fix typo. - ------------------------------------------------------------------------- -r980 | joe | 2006-03-01 20:31:52 +0000 (Wed, 01 Mar 2006) | 4 lines - -* src/ne_basic.c (dispatch_to_fd): Fix ne_get() regression. - -* test/basic.c (get): Add test case. - ------------------------------------------------------------------------- -r979 | joe | 2006-03-01 20:04:06 +0000 (Wed, 01 Mar 2006) | 4 lines - -* src/ne_basic.c (dispatch_to_fd): Fix content-range parsing. - -* test/basic.c (get_range, fail_range_*): Fix test cases. - ------------------------------------------------------------------------- -r978 | joe | 2006-03-01 19:53:59 +0000 (Wed, 01 Mar 2006) | 4 lines - -* src/ne_uri.c (URI_ESCAPE): Do path-escape "%". - -* test/uri-tests.c (escapes): Add test cases. - ------------------------------------------------------------------------- -r976 | joe | 2006-03-01 18:53:30 +0000 (Wed, 01 Mar 2006) | 3 lines - -* Makefile.in (update-po): Send output to /dev/null when checking -format strings. - ------------------------------------------------------------------------- -r975 | joe | 2006-03-01 17:59:02 +0000 (Wed, 01 Mar 2006) | 2 lines - -* po/: make update-po. - ------------------------------------------------------------------------- -r974 | joe | 2006-03-01 17:57:45 +0000 (Wed, 01 Mar 2006) | 2 lines - -Clarify remaining GnuTLS issues. - ------------------------------------------------------------------------- -r973 | joe | 2006-03-01 17:49:53 +0000 (Wed, 01 Mar 2006) | 3 lines - -* macros/neon.m4 (NEON_USE_EXTERNAL): Check for TS_SSL feature. -(NEON_SSL): Disable TS_SSL feature for non-SSL builds. - ------------------------------------------------------------------------- -r972 | joe | 2006-03-01 17:45:02 +0000 (Wed, 01 Mar 2006) | 3 lines - -* src/ne_session.c (ne_ssl_cert_validity): Handle -ne_ssl_cert_validity_time()'s error cases. - ------------------------------------------------------------------------- -r971 | joe | 2006-03-01 17:40:44 +0000 (Wed, 01 Mar 2006) | 2 lines - -Document changes for 0.26.0. - ------------------------------------------------------------------------- -r970 | joe | 2006-03-01 17:28:58 +0000 (Wed, 01 Mar 2006) | 23 lines - -Move to opaque MD5 context, avoiding exposure of md5_uint32 type: - -* src/ne_md5.h: Make struct ne_md5_ctx opaque. (ne_md5_create_ctx, -ne_md5_reset_ctx, ne_md5_destroy_ctx): New prototypes. -(ne_md5_init_ctx): Removed prototype. - -* src/ne_md5.c: Add struct ne_md5_ctx definition; use simpler -autoconf-based md5_uint32 definition. -(ne_md5_create_ctx, ne_md5_destroy_ctx, ne_md5_reset_ctx): New -functions. -(ne_md5_init_ctx): Make static. - -* src/ne_auth.c (auth_session): Store a pointer to the MD5 context. -(clean_session): Destroy stored MD5 context if necessary. -(get_cnonce, digest_challenge, request_digest, verify_digest_response): -Adjust to use opaque context constructor/destructor. - -* test/auth.c (make_digest): Adjust likewise. - -* test/util-test.c (digest_md5, md5_alignment): Adjust likewise. - -* config.hw.in: Define SIZEOF_INT, SIZEOF_LONG. - ------------------------------------------------------------------------- -r969 | joe | 2006-02-28 22:37:49 +0000 (Tue, 28 Feb 2006) | 2 lines - -* src/ne_md5.h: Remove support for non-C89 prototypes. - ------------------------------------------------------------------------- -r968 | joe | 2006-02-28 22:27:11 +0000 (Tue, 28 Feb 2006) | 20 lines - -Formalize the date formatting by ne_ssl_cert_validity and add -ne_ssl_cert_validity_time, which is better for i18n: - -* src/ne_ssl.h (ne_ssl_cert_validity): Adopt a fixed format for -returned date. -(ne_ssl_cert_validity_time): New prototype. - -* src/ne_openssl.c (asn1time_to_timet, ne_ssl_cert_validity_time): New -functions. - -* src/ne_gnutls.c (ne_ssl_cert_validity_time): New function. - -* src/ne_session.c (ne_ssl_cert_validity): New function. - -* src/ne_stubssl.c (ne_ssl_cert_validity_time): New stub. - -* test/ssl.c (cert_validity): Adjust for new date formatting. - -* macros/neon.m4 (LIBNEON_SOURCE_CHECKS): Check for timezone global. - ------------------------------------------------------------------------- -r967 | joe | 2006-02-28 16:26:32 +0000 (Tue, 28 Feb 2006) | 10 lines - -Avoid most issues with misaligned md5 result buffers: - -* src/ne_md5.c (ne_md5_finish_ascii): New function. - -* src/ne_md5.h (ne_md5_finish_ascii): Add prototype. - -* src/ne_auth.c (get_cnonce, digest_challenge, request_digest, -verify_digest_response): Use ne_md5_finish_ascii in place of -ne_md5_finish_ctx/ne_md5_to_ascii. - ------------------------------------------------------------------------- -r965 | joe | 2006-02-27 18:12:31 +0000 (Mon, 27 Feb 2006) | 2 lines - -* doc/manual.xml: Include the ne_i18n_init refentry. - ------------------------------------------------------------------------- -r964 | joe | 2006-02-27 18:11:31 +0000 (Mon, 27 Feb 2006) | 5 lines - -* doc/ref/i18n.xml: New file. - -* doc/ref/init.xml, doc/ref/neon.xml: More process-global -initialization stuff. - ------------------------------------------------------------------------- -r963 | joe | 2006-02-27 17:43:42 +0000 (Mon, 27 Feb 2006) | 2 lines - -* src/ne_props.c (ne_propfind_create): Use ne_buffer_czappend. - ------------------------------------------------------------------------- -r962 | joe | 2006-02-27 17:30:26 +0000 (Mon, 27 Feb 2006) | 2 lines - -* doc/ref/feat.xml: Fix id, use an xref, improve text, add see also. - ------------------------------------------------------------------------- -r961 | joe | 2006-02-27 17:29:18 +0000 (Mon, 27 Feb 2006) | 2 lines - -* doc/ref/reqbody.xml: Document ne_set_request_body_fd*. - ------------------------------------------------------------------------- -r960 | joe | 2006-02-27 17:28:34 +0000 (Mon, 27 Feb 2006) | 25 lines - -Add destructor callback to PROPFIND interface to guarantee cleanup of -memory allocated by the creator callback: - -* src/ne_props.h (ne_propfind_set_private): Take destructor argument. - -* src/ne_props.c (struct ne_propfind_handler_s): Add destructor field, -rename private_creator to creator and private_userdata to cd_userdata. -(start_response): Adjust for field renames. -(free_propset): Take handler argument; call destructor if necessary. -(end_response, ne_propfind_destroy): Pass handler to free_propset. -(ne_propfind_set_private): Adjust for field renames, store destructor. - -* src/ne_locks.c (discover_results): Don't destroy lock here. -(ld_destroy): New function. -(ne_lock_discover): Register the destructor. - -* test/lock.c: Mark fail_discover as no-longer-expected-to-leak. - -* test/props.c (diffcmp): Improve diagnostics. -(pf_creator, pf_destructor): New functions. -(run_propfind): Renamed from run_simple_propfind; enhanced to run -non-simple PROPFIND requests too. -(propfind): Renamed from pfind_simple; call run_propfind; test -invocation of creator/destructor callbacks too. - ------------------------------------------------------------------------- -r959 | joe | 2006-02-27 11:36:54 +0000 (Mon, 27 Feb 2006) | 5 lines - -* macros/neon.m4 (NEON_SSL): Don't define HAVE_PTHREADS. - -* src/ne_gnutls.c, src/ne_openssl.c: Use NE_HAVE_TS_SSL feature macro -in place of HAVE_PTHREADS. - ------------------------------------------------------------------------- -r958 | joe | 2006-02-27 11:33:53 +0000 (Mon, 27 Feb 2006) | 4 lines - -* src/ne_openssl.c (thread_id_neon): Revert previous change (which is -more portable, but less safe), and replace with a rant on why OpenSSL -is completely broken. - ------------------------------------------------------------------------- -r957 | joe | 2006-02-27 11:17:40 +0000 (Mon, 27 Feb 2006) | 3 lines - -* src/ne_openssl.c (thread_id_neon): Work regardless of whether -pthread_t is a structure. - ------------------------------------------------------------------------- -r956 | joe | 2006-02-27 11:10:29 +0000 (Mon, 27 Feb 2006) | 2 lines - -* src/ne_session.c (ne__ssl_set_verify_err): Make array static const. - ------------------------------------------------------------------------- -r955 | joe | 2006-02-27 10:41:21 +0000 (Mon, 27 Feb 2006) | 9 lines - -* src/ne_session.c (ne__ssl_set_verify_err): Moved here... - -* src/ne_openssl.c (verify_err): ... from here. -(check_certificate): Use it. - -* src/ne_gnutls.c (check_certificate): Use it on verification failure. - -* src/ne_private.h (ne__ssl_set_verify_err): Add prototype. - ------------------------------------------------------------------------- -r954 | joe | 2006-02-26 20:59:08 +0000 (Sun, 26 Feb 2006) | 3 lines - -* doc/ref/init.xml, doc/ref/neon.xml: Document thread-safe SSL -handling. - ------------------------------------------------------------------------- -r953 | joe | 2006-02-26 20:55:43 +0000 (Sun, 26 Feb 2006) | 11 lines - -* macros/neon.m4 (NEON_SSL): Define a feature macro for thread-safe -SSL support. - -* src/ne_utils.h: Add NE_FEATURE_TS_SSL feature code. - -* src/ne_utils.c (ne_has_support): Support it (or... not). - -* neon-config.in: Add feature code. - -* test/util-tests.c (support): Test for it. - ------------------------------------------------------------------------- -r952 | joe | 2006-02-26 20:52:58 +0000 (Sun, 26 Feb 2006) | 4 lines - -* doc/manual.xml: Add ne_has_support refentry. - -* doc/ref/feat.xml: New document. - ------------------------------------------------------------------------- -r951 | joe | 2006-02-26 10:11:31 +0000 (Sun, 26 Feb 2006) | 3 lines - -* test/request.c (hooks): Use many_serve_string to serve the three -responses, to avoid spurious failures. - ------------------------------------------------------------------------- -r950 | joe | 2006-02-25 23:23:56 +0000 (Sat, 25 Feb 2006) | 3 lines - -* test/Makefile.in: Add some missing dependencies on the "random -file", NEWS. - ------------------------------------------------------------------------- -r949 | joe | 2006-02-25 23:17:45 +0000 (Sat, 25 Feb 2006) | 4 lines - -* src/ne_basic.c (ne_post): Flag POST request as non-idempotent. - -* src/ne_locks.c (ne_lock): Flag LOCK request as non-idempotent. - ------------------------------------------------------------------------- -r948 | joe | 2006-02-25 23:16:51 +0000 (Sat, 25 Feb 2006) | 3 lines - -Interfaces to allow correct handling of non-idempotent -requests done, and SSLv2-disabling done. - ------------------------------------------------------------------------- -r947 | joe | 2006-02-25 23:16:11 +0000 (Sat, 25 Feb 2006) | 17 lines - -Add per-request flags interface, and correct retry handling of -non-idempotent methods: - -* src/ne_request.h (ne_set_request_flag, ne_get_request_flag): New -prototypes. -(ne_set_request_expect100): Remove prototype. - -* src/ne_request.c (struct ne_request_s): Add flags array, remove -use_expect100 field. -(ne_set_request_flag, ne_get_request_flag): New functions. -(ne_set_request_expect100): Remove function. -(build_request, send_request): Adapt to use expect100 flag. -(ne_begin_request): I - -* test/request.c (expect_100_once, expect_100_nobody): Use -ne_set_request_flag. - ------------------------------------------------------------------------- -r946 | joe | 2006-02-25 23:09:08 +0000 (Sat, 25 Feb 2006) | 3 lines - -* src/ne_openssl.c (ne_ssl_context_set_flag): Fix to actually respect -the flag setting. - ------------------------------------------------------------------------- -r945 | joe | 2006-02-25 16:29:54 +0000 (Sat, 25 Feb 2006) | 10 lines - -Forward-port ICY protocol support from 0.25.x branch, conditional on -NE_SESSFLAG_ICYPROTO. - -* src/ne_session.h: Add NE_SESSFLAG_ICYPROTO flag. - -* src/ne_request.c (read_status_line): Parse ICY responses if flag is -set. - -* test/request.c (icy_protocol): Add test case. - ------------------------------------------------------------------------- -r944 | joe | 2006-02-25 16:26:50 +0000 (Sat, 25 Feb 2006) | 17 lines - -* src/ne_ssl.h (NE_SSL_CTX_SSLv2): New constant. -(ne_ssl_context_set_flag): New prototype. - -* src/ne_stubssl.c (ne_ssl_context_set_flag): New stub. - -* src/ne_openssl.c (ne_ssl_context_set_flag): New function. - -* src/ne_gnutls.c (ne_ssl_context_set_flag): New stub. - -* src/ne_session.h: Add NE_SESSFLAG_SSLv2 flag (defaults to on). - -* src/ne_session.c (ne_session_create) [NE_HAVE_SSL]: Set the -NE_SESSFLAG_SSLv2 flag. -(ne_set_session_flag) [NE_HAVE_SSL]: Call ne_ssl_context_set_flag. - -* test/ssl.c (simple_sslv2): Enable SSLv2 support. - ------------------------------------------------------------------------- -r943 | joe | 2006-02-25 16:21:45 +0000 (Sat, 25 Feb 2006) | 19 lines - -* src/ne_session.h (ne_set_session_flag): New enum. -(ne_set_session_flag, ne_get_session_flag): New prototypes. -(ne_set_persist): Removed prototype. - -* src/ne_session.c (ne_set_session_flag, ne_get_session_flag): New -functions. -(ne_set_persist): Removed function. - -* src/ne_private.h (ne_session): Replace no_persist field with flags -array. - -* src/ne_request.c (add_fixed_headers, ne_end_request): Use flags -array. -(ne_begin_request): Remove redunant check for no_persist flag; -send_request() will only return NE_RETRY if a persistent connection -was reused. - -* test/session.c (flags): New test case. - ------------------------------------------------------------------------- -r942 | joe | 2006-02-25 15:02:25 +0000 (Sat, 25 Feb 2006) | 11 lines - -Forward-port the compression-vs-retry fix by using the new ne_unhook_* -functions: - -* src/ne_compress.c (gz_pre_send): New function. -(ne_decompress_reader): Don't initialize all context state here; -register pre_send hook. -(ne_decompress_destroy): Unregister hook; move function lower in -module. - -* test/compress.c: retry_compress is no longer XFAIL. - ------------------------------------------------------------------------- -r941 | joe | 2006-02-25 14:47:18 +0000 (Sat, 25 Feb 2006) | 2 lines - -* src/ne_request.h: Clarify exactly what is unsafe. - ------------------------------------------------------------------------- -r940 | joe | 2006-02-25 14:45:09 +0000 (Sat, 25 Feb 2006) | 9 lines - -* src/ne_request.h: Make behaviour undefined when unregistering hooks -from a corresponding hook implementation, except for the -destroy_request hook. - -* src/ne_request.c (ne_request_destroy): Make safe against the hook -list changing under foot. - -* test/request.c (hook_self_destroy): New test. - ------------------------------------------------------------------------- -r939 | joe | 2006-02-25 14:10:05 +0000 (Sat, 25 Feb 2006) | 3 lines - -* src/ne_request.c (send_request): Set error string to socket error if -sending request header fails. - ------------------------------------------------------------------------- -r938 | joe | 2006-02-25 13:52:31 +0000 (Sat, 25 Feb 2006) | 7 lines - -* src/ne_request.c (hash_and_lower, read_response_headers): Use -ne_tolower. - -* src/ne_string.h (NE_ASC2HEX): Use ne_tolower. - -* src/ne_md5.c: Don't include ctype.h. - ------------------------------------------------------------------------- -r937 | joe | 2006-02-25 13:43:13 +0000 (Sat, 25 Feb 2006) | 4 lines - -* src/ne_string.h (ne_tolower, ne_tolower_array): New macro, function. - -* src/ne_string.c (ne_tolower_array): New function. - ------------------------------------------------------------------------- -r936 | joe | 2006-02-25 13:21:30 +0000 (Sat, 25 Feb 2006) | 3 lines - -* src/ne_string.c (ascii_tolower, TOLOWER): Use array-based lowercase -conversion. - ------------------------------------------------------------------------- -r931 | joe | 2006-02-21 17:29:00 +0000 (Tue, 21 Feb 2006) | 6 lines - -* src/ne_locks.c (lk_pre_send, ne_lock): Use ne_buffer_czappend for -constant strings; use "\n" not EOL macro. - -* src/ne_props.c (set_body, ne_propfind_allprop, ne_propfind_named, -ne_proppatch, ne_propfind_create, ne_propnames): Likewise. - ------------------------------------------------------------------------- -r930 | joe | 2006-02-21 17:18:05 +0000 (Tue, 21 Feb 2006) | 6 lines - -* src/ne_request.h: Clarify what may be in the Request-URI passed to a -create_request hook. - -* BUGS: create_request hook URI handling has been well-defined for a -while; bug was fixed. - ------------------------------------------------------------------------- -r929 | joe | 2006-02-20 22:48:45 +0000 (Mon, 20 Feb 2006) | 2 lines - -* src/ne_session.c (remove_hook): Don't leak the hook structure. - ------------------------------------------------------------------------- -r928 | joe | 2006-02-20 22:46:32 +0000 (Mon, 20 Feb 2006) | 2 lines - -* test/request.c (hooks): Improve hook coverage some more. - ------------------------------------------------------------------------- -r927 | joe | 2006-02-20 22:26:47 +0000 (Mon, 20 Feb 2006) | 9 lines - -* src/ne_request.h (ne_unhook_pre_send, ne_unhook_post_send, -ne_unhook_destroy_request, ne_unhook_destroy_session): Add prototypes. - -* src/ne_session.c (remove_hook, ne_unhook_pre_send, -ne_unhook_post_send, ne_unhook_destroy_request, -ne_unhook_destroy_session): New functions. - -* test/request.c (hooks): New test case. - ------------------------------------------------------------------------- -r926 | joe | 2006-02-20 21:55:55 +0000 (Mon, 20 Feb 2006) | 7 lines - -* src/ne_session.c (add_hook, ne_hook_create_request, -ne_hook_pre_send, ne_hook_post_send, ne_hook_destroy_request, -ne_hook_destroy_session, ne_set_session_private): Moved here... - -* src/ne_request.c: ...from here. -(ne_set_request_private): Inline add_hook. - ------------------------------------------------------------------------- -r925 | joe | 2006-02-20 21:42:38 +0000 (Mon, 20 Feb 2006) | 2 lines - -* test/socket.c (multi_init): Update for refcounting init/exit. - ------------------------------------------------------------------------- -r924 | joe | 2006-02-20 21:42:24 +0000 (Mon, 20 Feb 2006) | 3 lines - -* src/ne_openssl.c (ne__ssl_exit): Don't use debugging calls in -ne_sock_exit; debug stream may have been closed. - ------------------------------------------------------------------------- -r923 | joe | 2006-02-18 09:17:41 +0000 (Sat, 18 Feb 2006) | 3 lines - -* src/ne_gnutls.c: Fix --enable-threadsafe-ssl build; include -pthread.h and errno.h, fix cpp syntax error. - ------------------------------------------------------------------------- -r922 | joe | 2006-02-17 22:16:24 +0000 (Fri, 17 Feb 2006) | 2 lines - -* TODO: Strike out stuff which is either done or out-of-scope. - ------------------------------------------------------------------------- -r921 | joe | 2006-02-17 17:27:32 +0000 (Fri, 17 Feb 2006) | 11 lines - -* macros/neon.m4 (NEON_SSL): Add --enable-threadsafe-ssl flag which -requests thread-safety for the SSL library using POSIX mutexes. - -* src/ne_openssl.c [HAVE_PTHREADS] (thread_id_neon, thread_lock_neon): -New functions. -(ne__ssl_init, ne__ssl_exit) [HAVE_PTHREADS]: Register/unregister -thread-safety callbacks, if safe to do so. - -* src/ne_gnutls.c (ne__ssl_init, ne__ssl_exit): Register libgcrypt -POSIX thread support. - ------------------------------------------------------------------------- -r920 | joe | 2006-02-17 17:07:40 +0000 (Fri, 17 Feb 2006) | 2 lines - -* src/ne_auth.c: Fix typo. - ------------------------------------------------------------------------- -r919 | joe | 2006-02-17 17:07:03 +0000 (Fri, 17 Feb 2006) | 10 lines - -* src/ne_privssl.h (ne__ssl_init, ne__ssl_exit): Add prototypes. - -* src/ne_socket.c (init_ssl): Removed. -(ne_sock_init, ne_sock_init): Call ne__ssl_init, ne__ssl_exit -to handle process-global init/exit of the SSL library. - -* src/ne_openssl.c (ne__ssl_init, ne__ssl_exit): New functions. - -* src/ne_gnutls.c (ne__ssl_init, ne__ssl_exit): New functions. - ------------------------------------------------------------------------- -r917 | joe | 2006-02-16 18:38:25 +0000 (Thu, 16 Feb 2006) | 3 lines - -* src/ne_socket.c, src/ne_socket.h (ne_sock_init, ne_sock_exit): -Refcount to allow multiple calls per process. - ------------------------------------------------------------------------- -r916 | joe | 2006-02-16 09:37:40 +0000 (Thu, 16 Feb 2006) | 3 lines - -* test/common/tests.h (ONCMP): Show expected/unexpected string in -failure message if other is NULL. - ------------------------------------------------------------------------- -r915 | joe | 2006-02-16 09:36:57 +0000 (Thu, 16 Feb 2006) | 2 lines - -* test/common/tests.c (TEST_DEBUG): Add NE_DBG_HTTPPLAIN. - ------------------------------------------------------------------------- -r913 | joe | 2006-02-15 21:00:39 +0000 (Wed, 15 Feb 2006) | 8 lines - -* test/auth.c (make_digest): Handle MD5-sess algorithm. -(verify_digest_header): Verify that all expected fields -are present, not that all present fields are as expected. -(make_authinfo_header): Respect proxy parameter. -(make_digest_header): New function. -(serve_digest, test_digest): Respect proxy parameter. -(digest): Factor out from digest_* functions. - ------------------------------------------------------------------------- -r912 | joe | 2006-02-15 20:57:28 +0000 (Wed, 15 Feb 2006) | 3 lines - -* src/ne_auth.c (digest_challenge): Give useful error messages for -malformed challenges. - ------------------------------------------------------------------------- -r911 | joe | 2006-02-15 16:48:05 +0000 (Wed, 15 Feb 2006) | 2 lines - -* test/lock.c (fail_lockauth): Set lock token. - ------------------------------------------------------------------------- -r909 | joe | 2006-02-15 09:16:09 +0000 (Wed, 15 Feb 2006) | 13 lines - -* src/ne_auth.c: Remove unnecessary forward declaration of -struct auth_protocol. -(verify_digest_response): Reflow to give useful errors; -drop conditional which was needed for qop=auth-int. - -* test/auth.c (make_digest): Factored out from check_digest. -(check_digest): Use make_digest. -(make_authinfo_header): New function. -(serve_digest): Add Authentication-Info handling. -(test_digest): Factored out from digest_rfc2617/digest_rfc2069. -(digest_rfc2617, digest_rfc2069): Use test_digest. -(digest_auth_info, digest_failures): New test cases. - ------------------------------------------------------------------------- -r897 | joe | 2006-02-14 12:17:49 +0000 (Tue, 14 Feb 2006) | 4 lines - -* src/ne_auth.c (struct auth_request): Remove unused response_body -field and pointless will_handle field. -(verify_digest_response, ah_pre_send): Remove will_handle flag. - ------------------------------------------------------------------------- -r896 | joe | 2006-02-14 12:10:01 +0000 (Tue, 14 Feb 2006) | 13 lines - -* src/ne_auth.c (struct auth_request): Move attempt field here from -auth_session. -(struct auth_protocol): Pass attempt counter to challenge callback. -(get_credentials): Take attempt counter as parameter. -(basic_challenge, digest_challenge): Pass through attempt counter -to get_credentials accordingly. -(gssapi_challenge): Only respect a Negotiate challenge if it is an -initial challenge, with no input token, or a continuation, with an -input token. -(auth_challenge): Pass through attempt counter. -(ah_create): Don't reset session->attempt. -(ah_post_send): Pass and increment attempt counter here. - ------------------------------------------------------------------------- -r895 | joe | 2006-02-14 11:51:03 +0000 (Tue, 14 Feb 2006) | 3 lines - -* src/ne_auth.c: Clean up debugging output a little; no functional -change. - ------------------------------------------------------------------------- -r890 | joe | 2006-02-12 22:24:03 +0000 (Sun, 12 Feb 2006) | 3 lines - -* test/auth.c (dup_header, check_digest, verify_digest_header, -serve_digest, digest_rfc2617, digest_rfc2069): New functions. - ------------------------------------------------------------------------- -r889 | joe | 2006-02-12 12:05:14 +0000 (Sun, 12 Feb 2006) | 6 lines - -* src/ne_sspi.c, src/ne_sspi.h (ne_sspi_get_mechanism): Remove -function. - -* src/ne_auth.c (request_sspi): Use protocol name rather than jumping -through SSPI code. - ------------------------------------------------------------------------- -r888 | joe | 2006-02-12 10:14:42 +0000 (Sun, 12 Feb 2006) | 2 lines - -* doc/ref/auth.xml: Fix callback type name. - ------------------------------------------------------------------------- -r885 | joe | 2006-02-11 23:56:58 +0000 (Sat, 11 Feb 2006) | 2 lines - -* doc/ref/ssltrust.xml: Fix typo. - ------------------------------------------------------------------------- -r883 | joe | 2006-02-11 23:46:47 +0000 (Sat, 11 Feb 2006) | 2 lines - -* NEWS: Remove completed TODO list item. - ------------------------------------------------------------------------- -r882 | joe | 2006-02-11 17:03:16 +0000 (Sat, 11 Feb 2006) | 2 lines - -* src/ne_auth.c (free_auth): Free the handlers when the session is destroyed. - ------------------------------------------------------------------------- -r881 | joe | 2006-02-11 16:30:27 +0000 (Sat, 11 Feb 2006) | 3 lines - -* test/run.sh: Set MALLOC_PERTURB_ to enable glibc malloc -randomization. - ------------------------------------------------------------------------- -r880 | joe | 2006-02-11 13:29:34 +0000 (Sat, 11 Feb 2006) | 20 lines - -Allow control over which auth protocols are used: - -* src/ne_auth.h (ne_add_server_auth, ne_add_proxy_auth): New -prototypes. - -* src/ne_auth.c (struct auth_handler): New structure. -(auth_challenge): Store a pointer to a handler. -(auth_session): Store a list of handlers. -(auth_protocol): Make id type 'unsigned'. -(get_credentials): Take challenge argument. -(basic_challenge, digest): Pass challenge structure to get_credentials. -(auth_register): Take protocol mask; allow multiple calls per session. -Append a handler to list registered for the session. Only initialize -GSSAPI fields if Negotiate is allowed. -(auth_register_default): New function. -(auth_challenge): Iterate through the session's handler list for -each challenge; store a pointer to the handler in the challenge. -(ne_set_server_auth, ne_set_proxy_auth): Use auth_register_default. -(ne_add_server_auth, ne_add_proxy_auth): New functions. - ------------------------------------------------------------------------- -r879 | joe | 2006-02-11 11:37:32 +0000 (Sat, 11 Feb 2006) | 18 lines - -Refactor auth protocol support as first step to exposing protocols in -the API: - -* src/ne_auth.c (struct auth_protocol): New structure; replaces -auth_scheme enum. -(struct auth_session, struct auth_challenge): Store pointer -to protocol structure in place of scheme value. -(request_basic, request_gssapi, verify_negotiate_response, -gssapi_challenge, sspi_challenge): Adjust to use generic callback -prototypes; don't set ->scheme, use ->protocol instead. -(insert_challenge): New function. -(auth_challenge): Adjust to construct a list of challenges, -kept sorted by protocol strength field. Walk the list once -until a protocol challenge callback succeeds. -(ah_pre_send): Adjust to use the protocol response callback. -(ah_post_send): Adjust to use the protocol verify callback. -(protocols): Add global protocol definitions array. - ------------------------------------------------------------------------- -r878 | joe | 2006-02-11 11:15:32 +0000 (Sat, 11 Feb 2006) | 2 lines - -* src/ne_auth.h: Move hint on using attempt as return value. - ------------------------------------------------------------------------- -r869 | joe | 2006-02-08 23:04:03 +0000 (Wed, 08 Feb 2006) | 12 lines - -Patch from Stefan Küng to fix endless authentication loop if the -authentication fails: - -* src/ne_sspi.c, src/ne_sspi.h: - New public function to tell the lib that an authentication was - successful. - Return an error if the authentication is restarted without a - successful authentication before. -* src/ne_auth.c: - Call the new public function to tell the library about a successful - authentication. - ------------------------------------------------------------------------- -r842 | joe | 2006-01-11 12:10:50 +0000 (Wed, 11 Jan 2006) | 3 lines - -* test/uri-tests.c (parse): Add some more test cases and make failure -messages clearer. - ------------------------------------------------------------------------- -r840 | joe | 2006-01-10 23:19:39 +0000 (Tue, 10 Jan 2006) | 2 lines - -* src/ne_auth.c (ah_post_send): Fix non-SSPI build. - ------------------------------------------------------------------------- -r839 | joe | 2006-01-10 23:19:01 +0000 (Tue, 10 Jan 2006) | 6 lines - -Apply other half of Stefan's patch which got lost in the wash -somewhere: - -* src/ne_sspi.c: Return an error if the authentication is restarted -without a successful authentication before. - ------------------------------------------------------------------------- -r838 | joe | 2006-01-10 22:59:47 +0000 (Tue, 10 Jan 2006) | 7 lines - -Fix build on some AIX systems: - -* src/ne_request.c: Include sys/limits.h if available. Define -LONG_LONG_MAX to LONGLONG_MAX if necessary. - -* macros/neon.m4 (LIBNEON_SOURCE_CHECKS): Check for sys/limits.h. - ------------------------------------------------------------------------- -r837 | joe | 2006-01-10 22:51:39 +0000 (Tue, 10 Jan 2006) | 12 lines - -Patch from Stefan Küng to fix endless authentication loop if the -authentication fails: - -* src/ne_sspi.c, src/ne_sspi.h: - New public function to tell the lib that an authentication was - successful. - Return an error if the authentication is restarted without a - successful authentication before. -* src/ne_auth.c: - Call the new public function to tell the library about a successful - authentication. - ------------------------------------------------------------------------- -r836 | joe | 2006-01-10 13:50:45 +0000 (Tue, 10 Jan 2006) | 8 lines - -Fix ne_lock_discover() regression: - -* src/ne_locks.c (struct discover_ctx): Add reference to the PROPFIND -handler. -(end_element_ldisc): Use it to retrieve current lock. -(ne_lock_discover): Store pointer to the PROPFIND handler in the context; -pass the context as userdata to the XML parser callbacks. - ------------------------------------------------------------------------- -r835 | joe | 2006-01-10 13:39:59 +0000 (Tue, 10 Jan 2006) | 2 lines - -* src/ne_uri.c (CMPWITH): M-x backslash-region. - ------------------------------------------------------------------------- -r834 | joe | 2006-01-10 13:27:52 +0000 (Tue, 10 Jan 2006) | 2 lines - -* src/ne_uri.h: Minor comment tweaks. - ------------------------------------------------------------------------- -r833 | joe | 2006-01-09 14:39:05 +0000 (Mon, 09 Jan 2006) | 2 lines - -Revert r832 per request from Stefan Küng. - ------------------------------------------------------------------------- -r832 | joe | 2006-01-07 17:36:42 +0000 (Sat, 07 Jan 2006) | 5 lines - -Patch from Stefan Küng: - -* src/ne_sspi.c: - free allocated memory before returning with an error. - ------------------------------------------------------------------------- -r831 | joe | 2006-01-06 15:36:46 +0000 (Fri, 06 Jan 2006) | 4 lines - -* src/ne_gnutls.c, src/ne_openssl.c, src/ne_basic.c, -src/ne_compress.c, src/ne_uri.c, src/ne_auth.c, src/ne_locks.c: Use -ne_strcasecmp in favour of locale-dependent strcasecmp throughout. - ------------------------------------------------------------------------- -r830 | joe | 2006-01-06 14:54:32 +0000 (Fri, 06 Jan 2006) | 4 lines - -* src/ne_locks.c (CMPWITH): Simplify to reduce number of branches. - -* test/uri-tests.c (cmp): Test every comparison for reflexivity; - ------------------------------------------------------------------------- -r829 | joe | 2006-01-06 14:37:12 +0000 (Fri, 06 Jan 2006) | 8 lines - -* src/ne_uri.c (CMPWITH): New macro. -(CMP, CASECMP): Implement using it. Use ne_strcasecmp. -(ne_uri_cmp): Fix handling of empty paths; compare query, fragment -and userinfo. - -* test/uri-tests.c (cmp): Rewrite and improve coverage. -(cmp_differ): Remove function. - ------------------------------------------------------------------------- -r828 | joe | 2006-01-06 14:05:40 +0000 (Fri, 06 Jan 2006) | 2 lines - -* src/ne_i18n.h: Expand on use of ne_i18n_init a little. - ------------------------------------------------------------------------- -r827 | joe | 2006-01-06 12:26:46 +0000 (Fri, 06 Jan 2006) | 9 lines - -Add locale-independent implementations of strcasecmp/strncasecmp, from -glibc: - -* src/ne_string.h (ne_strcasecmp, ne_strncasecmp): Add prototypes. - -* src/ne_string.c (ne_strcasecmp, ne_strncasecmp): New functions. - -* test/string-tests.c (casecmp, casencmp): Add test cases. - ------------------------------------------------------------------------- -r825 | joe | 2006-01-02 11:43:19 +0000 (Mon, 02 Jan 2006) | 40 lines - -* src/ne_207.h (ne_207_create): Take a base URI argument. -(ne_207_start_response): Give parsed URI structure rather than raw -string. - -* src/ne_207.c (struct ne_207_parser_s): Add URI base member. -(end_element): Parse and resolve the href URI; pass resolved URI -to start_response callback. -(ne_207_create): Take a copy of given base URI. -(ne_207_destroy): ... and free it. -(start_response): Unparse the given URI. -(ne_simple_request): Mock up a base URI. - -* src/ne_props.h (ne_props_result, ne_props_create_complex): Take URI -structure rather than raw string. - -* src/ne_props.c (ne_prop_result_set_s): Store URI structure. -(start_response): Take a copy of passed-in URI in propset; pass it -back to creator callback. -(free_propset): Free stored URI. -(end_response): Pass stored URI to results callback. -(ne_propfind_create): Create base URI to pass to ne_207_create. - -* src/ne_locks.h (ne_lock_result): Take a URI structure rather than -raw string. - -* src/ne_locks.c (struct discover_ctx): Remove session member. -(discover_results): Use given URI structure throughout. -(ld_create): Copy URI structure directly to lock. -(ne_lock_discover): No need to take a reference to the session. - -* src/Makefile.in: Update dependencies. - -* test/props.c (dummy_results, simple_results, tos_startresp): Adjust -to take URI structure. -(run_207_response): Initialize base URI to pass to ne_207_create. -(pfind_simple): Only use URI path in result strings. - -* test/lock.c (discover_result, dummy_discover): Adjust to take URI -structure. - ------------------------------------------------------------------------- -r824 | joe | 2006-01-02 10:28:10 +0000 (Mon, 02 Jan 2006) | 2 lines - -* src/ne_xmlreq.h: Fix typo in comment. - ------------------------------------------------------------------------- -r823 | joe | 2006-01-01 23:42:03 +0000 (Sun, 01 Jan 2006) | 4 lines - -* src/ne_uri.h, src/ne_uri.c (ne_uri_resolve): Return target pointer. - -* test/uri-tests.c (resolve): Test for such. - ------------------------------------------------------------------------- -r822 | joe | 2006-01-01 23:17:51 +0000 (Sun, 01 Jan 2006) | 3 lines - -* test/uri-tests.c (parse): Test for the slightly odd triple-slash -case. - ------------------------------------------------------------------------- -r821 | joe | 2006-01-01 23:02:41 +0000 (Sun, 01 Jan 2006) | 3 lines - -* test/uri-tests.c (parse): Explicitly test for a URI with no path -component. - ------------------------------------------------------------------------- -r820 | joe | 2006-01-01 22:37:50 +0000 (Sun, 01 Jan 2006) | 3 lines - -* src/ne_locks.c (ne_lock_using_parent): Zero-initalize lock -structure. - ------------------------------------------------------------------------- -r819 | joe | 2006-01-01 22:35:38 +0000 (Sun, 01 Jan 2006) | 6 lines - -Fixes found by --enable-memleak build: - -* src/ne_uri.c (ne_uri_resolve): Fix double assignment of query -component. -(ne_uri_free): Free the query and fragment fields. - ------------------------------------------------------------------------- -r818 | joe | 2006-01-01 22:29:45 +0000 (Sun, 01 Jan 2006) | 3 lines - -* src/ne_uri.c (remove_dot_segments): malloc the correct size of -output buffer rather than strdup'ing the input buffer. - ------------------------------------------------------------------------- -r817 | joe | 2006-01-01 22:22:07 +0000 (Sun, 01 Jan 2006) | 2 lines - -* src/ne_locks.c (ne_lock_copy): Use ne_uri_copy. - ------------------------------------------------------------------------- -r816 | joe | 2006-01-01 21:20:33 +0000 (Sun, 01 Jan 2006) | 6 lines - -* src/ne_uri.h (ne_uri_copy): Add prototype. - -* src/ne_uri.c (ne_uri_copy): New function. - -* test/uri-tests.c (copy): New test case. - ------------------------------------------------------------------------- -r815 | joe | 2006-01-01 21:19:25 +0000 (Sun, 01 Jan 2006) | 5 lines - -* src/ne_uri.c (ne_uri_unparse): Handle port correctly if scheme is -undefined. - -* test/uri-tests.c (unparse): Add test case. - ------------------------------------------------------------------------- -r814 | joe | 2006-01-01 19:02:23 +0000 (Sun, 01 Jan 2006) | 2 lines - -* src/ne_uri.c (ne_uri_unparse): Fix missing NULL list terminator. - ------------------------------------------------------------------------- -r813 | joe | 2006-01-01 18:58:00 +0000 (Sun, 01 Jan 2006) | 7 lines - -* src/ne_uri.c (remove_dot_segments): Fix case 2.A. -(copy_authority): Fix to duplicate userinfo if defined. -(ne_uri_resolve): Fix to only copy scheme if defined. -(ne_uri_unparse): Fix handling of URIs with authority but no scheme. - -* test/uri-tests.c (unparse, resolve): Add test cases for above. - ------------------------------------------------------------------------- -r812 | joe | 2006-01-01 17:22:11 +0000 (Sun, 01 Jan 2006) | 7 lines - -* src/ne_uri.h (ne_uri_resolve): Add prototype. - -* src/ne_uri.c (copy_authority, merge_paths, remove_dot_segments, -ne_uri_resolve): New functions. - -* test/uri-tests.c (resolve): Add test cases. - ------------------------------------------------------------------------- -r811 | joe | 2006-01-01 17:10:57 +0000 (Sun, 01 Jan 2006) | 7 lines - -* src/ne_uri.c (ne_uri_parse): Empty string is a valid URI-reference, -so allow it. -(ne_uri_unparse): Handle URIs with undefined authority. - -* test/uri-tests.c (parse): Add test case for former. -(unparse): Add test case for latter. - ------------------------------------------------------------------------- -r810 | joe | 2006-01-01 14:58:37 +0000 (Sun, 01 Jan 2006) | 2 lines - -* src/Makefile.in (neonreq): Depend on ne_uri.h. - ------------------------------------------------------------------------- -r809 | joe | 2006-01-01 14:57:28 +0000 (Sun, 01 Jan 2006) | 3 lines - -* test/uri-tests.c (escapes, failparse, unparse): Improve test -coverage (100% of branches taken). - ------------------------------------------------------------------------- -r808 | joe | 2006-01-01 14:43:11 +0000 (Sun, 01 Jan 2006) | 15 lines - -* src/ne_uri.h (ne_uri): Rename authinfo field to userinfo. -Add query and fragment fields. - -* src/ne_locks.c (ne_lock_using_parent): Adjust accordingly. - -* src/ne_uri.c (ne_uri_parse): Adjust for userinfo/authinfo rename. -Parse fragment and query; parse path component strictly. -(ne_uri_free): Adjust for authinfo rename. -(ne_uri_unparse): Adjust for authinfo rename; handle query and -fragment. - -* test/uri-tests.c (parse, unparse): Add tests for query/fragment -handling. -(failparse): Add some cases with invalid path segments. - ------------------------------------------------------------------------- -r807 | joe | 2006-01-01 13:37:56 +0000 (Sun, 01 Jan 2006) | 11 lines - -* src/ne_uri.h (ne_uri_parse): Redefine to take a URI-reference as -input. - -* src/ne_uri.c (uri_chars): Redefine array giving more detailed -character classes. -(ne_uri_parse): Rewrite to properly parse a URI-reference. -(ne_path_escape): Do respect the authinfo field. - -* test/uri-tests.c (just_hostname, just_path): Remove tests. -(parse): Remove some non-URI-reference tests; add some more. - ------------------------------------------------------------------------- -r806 | joe | 2005-12-31 18:22:35 +0000 (Sat, 31 Dec 2005) | 2 lines - -* test/session.c (fill_uri): Use ONCMP. - ------------------------------------------------------------------------- -r775 | joe | 2005-11-29 20:58:08 +0000 (Tue, 29 Nov 2005) | 3 lines - -* src/ne_socket.c: Revert debugging code accidentally committed in -r774. - ------------------------------------------------------------------------- -r774 | joe | 2005-11-29 20:54:50 +0000 (Tue, 29 Nov 2005) | 10 lines - -* macros/neon.m4 (NEON_SSL): Check for gnutls_session_get_data2. - -* src/ne_privssl.h (ne_ssl_context_s) [HAVE_GNUTLS && -HAVE_GNUTLS_SESSION_GET_DATA2]: Just store a single gnutls_datum for -the cache.client field. - -* src/ne_socket.c [HAVE_GNUTLS] (ne_sock_connect_ssl): Use -gnutls_session_get_data2 if available; otherwise do check for errors -from _get_data. - ------------------------------------------------------------------------- -r773 | joe | 2005-11-29 17:46:26 +0000 (Tue, 29 Nov 2005) | 3 lines - -* src/ne_gnutls.c (ne__negotiate_ssl): Skip verification of the cert -if it's the same as last time; fixes the "cache_verify" test. - ------------------------------------------------------------------------- -r772 | joe | 2005-11-29 16:55:16 +0000 (Tue, 29 Nov 2005) | 9 lines - -* macros/neon.m4 (NEON_SSL): Add --with-ca-bundle flag to allow an -(alternative) SSL CA bundle to be configured/used. - -* src/ne_openssl.c (ne_ssl_trust_default_ca): Honour NE_SSL_CA_BUNDLE -if defined, in preference to use of OpenSSL-default CA bundle. - -* src/ne_gnutls.c (ne_ssl_trust_default_ca): Implement using -NE_SSL_CA_BUNDLE. - ------------------------------------------------------------------------- -r771 | joe | 2005-11-29 16:07:48 +0000 (Tue, 29 Nov 2005) | 3 lines - -* macros/neon.m4 (NEON_SSL): Allow enabling GNUTLS support since it's -mostly complete now. - ------------------------------------------------------------------------- -r770 | joe | 2005-11-29 16:04:01 +0000 (Tue, 29 Nov 2005) | 4 lines - -* src/ne_socket.c (ne_sock_sessid): Fail for non-SSL sockets. - -* test/socket.c (ssl_session_id): Fix for non-SSL build. - ------------------------------------------------------------------------- -r769 | joe | 2005-11-29 15:13:02 +0000 (Tue, 29 Nov 2005) | 4 lines - -* src/ne_socket.c (ne_sock_sessid): Fail for non-SSL sockets. - -* test/socket.c (ssl_session_id): Fix for non-SSL build. - ------------------------------------------------------------------------- -r768 | joe | 2005-11-29 15:09:06 +0000 (Tue, 29 Nov 2005) | 6 lines - -* src/ne_socket.c (ne_sock_sessid): New function. - -* src/ne_socket.h (ne_sock_sessid): Add prototype. - -* test/socket.c (ssl_session_id): New test. - ------------------------------------------------------------------------- -r767 | joe | 2005-11-29 13:17:49 +0000 (Tue, 29 Nov 2005) | 12 lines - -Implement session caching for GNUTLS: - -* src/ne_socket.c (copy_datum, store_sess, match_datum, retrieve_sess, -remove_sess): New functions. -(ne_sock_accept_ssl) [HAVE_GNUTLS]: Implement dummy session cache. -(ne_sock_connect_ssl) [HAVE_GNUTLS]: Cache client session. - -* src/ne_gnutls.c (ne_ssl_context_destroy): Free session cache. - -* src/ne_privssl.h [HAVE_GNUTLS] (struct ne_ssl_context_s): Add -session cache fields. - ------------------------------------------------------------------------- -r766 | joe | 2005-11-28 21:54:09 +0000 (Mon, 28 Nov 2005) | 2 lines - -* src/ne_207.h, src/ne_dates.h: Fix multiple-inclusion-safety symbols. - ------------------------------------------------------------------------- -r765 | joe | 2005-11-28 13:02:36 +0000 (Mon, 28 Nov 2005) | 2 lines - -* src/ne_gnutls.c (make_peers_chain): Don't leak if import fails. - ------------------------------------------------------------------------- -r764 | joe | 2005-11-28 11:47:06 +0000 (Mon, 28 Nov 2005) | 3 lines - -* src/ne_socket.c (error_gnutls): Distinguish between generic errors -and receipt of an SSL alert. - ------------------------------------------------------------------------- -r763 | joe | 2005-11-28 11:44:41 +0000 (Mon, 28 Nov 2005) | 4 lines - -* src/ne_socket.c (error_gnutls): Improve error handling; always treat -GNUTLS_E_UNEXPECTED_PACKET_LENGTH as a truncation, socket errors as a -reset. - ------------------------------------------------------------------------- -r761 | joe | 2005-11-28 10:59:08 +0000 (Mon, 28 Nov 2005) | 3 lines - -* test/ssl.c (wildcard_init): Update error message now most hostname -commands should work OK. - ------------------------------------------------------------------------- -r760 | joe | 2005-11-28 08:53:45 +0000 (Mon, 28 Nov 2005) | 7 lines - -* test/makekeys.sh: Create a PKCS#12 client cert with embedded CA -cert. - -* test/Makefile.in (clean): Clean all PKCS#12 certs. - -* test/ssl.c (load_client_cert): Load the new cert. - ------------------------------------------------------------------------- -r759 | joe | 2005-11-28 08:36:20 +0000 (Mon, 28 Nov 2005) | 3 lines - -* src/ne_openssl.c (ne_ssl_clicert_decrypt): Check that private -key/cert match. - ------------------------------------------------------------------------- -r755 | joe | 2005-11-24 22:37:49 +0000 (Thu, 24 Nov 2005) | 10 lines - -* src/ne_request.c (open_connection, do_connect): Take session pointer -as argument not request. - -* src/ne_openssl.c (ne__negotiate_ssl): Take session pointer as -argument not request. - -* src/ne_gnutls.c (ne__negotiate_ssl): Likewise. - -* src/ne_private.h (ne__negotiate_ssl): Update prototype. - ------------------------------------------------------------------------- -r754 | joe | 2005-11-23 15:20:37 +0000 (Wed, 23 Nov 2005) | 2 lines - -* test/makekeys.sh: Fix new domain extraction for multi-part domains. - ------------------------------------------------------------------------- -r750 | joe | 2005-10-29 14:41:18 +0100 (Sat, 29 Oct 2005) | 2 lines - -* src/ne_alloc.h: Remove NE_FREE macro. - ------------------------------------------------------------------------- -r749 | joe | 2005-10-29 14:40:09 +0100 (Sat, 29 Oct 2005) | 4 lines - -* src/ne_props.c (free_propset): Eliminate use of NE_FREE macro. - -* src/ne_redirect.c (create): Likewise. - ------------------------------------------------------------------------- -r748 | joe | 2005-10-29 14:34:59 +0100 (Sat, 29 Oct 2005) | 2 lines - -* src/ne_auth.c (clean_session): Eliminate use of NE_FREE macro. - ------------------------------------------------------------------------- -r747 | joe | 2005-10-29 14:31:22 +0100 (Sat, 29 Oct 2005) | 3 lines - -* src/ne_207.c (end_element, start_response, ne_simple_request): -Eliminate use of NE_FREE macro. - ------------------------------------------------------------------------- -r746 | joe | 2005-10-29 00:32:50 +0100 (Sat, 29 Oct 2005) | 6 lines - -Fix type mismatch with OpenSSL >= 0.9.8. - -* src/ne_openssl.c (ne_d2i_uchar): Add typedef. -(ne_ssl_cert_import): Use ne_d2i_uchar as type of second -argument to d2i_x509. - ------------------------------------------------------------------------- -r736 | joe | 2005-10-13 20:01:35 +0100 (Thu, 13 Oct 2005) | 3 lines - -* test/makekeys.sh: Begin octal escapes with \0; use sed to munge -hostname. (based on patch by Mikhail Teterin) - ------------------------------------------------------------------------- -r735 | joe | 2005-10-13 08:18:17 +0100 (Thu, 13 Oct 2005) | 9 lines - -GSSAPI fixes for non-MIT Kerberos implementations, from Mikhail -Teterin: - -* src/ne_auth.c (clean_session): Pass pointer to gssctx to -gss_delete_sec_context. Don't release stored gssmech. -(continue_negotiate): Pass sess->gssmech directly to -gss_init_sec_context. -(free_auth): Pass pointer to stored name to gss_release_name. - ------------------------------------------------------------------------- -r733 | joe | 2005-10-09 14:31:00 +0100 (Sun, 09 Oct 2005) | 3 lines - -* src/: In all files, s/BEGIN_NEON_DECLS/NE_BEGIN_DECLS/g and -s/END_NEON_DECLS/NE_END_DECLS/g. - ------------------------------------------------------------------------- -r732 | joe | 2005-10-09 14:28:03 +0100 (Sun, 09 Oct 2005) | 2 lines - -* src/ne_i18n.h: Use {BEGIN,END}_NEON_DECLS. - ------------------------------------------------------------------------- -r730 | joe | 2005-10-09 09:16:39 +0100 (Sun, 09 Oct 2005) | 3 lines - -* src/ne_private.h (struct ne_session_s): Use 512-byte buffer for -error string. - ------------------------------------------------------------------------- -r729 | joe | 2005-10-09 09:15:49 +0100 (Sun, 09 Oct 2005) | 3 lines - -* src/ne_request.c [!NE_LFS]: Define NE_OFFT_MAX correctly for -platforms with sizeof(off_t) == sizeof(long long). - ------------------------------------------------------------------------- -r726 | joe | 2005-10-06 09:08:36 +0100 (Thu, 06 Oct 2005) | 10 lines - -* src/ne_defs.h (NE_BUFSIZ): Define. - -* src/ne_request.c (struct ne_request_s): Use NE_BUFSIZ for respbuf -size. -(send_request_body): Use NE_BUFSIZ for buffer. -(ne_print_request_header): Use NE_BUFSIZ for stack buffer. - -* src/ne_compress.c (struct ne_decompress_s): Use NE_BUFSIZ for outbuf -size. - ------------------------------------------------------------------------- -r722 | joe | 2005-09-22 02:02:12 +0100 (Thu, 22 Sep 2005) | 3 lines - -* src/ne_xml.c [HAVE_EXPAT]: Fix NEED_BOM_HANDLING for the -!defined(XML_MAJOR_VERSION) case; patch by D.J. Heap. - ------------------------------------------------------------------------- -r721 | joe | 2005-09-22 01:59:37 +0100 (Thu, 22 Sep 2005) | 2 lines - -* config.hw.in (in_addr_t) [!USE_GETADDRINFO]: Define to unsigned int. - ------------------------------------------------------------------------- -r719 | joe | 2005-09-19 20:36:57 +0100 (Mon, 19 Sep 2005) | 2 lines - -* doc/ref/reqopts.xml: Fix parameter type. - ------------------------------------------------------------------------- -r718 | joe | 2005-09-19 10:17:43 +0100 (Mon, 19 Sep 2005) | 2 lines - -* doc/ref/iaddr.xml: Fix function name. - ------------------------------------------------------------------------- -r716 | joe | 2005-09-19 10:14:53 +0100 (Mon, 19 Sep 2005) | 2 lines - -* src/ne_request.h (ne_get_response_header): Fix docco. - ------------------------------------------------------------------------- -r715 | joe | 2005-09-19 10:14:23 +0100 (Mon, 19 Sep 2005) | 2 lines - -* doc/ref/resphdr.xml: Fix typo in element name. - ------------------------------------------------------------------------- -r713 | joe | 2005-09-17 18:07:53 +0100 (Sat, 17 Sep 2005) | 3 lines - -* src/ne_gnutls.c (provide_client_cert): Remove unused variable. -(ne_ssl_cert_write, ne_ssl_cert_read): Fix type of length variables. - ------------------------------------------------------------------------- -r712 | joe | 2005-09-17 14:55:17 +0100 (Sat, 17 Sep 2005) | 4 lines - -* src/ne_gnutls.c (ne_ssl_context_create): Zero-initialize allocated -structure. (provide_client_cert): Fail if no ne_session * pointer is -registered with the socket. - ------------------------------------------------------------------------- -r711 | joe | 2005-09-17 14:44:38 +0100 (Sat, 17 Sep 2005) | 2 lines - -* src/ne_gnutls.c (check_identity): Handle iPAddress subjectAltName. - ------------------------------------------------------------------------- -r710 | joe | 2005-09-17 13:35:43 +0100 (Sat, 17 Sep 2005) | 6 lines - -Hook up basic client cert provision; based on patch by Aleix Conchillo -Flaque: - -* src/ne_gnutls.c (provide_client_cert): New function. -(ne_ssl_context_create): Install client cert provider callback. - ------------------------------------------------------------------------- -r709 | joe | 2005-09-17 13:26:41 +0100 (Sat, 17 Sep 2005) | 9 lines - -* src/ne_privssl.h (struct ne_ssl_context_s) [HAVE_GNUTLS]: Add verify -field. - -* src/ne_socket.c (ne_sock_accept_ssl): If ctx->verify is set, verify -peer certificate. - -* src/ne_gnutls.c (ne_ssl_context_set_verify): Set ctx->verify. -Comment on lack of handling of ca_names argument. - ------------------------------------------------------------------------- -r708 | joe | 2005-09-17 12:38:32 +0100 (Sat, 17 Sep 2005) | 3 lines - -* src/ne_gnutls.c (x509_crt_copy): Fix check for gnutls_x509_crt_init -return value. - ------------------------------------------------------------------------- -r707 | joe | 2005-09-17 12:37:26 +0100 (Sat, 17 Sep 2005) | 4 lines - -* src/ne_gnutls.c (ne_ssl_readable_dname): Switch to new -implementation since fixed GNUTLS is required. -(ne_ssl_dname_cmp): Implement. - ------------------------------------------------------------------------- -r706 | joe | 2005-09-17 12:05:51 +0100 (Sat, 17 Sep 2005) | 2 lines - -* po/: make update-po. - ------------------------------------------------------------------------- -r705 | joe | 2005-09-17 12:05:21 +0100 (Sat, 17 Sep 2005) | 3 lines - -* Makefile.in (XGETTEXT_OPTS): Explicitly mark functions taking format strings. -(update-po): Pass --check-format to msgfmt. - ------------------------------------------------------------------------- -r704 | joe | 2005-09-17 12:02:37 +0100 (Sat, 17 Sep 2005) | 3 lines - -* src/ne_request.c (body_fd_send): Avoid using macro in string passed -to gettext. - ------------------------------------------------------------------------- -r698 | joe | 2005-09-14 22:11:32 +0100 (Wed, 14 Sep 2005) | 4 lines - -* doc/ref/resphdr.xml: New file; document response header handling. - -* doc/manual.xml: Reference it. - ------------------------------------------------------------------------- -r697 | joe | 2005-09-14 21:53:41 +0100 (Wed, 14 Sep 2005) | 3 lines - -* Makefile.in (doc-status): Add hacky target to see what is undocumented... -"for maintainer's use only". - ------------------------------------------------------------------------- -r696 | joe | 2005-09-14 21:47:45 +0100 (Wed, 14 Sep 2005) | 6 lines - -* doc/ref/reqopts.xml: Document ne_set_request_expect100. - -* doc/ref/opts.xml: Remove ne_set_expect100 documentation. - -* doc/manual.xml: Pull in reqopts.xml. - ------------------------------------------------------------------------- -r695 | joe | 2005-09-14 21:40:44 +0100 (Wed, 14 Sep 2005) | 2 lines - -* doc/ref/opts.xml: Update for neon 0.25 API.* doc/ref/opts.xml: Update for neon 0.25 API.* doc/ref/opts.xml: Update for neon 0.25 API.* doc/ref/opts.xml: Update for neon 0.25 API.* doc/ref/opts.xml: Update for neon 0.25 API.* doc/ref/opts.xml: Update for neon 0.25 API.* doc/ref/opts.xml: Update for neon 0.25 API.* doc/ref/opts.xml: Update for neon 0.25 API. - ------------------------------------------------------------------------- -r692 | joe | 2005-08-29 17:31:34 +0100 (Mon, 29 Aug 2005) | 3 lines - -* configure.in, po/it.po: Remove translation which looks too -sitecopy-specific. - ------------------------------------------------------------------------- -r691 | joe | 2005-08-29 17:29:05 +0100 (Mon, 29 Aug 2005) | 10 lines - -* src/ne_i18n.h (ne_i18n_init): Take an encoding parameter. - -* src/ne_i18n.c (ne_i18n_init) [HAVE_BIND_TEXTDOMAIN_CODESET]: Call -bind_textdomain_codeset if encoding is specified. - -* macros/neon.m4 (NEON_I18N): Fix to enable NLS by default. Check for -bind_textdomain_codeset. - -* test/common/tests.c (main): Pass NULL to ne_i18n_init. - ------------------------------------------------------------------------- -r680 | joe | 2005-08-19 10:24:20 +0100 (Fri, 19 Aug 2005) | 32 lines - -Implement support for internationalization of error message: - -* src/Makefile.in (NEON_BASEOBJS): Build ne_i18n.o. - -* src/ne_i18n.c: Include config.h, ne_i18n.h. (ne_i18n_init): Renamed -from neon_i18n_init. - -* src/ne_i18n.h: Remove library-private definition of '_' and 'N_' -macros. - -* src/ne_internal.h: New header; add definitions of _ and N_. - -* src/*.c: Update all sources to include ne_internal.h instead of -ne_i18n.h. - -* po/: New directory. Add message catalog template and translated -message catalogs extracted from sitecopy. - -* macros/neon-test.m4: Check for setlocale and locale.h. - -* test/common/tests.c: Include locale.h, ne_i18n.h. (main): Call -setlocale and ne_i18n_init. - -* test/run.sh: By default disable i18n to allow checks for English -error messages to succeed. - -* .release.sh: Compile the gmo files here. - -* macros/neon.m4 (NEON_I18N): Add macro. - -* configure.in: Use NEON_I18N. Define ALL_LINGUAS. - ------------------------------------------------------------------------- -r679 | joe | 2005-08-19 08:24:32 +0100 (Fri, 19 Aug 2005) | 3 lines - -* src/ne_socket.c (INADDR_NONE): Define using in_addr_t if system is -missing the definition. - ------------------------------------------------------------------------- -r678 | joe | 2005-08-19 08:19:45 +0100 (Fri, 19 Aug 2005) | 7 lines - -* src/ne_socket.c (ne_addr_resolve) [!USE_GETADDRINFO]: Use in_addr_t -not unsigned long for address; fix for LP64 platforms - patch by -Matthew Sanderson. - -* macros/neon.m4 (LIBNEON_SOURCE_CHECKS): Add check for in_addr_t. -Fix check for h_errno declaration. - ------------------------------------------------------------------------- -r671 | joe | 2005-08-14 18:20:23 +0100 (Sun, 14 Aug 2005) | 5 lines - -* src/ne_locks.c (ne_lock, ne_unlock): Don't lose the NE_AUTH etc -return code for non-2xx responses. - -* test/lock.c (fail_lockauth, no_creds): Add test case. - ------------------------------------------------------------------------- -r657 | joe | 2005-07-06 12:08:21 +0100 (Wed, 06 Jul 2005) | 2 lines - -* src/ne_redirect.c (post_send): Code cleanup. - ------------------------------------------------------------------------- -r656 | joe | 2005-07-02 12:20:11 +0100 (Sat, 02 Jul 2005) | 2 lines - -Add Jiang. - ------------------------------------------------------------------------- -r655 | joe | 2005-07-02 12:19:44 +0100 (Sat, 02 Jul 2005) | 2 lines - -* macros/neon.m4 (NE_MACOSX): Disable poll on Darwin. - ------------------------------------------------------------------------- -r654 | joe | 2005-07-02 12:18:37 +0100 (Sat, 02 Jul 2005) | 2 lines - -* test/Makefile.in (VALGRIND): Update to work with modern valgrind. - ------------------------------------------------------------------------- -r651 | joe | 2005-06-30 13:17:33 +0100 (Thu, 30 Jun 2005) | 2 lines - -* configure.in: Disable tests-install mode by default. - ------------------------------------------------------------------------- -r650 | joe | 2005-06-30 13:02:29 +0100 (Thu, 30 Jun 2005) | 2 lines - -* src/ne_xml.c: Omit BOM handling for recent releases of libxml2. - ------------------------------------------------------------------------- -r648 | joe | 2005-06-29 09:54:11 +0100 (Wed, 29 Jun 2005) | 12 lines - -* Makefile.in (install-tests): New target. - -* configure.in: Add --enable-install-tests to support test suite -installation; only add -no-install to TEST_LDFLAGS if not given. - -* test/Makefile.in (install, random.txt): New targets. -(LINK): Use TEST_LDFLAGS. -(ZLIB_HELPERS): Add random.txt. - -* test/compress.c (init): Use random.txt in pwd rather than trying to -find NEWS from the srcdir. - ------------------------------------------------------------------------- -r636 | joe | 2005-06-22 09:21:48 +0100 (Wed, 22 Jun 2005) | 17 lines - -Merge r627, r629, r631 from 0.25.x branch: - -* src/ne_auth.c (ah_post_send): Print auth_hdr safely. -Remove unused SAFELY macro. - -* src/ne_compress.c (process_footer): Don't invoke reader callback -with len=0 here as well when end-of-response is really reached. -(do_inflate): Do pass on the reader callback return value. - -* test/compress.c (reader): Catch multiple invocations with len=0. -(retry_accept): Reset the reader state. -(reader_abort, compress_abort): New functions. - -* src/ne_xml.c (end_element): Use NE_DBG_XML debug channel for -consistency. - - ------------------------------------------------------------------------- -r635 | joe | 2005-06-22 09:14:15 +0100 (Wed, 22 Jun 2005) | 2 lines - -* config.hw.in: Really fix the Win32 build. - ------------------------------------------------------------------------- -r624 | joe | 2005-06-01 10:13:16 +0100 (Wed, 01 Jun 2005) | 3 lines - -* src/ne_openssl.c (ne__negotiate_ssl): Replace the cached session -with the new one if they differ; based on patch by Robert Eiglmaier. - ------------------------------------------------------------------------- -r623 | joe | 2005-06-01 10:10:12 +0100 (Wed, 01 Jun 2005) | 5 lines - -* src/ne_basic.c (ne_get_content_type): Ensure that ->charset is NULL -on exit (Johannes Schneider). - -* test/basic.c (content_type): Test that all fields are set. - ------------------------------------------------------------------------- -r622 | joe | 2005-05-20 01:56:31 +0100 (Fri, 20 May 2005) | 3 lines - -* src/ne_xml.c (start_element): Use NE_DBG_XML debug constant. -(ne_xml_parse): Use NE_DBG_XMLPARSE debug constant. - ------------------------------------------------------------------------- -r621 | joe | 2005-05-20 01:44:36 +0100 (Fri, 20 May 2005) | 2 lines - -* src/ne_xml.c (char_data): Tidy up debug message. - ------------------------------------------------------------------------- -r619 | joe | 2005-05-19 22:06:55 +0100 (Thu, 19 May 2005) | 2 lines - -Updates. - ------------------------------------------------------------------------- -r618 | joe | 2005-05-19 22:04:27 +0100 (Thu, 19 May 2005) | 3 lines - -* src/ne_request.h (ne_hook_post_send): Clarify when the post_send -hook runs. - ------------------------------------------------------------------------- -r616 | joe | 2005-05-14 12:35:50 +0100 (Sat, 14 May 2005) | 2 lines - -Credit Vladimir. - ------------------------------------------------------------------------- -r615 | joe | 2005-05-14 12:35:22 +0100 (Sat, 14 May 2005) | 2 lines - -* src/ne_auth.c: Fix Windows SSPI build. - ------------------------------------------------------------------------- -r614 | joe | 2005-05-12 15:24:53 +0100 (Thu, 12 May 2005) | 3 lines - -* INSTALL.win32: Update to reference 0.9.7g from confirmation from -David Reid. - ------------------------------------------------------------------------- -r613 | joe | 2005-05-11 16:07:05 +0100 (Wed, 11 May 2005) | 3 lines - -* src/ne_string.c (b64_alphabet): Use constant array; eliminate last -sizeof(pointer)'s worth of data section in libneon. - ------------------------------------------------------------------------- -r612 | joe | 2005-05-11 16:01:03 +0100 (Wed, 11 May 2005) | 3 lines - -* src/ne_dates.c (rfc1123_weekdays, short_months): Mark pointers as -const. - ------------------------------------------------------------------------- -r611 | joe | 2005-05-09 15:28:47 +0100 (Mon, 09 May 2005) | 2 lines - -* src/ne_request.h: Fix nonsensical API requirement. - ------------------------------------------------------------------------- -r608 | joe | 2005-05-06 15:25:41 +0100 (Fri, 06 May 2005) | 3 lines - -Fix the feature name, thanks to the report on the evening -news from a Mr Fogel. - ------------------------------------------------------------------------- -r599 | joe | 2005-04-24 19:34:46 +0100 (Sun, 24 Apr 2005) | 4 lines - -* macros/neon.m4 (NE_REQUIRE_VERSIONS): New macro, replacing -NEON_REQUIRE. (NEON_CHECK_VERSION): Just check version against that -reported by 'neon-config --version'; support multiple minor versions. - ------------------------------------------------------------------------- -r593 | joe | 2005-04-24 11:54:55 +0100 (Sun, 24 Apr 2005) | 2 lines - -* neon-config.in: Remove idna support flag. - ------------------------------------------------------------------------- -r592 | joe | 2005-04-24 11:51:15 +0100 (Sun, 24 Apr 2005) | 2 lines - -Synch with 0.25.x branch. - ------------------------------------------------------------------------- -r588 | joe | 2005-04-24 11:06:37 +0100 (Sun, 24 Apr 2005) | 2 lines - -* test/stubs.c [!NE_HAVE_ZLIB] (sd_reader): Fix to match prototype. - ------------------------------------------------------------------------- -r586 | joe | 2005-04-24 09:00:59 +0100 (Sun, 24 Apr 2005) | 3 lines - -* test/request.c (send_bad_offset): Use an empty file and a negative -offset rather than /dev/null. - ------------------------------------------------------------------------- -r585 | joe | 2005-04-24 08:56:46 +0100 (Sun, 24 Apr 2005) | 2 lines - -* macros/neon.m4 (NEON_WARNINGS): Tweak gcc warnings. - ------------------------------------------------------------------------- -r584 | joe | 2005-04-24 08:55:34 +0100 (Sun, 24 Apr 2005) | 2 lines - -* src/Makefile.in (c++.c): Fix to exclude ne_privssl.h too. - ------------------------------------------------------------------------- -r582 | joe | 2005-04-17 22:29:56 +0100 (Sun, 17 Apr 2005) | 2 lines - -* Makefile.in (DIST_HEADERS): Do install ne_xmlreq.h. - ------------------------------------------------------------------------- -r579 | joe | 2005-04-17 21:54:37 +0100 (Sun, 17 Apr 2005) | 2 lines - -* src/ne_stubssl.c (ne_ssl_clicert_name): Match new prototype. - ------------------------------------------------------------------------- -r577 | joe | 2005-04-17 17:05:27 +0100 (Sun, 17 Apr 2005) | 6 lines - -Merge r576 from 0.25.x branch: - -* config.hw.in: Define the correct version macros. - -* .release.sh: Substitute release correctly. - ------------------------------------------------------------------------- -r574 | joe | 2005-04-17 16:43:25 +0100 (Sun, 17 Apr 2005) | 2 lines - -* src/ne_openssl.c (check_identity): Fix typo. - ------------------------------------------------------------------------- -r571 | joe | 2005-04-16 17:24:56 +0100 (Sat, 16 Apr 2005) | 2 lines - -* src/ne_alloc.c (ne_realloc_ml): Fix realloc tracking. - ------------------------------------------------------------------------- -r570 | joe | 2005-04-15 15:33:04 +0100 (Fri, 15 Apr 2005) | 4 lines - -Fix further memory leak found by --enable-memleak: - -* src/ne_openssl.c (check_identity): Destroy buffer on error path. - ------------------------------------------------------------------------- -r569 | joe | 2005-04-15 14:45:32 +0100 (Fri, 15 Apr 2005) | 6 lines - -Fix memory leaks found by --enable-memleak: - -* src/ne_openssl.c (check_identity): Destroy buffer on error path. - -* test/request.c (iterate_many): Destroy temp buffer. - ------------------------------------------------------------------------- -r568 | joe | 2005-04-15 02:23:13 +0100 (Fri, 15 Apr 2005) | 5 lines - -* src/ne_request.c (body_fd_send): Set session error string if seek -fails, per new interface requirement. - -* test/request.c (send_bad_offset): New test. - ------------------------------------------------------------------------- -r567 | joe | 2005-04-15 02:19:34 +0100 (Fri, 15 Apr 2005) | 4 lines - -* src/ne_request.h: Improve general comments. -(ne_request_dispatch, ne_set_request_expect100): Clarify. -(ne_get_session): Mark as const. - ------------------------------------------------------------------------- -r563 | joe | 2005-04-14 20:05:53 +0100 (Thu, 14 Apr 2005) | 2 lines - -* neon-config.in: Fix syntax error. - ------------------------------------------------------------------------- -r562 | joe | 2005-04-14 20:04:50 +0100 (Thu, 14 Apr 2005) | 3 lines - -* Makefile.in (DIST_HEADERS): Don't try to install non-existant -ne_cookies.h. - ------------------------------------------------------------------------- -r560 | joe | 2005-04-14 19:44:56 +0100 (Thu, 14 Apr 2005) | 3 lines - -* test/util-tests.c (versioning): Update for new macros, correct -interface. - ------------------------------------------------------------------------- -r559 | joe | 2005-04-11 14:55:45 +0100 (Mon, 11 Apr 2005) | 4 lines - -* src/ne_ssl.h (ne_ssl_clicert_name): Take const clicert argument. - -* src/ne_openssl.c, src/ne_gnutls.c: Adapt likewise. - ------------------------------------------------------------------------- -r558 | joe | 2005-04-06 09:07:18 +0100 (Wed, 06 Apr 2005) | 5 lines - -* configure.in: Use NE_VERSIONS_BUNDLED. - -* src/ne_utils.c (ne_version_match): Update for new version macros; -make behaviour and docs match reference documentation. - ------------------------------------------------------------------------- -r554 | joe | 2005-04-05 20:22:40 +0100 (Tue, 05 Apr 2005) | 5 lines - -* macros/neon.m4 (NE_DEFINE_VERSIONS): New macro. -(NE_VERSIONS_BUNDLED): Renamed from NEON_VERSIONS; use -NE_DEFINE_VERSIONS. -(NEON_USE_EXTERNAL): Use NE_DEFINE_VERSIONS. - ------------------------------------------------------------------------- -r553 | joe | 2005-04-05 16:02:49 +0100 (Tue, 05 Apr 2005) | 2 lines - -* src/Makefile.in: Add deps for ne_xmlreq.c. - ------------------------------------------------------------------------- -r551 | joe | 2005-04-05 11:19:42 +0100 (Tue, 05 Apr 2005) | 2 lines - -Update. - ------------------------------------------------------------------------- -r550 | joe | 2005-04-05 11:19:16 +0100 (Tue, 05 Apr 2005) | 2 lines - -* src/ne_request.h: Improve comment wording. - ------------------------------------------------------------------------- -r549 | joe | 2005-04-05 00:50:26 +0100 (Tue, 05 Apr 2005) | 2 lines - -Fix typo. - ------------------------------------------------------------------------- -r548 | joe | 2005-04-04 21:01:56 +0100 (Mon, 04 Apr 2005) | 2 lines - -Updates. - ------------------------------------------------------------------------- -r547 | joe | 2005-04-04 20:51:33 +0100 (Mon, 04 Apr 2005) | 3 lines - -* test/uri-tests.c (leak_authinfo): Remove test; API now clarified -such that current implementation is valid. - ------------------------------------------------------------------------- -r546 | joe | 2005-04-04 20:50:36 +0100 (Mon, 04 Apr 2005) | 2 lines - -* src/ne_uri.h (ne_uri_free, ne_uri_parse): Clarify API. - ------------------------------------------------------------------------- -r545 | joe | 2005-04-04 20:40:08 +0100 (Mon, 04 Apr 2005) | 4 lines - -* src/ne_alloc.c, src/ne_alloc.h (ne_oom_callback): Use a typedef for -the callback argument, to fix warnings with OpenWatcom; patch by -Vitali E. Pelenyov. - ------------------------------------------------------------------------- -r544 | joe | 2005-04-04 20:34:26 +0100 (Mon, 04 Apr 2005) | 4 lines - -* src/ne_request.c (add_fixed_headers): Send "close" token in -Connection header if persistent connections are disabled; patch by Tom -Hoefakker. Use ne_buffer_czappend throughout. - ------------------------------------------------------------------------- -r542 | joe | 2005-04-04 18:32:15 +0100 (Mon, 04 Apr 2005) | 6 lines - -* test/xmlreq.c: New file. - -* test/Makefile.in: Build it. - -* test/utils.h: Include child.h. - ------------------------------------------------------------------------- -r541 | joe | 2005-04-04 18:30:50 +0100 (Mon, 04 Apr 2005) | 8 lines - -* src/ne_xmlreq.h (ne_xml_parse_response, ne_xml_dispatch_request): -Specify that session error string is set for XML parse errors. - -* src/ne_xmlreq.c (parse_error): New function. -(ne_xml_parse_response): On successful end-of-response, tell -the the XML parser the end of the document is reached. Use -parse_error() for error handling. - ------------------------------------------------------------------------- -r540 | joe | 2005-04-04 14:49:25 +0100 (Mon, 04 Apr 2005) | 2 lines - -* src/ne_socket.c (ne_service_lookup): Remove function. - ------------------------------------------------------------------------- -r531 | joe | 2005-03-19 22:30:43 +0000 (Sat, 19 Mar 2005) | 2 lines - -* test/request.c: Remove idna_hostname; missed in previous commit. - ------------------------------------------------------------------------- -r530 | joe | 2005-03-19 22:19:37 +0000 (Sat, 19 Mar 2005) | 7 lines - -Avoid use of "read" and "write" since POSIX owns these names and -allows them to be macros. - -* src/ne_socket.c (struct iofns): Rename read and write functions to -sread and swrite. -(ne_sock_read, ne_sock_peek, ne_sock_fullwrite, ne_sock_readline): Synch. - ------------------------------------------------------------------------- -r529 | joe | 2005-03-19 21:24:27 +0000 (Sat, 19 Mar 2005) | 2 lines - -* src/ne_uri.c (uri_paths): Fix URI encoding default. - ------------------------------------------------------------------------- -r518 | joe | 2005-03-05 09:14:59 +0000 (Sat, 05 Mar 2005) | 11 lines - -Remove support for IDNA: IDNA really needs to be done at application -level. - -* macros/neon.m4 (NEON_LIBIDN): Remove. - -* src/ne_session.c (set_hostinfo): Remove IDNA support. - -* src/ne_utils.c, src/ne_utils.h: Don't advertise IDNA feature. - -* test/util-tests.c, test/request.c: Remove IDNA tests. - ------------------------------------------------------------------------- -r517 | joe | 2005-03-03 19:25:11 +0000 (Thu, 03 Mar 2005) | 3 lines - -* src/ne_socket.c (NE_ISRESET): Also treat ENOTCONN as a "connection -reset" error. - ------------------------------------------------------------------------- -r516 | joe | 2005-03-03 19:20:03 +0000 (Thu, 03 Mar 2005) | 3 lines - -* macros/neon-xml-parser.m4 (NEON_XML_PARSER): Default to detect -expat; fall back on libxml2. - ------------------------------------------------------------------------- -r515 | joe | 2005-03-03 19:11:45 +0000 (Thu, 03 Mar 2005) | 3 lines - -* macros/neon.m4 (NEON_SSL): Disable GNU TLS support for the 0.25.0 -release, since it's not complete yet. - ------------------------------------------------------------------------- -r512 | joe | 2005-02-28 14:17:09 +0000 (Mon, 28 Feb 2005) | 2 lines - -Note string type changes. - ------------------------------------------------------------------------- -r511 | joe | 2005-02-28 14:16:24 +0000 (Mon, 28 Feb 2005) | 5 lines - -Missed in previous commit: - -* src/ne_ssl.h (ne_ssl_cert_identity, ne_ssl_cert_name): Define to -return UTF-8 only. - ------------------------------------------------------------------------- -r510 | joe | 2005-02-28 14:15:59 +0000 (Mon, 28 Feb 2005) | 9 lines - -* src/ne_ssl.h (ne_ssl_cert_identity, ne_ssl_cert_name): Define to -return UTF-8 only. - -* src/ne_openssl.c (append_dirstring): Factor out from -ne_ssl_readable_dname. (ne_ssl_readable_dname): Use factored-out -version. (dup_ia5string): New function. -(check_identity): Use append_dirstring to convert commonName -to UTF-8 if necessary; use dup_ia5string. - ------------------------------------------------------------------------- -r509 | joe | 2005-02-28 14:09:02 +0000 (Mon, 28 Feb 2005) | 9 lines - -* src/ne_ssl.h (ne_ssl_cert_identity, ne_ssl_cert_name): Define to -return UTF-8 only. - -* src/ne_openssl.c (append_dirstring): Factor out from -ne_ssl_readable_dname. (ne_ssl_readable_dname): Use factored-out -version. (dup_ia5string): New function. -(check_identity): Use append_dirstring to convert commonName -to UTF-8 if necessary; use dup_ia5string. - ------------------------------------------------------------------------- -r508 | joe | 2005-02-28 11:54:17 +0000 (Mon, 28 Feb 2005) | 2 lines - -* test/xml.c (matches): Test that with-BOM without-prolog also parses. - ------------------------------------------------------------------------- -r507 | joe | 2005-02-28 11:53:39 +0000 (Mon, 28 Feb 2005) | 3 lines - -* src/ne_xml.c (ne_xml_parser_s, ne_xml_parse): Conditionalize BOM -handling to expat <= 1.95.2 and all current versions of libxml2. - ------------------------------------------------------------------------- -r506 | joe | 2005-02-28 11:07:11 +0000 (Mon, 28 Feb 2005) | 2 lines - -* test/compress.c: Fix signedness warning. - ------------------------------------------------------------------------- -r505 | joe | 2005-02-28 11:03:42 +0000 (Mon, 28 Feb 2005) | 3 lines - -* test/socket.c (addr_compare): Fix to pass real raw addresses and -fixed signedness warnings. - ------------------------------------------------------------------------- -r504 | joe | 2005-02-28 10:54:28 +0000 (Mon, 28 Feb 2005) | 2 lines - -Add ne_get_content_type change and reshuffle. - ------------------------------------------------------------------------- -r503 | joe | 2005-02-28 10:52:09 +0000 (Mon, 28 Feb 2005) | 3 lines - -* src/ne_basic.h (ne_get_content_type): Clarify that all fields will -be non-NULL on success. - ------------------------------------------------------------------------- -r502 | joe | 2005-02-26 19:57:19 +0000 (Sat, 26 Feb 2005) | 2 lines - -Note provider-callback error handling API change; fixed bug. - ------------------------------------------------------------------------- -r501 | joe | 2005-02-26 19:56:24 +0000 (Sat, 26 Feb 2005) | 14 lines - - -* src/ne_private.h (ne__pull_request_body): Remove prototype. - -* src/ne_request.h: Require that request-body-provider callback sets -the session error string if returning errors. - -* src/ne_request.c (struct ne_request_s): Remove body_progress field. -(send_request_body): Combine old ne__pull_request_body, -send_request_body and send_with_progress functions into one. Fix -error handling confusion between provider errors and socket errors; -move NE_RETRY handling here and take a retry flag. (send_request): -Update to pass retry flag to send_request_body and remove NE_RETRY -handling on errors from same. - ------------------------------------------------------------------------- -r500 | joe | 2005-02-26 19:24:49 +0000 (Sat, 26 Feb 2005) | 1 line - -Ignore ChangeLog ------------------------------------------------------------------------- -r499 | joe | 2005-02-26 19:23:52 +0000 (Sat, 26 Feb 2005) | 3 lines - -ne_lock_refresh does now DTRT, and D.J.'s cunningly borked proxy -should now be handled. - ------------------------------------------------------------------------- -r498 | joe | 2005-02-26 19:22:31 +0000 (Sat, 26 Feb 2005) | 6 lines - -* src/ne_request.h: Remove EOL definition, namespace violation. - -* test/stubs.c, test/lock.c, test/auth.c, src/ne_request.c, -src/ne_request.h, src/ne_props.c, src/ne_acl.c, src/ne_locks.c: Define -EOL. - ------------------------------------------------------------------------- -r497 | joe | 2005-02-26 19:16:14 +0000 (Sat, 26 Feb 2005) | 3 lines - -* src/ne_locks.c (ne_lock_refresh): Always update timeout of passed-in -lock structure, even if new timeout is unknown. - ------------------------------------------------------------------------- -r496 | joe | 2005-02-26 19:10:19 +0000 (Sat, 26 Feb 2005) | 2 lines - -ne_uri_escape escaping rules updated. - ------------------------------------------------------------------------- -r495 | joe | 2005-02-26 19:09:52 +0000 (Sat, 26 Feb 2005) | 2 lines - -* src/ne_uri.h (ne_path_escape): Fix grammar. - ------------------------------------------------------------------------- -r494 | joe | 2005-02-26 19:02:53 +0000 (Sat, 26 Feb 2005) | 4 lines - -* ChangeLog.CVS: Renamed from ChangeLog. - -* Makefile.in (ChangeLog): New target. - ------------------------------------------------------------------------- -r493 | joe | 2005-02-26 18:58:46 +0000 (Sat, 26 Feb 2005) | 2 lines - -* macros/neon.m4 (NE_SNPRINTF): Use new trio URL. - ------------------------------------------------------------------------- -r492 | joe | 2005-02-26 18:57:32 +0000 (Sat, 26 Feb 2005) | 3 lines - -* src/ne_socket.c (init_ssl): Call OpenSSL_add_all_algorithms instead -of the specific PKCS12_PBE_add. - ------------------------------------------------------------------------- -r488 | joe | 2005-02-24 14:42:09 +0000 (Thu, 24 Feb 2005) | 4 lines - -* src/ne_auth.c (clean_session, make_gss_error, free_auth): Fixed -signdness mismatch warnings from GSSAPI code; always use unsigned -integers for error codes. - ------------------------------------------------------------------------- -r483 | joe | 2005-02-24 14:05:44 +0000 (Thu, 24 Feb 2005) | 2 lines - -* macros/neon.m4 (NEON_FORMAT): Support type arguments with spaces. - ------------------------------------------------------------------------- -r481 | joe | 2005-02-14 16:07:35 +0000 (Mon, 14 Feb 2005) | 3 lines - -* configure.in: Just AC_DEFINE NEON_IS_LIBRARY; update copyright -notice; be less noisy. - ------------------------------------------------------------------------- -r480 | joe | 2005-02-14 16:02:58 +0000 (Mon, 14 Feb 2005) | 2 lines - -* Makefile.in (clean, subdirs, check): Be less noisy. - ------------------------------------------------------------------------- -r479 | joe | 2005-02-14 15:43:27 +0000 (Mon, 14 Feb 2005) | 10 lines - -* common/tests.c (W): Suppress glibc warn_unused_result annoyance. -(W_RED): New macro. (child_segv): Use W_RED; do dump core. -(parent_segv): Rename from segv; don't call async-signal-unsafe -fflush(); use W_RED; sleep after kill(); -(in_child, main): Install signal handlers for SIGABRT as well -as SIGSEGV. - -* common/child.c (server_child, spawn_server_repeat): Suppress glibc -warn_unused_result annoyance; abort if write() fails. - ------------------------------------------------------------------------- -r477 | joe | 2005-02-11 13:15:22 +0000 (Fri, 11 Feb 2005) | 2 lines - -* neon-config.in (--libs): Don't print -L$libdir if $prefix==/usr. - ------------------------------------------------------------------------- -r464 | joe | 2005-01-27 22:27:26 +0000 (Thu, 27 Jan 2005) | 3 lines - -* test/uri-tests.c (leak_authinfo): Add expected-leaky test for -ne_uri_parse leak. - ------------------------------------------------------------------------- -r463 | joe | 2005-01-27 22:13:10 +0000 (Thu, 27 Jan 2005) | 3 lines - -* src/ne_auth.c: Only include ne_private.h for GSSAPI code. -(digest_body): Remove function. - ------------------------------------------------------------------------- -r462 | joe | 2005-01-27 22:04:44 +0000 (Thu, 27 Jan 2005) | 7 lines - -* src/ne_auth.c: Drop qop=auth-int support, sice it is universally -unimplemented by servers and comes with too much baggage. (struct -auth_challenge): Drop qop_auth_int field. (digest_challenge, -request_digest, verify_digest_response, auth_challenge, ah_pre_send): -Drop qop=auth-int support. -(auth_body_reader): Remove function. - ------------------------------------------------------------------------- -r461 | joe | 2005-01-27 21:56:19 +0000 (Thu, 27 Jan 2005) | 2 lines - -* src/ne_locks.c (ne_lock): Use ne_xml_dispatch_request. - ------------------------------------------------------------------------- -r460 | joe | 2005-01-27 21:50:32 +0000 (Thu, 27 Jan 2005) | 1 line - -News updates. ------------------------------------------------------------------------- -r459 | joe | 2005-01-27 20:05:25 +0000 (Thu, 27 Jan 2005) | 2 lines - -* neon.mak: Conditionally enable SSPI support (Vladimir). - ------------------------------------------------------------------------- -r458 | joe | 2005-01-27 20:04:39 +0000 (Thu, 27 Jan 2005) | 2 lines - -* test/cookies.c: Remove file. - ------------------------------------------------------------------------- -r457 | joe | 2005-01-27 20:03:53 +0000 (Thu, 27 Jan 2005) | 11 lines - -Fix SSPI code so that it compiles for Win32 (Vladimir): - -* src/ne_sspi.h (ne_sspi_deinit): fixed return type. - -* src/ne_sspi.c: Added preprocessor check HAVE_SSPI to allow compilation -without SSPI. -(getMaxTokenSize): removed const qualifier for package parameter because -it has to be passed to a function that takes a not const reference. -(ne_sspi_init, ne_sspi_deinit): Match the function names to the correct -functions. - ------------------------------------------------------------------------- -r456 | joe | 2005-01-27 20:01:48 +0000 (Thu, 27 Jan 2005) | 2 lines - -* neon.mak: Don't build ne_cookies.c (Vladimir). - ------------------------------------------------------------------------- -r450 | joe | 2005-01-26 16:22:26 +0000 (Wed, 26 Jan 2005) | 2 lines - -* src/ne_session.h (ne_set_persist): Clarify lifetime of addrs array. - ------------------------------------------------------------------------- -r449 | joe | 2005-01-26 14:36:02 +0000 (Wed, 26 Jan 2005) | 7 lines - -* src/ne_uri.h (ne_path_escape): Define to percent-encode any -characters barring unreserved and forward-slash. - -* src/ne_uri.c (uri_chars): Update to use RF3986 grammar productions. -(path_escape_ch): Replaces ESCAPE. (ne_path_escape): Clean up, use -new path_escape_ch. - ------------------------------------------------------------------------- -r448 | joe | 2005-01-26 09:23:36 +0000 (Wed, 26 Jan 2005) | 2 lines - -* src/ne_auth.c (get_gss_name): Remove redundant buffer initilization. - ------------------------------------------------------------------------- -r446 | joe | 2005-01-22 00:00:54 +0000 (Sat, 22 Jan 2005) | 4 lines - -* src/ne_request.c (read_message_header, read_response_headers): -Clarify that both functions guarantee to close the connection on -error. - ------------------------------------------------------------------------- -r445 | joe | 2005-01-21 23:54:36 +0000 (Fri, 21 Jan 2005) | 3 lines - -* test/request.c (fail_on_invalid): Test for chunk size overflow and -EOF-at-chunk-size cases. - ------------------------------------------------------------------------- -r444 | joe | 2005-01-21 23:47:55 +0000 (Fri, 21 Jan 2005) | 3 lines - -* test/request.c (fail_on_invalid): Rename from fail_corrupt_chunks; -test for invalid C-L in response. - ------------------------------------------------------------------------- -r443 | joe | 2005-01-21 23:41:42 +0000 (Fri, 21 Jan 2005) | 4 lines - -* src/ne_request.c (ne_begin_request): Reorder message-length logic to -avoid doing unnecessary work. Fail rather than ignore an invalid -Content-Length response header. - ------------------------------------------------------------------------- -r442 | joe | 2005-01-21 23:38:57 +0000 (Fri, 21 Jan 2005) | 3 lines - -* Makefile.in (cover): Remove all .*da files before running coverage -testing to avoid gcda merge errors. - ------------------------------------------------------------------------- -r441 | joe | 2005-01-21 17:41:00 +0000 (Fri, 21 Jan 2005) | 1 line - -Tweak comment. ------------------------------------------------------------------------- -r440 | joe | 2005-01-21 17:28:19 +0000 (Fri, 21 Jan 2005) | 3 lines - -* src/ne_request.h (ne_get_response_header, -ne_response_header_iterate): Clarify API guarantees. - ------------------------------------------------------------------------- -r439 | joe | 2005-01-21 17:23:06 +0000 (Fri, 21 Jan 2005) | 7 lines - -Add a response-header iterator interface, needed by OpenOffice: - -* src/ne_request.c (struct ne_request_s): Add current_index field. -(ne_response_header_iterate): New function. - -* test/request.c (iterate_many, iterate_none): New tests. - ------------------------------------------------------------------------- -r438 | joe | 2005-01-21 16:28:52 +0000 (Fri, 21 Jan 2005) | 2 lines - -* src/ne_request.c (struct field): Remove unused valloc field. - ------------------------------------------------------------------------- -r437 | joe | 2005-01-21 16:25:12 +0000 (Fri, 21 Jan 2005) | 5 lines - -* src/ne_request.c (ne_begin_request): Fix a case where NE_RETRY could -be leaked to the caller if a connection was left open then -ne_set_persist(sess, 0) was called immediately before a request was -sent but suffered a persistent connection timeout. - ------------------------------------------------------------------------- -r436 | joe | 2005-01-21 16:19:05 +0000 (Fri, 21 Jan 2005) | 5 lines - -* src/ne_request.c (HTTP_ERR, HTTP_EXPECT_*): Remove now-unused -macros. (ne_begin_request, ne_end_request, ne_request_dispatch): -Expand HTTP_ERR usage. - - ------------------------------------------------------------------------- -r435 | joe | 2005-01-21 16:08:53 +0000 (Fri, 21 Jan 2005) | 3 lines - -* test/compress.c (tests): retry_notcompress passes since -response-header-handling fixes. - ------------------------------------------------------------------------- -r434 | joe | 2005-01-21 16:07:05 +0000 (Fri, 21 Jan 2005) | 3 lines - -* src/ne_request.c (send_request): Code cleanups, no functional -change. - ------------------------------------------------------------------------- -r433 | joe | 2005-01-21 16:03:28 +0000 (Fri, 21 Jan 2005) | 2 lines - -* src/ne_request.c (ne_request_create): Remove some debugging noise. - ------------------------------------------------------------------------- -r432 | joe | 2005-01-21 15:59:37 +0000 (Fri, 21 Jan 2005) | 3 lines - -* src/ne_request.c (open_connection): Only call ne_close_connection in -ne__negotiate_ssl failure case. - ------------------------------------------------------------------------- -r431 | joe | 2005-01-21 15:54:26 +0000 (Fri, 21 Jan 2005) | 2 lines - -* neon.mak: Build ne_xmlreq.c. - ------------------------------------------------------------------------- -r430 | joe | 2005-01-20 22:04:23 +0000 (Thu, 20 Jan 2005) | 15 lines - -Windows SSPI NTLM/Negotiate implementation from Vladimir Berezniker: - -* config.hw.in: Define HAVE_SSPI. - -* src/ne_sspi.c, src/ne_sspi.h: New files. - -* src/ne_auth.c (auth_scheme): Add new schemes to enum. -[HAVE_SSPI] (auth_session): Add sspi_token, sspi_context fields. -(clean_session): Clean up sspi fields. -(request_sspi, sspi_challenge): New functions. -(auth_challenge, ah_pre_send): Handle Negotiate/NTLM-using-SSPI schemes. - -* src/ne_socket.c [HAVE_SSPI] (ne_sock_init, ne_sock_exit): -Initialize/de-initialize SSPI global state. - ------------------------------------------------------------------------- -r429 | joe | 2005-01-13 19:00:13 +0000 (Thu, 13 Jan 2005) | 2 lines - -Reorganise. - ------------------------------------------------------------------------- -r428 | joe | 2005-01-13 18:53:33 +0000 (Thu, 13 Jan 2005) | 6 lines - -Re-drop ne_cookies.[ch], change lost in CVS conversion somehow: - - * ne_cookies.c, ne_cookies.h: Drop cookies support: used old spec - revision and wasn't very complete anyway. - - ------------------------------------------------------------------------- -r427 | joe | 2005-01-13 18:51:53 +0000 (Thu, 13 Jan 2005) | 2 lines - -* test/string-tests.c (append): Test ne_buffer_czappend. - ------------------------------------------------------------------------- -r426 | joe | 2005-01-13 18:44:00 +0000 (Thu, 13 Jan 2005) | 7 lines - -Fixes for some warnings from Solaris cc: - -* src/ne_openssl.c (ne_ssl_clicert_read): Pass an int not an unsigned -int to X509_alias_get0. -(ne_ssl_cert_export): Use a char * for the ne_base64 return value to fix -signed-vs-unsigned mismatch. - ------------------------------------------------------------------------- -r425 | joe | 2005-01-09 13:45:09 +0000 (Sun, 09 Jan 2005) | 2 lines - -* src/ne_string.h (ne_buffer_czappend): New macro. - ------------------------------------------------------------------------- -r424 | joe | 2005-01-09 13:06:22 +0000 (Sun, 09 Jan 2005) | 3 lines - -* src/ne_request.c (free_response_headers): Adjust code style, no -functional change. - ------------------------------------------------------------------------- -r414 | joe | 2005-01-07 15:12:17 +0000 (Fri, 07 Jan 2005) | 6 lines - -* src/ne_locks.c (lk_startelm): Set timeout of active lock to -NE_TIMEOUT_INVALID. (ne_lock_free, ne_lock): Out-of-line NE_FREE. -(ne_lock_refresh): Use ne_xml_dispatch_request; rejig error handling; -really update timeout field of passed-in lock structure if returned -by server. - ------------------------------------------------------------------------- -r413 | joe | 2005-01-07 00:55:42 +0000 (Fri, 07 Jan 2005) | 4 lines - -* src/ne_locks.c (lk_startelm): Only retrive lock-token if not already -known; set session error on abort. -(ne_lock_refresh): Store lock-token in context, simplify error handling. - ------------------------------------------------------------------------- -r389 | joe | 2005-01-03 10:01:20 +0000 (Mon, 03 Jan 2005) | 3 lines - -* macros/neon.m4 (LIBNEON_SOURCE_CHECKS): Only look for gethostbyname -if getaddrinfo is not available. - ------------------------------------------------------------------------- -r382 | joe | 2005-01-02 13:18:23 +0000 (Sun, 02 Jan 2005) | 4 lines - -* macros/neon-xml-parser.m4 (NEON_XML_PARSER, NE_XML_BUNDLED_EXPAT): -Take srcdir, builddir arguments to support VPATH builds correctly. - - ------------------------------------------------------------------------- -r373 | joe | 2004-12-31 17:55:39 +0000 (Fri, 31 Dec 2004) | 4 lines - -* src/ne_request.c (read_response_block): Read chunk size lines into -req->respbuf to eliminate the "minimum buffer size" requirement of -ne_read_response_block. - ------------------------------------------------------------------------- -r372 | joe | 2004-12-31 12:13:22 +0000 (Fri, 31 Dec 2004) | 3 lines - -* test/common/tests.h (ONCMP): Fix inverted expected/actual in failure -case. - ------------------------------------------------------------------------- -r371 | joe | 2004-12-31 12:12:29 +0000 (Fri, 31 Dec 2004) | 7 lines - -* src/ne_request.c (free_response_headers): Factor out from -ne_request_destroy. (ne_request_destroy): Use it. -(ne_begin_request): Free response headers each time the response -is read. - -* test/request.c (retry_post_send, reset_headers): New functions. - ------------------------------------------------------------------------- -r370 | joe | 2004-12-31 11:19:57 +0000 (Fri, 31 Dec 2004) | 3 lines - -* src/ne_redirect.c (post_send): C89 compile fix from Vladimir -Berezniker. - ------------------------------------------------------------------------- -r369 | joe | 2004-12-31 01:36:29 +0000 (Fri, 31 Dec 2004) | 1 line - -Docco fix. ------------------------------------------------------------------------- -r368 | joe | 2004-12-31 01:11:23 +0000 (Fri, 31 Dec 2004) | 8 lines - -* src/ne_auth.c (tokenize): Optionally pass back the separator -character to fix the Negotiate parameter handling. -(auth_challenge): Only grab a Negotiate parameter if the separator -was a space. - -* test/auth.c (basic): Test for a Negotiate challenge *without* a -parameter. - ------------------------------------------------------------------------- -r367 | joe | 2004-12-30 11:55:13 +0000 (Thu, 30 Dec 2004) | 63 lines - -Remove callback-based response header handling in favour of -ne_get_response_header interface: - -* src/ne_request.h (ne_get_response_header): New function, replacing -ne_add_response_header_handler and ne_add_response_header_catcher. -* src/ne_request.c (struct header_handler): Remove. -(struct field): Add. -(struct ne_request_s): Store a hash of header fields rather than -a hash of callbacks. -(te_hdr_handler, connection_hdr_handler, clength_hdr_handler, -ne_add_response_header_catcher, ne_add_response_header_handler, -ne_duplicate_header, ne_handle_numeric_header): -Remove functions. -(get_response_header_hv, ne_get_response_header, -add_response_header, remove_response_header): New functions. -(ne_request_create): Don't register the callbacks. -(read_response_headers): Call add_response_header for each -field. -(ne_begin_request): Move handling of Connection, T-E and C-L headers -here. Comply with 2616/14.10 w.r.t. Connection header handling in -HTTP/1.0 responses. -(ne_request_dispatch): Use ne_discard_response (unrelated). - -* src/ne_redirect.c (struct redirect): Remove location field. -(post_send): Adjust to retrieve location header here. - -* src/ne_basic.h (ne_get_content_type): Replaces -ne_content_type_handler. - -* src/ne_basic.c (dispatch_to_fd): New function. -(get_to_fd, get_lastmodified, clength_hdr_handler, accept_206, -content_range_hdr_handler): Remove functions. -(ne_getmodtime): Adjust to use ne_get_response_header. -(ne_get_range, ne_get, ne_post): Adjust to use dispatch_to_fd. -(ne_get_content_type): Adjust for new API, use ne_get_response_header. -(parse_dav_header, ne_options): Adjust to use ne_get_response_header. - -* src/ne_compress.c (struct ne_decompress_s): Add ne_request * field, -remove enchdr field. -(gz_reader): Retrieve C-E header on demand, here. -(ne_decompress_reader, ne_decompress_destroy): Remove C-E response -header duplication. - -* src/ne_auth.c (auth_request): Remove auth_hdr, auth_info_hdr -fields. -(ah_collect_header): Remove function. -(ah_create, ah_destroy): Remove response-header callback handling. -(ah_post_send): Retrieve -Authenticate header here; correctly handle -the broken proxy which sends a 401 in response to CONNECT. - -* src/ne_locks.c (lk_startelm): Retrieve Lock-Token header here. -(get_ltoken_hdr): Remove function. -(ne_lock, ne_lock_refresh): Remove response-header handling. - -* test/basic.c (content_type): Test new interface. - -* test/request.c (expect_header_value): Adjust to accept NULL value, -use ne_get_response_header interface. -(multi_header): Test new ne_get_response_header multi-header handling. -(multi_header2, strip_http10_connhdr, strip_http10_connhdr2): New -tests. - - ------------------------------------------------------------------------- -r366 | joe | 2004-12-30 11:38:37 +0000 (Thu, 30 Dec 2004) | 2 lines - -* src/ne_compress.c: Debugging message tweaks. - ------------------------------------------------------------------------- -r365 | joe | 2004-12-30 10:58:08 +0000 (Thu, 30 Dec 2004) | 2 lines - -* test/socket.c (peek_expect): Add buffer overflow detection. - ------------------------------------------------------------------------- -r364 | joe | 2004-12-30 10:51:17 +0000 (Thu, 30 Dec 2004) | 2 lines - -* test/common/tests.c (main): Fix build for non-NEON_MEMLEAK. - ------------------------------------------------------------------------- -r363 | joe | 2004-12-30 10:50:20 +0000 (Thu, 30 Dec 2004) | 3 lines - -* test/common/tests.c (main): Print a message for tests which are -marked as T_XLEAKY. - ------------------------------------------------------------------------- -r362 | joe | 2004-12-30 10:23:00 +0000 (Thu, 30 Dec 2004) | 3 lines - -* test/utils.c (any_2xx_request): Destroy the request object even if -failing. - ------------------------------------------------------------------------- -r361 | joe | 2004-12-30 00:11:53 +0000 (Thu, 30 Dec 2004) | 5 lines - -* src/ne_xmlreq.c (ne_xml_parse_response, ne_xml_dispatch_request): -New file, new functions. - -* src/Makefile.in (NEON_DAVOBJS): Add ne_xmlreq.*o. - ------------------------------------------------------------------------- -r360 | joe | 2004-12-24 14:49:02 +0000 (Fri, 24 Dec 2004) | 3 lines - -* src/ne_request.c (ne_read_response_to_fd, ne_discard_response): New -functions. - ------------------------------------------------------------------------- -r359 | joe | 2004-12-13 14:13:27 +0000 (Mon, 13 Dec 2004) | 6 lines - -* src/ne_auth.c (auth_challenge): Fix previous commit; stop parsing if -ne_token() reaches end-of-string. - -* test/auth.c (negotiate_regress): Add test. - - ------------------------------------------------------------------------- -r358 | joe | 2004-12-09 22:22:26 +0000 (Thu, 09 Dec 2004) | 3 lines - -* src/ne_auth.c (auth_challenge): Grab the Negotiate parameter -properly. - ------------------------------------------------------------------------- -r357 | joe | 2004-12-01 08:42:49 +0000 (Wed, 01 Dec 2004) | 11 lines - -From Vladimir Berezniker: update Win32 make file to match the -preprocessor definition changes applied to source code in r256: - -* neon.mak: - OpenSSL: Change NEON_SSL to NE_HAVE_SSL and add a missing HAVE_OPENSSL. - ZLib: Change NEON_ZLIB to NE_HAVE_ZLIB. - Expat: Replace NEON_NODAV with NE_HAVE_DAV - -* config.hw.in: Discard no longer used USE_DAV_LOCKS. - - ------------------------------------------------------------------------- -r356 | joe | 2004-11-18 10:09:07 +0000 (Thu, 18 Nov 2004) | 11 lines - -Win32 build update from Branko Čibej: - -Change the Win32 build to compile ZLib from sources, and change the -ZLib versin requirement. This doesn't change neon.mak's external -interface. - -* neon.mak: Add parameters and targets for building ZLib from source. - -* INSTALL.win32: Update the documentation, and note that the ZLib version - must be at least 1.2.1. - ------------------------------------------------------------------------- -r355 | joe | 2004-11-18 09:50:27 +0000 (Thu, 18 Nov 2004) | 5 lines - -Win32 build fix from Vladimir Berezniker: - -* src/ne_dates.c: Add windows.h to the list of include files to provide -definition of TIME_ZONE_INFORMATION on WIN32 platforms. - ------------------------------------------------------------------------- -r354 | joe | 2004-11-15 14:47:52 +0000 (Mon, 15 Nov 2004) | 7 lines - -Improve OpenSSL error handling, fixing "SSL error: (null)" errors from -interrupted Subversion checkouts over SSL; now reported as -"Interrupted system call" as expected: - -* src/ne_socket.c (error_ossl): Always check the OpenSSL error stack -for SSL errors other than SSL_ERROR_ZERO_RETURN. - ------------------------------------------------------------------------- -r353 | joe | 2004-11-11 14:38:49 +0000 (Thu, 11 Nov 2004) | 3 lines - -* test/socket.c (begin) [SOCKET_SSL]: Update to pass third argument to -ne_sock_connect_ssl. - ------------------------------------------------------------------------- -r352 | joe | 2004-10-31 22:33:28 +0000 (Sun, 31 Oct 2004) | 2 lines - -* macros/neon.m4 (NEON_SSL): Require GNU TLS 1.0.22 or later. - ------------------------------------------------------------------------- -r351 | joe | 2004-10-31 19:17:00 +0000 (Sun, 31 Oct 2004) | 3 lines - -* src/ne_openssl.c (ne__negotiate_ssl): Set freechain to fix -certificate chain leak for an SSLv2 connection. - ------------------------------------------------------------------------- -r350 | joe | 2004-10-31 19:14:47 +0000 (Sun, 31 Oct 2004) | 1 line - -Doc fix. ------------------------------------------------------------------------- -r349 | joe | 2004-10-31 19:13:43 +0000 (Sun, 31 Oct 2004) | 11 lines - -* src/ne_socket.c (ne_sock_connect_ssl): Take a userdata parameter; -attach this as OpenSSL "app data" pointer and GNU TLS "session -pointer". - -* src/ne_openssl.c (provide_client_cert): Adapt to use right app data -pointer. (ne__negotiate_ssl): Pass session pointer to -ne_sock_connect_ssl. - -* src/ne_gnutls.c (ne__negotiate_ssl): Pass session pointer to -ne_sock_connect_ssl. - ------------------------------------------------------------------------- -r348 | joe | 2004-10-31 18:44:31 +0000 (Sun, 31 Oct 2004) | 3 lines - -* Makefile.in (uncover, cover): Remove all .*da files before -re-running coverage testing. - ------------------------------------------------------------------------- -r347 | joe | 2004-10-31 18:43:41 +0000 (Sun, 31 Oct 2004) | 8 lines - -Improve ne_socket.c coverage: - -* test/socket.c (addr_make_v4, addr_make_v6): Test ne_iaddr_typeof. -(addr_compare): Fix ne_iaddr_cmp tests with v6 addresses. -(expect_close, expect_read): Fix error messages. (fullread_expect, -line_overflow, line_long_chunked, expect_block_timeout, blocking, -block_timeout): New functions. - ------------------------------------------------------------------------- -r346 | joe | 2004-10-31 15:03:54 +0000 (Sun, 31 Oct 2004) | 1 line - -Doc fix. ------------------------------------------------------------------------- -r345 | joe | 2004-10-31 12:15:55 +0000 (Sun, 31 Oct 2004) | 7 lines - -* src/ne_compress.c (struct ne_decompress_s): Stop using a union to -decode the gzip header; rename in.buf to header, incount to hdrcount. -(HDR_ID1, HDR_ID2, HDR_CMETH, HDR_FLAGS, HDR_MTIME, HDR_XFLAGS, -HDR_OS): New macros. -(parse_header): Decode the header in-place using new macros. -(gz_reader): Adjust for new field names. - ------------------------------------------------------------------------- -r344 | joe | 2004-10-31 12:01:06 +0000 (Sun, 31 Oct 2004) | 2 lines - -* test/compress.c (do_fetch): Do call ne_decompress_destroy still. - ------------------------------------------------------------------------- -r343 | joe | 2004-10-31 11:53:35 +0000 (Sun, 31 Oct 2004) | 7 lines - -* Makefile.in (uncover): New target. -(cover): Adapt for modern gcc. - -* src/Makefile.in (clean): Clean more. - -* test/Makefile.in (clean): Clean more. - ------------------------------------------------------------------------- -r342 | joe | 2004-10-30 12:54:26 +0100 (Sat, 30 Oct 2004) | 3 lines - -* src/ne_utils.c (ne_has_support): Avoid a leading 'return 1' without -a case statement when *no* features are supported. - ------------------------------------------------------------------------- -r339 | joe | 2004-10-30 12:41:53 +0100 (Sat, 30 Oct 2004) | 5 lines - -* src/ne_compress.c (ne_decompress_reader) [!HAVE_ZLIB]: Update -for new interface. - -* test/stubs.c (stub_decompress): Update for new interface. - ------------------------------------------------------------------------- -r337 | joe | 2004-10-25 21:17:32 +0100 (Mon, 25 Oct 2004) | 4 lines - -Missed in previous commit: - -* test/Makefile.in (ZLIB_HELPERS, empty.gz): New helper targets. - ------------------------------------------------------------------------- -r336 | joe | 2004-10-25 21:12:16 +0100 (Mon, 25 Oct 2004) | 15 lines - -Update ne_decompress interface to handle errors by aborting the -response rather than returning errors via ne_decompress_destroy. - -* src/ne_compress.c (struct ne_decompress_s): Remove NE_Z_ERROR state. -(parse_header, do_inflate): Don't set error state. -(gz_reader): Do truncated response handling properly at -end-of-response. Don't set state to NE_Z_ERROR on error cases, just -return failure and abort the response. -(ne_decompress_destroy): Return void, do no error handling here. - -* test/compress.c (reader): Abort on failure. -(do_fetch): Handle errors returned via ne_request_dispatch rather -than ne_decompress_destroy. -(fail_trailing_1b, fail_empty, notcomp_empty): New tests. - ------------------------------------------------------------------------- -r335 | joe | 2004-10-25 20:34:34 +0100 (Mon, 25 Oct 2004) | 2 lines - -* test/ssl.c (cert_identities): Check the simplest case first. - ------------------------------------------------------------------------- -r334 | joe | 2004-10-25 20:11:55 +0100 (Mon, 25 Oct 2004) | 5 lines - -* src/ne_gnutls.c (ne_ssl_context_trustcert): Fix for GNU TLS 1.0 -(Aleix). -(check_certificate): Less debugging noise -(ne__negotiate_ssl): Remove unused variable, tweak debug message. - ------------------------------------------------------------------------- -r333 | joe | 2004-10-25 10:44:33 +0100 (Mon, 25 Oct 2004) | 3 lines - -* src/ne_gnutls.c (check_identity): Fix handling of multiple names in -the subjectAltName extension (per the two_subject_altname2 test). - ------------------------------------------------------------------------- -r332 | joe | 2004-10-24 21:10:29 +0100 (Sun, 24 Oct 2004) | 1 line - -Note that expect100 is now sensible, and that ne_lock_refresh is not. ------------------------------------------------------------------------- -r331 | joe | 2004-10-24 18:44:49 +0100 (Sun, 24 Oct 2004) | 4 lines - -* src/ne_gnutls.c (check_identity): Return -1 if no CN field found. -(make_peers_chain, check_certificates): New function. -(ne__negotiate_ssl): Retrieve and verify the peer certificate chain. - ------------------------------------------------------------------------- -r330 | joe | 2004-10-24 16:50:33 +0100 (Sun, 24 Oct 2004) | 7 lines - -* src/ne_gnutls.c (ne__negotiate_ssl): Mark pointers as const, prepare for -doing cert verification. -(ne_ssl_context_trustcert): Implement. -(pkcs12_parse): Don't try and determine encryptedness here. -(ne_ssl_clicert_read): Verify the MAC using an empty password. -(ne_ssl_clicert_decrypt): Verify the MAC using the given password. - ------------------------------------------------------------------------- -r329 | joe | 2004-10-24 15:46:32 +0100 (Sun, 24 Oct 2004) | 2 lines - -* src/ne_gnutls.c (pkcs12_parse): Fix GCC warnings from unhandled enum fields. - ------------------------------------------------------------------------- -r328 | joe | 2004-10-24 13:55:14 +0100 (Sun, 24 Oct 2004) | 9 lines - -Based on patch from Aleix Conchillo Flaque: - -* src/ne_gnutls.c (ne_ssl_clicert_free): Conditionally free the pkey, -subject fields. -(x509_crt_copy): New function. -(dup_client_cert): Fix memory handling. -(pkcs12_parse): Take pointers to pkey, crt, name. -(ne_ssl_clicert_read, ne_ssl_clicert_decrypt): Adjust accordingly. - ------------------------------------------------------------------------- -r327 | joe | 2004-10-22 09:41:46 +0100 (Fri, 22 Oct 2004) | 6 lines - -From Aleix Conchillo Flaque: - -* src/ne_gnutls.c (ne_ssl_context_trustcert): Implement pending -GnuTLS fix. -(pkcs12_parse): Fix certificate handling. - ------------------------------------------------------------------------- -r326 | joe | 2004-10-20 07:17:34 +0100 (Wed, 20 Oct 2004) | 6 lines - -PKCS#12 support for GnuTLS interface from Aleix Conchillo Flaque: - -* src/ne_gnutls.c (ne_ssl_clicert_free, dup_client_cert, -ne_ssl_clicert_read, ne_ssl_clicert_encrypted, ne_ssl_clicert_decrypt, -ne_ssl_clicert_owner, ne_ssl_clicert_owner, pkcs12_parse): New functions. - ------------------------------------------------------------------------- -r325 | joe | 2004-10-19 13:39:34 +0100 (Tue, 19 Oct 2004) | 8 lines - -* src/ne_xml.c (invalid_ncname): Factor out macro for NCName -checking. -(declare_nspaces): Use invalid_ncname macro. Don't compare 'xmlns' -case-insensitively. -(expand_qname): Use invalid_ncname macro. - -* test/xml.c (fail_match): Skip correct checks for the time being. - ------------------------------------------------------------------------- -r324 | joe | 2004-10-17 21:32:44 +0100 (Sun, 17 Oct 2004) | 7 lines - -* src/ne_gnutls.c (oid_find_highest_index): New function. -(append_rdn): Use oid_find_highest_index to find all RDNs using given -OID. -(ne_ssl_readable_dname): Add #if'd out better code which can be used -once GnuTLS bugs are fixed. -(check_identity): Use oid_find_highest_index. - ------------------------------------------------------------------------- -r323 | joe | 2004-10-17 21:07:29 +0100 (Sun, 17 Oct 2004) | 7 lines - -* test/openssl.conf [reqDN.twoOU]: New section. - -* test/makekeys.sh: Produce a twoou.cert certificate with two OU fields. - -* test/ssl.c (dname_readable): Test for printing of certificate with -two OU fields. - ------------------------------------------------------------------------- -r322 | joe | 2004-10-17 19:18:20 +0100 (Sun, 17 Oct 2004) | 8 lines - -* test/utils.c (serve_infinite): Move from props.c - -* test/props.c (serve_infinite): Remove function. - -* test/request.c (serve_infinite_folds, serve_infinite_headers): -Remove functions. (unbounded_headers, unbounded_folding): Adjust to -use serve_infinite. - ------------------------------------------------------------------------- -r321 | joe | 2004-10-17 19:08:55 +0100 (Sun, 17 Oct 2004) | 3 lines - -* src/ne_request.c (debug_dump_request): Revert part of previous -change: only print unsanitized request to debug channel by default. - ------------------------------------------------------------------------- -r320 | joe | 2004-10-17 19:07:06 +0100 (Sun, 17 Oct 2004) | 3 lines - -* src/ne_request.c (debug_dump_request): Only jump through -request-sanitization debug hoops if really necessary. - ------------------------------------------------------------------------- -r319 | joe | 2004-10-17 18:58:31 +0100 (Sun, 17 Oct 2004) | 4 lines - -* src/ne_request.c (read_response_block): Update comments, style. -Remove unnecessary early return for zero-length chunk. No functional -changes. - ------------------------------------------------------------------------- -r318 | joe | 2004-10-17 18:22:22 +0100 (Sun, 17 Oct 2004) | 1 line - -Fix typo. ------------------------------------------------------------------------- -r317 | joe | 2004-10-17 18:19:37 +0100 (Sun, 17 Oct 2004) | 10 lines - -Prevent memory exhaustion in PROPFIND response parsing by a hostile -server: - -* src/ne_props.c (struct ne_prop_result_set): Add counter field. -(start_propstat, start_prop): Enforce a limit of 1024 properties per -resource. - -* test/props.c (serve_infinite, unbounded_response, -unbounded_propstats, unbounded_props): New functions. - ------------------------------------------------------------------------- -r316 | joe | 2004-10-17 18:06:22 +0100 (Sun, 17 Oct 2004) | 5 lines - -* src/ne_207.h (ne_207_start_propstat): Specify that a NULL return -value means that the parse is aborted. - -* src/ne_207.c (start_element): Abort parsing as above. - ------------------------------------------------------------------------- -r315 | joe | 2004-10-17 14:06:00 +0100 (Sun, 17 Oct 2004) | 10 lines - -* src/ne_xml.h (ne_xml_parse): Returns an error if parsing fails. -(ne_xml_failed): Redefine in terms of ne_xml_parse return value. - -* src/ne_xml.c (ne_xml_parse): Return p->failure. (ne_xml_parse_v): -Pass through return value from ne_xml_parse. - -* test/xml.c (parse_match): Check ne_xml_parse() return value; handle -match_chunked test mode. -(matches): Test for UTF-8 BOM handling in chunked mode. - ------------------------------------------------------------------------- -r314 | joe | 2004-10-17 13:59:26 +0100 (Sun, 17 Oct 2004) | 2 lines - -* doc/ref/iaddr.xml: Document ne_iaddr_typeof. - ------------------------------------------------------------------------- -r313 | joe | 2004-10-17 13:53:52 +0100 (Sun, 17 Oct 2004) | 2 lines - -* src/ne_socket.h: Docs tweaks. - ------------------------------------------------------------------------- -r312 | joe | 2004-10-17 13:22:07 +0100 (Sun, 17 Oct 2004) | 7 lines - -* src/ne_request.c (read_response_block): Document to always close the -connection on error. (ne_read_response_block): Close the connection -if the reader callback fails. - -* test/request.c (abort_reader): Check that the connection is closed -if after the abort. - ------------------------------------------------------------------------- -r311 | joe | 2004-10-14 21:26:59 +0100 (Thu, 14 Oct 2004) | 3 lines - -* INSTALL.win32, neon.mak: Update to support ENABLE_IPV6 flag. (Kai -Sommerfeld). - ------------------------------------------------------------------------- -r310 | joe | 2004-10-14 13:11:30 +0100 (Thu, 14 Oct 2004) | 4 lines - -* src/ne_socket.c: Include ws2tcpip.h if USE_GETADDRINFO is defined -(Kai Sommerfeld). (ne_iaddr_print): Use getnameinfo/NI_NUMERICHOST if -inet_ntop is not available. - ------------------------------------------------------------------------- -r308 | joe | 2004-10-11 20:59:58 +0100 (Mon, 11 Oct 2004) | 21 lines - -Allow response body callbacks to return an error: - -* src/ne_request.h (ne_block_reader): Return error code. - -* src/ne_request.c (ne_read_response_block): Fail with -1 if a reader -callback returns an error. - -* src/ne_xml.c (ne_xml_parse_v): Return 0 (for the moment). - -* src/ne_basic.c (get_to_fd): Return error. - -* src/ne_compress.c (gz_reader): Return 0 (mostly), or pass through. - -* src/ne_auth.c (auth_body_reader): Return 0. - -* test/compress.c (reader): Return error. - -* test/request.c (collector): Return 0. -(abortive_reader, abort_reader): New functions. - - ------------------------------------------------------------------------- -r307 | joe | 2004-10-10 22:11:54 +0100 (Sun, 10 Oct 2004) | 4 lines - -* src/Makefile.in: Pick up top_builddir from autoconf. - -* configure.in: Let autoconf define top_builddir. - ------------------------------------------------------------------------- -r303 | joe | 2004-10-10 21:47:06 +0100 (Sun, 10 Oct 2004) | 9 lines - -* src/ne_openssl.c (check_identity): Only match iPAddress names -against the hostname used for the session rather than the server IP -address. -(check_certificate, populate_cert): Update callers. - -* test/ssl.c (fail_ssl_request): Take hostname argument, update -callers. -(fail_host_ipaltname): New test. - ------------------------------------------------------------------------- -r302 | joe | 2004-10-10 18:44:56 +0100 (Sun, 10 Oct 2004) | 2 lines - -* Makefile.in (distclean): Remove neon.pc. - ------------------------------------------------------------------------- -r301 | joe | 2004-10-09 11:38:46 +0100 (Sat, 09 Oct 2004) | 3 lines - -* src/ne_stubssl.c (ne_ssl_context_create): Take mode argument. -(ne_ssl_context_set_verify): New function. - ------------------------------------------------------------------------- -r300 | joe | 2004-10-08 15:07:26 +0100 (Fri, 08 Oct 2004) | 4 lines - -* tests/common/tests.c (main): Print XFAIL in reverse video so it -stands out better, and use a white foreground for SKIPPED so it's -readable. - ------------------------------------------------------------------------- -r299 | joe | 2004-10-08 08:14:45 +0100 (Fri, 08 Oct 2004) | 2 lines - -Compress THANKS, update copyright in README and AUTHORS. - ------------------------------------------------------------------------- -r298 | joe | 2004-10-07 21:25:00 +0100 (Thu, 07 Oct 2004) | 6 lines - -* test/ssl.c (fail_bad_ipaltname): New function. - -* test/openssl.conf, test/makekeys.sh: Create altname6.cert. Correct -altname5.cert to have a bad CN field to prevent false positives if -ipAddress altnames are not handled. - ------------------------------------------------------------------------- -r297 | joe | 2004-10-07 20:22:56 +0100 (Thu, 07 Oct 2004) | 4 lines - -* src/ne_gnutls.c (read_to_datum): New function. -(mmap_file, munmap_file): Remove functions. -(ne_ssl_cert_read): Use read_to_datum. - ------------------------------------------------------------------------- -r296 | joe | 2004-10-07 14:47:20 +0100 (Thu, 07 Oct 2004) | 3 lines - -* macros/neon.m4 (NEON_GSSAPI): Support --without-gssapi flag to -disable Negotiate support. - ------------------------------------------------------------------------- -r295 | joe | 2004-10-07 13:57:44 +0100 (Thu, 07 Oct 2004) | 12 lines - -* src/ne_gnutls.c (struct ne_ssl_dname_s): Reference the cert and -subject/issuer flag. (append_rdn): New function. -(ne_ssl_readable_dname): Reimplement to generate dname on the fly, -using append_rdn. -(ne_ssl_dname_cmp): Break. -(check_identity): Check against commonName correctly. -(ne_ssl_cert_write, ne_ssl_cert_export, ne_ssl_cert_digest): -Remove unused variables. -(populate_cert): Populate new dn structures correctly. -(ne_ssl_cert_free): Don't free dnames. -(ne_ssl_cert_import): Fix memory leak. - ------------------------------------------------------------------------- -r294 | joe | 2004-10-07 11:47:28 +0100 (Thu, 07 Oct 2004) | 2 lines - -* test/ssl.c (ccert_unencrypted): Fail if ne_ssl_clicert_read returns NULL. - ------------------------------------------------------------------------- -r293 | joe | 2004-10-07 08:13:54 +0100 (Thu, 07 Oct 2004) | 3 lines - -* src/ne_gnutls.c (ne_ssl_cert_import): Fix to import as DER not PEM. -(ne_ssl_cert_export): Handle arbitrary length certificates. - ------------------------------------------------------------------------- -r292 | joe | 2004-10-07 08:06:20 +0100 (Thu, 07 Oct 2004) | 6 lines - -GNU TLS updates from Aleix: - -* src/ne_gnutls.c (match_hostname, check_identity): New functions. -(ne_ssl_cert_cmp, ne_ssl_cert_digest): Simplify. -(x509_get_dn): Fix buffer length handling. - ------------------------------------------------------------------------- -r291 | joe | 2004-10-07 08:00:15 +0100 (Thu, 07 Oct 2004) | 10 lines - -* src/ne_ssl.h (ne_ssl_context_set_verify): New function. -(ne_ssl_context_create): Change flags argument to 'mode'. - -* src/ne_openssl.c (ne_ssl_context_create): Update to handle modes. -(ne_ssl_context_set_verify): Implement. - -* src/ne_gnutls.c (ne_ssl_cert_validity): Fix date format and -use correct buffers. -(ne_ssl_context_set_verify): Implement. - ------------------------------------------------------------------------- -r290 | joe | 2004-10-06 22:46:01 +0100 (Wed, 06 Oct 2004) | 2 lines - -* test/socket.c: Remove OpenSSL includes (Aleix). - ------------------------------------------------------------------------- -r289 | joe | 2004-10-06 12:16:58 +0100 (Wed, 06 Oct 2004) | 8 lines - -Fix slow startup problems with GNU TLS: - -* src/ne_privssl.h (struct ne_ssl_context_s) [HAVE_GNUTLS]: Remove -_params fields. - -* src/ne_gnutls.c (ne_ssl_context_create, ne_ssl_context_destroy): -Don't generate temporary RSA keys or DH paramaters. - ------------------------------------------------------------------------- -r288 | joe | 2004-10-06 11:58:53 +0100 (Wed, 06 Oct 2004) | 3 lines - -* src/ne_socket.c (ne_sock_accept_ssl) [HAVE_OPENSSL]: Fix to return 0 -for SSL_accept() success. - ------------------------------------------------------------------------- -r287 | joe | 2004-10-06 11:22:57 +0100 (Wed, 06 Oct 2004) | 3 lines - -* test/socket.c (read_reset, write_reset, line_closure, ssl_closure): -Print socket error string for failure cases. - ------------------------------------------------------------------------- -r286 | joe | 2004-10-06 11:16:58 +0100 (Wed, 06 Oct 2004) | 2 lines - -* src/ne_socket.c (read_gnutls): Return NE_SOCK_CLOSED on EOF. - ------------------------------------------------------------------------- -r285 | joe | 2004-10-06 09:43:05 +0100 (Wed, 06 Oct 2004) | 8 lines - -Fix write handling with GNU TLS: - -* src/ne_socket.c (struct iofns): Redefine write semantics to allow -short writes. -(write_raw): Drop short write handling, return bytes written. -(write_ossl, write_gnutls): Return bytes written. -(ne_sock_fullwrite): Handle short writes here. - ------------------------------------------------------------------------- -r284 | joe | 2004-10-06 09:30:48 +0100 (Wed, 06 Oct 2004) | 31 lines - -Simplify and extend abstraction of SSL layer: - -* src/ne_privssl.h: Make ne_ssl_socket a typedef. -[HAVE_GNUTLS]: Remove union cred, gnutls_session pointer. -(ne__sock_sslsock): Add prototype. - -* src/ne_socket.h (ne_sock_accept_ssl): Replaces ne_sock_switch_ssl. -Remove ne_sock_sslsock prototype. - -* src/ne_socket.c: Include ne_privssl.h later. -(readable_ossl, error_ossl, write_ossl, readable_gnutls, error_gnutls, -read_gnutls, write_gnutls, ne_sock_connect_ssl): Adjust for -ne_ssl_socket change. (ne__sock_sslsock): Rename from -ne_sock_sslsock. (ne_sock_accept_ssl): New function. -(ne_sock_switch_ssl): Remove function. - -* src/ne_ssl.h (ne_ssl_context_create): Take flags argument. -(ne_ssl_context_keypair): New prototype. -(ne_ssl_context_trustcert): Renamed from ne_ssl_ctx_trustcert. - -* src/ne_openssl.c (ne_ssl_context_create): Take flags. -(ne_ssl_context_keypair): Implement. -(ne__negotiate_ssl): Adjust to use ne__sock_sslsock. - -* src/ne_gnutls.c (ne_ssl_context_create): Take flags, adjust -for ctx->cred change. -(ne_ssl_context_keypair): Implement. - -* test/socket.c (init_ssl): Switch to use ne_ssl_context for the -server context rather than OpenSSL directly. - ------------------------------------------------------------------------- -r283 | joe | 2004-10-06 09:15:30 +0100 (Wed, 06 Oct 2004) | 2 lines - -* src/Makefile.in: Add deps for ne_gnutls.lo. - ------------------------------------------------------------------------- -r282 | joe | 2004-10-05 21:50:01 +0100 (Tue, 05 Oct 2004) | 3 lines - -* test/socket.c (serve_reset): New function. -(write_reset, read_reset): Use it. - ------------------------------------------------------------------------- -r281 | joe | 2004-10-05 21:22:35 +0100 (Tue, 05 Oct 2004) | 1 line - -Suffer the aclocal noise for the time being. ------------------------------------------------------------------------- -r280 | joe | 2004-10-05 21:21:40 +0100 (Tue, 05 Oct 2004) | 11 lines - -Continued work on GNU TLS support, from Aleix Conchillo Flaque: - -* src/ne_gnutls.c (ne__negotiate_ssl): Rename from ne_negotiate_ssl. - -* src/ne_socket.c [HAVE_GNUTLS] (init_ssl): Call gnutls_global_init. -(ne_sock_exit): Call gnutls_global_deinit. -(check_alert, readable_gnutls, error_gnutls, read_gnutls, write_gnutls): -New functions. -(ne_sock_switch_ssl, ne_sock_connect_ssl, ne_sock_close): Add GNU TLS -specific implementations. - ------------------------------------------------------------------------- -r279 | joe | 2004-10-05 21:12:19 +0100 (Tue, 05 Oct 2004) | 6 lines - -CygWin fixes: - -* src/ne_socket.c (NE_ISRESET): Treat ECONNABORTED like ECONNRESET. -(ne_sock_connect): Don't compare fd numbers to FD_SETSIZE on Win32, do -use ne_close(). - ------------------------------------------------------------------------- -r275 | joe | 2004-10-04 22:46:13 +0100 (Mon, 04 Oct 2004) | 6 lines - -* src/ne_request.c (ne_begin_request): Don't treat 205 like 204, per -http-wg clarification: -http://lists.w3.org/Archives/Public/ietf-http-wg/2004JulSep/0081.html - -* test/request.c (no_body_205): Remove test. - ------------------------------------------------------------------------- -r274 | joe | 2004-10-04 22:20:31 +0100 (Mon, 04 Oct 2004) | 17 lines - -Begin integration of GNU TLS support from Aleix Conchillo Flaque: - -* macros/neon.m4 (NE_CHECK_OPENSSLVER): Renamed from NE_CHECK_SSLVER. -(NEON_SSL): Add detection support for GNU TLS. Define HAVE_GNUTLS or -HAVE_OPENSSL as appropriate. - -* src/ne_utils.c (version_string): Update to include GNU TLS version -string. - -* src/ne_privssl.h (HAVE_GNUTLS): Add alternative private structure -definitions. - -* src/ne_auth.c (get_cnonce): Adjust to use HAVE_OPENSSL rather than -NE_HAVE_SSL. - -* src/ne_gnutls.c: New file. - ------------------------------------------------------------------------- -r273 | joe | 2004-10-04 21:56:57 +0100 (Mon, 04 Oct 2004) | 3 lines - -* src/ne_socket.c (ne_sock_connect): Use htons not ntohs (Aleix -Conchillo Flaque). - ------------------------------------------------------------------------- -r270 | joe | 2004-10-02 23:26:42 +0100 (Sat, 02 Oct 2004) | 1 line - -Add clog to svn:ignore. ------------------------------------------------------------------------- -r269 | joe | 2004-10-02 23:25:13 +0100 (Sat, 02 Oct 2004) | 7 lines - -Merge r266, r267 from 0.24.x branch: - -* config.hw.in: Define HAVE_SETSOCKOPT to enable Nagle on Windows. - -* macros/neon.m4: Check for socket() in ws2_32 for CygWin. - - ------------------------------------------------------------------------- -r268 | joe | 2004-10-02 23:19:52 +0100 (Sat, 02 Oct 2004) | 1 line - -Convert .cvsignore to svn:ignore. ------------------------------------------------------------------------- -r256 | joe | 2004-10-02 20:38:59 +0100 (Sat, 02 Oct 2004) | 1 line - -Merge trunk up to current neon CVS HEAD. ------------------------------------------------------------------------- -r255 | joe | 2004-10-02 20:34:48 +0100 (Sat, 02 Oct 2004) | 1 line - -Branch trunk from 0.24.4 on 0.24.x branch. ------------------------------------------------------------------------- -r251 | joe | 2004-10-02 20:31:06 +0100 (Sat, 02 Oct 2004) | 1 line - -Import neon-0.24.4. ------------------------------------------------------------------------- -r249 | joe | 2004-10-02 20:29:59 +0100 (Sat, 02 Oct 2004) | 1 line - -Import neon-0.24.3. ------------------------------------------------------------------------- -r247 | joe | 2004-10-02 20:25:57 +0100 (Sat, 02 Oct 2004) | 1 line - -Import neon-0.24.2. ------------------------------------------------------------------------- -r244 | joe | 2004-10-02 20:15:53 +0100 (Sat, 02 Oct 2004) | 1 line - -Import neon-0.24.1. ------------------------------------------------------------------------- -r243 | joe | 2004-10-02 19:47:02 +0100 (Sat, 02 Oct 2004) | 2 lines - -Import neon 0.24.0 to begin 0.24.x branch. - ------------------------------------------------------------------------- diff --git a/client/neon-0.27.2/ChangeLog.CVS b/client/neon-0.27.2/ChangeLog.CVS deleted file mode 100644 index c1e1bd05b..000000000 --- a/client/neon-0.27.2/ChangeLog.CVS +++ /dev/null @@ -1,737 +0,0 @@ -Mon May 17 21:25:44 2004 Joe Orton - - * neon.mak: Fix for handling of paths with spaces, and - simplify (Jon Foster ). - -Thu May 13 11:42:07 2004 Joe Orton - - * configure.in: Don't rely on echo -n in ne_version. - -Sun Feb 22 20:29:04 2004 Joe Orton - - * configure.in: Move memleak.h include to end of config.h. - -Sun Feb 22 18:44:55 2004 Joe Orton - - * configure.in: Fix to run DAV tests when an XML parser is - configured. - -Sat Jan 24 17:50:52 2004 Joe Orton - - * configure.in: AC_DEFINE _GNU_SOURCE again so that it's used - during compiler checks. - -Sat Jan 24 17:33:54 2004 Joe Orton - - * configure.in: Cleanup; move all AC_SUBSTs together; use a single - AH_TOP for config.h.in header; require autoconf 2.58. - -Thu Jan 1 17:40:34 2004 Joe Orton - - * neon-config.in: Handle 'lfs' feature. - -Sat Nov 15 09:42:40 2003 Joe Orton - - * neon-config.in: Print help output on stderr for unknown arguments. - (usage): Update help output for new NE_FLAG_ substitutions. - -Sat Nov 15 09:24:49 2003 Joe Orton - - * configure.in: Update for use latest autoconf best-practice: - s/AC_HELP_STRING/AS_HELP_STRING. - -Fri Nov 14 11:28:24 2003 Joe Orton - - * configure.in, neon-config.in: Use new NE_FLAG substitutions - for feature detection. - -Fri Nov 14 09:08:10 2003 Joe Orton - - * configure.in: Add -export-symbols-regex to NEON_LINK_FLAGS to - prevent export of ne__ symbols where possible. - -Sun Oct 26 12:42:15 2003 Joe Orton - - * neon-config.in: Fix to exit with failure for an unrecognized - option. - -Sat Oct 25 10:37:59 2003 Joe Orton - - * configure.in: Use AC_LIBTOOL_TAGS if available. - -Mon Sep 22 20:56:21 2003 Joe Orton - - * Makefile.in: Respect @datadir@ from configure (Max Bowsher). - -Sun Sep 14 11:13:36 2003 Joe Orton - - * configure.in: Run NEON_TEST before LIBNEON_SOURCE_CHECKS, to - help prevent time_t format string detection failing due to changed - CFLAGS. - -Fri Jun 20 17:51:05 2003 Joe Orton - - * configure.in, neon-config.in: Don't pass user-supplied CPPFLAGS - through to neon-config, it is no longer necessary. - -Sun Apr 6 19:51:31 2003 Joe Orton - - * doc/manual.xml: Include clicert reference docs. - - * doc/ref/clicert.xml: New file. - -Sun Apr 6 19:24:47 2003 Joe Orton - - * Makefile.in (XMLTO): New variable. - (docs-man, docs-pdf, docs-ps, docs-html): Use $(XMLTO) variable. - -Wed Mar 26 20:09:12 2003 Joe Orton - - * Makefile.in (DIST_HEADERS): Add ne_tls.h - - * neon.mak: Build ne_openssl.obj for SSL build, ne_stubssl.obj for - non-SSL build. - -Sun Mar 9 10:38:36 2003 Joe Orton - - * configure.in: Set ALLOW_INSTALL=yes early to allow later - overrides. - - * Makefile.in (install-yes): Remove dependence on subdirs. - (install-lib): Depend on subdirs; don't install neon.pc. - (install-config): Install neon.pc here. - -Sat Mar 1 21:50:17 2003 Joe Orton - - * Makefile.in (cover): New target. - -Sat Mar 1 20:39:32 2003 Joe Orton - - * configure.in: Add --enable-memleak argument; if enabled, have - config.h include memleak.h, add top_srcdir/src to include path, - and substitute ALLOW_INSTALL as 'memleak'. Otherwise, substitute - ALLOW_INSTALL as 'yes'. - - * Makefile.in (install): Use install-@ALLOW_INSTALL@. - (install-yes): Renamed from install. - (install-memleak): Prevent installation with non-standard ABI. - -Fri Dec 27 15:15:54 2002 Joe Orton - - * neon.pc.in: New file. - - * configure.in: Generate neon.pc. - - * Makefile.in (install-lib): Install neon.pc - -Tue Nov 19 11:24:40 2002 Joe Orton - - * configure.in: Use NEON_TEST before NEON_XML_PARSER to prevent - problems if NEON_XML_PARSER adds anything to CPPFLAGS which breaks - gcc -Werror (e.g. -I/usr/local/include). - -Sat Sep 21 12:29:56 2002 Joe Orton - - * neon-config.in: Add support for `--la-file' argument, to print - location of libtool .la file. - -Sat Sep 14 12:46:21 2002 Joe Orton - - * configure.in: Add AC_COPYRIGHT, use AC_MSG_NOTICE for - post-configure message, update for modern use of AC_CONFIG_FILES - and AC_OUTPUT. - -Thu Aug 29 23:49:40 2002 Joe Orton - - Further Win32 updates from Blair Zajac: - - * config.hw.in: Define HAVE_ERRNO_H; fix non-SSL build. - - * neon.mak: Fix to build DAV sources if EXPAT_FLAGS is set but not - EXPAT_SRC. - -Sun Aug 25 23:37:59 2002 Joe Orton - - Win32 updates from Blair Zajac : - - * neon.mak: Fix expansion of $(LIB32_OBJS) variable that was - causing nmake failures. Allow non-DAV build if EXPAT_SRC is not - specified. - - * config.hw.in: Remove hard-coded defines. - - * INSTALL.win32: Overhaul. - -Sat Aug 10 10:42:09 2002 Joe Orton - - * configure.in: Substitue OPENSSL into Makefiles as an absolute - path. - -Fri Aug 9 20:45:01 2002 Joe Orton - - * configure.in: Update to use modern three-argument AC_INIT and - AC_CONFIG_SRCDIR. Pick up version string from .version; thanks to - Greg Stein for they `esyscmd' trick. Move NEON_WITH_LIBS earlier. - Use AC_HELP_STRING for --disable-webdav. - -Fri Aug 9 20:41:24 2002 Joe Orton - - * config.hw.in, neon.mak, INSTALL.win32: Win32 build update from - Gerald Richter: add optional NEON_NODAV and OPENSSL_STATIC flags, - update locations of includes and libraries. - -Sun Jun 30 11:08:56 2002 Joe Orton - - * neon.mak: Enable WIN32_LEAN_AND_MEAN etc, to prevent X509_NAME - definition conflicting with OpenSSL headers in recent versions of - Platform SDK (Branko ibej). - -Thu Jun 13 20:35:43 2002 Joe Orton - - * configure.in: Call NEON_WITH_LIBS for --with-libs option. - -Tue Jun 4 13:27:48 2002 Joe Orton - - * neon.mak: Always build ne_compress.obj; patch from Branko ibej. - -Tue Jun 4 09:38:24 2002 Joe Orton - - * Makefile.in (man1dir, man3dir): Use $(mandir). (Rodney Dawes) - -Mon Jun 3 20:47:14 2002 Joe Orton - - * Makefile.in (install-html, install-man): Fix for VPATH builds. - -Sat May 25 15:01:18 2002 Joe Orton - - * configure.in: Only enable SSL tests if an `openssl' binary is - found in $PATH. - -Thu May 23 20:31:01 2002 Joe Orton - - * configure.in: Require a release version of autoconf. - -Sat May 18 14:43:15 2002 Joe Orton - - * Makefile.in (docs-man): Use customisation layer. - -Sat Apr 13 22:34:00 2002 Joe Orton - - * configure.in, neon-config.in: Pass LDFLAGS and CPPFLAGS setting - given to configure through to neon-config --libs/--cflags output. - -Mon Feb 25 20:53:28 2002 Joe Orton - - * neon.mak (OPENSSL_FLAGS): Define NEON_SSL not ENABLE_SSL - (Branko). - -Mon Feb 25 20:46:04 2002 Joe Orton - - * config.hw.in: Add NE_FMT_OFF_T (Dan Berlin, Branko ibej). - -Sun Feb 10 20:35:55 2002 Joe Orton - - * Makefile.in (docs-html): Use XSL customisation layer for the - HTML output. - -Wed Feb 6 00:42:32 2002 Joe Orton - - * configure.in: Require autoconf 2.52d for AC_C_BIGENDIAN which - supports cross-compiling. - -Sat Jan 26 11:19:39 2002 Joe Orton - - * configure.in: Define TESTS and HELPERS appropriately for whether - DAV, SSL, zlib are supported. - -Sat Jan 26 11:03:38 2002 Joe Orton - - * neon.mak: Add OpenSSL, zlib support (Branko ibej). - -Sat Jan 26 00:15:29 2002 Joe Orton - - * neon.dsp, neon.dsw: Removed per advice from Branko. - -Thu Jan 24 21:02:02 2002 Joe Orton - - * Makefile.in (check): Run check target in test subdir. - (subdirs): Remove redundant subshell. - (distclean): Clean harder. - -Thu Jan 24 20:46:28 2002 Joe Orton - - * neon.mak: Remove sslcerts.c from build. - -Sun Jan 20 12:51:27 2002 Joe Orton - - * configure.in: Create test/common for vpath build. - -Tue Jan 8 21:35:12 2002 Joe Orton - - * neon.mak: Rewritten by Branko ibej . - - * config.hw.in: Update from Branko ibej. - -Thu Jan 3 08:48:00 2002 Joe Orton - - * Makefile.in (neon-config): Add target. - -Thu Jan 3 08:47:06 2002 Joe Orton - - * neon-config.in (libs): Don't print -L/usr/lib or -L/lib. - -Thu Jan 3 08:43:08 2002 Joe Orton - - * configure.in: Make neon-config executable in the build tree. - -Mon Dec 17 22:54:00 2001 Joe Orton - - * Makefile.in (install-lib, install-headers, install-config): - Support DESTDIR; patch from Pawel Golaszewski . - -Sat Oct 27 12:23:57 2001 Joe Orton - - * neon-config.in: Add "--support FEATURE" option; the script exits - with success if given FEATURE is supported. - -Sat Oct 6 13:11:57 2001 Joe Orton - - * configure.in: Require autoconf 2.50. Use AC_HELP_STRING. - -Sun Sep 30 23:44:56 2001 Joe Orton - - * configure.in, neon-config.in: Clean up handling of cflags/libs - exporting. - -Sat Sep 29 12:45:25 2001 Joe Orton - - * Makefile.in: Add Makefile re-generation target, have clean - recurse into test too, have check depend on subdirs, distribute - ne_compress.h. - -Tue Sep 25 07:34:32 2001 Mo DeJong - - * configure.in: Move check for signal.h into - LIBNEON_SOURCE_CHECKS. - -Mon Sep 24 20:28:26 2001 Joe Orton - - * autogen.sh: Bomb out on errors (set -e). - -Mon Sep 24 20:20:08 2001 Joe Orton - - * autogen.sh: Clean up, use libtoolize. - - * ltmain.sh: Removed from CVS. - -Mon Sep 24 20:17:18 2001 Joe Orton - - * configure.in: Use three-argument AC_DEFINE for _GNU_SOURCE (Mo - DeJong). - -Tue Sep 11 23:20:23 2001 Joe Orton - - * config.hw.in: Define USE_DAV_LOCKS. - -Mon Aug 13 21:07:28 2001 Joe Orton - - * neon.mak: Add support for SSL (Peter Boos). - -Sat Jun 30 12:22:17 2001 Joe Orton - - * configure.in: Add NEONLIBS to LIBS, so that the depedencies are - added to the link line. This means they are picked up as - references in the .so, and also listed in the libtool .la file. - -Tue Jun 12 13:02:58 2001 Joe Orton - - * config.hw.in: Renamed from config.hw, and have version - substituted in when tarball is rolled. Adjust for XML parser - changes. (Gerald Richter) - -Sun Jun 10 16:41:46 2001 Joe Orton - - * configure.in: Check for pipe() for tests, use NEON_DEBUG. - -Fri Jun 8 22:57:24 2001 Joe Orton - - * config.hw: Fixes from Gerald Richter . - - * neon.mak, INSTALL.win32: New files from Gerald Richter. - -Thu May 31 00:00:32 2001 Joe Orton - - * configure.in: Disable shared library build by default. Use - NE_DEBUGGING rather than DEBUGGING. Check for 'usleep' for tests. - -Sun Apr 29 16:41:17 2001 Joe Orton - - * configure.in: Produce test/Makefile. - -Wed Mar 14 22:51:28 2001 Joe Orton - - * Makefile.in (DIST_HEADERS): Add http_auth.h - -Wed Mar 14 22:45:51 2001 Joe Orton - - * configure.in: Build bundled directory regardless of - --disable-webdav. - -Sun Feb 25 17:00:40 2001 Joe Orton - - * configure.in: Rename NEON_IS_BUNDLED to NEON_BUILD_BUNDLED. - -Sun Feb 25 16:53:28 2001 Joe Orton - - * configure.in: Set NEON_IS_BUNDLED to "yes". - -Sat Feb 24 00:09:57 2001 Joe Orton - - * configure.in: Add --disable-webdav flag to disable WebDAV - support. Set NEON_NEED_XML_PARSER=yes if DAV is not disabled. - -Sun Jan 28 23:10:39 2001 Joe Orton - - * Makefile.in: Remove neon_config.h from DIST_HEADERS. - -Sun Jan 28 10:41:40 2001 Joe Orton - - * configure.in: Don't produce neon_config.h. - -Tue Jan 23 23:16:25 2001 Joe Orton - - * configure.in: Moved version defns into NEON_VERSIONS macros. - Produce src/neon_config.h. - -Tue Jan 16 20:16:47 2001 Joe Orton - - * configure.in: Bumped version to 0.10.1. - -Mon Jan 15 22:59:47 2001 Joe Orton - - * configure.in: Bumped version to 0.10.0. - -Sun Jan 14 23:55:47 2001 Joe Orton - - * Makefile.in (distclean): Don't remove neon_config.h. (install): - Depend on subdirs. - -Wed Jan 10 22:46:53 2001 Joe Orton - - * configure.in: Use NEON_LINK_FLAGS to pass through -version-info - and interface version flags. Add -I${top_builddir} to CFLAGS. - Remove NEONOBJS declaration, let NEON_LIBTOOL_BUILD do it. - -Wed Dec 20 00:11:56 2000 Joe Orton - - * configure.in: Bumped version to 0.9.1, interface version to - 9:1:0. - -Tue Dec 19 22:15:45 2000 Joe Orton - - * Makefile.in: Build using recursive make into src directory. Add - VPATH support. (Mo DeJong ) - -Tue Dec 19 22:13:40 2000 Joe Orton - - * configure.in: Build using new src/Makefile.in. - -Sun Dec 17 19:53:36 2000 Joe Orton - - * config.sub, config.guess, ltconfig, ltmain.sh: Update to libtool - 1.3.5 versions. - -Sun Dec 17 18:43:00 2000 Joe Orton - - * Makefile.in: Remove all traces of example programs. Fix - uritest. - -Thu Dec 14 21:47:48 2000 Joe Orton - - * configure.in: Bumped version to 0.8.0, interface version to - 8:0:0. - -Thu Dec 14 20:57:49 2000 Joe Orton - - * configure.in: Removed configuration of examples. - -Wed Dec 13 20:14:53 2000 Joe Orton - - * config.hw: Added for Windows. - -Sun Nov 26 09:52:29 2000 Joe Orton - - * example/: Removed directory (now in separate neon-examples - package). - -Tue Sep 12 10:33:50 2000 Joe Orton - - * Makefile.in: Remove sitecopy bits which somehow got left in - there. - -Tue Sep 12 00:41:49 2000 Joe Orton - - * configure.in: Bumped version to 0.7.3, interface version to - 7:1:1. - -Tue Sep 12 00:39:49 2000 Joe Orton - - * Makefile.in (distclean): New target. - -Thu Sep 7 00:14:15 2000 Joe Orton - - * configure.in: Bumped version to 0.7.2, interface version to - 7:0:1. - -Thu Sep 7 00:10:54 2000 Joe Orton - - * Makefile.in: Added 'all' target (patch by Greg Stein - ). - -Sun Sep 3 10:32:09 2000 Joe Orton - - * Makefile.in (SHELL): Added definition. Changed xalloc.h to - ne_alloc.h in DIST_HEADERS. Thanks to Eric Mumpower - . - -Tue Aug 15 21:53:37 2000 Joe Orton - - * configure.in: Bumped version to 0.7.1, interface version to - 6:1:1. - -Mon Aug 14 09:28:47 2000 Joe Orton - - * configure.in: Bumped version to 0.7.0, interface version to - 6:0:0. - -Sun Aug 13 15:59:58 2000 Joe Orton - - * configure.in: Bumped version to 0.6.1, interface version to - 5:1:1. - -Sat Aug 12 17:10:09 2000 Joe Orton - - * configure.in: Bumped version to 0.6.0, interface version to - 5:0:1. - -Sat Aug 12 17:08:54 2000 Joe Orton - - * configure.in: Add --with-extra-includes and --with-extra-libs - configure parameters - -Sat Aug 12 17:07:22 2000 Joe Orton - - * example/nget.c (redirect_notify): New function. (main): Support - automatic redirects. - -Sat Aug 12 16:53:50 2000 Joe Orton - - * Makefile.in: Build http_redirect.lo. - -Sat Aug 12 14:43:28 2000 Joe Orton - - * example/nget.c (pretty_progress_bar): Use 'off_t' not size_t - arguments. - -Sat Aug 12 02:11:05 2000 Joe Orton - - * configure.in: Bumped interface version to 4:1:0, version to - 0.5.1. - -Fri Aug 11 17:18:19 2000 Joe Orton - - * configure.in: Bumped interface version to 4:0:0, version to - 0.5.0. - -Fri Jul 28 13:35:06 2000 Joe Orton - - * configure.in: Bumped interface version to 3:2:1, version to - 0.4.2. - -Fri Jul 28 11:26:18 2000 Joe Orton - - * configure.in: Bumped interface version to 3:1:1, version to - 0.4.1. - -Fri Jul 28 11:25:05 2000 Joe Orton - - * example/nget.c: Include nsocket.h not socket.h. - -Fri Jul 28 10:31:50 2000 Joe Orton - - * configure.in: Bumped interface version to 3:0:1. Bumped version - to 0.4.0. - -Thu Jul 27 22:01:11 2000 Joe Orton - - * Makefile.in: Install nsocket.h not socket.h. - -Thu Jul 27 21:59:45 2000 Joe Orton - - * configure.in: Tell neon-config that header files are in - $(includedir)/neon. Use NEON_WARNINGS macro for compiler - warnings. - -Thu Jul 20 19:20:23 2000 Joe Orton - - * Makefile.in: Install headers into $(includedir)/neon rather - libneon. Add dav_locks.h, xalloc.h, neon_md5.h, neon_i18n.h to - list of headers installed. - -Mon Jul 17 09:11:46 2000 Joe Orton - - * configure.in: Bumped version to 0.3.1, interface version to - 2:0:1. - -Sun Jul 16 18:47:47 2000 Joe Orton - - * configure.in: Bumped version to 0.3.0. - -Sun Jul 16 17:17:51 2000 Joe Orton - - * Makefile.in (nbrowse, nserver, debug-nserver, debug-nbrowse): - Added targets. - -Sun Jul 16 17:15:08 2000 Joe Orton - - * example/nget.c (main): Updated for new SSL interface. - -Sun Jul 16 16:51:16 2000 Joe Orton - - * configure.in: Added --enable-gnome-examples switch. - -Sun Jun 18 12:56:00 2000 Joe Orton - - * example/nserver.c: New file. - -Sun Jun 18 12:54:43 2000 Joe Orton - - * example/nbrowse.glade: Added Glade project file. - -Sun Jun 18 12:51:56 2000 Joe Orton - - * example/nbrowse/main.c, example/nbrowse/interface.c, - example/nbrowse/callbacks.c, example/nbrowse/support.c: Added - files from Glade. - -Thu May 25 01:04:11 2000 Joe Orton - - * configure.in: Bumped NEON_INTERFACE_VERSION to 1:0:0. With - --enable-warnings, only include -Wstrict-prototypes if we're not - building with SSL support. - -Thu May 25 01:01:01 2000 Joe Orton - - * Makefile.in: Pass --quiet to libtool to make it a bit less - chatty. (again, debug-nget): New target. - -Tue May 23 17:14:43 2000 Joe Orton - - * example/nget.c (main): Use http_session_create/destroy. Quit if - http_set_secure fails. - -Tue May 23 15:35:16 2000 Joe Orton - - * example/nget.c (parse_args, conn_notify): New functions. - (main): Call neon_debug_init, call sock_init. Register - conn_notify. If scheme is "https", use a secure connection. - -Tue May 23 14:14:05 2000 Joe Orton - - * example/nget.c (parse_args): New function. (main): - -Sun May 21 23:54:48 2000 Joe Orton - - * neon-config.in: Use @NEON_LIBDIR@ not -L@libdir@ in --libs - output. - -Sun May 21 23:53:41 2000 Joe Orton - - * configure.in: Call NEON_SSL macro, add LDFLAGS to NEON_LIBDIR to - pick up OpenSSL library location. - -Sat May 20 21:47:54 2000 Joe Orton - - * example/nget.c: Include neon_config.h for NEON_VERSION - declaration. - -Sat May 20 21:47:29 2000 Joe Orton - - * configure.in: Added --enable-warnings parameter. - -Sat May 20 21:46:54 2000 Joe Orton - - * Makefile.in (libneon.la): Fixed passing interface version. - -Sun May 14 00:40:38 2000 Joe Orton - - * configure.in (NEON_VERSION): Bumped to 0.2.0. - -Sun May 14 00:28:33 2000 Joe Orton - - * Makefile.in (install-config): New goal. - -Sun May 14 00:26:00 2000 Joe Orton - - * configure.in: Added --enable-debugging argument. Added - NEON_LIBDIR, NEON_INCLUDEDIR, NEON_LIBS, NEON_CFLAGS for - neon-config. Produce neon-config from neon-config.in. - - * neon-config.in: New file, modified from libxml. - -Sat May 13 23:16:46 2000 Joe Orton - - * configure.in: Builed static and shared libraries by default. - -Sat May 13 16:32:15 2000 Joe Orton - - * config.sub, config.guess, ltmain.sh, ltconfig: Updated from - libtool-1.3.4. - -Sat May 13 13:45:56 2000 Joe Orton - - * example/nget.c: Don't include neon.h. - -Sat May 13 13:44:22 2000 Joe Orton - - * Makefile.in: Use libtool. (install-examples): New goal. - - * configure.in: Define NEON_VERSION. - -Thu May 11 14:14:00 2000 Joe Orton - - * example/nget.c (main): Set user-agent. - -Thu May 11 14:10:24 2000 Joe Orton - - * ltconfig, ltmain.sh, config.sub, config.guess: Added libtool - support files. - - * configure.in: Call AC_PROG_LIBTOOL and AC_DISABLE_STATIC. - - * .cvsignore: Added libtool. - -Wed May 10 19:17:24 2000 Joe Orton - - * configure.in: Print configuration message, check for ranlib. - -Wed May 10 19:16:43 2000 Joe Orton - - * example/nget.c (main): Allow output to stdout. - -Wed May 10 19:15:56 2000 Joe Orton - - * Makefile.in: Added shared, install* targets - -Wed May 10 17:47:30 2000 Joe Orton - - * example/nget.c (pretty_progress_bar): New function, from - cadaver. - -Wed May 10 14:42:45 2000 Joe Orton - - * example/nget.c: New file. - -Wed May 10 14:41:39 2000 Joe Orton - - * configure.in, Makefile.in, .cvsignore, install-sh: New files. diff --git a/client/neon-0.27.2/INSTALL.win32 b/client/neon-0.27.2/INSTALL.win32 deleted file mode 100644 index dc02e5e3e..000000000 --- a/client/neon-0.27.2/INSTALL.win32 +++ /dev/null @@ -1,136 +0,0 @@ -Building neon on Windows uses a single Nmake neon.mak file. By -placing various parameters on nmake's command line, you can specify -exactly the features and behavior of the Neon libraries. The -parameters are additive, so to add more features, add the command line -options specified in the particular section below. - -All the builds described below should work with Microsoft VC++ 5 and -6. - -Build neon -__________ - -This is the most basic version of the Neon library you can build. It -does not require any third party libraries, but you do not get the -full capabilities of Neon. - -Compile Neon with no parameters - - nmake /f neon.mak - -After compiling the library, the directory contains libneon.lib, -against which you can link your program. - - -Build neon with WebDAV support -______________________________ - -To compile Neon with WebDAV support, Neon must compile and link -against a third-party XML parser, either expat, expat-lite, libxml or -libxml2. This Windows neon.mak file is designed to compile and link -against the pre-built Expat Windows libraries version 1.95.X or newer. -This library is available for download from - - http://sourceforge.net/projects/expat/ - -Download the latest expat_win32bin package named - - expat_win32bin_X_YY_Z.exe - -and install it on your system. It wants to install itself into -Q:\some\dir\Expat-X.Y.ZZ. Choose your installation location for expat -and then compile Neon with - - nmake /f neon.mak EXPAT_SRC=\path\to\Expat-X.YY.Z - -NOTE: When you run your program make sure the LIBEXPAT.DLL from expat -is accessible, i.e. is in your PATH. - -This should work with Microsoft VC++ 5 and 6. - - -Build neon with dynamically linked SSL support -______________________________________________ - -To build neon on Windows with SSL support you need OpenSSL already -installed on your system (I used OpenSSL 0.9.7g). It can be -downloaded from - - http://www.openssl.org/source/openssl-0.9.7g.tar.gz - -After compiling OpenSSL, now simply point make to the OpenSSL sources: - - nmake /f neon.mak OPENSSL_SRC=\path\to\openssl - -NOTE: The include files for OpenSSL reside in inc32/ directory -("../openssl-0.9.7g/inc32"). - -NOTE: Make sure that your program is linked against libeay32.lib and -ssleay32.lib (normally in "../openssl-0.9.7g/out32dll") and that -libeay32.dll and ssleay32.dll is accessible, i.e. is in your PATH. - - -Build neon with statically linked OpenSSL support -_________________________________________________ - -If you want to statically link against OpenSSL, then add the -OPENSSL_STATIC parameter. - - nmake /f neon.mak OPENSSL_SRC=\path\to\openssl OPENSSL_STATIC=yes - - -Build neon with statically linked Zlib support -______________________________________________ - -If you want to build Neon with the capability to decompress compressed -content, then you need to compile against the Zlib library. - -Neon's neon.mak file will compile and link the Zlib sources. You need -Zlib 1.2.1 or later, as previous versions do not include build scripts -for Win32. - -Here's how to compile in Zlib support. - - 1) Get one of the Zlib source file packages in Zip format from - http://www.gzip.org/zlib/; for example, - http://www.gzip.org/zlib/zlib121.zip - 2) Unzip it. - -Now add the ZLIB_SRC parameter to Neon's neon.mak pointing to your -newly compiled zlib. - - nmake /f neon.mak ZLIB_SRC=\path\to\zlib - - -Build neon with dynamically linked Zlib support -_______________________________________________ - -To build Neon with dynamically linked Zlib support, use the -instructions for the statically linked Zlib support above and add the -ZLIB_DLL parameter - - nmake /f neon.mak ZLIB_SRC=\path\to\zlib ZLIB_DLL=yes - - -Build neon with IPv6 support -____________________________ - -To build neon with support for IPv6, use parameter ENABLE_IPV6. - - nmake /f neon.mak ENABLE_IPV6=yes - -This requires a copy of the Platform SDK which contains the IPv6 -headers and libraries. - -Build neon with debugging support -_________________________________ - -Set the DEBUG_BUILD parameter - - nmake /f neon.mak DEBUG_BUILD=yes - -It does not matter what value DEBUG_BUILD is set to, as long as it is -not set to "". - -After compiling the library, the directory contains libneonD.lib, -against which you can link your program. diff --git a/client/neon-0.27.2/Makefile.in b/client/neon-0.27.2/Makefile.in deleted file mode 100644 index 8a032233e..000000000 --- a/client/neon-0.27.2/Makefile.in +++ /dev/null @@ -1,210 +0,0 @@ -# Copyright (C) 2001-2006 Joe Orton -# Copyright (C) 1994, 1995-8, 1999, 2000 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. - -# libtool bits mostly stolen from libxml and libtool/demo - -SHELL = @SHELL@ - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -bindir = @bindir@ -libdir = @libdir@ -mandir = @mandir@ -man1dir = $(mandir)/man1 -man3dir = $(mandir)/man3 -datadir = @datadir@ -docdir = $(datadir)/doc/neon-@NEON_VERSION@ -includedir = @includedir@ -neonincludes = $(includedir)/neon -pkgconfigdir = $(libdir)/pkgconfig -localedir = $(datadir)/locale - -top_srcdir = @top_srcdir@ -top_builddir = . -srcdir = @srcdir@ -VPATH = @srcdir@ - -@SET_MAKE@ - -LDFLAGS = -L. @LDFLAGS@ -LIBS = @LIBS@ -CC = @CC@ -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL = @INSTALL@ -transform = @program_transform_name@ - -LIBTOOL = @LIBTOOL@ -XMLTO = xmlto -GCOV = gcov -XGETTEXT_OPTS = --keyword=_ --keyword=N_ --msgid-bugs-address=neon@webdav.org \ - --default-domain=neon --flag ne_print_request_header:3:c-format \ - --flag ne_snprintf:3:c-format --flag ne_vsnprintf:3:c-format \ - --flag ne_set_error:2:c-format -POTFILE = $(top_srcdir)/po/neon.pot -XGETTEXT = xgettext -MSGFMT = msgfmt -MSGMERGE = msgmerge - -LINGUAS = @ALL_LINGUAS@ - -# The headers to distribute - making up the public interface of neon -DIST_HEADERS = ne_request.h ne_session.h ne_utils.h ne_uri.h ne_socket.h \ - ne_basic.h ne_207.h ne_props.h ne_xml.h ne_dates.h ne_string.h \ - ne_defs.h ne_locks.h ne_alloc.h ne_md5.h ne_i18n.h ne_redirect.h \ - ne_auth.h ne_compress.h ne_acl.h ne_ssl.h ne_xmlreq.h - -all: subdirs - -check: subdirs - @cd test && $(MAKE) check - -# Useful for doing coverage analysis; use e.g.: -# make TESTS=string-tests MODULE=ne_string.c cover -cover: subdirs - @rm -f src/*.*da test/common/*.*da test/*.*da - @cd test && $(MAKE) check - @cd src && $(GCOV) -cb $(MODULE) - -# as per 'cover' target; prints list of functions without 100% coverage -uncover: subdirs - @rm -f src/*.*da test/common/*.*da test/*.*da - @cd test && $(MAKE) check - @cd src && $(GCOV) -cb $(MODULE) - @grep ^function src/$(MODULE).gcov | grep -v 'executed 100' | sort -nr -k 9,9 - -subdirs: - @cd src && $(MAKE) - -# Uses Tim Waugh's excellent "xmlto" utility, see -# http://cyberelk.net/tim/xmlto/. (The docs target is executed at release -# time before generating a .tar.gz) -docs: docs-man docs-html - -docs-man: - rm -rf doc/man; mkdir doc/man - $(XMLTO) -o `pwd`/doc/man man doc/manual.xml - -docs-pdf: - $(XMLTO) -o `pwd`/doc pdf doc/manual.xml - -docs-ps: - $(XMLTO) -o `pwd`/doc ps doc/manual.xml - -docs-html: - test -d doc/html && rm -rf doc/html || true - mkdir doc/html - $(XMLTO) -o `pwd`/doc/html -x doc/html.xsl html doc/manual.xml - -# Validate the manual source -docs-valid: - xmllint --noout --valid doc/manual.xml - -clean: - @cd src && $(MAKE) clean - @cd test && $(MAKE) clean - -distclean: clean - rm -rf Makefile config.h neon.pc config.status src/Makefile libtool config.log config.cache neon-config autom4te*.cache test/Makefile - -again: clean - -Makefile: Makefile.in - @./config.status Makefile - -neon-config: neon-config.in - @./config.status neon-config - -install-docs: install-man install-html - -install-html: - $(INSTALL) -d $(DESTDIR)$(docdir)/html - for d in $(srcdir)/doc/html/*.html; do \ - $(INSTALL_DATA) $$d $(DESTDIR)$(docdir)/html; \ - done - -install-man: - $(INSTALL) -d $(DESTDIR)$(man3dir) - $(INSTALL) -d $(DESTDIR)$(man1dir) - for m in $(srcdir)/doc/man/*.3; do \ - $(INSTALL_DATA) $$m $(DESTDIR)$(man3dir); done - for m in $(srcdir)/doc/man/*.1; do \ - $(INSTALL_DATA) $$m $(DESTDIR)$(man1dir); done - -install: install-@ALLOW_INSTALL@ - -install-memleak: - @echo "ERROR: The neon internal memory leak checking code is for testing" - @echo "ERROR: purposes only; this copy of neon must not be installed." - @false - -install-yes: install-lib install-headers install-config install-docs install-nls - -# libtool does all the necessary magic here -install-lib: subdirs - $(INSTALL) -d $(DESTDIR)$(libdir) - $(LIBTOOL) --mode=install $(INSTALL) src/libneon.la \ - $(DESTDIR)$(libdir)/libneon.la - -install-headers: - $(INSTALL) -d $(DESTDIR)$(neonincludes) - @for h in $(DIST_HEADERS); do \ - echo Installing $$h into $(DESTDIR)$(neonincludes); \ - $(INSTALL_DATA) $(srcdir)/src/$$h $(DESTDIR)$(neonincludes)/$$h \ - || exit 1; \ - done - -install-config: neon-config neon.pc - $(INSTALL) -d $(DESTDIR)$(bindir) - @echo Installing neon-config into $(DESTDIR)$(bindir) - @$(INSTALL_SCRIPT) neon-config \ - $(DESTDIR)$(bindir)/`echo neon-config|sed '$(transform)'` - $(INSTALL) -d $(DESTDIR)$(pkgconfigdir) - $(INSTALL_DATA) neon.pc $(DESTDIR)$(pkgconfigdir)/neon.pc - -install-tests: install-lib - @cd test && make install - -install-nls: install-nls-@NE_FLAG_I18N@ - -install-nls-no: - @echo NLS not enabled. - -install-nls-yes: - @for f in $(LINGUAS); do \ - $(INSTALL) -d $(DESTDIR)$(localedir)/$$f/LC_MESSAGES; \ - $(INSTALL_DATA) $(srcdir)/po/$$f.gmo $(DESTDIR)$(localedir)/$$f/LC_MESSAGES/neon.mo; \ - done - -ChangeLog: - svn log > $@ - -update-po: - @xgettext $(XGETTEXT_OPTS) $(top_srcdir)/src/ne*.c -o $(POTFILE) - @for f in $(LINGUAS); do \ - echo "> Updating \"$$f\" catalog:"; \ - $(MSGMERGE) --update $(top_srcdir)/po/$$f.po $(POTFILE); \ - $(MSGFMT) --output /dev/null --check-format $(top_srcdir)/po/$$f.po || exit 1; \ - done - -compile-gmo: - @for f in $(LINGUAS); do \ - echo "> Compiling \"$$f\" catalog:"; \ - $(MSGFMT) --statistics -c -o po/$$f.gmo $(top_srcdir)/po/$$f.po; \ - done - -doc-status: - @echo -n "Missing docs for:" - @for f in `nm src/.libs/libneon.so | grep ' T ' | colrm 1 11`; do \ - test -f doc/man/$$f.3 || echo -n " $$f"; \ - done; echo - diff --git a/client/neon-0.27.2/NEWS b/client/neon-0.27.2/NEWS deleted file mode 100644 index 9ab353fd4..000000000 --- a/client/neon-0.27.2/NEWS +++ /dev/null @@ -1,1126 +0,0 @@ -Changes in release 0.27.2: -* Fix crash in GSSAPI Negotiate response header verification (regression - since 0.26.x) - -Changes in release 0.27.1: -* Fix regression in response progress counter for notifier/progress callbacks -* Fix interface description for ne_set_notifier() callback; sr.total - is set to -1 not 0 for an indeterminate response length - -Changes in release 0.27.0: -* New interfaces: - - ne_session.h: ne_fill_proxy_uri() retrieves configured proxy, - ne_hook_post_headers() adds a hook after response headers are read, - ne_set_connect_timeout() sets session connection timeout, - NE_SESSFLAG_RFC4918, NE_SESSFLAG_CONNAUTH flags added - - ne_socket.h: ne_sock_connect_timeout() sets connection timeout, - ne_iaddr_reverse() performs reverse DNS lookup - - ne_string.h: ne_buffer_snprintf() prints to a buffer object - - ne_xml.h: ne_xml_resolve_nspace() resolves namespace prefixes -* Interface changes: - - ne_set_notifier() replaces ne_set_status(); finer-grained and type-safe - connection status information now provided; obsoletes ne_set_progress() - - ne_xml_dispatch_request() now only invokes the XML parser for - response entities with an XML content-type, following RFC 3023 rules - - ne_acl_set() now takes a "const" entries array - - LFS compatibility functions *64 removed: all functions taking an - off_t now take an ne_off_t which is off64_t for LFS builds -* GnuTLS support now mostly feature-complete with OpenSSL support: - - greatly improved SSL distinguished name handling with GnuTLS >= 1.7.8 -* Other changes: - - descriptive error messages for authentication failures - - SSPI support uses canonical DNS server name (Yves Martin) - - fixes for handling of "stale" parameter in Digest authentication - - added support for URIs in SSL server certificate subjectAltName field - - fix compiler warnings with expat 2.x - - fix handling of "Transfer-Encoding: identity" responses from privoxy - -Changes in release 0.26.4: -* Fix Negotiate Authentication-Info response header verification with GSSAPI -* Fix multiple handlers with ne_add_{server,proxy}_auth (Werner Baumann) -* Fix SSPI build with some versions of MinGW (Gisle Vanem) -* Fix for SSPI segfault in response header verification (Mike DiCuccio) -* Fix error strings for CONNECT SSL proxy tunnel request failure -* Fix install-nls for VPATH builds (Hans Meine) -* Fix use of unencrypted client certs with GnuTLS -* Fix ne_lock* If: header insertion to use CRLF-terminated headers -* Fix test suite failures on QNX by working around send() length limit -* Fix handling of POSIX strerror_r failure case in ne_strerror -* Fix alignment issues in test suite MD5 code - -Changes in release 0.26.3: -* Fix buffer under-read in URI parser (Laszlo Boszormenyi, CVE-2007-0157) -* Fix regression in handling of "attempt" argument passed to auth callbacks; - ensure the value only increments for each invocation of the callback -* Fix handling of "nextnonce" parameter in Digest authentication - -Changes in release 0.26.2: -* Fix error reported for LOCK responses lacking a Lock-Token header. -* Use Libs.private in neon.pc for newer versions of pkg-config. -* Build fix for platforms without libintl.h. -* Build fixes for MinGW. (Matthias Miller) -* Build fix for h_errno detection on HP-UX 10. (Albert Chin) -* Win32: enable debugging; build fixes with some SDKs. (Kiyo Kelvin Lee) - -Changes in release 0.26.1: -* Build fixes for Win32 (D.J. Heap) and OS X. -* Add Simplified Chinese translation (Dongsheng Song). - -Changes in release 0.26.0: -* Added internationalization support: - - ne_i18n.h exposes ne_i18n_init(), a process-global initializer - which may be required for some applications - - (partial) message catalogs for cs, de, fr, ja, nn, ru and tr - - NE_FEATURE_I18N feature code added to indicate support -* Added support for GnuTLS (thanks to Aleix Conchillo Flaque): - - pass --with-ssl=gnutls to configure; GnuTLS >= 1.0.22 required - - use --with-ca-bundle to specify a default SSL CA root bundle - - some remaining issues with PKCS#12 certs in current GnuTLS releases, - distinguished name handling is sub-standard relative to OpenSSL -* Changes and additions to URI support: - - ne_uri structure: add query, fragment fields; authinfo renamed - to userinfo - - ne_uri_parse() now takes a URI-reference as input rather than - the previous pseudo-URI syntax; the query and fragment components - are now parsed out. Many malformed URIs are now rejected - - ne_uri_unparse() changed to respect the new fields - - ne_uri_resolve(): new function; resolves relative URI references - - ne_uri_copy(): new function, copies a URI structure -* Changed results callbacks for ne_lock_discover, PROPFIND interfaces: - - take URI as parsed ne_uri * structure rather than char * -* Added functions which give control over authentication protocol use: - - ne_add_server_auth(), ne_add_proxy_auth() -* Added ne_unhook_* functions to remove hooks -* Added ne_set_session_flags()/ne_get_session_flags() functions: - - flags to disable persistent connection support, enable "ICY" - protocol support, and to disable SSLv2 protocol support. - - replaces ne_set_persist() -* Added ne_set_request_flags()/ne_get_request_flags() functions: - - flags to enable 100-continue support, mark requests as non-idempotent - - replaces ne_set_request_expect100() -* Change ne_md5.h interface to make struct ne_md5_ctx opaque: - - added ne_md5_create_ctx(), ne_md5_destroy_ctx(), ne_md5_reset_ctx(), - ne_md5_finish_ascii(); removed ne_md5_init_ctx() - - fix alignment issues which could cause crashes in Digest code -* Fixed ne_get_range(), added ne_get_range64() (thanks to Lennart Poettering) -* Removed NE_FREE() macro from ne_alloc.h -* Added ne_strcasecmp(), ne_strncasecmp(), ne_tolower() functions - to ne_string.h - locale-independent string comparison -* Changed ne_sock_init()/ne_sock_exit() such that ne_sock_exit() - only has effect once called an equal number of times to _init(). -* Added "--enable-threadsafe-ssl=posix" configure flag, to enable - thread-safe SSL support using POSIX threads in OpenSSL/GnuTLS - - NE_FEATURE_TS_SSL feature code added to indicate support -* The manual is now licensed under the GPL rather than the GFDL - -Changes in release 0.25.5: -* ne_ssl_clicert_decrypt(): catch and fail to load a client cert - with mismatched key/cert pair. -* Fix build issue on AIX 5.1. -* Fix warnings if built against OpenSSL >= 0.9.8. -* Win32: fix issues in SSPI implementation (Stefan Kng). - -Changes in release 0.25.4: -* GSSAPI fixes for non-MIT implementations (Mikhail Teterin). -* Fix ne_print_request_header() et al to use 8K buffer size on all - platforms (fixes issue with long Destination: URLs on Win32). -* Win32 build fix for !USE_GETADDRINFO configuration. -* Documentation updates. - -Changes in release 0.25.3: -* ne_lock() and ne_unlock(): fix cases where NE_ERROR would be returned - instead of e.g. NE_AUTH on auth failure. -* Prevent use of poll() on Darwin. -* Fix gethostbyname-based resolver on LP64 platforms (Matthew Sanderson). - -Changes in release 0.25.2: -* Really fix the Win32 build. - -Changes in release 0.25.1: -* ne_get_content_type(): fix cases where the charset field was not set - to NULL after successful return (Johannes Schneider) -* Compressed response handling fixes: - - fix double invocation of reader callback with len=0 - - fix cases where the reader callback return value was ignored -* Cache the new SSL session if the old one was expired (Robert Eiglmaier) -* Win32: fix build issues. - -Changes in release 0.25.0: -* New interfaces: - - ne_get_response_header() replaces ne_add_response_header_handler - - ne_read_response_to_fd() and ne_discard_response() for use with - ne_begin_request/ne_end_request style response handling - - ne_xmlreq.h: ne_xml_parse_response() and ne_xml_dispatch_request() - - ne_has_support() for feature detection, replaces ne_support_ssl() - - ne_set_addrlist() can be used to bypass normal DNS hostname resolver - - ne_buffer_czappend(), convenience wrapper for ne_buffer_append. - - ne_iaddr_typeof() returns type of a socket object - - ne_get_content_type() replaces ne_content_type_handler() - - ne_set_request_expect100() replaces ne_set_expect100() -* New interfaces on LFS systems for large file support: - - ne_set_request_body_fd64() call for using an fd opened using O_LARGEFILE - - ne_set_request_body_provider64(), takes an off64_t length argument -* Interface changes: - - ne_set_request_body_fd takes offset and length arguments and returns void - - ne_set_request_body_provider takes length as off_t rather than size_t; - provider callbacks now MUST set session error string if returning an error - - response body reader callback returns an integer and can abort the response - - ne_decompress_destroy() returns void; errors are caught earlier - - ne_xml_failed() replaces ne_xml_valid(), with different return value logic - - ne_xml_parse() can return an error; ne_xml_parse_v() aborts the response if - the parse either fails or is aborted by a handler returning NE_XML_ABORT - - ne_path_escape() now escapes all but unreserved characters - - ne_ssl_clicert_name() and ne_ssl_cert_identity() clarified to return UTF-8 - - ne_ssl_clicert_name() clicert object argument is now const - - ne_uri_parse()/ne_uri_free() memory handling clarified - - removed the buffer length requirement for ne_read_response_block() -* Bug fixes: - - properly handle multiple Authentication challenges per request - - fixes and improvements to the Negotiate auth implementation - - handle proxies which send a 401 auth challenge to a CONNECT request - - XML: handle the UTF-8 BOM even if the underlying parser does not - - Win32: Fix timezone handling (Jiang Lei) - - ne_lock_refresh() works and will update timeout of passed-in lock - - persistent connection timeout handling fixes for CygWin et al - - impose hard limit of 1024 props per resource in ne_props.h response parsing -* New platform-specific features: - - Win32: Negotiate/NTLM support using SSPI (Vladimir Berezniker) - - Win32: Add IPv6 support using ENABLE_IPV6 neon.mak flag (Kai Sommerfeld) -* Removed features: - - the cookies interface has been removed - - removed functions: ne_service_lookup(), ne_put_if_unmodified() - - "qop=auth-int" support removed from Digest auth implementation -* Default XML parser search changed to check for expat before libxml2. - -Changes in release 0.24.7: -* Compression interface fixes: - - fix issues handling content decoding and request retries from - authentication challenges (Justin Erenkrantz) - - fix places where reader callback would receive spurious size=0 calls - - fix to pass user-supplied userdata to user-supplied acceptance callback -* Fix for RFC2617-style digest authentication (Hideaki Takahashi). -* Fix to pick up gethostbyname() on QNX 6.2. - -Changes in release 0.24.6: -* SECURITY (CVE CAN-2004-0398): Fix sscanf overflow in ne_rfc1036_parse, - thanks to Stefan Esser. -* Link libneon against libexpat during Subversion build using bundled neon. -* Win32 build script update (Jon Foster). - -Changes in release 0.24.5: -* SECURITY (CVE CAN-2004-0179): Fix format string vulnerabilities in - XML/207 response handling, reported by greuff@void.at. -* Performance fix: avoid seeding the SSL PRNG if not creating an SSL socket. -* ne_ssl_readable_dname() is now defined to return UTF-8 strings. -* Fix case where gssapi/gssapi_generic.h was included but not present. -* Fix ne_utils.c build on platforms where zlib does "#define const". -* Fix use of ne_proppatch_operation with some C++ compilers. -* Update libtool for fix to --enable-shared on Darwin. -* BeOS: check for gethostbyname in -lbind (David Reid). - -Changes in release 0.24.4: -* Ignore unclean SSL closure when response body is delimited by EOF - ("Could not read response body: Secure connection truncated" errors - with some buggy SSL servers). -* Fix test/ssl.c syntax errors with C89 compilers (Radu Greab). - -Changes in release 0.24.3: -* Respect configure's --datadir argument (Max Bowsher). -* Fix build on Windows when OpenSSL is not used. -* Fix use of SSLv2 (spurious "Server did not present certificate" error). -* When using SSL via a proxy, prevent leaking server auth credentials - to the proxy, or proxy auth credentials to the server. - -Changes in release 0.24.2: -* Fix name resolver with some old versions of glibc. -* Fix problems with configure's "time_t format string" detection. -* Fix problems when a broken Kerberos installation is found. -* When verifying SSL certificates, check iPaddress names in the - subjectAltName extension. - -Changes in release 0.24.1: -* Add support for "GSS-Negotiate" Kerberos authentication scheme (from - Risko Gergely and Burjan Gabor). -* Disable Nagle to improve performance of small requests (thanks to - Jim Whitehead and Teng Xu). -* Fix compatibility with OpenSSL 0.9.6 (broken in 0.24.0). -* Fix prototype mismatch in ne_207.c. -* Define ssize_t from ne_request.h for Win32. -* Prevent segfault on zlib initialization failures. -* ne_sock_init does not fail if PRNG could not be seeded. -* Fix segfault in cookies code (Markus Mueller). -* Documentation updates. - -Changes in release 0.24.0: -* Major changes to XML interface: - - have the start-element callback either accept, decline, abort, - or return a state integer. - - remove 'struct ne_xml_elm'; callbacks are passed {nspace, name} - strings along with a state integer. - - dropped "collect", "strip-leading-whitespace" modes - - push responsibility for accumulating cdata onto caller; drop 'cdata' - argument from end-element callback. - - don't abort if no handler accepts a particular element, just ignore - that branch of the tree. - - dropped support for libxml 1.x and expat < 1.95.0. - - guarantee that start_element callback is not passed attrs=NULL - - add ne_xml_doc_encoding() to retrieve encoding of parsed XML document. -* Major changes to SSL interface: - - rewrite of interfaces for handling server and client certificates; - ne_ssl.h: many new functions available. - - only PKCS#12-encoded client certs are supported. - - changes to most names of SSL-related functions operating on an - ne_session, e.g. ne_ssl_load_cert->ne_ssl_trust_cert. - - client cert provider callback is passed the set of acceptable CA - names sent by the server - - the entire chain of certs presented by server is now accessible -* Remove unused ne_register_progress() from socket layer. -* Changes to resolver interface: ne_addr_first and _next return const; - ne_addr_print renamed to ne_iaddr_print; ne_iaddr_make and ne_iaddr_free - have been added. -* ne_request_create() now duplicates the method string passed in. -* ne_redirect_location() will now return NULL in some cases. -* Split socket creation to ne_sock_create() from ne_sock_connect: - - should report connect() error messages properly on Win32. -* Fix several memory leaks in error handling paths. -* Add a pkg-config file, neon.pc.in. - -Changes in release 0.23.9: -* Fix inability to connect on AIX 4.3. -* neon-config exports includes needed for OpenSSL given by pkg-config. -* ne_redirect_location will return NULL if redirect hooks have not - been registered for the session (Ralf Mattes ). - -Changes in release 0.23.8: -* SECURITY: Prevent control characters from being included in the - reason_phrase field filled in by ne_parse_statusline(), and in - the session error string. -* Disable getaddrinfo() support on HP-UX; fix resolver for HP-UX 11.11. -* Fix digest auth response verification for >9 responses in session - (bug manifests as "Server was not authenticated correctly" error). -* On Linux, skip slow lookup for IPv6 addresses when IPv6 support is - not loaded in kernel (thanks to Daniel Stenberg for this technique). -* Update to autoconf 2.57 and libtool 1.4.3. - -Changes in release 0.23.7: -* Fix for handling EINTR during write() call (Sergey N Ushakov). -* When available, use pkg-config to determine compiler flags needed to - use OpenSSL headers and libraries. - -Changes in release 0.23.6: -* Fixes for error handling in socket layer on Win32 from Johan Lindh - and Sergey N Ushakov : - - meaningful error messages rather than "No error" - - handle persistent connection timeouts properly -* Fix to use RFC2617-style digest auth when possible (had reverted to - only using RFC2068-style in 0.16.1). -* Fix NULL pointer dereference on certain ill-formed PROPFIND responses. -* Allow ne_sock_init to re-initialize after ne_sock_finish has been called - (Sergey N Ushakov). - -Changes in release 0.23.5: -* Fix rejection of SSL server certificates which had commonName as - the least specific attribute in the subject name. -* Fix to dereference entities (e.g. "&") in attribute values with libxml. -* Fix ne_socket.c build on HP-UX 10.20 (thanks to Branko ibej) -* Remove misguided insistence on "secure" versions of zlib/OpenSSL; - no checks for zlib version are now performed, only OpenSSL 0.9.6 is - required. --with-force-ssl, --with-force-zlib option removed. -* Add --with-egd[=PATH] option, conditionally enable EGD support; either - using EGD socket at PATH, or fall back on system defaults. $EGDSOCKET - and $HOME/.entropy are no longer used. -* Add support for `--la-file' argument to neon-config, which prints the - full path of the installed libneon.la file. - -Changes in release 0.23.4: -* Ignore an unclean SSL shutdown on persistent connection timeout - (fixing spurious "Secure connection truncated" errors). -* Fix a segfault on second and subsequent requests using a given - session, when the first fails with NE_LOOKUP. -* Fix configure for gcc installations which produce warnings by default - (such as gcc on hppa2.0n-hp-hpux11.00 using native as) - -Changes in release 0.23.3: -* Further build fixes for Win32 (Blair Zajac). -* Another fix for use of SSL against Tomcat 3.2. - -Changes in release 0.23.2: -* Build fix for Win32 (Blair Zajac). - -Changes in release 0.23.1: -* Identify as correct version, not 0.22. - -Changes in release 0.23.0: -* Improved address resolver (ne_addr_*) replacing ne_name_lookup(): - - use getaddrinfo() if found; include support for IPv6 (based on work - by Noriaki Takamiya ) -* For a hostname with multiple addresses, each address is tried in turn - until a connection is made. -* Support for seeding OpenSSL's PRNG via $EGDSOCKET or $HOME/.entropy, - to enable SSL on platforms which lack a /dev/random device. -* RFC2818 compliance for certificate identity checks in SSL: - - use `dNSname' values in subjectAltName extension if present - - hostname comparison fixed to not be case-sensitive -* Fix interop with buggy SSL implementation in Tomcat 3.2. -* Added NE_DBG_SSL debug channel. -* ne_strerror changed to return the passed-in buffer. -* Added ne_strnzcpy macro to ne_string.h. -* Win32 build fixes, improvements, and documentation updates, from - Blair Zajac . -* Fix ne_sock_init so SIGPIPE signals are ignored even if SSL library - initialization fails (e.g. platforms without /dev/random). -* Added reference documentation: - - ne_sock_init, ne_addr_*. - -Changes in release 0.22.0: -* Remove the const qualifier from the reason_phrase field in ne_status. - - ne_parse_statusline() now strdup's the reason_phrase -* Remove the status_line argument from ne_207_end_propstat and _end_response -* Change ne_session_create, ne_session_proxy, ne_sock_connect, and the - 'port' field of the ne_uri structure to use an unsigned int for port numbers -* ne_uri_defaultport returns unsigned and '0' on an unknown port (not -1). -* Changes to hooks interface: - - pass an ne_request pointer to per-request hooks - - replace "accessor" hooks with ne_{get,set}_{request,session}_private -* Authentication changes: - - the hooks changes fix a segfault if auth is enabled for an SSL session - through a proxy server - - fix ne_forget_auth segfault if either proxy or server auth are not used -* Improvements to persistent connection retry logic and error handling - in request code; fixing some cases where some errors where incorrectly - treated as a persistent connection timeout - - a TCP RST at the appropriate time is now treated as a persistent - connection timeout. - - handle persistent connection timeouts on SSL connections -* Changes to SSL support: - - improved error handling - - OpenSSL 0.9.6f or later is required for security fixes and functional - correctness; 0.9.6 or later required for functional correctness - - use --with-force-ssl to override OpenSSL version check - - fix for proxy CONNECT tunnelling with some proxies (e.g. Traffic-Server) - - fix potential segfault if client cert. provider callback is used - - fix to use supplied password callback for PEM-encoded client certificates - (Daniel Berlin ) -* strerror_r is used if available for thread-safe error handling. -* Remove ne_read_file(). -* ne_version_match replaces ne_version_minimum (semantics changed slightly). -* XML request bodies use a content-type of "application/xml" now; - applications can use NE_XML_MEDIA_TYPE from ne_xml.h -* Fix decompress code on big-endian or 64-bit platforms. -* Fix to build on Darwin 6 (aka Mac OS X 10.2) (Wilfredo Snchez, - ) -* Win32 changes: - - remove conflict between OpenSSL's X509_NAME and recent versions of - the Platform SDK (Branko ibej) - - fix inverted debug/non-debug build logic (Branko ibej) - - add NODAV and OPENSSL_STATIC flags to neon.mak (Gerald Richter) - -Changes in release 0.21.3: -* Fix segfault if using proxy server with SSL session and server - certificate verification fails. -* Fix leak of proxy hostname once per session (if a proxy is used). -* Add --with-libs configure argument; e.g. --with-libs=/usr/local picks - up any support libraries in /usr/local/{lib,include} - -Changes in release 0.21.2: -* Fix 'make install' for VPATH builds. -* Use $(mandir) for installing man pages (Rodney Dawes). -* Follow some simple (yet illegal) relativeURI redirects. -* Always build ne_compress.obj in Win32 build (Branko ibej). -* Fix decompression logic bug (Justin Erenkrantz ) - (could give a decompress failure for particular responses) -* Fix ne_proppatch() to submit lock tokens for available locks. -* More optimisation of ne_sock_readline. - -Changes in release 0.21.1: -* Don't include default SSL port in Host request header, which can - help interoperability with misbehaving servers (thanks to Rodney Dawes - ). -* Don't give a "truncated response" error from ne_decompress_destroy if - the acceptance function returns non-zero. -* Fix for Win32 build (Sander Striker ). -* Fix for cookie name/value being free()d (thanks to Dan Mullen). -* Optimisation of ne_sock_readline. - -Changes in release 0.21.0: -* Socket layer implements read buffering; efficiency and performance - improvement. Based on work by Jeff Johnson -* Cleanup of socket interface: - - renamed everything, s/sock_/ne_sock_/, s/SOCK_/NE_SOCK_/ - - removed unused and inappropriate interfaces. - - renaming done by Olof Oberg - - see src/ChangeLog for the gory details. -* Fix typoed 'ne_destroy_fn' typedef (Olof Oberg). -* Support OpenSSL/ENGINE branch. -* Bogus ne_utf8_encode/decode functions removed. -* ne_base64() moved to ne_string.[ch]. -* ne_token drops 'quotes' parameter; ne_qtoken added. -* ne_buffer_create_sized renamed to ne_buffer_ncreate. -* ne_xml_get_attr takes extra arguments and can resolve namespaces. -* ne_accept_response function type takes const ne_status pointer. -* Drop support for automatically following redirects: - - ne_redirect_register just takes a session pointer - - ne_redirect_location returns an ne_uri pointer -* configure changes: --with-ssl and --with-socks no longer take a directory - argument. To use SOCKS or SSL libraries/headers in non-system locations, - use ./configure CPPFLAGS=-I/... LDFLAGS=-L/... -* Reference documentation included for most of ne_alloc.h and ne_string.h, - and parts of ne_session.h and ne_request.h. - - see installed man pages, HTML documentation. - -Changes in release 0.20.0: -* Major changes to DAV lock handling interface (ne_locks.h): - - struct ne_lock uses a full URI structure to identify locked resource - - ne_lock() requires that owner/token fields are malloc-allocated (or NULL) - on entry - - introduce a "lock store" type, ne_lock_store, to replace the lock session; - accessor functions all renamed to ne_lockstore_*. - - ne_lock_iterate replaced with a first/next "cursor"-style interface - - If: headers use an absoluteURI (RFC2518 compliance fix). - - fix for handling shared locks on DAV servers which return many active locks - in the LOCK response (thanks to Keith Wannamaker) -* Moved URI/path manipulation functions under ne_* namespace (ne_uri.h): - - path handling functions renamed to ne_path_* - - URI structure handling to ne_uri_*; struct uri becomes ne_uri. - - ne_uri_parse doesn't take a 'defaults' parameter any more - - if URI port is unspecified, ne_uri_parse sets port to 0 not -1. - - added ne_uri_unparse and ne_uri_defaultport functions. -* New 'ne_fill_server_uri' function to initialize a URI structure with - the server details for a given session (useful with locks interface). -* ne_decompress_{reader,destroy} are defined as passthrough-functions - if zlib support is not enabled. -* API change: ne_ssl_provide_fn returns void not int. -* Added NE_SSL_FAILMASK for verify failure sanity check. -* Removed return codes NE_SERVERAUTH and and NE_AUTHPROXY; correct - documentation, NE_PROXYAUTH is given for proxy auth failure. -* Require zlib >= 1.1.4 to avoid possible vulnerability in earlier versions. - See http://www.gzip.org/zlib/advisory-2002-03-11.txt for more details. - (version check can be skipped by passing --with-force-zlib to configure) -* New 'ne_ssl_readable_dname' function to create a human-readable string - from an X509 distinguished name. -* Fix support for newer versions of libxml2 (thanks to Jon Trowbridge - ). -* Fix corruption of reason_phrase in status object returned by - ne_propset_status. -* More lenient handling of whitespace in response headers. -* ne_content_type_handler will give a charset of "ISO-8859-1" if no charset - parameter is specified for a text/* media type (as per RFC2616). -* Miscellaneous cleanups and fixes (Jeff Johnson ). - -Changes in release 0.19.4: -* Support bundled build of expat 1.95.x (Branko ibej). - -Changes in release 0.19.3: -* For platforms lacking snprintf or vsnprintf in libc, require trio. -* Add NE_FMT_OFF_T to fix Win32 build (Dan Berlin, Branko ibej). -* Fix SSL support in Win32 build (Branko ibej). - -Changes in release 0.19.2: -* Fix non-SSL build broken in 0.19.1. -* Working SOCKSv5 support (thanks to Torsten Kalix ) - -Changes in release 0.19.1: -* Add missing stubs for ne_ssl_* functions for non-SSL build. -* Fix some error messages in new SSL code. - -Changes in release 0.19.0: -* Major API change: ne_session_create now takes (scheme, hostname, port) - arguments: a session is clarified to be "a group of requests to a - certain server". - - removal of ne_session_server, ne_set_secure, and ne_set_proxy_decider - - ne_session_proxy returns void. - - DNS lookups are delayed until request dispatch time. -* Significant improvements to TLS/SSL support: - - SSL is enabled if scheme passed to ne_session_create is "https" - - new interfaces to load CA certs and to load SSL library's bundled CA certs - - add server cert verification callback. An SSL connection to a server - with an unknown CA will now fail unless a verification callback is used. - - enable SSL session caching (performance improvement) - - support for wildcard server certs where commonName is "*.example.com". - - thanks to Tommi Komulainen for the contribution of code from mutt's - IMAP/SSL implementation under the LGPL, from which bits of this were derived. -* Improved SSL client certificate support: - - far simpler interface, all done at ne_session.h level. - - supports PKCS#12 and PEM-encoded certificates. - - optional callback for only providing client when demanded by server. -* Support for TLS upgrade is removed, since it isn't useful. -* If NEON_SSL is defined, API extensions are available to: - - allow access to the SSL_CTX * to adjust session SSL options - - retrieve the server certificate (X509 *) -* Decompress fixes: - - fix potential segfault in ne_decompress_destroy - - check the CRC of the deflated output (and fail if it doesn't match) - - fail appropriately on truncated responses, and trailing bytes in response. -* Added ne_set_read_timeout to use configurable timeout on socket reads. -* Malformed response headers will be ignored rather than failing the request. -* ne_set_error takes printf-style vararg. -* Fixes for ne_get_range and improve error handling. -* Functions which append to an ne_buffer do not return a success value, - but they do use ne_realloc/ne_malloc under the hood now, so an OOM callback - will be used (with the usual caveats). -* XML interface does not strip leading whitespace from cdata by default, - the NE_XML_STRIPWS flag is available to restore this feature if required. -* Upgraded to libtool 1.4.2: - - should fix --enable-shared on Mac OS X 10.1 -* Test suite now contains over one hundred tests. - -Changes in release 0.18.5: -* Removed old neon.dsp, neon.dsw. -* Update Win32 build to add OpenSSL and zlib support (Branko ibej). -* Fix ne_compress.c to compile on Win32 (Branko ibej). - -Changes in release 0.18.4: -* Fixes for Content-Type parsing using ne_content_type_handler (Greg Stein) - - also now parses the charset parameter from header value. -* Removed ne_concat() function, which didn't work and wasn't used. - -Changes in release 0.18.3: -* Fix parsing lock timeout from server (Arun Garg). -* Send Timeout headers in LOCK and refresh LOCK requests (Arun Garg). -* Updated neon.mak and config.hw.in for Win32 build (patch from - Branko ibej ). -* Define XML_BYTE_ORDER for bundled expat build in support macro - NEON_XML_PARSER(). - -Changes in release 0.18.2: -* Fix --with-neon=PATH in support macros. -* Support DESTDIR in Makefile install targets (patch by - Pawel Golaszewski ). -* Portability fixes: - - fix configure check for time_t on some platforms (e.g Solaris 2.6). - - remove expect100_works bitfield in ne_session structure (thanks to - Yan Periard ). - -Changes in release 0.18.1: -* Minor fix for authentication: "attempt" counter was not reset correctly - after authentication failed, so subsequent requests would not authenticate - correctly either. -* API change: ne_session_destroy returns void (there was no error case). -* Portability fixes (non-GCC compilers, 64-bit platforms, UnixWare 7) -* Optimisations in string manipulation routines. -* config.hw is included in the release tarball again. -* Improvements in the autoconf support macros: - - check for neon-config in PATH if --with-neon is not given - - stop if --with-neon is used, and the check for external neon fails - - added NEON_WITHOUT_ACL to prevent build of ne_acl.o - -Changes in release 0.18.0: -* API change: authentication callback is passed fixed-size username/password - buffers, and an 'attempt' counter. Authentication is retried *forever* - until either it succeeds, or the callback returns non-zero. -* API clarifications: - - ne_propname may have a NULL nspace field, indicating the property has no - namespace. This holds for properties returned by the propfind interfaces. - - added NE_ELM_PROPS_UNUSED as the lowest element number which should - be used with handlers added to the XML parser returned by - ne_propfind_get_parser. -* Fixes and cleanups of lock discovery interface. -* Fix for short write handling in ne_get() (thanks to rado ). -* Fix for XML namespace prefix handling where a prefix could be mapped to an - incorrect URI (e.g. in PROPFINDs against mod_dav with >10 namespaces used) -* Add '--support ' option to neon-config; the script exits with - success if given feature is supported. Known features are ssl, dav, zlib. -* Support for SSL, DAV, zlib is exported by neon.m4 as shell variable - NEON_SUPPORTS_{SSL,DAV,ZLIB}={yes,no} for bundled and external builds. -* `neon-config --cflags` won't include -I/usr/include for SSL build. -* Fix to call progress callbacks while sending request bodies again. -* Test changes: - - portability fixes, auth interface and progress tests. - -Changes in release 0.17.2: -* Accept Status-Lines with no reason phrase (Jeremy Elson). -* Fix handling of persistent connection timeout, and better error - handling if sending a request fails. -* Fix crashes in locking code. -* Return parse error on XML namespace prefix declaration with - an empty value. Thanks to Julian Reschke. -* Allow passing property names with NULL namespace to ne_proppatch. -* Fix for cross-compilation (Mo DeJong). -* Moved ne_propname definition from ne_207.h to ne_props.h. -* Test changes: - - updated for Status-Line parsing changes (Jeremy Elson) - - better persistent connection tests - - fixed for --disable-webdav build - -Changes in release 0.17.1: -* Add support for ACL method (Arun Garg ), - see ne_acl.h. -* Fixes and clean up of libraries exported via `neon-config --libs' -* Fix timezone handling when parsing dates (on some platforms). -* Upgrade to autoconf 2.52 and libtool 1.4 (thanks to Mo DeJong). -* Cleanup/simplification of request dispatching: - - better handling of error cases, including fix for a possible - infinite loop when the server closes the connection prematurely. -* Add '--without-zlib' configure option. -* Test changes: - - prettify output; imitate Perl test suite output. - - add tests for interim 1xx responses, persistent connections, more - unbounded operations. - -Changes in release 0.17.0: -* Add support for decoding gzip Content-Encoding: see ne_compress.h. - - built if zlib is found; `neon-config --cflags' will define NEON_ZLIB if so. -* Rewrite hooks interface to register individual callbacks. - - inspired by the Apache 2.0/APR hooks interface -* Register cookies hooks using ne_cookie_register(). -* Clean up configure scripts to enable use of autoconf 2.5x (Mo DeJong). -* Use new endianess configure macro to allow cross-compiling (Mo DeJong). -* Fix invalid C code in sock_init() in Win32 build (Mo DeJong). -* Fix use of signal() on Win32 (Mo DeJong). -* Workaround libxml 1.x string handling not being UTF-8. -* Test changes: - - add tests for decompression interface. - -Changes in release 0.16.1: -* Also handle write errors in ne_get_range. -* Dump request body blocks in debugging mode. -* Fix ne_shave() causing memory corruption when the result should - have been the empty string. -* Refactor auth header parsing code; more efficient now. - - fixes digest auth RFC2617-style broken in 0.16.0 - -Changes in release 0.16.0: -* API change: ne_copy takes a depth parameter (thanks to Arun Garg, Medha Atre) -* API change: validate callback to ne_xml also takes a userdata arg. -* Added 'ne_lock_refresh' for performing lock refresh (Arun Garg). -* Add SSL support to Win32 build (Peter Boos ) - (see INSTALL.win32 for details). Compile with USE_DAV_LOCKS also. -* Remove Server header parser for 100-continue support in ne_options. - (and remove broken_expect100 from ne_server_capabilities). -* Set SIGPIPE disposition to "ignored" in sock_init(). -* On platforms with setvbuf(), turn off buffering for the debug log - stream. -* Ignore repeated calls to sock_init(). -* Fixes to error handling in ne_get_range. -* Minor improvements to memory handling in auth code. -* Fix for start_propstat callback being called with NULL response - argument when given invalid XML, causing a segfault in propfind code. -* Test changes: - - add regression test for the propfind segfault. - - handle segfaults better (reap the child, flush the debug log). - -Changes in release 0.15.3: -* Fix --with-expat=DIR build. - -Changes in release 0.15.2: -* Fix Win32 for XML parser changes (Gerald Richter). -* Substitute versions into config.hw at distribution time. -* Add date parser for ISO8601-formatted dates as defined by RFC2518, e.g. - the creationdate property (Taisuke Yamada ). -* Fix Y2K bug in RFC1036 date parsing algorithm. -* Test changes: - - add tests for date parsing functions. - -Changes in release 0.15.1: -* Win32 update from Gerald Richter - - new files neon.mak, INSTALL.win32 -* Fix for ne_socket.h includes (Mo DeJong). -* More improvements for XML parser selection logic: - - if parser is required, be sure to fail configure if none is found. - - added --with-included-expat for bundled expat logic. -* Rename --enable-debugging to --enable-debug (Mo DeJong). - - added NEON_DEBUG macro to exported autoconf macros. -* Call progress callbacks for request bodies. -* Test changes: - - check that reading response headers is a bounded operation. - - use a pipe between child and parent to avoid race condition and - tedious sleep(). - -Changes in release 0.15.0: -* Major API renaming to use ne_/NE_ namespace: - - http_ to ne_, HTTP_ to NE_, dav_ to ne_, DAV_ to NE_, neon_ to ne_ - - hip_xml_ to ne_xml_, HIP_ELM_ to NE_ELM_, HIP_XML_ -> NE_XML_ - - sbuffer_ to ne_buffer_ - - DEBUG() to NE_DEBUG(), DEBUG_ to NE_DBG_ -* Type renames: - - http_req to ne_request - - sbuffer to 'ne_buffer *' -* Note, 'ne_buffer' is not an implicit pointer type, you must - specify the '*' now, e.g. 'ne_buffer *buf = ne_buffer_create();'. -* ne_buffer is no longer opaque. - - ne_buffer_data() removed: use buf->data instead. - - ne_buffer_size() is a macro. -* Header renames and additions: - - http_request.h -> ne_request.h - - Session code split into ne_session.h - - hip_xml.h -> ne_xml.h, nsocket.h -> ne_socket.h, http_utils.h -> ne_utils.h - - neon_md5.h -> ne_md5.h, dav_207.h -> ne_207.h - - http_basic.h and dav_basic.h merged into ne_basic.h -* New functions: - - ne_token and ne_shave, to obsolete split_string, shave_string. -* Removed: ne_get_request_headers(). -* autoconf changes: - - disable building shared neon library by default. - - option --enable-libxml is replaced by --with-libxml1 and - --with-libxml2 to force use of a particular parser. -* Fix auth code to only take MD5 digests of response body blocks when - necessary (thanks to Kai Sommerfeld). -* Fix alignment bug in MD5 code which could cause SIGBUS on Sparc - architectures (Kai Sommerfeld). -* Rewrite of request body handling: - - ne_set_request_body_fd replaces _stream, using an int fd rather than - a FILE *. - - added ne_set_request_body_provider to give a callback which is called - to provide request body blocks. - - removal of 'use_body' hook in favour of 'ne_pull_request_body' function - to allow hooks to manually read the request body. - - ne_{put,get,post,put_if_unmodified} all take an integer fd rather than a - FILE * stream. -* Test changes: - - added framework for testing "over the wire" (fork a server process) - - added tests for response message length handling, chunked responses, - header folding, sending request bodies. - - start at listing RFC2616 requirements and whether they are met - or not in test/STATUS. - - test for MD5 alignment bug on Sparc (thanks to Kai Sommerfeld). - -Changes in release 0.14.0: -* Add C++ inclusion safety to http_auth.h (Kai Sommerfeld). -* Define ssize_t on Win32. (Kai Sommerfeld). -* Add C++ inclusion safety to dav_locks.h and ne_alloc.h (thanks to - Gregor Bornemann ). -* Significant API change to properties code, to allow use of allprop - and complex properties: - - dav_propfind_set_complex and _set_flat are removed. - - add parameter to dav_propfind_named to take the list of property names - to be fetched. - - new function dav_propfind_set_private to set private callback. - - all properties not handled by caller are stored as flat properties. -* Untested: add basic SOCKSv5 support: configure --with-socks. - - please report success/failure to neon@webdav.org -* Win32/MSVC build files from Magnus Sirwi . -* Fix for expat detection from Shane Mayer . -* Namespace-protect md5 code and more. - - md5_* -> ne_md5_* - - ascii_to_md5 -> ne_ascii_to_md5 (and moved to neon_md5.h) -* Parse authinfo segment in URIs (Johan Lindh ). - - added 'authinfo' field to struct uri. -* New API: hip_xml_get_attr to retrieve attributes. -* Store language for properties, access with dav_propset_lang. - - only if property is defined on the property element itself. -* Started a simple test suite (test/*). - - includes some simple HTTP server tests. -* Remove "Content-Length: 0" header for request with no body, fixing - interop with Squid 2.3-STABLE1 (thanks to Kai Sommerfeld). -* http_parse_statusline skips leading whitespace. (Johan Lindh). -* Partial fix for timezone/date parsing problems. - -Changes in release 0.13.0: -* Fix ne_strndup allocating one byte less than it should (Kai Sommerfeld) - - if you use uri_parse, this bug may have caused subtle memory corruption - in your application. -* Revert API changes in 0.12: property values are not UTF-8 encoded/decoded - internally. (thanks to Greg Stein) -* Add another optional argument to NEON_BUNDLED macros, actions to - be run if bundled build is *not* selected. -* API change: added argument to http_add_hooks to register cleanup function - for the cookie. -* Removed dav_lock_unregister in favour of automatic cleanup when session - is destroyed. -* Fixed leaks in redirect code (Kai Sommerfeld). -* Fixed crashes in hip_xml_destroy (Kai Sommerfeld). -* Redirects to a different hostname/port/scheme are never followed: the request - will fail with HTTP_REDIRECT instead. Redirect notification callback is - only called for *followed* redirects. - New API: http_redirect_location() for retrieving location of last redirect. -* Authentication is now implemented as a hook, independently of http_request.c: - - API change: removed 'hostname' argument from auth callbacks. - - API change: you must now include http_auth.h from your application. - - Also fixes case of using server and proxy authentication simultaneously -* Added 'http_forget_auth' to clear authentication session. -* New API: http_session_hook_private for retrieving private per-session cookie - for hooks. -* API change: http_set_request_body_stream has a return error value. -* API change: http_set_request_body_buffer now takes the buffer length too. -* New API: caller-pulls interface for reading response body: - http_begin_request, http_end_request, http_read_response_block. - An alternative to using the (much simpler) http_request_dispatch. -* Make --disable-webdav build work. -* New API: dav_propnames for retrieving property names. -* New API: dav_propfind_get_request to access request object of handler. -* API change: progress and connection status callbacks implemented at - http_request.h level. Socket-level status callbacks removed, progress - callbacks made per-socket. -* Supports new expat (Sam TH ) -* Supports libxml2 (in preference to libxml1). -* API change: added namespace protection to base64 and dates functions: - all have ne_ prefix now. -* Fixed ranged GETs where a specific range is requested (Johan Lindh - ). -* Limit number of response header fields to 100. -* Allow requests for the '*' URI even if a proxy server is in use. -* libxml: Get useful error messages for parse errors. - -Changes in release 0.12.0: -* Portability fixes to http_request.c and http_auth.c. - - fixes digest auth on big-endian architectures. -* Fix warnings from stray tokens after #endif's in uri.h and string_utils.h. -* Add C++ inclusion safety to http_redirect.h (Kai Sommerfeld - ). -* Make redirects to a different host work (Kai Sommerfeld). -* Fix reading response bodies when non-chunked and no Content-Length - (Kai Sommerfeld). -* API change: 'http_add_hooks takes a 'const' request object. -* Fixed memory leaks in session hooks (thanks to Kai Sommerfeld). -* Fix passing NULL props argument to dav_simple_propfind, to support - allprop requests. -**** MAJOR INTERFACE CHANGE **** - - URIs passed to http_request_create() are NOT escaped by neon. You - MUST do this yourself to remain HTTP compliant, using e.g. - uri_abspath_escape. (Kai Sommerfeld) -* Added --disable-webdav flag to configure, to disable DAV support in - the library. This allows building neon without an XML parser. -* Corresponding NEON_WITHOUT_WEBDAV macro for use in bundled builds. -* Fix Makefile dependancies. -* A bundled neon directory builds or doesn't build automatically - (i.e. you recurse into it unconditionally). -* API clarification: - - dav_propset_status may return NULL if the server does not return - a response for the given property (issue is open for debate). -* API change up for debate: - - Property values to dav_proppatch are UTF-8 encoded internally. - - Property values in dav_propfind_* are UTF-8 decoded internally. -* API additions: ne_realloc, ne_utf8_encode. - -Changes in release 0.11.0: -* Added SSL client certificate support with 'sock_set_client_cert'. - - Supports certs in PEM-encoded files. - - Specify a callback for prompting the user for the password with - sock_set_key_prompt. -* Added 'ne_oom_callback', to register a callback which is used if - malloc() returns NULL. (Mike Rosellini ) -* Register appropriate callback with libxml to handle ). - -Changes in release 0.10.1: -* Default expect-100 to OFF. - -Changes in release 0.10.0: -* hip_xml API changes: - - The search for a handler for a new child element begins at the - handler of the parent element, and carries on up the stack. - (previously, it always started from the base of the stack) - - Documentation written: doc/parsing-xml.txt -* Remove memory leaks and tidy debugging output in new properties code. -* API changes to DAV locking interface: - - New function: dav_lock_copy to copy a lock object. - - Re-ordered arguments to callback of dav_lock_discover, and made the - lock object passed back const. - - Fix leaks and crashes due to vague interface definitions. -* API change to dav_propfind_set_complex: use a callback to return the - 'private' structure. -* NEON_NORMAL_BUILD and NEON_LIBTOOL_BUILD macros defined for setting - up neon's Makefile in a bundled build: see macros/neon.m4. -* NEON_VPATH_BUNDLED macro added which takes separate srcdir and - builddir arguments for supporting VPATH builds (thanks to Peter Moulder - ). -* Added optional final argument to NEON_(VPATH_)BUNDLED, which gives - a set of actions to be run if the bundled build is chosen. -* NEON_SSL checks for OpenSSL in /usr too. -* API change: when using http_session_decide_proxy, it MUST be called - before using http_session_server to prevent the DNS lookup on the origin - server being optimised out. The real scheme in use is passed to the - callback now. -* New function, dav_207_ignore_unknown, to ignore any unknown XML fragments - in the 207 response. Used by properties layer. - -Changes in release 0.9.2: -* Fix using both dav_propfind_set_complex and dav_propfind_set_flat with the - same propfind_handler. - -Changes in release 0.9.1: -* dav_propfind interface - - Guarantee that the 'private' structure will be initialized to zero on - creation. - - Make it the *callers* responsibility to free() the private structure. -* Fix a few arguments/variables which mirrored globally declared symbols. - -Changes in release 0.9.0: -* Removed old dav_propfind_* interface, replaced with a better, more - powerful, and easier to use interface: - - 'dav_simple_propfind' interface for just fetching "flat" (byte-string) - properties. - - 'dav_propfind_*' interface for fetching flat and/or "complex" (structured - XML) properties. - - Lets you retrieve the 'status' information, to see what happened if - fetching the property failed (e.g 404 Not Found). -* Fixes to doc/using-neon.txt (thanks to Greg Stein). -* Allow building when srcdir != builddir (Mo DeJong ) - -Changes in release 0.8.1: -* Fix segfault in PROPFIND code. - -Changes in release 0.8.0: -* Fix for using COPY/MOVE over SSL (thanks to David Sloat). -* Fix for using a proxy server and SSL. -* Added 'http_get_scheme' API call. -* Added 'http_redirect.h' to list of installed headers (thanks to everyone ;). -* Changes for building on Windows (Peter Boos ) -* Fixes for building on BeOS (Sam TH and David Reid - ). -* Add buffering to socket code for pre-BONE BeOS systems (David Reid). -* Interface changes for hip_xml: - - Renamed hip_xml_add_(mixed_)handler to hip_xml_push_(mixed_)handler - - Documentation updates. - - Added HIP_ELM_UNUSED for lowest element id which should be used. -*** MAJOR INTERFACE CHANGE *** - - Removed 'http_status *' pointer from http_request_dispatch. - - Added http_get_status(req) to retrieve the response-status information - instead. You don't have to declare an http_status object yourself now. -* Similarly, added DAV_ELM_207_UNUSED for lowest element id which should - be used by users of dav_207_* code (incl. use of dav_propfind_* - code). -* New NEON_* autoconf macro interface: - - Use NEON_BUNDLED if sources are bundled, otherwise NEON_LIBRARY. - - The NEON_XML_PARSER macro is NOT called automatically. You must - call this yourself if using NEON_BUNDLED; see doc/using-neon.txt - for details. -* Fix use of 'socket' in nsocket.h function prototypes (Greg Stein). -* Remove extra backslash at line 69 of src/Makefile.incl (Dirk Bergstrom). -* Examples directory is now a separate package. - -Changes in release 0.7.7: -* Another fix for linking against a libtool-built expat (Greg Stein). - -Changes in release 0.7.6: -* Better check for closed SSL connection after doing SSL_peek. (thanks - to Jeff Costlow ). -* Attempt at correct sock_block() implementation for SSL. -* sock_peek() will return SOCK_CLOSED correctly. - -Changes in release 0.7.5: -* Fixed workaround for linking against a libtool-built expat (Greg Stein). - -Changes in release 0.7.4: -* Fix for fd leak on connect failure (David Sloat ). -* Fix for Digest auth against IIS5 (David Sloat). -* Workaround for linking against a libtool-built libexpat.la (Greg Stein). - -Changes in release 0.7.3: -* Check for -lsocket and -linet in configure. -* Workaround for SSL problems. - -Changes in release 0.7.2: -* Define SHELL in Makefile (thanks to Eric Mumpower ). -* Added 'all' target to Makefile (Greg Stein ) -* Added '--with-expat' argument to configure (Greg Stein) -* Added 'dav_propfind_destroy' function. - -Changes in release 0.7.1: -* Don't register response body/header authentication callbacks if no - credentials-supplying callback has been registered (speed optimisation). - -Changes in release 0.7.0: -* Deprecated use of 'NULL' to http_add_response_header_handler. - New interface, http_add_response_header_catcher, to register - a callback which is passed ALL response headers regardless of name. -* Speed optimisation (~10%?): storing response-header handlers in a - hash table for faster look. -* New SBUFFER_CAST() macro for getting to the 'char *' of an sbuffer - as fast as possible. - -Changes in release 0.6.1: -* Fix for retrying request if connection is closed by server. -* Make redirect hook work for >1 request per session. - -Changes in release 0.6.0: -* New interface to allow following HTTP redirects (301/302 responses). - A callback must be given to get user confirmation if the request method - is not GET, HEAD, or PROPFIND. -* New interface to determine whether the proxy server should be used - for a given request: http_session_decide_proxy. -* Fix nget build again. Support automatic redirects in 'nget'. -* Add --with-extra-includes and --with-extra-libs configure parameters - to point configure at - -Changes in release 0.5.1: -* Prevent segfault if USE_DAV_LOCKS is defined, and a locking session - is not registered (thanks to David Sloat). - -Changes in release 0.5.0: -* Rename xmalloc, xstrdup etc to ne_malloc, ne_strdup etc. -* Some speed optimisation in response-header reading. -* Use 'off_t' rather than 'size_t' in sock_progress callback, - sock_readfile_blocked, and sock_transfer. - -Changes in release 0.4.2: -* Fix for sending request bodies after getting 100-continue response. - -Changes in release 0.4.1: -* Fix nget build. - -Changes in release 0.4.0: -* Install library headers into .../include/neon not .../include/libneon -* Install all necessary library headers. -* Compile support for WebDAV locking throughout the library -* Rename md5.h to neon_md5.h (avoids conflict with md5.h in OpenSSL) -* Rename socket.h to nsocket.h (avoids possible conflict with C library) -* Update licensing notice on macros/neon*.m4: note that these files are - NOT under the LGPL, and can be used in other packages regardless of - the license the package uses. -* Update NEON_LIBRARY m4 function to allow optional specification of - names of bundled neon/expat source directories. -* Increase socket read timeout to 60 seconds. -* Added an POST method: from Sander Alberink . -* Added 'http_get_request_headers' to return the sbuffer containing - all request headers. -* Allow passing NULL as name to http_add_response_header_handler: - the handler callback is passed the entire header string, of ALL - response headers. - -Changes in release 0.3.1: -* Compile fix for dav_locks.c (thanks to Paul D'Anna) - -Changes in release 0.3.0: -* Rewrite of socket handling layer. All sock_* functions changed. -* Added basic SSL support: --with-ssl (requires OpenSSL). - NOTE: Certificates are NOT presented for verification. -* 'nget' accepts URL's using the 'https' scheme. -* New example program, 'nserver', to display the Server: string, - e.g. 'nserver https://www.eu.c2.net/' -* Fixed request re-send when persistent connection times out. -* "Hooks" support: allow external hooks into the HTTP request/ - response dispatch loop. -* New printf-style interface for adding request headers. -* Make symbols used in header files C++-safe (Tom Bednarz). -* WebDAV locking support: lock discovery, LOCK (exclusive/shared) - UNLOCK. "If:" headers are sent as appropriate. Simple interface - for implementors of new methods to indicate which locks are - required for the method. -* Primitive HTTP cookies support. -* Primitive hack at a GNOME-based GUI example program "nbrowse". - Enable build with --enable-gnome-examples. It crashes, and - not much else. Requires GNOME and POSIX threads. Example usage: - 'nbrowse dav.ics.uci.edu /msdav/' - Many thanks to Lee Mallabone for Gtk help, and showing how to - use Gtk and threads. - -Changes in release 0.2.0: -* Use libtool: new configure options to select whether to build - shared and/or static libraries. Should build shared libraries - portably now. -* Complete rewrite of the hip_xml interface to use opaque pointers. - New functions: hip_xml_create, hip_xml_destroy: create parser. - hip_xml_{set,get}_error: Access to error string. - hip_xml_add_handler: Register callbacks for a set of elements. - hip_xml_valid: Returns whether the parse was valid or not. - Removed functions: hip_xml_init, hip_xml_finish. -* Removed functions made reduntant by above changes in dav_207. -* Don't include config.h in header files -* Fix PROPFIND allprop request body (Michael Sobolev) -* Added C++ safety macros around header files. -* Added neon-config script for getting correct CFLAGS and LIBS - values for using libneon in applications. - -Changes in release 0.1.1: -* Fix for short writes in GET - -Changes in release 0.1.0: -* Initial release. diff --git a/client/neon-0.27.2/README b/client/neon-0.27.2/README deleted file mode 100644 index bb8ee135e..000000000 --- a/client/neon-0.27.2/README +++ /dev/null @@ -1,48 +0,0 @@ - -neon is an HTTP and WebDAV client library, with a C language API. - -Mailing list: neon@webdav.org || Web site: http://www.webdav.org/neon/ - -PLEASE NOTE: The neon API is subject to backwards-incompatible change -over minor releases (0.23.x -> 0.24.x) until the 1.0.0 release, but -maintains source and binary backwards compatibility through patch -releases (0.24.0 -> 0.24.7). - -Current features: - - - High-level interface to HTTP and WebDAV methods. - - Low-level interface to HTTP request handling, to allow implementing - new methods easily. - - Persistent connection support (HTTP/1.1 and HTTP/1.0 aware) - - Basic and digest authentication (RFC2617) (including auth-int, md5-sess) - - Proxy support (including basic/digest authentication) - - SSL/TLS support using OpenSSL (including client certificate support) - - Generic WebDAV 207 XML response handling mechanism - - XML parsing using expat or libxml (1.x or 2.x) parser - - Easy generation of error messages from 207 error responses - - Basic HTTP/1.1 methods: GET, PUT, HEAD, OPTIONS, conditional PUT - - WebDAV resource manipulation: MOVE, COPY, DELETE, MKCOL. - - WebDAV metadata support: set and remove properties (PROPPATCH), query - any set of properties (PROPFIND). - - WebDAV locking support - - Autoconf macros supplied for easily embedding neon directly inside - an application source tree. - -Provides lower-level interfaces to directly implement new HTTP -methods, and higher-level interfaces so that you don't have to worry -about the lower-level stuff. - -The neon library source code is licensed under the GNU Library GPL; -see src/COPYING.LIB for full details. The manual and test suite are -licensed under the terms of the GNU GPL; see test/COPYING for terms. -The autoconf macros in the "macros" directory are under a less -restrictive license, see each file for details. - -neon is Copyright (C) 1999-2006 Joe Orton -Portions are: -Copyright (C) 1999-2000 Tommi Komulainen -Copyright (C) 1999-2000 Peter Boos -Copyright (C) 1991, 1995, 1996, 1997 Free Software Foundation, Inc. -Copyright (C) 2004 Aleix Conchillo Flaque -Copyright (C) 2004 Jiang Lei -Copyright (C) 2004-2005 Vladimir Berezniker @ http://public.xdi.org/=vmpn diff --git a/client/neon-0.27.2/THANKS b/client/neon-0.27.2/THANKS deleted file mode 100644 index 02cc2c9e5..000000000 --- a/client/neon-0.27.2/THANKS +++ /dev/null @@ -1,16 +0,0 @@ -Thanks go to the following people for contributing to neon development -with code, patches, or good bug reports or suggestions. - -Arun Garg, Blair Zajac, Branko ibej, Daniel Berlin, David Sloat, -David Reid, Dirk Bergstrom, Ulrich Drepper, Gerald Richter, Greg -Stein, Gregor Bornemann, Jeff Johnson, Jeremy Elson, Jim Whitehead, -Johan Lindh, Justin Erenkrantz, Kai Sommerfeld, Keith Wannamaker, Lee -Mallabone, Magnus Sirwi, Markus Mueller, Max Bowsher, Michael -Sobolev, Mike Rosellini, Mo DeJong, Noriaki Takamiya, Olof Oberg, -Pawel Golaszewski, Peter Boos, Peter Moulder, rado, Risko Gergely, -Rodney Dawes, Sam TH, Sander Alberink, Sander Striker, Stefan Esser, -Shane Mayer, Taisuke Yamada, Teng Xu, Tom Bednarz, Tom Lee, Tommi -Komulainen, Torsten Kalix, Wilfredo Snchez, Daniel Veillard, Vladimir -Berezniker, Jiang Lei, Werner Baumann, Mike DiCuccio, Gisle Vanem, -Hans Meine, Laszlo Boszormenyi, Matthias Miller, Albert Chin, -Kiyo Kelvin Lee, D.J. Heap, Dongsheng Song, Aleix Conchillo Flaque. diff --git a/client/neon-0.27.2/TODO b/client/neon-0.27.2/TODO deleted file mode 100644 index 80970bc5c..000000000 --- a/client/neon-0.27.2/TODO +++ /dev/null @@ -1,39 +0,0 @@ - -To Do List for neon -*- text -*- -=================== - -Please submit feature requests to - -For one-point-oh ----------------- - -Longer term ------------ - -2. Add proper domain support to authentication code. (requires full - URI parsing support). Need to tell the auth layer the server - details. - -6. PUT with ranges... ne_put_range - -9. DeltaV support (http://www.webdav.org/deltav/). See also the - subversion project (http://subversion.tigris.org/) who might build - a versioning system over DAV. - -14. Improved request-header manipulation... some kind of indexed table - (a la Apache, libghttp, so we're sure we don't add the same header - to the request twice. Better control over adding Cache-Control - headers would be good too. - -21. Storing multiple authentication "sessions" within an actual - auth_session, so I can log into e.g. /foo/ and /bar/ (which are - not in the same authentication domain) and switch between them - without having to re-enter passwords all the time. - -46. Asynchronous request-dispatching? Makes integration into GUI loop - easy... any other reasons? Must leave existing request_dispatch - interface intact. - -50. opendir/readdir/closedir-esque interface for PROPFIND depth 1, - a la EZDAV. (cadaver has it already) - diff --git a/client/neon-0.27.2/aclocal.m4 b/client/neon-0.27.2/aclocal.m4 deleted file mode 100644 index 4efa42bda..000000000 --- a/client/neon-0.27.2/aclocal.m4 +++ /dev/null @@ -1,6440 +0,0 @@ -# generated automatically by aclocal 1.9.6 -*- Autoconf -*- - -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, -# 2005 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. - -# isc-posix.m4 serial 2 (gettext-0.11.2) -dnl Copyright (C) 1995-2002 Free Software Foundation, Inc. -dnl This file is free software; the Free Software Foundation -dnl gives unlimited permission to copy and/or distribute it, -dnl with or without modifications, as long as this notice is preserved. - -# This file is not needed with autoconf-2.53 and newer. Remove it in 2005. - -# This test replaces the one in autoconf. -# Currently this macro should have the same name as the autoconf macro -# because gettext's gettext.m4 (distributed in the automake package) -# still uses it. Otherwise, the use in gettext.m4 makes autoheader -# give these diagnostics: -# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX -# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX - -undefine([AC_ISC_POSIX]) - -AC_DEFUN([AC_ISC_POSIX], - [ - dnl This test replaces the obsolescent AC_ISC_POSIX kludge. - AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"]) - ] -) - -# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- - -# serial 48 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 1s/^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 MSVC, -# 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 "$LTCFLAGS" && LTCFLAGS=$CFLAGS -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="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -_LT_CC_BASENAME([$compiler]) - -# 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"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC -])# _LT_AC_SYS_COMPILER - - -# _LT_CC_BASENAME(CC) -# ------------------- -# Calculate cc_basename. Skip known compiler wrappers and cross-prefix. -AC_DEFUN([_LT_CC_BASENAME], -[for cc_temp in $1""; do - case $cc_temp in - compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; - distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` -]) - - -# _LT_COMPILER_BOILERPLATE -# ------------------------ -# Check for compiler boilerplate output or warnings with -# the simple compiler test code. -AC_DEFUN([_LT_COMPILER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_COMPILER_BOILERPLATE - - -# _LT_LINKER_BOILERPLATE -# ---------------------- -# Check for linker boilerplate output or warnings with -# the simple link test code. -AC_DEFUN([_LT_LINKER_BOILERPLATE], -[ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* -])# _LT_LINKER_BOILERPLATE - - -# _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 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/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 - ;; -sparc*-*solaris*) - # 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 - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - -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}\{0,1\} :&$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 other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; 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 linker 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 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - $2=yes - fi - 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 - teststring="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; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - # 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. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # 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); */ - } - else - puts (dlerror ()); - - exit (status); -}] -EOF - if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then - (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null - lt_status=$? - case x$lt_status in - x$lt_dlno_uscore) $1 ;; - x$lt_dlneed_uscore) $2 ;; - x$lt_dlunknown|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" - wl=$lt_prog_compiler_wl 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 - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - 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}\{0,1\} :&$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 - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes - fi - fi - chmod u+w . 2>&AS_MESSAGE_LOG_FD - $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_cmds=".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 - ;; - -bsdi[[45]]*) - 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_cmds=".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~ - chmod a+x \$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_cmds='`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* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[[123]]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - 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 - ;; - freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ - freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - 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_cmds='.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_cmds='.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_cmds='.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' - ;; - -interix3*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -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 - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '[#]line __oline__ "configure"' > conftest.$ac_ext - if AC_TRY_EVAL(ac_compile); then - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_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 - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - 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_cmds=".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" - ;; - -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.3*) - 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 - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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 - -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 -])# 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 - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - 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" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; 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 DLLs -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 variants of GNU ld 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|DragonFly)/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 - ;; - -interix3*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' - ;; - -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*) - 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*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - 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 - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | 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_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_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" - done - 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 -# AC_CONFIG_SUBDIRS is not called here. 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 -# AC_CONFIG_SUBDIRS is not called here. 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 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([_LT_AC_PROG_CXXCPP]) -_LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) -])# _LT_AC_LANG_CXX - -# _LT_AC_PROG_CXXCPP -# ------------------ -AC_DEFUN([_LT_AC_PROG_CXXCPP], -[ -AC_REQUIRE([AC_PROG_CXX]) -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; then - AC_PROG_CXXCPP -fi -])# _LT_AC_PROG_CXXCPP - -# 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 - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -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 - -# Report which library types will 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* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=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([_LT_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_shlibpath_var, $1)=unsupported -_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=cpp - -# 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 - -# save warnings/boilerplate of simple test code -_LT_COMPILER_BOILERPLATE -_LT_LINKER_BOILERPLATE - -# 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 - $as_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 - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -_LT_AC_TAGVAR(compiler, $1)=$CC -_LT_CC_BASENAME([$compiler]) - -# 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' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - 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 '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - 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 - ;; - - 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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _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)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP '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 -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 $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 lds - 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 -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}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $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 lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$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(ld_shlibs, $1)=no - ;; - esac - 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 | dragonfly*) - # 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) | 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 - _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 - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - ;; - *) - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _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*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _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 - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - _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 - ;; - interix3*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - 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 ${output_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}${output_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 - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - _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' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _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' - ;; - pgCC*) - # Portland Group C++ compiler - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $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' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_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::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - _LT_AC_TAGVAR(ld_shlibs, $1)=no - ;; - openbsd*) - _LT_AC_TAGVAR(hardcode_direct, $1)=yes - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - ;; - 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 ${output_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}${output_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 ${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~ - $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 ${output_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}${output_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 - ;; - 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(archive_cmds_need_lc,$1)=yes - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -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} ${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. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. - # Supported since Solaris 2.6 (maybe 2.5.1?) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' - ;; - esac - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - - output_verbose_link_cmd='echo' - - # 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 - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - 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_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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# 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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# 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 - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# 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) - -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - -# 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_cmds='$shrext_cmds' - -# 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=\`echo $lt_[]_LT_AC_TAGVAR(predep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=\`echo $lt_[]_LT_AC_TAGVAR(postdep_objects, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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=\`echo $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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 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'" - ;; -linux*) - if test "$host_cpu" = ia64; then - symcode='[[ABCDGIRSTW]]' - 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'" - fi - ;; -irix* | nonstopux*) - symcode='[[BCDEGRST]]' - ;; -osf*) - symcode='[[BCDEGQRST]]' - ;; -solaris*) - symcode='[[BDRT]]' - ;; -sco3.2v5*) - symcode='[[DT]]' - ;; -sysv4.2uw2*) - symcode='[[DT]]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[[ABDT]]' - ;; -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 - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # 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)= - ;; - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - 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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - 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 | dragonfly*) - # 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)='${wl}-a ${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)='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - 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* | ecpc*) - # 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' - ;; - pgCC*) - # Portland Group C++ compiler. - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - 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*) - ;; - 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 - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - _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' - ;; - esac - ;; - 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' - ;; - - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - 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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - ;; - esac - ;; - - 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_basename 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' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - ;; - 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' - ;; - - solaris*) - _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' - _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; - *) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; - esac - ;; - - 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*) - _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 - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - _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' - ;; - - unicos*) - _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' - _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no - ;; - - 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 - -# -# Check to make sure the static flag actually works. -# -wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" -AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], - _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), - $lt_tmp_static_flag, - [], - [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) -]) - - -# 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 '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[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= - # Just being paranoid about ensuring that cc_basename is set. - _LT_CC_BASENAME([$compiler]) - 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 - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - 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}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - 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 - 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 - - # 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 '\''/^[[BCDGRS]] /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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - - interix3*) - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - 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'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - _LT_AC_TAGVAR(ld_shlibs, $1)=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*) - 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 - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) - _LT_AC_TAGVAR(ld_shlibs, $1)=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - _LT_AC_TAGVAR(ld_shlibs, $1)=no - fi - ;; - esac - ;; - - 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 - ;; - - *) - 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)" = no; then - runpath_var= - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= - 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 "$lt_prog_compiler_static"; 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' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - 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 '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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' - # Exported symbols can be pulled into shared objects from archives - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes - # This is similar to how AIX traditionally builds its shared libraries. - _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${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 - ;; - - bsdi[[45]]*) - _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_cmds=".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' - _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' - _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[[012]]) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _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)='' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - if test "$GCC" = yes ; then - 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 lds - _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}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $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 lds - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$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(ld_shlibs, $1)=no - ;; - esac - 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 | dragonfly*) - _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*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - _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 - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: - - case $host_cpu in - hppa*64*|ia64*) - _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' - _LT_AC_TAGVAR(hardcode_direct, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - ;; - *) - _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(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - _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 ${output_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)=: - ;; - - solaris*) - _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - _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 - wlarc='' - _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]].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; - *) - _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - 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*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' - _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' - _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no - _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no - _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' - _LT_AC_TAGVAR(link_all_deplibs, $1)=yes - _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - 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 - -# -# 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) - pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $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 -IFS=$as_save_IFS -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 && continue - 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_SUBST([SED]) -AC_MSG_RESULT([$SED]) -]) - -m4_include([macros/neon-test.m4]) -m4_include([macros/neon-xml-parser.m4]) -m4_include([macros/neon.m4]) diff --git a/client/neon-0.27.2/autogen.sh b/client/neon-0.27.2/autogen.sh deleted file mode 100755 index 471327a1b..000000000 --- a/client/neon-0.27.2/autogen.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/sh -rm -f ltconfig ltmain.sh config.cache aclocal.m4 -# remove the autoconf cache -rm -rf autom4te*.cache -# create a .version file for configure.in -if test ! -f .version; then - # Building from CVS rather than in a release - echo 0.0.0-dev > .version - # for the documentation: - date +"%e %B %Y" | tr -d '\n' > doc/date.xml - echo -n 0.0.0-dev > doc/version.xml -fi -set -e -echo -n "libtoolize... " -${LIBTOOLIZE:-libtoolize} --copy --force >/dev/null -echo -n "aclocal... " -${ACLOCAL:-aclocal} -I macros -echo -n "autoheader... " -${AUTOHEADER:-autoheader} -echo -n "autoconf... " -${AUTOCONF:-autoconf} -Wall -echo okay. -# remove the autoconf cache -rm -rf autom4te*.cache diff --git a/client/neon-0.27.2/config.guess b/client/neon-0.27.2/config.guess deleted file mode 100755 index 2fc3acce2..000000000 --- a/client/neon-0.27.2/config.guess +++ /dev/null @@ -1,1411 +0,0 @@ -#! /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='2003-06-17' - -# 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 - -## for Red Hat Linux -if test -f /etc/redhat-release ; then - VENDOR=redhat ; -else - VENDOR= ; -fi - -# 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 ;; - 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 ;; - 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 ;; - 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 ;; - 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:*:*|*:GNU/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=` - echo ${UNAME_MACHINE}-unknown-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:*:*) - echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` - 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}-${VENDOR:-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-${VENDOR:-unknown}-linux-gnu - exit 0 ;; - ppc64:Linux:*:*) - echo powerpc64-${VENDOR:-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}-${VENDOR:-ibm}-linux-gnu - 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-${VENDOR:-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 -EOF - eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=` - test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-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: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[34]??:*: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-[DGKLNPTVW]: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 ;; -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/client/neon-0.27.2/config.h.in b/client/neon-0.27.2/config.h.in deleted file mode 100644 index 2ea6a5655..000000000 --- a/client/neon-0.27.2/config.h.in +++ /dev/null @@ -1,423 +0,0 @@ -/* config.h.in. Generated from configure.in by autoheader. */ - -/* Define to specific EGD socket path */ -#undef EGD_PATH - -/* Define if EGD should be supported */ -#undef ENABLE_EGD - -/* Define if GSS_C_NT_HOSTBASED_SERVICE is not defined otherwise */ -#undef GSS_C_NT_HOSTBASED_SERVICE - -/* Define to 1 if you have the header file. */ -#undef HAVE_ARPA_INET_H - -/* Define to 1 if you have the `bind_textdomain_codeset' function. */ -#undef HAVE_BIND_TEXTDOMAIN_CODESET - -/* Define to 1 if you have the `CRYPTO_set_idptr_callback' function. */ -#undef HAVE_CRYPTO_SET_IDPTR_CALLBACK - -/* Define to 1 if you have the declaration of `h_errno', and to 0 if you - don't. */ -#undef HAVE_DECL_H_ERRNO - -/* Define to 1 if you have the declaration of `stpcpy', and to 0 if you don't. - */ -#undef HAVE_DECL_STPCPY - -/* Define to 1 if you have the declaration of `strerror_r', and to 0 if you - don't. */ -#undef HAVE_DECL_STRERROR_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_DLFCN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_ERRNO_H - -/* Define if you have expat */ -#undef HAVE_EXPAT - -/* Define to 1 if you have the `fcntl' function. */ -#undef HAVE_FCNTL - -/* Define to 1 if you have the header file. */ -#undef HAVE_FCNTL_H - -/* Define to 1 if you have the `fstat64' function. */ -#undef HAVE_FSTAT64 - -/* Define to 1 if you have the `gai_strerror' function. */ -#undef HAVE_GAI_STRERROR - -/* Define to 1 if you have the `getnameinfo' function. */ -#undef HAVE_GETNAMEINFO - -/* Define to 1 if you have the `getsockopt' function. */ -#undef HAVE_GETSOCKOPT - -/* Define if GnuTLS support is enabled */ -#undef HAVE_GNUTLS - -/* Define to 1 if you have the `gnutls_session_get_data2' function. */ -#undef HAVE_GNUTLS_SESSION_GET_DATA2 - -/* Define to 1 if you have the `gnutls_x509_dn_get_rdn_ava' function. */ -#undef HAVE_GNUTLS_X509_DN_GET_RDN_AVA - -/* Define if GSSAPI support is enabled */ -#undef HAVE_GSSAPI - -/* Define to 1 if you have the header file. */ -#undef HAVE_GSSAPI_GSSAPI_GENERIC_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GSSAPI_GSSAPI_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_GSSAPI_H - -/* Define to 1 if you have the `gss_init_sec_context' function. */ -#undef HAVE_GSS_INIT_SEC_CONTEXT - -/* Define to 1 if you have the `hstrerror' function. */ -#undef HAVE_HSTRERROR - -/* Define to 1 if you have the `iconv' function. */ -#undef HAVE_ICONV - -/* Define to 1 if you have the header file. */ -#undef HAVE_ICONV_H - -/* Define to 1 if you have the `inet_ntop' function. */ -#undef HAVE_INET_NTOP - -/* Define to 1 if you have the header file. */ -#undef HAVE_INTTYPES_H - -/* Define to 1 if you have the `isatty' function. */ -#undef HAVE_ISATTY - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBINTL_H - -/* Define if you have libxml */ -#undef HAVE_LIBXML - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBXML_PARSER_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIBXML_XMLVERSION_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LIMITS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_LOCALE_H - -/* Define to 1 if you have the `lseek64' function. */ -#undef HAVE_LSEEK64 - -/* Define to 1 if you have the header file. */ -#undef HAVE_MEMORY_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETDB_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_IN_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_NETINET_TCP_H - -/* Define if OpenSSL support is enabled */ -#undef HAVE_OPENSSL - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_OPENSSLV_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_OPENSSL_SSL_H - -/* Define to 1 if you have the `pipe' function. */ -#undef HAVE_PIPE - -/* Define to 1 if you have the `poll' function. */ -#undef HAVE_POLL - -/* Define to 1 if you have the `pthread_mutex_init' function. */ -#undef HAVE_PTHREAD_MUTEX_INIT - -/* Define to 1 if you have the `pthread_mutex_lock' function. */ -#undef HAVE_PTHREAD_MUTEX_LOCK - -/* Define to 1 if you have the `setlocale' function. */ -#undef HAVE_SETLOCALE - -/* Define to 1 if you have the `setsockopt' function. */ -#undef HAVE_SETSOCKOPT - -/* Define to 1 if you have the `setvbuf' function. */ -#undef HAVE_SETVBUF - -/* Define to 1 if you have the `shutdown' function. */ -#undef HAVE_SHUTDOWN - -/* Define to 1 if you have the `signal' function. */ -#undef HAVE_SIGNAL - -/* Define to 1 if you have the header file. */ -#undef HAVE_SIGNAL_H - -/* Define to 1 if you have the `snprintf' function. */ -#undef HAVE_SNPRINTF - -/* Define to 1 if the system has the type `socklen_t'. */ -#undef HAVE_SOCKLEN_T - -/* Define to 1 if you have the header file. */ -#undef HAVE_SOCKS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDARG_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDINT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STDLIB_H - -/* Define to 1 if you have the `stpcpy' function. */ -#undef HAVE_STPCPY - -/* Define to 1 if you have the `strcasecmp' function. */ -#undef HAVE_STRCASECMP - -/* Define to 1 if you have the `strerror_r' function. */ -#undef HAVE_STRERROR_R - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRINGS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_STRING_H - -/* Define to 1 if you have the `strtoll' function. */ -#undef HAVE_STRTOLL - -/* Define to 1 if you have the `strtoq' function. */ -#undef HAVE_STRTOQ - -/* Define to 1 if `tm_gmtoff' is member of `struct tm'. */ -#undef HAVE_STRUCT_TM_TM_GMTOFF - -/* Define to 1 if `__tm_gmtoff' is member of `struct tm'. */ -#undef HAVE_STRUCT_TM___TM_GMTOFF - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_LIMITS_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_POLL_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SELECT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_SOCKET_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_STAT_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TIME_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_SYS_TYPES_H - -/* Define if the timezone global is available */ -#undef HAVE_TIMEZONE - -/* Use trio printf replacement library */ -#undef HAVE_TRIO - -/* Define to 1 if you have the header file. */ -#undef HAVE_TRIO_H - -/* Define to 1 if you have the header file. */ -#undef HAVE_UNISTD_H - -/* Define to 1 if you have the `usleep' function. */ -#undef HAVE_USLEEP - -/* Define to 1 if you have the `vsnprintf' function. */ -#undef HAVE_VSNPRINTF - -/* Define to be location of localedir */ -#undef LOCALEDIR - -/* Defined when neon is built as a library */ -#undef NEON_IS_LIBRARY - -/* Define to be the neon version string */ -#undef NEON_VERSION - -/* Define to enable debugging */ -#undef NE_DEBUGGING - -/* Define to be printf format string for ne_off_t */ -#undef NE_FMT_NE_OFF_T - -/* Define to be printf format string for off64_t */ -#undef NE_FMT_OFF64_T - -/* Define to be printf format string for off_t */ -#undef NE_FMT_OFF_T - -/* Define to be printf format string for size_t */ -#undef NE_FMT_SIZE_T - -/* Define to be printf format string for ssize_t */ -#undef NE_FMT_SSIZE_T - -/* Define to be printf format string for time_t */ -#undef NE_FMT_TIME_T - -/* Define to be printf format string for XML_Size */ -#undef NE_FMT_XML_SIZE - -/* Defined if DAV is supported */ -#undef NE_HAVE_DAV - -/* Defined if I18N is supported */ -#undef NE_HAVE_I18N - -/* Defined if IPV6 is supported */ -#undef NE_HAVE_IPV6 - -/* Defined if LFS is supported */ -#undef NE_HAVE_LFS - -/* Defined if SOCKS is supported */ -#undef NE_HAVE_SOCKS - -/* Defined if SSL is supported */ -#undef NE_HAVE_SSL - -/* Defined if TS_SSL is supported */ -#undef NE_HAVE_TS_SSL - -/* Defined if ZLIB is supported */ -#undef NE_HAVE_ZLIB - -/* Define to be filename of an SSL CA root bundle */ -#undef NE_SSL_CA_BUNDLE - -/* Define if poll() should be used */ -#undef NE_USE_POLL - -/* Define to be neon library major version */ -#undef NE_VERSION_MAJOR - -/* Define to be neon library minor version */ -#undef NE_VERSION_MINOR - -/* Define to be neon library patch version */ -#undef NE_VERSION_PATCH - -/* Define to the address where bug reports for this package should be sent. */ -#undef PACKAGE_BUGREPORT - -/* Define to the full name of this package. */ -#undef PACKAGE_NAME - -/* Define to the full name and version of this package. */ -#undef PACKAGE_STRING - -/* Define to the one symbol short name of this package. */ -#undef PACKAGE_TARNAME - -/* Define to the version of this package. */ -#undef PACKAGE_VERSION - -/* The size of a `int', as computed by sizeof. */ -#undef SIZEOF_INT - -/* The size of a `long', as computed by sizeof. */ -#undef SIZEOF_LONG - -/* The size of a `long long', as computed by sizeof. */ -#undef SIZEOF_LONG_LONG - -/* The size of a `off64_t', as computed by sizeof. */ -#undef SIZEOF_OFF64_T - -/* The size of a `off_t', as computed by sizeof. */ -#undef SIZEOF_OFF_T - -/* The size of a `size_t', as computed by sizeof. */ -#undef SIZEOF_SIZE_T - -/* The size of a `ssize_t', as computed by sizeof. */ -#undef SIZEOF_SSIZE_T - -/* The size of a `time_t', as computed by sizeof. */ -#undef SIZEOF_TIME_T - -/* The size of a `XML_Size', as computed by sizeof. */ -#undef SIZEOF_XML_SIZE - -/* Define to 1 if you have the ANSI C header files. */ -#undef STDC_HEADERS - -/* Define to 1 if strerror_r returns char *. */ -#undef STRERROR_R_CHAR_P - -/* Define to 1 if you can safely include both and . */ -#undef TIME_WITH_SYS_TIME - -/* Define if getaddrinfo supports AI_ADDRCONFIG */ -#undef USE_GAI_ADDRCONFIG - -/* Define if getaddrinfo() should be used */ -#undef USE_GETADDRINFO - -/* Define to 1 if your processor stores words with the most significant byte - first (like Motorola and SPARC, unlike Intel and VAX). */ -#undef WORDS_BIGENDIAN - -/* Always defined to enable GNU extensions */ -#undef _GNU_SOURCE - -/* Define to empty if `const' does not conform to ANSI C. */ -#undef const - -/* Define if in_addr_t is not available */ -#undef in_addr_t - -/* Define to `__inline__' or `__inline' if that's what the C compiler - calls it, or to nothing if 'inline' is not supported under any name. */ -#ifndef __cplusplus -#undef inline -#endif - -/* Define to `long' if does not define. */ -#undef off_t - -/* Define to `int' if does not define. */ -#undef pid_t - -/* Define to `unsigned' if does not define. */ -#undef size_t - - -/* Enable leak-tracking versions of ne_*alloc when NEON_MEMLEAK is enabled */ -#ifdef NEON_MEMLEAK -# include "memleak.h" -#endif - -#if defined(HAVE_STPCPY) && defined(HAVE_DECL_STPCPY) && !HAVE_DECL_STPCPY && !defined(stpcpy) -char *stpcpy(char *, const char *); -#endif diff --git a/client/neon-0.27.2/config.hw b/client/neon-0.27.2/config.hw deleted file mode 100644 index 0b6d21a71..000000000 --- a/client/neon-0.27.2/config.hw +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- c -*- - Win32 config.h - Copyright (C) 1999-2000, Peter Boos - Copyright (C) 2002-2006, Joe Orton - - 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 - -*/ -#if defined(_WIN32) && !defined(WIN32) -#define WIN32 -#endif - -#ifdef WIN32 - -#define NEON_VERSION "0.27.2" -#define NE_VERSION_MAJOR (0) -#define NE_VERSION_MINOR (27) - -#define HAVE_ERRNO_H -#define HAVE_LIMITS_H -#define HAVE_STDLIB_H -#define HAVE_STRING_H - -#define HAVE_MEMCPY -#define HAVE_SETSOCKOPT - -#define HAVE_SSPI - -/* Define to enable debugging */ -#define NE_DEBUGGING 1 - -#define NE_FMT_SIZE_T "u" -#define NE_FMT_SSIZE_T "d" -#define NE_FMT_OFF_T "ld" -#define NE_FMT_NE_OFF_T NE_FMT_OFF_T - -#ifndef NE_FMT_XML_SIZE -#define NE_FMT_XML_SIZE "d" -#endif - -/* needs adjusting for Win64... */ -#define SIZEOF_INT 4 -#define SIZEOF_LONG 4 - -/* Win32 uses a underscore, so we use a macro to eliminate that. */ -#define snprintf _snprintf -#define vsnprintf _vsnprintf -#if defined(_MSC_VER) && _MSC_VER >= 1400 -#define strcasecmp _strcmpi -#define strncasecmp _strnicmp -#else -#define strcasecmp strcmpi -#define strncasecmp strnicmp -#endif -#define ssize_t int -#define inline __inline -#define off_t _off_t - -#ifndef USE_GETADDRINFO -#define in_addr_t unsigned int -#endif - -#include -#define read _read - -#endif diff --git a/client/neon-0.27.2/config.hw.in b/client/neon-0.27.2/config.hw.in deleted file mode 100644 index b4869184b..000000000 --- a/client/neon-0.27.2/config.hw.in +++ /dev/null @@ -1,79 +0,0 @@ -/* -*- c -*- - Win32 config.h - Copyright (C) 1999-2000, Peter Boos - Copyright (C) 2002-2006, Joe Orton - - 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 - -*/ -#if defined(_WIN32) && !defined(WIN32) -#define WIN32 -#endif - -#ifdef WIN32 - -#define NEON_VERSION "@VERSION@" -#define NE_VERSION_MAJOR (@MAJOR@) -#define NE_VERSION_MINOR (@MINOR@) - -#define HAVE_ERRNO_H -#define HAVE_LIMITS_H -#define HAVE_STDLIB_H -#define HAVE_STRING_H - -#define HAVE_MEMCPY -#define HAVE_SETSOCKOPT - -#define HAVE_SSPI - -/* Define to enable debugging */ -#define NE_DEBUGGING 1 - -#define NE_FMT_SIZE_T "u" -#define NE_FMT_SSIZE_T "d" -#define NE_FMT_OFF_T "ld" -#define NE_FMT_NE_OFF_T NE_FMT_OFF_T - -#ifndef NE_FMT_XML_SIZE -#define NE_FMT_XML_SIZE "d" -#endif - -/* needs adjusting for Win64... */ -#define SIZEOF_INT 4 -#define SIZEOF_LONG 4 - -/* Win32 uses a underscore, so we use a macro to eliminate that. */ -#define snprintf _snprintf -#define vsnprintf _vsnprintf -#if defined(_MSC_VER) && _MSC_VER >= 1400 -#define strcasecmp _strcmpi -#define strncasecmp _strnicmp -#else -#define strcasecmp strcmpi -#define strncasecmp strnicmp -#endif -#define ssize_t int -#define inline __inline -#define off_t _off_t - -#ifndef USE_GETADDRINFO -#define in_addr_t unsigned int -#endif - -#include -#define read _read - -#endif diff --git a/client/neon-0.27.2/config.sub b/client/neon-0.27.2/config.sub deleted file mode 100755 index 6b2ff9f6a..000000000 --- a/client/neon-0.27.2/config.sub +++ /dev/null @@ -1,1500 +0,0 @@ -#! /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='2003-06-18' - -# 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* | freebsd*-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] \ - | 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 \ - | 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 \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | msp430 \ - | ns16k | ns32k \ - | openrisc | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | s390 | s390x \ - | sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv8 | 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-* \ - | 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-* \ - | 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-* \ - | s390-* | s390x-* \ - | sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv8-* | 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 - ;; - 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 - ;; - 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 - ;; - 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 - ;; - 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 | sparcv8 | 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* | -netbsd* | -openbsd* | -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* | -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*) - # 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*) - 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 - ;; - -wince*) - os=-wince - ;; - -osfrose*) - os=-osfrose - ;; - -osf*) - os=-osf - ;; - -utek*) - os=-bsd - ;; - -dynix*) - os=-bsd - ;; - -acis*) - os=-aos - ;; - -atheos*) - os=-atheos - ;; - -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 - ;; - -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 - ;; - -ptx*) - vendor=sequent - ;; - -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/client/neon-0.27.2/configure b/client/neon-0.27.2/configure deleted file mode 100755 index ed9017393..000000000 --- a/client/neon-0.27.2/configure +++ /dev/null @@ -1,33480 +0,0 @@ -#! /bin/sh -# Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.59 for neon 0.27.2. -# -# 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 2000-2005 Joe Orton and others -# This configure script may be copied, distributed and modified under the -# terms of the GNU Library General Public license; see src/COPYING.LIB 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 2>&1 && unset CDPATH - -if test -z "$ECHO"; then -if test "X${echo_test_string+set}" != Xset; then -# find a string as large as possible, as long as the shell can cope with it - for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do - # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... - if (echo_test_string=`eval $cmd`) 2>/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='neon' -PACKAGE_TARNAME='neon' -PACKAGE_VERSION='0.27.2' -PACKAGE_STRING='neon 0.27.2' -PACKAGE_BUGREPORT='neon@webdav.org' - -ac_unique_file="src/ne_request.c" -# 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_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 INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT SED EGREP LN_S ECHO AR ac_ct_AR RANLIB ac_ct_RANLIB STRIP ac_ct_STRIP CPP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL SET_MAKE ac_pt_AR ac_pt_RANLIB NE_FLAG_LFS LIBOBJS NE_FLAG_IPV6 NE_FLAG_ZLIB PKG_CONFIG NE_FLAG_SSL GNUTLS_CONFIG NE_FLAG_TS_SSL NEON_SUPPORTS_SSL NE_FLAG_SOCKS KRB5_CONFIG NEON_CFLAGS NEON_LIBS NEON_LTLIBS NE_FLAG_DAV NEON_TARGET NEON_OBJEXT NEONOBJS NEON_EXTRAOBJS NEON_LINK_FLAGS XML2_CONFIG NE_FLAG_I18N OPENSSL TEST_LDFLAGS NEON_PC_LIBS ALL_LINGUAS NEON_VERSION NEON_BUILD_BUNDLED top_builddir user_LDFLAGS HELPERS TESTS ALLOW_INSTALL 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 neon 0.27.2 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 - -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 neon 0.27.2:";; - esac - cat <<\_ACEOF - -Optional Features: - --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) - --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-shared[=PKGS] - build shared libraries [default=no] - --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) - --disable-webdav disable WebDAV support - --enable-threadsafe-ssl=posix - enable SSL library thread-safety using POSIX - threads: suitable CC/CFLAGS/LIBS must be used to - make the POSIX library interfaces available - --disable-nls disable internationalization support - --disable-debug disable runtime debugging messages - --enable-warnings enable compiler warnings - --enable-memleak for test builds only: enable memory leak checking - --enable-tests-install enable installation of the test suite - -Optional Packages: - --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] - --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) - --with-libs=DIR[:DIR2...] look for support libraries in DIR/{bin,lib,include} - --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] - --without-zlib disable zlib support - --with-ssl=openssl|gnutls - enable SSL support (default OpenSSL) - --with-egd[=PATH] enable EGD support [using EGD socket at PATH] - --with-ca-bundle specify filename of an SSL CA root bundle - --with-socks use SOCKSv5 library - --without-gssapi disable GSSAPI support - --with-libxml2 force use of libxml 2.x - --with-expat force use of expat - -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 -neon configure 0.27.2 -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 2000-2005 Joe Orton and others -This configure script may be copied, distributed and modified under the -terms of the GNU Library General Public license; see src/COPYING.LIB 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 neon $as_me 0.27.2, 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 config.h" - - - - - -# Check whether --with-libs or --without-libs was given. -if test "${with_libs+set}" = set; then - withval="$with_libs" - case $with_libs in -yes|no) { { echo "$as_me:$LINENO: error: --with-libs must be passed a directory argument" >&5 -echo "$as_me: error: --with-libs must be passed a directory argument" >&2;} - { (exit 1); exit 1; }; } ;; -*) ne_save_IFS=$IFS; IFS=: - for dir in $with_libs; do - ne_add_CPPFLAGS="$ne_add_CPPFLAGS -I${dir}/include" - ne_add_LDFLAGS="$ne_add_LDFLAGS -L${dir}/lib" - ne_add_PATH="${ne_add_PATH}${dir}/bin:" - done - IFS=$ne_save_IFS - CPPFLAGS="${ne_add_CPPFLAGS} $CPPFLAGS" - LDFLAGS="${ne_add_LDFLAGS} $LDFLAGS" - PATH=${ne_add_PATH}$PATH ;; -esac -fi; - -# Pass through initial LDFLAGS verbatim to neon-config, so that extra -# libraries which are detected (e.g. OpenSSL) can still be found when -# building using the --libs output of neon-config. -user_LDFLAGS=$LDFLAGS - -# By default, allow 'make install' to work. -ALLOW_INSTALL=yes - - -cat >>confdefs.h <<\_ACEOF -#define _GNU_SOURCE 1 -_ACEOF - - -cat >>confdefs.h <<\_ACEOF -#define NEON_IS_LIBRARY 1 -_ACEOF - - - - - -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' - - - - -# 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=no -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; - -# 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/'` - - -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 - -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 -IFS=$as_save_IFS -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 && continue - 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 - -fi - -SED=$lt_cv_path_SED - -echo "$as_me:$LINENO: result: $SED" >&5 -echo "${ECHO_T}$SED" >&6 - -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 - - - -# 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 variants of GNU ld 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 lds 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' -case $host_os in - darwin*) - if test "$GCC" = yes; then - reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' - else - reload_cmds='$LD$reload_flag -o $output$reload_objs' - fi - ;; -esac - -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_nm_to_check="${ac_tool_prefix}nm" - if test -n "$ac_tool_prefix" && test "$build" = "$host"; then - lt_nm_to_check="$lt_nm_to_check nm" - fi - for lt_tmp_nm in $lt_nm_to_check; do - lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR - for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do - IFS="$lt_save_ifs" - test -z "$ac_dir" && ac_dir=. - tmp_nm="$ac_dir/$lt_tmp_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" - done - 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 - ;; - -bsdi[45]*) - 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*) - # func_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='func_win32_libid' - ;; - -mingw* | pw32*) - # Base MSYS/MinGW do not provide the 'file' command needed by - # func_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 | dragonfly*) - 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|DragonFly)/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 - ;; - -interix3*) - # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' - ;; - -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*) - 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*) - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' - else - lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' - fi - ;; - -osf3* | osf4* | osf5*) - lt_cv_deplibs_check_method=pass_all - ;; - -solaris*) - lt_cv_deplibs_check_method=pass_all - ;; - -sysv4 | sysv4.3*) - 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 - ;; - pc) - lt_cv_deplibs_check_method=pass_all - ;; - esac - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | 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"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# 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 3246 "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 - ;; -sparc*-*solaris*) - # 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 - *64-bit*) - case $lt_cv_prog_gnu_ld in - yes*) LD="${LD-ld} -m elf64_sparc" ;; - *) LD="${LD-ld} -64" ;; - esac - ;; - esac - fi - rm -rf conftest* - ;; - - -esac - -need_locks="$enable_libtool_lock" - - -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 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 neon@webdav.org ## -## ------------------------------ ## -_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 - - - -if test -n "$CXX" && ( test "X$CXX" != "Xno" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; 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 -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 - -fi - - -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:4736:" \ - "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 - teststring="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; - ;; - - netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) - # This has been around since 386BSD, at least. Likely further. - if test -x /sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` - elif test -x /usr/sbin/sysctl; then - lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` - else - lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs - fi - # And add a safety zone - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` - lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` - ;; - - interix*) - # We know the value 262144 and hardcode it with a safety zone (like BSD) - lt_cv_sys_max_cmd_len=196608 - ;; - - osf*) - # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure - # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not - # nice to cause kernel panics so lets avoid the loop below. - # First set a reasonable default. - lt_cv_sys_max_cmd_len=16384 - # - if test -x /sbin/sysconfig; then - case `/sbin/sysconfig -q proc exec_disable_arg_limit` in - *1*) lt_cv_sys_max_cmd_len=-1 ;; - esac - fi - ;; - sco3.2v5*) - lt_cv_sys_max_cmd_len=102400 - ;; - sysv5* | sco5v6* | sysv4.2uw2*) - kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` - if test -n "$kargmax"; then - lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` - else - lt_cv_sys_max_cmd_len=32768 - fi - ;; - *) - # 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. - SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} - while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ - = "XX$teststring") >/dev/null 2>&1 && - new_result=`expr "X$teststring" : ".*" 2>&1` && - lt_cv_sys_max_cmd_len=$new_result && - test $i != 17 # 1/2 MB should be enough - do - i=`expr $i + 1` - teststring=$teststring$teststring - done - teststring= - # 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 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'" - ;; -linux*) - if test "$host_cpu" = ia64; then - symcode='[ABCDGIRSTW]' - 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'" - fi - ;; -irix* | nonstopux*) - symcode='[BCDEGRST]' - ;; -osf*) - symcode='[BCDEGQRST]' - ;; -solaris*) - symcode='[BDRT]' - ;; -sco3.2v5*) - symcode='[DT]' - ;; -sysv4.2uw2*) - symcode='[DT]' - ;; -sysv5* | sco5v6* | unixware* | OpenUNIX*) - symcode='[ABDT]' - ;; -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 - - # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. - symxfrm="\\1 $ac_symprfx\\2 \\2" - - # 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 1s/^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 MSVC, -# 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 "$LTCFLAGS" && LTCFLAGS=$CFLAGS -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="$old_postinstall_cmds~\$RANLIB -t \$oldlib" - ;; - *) - old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" - ;; - esac - old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" -fi - -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# 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=no - -# 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"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - - -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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:5799: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:5803: \$? = $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 other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; 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' - ;; - - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - 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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic='-qnocommon' - lt_prog_compiler_wl='-Wl,' - ;; - esac - ;; - - 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_basename in - icc* | ecc*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-fpic' - lt_prog_compiler_static='-Bstatic' - ;; - 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' - ;; - - solaris*) - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl='-Qoption ld ';; - *) - lt_prog_compiler_wl='-Wl,';; - esac - ;; - - sunos4*) - lt_prog_compiler_wl='-Qoption ld ' - lt_prog_compiler_pic='-PIC' - lt_prog_compiler_static='-Bstatic' - ;; - - sysv4 | sysv4.2uw2* | sysv4.3*) - 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 - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_pic='-KPIC' - lt_prog_compiler_static='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl='-Wl,' - lt_prog_compiler_can_build_shared=no - ;; - - 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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6067: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:6071: \$? = $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 other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; 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 - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag 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_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker 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 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works=yes - fi - 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 - - -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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:6171: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:6175: \$? = $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 - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o=yes - fi - fi - chmod u+w . 2>&5 - $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= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - 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 - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - 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}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - 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 - 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 - - # 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 '\''/^[BCDGRS] /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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs=no - fi - ;; - - interix3*) - hardcode_direct=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='${wl}-rpath,$libdir' - export_dynamic_flag_spec='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - 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'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - 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*) - 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 - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs=no - fi - ;; - esac - ;; - - sunos4*) - archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' - wlarc= - hardcode_direct=yes - hardcode_shlibpath_var=no - ;; - - *) - 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" = no; then - runpath_var= - hardcode_libdir_flag_spec= - export_dynamic_flag_spec= - whole_archive_flag_spec= - 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 "$lt_prog_compiler_static"; 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' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - 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 '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec='$convenience' - archive_cmds_need_lc=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${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 - ;; - - bsdi[45]*) - 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_cmds=".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*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc=no - hardcode_direct=no - hardcode_automatic=yes - hardcode_shlibpath_var=unsupported - whole_archive_flag_spec='' - link_all_deplibs=yes - if test "$GCC" = yes ; then - 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 lds - 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}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $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 lds - archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$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}' - ;; - *) - ld_shlibs=no - ;; - esac - 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 | dragonfly*) - 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*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - 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 - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' - hardcode_libdir_separator=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld='+b $libdir' - hardcode_direct=no - hardcode_shlibpath_var=no - ;; - *) - 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' - archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - 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 ${output_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=: - ;; - - solaris*) - no_undefined_flag=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - 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 - wlarc='' - 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].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - 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*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) - no_undefined_flag='${wl}-z,text' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag='${wl}-z,text' - allow_undefined_flag='${wl}-z,nodefs' - archive_cmds_need_lc=no - hardcode_shlibpath_var=no - hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator=':' - link_all_deplibs=yes - export_dynamic_flag_spec='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - 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 - -# -# 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 - pic_flag=$lt_prog_compiler_pic - 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_cmds=".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 - ;; - -bsdi[45]*) - 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_cmds=".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~ - chmod a+x \$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_cmds='`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* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - 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 - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - 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_cmds='.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_cmds='.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_cmds='.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' - ;; - -interix3*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -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 - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 7640 "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 - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_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 - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - 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_cmds=".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" - ;; - -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.3*) - 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 - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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 - -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 - -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" - wl=$lt_prog_compiler_wl 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); */ - } - else - puts (dlerror ()); - - 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; ) >&5 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_dlunknown|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 - wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" - 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); */ - } - else - puts (dlerror ()); - - 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; ) >&5 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_dlunknown|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 library types will 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* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=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 LTCFLAGS 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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 1s/^X//" - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -# 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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# 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 - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler - -# Is the compiler the GNU C compiler? -with_gcc=$GCC - -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - -# 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_cmds='$shrext_cmds' - -# 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=\`echo $lt_predep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=\`echo $lt_postdep_objects | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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=\`echo $lt_compiler_lib_search_path | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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 - if test -z "$LTCFLAGS"; then - eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" - 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" && - ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || - (test "X$CXX" != "Xg++"))) ; 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_shlibpath_var_CXX=unsupported -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=cpp - -# 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"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# 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 - $as_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 - $as_unset lt_cv_path_LD -fi -test -z "${LDCXX+set}" || LD=$LDCXX -CC=${CXX-"c++"} -compiler=$CC -compiler_CXX=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# 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 variants of GNU ld 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 lds 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' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - 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 '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_CXX='$convenience' - archive_cmds_need_lc_CXX=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' - fi - fi - ;; - - beos*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - allow_undefined_flag_CXX=unsupported - # Joseph Beckenbach says some releases of gcc - # support --undefined. This deserves some investigation. FIXME - archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - else - ld_shlibs_CXX=no - 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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_CXX=no - fi - ;; - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_CXX=no - hardcode_direct_CXX=no - hardcode_automatic_CXX=yes - hardcode_shlibpath_var_CXX=unsupported - whole_archive_flag_spec_CXX='' - link_all_deplibs_CXX=yes - - if test "$GXX" = yes ; then - lt_int_apple_cc_single_mod=no - output_verbose_link_cmd='echo' - if $CC -dumpspecs 2>&1 | $EGREP '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 -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 $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 lds - 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 -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}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_CXX='$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 lds - archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - 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}' - ;; - *) - ld_shlibs_CXX=no - ;; - esac - 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 - ;; - freebsd[12]*) - # 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 | dragonfly*) - # 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) | 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 - 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 - hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_CXX=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_CXX='+b $libdir' - ;; - *) - export_dynamic_flag_spec_CXX='${wl}-E' - ;; - esac - fi - case $host_cpu in - hppa*64*|ia64*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - ;; - *) - 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*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - 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 - hppa*64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - ia64*) - archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' - ;; - *) - 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 - ;; - interix3*) - hardcode_direct_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - export_dynamic_flag_spec_CXX='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - 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 ${output_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}${output_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 - # version 8.0 and above of icpc choke on multiply defined symbols - # if we add $predep_objects and $postdep_objects, however 7.1 and - # earlier do not add the objects themselves. - case `$CC -V 2>&1` in - *"Version 7."*) - 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' - ;; - *) # Version 8.0 or newer - tmp_idyn= - case $host_cpu in - ia64*) tmp_idyn=' -i_dynamic';; - esac - archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' - ;; - esac - archive_cmds_need_lc_CXX=no - 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' - ;; - pgCC*) - # Portland Group C++ compiler - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared $pic_flag $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' - whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_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::"' - ;; - openbsd2*) - # C++ shared libraries are fairly broken - ld_shlibs_CXX=no - ;; - openbsd*) - hardcode_direct_CXX=yes - hardcode_shlibpath_var_CXX=no - archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' - hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' - if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then - archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' - export_dynamic_flag_spec_CXX='${wl}-E' - whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' - fi - output_verbose_link_cmd='echo' - ;; - 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 ${output_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}${output_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 ${output_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 ${output_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}${output_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 - ;; - 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++ - archive_cmds_need_lc_CXX=yes - no_undefined_flag_CXX=' -zdefs' - archive_cmds_CXX='$CC -G${allow_undefined_flag} -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} ${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. We must also pass each convience library through - # to the system linker between allextract/defaultextract. - # The C++ compiler will combine linker options so we - # cannot just pass the convience library names through - # without $wl. - # Supported since Solaris 2.6 (maybe 2.5.1?) - whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' - ;; - esac - link_all_deplibs_CXX=yes - - output_verbose_link_cmd='echo' - - # 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 - ;; - sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) - no_undefined_flag_CXX='${wl}-z,text' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - # For security reasons, it is highly recommended that you always - # use absolute paths for naming shared libraries, and exclude the - # DT_RUNPATH tag from executables and libraries. But doing so - # requires that you compile everything twice, which is a pain. - # So that behaviour is only enabled if SCOABSPATH is set to a - # non-empty value in the environment. Most likely only useful for - # creating official distributions of packages. - # This is a hack until libtool officially supports absolute path - # names for shared libraries. - no_undefined_flag_CXX='${wl}-z,text' - allow_undefined_flag_CXX='${wl}-z,nodefs' - archive_cmds_need_lc_CXX=no - hardcode_shlibpath_var_CXX=no - hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_CXX=':' - link_all_deplibs_CXX=yes - export_dynamic_flag_spec_CXX='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - case $cc_basename in - CC*) - archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - ;; - 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 - -# PORTME: override above test on systems where it is broken -case $host_os in -interix3*) - # Interix 3.5 installs completely hosed .la files for C++, so rather than - # hack all around it, let's just trust "g++" to DTRT. - predep_objects_CXX= - postdep_objects_CXX= - postdeps_CXX= - ;; - -solaris*) - case $cc_basename in - CC*) - # Adding this requires a known-good setup of shared libraries for - # Sun compiler versions before 5.6, else PIC objects from an old - # archive will be linked into the output, leading to subtle bugs. - postdeps_CXX='-lCstd -lCrun' - ;; - esac - ;; -esac - - -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= - ;; - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - 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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_CXX='-qnocommon' - lt_prog_compiler_wl_CXX='-Wl,' - ;; - 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 | dragonfly*) - # FreeBSD uses GNU C++ - ;; - hpux9* | hpux10* | hpux11*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_static_CXX='${wl}-a ${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='${wl}-a ${wl}archive' - case $host_cpu in - hppa*64*|ia64*) - # +Z the default - ;; - *) - lt_prog_compiler_pic_CXX='+Z' - ;; - esac - ;; - *) - ;; - esac - ;; - interix*) - # This is c89, which is MS Visual C++ (no shared libs) - # Anyone wants to do a port? - ;; - 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* | ecpc*) - # Intel C++ - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-static' - ;; - pgCC*) - # Portland Group C++ compiler. - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-fpic' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - 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*) - ;; - 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 - ;; - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - case $cc_basename in - CC*) - lt_prog_compiler_wl_CXX='-Wl,' - lt_prog_compiler_pic_CXX='-KPIC' - lt_prog_compiler_static_CXX='-Bstatic' - ;; - esac - ;; - 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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:10980: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:10984: \$? = $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 other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; 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 - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works_CXX+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_CXX=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker 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 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_CXX=yes - fi - else - lt_prog_compiler_static_works_CXX=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6 - -if test x"$lt_prog_compiler_static_works_CXX" = xyes; then - : -else - lt_prog_compiler_static_CXX= -fi - - -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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:11084: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:11088: \$? = $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 - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_CXX=yes - fi - fi - chmod u+w . 2>&5 - $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 '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[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 - -# -# 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 - pic_flag=$lt_prog_compiler_pic_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_cmds=".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 - ;; - -bsdi[45]*) - 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_cmds=".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~ - chmod a+x \$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_cmds='`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* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - 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 - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - 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_cmds='.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_cmds='.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_cmds='.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' - ;; - -interix3*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -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 - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 11620 "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 - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_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 - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - 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_cmds=".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" - ;; - -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.3*) - 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 - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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 - -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 - -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 - - -# 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 LTCFLAGS 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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# 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 - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_CXX - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_CXX - -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - -# 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_cmds='$shrext_cmds' - -# 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=\`echo $lt_predep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=\`echo $lt_postdep_objects_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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=\`echo $lt_compiler_lib_search_path_CXX | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${F77-"f77"} -compiler=$CC -compiler_F77=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -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* | aix5*) - if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then - test "$enable_shared" = yes && enable_static=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 - -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' - ;; - - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - 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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_F77='-qnocommon' - lt_prog_compiler_wl_F77='-Wl,' - ;; - esac - ;; - - 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_basename in - icc* | ecc*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-fpic' - lt_prog_compiler_static_F77='-Bstatic' - ;; - 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' - ;; - - solaris*) - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_F77='-Qoption ld ';; - *) - lt_prog_compiler_wl_F77='-Wl,';; - esac - ;; - - 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*) - 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 - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_pic_F77='-KPIC' - lt_prog_compiler_static_F77='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_F77='-Wl,' - lt_prog_compiler_can_build_shared_F77=no - ;; - - 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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12678: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:12682: \$? = $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 other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; 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 - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works_F77+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_F77=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker 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 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_F77=yes - fi - else - lt_prog_compiler_static_works_F77=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6 - -if test x"$lt_prog_compiler_static_works_F77" = xyes; then - : -else - lt_prog_compiler_static_F77= -fi - - -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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12782: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:12786: \$? = $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 - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_F77=yes - fi - fi - chmod u+w . 2>&5 - $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= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - 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 - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - 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}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - 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 - 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 - - # 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 '\''/^[BCDGRS] /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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_F77=no - fi - ;; - - interix3*) - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' - export_dynamic_flag_spec_F77='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - 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'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_F77=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*) - 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 - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_F77=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_F77=no - fi - ;; - esac - ;; - - 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 - ;; - - *) - 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" = no; then - runpath_var= - hardcode_libdir_flag_spec_F77= - export_dynamic_flag_spec_F77= - whole_archive_flag_spec_F77= - 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 "$lt_prog_compiler_static"; 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' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - 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 '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_F77='$convenience' - archive_cmds_need_lc_F77=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${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 - ;; - - bsdi[45]*) - 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_cmds=".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_F77='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_F77=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_F77=no - hardcode_direct_F77=no - hardcode_automatic_F77=yes - hardcode_shlibpath_var_F77=unsupported - whole_archive_flag_spec_F77='' - link_all_deplibs_F77=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_F77='$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 lds - archive_expsym_cmds_F77='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_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}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_F77='$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 lds - archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - 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}' - ;; - *) - ld_shlibs_F77=no - ;; - esac - 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 | dragonfly*) - 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*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - 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 - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_F77=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_F77='+b $libdir' - hardcode_direct_F77=no - hardcode_shlibpath_var_F77=no - ;; - *) - 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' - archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - 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 ${output_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=: - ;; - - solaris*) - no_undefined_flag_F77=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - 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 - wlarc='' - 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].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - 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*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) - no_undefined_flag_F77='${wl}-z,text' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_F77='${wl}-z,text' - allow_undefined_flag_F77='${wl}-z,nodefs' - archive_cmds_need_lc_F77=no - hardcode_shlibpath_var_F77=no - hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_F77=':' - link_all_deplibs_F77=yes - export_dynamic_flag_spec_F77='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - 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 - -# -# 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 - pic_flag=$lt_prog_compiler_pic_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_cmds=".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 - ;; - -bsdi[45]*) - 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_cmds=".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~ - chmod a+x \$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_cmds='`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* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - 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 - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - 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_cmds='.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_cmds='.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_cmds='.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' - ;; - -interix3*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -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 - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 14231 "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 - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_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 - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - 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_cmds=".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" - ;; - -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.3*) - 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 - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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 - -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 - -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 - - -# 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 LTCFLAGS 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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# 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 - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_F77 - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_F77 - -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - -# 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_cmds='$shrext_cmds' - -# 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=\`echo $lt_predep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=\`echo $lt_postdep_objects_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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=\`echo $lt_compiler_lib_search_path_F77 | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${GCJ-"gcj"} -compiler=$CC -compiler_GCJ=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - -# GCJ did not exist at the time GCC didn't implicitly link libc in. -archive_cmds_need_lc_GCJ=no - -old_archive_cmds_GCJ=$old_archive_cmds - - -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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15009: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:15013: \$? = $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 other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; 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' - ;; - - interix3*) - # Interix 3.x gcc -fpic/-fPIC options generate broken code. - # Instead, we relocate shared libraries at runtime. - ;; - - 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 - ;; - darwin*) - # PIC is the default on this platform - # Common symbols not allowed in MH_DYLIB files - case $cc_basename in - xlc*) - lt_prog_compiler_pic_GCJ='-qnocommon' - lt_prog_compiler_wl_GCJ='-Wl,' - ;; - esac - ;; - - 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_basename in - icc* | ecc*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-static' - ;; - pgcc* | pgf77* | pgf90* | pgf95*) - # Portland Group compilers (*not* the Pentium gcc compiler, - # which looks to be a dead project) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-fpic' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - 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' - ;; - - solaris*) - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - case $cc_basename in - f77* | f90* | f95*) - lt_prog_compiler_wl_GCJ='-Qoption ld ';; - *) - lt_prog_compiler_wl_GCJ='-Wl,';; - esac - ;; - - 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*) - 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 - ;; - - sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_pic_GCJ='-KPIC' - lt_prog_compiler_static_GCJ='-Bstatic' - ;; - - unicos*) - lt_prog_compiler_wl_GCJ='-Wl,' - lt_prog_compiler_can_build_shared_GCJ=no - ;; - - 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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15277: $lt_compile\"" >&5) - (eval "$lt_compile" 2>conftest.err) - ac_status=$? - cat conftest.err >&5 - echo "$as_me:15281: \$? = $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 other than the usual output. - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; 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 - -# -# Check to make sure the static flag actually works. -# -wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" -echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 -echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6 -if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - lt_prog_compiler_static_works_GCJ=no - save_LDFLAGS="$LDFLAGS" - LDFLAGS="$LDFLAGS $lt_tmp_static_flag" - printf "$lt_simple_link_test_code" > conftest.$ac_ext - if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then - # The linker 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 - $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp - $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 - if diff conftest.exp conftest.er2 >/dev/null; then - lt_prog_compiler_static_works_GCJ=yes - fi - else - lt_prog_compiler_static_works_GCJ=yes - fi - fi - $rm conftest* - LDFLAGS="$save_LDFLAGS" - -fi -echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 -echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6 - -if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then - : -else - lt_prog_compiler_static_GCJ= -fi - - -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}\{0,1\} :&$lt_compiler_flag :; t' \ - -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ - -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:15381: $lt_compile\"" >&5) - (eval "$lt_compile" 2>out/conftest.err) - ac_status=$? - cat out/conftest.err >&5 - echo "$as_me:15385: \$? = $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 - $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp - $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 - if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then - lt_cv_prog_compiler_c_o_GCJ=yes - fi - fi - chmod u+w . 2>&5 - $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= - # Just being paranoid about ensuring that cc_basename is set. - for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - - 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 - ;; - interix*) - # we just hope/assume this is gcc and not c89 (= MSVC++) - with_gnu_ld=yes - ;; - 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}' - - # Set some defaults for GNU ld with shared library support. These - # are reset later if shared libraries are not supported. Putting them - # here allows them to be overridden if necessary. - 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 - 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 - - # 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 '\''/^[BCDGRS] /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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $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}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' - else - ld_shlibs_GCJ=no - fi - ;; - - interix3*) - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' - export_dynamic_flag_spec_GCJ='${wl}-E' - # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. - # Instead, shared libraries are loaded at an image base (0x10000000 by - # default) and relocated if they conflict, which is a slow very memory - # consuming and fragmenting process. To avoid this, we pick a random, - # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link - # time. Moving up from 0x10000000 also allows more sbrk(2) space. - archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' - ;; - - linux*) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - tmp_addflag= - case $cc_basename,$host_cpu in - pgcc*) # Portland Group C compiler - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag' - ;; - pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers - whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' - tmp_addflag=' $pic_flag -Mnomain' ;; - ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 - tmp_addflag=' -i_dynamic' ;; - efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 - tmp_addflag=' -i_dynamic -nofor_main' ;; - ifc* | ifort*) # Intel Fortran compiler - tmp_addflag=' -nofor_main' ;; - esac - archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' - - 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'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' - fi - else - ld_shlibs_GCJ=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*) - 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 - ;; - - sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) - case `$LD -v 2>&1` in - *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) - ld_shlibs_GCJ=no - cat <<_LT_EOF 1>&2 - -*** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not -*** reliably create shared libraries on SCO systems. Therefore, libtool -*** is disabling shared libraries support. We urge you to upgrade GNU -*** binutils to release 2.16.91.0.3 or newer. Another option is to modify -*** your PATH or compiler configuration so that the native linker is -*** used, and then restart. - -_LT_EOF - ;; - *) - if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' - archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' - archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' - else - ld_shlibs_GCJ=no - fi - ;; - esac - ;; - - 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 - ;; - - *) - 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" = no; then - runpath_var= - hardcode_libdir_flag_spec_GCJ= - export_dynamic_flag_spec_GCJ= - whole_archive_flag_spec_GCJ= - 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 "$lt_prog_compiler_static"; 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' - if test "$aix_use_runtimelinking" = yes; then - shared_flag="$shared_flag "'${wl}-G' - fi - 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 '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${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 '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_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' - # Exported symbols can be pulled into shared objects from archives - whole_archive_flag_spec_GCJ='$convenience' - archive_cmds_need_lc_GCJ=yes - # This is similar to how AIX traditionally builds its shared libraries. - archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${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 - ;; - - bsdi[45]*) - 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_cmds=".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_GCJ='`cygpath -w "$srcfile"`' - enable_shared_with_static_runtimes_GCJ=yes - ;; - - darwin* | rhapsody*) - case $host_os in - rhapsody* | darwin1.[012]) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' - ;; - *) # Darwin 1.3 on - if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - else - case ${MACOSX_DEPLOYMENT_TARGET} in - 10.[012]) - allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' - ;; - 10.*) - allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' - ;; - esac - fi - ;; - esac - archive_cmds_need_lc_GCJ=no - hardcode_direct_GCJ=no - hardcode_automatic_GCJ=yes - hardcode_shlibpath_var_GCJ=unsupported - whole_archive_flag_spec_GCJ='' - link_all_deplibs_GCJ=yes - if test "$GCC" = yes ; then - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' - module_cmds_GCJ='$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 lds - archive_expsym_cmds_GCJ='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_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}' - else - case $cc_basename in - xlc*) - output_verbose_link_cmd='echo' - archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' - module_cmds_GCJ='$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 lds - archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' - 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}' - ;; - *) - ld_shlibs_GCJ=no - ;; - esac - 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 | dragonfly*) - 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*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' - fi - if test "$with_gnu_ld" = no; then - 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 - fi - ;; - - hpux11*) - if test "$GCC" = yes -a "$with_gnu_ld" = no; then - case $host_cpu in - hppa*64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -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*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' - ;; - ia64*) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' - ;; - *) - archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' - ;; - esac - fi - if test "$with_gnu_ld" = no; then - hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' - hardcode_libdir_separator_GCJ=: - - case $host_cpu in - hppa*64*|ia64*) - hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' - hardcode_direct_GCJ=no - hardcode_shlibpath_var_GCJ=no - ;; - *) - 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' - archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' - 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 ${output_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=: - ;; - - solaris*) - no_undefined_flag_GCJ=' -z text' - if test "$GCC" = yes; then - wlarc='${wl}' - 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 - wlarc='' - 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].*) ;; - *) - # The compiler driver will combine linker options so we - # cannot just pass the convience library names through - # without $wl, iff we do not link with $LD. - # Luckily, gcc supports the same syntax we need for Sun Studio. - # Supported since Solaris 2.6 (maybe 2.5.1?) - case $wlarc in - '') - whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; - *) - whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; - esac ;; - 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*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) - no_undefined_flag_GCJ='${wl}-z,text' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - sysv5* | sco3.2v5* | sco5v6*) - # Note: We can NOT use -z defs as we might desire, because we do not - # link with -lc, and that would cause any symbols used from libc to - # always be unresolved, which means just about no library would - # ever link correctly. If we're not using GNU ld we use -z text - # though, which does catch some bad symbols but isn't as heavy-handed - # as -z defs. - no_undefined_flag_GCJ='${wl}-z,text' - allow_undefined_flag_GCJ='${wl}-z,nodefs' - archive_cmds_need_lc_GCJ=no - hardcode_shlibpath_var_GCJ=no - hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' - hardcode_libdir_separator_GCJ=':' - link_all_deplibs_GCJ=yes - export_dynamic_flag_spec_GCJ='${wl}-Bexport' - runpath_var='LD_RUN_PATH' - - if test "$GCC" = yes; then - archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - else - archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' - fi - ;; - - 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 - -# -# 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 - pic_flag=$lt_prog_compiler_pic_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_cmds=".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 - ;; - -bsdi[45]*) - 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_cmds=".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~ - chmod a+x \$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_cmds='`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* | dragonfly*) - # DragonFly does not have aout. When/if they implement a new - # versioning mechanism, adjust this. - if test -x /usr/bin/objformat; then - objformat=`/usr/bin/objformat` - else - case $host_os in - freebsd[123]*) objformat=aout ;; - *) objformat=elf ;; - esac - fi - 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 - ;; - freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ - freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - freebsd*) # from 4.6 on - shlibpath_overrides_runpath=yes - 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_cmds='.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_cmds='.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_cmds='.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' - ;; - -interix3*) - 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' - dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' - shlibpath_var=LD_LIBRARY_PATH - shlibpath_overrides_runpath=no - hardcode_into_libs=yes - ;; - -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 - - # find out which ABI we are using - libsuff= - case "$host_cpu" in - x86_64*|s390x*|powerpc64*) - echo '#line 16850 "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 - case `/usr/bin/file conftest.$ac_objext` in - *64-bit*) - libsuff=64 - sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" - ;; - esac - fi - rm -rf conftest* - ;; - esac - - # Append ld.so.conf contents to the search path - if test -f /etc/ld.so.conf; then - lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` - sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff} $lt_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 - sys_lib_dlsearch_path_spec="/usr/lib" - need_lib_prefix=no - # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. - case $host_os in - openbsd3.3 | openbsd3.3.*) need_version=yes ;; - *) need_version=no ;; - esac - 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_cmds=".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" - ;; - -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.3*) - 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 - ;; - -sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) - version_type=freebsd-elf - need_lib_prefix=no - need_version=no - library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' - soname_spec='${libname}${release}${shared_ext}$major' - shlibpath_var=LD_LIBRARY_PATH - hardcode_into_libs=yes - if test "$with_gnu_ld" = yes; then - sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' - shlibpath_overrides_runpath=no - else - sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' - shlibpath_overrides_runpath=yes - case $host_os in - sco3.2v5*) - sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" - ;; - esac - fi - sys_lib_dlsearch_path_spec='/usr/lib' - ;; - -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 - -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 - -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 - - -# 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 LTCFLAGS 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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# 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 - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_GCJ - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_GCJ - -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - -# 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_cmds='$shrext_cmds' - -# 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=\`echo $lt_predep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=\`echo $lt_postdep_objects_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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=\`echo $lt_compiler_lib_search_path_GCJ | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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"} - -# If no C compiler flags were specified, use CFLAGS. -LTCFLAGS=${LTCFLAGS-"$CFLAGS"} - -# Allow CC to be a program name with arguments. -compiler=$CC - - -# save warnings/boilerplate of simple test code -ac_outfile=conftest.$ac_objext -printf "$lt_simple_compile_test_code" >conftest.$ac_ext -eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_compiler_boilerplate=`cat conftest.err` -$rm conftest* - -ac_outfile=conftest.$ac_objext -printf "$lt_simple_link_test_code" >conftest.$ac_ext -eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err -_lt_linker_boilerplate=`cat conftest.err` -$rm conftest* - - -# Allow CC to be a program name with arguments. -lt_save_CC="$CC" -CC=${RC-"windres"} -compiler=$CC -compiler_RC=$CC -for cc_temp in $compiler""; do - case $cc_temp in - compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; - distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; - \-*) ;; - *) break;; - esac -done -cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` - -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 LTCFLAGS 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 -host_os=$host_os - -# The build system. -build_alias=$build_alias -build=$build -build_os=$build_os - -# 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 - -# LTCC compiler flags. -LTCFLAGS=$lt_LTCFLAGS - -# A language-specific compiler. -CC=$lt_compiler_RC - -# Is the compiler the GNU C compiler? -with_gcc=$GCC_RC - -gcc_dir=\`gcc -print-file-name=. | $SED 's,/\.$,,'\` -gcc_ver=\`gcc -dumpversion\` - -# 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_cmds='$shrext_cmds' - -# 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=\`echo $lt_predep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# Dependencies to place after the objects being linked to create a -# shared library. -postdep_objects=\`echo $lt_postdep_objects_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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=\`echo $lt_compiler_lib_search_path_RC | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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=\`echo $lt_sys_lib_search_path_spec | \$SED -e "s@\${gcc_dir}@\\\${gcc_dir}@g;s@\${gcc_ver}@\\\${gcc_ver}@g"\` - -# 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 - - - - - - - - - - - - - - - - - - - - - - - -# Check whether --enable-webdav or --disable-webdav was given. -if test "${enable_webdav+set}" = set; then - enableval="$enable_webdav" - -fi; - -if test "$enable_webdav" = "no"; then - -neon_no_webdav=yes -neon_no_acl=yes -NEON_NEED_XML_PARSER=no -neon_xml_parser_message="none needed" - -else - # Yes, we do need an XML parser. The _BUNDLED macros handle - # this normally. - NEON_NEED_XML_PARSER=yes -fi - -# The bundled macros also set this, which makes sure we recurse -# into the 'src' directory. -NEON_BUILD_BUNDLED=yes - -# Define NEON_VERSION etc and make the appropriate substitutions. - - -# Define the current versions. -NE_VERSION_MAJOR=0 -NE_VERSION_MINOR=27 -NE_VERSION_PATCH=2 -NE_VERSION_TAG= - -# libtool library interface versioning. Release policy dictates that -# for neon 0.x.y, each x brings an incompatible interface change, and -# each y brings no interface change, and since this policy has been -# followed since 0.1, x == CURRENT, y == RELEASE, 0 == AGE. For -# 1.x.y, this will become N + x == CURRENT, y == RELEASE, x == AGE, -# where N is constant (and equal to CURRENT + 1 from the final 0.x -# release) -NEON_INTERFACE_VERSION="${NE_VERSION_MINOR}:${NE_VERSION_PATCH}:0" - - - -NEON_VERSION="${NE_VERSION_MAJOR}.${NE_VERSION_MINOR}.${NE_VERSION_PATCH}${NE_VERSION_TAG}" - - -cat >>confdefs.h <<_ACEOF -#define NEON_VERSION "${NEON_VERSION}" -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define NE_VERSION_MAJOR (${NE_VERSION_MAJOR}) -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define NE_VERSION_MINOR (${NE_VERSION_MINOR}) -_ACEOF - - -cat >>confdefs.h <<_ACEOF -#define NE_VERSION_PATCH (${NE_VERSION_PATCH}) -_ACEOF - - - - - -# Pass the interface version on to libtool when linking libneon.la -NEON_LINK_FLAGS="-version-info ${NEON_INTERFACE_VERSION}" - -# Library-internal symbols are in the ne__ namespace: tell libtool -# to not export these from the built library if possible. -NEON_LINK_FLAGS="$NEON_LINK_FLAGS -export-symbols-regex '^ne_[^_]'" - -# Checks to compile test suite - - echo "$as_me:$LINENO: checking for strerror in -lcposix" >&5 -echo $ECHO_N "checking for strerror in -lcposix... $ECHO_C" >&6 -if test "${ac_cv_lib_cposix_strerror+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lcposix $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 strerror (); -int -main () -{ -strerror (); - ; - 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_cposix_strerror=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_cposix_strerror=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_cposix_strerror" >&5 -echo "${ECHO_T}$ac_cv_lib_cposix_strerror" >&6 -if test $ac_cv_lib_cposix_strerror = yes; then - LIBS="$LIBS -lcposix" -fi - - - -echo "$as_me:$LINENO: checking for inline" >&5 -echo $ECHO_N "checking for inline... $ECHO_C" >&6 -if test "${ac_cv_c_inline+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_c_inline=no -for ac_kw in inline __inline__ __inline; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#ifndef __cplusplus -typedef int foo_t; -static $ac_kw foo_t static_foo () {return 0; } -$ac_kw foo_t foo () {return 0; } -#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 - ac_cv_c_inline=$ac_kw; 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 - -fi -echo "$as_me:$LINENO: result: $ac_cv_c_inline" >&5 -echo "${ECHO_T}$ac_cv_c_inline" >&6 - - -case $ac_cv_c_inline in - inline | yes) ;; - *) - case $ac_cv_c_inline in - no) ac_val=;; - *) ac_val=$ac_cv_c_inline;; - esac - cat >>confdefs.h <<_ACEOF -#ifndef __cplusplus -#define inline $ac_val -#endif -_ACEOF - ;; -esac - -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 for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6 -if test "${ac_cv_type_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. */ -$ac_includes_default -int -main () -{ -if ((off_t *) 0) - return 0; -if (sizeof (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_off_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_off_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6 -if test $ac_cv_type_off_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define off_t long -_ACEOF - -fi - - -# Check for Darwin, which needs extra cpp and linker flags. -echo "$as_me:$LINENO: checking for uname" >&5 -echo $ECHO_N "checking for uname... $ECHO_C" >&6 -if test "${ne_cv_os_uname+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ne_cv_os_uname=`uname -s 2>/dev/null` - -fi -echo "$as_me:$LINENO: result: $ne_cv_os_uname" >&5 -echo "${ECHO_T}$ne_cv_os_uname" >&6 - -if test "$ne_cv_os_uname" = "Darwin"; then - CPPFLAGS="$CPPFLAGS -no-cpp-precomp" - LDFLAGS="$LDFLAGS -flat_namespace" - # poll has various issues in various Darwin releases - if test x${ac_cv_func_poll+set} != xset; then - ac_cv_func_poll=no - fi -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 for int" >&5 -echo $ECHO_N "checking for int... $ECHO_C" >&6 -if test "${ac_cv_type_int+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 ((int *) 0) - return 0; -if (sizeof (int)) - 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_int=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_int=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_int" >&5 -echo "${ECHO_T}$ac_cv_type_int" >&6 - -echo "$as_me:$LINENO: checking size of int" >&5 -echo $ECHO_N "checking size of int... $ECHO_C" >&6 -if test "${ac_cv_sizeof_int+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_int" = 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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (int))) >= 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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (int))) < 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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (int))) >= $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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (int))) <= $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_int=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 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. */ -$ac_includes_default -long longval () { return (long) (sizeof (int)); } -unsigned long ulongval () { return (long) (sizeof (int)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (int))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (int)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (int)))) - 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_int=`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 (int), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (int), 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_int=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_int" >&5 -echo "${ECHO_T}$ac_cv_sizeof_int" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_INT $ac_cv_sizeof_int -_ACEOF - - -echo "$as_me:$LINENO: checking for long" >&5 -echo $ECHO_N "checking for long... $ECHO_C" >&6 -if test "${ac_cv_type_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 *) 0) - return 0; -if (sizeof (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=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_long=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_long" >&5 -echo "${ECHO_T}$ac_cv_type_long" >&6 - -echo "$as_me:$LINENO: checking size of long" >&5 -echo $ECHO_N "checking size of long... $ECHO_C" >&6 -if test "${ac_cv_sizeof_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_long" = 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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= 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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) < 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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) >= $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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long))) <= $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_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 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. */ -$ac_includes_default -long longval () { return (long) (sizeof (long)); } -unsigned long ulongval () { return (long) (sizeof (long)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (long))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (long)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long)))) - 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_long=`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 (long), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long), 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_long=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG $ac_cv_sizeof_long -_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 - -echo "$as_me:$LINENO: checking size of long long" >&5 -echo $ECHO_N "checking size of long long... $ECHO_C" >&6 -if test "${ac_cv_sizeof_long_long+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_long_long" = 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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= 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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long long))) < 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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long long))) >= $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. */ -$ac_includes_default -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (long long))) <= $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_long_long=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (long long), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long), 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. */ -$ac_includes_default -long longval () { return (long) (sizeof (long long)); } -unsigned long ulongval () { return (long) (sizeof (long long)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (long long))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (long long)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (long long)))) - 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_long_long=`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 (long long), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (long long), 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_long_long=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_long_long" >&5 -echo "${ECHO_T}$ac_cv_sizeof_long_long" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long -_ACEOF - - -if test "$GCC" = "yes"; then - echo "$as_me:$LINENO: checking for gcc -Wformat -Werror sanity" >&5 -echo $ECHO_N "checking for gcc -Wformat -Werror sanity... $ECHO_C" >&6 -if test "${ne_cv_cc_werror+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - # See whether a simple test program will compile without errors. - ne_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -Wformat -Werror" - 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 () -{ -int i = 42; printf("%d", 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 - ne_cv_cc_werror=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ne_cv_cc_werror=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext - CPPFLAGS=$ne_save_CPPFLAGS -fi -echo "$as_me:$LINENO: result: $ne_cv_cc_werror" >&5 -echo "${ECHO_T}$ne_cv_cc_werror" >&6 - ne_fmt_trycompile=$ne_cv_cc_werror -else - ne_fmt_trycompile=no -fi - - - -# These checks are done whether or not the bundled neon build -# is used. - - - - - - - - - - - - - - - - - - -for ac_header in errno.h stdarg.h string.h stdlib.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 neon@webdav.org ## -## ------------------------------ ## -_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 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 - -echo "$as_me:$LINENO: checking size of size_t" >&5 -echo $ECHO_N "checking size of size_t... $ECHO_C" >&6 -if test "${ac_cv_sizeof_size_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_size_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (size_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (size_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (size_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (size_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (size_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_size_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (size_t), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (size_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. */ -$ac_includes_default - - -long longval () { return (long) (sizeof (size_t)); } -unsigned long ulongval () { return (long) (sizeof (size_t)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (size_t))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (size_t)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (size_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_size_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 (size_t), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (size_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_size_t=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_size_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t -_ACEOF - - - - - - - -echo "$as_me:$LINENO: checking how to print size_t" >&5 -echo $ECHO_N "checking how to print size_t... $ECHO_C" >&6 -if test "${ne_cv_fmt_size_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -ne_cv_fmt_size_t=none -if test $ne_fmt_trycompile = yes; then - oflags="$CPPFLAGS" - # Consider format string mismatches as errors - CPPFLAGS="$CPPFLAGS -Wformat -Werror" - for str in u lu llu; 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 -int -main () -{ -size_t i = 1; printf("%$str", 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 - ne_cv_fmt_size_t=$str; 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 - CPPFLAGS=$oflags -else - # Best guess. Don't have to be too precise since we probably won't - # get a warning message anyway. - case $ac_cv_sizeof_size_t in - $ac_cv_sizeof_int) ne_cv_fmt_size_t="u" ;; - $ac_cv_sizeof_long) ne_cv_fmt_size_t="lu" ;; - $ac_cv_sizeof_long_long) ne_cv_fmt_size_t="llu" ;; - esac -fi - -fi -echo "$as_me:$LINENO: result: $ne_cv_fmt_size_t" >&5 -echo "${ECHO_T}$ne_cv_fmt_size_t" >&6 - -if test "x$ne_cv_fmt_size_t" = "xnone"; then - { { echo "$as_me:$LINENO: error: format string for size_t not found" >&5 -echo "$as_me: error: format string for size_t not found" >&2;} - { (exit 1); exit 1; }; } -fi - - -cat >>confdefs.h <<_ACEOF -#define NE_FMT_SIZE_T "$ne_cv_fmt_size_t" -_ACEOF - - - - - -echo "$as_me:$LINENO: checking for off_t" >&5 -echo $ECHO_N "checking for off_t... $ECHO_C" >&6 -if test "${ac_cv_type_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. */ -$ac_includes_default - - -int -main () -{ -if ((off_t *) 0) - return 0; -if (sizeof (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_off_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_off_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 -echo "${ECHO_T}$ac_cv_type_off_t" >&6 - -echo "$as_me:$LINENO: checking size of off_t" >&5 -echo $ECHO_N "checking size of off_t... $ECHO_C" >&6 -if test "${ac_cv_sizeof_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (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_off_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (off_t), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (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. */ -$ac_includes_default - - -long longval () { return (long) (sizeof (off_t)); } -unsigned long ulongval () { return (long) (sizeof (off_t)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (off_t))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (off_t)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (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_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 (off_t), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (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_off_t=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_off_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_OFF_T $ac_cv_sizeof_off_t -_ACEOF - - - - - - - -echo "$as_me:$LINENO: checking how to print off_t" >&5 -echo $ECHO_N "checking how to print off_t... $ECHO_C" >&6 -if test "${ne_cv_fmt_off_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -ne_cv_fmt_off_t=none -if test $ne_fmt_trycompile = yes; then - oflags="$CPPFLAGS" - # Consider format string mismatches as errors - CPPFLAGS="$CPPFLAGS -Wformat -Werror" - for str in d ld lld; 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 -int -main () -{ -off_t i = 1; printf("%$str", 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 - ne_cv_fmt_off_t=$str; 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 - CPPFLAGS=$oflags -else - # Best guess. Don't have to be too precise since we probably won't - # get a warning message anyway. - case $ac_cv_sizeof_off_t in - $ac_cv_sizeof_int) ne_cv_fmt_off_t="d" ;; - $ac_cv_sizeof_long) ne_cv_fmt_off_t="ld" ;; - $ac_cv_sizeof_long_long) ne_cv_fmt_off_t="lld" ;; - esac -fi - -fi -echo "$as_me:$LINENO: result: $ne_cv_fmt_off_t" >&5 -echo "${ECHO_T}$ne_cv_fmt_off_t" >&6 - -if test "x$ne_cv_fmt_off_t" = "xnone"; then - { { echo "$as_me:$LINENO: error: format string for off_t not found" >&5 -echo "$as_me: error: format string for off_t not found" >&2;} - { (exit 1); exit 1; }; } -fi - - -cat >>confdefs.h <<_ACEOF -#define NE_FMT_OFF_T "$ne_cv_fmt_off_t" -_ACEOF - - - - - - -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 - -echo "$as_me:$LINENO: checking size of ssize_t" >&5 -echo $ECHO_N "checking size of ssize_t... $ECHO_C" >&6 -if test "${ac_cv_sizeof_ssize_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_ssize_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (ssize_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (ssize_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (ssize_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (ssize_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (ssize_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_ssize_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (ssize_t), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (ssize_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. */ -$ac_includes_default - - -long longval () { return (long) (sizeof (ssize_t)); } -unsigned long ulongval () { return (long) (sizeof (ssize_t)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (ssize_t))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (ssize_t)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (ssize_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_ssize_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 (ssize_t), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (ssize_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_ssize_t=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_ssize_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_ssize_t" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_SSIZE_T $ac_cv_sizeof_ssize_t -_ACEOF - - - - - - - -echo "$as_me:$LINENO: checking how to print ssize_t" >&5 -echo $ECHO_N "checking how to print ssize_t... $ECHO_C" >&6 -if test "${ne_cv_fmt_ssize_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -ne_cv_fmt_ssize_t=none -if test $ne_fmt_trycompile = yes; then - oflags="$CPPFLAGS" - # Consider format string mismatches as errors - CPPFLAGS="$CPPFLAGS -Wformat -Werror" - for str in d ld lld; 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 -int -main () -{ -ssize_t i = 1; printf("%$str", 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 - ne_cv_fmt_ssize_t=$str; 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 - CPPFLAGS=$oflags -else - # Best guess. Don't have to be too precise since we probably won't - # get a warning message anyway. - case $ac_cv_sizeof_ssize_t in - $ac_cv_sizeof_int) ne_cv_fmt_ssize_t="d" ;; - $ac_cv_sizeof_long) ne_cv_fmt_ssize_t="ld" ;; - $ac_cv_sizeof_long_long) ne_cv_fmt_ssize_t="lld" ;; - esac -fi - -fi -echo "$as_me:$LINENO: result: $ne_cv_fmt_ssize_t" >&5 -echo "${ECHO_T}$ne_cv_fmt_ssize_t" >&6 - -if test "x$ne_cv_fmt_ssize_t" = "xnone"; then - { { echo "$as_me:$LINENO: error: format string for ssize_t not found" >&5 -echo "$as_me: error: format string for ssize_t not found" >&2;} - { (exit 1); exit 1; }; } -fi - - -cat >>confdefs.h <<_ACEOF -#define NE_FMT_SSIZE_T "$ne_cv_fmt_ssize_t" -_ACEOF - - - - - - - - - -echo "$as_me:$LINENO: checking for time_t" >&5 -echo $ECHO_N "checking for time_t... $ECHO_C" >&6 -if test "${ac_cv_type_time_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 - -#ifdef HAVE_SYS_TIME_H -#include -#endif - -int -main () -{ -if ((time_t *) 0) - return 0; -if (sizeof (time_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_time_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_time_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_time_t" >&5 -echo "${ECHO_T}$ac_cv_type_time_t" >&6 - -echo "$as_me:$LINENO: checking size of time_t" >&5 -echo $ECHO_N "checking size of time_t... $ECHO_C" >&6 -if test "${ac_cv_sizeof_time_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_time_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. */ -$ac_includes_default - -#ifdef HAVE_SYS_TIME_H -#include -#endif - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (time_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. */ -$ac_includes_default - -#ifdef HAVE_SYS_TIME_H -#include -#endif - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (time_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. */ -$ac_includes_default - -#ifdef HAVE_SYS_TIME_H -#include -#endif - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (time_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. */ -$ac_includes_default - -#ifdef HAVE_SYS_TIME_H -#include -#endif - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (time_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. */ -$ac_includes_default - -#ifdef HAVE_SYS_TIME_H -#include -#endif - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (time_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_time_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (time_t), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (time_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. */ -$ac_includes_default - -#ifdef HAVE_SYS_TIME_H -#include -#endif - -long longval () { return (long) (sizeof (time_t)); } -unsigned long ulongval () { return (long) (sizeof (time_t)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (time_t))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (time_t)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (time_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_time_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 (time_t), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (time_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_time_t=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_time_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_TIME_T $ac_cv_sizeof_time_t -_ACEOF - - - - - - - -echo "$as_me:$LINENO: checking how to print time_t" >&5 -echo $ECHO_N "checking how to print time_t... $ECHO_C" >&6 -if test "${ne_cv_fmt_time_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -ne_cv_fmt_time_t=none -if test $ne_fmt_trycompile = yes; then - oflags="$CPPFLAGS" - # Consider format string mismatches as errors - CPPFLAGS="$CPPFLAGS -Wformat -Werror" - for str in d ld lld; do - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -#include - -#ifdef HAVE_SYS_TIME_H -#include -#endif -#include -int -main () -{ -time_t i = 1; printf("%$str", 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 - ne_cv_fmt_time_t=$str; 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 - CPPFLAGS=$oflags -else - # Best guess. Don't have to be too precise since we probably won't - # get a warning message anyway. - case $ac_cv_sizeof_time_t in - $ac_cv_sizeof_int) ne_cv_fmt_time_t="d" ;; - $ac_cv_sizeof_long) ne_cv_fmt_time_t="ld" ;; - $ac_cv_sizeof_long_long) ne_cv_fmt_time_t="lld" ;; - esac -fi - -fi -echo "$as_me:$LINENO: result: $ne_cv_fmt_time_t" >&5 -echo "${ECHO_T}$ne_cv_fmt_time_t" >&6 - -if test "x$ne_cv_fmt_time_t" = "xnone"; then - { { echo "$as_me:$LINENO: error: format string for time_t not found" >&5 -echo "$as_me: error: format string for time_t not found" >&2;} - { (exit 1); exit 1; }; } -fi - - -cat >>confdefs.h <<_ACEOF -#define NE_FMT_TIME_T "$ne_cv_fmt_time_t" -_ACEOF - - - -echo "$as_me:$LINENO: checking for pid_t" >&5 -echo $ECHO_N "checking for pid_t... $ECHO_C" >&6 -if test "${ac_cv_type_pid_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 ((pid_t *) 0) - return 0; -if (sizeof (pid_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_pid_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_pid_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 -echo "${ECHO_T}$ac_cv_type_pid_t" >&6 -if test $ac_cv_type_pid_t = yes; then - : -else - -cat >>confdefs.h <<_ACEOF -#define pid_t int -_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 - - - -# Search in /usr/ccs/bin for Solaris -ne_PATH=$PATH:/usr/ccs/bin -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_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 -for as_dir in $ne_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_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 - -fi -if test -z "$ac_cv_path_AR"; then - ac_pt_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_path_ac_pt_AR+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_pt_AR in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_AR="$ac_pt_AR" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $ne_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_path_ac_pt_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 - - test -z "$ac_cv_path_ac_pt_AR" && ac_cv_path_ac_pt_AR="notfound" - ;; -esac -fi -ac_pt_AR=$ac_cv_path_ac_pt_AR - -if test -n "$ac_pt_AR"; then - echo "$as_me:$LINENO: result: $ac_pt_AR" >&5 -echo "${ECHO_T}$ac_pt_AR" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - AR=$ac_pt_AR -else - AR="$ac_cv_path_AR" -fi - -if test "x$AR" = "xnotfound"; then - { { echo "$as_me:$LINENO: error: could not find ar tool" >&5 -echo "$as_me: error: could not find ar tool" >&2;} - { (exit 1); exit 1; }; } -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_path_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $RANLIB in - [\\/]* | ?:[\\/]*) - ac_cv_path_RANLIB="$RANLIB" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $ne_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_path_RANLIB="$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 -RANLIB=$ac_cv_path_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_path_RANLIB"; then - ac_pt_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_path_ac_pt_RANLIB+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $ac_pt_RANLIB in - [\\/]* | ?:[\\/]*) - ac_cv_path_ac_pt_RANLIB="$ac_pt_RANLIB" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $ne_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_path_ac_pt_RANLIB="$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_ac_pt_RANLIB" && ac_cv_path_ac_pt_RANLIB=":" - ;; -esac -fi -ac_pt_RANLIB=$ac_cv_path_ac_pt_RANLIB - -if test -n "$ac_pt_RANLIB"; then - echo "$as_me:$LINENO: result: $ac_pt_RANLIB" >&5 -echo "${ECHO_T}$ac_pt_RANLIB" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - RANLIB=$ac_pt_RANLIB -else - RANLIB="$ac_cv_path_RANLIB" -fi - - - - - - - - - - - - - - - - -for ac_header in sys/time.h stdint.h locale.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 neon@webdav.org ## -## ------------------------------ ## -_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 - - - - - - - -for ac_func in pipe isatty usleep shutdown setlocale -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 - - - - - - -echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5 -echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6 -if test "${ac_cv_c_bigendian+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - # See if sys/param.h defines the BYTE_ORDER macro. -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 !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN - bogus endian macros -#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 - # It does; now see whether it defined to BIG_ENDIAN or not. -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 BYTE_ORDER != BIG_ENDIAN - not big endian -#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_bigendian=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_c_bigendian=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -# It does not; compile a test program. -if test "$cross_compiling" = yes; then - # try to guess the endianness by grepping values into an object file - ac_cv_c_bigendian=unknown - cat >conftest.$ac_ext <<_ACEOF -/* confdefs.h. */ -_ACEOF -cat confdefs.h >>conftest.$ac_ext -cat >>conftest.$ac_ext <<_ACEOF -/* end confdefs.h. */ -short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; -short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; -void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; } -short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; -short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; -void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; } -int -main () -{ - _ascii (); _ebcdic (); - ; - 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 - if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then - ac_cv_c_bigendian=yes -fi -if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then - if test "$ac_cv_c_bigendian" = unknown; then - ac_cv_c_bigendian=no - else - # finding both strings is unlikely to happen, but who knows? - ac_cv_c_bigendian=unknown - fi -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 -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 () -{ - /* Are we little or big endian? From Harbison&Steele. */ - union - { - long l; - char c[sizeof (long)]; - } u; - u.l = 1; - exit (u.c[sizeof (long) - 1] == 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 - ac_cv_c_bigendian=no -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_c_bigendian=yes -fi -rm -f core *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext -fi -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5 -echo "${ECHO_T}$ac_cv_c_bigendian" >&6 -case $ac_cv_c_bigendian in - yes) - -cat >>confdefs.h <<\_ACEOF -#define WORDS_BIGENDIAN 1 -_ACEOF - ;; - no) - ;; - *) - { { echo "$as_me:$LINENO: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&5 -echo "$as_me: error: unknown endianness -presetting ac_cv_c_bigendian=no (or yes) will help" >&2;} - { (exit 1); exit 1; }; } ;; -esac - -echo "$as_me:$LINENO: checking whether strerror_r is declared" >&5 -echo $ECHO_N "checking whether strerror_r is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_strerror_r+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 () -{ -#ifndef strerror_r - char *p = (char *) strerror_r; -#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_have_decl_strerror_r=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_strerror_r=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_strerror_r" >&5 -echo "${ECHO_T}$ac_cv_have_decl_strerror_r" >&6 -if test $ac_cv_have_decl_strerror_r = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRERROR_R 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STRERROR_R 0 -_ACEOF - - -fi - - - -for ac_func in strerror_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 - -echo "$as_me:$LINENO: checking whether strerror_r returns char *" >&5 -echo $ECHO_N "checking whether strerror_r returns char *... $ECHO_C" >&6 -if test "${ac_cv_func_strerror_r_char_p+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - ac_cv_func_strerror_r_char_p=no - if test $ac_cv_have_decl_strerror_r = yes; then - 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 () -{ - - char buf[100]; - char x = *strerror_r (0, buf, sizeof buf); - char *p = strerror_r (0, buf, sizeof buf); - - ; - 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_strerror_r_char_p=yes -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 - else - # strerror_r is not declared. Choose between - # systems that have relatively inaccessible declarations for the - # function. BeOS and DEC UNIX 4.0 fall in this category, but the - # former has a strerror_r that returns char*, while the latter - # has a strerror_r that returns `int'. - # This test should segfault on the DEC system. - 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. */ -$ac_includes_default - extern char *strerror_r (); -int -main () -{ -char buf[100]; - char x = *strerror_r (0, buf, sizeof buf); - exit (!isalpha (x)); - ; - 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_func_strerror_r_char_p=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 - -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_func_strerror_r_char_p" >&5 -echo "${ECHO_T}$ac_cv_func_strerror_r_char_p" >&6 -if test $ac_cv_func_strerror_r_char_p = yes; then - -cat >>confdefs.h <<\_ACEOF -#define STRERROR_R_CHAR_P 1 -_ACEOF - -fi - - - - -for ac_func in snprintf vsnprintf -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 - - ne_save_LIBS=$LIBS - LIBS="$LIBS -lm" # Always need -lm - echo "$as_me:$LINENO: checking for trio_vsnprintf in -ltrio" >&5 -echo $ECHO_N "checking for trio_vsnprintf in -ltrio... $ECHO_C" >&6 -if test "${ac_cv_lib_trio_trio_vsnprintf+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-ltrio $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 trio_vsnprintf (); -int -main () -{ -trio_vsnprintf (); - ; - 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_trio_trio_vsnprintf=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_trio_trio_vsnprintf=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_trio_trio_vsnprintf" >&5 -echo "${ECHO_T}$ac_cv_lib_trio_trio_vsnprintf" >&6 -if test $ac_cv_lib_trio_trio_vsnprintf = yes; then - -for ac_header in trio.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 neon@webdav.org ## -## ------------------------------ ## -_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 - -else - { { echo "$as_me:$LINENO: error: trio installation problem? libtrio found but not trio.h" >&5 -echo "$as_me: error: trio installation problem? libtrio found but not trio.h" >&2;} - { (exit 1); exit 1; }; } -fi - -done - - { echo "$as_me:$LINENO: using trio printf replacement library" >&5 -echo "$as_me: using trio printf replacement library" >&6;} - NEON_LIBS="$NEON_LIBS -ltrio -lm" - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TRIO 1 -_ACEOF - -else - { echo "$as_me:$LINENO: no vsnprintf/snprintf detected in C library" >&5 -echo "$as_me: no vsnprintf/snprintf detected in C library" >&6;} - { { echo "$as_me:$LINENO: error: Install the trio library from http://daniel.haxx.se/projects/trio/" >&5 -echo "$as_me: error: Install the trio library from http://daniel.haxx.se/projects/trio/" >&2;} - { (exit 1); exit 1; }; } -fi - - LIBS=$ne_save_LIBS - break - -fi -done - - - - - - - - - - - - - - - - - - - - - - -for ac_header in sys/time.h limits.h sys/select.h arpa/inet.h libintl.h \ - signal.h sys/socket.h netinet/in.h netinet/tcp.h netdb.h sys/poll.h \ - sys/limits.h fcntl.h iconv.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 -/* netinet/tcp.h requires netinet/in.h on some platforms. */ -#ifdef HAVE_NETINET_IN_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 timezone global" >&5 -echo $ECHO_N "checking for timezone global... $ECHO_C" >&6 -if test "${ne_cv_cc_timezone+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 () -{ -time_t t = 0 - timezone; - ; - 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 - ne_cv_cc_timezone=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ne_cv_cc_timezone=no -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ne_cv_cc_timezone" >&5 -echo "${ECHO_T}$ne_cv_cc_timezone" >&6 - -if test "$ne_cv_cc_timezone" = "yes"; then - -cat >>confdefs.h <<\_ACEOF -#define HAVE_TIMEZONE 1 -_ACEOF - -fi - - - - -if test -z "$ac_cv_sizeof_off_t"; then - -NE_FLAG_LFS=no - -ne_LFS_message="LFS support omitted: off_t size unknown!" - { echo "$as_me:$LINENO: LFS support omitted: off_t size unknown!" >&5 -echo "$as_me: LFS support omitted: off_t size unknown!" >&6;} - -elif test $ac_cv_sizeof_off_t != 4; then - -NE_FLAG_LFS=no - -ne_LFS_message="LFS support unnecessary, off_t is not 32-bit" - { echo "$as_me:$LINENO: LFS support unnecessary, off_t is not 32-bit" >&5 -echo "$as_me: LFS support unnecessary, off_t is not 32-bit" >&6;} - - - -for ac_func in strtoll strtoq -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 - break -fi -done - -elif test -z "$ac_cv_sizeof_long_long"; then - -NE_FLAG_LFS=no - -ne_LFS_message="LFS support omitted: long long size unknown" - { echo "$as_me:$LINENO: LFS support omitted: long long size unknown" >&5 -echo "$as_me: LFS support omitted: long long size unknown" >&6;} - -elif test $ac_cv_sizeof_long_long != 8; then - -NE_FLAG_LFS=no - -ne_LFS_message="LFS support omitted: long long not 64-bit" - { echo "$as_me:$LINENO: LFS support omitted: long long not 64-bit" >&5 -echo "$as_me: LFS support omitted: long long not 64-bit" >&6;} - -else - ne_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" - echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 -if test "${ac_cv_type_off64_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 ((off64_t *) 0) - return 0; -if (sizeof (off64_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_off64_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_off64_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_off64_t" >&5 -echo "${ECHO_T}$ac_cv_type_off64_t" >&6 -if test $ac_cv_type_off64_t = yes; then - - - - - -echo "$as_me:$LINENO: checking for off64_t" >&5 -echo $ECHO_N "checking for off64_t... $ECHO_C" >&6 -if test "${ac_cv_type_off64_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 ((off64_t *) 0) - return 0; -if (sizeof (off64_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_off64_t=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_off64_t=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_off64_t" >&5 -echo "${ECHO_T}$ac_cv_type_off64_t" >&6 - -echo "$as_me:$LINENO: checking size of off64_t" >&5 -echo $ECHO_N "checking size of off64_t... $ECHO_C" >&6 -if test "${ac_cv_sizeof_off64_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_off64_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (off64_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (off64_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (off64_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (off64_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. */ -$ac_includes_default - - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (off64_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_off64_t=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (off64_t), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (off64_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. */ -$ac_includes_default - - -long longval () { return (long) (sizeof (off64_t)); } -unsigned long ulongval () { return (long) (sizeof (off64_t)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (off64_t))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (off64_t)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (off64_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_off64_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 (off64_t), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (off64_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_off64_t=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_off64_t" >&5 -echo "${ECHO_T}$ac_cv_sizeof_off64_t" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_OFF64_T $ac_cv_sizeof_off64_t -_ACEOF - - - - - - - -echo "$as_me:$LINENO: checking how to print off64_t" >&5 -echo $ECHO_N "checking how to print off64_t... $ECHO_C" >&6 -if test "${ne_cv_fmt_off64_t+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -ne_cv_fmt_off64_t=none -if test $ne_fmt_trycompile = yes; then - oflags="$CPPFLAGS" - # Consider format string mismatches as errors - CPPFLAGS="$CPPFLAGS -Wformat -Werror" - for str in d ld lld; 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 -int -main () -{ -off64_t i = 1; printf("%$str", 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 - ne_cv_fmt_off64_t=$str; 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 - CPPFLAGS=$oflags -else - # Best guess. Don't have to be too precise since we probably won't - # get a warning message anyway. - case $ac_cv_sizeof_off64_t in - $ac_cv_sizeof_int) ne_cv_fmt_off64_t="d" ;; - $ac_cv_sizeof_long) ne_cv_fmt_off64_t="ld" ;; - $ac_cv_sizeof_long_long) ne_cv_fmt_off64_t="lld" ;; - esac -fi - -fi -echo "$as_me:$LINENO: result: $ne_cv_fmt_off64_t" >&5 -echo "${ECHO_T}$ne_cv_fmt_off64_t" >&6 - -if test "x$ne_cv_fmt_off64_t" = "xnone"; then - { { echo "$as_me:$LINENO: error: format string for off64_t not found" >&5 -echo "$as_me: error: format string for off64_t not found" >&2;} - { (exit 1); exit 1; }; } -fi - - -cat >>confdefs.h <<_ACEOF -#define NE_FMT_OFF64_T "$ne_cv_fmt_off64_t" -_ACEOF - - - ne_lfsok=no - - -for ac_func in strtoll strtoq -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 - ne_lfsok=yes; break -fi -done - - - -for ac_func in lseek64 fstat64 -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 - ne_lfsok=no; break -fi -done - - if test x$ne_lfsok = xyes; then - -NE_FLAG_LFS=yes - - -cat >>confdefs.h <<\_ACEOF -#define NE_HAVE_LFS 1 -_ACEOF - -ne_LFS_message="LFS (large file) support enabled" - { echo "$as_me:$LINENO: LFS (large file) support enabled" >&5 -echo "$as_me: LFS (large file) support enabled" >&6;} - - NEON_CFLAGS="$NEON_CFLAGS -D_LARGEFILE64_SOURCE -DNE_LFS" - ne_save_CPPFLAGS="$CPPFLAGS -DNE_LFS" - else - -NE_FLAG_LFS=no - -ne_LFS_message="LFS support omitted: 64-bit support functions not found" - { echo "$as_me:$LINENO: LFS support omitted: 64-bit support functions not found" >&5 -echo "$as_me: LFS support omitted: 64-bit support functions not found" >&6;} - - fi -else - -NE_FLAG_LFS=no - -ne_LFS_message="LFS support omitted: off64_t type not found" - { echo "$as_me:$LINENO: LFS support omitted: off64_t type not found" >&5 -echo "$as_me: LFS support omitted: off64_t type not found" >&6;} - -fi - - CPPFLAGS=$ne_save_CPPFLAGS -fi -if test "$NE_FLAG_LFS" = "yes"; then - -cat >>confdefs.h <<_ACEOF -#define NE_FMT_NE_OFF_T NE_FMT_OFF64_T -_ACEOF - -else - cat >>confdefs.h <<_ACEOF -#define NE_FMT_NE_OFF_T NE_FMT_OFF_T -_ACEOF - -fi - - - -for ac_func in strcasecmp -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 - case $LIBOBJS in - "$ac_func.$ac_objext" | \ - *" $ac_func.$ac_objext" | \ - "$ac_func.$ac_objext "* | \ - *" $ac_func.$ac_objext "* ) ;; - *) LIBOBJS="$LIBOBJS $ac_func.$ac_objext" ;; -esac - -fi -done - - - - - - - - - - -for ac_func in signal setvbuf setsockopt stpcpy poll fcntl getsockopt -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 - - -if test "x${ac_cv_func_poll}${ac_cv_header_sys_poll_h}y" = "xyesyesy"; then - -cat >>confdefs.h <<\_ACEOF -#define NE_USE_POLL 1 -_ACEOF - -fi - -if test "$ac_cv_func_stpcpy" = "yes"; then - echo "$as_me:$LINENO: checking whether stpcpy is declared" >&5 -echo $ECHO_N "checking whether stpcpy is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_stpcpy+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 () -{ -#ifndef stpcpy - char *p = (char *) stpcpy; -#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_have_decl_stpcpy=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_stpcpy=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_stpcpy" >&5 -echo "${ECHO_T}$ac_cv_have_decl_stpcpy" >&6 -if test $ac_cv_have_decl_stpcpy = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STPCPY 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_STPCPY 0 -_ACEOF - - -fi - - -fi - -# Modern AIXes with the "Linux-like" libc have an undeclared stpcpy - - - -# Unixware 7 can only link gethostbyname with -lnsl -lsocket -# Pick up -lsocket first, then the gethostbyname check will work. - - - - -echo "$as_me:$LINENO: checking for library containing socket" >&5 -echo $ECHO_N "checking for library containing socket... $ECHO_C" >&6 -if test "${ne_cv_libsfor_socket+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 () -{ -socket(); - ; - 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 - ne_cv_libsfor_socket="none needed" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -ne_sl_save_LIBS=$LIBS -ne_cv_libsfor_socket="not found" -for lib in socket inet ws2_32; do - # The w32api libraries link using the stdcall calling convention. - case ${lib}-${ne_cv_os_uname} in - ws2_32-MINGW*) ne__code="__stdcall socket();" ;; - *) ne__code="socket();" ;; - esac - - LIBS="$ne_sl_save_LIBS -l$lib $NEON_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 () -{ -$ne__code - ; - 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 - ne_cv_libsfor_socket="-l$lib"; 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_exeext conftest.$ac_ext - -done -LIBS=$ne_sl_save_LIBS -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ne_cv_libsfor_socket" >&5 -echo "${ECHO_T}$ne_cv_libsfor_socket" >&6 - -if test "$ne_cv_libsfor_socket" = "not found"; then - { { echo "$as_me:$LINENO: error: could not find library containing socket" >&5 -echo "$as_me: error: could not find library containing socket" >&2;} - { (exit 1); exit 1; }; } -elif test "$ne_cv_libsfor_socket" = "none needed"; then - : -else - NEON_LIBS="$ne_cv_libsfor_socket $NEON_LIBS" - -fi - -# Enable getaddrinfo support if it, gai_strerror and inet_ntop are -# all available. - - - - -echo "$as_me:$LINENO: checking for library containing getaddrinfo" >&5 -echo $ECHO_N "checking for library containing getaddrinfo... $ECHO_C" >&6 -if test "${ne_cv_libsfor_getaddrinfo+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 () -{ -getaddrinfo(); - ; - 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 - ne_cv_libsfor_getaddrinfo="none needed" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -ne_sl_save_LIBS=$LIBS -ne_cv_libsfor_getaddrinfo="not found" -for lib in nsl; do - # The w32api libraries link using the stdcall calling convention. - case ${lib}-${ne_cv_os_uname} in - ws2_32-MINGW*) ne__code="__stdcall getaddrinfo();" ;; - *) ne__code="getaddrinfo();" ;; - esac - - LIBS="$ne_sl_save_LIBS -l$lib $NEON_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 () -{ -$ne__code - ; - 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 - ne_cv_libsfor_getaddrinfo="-l$lib"; 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_exeext conftest.$ac_ext - -done -LIBS=$ne_sl_save_LIBS -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ne_cv_libsfor_getaddrinfo" >&5 -echo "${ECHO_T}$ne_cv_libsfor_getaddrinfo" >&6 - -if test "$ne_cv_libsfor_getaddrinfo" = "not found"; then - ne_enable_gai=no -elif test "$ne_cv_libsfor_getaddrinfo" = "none needed"; then - # HP-UX boxes commonly get into a state where getaddrinfo is present - # but borked: http://marc.theaimsgroup.com/?l=apr-dev&m=107730955207120&w=2 - case x`uname -sr 2>/dev/null`y in - xHP-UX*11.[01]*y) - { echo "$as_me:$LINENO: getaddrinfo support disabled on HP-UX 11.0x/11.1x" >&5 -echo "$as_me: getaddrinfo support disabled on HP-UX 11.0x/11.1x" >&6;} ;; - *) - ne_enable_gai=yes - -ne_cf_save_LIBS=$LIBS -LIBS="$LIBS $NEON_LIBS" - - - -for ac_func in gai_strerror getnameinfo inet_ntop -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 - ne_enable_gai=no; break -fi -done - -LIBS=$ne_cf_save_LIBS ;; - esac - -else - NEON_LIBS="$ne_cv_libsfor_getaddrinfo $NEON_LIBS" - # HP-UX boxes commonly get into a state where getaddrinfo is present - # but borked: http://marc.theaimsgroup.com/?l=apr-dev&m=107730955207120&w=2 - case x`uname -sr 2>/dev/null`y in - xHP-UX*11.[01]*y) - { echo "$as_me:$LINENO: getaddrinfo support disabled on HP-UX 11.0x/11.1x" >&5 -echo "$as_me: getaddrinfo support disabled on HP-UX 11.0x/11.1x" >&6;} ;; - *) - ne_enable_gai=yes - -ne_cf_save_LIBS=$LIBS -LIBS="$LIBS $NEON_LIBS" - - - -for ac_func in gai_strerror getnameinfo inet_ntop -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 - ne_enable_gai=no; break -fi -done - -LIBS=$ne_cf_save_LIBS ;; - esac - -fi - -if test $ne_enable_gai = yes; then - -NE_FLAG_IPV6=yes - - -cat >>confdefs.h <<\_ACEOF -#define NE_HAVE_IPV6 1 -_ACEOF - -ne_IPV6_message="IPv6 support is enabled" - { echo "$as_me:$LINENO: IPv6 support is enabled" >&5 -echo "$as_me: IPv6 support is enabled" >&6;} - - -cat >>confdefs.h <<\_ACEOF -#define USE_GETADDRINFO 1 -_ACEOF - - echo "$as_me:$LINENO: checking for working AI_ADDRCONFIG" >&5 -echo $ECHO_N "checking for working AI_ADDRCONFIG... $ECHO_C" >&6 -if test "${ne_cv_gai_addrconfig+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - - if test "$cross_compiling" = yes; then - ne_cv_gai_addrconfig=no -else - 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 () -{ -struct addrinfo hints = {0}, *result; -hints.ai_flags = AI_ADDRCONFIG; -if (getaddrinfo("localhost", NULL, &hints, &result) != 0) return 1; - ; - 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 - ne_cv_gai_addrconfig=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 ) -ne_cv_gai_addrconfig=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: $ne_cv_gai_addrconfig" >&5 -echo "${ECHO_T}$ne_cv_gai_addrconfig" >&6 - if test $ne_cv_gai_addrconfig = yes; then - -cat >>confdefs.h <<\_ACEOF -#define USE_GAI_ADDRCONFIG 1 -_ACEOF - - fi -else - # Checks for non-getaddrinfo() based resolver interfaces. - # QNX has gethostbyname in -lsocket. BeOS only has it in -lbind. - # CygWin/Winsock2 has it in -lws2_32, allegedly. - - - - -echo "$as_me:$LINENO: checking for library containing gethostbyname" >&5 -echo $ECHO_N "checking for library containing gethostbyname... $ECHO_C" >&6 -if test "${ne_cv_libsfor_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. */ - -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 - ne_cv_libsfor_gethostbyname="none needed" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -ne_sl_save_LIBS=$LIBS -ne_cv_libsfor_gethostbyname="not found" -for lib in socket nsl bind ws2_32; do - # The w32api libraries link using the stdcall calling convention. - case ${lib}-${ne_cv_os_uname} in - ws2_32-MINGW*) ne__code="__stdcall gethostbyname();" ;; - *) ne__code="gethostbyname();" ;; - esac - - LIBS="$ne_sl_save_LIBS -l$lib $NEON_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 () -{ -$ne__code - ; - 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 - ne_cv_libsfor_gethostbyname="-l$lib"; 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_exeext conftest.$ac_ext - -done -LIBS=$ne_sl_save_LIBS -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ne_cv_libsfor_gethostbyname" >&5 -echo "${ECHO_T}$ne_cv_libsfor_gethostbyname" >&6 - -if test "$ne_cv_libsfor_gethostbyname" = "not found"; then - { { echo "$as_me:$LINENO: error: could not find library containing gethostbyname" >&5 -echo "$as_me: error: could not find library containing gethostbyname" >&2;} - { (exit 1); exit 1; }; } -elif test "$ne_cv_libsfor_gethostbyname" = "none needed"; then - : -else - NEON_LIBS="$ne_cv_libsfor_gethostbyname $NEON_LIBS" - -fi - - - - -echo "$as_me:$LINENO: checking for library containing hstrerror" >&5 -echo $ECHO_N "checking for library containing hstrerror... $ECHO_C" >&6 -if test "${ne_cv_libsfor_hstrerror+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 () -{ -hstrerror(); - ; - 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 - ne_cv_libsfor_hstrerror="none needed" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -ne_sl_save_LIBS=$LIBS -ne_cv_libsfor_hstrerror="not found" -for lib in resolv; do - # The w32api libraries link using the stdcall calling convention. - case ${lib}-${ne_cv_os_uname} in - ws2_32-MINGW*) ne__code="__stdcall hstrerror();" ;; - *) ne__code="hstrerror();" ;; - esac - - LIBS="$ne_sl_save_LIBS -l$lib $NEON_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 () -{ -$ne__code - ; - 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 - ne_cv_libsfor_hstrerror="-l$lib"; 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_exeext conftest.$ac_ext - -done -LIBS=$ne_sl_save_LIBS -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ne_cv_libsfor_hstrerror" >&5 -echo "${ECHO_T}$ne_cv_libsfor_hstrerror" >&6 - -if test "$ne_cv_libsfor_hstrerror" = "not found"; then - : -elif test "$ne_cv_libsfor_hstrerror" = "none needed"; then - : -else - NEON_LIBS="$ne_cv_libsfor_hstrerror $NEON_LIBS" - -fi - -ne_cf_save_LIBS=$LIBS -LIBS="$LIBS $NEON_LIBS" - -for ac_func in hstrerror -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 - -LIBS=$ne_cf_save_LIBS - # Older Unixes don't declare h_errno. - echo "$as_me:$LINENO: checking whether h_errno is declared" >&5 -echo $ECHO_N "checking whether h_errno is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_h_errno+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 - -int -main () -{ -#ifndef h_errno - char *p = (char *) h_errno; -#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_have_decl_h_errno=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_h_errno=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_h_errno" >&5 -echo "${ECHO_T}$ac_cv_have_decl_h_errno" >&6 -if test $ac_cv_have_decl_h_errno = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_H_ERRNO 1 -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define HAVE_DECL_H_ERRNO 0 -_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. */ - -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_NETINET_IN_H -# include -#endif - - -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 - - -cat >>confdefs.h <<\_ACEOF -#define in_addr_t unsigned int -_ACEOF - -fi - -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. */ - -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif - - -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 - -cat >>confdefs.h <<_ACEOF -#define HAVE_SOCKLEN_T 1 -_ACEOF - - -fi - - -echo "$as_me:$LINENO: checking for struct tm.tm_gmtoff" >&5 -echo $ECHO_N "checking for struct tm.tm_gmtoff... $ECHO_C" >&6 -if test "${ac_cv_member_struct_tm_tm_gmtoff+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 - -int -main () -{ -static struct tm ac_aggr; -if (ac_aggr.tm_gmtoff) -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_member_struct_tm_tm_gmtoff=yes -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 - -int -main () -{ -static struct tm ac_aggr; -if (sizeof ac_aggr.tm_gmtoff) -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_member_struct_tm_tm_gmtoff=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_member_struct_tm_tm_gmtoff=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm_tm_gmtoff" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm_tm_gmtoff" >&6 -if test $ac_cv_member_struct_tm_tm_gmtoff = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_TM_TM_GMTOFF 1 -_ACEOF - - -fi -echo "$as_me:$LINENO: checking for struct tm.__tm_gmtoff" >&5 -echo $ECHO_N "checking for struct tm.__tm_gmtoff... $ECHO_C" >&6 -if test "${ac_cv_member_struct_tm___tm_gmtoff+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 - -int -main () -{ -static struct tm ac_aggr; -if (ac_aggr.__tm_gmtoff) -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_member_struct_tm___tm_gmtoff=yes -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 - -int -main () -{ -static struct tm ac_aggr; -if (sizeof ac_aggr.__tm_gmtoff) -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_member_struct_tm___tm_gmtoff=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_member_struct_tm___tm_gmtoff=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_member_struct_tm___tm_gmtoff" >&5 -echo "${ECHO_T}$ac_cv_member_struct_tm___tm_gmtoff" >&6 -if test $ac_cv_member_struct_tm___tm_gmtoff = yes; then - -cat >>confdefs.h <<_ACEOF -#define HAVE_STRUCT_TM___TM_GMTOFF 1 -_ACEOF - - -fi - - -if test $ac_cv_member_struct_tm_tm_gmtoff$ac_cv_member_struct_tm___tm_gmtoff = nono; then - { echo "$as_me:$LINENO: WARNING: no timezone handling in date parsing on this platform" >&5 -echo "$as_me: WARNING: no timezone handling in date parsing on this platform" >&2;} -fi - - - - -# Check whether --with-zlib or --without-zlib was given. -if test "${with_zlib+set}" = set; then - withval="$with_zlib" - ne_use_zlib=$withval -else - ne_use_zlib=yes -fi; - -if test "$ne_use_zlib" = "yes"; then - 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 neon@webdav.org ## -## ------------------------------ ## -_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 - - echo "$as_me:$LINENO: checking for inflate in -lz" >&5 -echo $ECHO_N "checking for inflate in -lz... $ECHO_C" >&6 -if test "${ac_cv_lib_z_inflate+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 inflate (); -int -main () -{ -inflate (); - ; - 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_inflate=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_z_inflate=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_inflate" >&5 -echo "${ECHO_T}$ac_cv_lib_z_inflate" >&6 -if test $ac_cv_lib_z_inflate = yes; then - - NEON_LIBS="$NEON_LIBS -lz" - -NE_FLAG_ZLIB=yes - - -cat >>confdefs.h <<\_ACEOF -#define NE_HAVE_ZLIB 1 -_ACEOF - -ne_ZLIB_message="zlib support enabled, using -lz" - { echo "$as_me:$LINENO: zlib support enabled, using -lz" >&5 -echo "$as_me: zlib support enabled, using -lz" >&6;} - - -else - -NE_FLAG_ZLIB=no - -ne_ZLIB_message="zlib library not found" - { echo "$as_me:$LINENO: zlib library not found" >&5 -echo "$as_me: zlib library not found" >&6;} - -fi - - -else - -NE_FLAG_ZLIB=no - -ne_ZLIB_message="zlib header not found" - { echo "$as_me:$LINENO: zlib header not found" >&5 -echo "$as_me: zlib header not found" >&6;} - -fi - - -else - -NE_FLAG_ZLIB=no - -ne_ZLIB_message="zlib not enabled" - { echo "$as_me:$LINENO: zlib not enabled" >&5 -echo "$as_me: zlib not enabled" >&6;} - -fi - - -# Conditionally enable ACL support -echo "$as_me:$LINENO: checking whether to enable ACL support in neon" >&5 -echo $ECHO_N "checking whether to enable ACL support in neon... $ECHO_C" >&6 -if test "x$neon_no_acl" = "xyes"; then - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -else - echo "$as_me:$LINENO: result: yes" >&5 -echo "${ECHO_T}yes" >&6 - NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_acl" -fi - - - - -# Check whether --with-ssl or --without-ssl was given. -if test "${with_ssl+set}" = set; then - withval="$with_ssl" - -fi; - - -# Check whether --with-egd or --without-egd was given. -if test "${with_egd+set}" = set; then - withval="$with_egd" - -fi; - -case $with_ssl in -/*) - { echo "$as_me:$LINENO: to use SSL libraries in non-standard locations, try --with-ssl --with-libs=$with_ssl" >&5 -echo "$as_me: to use SSL libraries in non-standard locations, try --with-ssl --with-libs=$with_ssl" >&6;} - { { echo "$as_me:$LINENO: error: --with-ssl does not take a path argument" >&5 -echo "$as_me: error: --with-ssl does not take a path argument" >&2;} - { (exit 1); exit 1; }; } - ;; -yes|openssl) - - -# 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_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - 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_path_PKG_CONFIG="$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_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - -if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -if test "$PKG_CONFIG" = "no"; then - : Not using pkg-config - # Either OpenSSL library may require -ldl if built with dynamic engine support - - - - -echo "$as_me:$LINENO: checking for library containing RSA_new" >&5 -echo $ECHO_N "checking for library containing RSA_new... $ECHO_C" >&6 -if test "${ne_cv_libsfor_RSA_new+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 () -{ -RSA_new(); - ; - 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 - ne_cv_libsfor_RSA_new="none needed" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -ne_sl_save_LIBS=$LIBS -ne_cv_libsfor_RSA_new="not found" -for lib in crypto; do - # The w32api libraries link using the stdcall calling convention. - case ${lib}-${ne_cv_os_uname} in - ws2_32-MINGW*) ne__code="__stdcall RSA_new();" ;; - *) ne__code="RSA_new();" ;; - esac - - LIBS="$ne_sl_save_LIBS -l$lib $NEON_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 () -{ -$ne__code - ; - 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 - ne_cv_libsfor_RSA_new="-l$lib"; 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_exeext conftest.$ac_ext - LIBS="$ne_sl_save_LIBS -l$lib -ldl $NEON_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 () -{ -$ne__code - ; - 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 - ne_cv_libsfor_RSA_new="-l$lib -ldl"; 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_exeext conftest.$ac_ext -done -LIBS=$ne_sl_save_LIBS -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ne_cv_libsfor_RSA_new" >&5 -echo "${ECHO_T}$ne_cv_libsfor_RSA_new" >&6 - -if test "$ne_cv_libsfor_RSA_new" = "not found"; then - { { echo "$as_me:$LINENO: error: could not find library containing RSA_new" >&5 -echo "$as_me: error: could not find library containing RSA_new" >&2;} - { (exit 1); exit 1; }; } -elif test "$ne_cv_libsfor_RSA_new" = "none needed"; then - : -else - NEON_LIBS="$ne_cv_libsfor_RSA_new $NEON_LIBS" - -fi - - - - -echo "$as_me:$LINENO: checking for library containing SSL_library_init" >&5 -echo $ECHO_N "checking for library containing SSL_library_init... $ECHO_C" >&6 -if test "${ne_cv_libsfor_SSL_library_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. */ - -int -main () -{ -SSL_library_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 - ne_cv_libsfor_SSL_library_init="none needed" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -ne_sl_save_LIBS=$LIBS -ne_cv_libsfor_SSL_library_init="not found" -for lib in ssl; do - # The w32api libraries link using the stdcall calling convention. - case ${lib}-${ne_cv_os_uname} in - ws2_32-MINGW*) ne__code="__stdcall SSL_library_init();" ;; - *) ne__code="SSL_library_init();" ;; - esac - - LIBS="$ne_sl_save_LIBS -l$lib $NEON_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 () -{ -$ne__code - ; - 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 - ne_cv_libsfor_SSL_library_init="-l$lib"; 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_exeext conftest.$ac_ext - LIBS="$ne_sl_save_LIBS -l$lib -ldl $NEON_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 () -{ -$ne__code - ; - 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 - ne_cv_libsfor_SSL_library_init="-l$lib -ldl"; 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_exeext conftest.$ac_ext -done -LIBS=$ne_sl_save_LIBS -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ne_cv_libsfor_SSL_library_init" >&5 -echo "${ECHO_T}$ne_cv_libsfor_SSL_library_init" >&6 - -if test "$ne_cv_libsfor_SSL_library_init" = "not found"; then - { { echo "$as_me:$LINENO: error: could not find library containing SSL_library_init" >&5 -echo "$as_me: error: could not find library containing SSL_library_init" >&2;} - { (exit 1); exit 1; }; } -elif test "$ne_cv_libsfor_SSL_library_init" = "none needed"; then - : -else - NEON_LIBS="$ne_cv_libsfor_SSL_library_init $NEON_LIBS" - -fi -else - echo "$as_me:$LINENO: checking for openssl pkg-config data" >&5 -echo $ECHO_N "checking for openssl pkg-config data... $ECHO_C" >&6 -if test "${ne_cv_pkg_openssl+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if $PKG_CONFIG openssl; then - ne_cv_pkg_openssl=yes - else - ne_cv_pkg_openssl=no - fi -fi -echo "$as_me:$LINENO: result: $ne_cv_pkg_openssl" >&5 -echo "${ECHO_T}$ne_cv_pkg_openssl" >&6 - - if test "$ne_cv_pkg_openssl" = "yes"; then - NE_SSL_CFLAGS=`$PKG_CONFIG --cflags openssl` - NE_SSL_LIBS=`$PKG_CONFIG --libs openssl` - : Using provided pkg-config data - { echo "$as_me:$LINENO: using SSL library configuration from pkg-config" >&5 -echo "$as_me: using SSL library configuration from pkg-config" >&6;} - CPPFLAGS="$CPPFLAGS ${NE_SSL_CFLAGS}" - NEON_LIBS="$NEON_LIBS ${NE_SSL_LIBS}" - else - : No pkg-config for openssl provided - # Either OpenSSL library may require -ldl if built with dynamic engine support - - - - -echo "$as_me:$LINENO: checking for library containing RSA_new" >&5 -echo $ECHO_N "checking for library containing RSA_new... $ECHO_C" >&6 -if test "${ne_cv_libsfor_RSA_new+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 () -{ -RSA_new(); - ; - 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 - ne_cv_libsfor_RSA_new="none needed" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -ne_sl_save_LIBS=$LIBS -ne_cv_libsfor_RSA_new="not found" -for lib in crypto; do - # The w32api libraries link using the stdcall calling convention. - case ${lib}-${ne_cv_os_uname} in - ws2_32-MINGW*) ne__code="__stdcall RSA_new();" ;; - *) ne__code="RSA_new();" ;; - esac - - LIBS="$ne_sl_save_LIBS -l$lib $NEON_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 () -{ -$ne__code - ; - 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 - ne_cv_libsfor_RSA_new="-l$lib"; 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_exeext conftest.$ac_ext - LIBS="$ne_sl_save_LIBS -l$lib -ldl $NEON_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 () -{ -$ne__code - ; - 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 - ne_cv_libsfor_RSA_new="-l$lib -ldl"; 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_exeext conftest.$ac_ext -done -LIBS=$ne_sl_save_LIBS -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ne_cv_libsfor_RSA_new" >&5 -echo "${ECHO_T}$ne_cv_libsfor_RSA_new" >&6 - -if test "$ne_cv_libsfor_RSA_new" = "not found"; then - { { echo "$as_me:$LINENO: error: could not find library containing RSA_new" >&5 -echo "$as_me: error: could not find library containing RSA_new" >&2;} - { (exit 1); exit 1; }; } -elif test "$ne_cv_libsfor_RSA_new" = "none needed"; then - : -else - NEON_LIBS="$ne_cv_libsfor_RSA_new $NEON_LIBS" - -fi - - - - -echo "$as_me:$LINENO: checking for library containing SSL_library_init" >&5 -echo $ECHO_N "checking for library containing SSL_library_init... $ECHO_C" >&6 -if test "${ne_cv_libsfor_SSL_library_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. */ - -int -main () -{ -SSL_library_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 - ne_cv_libsfor_SSL_library_init="none needed" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -ne_sl_save_LIBS=$LIBS -ne_cv_libsfor_SSL_library_init="not found" -for lib in ssl; do - # The w32api libraries link using the stdcall calling convention. - case ${lib}-${ne_cv_os_uname} in - ws2_32-MINGW*) ne__code="__stdcall SSL_library_init();" ;; - *) ne__code="SSL_library_init();" ;; - esac - - LIBS="$ne_sl_save_LIBS -l$lib $NEON_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 () -{ -$ne__code - ; - 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 - ne_cv_libsfor_SSL_library_init="-l$lib"; 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_exeext conftest.$ac_ext - LIBS="$ne_sl_save_LIBS -l$lib -ldl $NEON_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 () -{ -$ne__code - ; - 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 - ne_cv_libsfor_SSL_library_init="-l$lib -ldl"; 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_exeext conftest.$ac_ext -done -LIBS=$ne_sl_save_LIBS -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ne_cv_libsfor_SSL_library_init" >&5 -echo "${ECHO_T}$ne_cv_libsfor_SSL_library_init" >&6 - -if test "$ne_cv_libsfor_SSL_library_init" = "not found"; then - { { echo "$as_me:$LINENO: error: could not find library containing SSL_library_init" >&5 -echo "$as_me: error: could not find library containing SSL_library_init" >&2;} - { (exit 1); exit 1; }; } -elif test "$ne_cv_libsfor_SSL_library_init" = "none needed"; then - : -else - NEON_LIBS="$ne_cv_libsfor_SSL_library_init $NEON_LIBS" - -fi - fi -fi - - - -for ac_header in openssl/ssl.h openssl/opensslv.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 neon@webdav.org ## -## ------------------------------ ## -_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 - -else - { { echo "$as_me:$LINENO: error: OpenSSL headers not found, cannot enable SSL support" >&5 -echo "$as_me: error: OpenSSL headers not found, cannot enable SSL support" >&2;} - { (exit 1); exit 1; }; } -fi - -done - - - # Enable EGD support if using 0.9.7 or newer - -echo "$as_me:$LINENO: checking OpenSSL version is >= 0.9.7" >&5 -echo $ECHO_N "checking OpenSSL version is >= 0.9.7... $ECHO_C" >&6 -if test "${ne_cv_lib_ssl097+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 -#if OPENSSL_VERSION_NUMBER >= 0x00907000L -good -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "good" >/dev/null 2>&1; then - ne_cv_lib_ssl097=yes -else - ne_cv_lib_ssl097=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ne_cv_lib_ssl097" >&5 -echo "${ECHO_T}$ne_cv_lib_ssl097" >&6 - if test "$ne_cv_lib_ssl097" = "yes"; then - { echo "$as_me:$LINENO: OpenSSL >= 0.9.7; EGD support not needed in neon" >&5 -echo "$as_me: OpenSSL >= 0.9.7; EGD support not needed in neon" >&6;} - -NE_FLAG_SSL=yes - - -cat >>confdefs.h <<\_ACEOF -#define NE_HAVE_SSL 1 -_ACEOF - -ne_SSL_message="SSL support enabled, using OpenSSL (0.9.7 or later)" - { echo "$as_me:$LINENO: SSL support enabled, using OpenSSL (0.9.7 or later)" >&5 -echo "$as_me: SSL support enabled, using OpenSSL (0.9.7 or later)" >&6;} - - -ne_cf_save_LIBS=$LIBS -LIBS="$LIBS $NEON_LIBS" - -for ac_func in CRYPTO_set_idptr_callback -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 - -LIBS=$ne_cf_save_LIBS - else - # Fail if OpenSSL is older than 0.9.6 - -echo "$as_me:$LINENO: checking OpenSSL version is >= 0.9.6" >&5 -echo $ECHO_N "checking OpenSSL version is >= 0.9.6... $ECHO_C" >&6 -if test "${ne_cv_lib_ssl096+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 -#if OPENSSL_VERSION_NUMBER >= 0x00906000L -good -#endif -_ACEOF -if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | - $EGREP "good" >/dev/null 2>&1; then - ne_cv_lib_ssl096=yes -else - ne_cv_lib_ssl096=no -fi -rm -f conftest* - -fi -echo "$as_me:$LINENO: result: $ne_cv_lib_ssl096" >&5 -echo "${ECHO_T}$ne_cv_lib_ssl096" >&6 - if test "$ne_cv_lib_ssl096" != "yes"; then - { { echo "$as_me:$LINENO: error: OpenSSL 0.9.6 or later is required" >&5 -echo "$as_me: error: OpenSSL 0.9.6 or later is required" >&2;} - { (exit 1); exit 1; }; } - fi - -NE_FLAG_SSL=yes - - -cat >>confdefs.h <<\_ACEOF -#define NE_HAVE_SSL 1 -_ACEOF - -ne_SSL_message="SSL support enabled, using OpenSSL (0.9.6 or later)" - { echo "$as_me:$LINENO: SSL support enabled, using OpenSSL (0.9.6 or later)" >&5 -echo "$as_me: SSL support enabled, using OpenSSL (0.9.6 or later)" >&6;} - - - case "$with_egd" in - yes|no) ne_cv_lib_sslegd=$with_egd ;; - /*) ne_cv_lib_sslegd=yes - -cat >>confdefs.h <<_ACEOF -#define EGD_PATH "$with_egd" -_ACEOF - ;; - *) # Guess whether EGD support is needed - echo "$as_me:$LINENO: checking whether to enable EGD support" >&5 -echo $ECHO_N "checking whether to enable EGD support... $ECHO_C" >&6 -if test "${ne_cv_lib_sslegd+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -r /dev/random || test -r /dev/urandom; then - ne_cv_lib_sslegd=no - else - ne_cv_lib_sslegd=yes - fi -fi -echo "$as_me:$LINENO: result: $ne_cv_lib_sslegd" >&5 -echo "${ECHO_T}$ne_cv_lib_sslegd" >&6 - ;; - esac - if test "$ne_cv_lib_sslegd" = "yes"; then - { echo "$as_me:$LINENO: EGD support enabled for seeding OpenSSL PRNG" >&5 -echo "$as_me: EGD support enabled for seeding OpenSSL PRNG" >&6;} - -cat >>confdefs.h <<\_ACEOF -#define ENABLE_EGD 1 -_ACEOF - - fi - fi - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_OPENSSL 1 -_ACEOF - - NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_openssl" - ;; -gnutls) - # Extract the first word of "libgnutls-config", so it can be a program name with args. -set dummy libgnutls-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_GNUTLS_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $GNUTLS_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_GNUTLS_CONFIG="$GNUTLS_CONFIG" # Let the user override the test with a path. - ;; - *) - 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_path_GNUTLS_CONFIG="$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_GNUTLS_CONFIG" && ac_cv_path_GNUTLS_CONFIG="no" - ;; -esac -fi -GNUTLS_CONFIG=$ac_cv_path_GNUTLS_CONFIG - -if test -n "$GNUTLS_CONFIG"; then - echo "$as_me:$LINENO: result: $GNUTLS_CONFIG" >&5 -echo "${ECHO_T}$GNUTLS_CONFIG" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - - if test "$GNUTLS_CONFIG" = "no"; then - { { echo "$as_me:$LINENO: error: could not find libgnutls-config in \$PATH" >&5 -echo "$as_me: error: could not find libgnutls-config in \$PATH" >&2;} - { (exit 1); exit 1; }; } - fi - - ne_gnutls_ver=`$GNUTLS_CONFIG --version` - case $ne_gnutls_ver in - 1.0.?|1.0.1?|1.0.20|1.0.21) - { { echo "$as_me:$LINENO: error: GNU TLS version $ne_gnutls_ver is too old -- 1.0.22 or later required" >&5 -echo "$as_me: error: GNU TLS version $ne_gnutls_ver is too old -- 1.0.22 or later required" >&2;} - { (exit 1); exit 1; }; } - ;; - esac - - CPPFLAGS="$CPPFLAGS `$GNUTLS_CONFIG --cflags`" - - if test "${ac_cv_header_gnutls_gnutls_h+set}" = set; then - echo "$as_me:$LINENO: checking for gnutls/gnutls.h" >&5 -echo $ECHO_N "checking for gnutls/gnutls.h... $ECHO_C" >&6 -if test "${ac_cv_header_gnutls_gnutls_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_gnutls_gnutls_h" >&5 -echo "${ECHO_T}$ac_cv_header_gnutls_gnutls_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking gnutls/gnutls.h usability" >&5 -echo $ECHO_N "checking gnutls/gnutls.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 gnutls/gnutls.h presence" >&5 -echo $ECHO_N "checking gnutls/gnutls.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: gnutls/gnutls.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: gnutls/gnutls.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: gnutls/gnutls.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: gnutls/gnutls.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: gnutls/gnutls.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: gnutls/gnutls.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: gnutls/gnutls.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: gnutls/gnutls.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: gnutls/gnutls.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: gnutls/gnutls.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to neon@webdav.org ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for gnutls/gnutls.h" >&5 -echo $ECHO_N "checking for gnutls/gnutls.h... $ECHO_C" >&6 -if test "${ac_cv_header_gnutls_gnutls_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_gnutls_gnutls_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_gnutls_gnutls_h" >&5 -echo "${ECHO_T}$ac_cv_header_gnutls_gnutls_h" >&6 - -fi -if test $ac_cv_header_gnutls_gnutls_h = yes; then - : -else - { { echo "$as_me:$LINENO: error: could not find gnutls/gnutls.h in include path" >&5 -echo "$as_me: error: could not find gnutls/gnutls.h in include path" >&2;} - { (exit 1); exit 1; }; } -fi - - - - -NE_FLAG_SSL=yes - - -cat >>confdefs.h <<\_ACEOF -#define NE_HAVE_SSL 1 -_ACEOF - -ne_SSL_message="SSL support enabled, using GnuTLS $ne_gnutls_ver" - { echo "$as_me:$LINENO: SSL support enabled, using GnuTLS $ne_gnutls_ver" >&5 -echo "$as_me: SSL support enabled, using GnuTLS $ne_gnutls_ver" >&6;} - - NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_gnutls" - NEON_LIBS="$NEON_LIBS `$GNUTLS_CONFIG --libs`" - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GNUTLS 1 -_ACEOF - - - # Check for functions in later releases - -ne_cf_save_LIBS=$LIBS -LIBS="$LIBS $NEON_LIBS" - - -for ac_func in gnutls_session_get_data2 gnutls_x509_dn_get_rdn_ava -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 - -LIBS=$ne_cf_save_LIBS - - # Check for iconv support if using the new RDN access functions: - if test ${ac_cv_func_gnutls_x509_dn_get_rdn_ava}X${ac_cv_header_iconv_h} = yesXyes; then - -for ac_func in iconv -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 - ;; -*) # Default to off; only create crypto-enabled binaries if requested. - -NE_FLAG_SSL=no - -ne_SSL_message="SSL support is not enabled" - { echo "$as_me:$LINENO: SSL support is not enabled" >&5 -echo "$as_me: SSL support is not enabled" >&6;} - - -NE_FLAG_TS_SSL=no - -ne_TS_SSL_message="Thread-safe SSL support is not enabled" - { echo "$as_me:$LINENO: Thread-safe SSL support is not enabled" >&5 -echo "$as_me: Thread-safe SSL support is not enabled" >&6;} - - NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_stubssl" - ;; -esac - - - -# Check whether --with-ca-bundle or --without-ca-bundle was given. -if test "${with_ca_bundle+set}" = set; then - withval="$with_ca_bundle" - -else - with_ca_bundle=no -fi; - -case ${NE_FLAG_SSL}-${with_ca_bundle} in -*-no) ;; -yes-*) - -cat >>confdefs.h <<_ACEOF -#define NE_SSL_CA_BUNDLE "${with_ca_bundle}" -_ACEOF - - { echo "$as_me:$LINENO: Using ${with_ca_bundle} as default SSL CA bundle" >&5 -echo "$as_me: Using ${with_ca_bundle} as default SSL CA bundle" >&6;} - ;; -esac - -# Check whether --enable-threadsafe-ssl or --disable-threadsafe-ssl was given. -if test "${enable_threadsafe_ssl+set}" = set; then - enableval="$enable_threadsafe_ssl" - -else - enable_threadsafe_ssl=no -fi; - -case $enable_threadsafe_ssl in -posix|yes) - ne_pthr_ok=yes - - -for ac_func in pthread_mutex_init pthread_mutex_lock -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 - ne_pthr_ok=no -fi -done - - if test "${ne_pthr_ok}" = "no"; then - { { echo "$as_me:$LINENO: error: could not find POSIX mutex interfaces; (try CC=\"${CC} -pthread\"?)" >&5 -echo "$as_me: error: could not find POSIX mutex interfaces; (try CC=\"${CC} -pthread\"?)" >&2;} - { (exit 1); exit 1; }; } - fi - -NE_FLAG_TS_SSL=yes - - -cat >>confdefs.h <<\_ACEOF -#define NE_HAVE_TS_SSL 1 -_ACEOF - -ne_TS_SSL_message="Thread-safe SSL supported using POSIX threads" - { echo "$as_me:$LINENO: Thread-safe SSL supported using POSIX threads" >&5 -echo "$as_me: Thread-safe SSL supported using POSIX threads" >&6;} - - ;; -*) - -NE_FLAG_TS_SSL=no - -ne_TS_SSL_message="Thread-safe SSL not supported" - { echo "$as_me:$LINENO: Thread-safe SSL not supported" >&5 -echo "$as_me: Thread-safe SSL not supported" >&6;} - - ;; -esac - - - - - -# Check whether --with-socks or --without-socks was given. -if test "${with_socks+set}" = set; then - withval="$with_socks" - -fi; - -if test "$with_socks" = "yes"; then - ne_save_LIBS=$LIBS - - -for ac_header in socks.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 neon@webdav.org ## -## ------------------------------ ## -_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 - echo "$as_me:$LINENO: checking for connect in -lsocks5" >&5 -echo $ECHO_N "checking for connect in -lsocks5... $ECHO_C" >&6 -if test "${ac_cv_lib_socks5_connect+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lsocks5 $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_socks5_connect=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_socks5_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_socks5_connect" >&5 -echo "${ECHO_T}$ac_cv_lib_socks5_connect" >&6 -if test $ac_cv_lib_socks5_connect = yes; then - : -else - { { echo "$as_me:$LINENO: error: could not find libsocks5 for SOCKS support" >&5 -echo "$as_me: error: could not find libsocks5 for SOCKS support" >&2;} - { (exit 1); exit 1; }; } -fi - -else - { { echo "$as_me:$LINENO: error: could not find socks.h for SOCKS support" >&5 -echo "$as_me: error: could not find socks.h for SOCKS support" >&2;} - { (exit 1); exit 1; }; } -fi - -done - - - -NE_FLAG_SOCKS=yes - - -cat >>confdefs.h <<\_ACEOF -#define NE_HAVE_SOCKS 1 -_ACEOF - -ne_SOCKS_message="SOCKSv5 support is enabled" - { echo "$as_me:$LINENO: SOCKSv5 support is enabled" >&5 -echo "$as_me: SOCKSv5 support is enabled" >&6;} - - NEON_LIBS="$NEON_LIBS -lsocks5" - LIBS=$ne_save_LIBS -else - -NE_FLAG_SOCKS=no - -ne_SOCKS_message="SOCKSv5 support is not enabled" - { echo "$as_me:$LINENO: SOCKSv5 support is not enabled" >&5 -echo "$as_me: SOCKSv5 support is not enabled" >&6;} - -fi - - -# Check whether --with-gssapi or --without-gssapi was given. -if test "${with_gssapi+set}" = set; then - withval="$with_gssapi" - -fi; -if test "$with_gssapi" != "no"; then - # Extract the first word of "krb5-config", so it can be a program name with args. -set dummy krb5-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_KRB5_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $KRB5_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_KRB5_CONFIG="$KRB5_CONFIG" # Let the user override the test with a path. - ;; - *) - as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -as_dummy="$PATH:/usr/kerberos/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_KRB5_CONFIG="$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_KRB5_CONFIG" && ac_cv_path_KRB5_CONFIG="none" - ;; -esac -fi -KRB5_CONFIG=$ac_cv_path_KRB5_CONFIG - -if test -n "$KRB5_CONFIG"; then - echo "$as_me:$LINENO: result: $KRB5_CONFIG" >&5 -echo "${ECHO_T}$KRB5_CONFIG" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -else - KRB5_CONFIG=none -fi -if test "x$KRB5_CONFIG" != "xnone"; then - ne_save_CPPFLAGS=$CPPFLAGS - ne_save_LIBS=$NEON_LIBS - NEON_LIBS="$NEON_LIBS `${KRB5_CONFIG} --libs gssapi`" - CPPFLAGS="$CPPFLAGS `${KRB5_CONFIG} --cflags gssapi`" - # MIT and Heimdal put gssapi.h in different places - - -for ac_header in gssapi/gssapi.h gssapi.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 neon@webdav.org ## -## ------------------------------ ## -_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 - - -ne_cf_save_LIBS=$LIBS -LIBS="$LIBS $NEON_LIBS" - -for ac_func in gss_init_sec_context -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 - - ne_save_CPPFLAGS=$CPPFLAGS - ne_save_LIBS=$NEON_LIBS - { echo "$as_me:$LINENO: GSSAPI authentication support enabled" >&5 -echo "$as_me: GSSAPI authentication support enabled" >&6;} - -cat >>confdefs.h <<\_ACEOF -#define HAVE_GSSAPI 1 -_ACEOF - - -for ac_header in gssapi/gssapi_generic.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 neon@webdav.org ## -## ------------------------------ ## -_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 - - # Older versions of MIT Kerberos lack GSS_C_NT_HOSTBASED_SERVICE - echo "$as_me:$LINENO: checking whether GSS_C_NT_HOSTBASED_SERVICE is declared" >&5 -echo $ECHO_N "checking whether GSS_C_NT_HOSTBASED_SERVICE is declared... $ECHO_C" >&6 -if test "${ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE+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_GSSAPI_GSSAPI_H -#include -#else -#include -#endif - -int -main () -{ -#ifndef GSS_C_NT_HOSTBASED_SERVICE - char *p = (char *) GSS_C_NT_HOSTBASED_SERVICE; -#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_have_decl_GSS_C_NT_HOSTBASED_SERVICE=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" >&5 -echo "${ECHO_T}$ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE" >&6 -if test $ac_cv_have_decl_GSS_C_NT_HOSTBASED_SERVICE = yes; then - : -else - -cat >>confdefs.h <<\_ACEOF -#define GSS_C_NT_HOSTBASED_SERVICE gss_nt_service_name -_ACEOF - -fi - -fi -done - -LIBS=$ne_cf_save_LIBS - break - -fi - -done - - CPPFLAGS=$ne_save_CPPFLAGS - NEON_LIBS=$ne_save_LIBS -fi - - - - - - - -# Use the libtool-type build. - - -NEON_TARGET=libneon.la -NEON_OBJEXT=lo - - - -# Using the default set of object files to build. -# Add the extension to EXTRAOBJS -ne="$NEON_EXTRAOBJS" -NEON_EXTRAOBJS= -for o in $ne; do - NEON_EXTRAOBJS="$NEON_EXTRAOBJS $o.$NEON_OBJEXT" -done - -# Was DAV support explicitly turned off? -if test "x$neon_no_webdav" = "xyes"; then - # No WebDAV support - NEONOBJS="$NEONOBJS \$(NEON_BASEOBJS)" - -NE_FLAG_DAV=no - -ne_DAV_message="WebDAV support is not enabled" - { echo "$as_me:$LINENO: WebDAV support is not enabled" >&5 -echo "$as_me: WebDAV support is not enabled" >&6;} - -else - # WebDAV support - NEONOBJS="$NEONOBJS \$(NEON_DAVOBJS)" - -NE_FLAG_DAV=yes - - -cat >>confdefs.h <<\_ACEOF -#define NE_HAVE_DAV 1 -_ACEOF - -ne_DAV_message="WebDAV support is enabled" - { echo "$as_me:$LINENO: WebDAV support is enabled" >&5 -echo "$as_me: WebDAV support is enabled" >&6;} - -fi - - - - - - - - - - -# Find an XML parser - - - -# Check whether --with-libxml2 or --without-libxml2 was given. -if test "${with_libxml2+set}" = set; then - withval="$with_libxml2" - -fi; - -# Check whether --with-expat or --without-expat was given. -if test "${with_expat+set}" = set; then - withval="$with_expat" - -fi; - -with_included_expat=no - -if test "$NEON_NEED_XML_PARSER" = "yes"; then - # Find an XML parser - neon_xml_parser=none - - # Forced choice of expat: - case $with_expat in - yes) -if test "${ac_cv_header_expat_h+set}" = set; then - echo "$as_me:$LINENO: checking for expat.h" >&5 -echo $ECHO_N "checking for expat.h... $ECHO_C" >&6 -if test "${ac_cv_header_expat_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 -echo "${ECHO_T}$ac_cv_header_expat_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking expat.h usability" >&5 -echo $ECHO_N "checking expat.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 expat.h presence" >&5 -echo $ECHO_N "checking expat.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: expat.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: expat.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: expat.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: expat.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: expat.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: expat.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: expat.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: expat.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to neon@webdav.org ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for expat.h" >&5 -echo $ECHO_N "checking for expat.h... $ECHO_C" >&6 -if test "${ac_cv_header_expat_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_expat_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 -echo "${ECHO_T}$ac_cv_header_expat_h" >&6 - -fi -if test $ac_cv_header_expat_h = yes; then - echo "$as_me:$LINENO: checking for XML_SetXmlDeclHandler in -lexpat" >&5 -echo $ECHO_N "checking for XML_SetXmlDeclHandler in -lexpat... $ECHO_C" >&6 -if test "${ac_cv_lib_expat_XML_SetXmlDeclHandler+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lexpat $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 XML_SetXmlDeclHandler (); -int -main () -{ -XML_SetXmlDeclHandler (); - ; - 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_expat_XML_SetXmlDeclHandler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_expat_XML_SetXmlDeclHandler=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_expat_XML_SetXmlDeclHandler" >&5 -echo "${ECHO_T}$ac_cv_lib_expat_XML_SetXmlDeclHandler" >&6 -if test $ac_cv_lib_expat_XML_SetXmlDeclHandler = yes; then - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_EXPAT 1 -_ACEOF - - neon_xml_parser_message="expat" - NEON_LIBS="$NEON_LIBS -lexpat" - neon_xml_parser=expat - echo "$as_me:$LINENO: checking for XML_Size" >&5 -echo $ECHO_N "checking for XML_Size... $ECHO_C" >&6 -if test "${ac_cv_type_XML_Size+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 - -int -main () -{ -if ((XML_Size *) 0) - return 0; -if (sizeof (XML_Size)) - 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_XML_Size=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_XML_Size=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_XML_Size" >&5 -echo "${ECHO_T}$ac_cv_type_XML_Size" >&6 -if test $ac_cv_type_XML_Size = yes; then - - - - -echo "$as_me:$LINENO: checking for XML_Size" >&5 -echo $ECHO_N "checking for XML_Size... $ECHO_C" >&6 -if test "${ac_cv_type_XML_Size+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 - -int -main () -{ -if ((XML_Size *) 0) - return 0; -if (sizeof (XML_Size)) - 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_XML_Size=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_XML_Size=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_XML_Size" >&5 -echo "${ECHO_T}$ac_cv_type_XML_Size" >&6 - -echo "$as_me:$LINENO: checking size of XML_Size" >&5 -echo $ECHO_N "checking size of XML_Size... $ECHO_C" >&6 -if test "${ac_cv_sizeof_XML_Size+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_XML_Size" = 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. */ -$ac_includes_default -#include - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (XML_Size))) >= 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. */ -$ac_includes_default -#include - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (XML_Size))) <= $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. */ -$ac_includes_default -#include - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (XML_Size))) < 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. */ -$ac_includes_default -#include - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (XML_Size))) >= $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. */ -$ac_includes_default -#include - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (XML_Size))) <= $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_XML_Size=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (XML_Size), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (XML_Size), 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. */ -$ac_includes_default -#include - -long longval () { return (long) (sizeof (XML_Size)); } -unsigned long ulongval () { return (long) (sizeof (XML_Size)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (XML_Size))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (XML_Size)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (XML_Size)))) - 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_XML_Size=`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 (XML_Size), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (XML_Size), 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_XML_Size=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_XML_Size" >&5 -echo "${ECHO_T}$ac_cv_sizeof_XML_Size" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_XML_SIZE $ac_cv_sizeof_XML_Size -_ACEOF - - - - - - - -echo "$as_me:$LINENO: checking how to print XML_Size" >&5 -echo $ECHO_N "checking how to print XML_Size... $ECHO_C" >&6 -if test "${ne_cv_fmt_XML_Size+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -ne_cv_fmt_XML_Size=none -if test $ne_fmt_trycompile = yes; then - oflags="$CPPFLAGS" - # Consider format string mismatches as errors - CPPFLAGS="$CPPFLAGS -Wformat -Werror" - for str in d ld lld; 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 -#include -int -main () -{ -XML_Size i = 1; printf("%$str", 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 - ne_cv_fmt_XML_Size=$str; 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 - CPPFLAGS=$oflags -else - # Best guess. Don't have to be too precise since we probably won't - # get a warning message anyway. - case $ac_cv_sizeof_XML_Size in - $ac_cv_sizeof_int) ne_cv_fmt_XML_Size="d" ;; - $ac_cv_sizeof_long) ne_cv_fmt_XML_Size="ld" ;; - $ac_cv_sizeof_long_long) ne_cv_fmt_XML_Size="lld" ;; - esac -fi - -fi -echo "$as_me:$LINENO: result: $ne_cv_fmt_XML_Size" >&5 -echo "${ECHO_T}$ne_cv_fmt_XML_Size" >&6 - -if test "x$ne_cv_fmt_XML_Size" = "xnone"; then - { { echo "$as_me:$LINENO: error: format string for XML_Size not found" >&5 -echo "$as_me: error: format string for XML_Size not found" >&2;} - { (exit 1); exit 1; }; } -fi - - -cat >>confdefs.h <<_ACEOF -#define NE_FMT_XML_SIZE "$ne_cv_fmt_XML_Size" -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define NE_FMT_XML_SIZE "d" -_ACEOF - -fi - - -else - { { echo "$as_me:$LINENO: error: expat library not found, cannot proceed" >&5 -echo "$as_me: error: expat library not found, cannot proceed" >&2;} - { (exit 1); exit 1; }; } -fi - -else - { { echo "$as_me:$LINENO: error: expat library not found, cannot proceed" >&5 -echo "$as_me: error: expat library not found, cannot proceed" >&2;} - { (exit 1); exit 1; }; } -fi - - - ;; - no) ;; - */libexpat.la) - # Special case for Subversion - ne_expdir=`echo $with_expat | sed 's:/libexpat.la$::'` - cat >>confdefs.h <<\_ACEOF -#define HAVE_EXPAT 1 -_ACEOF - - CPPFLAGS="$CPPFLAGS -I$ne_expdir" - if test "x${NEON_TARGET}" = "xlibneon.la"; then - NEON_LTLIBS=$with_expat - else - # no dependency on libexpat => crippled libneon, so do partial install - ALLOW_INSTALL=lib - fi - neon_xml_parser=expat - neon_xml_parser_message="expat in $ne_expdir" - ;; - /*) { { echo "$as_me:$LINENO: error: --with-expat does not take a directory argument" >&5 -echo "$as_me: error: --with-expat does not take a directory argument" >&2;} - { (exit 1); exit 1; }; } ;; - esac - - # If expat wasn't specifically enabled and libxml was: - if test "${neon_xml_parser}-${with_libxml2}-${with_included_expat}" = "none-yes-no"; then - -# Extract the first word of "xml2-config", so it can be a program name with args. -set dummy xml2-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_prog_XML2_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$XML2_CONFIG"; then - ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # 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_XML2_CONFIG="xml2-config" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -XML2_CONFIG=$ac_cv_prog_XML2_CONFIG -if test -n "$XML2_CONFIG"; then - echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5 -echo "${ECHO_T}$XML2_CONFIG" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -if test -n "$XML2_CONFIG"; then - neon_xml_parser_message="libxml `$XML2_CONFIG --version`" - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBXML 1 -_ACEOF - - # xml2-config in some versions erroneously includes -I/include - # in the --cflags output. - CPPFLAGS="$CPPFLAGS `$XML2_CONFIG --cflags | sed 's| -I/include||g'`" - NEON_LIBS="$NEON_LIBS `$XML2_CONFIG --libs | sed 's|-L/usr/lib ||g'`" - - -for ac_header in libxml/xmlversion.h libxml/parser.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 neon@webdav.org ## -## ------------------------------ ## -_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 - -else - - { { echo "$as_me:$LINENO: error: could not find parser.h, libxml installation problem?" >&5 -echo "$as_me: error: could not find parser.h, libxml installation problem?" >&2;} - { (exit 1); exit 1; }; } -fi - -done - - neon_xml_parser=libxml2 -else - { { echo "$as_me:$LINENO: error: libxml2.x library not found, cannot proceed" >&5 -echo "$as_me: error: libxml2.x library not found, cannot proceed" >&2;} - { (exit 1); exit 1; }; } -fi - - fi - - # Otherwise, by default search for expat then libxml2: - if test "${neon_xml_parser}-${with_included_expat}" = "none-no"; then - -if test "${ac_cv_header_expat_h+set}" = set; then - echo "$as_me:$LINENO: checking for expat.h" >&5 -echo $ECHO_N "checking for expat.h... $ECHO_C" >&6 -if test "${ac_cv_header_expat_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -fi -echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 -echo "${ECHO_T}$ac_cv_header_expat_h" >&6 -else - # Is the header compilable? -echo "$as_me:$LINENO: checking expat.h usability" >&5 -echo $ECHO_N "checking expat.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 expat.h presence" >&5 -echo $ECHO_N "checking expat.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: expat.h: accepted by the compiler, rejected by the preprocessor!" >&5 -echo "$as_me: WARNING: expat.h: accepted by the compiler, rejected by the preprocessor!" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the compiler's result" >&5 -echo "$as_me: WARNING: expat.h: proceeding with the compiler's result" >&2;} - ac_header_preproc=yes - ;; - no:yes:* ) - { echo "$as_me:$LINENO: WARNING: expat.h: present but cannot be compiled" >&5 -echo "$as_me: WARNING: expat.h: present but cannot be compiled" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: check for missing prerequisite headers?" >&5 -echo "$as_me: WARNING: expat.h: check for missing prerequisite headers?" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: see the Autoconf documentation" >&5 -echo "$as_me: WARNING: expat.h: see the Autoconf documentation" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&5 -echo "$as_me: WARNING: expat.h: section \"Present But Cannot Be Compiled\"" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: proceeding with the preprocessor's result" >&5 -echo "$as_me: WARNING: expat.h: proceeding with the preprocessor's result" >&2;} - { echo "$as_me:$LINENO: WARNING: expat.h: in the future, the compiler will take precedence" >&5 -echo "$as_me: WARNING: expat.h: in the future, the compiler will take precedence" >&2;} - ( - cat <<\_ASBOX -## ------------------------------ ## -## Report this to neon@webdav.org ## -## ------------------------------ ## -_ASBOX - ) | - sed "s/^/$as_me: WARNING: /" >&2 - ;; -esac -echo "$as_me:$LINENO: checking for expat.h" >&5 -echo $ECHO_N "checking for expat.h... $ECHO_C" >&6 -if test "${ac_cv_header_expat_h+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_cv_header_expat_h=$ac_header_preproc -fi -echo "$as_me:$LINENO: result: $ac_cv_header_expat_h" >&5 -echo "${ECHO_T}$ac_cv_header_expat_h" >&6 - -fi -if test $ac_cv_header_expat_h = yes; then - echo "$as_me:$LINENO: checking for XML_SetXmlDeclHandler in -lexpat" >&5 -echo $ECHO_N "checking for XML_SetXmlDeclHandler in -lexpat... $ECHO_C" >&6 -if test "${ac_cv_lib_expat_XML_SetXmlDeclHandler+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - ac_check_lib_save_LIBS=$LIBS -LIBS="-lexpat $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 XML_SetXmlDeclHandler (); -int -main () -{ -XML_SetXmlDeclHandler (); - ; - 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_expat_XML_SetXmlDeclHandler=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_lib_expat_XML_SetXmlDeclHandler=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_expat_XML_SetXmlDeclHandler" >&5 -echo "${ECHO_T}$ac_cv_lib_expat_XML_SetXmlDeclHandler" >&6 -if test $ac_cv_lib_expat_XML_SetXmlDeclHandler = yes; then - - -cat >>confdefs.h <<\_ACEOF -#define HAVE_EXPAT 1 -_ACEOF - - neon_xml_parser_message="expat" - NEON_LIBS="$NEON_LIBS -lexpat" - neon_xml_parser=expat - echo "$as_me:$LINENO: checking for XML_Size" >&5 -echo $ECHO_N "checking for XML_Size... $ECHO_C" >&6 -if test "${ac_cv_type_XML_Size+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 - -int -main () -{ -if ((XML_Size *) 0) - return 0; -if (sizeof (XML_Size)) - 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_XML_Size=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_XML_Size=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_XML_Size" >&5 -echo "${ECHO_T}$ac_cv_type_XML_Size" >&6 -if test $ac_cv_type_XML_Size = yes; then - - - - -echo "$as_me:$LINENO: checking for XML_Size" >&5 -echo $ECHO_N "checking for XML_Size... $ECHO_C" >&6 -if test "${ac_cv_type_XML_Size+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 - -int -main () -{ -if ((XML_Size *) 0) - return 0; -if (sizeof (XML_Size)) - 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_XML_Size=yes -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - -ac_cv_type_XML_Size=no -fi -rm -f conftest.err conftest.$ac_objext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ac_cv_type_XML_Size" >&5 -echo "${ECHO_T}$ac_cv_type_XML_Size" >&6 - -echo "$as_me:$LINENO: checking size of XML_Size" >&5 -echo $ECHO_N "checking size of XML_Size... $ECHO_C" >&6 -if test "${ac_cv_sizeof_XML_Size+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test "$ac_cv_type_XML_Size" = 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. */ -$ac_includes_default -#include - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (XML_Size))) >= 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. */ -$ac_includes_default -#include - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (XML_Size))) <= $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. */ -$ac_includes_default -#include - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (XML_Size))) < 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. */ -$ac_includes_default -#include - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (XML_Size))) >= $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. */ -$ac_includes_default -#include - -int -main () -{ -static int test_array [1 - 2 * !(((long) (sizeof (XML_Size))) <= $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_XML_Size=$ac_lo;; -'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (XML_Size), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (XML_Size), 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. */ -$ac_includes_default -#include - -long longval () { return (long) (sizeof (XML_Size)); } -unsigned long ulongval () { return (long) (sizeof (XML_Size)); } -#include -#include -int -main () -{ - - FILE *f = fopen ("conftest.val", "w"); - if (! f) - exit (1); - if (((long) (sizeof (XML_Size))) < 0) - { - long i = longval (); - if (i != ((long) (sizeof (XML_Size)))) - exit (1); - fprintf (f, "%ld\n", i); - } - else - { - unsigned long i = ulongval (); - if (i != ((long) (sizeof (XML_Size)))) - 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_XML_Size=`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 (XML_Size), 77 -See \`config.log' for more details." >&5 -echo "$as_me: error: cannot compute sizeof (XML_Size), 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_XML_Size=0 -fi -fi -echo "$as_me:$LINENO: result: $ac_cv_sizeof_XML_Size" >&5 -echo "${ECHO_T}$ac_cv_sizeof_XML_Size" >&6 -cat >>confdefs.h <<_ACEOF -#define SIZEOF_XML_SIZE $ac_cv_sizeof_XML_Size -_ACEOF - - - - - - - -echo "$as_me:$LINENO: checking how to print XML_Size" >&5 -echo $ECHO_N "checking how to print XML_Size... $ECHO_C" >&6 -if test "${ne_cv_fmt_XML_Size+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - -ne_cv_fmt_XML_Size=none -if test $ne_fmt_trycompile = yes; then - oflags="$CPPFLAGS" - # Consider format string mismatches as errors - CPPFLAGS="$CPPFLAGS -Wformat -Werror" - for str in d ld lld; 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 -#include -int -main () -{ -XML_Size i = 1; printf("%$str", 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 - ne_cv_fmt_XML_Size=$str; 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 - CPPFLAGS=$oflags -else - # Best guess. Don't have to be too precise since we probably won't - # get a warning message anyway. - case $ac_cv_sizeof_XML_Size in - $ac_cv_sizeof_int) ne_cv_fmt_XML_Size="d" ;; - $ac_cv_sizeof_long) ne_cv_fmt_XML_Size="ld" ;; - $ac_cv_sizeof_long_long) ne_cv_fmt_XML_Size="lld" ;; - esac -fi - -fi -echo "$as_me:$LINENO: result: $ne_cv_fmt_XML_Size" >&5 -echo "${ECHO_T}$ne_cv_fmt_XML_Size" >&6 - -if test "x$ne_cv_fmt_XML_Size" = "xnone"; then - { { echo "$as_me:$LINENO: error: format string for XML_Size not found" >&5 -echo "$as_me: error: format string for XML_Size not found" >&2;} - { (exit 1); exit 1; }; } -fi - - -cat >>confdefs.h <<_ACEOF -#define NE_FMT_XML_SIZE "$ne_cv_fmt_XML_Size" -_ACEOF - - -else - cat >>confdefs.h <<_ACEOF -#define NE_FMT_XML_SIZE "d" -_ACEOF - -fi - - -else - -# Extract the first word of "xml2-config", so it can be a program name with args. -set dummy xml2-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_prog_XML2_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$XML2_CONFIG"; then - ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # 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_XML2_CONFIG="xml2-config" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -XML2_CONFIG=$ac_cv_prog_XML2_CONFIG -if test -n "$XML2_CONFIG"; then - echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5 -echo "${ECHO_T}$XML2_CONFIG" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -if test -n "$XML2_CONFIG"; then - neon_xml_parser_message="libxml `$XML2_CONFIG --version`" - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBXML 1 -_ACEOF - - # xml2-config in some versions erroneously includes -I/include - # in the --cflags output. - CPPFLAGS="$CPPFLAGS `$XML2_CONFIG --cflags | sed 's| -I/include||g'`" - NEON_LIBS="$NEON_LIBS `$XML2_CONFIG --libs | sed 's|-L/usr/lib ||g'`" - - -for ac_header in libxml/xmlversion.h libxml/parser.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 neon@webdav.org ## -## ------------------------------ ## -_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 - -else - - { { echo "$as_me:$LINENO: error: could not find parser.h, libxml installation problem?" >&5 -echo "$as_me: error: could not find parser.h, libxml installation problem?" >&2;} - { (exit 1); exit 1; }; } -fi - -done - - neon_xml_parser=libxml2 -else - : -fi - -fi - -else - -# Extract the first word of "xml2-config", so it can be a program name with args. -set dummy xml2-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_prog_XML2_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - if test -n "$XML2_CONFIG"; then - ac_cv_prog_XML2_CONFIG="$XML2_CONFIG" # 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_XML2_CONFIG="xml2-config" - echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done -done - -fi -fi -XML2_CONFIG=$ac_cv_prog_XML2_CONFIG -if test -n "$XML2_CONFIG"; then - echo "$as_me:$LINENO: result: $XML2_CONFIG" >&5 -echo "${ECHO_T}$XML2_CONFIG" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -if test -n "$XML2_CONFIG"; then - neon_xml_parser_message="libxml `$XML2_CONFIG --version`" - -cat >>confdefs.h <<\_ACEOF -#define HAVE_LIBXML 1 -_ACEOF - - # xml2-config in some versions erroneously includes -I/include - # in the --cflags output. - CPPFLAGS="$CPPFLAGS `$XML2_CONFIG --cflags | sed 's| -I/include||g'`" - NEON_LIBS="$NEON_LIBS `$XML2_CONFIG --libs | sed 's|-L/usr/lib ||g'`" - - -for ac_header in libxml/xmlversion.h libxml/parser.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 neon@webdav.org ## -## ------------------------------ ## -_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 - -else - - { { echo "$as_me:$LINENO: error: could not find parser.h, libxml installation problem?" >&5 -echo "$as_me: error: could not find parser.h, libxml installation problem?" >&2;} - { (exit 1); exit 1; }; } -fi - -done - - neon_xml_parser=libxml2 -else - : -fi - -fi - - - - fi - - # If an XML parser still has not been found, fail or use the bundled expat - if test "$neon_xml_parser" = "none"; then - { { echo "$as_me:$LINENO: error: no XML parser was found: expat or libxml 2.x required" >&5 -echo "$as_me: error: no XML parser was found: expat or libxml 2.x required" >&2;} - { (exit 1); exit 1; }; } - fi - - { echo "$as_me:$LINENO: XML parser used: $neon_xml_parser_message" >&5 -echo "$as_me: XML parser used: $neon_xml_parser_message" >&6;} -fi - - -# Internationalization support. - - -# Check whether --enable-nls or --disable-nls was given. -if test "${enable_nls+set}" = set; then - enableval="$enable_nls" - -else - enable_nls=${ac_cv_header_libintl_h} -fi; - -if test x${enable_nls} = xyes; then - # presume that dgettext() is available if bindtextdomain() is... - # checking for dgettext() itself is awkward because gcc has a - # builtin of that function, which confuses AC_CHECK_FUNCS et al. - - - - -echo "$as_me:$LINENO: checking for library containing bindtextdomain" >&5 -echo $ECHO_N "checking for library containing bindtextdomain... $ECHO_C" >&6 -if test "${ne_cv_libsfor_bindtextdomain+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 () -{ -bindtextdomain(); - ; - 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 - ne_cv_libsfor_bindtextdomain="none needed" -else - echo "$as_me: failed program was:" >&5 -sed 's/^/| /' conftest.$ac_ext >&5 - - -ne_sl_save_LIBS=$LIBS -ne_cv_libsfor_bindtextdomain="not found" -for lib in intl; do - # The w32api libraries link using the stdcall calling convention. - case ${lib}-${ne_cv_os_uname} in - ws2_32-MINGW*) ne__code="__stdcall bindtextdomain();" ;; - *) ne__code="bindtextdomain();" ;; - esac - - LIBS="$ne_sl_save_LIBS -l$lib $NEON_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 () -{ -$ne__code - ; - 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 - ne_cv_libsfor_bindtextdomain="-l$lib"; 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_exeext conftest.$ac_ext - -done -LIBS=$ne_sl_save_LIBS -fi -rm -f conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext -fi -echo "$as_me:$LINENO: result: $ne_cv_libsfor_bindtextdomain" >&5 -echo "${ECHO_T}$ne_cv_libsfor_bindtextdomain" >&6 - -if test "$ne_cv_libsfor_bindtextdomain" = "not found"; then - enable_nls=no -elif test "$ne_cv_libsfor_bindtextdomain" = "none needed"; then - : -else - NEON_LIBS="$ne_cv_libsfor_bindtextdomain $NEON_LIBS" - -fi - -ne_cf_save_LIBS=$LIBS -LIBS="$LIBS $NEON_LIBS" - -for ac_func in bind_textdomain_codeset -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 - -LIBS=$ne_cf_save_LIBS -fi - -if test "$enable_nls" = "no"; then - -NE_FLAG_I18N=no - -ne_I18N_message="Internationalization support not enabled" - { echo "$as_me:$LINENO: Internationalization support not enabled" >&5 -echo "$as_me: Internationalization support not enabled" >&6;} - -else - -NE_FLAG_I18N=yes - - -cat >>confdefs.h <<\_ACEOF -#define NE_HAVE_I18N 1 -_ACEOF - -ne_I18N_message="Internationalization support enabled" - { echo "$as_me:$LINENO: Internationalization support enabled" >&5 -echo "$as_me: Internationalization support enabled" >&6;} - - eval localedir="${datadir}/locale" - -cat >>confdefs.h <<_ACEOF -#define LOCALEDIR "$localedir" -_ACEOF - -fi - - - -# Extra checks for debugging, compiler warnings - - -# Check whether --enable-debug or --disable-debug was given. -if test "${enable_debug+set}" = set; then - enableval="$enable_debug" - -fi; - -# default is to enable debugging -case $enable_debug in -no) { echo "$as_me:$LINENO: debugging is disabled" >&5 -echo "$as_me: debugging is disabled" >&6;} - ;; -*) { echo "$as_me:$LINENO: debugging is enabled" >&5 -echo "$as_me: debugging is enabled" >&6;} - -cat >>confdefs.h <<\_ACEOF -#define NE_DEBUGGING 1 -_ACEOF - - -;; -esac -# Leave till last to prevent CFLAGS affecting checks. - - - -# Check whether --enable-warnings or --disable-warnings was given. -if test "${enable_warnings+set}" = set; then - enableval="$enable_warnings" - -fi; - -if test "$enable_warnings" = "yes"; then - case $GCC:`uname` in - yes:*) - CFLAGS="$CFLAGS -Wall -Wmissing-declarations -Wshadow -Wreturn-type -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wformat-security" - if test -z "$with_ssl" -o "$with_ssl" = "no"; then - # OpenSSL headers fail strict prototypes checks - CFLAGS="$CFLAGS -Wstrict-prototypes" - fi - ;; - no:OSF1) CFLAGS="$CFLAGS -check -msg_disable returnchecks -msg_disable alignment -msg_disable overflow" ;; - no:IRIX) CFLAGS="$CFLAGS -fullwarn" ;; - no:UnixWare) CFLAGS="$CFLAGS -v" ;; - *) { echo "$as_me:$LINENO: WARNING: warning flags unknown for compiler on this platform" >&5 -echo "$as_me: WARNING: warning flags unknown for compiler on this platform" >&2;} ;; - esac -fi - - -CPPFLAGS="$CPPFLAGS -I\${top_builddir}" - -# Check whether --enable-memleak or --disable-memleak was given. -if test "${enable_memleak+set}" = set; then - enableval="$enable_memleak" - -fi; - -if test "$enable_memleak" = "yes"; then - CPPFLAGS="$CPPFLAGS -DNEON_MEMLEAK -I\$(top_srcdir)/src" - # disable 'make install' - ALLOW_INSTALL=memleak -fi - -# Enable tests for optional features -TESTS="\$(BASIC_TESTS)" -HELPERS="" -if test $NE_FLAG_SSL = yes; then - # Only enable SSL tests if an openssl binary is found (needed to make - # certs etc). - # Extract the first word of "openssl", so it can be a program name with args. -set dummy openssl; 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_OPENSSL+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $OPENSSL in - [\\/]* | ?:[\\/]*) - ac_cv_path_OPENSSL="$OPENSSL" # Let the user override the test with a path. - ;; - *) - 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_path_OPENSSL="$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_OPENSSL" && ac_cv_path_OPENSSL="notfound" - ;; -esac -fi -OPENSSL=$ac_cv_path_OPENSSL - -if test -n "$OPENSSL"; then - echo "$as_me:$LINENO: result: $OPENSSL" >&5 -echo "${ECHO_T}$OPENSSL" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - - if test "$OPENSSL" != "notfound"; then - TESTS="$TESTS \$(SSL_TESTS)" - HELPERS="$HELPERS \$(SSL_HELPERS)" - else - { echo "$as_me:$LINENO: WARNING: no openssl binary in \$PATH: SSL tests disabled" >&5 -echo "$as_me: WARNING: no openssl binary in \$PATH: SSL tests disabled" >&2;} - fi -fi -if test $NE_FLAG_ZLIB = yes; then - TESTS="$TESTS \$(ZLIB_TESTS)" - HELPERS="$HELPERS \$(ZLIB_HELPERS)" -fi -if test x$enable_webdav != xno; then - TESTS="$TESTS \$(DAV_TESTS)" -fi - -# Check whether --enable-tests-install or --disable-tests-install was given. -if test "${enable_tests_install+set}" = set; then - enableval="$enable_tests_install" - -else - enable_tests_install=no -fi; - -# If test suite installation is not required, it's more -# efficient to link the test programs using -no-install: -if test "$enable_tests_install" = "no"; then - TEST_LDFLAGS="-no-install" -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_PKG_CONFIG+set}" = set; then - echo $ECHO_N "(cached) $ECHO_C" >&6 -else - case $PKG_CONFIG in - [\\/]* | ?:[\\/]*) - ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. - ;; - *) - 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_path_PKG_CONFIG="$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_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" - ;; -esac -fi -PKG_CONFIG=$ac_cv_path_PKG_CONFIG - -if test -n "$PKG_CONFIG"; then - echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 -echo "${ECHO_T}$PKG_CONFIG" >&6 -else - echo "$as_me:$LINENO: result: no" >&5 -echo "${ECHO_T}no" >&6 -fi - -if test "$PKG_CONFIG" != "no"; then - # pkg-config >= 0.18 will use "Libs.private" iff necessary, - # older versions which don't recognize that field may always - # need all libraries in Libs. - if $PKG_CONFIG --atleast-pkgconfig-version=0.18; then :; else - NEON_PC_LIBS=${NEON_LIBS} - fi -fi - - -# Bundled language catalogs -ALL_LINGUAS="cs de fr ja nn ru tr zh" - - - ac_config_files="$ac_config_files neon-config" - - ac_config_files="$ac_config_files Makefile src/Makefile test/Makefile neon.pc" - - - - - - - - - - -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 - - - -: ${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 neon $as_me 0.27.2, 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 - -Report bugs to ." -_ACEOF - -cat >>$CONFIG_STATUS <<_ACEOF -ac_cs_version="\\ -neon config.status 0.27.2 -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 -for ac_config_target in $ac_config_targets -do - case "$ac_config_target" in - # Handling of arguments. - "neon-config" ) CONFIG_FILES="$CONFIG_FILES neon-config" ;; - "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; - "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; - "test/Makefile" ) CONFIG_FILES="$CONFIG_FILES test/Makefile" ;; - "neon.pc" ) CONFIG_FILES="$CONFIG_FILES neon.pc" ;; - "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS 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 -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,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t -s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t -s,@INSTALL_DATA@,$INSTALL_DATA,;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,@SED@,$SED,;t t -s,@EGREP@,$EGREP,;t t -s,@LN_S@,$LN_S,;t t -s,@ECHO@,$ECHO,;t t -s,@AR@,$AR,;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,@STRIP@,$STRIP,;t t -s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t -s,@CPP@,$CPP,;t t -s,@CXX@,$CXX,;t t -s,@CXXFLAGS@,$CXXFLAGS,;t t -s,@ac_ct_CXX@,$ac_ct_CXX,;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,@SET_MAKE@,$SET_MAKE,;t t -s,@ac_pt_AR@,$ac_pt_AR,;t t -s,@ac_pt_RANLIB@,$ac_pt_RANLIB,;t t -s,@NE_FLAG_LFS@,$NE_FLAG_LFS,;t t -s,@LIBOBJS@,$LIBOBJS,;t t -s,@NE_FLAG_IPV6@,$NE_FLAG_IPV6,;t t -s,@NE_FLAG_ZLIB@,$NE_FLAG_ZLIB,;t t -s,@PKG_CONFIG@,$PKG_CONFIG,;t t -s,@NE_FLAG_SSL@,$NE_FLAG_SSL,;t t -s,@GNUTLS_CONFIG@,$GNUTLS_CONFIG,;t t -s,@NE_FLAG_TS_SSL@,$NE_FLAG_TS_SSL,;t t -s,@NEON_SUPPORTS_SSL@,$NEON_SUPPORTS_SSL,;t t -s,@NE_FLAG_SOCKS@,$NE_FLAG_SOCKS,;t t -s,@KRB5_CONFIG@,$KRB5_CONFIG,;t t -s,@NEON_CFLAGS@,$NEON_CFLAGS,;t t -s,@NEON_LIBS@,$NEON_LIBS,;t t -s,@NEON_LTLIBS@,$NEON_LTLIBS,;t t -s,@NE_FLAG_DAV@,$NE_FLAG_DAV,;t t -s,@NEON_TARGET@,$NEON_TARGET,;t t -s,@NEON_OBJEXT@,$NEON_OBJEXT,;t t -s,@NEONOBJS@,$NEONOBJS,;t t -s,@NEON_EXTRAOBJS@,$NEON_EXTRAOBJS,;t t -s,@NEON_LINK_FLAGS@,$NEON_LINK_FLAGS,;t t -s,@XML2_CONFIG@,$XML2_CONFIG,;t t -s,@NE_FLAG_I18N@,$NE_FLAG_I18N,;t t -s,@OPENSSL@,$OPENSSL,;t t -s,@TEST_LDFLAGS@,$TEST_LDFLAGS,;t t -s,@NEON_PC_LIBS@,$NEON_PC_LIBS,;t t -s,@ALL_LINGUAS@,$ALL_LINGUAS,;t t -s,@NEON_VERSION@,$NEON_VERSION,;t t -s,@NEON_BUILD_BUNDLED@,$NEON_BUILD_BUNDLED,;t t -s,@top_builddir@,$top_builddir,;t t -s,@user_LDFLAGS@,$user_LDFLAGS,;t t -s,@HELPERS@,$HELPERS,;t t -s,@TESTS@,$TESTS,;t t -s,@ALLOW_INSTALL@,$ALLOW_INSTALL,;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 - - # Run the commands associated with the file. - case $ac_file in - neon-config ) chmod +x neon-config ;; - esac -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 -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 - - -# for VPATH builds: -test -d test/common || mkdir test/common - -{ echo "$as_me:$LINENO: Configured to build neon 0.27.2: - - Install prefix: ${prefix} - Compiler: ${CC} - XML Parser: ${neon_xml_parser_message} - SSL library: ${ne_SSL_message} - zlib support: ${ne_ZLIB_message} - Build libraries: Shared=${enable_shared}, Static=${enable_static} -" >&5 -echo "$as_me: Configured to build neon 0.27.2: - - Install prefix: ${prefix} - Compiler: ${CC} - XML Parser: ${neon_xml_parser_message} - SSL library: ${ne_SSL_message} - zlib support: ${ne_ZLIB_message} - Build libraries: Shared=${enable_shared}, Static=${enable_static} -" >&6;} - -case $ALLOW_INSTALL in -memleak) - { echo "$as_me:$LINENO: Configured with development-only flags: - -WARNING: This copy of neon has been configured with memory leak checking -WARNING: enabled, which should only be used in a development copy of neon. -WARNING: This neon library should not be installed for use by applications. -" >&5 -echo "$as_me: Configured with development-only flags: - -WARNING: This copy of neon has been configured with memory leak checking -WARNING: enabled, which should only be used in a development copy of neon. -WARNING: This neon library should not be installed for use by applications. -" >&6;};; -esac diff --git a/client/neon-0.27.2/configure.in b/client/neon-0.27.2/configure.in deleted file mode 100644 index 5016f2e11..000000000 --- a/client/neon-0.27.2/configure.in +++ /dev/null @@ -1,185 +0,0 @@ -AC_PREREQ(2.58) dnl 2.58 required for AS_HELP_STRING - -dnl Extract the version (sans LF) from .version, created at release-time. -m4_define(ne_version, [m4_translit(m4_include(.version), [ -])]) - -AC_INIT(neon, ne_version, [neon@webdav.org]) - -AC_COPYRIGHT([Copyright 2000-2005 Joe Orton and others -This configure script may be copied, distributed and modified under the -terms of the GNU Library General Public license; see src/COPYING.LIB for -more details.]) - -AC_CONFIG_HEADER(config.h) -AC_CONFIG_SRCDIR(src/ne_request.c) - -NEON_WITH_LIBS - -# Pass through initial LDFLAGS verbatim to neon-config, so that extra -# libraries which are detected (e.g. OpenSSL) can still be found when -# building using the --libs output of neon-config. -user_LDFLAGS=$LDFLAGS - -# By default, allow 'make install' to work. -ALLOW_INSTALL=yes - -AC_DEFINE([_GNU_SOURCE], 1, [Always defined to enable GNU extensions]) -AC_DEFINE([NEON_IS_LIBRARY], 1, [Defined when neon is built as a library]) - -AH_BOTTOM([ -/* Enable leak-tracking versions of ne_*alloc when NEON_MEMLEAK is enabled */ -#ifdef NEON_MEMLEAK -# include "memleak.h" -#endif]) - -AC_PROG_INSTALL - -dnl Avoid libtool 1.5 bug where configure fails if a C++ compiler -dnl is not available. -m4_ifdef([AC_LIBTOOL_TAGS], [AC_LIBTOOL_TAGS([])]) - -AC_DISABLE_SHARED -AC_PROG_LIBTOOL - -AC_EXEEXT - -AC_ARG_ENABLE(webdav, - AS_HELP_STRING([--disable-webdav],[disable WebDAV support])) - -if test "$enable_webdav" = "no"; then - NEON_WITHOUT_WEBDAV -else - # Yes, we do need an XML parser. The _BUNDLED macros handle - # this normally. - NEON_NEED_XML_PARSER=yes -fi - -# The bundled macros also set this, which makes sure we recurse -# into the 'src' directory. -NEON_BUILD_BUNDLED=yes - -# Define NEON_VERSION etc and make the appropriate substitutions. -NE_VERSIONS_BUNDLED - -# Pass the interface version on to libtool when linking libneon.la -NEON_LINK_FLAGS="-version-info ${NEON_INTERFACE_VERSION}" - -# Library-internal symbols are in the ne__ namespace: tell libtool -# to not export these from the built library if possible. -NEON_LINK_FLAGS="$NEON_LINK_FLAGS -export-symbols-regex '^ne_[[^_]]'" - -# Checks to compile test suite -NEON_TEST - -LIBNEON_SOURCE_CHECKS - -# Use the libtool-type build. -NEON_LIBTOOL_BUILD -# Find an XML parser -NEON_XML_PARSER -# Internationalization support. -NEON_I18N() - -# Extra checks for debugging, compiler warnings -NEON_DEBUG -# Leave till last to prevent CFLAGS affecting checks. -NEON_WARNINGS - -CPPFLAGS="$CPPFLAGS -I\${top_builddir}" - -AC_ARG_ENABLE(memleak, - AS_HELP_STRING([--enable-memleak], - [for test builds only: enable memory leak checking])) - -if test "$enable_memleak" = "yes"; then - CPPFLAGS="$CPPFLAGS -DNEON_MEMLEAK -I\$(top_srcdir)/src" - # disable 'make install' - ALLOW_INSTALL=memleak -fi - -# Enable tests for optional features -TESTS="\$(BASIC_TESTS)" -HELPERS="" -if test $NE_FLAG_SSL = yes; then - # Only enable SSL tests if an openssl binary is found (needed to make - # certs etc). - AC_PATH_PROG(OPENSSL, openssl, notfound) - if test "$OPENSSL" != "notfound"; then - TESTS="$TESTS \$(SSL_TESTS)" - HELPERS="$HELPERS \$(SSL_HELPERS)" - else - AC_MSG_WARN([no openssl binary in \$PATH: SSL tests disabled]) - fi -fi -if test $NE_FLAG_ZLIB = yes; then - TESTS="$TESTS \$(ZLIB_TESTS)" - HELPERS="$HELPERS \$(ZLIB_HELPERS)" -fi -if test x$enable_webdav != xno; then - TESTS="$TESTS \$(DAV_TESTS)" -fi - -AC_ARG_ENABLE(tests-install, - AS_HELP_STRING([--enable-tests-install], - [enable installation of the test suite]),, - [enable_tests_install=no]) - -# If test suite installation is not required, it's more -# efficient to link the test programs using -no-install: -if test "$enable_tests_install" = "no"; then - TEST_LDFLAGS="-no-install" -fi - -AC_SUBST(TEST_LDFLAGS) - -AC_PATH_PROG(PKG_CONFIG, pkg-config, no) -if test "$PKG_CONFIG" != "no"; then - # pkg-config >= 0.18 will use "Libs.private" iff necessary, - # older versions which don't recognize that field may always - # need all libraries in Libs. - if $PKG_CONFIG --atleast-pkgconfig-version=0.18; then :; else - NEON_PC_LIBS=${NEON_LIBS} - fi -fi -AC_SUBST(NEON_PC_LIBS) - -# Bundled language catalogs -ALL_LINGUAS="cs de fr ja nn ru tr zh" -AC_SUBST(ALL_LINGUAS) - -AC_CONFIG_FILES([neon-config], [chmod +x neon-config]) -AC_CONFIG_FILES([Makefile src/Makefile test/Makefile neon.pc]) - -AC_SUBST(NEON_VERSION) -AC_SUBST(NEON_BUILD_BUNDLED) -AC_SUBST(top_builddir) -AC_SUBST(user_LDFLAGS) -AC_SUBST(HELPERS) -AC_SUBST(TESTS) -AC_SUBST(ALLOW_INSTALL) - -AC_OUTPUT - -# for VPATH builds: -test -d test/common || mkdir test/common - -AC_MSG_NOTICE([Configured to build AC_PACKAGE_STRING: - - Install prefix: ${prefix} - Compiler: ${CC} - XML Parser: ${neon_xml_parser_message} - SSL library: ${ne_SSL_message} - zlib support: ${ne_ZLIB_message} - Build libraries: Shared=${enable_shared}, Static=${enable_static} -]) - -case $ALLOW_INSTALL in -memleak) - AC_MSG_NOTICE([Configured with development-only flags: - -WARNING: This copy of neon has been configured with memory leak checking -WARNING: enabled, which should only be used in a development copy of neon. -WARNING: This neon library should not be installed for use by applications. -]);; -esac diff --git a/client/neon-0.27.2/doc/TODO b/client/neon-0.27.2/doc/TODO deleted file mode 100644 index febed3054..000000000 --- a/client/neon-0.27.2/doc/TODO +++ /dev/null @@ -1,156 +0,0 @@ -/* List of interfaces needing reference documentation. -*- c -*- */ - -/* ne_session.h */ - -### DONE: basics -ne_session *ne_session_create(const char *scheme, const char *hostname, int port); -void ne_session_destroy(ne_session *sess); -void ne_close_connection(ne_session *sess); -void ne_session_proxy(ne_session *sess, const char *hostname, int port); - -### DONE: error handling -void ne_set_error(ne_session *sess, const char *format, ...); -const char *ne_get_error(ne_session *sess); - -### DONE: options -void ne_set_useragent(ne_session *sess, const char *product); -void ne_set_expect100(ne_session *sess, int use_expect100); -void ne_set_persist(ne_session *sess, int persist); -void ne_set_read_timeout(ne_session *sess, int timeout); - -### TODO: progress + status callbcacks -void ne_set_progress(ne_session *sess, ne_progress progress, void *userdata); - -### TODO: status callback -typedef enum ne_conn_status; -typedef void (*ne_notify_status)(void *userdata, ne_conn_status status, const char *info); -void ne_set_status(ne_session *sess, ne_notify_status status, void *userdata); - -### DONE: SSL verification - -typedef struct ne_ssl_dname; -char *ne_ssl_readable_dname(const ne_ssl_dname *dn); -typedef struct ne_ssl_certificate; -#define NE_SSL_* -typedef int (*ne_ssl_verify_fn)(void *userdata, int failures, - const ne_ssl_certificate *cert); -void ne_ssl_set_verify(ne_session *sess, ne_ssl_verify_fn fn, void *userdata); - -### DONE: SSL server certs -int ne_ssl_load_ca(ne_session *sess, const char *file); -int ne_ssl_load_default_ca(ne_session *sess); - -### TODO: SSL client certs -typedef int (*ne_ssl_keypw_fn)(void *userdata, char *pwbuf, size_t len); -void ne_ssl_keypw_prompt(ne_session *sess, ne_ssl_keypw_fn fn, void *ud); -int ne_ssl_load_pkcs12(ne_session *sess, const char *fn); -int ne_ssl_load_pem(ne_session *sess, const char *certfn, const char *keyfn); -typedef void (*ne_ssl_provide_fn)(void *userdata, ne_session *sess, - const ne_ssl_dname *server); -void ne_ssl_provide_ccert(ne_session *sess, ne_ssl_provide_fn fn, void *userdata); - -#ifdef NEON_SSL -SSL_CTX *ne_ssl_get_context(ne_session *sess); -X509 *ne_ssl_server_cert(ne_session *req); -#endif - -### TODO: utility functions -int ne_version_pre_http11(ne_session *sess); -const char *ne_get_server_hostport(ne_session *sess); -const char *ne_get_scheme(ne_session *sess); -void ne_fill_server_uri(ne_session *sess, ne_uri *uri); - -/* end of ne_session.h *****************************************/ - -/* ne_request.h */ - -### DONE: request basics -ne_request *ne_request_create(ne_session *sess, const char *method, const char *path); -int ne_request_dispatch(ne_request *req); -void ne_request_destroy(ne_request *req); - -### DONE: request status -const ne_status *ne_get_status(ne_request *req); - -### TODO: request bodies -void ne_set_request_body_buffer(ne_request *req, const char *buf, size_t count); -int ne_set_request_body_fd(ne_request *req, int fd, size_t count); - -typedef ssize_t (*ne_provide_body)(void *userdata, - char *buffer, size_t buflen); -void ne_set_request_body_provider(ne_request *req, size_t size, - ne_provide_body provider, void *userdata); - -### TODO: response bodies -typedef int (*ne_accept_response)(void *userdata, ne_request *req, ne_status *st); -int ne_accept_2xx(void *userdata, ne_request *req, ne_status *st); -int ne_accept_always(void *userdata, ne_request *req, ne_status *st); -void ne_add_response_body_reader(ne_request *req, ne_accept_response accpt, - ne_block_reader reader, void *userdata); - -### TODO: response headers -typedef void (*ne_header_handler)(void *userdata, const char *value); -void ne_add_response_header_handler(ne_request *req, const char *name, - ne_header_handler hdl, void *userdata); -void ne_add_response_header_catcher(ne_request *req, - ne_header_handler hdl, void *userdata); - -void ne_duplicate_header(void *userdata, const char *value); -void ne_handle_numeric_header(void *userdata, const char *value); - -### DONE: request headers -void ne_add_request_header(ne_request *req, const char *name, const char *value); -void ne_print_request_header(ne_request *req, const char *name, const char *format, ...); - -### TODO: misc -ne_session *ne_get_session(ne_request *req); - -### TODO: caller-pulls request interface -int ne_begin_request(ne_request *req); -int ne_end_request(ne_request *req); -ssize_t ne_read_response_block(ne_request *req, char *buffer, size_t buflen); - -### TODO: hooks -typedef void (*ne_free_hooks)(void *cookie); -typedef void (*ne_create_request_fn)(void *userdata, ne_request *req, - const char *method, const char *path); -void ne_hook_create_request(ne_session *sess, ne_create_request_fn fn, void *userdata); - -typedef void (*ne_pre_send_fn)(void *userdata, ne_buffer *header); -void ne_hook_pre_send(ne_session *sess, ne_pre_send_fn fn, void *userdata); - -typedef int (*ne_post_send_fn)(void *userdata, const ne_status *status); -void ne_hook_post_send(ne_session *sess, ne_post_send_fn fn, void *userdata); - -typedef void (*ne_destroy_fn)(void *userdata); -void ne_hook_destroy_request(ne_session *sess, ne_destroy_fn fn, void *userdata); - -void ne_hook_destroy_session(ne_session *sess, ne_destroy_fn fn, void *userdata); - -typedef void *(*ne_accessor_fn)(void *userdata); -void ne_hook_session_accessor(ne_session *sess, const char *id, ne_accessor_fn, void *userdata); -void ne_hook_request_accessor(ne_request *req, const char *id, ne_accessor_fn, void *userdata); - -void *ne_null_accessor(void *userdata); - -void *ne_session_hook_private(ne_session *sess, const char *id); - -void *ne_request_hook_private(ne_request *req, const char *id); - -/* ne_207.h */ -/* ne_acl.h */ -/* DONE: ne_alloc.h */ -/* DONE: ne_auth.h */ -/* ne_basic.h */ -/* ne_compress.h */ -/* ne_cookies.h */ -/* ne_dates.h */ -/* ne_locks.h */ -/* ne_props.h */ -/* ne_redirect.h */ -/* ne_socket.h */ -/* MOSTLY DONE: ne_string.h */ -/* ne_uri.h */ -/* ne_utils.h */ -/* ne_xml.h */ - diff --git a/client/neon-0.27.2/doc/biblio.xml b/client/neon-0.27.2/doc/biblio.xml deleted file mode 100644 index 43574b838..000000000 --- a/client/neon-0.27.2/doc/biblio.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - SSL-and-TLS - <ulink url="http://www.rtfm.com/sslbook/">SSL and - TLS: Designing and Building Secure Systems</ulink> - EricRescorla - 0-201-62598-3 - Addison-Wesley - March 2001 - - - - REC-XML-names - World Wide Web Consortium - <ulink url="http://www.w3.org/TR/REC-xml-names">Namespaces in XML</ulink> - January 1999 - - - - RFC2616 - <ulink url="http://www.ietf.org/rfc/rfc2616.txt">Hypertext Transfer - Protocol—HTTP/1.1</ulink> - - RoyFielding - JimGettys - JeffMogul - HenrikFrystyk - LarryMasinter - PaulLeach - TimBerners-Lee - - IETF - June 1999 - - - - RFC2518 - <ulink url="http://www.ietf.org/rfc/rfc2518.txt">HTTP Extensions for Distributed Authoring—WEBDAV</ulink> - - YaronGoland - JimWhitehead - AsadFaizi - SteveCarter - DelJensen - - IETF - February 1999 - - - - RFC3280 - <ulink url="http://www.ietf.org/rfc/rfc3280.txt">Internet X.509 Public Key Infrastructure - Certificate and Certificate Revocation List (CRL) Profile</ulink> - - RusselHousley - WarwickFord - TimPolk - DavidSolo - - IETF - April 2002 - - - - - - - diff --git a/client/neon-0.27.2/doc/date.xml b/client/neon-0.27.2/doc/date.xml deleted file mode 100644 index 2e9466e8c..000000000 --- a/client/neon-0.27.2/doc/date.xml +++ /dev/null @@ -1 +0,0 @@ -25 September 2007 \ No newline at end of file diff --git a/client/neon-0.27.2/doc/feat.xml b/client/neon-0.27.2/doc/feat.xml deleted file mode 100644 index 547ab9fa8..000000000 --- a/client/neon-0.27.2/doc/feat.xml +++ /dev/null @@ -1,78 +0,0 @@ - - Feature list - - The major features of the neon library are as follows: - - - - A high-level interface to common HTTP and WebDAV -methods. This allows you to easily dispatch a GET or a MKCOL request -against a resource with a single function call. - - A low-level interface for HTTP request -handling; allowing you to implement requests using arbitrary methods -and request headers, capture arbitrary response headers, and so -on. - - Persistent connection support; neon groups a -set of requests to a server into a "session"; requests within that -session can use a persistent (also known as "keep-alive") -connection. - - Modern HTTP authentication support: a complete -implementation of the new authentication standard, RFC2617, -supporting the Digest (MD5) and Basic schemes, including integrity -checking. Credentials are supplied by an application-defined -callback. - - Proxy server support; a session can be set to -use a proxy server. Authentication is supported for the Proxy as well -as the origin server. - - Complete SSL support; a simple interface for -enabling SSL, hiding the complexity of using an SSL library directly. -Client certificate support, callback-based server certificate -verification, along with functions to load trusted CA -certificates. - - - - Generic XML parsing interface for handling XML -response bodies using SAX-like callbacks. Both the expat and libxml -XML parser libraries are supported. - - WebDAV metadata support; set and remove -properties, query properties (PROPFIND); simple interface for -retrieving "flat" byte-string properties, more advanced support for -parsing "complex" XML structured properties. - - - - Build environment support: the neon source -tree is designed so that it can be embedded in your application's -build tree; autoconf macros are supplied for integration. To get -started quickly a script is included, -to easily determine how to compile and link against an installed copy -of neon - - Complete test suite: the neon test suite -comprises half as many lines of source code as the library itself, -including many tests for protocol compliance in network behaviour, and -that the library implementation meets the guarantees made by the -API. - - - - - - diff --git a/client/neon-0.27.2/doc/html.xsl b/client/neon-0.27.2/doc/html.xsl deleted file mode 100644 index a96867d50..000000000 --- a/client/neon-0.27.2/doc/html.xsl +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - -../manual.css - - - - - - - - - - programlisting - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- -
-
- -
- diff --git a/client/neon-0.27.2/doc/html/api.html b/client/neon-0.27.2/doc/html/api.html deleted file mode 100644 index 74559bd01..000000000 --- a/client/neon-0.27.2/doc/html/api.html +++ /dev/null @@ -1,4 +0,0 @@ -Chapter 2. The neon C language interface

Chapter 2. The neon C language interface

The documentation for the neon interface is split between - this chapter, which gives a broad introduction to the abstractions - exposed by the library, and neon API reference, which gives a - function-by-function breakdown of the interface.

diff --git a/client/neon-0.27.2/doc/html/biblio.html b/client/neon-0.27.2/doc/html/biblio.html deleted file mode 100644 index e8bff67b8..000000000 --- a/client/neon-0.27.2/doc/html/biblio.html +++ /dev/null @@ -1,4 +0,0 @@ -Bibliography

Bibliography

[SSL-and-TLS] SSL and - TLS: Designing and Building Secure Systems. Eric Rescorla. 0-201-62598-3. Addison-Wesley. March 2001.

[REC-XML-names] World Wide Web Consortium. Namespaces in XML. January 1999.

[RFC2616] Hypertext Transfer - Protocol—HTTP/1.1. Roy Fielding, Jim Gettys, Jeff Mogul, Henrik Frystyk, Larry Masinter, Paul Leach, and Tim Berners-Lee. IETF. June 1999.

[RFC2518] HTTP Extensions for Distributed Authoring—WEBDAV. Yaron Goland, Jim Whitehead, Asad Faizi, Steve Carter, and Del Jensen. IETF. February 1999.

[RFC3280] Internet X.509 Public Key Infrastructure - Certificate and Certificate Revocation List (CRL) Profile. Russel Housley, Warwick Ford, Tim Polk, and David Solo. IETF. April 2002.

diff --git a/client/neon-0.27.2/doc/html/compliance.html b/client/neon-0.27.2/doc/html/compliance.html deleted file mode 100644 index 132100e69..000000000 --- a/client/neon-0.27.2/doc/html/compliance.html +++ /dev/null @@ -1,34 +0,0 @@ -Standards compliance

Standards compliance

neon is intended to be compliant with the IETF and W3C - standards which it implements, with a few exceptions due to - practical necessity or interoperability issues. These - exceptions are documented in this section.

RFC 2518, HTTP Extensions for Distributed Authoring—WebDAV

neon is deliberately not compliant with section - 23.4.2, and treats property names as a (namespace-URI, name) - pair. This is generally - considered to be correct behaviour by the WebDAV - working group, and is likely to formally adopted in a future - revision of the specification.

RFC 2616, Hypertext Transfer Protocol—HTTP/1.1

There is some confusion in this specification about the - use of the “identity” - transfer-coding. neon ignores the - Transfer-Encoding response header if it - contains only the (now deprecated) “identity” - token, and will determine the response message length as if - the header was not present. neon will give an error if a - response includes a Transfer-Encoding - header with a value other than “identity” or - “chunked”.

RFC 2617, HTTP Authentication: Basic and Digest Access Authentication

neon is not strictly compliant with the quoting rules - given in the grammar for the Authorization - header. The grammar requires that the qop - and algorithm parameters are not quoted, - however one widely deployed server implementation - (Microsoft® IIS 5) rejects the request if these parameters - are not quoted. neon sends these parameters with - quotes—this is not known to cause any problems with - other server implementations.

Namespaces in XML

The neon XML parser interface will accept and parse - without error some XML documents which are well-formed - according to the XML specification but do not conform to the - "Namespaces in XML" specification [REC-XML-names]. Specifically: the restrictions on - the first character of the NCName rule are - not all implemented; neon will allow any - CombiningChar, Extender - and some characters from the Digit class in - this position.

diff --git a/client/neon-0.27.2/doc/html/features.html b/client/neon-0.27.2/doc/html/features.html deleted file mode 100644 index 58c41b1a8..000000000 --- a/client/neon-0.27.2/doc/html/features.html +++ /dev/null @@ -1,33 +0,0 @@ -Feature list

Feature list

The major features of the neon library are as follows:

  • A high-level interface to common HTTP and WebDAV -methods. This allows you to easily dispatch a GET or a MKCOL request -against a resource with a single function call.

  • A low-level interface for HTTP request -handling; allowing you to implement requests using arbitrary methods -and request headers, capture arbitrary response headers, and so -on.

  • Persistent connection support; neon groups a -set of requests to a server into a "session"; requests within that -session can use a persistent (also known as "keep-alive") -connection.

  • Modern HTTP authentication support: a complete -implementation of the new authentication standard, RFC2617, -supporting the Digest (MD5) and Basic schemes, including integrity -checking. Credentials are supplied by an application-defined -callback.

  • Proxy server support; a session can be set to -use a proxy server. Authentication is supported for the Proxy as well -as the origin server.

  • Complete SSL support; a simple interface for -enabling SSL, hiding the complexity of using an SSL library directly. -Client certificate support, callback-based server certificate -verification, along with functions to load trusted CA -certificates.

  • Generic XML parsing interface for handling XML -response bodies using SAX-like callbacks. Both the expat and libxml -XML parser libraries are supported.

  • WebDAV metadata support; set and remove -properties, query properties (PROPFIND); simple interface for -retrieving "flat" byte-string properties, more advanced support for -parsing "complex" XML structured properties.

  • Build environment support: the neon source -tree is designed so that it can be embedded in your application's -build tree; autoconf macros are supplied for integration. To get -started quickly a neon-config script is included, -to easily determine how to compile and link against an installed copy -of neon

  • Complete test suite: the neon test suite -comprises half as many lines of source code as the library itself, -including many tests for protocol compliance in network behaviour, and -that the library implementation meets the guarantees made by the -API.

diff --git a/client/neon-0.27.2/doc/html/index.html b/client/neon-0.27.2/doc/html/index.html deleted file mode 100644 index 5fbdba8d1..000000000 --- a/client/neon-0.27.2/doc/html/index.html +++ /dev/null @@ -1,14 +0,0 @@ -neon HTTP/WebDAV client library

neon HTTP/WebDAV client library

Joe Orton

This document is free documentation; 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 document 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., 675 Mass Ave, Cambridge, MA 02139, - USA.


Table of Contents

1. Introduction
Feature list
How to use neon from your application
Standards compliance
RFC 2518, HTTP Extensions for Distributed Authoring—WebDAV
RFC 2616, Hypertext Transfer Protocol—HTTP/1.1
RFC 2617, HTTP Authentication: Basic and Digest Access Authentication
Namespaces in XML
2. The neon C language interface
Parsing XML
Introduction to SAX
Stacked SAX handlers
Maintaining state
XML namespaces
I. neon API reference
neon — HTTP and WebDAV client library
neon-config — script providing information about installed copy - of neon library
ne_addr_resolve — functions to resolve hostnames to addresses
ne_buffer — string buffer handling
ne_buffer_append — append data to a string buffer
ne_buffer_clear — general purpose of group of functions
ne_buffer_create — general purpose of group of functions
ne_buffer_destroy — destroy a buffer object
ne_get_error — error handling for HTTP sessions
ne_get_status — retrieve HTTP response status for request
ne_has_support — determine feature support status
ne_i18n_init — functions to initialize internationalization support
ne_iaddr_make — functions to manipulate and compare network addresses
ne_malloc — memory allocation wrappers
ne_session_create — set up HTTP sessions
ne_request_create — low-level HTTP request handling
ne_add_request_header — add headers to a request
ne_get_response_header — functions to access response headers
ne_set_useragent — common properties for HTTP sessions
ne_set_request_expect100 — function to enable Expect: 100-continue support
ne_set_request_body_buffer — include a message body with a request
ne_set_server_auth — register authentication callbacks
ne_shave — trim whitespace from a string
ne_sock_init — perform library initialization
ne_ssl_cert_identity — functions to access certificate properties
ne_ssl_cert_cmp — functions to operate on certificate objects
ne_ssl_cert_read — functions to read or write certificates to and from files or strings
ne_ssl_dname — SSL distinguished name handling
ne_ssl_trust_cert — functions to indicate that certificates are trusted
ne_ssl_set_verify — register an SSL certificate verification callback
ne_ssl_client_cert — SSL client certificate handling
ne_status — HTTP status structure
ne_token — string tokenizers
ne_version_match — library versioning
ne_xml_create — create and destroy an XML parser
Bibliography

List of Examples

2.1. An example XML document
diff --git a/client/neon-0.27.2/doc/html/intro.html b/client/neon-0.27.2/doc/html/intro.html deleted file mode 100644 index 27a3b971f..000000000 --- a/client/neon-0.27.2/doc/html/intro.html +++ /dev/null @@ -1,7 +0,0 @@ -Chapter 1. Introduction

Chapter 1. Introduction

This chapter provides an introduction to neon, giving an -overview of the range of features offered, and some general guidelines -for using the neon API.

neon aims to provide a modern, flexible, and simple API -in the C programming language for implementing HTTP and WebDAV -support. The WebDAV functionality is entirely separate from the basic -HTTP functionality; neon can be used simply as an HTTP client library, -ignoring the WebDAV support if desired.

diff --git a/client/neon-0.27.2/doc/html/ref.html b/client/neon-0.27.2/doc/html/ref.html deleted file mode 100644 index 23e8bd672..000000000 --- a/client/neon-0.27.2/doc/html/ref.html +++ /dev/null @@ -1,2 +0,0 @@ -neon API reference

neon API reference


Table of Contents

neon — HTTP and WebDAV client library
neon-config — script providing information about installed copy - of neon library
ne_addr_resolve — functions to resolve hostnames to addresses
ne_buffer — string buffer handling
ne_buffer_append — append data to a string buffer
ne_buffer_clear — general purpose of group of functions
ne_buffer_create — general purpose of group of functions
ne_buffer_destroy — destroy a buffer object
ne_get_error — error handling for HTTP sessions
ne_get_status — retrieve HTTP response status for request
ne_has_support — determine feature support status
ne_i18n_init — functions to initialize internationalization support
ne_iaddr_make — functions to manipulate and compare network addresses
ne_malloc — memory allocation wrappers
ne_session_create — set up HTTP sessions
ne_request_create — low-level HTTP request handling
ne_add_request_header — add headers to a request
ne_get_response_header — functions to access response headers
ne_set_useragent — common properties for HTTP sessions
ne_set_request_expect100 — function to enable Expect: 100-continue support
ne_set_request_body_buffer — include a message body with a request
ne_set_server_auth — register authentication callbacks
ne_shave — trim whitespace from a string
ne_sock_init — perform library initialization
ne_ssl_cert_identity — functions to access certificate properties
ne_ssl_cert_cmp — functions to operate on certificate objects
ne_ssl_cert_read — functions to read or write certificates to and from files or strings
ne_ssl_dname — SSL distinguished name handling
ne_ssl_trust_cert — functions to indicate that certificates are trusted
ne_ssl_set_verify — register an SSL certificate verification callback
ne_ssl_client_cert — SSL client certificate handling
ne_status — HTTP status structure
ne_token — string tokenizers
ne_version_match — library versioning
ne_xml_create — create and destroy an XML parser
diff --git a/client/neon-0.27.2/doc/html/refalloc.html b/client/neon-0.27.2/doc/html/refalloc.html deleted file mode 100644 index eaca1b940..000000000 --- a/client/neon-0.27.2/doc/html/refalloc.html +++ /dev/null @@ -1,12 +0,0 @@ -ne_malloc

Name

ne_malloc, ne_calloc, ne_realloc, ne_strdup, ne_strndup, ne_oom_callback — memory allocation wrappers

Synopsis

#include <ne_alloc.h>
void *ne_malloc(size_t  size);
void *ne_calloc(size_t  size);
void *ne_realloc(void * size,
 size_t  len);
char *ne_strdup(const char * s);
char *ne_strndup(const char * s,
 size_t  size);
void ne_oom_callback(void (* callback);

Description

The functions ne_malloc, -ne_calloc, ne_realloc, -ne_strdup and ne_strdnup -provide wrappers for the equivalent functions in the standard C -library. The wrappers provide the extra guarantee that if the C -library equivalent returns NULL when no memory is available, an -optional callback will be called, and the library will then call -abort().

ne_oom_callback registers a callback -which will be invoked if an out of memory error is detected.

Notes

If the operating system uses optimistic memory -allocation, the C library memory allocation routines will not return -NULL, so it is not possible to gracefully handle memory allocation -failures.

diff --git a/client/neon-0.27.2/doc/html/refauth.html b/client/neon-0.27.2/doc/html/refauth.html deleted file mode 100644 index b04be2ad6..000000000 --- a/client/neon-0.27.2/doc/html/refauth.html +++ /dev/null @@ -1,38 +0,0 @@ -ne_set_server_auth

Name

ne_set_server_auth, ne_set_proxy_auth, ne_forget_auth — register authentication callbacks

Synopsis

#include <ne_auth.h>
typedef int (*ne_auth_creds)(void * userdata,
 const char * realm,
 int  attempt,
 char * username,
 char * password);
void ne_set_server_auth(ne_session * session,
 ne_auth_creds  callback,
 void * userdata);
void ne_set_proxy_auth(ne_session * session,
 ne_auth_creds  callback,
 void * userdata);
void ne_forget_auth(ne_session * session);

Description

The ne_auth_creds function type defines a -callback which is invoked when a server or proxy server requires user -authentication for a particular request. The -realm string is supplied by the server. The attempt is a counter giving the -number of times the request has been retried with different -authentication credentials. The first time the callback is invoked -for a particular request, attempt will be zero.

To retry the request using new authentication -credentials, the callback should return zero, and the -username and password -buffers must contain NUL-terminated strings. The -NE_ABUFSIZ constant gives the size of these -buffers.

Tip

If you only wish to allow the user one attempt to enter -credentials, use the value of the attempt -parameter as the return value of the callback.

To abort the request, the callback should return a -non-zero value; in which case the contents of the -username and password -buffers are ignored.

The ne_forget_auth function can be -used to discard the cached authentication credentials.

Examples

-/* Function which prompts for a line of user input: */
-extern char *prompt_for(const char *prompt);
-
-static int
-my_auth(void *userdata, const char *realm, int attempts,
-        char *username, char *password)
-{
-   strncpy(username, prompt_for("Username: "), NE_ABUFSIZ);
-   strncpy(password, prompt_for("Password: "), NE_ABUFSIZ);
-   return attempts;
-}
-
-int main(...)
-{
-   ne_session *sess = ne_session_create(...);
-
-   ne_set_server_auth(sess, my_auth, NULL);
-
-   /* ... */
-}
diff --git a/client/neon-0.27.2/doc/html/refbuf.html b/client/neon-0.27.2/doc/html/refbuf.html deleted file mode 100644 index 813a58e3f..000000000 --- a/client/neon-0.27.2/doc/html/refbuf.html +++ /dev/null @@ -1,20 +0,0 @@ -ne_buffer

Name

ne_buffer — string buffer handling

Synopsis

#include <ne_string.h>
-
-typedef struct {
-    char *data;
-    size_t used;
-    size_t length;
-} ne_buffer;

Description

The ne_buffer type represents an expandable -memory buffer for holding NUL-terminated strings. The -data field points to the beginnning of the -string, the length of which is given by the -used field. The current size of memory -allocated is given by the length field. It -is not recommended that the fields of a buffer are manipulated -directly. The data pointer may change when -the buffer is modified.

A buffer is created using ne_buffer_create or ne_buffer_ncreate, and destroyed using ne_buffer_destroy or ne_buffer_finish. -The functions ne_buffer_append, ne_buffer_zappend and ne_buffer_concat are -used to append data to a buffer.

If the string referenced by the -data pointer is modified directly (rather -than using one of the functions listed above), -ne_buffer_altered must be called.

diff --git a/client/neon-0.27.2/doc/html/refbufapp.html b/client/neon-0.27.2/doc/html/refbufapp.html deleted file mode 100644 index 612e0d61b..000000000 --- a/client/neon-0.27.2/doc/html/refbufapp.html +++ /dev/null @@ -1,22 +0,0 @@ -ne_buffer_append

Name

ne_buffer_append, ne_buffer_zappend, ne_buffer_concat — append data to a string buffer

Synopsis

#include <ne_string.h>
void ne_buffer_append(ne_buffer * buf,
 const char * string,
 size_t  len);
void ne_buffer_zappend(ne_buffer * buf,
 const char * string);
void ne_buffer_concat(ne_buffer * buf,
 const char * str,
  );

Description

The ne_buffer_append and -ne_buffer_zappend functions append a string to -the end of a buffer; extending the buffer as necessary. The -len passed to -ne_buffer_append specifies the length of the -string to append; there must be no NUL terminator in the first -len bytes of the string. -ne_buffer_zappend must be passed a -NUL-terminated string.

The ne_buffer_concat function takes -a variable-length argument list following str; -each argument must be a char * pointer to a -NUL-terminated string. A NULL pointer must be given as the last -argument to mark the end of the list. The strings (including -str) are appended to the buffer in the order -given. None of the strings passed to -ne_buffer_concat are modified.

Examples

The following code will output "Hello, world. -And goodbye.".

ne_buffer *buf = ne_buffer_create();
-ne_buffer_zappend(buf, "Hello");
-ne_buffer_concat(buf, ", world. ", "And ", "goodbye.", NULL);
-puts(buf->data);
-ne_buffer_destroy(buf);
diff --git a/client/neon-0.27.2/doc/html/refbufcr.html b/client/neon-0.27.2/doc/html/refbufcr.html deleted file mode 100644 index e1d4e4e26..000000000 --- a/client/neon-0.27.2/doc/html/refbufcr.html +++ /dev/null @@ -1,7 +0,0 @@ -ne_buffer_create

Name

ne_buffer_create, ne_buffer_ncreate — general purpose of group of functions

Synopsis

#include <ne_alloc.h>
ne_buffer *ne_buffer_create(void); 
ne_buffer *ne_buffer_ncreate(size_t  size);

Description

ne_buffer_create creates a new -buffer object, with an implementation-defined initial size. -ne_buffer_ncreate creates an -ne_buffer where the minimum initial size is given in the -size parameter. The buffer created will -contain the empty string ("").

Return value

Both functions return a pointer to a new buffer object, -and never NULL.

See also

ne_buffer

diff --git a/client/neon-0.27.2/doc/html/refbufdest.html b/client/neon-0.27.2/doc/html/refbufdest.html deleted file mode 100644 index 36dcf6142..000000000 --- a/client/neon-0.27.2/doc/html/refbufdest.html +++ /dev/null @@ -1,17 +0,0 @@ -ne_buffer_destroy

Name

ne_buffer_destroy, ne_buffer_finish — destroy a buffer object

Synopsis

#include <ne_string.h>
void ne_buffer_destroy(ne_buffer * buf);
char *ne_buffer_finish(ne_buffer * buf);

Description

ne_buffer_destroy frees all memory -associated with the buffer. ne_buffer_finish -frees the buffer structure, but not the actual string stored in the -buffer, which is returned and must be free()d by -the caller.

Any use of the buffer object after calling either of these -functions gives undefined behaviour.

Return value

ne_buffer_finish returns the -malloc-allocated string stored in the buffer.

Examples

An example use of ne_buffer_finish; -the duplicate function returns a string made up of -n copies of str:

static char *duplicate(int n, const char *str)
-{
-  ne_buffer *buf = ne_buffer_create();
-  while (n--) {
-    ne_buffer_zappend(buf, str);
-  }
-  return ne_buffer_finish(buf);
-}
diff --git a/client/neon-0.27.2/doc/html/refbufutil.html b/client/neon-0.27.2/doc/html/refbufutil.html deleted file mode 100644 index e21e45aac..000000000 --- a/client/neon-0.27.2/doc/html/refbufutil.html +++ /dev/null @@ -1,11 +0,0 @@ -ne_buffer_clear

Name

ne_buffer_clear, ne_buffer_grow, ne_buffer_altered — general purpose of group of functions

Synopsis

#include <ne_string.h>
void ne_buffer_clear(ne_buffer * buf);
void ne_buffer_altered(ne_buffer * buf);
void ne_buffer_grow(ne_buffer * buf,
 size_t  size);

Description

The ne_buffer_clear function sets -the string stored in buf to be the empty string -("").

The ne_buffer_altered function must -be used after the string stored in the buffer -buf is modified by directly rather than using -ne_buffer_append, ne_buffer_zappend -or ne_buffer_concat.

The ne_buffer_grow function -ensures that at least size bytes are allocated -for the string; this can be used if a large amount of data is going to -be appended to the buffer and may result in more efficient memory -allocation.

diff --git a/client/neon-0.27.2/doc/html/refcert.html b/client/neon-0.27.2/doc/html/refcert.html deleted file mode 100644 index d340eaf0b..000000000 --- a/client/neon-0.27.2/doc/html/refcert.html +++ /dev/null @@ -1,33 +0,0 @@ -ne_ssl_cert_identity

Name

ne_ssl_cert_identity, ne_ssl_cert_signedby, ne_ssl_cert_issuer, ne_ssl_cert_subject — functions to access certificate properties

Synopsis

#include <ne_ssl.h>
const char *ne_ssl_cert_identity(const ne_ssl_certificate * cert);
const ne_ssl_certificate *ne_ssl_cert_signedby(const ne_ssl_certificate * cert);
const ne_ssl_dname *ne_ssl_cert_subject(const ne_ssl_certificate * cert);
const ne_ssl_dname *ne_ssl_cert_issuer(const ne_ssl_certificate * cert);

Description

The function ne_ssl_cert_identity - retrieves the “identity” of a certificate; for an - SSL server certificate, this will be the hostname for which the - certificate was issued. In PKI parlance, the identity is the - common name attribute of the distinguished name of - the certificate subject.

The functions ne_ssl_cert_subject and - ne_ssl_cert_issuer can be used to access the - objects representing the distinguished name of the subject and of - the issuer of a certificate, respectively.

If a certificate object is part of a certificate chain, then - ne_ssl_cert_signedby can be used to find the - certificate which signed a particular certificate. For a - self-signed certificate or a certificate for which the full chain - is not available, this function will return NULL.

Return value

ne_ssl_cert_issuer and - ne_ssl_cert_subject are guaranteed to never - return NULL. ne_ssl_cert_identity may - return NULL if the certificate has no specific - “identity”. ne_ssl_cert_signedby - may return NULL as covered above.

Examples

The following function could be used to display information - about a given certificate:

void dump_cert(const ne_ssl_certificate *cert) {
-  const char *id = ne_ssl_cert_identity(cert);
-  char *dn;
-
-  if (id) 
-    printf("Certificate was issued for '%s'.\n", id);
-
-  dn = ne_ssl_readable_dname(ne_ssl_cert_subject(cert));
-  printf("Subject: %s\n", dn);
-  free(dn);
-
-  dn = ne_ssl_readable_dname(ne_ssl_cert_issuer(cert));
-  printf("Issuer: %s\n", dn);
-  free(dn);
-}
diff --git a/client/neon-0.27.2/doc/html/refclicert.html b/client/neon-0.27.2/doc/html/refclicert.html deleted file mode 100644 index bf3ba97d9..000000000 --- a/client/neon-0.27.2/doc/html/refclicert.html +++ /dev/null @@ -1,55 +0,0 @@ -ne_ssl_client_cert

Name

ne_ssl_clicert_read, ne_ssl_clicert_name, ne_ssl_clicert_encrypted, ne_ssl_clicert_decrypt, ne_ssl_clicert_owner, ne_ssl_clicert_free — SSL client certificate handling

Synopsis

#include <ne_ssl.h>
ne_ssl_client_cert *ne_ssl_clicert_read(const char * filename);
const char *ne_ssl_clicert_name(const ne_ssl_client_cert * ccert);
int ne_ssl_clicert_encrypted(const ne_ssl_client_cert * ccert);
int ne_ssl_clicert_decrypt(ne_ssl_client_cert * ccert,
 const char * password);
const ne_ssl_certificate *ne_ssl_clicert_owner(const ne_ssl_client_cert * ccert);
void ne_ssl_clicert_free(ne_ssl_client_cert * ccert);

Description

The ne_ssl_clicert_read function reads - a client certificate from a - PKCS#12-formatted file, and returns an - ne_ssl_client_cert object. If the client - certificate is encrypted, it must be decrypted before it is used. - An ne_ssl_client_cert object holds a client - certificate and the associated private key, not just a - certificate; the term "client certificate" - will used to refer to this pair.

A client certificate can be in one of two states: - encrypted or decrypted. - The ne_ssl_clicert_encrypted function will - return non-zero if the client certificate is in the - encrypted state. A client certificate object - returned by ne_ssl_clicert_read may be - initially in either state, depending on whether the file was - encrypted or not.

ne_ssl_clicert_decrypt can be used to - decrypt a client certificate using the appropriate password. This - function must only be called if the object is in the - encrypted state; if decryption fails, the - certificate state does not change, so decryption can be attempted - more than once using different passwords.

A client certificate can be given a "friendly name" when it - is created; ne_ssl_clicert_name will return - this name (or NULL if no friendly name was specified). - ne_ssl_clicert_name can be used when the - client certificate is in either the encrypted or decrypted state, - and will return the same string for the lifetime of the - object.

The function ne_ssl_clicert_owner - returns the certificate part of the client certificate; it must - only be called if the client certificate is in the - decrypted state.

When the client certificate is no longer needed, the - ne_ssl_clicert_free function should be used - to destroy the object.

Return value

ne_ssl_clicert_read returns a client - certificate object, or NULL if the file could not be read. - ne_ssl_clicert_encrypted returns zero if the - object is in the decrypted state, or non-zero if it is in the - encrypted state. ne_ssl_clicert_name returns - a NUL-terminated friendly name string, or NULL. - ne_ssl_clicert_owner returns a certificate - object.

Examples

The following code reads a client certificate and decrypts - it if necessary, then loads it into an HTTP session.

ne_ssl_client_cert *ccert;
-
-ccert = ne_ssl_clicert_read("/path/to/client.p12");
-
-if (ccert == NULL) {
-   /* handle error... */
-} else if (ne_ssl_clicert_encrypted(ccert)) {
-   char *password = prompt_for_password();
-
-   if (ne_ssl_clicert_decrypt(ccert, password)) {
-      /* could not decrypt! handle error... */
-   }
-}
-
-ne_ssl_set_clicert(sess, ccert);
-
diff --git a/client/neon-0.27.2/doc/html/refconfig.html b/client/neon-0.27.2/doc/html/refconfig.html deleted file mode 100644 index a074d557c..000000000 --- a/client/neon-0.27.2/doc/html/refconfig.html +++ /dev/null @@ -1,32 +0,0 @@ -neon-config

Name

neon-config — script providing information about installed copy - of neon library

Synopsis

neon-config [--prefix] [[--cflags] | [--libs] | [--la-file] | [--support feature] | [--help] | [--version]]

Description

The neon-config script provides -information about an installed copy of the neon library. The ---cflags and --libs options instruct -how to compile and link an application against the library; the ---version and --support options can -help determine whether the library meets the applications -requirements.

Options

--cflagsPrint the flags which should be passed to -the C compiler when compiling object files, when the object files use -neon header files.
--libsPrint the flags which should be passed to -the linker when linking an application which uses the neon -library
--la-filePrint the location of the libtool library -script, libneon.la, which can be used to link against -neon by applications using libtool.
--versionPrint the version of the library
--prefix dirIf dir is given; relocate output of ---cflags and --libs as if neon was -installed in given prefix directory. Otherwise, print the -installation prefix of the library.
--support featureThe script exits with success if -feature is supported by the -library.
--helpPrint help message; includes list of known - features and whether they are supported or not.

Example

Below is a Makefile fragment which could be used to -build an application against an installed neon library, when the -neon-config script can be found in -$PATH.

CFLAGS = `neon-config --cflags`
-LIBS = `neon-config --libs`
-OBJECTS = myapp.o
-TARGET = myapp
-
-$(TARGET): $(OBJECTS)
-	$(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS)
-
-myapp.o: myapp.c
-	$(CC) $(CFLAGS) -c myapp.c -o myapp.o
diff --git a/client/neon-0.27.2/doc/html/referr.html b/client/neon-0.27.2/doc/html/referr.html deleted file mode 100644 index 352f9f30a..000000000 --- a/client/neon-0.27.2/doc/html/referr.html +++ /dev/null @@ -1,18 +0,0 @@ -ne_get_error

Name

ne_get_error, ne_set_error — error handling for HTTP sessions

Synopsis

#include <ne_session.h>
const char *ne_get_error(ne_sesssion * session);
void ne_set_error(ne_sesssion * session,
 const char * format,
  );

Description

The session error string is used to store any -human-readable error information associated with any errors which -occur whilst using the HTTP session.

The ne_get_error function returns - the current session error string. This string persists only - until it is changed by a subsequent operation on the session. - If localisation was enabled at build time, and if necessary - enabled at run-time if necessary using ne_i18n_init, the returned string may have been - translated into the user's current locale.

The ne_set_error function can be - used to set a new session error string, using a - printf-style format string - interface.

Return value

ne_set_error returns a constant - NUL-terminated string. In the default English locale, the - returned string will not have a - terminating “.” period character.

Examples

Retrieve the current error string:

ne_session *sess = ne_session_create(...);
-...
-printf("Error was: %s\n", ne_get_error(sess));

Set a new error string:

ne_session *sess = ne_session_create(...);
-...
-ne_set_error(sess, "Response missing header %s", "somestring");
diff --git a/client/neon-0.27.2/doc/html/reffeat.html b/client/neon-0.27.2/doc/html/reffeat.html deleted file mode 100644 index 9fb8d1e04..000000000 --- a/client/neon-0.27.2/doc/html/reffeat.html +++ /dev/null @@ -1,10 +0,0 @@ -ne_has_support

Name

ne_has_support — determine feature support status

Synopsis

#include <ne_utils.h>
int ne_has_support(int  feature);

Description

The ne_has_support function can be used - to determine whether a particular optional feature, given by the - feature code feature, is supported. The - following feature codes are available: - -

NE_FEATURE_SSLIndicates support for SSL/TLS
NE_FEATURE_ZLIBIndicates support for compressed responses
NE_FEATURE_IPV6Indicates support for IPv6
NE_FEATURE_LFSIndicates support for large files
NE_FEATURE_SOCKSIndicates support for SOCKSv5
NE_FEATURE_TS_SSLIndicates support for thread-safe SSL - initialization — see ne_sock_init

- -

Return value

ne_has_support returns non-zero if - the given feature is supported, or zero otherwise.

diff --git a/client/neon-0.27.2/doc/html/refgetst.html b/client/neon-0.27.2/doc/html/refgetst.html deleted file mode 100644 index 83ad7c41d..000000000 --- a/client/neon-0.27.2/doc/html/refgetst.html +++ /dev/null @@ -1,13 +0,0 @@ -ne_get_status

Name

ne_get_status — retrieve HTTP response status for request

Synopsis

#include <ne_request.h>
const ne_status *ne_get_status(const ne_request * request);

Description

The ne_get_status function returns -a pointer to the HTTP status object giving the result of a request. -The object returned only becomes valid once the request has been -successfully dispatched (the return value of -ne_request_dispatch or -ne_begin_request was zero). The object remains -valid until the associated request object is destroyed.

Example

Display the response status code of applying the -HEAD method to some resource.

ne_request *req = ne_request_create(sess, "HEAD", "/foo/bar");
-if (ne_request_dispatch(req))
-   /* handle errors... */
-else
-   printf("Response status code was %d\n", ne_get_status(req)->code);
-ne_request_destroy(req);
diff --git a/client/neon-0.27.2/doc/html/refi18n.html b/client/neon-0.27.2/doc/html/refi18n.html deleted file mode 100644 index 84331327d..000000000 --- a/client/neon-0.27.2/doc/html/refi18n.html +++ /dev/null @@ -1,18 +0,0 @@ -ne_i18n_init

Name

ne_i18n_init — functions to initialize internationalization support

Synopsis

#include <ne_i18n.h>
void ne_i18n_init(const char * encoding);

Description

The ne_i18n_init function can be used - to enable support for translated messages in the neon library. - The encoding parameter, if non-NULL, - specifies the character encoding required for generated translated - string. If it is NULL, the appropriate character encoding for - the process locale will be used.

This call is only strictly necessary if either: - -

  1. neon has been installed into a different - prefix than the gettext implementation on - which it depends for i18n purposes, or
  2. the caller requires that translated messages - are in a particular character encoding.

If ne_i18n_init is never called, the - message catalogs will not be found if case (a) applies (and so - English error messages will be used), and will use the default - character encoding specified by the process locale. The library - will otherwise operate correctly.

Note that the encoding used is a process-global setting and - so results may be unexpected if other users of neon within the - process call ne_i18n_init with a different - encoding parameter.

See also

ne_sock_init

diff --git a/client/neon-0.27.2/doc/html/refiaddr.html b/client/neon-0.27.2/doc/html/refiaddr.html deleted file mode 100644 index 18321a263..000000000 --- a/client/neon-0.27.2/doc/html/refiaddr.html +++ /dev/null @@ -1,37 +0,0 @@ -ne_iaddr_make

Name

ne_iaddr_make, ne_iaddr_cmp, ne_iaddr_print, ne_iaddr_typeof, ne_iaddr_free — functions to manipulate and compare network addresses

Synopsis

#include <ne_socket.h>
-
-typedef enum {
-    ne_iaddr_ipv4 = 0,
-    ne_iaddr_ipv6
-} ne_iaddr_type;
ne_inet_addr *ne_iaddr_make(ne_iaddr_type  type,
 const unsigned char * raw);
int ne_iaddr_cmp(const ne_inet_addr * ia1,
 const ne_inet_addr * ia2);
char *ne_iaddr_print(const ne_inet_addr * ia,
 char * buffer,
 size_t  bufsiz);
ne_iaddr_type ne_iaddr_typeof(const ne_inet_addr * ia);
void ne_iaddr_free(const ne_inet_addr * ia);

Description

ne_iaddr_make creates an - ne_inet_addr object from a raw binary network - address; for instance the four bytes 0x7f 0x00 0x00 - 0x01 represent the IPv4 address - 127.0.0.1. The object returned is suitable for - passing to ne_sock_connect. A binary IPv4 - address contains four bytes; a binary IPv6 address contains - sixteen bytes; addresses passed must be in network byte - order.

ne_iaddr_cmp can be used to compare two - network addresses; returning zero only if they are identical. The - addresses need not be of the same address type; if the addresses - are not of the same type, the return value is guaranteed to be - non-zero.

ne_iaddr_print can be used to print the - human-readable string representation of a network address into a - buffer, for instance the string - "127.0.0.1".

ne_iaddr_typeof returns the type of the - given network address.

ne_iaddr_free releases the memory - associated with a network address object.

Return value

ne_iaddr_make returns NULL if the - address type passed is not supported (for instance on a platform - which does not support IPv6).

ne_iaddr_print returns the - buffer pointer, and never NULL.

Examples

The following example connects a socket to port 80 at the - address 127.0.0.1.

unsigned char addr[] = "\0x7f\0x00\0x00\0x01";
-ne_inet_addr *ia;
-
-ia = ne_iaddr_make(ne_iaddr_ipv4, addr);
-if (ia != NULL) {
-    ne_socket *sock = ne_sock_connect(ia, 80);
-    ne_iaddr_free(ia);
-    /* ... */
-} else {
-    /* ... */
-}
diff --git a/client/neon-0.27.2/doc/html/refneon.html b/client/neon-0.27.2/doc/html/refneon.html deleted file mode 100644 index ac1d4c6b3..000000000 --- a/client/neon-0.27.2/doc/html/refneon.html +++ /dev/null @@ -1,92 +0,0 @@ -neon

Name

neon — HTTP and WebDAV client library

Description

neon is an HTTP and WebDAV client library. The major - abstractions exposed are the HTTP session, - created by ne_session_create; and the HTTP - request, created by ne_request_create. HTTP authentication is handled - transparently for server and proxy servers, see ne_set_server_auth; complete SSL/TLS support is also - included, see ne_ssl_set_verify.

Conventions

Some conventions are used throughout the neon API, to - provide a consistent and simple interface; these are documented - below.

Thread-safeness and global initialization

neon itself is implemented to be thread-safe (avoiding any - use of global state), but relies on the operating system providing - a thread-safe resolver interface. Modern operating systems offer - the thread-safe getaddrinfo interface, which - neon supports; some others implement - gethostbyname using thread-local - storage.

To allow thread-safe use of SSL in the OpenSSL and GnuTLS - libraries neon must be configured using the - --enable-threadsafe-ssl; if this is done, - locking callbacks will be registered by ne_sock_init; note that care must be exercised if - neon is used in conjunction with another library which uses - OpenSSL or GnuTLS.

Some platforms and libraries used by neon require global - initialization before use; notably: - -

  • The SIGPIPE signal - disposition must be set to - ignored.
  • OpenSSL requires global initialization to - load shared lookup tables.
  • The SOCKS library requires initialization - before use.
  • The Win32 socket library requires - initialization before use.

- - The ne_sock_init function should be called - before any other use of neon to perform any necessary - initialization needed for the particular platform.

For some applications it may be necessary to call ne_i18n_init to initialize the internationalization - support in neon.

Functions using global state

Any function call in neon may modify the - errno global variable as a side-effect. Except - where explicitly documented, the value of errno - is unspecified after any neon function call.

Other than in the use of errno, the only - functions which use or modify process-global state in neon are - as follows: - -

Namespaces

To avoid possible collisions between names used for symbols - and preprocessor macros by an application and the libraries it - uses, it is good practice for each library to reserve a particular - namespace prefix. An application which - ensures it uses no names with these prefixes is then guaranteed to - avoid such collisions.

The neon library reserves the use of the namespace - prefixes ne_ and NE_. The - libraries used by neon may also reserve certain namespaces; - collisions between these libraries and a neon-based application - will not be detected at compile time, since the underlying library - interfaces are not exposed through the neon header files. Such - collisions can only be detected at link time, when the linker - attempts to resolve symbols. The following list documents some of - the namespaces claimed by libraries used by neon; this list may - be incomplete.

SSL, ssl, TLS, tls, ERR_, BIO_, d2i_, i2d_, ASN1_Some of the many prefixes used by the OpenSSL - library; little attempt has been made to keep exported symbols - within any particular prefixes for this - library.
gnutls_, gcry_, gpg_Namespaces used by the GnuTLS library (and - dependencies thereof)
XML_, Xml[A-Z]Namespaces - used by the expat library.
xml[A-Z], html[A-Z], docb[A-Z]Namespaces used by the libxml2 library; a - relatively small number of symbols are used without these - prefixes.
inflate, deflate, crc32, compress, uncompres, adler32, - zlibNamespaces used by the zlib library; a - relatively small number of symbols are used without these - prefixes.
krb5, gss, GSS, asn1, decode_krb5, encode_krb5, profile, - mitSome of the prefixes used by the MIT GSSAPI - library and dependencies thereof; a number of symbols lie - outside these prefixes.

Argument validation

neon does not attempt to validate that the parameters - passed to functions conform to the API (for instance, checking - that pointer arguments are not NULL). Any use of the neon API - which is not documented to produce a certain behaviour results is - said to produce undefined behaviour; it is - likely that neon will segfault under these conditions.

URI paths, WebDAV metadata

The path strings passed to any function must be - URI-encoded by the application; neon never - performs any URI encoding or decoding internally. WebDAV property - names and values must be valid UTF-8 encoded Unicode - strings.

User interaction

As a pure library interface, neon will never produce - output on stdout or - stderr; all user interaction is the - responsibilty of the application.

Memory handling

neon does not attempt to cope gracefully with an - out-of-memory situation; instead, by default, the - abort function is called to immediately - terminate the process. An application may register a custom - function which will be called before abort in - such a situation; see ne_oom_callback.

Callbacks and userdata

Whenever a callback is registered, a - userdata pointer is also used to allow the - application to associate a context with the callback. The - userdata is of type void *, allowing any pointer to - be used.

diff --git a/client/neon-0.27.2/doc/html/refopts.html b/client/neon-0.27.2/doc/html/refopts.html deleted file mode 100644 index e82cf8dbc..000000000 --- a/client/neon-0.27.2/doc/html/refopts.html +++ /dev/null @@ -1,28 +0,0 @@ -ne_set_useragent

Name

ne_set_useragent, ne_set_persist, ne_set_read_timeout, ne_get_scheme, ne_get_server_hostport — common properties for HTTP sessions

Synopsis

#include <ne_session.h>
void ne_set_useragent(ne_session * session,
 const char * product);
void ne_set_persist(ne_session * session,
 int  flag);
void ne_set_read_timeout(ne_session * session,
 int  timeout);
const char *ne_get_scheme(ne_sesssion * session);
const char *ne_get_server_hostport(ne_sesssion * session);

Description

The User-Agent request header is used -to identify the software which generated the request for statistical -or debugging purposes. neon does not send a -User-Agent header unless a call is made to the -ne_set_useragent. -ne_set_useragent must be passed a product string -conforming to RFC2616's product token grammar; of the form -"Product/Version".

By default neon will use a persistent connection -whenever possible. For specific applications, or for debugging -purposes, it is sometimes useful to disable persistent connections. -The ne_set_persist function will disable -persistent connections if passed a flag -parameter of 0, and will enable them -otherwise.

When neon reads from a socket, by default the read -operation will time out after 60 seconds, and the request will fail -giving an NE_TIMEOUT error. To configure this -timeout interval, call ne_set_read_timeout giving -the desired number of seconds as the timeout -parameter.

The scheme used to initially create the session will be - returned by ne_get_scheme.

The hostport pair with which the session is associated - will be returned by the - ne_get_server_hostport; for example - www.example.com:8080. Note that the - :port will be omitted if the default port - for the scheme is used.

Examples

Set a user-agent string:

ne_session *sess = ne_session_create(...);
-ne_set_useragent(sess, "MyApplication/2.1");

Disable use of persistent connections:

ne_session *sess = ne_session_create(...);
-ne_set_persist(sess, 0);

Set a 30 second read timeout:

ne_session *sess = ne_session_create(...);
-ne_set_read_timeout(sess, 30);
diff --git a/client/neon-0.27.2/doc/html/refreq.html b/client/neon-0.27.2/doc/html/refreq.html deleted file mode 100644 index ef7f37622..000000000 --- a/client/neon-0.27.2/doc/html/refreq.html +++ /dev/null @@ -1,42 +0,0 @@ -ne_request_create

Name

ne_request_create, ne_request_dispatch, ne_request_destroy — low-level HTTP request handling

Synopsis

#include <ne_request.h>
ne_request *ne_request_create(ne_session * session,
 const char * method,
 const char * path);
int ne_request_dispatch(ne_request * req);
void ne_request_destroy(ne_request * req);

Description

An HTTP request, represented by the -ne_request type, specifies that some operation is to be -performed on some resource. The -ne_request_create function creates a request -object, specifying the operation in the method -parameter. The location of the resource is determined by the server in -use for the session given by the sess -parameter, combined with the path parameter.

The path string used must conform to the -abs_path definition given in RFC2396, with an -optional "?query" part, and must be URI-escaped by the caller (for -instance, using ne_path_escape). If the string -comes from an untrusted source, failure to perform URI-escaping -results in a security vulnerability.

To dispatch a request, and process the response, the -ne_request_dispatch function can be used. An -alternative is to use the (more complex, but more flexible) -combination of the ne_begin_request, -ne_end_request, and -ne_read_response_block functions; see -ne_begin_request.

To add extra headers in the request, the functions ne_add_request_header and ne_print_request_header can be used. To include a message -body with the request, one of the functions -ne_set_request_body_buffer, ne_set_request_body_fd, or -ne_set_request_body_provider can be used.

The return value of -ne_request_dispatch indicates merely whether the -request was sent and the response read successfully. To discover the -result of the operation, ne_get_status, along with -any processing of the response headers and message body.

A request can only be dispatched once: calling -ne_request_dispatch more than once on a single -ne_request object produces undefined behaviour. Once all -processing associated with the request object is complete, use the -ne_request_destroy function to destroy the -resources associated with it. Any subsequent use of the request -object produces undefined behaviour.

Return value

The ne_request_create function -returns a pointer to a request object (and never NULL).

The ne_request_dispatch function -returns zero if the request was dispatched successfully, and a -non-zero error code otherwise.

Errors

NE_ERRORRequest failed (see session error string)
NE_LOOKUPThe DNS lookup for the server (or proxy server) failed.
NE_AUTHAuthentication failed on the server.
NE_PROXYAUTHAuthentication failed on the proxy server.
NE_CONNECTA connection to the server could not be established.
NE_TIMEOUTA timeout occurred while waiting for the server to respond.

Example

An example of applying a MKCOL - operation to the resource at the location - http://www.example.com/foo/bar/:

ne_session *sess = ne_session_create("http", "www.example.com", 80);
-ne_request *req = ne_request_create(sess, "MKCOL", "/foo/bar/");
-if (ne_request_dispatch(req)) {
-   printf("Request failed: %s\n", ne_get_error(sess));
-}
-ne_request_destroy(req);
diff --git a/client/neon-0.27.2/doc/html/refreqbody.html b/client/neon-0.27.2/doc/html/refreqbody.html deleted file mode 100644 index c6a355291..000000000 --- a/client/neon-0.27.2/doc/html/refreqbody.html +++ /dev/null @@ -1,28 +0,0 @@ -ne_set_request_body_buffer

Name

ne_set_request_body_buffer, ne_set_request_body_fd, ne_set_request_body_fd64 — include a message body with a request

Synopsis

#include <ne_request.h>
void ne_set_request_body_buffer(ne_request * req,
 const char * buf,
 size_t  count);
int ne_set_request_body_fd(ne_request * req,
 int  fd,
 off_t  begin,
 off_t  length);
int ne_set_request_body_fd64(ne_request * req,
 int  fd,
 off64_t  begin,
 off64_t  length);

Description

The ne_set_request_body_buffer -function specifies that a message body should be included with the -body, which is stored in the count bytes buffer -buf.

The ne_set_request_body_fd function -can be used to include a message body with a request which is read -from a file descriptor. The body is read from the file descriptor -fd, which must be a associated with a seekable -file (not a pipe, socket, or FIFO). count -bytes are read, beginning at offset begin -(hence, passing begin as zero means the body is read -from the beginning of the file).

If the NE_LFS macro is defined, then - the ne_set_request_body_fd64 function is - also available, to provide large file support. This function - can be used on 32-bit platforms supporting the LFS standard; - the offset and - length parameters can then be passed as - 64-bit values. When using large files, - fd must be opened using - open64 or by passing the - O_LARGEFILE flag to - open.

For all the above functions, the source of the request - body must survive until the request has been dispatched; - neither the memory buffer passed to - ne_set_request_body_buffer nor the file - descriptor passed to - ne_set_request_body_fd or - ne_set_request_body_fd64 are copied - internally.

diff --git a/client/neon-0.27.2/doc/html/refreqhdr.html b/client/neon-0.27.2/doc/html/refreqhdr.html deleted file mode 100644 index 9ee6ab790..000000000 --- a/client/neon-0.27.2/doc/html/refreqhdr.html +++ /dev/null @@ -1,8 +0,0 @@ -ne_add_request_header

Name

ne_add_request_header, ne_print_request_header — add headers to a request

Synopsis

#include <ne_request.h>
void ne_add_request_header(ne_request * request,
 const char * name,
 const char * value);
void ne_print_request_header(ne_request * request,
 const char * name,
 const char * format,
  );

Description

The functions ne_add_request_header -and ne_print_request_header can be used to add -headers to a request, before it is sent.

ne_add_request_header simply adds a -header of given name, with given -value.

ne_print_request_header adds a -header of given name, taking the value from the -printf-like format string -parameter and subsequent variable-length argument list.

diff --git a/client/neon-0.27.2/doc/html/refreqopts.html b/client/neon-0.27.2/doc/html/refreqopts.html deleted file mode 100644 index 27904aa4f..000000000 --- a/client/neon-0.27.2/doc/html/refreqopts.html +++ /dev/null @@ -1,16 +0,0 @@ -ne_set_request_expect100

Name

ne_set_request_expect100 — function to enable Expect: 100-continue support

Synopsis

#include <ne_request.h>
void ne_set_request_expect100(ne_request * request,
 int  flag);

Description

An extension introduced in the HTTP/1.1 specification was - the use of the Expect: 100-continue header. - This header allows an HTTP client to be informed of the expected - response status before the request message body is sent: a useful - optimisation for situations where a large message body is to be - sent. The ne_set_request_expect100 function - can be used to enable this feature by passing the - flag parameter as any non-zero - integer.

Warning

Unfortunately, if this header is sent to a server - which is not fully compliant with the HTTP/1.1 specification, a - deadlock occurs resulting in a temporarily "hung" connection. - neon will recover gracefully from this situation, but only after a - 15 second timeout. It is highly recommended that this option is - not enabled unless it is known that the server in use correctly - implements Expect: 100-continue - support.

diff --git a/client/neon-0.27.2/doc/html/refresolve.html b/client/neon-0.27.2/doc/html/refresolve.html deleted file mode 100644 index a816b0f27..000000000 --- a/client/neon-0.27.2/doc/html/refresolve.html +++ /dev/null @@ -1,48 +0,0 @@ -ne_addr_resolve

Name

ne_addr_resolve, ne_addr_result, ne_addr_first, ne_addr_next, ne_addr_error, ne_addr_destroy — functions to resolve hostnames to addresses

Synopsis

#include <ne_socket.h>
ne_sock_addr *ne_addr_resolve(const char * hostname,
 int  flags);
int ne_addr_result(const ne_sock_addr * addr);
const ne_inet_addr *ne_addr_first(ne_sock_addr * addr);
const ne_inet_addr *ne_addr_next(ne_sock_addr * addr);
char *ne_addr_error(const ne_sock_addr * addr,
 char * buffer,
 size_t  bufsiz);
void ne_addr_destroy(ne_sock_addr * addr);

Description

The ne_addr_resolve function resolves - the given hostname, returning an - ne_sock_addr object representing the address (or - addresses) associated with the hostname. The - flags parameter is currently unused, and - must be passed as 0.

The hostname passed to - ne_addr_resolve can be a DNS hostname - (e.g. "www.example.com") or an IPv4 dotted quad - (e.g. "192.0.34.72"); or, on systems which - support IPv6, an IPv6 hex address, which may be enclosed in - brackets, e.g. "[::1]".

To determine whether the hostname was successfully resolved, - the ne_addr_result function is used, which - returns non-zero if an error occurred. If an error did occur, the - ne_addr_error function can be used, which - will copy the error string into a given - buffer (of size - bufsiz).

The functions ne_addr_first and - ne_addr_next are used to retrieve the - Internet addresses associated with an address object which has - been successfully resolved. ne_addr_first - returns the first address; ne_addr_next - returns the next address after the most recent call to - ne_addr_next or - ne_addr_first, or NULL if there are no more - addresses. The ne_inet_addr pointer returned by - these functions can be passed to - ne_sock_connect to connect a socket.

After the address object has been used, it should be - destroyed using ne_addr_destroy.

Return value

ne_addr_resolve returns a pointer to an - address object, and never NULL. - ne_addr_error returns the - buffer parameter .

Examples

The code below prints out the set of addresses associated - with the hostname www.google.com.

ne_sock_addr *addr;
-char buf[256];
-
-addr = ne_addr_resolve("www.google.com", 0);
-if (ne_addr_result(addr)) {
-    printf("Could not resolve www.google.com: %s\n",
-           ne_addr_error(addr, buf, sizeof buf));
-} else {
-    const ne_inet_addr *ia;
-    printf("www.google.com:");
-    for (ia = ne_addr_first(addr); ia != NULL; ia = ne_addr_next(addr)) {
-        printf(" %s", ne_iaddr_print(ia, buf, sizeof buf));
-    }
-    putchar('\n');
-}
-ne_addr_destroy(addr);
-
diff --git a/client/neon-0.27.2/doc/html/refresphdr.html b/client/neon-0.27.2/doc/html/refresphdr.html deleted file mode 100644 index bd6d03835..000000000 --- a/client/neon-0.27.2/doc/html/refresphdr.html +++ /dev/null @@ -1,26 +0,0 @@ -ne_get_response_header

Name

ne_get_response_header, ne_response_header_iterate — functions to access response headers

Synopsis

#include <ne_request.h>
const char *ne_get_response_header(ne_request * request,
 const char * name);
void *ne_response_header_iterate(ne_request * request,
 void * cursor,
 const char ** name,
 const char ** value);

Description

To retrieve the value of a response header field, the - ne_get_response_header function can be used, - and is given the name of the header to return.

To iterate over all the response headers returned, the - ne_response_header_iterate function can be - used. This function takes a cursor - parameter which should be NULL to retrieve the first header. The - function stores the name and value of the next header header in - the name and value - parameters, and returns a new cursor pointer which can be passed - to ne_response_header_iterate to retrieve the - next header.

Return value

ne_get_response_header returns a - string, or NULL if no header with that name was given. If used - during request processing, the return value pointer is valid only - until the next call to ne_begin_request, or - else, until the request object is destroyed.

Likewise, the cursor, names, and values returned by - ne_response_header_iterate are only valid - until the next call to ne_begin_request or - until the request object is destroyed.

Examples

The following code will output the value of the - Last-Modified header for a resource:

ne_request *req = ne_request_create(sess, "GET", "/foo.txt");
-if (ne_request_dispatch(req) == NE_OK) {
-    const char *mtime = ne_get_response_header(req, "Last-Modified");
-    if (mtime) {
-        printf("/foo.txt has last-modified value %s\n", mtime);
-    }
-}
-ne_request_destroy(req);
diff --git a/client/neon-0.27.2/doc/html/refsess.html b/client/neon-0.27.2/doc/html/refsess.html deleted file mode 100644 index 000179b3b..000000000 --- a/client/neon-0.27.2/doc/html/refsess.html +++ /dev/null @@ -1,35 +0,0 @@ -ne_session_create

Name

ne_session_create, ne_close_connection, ne_session_proxy, ne_session_destroy — set up HTTP sessions

Synopsis

#include <ne_session.h>
ne_session *ne_session_create(const char * scheme,
 const char * hostname,
 unsigned int  port);
void ne_session_proxy(ne_session * session,
 const char * hostname,
 unsigned int  port);
void ne_close_connection(ne_session * session);
void ne_session_destroy(ne_session * session);

Description

An ne_session object represents an HTTP -session - a logical grouping of a sequence of HTTP requests made to a -certain server. Any requests made using the session can use a -persistent connection, share cached authentication credentials and any -other common attributes.

A new HTTP session is created using -ne_session_create, giving the -hostname and port of the -server to use, along with the scheme used to -contact the server (usually "http"). Before the -first use of ne_session_create in a process, -ne_sock_init must have been called to perform any -global initialization needed by any libraries used by neon.

To enable SSL/TLS for the session, pass the string -"https" as the scheme -parameter, and either register a certificate verification function -(see ne_ssl_set_verify) or trust the appropriate -certificate (see ne_ssl_trust_cert, ne_ssl_trust_default_ca).

If an HTTP proxy server should be used for the session, -ne_session_proxy must be called giving the -hostname and port on which to contact the proxy.

If it is known that the session will not be used for a -significant period of time, ne_close_connection -can be called to close the connection, if one remains open. Use of -this function is entirely optional, but it must not be called if there -is a request active using the session.

Once a session has been completed, -ne_session_destroy must be called to destroy the -resources associated with the session. Any subsequent use of the -session pointer produces undefined behaviour.

Notes

The hostname passed to -ne_session_create is resolved when the first -request using the session is dispatched; a DNS resolution failure can -only be detected at that time (using the NE_LOOKUP -error code); see ne_request_dispatch for -details.

Return Values

ne_session_create will return - a pointer to a new session object (and never NULL).

Examples

Create and destroy a session:

ne_session *sess;
-sess = ne_session_create("http", "host.example.com", 80);
-/* ... use sess ... */
-ne_session_destroy(sess);
-
diff --git a/client/neon-0.27.2/doc/html/refshave.html b/client/neon-0.27.2/doc/html/refshave.html deleted file mode 100644 index 49d716fa1..000000000 --- a/client/neon-0.27.2/doc/html/refshave.html +++ /dev/null @@ -1,7 +0,0 @@ -ne_shave

Name

ne_shave — trim whitespace from a string

Synopsis

#include <ne_string.h>
char *ne_shave(char * str,
 const char * whitespace);

Description

ne_shave returns a portion of -str with any leading or trailing characters in -the whitespace array removed. -str may be modified. Note that the return -value may not be equal to str.

Examples

The following code segment will output - "fish":

char s[] = ".!.fish!.!";
-puts(ne_shave(s, ".!"));
diff --git a/client/neon-0.27.2/doc/html/refsockinit.html b/client/neon-0.27.2/doc/html/refsockinit.html deleted file mode 100644 index 99c20015e..000000000 --- a/client/neon-0.27.2/doc/html/refsockinit.html +++ /dev/null @@ -1,51 +0,0 @@ -ne_sock_init

Name

ne_sock_init, ne_sock_exit — perform library initialization

Synopsis

#include <ne_socket.h>
int ne_sock_init(void); 
void ne_sock_exit(void); 

Description

In some platforms and configurations, neon may be using - some socket or SSL libraries which require global initialization - before use. To perform this initialization, the - ne_sock_init function must be called before - any other library functions are used.

Once all use of neon is complete, - ne_sock_exit can be called to perform - de-initialization of socket or SSL libraries, if necessary. Uses - of ne_sock_init and - ne_sock_exit are "reference counted"; if N - calls to ne_sock_init are made, only the Nth - call to ne_sock_exit will have effect.

ne_sock_init will set the disposition - of the SIGPIPE signal to - ignored. No change is made to the - SIGPIPE disposition by - ne_sock_exit.

Both the SSL libraries supported by neon — OpenSSL - and GnuTLS — require callbacks to be registered to allow - thread-safe use of SSL. These callbacks are stored as global - variables and so their state persists for as long as the library - in question is loaded into the process. If multiple users of the - SSL library exist within the process, this can be problematic, - particularly if one is dynamically loaded (and may subsequently be - unloaded).

If neon is configured using the - --enable-threadsafe-ssl flag, thread-safe SSL - support will be enabled automatically, as covered in the following - section. Otherwise, it is not safe to use neon with SSL in a - multi-threaded process. The ne_has_support - function can be used to determine whether neon is built to - enable thread-safety support in the SSL library.

Thread-safe SSL with OpenSSL

neon follows two simple rules when dealing with the - OpenSSL locking callbacks: - -

  • ne_sock_init will set - thread-safety locking callbacks if and only if no locking - callbacks are already registered.
  • ne_sock_exit will - unset the thread-safety locking callbacks if and only if the - locking callbacks registered are those registered by - ne_sock_init.

- - Applications and libraries should be able to co-operate to - ensure that SSL use is always thread-safe if similar rules are - always followed.

Thread-safe SSL with GnuTLS

The cryptography library used by GnuTLS, libgcrypt, only - supports an initialization operation to register thread-safety - callbacks. ne_sock_init will register the - thread-safe locking callbacks on first use; - ne_sock_exit cannot unregister them. If - multiple users of GnuTLS are present within the process, it is - unsafe to dynamically unload neon from the process if neon - is configured with thread-safe SSL support enabled (since the - callbacks would be left pointing at unmapped memory once neon - is unloaded).

Return value

ne_sock_init returns zero on success, - or non-zero on error. If an error occurs, no further use of the - neon library should be attempted.

diff --git a/client/neon-0.27.2/doc/html/refsslca.html b/client/neon-0.27.2/doc/html/refsslca.html deleted file mode 100644 index a68c6b31b..000000000 --- a/client/neon-0.27.2/doc/html/refsslca.html +++ /dev/null @@ -1,15 +0,0 @@ -ne_ssl_trust_cert

Name

ne_ssl_trust_cert, ne_ssl_trust_default_ca — functions to indicate that certificates are trusted

Synopsis

#include <ne_session.h>
void ne_ssl_trust_cert(ne_session * session,
 const ne_ssl_certificate * cert);
void ne_ssl_trust_default_ca(ne_session * session);

Description

To indicate that a given certificate is trusted by the -user, the certificate object can be passed to -ne_ssl_trust_cert. The certificate object is -duplicated internally and can subsequently be destroyed.

The SSL library in use by neon may include a default -set of CA certificates; calling the -ne_ssl_trust_default_ca function will indicate -that these CAs are trusted by the user.

Examples

Load the CA certificate stored in /path/to/cacert.pem:

ne_session *sess = ne_session_create(...);
-ne_ssl_certificate *cert = ne_ssl_cert_read("/path/to/cacert.pem");
-
-if (cert) {
-   ne_ssl_trust_cert(sess, cert);
-   ne_ssl_cert_free(cert);
-} else {
-   printf("Could not load CA cert: %s\n", ne_get_error(sess));
-}
diff --git a/client/neon-0.27.2/doc/html/refsslcert2.html b/client/neon-0.27.2/doc/html/refsslcert2.html deleted file mode 100644 index b6fa1f050..000000000 --- a/client/neon-0.27.2/doc/html/refsslcert2.html +++ /dev/null @@ -1,5 +0,0 @@ -ne_ssl_cert_cmp

Name

ne_ssl_cert_cmp, ne_ssl_cert_free — functions to operate on certificate objects

Synopsis

#include <ne_header.h>
int ne_ssl_cert_cmp(const ne_ssl_certificate * c1,
 const ne_ssl_certificate * c2);
void ne_ssl_cert_free(ne_ssl_certificate * cert);

Description

The ne_ssl_cert_cmp function can be - used to compare two certificate objects; it returns zero if they - refer to the same certificate, and non-zero otherwise.

The ne_ssl_cert_free function can be - used to destroy a certificate object when it is no longer - needed.

diff --git a/client/neon-0.27.2/doc/html/refsslcertio.html b/client/neon-0.27.2/doc/html/refsslcertio.html deleted file mode 100644 index 19c224be0..000000000 --- a/client/neon-0.27.2/doc/html/refsslcertio.html +++ /dev/null @@ -1,24 +0,0 @@ -ne_ssl_cert_read

Name

ne_ssl_cert_read, ne_ssl_cert_write, ne_ssl_cert_import, ne_ssl_cert_export — functions to read or write certificates to and from files or strings

Synopsis

#include <ne_ssl.h>
ne_ssl_certificate *ne_ssl_cert_read(const char * filename);
int ne_ssl_cert_write(const ne_ssl_certificate * cert,
 const char * filename);
ne_ssl_certificate *ne_ssl_cert_import(const char * data);
char *ne_ssl_cert_export(const ne_ssl_certificate * cert);

Description

The ne_ssl_cert_write function writes a - certificate to a file using the PEM encoding. The - ne_ssl_cert_export function returns a - base64-encoded NUL-terminated string representing the - certificate. This string is malloc-allocated and should be - destroyed using free by the caller.

The ne_ssl_cert_read function reads a - certificate from a PEM-encoded file, and returns a certificate - object. The ne_ssl_cert_import function - returns a certificate object from a base64-encoded string, - data, as returned by - ne_ssl_cert_export. The certificate object - returned by these functions should be destroyed using ne_ssl_cert_free after use.

Return value

ne_ssl_cert_read returns NULL if a - certificate could not be read from the file. - ne_ssl_cert_write returns non-zero if the - certificate could not be written to the file. - ne_ssl_cert_export always returns a - NUL-terminated string, and never NULL. - ne_ssl_cert_import returns NULL if the - string was not a valid base64-encoded certificate.

Encoding Formats

The string produced by - ne_ssl_cert_export is the base64 encoding of - the DER representation of the certificate. The file written by - ne_ssl_cert_write uses the PEM format: this - is the base64 encoding of the DER representation with newlines - every 64 characters, and start and end marker lines.

diff --git a/client/neon-0.27.2/doc/html/refssldname.html b/client/neon-0.27.2/doc/html/refssldname.html deleted file mode 100644 index a64cf7320..000000000 --- a/client/neon-0.27.2/doc/html/refssldname.html +++ /dev/null @@ -1,9 +0,0 @@ -ne_ssl_dname

Name

ne_ssl_readable_dname, ne_ssl_dname_cmp — SSL distinguished name handling

Synopsis

#include <ne_ssl.h>
const char *ne_ssl_readable_dname(const ne_ssl_dname * dname);
int ne_ssl_dname_cmp(const ne_ssl_dname * dn1,
 const ne_ssl_dname * dn2);

Description

The ne_ssl_readable_dname function -creates a single-line, human-readable string out of an -ne_ssl_dname object. The returned string is -malloc()-allocated, and must be -free()d by the caller.

The ne_ssl_dname_cmp function - compares two distinguished names, and returns zero if they are - equal, or non-zero otherwise.

Return value

ne_ssl_readable_dname returns a malloc-allocated - string, and never NULL.

Examples

See ne_ssl_cert_subject for an example - use of ne_ssl_readable_dname.

diff --git a/client/neon-0.27.2/doc/html/refsslvfy.html b/client/neon-0.27.2/doc/html/refsslvfy.html deleted file mode 100644 index 82b082c8b..000000000 --- a/client/neon-0.27.2/doc/html/refsslvfy.html +++ /dev/null @@ -1,66 +0,0 @@ -ne_ssl_set_verify

Name

ne_ssl_set_verify — register an SSL certificate verification callback

Synopsis

#include <ne_session.h>
typedef int ne_ssl_verify_fn(void * userdata,
 int  failures,
 const ne_ssl_certificate * cert);
void ne_ssl_set_verify(ne_session * session,
 ne_ssl_verify_fn  verify_fn,
 void * userdata);

Description

To enable manual SSL certificate verification, a -callback can be registered using -ne_ssl_set_verify. If such a callback is not -registered, when a connection is established to an SSL server which -does not present a certificate signed by a trusted CA (see ne_ssl_trust_cert), or if the certificate presented is invalid in -some way, the connection will fail.

When the callback is invoked, the -failures parameter gives a bitmask indicating -in what way the automatic certificate verification failed. The value -is equal to the bit-wise OR of one or more of the following -constants (and is guaranteed to be non-zero):

NE_SSL_NOTYETVALIDThe certificate is not yet valid.
NE_SSL_EXPIREDThe certificate has expired.
NE_SSL_IDMISMATCHThe hostname used for the session does not match -the hostname to which the certificate was issued.
NE_SSL_UNTRUSTEDThe Certificate Authority which signed the certificate -is not trusted.

Note that if either of the - NE_SSL_IDMISMATCH or - NE_SSL_UNTRUSTED failures is given, the - connection may have been intercepted by a third party, and - must not be presumed to be “secure”.

The cert parameter passed to the -callback represents the certificate which was presented by the server. -If the server presented a chain of certificates, the chain can be -accessed using ne_ssl_cert_signedby. The -cert object given is not valid after the -callback returns.

Return value

The verification callback must return zero to indicate -that the certificate should be trusted; and non-zero otherwise (in -which case, the connection will fail).

Examples

The following code implements an example verification - callback, using the dump_cert function - from ne_ssl_cert_subject to display - certification information. Notice that the hostname of the - server used for the session is passed as the - userdata parameter to the - callback.

-static int
-my_verify(void *userdata, int failures, const ne_ssl_certificate *cert)
-{
-  const char *hostname = userdata;
-
-  dump_cert(cert);
-
-  puts("Certificate verification failed - the connection may have been "
-       "intercepted by a third party!");
-
-  if (failures & NE_SSL_IDMISMATCH) { 
-    const char *id = ne_ssl_cert_identity(cert);
-    if (id) 
-      printf("Server certificate was issued to '%s' not '%s'.\n",
-             id, hostname);
-    else
-      printf("The certificate was not issued for '%s'\n", hostname);
-  }
-
-  if (failures & NE_SSL_UNTRUSTED)
-    puts("The certificate is not signed by a trusted Certificate Authority.");
-
-  /* ... check for validity failures ... */
-
-  if (prompt_user())
-    return 1; /* fail verification */
-  else
-    return 0; /* trust the certificate anyway */
-}
-
-int
-main(...)
-{
-  ne_session *sess = ne_session_create("https", "some.host.name", 443);
-  ne_ssl_set_verify(sess, my_verify, "some.host.name");
-  ...
-}
diff --git a/client/neon-0.27.2/doc/html/refstatus.html b/client/neon-0.27.2/doc/html/refstatus.html deleted file mode 100644 index c40bdddfd..000000000 --- a/client/neon-0.27.2/doc/html/refstatus.html +++ /dev/null @@ -1,22 +0,0 @@ -ne_status

Name

ne_status — HTTP status structure

Synopsis

#include <ne_utils.h>
-
-typedef struct {
-    int major_version, minor_version;
-    int code, klass;
-    const char *reason_phrase;
-} ne_status;

Description

An ne_status type represents an HTTP -response status; used in response messages giving a result of request. -The major_version and -minor_version fields give the HTTP version -supported by the server issuing the response. The -code field gives the status code of the -result (lying between 100 and 999 inclusive), and the -klass field gives the -class[2], which is equal to the most significant digit -of the status.

There are five classes of HTTP status code defined by - RFC2616:

1xxInformational response.
2xxSuccess: the operation was successful
3xxRedirection
4xxClient - error: the request made was incorrect in some - manner.
5xxServer error

See also

ne_get_status.



[2] the field is named “klass” not -“class” so that the header can be used from a C++ -program, in which “class” is a reserved -word)

diff --git a/client/neon-0.27.2/doc/html/reftok.html b/client/neon-0.27.2/doc/html/reftok.html deleted file mode 100644 index 8a1d74322..000000000 --- a/client/neon-0.27.2/doc/html/reftok.html +++ /dev/null @@ -1,20 +0,0 @@ -ne_token

Name

ne_token, ne_qtoken — string tokenizers

Synopsis

#include <ne_string.h>
char *ne_token(char ** str,
 char  sep);
char *ne_qtoken(char ** str,
 char  sep,
 const char * quotes);

Description

ne_token and -ne_qtoken tokenize the string at the location -stored in the pointer str. Each time the -function is called, it returns the next token, and modifies the -str pointer to point to the remainer of the -string, or NULL if there are no more tokens in the string. A token -is delimited by the separator character sep; if -ne_qtoken is used any quoted segments of the -string are skipped when searching for a separator. A quoted segment -is enclosed in a pair of one of the characters given in the -quotes string.

The string being tokenized is modified each time -the tokenizing function is called; replacing the next separator -character with a NUL terminator.

Examples

The following function prints out each token in a -comma-separated string list, which is -modified in-place:

static void splitter(char *list)
-{
-  do {
-    printf("Token: %s\n", ne_token(&list, ','));
-  while (list);
-}
diff --git a/client/neon-0.27.2/doc/html/refvers.html b/client/neon-0.27.2/doc/html/refvers.html deleted file mode 100644 index 466dd5635..000000000 --- a/client/neon-0.27.2/doc/html/refvers.html +++ /dev/null @@ -1,11 +0,0 @@ -ne_version_match

Name

ne_version_match, ne_version_string — library versioning

Synopsis

#include <ne_utils.h>
int ne_version_match(int  major,
 int  minor);
const char *ne_version_string(void); 

Description

The ne_version_match function returns - non-zero if the library version is not of major version - major, or the minor version is less than - minor. For neon versions 0.x, every - minor version is assumed to be incompatible with every other minor - version.

The ne_version_string function returns - a string giving the library version.

Examples

To require neon 1.x, version 1.2 or later:

if (ne_version_match(1, 2)) {
-    printf("Library version out of date: 1.2 required, found %s.",
-           ne_version_string());
-    exit(1);
-}
diff --git a/client/neon-0.27.2/doc/html/refxml.html b/client/neon-0.27.2/doc/html/refxml.html deleted file mode 100644 index 5fb00301c..000000000 --- a/client/neon-0.27.2/doc/html/refxml.html +++ /dev/null @@ -1,4 +0,0 @@ -ne_xml_create

Name

ne_xml_create, ne_xml_destroy — create and destroy an XML parser

Synopsis

#include <ne_xml.h>
ne_xml_parser *ne_xml_create(void); 
void ne_xml_destroy(ne_xml_parser * parser);

Description

The ne_xml_create function creates an - XML parser object, which can be used for parsing XML documents - using stacked SAX handlers.

Return value

ne_xml_create returns a pointer to an - XML parser object, and never NULL

See also

XXX

diff --git a/client/neon-0.27.2/doc/html/using.html b/client/neon-0.27.2/doc/html/using.html deleted file mode 100644 index 086a85eeb..000000000 --- a/client/neon-0.27.2/doc/html/using.html +++ /dev/null @@ -1,40 +0,0 @@ -How to use neon from your application

How to use neon from your application

This section describes how to add neon support to an - application. If you just want to quickly try out neon, use - the neon-config script.

The neon source code is designed to be easily embedded - into an application source tree. neon has no dependencies on - libraries other than an SSL toolkit and XML parser, though the - source tree can be configured to have no support for SSL or XML - if desired. To configure the neon source code some GNU autoconf - macros are supplied, which can be used in a number of ways, as - follows:

  • autoconf macros are distributed in the 'macros' - subdirectory of the neon distribution. Use the NEON_LIBRARY - macro from your configure.in to check for the presence of - the neon library installed on the system. The macro adds an - '--with-neon=...' argument to configure, which allows the - user to specify a location for the library (the standard - /usr and /usr/local directories are checked automatically - without having to be specified).

  • The 'src' directory of the neon package can be - imported directly into your application, if you do not wish - to add an external dependency. If you wish to bundle, use - the NEON_BUNDLED macro to configure neon in your application: - here, the neon sources are bundled in a directory called - 'libneon':

    NEON_BUNDLED(libneon, ...)

    If your application supports builds where srcdir != builddir, - you should use the NEON_VPATH_BUNDLED macro like this:

    NEON_VPATH_BUNDLED(${srcdir}/libneon, libneon, ...)

    If you use this macro, a '--with-included-neon' option - will be added to the generated configure script. This - allows the user to force the bundled neon to be used in the - application, rather than any neon library found on the - system. If you allow neon to be configured this way, you - must also configure an XML parser. Use the NEON_XML_PARSER - macro to do this.

  • The final argument to the _BUNDLED macros is a - set of actions which are executed if the bundled build *is* - chosen (rather than an external neon which might have been - found on the user's system). In here, use either the - NEON_LIBTOOL_BUILD or NEON_NORMAL_BUILD macro to set up the - neon Makefile appropriately: including adding the neon source - directory to the recursive make.

A full fragment might be:

NEON_BUNDLED(libneon, [
-  NEON_NORMAL_BUILD
-  NEON_XML_PARSER
-  SUBDIRS="libneon $SUBDIRS"
-])

This means the bundled neon source directory (called 'libneon') - is used if no neon is found on the system, and the standard XML - parser search is used.

diff --git a/client/neon-0.27.2/doc/html/xml.html b/client/neon-0.27.2/doc/html/xml.html deleted file mode 100644 index 00d0cfa11..000000000 --- a/client/neon-0.27.2/doc/html/xml.html +++ /dev/null @@ -1,90 +0,0 @@ -Parsing XML

Parsing XML

The neon XML interface is exposed by the - ne_xml.h header file. This interface gives a - wrapper around the standard SAX API used by XML - parsers, with an additional abstraction, stacked SAX - handlers, and also giving consistent XML Namespace support.

Introduction to SAX

A SAX-based parser works by emitting a sequence of - events to reflect the tokens being parsed - from the XML document. For example, parsing the following document - fragment: - -

-<hello>world</hello>
-

- - results in the following events: - -

  1. start-element "hello"
  2. character-data "world"
  3. end-element "hello"

- - This example demonstrates the three event types used used in the - subset of SAX exposed by the neon XML interface: start-element, - character-data and end-element. In a C API, an “event” is - implemented as a function callback; three callback types are used in - neon, one for each type of event.

Stacked SAX handlers

WebDAV property values are represented as fragments of XML, - transmitted as parts of larger XML documents over HTTP (notably in - the body of the response to a PROPFIND request). - When neon parses such documents, the SAX events generated for - these property value fragments may need to be handled by the - application, since neon has no knowledge of the structure of - properties used by the application.

To solve this problem[1] the neon XML interface introduces - the concept of a SAX handler. A SAX handler - comprises a start-element, character-data and end-element callback; the - start-element callback being defined such that each handler may - accept or decline the - start-element event. Handlers are composed into a handler - stack before parsing a document. When a new start-element - event is generated by the XML parser, neon invokes each start-element - callback in the handler stack in turn until one accepts the event. - The handler which accepts the event will then be subsequently be - passed character-data events if the element contains character data, - followed by an end-element event when the element is closed. If no - handler in the stack accepts a start-element event, the branch of the - tree is ignored.

To illustrate, given a handler A, which accepts the - cat and age elements, and a - handler B, which accepts the name element, the - following document: - -

Example 2.1. An example XML document

-<cat>
-  <age>3</age>    
-  <name>Bob</name>
-</cat>
-


- - would be parsed as follows: - -

  1. A start-element "cat" → accept
  2. A start-element "age" → accept
  3. A character-data "3"
  4. A end-element "age"
  5. A start-element "name" → decline
  6. B start-element "name" → accept
  7. B character-data "Bob"
  8. B end-element "name"
  9. A end-element "cat"

The search for a handler which will accept a start-element event - begins at the handler of the parent element and continues toward the - top of the stack. For the root element, it begins at the base of - the stack. In the above example, handler A is at the base, and - handler B at the top; if the name element had any - children, only B's start-element would be invoked to accept - them.

Maintaining state

To facilitate communication between independent handlers, a - state integer is associated with each element - being parsed. This integer is returned by start-element callback and - is passed to the subsequent character-data and end-element callbacks - associated with the element. The state integer of the parent - element is also passed to each start-element callback, the value zero - used for the root element (which by definition has no - parent).

To further extend Example 2.1, “An example XML document”: if handler A - defines that the state of the root element cat - will be 42, the event trace would be as - follows: - -

  1. A start-element (parent = 0, "cat") → - accept, state = 42 -
  2. A start-element (parent = 42, "age") → - accept, state = 50 -
  3. A character-data (state = 50, "3")
  4. A end-element (state = 50, "age")
  5. A start-element (parent = 42, "name") → - decline
  6. B start-element (parent = 42, "name") → - accept, state = 99
  7. B character-data (state = 99, "Bob")
  8. B end-element (state = 99, "name")
  9. A end-element (state = 42, "cat")

To avoid collisions between state integers used by different - handlers, the interface definition of any handler includes the range - of integers it will use.

XML namespaces

To support XML namespaces, every element name is represented - as a (namespace, name) pair. The start-element - and end-element callbacks are passed namespace and name strings - accordingly. If an element in the XML document has no declared - namespace, the namespace given will be the empty string, - "".



[1] This - “problem” only needs solving because the SAX interface - is so inflexible when implemented as C function callbacks; a better - approach would be to use an XML parser interface which is not based - on callbacks.

diff --git a/client/neon-0.27.2/doc/man/ne_add_request_header.3 b/client/neon-0.27.2/doc/man/ne_add_request_header.3 deleted file mode 100644 index e06538811..000000000 --- a/client/neon-0.27.2/doc/man/ne_add_request_header.3 +++ /dev/null @@ -1,55 +0,0 @@ -.\" Title: ne_add_request_header -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_ADD_REQUEST_HEADE" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_add_request_header, ne_print_request_header \- add headers to a request -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 27 -.BI "void ne_add_request_header(ne_request\ *" "request" ", const\ char\ *" "name" ", const\ char\ *" "value" ");" -.HP 29 -.BI "void ne_print_request_header(ne_request\ *" "request" ", const\ char\ *" "name" ", const\ char\ *" "format" ", ...);" -.SH "DESCRIPTION" -.PP -The functions -\fBne_add_request_header\fR -and -\fBne_print_request_header\fR -can be used to add headers to a request, before it is sent. -.PP -\fBne_add_request_header\fR -simply adds a header of given -\fIname\fR, with given -\fIvalue\fR. -.PP -\fBne_print_request_header\fR -adds a header of given -\fIname\fR, taking the value from the -\fBprintf\fR\-like -\fIformat\fR -string parameter and subsequent variable\-length argument list. -.SH "SEE ALSO" -.PP -ne_request_create -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_addr_destroy.3 b/client/neon-0.27.2/doc/man/ne_addr_destroy.3 deleted file mode 100644 index ecf8e86bd..000000000 --- a/client/neon-0.27.2/doc/man/ne_addr_destroy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_addr_resolve.3 diff --git a/client/neon-0.27.2/doc/man/ne_addr_error.3 b/client/neon-0.27.2/doc/man/ne_addr_error.3 deleted file mode 100644 index ecf8e86bd..000000000 --- a/client/neon-0.27.2/doc/man/ne_addr_error.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_addr_resolve.3 diff --git a/client/neon-0.27.2/doc/man/ne_addr_first.3 b/client/neon-0.27.2/doc/man/ne_addr_first.3 deleted file mode 100644 index ecf8e86bd..000000000 --- a/client/neon-0.27.2/doc/man/ne_addr_first.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_addr_resolve.3 diff --git a/client/neon-0.27.2/doc/man/ne_addr_next.3 b/client/neon-0.27.2/doc/man/ne_addr_next.3 deleted file mode 100644 index ecf8e86bd..000000000 --- a/client/neon-0.27.2/doc/man/ne_addr_next.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_addr_resolve.3 diff --git a/client/neon-0.27.2/doc/man/ne_addr_resolve.3 b/client/neon-0.27.2/doc/man/ne_addr_resolve.3 deleted file mode 100644 index dbd007c99..000000000 --- a/client/neon-0.27.2/doc/man/ne_addr_resolve.3 +++ /dev/null @@ -1,128 +0,0 @@ -.\" Title: ne_addr_resolve -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_ADDR_RESOLVE" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_addr_resolve, ne_addr_result, ne_addr_first, ne_addr_next, ne_addr_error, ne_addr_destroy \- functions to resolve hostnames to addresses -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 30 -.BI "ne_sock_addr *ne_addr_resolve(const\ char\ *" "hostname" ", int\ " "flags" ");" -.HP 19 -.BI "int ne_addr_result(const\ ne_sock_addr\ *" "addr" ");" -.HP 34 -.BI "const ne_inet_addr *ne_addr_first(ne_sock_addr\ *" "addr" ");" -.HP 33 -.BI "const ne_inet_addr *ne_addr_next(ne_sock_addr\ *" "addr" ");" -.HP 20 -.BI "char *ne_addr_error(const\ ne_sock_addr\ *" "addr" ", char\ *" "buffer" ", size_t\ " "bufsiz" ");" -.HP 21 -.BI "void ne_addr_destroy(ne_sock_addr\ *" "addr" ");" -.SH "DESCRIPTION" -.PP -The -\fBne_addr_resolve\fR -function resolves the given -\fIhostname\fR, returning an -\fBne_sock_addr\fR -object representing the address (or addresses) associated with the hostname. The -\fIflags\fR -parameter is currently unused, and must be passed as 0. -.PP -The -\fIhostname\fR -passed to -\fBne_addr_resolve\fR -can be a DNS hostname (e.g. -"www.example.com") or an IPv4 dotted quad (e.g. -"192.0.34.72"); or, on systems which support IPv6, an IPv6 hex address, which may be enclosed in brackets, e.g. -"[::1]". -.PP -To determine whether the hostname was successfully resolved, the -\fBne_addr_result\fR -function is used, which returns non\-zero if an error occurred. If an error did occur, the -\fBne_addr_error\fR -function can be used, which will copy the error string into a given -\fIbuffer\fR -(of size -\fIbufsiz\fR). -.PP -The functions -\fBne_addr_first\fR -and -\fBne_addr_next\fR -are used to retrieve the Internet addresses associated with an address object which has been successfully resolved. -\fBne_addr_first\fR -returns the first address; -\fBne_addr_next\fR -returns the next address after the most recent call to -\fBne_addr_next\fR -or -\fBne_addr_first\fR, or -NULL -if there are no more addresses. The -\fBne_inet_addr\fR -pointer returned by these functions can be passed to -\fBne_sock_connect\fR -to connect a socket. -.PP -After the address object has been used, it should be destroyed using -\fBne_addr_destroy\fR. -.SH "RETURN VALUE" -.PP -\fBne_addr_resolve\fR -returns a pointer to an address object, and never -NULL. -\fBne_addr_error\fR -returns the -\fIbuffer\fR -parameter . -.SH "EXAMPLES" -.PP -The code below prints out the set of addresses associated with the hostname -www.google.com. -.sp -.RS 4 -.nf -ne_sock_addr *addr; -char buf[256]; - -addr = ne_addr_resolve("www.google.com", 0); -if (ne_addr_result(addr)) { - printf("Could not resolve www.google.com: %s\en", - ne_addr_error(addr, buf, sizeof buf)); -} else { - const ne_inet_addr *ia; - printf("www.google.com:"); - for (ia = ne_addr_first(addr); ia != NULL; ia = ne_addr_next(addr)) { - printf(" %s", ne_iaddr_print(ia, buf, sizeof buf)); - } - putchar('\en'); -} -ne_addr_destroy(addr); -.fi -.RE -.SH "SEE ALSO" -.PP -ne_iaddr_print -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_addr_result.3 b/client/neon-0.27.2/doc/man/ne_addr_result.3 deleted file mode 100644 index ecf8e86bd..000000000 --- a/client/neon-0.27.2/doc/man/ne_addr_result.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_addr_resolve.3 diff --git a/client/neon-0.27.2/doc/man/ne_buffer.3 b/client/neon-0.27.2/doc/man/ne_buffer.3 deleted file mode 100644 index d3dba7112..000000000 --- a/client/neon-0.27.2/doc/man/ne_buffer.3 +++ /dev/null @@ -1,68 +0,0 @@ -.\" Title: ne_buffer -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_BUFFER" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_buffer \- string buffer handling -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include - -typedef struct { - char *data; - size_t used; - size_t length; -} ne_buffer; -.fi -.ft -.SH "DESCRIPTION" -.PP -The -\fBne_buffer\fR -type represents an expandable memory buffer for holding -NUL\-terminated strings. The -data -field points to the beginnning of the string, the length of which is given by the -used -field. The current size of memory allocated is given by the -length -field. It is not recommended that the fields of a buffer are manipulated directly. The -data -pointer may change when the buffer is modified. -.PP -A buffer is created using -ne_buffer_create -or -ne_buffer_ncreate, and destroyed using -ne_buffer_destroy -or -ne_buffer_finish. The functions -ne_buffer_append, -ne_buffer_zappend -and -ne_buffer_concat -are used to append data to a buffer. -.PP -If the string referenced by the -data -pointer is modified directly (rather than using one of the functions listed above), -\fBne_buffer_altered\fR -must be called. -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_buffer_altered.3 b/client/neon-0.27.2/doc/man/ne_buffer_altered.3 deleted file mode 100644 index b0bbe5eaf..000000000 --- a/client/neon-0.27.2/doc/man/ne_buffer_altered.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_buffer_clear.3 diff --git a/client/neon-0.27.2/doc/man/ne_buffer_append.3 b/client/neon-0.27.2/doc/man/ne_buffer_append.3 deleted file mode 100644 index 5c9dbb003..000000000 --- a/client/neon-0.27.2/doc/man/ne_buffer_append.3 +++ /dev/null @@ -1,84 +0,0 @@ -.\" Title: ne_buffer_append -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_BUFFER_APPEND" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_buffer_append, ne_buffer_zappend, ne_buffer_concat \- append data to a string buffer -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 22 -.BI "void ne_buffer_append(ne_buffer\ *" "buf" ", const\ char\ *" "string" ", size_t\ " "len" ");" -.HP 23 -.BI "void ne_buffer_zappend(ne_buffer\ *" "buf" ", const\ char\ *" "string" ");" -.HP 22 -.BI "void ne_buffer_concat(ne_buffer\ *" "buf" ", const\ char\ *" "str" ", ...);" -.SH "DESCRIPTION" -.PP -The -\fBne_buffer_append\fR -and -\fBne_buffer_zappend\fR -functions append a string to the end of a buffer; extending the buffer as necessary. The -\fIlen\fR -passed to -\fBne_buffer_append\fR -specifies the length of the string to append; there must be no -NUL -terminator in the first -\fIlen\fR -bytes of the string. -\fBne_buffer_zappend\fR -must be passed a -NUL\-terminated string. -.PP -The -\fBne_buffer_concat\fR -function takes a variable\-length argument list following -\fIstr\fR; each argument must be a -\fBchar *\fR -pointer to a -NUL\-terminated string. A -NULL -pointer must be given as the last argument to mark the end of the list. The strings (including -\fIstr\fR) are appended to the buffer in the order given. None of the strings passed to -\fBne_buffer_concat\fR -are modified. -.SH "EXAMPLES" -.PP -The following code will output "Hello, world. And goodbye.". -.sp -.RS 4 -.nf -ne_buffer *buf = ne_buffer_create(); -ne_buffer_zappend(buf, "Hello"); -ne_buffer_concat(buf, ", world. ", "And ", "goodbye.", NULL); -puts(buf\->data); -ne_buffer_destroy(buf); -.fi -.RE -.SH "SEE ALSO" -.PP -ne_buffer, -ne_buffer_create, -ne_buffer_destroy -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_buffer_clear.3 b/client/neon-0.27.2/doc/man/ne_buffer_clear.3 deleted file mode 100644 index dbd803364..000000000 --- a/client/neon-0.27.2/doc/man/ne_buffer_clear.3 +++ /dev/null @@ -1,58 +0,0 @@ -.\" Title: ne_buffer_clear -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_BUFFER_CLEAR" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_buffer_clear, ne_buffer_grow, ne_buffer_altered \- general purpose of group of functions -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 21 -.BI "void ne_buffer_clear(ne_buffer\ *" "buf" ");" -.HP 23 -.BI "void ne_buffer_altered(ne_buffer\ *" "buf" ");" -.HP 20 -.BI "void ne_buffer_grow(ne_buffer\ *" "buf" ", size_t\ " "size" ");" -.SH "DESCRIPTION" -.PP -The -\fBne_buffer_clear\fR -function sets the string stored in -\fIbuf\fR -to be the empty string (""). -.PP -The -\fBne_buffer_altered\fR -function must be used after the string stored in the buffer -\fIbuf\fR -is modified by directly rather than using -ne_buffer_append, -ne_buffer_zappend -or -ne_buffer_concat. -.PP -The -\fBne_buffer_grow\fR -function ensures that at least -\fIsize\fR -bytes are allocated for the string; this can be used if a large amount of data is going to be appended to the buffer and may result in more efficient memory allocation. -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_buffer_concat.3 b/client/neon-0.27.2/doc/man/ne_buffer_concat.3 deleted file mode 100644 index d0f5b8f83..000000000 --- a/client/neon-0.27.2/doc/man/ne_buffer_concat.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_buffer_append.3 diff --git a/client/neon-0.27.2/doc/man/ne_buffer_create.3 b/client/neon-0.27.2/doc/man/ne_buffer_create.3 deleted file mode 100644 index 17bd05eb5..000000000 --- a/client/neon-0.27.2/doc/man/ne_buffer_create.3 +++ /dev/null @@ -1,50 +0,0 @@ -.\" Title: ne_buffer_create -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_BUFFER_CREATE" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_buffer_create, ne_buffer_ncreate \- general purpose of group of functions -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 28 -.BI "ne_buffer *ne_buffer_create(void);" -.HP 29 -.BI "ne_buffer *ne_buffer_ncreate(size_t\ " "size" ");" -.SH "DESCRIPTION" -.PP -\fBne_buffer_create\fR -creates a new buffer object, with an implementation\-defined initial size. -\fBne_buffer_ncreate\fR -creates an -\fBne_buffer\fR -where the minimum initial size is given in the -\fIsize\fR -parameter. The buffer created will contain the empty string (""). -.SH "RETURN VALUE" -.PP -Both functions return a pointer to a new buffer object, and never -NULL. -.SH "SEE ALSO" -.PP -ne_buffer -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_buffer_destroy.3 b/client/neon-0.27.2/doc/man/ne_buffer_destroy.3 deleted file mode 100644 index 73bd56bd3..000000000 --- a/client/neon-0.27.2/doc/man/ne_buffer_destroy.3 +++ /dev/null @@ -1,74 +0,0 @@ -.\" Title: ne_buffer_destroy -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_BUFFER_DESTROY" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_buffer_destroy, ne_buffer_finish \- destroy a buffer object -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 23 -.BI "void ne_buffer_destroy(ne_buffer\ *" "buf" ");" -.HP 23 -.BI "char *ne_buffer_finish(ne_buffer\ *" "buf" ");" -.SH "DESCRIPTION" -.PP -\fBne_buffer_destroy\fR -frees all memory associated with the buffer. -\fBne_buffer_finish\fR -frees the buffer structure, but not the actual string stored in the buffer, which is returned and must be -\fBfree\fR()d by the caller. -.PP -Any use of the buffer object after calling either of these functions gives undefined behaviour. -.SH "RETURN VALUE" -.PP -\fBne_buffer_finish\fR -returns the -\fBmalloc\fR\-allocated string stored in the buffer. -.SH "EXAMPLES" -.PP -An example use of -\fBne_buffer_finish\fR; the -\fBduplicate\fR -function returns a string made up of -\fIn\fR -copies of -\fIstr\fR: -.sp -.RS 4 -.nf -static char *duplicate(int n, const char *str) -{ - ne_buffer *buf = ne_buffer_create(); - while (n\-\-) { - ne_buffer_zappend(buf, str); - } - return ne_buffer_finish(buf); -} -.fi -.RE -.SH "SEE ALSO" -.PP -ne_buffer, -ne_buffer_create, -ne_buffer_zappend -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_buffer_finish.3 b/client/neon-0.27.2/doc/man/ne_buffer_finish.3 deleted file mode 100644 index 5aac296f9..000000000 --- a/client/neon-0.27.2/doc/man/ne_buffer_finish.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_buffer_destroy.3 diff --git a/client/neon-0.27.2/doc/man/ne_buffer_grow.3 b/client/neon-0.27.2/doc/man/ne_buffer_grow.3 deleted file mode 100644 index b0bbe5eaf..000000000 --- a/client/neon-0.27.2/doc/man/ne_buffer_grow.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_buffer_clear.3 diff --git a/client/neon-0.27.2/doc/man/ne_buffer_ncreate.3 b/client/neon-0.27.2/doc/man/ne_buffer_ncreate.3 deleted file mode 100644 index 628991b0d..000000000 --- a/client/neon-0.27.2/doc/man/ne_buffer_ncreate.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_buffer_create.3 diff --git a/client/neon-0.27.2/doc/man/ne_buffer_zappend.3 b/client/neon-0.27.2/doc/man/ne_buffer_zappend.3 deleted file mode 100644 index d0f5b8f83..000000000 --- a/client/neon-0.27.2/doc/man/ne_buffer_zappend.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_buffer_append.3 diff --git a/client/neon-0.27.2/doc/man/ne_calloc.3 b/client/neon-0.27.2/doc/man/ne_calloc.3 deleted file mode 100644 index 8564fc1af..000000000 --- a/client/neon-0.27.2/doc/man/ne_calloc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_malloc.3 diff --git a/client/neon-0.27.2/doc/man/ne_close_connection.3 b/client/neon-0.27.2/doc/man/ne_close_connection.3 deleted file mode 100644 index 2a71e062c..000000000 --- a/client/neon-0.27.2/doc/man/ne_close_connection.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_session_create.3 diff --git a/client/neon-0.27.2/doc/man/ne_forget_auth.3 b/client/neon-0.27.2/doc/man/ne_forget_auth.3 deleted file mode 100644 index a6f0398ad..000000000 --- a/client/neon-0.27.2/doc/man/ne_forget_auth.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_set_server_auth.3 diff --git a/client/neon-0.27.2/doc/man/ne_get_error.3 b/client/neon-0.27.2/doc/man/ne_get_error.3 deleted file mode 100644 index 4f65631f9..000000000 --- a/client/neon-0.27.2/doc/man/ne_get_error.3 +++ /dev/null @@ -1,76 +0,0 @@ -.\" Title: ne_get_error -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_GET_ERROR" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_get_error, ne_set_error \- error handling for HTTP sessions -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 25 -.BI "const char *ne_get_error(ne_sesssion\ *" "session" ");" -.HP 18 -.BI "void ne_set_error(ne_sesssion\ *" "session" ", const\ char\ *" "format" ", ...);" -.SH "DESCRIPTION" -.PP -The session error string is used to store any human\-readable error information associated with any errors which occur whilst using the HTTP session. -.PP -The -\fBne_get_error\fR -function returns the current session error string. This string persists only until it is changed by a subsequent operation on the session. If localisation was enabled at build time, and if necessary enabled at run\-time if necessary using -ne_i18n_init, the returned string may have been translated into the user's current locale. -.PP -The -\fBne_set_error\fR -function can be used to set a new session error string, using a -\fBprintf\fR\-style format string interface. -.SH "RETURN VALUE" -.PP -\fBne_set_error\fR -returns a constant -NUL\-terminated string. In the default English locale, the returned string will -\fInot\fR -have a terminating -\(lq.\(rq -period character. -.SH "EXAMPLES" -.PP -Retrieve the current error string: -.sp -.RS 4 -.nf -ne_session *sess = ne_session_create(...); -\&... -printf("Error was: %s\en", ne_get_error(sess)); -.fi -.RE -.PP -Set a new error string: -.sp -.RS 4 -.nf -ne_session *sess = ne_session_create(...); -\&... -ne_set_error(sess, "Response missing header %s", "somestring"); -.fi -.RE -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_get_response_header.3 b/client/neon-0.27.2/doc/man/ne_get_response_header.3 deleted file mode 100644 index 877e35a9b..000000000 --- a/client/neon-0.27.2/doc/man/ne_get_response_header.3 +++ /dev/null @@ -1,87 +0,0 @@ -.\" Title: ne_get_response_header -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_GET_RESPONSE_HEAD" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_get_response_header, ne_response_header_iterate \- functions to access response headers -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 35 -.BI "const char *ne_get_response_header(ne_request\ *" "request" ", const\ char\ *" "name" ");" -.HP 33 -.BI "void *ne_response_header_iterate(ne_request\ *" "request" ", void\ *" "cursor" ", const\ char\ **" "name" ", const\ char\ **" "value" ");" -.SH "DESCRIPTION" -.PP -To retrieve the value of a response header field, the -\fBne_get_response_header\fR -function can be used, and is given the name of the header to return. -.PP -To iterate over all the response headers returned, the -\fBne_response_header_iterate\fR -function can be used. This function takes a -\fIcursor\fR -parameter which should be -NULL -to retrieve the first header. The function stores the name and value of the next header header in the -\fIname\fR -and -\fIvalue\fR -parameters, and returns a new cursor pointer which can be passed to -\fBne_response_header_iterate\fR -to retrieve the next header. -.SH "RETURN VALUE" -.PP -\fBne_get_response_header\fR -returns a string, or -NULL -if no header with that name was given. If used during request processing, the return value pointer is valid only until the next call to -\fBne_begin_request\fR, or else, until the request object is destroyed. -.PP -Likewise, the cursor, names, and values returned by -\fBne_response_header_iterate\fR -are only valid until the next call to -\fBne_begin_request\fR -or until the request object is destroyed. -.SH "EXAMPLES" -.PP -The following code will output the value of the -Last\-Modified -header for a resource: -.sp -.RS 4 -.nf -ne_request *req = ne_request_create(sess, "GET", "/foo.txt"); -if (ne_request_dispatch(req) == NE_OK) { - const char *mtime = ne_get_response_header(req, "Last\-Modified"); - if (mtime) { - printf("/foo.txt has last\-modified value %s\en", mtime); - } -} -ne_request_destroy(req); -.fi -.RE -.SH "SEE ALSO" -.PP -ne_request_create, -ne_request_destroy. -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_get_scheme.3 b/client/neon-0.27.2/doc/man/ne_get_scheme.3 deleted file mode 100644 index 06ef4ae5b..000000000 --- a/client/neon-0.27.2/doc/man/ne_get_scheme.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_set_useragent.3 diff --git a/client/neon-0.27.2/doc/man/ne_get_server_hostport.3 b/client/neon-0.27.2/doc/man/ne_get_server_hostport.3 deleted file mode 100644 index 06ef4ae5b..000000000 --- a/client/neon-0.27.2/doc/man/ne_get_server_hostport.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_set_useragent.3 diff --git a/client/neon-0.27.2/doc/man/ne_get_status.3 b/client/neon-0.27.2/doc/man/ne_get_status.3 deleted file mode 100644 index c344739bc..000000000 --- a/client/neon-0.27.2/doc/man/ne_get_status.3 +++ /dev/null @@ -1,62 +0,0 @@ -.\" Title: ne_get_status -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_GET_STATUS" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_get_status \- retrieve HTTP response status for request -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 31 -.BI "const ne_status *ne_get_status(const\ ne_request\ *" "request" ");" -.SH "DESCRIPTION" -.PP -The -\fBne_get_status\fR -function returns a pointer to the HTTP status object giving the result of a request. The object returned only becomes valid once the request has been -\fIsuccessfully\fR -dispatched (the return value of -\fBne_request_dispatch\fR -or -\fBne_begin_request\fR -was zero). The object remains valid until the associated request object is destroyed. -.SH "SEE ALSO" -.PP -ne_status, -ne_request_create -.SH "EXAMPLE" -.PP -Display the response status code of applying the -HEAD -method to some resource. -.sp -.RS 4 -.nf -ne_request *req = ne_request_create(sess, "HEAD", "/foo/bar"); -if (ne_request_dispatch(req)) - /* handle errors... */ -else - printf("Response status code was %d\en", ne_get_status(req)\->code); -ne_request_destroy(req); -.fi -.RE -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_has_support.3 b/client/neon-0.27.2/doc/man/ne_has_support.3 deleted file mode 100644 index cd7b6f012..000000000 --- a/client/neon-0.27.2/doc/man/ne_has_support.3 +++ /dev/null @@ -1,76 +0,0 @@ -.\" Title: ne_has_support -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_HAS_SUPPORT" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_has_support \- determine feature support status -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 19 -.BI "int ne_has_support(int\ " "feature" ");" -.SH "DESCRIPTION" -.PP -The -\fBne_has_support\fR -function can be used to determine whether a particular optional feature, given by the feature code -\fIfeature\fR, is supported. The following feature codes are available: -.PP -\fBNE_FEATURE_SSL\fR -.RS 4 -Indicates support for SSL/TLS -.RE -.PP -\fBNE_FEATURE_ZLIB\fR -.RS 4 -Indicates support for compressed responses -.RE -.PP -\fBNE_FEATURE_IPV6\fR -.RS 4 -Indicates support for IPv6 -.RE -.PP -\fBNE_FEATURE_LFS\fR -.RS 4 -Indicates support for large files -.RE -.PP -\fBNE_FEATURE_SOCKS\fR -.RS 4 -Indicates support for SOCKSv5 -.RE -.PP -\fBNE_FEATURE_TS_SSL\fR -.RS 4 -Indicates support for thread\-safe SSL initialization \(em see -ne_sock_init -.RE -.SH "RETURN VALUE" -.PP -\fBne_has_support\fR -returns non\-zero if the given feature is supported, or zero otherwise. -.SH "SEE ALSO" -.PP -ne_version_match(3), -ne_sock_init(3) -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_i18n_init.3 b/client/neon-0.27.2/doc/man/ne_i18n_init.3 deleted file mode 100644 index 91d302274..000000000 --- a/client/neon-0.27.2/doc/man/ne_i18n_init.3 +++ /dev/null @@ -1,60 +0,0 @@ -.\" Title: ne_i18n_init -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_I18N_INIT" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_i18n_init \- functions to initialize internationalization support -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 18 -.BI "void ne_i18n_init(const\ char\ *" "encoding" ");" -.SH "DESCRIPTION" -.PP -The -\fBne_i18n_init\fR -function can be used to enable support for translated messages in the neon library. The -\fIencoding\fR -parameter, if non\-NULL, specifies the character encoding required for generated translated string. If it is -NULL, the appropriate character encoding for the process locale will be used. -.PP -This call is only strictly necessary if either: -.RS 4 -\h'-04' 1.\h'+02'neon has been installed into a different prefix than the -gettext -implementation on which it depends for i18n purposes, or -.RE -.RS 4 -\h'-04' 2.\h'+02'the caller requires that translated messages are in a particular character encoding. -.RE -.PP -If -\fBne_i18n_init\fR -is never called, the message catalogs will not be found if case (a) applies (and so English error messages will be used), and will use the default character encoding specified by the process locale. The library will otherwise operate correctly. -.PP -Note that the encoding used is a process\-global setting and so results may be unexpected if other users of neon within the process call -\fBne_i18n_init\fR -with a different encoding parameter. -.SH "SEE ALSO" -.PP -ne_sock_init -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_iaddr_cmp.3 b/client/neon-0.27.2/doc/man/ne_iaddr_cmp.3 deleted file mode 100644 index 0964908c9..000000000 --- a/client/neon-0.27.2/doc/man/ne_iaddr_cmp.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_iaddr_make.3 diff --git a/client/neon-0.27.2/doc/man/ne_iaddr_free.3 b/client/neon-0.27.2/doc/man/ne_iaddr_free.3 deleted file mode 100644 index 0964908c9..000000000 --- a/client/neon-0.27.2/doc/man/ne_iaddr_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_iaddr_make.3 diff --git a/client/neon-0.27.2/doc/man/ne_iaddr_make.3 b/client/neon-0.27.2/doc/man/ne_iaddr_make.3 deleted file mode 100644 index cb3118300..000000000 --- a/client/neon-0.27.2/doc/man/ne_iaddr_make.3 +++ /dev/null @@ -1,102 +0,0 @@ -.\" Title: ne_iaddr_make -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_IADDR_MAKE" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_iaddr_make, ne_iaddr_cmp, ne_iaddr_print, ne_iaddr_typeof, ne_iaddr_free \- functions to manipulate and compare network addresses -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include - -typedef enum { - ne_iaddr_ipv4 = 0, - ne_iaddr_ipv6 -} ne_iaddr_type; -.fi -.ft -.HP 28 -.BI "ne_inet_addr *ne_iaddr_make(ne_iaddr_type\ " "type" ", const\ unsigned\ char\ *" "raw" ");" -.HP 17 -.BI "int ne_iaddr_cmp(const\ ne_inet_addr\ *" "ia1" ", const\ ne_inet_addr\ *" "ia2" ");" -.HP 21 -.BI "char *ne_iaddr_print(const\ ne_inet_addr\ *" "ia" ", char\ *" "buffer" ", size_t\ " "bufsiz" ");" -.HP 30 -.BI "ne_iaddr_type ne_iaddr_typeof(const\ ne_inet_addr\ *" "ia" ");" -.HP 19 -.BI "void ne_iaddr_free(const\ ne_inet_addr\ *" "ia" ");" -.SH "DESCRIPTION" -.PP -\fBne_iaddr_make\fR -creates an -\fBne_inet_addr\fR -object from a raw binary network address; for instance the four bytes -0x7f 0x00 0x00 0x01 -represent the IPv4 address -127.0.0.1. The object returned is suitable for passing to -\fBne_sock_connect\fR. A binary IPv4 address contains four bytes; a binary IPv6 address contains sixteen bytes; addresses passed must be in network byte order. -.PP -\fBne_iaddr_cmp\fR -can be used to compare two network addresses; returning zero only if they are identical. The addresses need not be of the same address type; if the addresses are not of the same type, the return value is guaranteed to be non\-zero. -.PP -\fBne_iaddr_print\fR -can be used to print the human\-readable string representation of a network address into a buffer, for instance the string -"127.0.0.1". -.PP -\fBne_iaddr_typeof\fR -returns the type of the given network address. -.PP -\fBne_iaddr_free\fR -releases the memory associated with a network address object. -.SH "RETURN VALUE" -.PP -\fBne_iaddr_make\fR -returns -NULL -if the address type passed is not supported (for instance on a platform which does not support IPv6). -.PP -\fBne_iaddr_print\fR -returns the -\fIbuffer\fR -pointer, and never -NULL. -.SH "EXAMPLES" -.PP -The following example connects a socket to port 80 at the address -127.0.0.1. -.sp -.RS 4 -.nf -unsigned char addr[] = "\e0x7f\e0x00\e0x00\e0x01"; -ne_inet_addr *ia; - -ia = ne_iaddr_make(ne_iaddr_ipv4, addr); -if (ia != NULL) { - ne_socket *sock = ne_sock_connect(ia, 80); - ne_iaddr_free(ia); - /* ... */ -} else { - /* ... */ -} -.fi -.RE -.SH "SEE ALSO" -.PP -ne_addr_resolve -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_iaddr_print.3 b/client/neon-0.27.2/doc/man/ne_iaddr_print.3 deleted file mode 100644 index 0964908c9..000000000 --- a/client/neon-0.27.2/doc/man/ne_iaddr_print.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_iaddr_make.3 diff --git a/client/neon-0.27.2/doc/man/ne_iaddr_typeof.3 b/client/neon-0.27.2/doc/man/ne_iaddr_typeof.3 deleted file mode 100644 index 0964908c9..000000000 --- a/client/neon-0.27.2/doc/man/ne_iaddr_typeof.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_iaddr_make.3 diff --git a/client/neon-0.27.2/doc/man/ne_malloc.3 b/client/neon-0.27.2/doc/man/ne_malloc.3 deleted file mode 100644 index 758261603..000000000 --- a/client/neon-0.27.2/doc/man/ne_malloc.3 +++ /dev/null @@ -1,61 +0,0 @@ -.\" Title: ne_malloc -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_MALLOC" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_malloc, ne_calloc, ne_realloc, ne_strdup, ne_strndup, ne_oom_callback \- memory allocation wrappers -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 16 -.BI "void *ne_malloc(size_t\ " "size" ");" -.HP 16 -.BI "void *ne_calloc(size_t\ " "size" ");" -.HP 17 -.BI "void *ne_realloc(void\ *" "size" ", size_t\ " "len" ");" -.HP 16 -.BI "char *ne_strdup(const\ char\ *" "s" ");" -.HP 17 -.BI "char *ne_strndup(const\ char\ *" "s" ", size_t\ " "size" ");" -.HP 21 -.BI "void ne_oom_callback(void\ (*" "callback" ")(void));" -.SH "DESCRIPTION" -.PP -The functions -\fBne_malloc\fR, -\fBne_calloc\fR, -\fBne_realloc\fR, -\fBne_strdup\fR -and -\fBne_strdnup\fR -provide wrappers for the equivalent functions in the standard C library. The wrappers provide the extra guarantee that if the C library equivalent returns -NULL -when no memory is available, an optional callback will be called, and the library will then call -\fBabort\fR(). -.PP -\fBne_oom_callback\fR -registers a callback which will be invoked if an out of memory error is detected. -.SH "NOTES" -.PP -If the operating system uses optimistic memory allocation, the C library memory allocation routines will not return -NULL, so it is not possible to gracefully handle memory allocation failures. -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_oom_callback.3 b/client/neon-0.27.2/doc/man/ne_oom_callback.3 deleted file mode 100644 index 8564fc1af..000000000 --- a/client/neon-0.27.2/doc/man/ne_oom_callback.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_malloc.3 diff --git a/client/neon-0.27.2/doc/man/ne_print_request_header.3 b/client/neon-0.27.2/doc/man/ne_print_request_header.3 deleted file mode 100644 index a9ed2f778..000000000 --- a/client/neon-0.27.2/doc/man/ne_print_request_header.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_add_request_header.3 diff --git a/client/neon-0.27.2/doc/man/ne_qtoken.3 b/client/neon-0.27.2/doc/man/ne_qtoken.3 deleted file mode 100644 index b24c5741f..000000000 --- a/client/neon-0.27.2/doc/man/ne_qtoken.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_token.3 diff --git a/client/neon-0.27.2/doc/man/ne_realloc.3 b/client/neon-0.27.2/doc/man/ne_realloc.3 deleted file mode 100644 index 8564fc1af..000000000 --- a/client/neon-0.27.2/doc/man/ne_realloc.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_malloc.3 diff --git a/client/neon-0.27.2/doc/man/ne_request_create.3 b/client/neon-0.27.2/doc/man/ne_request_create.3 deleted file mode 100644 index a57f61497..000000000 --- a/client/neon-0.27.2/doc/man/ne_request_create.3 +++ /dev/null @@ -1,152 +0,0 @@ -.\" Title: ne_request_create -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_REQUEST_CREATE" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_request_create, ne_request_dispatch, ne_request_destroy \- low\-level HTTP request handling -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 30 -.BI "ne_request *ne_request_create(ne_session\ *" "session" ", const\ char\ *" "method" ", const\ char\ *" "path" ");" -.HP 24 -.BI "int ne_request_dispatch(ne_request\ *" "req" ");" -.HP 24 -.BI "void ne_request_destroy(ne_request\ *" "req" ");" -.SH "DESCRIPTION" -.PP -An HTTP request, represented by the -\fBne_request\fR -type, specifies that some operation is to be performed on some resource. The -\fBne_request_create\fR -function creates a request object, specifying the operation in the -\fImethod\fR -parameter. The location of the resource is determined by the server in use for the session given by the -\fIsess\fR -parameter, combined with the -\fIpath\fR -parameter. -.PP -The -\fIpath\fR -string used must conform to the -abs_path -definition given in RFC2396, with an optional "?query" part, and must be URI\-escaped by the caller (for instance, using -\fBne_path_escape\fR). If the string comes from an untrusted source, failure to perform URI\-escaping results in a security vulnerability. -.PP -To dispatch a request, and process the response, the -\fBne_request_dispatch\fR -function can be used. An alternative is to use the (more complex, but more flexible) combination of the -\fBne_begin_request\fR, -\fBne_end_request\fR, and -\fBne_read_response_block\fR -functions; see -\fBne_begin_request\fR. -.PP -To add extra headers in the request, the functions -ne_add_request_header -and -ne_print_request_header -can be used. To include a message body with the request, one of the functions -\fBne_set_request_body_buffer\fR, -ne_set_request_body_fd, or -\fBne_set_request_body_provider\fR -can be used. -.PP -The return value of -\fBne_request_dispatch\fR -indicates merely whether the request was sent and the response read successfully. To discover the result of the operation, -ne_get_status, along with any processing of the response headers and message body. -.PP -A request can only be dispatched once: calling -\fBne_request_dispatch\fR -more than once on a single -\fBne_request\fR -object produces undefined behaviour. Once all processing associated with the request object is complete, use the -\fBne_request_destroy\fR -function to destroy the resources associated with it. Any subsequent use of the request object produces undefined behaviour. -.SH "RETURN VALUE" -.PP -The -\fBne_request_create\fR -function returns a pointer to a request object (and never -NULL). -.PP -The -\fBne_request_dispatch\fR -function returns zero if the request was dispatched successfully, and a non\-zero error code otherwise. -.SH "ERRORS" -.PP -\fBNE_ERROR\fR -.RS 4 -Request failed (see session error string) -.RE -.PP -\fBNE_LOOKUP\fR -.RS 4 -The DNS lookup for the server (or proxy server) failed. -.RE -.PP -\fBNE_AUTH\fR -.RS 4 -Authentication failed on the server. -.RE -.PP -\fBNE_PROXYAUTH\fR -.RS 4 -Authentication failed on the proxy server. -.RE -.PP -\fBNE_CONNECT\fR -.RS 4 -A connection to the server could not be established. -.RE -.PP -\fBNE_TIMEOUT\fR -.RS 4 -A timeout occurred while waiting for the server to respond. -.RE -.SH "EXAMPLE" -.PP -An example of applying a -MKCOL -operation to the resource at the location -http://www.example.com/foo/bar/: -.sp -.RS 4 -.nf -ne_session *sess = ne_session_create("http", "www.example.com", 80); -ne_request *req = ne_request_create(sess, "MKCOL", "/foo/bar/"); -if (ne_request_dispatch(req)) { - printf("Request failed: %s\en", ne_get_error(sess)); -} -ne_request_destroy(req); -.fi -.RE -.SH "SEE ALSO" -.PP -ne_get_error, -ne_set_error, -ne_get_status, -ne_add_request_header, -ne_set_request_body_buffer. -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_request_destroy.3 b/client/neon-0.27.2/doc/man/ne_request_destroy.3 deleted file mode 100644 index 9c211a4f9..000000000 --- a/client/neon-0.27.2/doc/man/ne_request_destroy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_request_create.3 diff --git a/client/neon-0.27.2/doc/man/ne_request_dispatch.3 b/client/neon-0.27.2/doc/man/ne_request_dispatch.3 deleted file mode 100644 index 9c211a4f9..000000000 --- a/client/neon-0.27.2/doc/man/ne_request_dispatch.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_request_create.3 diff --git a/client/neon-0.27.2/doc/man/ne_response_header_iterate.3 b/client/neon-0.27.2/doc/man/ne_response_header_iterate.3 deleted file mode 100644 index ac6864bc4..000000000 --- a/client/neon-0.27.2/doc/man/ne_response_header_iterate.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_get_response_header.3 diff --git a/client/neon-0.27.2/doc/man/ne_session_create.3 b/client/neon-0.27.2/doc/man/ne_session_create.3 deleted file mode 100644 index 3752a6669..000000000 --- a/client/neon-0.27.2/doc/man/ne_session_create.3 +++ /dev/null @@ -1,108 +0,0 @@ -.\" Title: ne_session_create -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_SESSION_CREATE" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_session_create, ne_close_connection, ne_session_proxy, ne_session_destroy \- set up HTTP sessions -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 30 -.BI "ne_session *ne_session_create(const\ char\ *" "scheme" ", const\ char\ *" "hostname" ", unsigned\ int\ " "port" ");" -.HP 22 -.BI "void ne_session_proxy(ne_session\ *" "session" ", const\ char\ *" "hostname" ", unsigned\ int\ " "port" ");" -.HP 25 -.BI "void ne_close_connection(ne_session\ *" "session" ");" -.HP 24 -.BI "void ne_session_destroy(ne_session\ *" "session" ");" -.SH "DESCRIPTION" -.PP -An -\fBne_session\fR -object represents an HTTP session \- a logical grouping of a sequence of HTTP requests made to a certain server. Any requests made using the session can use a persistent connection, share cached authentication credentials and any other common attributes. -.PP -A new HTTP session is created using -\fBne_session_create\fR, giving the -\fIhostname\fR -and -\fIport\fR -of the server to use, along with the -\fIscheme\fR -used to contact the server (usually -"http"). Before the first use of -\fBne_session_create\fR -in a process, -ne_sock_init -must have been called to perform any global initialization needed by any libraries used by neon. -.PP -To enable SSL/TLS for the session, pass the string -"https" -as the -\fIscheme\fR -parameter, and either register a certificate verification function (see -ne_ssl_set_verify) or trust the appropriate certificate (see -ne_ssl_trust_cert, -ne_ssl_trust_default_ca). -.PP -If an HTTP proxy server should be used for the session, -\fBne_session_proxy\fR -must be called giving the hostname and port on which to contact the proxy. -.PP -If it is known that the session will not be used for a significant period of time, -\fBne_close_connection\fR -can be called to close the connection, if one remains open. Use of this function is entirely optional, but it must not be called if there is a request active using the session. -.PP -Once a session has been completed, -\fBne_session_destroy\fR -must be called to destroy the resources associated with the session. Any subsequent use of the session pointer produces undefined behaviour. -.SH "NOTES" -.PP -The hostname passed to -\fBne_session_create\fR -is resolved when the first request using the session is dispatched; a DNS resolution failure can only be detected at that time (using the -NE_LOOKUP -error code); see -ne_request_dispatch -for details. -.SH "RETURN VALUES" -.PP -\fBne_session_create\fR -will return a pointer to a new session object (and never -NULL). -.SH "EXAMPLES" -.PP -Create and destroy a session: -.sp -.RS 4 -.nf -ne_session *sess; -sess = ne_session_create("http", "host.example.com", 80); -/* ... use sess ... */ -ne_session_destroy(sess); -.fi -.RE -.SH "SEE ALSO" -.PP -ne_ssl_set_verify, -ne_ssl_trust_cert, -ne_sock_init -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_session_destroy.3 b/client/neon-0.27.2/doc/man/ne_session_destroy.3 deleted file mode 100644 index 2a71e062c..000000000 --- a/client/neon-0.27.2/doc/man/ne_session_destroy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_session_create.3 diff --git a/client/neon-0.27.2/doc/man/ne_session_proxy.3 b/client/neon-0.27.2/doc/man/ne_session_proxy.3 deleted file mode 100644 index 2a71e062c..000000000 --- a/client/neon-0.27.2/doc/man/ne_session_proxy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_session_create.3 diff --git a/client/neon-0.27.2/doc/man/ne_set_error.3 b/client/neon-0.27.2/doc/man/ne_set_error.3 deleted file mode 100644 index c317579dd..000000000 --- a/client/neon-0.27.2/doc/man/ne_set_error.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_get_error.3 diff --git a/client/neon-0.27.2/doc/man/ne_set_persist.3 b/client/neon-0.27.2/doc/man/ne_set_persist.3 deleted file mode 100644 index 06ef4ae5b..000000000 --- a/client/neon-0.27.2/doc/man/ne_set_persist.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_set_useragent.3 diff --git a/client/neon-0.27.2/doc/man/ne_set_proxy_auth.3 b/client/neon-0.27.2/doc/man/ne_set_proxy_auth.3 deleted file mode 100644 index a6f0398ad..000000000 --- a/client/neon-0.27.2/doc/man/ne_set_proxy_auth.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_set_server_auth.3 diff --git a/client/neon-0.27.2/doc/man/ne_set_read_timeout.3 b/client/neon-0.27.2/doc/man/ne_set_read_timeout.3 deleted file mode 100644 index 06ef4ae5b..000000000 --- a/client/neon-0.27.2/doc/man/ne_set_read_timeout.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_set_useragent.3 diff --git a/client/neon-0.27.2/doc/man/ne_set_request_body_buffer.3 b/client/neon-0.27.2/doc/man/ne_set_request_body_buffer.3 deleted file mode 100644 index 2300549d0..000000000 --- a/client/neon-0.27.2/doc/man/ne_set_request_body_buffer.3 +++ /dev/null @@ -1,82 +0,0 @@ -.\" Title: ne_set_request_body_buffer -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_SET_REQUEST_BODY_" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_set_request_body_buffer, ne_set_request_body_fd, ne_set_request_body_fd64 \- include a message body with a request -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 32 -.BI "void ne_set_request_body_buffer(ne_request\ *" "req" ", const\ char\ *" "buf" ", size_t\ " "count" ");" -.HP 27 -.BI "int ne_set_request_body_fd(ne_request\ *" "req" ", int\ " "fd" ", off_t\ " "begin" ", off_t\ " "length" ");" -.HP 29 -.BI "int ne_set_request_body_fd64(ne_request\ *" "req" ", int\ " "fd" ", off64_t\ " "begin" ", off64_t\ " "length" ");" -.SH "DESCRIPTION" -.PP -The -\fBne_set_request_body_buffer\fR -function specifies that a message body should be included with the body, which is stored in the -\fIcount\fR -bytes buffer -\fIbuf\fR. -.PP -The -\fBne_set_request_body_fd\fR -function can be used to include a message body with a request which is read from a file descriptor. The body is read from the file descriptor -\fIfd\fR, which must be a associated with a seekable file (not a pipe, socket, or FIFO). -\fIcount\fR -bytes are read, beginning at offset -\fIbegin\fR -(hence, passing -\fIbegin\fR -as zero means the body is read from the beginning of the file). -.PP -If the -NE_LFS -macro is defined, then the -\fBne_set_request_body_fd64\fR -function is also available, to provide large file support. This function can be used on 32\-bit platforms supporting the LFS standard; the -\fIoffset\fR -and -\fIlength\fR -parameters can then be passed as 64\-bit values. When using large files, -\fIfd\fR -must be opened using -\fBopen64\fR -or by passing the -O_LARGEFILE -flag to -\fBopen\fR. -.PP -For all the above functions, the source of the request body must survive until the request has been dispatched; neither the memory buffer passed to -\fBne_set_request_body_buffer\fR -nor the file descriptor passed to -\fBne_set_request_body_fd\fR -or -\fBne_set_request_body_fd64\fR -are copied internally. -.SH "SEE ALSO" -.PP -ne_request_create -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_set_request_body_fd.3 b/client/neon-0.27.2/doc/man/ne_set_request_body_fd.3 deleted file mode 100644 index 42452bee2..000000000 --- a/client/neon-0.27.2/doc/man/ne_set_request_body_fd.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_set_request_body_buffer.3 diff --git a/client/neon-0.27.2/doc/man/ne_set_request_body_fd64.3 b/client/neon-0.27.2/doc/man/ne_set_request_body_fd64.3 deleted file mode 100644 index 42452bee2..000000000 --- a/client/neon-0.27.2/doc/man/ne_set_request_body_fd64.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_set_request_body_buffer.3 diff --git a/client/neon-0.27.2/doc/man/ne_set_request_expect100.3 b/client/neon-0.27.2/doc/man/ne_set_request_expect100.3 deleted file mode 100644 index 6e27eccde..000000000 --- a/client/neon-0.27.2/doc/man/ne_set_request_expect100.3 +++ /dev/null @@ -1,53 +0,0 @@ -.\" Title: ne_set_request_expect100 -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_SET_REQUEST_EXPEC" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_set_request_expect100 \- function to enable Expect: 100\-continue support -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 30 -.BI "void ne_set_request_expect100(ne_request\ *" "request" ", int\ " "flag" ");" -.SH "DESCRIPTION" -.PP -An extension introduced in the HTTP/1.1 specification was the use of the -Expect: 100\-continue -header. This header allows an HTTP client to be informed of the expected response status before the request message body is sent: a useful optimisation for situations where a large message body is to be sent. The -\fBne_set_request_expect100\fR -function can be used to enable this feature by passing the -\fIflag\fR -parameter as any non\-zero integer. -.sp -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -\fBWarning\fR -.PP -Unfortunately, if this header is sent to a server which is not fully compliant with the HTTP/1.1 specification, a deadlock occurs resulting in a temporarily "hung" connection. neon will recover gracefully from this situation, but only after a 15 second timeout. It is highly recommended that this option is not enabled unless it is known that the server in use correctly implements -Expect: 100\-continue -support. -.SH "SEE ALSO" -.PP -ne_request_create. -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_set_server_auth.3 b/client/neon-0.27.2/doc/man/ne_set_server_auth.3 deleted file mode 100644 index 127b6a9a8..000000000 --- a/client/neon-0.27.2/doc/man/ne_set_server_auth.3 +++ /dev/null @@ -1,104 +0,0 @@ -.\" Title: ne_set_server_auth -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_SET_SERVER_AUTH" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_set_server_auth, ne_set_proxy_auth, ne_forget_auth \- register authentication callbacks -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 29 -.BI "typedef int (*ne_auth_creds)(void\ *" "userdata" ", const\ char\ *" "realm" ", int\ " "attempt" ", char\ *" "username" ", char\ *" "password" ");" -.HP 24 -.BI "void ne_set_server_auth(ne_session\ *" "session" ", ne_auth_creds\ " "callback" ", void\ *" "userdata" ");" -.HP 23 -.BI "void ne_set_proxy_auth(ne_session\ *" "session" ", ne_auth_creds\ " "callback" ", void\ *" "userdata" ");" -.HP 20 -.BI "void ne_forget_auth(ne_session\ *" "session" ");" -.SH "DESCRIPTION" -.PP -The -\fBne_auth_creds\fR -function type defines a callback which is invoked when a server or proxy server requires user authentication for a particular request. The -\fIrealm\fR -string is supplied by the server. -The -\fIattempt\fR -is a counter giving the number of times the request has been retried with different authentication credentials. The first time the callback is invoked for a particular request, -\fIattempt\fR -will be zero. -.PP -To retry the request using new authentication credentials, the callback should return zero, and the -\fIusername\fR -and -\fIpassword\fR -buffers must contain -NUL\-terminated strings. The -NE_ABUFSIZ -constant gives the size of these buffers. -.sp -.it 1 an-trap -.nr an-no-space-flag 1 -.nr an-break-flag 1 -.br -\fBTip\fR -.PP -If you only wish to allow the user one attempt to enter credentials, use the value of the -\fIattempt\fR -parameter as the return value of the callback. -.PP -To abort the request, the callback should return a non\-zero value; in which case the contents of the -\fIusername\fR -and -\fIpassword\fR -buffers are ignored. -.PP -The -\fBne_forget_auth\fR -function can be used to discard the cached authentication credentials. -.SH "EXAMPLES" -.sp -.RS 4 -.nf -/* Function which prompts for a line of user input: */ -extern char *prompt_for(const char *prompt); - -static int -my_auth(void *userdata, const char *realm, int attempts, - char *username, char *password) -{ - strncpy(username, prompt_for("Username: "), NE_ABUFSIZ); - strncpy(password, prompt_for("Password: "), NE_ABUFSIZ); - return attempts; -} - -int main(...) -{ - ne_session *sess = ne_session_create(...); - - ne_set_server_auth(sess, my_auth, NULL); - - /* ... */ -} -.fi -.RE -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_set_useragent.3 b/client/neon-0.27.2/doc/man/ne_set_useragent.3 deleted file mode 100644 index a89c43376..000000000 --- a/client/neon-0.27.2/doc/man/ne_set_useragent.3 +++ /dev/null @@ -1,102 +0,0 @@ -.\" Title: ne_set_useragent -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_SET_USERAGENT" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_set_useragent, ne_set_persist, ne_set_read_timeout, ne_get_scheme, ne_get_server_hostport \- common properties for HTTP sessions -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 22 -.BI "void ne_set_useragent(ne_session\ *" "session" ", const\ char\ *" "product" ");" -.HP 20 -.BI "void ne_set_persist(ne_session\ *" "session" ", int\ " "flag" ");" -.HP 25 -.BI "void ne_set_read_timeout(ne_session\ *" "session" ", int\ " "timeout" ");" -.HP 26 -.BI "const char *ne_get_scheme(ne_sesssion\ *" "session" ");" -.HP 35 -.BI "const char *ne_get_server_hostport(ne_sesssion\ *" "session" ");" -.SH "DESCRIPTION" -.PP -The -User\-Agent -request header is used to identify the software which generated the request for statistical or debugging purposes. neon does not send a -User\-Agent -header unless a call is made to the -\fBne_set_useragent\fR. -\fBne_set_useragent\fR -must be passed a product string conforming to RFC2616's product token grammar; of the form -"Product/Version". -.PP -By default neon will use a persistent connection whenever possible. For specific applications, or for debugging purposes, it is sometimes useful to disable persistent connections. The -\fBne_set_persist\fR -function will disable persistent connections if passed a -\fIflag\fR -parameter of -0, and will enable them otherwise. -.PP -When neon reads from a socket, by default the read operation will time out after 60 seconds, and the request will fail giving an -\fBNE_TIMEOUT\fR -error. To configure this timeout interval, call -\fBne_set_read_timeout\fR -giving the desired number of seconds as the -\fItimeout\fR -parameter. -.PP -The scheme used to initially create the session will be returned by -\fBne_get_scheme\fR. -.PP -The hostport pair with which the session is associated will be returned by the -\fBne_get_server_hostport\fR; for example -www.example.com:8080. Note that the -:port -will be omitted if the default port for the scheme is used. -.SH "EXAMPLES" -.PP -Set a user\-agent string: -.sp -.RS 4 -.nf -ne_session *sess = ne_session_create(...); -ne_set_useragent(sess, "MyApplication/2.1"); -.fi -.RE -.PP -Disable use of persistent connections: -.sp -.RS 4 -.nf -ne_session *sess = ne_session_create(...); -ne_set_persist(sess, 0); -.fi -.RE -.PP -Set a 30 second read timeout: -.sp -.RS 4 -.nf -ne_session *sess = ne_session_create(...); -ne_set_read_timeout(sess, 30); -.fi -.RE -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_shave.3 b/client/neon-0.27.2/doc/man/ne_shave.3 deleted file mode 100644 index 885399cf9..000000000 --- a/client/neon-0.27.2/doc/man/ne_shave.3 +++ /dev/null @@ -1,53 +0,0 @@ -.\" Title: ne_shave -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_SHAVE" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_shave \- trim whitespace from a string -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 15 -.BI "char *ne_shave(char\ *" "str" ", const\ char\ *" "whitespace" ");" -.SH "DESCRIPTION" -.PP -\fBne_shave\fR -returns a portion of -\fIstr\fR -with any leading or trailing characters in the -\fIwhitespace\fR -array removed. -\fIstr\fR -may be modified. Note that the return value may not be equal to -\fIstr\fR. -.SH "EXAMPLES" -.PP -The following code segment will output -"fish": -.sp -.RS 4 -.nf -char s[] = ".!.fish!.!"; -puts(ne_shave(s, ".!")); -.fi -.RE -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_sock_exit.3 b/client/neon-0.27.2/doc/man/ne_sock_exit.3 deleted file mode 100644 index e8666954a..000000000 --- a/client/neon-0.27.2/doc/man/ne_sock_exit.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_sock_init.3 diff --git a/client/neon-0.27.2/doc/man/ne_sock_init.3 b/client/neon-0.27.2/doc/man/ne_sock_init.3 deleted file mode 100644 index ff77b5d1e..000000000 --- a/client/neon-0.27.2/doc/man/ne_sock_init.3 +++ /dev/null @@ -1,97 +0,0 @@ -.\" Title: ne_sock_init -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_SOCK_INIT" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_sock_init, ne_sock_exit \- perform library initialization -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 17 -.BI "int ne_sock_init(void);" -.HP 18 -.BI "void ne_sock_exit(void);" -.SH "DESCRIPTION" -.PP -In some platforms and configurations, neon may be using some socket or SSL libraries which require global initialization before use. To perform this initialization, the -\fBne_sock_init\fR -function must be called before any other library functions are used. -.PP -Once all use of neon is complete, -\fBne_sock_exit\fR -can be called to perform de\-initialization of socket or SSL libraries, if necessary. Uses of -\fBne_sock_init\fR -and -\fBne_sock_exit\fR -are "reference counted"; if N calls to -\fBne_sock_init\fR -are made, only the Nth call to -\fBne_sock_exit\fR -will have effect. -.PP -\fBne_sock_init\fR -will set the disposition of the -SIGPIPE -signal to -\fIignored\fR. No change is made to the -SIGPIPE -disposition by -\fBne_sock_exit\fR. -.PP -Both the SSL libraries supported by neon \(em OpenSSL and GnuTLS \(em require callbacks to be registered to allow thread\-safe use of SSL. These callbacks are stored as global variables and so their state persists for as long as the library in question is loaded into the process. If multiple users of the SSL library exist within the process, this can be problematic, particularly if one is dynamically loaded (and may subsequently be unloaded). -.PP -If neon is configured using the -\-\-enable\-threadsafe\-ssl -flag, thread\-safe SSL support will be enabled automatically, as covered in the following section. Otherwise, it is not safe to use neon with SSL in a multi\-threaded process. The -ne_has_support -function can be used to determine whether neon is built to enable thread\-safety support in the SSL library. -.SS "Thread\-safe SSL with OpenSSL" -.PP -neon follows two simple rules when dealing with the OpenSSL locking callbacks: -.RS 4 -\h'-04'\(bu\h'+03'\fBne_sock_init\fR -will set thread\-safety locking callbacks if and only if no locking callbacks are already registered. -.RE -.RS 4 -\h'-04'\(bu\h'+03'\fBne_sock_exit\fR -will unset the thread\-safety locking callbacks if and only if the locking callbacks registered are those registered by -\fBne_sock_init\fR. -.RE -.sp -.RE -Applications and libraries should be able to co\-operate to ensure that SSL use is always thread\-safe if similar rules are always followed. -.SS "Thread\-safe SSL with GnuTLS" -.PP -The cryptography library used by GnuTLS, libgcrypt, only supports an initialization operation to register thread\-safety callbacks. -\fBne_sock_init\fR -will register the thread\-safe locking callbacks on first use; -\fBne_sock_exit\fR -cannot unregister them. If multiple users of GnuTLS are present within the process, it is unsafe to dynamically unload neon from the process if neon is configured with thread\-safe SSL support enabled (since the callbacks would be left pointing at unmapped memory once neon is unloaded). -.SH "RETURN VALUE" -.PP -\fBne_sock_init\fR -returns zero on success, or non\-zero on error. If an error occurs, no further use of the neon library should be attempted. -.SH "SEE ALSO" -.PP -neon(3), -ne_has_support(3) -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_ssl_cert_cmp.3 b/client/neon-0.27.2/doc/man/ne_ssl_cert_cmp.3 deleted file mode 100644 index b6071c55b..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_cert_cmp.3 +++ /dev/null @@ -1,42 +0,0 @@ -.\" Title: ne_ssl_cert_cmp -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_SSL_CERT_CMP" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_ssl_cert_cmp, ne_ssl_cert_free \- functions to operate on certificate objects -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 20 -.BI "int ne_ssl_cert_cmp(const\ ne_ssl_certificate\ *" "c1" ", const\ ne_ssl_certificate\ *" "c2" ");" -.HP 22 -.BI "void ne_ssl_cert_free(ne_ssl_certificate\ *" "cert" ");" -.SH "DESCRIPTION" -.PP -The -\fBne_ssl_cert_cmp\fR -function can be used to compare two certificate objects; it returns zero if they refer to the same certificate, and non\-zero otherwise. -.PP -The -\fBne_ssl_cert_free\fR -function can be used to destroy a certificate object when it is no longer needed. -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_ssl_cert_export.3 b/client/neon-0.27.2/doc/man/ne_ssl_cert_export.3 deleted file mode 100644 index 9c92144ab..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_cert_export.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_ssl_cert_read.3 diff --git a/client/neon-0.27.2/doc/man/ne_ssl_cert_free.3 b/client/neon-0.27.2/doc/man/ne_ssl_cert_free.3 deleted file mode 100644 index 208e0df88..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_cert_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_ssl_cert_cmp.3 diff --git a/client/neon-0.27.2/doc/man/ne_ssl_cert_identity.3 b/client/neon-0.27.2/doc/man/ne_ssl_cert_identity.3 deleted file mode 100644 index a4b630103..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_cert_identity.3 +++ /dev/null @@ -1,100 +0,0 @@ -.\" Title: ne_ssl_cert_identity -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_SSL_CERT_IDENTITY" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_ssl_cert_identity, ne_ssl_cert_signedby, ne_ssl_cert_issuer, ne_ssl_cert_subject \- functions to access certificate properties -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 33 -.BI "const char *ne_ssl_cert_identity(const\ ne_ssl_certificate\ *" "cert" ");" -.HP 47 -.BI "const ne_ssl_certificate *ne_ssl_cert_signedby(const\ ne_ssl_certificate\ *" "cert" ");" -.HP 40 -.BI "const ne_ssl_dname *ne_ssl_cert_subject(const\ ne_ssl_certificate\ *" "cert" ");" -.HP 39 -.BI "const ne_ssl_dname *ne_ssl_cert_issuer(const\ ne_ssl_certificate\ *" "cert" ");" -.SH "DESCRIPTION" -.PP -The function -\fBne_ssl_cert_identity\fR -retrieves the -\(lqidentity\(rq -of a certificate; for an SSL server certificate, this will be the hostname for which the certificate was issued. In PKI parlance, the identity is the -\fIcommon name\fR -attribute of the distinguished name of the certificate subject. -.PP -The functions -\fBne_ssl_cert_subject\fR -and -\fBne_ssl_cert_issuer\fR -can be used to access the objects representing the distinguished name of the subject and of the issuer of a certificate, respectively. -.PP -If a certificate object is part of a certificate chain, then -\fBne_ssl_cert_signedby\fR -can be used to find the certificate which signed a particular certificate. For a self\-signed certificate or a certificate for which the full chain is not available, this function will return -NULL. -.SH "RETURN VALUE" -.PP -\fBne_ssl_cert_issuer\fR -and -\fBne_ssl_cert_subject\fR -are guaranteed to never return -NULL. -\fBne_ssl_cert_identity\fR -may return -NULL -if the certificate has no specific -\(lqidentity\(rq. -\fBne_ssl_cert_signedby\fR -may return -NULL -as covered above. -.SH "EXAMPLES" -.PP -The following function could be used to display information about a given certificate: -.sp -.RS 4 -.nf -void dump_cert(const ne_ssl_certificate *cert) { - const char *id = ne_ssl_cert_identity(cert); - char *dn; - - if (id) - printf("Certificate was issued for '%s'.\en", id); - - dn = ne_ssl_readable_dname(ne_ssl_cert_subject(cert)); - printf("Subject: %s\en", dn); - free(dn); - - dn = ne_ssl_readable_dname(ne_ssl_cert_issuer(cert)); - printf("Issuer: %s\en", dn); - free(dn); -} -.fi -.RE -.SH "SEE ALSO" -.PP -ne_ssl_cert_cmp, -ne_ssl_readable_dname -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_ssl_cert_import.3 b/client/neon-0.27.2/doc/man/ne_ssl_cert_import.3 deleted file mode 100644 index 9c92144ab..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_cert_import.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_ssl_cert_read.3 diff --git a/client/neon-0.27.2/doc/man/ne_ssl_cert_issuer.3 b/client/neon-0.27.2/doc/man/ne_ssl_cert_issuer.3 deleted file mode 100644 index e752f3895..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_cert_issuer.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_ssl_cert_identity.3 diff --git a/client/neon-0.27.2/doc/man/ne_ssl_cert_read.3 b/client/neon-0.27.2/doc/man/ne_ssl_cert_read.3 deleted file mode 100644 index 5f5f4203d..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_cert_read.3 +++ /dev/null @@ -1,80 +0,0 @@ -.\" Title: ne_ssl_cert_read -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_SSL_CERT_READ" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_ssl_cert_read, ne_ssl_cert_write, ne_ssl_cert_import, ne_ssl_cert_export \- functions to read or write certificates to and from files or strings -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 37 -.BI "ne_ssl_certificate *ne_ssl_cert_read(const\ char\ *" "filename" ");" -.HP 22 -.BI "int ne_ssl_cert_write(const\ ne_ssl_certificate\ *" "cert" ", const\ char\ *" "filename" ");" -.HP 39 -.BI "ne_ssl_certificate *ne_ssl_cert_import(const\ char\ *" "data" ");" -.HP 25 -.BI "char *ne_ssl_cert_export(const\ ne_ssl_certificate\ *" "cert" ");" -.SH "DESCRIPTION" -.PP -The -\fBne_ssl_cert_write\fR -function writes a certificate to a file using the PEM encoding. The -\fBne_ssl_cert_export\fR -function returns a base64\-encoded -NUL\-terminated string representing the certificate. This string is malloc\-allocated and should be destroyed using -\fBfree\fR -by the caller. -.PP -The -\fBne_ssl_cert_read\fR -function reads a certificate from a PEM\-encoded file, and returns a certificate object. The -\fBne_ssl_cert_import\fR -function returns a certificate object from a base64\-encoded string, -\fIdata\fR, as returned by -\fBne_ssl_cert_export\fR. The certificate object returned by these functions should be destroyed using -ne_ssl_cert_free -after use. -.SH "RETURN VALUE" -.PP -\fBne_ssl_cert_read\fR -returns -NULL -if a certificate could not be read from the file. -\fBne_ssl_cert_write\fR -returns non\-zero if the certificate could not be written to the file. -\fBne_ssl_cert_export\fR -always returns a -NUL\-terminated string, and never -NULL. -\fBne_ssl_cert_import\fR -returns -NULL -if the string was not a valid base64\-encoded certificate. -.SH "ENCODING FORMATS" -.PP -The string produced by -\fBne_ssl_cert_export\fR -is the base64 encoding of the DER representation of the certificate. The file written by -\fBne_ssl_cert_write\fR -uses the PEM format: this is the base64 encoding of the DER representation with newlines every 64 characters, and start and end marker lines. -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_ssl_cert_signedby.3 b/client/neon-0.27.2/doc/man/ne_ssl_cert_signedby.3 deleted file mode 100644 index e752f3895..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_cert_signedby.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_ssl_cert_identity.3 diff --git a/client/neon-0.27.2/doc/man/ne_ssl_cert_subject.3 b/client/neon-0.27.2/doc/man/ne_ssl_cert_subject.3 deleted file mode 100644 index e752f3895..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_cert_subject.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_ssl_cert_identity.3 diff --git a/client/neon-0.27.2/doc/man/ne_ssl_cert_write.3 b/client/neon-0.27.2/doc/man/ne_ssl_cert_write.3 deleted file mode 100644 index 9c92144ab..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_cert_write.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_ssl_cert_read.3 diff --git a/client/neon-0.27.2/doc/man/ne_ssl_clicert_decrypt.3 b/client/neon-0.27.2/doc/man/ne_ssl_clicert_decrypt.3 deleted file mode 100644 index f9f7d9c82..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_clicert_decrypt.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_ssl_clicert_read.3 diff --git a/client/neon-0.27.2/doc/man/ne_ssl_clicert_encrypted.3 b/client/neon-0.27.2/doc/man/ne_ssl_clicert_encrypted.3 deleted file mode 100644 index f9f7d9c82..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_clicert_encrypted.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_ssl_clicert_read.3 diff --git a/client/neon-0.27.2/doc/man/ne_ssl_clicert_free.3 b/client/neon-0.27.2/doc/man/ne_ssl_clicert_free.3 deleted file mode 100644 index f9f7d9c82..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_clicert_free.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_ssl_clicert_read.3 diff --git a/client/neon-0.27.2/doc/man/ne_ssl_clicert_name.3 b/client/neon-0.27.2/doc/man/ne_ssl_clicert_name.3 deleted file mode 100644 index f9f7d9c82..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_clicert_name.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_ssl_clicert_read.3 diff --git a/client/neon-0.27.2/doc/man/ne_ssl_clicert_owner.3 b/client/neon-0.27.2/doc/man/ne_ssl_clicert_owner.3 deleted file mode 100644 index f9f7d9c82..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_clicert_owner.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_ssl_clicert_read.3 diff --git a/client/neon-0.27.2/doc/man/ne_ssl_clicert_read.3 b/client/neon-0.27.2/doc/man/ne_ssl_clicert_read.3 deleted file mode 100644 index 245f5454d..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_clicert_read.3 +++ /dev/null @@ -1,126 +0,0 @@ -.\" Title: ne_ssl_client_cert -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_SSL_CLIENT_CERT" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_ssl_clicert_read, ne_ssl_clicert_name, ne_ssl_clicert_encrypted, ne_ssl_clicert_decrypt, ne_ssl_clicert_owner, ne_ssl_clicert_free \- SSL client certificate handling -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 40 -.BI "ne_ssl_client_cert *ne_ssl_clicert_read(const\ char\ *" "filename" ");" -.HP 32 -.BI "const char *ne_ssl_clicert_name(const\ ne_ssl_client_cert\ *" "ccert" ");" -.HP 29 -.BI "int ne_ssl_clicert_encrypted(const\ ne_ssl_client_cert\ *" "ccert" ");" -.HP 27 -.BI "int ne_ssl_clicert_decrypt(ne_ssl_client_cert\ *" "ccert" ", const\ char\ *" "password" ");" -.HP 47 -.BI "const ne_ssl_certificate *ne_ssl_clicert_owner(const\ ne_ssl_client_cert\ *" "ccert" ");" -.HP 25 -.BI "void ne_ssl_clicert_free(ne_ssl_client_cert\ *" "ccert" ");" -.SH "DESCRIPTION" -.PP -The -\fBne_ssl_clicert_read\fR -function reads a -client certificate -from a PKCS#12\-formatted file, and returns an -\fBne_ssl_client_cert\fR -object. If the client certificate is encrypted, it must be decrypted before it is used. An -\fBne_ssl_client_cert\fR -object holds a client certificate and the associated private key, not just a certificate; the term "client certificate" will used to refer to this pair. -.PP -A client certificate can be in one of two states: -\fIencrypted\fR -or -\fIdecrypted\fR. The -\fBne_ssl_clicert_encrypted\fR -function will return non\-zero if the client certificate is in the -\fIencrypted\fR -state. A client certificate object returned by -\fBne_ssl_clicert_read\fR -may be initially in either state, depending on whether the file was encrypted or not. -.PP -\fBne_ssl_clicert_decrypt\fR -can be used to decrypt a client certificate using the appropriate password. This function must only be called if the object is in the -\fIencrypted\fR -state; if decryption fails, the certificate state does not change, so decryption can be attempted more than once using different passwords. -.PP -A client certificate can be given a "friendly name" when it is created; -\fBne_ssl_clicert_name\fR -will return this name (or -NULL -if no friendly name was specified). -\fBne_ssl_clicert_name\fR -can be used when the client certificate is in either the encrypted or decrypted state, and will return the same string for the lifetime of the object. -.PP -The function -\fBne_ssl_clicert_owner\fR -returns the certificate part of the client certificate; it must only be called if the client certificate is in the -\fIdecrypted\fR -state. -.PP -When the client certificate is no longer needed, the -\fBne_ssl_clicert_free\fR -function should be used to destroy the object. -.SH "RETURN VALUE" -.PP -\fBne_ssl_clicert_read\fR -returns a client certificate object, or -NULL -if the file could not be read. -\fBne_ssl_clicert_encrypted\fR -returns zero if the object is in the decrypted state, or non\-zero if it is in the encrypted state. -\fBne_ssl_clicert_name\fR -returns a -NUL\-terminated friendly name string, or -NULL. -\fBne_ssl_clicert_owner\fR -returns a certificate object. -.SH "EXAMPLES" -.PP -The following code reads a client certificate and decrypts it if necessary, then loads it into an HTTP session. -.sp -.RS 4 -.nf -ne_ssl_client_cert *ccert; - -ccert = ne_ssl_clicert_read("/path/to/client.p12"); - -if (ccert == NULL) { - /* handle error... */ -} else if (ne_ssl_clicert_encrypted(ccert)) { - char *password = prompt_for_password(); - - if (ne_ssl_clicert_decrypt(ccert, password)) { - /* could not decrypt! handle error... */ - } -} - -ne_ssl_set_clicert(sess, ccert); -.fi -.RE -.SH "SEE ALSO" -.PP -ne_ssl_cert_read -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_ssl_dname_cmp.3 b/client/neon-0.27.2/doc/man/ne_ssl_dname_cmp.3 deleted file mode 100644 index d2a16c238..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_dname_cmp.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_ssl_readable_dname.3 diff --git a/client/neon-0.27.2/doc/man/ne_ssl_readable_dname.3 b/client/neon-0.27.2/doc/man/ne_ssl_readable_dname.3 deleted file mode 100644 index 45da94b2c..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_readable_dname.3 +++ /dev/null @@ -1,61 +0,0 @@ -.\" Title: ne_ssl_dname -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_SSL_DNAME" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_ssl_readable_dname, ne_ssl_dname_cmp \- SSL distinguished name handling -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 34 -.BI "const char *ne_ssl_readable_dname(const\ ne_ssl_dname\ *" "dname" ");" -.HP 21 -.BI "int ne_ssl_dname_cmp(const\ ne_ssl_dname\ *" "dn1" ", const\ ne_ssl_dname\ *" "dn2" ");" -.SH "DESCRIPTION" -.PP -The -\fBne_ssl_readable_dname\fR -function creates a single\-line, human\-readable string out of an -\fBne_ssl_dname\fR -object. The returned string is -\fBmalloc\fR()\-allocated, and must be -\fBfree\fR()d by the caller. -.PP -The -\fBne_ssl_dname_cmp\fR -function compares two distinguished names, and returns zero if they are equal, or non\-zero otherwise. -.SH "RETURN VALUE" -.PP -\fBne_ssl_readable_dname\fR -returns a -\fBmalloc\fR\-allocated string, and never -NULL. -.SH "EXAMPLES" -.PP -See -ne_ssl_cert_subject -for an example use of -\fBne_ssl_readable_dname\fR. -.SH "SEE ALSO" -.PP -ne_ssl_cert_subject -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_ssl_set_verify.3 b/client/neon-0.27.2/doc/man/ne_ssl_set_verify.3 deleted file mode 100644 index faf71bf56..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_set_verify.3 +++ /dev/null @@ -1,136 +0,0 @@ -.\" Title: ne_ssl_set_verify -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_SSL_SET_VERIFY" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_ssl_set_verify \- register an SSL certificate verification callback -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.sp -.HP 29 -.BI "typedef int ne_ssl_verify_fn(void\ *" "userdata" ", int\ " "failures" ", const\ ne_ssl_certificate\ *" "cert" ");" -.HP 23 -.BI "void ne_ssl_set_verify(ne_session\ *" "session" ", ne_ssl_verify_fn\ " "verify_fn" ", void\ *" "userdata" ");" -.SH "DESCRIPTION" -.PP -To enable manual SSL certificate verification, a callback can be registered using -\fBne_ssl_set_verify\fR. If such a callback is not registered, when a connection is established to an SSL server which does not present a certificate signed by a trusted CA (see -ne_ssl_trust_cert), or if the certificate presented is invalid in some way, the connection will fail. -.PP -When the callback is invoked, the -\fIfailures\fR -parameter gives a bitmask indicating in what way the automatic certificate verification failed. The value is equal to the bit\-wise OR of one or more of the following constants (and is guaranteed to be non\-zero): -.PP -\fBNE_SSL_NOTYETVALID\fR -.RS 4 -The certificate is not yet valid. -.RE -.PP -\fBNE_SSL_EXPIRED\fR -.RS 4 -The certificate has expired. -.RE -.PP -\fBNE_SSL_IDMISMATCH\fR -.RS 4 -The hostname used for the session does not match the hostname to which the certificate was issued. -.RE -.PP -\fBNE_SSL_UNTRUSTED\fR -.RS 4 -The Certificate Authority which signed the certificate is not trusted. -.RE -.PP -Note that if either of the -\fBNE_SSL_IDMISMATCH\fR -or -\fBNE_SSL_UNTRUSTED\fR -failures is given, the connection may have been intercepted by a third party, and must not be presumed to be -\(lqsecure\(rq. -.PP -The -\fIcert\fR -parameter passed to the callback represents the certificate which was presented by the server. If the server presented a chain of certificates, the chain can be accessed using -ne_ssl_cert_signedby. The -\fIcert\fR -object given is not valid after the callback returns. -.SH "RETURN VALUE" -.PP -The verification callback must return zero to indicate that the certificate should be trusted; and non\-zero otherwise (in which case, the connection will fail). -.SH "EXAMPLES" -.PP -The following code implements an example verification callback, using the -\fBdump_cert\fR -function from -ne_ssl_cert_subject -to display certification information. Notice that the hostname of the server used for the session is passed as the -\fIuserdata\fR -parameter to the callback. -.sp -.RS 4 -.nf -static int -my_verify(void *userdata, int failures, const ne_ssl_certificate *cert) -{ - const char *hostname = userdata; - - dump_cert(cert); - - puts("Certificate verification failed \- the connection may have been " - "intercepted by a third party!"); - - if (failures & NE_SSL_IDMISMATCH) { - const char *id = ne_ssl_cert_identity(cert); - if (id) - printf("Server certificate was issued to '%s' not '%s'.\en", - id, hostname); - else - printf("The certificate was not issued for '%s'\en", hostname); - } - - if (failures & NE_SSL_UNTRUSTED) - puts("The certificate is not signed by a trusted Certificate Authority."); - - /* ... check for validity failures ... */ - - if (prompt_user()) - return 1; /* fail verification */ - else - return 0; /* trust the certificate anyway */ -} - -int -main(...) -{ - ne_session *sess = ne_session_create("https", "some.host.name", 443); - ne_ssl_set_verify(sess, my_verify, "some.host.name"); - ... -} -.fi -.RE -.SH "SEE ALSO" -.PP -ne_ssl_trust_cert, -ne_ssl_readable_dname, -ne_ssl_cert_subject -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_ssl_trust_cert.3 b/client/neon-0.27.2/doc/man/ne_ssl_trust_cert.3 deleted file mode 100644 index 9cd77b8c0..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_trust_cert.3 +++ /dev/null @@ -1,64 +0,0 @@ -.\" Title: ne_ssl_trust_cert -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_SSL_TRUST_CERT" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_ssl_trust_cert, ne_ssl_trust_default_ca \- functions to indicate that certificates are trusted -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 23 -.BI "void ne_ssl_trust_cert(ne_session\ *" "session" ", const\ ne_ssl_certificate\ *" "cert" ");" -.HP 29 -.BI "void ne_ssl_trust_default_ca(ne_session\ *" "session" ");" -.SH "DESCRIPTION" -.PP -To indicate that a given certificate is trusted by the user, the certificate object can be passed to -\fBne_ssl_trust_cert\fR. The certificate object is duplicated internally and can subsequently be destroyed. -.PP -The SSL library in use by neon may include a default set of CA certificates; calling the -\fBne_ssl_trust_default_ca\fR -function will indicate that these CAs are trusted by the user. -.SH "EXAMPLES" -.PP -Load the CA certificate stored in -\fI/path/to/cacert.pem\fR: -.sp -.RS 4 -.nf -ne_session *sess = ne_session_create(...); -ne_ssl_certificate *cert = ne_ssl_cert_read("/path/to/cacert.pem"); - -if (cert) { - ne_ssl_trust_cert(sess, cert); - ne_ssl_cert_free(cert); -} else { - printf("Could not load CA cert: %s\en", ne_get_error(sess)); -} -.fi -.RE -.SH "SEE ALSO" -.PP -ne_ssl_cert_read, -ne_ssl_cert_import, -ne_ssl_cert_free -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_ssl_trust_default_ca.3 b/client/neon-0.27.2/doc/man/ne_ssl_trust_default_ca.3 deleted file mode 100644 index 49af8c56d..000000000 --- a/client/neon-0.27.2/doc/man/ne_ssl_trust_default_ca.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_ssl_trust_cert.3 diff --git a/client/neon-0.27.2/doc/man/ne_status.3 b/client/neon-0.27.2/doc/man/ne_status.3 deleted file mode 100644 index 88f0cd9b6..000000000 --- a/client/neon-0.27.2/doc/man/ne_status.3 +++ /dev/null @@ -1,87 +0,0 @@ -.\" Title: ne_status -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_STATUS" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_status \- HTTP status structure -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include - -typedef struct { - int major_version, minor_version; - int code, klass; - const char *reason_phrase; -} ne_status; -.fi -.ft -.SH "DESCRIPTION" -.PP -An -\fBne_status\fR -type represents an HTTP response status; used in response messages giving a result of request. The -major_version -and -minor_version -fields give the HTTP version supported by the server issuing the response. The -code -field gives the status code of the result (lying between 100 and 999 inclusive), and the -klass -field gives the class\&[1], which is equal to the most significant digit of the status. -.PP -There are five classes of HTTP status code defined by RFC2616: -.PP -1xx -.RS 4 -Informational response. -.RE -.PP -2xx -.RS 4 -Success: the operation was successful -.RE -.PP -3xx -.RS 4 -Redirection -.RE -.PP -4xx -.RS 4 -Client error: the request made was incorrect in some manner. -.RE -.PP -5xx -.RS 4 -Server error -.RE -.SH "SEE ALSO" -.PP -ne_get_status. -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" -.SH "REFERENCES" -.IP " 1." 4 -the field is named -\(lqklass\(rq -not -\(lqclass\(rq -so that the header can be used from a C++ program, in which -\(lqclass\(rq -is a reserved word) - diff --git a/client/neon-0.27.2/doc/man/ne_strdup.3 b/client/neon-0.27.2/doc/man/ne_strdup.3 deleted file mode 100644 index 8564fc1af..000000000 --- a/client/neon-0.27.2/doc/man/ne_strdup.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_malloc.3 diff --git a/client/neon-0.27.2/doc/man/ne_strndup.3 b/client/neon-0.27.2/doc/man/ne_strndup.3 deleted file mode 100644 index 8564fc1af..000000000 --- a/client/neon-0.27.2/doc/man/ne_strndup.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_malloc.3 diff --git a/client/neon-0.27.2/doc/man/ne_token.3 b/client/neon-0.27.2/doc/man/ne_token.3 deleted file mode 100644 index e5a5e2fc9..000000000 --- a/client/neon-0.27.2/doc/man/ne_token.3 +++ /dev/null @@ -1,68 +0,0 @@ -.\" Title: ne_token -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_TOKEN" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_token, ne_qtoken \- string tokenizers -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 15 -.BI "char *ne_token(char\ **" "str" ", char\ " "sep" ");" -.HP 16 -.BI "char *ne_qtoken(char\ **" "str" ", char\ " "sep" ", const\ char\ *" "quotes" ");" -.SH "DESCRIPTION" -.PP -\fBne_token\fR -and -\fBne_qtoken\fR -tokenize the string at the location stored in the pointer -\fIstr\fR. Each time the function is called, it returns the next token, and modifies the -\fIstr\fR -pointer to point to the remainer of the string, or -NULL -if there are no more tokens in the string. A token is delimited by the separator character -\fIsep\fR; if -\fBne_qtoken\fR -is used any quoted segments of the string are skipped when searching for a separator. A quoted segment is enclosed in a pair of one of the characters given in the -\fIquotes\fR -string. -.PP -The string being tokenized is modified each time the tokenizing function is called; replacing the next separator character with a -NUL -terminator. -.SH "EXAMPLES" -.PP -The following function prints out each token in a comma\-separated string -\fIlist\fR, which is modified in\-place: -.sp -.RS 4 -.nf -static void splitter(char *list) -{ - do { - printf("Token: %s\en", ne_token(&list, ',')); - while (list); -} -.fi -.RE -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_version_match.3 b/client/neon-0.27.2/doc/man/ne_version_match.3 deleted file mode 100644 index 27e35e8dd..000000000 --- a/client/neon-0.27.2/doc/man/ne_version_match.3 +++ /dev/null @@ -1,57 +0,0 @@ -.\" Title: ne_version_match -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_VERSION_MATCH" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_version_match, ne_version_string \- library versioning -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 21 -.BI "int ne_version_match(int\ " "major" ", int\ " "minor" ");" -.HP 30 -.BI "const char *ne_version_string(void);" -.SH "DESCRIPTION" -.PP -The -\fBne_version_match\fR -function returns non\-zero if the library version is not of major version -\fImajor\fR, or the minor version is less than -\fIminor\fR. For neon versions 0.x, every minor version is assumed to be incompatible with every other minor version. -.PP -The -\fBne_version_string\fR -function returns a string giving the library version. -.SH "EXAMPLES" -.PP -To require neon 1.x, version 1.2 or later: -.sp -.RS 4 -.nf -if (ne_version_match(1, 2)) { - printf("Library version out of date: 1.2 required, found %s.", - ne_version_string()); - exit(1); -} -.fi -.RE -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_version_string.3 b/client/neon-0.27.2/doc/man/ne_version_string.3 deleted file mode 100644 index 4f3447d9c..000000000 --- a/client/neon-0.27.2/doc/man/ne_version_string.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_version_match.3 diff --git a/client/neon-0.27.2/doc/man/ne_xml_create.3 b/client/neon-0.27.2/doc/man/ne_xml_create.3 deleted file mode 100644 index 1a264d4ac..000000000 --- a/client/neon-0.27.2/doc/man/ne_xml_create.3 +++ /dev/null @@ -1,46 +0,0 @@ -.\" Title: ne_xml_create -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NE_XML_CREATE" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -ne_xml_create, ne_xml_destroy \- create and destroy an XML parser -.SH "SYNOPSIS" -.sp -.ft B -.nf -#include -.fi -.ft -.HP 29 -.BI "ne_xml_parser *ne_xml_create(void);" -.HP 20 -.BI "void ne_xml_destroy(ne_xml_parser\ *" "parser" ");" -.SH "DESCRIPTION" -.PP -The -\fBne_xml_create\fR -function creates an XML parser object, which can be used for parsing XML documents using stacked SAX handlers. -.SH "RETURN VALUE" -.PP -\fBne_xml_create\fR -returns a pointer to an XML parser object, and never -NULL -.SH "SEE ALSO" -.PP -XXX -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/ne_xml_destroy.3 b/client/neon-0.27.2/doc/man/ne_xml_destroy.3 deleted file mode 100644 index e601ac3d1..000000000 --- a/client/neon-0.27.2/doc/man/ne_xml_destroy.3 +++ /dev/null @@ -1 +0,0 @@ -.so man3/ne_xml_create.3 diff --git a/client/neon-0.27.2/doc/man/neon-config.1 b/client/neon-0.27.2/doc/man/neon-config.1 deleted file mode 100644 index 93be22bea..000000000 --- a/client/neon-0.27.2/doc/man/neon-config.1 +++ /dev/null @@ -1,104 +0,0 @@ -.\" Title: neon-config -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NEON\-CONFIG" "1" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -neon\-config \- script providing information about installed copy of neon library -.SH "SYNOPSIS" -.HP 12 -\fBneon\-config\fR [\fB\-\-prefix\fR] [[\fB\-\-cflags\fR] | [\fB\-\-libs\fR] | [\fB\-\-la\-file\fR] | [\fB\-\-support\fR\ \fIfeature\fR] | [\fB\-\-help\fR] | [\fB\-\-version\fR]] -.SH "DESCRIPTION" -.PP -The -\fBneon\-config\fR -script provides information about an installed copy of the neon library. The -\fB\-\-cflags\fR -and -\fB\-\-libs\fR -options instruct how to compile and link an application against the library; the -\fB\-\-version\fR -and -\fB\-\-support\fR -options can help determine whether the library meets the applications requirements. -.SH "OPTIONS" -.PP -\fB\-\-cflags\fR -.RS 4 -Print the flags which should be passed to the C compiler when compiling object files, when the object files use neon header files. -.RE -.PP -\fB\-\-libs\fR -.RS 4 -Print the flags which should be passed to the linker when linking an application which uses the neon library -.RE -.PP -\fB\-\-la\-file\fR -.RS 4 -Print the location of the libtool library script, -\fIlibneon.la\fR, which can be used to link against neon by applications using libtool. -.RE -.PP -\fB\-\-version\fR -.RS 4 -Print the version of the library -.RE -.PP -\fB\-\-prefix\fR \fIdir\fR -.RS 4 -If -\fIdir\fR -is given; relocate output of -\fB\-\-cflags\fR -and -\fB\-\-libs\fR -as if neon was installed in given prefix directory. Otherwise, print the installation prefix of the library. -.RE -.PP -\fB\-\-support\fR \fIfeature\fR -.RS 4 -The script exits with success if -\fIfeature\fR -is supported by the library. -.RE -.PP -\fB\-\-help\fR -.RS 4 -Print help message; includes list of known features and whether they are supported or not. -.RE -.SH "EXAMPLE" -.PP -Below is a Makefile fragment which could be used to build an application against an installed neon library, when the -\fBneon\-config\fR -script can be found in -\fB$PATH\fR. -.sp -.RS 4 -.nf -CFLAGS = `neon\-config \-\-cflags` -LIBS = `neon\-config \-\-libs` -OBJECTS = myapp.o -TARGET = myapp - -$(TARGET): $(OBJECTS) - $(CC) $(LDFLAGS) \-o $(TARGET) $(OBJECTS) $(LIBS) - -myapp.o: myapp.c - $(CC) $(CFLAGS) \-c myapp.c \-o myapp.o -.fi -.RE -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/man/neon.3 b/client/neon-0.27.2/doc/man/neon.3 deleted file mode 100644 index 05f3509a9..000000000 --- a/client/neon-0.27.2/doc/man/neon.3 +++ /dev/null @@ -1,170 +0,0 @@ -.\" Title: neon -.\" Author: -.\" Generator: DocBook XSL Stylesheets v1.72.0 -.\" Date: 25 September 2007 -.\" Manual: neon API reference -.\" Source: neon 0.27.2 -.\" -.TH "NEON" "3" "25 September 2007" "neon 0.27.2" "neon API reference" -.\" disable hyphenation -.nh -.\" disable justification (adjust text to left margin only) -.ad l -.SH "NAME" -neon \- HTTP and WebDAV client library -.SH "DESCRIPTION" -.PP -neon is an HTTP and WebDAV client library. The major abstractions exposed are the HTTP -\fIsession\fR, created by -ne_session_create; and the HTTP -\fIrequest\fR, created by -ne_request_create. HTTP authentication is handled transparently for server and proxy servers, see -ne_set_server_auth; complete SSL/TLS support is also included, see -ne_ssl_set_verify. -.SH "CONVENTIONS" -.PP -Some conventions are used throughout the neon API, to provide a consistent and simple interface; these are documented below. -.SS "Thread\-safeness and global initialization" -.PP -neon itself is implemented to be thread\-safe (avoiding any use of global state), but relies on the operating system providing a thread\-safe resolver interface. Modern operating systems offer the thread\-safe -\fBgetaddrinfo\fR -interface, which neon supports; some others implement -\fBgethostbyname\fR -using thread\-local storage. -.PP -To allow thread\-safe use of SSL in the OpenSSL and GnuTLS libraries neon must be configured using the -\-\-enable\-threadsafe\-ssl; if this is done, locking callbacks will be registered by -ne_sock_init; note that care must be exercised if neon is used in conjunction with another library which uses OpenSSL or GnuTLS. -.PP -Some platforms and libraries used by neon require global initialization before use; notably: -.RS 4 -\h'-04'\(bu\h'+03'The -SIGPIPE -signal disposition must be set to -\fIignored\fR. -.RE -.RS 4 -\h'-04'\(bu\h'+03'OpenSSL requires global initialization to load shared lookup tables. -.RE -.RS 4 -\h'-04'\(bu\h'+03'The SOCKS library requires initialization before use. -.RE -.RS 4 -\h'-04'\(bu\h'+03'The Win32 socket library requires initialization before use. -.RE -.sp -.RE -The -ne_sock_init -function should be called before any other use of neon to perform any necessary initialization needed for the particular platform. -.PP -For some applications it may be necessary to call -ne_i18n_init -to initialize the internationalization support in neon. -.SS "Functions using global state" -.PP -Any function call in neon may modify the -errno -global variable as a side\-effect. Except where explicitly documented, the value of -errno -is unspecified after any neon function call. -.PP -Other than in the use of -errno, the only functions which use or modify process\-global state in neon are as follows: -.RS 4 -\h'-04'\(bu\h'+03'ne_sock_init, -ne_i18n_init, and -ne_sock_exit, as described above -.RE -.RS 4 -\h'-04'\(bu\h'+03'\fBne_debug_init\fR -and -\fBne_debug\fR, if enabled at compile time; for debugging output -.RE -.RS 4 -\h'-04'\(bu\h'+03'ne_oom_callback -for installing a process\-global callback to be invoked on -\fBmalloc\fR -failure -.RE -.SS "Namespaces" -.PP -To avoid possible collisions between names used for symbols and preprocessor macros by an application and the libraries it uses, it is good practice for each library to reserve a particular -\fInamespace prefix\fR. An application which ensures it uses no names with these prefixes is then guaranteed to avoid such collisions. -.PP -The neon library reserves the use of the namespace prefixes -ne_ -and -NE_. The libraries used by neon may also reserve certain namespaces; collisions between these libraries and a neon\-based application will not be detected at compile time, since the underlying library interfaces are not exposed through the neon header files. Such collisions can only be detected at link time, when the linker attempts to resolve symbols. The following list documents some of the namespaces claimed by libraries used by neon; this list may be incomplete. -.PP -SSL, ssl, TLS, tls, ERR_, BIO_, d2i_, i2d_, ASN1_ -.RS 4 -Some of the many prefixes used by the OpenSSL library; little attempt has been made to keep exported symbols within any particular prefixes for this library. -.RE -.PP -gnutls_, gcry_, gpg_ -.RS 4 -Namespaces used by the GnuTLS library (and dependencies thereof) -.RE -.PP -XML_, Xml[A\-Z] -.RS 4 -Namespaces used by the expat library. -.RE -.PP -xml[A\-Z], html[A\-Z], docb[A\-Z] -.RS 4 -Namespaces used by the libxml2 library; a relatively small number of symbols are used without these prefixes. -.RE -.PP -inflate, deflate, crc32, compress, uncompres, adler32, zlib -.RS 4 -Namespaces used by the zlib library; a relatively small number of symbols are used without these prefixes. -.RE -.PP -krb5, gss, GSS, asn1, decode_krb5, encode_krb5, profile, mit -.RS 4 -Some of the prefixes used by the MIT GSSAPI library and dependencies thereof; a number of symbols lie outside these prefixes. -.RE -.SS "Argument validation" -.PP -neon does not attempt to validate that the parameters passed to functions conform to the API (for instance, checking that pointer arguments are not -NULL). Any use of the neon API which is not documented to produce a certain behaviour results is said to produce -\fIundefined behaviour\fR; it is likely that neon will segfault under these conditions. -.SS "URI paths, WebDAV metadata" -.PP -The path strings passed to any function must be -\fIURI\-encoded\fR -by the application; neon never performs any URI encoding or decoding internally. WebDAV property names and values must be valid UTF\-8 encoded Unicode strings. -.SS "User interaction" -.PP -As a pure library interface, neon will never produce output on -\fBstdout\fR -or -\fBstderr\fR; all user interaction is the responsibilty of the application. -.SS "Memory handling" -.PP -neon does not attempt to cope gracefully with an out\-of\-memory situation; instead, by default, the -\fBabort\fR -function is called to immediately terminate the process. An application may register a custom function which will be called before -\fBabort\fR -in such a situation; see -ne_oom_callback. -.SS "Callbacks and userdata" -.PP -Whenever a callback is registered, a -userdata -pointer is also used to allow the application to associate a context with the callback. The userdata is of type -\fBvoid *\fR, allowing any pointer to be used. -.SH "SEE ALSO" -.PP -ne_session_create(3), -ne_oom_callback -.SH "AUTHOR" -.PP -\fBJoe Orton\fR <\&neon@webdav.org\&> -.sp -1n -.IP "" 4 -Author. -.SH "COPYRIGHT" - diff --git a/client/neon-0.27.2/doc/manual.css b/client/neon-0.27.2/doc/manual.css deleted file mode 100644 index feca0a1ea..000000000 --- a/client/neon-0.27.2/doc/manual.css +++ /dev/null @@ -1,42 +0,0 @@ - -p, pre.funcsynopsisinfo { margin-left: 0.4em; margin-right: 0.4em; } - -span.term { margin-left: 0.6em; margin-bottom: 0.0em } - -div.legalnotice { font-size: 80%; margin-left: 2em; } - -a:visited { color: darkgreen; } - -div.navheader { border-top: 1px solid #bbf2bb; } -div.navfooter { border-bottom: 1px solid #bbf2bb; } - -div.funcprototype { margin-top: 0.2em; margin-left: 0.4em; margin-bottom: 0.2em; } - -pre.programlisting, pre.screen { - background-color: #dddddd; - margin-left: 0.6em; margin-right: 1em; - padding: 0.3em; width: 50em; -} - -div.funcsynopsis, div.cmdsynopsis { - background-color: #dddddd; - margin-left: 0.4em; margin-right: 0.4em; - padding: 0.1em; -} - -div.warning { - border: 1px solid #777777; -} - -h1.title { border-bottom: thick solid #bbf2bb; padding-bottom: 0.1em; } - -div.toc { - border-left: thick solid #bbf2bb; padding-left: 0.5em; - } - -h2, h3 { padding-left: 0.2em; padding-top: -0.1em; } - -h2 { background-color: #bbf2bb; font-size: 110%; - padding-bottom: 0.3em; padding-top: 0.2em; spacing-top: 0.1em; } - -h3 { border-bottom: 1px solid #bbf2bb; } diff --git a/client/neon-0.27.2/doc/manual.xml b/client/neon-0.27.2/doc/manual.xml deleted file mode 100644 index 3641b7762..000000000 --- a/client/neon-0.27.2/doc/manual.xml +++ /dev/null @@ -1,203 +0,0 @@ - - - - - -%isoent; -%isopub; - - - - - - - - - - -NULL"> - -NUL"> - - -start-element"> -character-data"> -end-element"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -]> - - - - neon HTTP/WebDAV client library - - JoeOrton - -
neon@webdav.org
-
-
- 2001-2006Joe Orton - - - - This document is free documentation; 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 document 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., 675 Mass Ave, Cambridge, MA 02139, - USA. - - - -
- - - Introduction - - This chapter provides an introduction to neon, giving an -overview of the range of features offered, and some general guidelines -for using the neon API. - - neon aims to provide a modern, flexible, and simple API -in the C programming language for implementing HTTP and WebDAV -support. The WebDAV functionality is entirely separate from the basic -HTTP functionality; neon can be used simply as an HTTP client library, -ignoring the WebDAV support if desired. - - §ion.features; - - §ion.using; - - - - - The &neon; C language interface - - The documentation for the &neon; interface is split between - this chapter, which gives a broad introduction to the abstractions - exposed by the library, and , which gives a - function-by-function breakdown of the interface. - - §ion.xml; - - - - - - - - - - neon API reference - &date; - neon - &version; - - - neon API reference - - &refneon; - &refconfig; - - &refresolve; - &refbuf; - &refbufapp; - &refbufutil; - &refbufcr; - &refbufdest; - &referr; - &refgetst; - &reffeat; - &refi18n; - &refiaddr; - &refalloc; - &refsess; - &refreq; - &refreqhdr; - &refresphdr; - &refopts; - &refreqopts; - &refreqbody; - &refauth; - &refshave; - &refinit; - &refsslcert; - &refsslcert2; - &refsslcertio; - &refssldname; - &refssltrust; - &refsslvfy; - &refclicert; - &refstatus; - &reftok; - &refvers; - &refxml; - - - - - - -&biblio; - -
diff --git a/client/neon-0.27.2/doc/parsing-xml.txt b/client/neon-0.27.2/doc/parsing-xml.txt deleted file mode 100644 index dc3e467a5..000000000 --- a/client/neon-0.27.2/doc/parsing-xml.txt +++ /dev/null @@ -1,170 +0,0 @@ - -Requirements for XML parsing in neon ------------------------------------- - -Before describing the interface given in neon for parsing XML, here -are the requirements which it must satisfy: - - 1. to support using either libxml or expat as the underlying parser - 2. to allow "independent" sections to handle parsing one XML - document - 3. to map element namespaces/names to an integer for easier - comparison. - -A description of requirement (2) is useful since it is the "hard" -requirement, and adds most of the complexity of interface: WebDAV -PROPFIND responses are made up of a large boilerplate XML - - ... etc. - -neon should handle the parsing of these standard elements, and expose -the meaning of the response using a convenient interface. But, within -the elements, there may also be fragments of XML: neon can -never know how to parse these, since they are property- and hence -application-specific. The simplest example of this is the -DAV:resourcetype property. - -So there is requirement (2) that two "independent" sections of code -can handle the parsing of one XML document. - -Callback-based XML parsing --------------------------- - -There are two ways of parsing XML documents commonly used: - - 1. Build an in-memory tree of the document - 2. Use callbacks - -Where practical, using callbacks is more efficient than building a -tree, so this is what neon uses. The standard interface for -callback-based XML parsing is called SAX, so understanding the SAX -interface is useful to understanding the XML parsing interface -provided by neon. - -The SAX interface works by registering callbacks which are called *as -the XML is parsed*. The most important callbacks are for 'start -element' and 'end element'. For instance, if the XML document below is -parsed by a SAX-like interface: - - - - - -Say we have registered callbacks "startelm" for 'start element' and -"endelm" for 'end element'. Simplified somewhat, the callbacks will -be called in this order, with these arguments: - - 1. startelm("hello") - 2. startelm("foobar") - 3. endelm("foobar") - 4. endelm("hello") - -See the expat 'xmlparse.h' header for a more complete definition of a -SAX-like interface. - -The hip_xml interface ---------------------- - -The hip_xml interface satisfies requirement (2) by introducing the -"handler" concept. A handler is made up of these things: - - - a set of XML elements - - a callback to validate an element - - a callback which is called when an element is opened - - a callback which is called when an element is closed - - (optionally, a callback which is called for CDATA) - -Registering a handler essentially says: - - "If you encounter any of this set of elements, I want these - callbacks to be called." - -Handlers are kept in a STACK inside hip_xml. The first handler -registered becomes the BASE of the stack, subsequent handlers are -PUSHed on top. - -During XML parsing, the handler which is used for an XML element is -recorded. When a new element is started, the search for a handler for -this element begins at the handler used for the parent element, and -carries on up the stack. For the root element, the search always -starts at the BASE of the stack. - -A user's guide to hip_xml -------------------------- - -The first thing to do when using hip_xml is to know what set of XML -elements you are going to be parsing. This can usually be done by -looking at the DTD provided for the documents you are going to be -parsing. The DTD is also very useful in writing the 'validate' -callback function, since it can tell you what parent/child pairs are -valid, and which aren't. - -In this example, we'll parse XML documents which look like: - - - foo - bar - - -So, given the set of elements, declare the element id's and the -element array: - -#define ELM_listofthings (HIP_ELM_UNUSED) -#define ELM_a_thing (HIP_ELM_UNUSED + 1) - -const static struct my_elms[] = { - { "http://things.org/", "list-of-things", ELM_listofthings, 0 }, - { "http://things.org/", "a-thing", ELM_a_thing, HIP_XML_CDATA }, - { NULL } -}; - -This declares we know about two elements: list-of-things, and a-thing, -and that the 'a-thing' element contains character data. - -The definition of the validation callback is very simple: - -static int validate(hip_xml_elmid parent, hip_xml_elmid child) -{ - /* Only allow 'list-of-things' as the root element. */ - if (parent == HIP_ELM_root && child == ELM_listofthings || - parent = ELM_listofthings && child == ELM_a_thing) { - return HIP_XML_VALID; - } else { - return HIP_XML_INVALID; - } -} - -For this example, we can ignore the start-element callback, and just -use the end-element callback: - -static int endelm(void *userdata, const struct hip_xml_elm *s, - const char *cdata) -{ - printf("Got a thing: %s\n", cdata); - return 0; -} - -This endelm callback just prints the cdata which was contained in the -"a-thing" element. - -Now, on to parsing. A new parser object is created for parsing each -XML document. Creating a new parser object is as simple as: - - hip_xml_parser *parser; - - parser = hip_xml_create(); - -Next register the handler, passing NULL as the start-element callback, -and also as userdata, which we don't use here. - - hip_xml_push_handler(parser, my_elms, - validate, NULL, endelm, - NULL); - -Finally, call hip_xml_parse, passing the chunks of XML document to the -hip_xml as you get them. The output should be: - - Got a thing: foo - Got a thing: bar - -for the XML document. diff --git a/client/neon-0.27.2/doc/ref/alloc.xml b/client/neon-0.27.2/doc/ref/alloc.xml deleted file mode 100644 index 872f084f2..000000000 --- a/client/neon-0.27.2/doc/ref/alloc.xml +++ /dev/null @@ -1,87 +0,0 @@ - - - - ne_malloc - 3 - - - - ne_malloc - ne_calloc - ne_realloc - ne_strdup - ne_strndup - ne_oom_callback - memory allocation wrappers - - - - - - - #include <ne_alloc.h> - - - void *ne_malloc - size_t size - - - - void *ne_calloc - size_t size - - - - void *ne_realloc - void *size - size_t len - - - - char *ne_strdup - const char *s - - - - char *ne_strndup - const char *s - size_t size - - - - void ne_oom_callback - void (*callback)(void) - - - - - - - - Description - - The functions ne_malloc, -ne_calloc, ne_realloc, -ne_strdup and ne_strdnup -provide wrappers for the equivalent functions in the standard C -library. The wrappers provide the extra guarantee that if the C -library equivalent returns &null; when no memory is available, an -optional callback will be called, and the library will then call -abort(). - - ne_oom_callback registers a callback -which will be invoked if an out of memory error is detected. - - - - - Notes - - If the operating system uses optimistic memory -allocation, the C library memory allocation routines will not return -&null;, so it is not possible to gracefully handle memory allocation -failures. - - - - diff --git a/client/neon-0.27.2/doc/ref/auth.xml b/client/neon-0.27.2/doc/ref/auth.xml deleted file mode 100644 index b829fbbe7..000000000 --- a/client/neon-0.27.2/doc/ref/auth.xml +++ /dev/null @@ -1,114 +0,0 @@ - - - - ne_set_server_auth - 3 - - - - ne_set_server_auth - ne_set_proxy_auth - ne_forget_auth - register authentication callbacks - - - - - - - #include <ne_auth.h> - - - typedef int (*ne_auth_creds) - void *userdata - const char *realm - int attempt - char *username - char *password - - - - void ne_set_server_auth - ne_session *session - ne_auth_creds callback - void *userdata - - - - void ne_set_proxy_auth - ne_session *session - ne_auth_creds callback - void *userdata - - - - void ne_forget_auth - ne_session *session - - - - - - - - Description - - The ne_auth_creds function type defines a -callback which is invoked when a server or proxy server requires user -authentication for a particular request. The -realm string is supplied by the server. The attempt is a counter giving the -number of times the request has been retried with different -authentication credentials. The first time the callback is invoked -for a particular request, attempt will be zero. - - To retry the request using new authentication -credentials, the callback should return zero, and the -username and password -buffers must contain &nul;-terminated strings. The -NE_ABUFSIZ constant gives the size of these -buffers. - - - If you only wish to allow the user one attempt to enter -credentials, use the value of the attempt -parameter as the return value of the callback. - - - To abort the request, the callback should return a -non-zero value; in which case the contents of the -username and password -buffers are ignored. - - The ne_forget_auth function can be -used to discard the cached authentication credentials. - - - - - Examples - - -/* Function which prompts for a line of user input: */ -extern char *prompt_for(const char *prompt); - -static int -my_auth(void *userdata, const char *realm, int attempts, - char *username, char *password) -{ - strncpy(username, prompt_for("Username: "), NE_ABUFSIZ); - strncpy(password, prompt_for("Password: "), NE_ABUFSIZ); - return attempts; -} - -int main(...) -{ - &egsess; - - ne_set_server_auth(sess, my_auth, NULL); - - /* ... */ -} - - - diff --git a/client/neon-0.27.2/doc/ref/buf.xml b/client/neon-0.27.2/doc/ref/buf.xml deleted file mode 100644 index 68b515c5b..000000000 --- a/client/neon-0.27.2/doc/ref/buf.xml +++ /dev/null @@ -1,53 +0,0 @@ - - - - ne_buffer - 3 - - - - ne_buffer - string buffer handling - - - - - #include <ne_string.h> - -typedef struct { - char *data; - size_t used; - size_t length; -} ne_buffer; - - - - - Description - - The ne_buffer type represents an expandable -memory buffer for holding &nul;-terminated strings. The -data field points to the beginnning of the -string, the length of which is given by the -used field. The current size of memory -allocated is given by the length field. It -is not recommended that the fields of a buffer are manipulated -directly. The data pointer may change when -the buffer is modified. - - A buffer is created using or , and destroyed using or . -The functions , and are -used to append data to a buffer. - - If the string referenced by the -data pointer is modified directly (rather -than using one of the functions listed above), -ne_buffer_altered must be called. - - - - diff --git a/client/neon-0.27.2/doc/ref/bufapp.xml b/client/neon-0.27.2/doc/ref/bufapp.xml deleted file mode 100644 index a75ce8137..000000000 --- a/client/neon-0.27.2/doc/ref/bufapp.xml +++ /dev/null @@ -1,89 +0,0 @@ - - - - ne_buffer_append - 3 - - - - ne_buffer_append - ne_buffer_zappend - ne_buffer_concat - append data to a string buffer - - - - - - - #include <ne_string.h> - - - void ne_buffer_append - ne_buffer *buf - const char *string - size_t len - - - - void ne_buffer_zappend - ne_buffer *buf - const char *string - - - - void ne_buffer_concat - ne_buffer *buf - const char *str - ... - - - - - - - - Description - - The ne_buffer_append and -ne_buffer_zappend functions append a string to -the end of a buffer; extending the buffer as necessary. The -len passed to -ne_buffer_append specifies the length of the -string to append; there must be no &nul; terminator in the first -len bytes of the string. -ne_buffer_zappend must be passed a -&nul;-terminated string. - - The ne_buffer_concat function takes -a variable-length argument list following str; -each argument must be a char * pointer to a -&nul;-terminated string. A &null; pointer must be given as the last -argument to mark the end of the list. The strings (including -str) are appended to the buffer in the order -given. None of the strings passed to -ne_buffer_concat are modified. - - - - - Examples - - The following code will output "Hello, world. -And goodbye.". - - ne_buffer *buf = ne_buffer_create(); -ne_buffer_zappend(buf, "Hello"); -ne_buffer_concat(buf, ", world. ", "And ", "goodbye.", NULL); -puts(buf->data); -ne_buffer_destroy(buf); - - - - See also - - , , - - - - diff --git a/client/neon-0.27.2/doc/ref/bufcr.xml b/client/neon-0.27.2/doc/ref/bufcr.xml deleted file mode 100644 index 0c572a6ea..000000000 --- a/client/neon-0.27.2/doc/ref/bufcr.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - ne_buffer_create - 3 - - - - ne_buffer_create - ne_buffer_ncreate - general purpose of group of functions - - - - - - - #include <ne_alloc.h> - - - ne_buffer *ne_buffer_create - - - - - ne_buffer *ne_buffer_ncreate - size_t size - - - - - - - - Description - - ne_buffer_create creates a new -buffer object, with an implementation-defined initial size. -ne_buffer_ncreate creates an -ne_buffer where the minimum initial size is given in the -size parameter. The buffer created will -contain the empty string (""). - - - - - Return value - - Both functions return a pointer to a new buffer object, -and never &null;. - - - - - See also - - - - - diff --git a/client/neon-0.27.2/doc/ref/bufdest.xml b/client/neon-0.27.2/doc/ref/bufdest.xml deleted file mode 100644 index 5dc4dfc4c..000000000 --- a/client/neon-0.27.2/doc/ref/bufdest.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - ne_buffer_destroy - 3 - - - - ne_buffer_destroy - ne_buffer_finish - destroy a buffer object - - - - - - - #include <ne_string.h> - - - void ne_buffer_destroy - ne_buffer *buf - - - - char *ne_buffer_finish - ne_buffer *buf - - - - - - - - Description - - ne_buffer_destroy frees all memory -associated with the buffer. ne_buffer_finish -frees the buffer structure, but not the actual string stored in the -buffer, which is returned and must be free()d by -the caller. - - Any use of the buffer object after calling either of these -functions gives undefined behaviour. - - - - - Return value - - ne_buffer_finish returns the -malloc-allocated string stored in the buffer. - - - - - Examples - - An example use of ne_buffer_finish; -the duplicate function returns a string made up of -n copies of str: - - static char *duplicate(int n, const char *str) -{ - ne_buffer *buf = ne_buffer_create(); - while (n--) { - ne_buffer_zappend(buf, str); - } - return ne_buffer_finish(buf); -} - - - - - See also - - , , - - - - diff --git a/client/neon-0.27.2/doc/ref/bufutil.xml b/client/neon-0.27.2/doc/ref/bufutil.xml deleted file mode 100644 index 3f3f3c5dc..000000000 --- a/client/neon-0.27.2/doc/ref/bufutil.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - ne_buffer_clear - 3 - - - - ne_buffer_clear - ne_buffer_grow - ne_buffer_altered - general purpose of group of functions - - - - - - - #include <ne_string.h> - - - void ne_buffer_clear - ne_buffer *buf - - - - void ne_buffer_altered - ne_buffer *buf - - - - void ne_buffer_grow - ne_buffer *buf - size_t size - - - - - - - - Description - - The ne_buffer_clear function sets -the string stored in buf to be the empty string -(""). - - The ne_buffer_altered function must -be used after the string stored in the buffer -buf is modified by directly rather than using -, -or . - - The ne_buffer_grow function -ensures that at least size bytes are allocated -for the string; this can be used if a large amount of data is going to -be appended to the buffer and may result in more efficient memory -allocation. - - - - diff --git a/client/neon-0.27.2/doc/ref/clicert.xml b/client/neon-0.27.2/doc/ref/clicert.xml deleted file mode 100644 index 67833aa77..000000000 --- a/client/neon-0.27.2/doc/ref/clicert.xml +++ /dev/null @@ -1,153 +0,0 @@ - - - - ne_ssl_client_cert - 3 - - - - ne_ssl_clicert_read - ne_ssl_clicert_name - ne_ssl_clicert_encrypted - ne_ssl_clicert_decrypt - ne_ssl_clicert_owner - ne_ssl_clicert_free - SSL client certificate handling - - - - - - - #include <ne_ssl.h> - - - ne_ssl_client_cert *ne_ssl_clicert_read - const char *filename - - - - const char *ne_ssl_clicert_name - const ne_ssl_client_cert *ccert - - - - int ne_ssl_clicert_encrypted - const ne_ssl_client_cert *ccert - - - - int ne_ssl_clicert_decrypt - ne_ssl_client_cert *ccert - const char *password - - - - const ne_ssl_certificate *ne_ssl_clicert_owner - const ne_ssl_client_cert *ccert - - - - void ne_ssl_clicert_free - ne_ssl_client_cert *ccert - - - - - - - - Description - - The ne_ssl_clicert_read function reads - a client certificate from a - PKCS#12-formatted file, and returns an - ne_ssl_client_cert object. If the client - certificate is encrypted, it must be decrypted before it is used. - An ne_ssl_client_cert object holds a client - certificate and the associated private key, not just a - certificate; the term "client certificate" - will used to refer to this pair. - - A client certificate can be in one of two states: - encrypted or decrypted. - The ne_ssl_clicert_encrypted function will - return non-zero if the client certificate is in the - encrypted state. A client certificate object - returned by ne_ssl_clicert_read may be - initially in either state, depending on whether the file was - encrypted or not. - - ne_ssl_clicert_decrypt can be used to - decrypt a client certificate using the appropriate password. This - function must only be called if the object is in the - encrypted state; if decryption fails, the - certificate state does not change, so decryption can be attempted - more than once using different passwords. - - A client certificate can be given a "friendly name" when it - is created; ne_ssl_clicert_name will return - this name (or &null; if no friendly name was specified). - ne_ssl_clicert_name can be used when the - client certificate is in either the encrypted or decrypted state, - and will return the same string for the lifetime of the - object. - - The function ne_ssl_clicert_owner - returns the certificate part of the client certificate; it must - only be called if the client certificate is in the - decrypted state. - - When the client certificate is no longer needed, the - ne_ssl_clicert_free function should be used - to destroy the object. - - - - - Return value - - ne_ssl_clicert_read returns a client - certificate object, or &null; if the file could not be read. - ne_ssl_clicert_encrypted returns zero if the - object is in the decrypted state, or non-zero if it is in the - encrypted state. ne_ssl_clicert_name returns - a &nul;-terminated friendly name string, or &null;. - ne_ssl_clicert_owner returns a certificate - object. - - - - - Examples - - The following code reads a client certificate and decrypts - it if necessary, then loads it into an HTTP session. - - ne_ssl_client_cert *ccert; - -ccert = ne_ssl_clicert_read("/path/to/client.p12"); - -if (ccert == NULL) { - /* handle error... */ -} else if (ne_ssl_clicert_encrypted(ccert)) { - char *password = prompt_for_password(); - - if (ne_ssl_clicert_decrypt(ccert, password)) { - /* could not decrypt! handle error... */ - } -} - -ne_ssl_set_clicert(sess, ccert); - - - - - - See also - - - - - - diff --git a/client/neon-0.27.2/doc/ref/config.xml b/client/neon-0.27.2/doc/ref/config.xml deleted file mode 100644 index 4823ccaa4..000000000 --- a/client/neon-0.27.2/doc/ref/config.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - neon - - - neon-config - 1 - - - - neon-config - - script providing information about installed copy - of neon library - - - - - - neon-config - - - - - - feature - - - - - - - - - Description - - The neon-config script provides -information about an installed copy of the neon library. The - and options instruct -how to compile and link an application against the library; the - and options can -help determine whether the library meets the applications -requirements. - - - - - Options - - - - - - Print the flags which should be passed to -the C compiler when compiling object files, when the object files use -neon header files. - - - - - Print the flags which should be passed to -the linker when linking an application which uses the neon -library - - - - - Print the location of the libtool library -script, libneon.la, which can be used to link against -&neon; by applications using libtool. - - - - - Print the version of the library - - - - dir - If dir is given; relocate output of - and as if neon was -installed in given prefix directory. Otherwise, print the -installation prefix of the library. - - - - feature - The script exits with success if -feature is supported by the -library. - - - - - Print help message; includes list of known - features and whether they are supported or not. - - - - - - - - Example - - Below is a Makefile fragment which could be used to -build an application against an installed neon library, when the -neon-config script can be found in -$PATH. - - CFLAGS = `neon-config --cflags` -LIBS = `neon-config --libs` -OBJECTS = myapp.o -TARGET = myapp - -$(TARGET): $(OBJECTS) - $(CC) $(LDFLAGS) -o $(TARGET) $(OBJECTS) $(LIBS) - -myapp.o: myapp.c - $(CC) $(CFLAGS) -c myapp.c -o myapp.o - - - - diff --git a/client/neon-0.27.2/doc/ref/err.xml b/client/neon-0.27.2/doc/ref/err.xml deleted file mode 100644 index 22dd51027..000000000 --- a/client/neon-0.27.2/doc/ref/err.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - ne_get_error - 3 - - - - ne_get_error - ne_set_error - error handling for HTTP sessions - - - - - - - #include <ne_session.h> - - - const char *ne_get_error - ne_sesssion *session - - - - void ne_set_error - ne_sesssion *session - const char *format - ... - - - - - - - - Description - - The session error string is used to store any -human-readable error information associated with any errors which -occur whilst using the HTTP session. - - The ne_get_error function returns - the current session error string. This string persists only - until it is changed by a subsequent operation on the session. - If localisation was enabled at build time, and if necessary - enabled at run-time if necessary using , the returned string may have been - translated into the user's current locale. - - The ne_set_error function can be - used to set a new session error string, using a - printf-style format string - interface. - - - - - Return value - - ne_set_error returns a constant - &nul;-terminated string. In the default English locale, the - returned string will not have a - terminating . period character. - - - - Examples - Retrieve the current error string: - &egsess; -... -printf("Error was: %s\n", ne_get_error(sess)); - - Set a new error string: - &egsess; -... -ne_set_error(sess, "Response missing header %s", "somestring"); - - - diff --git a/client/neon-0.27.2/doc/ref/feat.xml b/client/neon-0.27.2/doc/ref/feat.xml deleted file mode 100644 index ad542d6f7..000000000 --- a/client/neon-0.27.2/doc/ref/feat.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - ne_has_support - 3 - - - - ne_has_support - determine feature support status - - - - - - - #include <ne_utils.h> - - - int ne_has_support - int feature - - - - - - - - Description - - The ne_has_support function can be used - to determine whether a particular optional feature, given by the - feature code feature, is supported. The - following feature codes are available: - - - - NE_FEATURE_SSL - - Indicates support for SSL/TLS - - - - NE_FEATURE_ZLIB - - Indicates support for compressed responses - - - - NE_FEATURE_IPV6 - - Indicates support for IPv6 - - - - NE_FEATURE_LFS - - Indicates support for large files - - - - NE_FEATURE_SOCKS - - Indicates support for SOCKSv5 - - - - NE_FEATURE_TS_SSL - - Indicates support for thread-safe SSL - initialization — see - - - - - - - - - - Return value - - ne_has_support returns non-zero if - the given feature is supported, or zero otherwise. - - - - - See also - - , - - - - diff --git a/client/neon-0.27.2/doc/ref/getst.xml b/client/neon-0.27.2/doc/ref/getst.xml deleted file mode 100644 index 5a419c4ce..000000000 --- a/client/neon-0.27.2/doc/ref/getst.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - ne_get_status - 3 - - - - ne_get_status - retrieve HTTP response status for request - - - - - - - #include <ne_request.h> - - - const ne_status *ne_get_status - const ne_request *request - - - - - - - - Description - - The ne_get_status function returns -a pointer to the HTTP status object giving the result of a request. -The object returned only becomes valid once the request has been -successfully dispatched (the return value of -ne_request_dispatch or -ne_begin_request was zero). The object remains -valid until the associated request object is destroyed. - - - - - See also - - , - - - - - Example - - Display the response status code of applying the -HEAD method to some resource. - - ne_request *req = ne_request_create(sess, "HEAD", "/foo/bar"); -if (ne_request_dispatch(req)) - /* handle errors... */ -else - printf("Response status code was %d\n", ne_get_status(req)->code); -ne_request_destroy(req); - - - diff --git a/client/neon-0.27.2/doc/ref/i18n.xml b/client/neon-0.27.2/doc/ref/i18n.xml deleted file mode 100644 index 9f1f2e454..000000000 --- a/client/neon-0.27.2/doc/ref/i18n.xml +++ /dev/null @@ -1,71 +0,0 @@ - - - - ne_i18n_init - 3 - - - - ne_i18n_init - functions to initialize internationalization support - - - - - - - #include <ne_i18n.h> - - - void ne_i18n_init - const char *encoding - - - - - - - - Description - - The ne_i18n_init function can be used - to enable support for translated messages in the &neon; library. - The encoding parameter, if non-&null;, - specifies the character encoding required for generated translated - string. If it is &null;, the appropriate character encoding for - the process locale will be used. - - This call is only strictly necessary if either: - - - - &neon; has been installed into a different - prefix than the gettext implementation on - which it depends for i18n purposes, or - - the caller requires that translated messages - are in a particular character encoding. - - - - If ne_i18n_init is never called, the - message catalogs will not be found if case (a) applies (and so - English error messages will be used), and will use the default - character encoding specified by the process locale. The library - will otherwise operate correctly. - - Note that the encoding used is a process-global setting and - so results may be unexpected if other users of &neon; within the - process call ne_i18n_init with a different - encoding parameter. - - - - - See also - - - - - - diff --git a/client/neon-0.27.2/doc/ref/iaddr.xml b/client/neon-0.27.2/doc/ref/iaddr.xml deleted file mode 100644 index 4e8ba64a9..000000000 --- a/client/neon-0.27.2/doc/ref/iaddr.xml +++ /dev/null @@ -1,133 +0,0 @@ - - - - ne_iaddr_make - 3 - - - - ne_iaddr_make - ne_iaddr_cmp - ne_iaddr_print - ne_iaddr_typeof - ne_iaddr_free - functions to manipulate and compare network addresses - - - - - - - #include <ne_socket.h> - -typedef enum { - ne_iaddr_ipv4 = 0, - ne_iaddr_ipv6 -} ne_iaddr_type; - - - ne_inet_addr *ne_iaddr_make - ne_iaddr_type type - const unsigned char *raw - - - - int ne_iaddr_cmp - const ne_inet_addr *ia1 - const ne_inet_addr *ia2 - - - - char *ne_iaddr_print - const ne_inet_addr *ia - char *buffer - size_t bufsiz - - - - ne_iaddr_type ne_iaddr_typeof - const ne_inet_addr *ia - - - - void ne_iaddr_free - const ne_inet_addr *ia - - - - - - - - Description - - ne_iaddr_make creates an - ne_inet_addr object from a raw binary network - address; for instance the four bytes 0x7f 0x00 0x00 - 0x01 represent the IPv4 address - 127.0.0.1. The object returned is suitable for - passing to ne_sock_connect. A binary IPv4 - address contains four bytes; a binary IPv6 address contains - sixteen bytes; addresses passed must be in network byte - order. - - ne_iaddr_cmp can be used to compare two - network addresses; returning zero only if they are identical. The - addresses need not be of the same address type; if the addresses - are not of the same type, the return value is guaranteed to be - non-zero. - - ne_iaddr_print can be used to print the - human-readable string representation of a network address into a - buffer, for instance the string - "127.0.0.1". - - ne_iaddr_typeof returns the type of the - given network address. - - ne_iaddr_free releases the memory - associated with a network address object. - - - - - Return value - - ne_iaddr_make returns &null; if the - address type passed is not supported (for instance on a platform - which does not support IPv6). - - - ne_iaddr_print returns the - buffer pointer, and never &null;. - - - - - Examples - - The following example connects a socket to port 80 at the - address 127.0.0.1. - - unsigned char addr[] = "\0x7f\0x00\0x00\0x01"; -ne_inet_addr *ia; - -ia = ne_iaddr_make(ne_iaddr_ipv4, addr); -if (ia != NULL) { - ne_socket *sock = ne_sock_connect(ia, 80); - ne_iaddr_free(ia); - /* ... */ -} else { - /* ... */ -} - - - - - See also - - - - - - diff --git a/client/neon-0.27.2/doc/ref/init.xml b/client/neon-0.27.2/doc/ref/init.xml deleted file mode 100644 index 3a70fc289..000000000 --- a/client/neon-0.27.2/doc/ref/init.xml +++ /dev/null @@ -1,132 +0,0 @@ - - - - ne_sock_init - 3 - - - - ne_sock_init - ne_sock_exit - perform library initialization - - - - - - - #include <ne_socket.h> - - - int ne_sock_init - - - - - void ne_sock_exit - - - - - - - - - Description - - In some platforms and configurations, &neon; may be using - some socket or SSL libraries which require global initialization - before use. To perform this initialization, the - ne_sock_init function must be called before - any other library functions are used. - - Once all use of &neon; is complete, - ne_sock_exit can be called to perform - de-initialization of socket or SSL libraries, if necessary. Uses - of ne_sock_init and - ne_sock_exit are "reference counted"; if N - calls to ne_sock_init are made, only the Nth - call to ne_sock_exit will have effect. - - ne_sock_init will set the disposition - of the SIGPIPE signal to - ignored. No change is made to the - SIGPIPE disposition by - ne_sock_exit. - - Both the SSL libraries supported by &neon; — OpenSSL - and GnuTLS — require callbacks to be registered to allow - thread-safe use of SSL. These callbacks are stored as global - variables and so their state persists for as long as the library - in question is loaded into the process. If multiple users of the - SSL library exist within the process, this can be problematic, - particularly if one is dynamically loaded (and may subsequently be - unloaded). - - If &neon; is configured using the - --enable-threadsafe-ssl flag, thread-safe SSL - support will be enabled automatically, as covered in the following - section. Otherwise, it is not safe to use &neon; with SSL in a - multi-threaded process. The - function can be used to determine whether &neon; is built to - enable thread-safety support in the SSL library. - - - Thread-safe SSL with OpenSSL - - &neon; follows two simple rules when dealing with the - OpenSSL locking callbacks: - - - - ne_sock_init will set - thread-safety locking callbacks if and only if no locking - callbacks are already registered. - - ne_sock_exit will - unset the thread-safety locking callbacks if and only if the - locking callbacks registered are those registered by - ne_sock_init. - - - - Applications and libraries should be able to co-operate to - ensure that SSL use is always thread-safe if similar rules are - always followed. - - - - - Thread-safe SSL with GnuTLS - - The cryptography library used by GnuTLS, libgcrypt, only - supports an initialization operation to register thread-safety - callbacks. ne_sock_init will register the - thread-safe locking callbacks on first use; - ne_sock_exit cannot unregister them. If - multiple users of GnuTLS are present within the process, it is - unsafe to dynamically unload &neon; from the process if &neon; - is configured with thread-safe SSL support enabled (since the - callbacks would be left pointing at unmapped memory once &neon; - is unloaded). - - - - - - - Return value - - ne_sock_init returns zero on success, - or non-zero on error. If an error occurs, no further use of the - &neon; library should be attempted. - - - - - See also - - , - - - diff --git a/client/neon-0.27.2/doc/ref/neon.xml b/client/neon-0.27.2/doc/ref/neon.xml deleted file mode 100644 index dcc61bc13..000000000 --- a/client/neon-0.27.2/doc/ref/neon.xml +++ /dev/null @@ -1,244 +0,0 @@ - - - - neon - 3 - - - - neon - HTTP and WebDAV client library - - - - Description - - neon is an HTTP and WebDAV client library. The major - abstractions exposed are the HTTP session, - created by ; and the HTTP - request, created by . HTTP authentication is handled - transparently for server and proxy servers, see ; complete SSL/TLS support is also - included, see . - - - - - Conventions - - Some conventions are used throughout the neon API, to - provide a consistent and simple interface; these are documented - below. - - - Thread-safeness and global initialization - - &neon; itself is implemented to be thread-safe (avoiding any - use of global state), but relies on the operating system providing - a thread-safe resolver interface. Modern operating systems offer - the thread-safe getaddrinfo interface, which - &neon; supports; some others implement - gethostbyname using thread-local - storage. - - To allow thread-safe use of SSL in the OpenSSL and GnuTLS - libraries &neon; must be configured using the - --enable-threadsafe-ssl; if this is done, - locking callbacks will be registered by ; note that care must be exercised if - &neon; is used in conjunction with another library which uses - OpenSSL or GnuTLS. - - Some platforms and libraries used by &neon; require global - initialization before use; notably: - - - The SIGPIPE signal - disposition must be set to - ignored. - - OpenSSL requires global initialization to - load shared lookup tables. - - The SOCKS library requires initialization - before use. - - The Win32 socket library requires - initialization before use. - - - The function should be called - before any other use of &neon; to perform any necessary - initialization needed for the particular platform. - - For some applications it may be necessary to call to initialize the internationalization - support in &neon;. - - - - - Functions using global state - - Any function call in &neon; may modify the - errno global variable as a side-effect. Except - where explicitly documented, the value of errno - is unspecified after any &neon; function call. - - Other than in the use of errno, the only - functions which use or modify process-global state in &neon; are - as follows: - - - , , and , as - described above - - ne_debug_init and - ne_debug, if enabled at compile time; for - debugging output - - for - installing a process-global callback to be invoked on - malloc failure - - - - - - - Namespaces - - To avoid possible collisions between names used for symbols - and preprocessor macros by an application and the libraries it - uses, it is good practice for each library to reserve a particular - namespace prefix. An application which - ensures it uses no names with these prefixes is then guaranteed to - avoid such collisions. - - The &neon; library reserves the use of the namespace - prefixes ne_ and NE_. The - libraries used by &neon; may also reserve certain namespaces; - collisions between these libraries and a &neon;-based application - will not be detected at compile time, since the underlying library - interfaces are not exposed through the &neon; header files. Such - collisions can only be detected at link time, when the linker - attempts to resolve symbols. The following list documents some of - the namespaces claimed by libraries used by &neon;; this list may - be incomplete. - - - - - SSL, ssl, TLS, tls, ERR_, BIO_, d2i_, i2d_, ASN1_ - Some of the many prefixes used by the OpenSSL - library; little attempt has been made to keep exported symbols - within any particular prefixes for this - library. - - - - gnutls_, gcry_, gpg_ - Namespaces used by the GnuTLS library (and - dependencies thereof) - - - - XML_, Xml[A-Z] Namespaces - used by the expat library. - - - - xml[A-Z], html[A-Z], docb[A-Z] - Namespaces used by the libxml2 library; a - relatively small number of symbols are used without these - prefixes. - - - - inflate, deflate, crc32, compress, uncompres, adler32, - zlib - Namespaces used by the zlib library; a - relatively small number of symbols are used without these - prefixes. - - - - krb5, gss, GSS, asn1, decode_krb5, encode_krb5, profile, - mit - - Some of the prefixes used by the MIT GSSAPI - library and dependencies thereof; a number of symbols lie - outside these prefixes. - - - - - - - - Argument validation - - &neon; does not attempt to validate that the parameters - passed to functions conform to the API (for instance, checking - that pointer arguments are not &null;). Any use of the &neon; API - which is not documented to produce a certain behaviour results is - said to produce undefined behaviour; it is - likely that &neon; will segfault under these conditions. - - - - - URI paths, WebDAV metadata - - The path strings passed to any function must be - URI-encoded by the application; &neon; never - performs any URI encoding or decoding internally. WebDAV property - names and values must be valid UTF-8 encoded Unicode - strings. - - - - - User interaction - - As a pure library interface, &neon; will never produce - output on stdout or - stderr; all user interaction is the - responsibilty of the application. - - - - Memory handling - - neon does not attempt to cope gracefully with an - out-of-memory situation; instead, by default, the - abort function is called to immediately - terminate the process. An application may register a custom - function which will be called before abort in - such a situation; see . - - - - - Callbacks and userdata - - Whenever a callback is registered, a - userdata pointer is also used to allow the - application to associate a context with the callback. The - userdata is of type void *, allowing any pointer to - be used. - - - - - - - See also - - , - - - - diff --git a/client/neon-0.27.2/doc/ref/opts.xml b/client/neon-0.27.2/doc/ref/opts.xml deleted file mode 100644 index d288063e4..000000000 --- a/client/neon-0.27.2/doc/ref/opts.xml +++ /dev/null @@ -1,110 +0,0 @@ - - - - ne_set_useragent - 3 - - - - ne_set_useragent - ne_set_persist - ne_set_read_timeout - ne_get_scheme - ne_get_server_hostport - common properties for HTTP sessions - - - - - - - #include <ne_session.h> - - - void ne_set_useragent - ne_session *session - const char *product - - - - void ne_set_persist - ne_session *session - int flag - - - - void ne_set_read_timeout - ne_session *session - int timeout - - - - const char *ne_get_scheme - ne_sesssion *session - - - - const char *ne_get_server_hostport - ne_sesssion *session - - - - - - - - Description - - The User-Agent request header is used -to identify the software which generated the request for statistical -or debugging purposes. neon does not send a -User-Agent header unless a call is made to the -ne_set_useragent. -ne_set_useragent must be passed a product string -conforming to RFC2616's product token grammar; of the form -"Product/Version". - - By default neon will use a persistent connection -whenever possible. For specific applications, or for debugging -purposes, it is sometimes useful to disable persistent connections. -The ne_set_persist function will disable -persistent connections if passed a flag -parameter of 0, and will enable them -otherwise. - - When neon reads from a socket, by default the read -operation will time out after 60 seconds, and the request will fail -giving an NE_TIMEOUT error. To configure this -timeout interval, call ne_set_read_timeout giving -the desired number of seconds as the timeout -parameter. - - The scheme used to initially create the session will be - returned by ne_get_scheme. - - The hostport pair with which the session is associated - will be returned by the - ne_get_server_hostport; for example - www.example.com:8080. Note that the - :port will be omitted if the default port - for the scheme is used. - - - - - Examples - Set a user-agent string: - &egsess; -ne_set_useragent(sess, "MyApplication/2.1"); - - Disable use of persistent connections: - ne_session *sess = ne_session_create(...); -ne_set_persist(sess, 0); - - Set a 30 second read timeout: - &egsess; -ne_set_read_timeout(sess, 30); - - - - diff --git a/client/neon-0.27.2/doc/ref/req.xml b/client/neon-0.27.2/doc/ref/req.xml deleted file mode 100644 index 0dfcd9aa0..000000000 --- a/client/neon-0.27.2/doc/ref/req.xml +++ /dev/null @@ -1,169 +0,0 @@ - - - - ne_request_create - 3 - - - - ne_request_create - ne_request_dispatch - ne_request_destroy - low-level HTTP request handling - - - - - - - #include <ne_request.h> - - - ne_request *ne_request_create - ne_session *session - const char *method - const char *path - - - - int ne_request_dispatch - ne_request *req - - - - void ne_request_destroy - ne_request *req - - - - - - - Description - - An HTTP request, represented by the -ne_request type, specifies that some operation is to be -performed on some resource. The -ne_request_create function creates a request -object, specifying the operation in the method -parameter. The location of the resource is determined by the server in -use for the session given by the sess -parameter, combined with the path parameter. - -The path string used must conform to the -abs_path definition given in RFC2396, with an -optional "?query" part, and must be URI-escaped by the caller (for -instance, using ne_path_escape). If the string -comes from an untrusted source, failure to perform URI-escaping -results in a security vulnerability. - - To dispatch a request, and process the response, the -ne_request_dispatch function can be used. An -alternative is to use the (more complex, but more flexible) -combination of the ne_begin_request, -ne_end_request, and -ne_read_response_block functions; see -ne_begin_request. - - To add extra headers in the request, the functions and can be used. To include a message -body with the request, one of the functions -ne_set_request_body_buffer, , or -ne_set_request_body_provider can be used. - - The return value of -ne_request_dispatch indicates merely whether the -request was sent and the response read successfully. To discover the -result of the operation, , along with -any processing of the response headers and message body. - - A request can only be dispatched once: calling -ne_request_dispatch more than once on a single -ne_request object produces undefined behaviour. Once all -processing associated with the request object is complete, use the -ne_request_destroy function to destroy the -resources associated with it. Any subsequent use of the request -object produces undefined behaviour. - - - - - Return value - - The ne_request_create function -returns a pointer to a request object (and never &null;). - - The ne_request_dispatch function -returns zero if the request was dispatched successfully, and a -non-zero error code otherwise. - - - - - - - Errors - - - NE_ERROR - - Request failed (see session error string) - - - NE_LOOKUP - - The DNS lookup for the server (or proxy server) failed. - - - NE_AUTH - - Authentication failed on the server. - - - NE_PROXYAUTH - - Authentication failed on the proxy server. - - - NE_CONNECT - - A connection to the server could not be established. - - - NE_TIMEOUT - - A timeout occurred while waiting for the server to respond. - - - - - - - - Example - - An example of applying a MKCOL - operation to the resource at the location - http://www.example.com/foo/bar/: - - ne_session *sess = ne_session_create("http", "www.example.com", 80); -ne_request *req = ne_request_create(sess, "MKCOL", "/foo/bar/"); -if (ne_request_dispatch(req)) { - printf("Request failed: %s\n", ne_get_error(sess)); -} -ne_request_destroy(req); - - - - See also - - , , , , . - - - - diff --git a/client/neon-0.27.2/doc/ref/reqbody.xml b/client/neon-0.27.2/doc/ref/reqbody.xml deleted file mode 100644 index 58f307e00..000000000 --- a/client/neon-0.27.2/doc/ref/reqbody.xml +++ /dev/null @@ -1,94 +0,0 @@ - - - - ne_set_request_body_buffer - 3 - - - - ne_set_request_body_buffer - ne_set_request_body_fd - ne_set_request_body_fd64 - include a message body with a request - - - - - - - #include <ne_request.h> - - - void ne_set_request_body_buffer - ne_request *req - const char *buf - size_t count - - - - int ne_set_request_body_fd - ne_request *req - int fd - off_t begin - off_t length - - - - int ne_set_request_body_fd64 - ne_request *req - int fd - off64_t begin - off64_t length - - - - - - - - Description - - The ne_set_request_body_buffer -function specifies that a message body should be included with the -body, which is stored in the count bytes buffer -buf. - - The ne_set_request_body_fd function -can be used to include a message body with a request which is read -from a file descriptor. The body is read from the file descriptor -fd, which must be a associated with a seekable -file (not a pipe, socket, or FIFO). count -bytes are read, beginning at offset begin -(hence, passing begin as zero means the body is read -from the beginning of the file). - - If the NE_LFS macro is defined, then - the ne_set_request_body_fd64 function is - also available, to provide large file support. This function - can be used on 32-bit platforms supporting the LFS standard; - the offset and - length parameters can then be passed as - 64-bit values. When using large files, - fd must be opened using - open64 or by passing the - O_LARGEFILE flag to - open. - - For all the above functions, the source of the request - body must survive until the request has been dispatched; - neither the memory buffer passed to - ne_set_request_body_buffer nor the file - descriptor passed to - ne_set_request_body_fd or - ne_set_request_body_fd64 are copied - internally. - - - - - See also - - - - - diff --git a/client/neon-0.27.2/doc/ref/reqhdr.xml b/client/neon-0.27.2/doc/ref/reqhdr.xml deleted file mode 100644 index 4d811b135..000000000 --- a/client/neon-0.27.2/doc/ref/reqhdr.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - ne_add_request_header - 3 - - - - ne_add_request_header - ne_print_request_header - add headers to a request - - - - - - - #include <ne_request.h> - - - void ne_add_request_header - ne_request *request - const char *name - const char *value - - - - void ne_print_request_header - ne_request *request - const char *name - const char *format - ... - - - - - - - - Description - - The functions ne_add_request_header -and ne_print_request_header can be used to add -headers to a request, before it is sent. - - ne_add_request_header simply adds a -header of given name, with given -value. - - ne_print_request_header adds a -header of given name, taking the value from the -printf-like format string -parameter and subsequent variable-length argument list. - - - - - See also - - - - - diff --git a/client/neon-0.27.2/doc/ref/reqopts.xml b/client/neon-0.27.2/doc/ref/reqopts.xml deleted file mode 100644 index bb4ca4a3b..000000000 --- a/client/neon-0.27.2/doc/ref/reqopts.xml +++ /dev/null @@ -1,60 +0,0 @@ - - - - ne_set_request_expect100 - 3 - - - - ne_set_request_expect100 - function to enable Expect: 100-continue support - - - - - - - #include <ne_request.h> - - - void ne_set_request_expect100 - ne_request *request - int flag - - - - - - - - Description - - An extension introduced in the HTTP/1.1 specification was - the use of the Expect: 100-continue header. - This header allows an HTTP client to be informed of the expected - response status before the request message body is sent: a useful - optimisation for situations where a large message body is to be - sent. The ne_set_request_expect100 function - can be used to enable this feature by passing the - flag parameter as any non-zero - integer. - - Unfortunately, if this header is sent to a server - which is not fully compliant with the HTTP/1.1 specification, a - deadlock occurs resulting in a temporarily "hung" connection. - neon will recover gracefully from this situation, but only after a - 15 second timeout. It is highly recommended that this option is - not enabled unless it is known that the server in use correctly - implements Expect: 100-continue - support. - - - - - See also - - . - - - - diff --git a/client/neon-0.27.2/doc/ref/resolve.xml b/client/neon-0.27.2/doc/ref/resolve.xml deleted file mode 100644 index 067cf61a4..000000000 --- a/client/neon-0.27.2/doc/ref/resolve.xml +++ /dev/null @@ -1,145 +0,0 @@ - - - - ne_addr_resolve - 3 - - - - ne_addr_resolve - ne_addr_result - ne_addr_first - ne_addr_next - ne_addr_error - ne_addr_destroy - functions to resolve hostnames to addresses - - - - - - - #include <ne_socket.h> - - - ne_sock_addr *ne_addr_resolve - const char *hostname - int flags - - - - int ne_addr_result - const ne_sock_addr *addr - - - - const ne_inet_addr *ne_addr_first - ne_sock_addr *addr - - - - const ne_inet_addr *ne_addr_next - ne_sock_addr *addr - - - - char *ne_addr_error - const ne_sock_addr *addr - char *buffer - size_t bufsiz - - - - void ne_addr_destroy - ne_sock_addr *addr - - - - - - - - Description - - The ne_addr_resolve function resolves - the given hostname, returning an - ne_sock_addr object representing the address (or - addresses) associated with the hostname. The - flags parameter is currently unused, and - must be passed as 0. - - The hostname passed to - ne_addr_resolve can be a DNS hostname - (e.g. "www.example.com") or an IPv4 dotted quad - (e.g. "192.0.34.72"); or, on systems which - support IPv6, an IPv6 hex address, which may be enclosed in - brackets, e.g. "[::1]". - - To determine whether the hostname was successfully resolved, - the ne_addr_result function is used, which - returns non-zero if an error occurred. If an error did occur, the - ne_addr_error function can be used, which - will copy the error string into a given - buffer (of size - bufsiz). - - The functions ne_addr_first and - ne_addr_next are used to retrieve the - Internet addresses associated with an address object which has - been successfully resolved. ne_addr_first - returns the first address; ne_addr_next - returns the next address after the most recent call to - ne_addr_next or - ne_addr_first, or &null; if there are no more - addresses. The ne_inet_addr pointer returned by - these functions can be passed to - ne_sock_connect to connect a socket. - - After the address object has been used, it should be - destroyed using ne_addr_destroy. - - - - - Return value - - ne_addr_resolve returns a pointer to an - address object, and never &null;. - ne_addr_error returns the - buffer parameter . - - - - - Examples - - The code below prints out the set of addresses associated - with the hostname www.google.com. - - ne_sock_addr *addr; -char buf[256]; - -addr = ne_addr_resolve("www.google.com", 0); -if (ne_addr_result(addr)) { - printf("Could not resolve www.google.com: %s\n", - ne_addr_error(addr, buf, sizeof buf)); -} else { - const ne_inet_addr *ia; - printf("www.google.com:"); - for (ia = ne_addr_first(addr); ia != NULL; ia = ne_addr_next(addr)) { - printf(" %s", ne_iaddr_print(ia, buf, sizeof buf)); - } - putchar('\n'); -} -ne_addr_destroy(addr); - - - - - See also - - - - - - diff --git a/client/neon-0.27.2/doc/ref/resphdr.xml b/client/neon-0.27.2/doc/ref/resphdr.xml deleted file mode 100644 index 46c55c034..000000000 --- a/client/neon-0.27.2/doc/ref/resphdr.xml +++ /dev/null @@ -1,98 +0,0 @@ - - - - ne_get_response_header - 3 - - - - ne_get_response_header - ne_response_header_iterate - functions to access response headers - - - - - - - #include <ne_request.h> - - - const char *ne_get_response_header - ne_request *request - const char *name - - - - void *ne_response_header_iterate - ne_request *request - void *cursor - const char **name - const char **value - - - - - - - - Description - - To retrieve the value of a response header field, the - ne_get_response_header function can be used, - and is given the name of the header to return. - - To iterate over all the response headers returned, the - ne_response_header_iterate function can be - used. This function takes a cursor - parameter which should be &null; to retrieve the first header. The - function stores the name and value of the next header header in - the name and value - parameters, and returns a new cursor pointer which can be passed - to ne_response_header_iterate to retrieve the - next header. - - - - - Return value - - ne_get_response_header returns a - string, or &null; if no header with that name was given. If used - during request processing, the return value pointer is valid only - until the next call to ne_begin_request, or - else, until the request object is destroyed. - - Likewise, the cursor, names, and values returned by - ne_response_header_iterate are only valid - until the next call to ne_begin_request or - until the request object is destroyed. - - - - - Examples - - The following code will output the value of the - Last-Modified header for a resource: - - ne_request *req = ne_request_create(sess, "GET", "/foo.txt"); -if (ne_request_dispatch(req) == NE_OK) { - const char *mtime = ne_get_response_header(req, "Last-Modified"); - if (mtime) { - printf("/foo.txt has last-modified value %s\n", mtime); - } -} -ne_request_destroy(req); - - - - - See also - - , . - - - - diff --git a/client/neon-0.27.2/doc/ref/sess.xml b/client/neon-0.27.2/doc/ref/sess.xml deleted file mode 100644 index 93f003884..000000000 --- a/client/neon-0.27.2/doc/ref/sess.xml +++ /dev/null @@ -1,123 +0,0 @@ - - - - ne_session_create - 3 - - - - ne_session_create - ne_close_connection - ne_session_proxy - ne_session_destroy - set up HTTP sessions - - - - - - #include <ne_session.h> - - ne_session *ne_session_create - const char *scheme - const char *hostname - unsigned int port - - - - void ne_session_proxy - ne_session *session - const char *hostname - unsigned int port - - - - void ne_close_connection - ne_session *session - - - - void ne_session_destroy - ne_session *session - - - - - - - Description - - An ne_session object represents an HTTP -session - a logical grouping of a sequence of HTTP requests made to a -certain server. Any requests made using the session can use a -persistent connection, share cached authentication credentials and any -other common attributes. - - A new HTTP session is created using -ne_session_create, giving the -hostname and port of the -server to use, along with the scheme used to -contact the server (usually "http"). Before the -first use of ne_session_create in a process, - must have been called to perform any -global initialization needed by any libraries used by &neon;. - - To enable SSL/TLS for the session, pass the string -"https" as the scheme -parameter, and either register a certificate verification function -(see ) or trust the appropriate -certificate (see , ). - - If an HTTP proxy server should be used for the session, -ne_session_proxy must be called giving the -hostname and port on which to contact the proxy. - - If it is known that the session will not be used for a -significant period of time, ne_close_connection -can be called to close the connection, if one remains open. Use of -this function is entirely optional, but it must not be called if there -is a request active using the session. - - Once a session has been completed, -ne_session_destroy must be called to destroy the -resources associated with the session. Any subsequent use of the -session pointer produces undefined behaviour. - - - - - Notes - - The hostname passed to -ne_session_create is resolved when the first -request using the session is dispatched; a DNS resolution failure can -only be detected at that time (using the NE_LOOKUP -error code); see for -details. - - - - - Return Values - ne_session_create will return - a pointer to a new session object (and never &null;). - - - - Examples - Create and destroy a session: - ne_session *sess; -sess = ne_session_create("http", "host.example.com", 80); -/* ... use sess ... */ -ne_session_destroy(sess); - - - - - See Also - - , , - - - diff --git a/client/neon-0.27.2/doc/ref/shave.xml b/client/neon-0.27.2/doc/ref/shave.xml deleted file mode 100644 index 914699d3a..000000000 --- a/client/neon-0.27.2/doc/ref/shave.xml +++ /dev/null @@ -1,52 +0,0 @@ - - - - ne_shave - 3 - - - - ne_shave - trim whitespace from a string - - - - - - - #include <ne_string.h> - - - char *ne_shave - char *str - const char *whitespace - - - - - - - - Description - - ne_shave returns a portion of -str with any leading or trailing characters in -the whitespace array removed. -str may be modified. Note that the return -value may not be equal to str. - - - - - Examples - - The following code segment will output - "fish": - - char s[] = ".!.fish!.!"; -puts(ne_shave(s, ".!")); - - - - - diff --git a/client/neon-0.27.2/doc/ref/sslca.xml b/client/neon-0.27.2/doc/ref/sslca.xml deleted file mode 100644 index c68739d7a..000000000 --- a/client/neon-0.27.2/doc/ref/sslca.xml +++ /dev/null @@ -1,81 +0,0 @@ - - - - ne_ssl_load_ca - 3 - - - - ne_ssl_load_ca - ne_ssl_load_default_ca - load SSL Certificate Authorities - - - - - - - #include <ne_session.h> - - - int ne_ssl_load_ca - ne_session *session - const char *filename - - - - int ne_ssl_load_default_ca - ne_session *session - - - - - - - - Description - - To indicate that a given CA certificate is trusted by the user, -the certificate can be loaded using the ne_ssl_load_ca -function. The filename parameter given must specify -the location of a PEM-encoded CA certificate. - - The SSL library in use by neon may include a default set -of CA certificates; calling the -ne_ssl_load_default_ca function will indicate -that these CAs are trusted by the user. - - If no CA certificates are loaded, or the server presents -a certificate which is invalid in some way, then the certificate must -be manually verified (see ), otherwise the -connection will fail. - - - - - Return value - - Both ne_ssl_load_ca and -ne_ssl_load_default_ca functions return -0 on success, or non-zero on failure. - - - - - Examples - - Load the CA certificate stored in /path/to/cacert.pem: - &egsess; - -if (ne_ssl_load_ca(sess, "/path/to/cacert.pem")) { - printf("Could not load CA cert: %s\n", ne_get_error(sess)); -} - - - - See also - - , - - diff --git a/client/neon-0.27.2/doc/ref/sslcert.xml b/client/neon-0.27.2/doc/ref/sslcert.xml deleted file mode 100644 index d2d037624..000000000 --- a/client/neon-0.27.2/doc/ref/sslcert.xml +++ /dev/null @@ -1,111 +0,0 @@ - - - - ne_ssl_cert_identity - 3 - - - - ne_ssl_cert_identity - ne_ssl_cert_signedby - ne_ssl_cert_issuer - ne_ssl_cert_subject - functions to access certificate properties - - - - - - - #include <ne_ssl.h> - - - const char *ne_ssl_cert_identity - const ne_ssl_certificate *cert - - - - const ne_ssl_certificate *ne_ssl_cert_signedby - const ne_ssl_certificate *cert - - - - const ne_ssl_dname *ne_ssl_cert_subject - const ne_ssl_certificate *cert - - - - const ne_ssl_dname *ne_ssl_cert_issuer - const ne_ssl_certificate *cert - - - - - - - - Description - - The function ne_ssl_cert_identity - retrieves the identity of a certificate; for an - SSL server certificate, this will be the hostname for which the - certificate was issued. In PKI parlance, the identity is the - common name attribute of the distinguished name of - the certificate subject. - - The functions ne_ssl_cert_subject and - ne_ssl_cert_issuer can be used to access the - objects representing the distinguished name of the subject and of - the issuer of a certificate, respectively. - - If a certificate object is part of a certificate chain, then - ne_ssl_cert_signedby can be used to find the - certificate which signed a particular certificate. For a - self-signed certificate or a certificate for which the full chain - is not available, this function will return &null;. - - - - - Return value - - ne_ssl_cert_issuer and - ne_ssl_cert_subject are guaranteed to never - return &null;. ne_ssl_cert_identity may - return &null; if the certificate has no specific - identity. ne_ssl_cert_signedby - may return &null; as covered above. - - - - Examples - - The following function could be used to display information - about a given certificate: - - void dump_cert(const ne_ssl_certificate *cert) { - const char *id = ne_ssl_cert_identity(cert); - char *dn; - - if (id) - printf("Certificate was issued for '%s'.\n", id); - - dn = ne_ssl_readable_dname(ne_ssl_cert_subject(cert)); - printf("Subject: %s\n", dn); - free(dn); - - dn = ne_ssl_readable_dname(ne_ssl_cert_issuer(cert)); - printf("Issuer: %s\n", dn); - free(dn); -} - - - - - See also - - , - - - - diff --git a/client/neon-0.27.2/doc/ref/sslcert2.xml b/client/neon-0.27.2/doc/ref/sslcert2.xml deleted file mode 100644 index 216d294df..000000000 --- a/client/neon-0.27.2/doc/ref/sslcert2.xml +++ /dev/null @@ -1,49 +0,0 @@ - - - - ne_ssl_cert_cmp - 3 - - - - ne_ssl_cert_cmp - ne_ssl_cert_free - functions to operate on certificate objects - - - - - - - #include <ne_header.h> - - - int ne_ssl_cert_cmp - const ne_ssl_certificate *c1 - const ne_ssl_certificate *c2 - - - - void ne_ssl_cert_free - ne_ssl_certificate *cert - - - - - - - - Description - - The ne_ssl_cert_cmp function can be - used to compare two certificate objects; it returns zero if they - refer to the same certificate, and non-zero otherwise. - - The ne_ssl_cert_free function can be - used to destroy a certificate object when it is no longer - needed. - - - - - diff --git a/client/neon-0.27.2/doc/ref/sslcertio.xml b/client/neon-0.27.2/doc/ref/sslcertio.xml deleted file mode 100644 index 394045e5a..000000000 --- a/client/neon-0.27.2/doc/ref/sslcertio.xml +++ /dev/null @@ -1,95 +0,0 @@ - - - - ne_ssl_cert_read - 3 - - - - ne_ssl_cert_read - ne_ssl_cert_write - ne_ssl_cert_import - ne_ssl_cert_export - functions to read or write certificates to and from files or strings - - - - - - - #include <ne_ssl.h> - - - ne_ssl_certificate *ne_ssl_cert_read - const char *filename - - - - int ne_ssl_cert_write - const ne_ssl_certificate *cert - const char *filename - - - - ne_ssl_certificate *ne_ssl_cert_import - const char *data - - - - char *ne_ssl_cert_export - const ne_ssl_certificate *cert - - - - - - - - Description - - The ne_ssl_cert_write function writes a - certificate to a file using the PEM encoding. The - ne_ssl_cert_export function returns a - base64-encoded &nul;-terminated string representing the - certificate. This string is malloc-allocated and should be - destroyed using free by the caller. - - The ne_ssl_cert_read function reads a - certificate from a PEM-encoded file, and returns a certificate - object. The ne_ssl_cert_import function - returns a certificate object from a base64-encoded string, - data, as returned by - ne_ssl_cert_export. The certificate object - returned by these functions should be destroyed using after use. - - - - - - Return value - - ne_ssl_cert_read returns &null; if a - certificate could not be read from the file. - ne_ssl_cert_write returns non-zero if the - certificate could not be written to the file. - ne_ssl_cert_export always returns a - &nul;-terminated string, and never &null;. - ne_ssl_cert_import returns &null; if the - string was not a valid base64-encoded certificate. - - - - - Encoding Formats - - The string produced by - ne_ssl_cert_export is the base64 encoding of - the DER representation of the certificate. The file written by - ne_ssl_cert_write uses the PEM format: this - is the base64 encoding of the DER representation with newlines - every 64 characters, and start and end marker lines. - - - - diff --git a/client/neon-0.27.2/doc/ref/ssldname.xml b/client/neon-0.27.2/doc/ref/ssldname.xml deleted file mode 100644 index e1fd4544d..000000000 --- a/client/neon-0.27.2/doc/ref/ssldname.xml +++ /dev/null @@ -1,73 +0,0 @@ - - - - - ne_ssl_dname - 3 - - - - ne_ssl_readable_dname - ne_ssl_dname_cmp - SSL distinguished name handling - - - - - - - #include <ne_ssl.h> - - - const char *ne_ssl_readable_dname - const ne_ssl_dname *dname - - - - int ne_ssl_dname_cmp - const ne_ssl_dname *dn1 - const ne_ssl_dname *dn2 - - - - - - - - Description - - The ne_ssl_readable_dname function -creates a single-line, human-readable string out of an -ne_ssl_dname object. The returned string is -malloc()-allocated, and must be -free()d by the caller. - - The ne_ssl_dname_cmp function - compares two distinguished names, and returns zero if they are - equal, or non-zero otherwise. - - - - - Return value - - ne_ssl_readable_dname returns a malloc-allocated - string, and never &null;. - - - - - Examples - - See for an example - use of ne_ssl_readable_dname. - - - - - See also - - - - - diff --git a/client/neon-0.27.2/doc/ref/ssltrust.xml b/client/neon-0.27.2/doc/ref/ssltrust.xml deleted file mode 100644 index 6675579d5..000000000 --- a/client/neon-0.27.2/doc/ref/ssltrust.xml +++ /dev/null @@ -1,72 +0,0 @@ - - - - ne_ssl_trust_cert - 3 - - - - ne_ssl_trust_cert - ne_ssl_trust_default_ca - functions to indicate that certificates are trusted - - - - - - - #include <ne_session.h> - - - void ne_ssl_trust_cert - ne_session *session - const ne_ssl_certificate *cert - - - - void ne_ssl_trust_default_ca - ne_session *session - - - - - - - - Description - - To indicate that a given certificate is trusted by the -user, the certificate object can be passed to -ne_ssl_trust_cert. The certificate object is -duplicated internally and can subsequently be destroyed. - - The SSL library in use by &neon; may include a default -set of CA certificates; calling the -ne_ssl_trust_default_ca function will indicate -that these CAs are trusted by the user. - - - - - Examples - - Load the CA certificate stored in /path/to/cacert.pem: - &egsess; -ne_ssl_certificate *cert = ne_ssl_cert_read("/path/to/cacert.pem"); - -if (cert) { - ne_ssl_trust_cert(sess, cert); - ne_ssl_cert_free(cert); -} else { - printf("Could not load CA cert: %s\n", ne_get_error(sess)); -} - - - - See also - - , , - - diff --git a/client/neon-0.27.2/doc/ref/sslvfy.xml b/client/neon-0.27.2/doc/ref/sslvfy.xml deleted file mode 100644 index b044d5b27..000000000 --- a/client/neon-0.27.2/doc/ref/sslvfy.xml +++ /dev/null @@ -1,163 +0,0 @@ - - - - ne_ssl_set_verify - 3 - - - - ne_ssl_set_verify - register an SSL certificate verification callback - - - - - - - #include <ne_session.h> - - - - - typedef int ne_ssl_verify_fn - void *userdata - int failures - const ne_ssl_certificate *cert - - - - void ne_ssl_set_verify - ne_session *session - ne_ssl_verify_fn verify_fn - void *userdata - - - - - - - - Description - - To enable manual SSL certificate verification, a -callback can be registered using -ne_ssl_set_verify. If such a callback is not -registered, when a connection is established to an SSL server which -does not present a certificate signed by a trusted CA (see ), or if the certificate presented is invalid in -some way, the connection will fail. - - When the callback is invoked, the -failures parameter gives a bitmask indicating -in what way the automatic certificate verification failed. The value -is equal to the bit-wise OR of one or more of the following -constants (and is guaranteed to be non-zero): - - - NE_SSL_NOTYETVALID - - The certificate is not yet valid. - - - NE_SSL_EXPIRED - - The certificate has expired. - - - NE_SSL_IDMISMATCH - - The hostname used for the session does not match -the hostname to which the certificate was issued. - - - NE_SSL_UNTRUSTED - - The Certificate Authority which signed the certificate -is not trusted. - - - - - Note that if either of the - NE_SSL_IDMISMATCH or - NE_SSL_UNTRUSTED failures is given, the - connection may have been intercepted by a third party, and - must not be presumed to be secure. - - The cert parameter passed to the -callback represents the certificate which was presented by the server. -If the server presented a chain of certificates, the chain can be -accessed using . The -cert object given is not valid after the -callback returns. - - - - - Return value - - The verification callback must return zero to indicate -that the certificate should be trusted; and non-zero otherwise (in -which case, the connection will fail). - - - - Examples - - The following code implements an example verification - callback, using the dump_cert function - from to display - certification information. Notice that the hostname of the - server used for the session is passed as the - userdata parameter to the - callback. - - -static int -my_verify(void *userdata, int failures, const ne_ssl_certificate *cert) -{ - const char *hostname = userdata; - - dump_cert(cert); - - puts("Certificate verification failed - the connection may have been " - "intercepted by a third party!"); - - if (failures & NE_SSL_IDMISMATCH) { - const char *id = ne_ssl_cert_identity(cert); - if (id) - printf("Server certificate was issued to '%s' not '%s'.\n", - id, hostname); - else - printf("The certificate was not issued for '%s'\n", hostname); - } - - if (failures & NE_SSL_UNTRUSTED) - puts("The certificate is not signed by a trusted Certificate Authority."); - - /* ... check for validity failures ... */ - - if (prompt_user()) - return 1; /* fail verification */ - else - return 0; /* trust the certificate anyway */ -} - -int -main(...) -{ - ne_session *sess = ne_session_create("https", "some.host.name", 443); - ne_ssl_set_verify(sess, my_verify, "some.host.name"); - ... -} - - - - - See also - - , , - - - diff --git a/client/neon-0.27.2/doc/ref/status.xml b/client/neon-0.27.2/doc/ref/status.xml deleted file mode 100644 index fbc38b7a0..000000000 --- a/client/neon-0.27.2/doc/ref/status.xml +++ /dev/null @@ -1,78 +0,0 @@ - - - - ne_status - 3 - - - - ne_status - HTTP status structure - - - - - #include <ne_utils.h> - -typedef struct { - int major_version, minor_version; - int code, klass; - const char *reason_phrase; -} ne_status; - - - - - Description - - An ne_status type represents an HTTP -response status; used in response messages giving a result of request. -The major_version and -minor_version fields give the HTTP version -supported by the server issuing the response. The -code field gives the status code of the -result (lying between 100 and 999 inclusive), and the -klass field gives the -classthe field is named klass not -class so that the header can be used from a C++ -program, in which class is a reserved -word), which is equal to the most significant digit -of the status. - - There are five classes of HTTP status code defined by - RFC2616: - - - - 1xx - Informational response. - - - - 2xx - Success: the operation was successful - - - - 3xx - Redirection - - - - 4xx Client - error: the request made was incorrect in some - manner. - - - - 5xx - Server error - - - - - - See also . - - diff --git a/client/neon-0.27.2/doc/ref/tok.xml b/client/neon-0.27.2/doc/ref/tok.xml deleted file mode 100644 index 2e6211f97..000000000 --- a/client/neon-0.27.2/doc/ref/tok.xml +++ /dev/null @@ -1,76 +0,0 @@ - - - - ne_token - 3 - - - - ne_token - ne_qtoken - string tokenizers - - - - - - - #include <ne_string.h> - - - char *ne_token - char **str - char sep - - - - char *ne_qtoken - char **str - char sep - const char *quotes - - - - - - - - Description - - - - ne_token and -ne_qtoken tokenize the string at the location -stored in the pointer str. Each time the -function is called, it returns the next token, and modifies the -str pointer to point to the remainer of the -string, or &null; if there are no more tokens in the string. A token -is delimited by the separator character sep; if -ne_qtoken is used any quoted segments of the -string are skipped when searching for a separator. A quoted segment -is enclosed in a pair of one of the characters given in the -quotes string. - - The string being tokenized is modified each time -the tokenizing function is called; replacing the next separator -character with a &nul; terminator. - - - - - Examples - - The following function prints out each token in a -comma-separated string list, which is -modified in-place: - - static void splitter(char *list) -{ - do { - printf("Token: %s\n", ne_token(&list, ',')); - while (list); -} - - - - diff --git a/client/neon-0.27.2/doc/ref/vers.xml b/client/neon-0.27.2/doc/ref/vers.xml deleted file mode 100644 index 2e7a50d3c..000000000 --- a/client/neon-0.27.2/doc/ref/vers.xml +++ /dev/null @@ -1,63 +0,0 @@ - - - - ne_version_match - 3 - - - - ne_version_match - ne_version_string - library versioning - - - - - - - #include <ne_utils.h> - - - int ne_version_match - int major - int minor - - - - const char *ne_version_string - - - - - - - - - Description - - The ne_version_match function returns - non-zero if the library version is not of major version - major, or the minor version is less than - minor. For &neon; versions 0.x, every - minor version is assumed to be incompatible with every other minor - version. - - The ne_version_string function returns - a string giving the library version. - - - - - Examples - - To require &neon; 1.x, version 1.2 or later: - - if (ne_version_match(1, 2)) { - printf("Library version out of date: 1.2 required, found %s.", - ne_version_string()); - exit(1); -} - - - - diff --git a/client/neon-0.27.2/doc/ref/xml.xml b/client/neon-0.27.2/doc/ref/xml.xml deleted file mode 100644 index e61a4515c..000000000 --- a/client/neon-0.27.2/doc/ref/xml.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - ne_xml_create - 3 - - - - ne_xml_create - ne_xml_destroy - create and destroy an XML parser - - - - - - - #include <ne_xml.h> - - - ne_xml_parser *ne_xml_create - - - - - void ne_xml_destroy - ne_xml_parser *parser - - - - - - - - Description - - The ne_xml_create function creates an - XML parser object, which can be used for parsing XML documents - using stacked SAX handlers. - - - - - Return value - - ne_xml_create returns a pointer to an - XML parser object, and never &null; - - - See also - - XXX - - - - diff --git a/client/neon-0.27.2/doc/refentry.xml b/client/neon-0.27.2/doc/refentry.xml deleted file mode 100644 index bf724e08f..000000000 --- a/client/neon-0.27.2/doc/refentry.xml +++ /dev/null @@ -1,56 +0,0 @@ - - - - ne_foo - 3 - - - - ne_foo - ne_bar - functions which do foo and bar - - - - - - - #include <ne_header.h> - - - void ne_set_useragent - ne_session *session - const char *product - - - - - - - - Description - - XXX - - - - - Return value - - XXX - - - - Examples - - XXX - - - - See also - - XXX - - - - diff --git a/client/neon-0.27.2/doc/ssl.xml b/client/neon-0.27.2/doc/ssl.xml deleted file mode 100644 index 5581373e0..000000000 --- a/client/neon-0.27.2/doc/ssl.xml +++ /dev/null @@ -1,24 +0,0 @@ - - - Secure connections: HTTP over SSL - - This section gives an introduction to SSL. The text is - inspired by . - - &neon; supports the use of HTTP over SSLThe -term SSL is used throughout this section to refer in -general to both the SSL protocol developed by Netscape and its -successor TLS, as adopted by the IETF. to implement -secure connections. A secure connection in -this context means a connection which has -integrity, secrecy and is -authenticated. Applications must go to some -effort to correctly support secure connections—an application -based on &neon; does not magically become secure simply -by flicking a switch and enabling the use of SSL. - - - - - - diff --git a/client/neon-0.27.2/doc/using-neon.txt b/client/neon-0.27.2/doc/using-neon.txt deleted file mode 100644 index 45ddfc332..000000000 --- a/client/neon-0.27.2/doc/using-neon.txt +++ /dev/null @@ -1,166 +0,0 @@ - -Guide to neon -============= - -Using libneon from applications -------------------------------- - -The neon source package is designed to be easily incorporated into -applications: - -- autoconf macros are distributed in the 'macros' subdirectory of the - neon distribution. Use NEON_LIBRARY from your configure.in to check - for the presence of the neon library installed on the system. The - macro adds an '--with-neon=...' argument to configure, which allows - the user to specify a location for the library (the standard /usr - and /usr/local directories are checked automatically without having - to be specified). - -- The 'src' directory of the neon package can be imported directly - into your application, if you do not wish to add an external - dependency. If you wish to bundle, use the NEON_BUNDLED macro - to configure neon in your application: here, the neon sources are - bundled in a directory called 'libneon': - - NEON_BUNDLED(libneon, ...) - - If your application supports builds where srcdir != builddir, you - should use the NEON_VPATH_BUNDLED macro like this: - - NEON_VPATH_BUNDLED(${srcdir}/libneon, libneon, ...) - - (thanks to Peter Moulder for getting this working properly). - - If you use this macro, a '--with-included-neon' option will - be added to the generated configure script. This allows the user - to force the bundled neon to be used in the application, rather than - any neon library found on the system. If you allow neon to be - configured this way, you must also configure an XML parser. Use - the NEON_XML_PARSER macro to do this. - -- The final argument to the _BUNDLED macros is a set of actions which - are executed if the bundled build *is* chosen (rather than an - external neon which might have been found on the user's system). - In here, use either the NEON_LIBTOOL_BUILD or NEON_NORMAL_BUILD - macro to set up the neon Makefile appropriately: including adding - the neon source directory to the recursive make. - -- A full fragment might be: - - NEON_BUNDLED(libneon, [ - NEON_NORMAL_BUILD - NEON_XML_PARSER - SUBDIRS="libneon $SUBDIRS" - ]) - - This means the bundled neon source directory (called 'libneon') is - used if no neon is found on the system, and the standard XML parser - search is used. - -The neon API -============ - -neon offers two levels of API for use in applications: - -- Low-level HTTP request/response handling -- High-level method invocation - -The low-level interface allows for easily designing new method -handlers, taking care of things like persistent connections, -authentication, and proxy servers. The high-level interface allows -you to easily integrate existing HTTP (and WebDAV) methods into your -application. This document details both interfaces. - -N.B.: Documentation is always WRONG. The definitive API reference is in -src/*.c, with src/*.h is hopefully fairly similar. - -PLEASE NOTE: the neon API is NOT STABLE, and is not considered to be -stable or backwards-compatible until version 1.0 is reached. If -you are not happy with this constraint, then please either: - -1. pick a version of neon and never upgrade -2. don't use neon (yet). -3. contribute sufficient development resources to neon that all - bugs are fixed yesterday, features added tomorrow, and 1.0 is - reached on by the end of the week. - -An Important Note ------------------ - -Most neon functions which allocate memory with malloc() will call -abort() if malloc() returns NULL. This is a design decision, the -rationale being: - -- it makes the interfaces cleaner. - -- if malloc() DOES return NULL there is not much you can do about it. - -- Apparently, malloc() won't return NULL on systems which over-commit - memory (e.g. Linux), so it doesn't make any real difference anyway. - -The author is open to persuasion on this: mail neon@webdav.org. - -Namespaces ----------- - -neon reserves these namespaces: - ne_* - uri_* - sock_* - -Eventually all symbols globally defined by the library should fall -within a reserved namespace. The author is considering moving -all symbols into the ne_* namespace. - -Note that the XML parser used will also reserve a namespace: -expat takes XML_*, libxml takes xml* - -The http_session type ---------------------- - -The http_session type is used whether you are writing to the low-level -or the high-level interface. An http_session object is created to -store data which persists beyond a single HTTP request: - - - Protocol options, e.g. (proxy) server details - - Authentication information - - Persistent connection - -A session is created with the 'ne_session_create' call. Before -creating a request for the session, the server details must be set, as -follows: - - ne_session *sess; - /* Initialize the socket library */ - sock_init(); - /* Create the session */ - sess = ne_session_create(); - /* Optionally, set a proxy server */ - ne_session_proxy(sess, "proxy.myisp.com", 8080); - /* Set the server */ - ne_session_server(sess, "my.server.com", 80); - -The proxy server should be set BEFORE the origin server; otherwise a -DNS lookup will be performed on the origin server by the -ne_session_server call, which may well fail if the client is -firewalled. ne_session_{proxy,server} will return NE_LOOKUP if -the DNS lookup fails; otherwise NE_OK. - -The 'ne_set_persist' call can be used to turn off persistent -connection handling: it is on by default. - -The 'ne_set_useragent' call can be used to set the User-Agent header -to be sent with requests. A product token of the form -"myhttpclient/0.1.2" should be passed, and will have "neon/x.y.z" -appended in the actual header sent. - -When a session has been finished with, it should be destroyed using -ne_session_destroy. Any subsequent operations on the session object -will have undefined results (i.e. will segfault). - -Low-level HTTP Request/Response Handling ----------------------------------------- - -... - - diff --git a/client/neon-0.27.2/doc/using.xml b/client/neon-0.27.2/doc/using.xml deleted file mode 100644 index 4a3b733e6..000000000 --- a/client/neon-0.27.2/doc/using.xml +++ /dev/null @@ -1,140 +0,0 @@ - - How to use neon from your application - - This section describes how to add &neon; support to an - application. If you just want to quickly try out &neon;, use - the script. - - The &neon; source code is designed to be easily embedded - into an application source tree. &neon; has no dependencies on - libraries other than an SSL toolkit and XML parser, though the - source tree can be configured to have no support for SSL or XML - if desired. To configure the &neon; source code some GNU autoconf - macros are supplied, which can be used in a number of ways, as - follows: - - - - - autoconf macros are distributed in the 'macros' - subdirectory of the neon distribution. Use the NEON_LIBRARY - macro from your configure.in to check for the presence of - the neon library installed on the system. The macro adds an - '--with-neon=...' argument to configure, which allows the - user to specify a location for the library (the standard - /usr and /usr/local directories are checked automatically - without having to be specified). - - The 'src' directory of the neon package can be - imported directly into your application, if you do not wish - to add an external dependency. If you wish to bundle, use - the NEON_BUNDLED macro to configure neon in your application: - here, the neon sources are bundled in a directory called - 'libneon': - - NEON_BUNDLED(libneon, ...) - - If your application supports builds where srcdir != builddir, - you should use the NEON_VPATH_BUNDLED macro like this: - - NEON_VPATH_BUNDLED(${srcdir}/libneon, libneon, ...) - - If you use this macro, a '--with-included-neon' option - will be added to the generated configure script. This - allows the user to force the bundled neon to be used in the - application, rather than any neon library found on the - system. If you allow neon to be configured this way, you - must also configure an XML parser. Use the NEON_XML_PARSER - macro to do this. - - The final argument to the _BUNDLED macros is a - set of actions which are executed if the bundled build *is* - chosen (rather than an external neon which might have been - found on the user's system). In here, use either the - NEON_LIBTOOL_BUILD or NEON_NORMAL_BUILD macro to set up the - neon Makefile appropriately: including adding the neon source - directory to the recursive make. - - - - A full fragment might be: - -NEON_BUNDLED(libneon, [ - NEON_NORMAL_BUILD - NEON_XML_PARSER - SUBDIRS="libneon $SUBDIRS" -]) - - This means the bundled neon source directory (called 'libneon') - is used if no neon is found on the system, and the standard XML - parser search is used. - - - - - Standards compliance - - &neon; is intended to be compliant with the IETF and W3C - standards which it implements, with a few exceptions due to - practical necessity or interoperability issues. These - exceptions are documented in this section. - - RFC 2518, HTTP Extensions for Distributed Authoring—WebDAV - - &neon; is deliberately not compliant with section - 23.4.2, and treats property names as a (namespace-URI, name) - pair. This is generally - considered to be correct behaviour by the WebDAV - working group, and is likely to formally adopted in a future - revision of the specification. - - RFC 2616, Hypertext Transfer Protocol—HTTP/1.1 - - There is some confusion in this specification about the - use of the identity - transfer-coding. &neon; ignores the - Transfer-Encoding response header if it - contains only the (now deprecated) identity - token, and will determine the response message length as if - the header was not present. &neon; will give an error if a - response includes a Transfer-Encoding - header with a value other than identity or - chunked. - - - RFC 2617, HTTP Authentication: Basic and Digest Access Authentication - - &neon; is not strictly compliant with the quoting rules - given in the grammar for the Authorization - header. The grammar requires that the qop - and algorithm parameters are not quoted, - however one widely deployed server implementation - (Microsoft® IIS 5) rejects the request if these parameters - are not quoted. &neon; sends these parameters with - quotes—this is not known to cause any problems with - other server implementations. - - - Namespaces in XML - - The &neon; XML parser interface will accept and parse - without error some XML documents which are well-formed - according to the XML specification but do not conform to the - "Namespaces in XML" specification . Specifically: the restrictions on - the first character of the NCName rule are - not all implemented; &neon; will allow any - CombiningChar, Extender - and some characters from the Digit class in - this position. - - - - diff --git a/client/neon-0.27.2/doc/version.xml b/client/neon-0.27.2/doc/version.xml deleted file mode 100644 index 76cab3612..000000000 --- a/client/neon-0.27.2/doc/version.xml +++ /dev/null @@ -1 +0,0 @@ -0.27.2 \ No newline at end of file diff --git a/client/neon-0.27.2/doc/xml.xml b/client/neon-0.27.2/doc/xml.xml deleted file mode 100644 index 4292eb19d..000000000 --- a/client/neon-0.27.2/doc/xml.xml +++ /dev/null @@ -1,206 +0,0 @@ - - - - - Parsing XML - - The &neon; XML interface is exposed by the - ne_xml.h header file. This interface gives a - wrapper around the standard SAX API used by XML - parsers, with an additional abstraction, stacked SAX - handlers, and also giving consistent XML Namespace support. - - - Introduction to SAX - - A SAX-based parser works by emitting a sequence of - events to reflect the tokens being parsed - from the XML document. For example, parsing the following document - fragment: - -world -]]> - - results in the following events: - - - - &startelm; "hello" - - - &cdata; "world" - - - &endelm; "hello" - - - - This example demonstrates the three event types used used in the - subset of SAX exposed by the &neon; XML interface: &startelm;, - &cdata; and &endelm;. In a C API, an event is - implemented as a function callback; three callback types are used in - &neon;, one for each type of event. - - - - - Stacked SAX handlers - - WebDAV property values are represented as fragments of XML, - transmitted as parts of larger XML documents over HTTP (notably in - the body of the response to a PROPFIND request). - When &neon; parses such documents, the SAX events generated for - these property value fragments may need to be handled by the - application, since &neon; has no knowledge of the structure of - properties used by the application. - - To solve this problemThis - problem only needs solving because the SAX interface - is so inflexible when implemented as C function callbacks; a better - approach would be to use an XML parser interface which is not based - on callbacks. the &neon; XML interface introduces - the concept of a SAX handler. A SAX handler - comprises a &startelm;, &cdata; and &endelm; callback; the - &startelm; callback being defined such that each handler may - accept or decline the - &startelm; event. Handlers are composed into a handler - stack before parsing a document. When a new &startelm; - event is generated by the XML parser, &neon; invokes each &startelm; - callback in the handler stack in turn until one accepts the event. - The handler which accepts the event will then be subsequently be - passed &cdata; events if the element contains character data, - followed by an &endelm; event when the element is closed. If no - handler in the stack accepts a &startelm; event, the branch of the - tree is ignored. - - To illustrate, given a handler A, which accepts the - cat and age elements, and a - handler B, which accepts the name element, the - following document: - - -An example XML document - - 3 - Bob - -]]> - - would be parsed as follows: - - - - A &startelm; "cat" → accept - - - A &startelm; "age" → accept - - - A &cdata; "3" - - - A &endelm; "age" - - - A &startelm; "name" → decline - - - B &startelm; "name" → accept - - - B &cdata; "Bob" - - - B &endelm; "name" - - - A &endelm; "cat" - - - - The search for a handler which will accept a &startelm; event - begins at the handler of the parent element and continues toward the - top of the stack. For the root element, it begins at the base of - the stack. In the above example, handler A is at the base, and - handler B at the top; if the name element had any - children, only B's &startelm; would be invoked to accept - them. - - - - - Maintaining state - - To facilitate communication between independent handlers, a - state integer is associated with each element - being parsed. This integer is returned by &startelm; callback and - is passed to the subsequent &cdata; and &endelm; callbacks - associated with the element. The state integer of the parent - element is also passed to each &startelm; callback, the value zero - used for the root element (which by definition has no - parent). - - To further extend : if handler A - defines that the state of the root element cat - will be 42, the event trace would be as - follows: - - - - A &startelm; (parent = 0, "cat") → - accept, state = 42 - - - - A &startelm; (parent = 42, "age") → - accept, state = 50 - - - - A &cdata; (state = 50, "3") - - - A &endelm; (state = 50, "age") - - - A &startelm; (parent = 42, "name") → - decline - - - B &startelm; (parent = 42, "name") → - accept, state = 99 - - - B &cdata; (state = 99, "Bob") - - - B &endelm; (state = 99, "name") - - - A &endelm; (state = 42, "cat") - - - - To avoid collisions between state integers used by different - handlers, the interface definition of any handler includes the range - of integers it will use. - - - - - XML namespaces - - To support XML namespaces, every element name is represented - as a (namespace, name) pair. The &startelm; - and &endelm; callbacks are passed namespace and name strings - accordingly. If an element in the XML document has no declared - namespace, the namespace given will be the empty string, - "". - - - - diff --git a/client/neon-0.27.2/install-sh b/client/neon-0.27.2/install-sh deleted file mode 100755 index ebc66913e..000000000 --- a/client/neon-0.27.2/install-sh +++ /dev/null @@ -1,250 +0,0 @@ -#! /bin/sh -# -# install - install a program, script, or datafile -# This comes from X11R5 (mit/util/scripts/install.sh). -# -# Copyright 1991 by the Massachusetts Institute of Technology -# -# 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, and that the name of M.I.T. not be used in advertising or -# publicity pertaining to distribution of the software without specific, -# written prior permission. M.I.T. makes no representations about the -# suitability of this software for any purpose. It is provided "as is" -# without express or implied warranty. -# -# Calling this script install-sh is preferred over install.sh, to prevent -# `make' implicit rules from creating a file called install from it -# when there is no Makefile. -# -# This script is compatible with the BSD install script, but was written -# from scratch. It can only install one file at a time, a restriction -# shared with many OS's install programs. - - -# set DOITPROG to echo to test this script - -# Don't use :- since 4.3BSD and earlier shells don't like it. -doit="${DOITPROG-}" - - -# put in absolute paths if you don't have them in your path; or use env. vars. - -mvprog="${MVPROG-mv}" -cpprog="${CPPROG-cp}" -chmodprog="${CHMODPROG-chmod}" -chownprog="${CHOWNPROG-chown}" -chgrpprog="${CHGRPPROG-chgrp}" -stripprog="${STRIPPROG-strip}" -rmprog="${RMPROG-rm}" -mkdirprog="${MKDIRPROG-mkdir}" - -transformbasename="" -transform_arg="" -instcmd="$mvprog" -chmodcmd="$chmodprog 0755" -chowncmd="" -chgrpcmd="" -stripcmd="" -rmcmd="$rmprog -f" -mvcmd="$mvprog" -src="" -dst="" -dir_arg="" - -while [ x"$1" != x ]; do - case $1 in - -c) instcmd="$cpprog" - shift - continue;; - - -d) dir_arg=true - shift - continue;; - - -m) chmodcmd="$chmodprog $2" - shift - shift - continue;; - - -o) chowncmd="$chownprog $2" - shift - shift - continue;; - - -g) chgrpcmd="$chgrpprog $2" - shift - shift - continue;; - - -s) stripcmd="$stripprog" - shift - continue;; - - -t=*) transformarg=`echo $1 | sed 's/-t=//'` - shift - continue;; - - -b=*) transformbasename=`echo $1 | sed 's/-b=//'` - shift - continue;; - - *) if [ x"$src" = x ] - then - src=$1 - else - # this colon is to work around a 386BSD /bin/sh bug - : - dst=$1 - fi - shift - continue;; - esac -done - -if [ x"$src" = x ] -then - echo "install: no input file specified" - exit 1 -else - true -fi - -if [ x"$dir_arg" != x ]; then - dst=$src - src="" - - if [ -d $dst ]; then - instcmd=: - else - instcmd=mkdir - fi -else - -# Waiting for this to be detected by the "$instcmd $src $dsttmp" command -# might cause directories to be created, which would be especially bad -# if $src (and thus $dsttmp) contains '*'. - - if [ -f $src -o -d $src ] - then - true - else - echo "install: $src does not exist" - exit 1 - fi - - if [ x"$dst" = x ] - then - echo "install: no destination specified" - exit 1 - else - true - fi - -# If destination is a directory, append the input filename; if your system -# does not like double slashes in filenames, you may need to add some logic - - if [ -d $dst ] - then - dst="$dst"/`basename $src` - else - true - fi -fi - -## this sed command emulates the dirname command -dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` - -# Make sure that the destination directory exists. -# this part is taken from Noah Friedman's mkinstalldirs script - -# Skip lots of stat calls in the usual case. -if [ ! -d "$dstdir" ]; then -defaultIFS=' -' -IFS="${IFS-${defaultIFS}}" - -oIFS="${IFS}" -# Some sh's can't handle IFS=/ for some reason. -IFS='%' -set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` -IFS="${oIFS}" - -pathcomp='' - -while [ $# -ne 0 ] ; do - pathcomp="${pathcomp}${1}" - shift - - if [ ! -d "${pathcomp}" ] ; - then - $mkdirprog "${pathcomp}" - else - true - fi - - pathcomp="${pathcomp}/" -done -fi - -if [ x"$dir_arg" != x ] -then - $doit $instcmd $dst && - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi -else - -# If we're going to rename the final executable, determine the name now. - - if [ x"$transformarg" = x ] - then - dstfile=`basename $dst` - else - dstfile=`basename $dst $transformbasename | - sed $transformarg`$transformbasename - fi - -# don't allow the sed command to completely eliminate the filename - - if [ x"$dstfile" = x ] - then - dstfile=`basename $dst` - else - true - fi - -# Make a temp file name in the proper directory. - - dsttmp=$dstdir/#inst.$$# - -# Move or copy the file name to the temp name - - $doit $instcmd $src $dsttmp && - - trap "rm -f ${dsttmp}" 0 && - -# and set any options; do chmod last to preserve setuid bits - -# If any of these fail, we abort the whole thing. If we want to -# ignore errors from any of these, just make sure not to ignore -# errors from the above "$doit $instcmd $src $dsttmp" command. - - if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && - if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && - if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && - if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && - -# Now rename the file to the real destination. - - $doit $rmcmd -f $dstdir/$dstfile && - $doit $mvcmd $dsttmp $dstdir/$dstfile - -fi && - - -exit 0 diff --git a/client/neon-0.27.2/ltmain.sh b/client/neon-0.27.2/ltmain.sh deleted file mode 100644 index 0223495a0..000000000 --- a/client/neon-0.27.2/ltmain.sh +++ /dev/null @@ -1,6911 +0,0 @@ -# ltmain.sh - Provide generalized library-building support services. -# NOTE: Changing this file will not affect anything until you rerun configure. -# -# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 -# Free Software Foundation, Inc. -# 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 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. - -basename="s,^.*/,,g" - -# Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh -# is ksh but when the shell is invoked as "sh" and the current value of -# the _XPG environment variable is not equal to 1 (one), the special -# positional parameter $0, within a function call, is the name of the -# function. -progpath="$0" - -# The name of this program: -progname=`echo "$progpath" | $SED $basename` -modename="$progname" - -# Global variables: -EXIT_SUCCESS=0 -EXIT_FAILURE=1 - -PROGRAM=ltmain.sh -PACKAGE=libtool -VERSION=1.5.22 -TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" - -# Be Bourne compatible (taken from Autoconf:_AS_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+"$@"}'='"$@"' - setopt NO_GLOB_SUBST -else - case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac -fi - -# Check that we have a working $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, and then maybe $echo will work. - exec $SHELL "$progpath" --no-reexec ${1+"$@"} -fi - -if test "X$1" = X--fallback-echo; then - # used as fallback echo - shift - cat <&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE -fi - -# Global variables. -mode=$default_mode -nonopt= -prev= -prevopt= -run= -show="$echo" -show_help= -execute_dlfiles= -duplicate_deps=no -preserve_args= -lo2o="s/\\.lo\$/.${objext}/" -o2lo="s/\\.${objext}\$/.lo/" -extracted_archives= -extracted_serial=0 - -##################################### -# Shell function definitions: -# This seems to be the best place for them - -# func_mktempdir [string] -# Make a temporary directory that won't clash with other running -# libtool processes, and avoids race conditions if possible. If -# given, STRING is the basename for that directory. -func_mktempdir () -{ - my_template="${TMPDIR-/tmp}/${1-$progname}" - - if test "$run" = ":"; then - # Return a directory name, but don't create it in dry-run mode - my_tmpdir="${my_template}-$$" - else - - # If mktemp works, use that first and foremost - my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` - - if test ! -d "$my_tmpdir"; then - # Failing that, at least try and use $RANDOM to avoid a race - my_tmpdir="${my_template}-${RANDOM-0}$$" - - save_mktempdir_umask=`umask` - umask 0077 - $mkdir "$my_tmpdir" - umask $save_mktempdir_umask - fi - - # If we're not in dry-run mode, bomb out on failure - test -d "$my_tmpdir" || { - $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 - exit $EXIT_FAILURE - } - fi - - $echo "X$my_tmpdir" | $Xsed -} - - -# func_win32_libid arg -# return the library type of file 'arg' -# -# Need a lot of goo to handle *both* DLLs and import libs -# Has to be a shell function in order to 'eat' the argument -# that is supplied when $file_magic_command is called. -func_win32_libid () -{ - win32_libid_type="unknown" - win32_fileres=`file -L $1 2>/dev/null` - case $win32_fileres in - *ar\ archive\ import\ library*) # definitely import - win32_libid_type="x86 archive import" - ;; - *ar\ archive*) # could be an import, or static - if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ - $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then - win32_nmres=`eval $NM -f posix -A $1 | \ - $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` - case $win32_nmres in - import*) win32_libid_type="x86 archive import";; - *) win32_libid_type="x86 archive static";; - esac - fi - ;; - *DLL*) - win32_libid_type="x86 DLL" - ;; - *executable*) # but shell scripts are "executable" too... - case $win32_fileres in - *MS\ Windows\ PE\ Intel*) - win32_libid_type="x86 DLL" - ;; - esac - ;; - esac - $echo $win32_libid_type -} - - -# func_infer_tag arg -# Infer tagged configuration to use if any are available and -# if one wasn't chosen via the "--tag" command line option. -# Only attempt this if the compiler in the base compile -# command doesn't match the default compiler. -# arg is usually of the form 'gcc ...' -func_infer_tag () -{ - if test -n "$available_tags" && test -z "$tagname"; then - CC_quoted= - for arg in $CC; do - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case $@ in - # Blanks in the command may have been stripped by the calling shell, - # but not from the CC environment variable when configure was run. - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; - # Blanks at the start of $base_compile will cause this to fail - # if we don't check for them as well. - *) - for z in $available_tags; do - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" - CC_quoted= - for arg in $CC; do - # Double-quote args containing other shell metacharacters. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - CC_quoted="$CC_quoted $arg" - done - case "$@ " in - " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) - # The compiler in the base compile command matches - # the one in the tagged configuration. - # Assume this is the tagged configuration we want. - tagname=$z - break - ;; - esac - fi - done - # If $tagname still isn't set, then no tagged configuration - # was found and let the user know that the "--tag" command - # line option must be used. - if test -z "$tagname"; then - $echo "$modename: unable to infer tagged configuration" - $echo "$modename: specify a tag with \`--tag'" 1>&2 - exit $EXIT_FAILURE -# else -# $echo "$modename: using $tagname tagged configuration" - fi - ;; - esac - fi -} - - -# func_extract_an_archive dir oldlib -func_extract_an_archive () -{ - f_ex_an_ar_dir="$1"; shift - f_ex_an_ar_oldlib="$1" - - $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" - $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? - if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 - exit $EXIT_FAILURE - fi -} - -# func_extract_archives gentop oldlib ... -func_extract_archives () -{ - my_gentop="$1"; shift - my_oldlibs=${1+"$@"} - my_oldobjs="" - my_xlib="" - my_xabs="" - my_xdir="" - my_status="" - - $show "${rm}r $my_gentop" - $run ${rm}r "$my_gentop" - $show "$mkdir $my_gentop" - $run $mkdir "$my_gentop" - my_status=$? - if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then - exit $my_status - fi - - for my_xlib in $my_oldlibs; do - # Extract the objects. - case $my_xlib in - [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; - *) my_xabs=`pwd`"/$my_xlib" ;; - esac - my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` - my_xlib_u=$my_xlib - while :; do - case " $extracted_archives " in - *" $my_xlib_u "*) - extracted_serial=`expr $extracted_serial + 1` - my_xlib_u=lt$extracted_serial-$my_xlib ;; - *) break ;; - esac - done - extracted_archives="$extracted_archives $my_xlib_u" - my_xdir="$my_gentop/$my_xlib_u" - - $show "${rm}r $my_xdir" - $run ${rm}r "$my_xdir" - $show "$mkdir $my_xdir" - $run $mkdir "$my_xdir" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then - exit $exit_status - fi - case $host in - *-darwin*) - $show "Extracting $my_xabs" - # Do not bother doing anything if just a dry run - if test -z "$run"; then - darwin_orig_dir=`pwd` - cd $my_xdir || exit $? - darwin_archive=$my_xabs - darwin_curdir=`pwd` - darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` - darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` - if test -n "$darwin_arches"; then - darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` - darwin_arch= - $show "$darwin_base_archive has multiple architectures $darwin_arches" - for darwin_arch in $darwin_arches ; do - mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" - lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" - cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" - func_extract_an_archive "`pwd`" "${darwin_base_archive}" - cd "$darwin_curdir" - $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" - done # $darwin_arches - ## Okay now we have a bunch of thin objects, gotta fatten them up :) - darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` - darwin_file= - darwin_files= - for darwin_file in $darwin_filelist; do - darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` - lipo -create -output "$darwin_file" $darwin_files - done # $darwin_filelist - ${rm}r unfat-$$ - cd "$darwin_orig_dir" - else - cd "$darwin_orig_dir" - func_extract_an_archive "$my_xdir" "$my_xabs" - fi # $darwin_arches - fi # $run - ;; - *) - func_extract_an_archive "$my_xdir" "$my_xabs" - ;; - esac - my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` - done - func_extract_archives_result="$my_oldobjs" -} -# End of Shell function definitions -##################################### - -# Darwin sucks -eval std_shrext=\"$shrext_cmds\" - -disable_libs=no - -# Parse our command line options once, thoroughly. -while test "$#" -gt 0 -do - arg="$1" - shift - - case $arg in - -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; - *) optarg= ;; - esac - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - execute_dlfiles) - execute_dlfiles="$execute_dlfiles $arg" - ;; - tag) - tagname="$arg" - preserve_args="${preserve_args}=$arg" - - # Check whether tagname contains only valid characters - case $tagname in - *[!-_A-Za-z0-9,/]*) - $echo "$progname: invalid tag name: $tagname" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $tagname in - CC) - # Don't test for the "default" C tag, as we know, it's there, but - # not specially marked. - ;; - *) - if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then - taglist="$taglist $tagname" - # Evaluate the configuration. - eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" - else - $echo "$progname: ignoring unknown tag $tagname" 1>&2 - fi - ;; - esac - ;; - *) - eval "$prev=\$arg" - ;; - esac - - prev= - prevopt= - continue - fi - - # Have we seen a non-optional argument yet? - case $arg in - --help) - show_help=yes - ;; - - --version) - $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" - $echo - $echo "Copyright (C) 2005 Free Software Foundation, Inc." - $echo "This is free software; see the source for copying conditions. There is NO" - $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." - exit $? - ;; - - --config) - ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath - # Now print the configurations for the tags. - for tagname in $taglist; do - ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" - done - exit $? - ;; - - --debug) - $echo "$progname: enabling shell trace mode" - set -x - preserve_args="$preserve_args $arg" - ;; - - --dry-run | -n) - run=: - ;; - - --features) - $echo "host: $host" - if test "$build_libtool_libs" = yes; then - $echo "enable shared libraries" - else - $echo "disable shared libraries" - fi - if test "$build_old_libs" = yes; then - $echo "enable static libraries" - else - $echo "disable static libraries" - fi - exit $? - ;; - - --finish) mode="finish" ;; - - --mode) prevopt="--mode" prev=mode ;; - --mode=*) mode="$optarg" ;; - - --preserve-dup-deps) duplicate_deps="yes" ;; - - --quiet | --silent) - show=: - preserve_args="$preserve_args $arg" - ;; - - --tag) - prevopt="--tag" - prev=tag - preserve_args="$preserve_args --tag" - ;; - --tag=*) - set tag "$optarg" ${1+"$@"} - shift - prev=tag - preserve_args="$preserve_args --tag" - ;; - - -dlopen) - prevopt="-dlopen" - prev=execute_dlfiles - ;; - - -*) - $echo "$modename: unrecognized option \`$arg'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - - *) - nonopt="$arg" - break - ;; - esac -done - -if test -n "$prevopt"; then - $echo "$modename: option \`$prevopt' requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE -fi - -case $disable_libs in -no) - ;; -shared) - build_libtool_libs=no - build_old_libs=yes - ;; -static) - build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` - ;; -esac - -# If this variable is set in any of the actions, the command in it -# will be execed at the end. This prevents here-documents from being -# left over by shells. -exec_cmd= - -if test -z "$show_help"; then - - # Infer the operation mode. - if test -z "$mode"; then - $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 - $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 - case $nonopt in - *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) - mode=link - for arg - do - case $arg in - -c) - mode=compile - break - ;; - esac - done - ;; - *db | *dbx | *strace | *truss) - mode=execute - ;; - *install*|cp|mv) - mode=install - ;; - *rm) - mode=uninstall - ;; - *) - # If we have no mode, but dlfiles were specified, then do execute mode. - test -n "$execute_dlfiles" && mode=execute - - # Just use the default operation mode. - if test -z "$mode"; then - if test -n "$nonopt"; then - $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 - else - $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 - fi - fi - ;; - esac - fi - - # Only execute mode is allowed to have -dlopen flags. - if test -n "$execute_dlfiles" && test "$mode" != execute; then - $echo "$modename: unrecognized option \`-dlopen'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Change the help message to a mode-specific one. - generic_help="$help" - help="Try \`$modename --help --mode=$mode' for more information." - - # These modes are in order of execution frequency so that they run quickly. - case $mode in - # libtool compile mode - compile) - modename="$modename: compile" - # Get the compilation command and the source file. - base_compile= - srcfile="$nonopt" # always keep a non-empty value in "srcfile" - suppress_opt=yes - suppress_output= - arg_mode=normal - libobj= - later= - - for arg - do - case $arg_mode in - arg ) - # do not "continue". Instead, add this to base_compile - lastarg="$arg" - arg_mode=normal - ;; - - target ) - libobj="$arg" - arg_mode=normal - continue - ;; - - normal ) - # Accept any command-line options. - case $arg in - -o) - if test -n "$libobj" ; then - $echo "$modename: you cannot specify \`-o' more than once" 1>&2 - exit $EXIT_FAILURE - fi - arg_mode=target - continue - ;; - - -static | -prefer-pic | -prefer-non-pic) - later="$later $arg" - continue - ;; - - -no-suppress) - suppress_opt=no - continue - ;; - - -Xcompiler) - arg_mode=arg # the next one goes into the "base_compile" arg list - continue # The current "srcfile" will either be retained or - ;; # replaced later. I would guess that would be a bug. - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` - lastarg= - save_ifs="$IFS"; IFS=',' - for arg in $args; do - IFS="$save_ifs" - - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, so we specify it separately. - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - lastarg="$lastarg $arg" - done - IFS="$save_ifs" - lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` - - # Add the arguments to base_compile. - base_compile="$base_compile $lastarg" - continue - ;; - - * ) - # Accept the current argument as the source file. - # The previous "srcfile" becomes the current argument. - # - lastarg="$srcfile" - srcfile="$arg" - ;; - esac # case $arg - ;; - esac # case $arg_mode - - # Aesthetically quote the previous argument. - lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` - - case $lastarg in - # Double-quote args containing other shell metacharacters. - # Many Bourne shells cannot handle close brackets correctly - # in scan sets, and some SunOS ksh mistreat backslash-escaping - # in scan sets (worked around with variable expansion), - # and furthermore cannot handle '|' '&' '(' ')' in scan sets - # at all, so we specify them separately. - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - lastarg="\"$lastarg\"" - ;; - esac - - base_compile="$base_compile $lastarg" - done # for arg - - case $arg_mode in - arg) - $echo "$modename: you must specify an argument for -Xcompile" - exit $EXIT_FAILURE - ;; - target) - $echo "$modename: you must specify a target with \`-o'" 1>&2 - exit $EXIT_FAILURE - ;; - *) - # Get the name of the library object. - [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` - ;; - esac - - # Recognize several different file suffixes. - # If the user specifies -o file.o, it is replaced with file.lo - xform='[cCFSifmso]' - case $libobj in - *.ada) xform=ada ;; - *.adb) xform=adb ;; - *.ads) xform=ads ;; - *.asm) xform=asm ;; - *.c++) xform=c++ ;; - *.cc) xform=cc ;; - *.ii) xform=ii ;; - *.class) xform=class ;; - *.cpp) xform=cpp ;; - *.cxx) xform=cxx ;; - *.f90) xform=f90 ;; - *.for) xform=for ;; - *.java) xform=java ;; - *.obj) xform=obj ;; - esac - - libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` - - case $libobj in - *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; - *) - $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - func_infer_tag $base_compile - - for arg in $later; do - case $arg in - -static) - build_old_libs=yes - continue - ;; - - -prefer-pic) - pic_mode=yes - continue - ;; - - -prefer-non-pic) - pic_mode=no - continue - ;; - esac - done - - qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` - case $qlibobj in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qlibobj="\"$qlibobj\"" ;; - esac - test "X$libobj" != "X$qlibobj" \ - && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ - && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." - objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$obj"; then - xdir= - else - xdir=$xdir/ - fi - lobj=${xdir}$objdir/$objname - - if test -z "$base_compile"; then - $echo "$modename: you must specify a compilation command" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Delete any leftover library objects. - if test "$build_old_libs" = yes; then - removelist="$obj $lobj $libobj ${libobj}T" - else - removelist="$lobj $libobj ${libobj}T" - fi - - $run $rm $removelist - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - - # On Cygwin there's no "real" PIC flag so we must build both object types - case $host_os in - cygwin* | mingw* | pw32* | os2*) - pic_mode=default - ;; - esac - if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then - # non-PIC code in shared libraries is not supported - pic_mode=default - fi - - # Calculate the filename of the output object if compiler does - # not support -o with -c - if test "$compiler_c_o" = no; then - output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} - lockfile="$output_obj.lock" - removelist="$removelist $output_obj $lockfile" - trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 - else - output_obj= - need_locks=no - lockfile= - fi - - # Lock this critical section if it is needed - # We use this script file to make the link, it avoids creating a new file - if test "$need_locks" = yes; then - until $run ln "$progpath" "$lockfile" 2>/dev/null; do - $show "Waiting for $lockfile to be removed" - sleep 2 - done - elif test "$need_locks" = warn; then - if test -f "$lockfile"; then - $echo "\ -*** ERROR, $lockfile exists and contains: -`cat $lockfile 2>/dev/null` - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - $echo "$srcfile" > "$lockfile" - fi - - if test -n "$fix_srcfile_path"; then - eval srcfile=\"$fix_srcfile_path\" - fi - qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` - case $qsrcfile in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qsrcfile="\"$qsrcfile\"" ;; - esac - - $run $rm "$libobj" "${libobj}T" - - # Create a libtool object file (analogous to a ".la" file), - # but don't create it if we're doing a dry run. - test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed, then go on to compile the next one - if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then - $show "$mv $output_obj $lobj" - if $run $mv $output_obj $lobj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the PIC object to the libtool object file. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then - $echo "\ -*** ERROR, $lockfile contains: -`cat $lockfile 2>/dev/null` - -but it should contain: -$srcfile - -This indicates that another process is trying to use the same -temporary object file, and libtool could not work around it because -your compiler does not support \`-c' and \`-o' together. If you -repeat this compilation, it may succeed, by chance, but you had better -avoid parallel builds (make -j) in this platform, or get a better -compiler." - - $run $rm $removelist - exit $EXIT_FAILURE - fi - - # Just move the object if needed - if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then - $show "$mv $output_obj $obj" - if $run $mv $output_obj $obj; then : - else - error=$? - $run $rm $removelist - exit $error - fi - fi - - # Append the name of the non-PIC object the libtool object file. - # Only append if the libtool object file exists. - test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 - fi - if test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - -static) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=built - ;; - -static-libtool-libs) - if test -z "$pic_flag" && test -n "$link_static_flag"; then - dlopen_self=$dlopen_self_static - fi - prefer_static_libs=yes - ;; - esac - build_libtool_libs=no - build_old_libs=yes - break - ;; - esac - done - - # See if our shared archives depend on static archives. - test -n "$old_archive_from_new_cmds" && build_old_libs=yes - - # Go through the arguments, transforming them on the way. - while test "$#" -gt 0; do - arg="$1" - shift - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test - ;; - *) qarg=$arg ;; - esac - libtool_args="$libtool_args $qarg" - - # If the previous option needs an argument, assign it. - if test -n "$prev"; then - case $prev in - output) - compile_command="$compile_command @OUTPUT@" - finalize_command="$finalize_command @OUTPUT@" - ;; - esac - - case $prev in - dlfiles|dlprefiles) - if test "$preload" = no; then - # Add the symbol object into the linking commands. - compile_command="$compile_command @SYMFILE@" - finalize_command="$finalize_command @SYMFILE@" - preload=yes - fi - case $arg in - *.la | *.lo) ;; # We handle these cases below. - force) - if test "$dlself" = no; then - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - self) - if test "$prev" = dlprefiles; then - dlself=yes - elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then - dlself=yes - else - dlself=needless - export_dynamic=yes - fi - prev= - continue - ;; - *) - if test "$prev" = dlfiles; then - dlfiles="$dlfiles $arg" - else - dlprefiles="$dlprefiles $arg" - fi - prev= - continue - ;; - esac - ;; - expsyms) - export_symbols="$arg" - if test ! -f "$arg"; then - $echo "$modename: symbol file \`$arg' does not exist" - exit $EXIT_FAILURE - fi - prev= - continue - ;; - expsyms_regex) - export_symbols_regex="$arg" - prev= - continue - ;; - inst_prefix) - inst_prefix_dir="$arg" - prev= - continue - ;; - precious_regex) - precious_files_regex="$arg" - prev= - continue - ;; - release) - release="-$arg" - prev= - continue - ;; - objectlist) - if test -f "$arg"; then - save_arg=$arg - moreargs= - for fil in `cat $save_arg` - do -# moreargs="$moreargs $fil" - arg=$fil - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - done - else - $echo "$modename: link input file \`$save_arg' does not exist" - exit $EXIT_FAILURE - fi - arg=$save_arg - prev= - continue - ;; - rpath | xrpath) - # We need an absolute path. - case $arg in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - if test "$prev" = rpath; then - case "$rpath " in - *" $arg "*) ;; - *) rpath="$rpath $arg" ;; - esac - else - case "$xrpath " in - *" $arg "*) ;; - *) xrpath="$xrpath $arg" ;; - esac - fi - prev= - continue - ;; - xcompiler) - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - xlinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $wl$qarg" - prev= - compile_command="$compile_command $wl$qarg" - finalize_command="$finalize_command $wl$qarg" - continue - ;; - xcclinker) - linker_flags="$linker_flags $qarg" - compiler_flags="$compiler_flags $qarg" - prev= - compile_command="$compile_command $qarg" - finalize_command="$finalize_command $qarg" - continue - ;; - shrext) - shrext_cmds="$arg" - prev= - continue - ;; - darwin_framework|darwin_framework_skip) - test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - prev= - continue - ;; - *) - eval "$prev=\"\$arg\"" - prev= - continue - ;; - esac - fi # test -n "$prev" - - prevarg="$arg" - - case $arg in - -all-static) - if test -n "$link_static_flag"; then - compile_command="$compile_command $link_static_flag" - finalize_command="$finalize_command $link_static_flag" - fi - continue - ;; - - -allow-undefined) - # FIXME: remove this flag sometime in the future. - $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 - continue - ;; - - -avoid-version) - avoid_version=yes - continue - ;; - - -dlopen) - prev=dlfiles - continue - ;; - - -dlpreopen) - prev=dlprefiles - continue - ;; - - -export-dynamic) - export_dynamic=yes - continue - ;; - - -export-symbols | -export-symbols-regex) - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: more than one -exported-symbols argument is not allowed" - exit $EXIT_FAILURE - fi - if test "X$arg" = "X-export-symbols"; then - prev=expsyms - else - prev=expsyms_regex - fi - continue - ;; - - -framework|-arch|-isysroot) - case " $CC " in - *" ${arg} ${1} "* | *" ${arg} ${1} "*) - prev=darwin_framework_skip ;; - *) compiler_flags="$compiler_flags $arg" - prev=darwin_framework ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -inst-prefix-dir) - prev=inst_prefix - continue - ;; - - # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* - # so, if we see these flags be careful not to treat them like -L - -L[A-Z][A-Z]*:*) - case $with_gcc/$host in - no/*-*-irix* | /*-*-irix*) - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - ;; - esac - continue - ;; - - -L*) - dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - notinst_path="$notinst_path $dir" - fi - dir="$absdir" - ;; - esac - case "$deplibs " in - *" -L$dir "*) ;; - *) - deplibs="$deplibs -L$dir" - lib_search_path="$lib_search_path $dir" - ;; - esac - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$dir:"*) ;; - *) dllsearchpath="$dllsearchpath:$dir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - continue - ;; - - -l*) - if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) - # These systems don't actually have a C or math library (as such) - continue - ;; - *-*-os2*) - # These systems don't actually have a C library (as such) - test "X$arg" = "X-lc" && continue - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - test "X$arg" = "X-lc" && continue - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C and math libraries are in the System framework - deplibs="$deplibs -framework System" - continue - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - test "X$arg" = "X-lc" && continue - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - test "X$arg" = "X-lc" && continue - ;; - esac - elif test "X$arg" = "X-lc_r"; then - case $host in - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc_r directly, use -pthread flag. - continue - ;; - esac - fi - deplibs="$deplibs $arg" - continue - ;; - - # Tru64 UNIX uses -model [arg] to determine the layout of C++ - # classes, name mangling, and exception handling. - -model) - compile_command="$compile_command $arg" - compiler_flags="$compiler_flags $arg" - finalize_command="$finalize_command $arg" - prev=xcompiler - continue - ;; - - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - compiler_flags="$compiler_flags $arg" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - continue - ;; - - -module) - module=yes - continue - ;; - - # -64, -mips[0-9] enable 64-bit mode on the SGI compiler - # -r[0-9][0-9]* specifies the processor on the SGI compiler - # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler - # +DA*, +DD* enable 64-bit mode on the HP compiler - # -q* pass through compiler args for the IBM compiler - # -m* pass through architecture-specific compiler args for GCC - # -m*, -t[45]*, -txscale* pass through architecture-specific - # compiler args for GCC - # -pg pass through profiling flag for GCC - # @file GCC response files - -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ - -t[45]*|-txscale*|@*) - - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - compiler_flags="$compiler_flags $arg" - continue - ;; - - -shrext) - prev=shrext - continue - ;; - - -no-fast-install) - fast_install=no - continue - ;; - - -no-install) - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - # The PATH hackery in wrapper scripts is required on Windows - # in order for the loader to find any dlls it needs. - $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 - $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 - fast_install=no - ;; - *) no_install=yes ;; - esac - continue - ;; - - -no-undefined) - allow_undefined=no - continue - ;; - - -objectlist) - prev=objectlist - continue - ;; - - -o) prev=output ;; - - -precious-files-regex) - prev=precious_regex - continue - ;; - - -release) - prev=release - continue - ;; - - -rpath) - prev=rpath - continue - ;; - - -R) - prev=xrpath - continue - ;; - - -R*) - dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - $echo "$modename: only absolute run-paths are allowed" 1>&2 - exit $EXIT_FAILURE - ;; - esac - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - continue - ;; - - -static | -static-libtool-libs) - # The effects of -static are defined in a previous loop. - # We used to do the same as -all-static on platforms that - # didn't have a PIC flag, but the assumption that the effects - # would be equivalent was wrong. It would break on at least - # Digital Unix and AIX. - continue - ;; - - -thread-safe) - thread_safe=yes - continue - ;; - - -version-info) - prev=vinfo - continue - ;; - -version-number) - prev=vinfo - vinfo_number=yes - continue - ;; - - -Wc,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Wl,*) - args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` - arg= - save_ifs="$IFS"; IFS=',' - for flag in $args; do - IFS="$save_ifs" - case $flag in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - flag="\"$flag\"" - ;; - esac - arg="$arg $wl$flag" - compiler_flags="$compiler_flags $wl$flag" - linker_flags="$linker_flags $flag" - done - IFS="$save_ifs" - arg=`$echo "X$arg" | $Xsed -e "s/^ //"` - ;; - - -Xcompiler) - prev=xcompiler - continue - ;; - - -Xlinker) - prev=xlinker - continue - ;; - - -XCClinker) - prev=xcclinker - continue - ;; - - # Some other compiler flag. - -* | +*) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - - *.$objext) - # A standard object. - objs="$objs $arg" - ;; - - *.lo) - # A libtool-controlled object. - - # Check to see that this really is a libtool object. - if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - pic_object= - non_pic_object= - - # Read the .lo file - # If there is no directory component, then add one. - case $arg in - */* | *\\*) . $arg ;; - *) . ./$arg ;; - esac - - if test -z "$pic_object" || \ - test -z "$non_pic_object" || - test "$pic_object" = none && \ - test "$non_pic_object" = none; then - $echo "$modename: cannot find name of object for \`$arg'" 1>&2 - exit $EXIT_FAILURE - fi - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - if test "$pic_object" != none; then - # Prepend the subdirectory the object is found in. - pic_object="$xdir$pic_object" - - if test "$prev" = dlfiles; then - if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then - dlfiles="$dlfiles $pic_object" - prev= - continue - else - # If libtool objects are unsupported, then we need to preload. - prev=dlprefiles - fi - fi - - # CHECK ME: I think I busted this. -Ossama - if test "$prev" = dlprefiles; then - # Preload the old-style object. - dlprefiles="$dlprefiles $pic_object" - prev= - fi - - # A PIC object. - libobjs="$libobjs $pic_object" - arg="$pic_object" - fi - - # Non-PIC object. - if test "$non_pic_object" != none; then - # Prepend the subdirectory the object is found in. - non_pic_object="$xdir$non_pic_object" - - # A standard non-PIC object - non_pic_objects="$non_pic_objects $non_pic_object" - if test -z "$pic_object" || test "$pic_object" = none ; then - arg="$non_pic_object" - fi - else - # If the PIC object exists, use it instead. - # $xdir was prepended to $pic_object above. - non_pic_object="$pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - else - # Only an error if not doing a dry-run. - if test -z "$run"; then - $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 - exit $EXIT_FAILURE - else - # Dry-run case. - - # Extract subdirectory from the argument. - xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` - if test "X$xdir" = "X$arg"; then - xdir= - else - xdir="$xdir/" - fi - - pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` - non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` - libobjs="$libobjs $pic_object" - non_pic_objects="$non_pic_objects $non_pic_object" - fi - fi - ;; - - *.$libext) - # An archive. - deplibs="$deplibs $arg" - old_deplibs="$old_deplibs $arg" - continue - ;; - - *.la) - # A libtool-controlled library. - - if test "$prev" = dlfiles; then - # This library was specified with -dlopen. - dlfiles="$dlfiles $arg" - prev= - elif test "$prev" = dlprefiles; then - # The library was specified with -dlpreopen. - dlprefiles="$dlprefiles $arg" - prev= - else - deplibs="$deplibs $arg" - fi - continue - ;; - - # Some other compiler argument. - *) - # Unknown arguments in both finalize_command and compile_command need - # to be aesthetically quoted because they are evaled later. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - ;; - esac # arg - - # Now actually substitute the argument into the commands. - if test -n "$arg"; then - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - done # argument parsing loop - - if test -n "$prev"; then - $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then - eval arg=\"$export_dynamic_flag_spec\" - compile_command="$compile_command $arg" - finalize_command="$finalize_command $arg" - fi - - oldlibs= - # calculate the name of the file, without its directory - outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` - libobjs_save="$libobjs" - - if test -n "$shlibpath_var"; then - # get the directories listed in $shlibpath_var - eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` - else - shlib_search_path= - fi - eval sys_lib_search_path=\"$sys_lib_search_path_spec\" - eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" - - output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` - if test "X$output_objdir" = "X$output"; then - output_objdir="$objdir" - else - output_objdir="$output_objdir/$objdir" - fi - # Create the object directory. - if test ! -d "$output_objdir"; then - $show "$mkdir $output_objdir" - $run $mkdir $output_objdir - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then - exit $exit_status - fi - fi - - # Determine the type of output - case $output in - "") - $echo "$modename: you must specify an output file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - *.$libext) linkmode=oldlib ;; - *.lo | *.$objext) linkmode=obj ;; - *.la) linkmode=lib ;; - *) linkmode=prog ;; # Anything else should be a program. - esac - - case $host in - *cygwin* | *mingw* | *pw32*) - # don't eliminate duplications in $postdeps and $predeps - duplicate_compiler_generated_deps=yes - ;; - *) - duplicate_compiler_generated_deps=$duplicate_deps - ;; - esac - specialdeplibs= - - libs= - # Find all interdependent deplibs by searching for libraries - # that are linked more than once (e.g. -la -lb -la) - for deplib in $deplibs; do - if test "X$duplicate_deps" = "Xyes" ; then - case "$libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - libs="$libs $deplib" - done - - if test "$linkmode" = lib; then - libs="$predeps $libs $compiler_lib_search_path $postdeps" - - # Compute libraries that are listed more than once in $predeps - # $postdeps and mark them as special (i.e., whose duplicates are - # not to be eliminated). - pre_post_deps= - if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then - for pre_post_dep in $predeps $postdeps; do - case "$pre_post_deps " in - *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; - esac - pre_post_deps="$pre_post_deps $pre_post_dep" - done - fi - pre_post_deps= - fi - - deplibs= - newdependency_libs= - newlib_search_path= - need_relink=no # whether we're linking any uninstalled libtool libraries - notinst_deplibs= # not-installed libtool libraries - case $linkmode in - lib) - passes="conv link" - for file in $dlfiles $dlprefiles; do - case $file in - *.la) ;; - *) - $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - prog) - compile_deplibs= - finalize_deplibs= - alldeplibs=no - newdlfiles= - newdlprefiles= - passes="conv scan dlopen dlpreopen link" - ;; - *) passes="conv" - ;; - esac - for pass in $passes; do - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan"; then - libs="$deplibs" - deplibs= - fi - if test "$linkmode" = prog; then - case $pass in - dlopen) libs="$dlfiles" ;; - dlpreopen) libs="$dlprefiles" ;; - link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; - esac - fi - if test "$pass" = dlopen; then - # Collect dlpreopened libraries - save_deplibs="$deplibs" - deplibs= - fi - for deplib in $libs; do - lib= - found=no - case $deplib in - -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - compiler_flags="$compiler_flags $deplib" - fi - continue - ;; - -l*) - if test "$linkmode" != lib && test "$linkmode" != prog; then - $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 - continue - fi - name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` - for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do - for search_ext in .la $std_shrext .so .a; do - # Search the libtool library - lib="$searchdir/lib${name}${search_ext}" - if test -f "$lib"; then - if test "$search_ext" = ".la"; then - found=yes - else - found=no - fi - break 2 - fi - done - done - if test "$found" != yes; then - # deplib doesn't seem to be a libtool library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - else # deplib is a libtool library - # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, - # We need to do some special things here, and not later. - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $deplib "*) - if (${SED} -e '2q' $lib | - grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - library_names= - old_library= - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - for l in $old_library $library_names; do - ll="$l" - done - if test "X$ll" = "X$old_library" ; then # only static version available - found=no - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - lib=$ladir/$old_library - if test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - deplibs="$deplib $deplibs" - test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" - fi - continue - fi - fi - ;; - *) ;; - esac - fi - fi - ;; # -l - -L*) - case $linkmode in - lib) - deplibs="$deplib $deplibs" - test "$pass" = conv && continue - newdependency_libs="$deplib $newdependency_libs" - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - prog) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - if test "$pass" = scan; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` - ;; - *) - $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 - ;; - esac # linkmode - continue - ;; # -L - -R*) - if test "$pass" = link; then - dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` - # Make sure the xrpath contains only unique directories. - case "$xrpath " in - *" $dir "*) ;; - *) xrpath="$xrpath $dir" ;; - esac - fi - deplibs="$deplib $deplibs" - continue - ;; - *.la) lib="$deplib" ;; - *.$libext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - continue - fi - case $linkmode in - lib) - valid_a_lib=no - case $deplibs_check_method in - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - if eval $echo \"$deplib\" 2>/dev/null \ - | $SED 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - valid_a_lib=yes - fi - ;; - pass_all) - valid_a_lib=yes - ;; - esac - if test "$valid_a_lib" != yes; then - $echo - $echo "*** Warning: Trying to link with static lib archive $deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because the file extensions .$libext of this argument makes me believe" - $echo "*** that it is just a static archive that I should not used here." - else - $echo - $echo "*** Warning: Linking the shared library $output against the" - $echo "*** static library $deplib is not portable!" - deplibs="$deplib $deplibs" - fi - continue - ;; - prog) - if test "$pass" != link; then - deplibs="$deplib $deplibs" - else - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - fi - continue - ;; - esac # linkmode - ;; # *.$libext - *.lo | *.$objext) - if test "$pass" = conv; then - deplibs="$deplib $deplibs" - elif test "$linkmode" = prog; then - if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then - # If there is no dlopen support or we're linking statically, - # we need to preload. - newdlprefiles="$newdlprefiles $deplib" - compile_deplibs="$deplib $compile_deplibs" - finalize_deplibs="$deplib $finalize_deplibs" - else - newdlfiles="$newdlfiles $deplib" - fi - fi - continue - ;; - %DEPLIBS%) - alldeplibs=yes - continue - ;; - esac # case $deplib - if test "$found" = yes || test -f "$lib"; then : - else - $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 - exit $EXIT_FAILURE - fi - - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - - ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` - test "X$ladir" = "X$lib" && ladir="." - - dlname= - dlopen= - dlpreopen= - libdir= - library_names= - old_library= - # If the library was installed with an old release of libtool, - # it will not redefine variables installed, or shouldnotlink - installed=yes - shouldnotlink=no - avoidtemprpath= - - - # Read the .la file - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - - if test "$linkmode,$pass" = "lib,link" || - test "$linkmode,$pass" = "prog,scan" || - { test "$linkmode" != prog && test "$linkmode" != lib; }; then - test -n "$dlopen" && dlfiles="$dlfiles $dlopen" - test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" - fi - - if test "$pass" = conv; then - # Only check for convenience libraries - deplibs="$lib $deplibs" - if test -z "$libdir"; then - if test -z "$old_library"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # It is a libtool convenience library, so add in its objects. - convenience="$convenience $ladir/$objdir/$old_library" - old_convenience="$old_convenience $ladir/$objdir/$old_library" - tmp_libs= - for deplib in $dependency_libs; do - deplibs="$deplib $deplibs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - elif test "$linkmode" != prog && test "$linkmode" != lib; then - $echo "$modename: \`$lib' is not a convenience library" 1>&2 - exit $EXIT_FAILURE - fi - continue - fi # $pass = conv - - - # Get the name of the library we link against. - linklib= - for l in $old_library $library_names; do - linklib="$l" - done - if test -z "$linklib"; then - $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - - # This library was specified with -dlopen. - if test "$pass" = dlopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - if test -z "$dlname" || - test "$dlopen_support" != yes || - test "$build_libtool_libs" = no; then - # If there is no dlname, no dlopen support or we're linking - # statically, we need to preload. We also need to preload any - # dependent libraries so libltdl's deplib preloader doesn't - # bomb out in the load deplibs phase. - dlprefiles="$dlprefiles $lib $dependency_libs" - else - newdlfiles="$newdlfiles $lib" - fi - continue - fi # $pass = dlopen - - # We need an absolute path. - case $ladir in - [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; - *) - abs_ladir=`cd "$ladir" && pwd` - if test -z "$abs_ladir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 - $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 - abs_ladir="$ladir" - fi - ;; - esac - laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - - # Find the relevant object directory and library name. - if test "X$installed" = Xyes; then - if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then - $echo "$modename: warning: library \`$lib' was moved." 1>&2 - dir="$ladir" - absdir="$abs_ladir" - libdir="$abs_ladir" - else - dir="$libdir" - absdir="$libdir" - fi - test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes - else - if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then - dir="$ladir" - absdir="$abs_ladir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - else - dir="$ladir/$objdir" - absdir="$abs_ladir/$objdir" - # Remove this search path later - notinst_path="$notinst_path $abs_ladir" - fi - fi # $installed = yes - name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - - # This library was specified with -dlpreopen. - if test "$pass" = dlpreopen; then - if test -z "$libdir"; then - $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 - exit $EXIT_FAILURE - fi - # Prefer using a static library (so that no silly _DYNAMIC symbols - # are required to link). - if test -n "$old_library"; then - newdlprefiles="$newdlprefiles $dir/$old_library" - # Otherwise, use the dlname, so that lt_dlopen finds it. - elif test -n "$dlname"; then - newdlprefiles="$newdlprefiles $dir/$dlname" - else - newdlprefiles="$newdlprefiles $dir/$linklib" - fi - fi # $pass = dlpreopen - - if test -z "$libdir"; then - # Link the convenience library - if test "$linkmode" = lib; then - deplibs="$dir/$old_library $deplibs" - elif test "$linkmode,$pass" = "prog,link"; then - compile_deplibs="$dir/$old_library $compile_deplibs" - finalize_deplibs="$dir/$old_library $finalize_deplibs" - else - deplibs="$lib $deplibs" # used for prog,scan pass - fi - continue - fi - - - if test "$linkmode" = prog && test "$pass" != link; then - newlib_search_path="$newlib_search_path $ladir" - deplibs="$lib $deplibs" - - linkalldeplibs=no - if test "$link_all_deplibs" != no || test -z "$library_names" || - test "$build_libtool_libs" = no; then - linkalldeplibs=yes - fi - - tmp_libs= - for deplib in $dependency_libs; do - case $deplib in - -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test - esac - # Need to link against all dependency_libs? - if test "$linkalldeplibs" = yes; then - deplibs="$deplib $deplibs" - else - # Need to hardcode shared library paths - # or/and link against static libraries - newdependency_libs="$deplib $newdependency_libs" - fi - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done # for deplib - continue - fi # $linkmode = prog... - - if test "$linkmode,$pass" = "prog,link"; then - if test -n "$library_names" && - { { test "$prefer_static_libs" = no || - test "$prefer_static_libs,$installed" = "built,yes"; } || - test -z "$old_library"; }; then - # We need to hardcode the library path - if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then - # Make sure the rpath contains only unique directories. - case "$temp_rpath " in - *" $dir "*) ;; - *" $absdir "*) ;; - *) temp_rpath="$temp_rpath $absdir" ;; - esac - fi - - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi # $linkmode,$pass = prog,link... - - if test "$alldeplibs" = yes && - { test "$deplibs_check_method" = pass_all || - { test "$build_libtool_libs" = yes && - test -n "$library_names"; }; }; then - # We only need to search for static libraries - continue - fi - fi - - link_static=no # Whether the deplib will be linked statically - use_static_libs=$prefer_static_libs - if test "$use_static_libs" = built && test "$installed" = yes ; then - use_static_libs=no - fi - if test -n "$library_names" && - { test "$use_static_libs" = no || test -z "$old_library"; }; then - if test "$installed" = no; then - notinst_deplibs="$notinst_deplibs $lib" - need_relink=yes - fi - # This is a shared library - - # Warn about portability, can't link against -module's on - # some systems (darwin) - if test "$shouldnotlink" = yes && test "$pass" = link ; then - $echo - if test "$linkmode" = prog; then - $echo "*** Warning: Linking the executable $output against the loadable module" - else - $echo "*** Warning: Linking the shared library $output against the loadable module" - fi - $echo "*** $linklib is not portable!" - fi - if test "$linkmode" = lib && - test "$hardcode_into_libs" = yes; then - # Hardcode the library path. - # Skip directories that are in the system default run-time - # search path. - case " $sys_lib_dlsearch_path " in - *" $absdir "*) ;; - *) - case "$compile_rpath " in - *" $absdir "*) ;; - *) compile_rpath="$compile_rpath $absdir" - esac - ;; - esac - case " $sys_lib_dlsearch_path " in - *" $libdir "*) ;; - *) - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" - esac - ;; - esac - fi - - if test -n "$old_archive_from_expsyms_cmds"; then - # figure out the soname - set dummy $library_names - realname="$2" - shift; shift - libname=`eval \\$echo \"$libname_spec\"` - # use dlname if we got it. it's perfectly good, no? - if test -n "$dlname"; then - soname="$dlname" - elif test -n "$soname_spec"; then - # bleh windows - case $host in - *cygwin* | mingw*) - major=`expr $current - $age` - versuffix="-$major" - ;; - esac - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - - # Make a new name for the extract_expsyms_cmds to use - soroot="$soname" - soname=`$echo $soroot | ${SED} -e 's/^.*\///'` - newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" - - # If the library has no export list, then create one now - if test -f "$output_objdir/$soname-def"; then : - else - $show "extracting exported symbol list from \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$extract_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - # Create $newlib - if test -f "$output_objdir/$newlib"; then :; else - $show "generating import library for \`$soname'" - save_ifs="$IFS"; IFS='~' - cmds=$old_archive_from_expsyms_cmds - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - # make sure the library variables are pointing to the new library - dir=$output_objdir - linklib=$newlib - fi # test -n "$old_archive_from_expsyms_cmds" - - if test "$linkmode" = prog || test "$mode" != relink; then - add_shlibpath= - add_dir= - add= - lib_linked=yes - case $hardcode_action in - immediate | unsupported) - if test "$hardcode_direct" = no; then - add="$dir/$linklib" - case $host in - *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; - *-*-sysv4*uw2*) add_dir="-L$dir" ;; - *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ - *-*-unixware7*) add_dir="-L$dir" ;; - *-*-darwin* ) - # if the lib is a module then we can not link against - # it, someone is ignoring the new warnings I added - if /usr/bin/file -L $add 2> /dev/null | - $EGREP ": [^:]* bundle" >/dev/null ; then - $echo "** Warning, lib $linklib is a module, not a shared library" - if test -z "$old_library" ; then - $echo - $echo "** And there doesn't seem to be a static archive available" - $echo "** The link will probably fail, sorry" - else - add="$dir/$old_library" - fi - fi - esac - elif test "$hardcode_minus_L" = no; then - case $host in - *-*-sunos*) add_shlibpath="$dir" ;; - esac - add_dir="-L$dir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = no; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - relink) - if test "$hardcode_direct" = yes; then - add="$dir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$dir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - add_shlibpath="$dir" - add="-l$name" - else - lib_linked=no - fi - ;; - *) lib_linked=no ;; - esac - - if test "$lib_linked" != yes; then - $echo "$modename: configuration error: unsupported hardcode properties" - exit $EXIT_FAILURE - fi - - if test -n "$add_shlibpath"; then - case :$compile_shlibpath: in - *":$add_shlibpath:"*) ;; - *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; - esac - fi - if test "$linkmode" = prog; then - test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" - test -n "$add" && compile_deplibs="$add $compile_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - if test "$hardcode_direct" != yes && \ - test "$hardcode_minus_L" != yes && \ - test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - fi - fi - fi - - if test "$linkmode" = prog || test "$mode" = relink; then - add_shlibpath= - add_dir= - add= - # Finalize command for both is simple: just hardcode it. - if test "$hardcode_direct" = yes; then - add="$libdir/$linklib" - elif test "$hardcode_minus_L" = yes; then - add_dir="-L$libdir" - add="-l$name" - elif test "$hardcode_shlibpath_var" = yes; then - case :$finalize_shlibpath: in - *":$libdir:"*) ;; - *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; - esac - add="-l$name" - elif test "$hardcode_automatic" = yes; then - if test -n "$inst_prefix_dir" && - test -f "$inst_prefix_dir$libdir/$linklib" ; then - add="$inst_prefix_dir$libdir/$linklib" - else - add="$libdir/$linklib" - fi - else - # We cannot seem to hardcode it, guess we'll fake it. - add_dir="-L$libdir" - # Try looking first in the location we're being installed to. - if test -n "$inst_prefix_dir"; then - case $libdir in - [\\/]*) - add_dir="$add_dir -L$inst_prefix_dir$libdir" - ;; - esac - fi - add="-l$name" - fi - - if test "$linkmode" = prog; then - test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" - test -n "$add" && finalize_deplibs="$add $finalize_deplibs" - else - test -n "$add_dir" && deplibs="$add_dir $deplibs" - test -n "$add" && deplibs="$add $deplibs" - fi - fi - elif test "$linkmode" = prog; then - # Here we assume that one of hardcode_direct or hardcode_minus_L - # is not unsupported. This is valid on all known static and - # shared platforms. - if test "$hardcode_direct" != unsupported; then - test -n "$old_library" && linklib="$old_library" - compile_deplibs="$dir/$linklib $compile_deplibs" - finalize_deplibs="$dir/$linklib $finalize_deplibs" - else - compile_deplibs="-l$name -L$dir $compile_deplibs" - finalize_deplibs="-l$name -L$dir $finalize_deplibs" - fi - elif test "$build_libtool_libs" = yes; then - # Not a shared library - if test "$deplibs_check_method" != pass_all; then - # We're trying link a shared library against a static one - # but the system doesn't support it. - - # Just print a warning and add the library to dependency_libs so - # that the program can be linked against the static library. - $echo - $echo "*** Warning: This system can not link to static lib archive $lib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have." - if test "$module" = yes; then - $echo "*** But as you try to build a module library, libtool will still create " - $echo "*** a static module, that should work as long as the dlopening application" - $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - else - deplibs="$dir/$old_library $deplibs" - link_static=yes - fi - fi # link shared/static library? - - if test "$linkmode" = lib; then - if test -n "$dependency_libs" && - { test "$hardcode_into_libs" != yes || - test "$build_old_libs" = yes || - test "$link_static" = yes; }; then - # Extract -R from dependency_libs - temp_deplibs= - for libdir in $dependency_libs; do - case $libdir in - -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` - case " $xrpath " in - *" $temp_xrpath "*) ;; - *) xrpath="$xrpath $temp_xrpath";; - esac;; - *) temp_deplibs="$temp_deplibs $libdir";; - esac - done - dependency_libs="$temp_deplibs" - fi - - newlib_search_path="$newlib_search_path $absdir" - # Link against this library - test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" - # ... and its dependency_libs - tmp_libs= - for deplib in $dependency_libs; do - newdependency_libs="$deplib $newdependency_libs" - if test "X$duplicate_deps" = "Xyes" ; then - case "$tmp_libs " in - *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; - esac - fi - tmp_libs="$tmp_libs $deplib" - done - - if test "$link_all_deplibs" != no; then - # Add the search paths of all dependency libraries - for deplib in $dependency_libs; do - case $deplib in - -L*) path="$deplib" ;; - *.la) - dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$deplib" && dir="." - # We need an absolute path. - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; - *) - absdir=`cd "$dir" && pwd` - if test -z "$absdir"; then - $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 - absdir="$dir" - fi - ;; - esac - if grep "^installed=no" $deplib > /dev/null; then - path="$absdir/$objdir" - else - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - if test "$absdir" != "$libdir"; then - $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 - fi - path="$absdir" - fi - depdepl= - case $host in - *-*-darwin*) - # we do not want to link against static libs, - # but need to link against shared - eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` - if test -n "$deplibrary_names" ; then - for tmp in $deplibrary_names ; do - depdepl=$tmp - done - if test -f "$path/$depdepl" ; then - depdepl="$path/$depdepl" - fi - # do not add paths which are already there - case " $newlib_search_path " in - *" $path "*) ;; - *) newlib_search_path="$newlib_search_path $path";; - esac - fi - path="" - ;; - *) - path="-L$path" - ;; - esac - ;; - -l*) - case $host in - *-*-darwin*) - # Again, we only want to link against shared libraries - eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` - for tmp in $newlib_search_path ; do - if test -f "$tmp/lib$tmp_libs.dylib" ; then - eval depdepl="$tmp/lib$tmp_libs.dylib" - break - fi - done - path="" - ;; - *) continue ;; - esac - ;; - *) continue ;; - esac - case " $deplibs " in - *" $path "*) ;; - *) deplibs="$path $deplibs" ;; - esac - case " $deplibs " in - *" $depdepl "*) ;; - *) deplibs="$depdepl $deplibs" ;; - esac - done - fi # link_all_deplibs != no - fi # linkmode = lib - done # for deplib in $libs - dependency_libs="$newdependency_libs" - if test "$pass" = dlpreopen; then - # Link the dlpreopened libraries before other libraries - for deplib in $save_deplibs; do - deplibs="$deplib $deplibs" - done - fi - if test "$pass" != dlopen; then - if test "$pass" != conv; then - # Make sure lib_search_path contains only unique directories. - lib_search_path= - for dir in $newlib_search_path; do - case "$lib_search_path " in - *" $dir "*) ;; - *) lib_search_path="$lib_search_path $dir" ;; - esac - done - newlib_search_path= - fi - - if test "$linkmode,$pass" != "prog,link"; then - vars="deplibs" - else - vars="compile_deplibs finalize_deplibs" - fi - for var in $vars dependency_libs; do - # Add libraries to $var in reverse order - eval tmp_libs=\"\$$var\" - new_libs= - for deplib in $tmp_libs; do - # FIXME: Pedantically, this is the right thing to do, so - # that some nasty dependency loop isn't accidentally - # broken: - #new_libs="$deplib $new_libs" - # Pragmatically, this seems to cause very few problems in - # practice: - case $deplib in - -L*) new_libs="$deplib $new_libs" ;; - -R*) ;; - *) - # And here is the reason: when a library appears more - # than once as an explicit dependence of a library, or - # is implicitly linked in more than once by the - # compiler, it is considered special, and multiple - # occurrences thereof are not removed. Compare this - # with having the same library being listed as a - # dependency of multiple other libraries: in this case, - # we know (pedantically, we assume) the library does not - # need to be listed more than once, so we keep only the - # last copy. This is not always right, but it is rare - # enough that we require users that really mean to play - # such unportable linking tricks to link the library - # using -Wl,-lname, so that libtool does not consider it - # for duplicate removal. - case " $specialdeplibs " in - *" $deplib "*) new_libs="$deplib $new_libs" ;; - *) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$deplib $new_libs" ;; - esac - ;; - esac - ;; - esac - done - tmp_libs= - for deplib in $new_libs; do - case $deplib in - -L*) - case " $tmp_libs " in - *" $deplib "*) ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - ;; - *) tmp_libs="$tmp_libs $deplib" ;; - esac - done - eval $var=\"$tmp_libs\" - done # for var - fi - # Last step: remove runtime libs from dependency_libs - # (they stay in deplibs) - tmp_libs= - for i in $dependency_libs ; do - case " $predeps $postdeps $compiler_lib_search_path " in - *" $i "*) - i="" - ;; - esac - if test -n "$i" ; then - tmp_libs="$tmp_libs $i" - fi - done - dependency_libs=$tmp_libs - done # for pass - if test "$linkmode" = prog; then - dlfiles="$newdlfiles" - dlprefiles="$newdlprefiles" - fi - - case $linkmode in - oldlib) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 - fi - - if test -n "$export_symbols" || test -n "$export_symbols_regex"; then - $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 - fi - - # Now set the variables for building old libraries. - build_libtool_libs=no - oldlibs="$output" - objs="$objs$old_deplibs" - ;; - - lib) - # Make sure we only generate libraries of the form `libNAME.la'. - case $outputname in - lib*) - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - ;; - *) - if test "$module" = no; then - $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - if test "$need_lib_prefix" != no; then - # Add the "lib" prefix for modules if required - name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - eval shared_ext=\"$shrext_cmds\" - eval libname=\"$libname_spec\" - else - libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` - fi - ;; - esac - - if test -n "$objs"; then - if test "$deplibs_check_method" != pass_all; then - $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 - exit $EXIT_FAILURE - else - $echo - $echo "*** Warning: Linking the shared library $output against the non-libtool" - $echo "*** objects $objs is not portable!" - libobjs="$libobjs $objs" - fi - fi - - if test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 - fi - - set dummy $rpath - if test "$#" -gt 2; then - $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 - fi - install_libdir="$2" - - oldlibs= - if test -z "$rpath"; then - if test "$build_libtool_libs" = yes; then - # Building a libtool convenience library. - # Some compilers have problems with a `.al' extension so - # convenience libraries should have the same extension an - # archive normally would. - oldlibs="$output_objdir/$libname.$libext $oldlibs" - build_libtool_libs=convenience - build_old_libs=yes - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 - fi - else - - # Parse the version information argument. - save_ifs="$IFS"; IFS=':' - set dummy $vinfo 0 0 0 - IFS="$save_ifs" - - if test -n "$8"; then - $echo "$modename: too many parameters to \`-version-info'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # convert absolute version numbers to libtool ages - # this retains compatibility with .la files and attempts - # to make the code below a bit more comprehensible - - case $vinfo_number in - yes) - number_major="$2" - number_minor="$3" - number_revision="$4" - # - # There are really only two kinds -- those that - # use the current revision as the major version - # and those that subtract age and use age as - # a minor version. But, then there is irix - # which has an extra 1 added just for fun - # - case $version_type in - darwin|linux|osf|windows|none) - current=`expr $number_major + $number_minor` - age="$number_minor" - revision="$number_revision" - ;; - freebsd-aout|freebsd-elf|sunos) - current="$number_major" - revision="$number_minor" - age="0" - ;; - irix|nonstopux) - current=`expr $number_major + $number_minor - 1` - age="$number_minor" - revision="$number_minor" - ;; - esac - ;; - no) - current="$2" - revision="$3" - age="$4" - ;; - esac - - # Check that each of the things are valid numbers. - case $current in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $revision in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - case $age in - 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; - *) - $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test "$age" -gt "$current"; then - $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 - $echo "$modename: \`$vinfo' is not valid version information" 1>&2 - exit $EXIT_FAILURE - fi - - # Calculate the version variables. - major= - versuffix= - verstring= - case $version_type in - none) ;; - - darwin) - # Like Linux, but with the current version available in - # verstring for coding it into the library header - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - # Darwin ld doesn't like 0 for these options... - minor_current=`expr $current + 1` - verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" - ;; - - freebsd-aout) - major=".$current" - versuffix=".$current.$revision"; - ;; - - freebsd-elf) - major=".$current" - versuffix=".$current"; - ;; - - irix | nonstopux) - major=`expr $current - $age + 1` - - case $version_type in - nonstopux) verstring_prefix=nonstopux ;; - *) verstring_prefix=sgi ;; - esac - verstring="$verstring_prefix$major.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$revision - while test "$loop" -ne 0; do - iface=`expr $revision - $loop` - loop=`expr $loop - 1` - verstring="$verstring_prefix$major.$iface:$verstring" - done - - # Before this point, $major must not contain `.'. - major=.$major - versuffix="$major.$revision" - ;; - - linux) - major=.`expr $current - $age` - versuffix="$major.$age.$revision" - ;; - - osf) - major=.`expr $current - $age` - versuffix=".$current.$age.$revision" - verstring="$current.$age.$revision" - - # Add in all the interfaces that we are compatible with. - loop=$age - while test "$loop" -ne 0; do - iface=`expr $current - $loop` - loop=`expr $loop - 1` - verstring="$verstring:${iface}.0" - done - - # Make executables depend on our current version. - verstring="$verstring:${current}.0" - ;; - - sunos) - major=".$current" - versuffix=".$current.$revision" - ;; - - windows) - # Use '-' rather than '.', since we only want one - # extension on DOS 8.3 filesystems. - major=`expr $current - $age` - versuffix="-$major" - ;; - - *) - $echo "$modename: unknown library version type \`$version_type'" 1>&2 - $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Clear the version info if we defaulted, and they specified a release. - if test -z "$vinfo" && test -n "$release"; then - major= - case $version_type in - darwin) - # we can't check for "0.0" in archive_cmds due to quoting - # problems, so we reset it completely - verstring= - ;; - *) - verstring="0.0" - ;; - esac - if test "$need_version" = no; then - versuffix= - else - versuffix=".0.0" - fi - fi - - # Remove version info from name if versioning should be avoided - if test "$avoid_version" = yes && test "$need_version" = no; then - major= - versuffix= - verstring="" - fi - - # Check to see if the archive will have undefined symbols. - if test "$allow_undefined" = yes; then - if test "$allow_undefined_flag" = unsupported; then - $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 - build_libtool_libs=no - build_old_libs=yes - fi - else - # Don't allow undefined symbols. - allow_undefined_flag="$no_undefined_flag" - fi - fi - - if test "$mode" != relink; then - # Remove our outputs, but don't remove object files since they - # may have been created when compiling PIC objects. - removelist= - tempremovelist=`$echo "$output_objdir/*"` - for p in $tempremovelist; do - case $p in - *.$objext) - ;; - $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) - if test "X$precious_files_regex" != "X"; then - if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 - then - continue - fi - fi - removelist="$removelist $p" - ;; - *) ;; - esac - done - if test -n "$removelist"; then - $show "${rm}r $removelist" - $run ${rm}r $removelist - fi - fi - - # Now set the variables for building old libraries. - if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then - oldlibs="$oldlibs $output_objdir/$libname.$libext" - - # Transform .lo files to .o files. - oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` - fi - - # Eliminate all temporary directories. -# for path in $notinst_path; do -# lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` -# deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` -# dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` -# done - - if test -n "$xrpath"; then - # If the user specified any rpath flags, then add them. - temp_xrpath= - for libdir in $xrpath; do - temp_xrpath="$temp_xrpath -R$libdir" - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then - dependency_libs="$temp_xrpath $dependency_libs" - fi - fi - - # Make sure dlfiles contains only unique files that won't be dlpreopened - old_dlfiles="$dlfiles" - dlfiles= - for lib in $old_dlfiles; do - case " $dlprefiles $dlfiles " in - *" $lib "*) ;; - *) dlfiles="$dlfiles $lib" ;; - esac - done - - # Make sure dlprefiles contains only unique files - old_dlprefiles="$dlprefiles" - dlprefiles= - for lib in $old_dlprefiles; do - case "$dlprefiles " in - *" $lib "*) ;; - *) dlprefiles="$dlprefiles $lib" ;; - esac - done - - if test "$build_libtool_libs" = yes; then - if test -n "$rpath"; then - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) - # these systems don't actually have a c library (as such)! - ;; - *-*-rhapsody* | *-*-darwin1.[012]) - # Rhapsody C library is in the System framework - deplibs="$deplibs -framework System" - ;; - *-*-netbsd*) - # Don't link with libc until the a.out ld.so is fixed. - ;; - *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) - # Do not include libc due to us having libc/libc_r. - ;; - *-*-sco3.2v5* | *-*-sco5v6*) - # Causes problems with __ctype - ;; - *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) - # Compiler inserts libc in the correct place for threads to work - ;; - *) - # Add libc to deplibs on all other systems if necessary. - if test "$build_libtool_need_lc" = "yes"; then - deplibs="$deplibs -lc" - fi - ;; - esac - fi - - # Transform deplibs into only deplibs that can be linked in shared. - name_save=$name - libname_save=$libname - release_save=$release - versuffix_save=$versuffix - major_save=$major - # I'm not sure if I'm treating the release correctly. I think - # release should show up in the -l (ie -lgmp5) so we don't want to - # add it in twice. Is that correct? - release="" - versuffix="" - major="" - newdeplibs= - droppeddeps=no - case $deplibs_check_method in - pass_all) - # Don't check for shared/static. Everything works. - # This might be a little naive. We might want to check - # whether the library exists or not. But this is on - # osf3 & osf4 and I'm not really sure... Just - # implementing what was already the behavior. - newdeplibs=$deplibs - ;; - test_compile) - # This code stresses the "libraries are programs" paradigm to its - # limits. Maybe even breaks it. We compile a program, linking it - # against the deplibs as a proxy for the library. Then we can check - # whether they linked in statically or dynamically with ldd. - $rm conftest.c - cat > conftest.c </dev/null` - for potent_lib in $potential_libs; do - # Follow soft links. - if ls -lLd "$potent_lib" 2>/dev/null \ - | grep " -> " >/dev/null; then - continue - fi - # The statement above tries to avoid entering an - # endless loop below, in case of cyclic links. - # We might still enter an endless loop, since a link - # loop can be closed while we follow links, - # but so what? - potlib="$potent_lib" - while test -h "$potlib" 2>/dev/null; do - potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` - case $potliblink in - [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; - *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; - esac - done - if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$file_magic_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for file magic test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a file magic. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - match_pattern*) - set dummy $deplibs_check_method - match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` - for a_deplib in $deplibs; do - name=`expr $a_deplib : '-l\(.*\)'` - # If $name is empty we are operating on a -L argument. - if test -n "$name" && test "$name" != "0"; then - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - case " $predeps $postdeps " in - *" $a_deplib "*) - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - ;; - esac - fi - if test -n "$a_deplib" ; then - libname=`eval \\$echo \"$libname_spec\"` - for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do - potential_libs=`ls $i/$libname[.-]* 2>/dev/null` - for potent_lib in $potential_libs; do - potlib="$potent_lib" # see symlink-check above in file_magic test - if eval $echo \"$potent_lib\" 2>/dev/null \ - | ${SED} 10q \ - | $EGREP "$match_pattern_regex" > /dev/null; then - newdeplibs="$newdeplibs $a_deplib" - a_deplib="" - break 2 - fi - done - done - fi - if test -n "$a_deplib" ; then - droppeddeps=yes - $echo - $echo "*** Warning: linker path does not have real file for library $a_deplib." - $echo "*** I have the capability to make that library automatically link in when" - $echo "*** you link to this library. But I can only do this if you have a" - $echo "*** shared version of the library, which you do not appear to have" - $echo "*** because I did check the linker path looking for a file starting" - if test -z "$potlib" ; then - $echo "*** with $libname but no candidates were found. (...for regex pattern test)" - else - $echo "*** with $libname and none of the candidates passed a file format test" - $echo "*** using a regex pattern. Last file checked: $potlib" - fi - fi - else - # Add a -L argument. - newdeplibs="$newdeplibs $a_deplib" - fi - done # Gone through all deplibs. - ;; - none | unknown | *) - newdeplibs="" - tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ - -e 's/ -[LR][^ ]*//g'` - if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then - for i in $predeps $postdeps ; do - # can't use Xsed below, because $i might contain '/' - tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` - done - fi - if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ - | grep . >/dev/null; then - $echo - if test "X$deplibs_check_method" = "Xnone"; then - $echo "*** Warning: inter-library dependencies are not supported in this platform." - else - $echo "*** Warning: inter-library dependencies are not known to be supported." - fi - $echo "*** All declared inter-library dependencies are being dropped." - droppeddeps=yes - fi - ;; - esac - versuffix=$versuffix_save - major=$major_save - release=$release_save - libname=$libname_save - name=$name_save - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - if test "$droppeddeps" = yes; then - if test "$module" = yes; then - $echo - $echo "*** Warning: libtool could not satisfy all declared inter-library" - $echo "*** dependencies of module $libname. Therefore, libtool will create" - $echo "*** a static module, that should work as long as the dlopening" - $echo "*** application is linked with the -dlopen flag." - if test -z "$global_symbol_pipe"; then - $echo - $echo "*** However, this would only work if libtool was able to extract symbol" - $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" - $echo "*** not find such a program. So, this module is probably useless." - $echo "*** \`nm' from GNU binutils and a full rebuild may help." - fi - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - else - $echo "*** The inter-library dependencies that have been dropped here will be" - $echo "*** automatically added whenever a program is linked with this library" - $echo "*** or is declared to -dlopen it." - - if test "$allow_undefined" = no; then - $echo - $echo "*** Since this library must not contain undefined symbols," - $echo "*** because either the platform does not support them or" - $echo "*** it was explicitly requested with -no-undefined," - $echo "*** libtool will only create a static version of it." - if test "$build_old_libs" = no; then - oldlibs="$output_objdir/$libname.$libext" - build_libtool_libs=module - build_old_libs=yes - else - build_libtool_libs=no - fi - fi - fi - fi - # Done checking deplibs! - deplibs=$newdeplibs - fi - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - deplibs="$new_libs" - - - # All the library-specific variables (install_libdir is set above). - library_names= - old_library= - dlname= - - # Test again, we may have decided not to build it any more - if test "$build_libtool_libs" = yes; then - if test "$hardcode_into_libs" = yes; then - # Hardcode the library paths - hardcode_libdirs= - dep_rpath= - rpath="$finalize_rpath" - test "$mode" != relink && rpath="$compile_rpath$rpath" - for libdir in $rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - dep_rpath="$dep_rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - if test -n "$hardcode_libdir_flag_spec_ld"; then - eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" - else - eval dep_rpath=\"$hardcode_libdir_flag_spec\" - fi - fi - if test -n "$runpath_var" && test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" - fi - test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" - fi - - shlibpath="$finalize_shlibpath" - test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" - if test -n "$shlibpath"; then - eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" - fi - - # Get the real and link names of the library. - eval shared_ext=\"$shrext_cmds\" - eval library_names=\"$library_names_spec\" - set dummy $library_names - realname="$2" - shift; shift - - if test -n "$soname_spec"; then - eval soname=\"$soname_spec\" - else - soname="$realname" - fi - if test -z "$dlname"; then - dlname=$soname - fi - - lib="$output_objdir/$realname" - linknames= - for link - do - linknames="$linknames $link" - done - - # Use standard objects if they are pic - test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - cmds=$export_symbols_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - if len=`expr "X$cmd" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - $show "$cmd" - $run eval "$cmd" || exit $? - skipped_export=false - else - # The command line is too long to execute in one step. - $show "using reloadable object file for export list..." - skipped_export=: - # Break out early, otherwise skipped_export may be - # set to false by a later but shorter cmd. - break - fi - done - IFS="$save_ifs" - if test -n "$export_symbols_regex"; then - $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" - $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' - $show "$mv \"${export_symbols}T\" \"$export_symbols\"" - $run eval '$mv "${export_symbols}T" "$export_symbols"' - fi - fi - fi - - if test -n "$export_symbols" && test -n "$include_expsyms"; then - $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' - fi - - tmp_deplibs= - for test_deplib in $deplibs; do - case " $convenience " in - *" $test_deplib "*) ;; - *) - tmp_deplibs="$tmp_deplibs $test_deplib" - ;; - esac - done - deplibs="$tmp_deplibs" - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - else - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - libobjs="$libobjs $func_extract_archives_result" - fi - fi - - if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then - eval flag=\"$thread_safe_flag_spec\" - linker_flags="$linker_flags $flag" - fi - - # Make a backup of the uninstalled library when relinking - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? - fi - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - eval test_cmds=\"$module_expsym_cmds\" - cmds=$module_expsym_cmds - else - eval test_cmds=\"$module_cmds\" - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - eval test_cmds=\"$archive_expsym_cmds\" - cmds=$archive_expsym_cmds - else - eval test_cmds=\"$archive_cmds\" - cmds=$archive_cmds - fi - fi - - if test "X$skipped_export" != "X:" && - len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - : - else - # The command line is too long to link in one step, link piecewise. - $echo "creating reloadable object files..." - - # Save the value of $output and $libobjs because we want to - # use them later. If we have whole_archive_flag_spec, we - # want to use save_libobjs as it was before - # whole_archive_flag_spec was expanded, because we can't - # assume the linker understands whole_archive_flag_spec. - # This may have to be revisited, in case too many - # convenience libraries get linked in and end up exceeding - # the spec. - if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then - save_libobjs=$libobjs - fi - save_output=$output - output_la=`$echo "X$output" | $Xsed -e "$basename"` - - # Clear the reloadable object creation command queue and - # initialize k to one. - test_cmds= - concat_cmds= - objlist= - delfiles= - last_robj= - k=1 - output=$output_objdir/$output_la-${k}.$objext - # Loop over the list of objects to be linked. - for obj in $save_libobjs - do - eval test_cmds=\"$reload_cmds $objlist $last_robj\" - if test "X$objlist" = X || - { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; }; then - objlist="$objlist $obj" - else - # The command $test_cmds is almost too long, add a - # command to the queue. - if test "$k" -eq 1 ; then - # The first file doesn't have a previous command to add. - eval concat_cmds=\"$reload_cmds $objlist $last_robj\" - else - # All subsequent reloadable object files will link in - # the last one created. - eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" - fi - last_robj=$output_objdir/$output_la-${k}.$objext - k=`expr $k + 1` - output=$output_objdir/$output_la-${k}.$objext - objlist=$obj - len=1 - fi - done - # Handle the remaining objects by creating one last - # reloadable object file. All subsequent reloadable object - # files will link in the last one created. - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" - - if ${skipped_export-false}; then - $show "generating symbol list for \`$libname.la'" - export_symbols="$output_objdir/$libname.exp" - $run $rm $export_symbols - libobjs=$output - # Append the command to create the export file. - eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" - fi - - # Set up a command to remove the reloadable object files - # after they are used. - i=0 - while test "$i" -lt "$k" - do - i=`expr $i + 1` - delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" - done - - $echo "creating a temporary reloadable object file: $output" - - # Loop through the commands generated above and execute them. - save_ifs="$IFS"; IFS='~' - for cmd in $concat_cmds; do - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - libobjs=$output - # Restore the value of output. - output=$save_output - - if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then - eval libobjs=\"\$libobjs $whole_archive_flag_spec\" - fi - # Expand the library linking commands again to reset the - # value of $libobjs for piecewise linking. - - # Do each of the archive commands. - if test "$module" = yes && test -n "$module_cmds" ; then - if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then - cmds=$module_expsym_cmds - else - cmds=$module_cmds - fi - else - if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then - cmds=$archive_expsym_cmds - else - cmds=$archive_cmds - fi - fi - - # Append the command to remove the reloadable object files - # to the just-reset $cmds. - eval cmds=\"\$cmds~\$rm $delfiles\" - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? - - if test -n "$convenience"; then - if test -z "$whole_archive_flag_spec"; then - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - fi - fi - - exit $EXIT_SUCCESS - fi - - # Create links to the real library. - for linkname in $linknames; do - if test "$realname" != "$linkname"; then - $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" - $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? - fi - done - - # If -module or -export-dynamic was specified, set the dlname. - if test "$module" = yes || test "$export_dynamic" = yes; then - # On all known operating systems, these are identical. - dlname="$soname" - fi - fi - ;; - - obj) - if test -n "$deplibs"; then - $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 - fi - - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 - fi - - if test -n "$rpath"; then - $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 - fi - - if test -n "$xrpath"; then - $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 - fi - - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 - fi - - case $output in - *.lo) - if test -n "$objs$old_deplibs"; then - $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 - exit $EXIT_FAILURE - fi - libobj="$output" - obj=`$echo "X$output" | $Xsed -e "$lo2o"` - ;; - *) - libobj= - obj="$output" - ;; - esac - - # Delete the old objects. - $run $rm $obj $libobj - - # Objects from convenience libraries. This assumes - # single-version convenience libraries. Whenever we create - # different ones for PIC/non-PIC, this we'll have to duplicate - # the extraction. - reload_conv_objs= - gentop= - # reload_cmds runs $LD directly, so let us get rid of - # -Wl from whole_archive_flag_spec and hope we can get by with - # turning comma into space.. - wl= - - if test -n "$convenience"; then - if test -n "$whole_archive_flag_spec"; then - eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" - reload_conv_objs=$reload_objs\ `$echo "X$tmp_whole_archive_flags" | $Xsed -e 's|,| |g'` - else - gentop="$output_objdir/${obj}x" - generated="$generated $gentop" - - func_extract_archives $gentop $convenience - reload_conv_objs="$reload_objs $func_extract_archives_result" - fi - fi - - # Create the old-style object. - reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test - - output="$obj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - - # Exit if we aren't doing a library object file. - if test -z "$libobj"; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - fi - - if test "$build_libtool_libs" != yes; then - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - # Create an invalid libtool object if no PIC, so that we don't - # accidentally link it into a program. - # $show "echo timestamp > $libobj" - # $run eval "echo timestamp > $libobj" || exit $? - exit $EXIT_SUCCESS - fi - - if test -n "$pic_flag" || test "$pic_mode" != default; then - # Only do commands if we really have different PIC objects. - reload_objs="$libobjs $reload_conv_objs" - output="$libobj" - cmds=$reload_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - fi - - if test -n "$gentop"; then - $show "${rm}r $gentop" - $run ${rm}r $gentop - fi - - exit $EXIT_SUCCESS - ;; - - prog) - case $host in - *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; - esac - if test -n "$vinfo"; then - $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 - fi - - if test -n "$release"; then - $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 - fi - - if test "$preload" = yes; then - if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && - test "$dlopen_self_static" = unknown; then - $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." - fi - fi - - case $host in - *-*-rhapsody* | *-*-darwin1.[012]) - # On Rhapsody replace the C library is the System framework - compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` - ;; - esac - - case $host in - *darwin*) - # Don't allow lazy linking, it breaks C++ global constructors - if test "$tagname" = CXX ; then - compile_command="$compile_command ${wl}-bind_at_load" - finalize_command="$finalize_command ${wl}-bind_at_load" - fi - ;; - esac - - - # move library search paths that coincide with paths to not yet - # installed libraries to the beginning of the library search list - new_libs= - for path in $notinst_path; do - case " $new_libs " in - *" -L$path/$objdir "*) ;; - *) - case " $compile_deplibs " in - *" -L$path/$objdir "*) - new_libs="$new_libs -L$path/$objdir" ;; - esac - ;; - esac - done - for deplib in $compile_deplibs; do - case $deplib in - -L*) - case " $new_libs " in - *" $deplib "*) ;; - *) new_libs="$new_libs $deplib" ;; - esac - ;; - *) new_libs="$new_libs $deplib" ;; - esac - done - compile_deplibs="$new_libs" - - - compile_command="$compile_command $compile_deplibs" - finalize_command="$finalize_command $finalize_deplibs" - - if test -n "$rpath$xrpath"; then - # If the user specified any rpath flags, then add them. - for libdir in $rpath $xrpath; do - # This is the magic to use -rpath. - case "$finalize_rpath " in - *" $libdir "*) ;; - *) finalize_rpath="$finalize_rpath $libdir" ;; - esac - done - fi - - # Now hardcode the library paths - rpath= - hardcode_libdirs= - for libdir in $compile_rpath $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$perm_rpath " in - *" $libdir "*) ;; - *) perm_rpath="$perm_rpath $libdir" ;; - esac - fi - case $host in - *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) - testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` - case :$dllsearchpath: in - *":$libdir:"*) ;; - *) dllsearchpath="$dllsearchpath:$libdir";; - esac - case :$dllsearchpath: in - *":$testbindir:"*) ;; - *) dllsearchpath="$dllsearchpath:$testbindir";; - esac - ;; - esac - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - compile_rpath="$rpath" - - rpath= - hardcode_libdirs= - for libdir in $finalize_rpath; do - if test -n "$hardcode_libdir_flag_spec"; then - if test -n "$hardcode_libdir_separator"; then - if test -z "$hardcode_libdirs"; then - hardcode_libdirs="$libdir" - else - # Just accumulate the unique libdirs. - case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in - *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) - ;; - *) - hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" - ;; - esac - fi - else - eval flag=\"$hardcode_libdir_flag_spec\" - rpath="$rpath $flag" - fi - elif test -n "$runpath_var"; then - case "$finalize_perm_rpath " in - *" $libdir "*) ;; - *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; - esac - fi - done - # Substitute the hardcoded libdirs into the rpath. - if test -n "$hardcode_libdir_separator" && - test -n "$hardcode_libdirs"; then - libdir="$hardcode_libdirs" - eval rpath=\" $hardcode_libdir_flag_spec\" - fi - finalize_rpath="$rpath" - - if test -n "$libobjs" && test "$build_old_libs" = yes; then - # Transform all the library objects into standard objects. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - fi - - dlsyms= - if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then - if test -n "$NM" && test -n "$global_symbol_pipe"; then - dlsyms="${outputname}S.c" - else - $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 - fi - fi - - if test -n "$dlsyms"; then - case $dlsyms in - "") ;; - *.c) - # Discover the nlist of each of the dlfiles. - nlist="$output_objdir/${outputname}.nm" - - $show "$rm $nlist ${nlist}S ${nlist}T" - $run $rm "$nlist" "${nlist}S" "${nlist}T" - - # Parse the name list into a source file. - $show "creating $output_objdir/$dlsyms" - - test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ -/* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ -/* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ - -#ifdef __cplusplus -extern \"C\" { -#endif - -/* Prevent the only kind of declaration conflicts we can make. */ -#define lt_preloaded_symbols some_other_symbol - -/* External symbol declarations for the compiler. */\ -" - - if test "$dlself" = yes; then - $show "generating symbol list for \`$output'" - - test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" - - # Add our own program objects to the symbol list. - progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` - for arg in $progfiles; do - $show "extracting global C symbols from \`$arg'" - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -n "$exclude_expsyms"; then - $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - if test -n "$export_symbols_regex"; then - $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' - $run eval '$mv "$nlist"T "$nlist"' - fi - - # Prepare the list of exported symbols - if test -z "$export_symbols"; then - export_symbols="$output_objdir/$outputname.exp" - $run $rm $export_symbols - $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' - ;; - esac - else - $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' - $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' - $run eval 'mv "$nlist"T "$nlist"' - case $host in - *cygwin* | *mingw* ) - $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' - $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' - ;; - esac - fi - fi - - for arg in $dlprefiles; do - $show "extracting global C symbols from \`$arg'" - name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` - $run eval '$echo ": $name " >> "$nlist"' - $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" - done - - if test -z "$run"; then - # Make sure we have at least an empty file. - test -f "$nlist" || : > "$nlist" - - if test -n "$exclude_expsyms"; then - $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T - $mv "$nlist"T "$nlist" - fi - - # Try sorting and uniquifying the output. - if grep -v "^: " < "$nlist" | - if sort -k 3 /dev/null 2>&1; then - sort -k 3 - else - sort +2 - fi | - uniq > "$nlist"S; then - : - else - grep -v "^: " < "$nlist" > "$nlist"S - fi - - if test -f "$nlist"S; then - eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' - else - $echo '/* NONE */' >> "$output_objdir/$dlsyms" - fi - - $echo >> "$output_objdir/$dlsyms" "\ - -#undef lt_preloaded_symbols - -#if defined (__STDC__) && __STDC__ -# define lt_ptr void * -#else -# define lt_ptr char * -# define const -#endif - -/* The mapping between symbol names and symbols. */ -" - - case $host in - *cygwin* | *mingw* ) - $echo >> "$output_objdir/$dlsyms" "\ -/* DATA imports from DLLs on WIN32 can't be const, because - runtime relocations are performed -- see ld's documentation - on pseudo-relocs */ -struct { -" - ;; - * ) - $echo >> "$output_objdir/$dlsyms" "\ -const struct { -" - ;; - esac - - - $echo >> "$output_objdir/$dlsyms" "\ - const char *name; - lt_ptr address; -} -lt_preloaded_symbols[] = -{\ -" - - eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" - - $echo >> "$output_objdir/$dlsyms" "\ - {0, (lt_ptr) 0} -}; - -/* This works around a problem in FreeBSD linker */ -#ifdef FREEBSD_WORKAROUND -static const void *lt_preloaded_setup() { - return lt_preloaded_symbols; -} -#endif - -#ifdef __cplusplus -} -#endif\ -" - fi - - pic_flag_for_symtable= - case $host in - # compiling the symbol table file with pic_flag works around - # a FreeBSD bug that causes programs to crash when -lm is - # linked before any other PIC object. But we must not use - # pic_flag when linking with -static. The problem exists in - # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. - *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; - esac;; - *-*-hpux*) - case "$compile_command " in - *" -static "*) ;; - *) pic_flag_for_symtable=" $pic_flag";; - esac - esac - - # Now compile the dynamic symbol file. - $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" - $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? - - # Clean up the generated files. - $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" - $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" - - # Transform the symbol file into the correct name. - case $host in - *cygwin* | *mingw* ) - if test -f "$output_objdir/${outputname}.def" ; then - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%" | $NL2SP` - else - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - fi - ;; - * ) - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%" | $NL2SP` - ;; - esac - ;; - *) - $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 - exit $EXIT_FAILURE - ;; - esac - else - # We keep going just in case the user didn't refer to - # lt_preloaded_symbols. The linker will fail if global_symbol_pipe - # really was required. - - # Nullify the symbol file. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "s% @SYMFILE@%%" | $NL2SP` - fi - - if test "$need_relink" = no || test "$build_libtool_libs" != yes; then - # Replace the output file specification. - compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$output"'%g' | $NL2SP` - link_command="$compile_command$compile_rpath" - - # We have no uninstalled library dependencies, so finalize right now. - $show "$link_command" - $run eval "$link_command" - exit_status=$? - - # Delete the generated files. - if test -n "$dlsyms"; then - $show "$rm $output_objdir/${outputname}S.${objext}" - $run $rm "$output_objdir/${outputname}S.${objext}" - fi - - exit $exit_status - fi - - if test -n "$shlibpath_var"; then - # We should set the shlibpath_var - rpath= - for dir in $temp_rpath; do - case $dir in - [\\/]* | [A-Za-z]:[\\/]*) - # Absolute path. - rpath="$rpath$dir:" - ;; - *) - # Relative path: add a thisdir entry. - rpath="$rpath\$thisdir/$dir:" - ;; - esac - done - temp_rpath="$rpath" - fi - - if test -n "$compile_shlibpath$finalize_shlibpath"; then - compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" - fi - if test -n "$finalize_shlibpath"; then - finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" - fi - - compile_var= - finalize_var= - if test -n "$runpath_var"; then - if test -n "$perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $perm_rpath; do - rpath="$rpath$dir:" - done - compile_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - if test -n "$finalize_perm_rpath"; then - # We should set the runpath_var. - rpath= - for dir in $finalize_perm_rpath; do - rpath="$rpath$dir:" - done - finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " - fi - fi - - if test "$no_install" = yes; then - # We don't need to create a wrapper script. - link_command="$compile_var$compile_command$compile_rpath" - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` - # Delete the old output file. - $run $rm $output - # Link the executable and exit - $show "$link_command" - $run eval "$link_command" || exit $? - exit $EXIT_SUCCESS - fi - - if test "$hardcode_action" = relink; then - # Fast installation is not supported - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - - $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 - $echo "$modename: \`$output' will be relinked during installation" 1>&2 - else - if test "$fast_install" != no; then - link_command="$finalize_var$compile_command$finalize_rpath" - if test "$fast_install" = yes; then - relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $SP2NL | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g' | $NL2SP` - else - # fast_install is set to needless - relink_command= - fi - else - link_command="$compile_var$compile_command$compile_rpath" - relink_command="$finalize_var$finalize_command$finalize_rpath" - fi - fi - - # Replace the output file specification. - link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` - - # Delete the old output files. - $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname - - $show "$link_command" - $run eval "$link_command" || exit $? - - # Now create the wrapper script. - $show "creating $output" - - # Quote the relink command for shipping. - if test -n "$relink_command"; then - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - relink_command="(cd `pwd`; $relink_command)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - fi - - # Quote $echo for shipping. - if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then - case $progpath in - [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; - *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; - esac - qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` - else - qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` - fi - - # Only actually do things if our run command is non-null. - if test -z "$run"; then - # win32 will think the script is a binary if it has - # a .exe suffix, so we strip it off here. - case $output in - *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; - esac - # test for cygwin because mv fails w/o .exe extensions - case $host in - *cygwin*) - exeext=.exe - outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; - *) exeext= ;; - esac - case $host in - *cygwin* | *mingw* ) - output_name=`basename $output` - output_path=`dirname $output` - cwrappersource="$output_path/$objdir/lt-$output_name.c" - cwrapper="$output_path/$output_name.exe" - $rm $cwrappersource $cwrapper - trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 - - cat > $cwrappersource <> $cwrappersource<<"EOF" -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#if defined(PATH_MAX) -# define LT_PATHMAX PATH_MAX -#elif defined(MAXPATHLEN) -# define LT_PATHMAX MAXPATHLEN -#else -# define LT_PATHMAX 1024 -#endif - -#ifndef DIR_SEPARATOR -# define DIR_SEPARATOR '/' -# define PATH_SEPARATOR ':' -#endif - -#if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ - defined (__OS2__) -# define HAVE_DOS_BASED_FILE_SYSTEM -# ifndef DIR_SEPARATOR_2 -# define DIR_SEPARATOR_2 '\\' -# endif -# ifndef PATH_SEPARATOR_2 -# define PATH_SEPARATOR_2 ';' -# endif -#endif - -#ifndef DIR_SEPARATOR_2 -# define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) -#else /* DIR_SEPARATOR_2 */ -# define IS_DIR_SEPARATOR(ch) \ - (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) -#endif /* DIR_SEPARATOR_2 */ - -#ifndef PATH_SEPARATOR_2 -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) -#else /* PATH_SEPARATOR_2 */ -# define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) -#endif /* PATH_SEPARATOR_2 */ - -#define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) -#define XFREE(stale) do { \ - if (stale) { free ((void *) stale); stale = 0; } \ -} while (0) - -/* -DDEBUG is fairly common in CFLAGS. */ -#undef DEBUG -#if defined DEBUGWRAPPER -# define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) -#else -# define DEBUG(format, ...) -#endif - -const char *program_name = NULL; - -void * xmalloc (size_t num); -char * xstrdup (const char *string); -const char * base_name (const char *name); -char * find_executable(const char *wrapper); -int check_executable(const char *path); -char * strendzap(char *str, const char *pat); -void lt_fatal (const char *message, ...); - -int -main (int argc, char *argv[]) -{ - char **newargz; - int i; - - program_name = (char *) xstrdup (base_name (argv[0])); - DEBUG("(main) argv[0] : %s\n",argv[0]); - DEBUG("(main) program_name : %s\n",program_name); - newargz = XMALLOC(char *, argc+2); -EOF - - cat >> $cwrappersource <> $cwrappersource <<"EOF" - newargz[1] = find_executable(argv[0]); - if (newargz[1] == NULL) - lt_fatal("Couldn't find %s", argv[0]); - DEBUG("(main) found exe at : %s\n",newargz[1]); - /* we know the script has the same name, without the .exe */ - /* so make sure newargz[1] doesn't end in .exe */ - strendzap(newargz[1],".exe"); - for (i = 1; i < argc; i++) - newargz[i+1] = xstrdup(argv[i]); - newargz[argc+1] = NULL; - - for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" - return 127; -} - -void * -xmalloc (size_t num) -{ - void * p = (void *) malloc (num); - if (!p) - lt_fatal ("Memory exhausted"); - - return p; -} - -char * -xstrdup (const char *string) -{ - return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL -; -} - -const char * -base_name (const char *name) -{ - const char *base; - -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - /* Skip over the disk name in MSDOS pathnames. */ - if (isalpha ((unsigned char)name[0]) && name[1] == ':') - name += 2; -#endif - - for (base = name; *name; name++) - if (IS_DIR_SEPARATOR (*name)) - base = name + 1; - return base; -} - -int -check_executable(const char * path) -{ - struct stat st; - - DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); - if ((!path) || (!*path)) - return 0; - - if ((stat (path, &st) >= 0) && - ( - /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ -#if defined (S_IXOTH) - ((st.st_mode & S_IXOTH) == S_IXOTH) || -#endif -#if defined (S_IXGRP) - ((st.st_mode & S_IXGRP) == S_IXGRP) || -#endif - ((st.st_mode & S_IXUSR) == S_IXUSR)) - ) - return 1; - else - return 0; -} - -/* Searches for the full path of the wrapper. Returns - newly allocated full path name if found, NULL otherwise */ -char * -find_executable (const char* wrapper) -{ - int has_slash = 0; - const char* p; - const char* p_next; - /* static buffer for getcwd */ - char tmp[LT_PATHMAX + 1]; - int tmp_len; - char* concat_name; - - DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); - - if ((wrapper == NULL) || (*wrapper == '\0')) - return NULL; - - /* Absolute path? */ -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - else - { -#endif - if (IS_DIR_SEPARATOR (wrapper[0])) - { - concat_name = xstrdup (wrapper); - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } -#if defined (HAVE_DOS_BASED_FILE_SYSTEM) - } -#endif - - for (p = wrapper; *p; p++) - if (*p == '/') - { - has_slash = 1; - break; - } - if (!has_slash) - { - /* no slashes; search PATH */ - const char* path = getenv ("PATH"); - if (path != NULL) - { - for (p = path; *p; p = p_next) - { - const char* q; - size_t p_len; - for (q = p; *q; q++) - if (IS_PATH_SEPARATOR(*q)) - break; - p_len = q - p; - p_next = (*q == '\0' ? q : q + 1); - if (p_len == 0) - { - /* empty path: current directory */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - } - else - { - concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, p, p_len); - concat_name[p_len] = '/'; - strcpy (concat_name + p_len + 1, wrapper); - } - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - } - } - /* not found in PATH; assume curdir */ - } - /* Relative path | not found in path: prepend cwd */ - if (getcwd (tmp, LT_PATHMAX) == NULL) - lt_fatal ("getcwd failed"); - tmp_len = strlen(tmp); - concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); - memcpy (concat_name, tmp, tmp_len); - concat_name[tmp_len] = '/'; - strcpy (concat_name + tmp_len + 1, wrapper); - - if (check_executable(concat_name)) - return concat_name; - XFREE(concat_name); - return NULL; -} - -char * -strendzap(char *str, const char *pat) -{ - size_t len, patlen; - - assert(str != NULL); - assert(pat != NULL); - - len = strlen(str); - patlen = strlen(pat); - - if (patlen <= len) - { - str += len - patlen; - if (strcmp(str, pat) == 0) - *str = '\0'; - } - return str; -} - -static void -lt_error_core (int exit_status, const char * mode, - const char * message, va_list ap) -{ - fprintf (stderr, "%s: %s: ", program_name, mode); - vfprintf (stderr, message, ap); - fprintf (stderr, ".\n"); - - if (exit_status >= 0) - exit (exit_status); -} - -void -lt_fatal (const char *message, ...) -{ - va_list ap; - va_start (ap, message); - lt_error_core (EXIT_FAILURE, "FATAL", message, ap); - va_end (ap); -} -EOF - # we should really use a build-platform specific compiler - # here, but OTOH, the wrappers (shell script and this C one) - # are only useful if you want to execute the "real" binary. - # Since the "real" binary is built for $host, then this - # wrapper might as well be built for $host, too. - $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource - ;; - esac - $rm $output - trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 - - $echo > $output "\ -#! $SHELL - -# $output - temporary wrapper script for $objdir/$outputname -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# The $output program cannot be directly executed until all the libtool -# libraries that it depends on are installed. -# -# This wrapper script should never be moved out of the build directory. -# If it is, it will not operate correctly. - -# Sed substitution that helps us do robust quoting. It backslashifies -# metacharacters that are still active within double-quoted strings. -Xsed='${SED} -e 1s/^X//' -sed_quote_subst='$sed_quote_subst' - -# Be Bourne compatible (taken from Autoconf:_AS_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+\"\$@\"}'='\"\$@\"' - setopt NO_GLOB_SUBST -else - case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac -fi - -# The HP-UX ksh and POSIX shell print the target directory to stdout -# if CDPATH is set. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -relink_command=\"$relink_command\" - -# This environment variable determines our operation mode. -if test \"\$libtool_install_magic\" = \"$magic\"; then - # install mode needs the following variable: - notinst_deplibs='$notinst_deplibs' -else - # When we are sourced in execute mode, \$file and \$echo are already set. - if test \"\$libtool_execute_magic\" != \"$magic\"; then - echo=\"$qecho\" - file=\"\$0\" - # Make sure echo works. - if test \"X\$1\" = X--no-reexec; then - # Discard the --no-reexec flag, and continue. - shift - elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then - # Yippee, \$echo works! - : - else - # Restart under the correct shell, and then maybe \$echo will work. - exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} - fi - fi\ -" - $echo >> $output "\ - - # Find the directory that this script lives in. - thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` - test \"x\$thisdir\" = \"x\$file\" && thisdir=. - - # Follow symbolic links until we get to the real thisdir. - file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` - while test -n \"\$file\"; do - destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` - - # If there was a directory component, then change thisdir. - if test \"x\$destdir\" != \"x\$file\"; then - case \"\$destdir\" in - [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; - *) thisdir=\"\$thisdir/\$destdir\" ;; - esac - fi - - file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` - file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` - done - - # Try to get the absolute directory name. - absdir=\`cd \"\$thisdir\" && pwd\` - test -n \"\$absdir\" && thisdir=\"\$absdir\" -" - - if test "$fast_install" = yes; then - $echo >> $output "\ - program=lt-'$outputname'$exeext - progdir=\"\$thisdir/$objdir\" - - if test ! -f \"\$progdir/\$program\" || \\ - { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ - test \"X\$file\" != \"X\$progdir/\$program\"; }; then - - file=\"\$\$-\$program\" - - if test ! -d \"\$progdir\"; then - $mkdir \"\$progdir\" - else - $rm \"\$progdir/\$file\" - fi" - - $echo >> $output "\ - - # relink executable if necessary - if test -n \"\$relink_command\"; then - if relink_command_output=\`eval \$relink_command 2>&1\`; then : - else - $echo \"\$relink_command_output\" >&2 - $rm \"\$progdir/\$file\" - exit $EXIT_FAILURE - fi - fi - - $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || - { $rm \"\$progdir/\$program\"; - $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } - $rm \"\$progdir/\$file\" - fi" - else - $echo >> $output "\ - program='$outputname' - progdir=\"\$thisdir/$objdir\" -" - fi - - $echo >> $output "\ - - if test -f \"\$progdir/\$program\"; then" - - # Export our shlibpath_var if we have one. - if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then - $echo >> $output "\ - # Add our own library path to $shlibpath_var - $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" - - # Some systems cannot cope with colon-terminated $shlibpath_var - # The second colon is a workaround for a bug in BeOS R4 sed - $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` - - export $shlibpath_var -" - fi - - # fixup the dll searchpath if we need to. - if test -n "$dllsearchpath"; then - $echo >> $output "\ - # Add the dll search path components to the executable PATH - PATH=$dllsearchpath:\$PATH -" - fi - - $echo >> $output "\ - if test \"\$libtool_execute_magic\" != \"$magic\"; then - # Run the actual program with our arguments. -" - case $host in - # Backslashes separate directories on plain windows - *-*-mingw | *-*-os2*) - $echo >> $output "\ - exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} -" - ;; - - *) - $echo >> $output "\ - exec \"\$progdir/\$program\" \${1+\"\$@\"} -" - ;; - esac - $echo >> $output "\ - \$echo \"\$0: cannot exec \$program \$*\" - exit $EXIT_FAILURE - fi - else - # The program doesn't exist. - \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 - \$echo \"This script is just a wrapper for \$program.\" 1>&2 - $echo \"See the $PACKAGE documentation for more information.\" 1>&2 - exit $EXIT_FAILURE - fi -fi\ -" - chmod +x $output - fi - exit $EXIT_SUCCESS - ;; - esac - - # See if we need to build an old-fashioned archive. - for oldlib in $oldlibs; do - - if test "$build_libtool_libs" = convenience; then - oldobjs="$libobjs_save" - addlibs="$convenience" - build_libtool_libs=no - else - if test "$build_libtool_libs" = module; then - oldobjs="$libobjs_save" - build_libtool_libs=no - else - oldobjs="$old_deplibs $non_pic_objects" - fi - addlibs="$old_convenience" - fi - - if test -n "$addlibs"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - func_extract_archives $gentop $addlibs - oldobjs="$oldobjs $func_extract_archives_result" - fi - - # Do each command in the archive commands. - if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then - cmds=$old_archive_from_new_cmds - else - # POSIX demands no paths to be encoded in archives. We have - # to avoid creating archives with duplicate basenames if we - # might have to extract them afterwards, e.g., when creating a - # static archive out of a convenience library, or when linking - # the entirety of a libtool archive into another (currently - # not supported by libtool). - if (for obj in $oldobjs - do - $echo "X$obj" | $Xsed -e 's%^.*/%%' - done | sort | sort -uc >/dev/null 2>&1); then - : - else - $echo "copying selected object files to avoid basename conflicts..." - - if test -z "$gentop"; then - gentop="$output_objdir/${outputname}x" - generated="$generated $gentop" - - $show "${rm}r $gentop" - $run ${rm}r "$gentop" - $show "$mkdir $gentop" - $run $mkdir "$gentop" - exit_status=$? - if test "$exit_status" -ne 0 && test ! -d "$gentop"; then - exit $exit_status - fi - fi - - save_oldobjs=$oldobjs - oldobjs= - counter=1 - for obj in $save_oldobjs - do - objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` - case " $oldobjs " in - " ") oldobjs=$obj ;; - *[\ /]"$objbase "*) - while :; do - # Make sure we don't pick an alternate name that also - # overlaps. - newobj=lt$counter-$objbase - counter=`expr $counter + 1` - case " $oldobjs " in - *[\ /]"$newobj "*) ;; - *) if test ! -f "$gentop/$newobj"; then break; fi ;; - esac - done - $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" - $run ln "$obj" "$gentop/$newobj" || - $run cp "$obj" "$gentop/$newobj" - oldobjs="$oldobjs $gentop/$newobj" - ;; - *) oldobjs="$oldobjs $obj" ;; - esac - done - fi - - eval cmds=\"$old_archive_cmds\" - - if len=`expr "X$cmds" : ".*"` && - test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then - cmds=$old_archive_cmds - else - # the command line is too long to link in one step, link in parts - $echo "using piecewise archive linking..." - save_RANLIB=$RANLIB - RANLIB=: - objlist= - concat_cmds= - save_oldobjs=$oldobjs - - # Is there a better way of finding the last object in the list? - for obj in $save_oldobjs - do - last_oldobj=$obj - done - for obj in $save_oldobjs - do - oldobjs="$objlist $obj" - objlist="$objlist $obj" - eval test_cmds=\"$old_archive_cmds\" - if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && - test "$len" -le "$max_cmd_len"; then - : - else - # the above command should be used before it gets too long - oldobjs=$objlist - if test "$obj" = "$last_oldobj" ; then - RANLIB=$save_RANLIB - fi - test -z "$concat_cmds" || concat_cmds=$concat_cmds~ - eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" - objlist= - fi - done - RANLIB=$save_RANLIB - oldobjs=$objlist - if test "X$oldobjs" = "X" ; then - eval cmds=\"\$concat_cmds\" - else - eval cmds=\"\$concat_cmds~\$old_archive_cmds\" - fi - fi - fi - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - eval cmd=\"$cmd\" - IFS="$save_ifs" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$generated"; then - $show "${rm}r$generated" - $run ${rm}r$generated - fi - - # Now create the libtool archive. - case $output in - *.la) - old_library= - test "$build_old_libs" = yes && old_library="$libname.$libext" - $show "creating $output" - - # Preserve any variables that may affect compiler behavior - for var in $variables_saved_for_relink; do - if eval test -z \"\${$var+set}\"; then - relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" - elif eval var_value=\$$var; test -z "$var_value"; then - relink_command="$var=; export $var; $relink_command" - else - var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` - relink_command="$var=\"$var_value\"; export $var; $relink_command" - fi - done - # Quote the link command for shipping. - relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e "$sed_quote_subst" | $NL2SP` - if test "$hardcode_automatic" = yes ; then - relink_command= - fi - - - # Only create the output if not a dry run. - if test -z "$run"; then - for installed in no yes; do - if test "$installed" = yes; then - if test -z "$install_libdir"; then - break - fi - output="$output_objdir/$outputname"i - # Replace all uninstalled libtool libraries with the installed ones - newdependency_libs= - for deplib in $dependency_libs; do - case $deplib in - *.la) - name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` - if test -z "$libdir"; then - $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdependency_libs="$newdependency_libs $libdir/$name" - ;; - *) newdependency_libs="$newdependency_libs $deplib" ;; - esac - done - dependency_libs="$newdependency_libs" - newdlfiles= - for lib in $dlfiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlfiles="$newdlfiles $libdir/$name" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` - eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` - if test -z "$libdir"; then - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - exit $EXIT_FAILURE - fi - newdlprefiles="$newdlprefiles $libdir/$name" - done - dlprefiles="$newdlprefiles" - else - newdlfiles= - for lib in $dlfiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlfiles="$newdlfiles $abs" - done - dlfiles="$newdlfiles" - newdlprefiles= - for lib in $dlprefiles; do - case $lib in - [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; - *) abs=`pwd`"/$lib" ;; - esac - newdlprefiles="$newdlprefiles $abs" - done - dlprefiles="$newdlprefiles" - fi - $rm $output - # place dlname in correct position for cygwin - tdlname=$dlname - case $host,$output,$installed,$module,$dlname in - *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; - esac - $echo > $output "\ -# $outputname - a libtool library file -# Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP -# -# Please DO NOT delete this file! -# It is necessary for linking the library. - -# The name that we can dlopen(3). -dlname='$tdlname' - -# Names of this library. -library_names='$library_names' - -# The name of the static archive. -old_library='$old_library' - -# Libraries that this one depends upon. -dependency_libs='$dependency_libs' - -# Version information for $libname. -current=$current -age=$age -revision=$revision - -# Is this an already installed library? -installed=$installed - -# Should we warn about portability when linking against -modules? -shouldnotlink=$module - -# Files to dlopen/dlpreopen -dlopen='$dlfiles' -dlpreopen='$dlprefiles' - -# Directory that this library needs to be installed in: -libdir='$install_libdir'" - if test "$installed" = no && test "$need_relink" = yes; then - $echo >> $output "\ -relink_command=\"$relink_command\"" - fi - done - fi - - # Do a symbolic link so that the libtool archive can be found in - # LD_LIBRARY_PATH before the program is installed. - $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" - $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? - ;; - esac - exit $EXIT_SUCCESS - ;; - - # libtool install mode - install) - modename="$modename: install" - - # There may be an optional sh(1) argument at the beginning of - # install_prog (especially on Windows NT). - if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || - # Allow the use of GNU shtool's install command. - $echo "X$nonopt" | grep shtool > /dev/null; then - # Aesthetically quote it. - arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$arg " - arg="$1" - shift - else - install_prog= - arg=$nonopt - fi - - # The real first argument should be the name of the installation program. - # Aesthetically quote it. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog$arg" - - # We need to accept at least all the BSD install flags. - dest= - files= - opts= - prev= - install_type= - isdir=no - stripme= - for arg - do - if test -n "$dest"; then - files="$files $dest" - dest=$arg - continue - fi - - case $arg in - -d) isdir=yes ;; - -f) - case " $install_prog " in - *[\\\ /]cp\ *) ;; - *) prev=$arg ;; - esac - ;; - -g | -m | -o) prev=$arg ;; - -s) - stripme=" -s" - continue - ;; - -*) - ;; - *) - # If the previous option needed an argument, then skip it. - if test -n "$prev"; then - prev= - else - dest=$arg - continue - fi - ;; - esac - - # Aesthetically quote the argument. - arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` - case $arg in - *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") - arg="\"$arg\"" - ;; - esac - install_prog="$install_prog $arg" - done - - if test -z "$install_prog"; then - $echo "$modename: you must specify an install program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$prev"; then - $echo "$modename: the \`$prev' option requires an argument" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - if test -z "$files"; then - if test -z "$dest"; then - $echo "$modename: no file or destination specified" 1>&2 - else - $echo "$modename: you must specify a destination" 1>&2 - fi - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Strip any trailing slash from the destination. - dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` - - # Check to see that the destination is a directory. - test -d "$dest" && isdir=yes - if test "$isdir" = yes; then - destdir="$dest" - destname= - else - destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` - test "X$destdir" = "X$dest" && destdir=. - destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` - - # Not a directory, so check to see that there is only one file specified. - set dummy $files - if test "$#" -gt 2; then - $echo "$modename: \`$dest' is not a directory" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - fi - case $destdir in - [\\/]* | [A-Za-z]:[\\/]*) ;; - *) - for file in $files; do - case $file in - *.lo) ;; - *) - $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - done - ;; - esac - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - staticlibs= - future_libdirs= - current_libdirs= - for file in $files; do - - # Do each installation. - case $file in - *.$libext) - # Do the static libraries later. - staticlibs="$staticlibs $file" - ;; - - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - library_names= - old_library= - relink_command= - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Add the libdir to current_libdirs if it is the destination. - if test "X$destdir" = "X$libdir"; then - case "$current_libdirs " in - *" $libdir "*) ;; - *) current_libdirs="$current_libdirs $libdir" ;; - esac - else - # Note the libdir as a future libdir. - case "$future_libdirs " in - *" $libdir "*) ;; - *) future_libdirs="$future_libdirs $libdir" ;; - esac - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ - test "X$dir" = "X$file/" && dir= - dir="$dir$objdir" - - if test -n "$relink_command"; then - # Determine the prefix the user has applied to our future dir. - inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` - - # Don't allow the user to place us outside of our expected - # location b/c this prevents finding dependent libraries that - # are installed to the same prefix. - # At present, this check doesn't affect windows .dll's that - # are installed into $libdir/../bin (currently, that works fine) - # but it's something to keep an eye on. - if test "$inst_prefix_dir" = "$destdir"; then - $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 - exit $EXIT_FAILURE - fi - - if test -n "$inst_prefix_dir"; then - # Stick the inst_prefix_dir data into the link command. - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%" | $NL2SP` - else - relink_command=`$echo "$relink_command" | $SP2NL | $SED "s%@inst_prefix_dir@%%" | $NL2SP` - fi - - $echo "$modename: warning: relinking \`$file'" 1>&2 - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - exit $EXIT_FAILURE - fi - fi - - # See the names of the shared library. - set dummy $library_names - if test -n "$2"; then - realname="$2" - shift - shift - - srcname="$realname" - test -n "$relink_command" && srcname="$realname"T - - # Install the shared library and build the symlinks. - $show "$install_prog $dir/$srcname $destdir/$realname" - $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? - if test -n "$stripme" && test -n "$striplib"; then - $show "$striplib $destdir/$realname" - $run eval "$striplib $destdir/$realname" || exit $? - fi - - if test "$#" -gt 0; then - # Delete the old symlinks, and create new ones. - # Try `ln -sf' first, because the `ln' binary might depend on - # the symlink we replace! Solaris /bin/ln does not understand -f, - # so we also need to try rm && ln -s. - for linkname - do - if test "$linkname" != "$realname"; then - $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" - fi - done - fi - - # Do each command in the postinstall commands. - lib="$destdir/$realname" - cmds=$postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || { - lt_exit=$? - - # Restore the uninstalled library and exit - if test "$mode" = relink; then - $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' - fi - - exit $lt_exit - } - done - IFS="$save_ifs" - fi - - # Install the pseudo-library for information purposes. - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - instname="$dir/$name"i - $show "$install_prog $instname $destdir/$name" - $run eval "$install_prog $instname $destdir/$name" || exit $? - - # Maybe install the static library, too. - test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" - ;; - - *.lo) - # Install (i.e. copy) a libtool object. - - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # Deduce the name of the destination old-style object file. - case $destfile in - *.lo) - staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` - ;; - *.$objext) - staticdest="$destfile" - destfile= - ;; - *) - $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - # Install the libtool object if requested. - if test -n "$destfile"; then - $show "$install_prog $file $destfile" - $run eval "$install_prog $file $destfile" || exit $? - fi - - # Install the old object if enabled. - if test "$build_old_libs" = yes; then - # Deduce the name of the old-style object file. - staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` - - $show "$install_prog $staticobj $staticdest" - $run eval "$install_prog \$staticobj \$staticdest" || exit $? - fi - exit $EXIT_SUCCESS - ;; - - *) - # Figure out destination file name, if it wasn't already specified. - if test -n "$destname"; then - destfile="$destdir/$destname" - else - destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - destfile="$destdir/$destfile" - fi - - # If the file is missing, and there is a .exe on the end, strip it - # because it is most likely a libtool script we actually want to - # install - stripped_ext="" - case $file in - *.exe) - if test ! -f "$file"; then - file=`$echo $file|${SED} 's,.exe$,,'` - stripped_ext=".exe" - fi - ;; - esac - - # Do a test to see if this is really a libtool program. - case $host in - *cygwin*|*mingw*) - wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` - ;; - *) - wrapper=$file - ;; - esac - if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then - notinst_deplibs= - relink_command= - - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - # Check the variables that should have been set. - if test -z "$notinst_deplibs"; then - $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 - exit $EXIT_FAILURE - fi - - finalize=yes - for lib in $notinst_deplibs; do - # Check to see that each library is installed. - libdir= - if test -f "$lib"; then - # If there is no directory component, then add one. - case $lib in - */* | *\\*) . $lib ;; - *) . ./$lib ;; - esac - fi - libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test - if test -n "$libdir" && test ! -f "$libfile"; then - $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 - finalize=no - fi - done - - relink_command= - # Note that it is not necessary on cygwin/mingw to append a dot to - # foo even if both foo and FILE.exe exist: automatic-append-.exe - # behavior happens only for exec(3), not for open(2)! Also, sourcing - # `FILE.' does not work on cygwin managed mounts. - # - # If there is no directory component, then add one. - case $wrapper in - */* | *\\*) . ${wrapper} ;; - *) . ./${wrapper} ;; - esac - - outputname= - if test "$fast_install" = no && test -n "$relink_command"; then - if test "$finalize" = yes && test -z "$run"; then - tmpdir=`func_mktempdir` - file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` - outputname="$tmpdir/$file" - # Replace the output file specification. - relink_command=`$echo "X$relink_command" | $SP2NL | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g' | $NL2SP` - - $show "$relink_command" - if $run eval "$relink_command"; then : - else - $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 - ${rm}r "$tmpdir" - continue - fi - file="$outputname" - else - $echo "$modename: warning: cannot relink \`$file'" 1>&2 - fi - else - # Install the binary that we compiled earlier. - file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` - fi - fi - - # remove .exe since cygwin /usr/bin/install will append another - # one anyway - case $install_prog,$host in - */usr/bin/install*,*cygwin*) - case $file:$destfile in - *.exe:*.exe) - # this is ok - ;; - *.exe:*) - destfile=$destfile.exe - ;; - *:*.exe) - destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` - ;; - esac - ;; - esac - $show "$install_prog$stripme $file $destfile" - $run eval "$install_prog\$stripme \$file \$destfile" || exit $? - test -n "$outputname" && ${rm}r "$tmpdir" - ;; - esac - done - - for file in $staticlibs; do - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - - # Set up the ranlib parameters. - oldlib="$destdir/$name" - - $show "$install_prog $file $oldlib" - $run eval "$install_prog \$file \$oldlib" || exit $? - - if test -n "$stripme" && test -n "$old_striplib"; then - $show "$old_striplib $oldlib" - $run eval "$old_striplib $oldlib" || exit $? - fi - - # Do each command in the postinstall commands. - cmds=$old_postinstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || exit $? - done - IFS="$save_ifs" - done - - if test -n "$future_libdirs"; then - $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 - fi - - if test -n "$current_libdirs"; then - # Maybe just do a dry run. - test -n "$run" && current_libdirs=" -n$current_libdirs" - exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' - else - exit $EXIT_SUCCESS - fi - ;; - - # libtool finish mode - finish) - modename="$modename: finish" - libdirs="$nonopt" - admincmds= - - if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then - for dir - do - libdirs="$libdirs $dir" - done - - for libdir in $libdirs; do - if test -n "$finish_cmds"; then - # Do each command in the finish commands. - cmds=$finish_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" || admincmds="$admincmds - $cmd" - done - IFS="$save_ifs" - fi - if test -n "$finish_eval"; then - # Do the single finish_eval. - eval cmds=\"$finish_eval\" - $run eval "$cmds" || admincmds="$admincmds - $cmds" - fi - done - fi - - # Exit here if they wanted silent mode. - test "$show" = : && exit $EXIT_SUCCESS - - $echo "X----------------------------------------------------------------------" | $Xsed - $echo "Libraries have been installed in:" - for libdir in $libdirs; do - $echo " $libdir" - done - $echo - $echo "If you ever happen to want to link against installed libraries" - $echo "in a given directory, LIBDIR, you must either use libtool, and" - $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" - $echo "flag during linking and do at least one of the following:" - if test -n "$shlibpath_var"; then - $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" - $echo " during execution" - fi - if test -n "$runpath_var"; then - $echo " - add LIBDIR to the \`$runpath_var' environment variable" - $echo " during linking" - fi - if test -n "$hardcode_libdir_flag_spec"; then - libdir=LIBDIR - eval flag=\"$hardcode_libdir_flag_spec\" - - $echo " - use the \`$flag' linker flag" - fi - if test -n "$admincmds"; then - $echo " - have your system administrator run these commands:$admincmds" - fi - if test -f /etc/ld.so.conf; then - $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" - fi - $echo - $echo "See any operating system documentation about shared libraries for" - $echo "more information, such as the ld(1) and ld.so(8) manual pages." - $echo "X----------------------------------------------------------------------" | $Xsed - exit $EXIT_SUCCESS - ;; - - # libtool execute mode - execute) - modename="$modename: execute" - - # The first argument is the command name. - cmd="$nonopt" - if test -z "$cmd"; then - $echo "$modename: you must specify a COMMAND" 1>&2 - $echo "$help" - exit $EXIT_FAILURE - fi - - # Handle -dlopen flags immediately. - for file in $execute_dlfiles; do - if test ! -f "$file"; then - $echo "$modename: \`$file' is not a file" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - dir= - case $file in - *.la) - # Check to see that this really is a libtool archive. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : - else - $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - # Read the libtool library. - dlname= - library_names= - - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Skip this library if it cannot be dlopened. - if test -z "$dlname"; then - # Warn if it was a shared library. - test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" - continue - fi - - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - - if test -f "$dir/$objdir/$dlname"; then - dir="$dir/$objdir" - else - $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 - exit $EXIT_FAILURE - fi - ;; - - *.lo) - # Just add the directory containing the .lo file. - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - test "X$dir" = "X$file" && dir=. - ;; - - *) - $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 - continue - ;; - esac - - # Get the absolute pathname. - absdir=`cd "$dir" && pwd` - test -n "$absdir" && dir="$absdir" - - # Now add the directory to shlibpath_var. - if eval "test -z \"\$$shlibpath_var\""; then - eval "$shlibpath_var=\"\$dir\"" - else - eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" - fi - done - - # This variable tells wrapper scripts just to set shlibpath_var - # rather than running their programs. - libtool_execute_magic="$magic" - - # Check if any of the arguments is a wrapper script. - args= - for file - do - case $file in - -*) ;; - *) - # Do a test to see if this is really a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - # If there is no directory component, then add one. - case $file in - */* | *\\*) . $file ;; - *) . ./$file ;; - esac - - # Transform arg to wrapped name. - file="$progdir/$program" - fi - ;; - esac - # Quote arguments (to preserve shell metacharacters). - file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` - args="$args \"$file\"" - done - - if test -z "$run"; then - if test -n "$shlibpath_var"; then - # Export the shlibpath_var. - eval "export $shlibpath_var" - fi - - # Restore saved environment variables - for lt_var in LANG LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES - do - eval "if test \"\${save_$lt_var+set}\" = set; then - $lt_var=\$save_$lt_var; export $lt_var - else - $lt_unset $lt_var - fi" - done - - - # Now prepare to actually exec the command. - exec_cmd="\$cmd$args" - else - # Display what would be done. - if test -n "$shlibpath_var"; then - eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" - $echo "export $shlibpath_var" - fi - $echo "$cmd$args" - exit $EXIT_SUCCESS - fi - ;; - - # libtool clean and uninstall mode - clean | uninstall) - modename="$modename: $mode" - rm="$nonopt" - files= - rmforce= - exit_status=0 - - # This variable tells wrapper scripts just to set variables rather - # than running their programs. - libtool_install_magic="$magic" - - for arg - do - case $arg in - -f) rm="$rm $arg"; rmforce=yes ;; - -*) rm="$rm $arg" ;; - *) files="$files $arg" ;; - esac - done - - if test -z "$rm"; then - $echo "$modename: you must specify an RM program" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - fi - - rmdirs= - - origobjdir="$objdir" - for file in $files; do - dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` - if test "X$dir" = "X$file"; then - dir=. - objdir="$origobjdir" - else - objdir="$dir/$origobjdir" - fi - name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` - test "$mode" = uninstall && objdir="$dir" - - # Remember objdir for removal later, being careful to avoid duplicates - if test "$mode" = clean; then - case " $rmdirs " in - *" $objdir "*) ;; - *) rmdirs="$rmdirs $objdir" ;; - esac - fi - - # Don't error if the file doesn't exist and rm -f was used. - if (test -L "$file") >/dev/null 2>&1 \ - || (test -h "$file") >/dev/null 2>&1 \ - || test -f "$file"; then - : - elif test -d "$file"; then - exit_status=1 - continue - elif test "$rmforce" = yes; then - continue - fi - - rmfiles="$file" - - case $name in - *.la) - # Possibly a libtool archive, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - . $dir/$name - - # Delete the libtool libraries and symlinks. - for n in $library_names; do - rmfiles="$rmfiles $objdir/$n" - done - test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" - - case "$mode" in - clean) - case " $library_names " in - # " " in the beginning catches empty $dlname - *" $dlname "*) ;; - *) rmfiles="$rmfiles $objdir/$dlname" ;; - esac - test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" - ;; - uninstall) - if test -n "$library_names"; then - # Do each command in the postuninstall commands. - cmds=$postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - - if test -n "$old_library"; then - # Do each command in the old_postuninstall commands. - cmds=$old_postuninstall_cmds - save_ifs="$IFS"; IFS='~' - for cmd in $cmds; do - IFS="$save_ifs" - eval cmd=\"$cmd\" - $show "$cmd" - $run eval "$cmd" - if test "$?" -ne 0 && test "$rmforce" != yes; then - exit_status=1 - fi - done - IFS="$save_ifs" - fi - # FIXME: should reinstall the best remaining shared library. - ;; - esac - fi - ;; - - *.lo) - # Possibly a libtool object, so verify it. - if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - - # Read the .lo file - . $dir/$name - - # Add PIC object to the list of files to remove. - if test -n "$pic_object" \ - && test "$pic_object" != none; then - rmfiles="$rmfiles $dir/$pic_object" - fi - - # Add non-PIC object to the list of files to remove. - if test -n "$non_pic_object" \ - && test "$non_pic_object" != none; then - rmfiles="$rmfiles $dir/$non_pic_object" - fi - fi - ;; - - *) - if test "$mode" = clean ; then - noexename=$name - case $file in - *.exe) - file=`$echo $file|${SED} 's,.exe$,,'` - noexename=`$echo $name|${SED} 's,.exe$,,'` - # $file with .exe has already been added to rmfiles, - # add $file without .exe - rmfiles="$rmfiles $file" - ;; - esac - # Do a test to see if this is a libtool program. - if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then - relink_command= - . $dir/$noexename - - # note $name still contains .exe if it was in $file originally - # as does the version of $file that was added into $rmfiles - rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" - if test "$fast_install" = yes && test -n "$relink_command"; then - rmfiles="$rmfiles $objdir/lt-$name" - fi - if test "X$noexename" != "X$name" ; then - rmfiles="$rmfiles $objdir/lt-${noexename}.c" - fi - fi - fi - ;; - esac - $show "$rm $rmfiles" - $run $rm $rmfiles || exit_status=1 - done - objdir="$origobjdir" - - # Try to remove the ${objdir}s in the directories where we deleted files - for dir in $rmdirs; do - if test -d "$dir"; then - $show "rmdir $dir" - $run rmdir $dir >/dev/null 2>&1 - fi - done - - exit $exit_status - ;; - - "") - $echo "$modename: you must specify a MODE" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - ;; - esac - - if test -z "$exec_cmd"; then - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$generic_help" 1>&2 - exit $EXIT_FAILURE - fi -fi # test -z "$show_help" - -if test -n "$exec_cmd"; then - eval exec $exec_cmd - exit $EXIT_FAILURE -fi - -# We need to display help for each of the modes. -case $mode in -"") $echo \ -"Usage: $modename [OPTION]... [MODE-ARG]... - -Provide generalized library-building support services. - - --config show all configuration variables - --debug enable verbose shell tracing --n, --dry-run display commands without modifying any files - --features display basic configuration information and exit - --finish same as \`--mode=finish' - --help display this help message and exit - --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] - --quiet same as \`--silent' - --silent don't print informational messages - --tag=TAG use configuration variables from tag TAG - --version print version information - -MODE must be one of the following: - - clean remove files from the build directory - compile compile a source file into a libtool object - execute automatically set library path, then run a program - finish complete the installation of libtool libraries - install install libraries or executables - link create a library or an executable - uninstall remove libraries from an installed directory - -MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for -a more detailed description of MODE. - -Report bugs to ." - exit $EXIT_SUCCESS - ;; - -clean) - $echo \ -"Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... - -Remove files from the build directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, object or program, all the files associated -with it are deleted. Otherwise, only FILE itself is deleted using RM." - ;; - -compile) - $echo \ -"Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE - -Compile a source file into a libtool library object. - -This mode accepts the following additional options: - - -o OUTPUT-FILE set the output file name to OUTPUT-FILE - -prefer-pic try to building PIC objects only - -prefer-non-pic try to building non-PIC objects only - -static always build a \`.o' file suitable for static linking - -COMPILE-COMMAND is a command to be used in creating a \`standard' object file -from the given SOURCEFILE. - -The output file name is determined by removing the directory component from -SOURCEFILE, then substituting the C source code suffix \`.c' with the -library object suffix, \`.lo'." - ;; - -execute) - $echo \ -"Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... - -Automatically set library path, then run a program. - -This mode accepts the following additional options: - - -dlopen FILE add the directory containing FILE to the library path - -This mode sets the library path environment variable according to \`-dlopen' -flags. - -If any of the ARGS are libtool executable wrappers, then they are translated -into their corresponding uninstalled binary, and any of their required library -directories are added to the library path. - -Then, COMMAND is executed, with ARGS as arguments." - ;; - -finish) - $echo \ -"Usage: $modename [OPTION]... --mode=finish [LIBDIR]... - -Complete the installation of libtool libraries. - -Each LIBDIR is a directory that contains libtool libraries. - -The commands that this mode executes may require superuser privileges. Use -the \`--dry-run' option if you just want to see what would be executed." - ;; - -install) - $echo \ -"Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... - -Install executables or libraries. - -INSTALL-COMMAND is the installation command. The first component should be -either the \`install' or \`cp' program. - -The rest of the components are interpreted as arguments to that command (only -BSD-compatible install options are recognized)." - ;; - -link) - $echo \ -"Usage: $modename [OPTION]... --mode=link LINK-COMMAND... - -Link object files or libraries together to form another library, or to -create an executable program. - -LINK-COMMAND is a command using the C compiler that you would use to create -a program from several object files. - -The following components of LINK-COMMAND are treated specially: - - -all-static do not do any dynamic linking at all - -avoid-version do not add a version suffix if possible - -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime - -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols - -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) - -export-symbols SYMFILE - try to export only the symbols listed in SYMFILE - -export-symbols-regex REGEX - try to export only the symbols matching REGEX - -LLIBDIR search LIBDIR for required installed libraries - -lNAME OUTPUT-FILE requires the installed library libNAME - -module build a library that can dlopened - -no-fast-install disable the fast-install mode - -no-install link a not-installable executable - -no-undefined declare that a library does not refer to external symbols - -o OUTPUT-FILE create OUTPUT-FILE from the specified objects - -objectlist FILE Use a list of object files found in FILE to specify objects - -precious-files-regex REGEX - don't remove output files matching REGEX - -release RELEASE specify package release information - -rpath LIBDIR the created library will eventually be installed in LIBDIR - -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries - -static do not do any dynamic linking of uninstalled libtool libraries - -static-libtool-libs - do not do any dynamic linking of libtool libraries - -version-info CURRENT[:REVISION[:AGE]] - specify library version info [each variable defaults to 0] - -All other options (arguments beginning with \`-') are ignored. - -Every other argument is treated as a filename. Files ending in \`.la' are -treated as uninstalled libtool libraries, other files are standard or library -object files. - -If the OUTPUT-FILE ends in \`.la', then a libtool library is created, -only library objects (\`.lo' files) may be specified, and \`-rpath' is -required, except when creating a convenience library. - -If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created -using \`ar' and \`ranlib', or on Windows using \`lib'. - -If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file -is created, otherwise an executable program is created." - ;; - -uninstall) - $echo \ -"Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... - -Remove libraries from an installation directory. - -RM is the name of the program to use to delete files associated with each FILE -(typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed -to RM. - -If FILE is a libtool library, all the files associated with it are deleted. -Otherwise, only FILE itself is deleted using RM." - ;; - -*) - $echo "$modename: invalid operation mode \`$mode'" 1>&2 - $echo "$help" 1>&2 - exit $EXIT_FAILURE - ;; -esac - -$echo -$echo "Try \`$modename --help' for more information about other modes." - -exit $? - -# The TAGs below are defined such that we never get into a situation -# in which we disable both kinds of libraries. Given conflicting -# choices, we go for a static library, that is the most portable, -# since we can't tell whether shared libraries were disabled because -# the user asked for that or because the platform doesn't support -# them. This is particularly important on AIX, because we don't -# support having both static and shared libraries enabled at the same -# time on that platform, so we default to a shared-only configuration. -# If a disable-shared tag is given, we'll fallback to a static-only -# configuration. But we'll never go from static-only to shared-only. - -# ### BEGIN LIBTOOL TAG CONFIG: disable-shared -disable_libs=shared -# ### END LIBTOOL TAG CONFIG: disable-shared - -# ### BEGIN LIBTOOL TAG CONFIG: disable-static -disable_libs=static -# ### END LIBTOOL TAG CONFIG: disable-static - -# Local Variables: -# mode:shell-script -# sh-indentation:2 -# End: diff --git a/client/neon-0.27.2/macros/ChangeLog b/client/neon-0.27.2/macros/ChangeLog deleted file mode 100644 index ad265430b..000000000 --- a/client/neon-0.27.2/macros/ChangeLog +++ /dev/null @@ -1,1085 +0,0 @@ -Sun Sep 12 18:38:13 2004 Joe Orton - - * neon.m4 (NEON_USE_EXTERNAL): Check for IDNA, LFS, SOCKS - support. - (NEON_SOCKS): Use common feature code for SOCKSv5 support. - -Fri Sep 10 20:52:54 2004 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Safer autoheader template for - declaring stpcpy as necessary for bundled neon builds. - (NEON_WARNINGS): Drop -Winline. - -Wed Aug 25 19:44:26 2004 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Check for poll. - -Sat Jul 3 11:39:01 2004 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Pick up gethostbyname in - -lsocket for QNX. - -Fri Apr 16 11:43:10 2004 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER): If built using libtool, - and --with-expat specifies a libexpat.la file, add the libexpat.la - to NEON_LTLIBS. - - * neon.m4 (NEON_COMMON_CHECKS): Substitute NEON_LTLIBS. - -Tue Apr 13 20:51:59 2004 Joe Orton - - * neon.m4 (NEON_GSSAPI): Check for presence of - gssapi/gssapi_generic.h. - -Wed Apr 7 13:16:33 2004 Joe Orton - - * neon.m4 (NE_LARGEFILE): Check for strtoq. - -Mon Mar 15 19:59:36 2004 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Be safer around getaddrinfo - blacklist for HP-UX and reference why it's needed. - -Sun Mar 7 11:15:44 2004 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Use NE_LARGEFILE in-place - rather than AC_REQUIRE'ing it. - (NE_LARGEFILE): Add NE_LFS to CPPFLAGS for use in bundled builds. - -Mon Feb 23 23:02:54 2004 Joe Orton - - * neon.m4 (NE_SNPRINTF): Define HAVE_TRIO if trio is used. - -Mon Feb 23 00:22:39 2004 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Give INCLUDES argument to - AC_CHECK_HEADERS; prevent warning from cpp test for netinet/in.h - on some platforms. - -Sun Feb 22 17:52:42 2004 Joe Orton - - * neon.m4 (NE_SEARCH_LIBS): Fix to run actions-if-found if - function is found without needing additional libraries. - (LIBNEON_SOURCE_CHECKS): Only check for gethostbyname if - getaddrinfo is not found. Disable getaddrinfo on HP-UX 11.[01]* - here rather than ne_socket.c. - -Sat Jan 24 17:49:50 2004 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Also check for __tm_gmtoff in - struct tm. - -Sat Jan 24 17:16:48 2004 Joe Orton - - * neon.m4: Remove -ansi-pedantic and -Wimplicit-prototypes for gcc - 3.4 compatibility (thanks to Olaf Hering). - -Sat Jan 3 14:11:14 2004 Joe Orton - - * neon-test.m4: Check for stdint.h. - -Sat Jan 3 13:17:21 2004 Joe Orton - - * neon.m4 (NE_LARGEFILE): Add NE_LFS to neon-config --cflags - output. - -Thu Jan 1 18:42:56 2004 Joe Orton - - * neon.m4 (NEON_FORMAT): Use C99 'll' rather than non-standard 'q' - length modifier. - -Thu Jan 1 17:36:39 2004 Joe Orton - - * neon.m4 (NE_LARGEFILE): New macro. - (LIBNEON_SOURCE_CHECKS): Call it. - -Sat Nov 15 09:25:43 2003 Joe Orton - - * neon.m4, neon-xml-parser.m4: Update for latest autoconf - best-practice: s/AC_HELP_STRING/AS_HELP_STRING, replace AC_TRY_RUN - with AC_RUN_IFELSE, AC_TRY_LINK_FUNC with AC_LINK_IFELSE, - AC_TRY_COMPILE with AC_COMPILE_IFELSE, remove AC_LANG_C and - AC_PROG_CC_STDC, - -Fri Nov 14 13:12:10 2003 Joe Orton - - * neon.m4 (NEON_LIBIDN): New macro. - (LIBNEON_SOURCE_CHECKS): Use NEON_LIBIDN. - -Fri Nov 14 11:28:58 2003 Joe Orton - - * neon.m4 (NE_ENABLE_SUPPORT, NE_DISABLE_SUPPORT): New macros. - Use throughout to flag support or lack of support for optional - features. - -Thu Nov 13 20:25:28 2003 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Check for gethostbyname in - -lbind too. - -Tue Oct 7 21:20:16 2003 Joe Orton - - * neon-test.m4 (NEON_TEST): Check for shutdown. - -Mon Sep 22 21:20:37 2003 Joe Orton - - * neon.m4 (NE_CHECK_FUNCS, NE_SEARCH_LIBS): Avoid clobbering - ne_save_{LIBS,CPPFLAGS}. - -Sun Sep 14 10:51:34 2003 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Check for working AI_ADDRCONFIG - flag for getaddrinfo(). - -Wed Sep 10 21:45:10 2003 Joe Orton - - * neon.m4 (NEON_GSSAPI): Restore CPPFLAGS and NEON_LIBS if GSSAPI - detection fails. - -Thu Sep 4 21:29:06 2003 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Check for netinet/tcp.h. - -Wed Jul 23 21:17:40 2003 Joe Orton - - * neon.m4 (NEON_GSSAPI): New macro. - -Mon Apr 21 18:24:12 2003 Joe Orton - - * neon-xml-parser.m4 (HAVE_EXPAT): Fail if --with-expat is given - but expat.h is not found. - -Wed Mar 26 20:29:11 2003 Joe Orton - - * neon.m4 (NEON_SSL): And add ne_stubssl to NEON_EXTRAOBJS for - non-SSL build. - -Tue Mar 25 20:43:01 2003 Joe Orton - - * neon.m4 (NEON_SSL): Add ne_openssl to NEON_EXTRAOBJS. - -Mon Mar 17 20:34:55 2003 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Check for netdb.h. - -Sun Mar 16 14:22:02 2003 Joe Orton - - * neon-xml-parser.m4 (NE_XML_BUNDLED_EXPAT): Define - HAVE_XMLPARSE_H. - -Sun Mar 16 11:47:35 2003 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER): Also fix - non-included-expat build for when included expat is not an option. - -Sun Mar 16 11:20:23 2003 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER): Fix non-included-expat - build broken in previous commit. - -Sun Mar 16 09:06:41 2003 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER): Fix --with-included-expat - support. - -Sun Mar 9 10:08:57 2003 Joe Orton - - * neon.m4 (NEON_SSL): Fail if --with-ssl is given an argument. - -Sun Mar 9 08:55:04 2003 Joe Orton - - * neon.m4 (NE_SEARCH_LIBS): Bug fix to always compare against - `extras' if given. Add support for optional `actions-if-found' - argument. - - * neon-xml-parser.m4: Largely rewritten. Drop support for - libxml 1.x; require expat 1.95.x. - -Sun Mar 9 08:50:22 2003 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Check for stpcpy. - -Mon Mar 3 22:15:56 2003 Joe Orton - - * neon.m4 (NE_CHECK_FUNCS): Check whether h_errno is declared. - -Wed Feb 19 21:35:20 2003 Joe Orton - - * neon.m4 (NEON_FORMAT): Revert use of 'z' modifier; breaks on - CygWin. - -Tue Jan 14 17:06:07 2003 Joe Orton - - * neon.m4 (NEON_FORMAT): Prefer the C99 'z' modifier to printf - size_t/ssize_t values where available. - -Fri Jan 3 23:12:20 2003 Joe Orton - - * neon.m4 (NE_PKG_CONFIG): New macro. - (NEON_SSL): Use NE_PKG_CONFIG rather than PKG_CHECK_MODULES. - -Mon Dec 16 20:02:45 2002 Joe Orton - - * neon.m4 (NEON_SSL): Only check for OpenSSL <=0.9.6 if version is - known to be <=0.9.7. - -Mon Dec 16 19:01:57 2002 Joe Orton - - * neon.m4: Use pkg-config data to determine location OpenSSL - libraries/headers, if available. - -Tue Nov 19 11:21:31 2002 Joe Orton - - * neon-test.m4 (NEON_TEST): Suggest this macro is run before - NEON_XML_PARSER. - -Mon Oct 7 22:22:12 2002 Joe Orton - - * neon.m4 (NE_CHECK_SSLVER): New macro. - (NEON_SSL): Use NE_CHECK_SSLVER. Add --with-egd argument; - conditionally enable EGD, optionally using only a specific EGD - socket path, and only if using OpenSSL before 0.9.7. - -Tue Sep 24 21:36:01 2002 Joe Orton - - * neon.m4 (NE_ZLIB_VERSION): Removed macro. - (NEON_ZLIB): Removed --with-force-zlib flag; don't check zlib - version. - (NEON_SSL): Removed --with-force-ssl flag, only require OpenSSL - 0.9.6 or later. - -Sat Aug 31 17:28:15 2002 Joe Orton - - * neon.m4 (NEON_FORMAT_PREP): Add check for gcc -Wformat -Werror - sanity. - (NEON_FORMAT): Only use gcc -Wformat -Werror if sanity is assured. - -Fri Aug 30 22:07:59 2002 Joe Orton - - * neon.m4: Set NEON_INTERFACE_VERSION according to - NEON_VERSION_MINOR, NEON_VERSION_RELEASE, for the duration of neon - 0.x releases. - -Sun Aug 25 23:52:38 2002 Joe Orton - - * neon.m4 (NE_CHECK_FUNCS): New macro. - (LIBNEON_SOURCE_CHECKS): Use NE_CHECK_FUNCS rather than - AC_CHECK_FUNCS, so $NEON_LIBS are searched. - -Sun Aug 25 11:53:20 2002 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Require inet_ntop as well for - USE_GETADDRINFO test. - -Sun Aug 18 22:50:09 2002 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Remove redundant check for - SIGPIPE definition. - -Sun Aug 18 22:41:15 2002 Joe Orton - - * neon.m4 (NE_SEARCH_LIBS): Take optional fourth argument. - (LIBNEON_SOURCE_CHECKS): Define USE_GETADDRINFO if getaddrinfo and - gai_strerror are present. Otherwise, check for hstrerror, - possibly in -lresolv. - - * neon-test.m4: Don't check for hstrerror(). - -Sun Aug 18 22:31:13 2002 Joe Orton - - * neon-xml-parser.m4 (NEON_FIND_PARSER_H, NEON_XML_LIBXML2): - Re-order checks to skip redundant tests, speeding up common case. - -Fri Aug 9 19:47:14 2002 Joe Orton - - * neon.m4 (NEON_SSL): Require OpenSSL 0.9.6f or later. - -Wed Jul 31 23:01:17 2002 Joe Orton - - * strftime.m4, readline.m4: Removed from neon/macros CVS module. - -Tue Jul 30 19:09:20 2002 Joe Orton - - * neon.m4 (NEON_COMMON_CHECKS): Require AC_TYPE_SIZE_T, - AC_TYPE_OFF_T. - - * neon-test.m4 (NEON_TEST): Require AC_TYPE_PID_T. - -Tue Jul 30 19:06:48 2002 Joe Orton - - * neon.m4 (NEON_SSL): Require OpenSSL 0.9.6e or later for security - fixes; add --with-force-ssl to override version check. - -Fri Jul 26 00:01:07 2002 Joe Orton - - * neon.m4 (NE_MACOSX): Just check for any Darwin system. - -Sat Jul 20 10:40:29 2002 Joe Orton - - * neon.m4 (NEON_WITH_LIBS): Allow a colon-separated list of - directories for --with-libs argument. - -Thu Jul 18 20:07:43 2002 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Require AC_FUNC_STRERROR_R. - -Wed Jul 17 23:26:51 2002 Joe Orton - - * neon.m4 (NEON_CHECK_VERSION): Rewrite to cache results, - simplify, and use new ne_version_match. - (NE_ZLIB_VERSION): Cache result. - -Fri Jul 5 12:57:56 2002 Joe Orton - - * neon.m4 (NEON_SSL): Fail if openssl/opensslv.h header is not - found, or if OpenSSL version is earlier than 0.9.6. - -Sun Jun 16 14:04:18 2002 Joe Orton - - * neon.m4 (NEON_FORMAT): Take optional third argument giving - format string specifier to use. - (NEON_COMMON_CHECKS): Get format string for ssize_t; fix to - use 'u' specifier for size_t format string. - -Thu Jun 13 20:34:35 2002 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER): Undocument use of =DIR - parameter to --with-expat, as it gives false expectations. - -Wed Jun 12 23:26:40 2002 Joe Orton - - * neon.m4 (NEON_WITH_LIBS): New macro. - -Mon Jun 10 22:31:50 2002 Joe Orton - - * neon.m4 (NEON_WARNINGS): Replace -ansi-pedantic with -pedantic. - -Sun May 26 19:08:12 2002 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_LIBXML2): Check for - libxml/xmlversion.h header too. - -Wed May 22 09:54:42 2002 Joe Orton - - * neon.m4 (NE_MACOSX): Cache result. - (NE_COMMON_CHECKS): Simplify tm_gmtoff check further: use - AC_CHECK_MEMBERS. - -Mon May 20 21:18:06 2002 Joe Orton - - * neon.m4 (NE_SEARCH_LIBS): Cache results. - -Mon May 20 20:55:04 2002 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Use AC_CACHE_CHECK to check for - SIGPIPE in signal.h; don't invade the ac_ namespace with cache - variables. Cache results of tm_gmtoff test too. - -Mon May 20 20:35:22 2002 Joe Orton - - * neon.m4 (NE_SNPRINTF): Simplify logic. - -Sun May 19 20:23:55 2002 Joe Orton - - * neon.m4 (NEON_WARNINGS): Remove with_warnings variable; - simplify. - -Wed May 19 08:36:44 2004 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Declare stpcpy on modern - "Linux-like" AIXes. - -Sun May 19 09:35:08 2002 Joe Orton - - * neon.m4 (NE_FIND_AR): Fix $PATH handling on some Linux - platforms. - -Sun May 19 09:05:22 2002 Joe Orton - - * neon.m4 (NE_FIND_AR): New macro. - (NEON_NORMAL_BUILD): Require NE_FIND_AR. - - * neon-test.m4: Require NE_FIND_AR. Check for hstrerror(). - -Fri May 17 23:37:19 2002 Joe Orton - - * neon.m4 (NEON_SSL): Allow --without-ssl again. - -Wed May 15 21:00:15 2002 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_LIBXML2): sed '-L/usr/lib ' out of - xml2-config --libs output. - -Sat May 11 15:30:38 2002 Joe Orton - - * neon.m4 (NEON_SOCKS): Moved and simplified from neon-socks.m4. - Drop support for specifying directory argument; fail if - --with-socks is given and socks.h is not found. - - * neon-socks.m4: Removed file. - -Sat May 11 15:22:36 2002 Joe Orton - - * neon.m4 (NEON_DEBUG): Moved and simplified from neon-debug.m4. - - * neon-debug.m4: Removed file. - -Sat May 11 13:40:29 2002 Joe Orton - - * neon.m4 (NEON_WARNINGS): Moved and simplified from - neon-warnings.m4. - - * neon-warnings.m4: Removed file. - -Sat May 11 13:26:00 2002 Joe Orton - - * neon.m4 (NEON_SSL): Simplified version of NEON_SSL from - neon-ssl.m4. Check for ssl.h; detect OpenSSL ENGINE correctly - when -lcrypto requries -ldl. - - * neon-ssl.m4: Removed file. - -Sat May 11 13:16:27 2002 Joe Orton - - * neon.m4 (NE_SEARCH_LIBS): Allow passing 'extralibs' to include - in library list when link against a specified library fails. - Prepend found library/libraries to $NEON_LIBS. - -Sat May 11 12:40:24 2002 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER), - * neon.m4 (NEON_REPLACE_SNPRINTF): - Use AC_LIBOBJ rather than modify LIBOBJS directly, to appease - autoconf 2.53. - -Wed May 1 22:32:10 2002 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_LIBXML1): Fix syntax error in - libxml 1.x detection causing spurious or missing warning message. - -Thu Apr 25 07:38:33 2002 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_EXTERNAL_EXPAT): Check for expat.h - too, to support expat 1.95.x (Branko ibej). - -Tue Apr 23 21:09:55 2002 Joe Orton - - * neon-xml-parser.m4 (NEON_FIND_PARSER_H): New macro, factored out - from NEON_XML_LIBXML2. - (NEON_XML_LIBXML2, NEON_XML_LIBXML1): Use it. - -Tue Apr 23 20:54:30 2002 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_LIBXML2): Check for parser.h or - libxml/parser.h, or fail. - -Sat Apr 13 22:35:01 2002 Joe Orton - - * neon.m4 (NE_SNPRINTF): Define NEON_TRIO in NEON_CFLAGS, export - it from 'neon-config --cflags' output. - -Fri Apr 5 23:40:00 2002 Joe Orton - - * neon.m4 (NEON_ZLIB, NE_ZLIB_VERSION): Add --with-force-zlib, to - skip zlib version check. Simplify neon_zlib_message handling a - little. - -Tue Mar 12 00:18:00 2002 Joe Orton - - * neon.m4 (NE_ZLIB_VERSION): New macro. - (NEON_ZLIB): Use it to require zlib 1.1.4. - -Sun Mar 10 22:05:26 2002 Joe Orton - - * neon.m4 (NEON_ZLIB): Don't add ne_compress to NEON_EXTRAOBJS. - -Mon Mar 4 21:04:28 2002 Joe Orton - - * neon-ssl.m4 (NEON_SSL): Avoid adding -I/usr/include to CFLAGS - during build as well as not exporting it via neon-config. - -Tue Feb 19 21:30:50 2002 Joe Orton - - * neon-socks.m4 (NEON_SOCKS): Fix configure argument name, export - -L argument in NEON_LIBS, check for socks.h not sock.h, define - NEON_SOCKS. - -Sun Jan 13 20:07:51 2002 Joe Orton - - * neon.m4 (NE_MACOSX): New macro. - (NEON_COMMON_CHECKS): Call it. - -Sun Jan 6 21:35:08 2002 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER): Add XML_BYTE_ORDER to - CPPFLAGS; mini-expat doesn't pick up config.h. - -Tue Jan 1 23:30:03 2002 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER): Set XML_BYTE_ORDER - appropriately. - -Tue Jan 1 22:50:15 2002 Joe Orton - - * neon.m4 (NEON_CHECK_VERSION): Don't add libs for external neon - to NEON_LIBS here. - -Tue Jan 1 22:44:05 2002 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_LIBXML2, NEON_XML_LIBXML1): Alter - CPPFLAGS only, not CFLAGS. - -Tue Jan 1 21:49:16 2002 Joe Orton - - * neon.m4 (NEON_USE_EXTERNAL): Factored out from NEON_COMMON. - (NEON_COMMON): Use NEON_USE_EXTERNAL; simplify, improve reporting. - - * neon.m4 (NEON_COMMON_CHECKS): Move check for common headers - here... (LIBNEON_SOURCE_CHECKS): from here. - -Tue Jan 1 21:44:33 2002 Joe Orton - - * neon-test.m4 (NEON_TEST): Check for AR and RANLIB. - -Fri Dec 14 22:39:57 2001 Joe Orton - - * neon-test.m4 (NEON_TEST): Pick up time_t definition from - sys/time.h if present (fix for Solaris 2.6 and probably - elsewhere). - -Fri Dec 14 22:39:32 2001 Joe Orton - - * neon.m4 (NEON_FORMAT): Allow passing in headers where type may - be defined. - -Mon Dec 10 07:36:26 2001 Joe Orton - - * neon.m4 (NEON_COMMON): Fix --with-neon=PATH again. - -Sun Dec 9 21:40:47 2001 Joe Orton - - * neon-test.m4 (NEON_TEST): Determine how to print time_t. - -Sun Dec 9 11:50:03 2001 Joe Orton - - * neon.m4 (NEON_WITHOUT_ACL): New macro. - (LIBNEON_SOURCE_CHECKS): Conditionally build ACL support. - -Sun Dec 9 01:06:32 2001 Joe Orton - - * neon.m4 (NEON_CHECK_VERSION): Use NEON_CONFIG as config script, - drop first argument. Better error message if the link failed. - (NEON_COMMON): Cleanup. Check for neon-config in PATH. Stop if - --with-neon was given, and the external neon wasn't good enough. - -Sun Dec 9 00:17:19 2001 Joe Orton - - * neon-test.m4 (NEON_TEST): Requires NEON_COMMON_CHECKS. - - * neon-warnings.m4 (NEON_WARNINGS): Requires AC_PROG_CC. - -Sun Dec 9 00:13:47 2001 Joe Orton - - * neon.m4 (NEON_COMMON_CHECKS): New macro; runs common C - language/compiler checks, which may be useful to neon applications - regardless of whether a bundled or external neon is being used. - Use AC_REQUIRE to prevent macros being expanded more than once. - (LIBNEON_SOURCE_CHECKS, NEON_COMMON): Require NEON_COMMON_CHECKS - to have been expanded. - -Sat Dec 8 00:56:34 2001 Joe Orton - - * neon.m4 (NEON_FORMAT): Rewrite to use cache results (should fix - for cross-compiling), and for GCC, actually test for warnings - - fix for Linux. - -Sat Dec 8 00:15:44 2001 Joe Orton - - * neon.m4 (NEON_CHECK_SUPPORT): Send --support output to - /dev/null, in case it is from pre-0.18 and prints the usage - message. - -Sat Dec 8 00:13:55 2001 Joe Orton - - * neon.m4 (NEON_COMMON): Prepend -lneon to NEON_LIBS rather than - overwriting it when using bundled build. - -Mon Dec 3 19:49:28 2001 Joe Orton - - * neon.m4 (NEON_FORMAT_PREP, NEON_FORMAT): New macros. - (LIBNEON_SOURCE_CHECKS): Call them. - -Mon Dec 3 19:43:11 2001 Joe Orton - - Fix gethostbyname() detection on Unixware 7: - - * neon.m4 (NEON_COMMON): Add -lneon to NEON_LIBS after performing - source checks. (NE_SEARCH_LIBS): Test using libraries from - NEON_LIBS too. - -Sat Nov 24 20:33:11 2001 Joe Orton - - * neon.m4 (NEON_CHECK_SUPPORT): New macro. (NEON_COMMON): Define - NEON_SUPPORTS_{SSL,ZLIB} when using an external neon. - -Sat Nov 24 20:25:15 2001 Joe Orton - - * neon.m4 (NEON_WITHOUT_ZLIB): New function. - (LIBNEON_SOURCE_CHECKS): Conditionally enable zlib support. - -Sun Nov 18 12:29:08 2001 Joe Orton - - * neon-ssl.m4 (NEON_SSL): Don't add -I/usr/include to NEON_CFLAGS. - -Sat Oct 27 12:20:08 2001 Joe Orton - - * neon.m4, neon-ssl.m4: Substitute NEON_SUPPORTS_ZLIB, - NEON_SUPPORTS_DAV, NEON_SUPPORTS_SSL as "yes" or "no" - appropriately. - -Thu Oct 25 14:29:53 2001 Mo DeJong - - * neon.m4 (NEON_NORMAL_BUILD): Use AC_CHECK_TOOL instead of - AC_PATH_PROG so that cross compilation works properly. - -Sat Oct 6 13:36:58 2001 Joe Orton - - * neon.m4 (NEON_ZLIB): New macro. (LIBNEON_SOURCE_CHECKS): - print warning if struct tm lacks tm_gmtoff. - -Sat Oct 6 12:39:09 2001 Joe Orton - - * neon.m4: Require autoconf 2.50. Use AC_HELP_STRING where - possible, and AC_MSG_NOTICE instead of 'echo'. - - * neon-ssl.m4, neon-xml-parser.m4, neon-socks.m4: Quoting fixes - for help strings. - -Tue Oct 2 21:13:24 2001 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Check for tm_gmtoff in struct - tm. - -Sun Sep 30 23:35:03 2001 Joe Orton - - * neon.m4 (NE_SEARCH_LIBS): AC_SEARCH_LIBS replacement, adds found - libraries to NEON_LIBS instead. - -Sun Sep 30 11:11:19 2001 Joe Orton - - * neon-test.m4: New file. - -Sun Sep 30 11:09:58 2001 Joe Orton - - * neon.m4, neon-xml-parser.m4: Always add libs to $LIBS rather - than $NEONLIBS. - - * neon.m4: Export NEON_CFLAGS. - -Sat Sep 29 14:12:53 2001 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Check for zlib (zlib.h, inflate - in -lz). Add ne_compress to NEON_EXTRAOBJS. - -Tue Sep 25 07:31:53 2001 Mo DeJong - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Check for instead of - . Define HAVE_SIGPIPE if SIGPIPE is defined in - . - -Mon Sep 24 20:16:47 2001 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_EXTERNAL_EXPAT): Fix broken - AC_DEFINE (Mo DeJong). - -Mon Sep 24 17:24:42 2001 Joe Orton - - * ac_c_bigendian_cross.m4: New file. - - * neon.m4: Use AC_C_BIGENDIAN_CROSS rather than AC_C_BIGENDIAN. - -Mon Sep 17 23:29:11 2001 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Check for setvbuf(). - -Sun Sep 16 20:39:05 2001 Joe Orton - - * neon-ssl.m4 (NEON_SSL): Put SSL libs in LIBS rather than - NEONLIBS (and lib paths). - -Sun Sep 16 20:36:53 2001 Joe Orton - - * neon.m4 (NEON_COMMON): Add library paths to NEONLIBS rather than - LDFLAGS. - -Sat Jun 9 22:06:25 2001 Joe Orton - - * neon-debug.m4: New file. - -Thu May 31 00:04:51 2001 Joe Orton - - * neon.m4 (NEON_COMMON_BUILD): Update filenames. - (NEON_CHECK_VERSION): Do simple AC_TRY_LINK and warn appropriately - before checking version. - -Thu May 31 00:03:40 2001 Joe Orton - - * neon-warnings.m4: Add -Wbad-function-cast. - -Wed May 30 23:37:48 2001 Joe Orton - - * neon-xml-parser.m4: Added --with-libxml1 and --with-libxml2 - arguments. - -Tue Apr 17 23:06:25 2001 Joe Orton - - * neon-ssl.m4: Define neon_ssl_message for configure output. - -Wed Apr 11 23:14:33 2001 Joe Orton - - * neon.m4 (NEON_COMMON_BUILD): Fix specifying a list of object - files. - -Fri Apr 6 23:09:58 2001 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Call NEON_SOCKS. - -Fri Apr 6 23:08:39 2001 Joe Orton - - * neon-socks.m4: Add basic SOCKSv5 support (untested). - -Mon Apr 2 21:42:40 2001 Joe Orton - - * neon.m4: Version is 0.13.0, interface version 13:0:0. - -Mon Apr 2 00:27:37 2001 Joe Orton - - * neon.m4: Move check for 'ar' program to NEON_NORMAL_BUILD, it's - not necessary for libtool build. - -Mon Apr 2 00:17:58 2001 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER): Check for xmlversion.h - header from libxml2. - -Sun Apr 1 21:23:26 2001 Joe Orton - - * neon-xml-parser.m4: Add expat2 support (Sam TH ). - -Wed Mar 21 10:56:03 2001 Joe Orton - - * neon-xml-parser.m4: Add libxml2 support. - -Sun Mar 4 15:45:21 2001 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER): Use an m4 ifelse rather - than a shell test to code the conditional on whether an argument - was passed to the macro or not. - -Sun Mar 4 15:23:47 2001 Joe Orton - - * neon.m4: Add "actions if not bundled" argument to *_BUNDLED - macros. - -Mon Feb 26 22:52:24 2001 Joe Orton - - * neon.m4: Version is 0.12.0. - -Mon Feb 26 22:06:13 2001 Joe Orton - - * neon.m4: Versionn is 0.12.0-dev. - -Sun Feb 25 17:12:49 2001 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Add checks for endianness (for - md5 code), inline, and const. - -Sun Feb 25 17:00:07 2001 Joe Orton - - * neon.m4 (NEON_COMMON): Rename NEON_IS_BUNDLED to - NEON_BUILD_BUNDLED. - -Sun Feb 25 16:52:19 2001 Joe Orton - - * neon.m4 (NEON_COMMON): Define NEON_IS_BUNDLED to "yes" or "no" - appropriately. - -Sat Feb 24 00:06:09 2001 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Don't set NEON_NEED_XML_PARSER - here. (NEON_COMMON): ... set it here instead. - (NEON_WITHOUT_WEBDAV): New macro to disable WebDAV support. - (NEON_COMMON_BUILD): Select default set of object files to build - depending on whether DAV is enabled or not. - -Fri Feb 23 23:28:09 2001 Joe Orton - - * neon.m4 (NEON_COMMON_BUILD): Use an m4 'ifelse' for the number - of args test. - - * neon.m4 (NEON_LIBTOOL_BUILD, NEON_NORMAL_BUILD, - NEON_COMMON_BUILD): Set NEON_OBJEXT correctly (fixes - dependancies). - -Sun Feb 4 14:55:10 2001 Joe Orton - - * neon.m4: Version is 0.11.0, interface version is 11:0:0. - -Sun Jan 28 17:16:27 2001 Joe Orton - - * neon.m4 (NEON_CHECK_VERSION): Run actions-if-okay if - NEON_REQUIRE has not been called. - -Sun Jan 28 14:53:57 2001 Joe Orton - - * neon.m4 (NEON_REQUIRE, NEON_CHECK_VERSION): New macros. - (NEON_COMMON): If a required version is defined, check that an - external neon library matches it. - -Sun Jan 28 10:39:31 2001 Joe Orton - - * neon.m4: Define NEON_VERSION, NEON_VERSION_{MAJOR,MINOR} in - config.h rather than substituting into neon_config.h. - -Sat Jan 27 22:55:42 2001 Joe Orton - - * neon.m4: Include version string in library message. - -Tue Jan 23 23:14:33 2001 Joe Orton - - * neon.m4 (NEON_VERSIONS): New macro. (NEON_COMMON): Call it from - here. - -Mon Jan 15 22:26:54 2001 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER): Append rather than - overwrite CFLAGS. - -Thu Jan 11 20:49:12 2001 Joe Orton - - * neon-ssl.m4: Check for OpenSSL in /usr too. - -Thu Jan 11 20:05:34 2001 Joe Orton - - * neon.m4 (NEON_VPATH_BUNDLED): New macro. (NEON_BUNDLED): Call - NEON_COMMON_BUNDLED. (NEON_COMMON_BUNDLED): Abstracted from - NEON_BUNDLED. - -Wed Jan 10 22:44:37 2001 Joe Orton - - * neon.m4 (NEON_LIBTOOL_BUILD, NEON_NORMAL_BUILD): Pass optional - set of objects to build to these macros. Else, all objects go in - NEONOBJS. (NEON_COMMON_BUILD): Implement that. Also substitute - NEON_LINK_FLAGS. - -Mon Jan 8 22:23:51 2001 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER): Put XML parser libs in - $NEONLIBS rather than $LIBS. - -Mon Jan 8 22:20:51 2001 Joe Orton - - * neon-ssl.m4 (NEON_SSL): Put OpenSSL libs in $NEONLIBS rather - than LIBS. - -Sun Jan 7 17:30:54 2001 Joe Orton - - * neon.m4 (NEON_BUNDLED): Add optional second argument to specify - builddir of bundled sources (Peter Moulder ). - -Wed Jan 3 21:33:05 2001 Joe Orton - - * neon.m4: Place libraries needed to use neon in NEONLIBS. Adding - them to LIBS breaks bundled builds since libneon doesn't exist at - configure-time, and configure uses $LIBS. - -Wed Jan 3 21:17:00 2001 Joe Orton - - * neon.m4 (NEON_COMMON_BUILD): Don't set top_builddir using 'pwd'. - -Wed Jan 3 21:15:04 2001 Joe Orton - - * neon.m4 (NEON_COMMON): If using bundled neon, add -L to LDFLAGS, and -lneon to LIBS. - -Fri Dec 22 23:13:39 2000 Joe Orton - - * neon.m4 (NEON_NORMAL_BUILD, NEON_COMMON_BUILD): New macros. - -Tue Dec 19 22:13:18 2000 Joe Orton - - * neon.m4 (NEON_LIBTOOL_BUILD): New macro. - -Wed Dec 13 22:07:07 2000 Joe Orton - - * neon.m4: Add a decent interface: NEON_LIBRARY for non-bundled - case, NEON_BUNDLED for the bundled case. (LIBNEON_SOURCE_CHECKS): - Always set NEON_NEED_XML_PARSER. - - * neon-xml-parser.m4 (NEON_XML_PARSER): Only execute if - "$NEON_NEED_XML_PARSER" = "yes". - -Sun Nov 19 22:52:56 2000 Joe Orton - - * neon.m4, neon-ssl.m4, neon-warnings.m4, neon-xml-parser.m4: - Clarify that the more liberal license applies to the m4 files - only, not neon in general. - -Sun Nov 19 22:40:01 2000 Joe Orton - - * neon.m4 (NEON_LIBRARY): Don't call NEON_XML_PARSER, set - NEON_NEED_XML_PARSER to "yes" if it needs to be called. - -Sun Nov 19 22:31:26 2000 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER): Switch to useing - NEON_INCLUDED_EXPAT m4 macro rather than passing arguments. - -Sun Nov 19 22:20:36 2000 Joe Orton - - * neon.m4 (NEON_LIBRARY): Switch to using NEON_INCLUDED_SOURCE m4 - macro rather than passing arguments to the NEON_LIBRARY macro. - -Sun Nov 5 23:26:18 2000 Joe Orton - - * neon-xml-parser.m4: Never set LIBS if using a libtool-built - libexpat.la (Greg Stein). - -2000-10-10 Joe Orton - - * neon-xml-parser.m4: If libexpat.la is included in the - --with-expat parameter, then use a libtool-friendly LIBS. (Greg - Stein) - -Sat Oct 7 19:16:08 2000 Joe Orton - - * neon-xml-parser.m4: Link against a libexpat.la if found in - --with-expat location. (Greg Stein). - -Mon Sep 11 15:05:58 2000 Joe Orton - - * neon.m4: Use AC_SEARCH_LIBS for finding gethostbyname() and - socket(). - -Mon Sep 11 15:03:45 2000 Joe Orton - - * neon.m4 (NEON_REPLACE_SNPRINTF): New macro. - -Fri Sep 8 14:30:37 2000 Joe Orton - - * neon.m4: Check for socket() in -lsocket, -linet. - -Thu Sep 7 00:11:51 2000 Joe Orton - - * neon-xml-parser.m4: Added --with-expat flag (patch by Greg - Stein). - -Sun Aug 13 11:12:41 2000 Joe Orton - - * strftime.m4: New file, from fileutils-4.0i. - -Thu Jul 27 19:59:18 2000 Joe Orton - - * neon-ssl.m4: Append the SSL libs on the end of $LIBS rather than - redefining it completely. - -Thu Jul 27 19:43:38 2000 Joe Orton - - * neon.m4: Define variable neon_library_message to describe what - neon library is being used. - -Mon Jul 24 16:56:34 2000 Joe Orton - - * neon-ssl.m4: Put -lssl before -lcrypto in LIBS. - -Thu Jul 20 15:12:14 2000 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER): Pass directory name - containing bundled expat sources as $1. - - * neon.m4 (NEON_LIBRARY): Pass directory name containing bundled - neon sources as $1, and $2 is passed to NEON_XML_PARSER for - similar use. - -Thu Jul 20 15:04:49 2000 Joe Orton - - * neon-ssl.m4: Rewritten from scratch. Support OpenSSL only. - -Thu Jul 20 12:41:23 2000 Joe Orton - - * neon.m4, neon-xml-parser.m4, neon_warnings.m4: Added licensing - information. - -Wed Jul 19 19:30:24 2000 Joe Orton - - * neon-warnings.m4: New file. (NEON_WARNINGS): Macro for doing - --enable-warnings. - -Sun Jun 18 12:12:23 2000 Joe Orton - - * neon.m4: Only add --with-included-neon flag if neon is bundled. - -Sun Jun 18 12:08:23 2000 Joe Orton - - * gnome-x-checks.m4: Imported from GNOME CVS macros module, - adding: descriptive args to AC_DEFINE HAVE_LIBSM call, requiring - Gtk 1.2.8 and the Gtk 'gthread' module. - -Mon May 29 15:10:24 2000 Joe Orton - - * neon.m4 (LIBNEON_SOURCE_CHECKS): Call NEON_SSL. - -Tue May 23 19:11:29 2000 Joe Orton - - * neon.m4: Renamed from neon-checks.m4. - -Sun May 21 23:52:27 2000 Joe Orton - - * neon-ssl.m4: New file. - -Sat May 13 21:08:54 2000 Joe Orton - - * acconfig.h: Added HAVE_LC_MESSAGE (my lcmessage.m4 is missing - the appropriate description arguments). - -Sat May 13 21:08:40 2000 Joe Orton - - * acconfig.h: Added PACKAGE and VERSION. - -Sat May 13 21:02:29 2000 Joe Orton - - * socklen-arg-type.m4: Added file, modified from a KDE - configure.in. - -Sat May 13 20:44:56 2000 Joe Orton - - * gnome-x-checks.m4: Added description arguments to - AC_DEFINE(HAVE_LIBSM). - -Wed May 10 19:18:14 2000 Joe Orton - - * neon-xml-parser.m4: Error if no XML parser is found. - -Wed May 10 14:33:21 2000 Joe Orton - - * neon-checks.m4: New file. - -Wed May 10 14:26:57 2000 Joe Orton - - * neon-xml-parser.m4 (NEON_XML_PARSER): Use "neon_" prefix for - variables. - -Wed May 10 13:47:04 2000 Joe Orton - - * acconfig.h: New file. - -Wed May 10 13:42:16 2000 Joe Orton - - * neon-xml-parser.m4: New file. - -Sun May 7 21:57:32 2000 Joe Orton - - * gnome-x-checks.m4 (GNOME_X_CHECKS): Check for Gtk 1.2.7 or - later, passing "gthread" module argument. - diff --git a/client/neon-0.27.2/macros/neon-test.m4 b/client/neon-0.27.2/macros/neon-test.m4 deleted file mode 100644 index 944646ef8..000000000 --- a/client/neon-0.27.2/macros/neon-test.m4 +++ /dev/null @@ -1,46 +0,0 @@ -# Copyright (C) 2001-2006 Joe Orton -*- autoconf -*- -# -# This file is free software; you may copy and/or distribute it with -# or without modifications, as long as this notice is preserved. -# This software 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. - -# The above license applies to THIS FILE ONLY, the neon library code -# itself may be copied and distributed under the terms of the GNU -# LGPL, see COPYING.LIB for more details - -# This file is part of the neon HTTP/WebDAV client library. -# See http://www.webdav.org/neon/ for the latest version. -# Please send any feedback to - -# Tests needed for the neon-test common test code. - -AC_DEFUN([NE_FORMAT_TIMET], [ -NEON_FORMAT(time_t, [ -#ifdef HAVE_SYS_TIME_H -#include -#endif]) -]) - -AC_DEFUN([NEON_TEST], [ - -AC_REQUIRE([NEON_COMMON_CHECKS]) -AC_REQUIRE([NE_FORMAT_TIMET]) - -AC_REQUIRE([AC_TYPE_PID_T]) -AC_REQUIRE([AC_HEADER_TIME]) - -dnl NEON_XML_PARSER may add things (e.g. -I/usr/local/include) to -dnl CPPFLAGS which make "gcc -Werror" fail in NEON_FORMAT; suggest -dnl this macro is used first. -AC_BEFORE([$0], [NEON_XML_PARSER]) - -AC_CHECK_HEADERS(sys/time.h stdint.h locale.h) - -AC_CHECK_FUNCS(pipe isatty usleep shutdown setlocale) - -AC_REQUIRE([NE_FIND_AR]) - -]) diff --git a/client/neon-0.27.2/macros/neon-xml-parser.m4 b/client/neon-0.27.2/macros/neon-xml-parser.m4 deleted file mode 100644 index 3644f0a88..000000000 --- a/client/neon-0.27.2/macros/neon-xml-parser.m4 +++ /dev/null @@ -1,154 +0,0 @@ -# Copyright (C) 1998-2005, 2007 Joe Orton -*- autoconf -*- -# -# This file is free software; you may copy and/or distribute it with -# or without modifications, as long as this notice is preserved. -# This software 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. - -# The above license applies to THIS FILE ONLY, the neon library code -# itself may be copied and distributed under the terms of the GNU -# LGPL, see COPYING.LIB for more details - -# This file is part of the neon HTTP/WebDAV client library. -# See http://www.webdav.org/neon/ for the latest version. -# Please send any feedback to - -# Check for XML parser, supporting libxml 2.x and expat 1.95.x, -# or a bundled copy of expat. -# * Bundled expat if a directory name argument is passed -# -> expat dir must contain minimal expat sources, i.e. -# xmltok, xmlparse sub-directories. See sitecopy/cadaver for -# examples of how to do this. -# -# Usage: -# NEON_XML_PARSER() -# or -# NEON_XML_PARSER([expat-srcdir], [expat-builddir]) - -dnl Find expat: run $1 if found, else $2 -AC_DEFUN([NE_XML_EXPAT], [ -AC_CHECK_HEADER(expat.h, - [AC_CHECK_LIB(expat, XML_SetXmlDeclHandler, [ - AC_DEFINE(HAVE_EXPAT, 1, [Define if you have expat]) - neon_xml_parser_message="expat" - NEON_LIBS="$NEON_LIBS -lexpat" - neon_xml_parser=expat - AC_CHECK_TYPE(XML_Size, - [NEON_FORMAT(XML_Size, [#include ])], - [AC_DEFINE_UNQUOTED([NE_FMT_XML_SIZE], ["d"])], - [#include ]) - ], [$1])], [$1]) -]) - -dnl Find libxml2: run $1 if found, else $2 -AC_DEFUN([NE_XML_LIBXML2], [ -AC_CHECK_PROG(XML2_CONFIG, xml2-config, xml2-config) -if test -n "$XML2_CONFIG"; then - neon_xml_parser_message="libxml `$XML2_CONFIG --version`" - AC_DEFINE(HAVE_LIBXML, 1, [Define if you have libxml]) - # xml2-config in some versions erroneously includes -I/include - # in the --cflags output. - CPPFLAGS="$CPPFLAGS `$XML2_CONFIG --cflags | sed 's| -I/include||g'`" - NEON_LIBS="$NEON_LIBS `$XML2_CONFIG --libs | sed 's|-L/usr/lib ||g'`" - AC_CHECK_HEADERS(libxml/xmlversion.h libxml/parser.h,,[ - AC_MSG_ERROR([could not find parser.h, libxml installation problem?])]) - neon_xml_parser=libxml2 -else - $1 -fi -]) - -dnl Configure for a bundled expat build. -AC_DEFUN([NE_XML_BUNDLED_EXPAT], [ - -AC_REQUIRE([AC_C_BIGENDIAN]) -# Define XML_BYTE_ORDER for expat sources. -if test $ac_cv_c_bigendian = "yes"; then - ne_xml_border=21 -else - ne_xml_border=12 -fi - -# mini-expat doesn't pick up config.h -CPPFLAGS="$CPPFLAGS -DXML_BYTE_ORDER=$ne_xml_border -DXML_DTD -I$1/xmlparse -I$1/xmltok" - -AC_DEFINE_UNQUOTED([NE_FMT_XML_SIZE], ["d"]) - -# Use the bundled expat sources -AC_LIBOBJ($2/xmltok/xmltok) -AC_LIBOBJ($2/xmltok/xmlrole) -AC_LIBOBJ($2/xmlparse/xmlparse) -AC_LIBOBJ($2/xmlparse/hashtable) - -AC_DEFINE(HAVE_EXPAT) - -AC_DEFINE(HAVE_XMLPARSE_H, 1, [Define if using expat which includes xmlparse.h]) - -]) - -AC_DEFUN([NEON_XML_PARSER], [ - -dnl Switches to force choice of library -AC_ARG_WITH([libxml2], -AS_HELP_STRING([--with-libxml2], [force use of libxml 2.x])) -AC_ARG_WITH([expat], -AS_HELP_STRING([--with-expat], [force use of expat])) - -dnl Flag to force choice of included expat, if available. -ifelse($#, 2, [ -AC_ARG_WITH([included-expat], -AS_HELP_STRING([--with-included-expat], [use bundled expat sources]),, -with_included_expat=no)], -with_included_expat=no) - -if test "$NEON_NEED_XML_PARSER" = "yes"; then - # Find an XML parser - neon_xml_parser=none - - # Forced choice of expat: - case $with_expat in - yes) NE_XML_EXPAT([AC_MSG_ERROR([expat library not found, cannot proceed])]) ;; - no) ;; - */libexpat.la) - # Special case for Subversion - ne_expdir=`echo $with_expat | sed 's:/libexpat.la$::'` - AC_DEFINE(HAVE_EXPAT) - CPPFLAGS="$CPPFLAGS -I$ne_expdir" - if test "x${NEON_TARGET}" = "xlibneon.la"; then - NEON_LTLIBS=$with_expat - else - # no dependency on libexpat => crippled libneon, so do partial install - ALLOW_INSTALL=lib - fi - neon_xml_parser=expat - neon_xml_parser_message="expat in $ne_expdir" - ;; - /*) AC_MSG_ERROR([--with-expat does not take a directory argument]) ;; - esac - - # If expat wasn't specifically enabled and libxml was: - if test "${neon_xml_parser}-${with_libxml2}-${with_included_expat}" = "none-yes-no"; then - NE_XML_LIBXML2( - [AC_MSG_ERROR([libxml2.x library not found, cannot proceed])]) - fi - - # Otherwise, by default search for expat then libxml2: - if test "${neon_xml_parser}-${with_included_expat}" = "none-no"; then - NE_XML_EXPAT([NE_XML_LIBXML2([:])]) - fi - - # If an XML parser still has not been found, fail or use the bundled expat - if test "$neon_xml_parser" = "none"; then - m4_if($1, [], - [AC_MSG_ERROR([no XML parser was found: expat or libxml 2.x required])], - [# Configure the bundled copy of expat - NE_XML_BUNDLED_EXPAT($@) - neon_xml_parser_message="bundled expat in $1"]) - fi - - AC_MSG_NOTICE([XML parser used: $neon_xml_parser_message]) -fi - -]) diff --git a/client/neon-0.27.2/macros/neon.m4 b/client/neon-0.27.2/macros/neon.m4 deleted file mode 100644 index 8cfcdc026..000000000 --- a/client/neon-0.27.2/macros/neon.m4 +++ /dev/null @@ -1,1142 +0,0 @@ -# Copyright (C) 1998-2007 Joe Orton -*- autoconf -*- -# Copyright (C) 2004 Aleix Conchillo Flaque -# -# This file is free software; you may copy and/or distribute it with -# or without modifications, as long as this notice is preserved. -# This software 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. - -# The above license applies to THIS FILE ONLY, the neon library code -# itself may be copied and distributed under the terms of the GNU -# LGPL, see COPYING.LIB for more details - -# This file is part of the neon HTTP/WebDAV client library. -# See http://www.webdav.org/neon/ for the latest version. -# Please send any feedback to - -# -# Usage: -# -# NEON_LIBRARY -# or NEON_BUNDLED(srcdir, [ACTIONS-IF-BUNDLED], [ACTIONS-IF-NOT_BUNDLED]) -# or NEON_VPATH_BUNDLED(srcdir, builddir, -# [ACTIONS-IF-BUNDLED], [ACTIONS-IF-NOT-BUNDLED]) -# -# where srcdir is the location of bundled neon 'src' directory. -# If using a VPATH-enabled build, builddir is the location of the -# build directory corresponding to srcdir. -# -# If a bundled build *is* being used, ACTIONS-IF-BUNDLED will be -# evaluated. These actions should ensure that 'make' is run -# in srcdir, and that one of NEON_NORMAL_BUILD or NEON_LIBTOOL_BUILD -# is called. -# -# After calling one of the above macros, if the NEON_NEED_XML_PARSER -# variable is set to "yes", then you must configure an XML parser -# too. You can do this your own way, or do it easily using the -# NEON_XML_PARSER() macro. Example usage for where we have bundled the -# neon sources in a directory called libneon, and bundled expat -# sources in a directory called 'expat'. -# -# NEON_BUNDLED(libneon, [ -# NEON_XML_PARSER(expat) -# NEON_NORMAL_BUILD -# ]) -# -# Alternatively, for a simple standalone app with neon as a -# dependancy, use just: -# -# NEON_LIBRARY -# -# and rely on the user installing neon correctly. -# -# You are free to configure an XML parser any other way you like, -# but the end result must be, either expat or libxml will get linked -# in, and HAVE_EXPAT or HAVE_LIBXML is defined appropriately. -# -# To set up the bundled build environment, call -# -# NEON_NORMAL_BUILD -# or -# NEON_LIBTOOL_BUILD -# -# depending on whether you are using libtool to build, or not. -# Both these macros take an optional argument specifying the set -# of object files you wish to build: if the argument is not given, -# all of neon will be built. - -AC_DEFUN([NEON_BUNDLED],[ - -neon_bundled_srcdir=$1 -neon_bundled_builddir=$1 - -NEON_COMMON_BUNDLED([$2], [$3]) - -]) - -AC_DEFUN([NEON_VPATH_BUNDLED],[ - -neon_bundled_srcdir=$1 -neon_bundled_builddir=$2 -NEON_COMMON_BUNDLED([$3], [$4]) - -]) - -AC_DEFUN([NEON_COMMON_BUNDLED],[ - -AC_PREREQ(2.50) - -AC_ARG_WITH(included-neon, -AS_HELP_STRING([--with-included-neon], [force use of included neon library]), -[neon_force_included="$withval"], [neon_force_included="no"]) - -NEON_COMMON - -# The colons are here so there is something to evaluate -# in case the argument was not passed. -if test "$neon_force_included" = "yes"; then - : - $1 -else - : - $2 -fi - -]) - -dnl Not got any bundled sources: -AC_DEFUN([NEON_LIBRARY],[ - -AC_PREREQ(2.50) -neon_force_included=no -neon_bundled_srcdir= -neon_bundled_builddir= - -NEON_COMMON - -]) - -AC_DEFUN([NE_DEFINE_VERSIONS], [ - -NEON_VERSION="${NE_VERSION_MAJOR}.${NE_VERSION_MINOR}.${NE_VERSION_PATCH}${NE_VERSION_TAG}" - -AC_DEFINE_UNQUOTED([NEON_VERSION], ["${NEON_VERSION}"], - [Define to be the neon version string]) -AC_DEFINE_UNQUOTED([NE_VERSION_MAJOR], [(${NE_VERSION_MAJOR})], - [Define to be neon library major version]) -AC_DEFINE_UNQUOTED([NE_VERSION_MINOR], [(${NE_VERSION_MINOR})], - [Define to be neon library minor version]) -AC_DEFINE_UNQUOTED([NE_VERSION_PATCH], [(${NE_VERSION_PATCH})], - [Define to be neon library patch version]) -]) - -AC_DEFUN([NE_VERSIONS_BUNDLED], [ - -# Define the current versions. -NE_VERSION_MAJOR=0 -NE_VERSION_MINOR=27 -NE_VERSION_PATCH=2 -NE_VERSION_TAG= - -# libtool library interface versioning. Release policy dictates that -# for neon 0.x.y, each x brings an incompatible interface change, and -# each y brings no interface change, and since this policy has been -# followed since 0.1, x == CURRENT, y == RELEASE, 0 == AGE. For -# 1.x.y, this will become N + x == CURRENT, y == RELEASE, x == AGE, -# where N is constant (and equal to CURRENT + 1 from the final 0.x -# release) -NEON_INTERFACE_VERSION="${NE_VERSION_MINOR}:${NE_VERSION_PATCH}:0" - -NE_DEFINE_VERSIONS - -]) - -dnl Define the minimum required versions, usage: -dnl NE_REQUIRE_VERSIONS([major-version], [minor-versions]) -dnl e.g. -dnl NE_REQUIRE_VERSIONS([0], [24 25]) -dnl to require neon 0.24.x or neon 0.25.x. -AC_DEFUN([NE_REQUIRE_VERSIONS], [ -m4_define([ne_require_major], [$1]) -m4_define([ne_require_minor], [$2]) -]) - -dnl Check that the external library found in a given location -dnl matches the min. required version (if any). Requires that -dnl NEON_CONFIG be set the the full path of a valid neon-config -dnl script -dnl -dnl Usage: -dnl NEON_CHECK_VERSION(ACTIONS-IF-OKAY, ACTIONS-IF-FAILURE) -dnl -AC_DEFUN([NEON_CHECK_VERSION], [ -m4_ifdef([ne_require_major], [ - # Check whether the library is of required version - ne_save_LIBS="$LIBS" - ne_save_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS `$NEON_CONFIG --cflags`" - LIBS="$LIBS `$NEON_CONFIG --libs`" - ne_libver=`$NEON_CONFIG --version | sed -e "s/neon //g"` - # Check whether it's possible to link against neon - AC_CACHE_CHECK([linking against neon], [ne_cv_lib_neon], - [AC_LINK_IFELSE( - [AC_LANG_PROGRAM([[#include ]], [[ne_version_match(0, 0);]])], - [ne_cv_lib_neon=yes], [ne_cv_lib_neon=no])]) - if test "$ne_cv_lib_neon" = "yes"; then - ne_cv_lib_neonver=no - for v in ne_require_minor; do - case $ne_libver in - ne_require_major.$v.*) ne_cv_lib_neonver=yes ;; - esac - done - fi - ne_goodver=$ne_cv_lib_neonver - LIBS=$ne_save_LIBS - CFLAGS=$ne_save_CFLAGS -], [ - # NE_REQUIRE_VERSIONS not used; presume all versions OK! - ne_goodver=yes - ne_libver="(version unknown)" -]) - -if test "$ne_goodver" = "yes"; then - AC_MSG_NOTICE([using neon library $ne_libver]) - $1 -else - AC_MSG_NOTICE([incompatible neon library version $ne_libver: wanted ne_require_major.ne_require_minor]) - $2 -fi]) - -dnl NEON_CHECK_SUPPORT(feature, var, name) -AC_DEFUN([NEON_CHECK_SUPPORT], [ -if $NEON_CONFIG --support $1 >/dev/null; then - NE_ENABLE_SUPPORT($2, [$3 is supported by neon]) -else - NE_DISABLE_SUPPORT($2, [$3 is not supported by neon]) -fi -]) - -dnl enable support for feature $1 with define NE_HAVE_$1, message $2 -AC_DEFUN([NE_ENABLE_SUPPORT], [ -NE_FLAG_$1=yes -AC_SUBST(NE_FLAG_$1) -AC_DEFINE([NE_HAVE_]$1, 1, [Defined if $1 is supported]) -m4_if([$2], [], - [ne_$1_message="support enabled" - AC_MSG_NOTICE([$1 support is enabled])], - [ne_$1_message="$2" - AC_MSG_NOTICE([$2])]) -]) - -dnl Disable support for feature $1, giving message $2 -AC_DEFUN([NE_DISABLE_SUPPORT], [ -NE_FLAG_$1=no -AC_SUBST(NE_FLAG_$1) -m4_if([$2], [], - [ne_$1_message="not supported" - AC_MSG_NOTICE([$1 support is not enabled])], - [ne_$1_message="$2" - AC_MSG_NOTICE([$2])]) -]) - -AC_DEFUN([NEON_USE_EXTERNAL], [ -# Configure to use an external neon, given a neon-config script -# found at $NEON_CONFIG. -neon_prefix=`$NEON_CONFIG --prefix` -NEON_CHECK_VERSION([ - # Pick up CFLAGS and LIBS needed - CFLAGS="$CFLAGS `$NEON_CONFIG --cflags`" - NEON_LIBS="$NEON_LIBS `$NEON_CONFIG --libs`" - # Pick up library version - set dummy `$NEON_CONFIG --version | sed 's/\./ /g'` - NE_VERSION_MAJOR=[$]3; NE_VERSION_MINOR=[$]4; NE_VERSION_PATCH=[$]5 - NE_DEFINE_VERSIONS - neon_library_message="library in ${neon_prefix} (${NEON_VERSION})" - neon_xml_parser_message="using whatever neon uses" - NEON_CHECK_SUPPORT([ssl], [SSL], [SSL]) - NEON_CHECK_SUPPORT([zlib], [ZLIB], [zlib]) - NEON_CHECK_SUPPORT([ipv6], [IPV6], [IPv6]) - NEON_CHECK_SUPPORT([lfs], [LFS], [LFS]) - NEON_CHECK_SUPPORT([socks], [SOCKS], [SOCKSv5]) - NEON_CHECK_SUPPORT([ts_ssl], [TS_SSL], [thread-safe SSL]) - neon_got_library=yes -], [neon_got_library=no]) -]) - -AC_DEFUN([NEON_COMMON],[ - -AC_REQUIRE([NEON_COMMON_CHECKS]) - -AC_ARG_WITH(neon, -[ --with-neon[[=DIR]] specify location of neon library], -[case $withval in -yes|no) neon_force_external=$withval; neon_ext_path= ;; -*) neon_force_external=yes; neon_ext_path=$withval ;; -esac;], [ -neon_force_external=no -neon_ext_path= -]) - -if test "$neon_force_included" = "no"; then - # There is no included neon source directory, or --with-included-neon - # wasn't given (so we're not forced to use it). - - # Default to no external neon. - neon_got_library=no - if test "x$neon_ext_path" = "x"; then - AC_PATH_PROG([NEON_CONFIG], neon-config, none) - if test "x${NEON_CONFIG}" = "xnone"; then - AC_MSG_NOTICE([no external neon library found]) - elif test -x "${NEON_CONFIG}"; then - NEON_USE_EXTERNAL - else - AC_MSG_NOTICE([ignoring non-executable ${NEON_CONFIG}]) - fi - else - AC_MSG_CHECKING([for neon library in $neon_ext_path]) - NEON_CONFIG="$neon_ext_path/bin/neon-config" - if test -x ${NEON_CONFIG}; then - AC_MSG_RESULT([found]) - NEON_USE_EXTERNAL - else - AC_MSG_RESULT([not found]) - # ...will fail since force_external=yes - fi - fi - - if test "$neon_got_library" = "no"; then - if test $neon_force_external = yes; then - AC_MSG_ERROR([could not use external neon library]) - elif test -n "$neon_bundled_srcdir"; then - # Couldn't find external neon, forced to use bundled sources - neon_force_included="yes" - else - # Couldn't find neon, and don't have bundled sources - AC_MSG_ERROR(could not find neon) - fi - fi -fi - -if test "$neon_force_included" = "yes"; then - NE_VERSIONS_BUNDLED - AC_MSG_NOTICE([using bundled neon ($NEON_VERSION)]) - NEON_BUILD_BUNDLED="yes" - LIBNEON_SOURCE_CHECKS - CFLAGS="$CFLAGS -I$neon_bundled_srcdir" - NEON_LIBS="-L$neon_bundled_builddir -lneon $NEON_LIBS" - NEON_NEED_XML_PARSER=yes - neon_library_message="included libneon (${NEON_VERSION})" -else - # Don't need to configure an XML parser - NEON_NEED_XML_PARSER=no - NEON_BUILD_BUNDLED=no -fi - -AC_SUBST(NEON_BUILD_BUNDLED) - -]) - -dnl AC_SEARCH_LIBS done differently. Usage: -dnl NE_SEARCH_LIBS(function, libnames, [extralibs], [actions-if-not-found], -dnl [actions-if-found]) -dnl Tries to find 'function' by linking againt `-lLIB $NEON_LIBS' for each -dnl LIB in libnames. If link fails and 'extralibs' is given, will also -dnl try linking against `-lLIB extralibs $NEON_LIBS`. -dnl Once link succeeds, `-lLIB [extralibs]` is prepended to $NEON_LIBS, and -dnl `actions-if-found' are executed, if given. -dnl If link never succeeds, run `actions-if-not-found', if given, else -dnl give an error and fail configure. -AC_DEFUN([NE_SEARCH_LIBS], [ - -AC_REQUIRE([NE_CHECK_OS]) - -AC_CACHE_CHECK([for library containing $1], [ne_cv_libsfor_$1], [ -AC_LINK_IFELSE( - [AC_LANG_PROGRAM([], [[$1();]])], - [ne_cv_libsfor_$1="none needed"], [ -ne_sl_save_LIBS=$LIBS -ne_cv_libsfor_$1="not found" -for lib in $2; do - # The w32api libraries link using the stdcall calling convention. - case ${lib}-${ne_cv_os_uname} in - ws2_32-MINGW*) ne__code="__stdcall $1();" ;; - *) ne__code="$1();" ;; - esac - - LIBS="$ne_sl_save_LIBS -l$lib $NEON_LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [$ne__code])], - [ne_cv_libsfor_$1="-l$lib"; break]) - m4_if($3, [], [], dnl If $3 is specified, then... - [LIBS="$ne_sl_save_LIBS -l$lib $3 $NEON_LIBS" - AC_LINK_IFELSE([AC_LANG_PROGRAM([], [$ne__code])], - [ne_cv_libsfor_$1="-l$lib $3"; break])]) -done -LIBS=$ne_sl_save_LIBS])]) - -if test "$ne_cv_libsfor_$1" = "not found"; then - m4_if([$4], [], [AC_MSG_ERROR([could not find library containing $1])], [$4]) -elif test "$ne_cv_libsfor_$1" = "none needed"; then - m4_if([$5], [], [:], [$5]) -else - NEON_LIBS="$ne_cv_libsfor_$1 $NEON_LIBS" - $5 -fi]) - -dnl Check for presence and suitability of zlib library -AC_DEFUN([NEON_ZLIB], [ - -AC_ARG_WITH(zlib, AS_HELP_STRING([--without-zlib], [disable zlib support]), -ne_use_zlib=$withval, ne_use_zlib=yes) - -if test "$ne_use_zlib" = "yes"; then - AC_CHECK_HEADER(zlib.h, [ - AC_CHECK_LIB(z, inflate, [ - NEON_LIBS="$NEON_LIBS -lz" - NE_ENABLE_SUPPORT(ZLIB, [zlib support enabled, using -lz]) - ], [NE_DISABLE_SUPPORT(ZLIB, [zlib library not found])]) - ], [NE_DISABLE_SUPPORT(ZLIB, [zlib header not found])]) -else - NE_DISABLE_SUPPORT(ZLIB, [zlib not enabled]) -fi -]) - -AC_DEFUN([NE_CHECK_OS], [ -# Check for Darwin, which needs extra cpp and linker flags. -AC_CACHE_CHECK([for uname], ne_cv_os_uname, [ - ne_cv_os_uname=`uname -s 2>/dev/null` -]) - -if test "$ne_cv_os_uname" = "Darwin"; then - CPPFLAGS="$CPPFLAGS -no-cpp-precomp" - LDFLAGS="$LDFLAGS -flat_namespace" - # poll has various issues in various Darwin releases - if test x${ac_cv_func_poll+set} != xset; then - ac_cv_func_poll=no - fi -fi -]) - -AC_DEFUN([NEON_COMMON_CHECKS], [ - -# These checks are done whether or not the bundled neon build -# is used. - -AC_REQUIRE([AC_PROG_CC]) -AC_REQUIRE([AC_ISC_POSIX]) -AC_REQUIRE([AC_C_INLINE]) -AC_REQUIRE([AC_C_CONST]) -AC_REQUIRE([AC_TYPE_SIZE_T]) -AC_REQUIRE([AC_TYPE_OFF_T]) - -AC_REQUIRE([NE_CHECK_OS]) - -AC_REQUIRE([AC_PROG_MAKE_SET]) - -AC_REQUIRE([AC_HEADER_STDC]) - -AC_CHECK_HEADERS([errno.h stdarg.h string.h stdlib.h]) - -NEON_FORMAT(size_t,,u) dnl size_t is unsigned; use %u formats -NEON_FORMAT(off_t) -NEON_FORMAT(ssize_t) - -]) - -AC_DEFUN([NEON_FORMAT_PREP], [ -AC_CHECK_SIZEOF(int) -AC_CHECK_SIZEOF(long) -AC_CHECK_SIZEOF(long long) -if test "$GCC" = "yes"; then - AC_CACHE_CHECK([for gcc -Wformat -Werror sanity], ne_cv_cc_werror, [ - # See whether a simple test program will compile without errors. - ne_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -Wformat -Werror" - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include -#include ]], [[int i = 42; printf("%d", i);]])], - [ne_cv_cc_werror=yes], [ne_cv_cc_werror=no]) - CPPFLAGS=$ne_save_CPPFLAGS]) - ne_fmt_trycompile=$ne_cv_cc_werror -else - ne_fmt_trycompile=no -fi -]) - -dnl Check for LFS support -AC_DEFUN([NE_LARGEFILE], [ -dnl Need the size of off_t -AC_REQUIRE([NEON_COMMON_CHECKS]) - -if test -z "$ac_cv_sizeof_off_t"; then - NE_DISABLE_SUPPORT(LFS, [LFS support omitted: off_t size unknown!]) -elif test $ac_cv_sizeof_off_t != 4; then - NE_DISABLE_SUPPORT(LFS, [LFS support unnecessary, off_t is not 32-bit]) - AC_CHECK_FUNCS([strtoll strtoq], [break]) -elif test -z "$ac_cv_sizeof_long_long"; then - NE_DISABLE_SUPPORT(LFS, [LFS support omitted: long long size unknown]) -elif test $ac_cv_sizeof_long_long != 8; then - NE_DISABLE_SUPPORT(LFS, [LFS support omitted: long long not 64-bit]) -else - ne_save_CPPFLAGS=$CPPFLAGS - CPPFLAGS="$CPPFLAGS -D_LARGEFILE64_SOURCE" - AC_CHECK_TYPE(off64_t, [ - NEON_FORMAT(off64_t) - ne_lfsok=no - AC_CHECK_FUNCS([strtoll strtoq], [ne_lfsok=yes; break]) - AC_CHECK_FUNCS([lseek64 fstat64], [], [ne_lfsok=no; break]) - if test x$ne_lfsok = xyes; then - NE_ENABLE_SUPPORT(LFS, [LFS (large file) support enabled]) - NEON_CFLAGS="$NEON_CFLAGS -D_LARGEFILE64_SOURCE -DNE_LFS" - ne_save_CPPFLAGS="$CPPFLAGS -DNE_LFS" - else - NE_DISABLE_SUPPORT(LFS, - [LFS support omitted: 64-bit support functions not found]) - fi], [NE_DISABLE_SUPPORT(LFS, [LFS support omitted: off64_t type not found])]) - CPPFLAGS=$ne_save_CPPFLAGS -fi -if test "$NE_FLAG_LFS" = "yes"; then - AC_DEFINE_UNQUOTED([NE_FMT_NE_OFF_T], [NE_FMT_OFF64_T], - [Define to be printf format string for ne_off_t]) -else - AC_DEFINE_UNQUOTED([NE_FMT_NE_OFF_T], [NE_FMT_OFF_T]) -fi -]) - -dnl NEON_FORMAT(TYPE[, HEADERS[, [SPECIFIER]]) -dnl -dnl This macro finds out which modifier is needed to create a -dnl printf format string suitable for printing integer type TYPE (which -dnl may be an int, long, or long long). -dnl The default specifier is 'd', if SPECIFIER is not given. -dnl TYPE may be defined in HEADERS; sys/types.h is always used first. -AC_DEFUN([NEON_FORMAT], [ - -AC_REQUIRE([NEON_FORMAT_PREP]) - -AC_CHECK_SIZEOF($1,, [AC_INCLUDES_DEFAULT -$2]) - -dnl Work out which specifier character to use -m4_ifdef([ne_spec], [m4_undefine([ne_spec])]) -m4_if($#, 3, [m4_define(ne_spec,$3)], [m4_define(ne_spec,d)]) - -m4_ifdef([ne_cvar], [m4_undefine([ne_cvar])])dnl -m4_define([ne_cvar], m4_translit(ne_cv_fmt_[$1], [ ], [_]))dnl - -AC_CACHE_CHECK([how to print $1], [ne_cvar], [ -ne_cvar=none -if test $ne_fmt_trycompile = yes; then - oflags="$CPPFLAGS" - # Consider format string mismatches as errors - CPPFLAGS="$CPPFLAGS -Wformat -Werror" - dnl obscured for m4 quoting: "for str in d ld lld; do" - for str in ne_spec l]ne_spec[ ll]ne_spec[; do - AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include -$2 -#include ]], [[$1 i = 1; printf("%$str", i);]])], - [ne_cvar=$str; break]) - done - CPPFLAGS=$oflags -else - # Best guess. Don't have to be too precise since we probably won't - # get a warning message anyway. - case $ac_cv_sizeof_]m4_translit($1, [ ], [_])[ in - $ac_cv_sizeof_int) ne_cvar="ne_spec" ;; - $ac_cv_sizeof_long) ne_cvar="l]ne_spec[" ;; - $ac_cv_sizeof_long_long) ne_cvar="ll]ne_spec[" ;; - esac -fi -]) - -if test "x$ne_cvar" = "xnone"; then - AC_MSG_ERROR([format string for $1 not found]) -fi - -AC_DEFINE_UNQUOTED([NE_FMT_]m4_translit($1, [a-z ], [A-Z_]), "$ne_cvar", - [Define to be printf format string for $1]) -]) - -dnl Wrapper for AC_CHECK_FUNCS; uses libraries from $NEON_LIBS. -AC_DEFUN([NE_CHECK_FUNCS], [ -ne_cf_save_LIBS=$LIBS -LIBS="$LIBS $NEON_LIBS" -AC_CHECK_FUNCS($@) -LIBS=$ne_cf_save_LIBS]) - -dnl Checks needed when compiling the neon source. -AC_DEFUN([LIBNEON_SOURCE_CHECKS], [ - -dnl Run all the normal C language/compiler tests -AC_REQUIRE([NEON_COMMON_CHECKS]) - -dnl Needed for building the MD5 code. -AC_REQUIRE([AC_C_BIGENDIAN]) -dnl Is strerror_r present; if so, which variant -AC_REQUIRE([AC_FUNC_STRERROR_R]) - -AC_CHECK_HEADERS([sys/time.h limits.h sys/select.h arpa/inet.h libintl.h \ - signal.h sys/socket.h netinet/in.h netinet/tcp.h netdb.h sys/poll.h \ - sys/limits.h fcntl.h iconv.h],,, -[AC_INCLUDES_DEFAULT -/* netinet/tcp.h requires netinet/in.h on some platforms. */ -#ifdef HAVE_NETINET_IN_H -#include -#endif]) - -AC_REQUIRE([NE_SNPRINTF]) - -AC_CACHE_CHECK([for timezone global], ne_cv_cc_timezone, [ -AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include -#include ]], -[[time_t t = 0 - timezone;]])], -ne_cv_cc_timezone=yes, ne_cv_cc_timezone=no)]) - -if test "$ne_cv_cc_timezone" = "yes"; then - AC_DEFINE([HAVE_TIMEZONE], 1, [Define if the timezone global is available]) -fi - -dnl Check for large file support -NE_LARGEFILE - -AC_REPLACE_FUNCS(strcasecmp) - -AC_CHECK_FUNCS(signal setvbuf setsockopt stpcpy poll fcntl getsockopt) - -if test "x${ac_cv_func_poll}${ac_cv_header_sys_poll_h}y" = "xyesyesy"; then - AC_DEFINE([NE_USE_POLL], 1, [Define if poll() should be used]) -fi - -if test "$ac_cv_func_stpcpy" = "yes"; then - AC_CHECK_DECLS(stpcpy) -fi - -# Modern AIXes with the "Linux-like" libc have an undeclared stpcpy -AH_BOTTOM([#if defined(HAVE_STPCPY) && defined(HAVE_DECL_STPCPY) && !HAVE_DECL_STPCPY && !defined(stpcpy) -char *stpcpy(char *, const char *); -#endif]) - -# Unixware 7 can only link gethostbyname with -lnsl -lsocket -# Pick up -lsocket first, then the gethostbyname check will work. -NE_SEARCH_LIBS(socket, socket inet ws2_32) - -# Enable getaddrinfo support if it, gai_strerror and inet_ntop are -# all available. -NE_SEARCH_LIBS(getaddrinfo, nsl,, - [ne_enable_gai=no], - [# HP-UX boxes commonly get into a state where getaddrinfo is present - # but borked: http://marc.theaimsgroup.com/?l=apr-dev&m=107730955207120&w=2 - case x`uname -sr 2>/dev/null`y in - xHP-UX*11.[[01]]*y) - AC_MSG_NOTICE([getaddrinfo support disabled on HP-UX 11.0x/11.1x]) ;; - *) - ne_enable_gai=yes - NE_CHECK_FUNCS(gai_strerror getnameinfo inet_ntop,,[ne_enable_gai=no; break]) ;; - esac -]) - -if test $ne_enable_gai = yes; then - NE_ENABLE_SUPPORT(IPV6, [IPv6 support is enabled]) - AC_DEFINE(USE_GETADDRINFO, 1, [Define if getaddrinfo() should be used]) - AC_CACHE_CHECK([for working AI_ADDRCONFIG], [ne_cv_gai_addrconfig], [ - AC_RUN_IFELSE([AC_LANG_PROGRAM([#include ], -[struct addrinfo hints = {0}, *result; -hints.ai_flags = AI_ADDRCONFIG; -if (getaddrinfo("localhost", NULL, &hints, &result) != 0) return 1;])], - ne_cv_gai_addrconfig=yes, ne_cv_gai_addrconfig=no, ne_cv_gai_addrconfig=no)]) - if test $ne_cv_gai_addrconfig = yes; then - AC_DEFINE(USE_GAI_ADDRCONFIG, 1, [Define if getaddrinfo supports AI_ADDRCONFIG]) - fi -else - # Checks for non-getaddrinfo() based resolver interfaces. - # QNX has gethostbyname in -lsocket. BeOS only has it in -lbind. - # CygWin/Winsock2 has it in -lws2_32, allegedly. - NE_SEARCH_LIBS(gethostbyname, socket nsl bind ws2_32) - NE_SEARCH_LIBS(hstrerror, resolv,,[:]) - NE_CHECK_FUNCS(hstrerror) - # Older Unixes don't declare h_errno. - AC_CHECK_DECLS(h_errno,,,[#include ]) - AC_CHECK_TYPE(in_addr_t,,[ - AC_DEFINE([in_addr_t], [unsigned int], - [Define if in_addr_t is not available])], [ -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_NETINET_IN_H -# include -#endif -]) -fi - -AC_CHECK_TYPES(socklen_t,,,[ -#ifdef HAVE_SYS_TYPES_H -# include -#endif -#ifdef HAVE_SYS_SOCKET_H -# include -#endif -]) - -AC_CHECK_MEMBERS([struct tm.tm_gmtoff, struct tm.__tm_gmtoff],,, - [#include ]) - -if test $ac_cv_member_struct_tm_tm_gmtoff$ac_cv_member_struct_tm___tm_gmtoff = nono; then - AC_MSG_WARN([no timezone handling in date parsing on this platform]) -fi - -ifdef([neon_no_zlib], - [NE_DISABLE_SUPPORT(ZLIB, [zlib not supported])], - [NEON_ZLIB()]) - -# Conditionally enable ACL support -AC_MSG_CHECKING([whether to enable ACL support in neon]) -if test "x$neon_no_acl" = "xyes"; then - AC_MSG_RESULT(no) -else - AC_MSG_RESULT(yes) - NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_acl" -fi - -NEON_SSL() -NEON_SOCKS() -NEON_GSSAPI() - -AC_SUBST(NEON_CFLAGS) -AC_SUBST(NEON_LIBS) -AC_SUBST(NEON_LTLIBS) - -]) - -dnl Call to put lib/snprintf.o in LIBOBJS and define HAVE_SNPRINTF_H -dnl if snprintf isn't in libc. - -AC_DEFUN([NEON_REPLACE_SNPRINTF], [ -# Check for snprintf -AC_CHECK_FUNC(snprintf,,[ - AC_DEFINE(HAVE_SNPRINTF_H, 1, [Define if need to include snprintf.h]) - AC_LIBOBJ(lib/snprintf)]) -]) - -dnl turn off webdav, boo hoo. -AC_DEFUN([NEON_WITHOUT_WEBDAV], [ -neon_no_webdav=yes -neon_no_acl=yes -NEON_NEED_XML_PARSER=no -neon_xml_parser_message="none needed" -]) - -dnl Turn off zlib support -AC_DEFUN([NEON_WITHOUT_ZLIB], [ -define(neon_no_zlib, yes) -]) - -AC_DEFUN([NEON_WITHOUT_ACL], [ -# Turn off ACL support -neon_no_acl=yes -]) - -dnl Common macro to NEON_LIBTOOL_BUILD and NEON_NORMAL_BUILD -dnl Sets NEONOBJS appropriately if it has not already been set. -dnl -dnl NOT FOR EXTERNAL USE: use LIBTOOL_BUILD or NORMAL_BUILD. -dnl - -AC_DEFUN([NEON_COMMON_BUILD], [ - -# Using the default set of object files to build. -# Add the extension to EXTRAOBJS -ne="$NEON_EXTRAOBJS" -NEON_EXTRAOBJS= -for o in $ne; do - NEON_EXTRAOBJS="$NEON_EXTRAOBJS $o.$NEON_OBJEXT" -done - -# Was DAV support explicitly turned off? -if test "x$neon_no_webdav" = "xyes"; then - # No WebDAV support - NEONOBJS="$NEONOBJS \$(NEON_BASEOBJS)" - NE_DISABLE_SUPPORT(DAV, [WebDAV support is not enabled]) -else - # WebDAV support - NEONOBJS="$NEONOBJS \$(NEON_DAVOBJS)" - NE_ENABLE_SUPPORT(DAV, [WebDAV support is enabled]) -fi - -AC_SUBST(NEON_TARGET) -AC_SUBST(NEON_OBJEXT) -AC_SUBST(NEONOBJS) -AC_SUBST(NEON_EXTRAOBJS) -AC_SUBST(NEON_LINK_FLAGS) - -]) - -# The libtoolized build case: -AC_DEFUN([NEON_LIBTOOL_BUILD], [ - -NEON_TARGET=libneon.la -NEON_OBJEXT=lo - -NEON_COMMON_BUILD($#, $*) - -]) - -dnl Find 'ar' and 'ranlib', fail if ar isn't found. -AC_DEFUN([NE_FIND_AR], [ - -# Search in /usr/ccs/bin for Solaris -ne_PATH=$PATH:/usr/ccs/bin -AC_PATH_TOOL(AR, ar, notfound, $ne_PATH) -if test "x$AR" = "xnotfound"; then - AC_MSG_ERROR([could not find ar tool]) -fi -AC_PATH_TOOL(RANLIB, ranlib, :, $ne_PATH) - -]) - -# The non-libtool build case: -AC_DEFUN([NEON_NORMAL_BUILD], [ - -NEON_TARGET=libneon.a -NEON_OBJEXT=o - -AC_REQUIRE([NE_FIND_AR]) - -NEON_COMMON_BUILD($#, $*) - -]) - -AC_DEFUN([NE_SNPRINTF], [ -AC_CHECK_FUNCS(snprintf vsnprintf,,[ - ne_save_LIBS=$LIBS - LIBS="$LIBS -lm" # Always need -lm - AC_CHECK_LIB(trio, trio_vsnprintf, - [AC_CHECK_HEADERS(trio.h,, - AC_MSG_ERROR([trio installation problem? libtrio found but not trio.h])) - AC_MSG_NOTICE(using trio printf replacement library) - NEON_LIBS="$NEON_LIBS -ltrio -lm" - AC_DEFINE(HAVE_TRIO, 1, [Use trio printf replacement library])], - [AC_MSG_NOTICE([no vsnprintf/snprintf detected in C library]) - AC_MSG_ERROR([Install the trio library from http://daniel.haxx.se/projects/trio/])]) - LIBS=$ne_save_LIBS - break -])]) - -dnl Usage: NE_CHECK_OPENSSLVER(variable, version-string, version-hex) -dnl Define 'variable' to 'yes' if OpenSSL version is >= version-hex -AC_DEFUN([NE_CHECK_OPENSSLVER], [ -AC_CACHE_CHECK([OpenSSL version is >= $2], $1, [ -AC_EGREP_CPP(good, [#include -#if OPENSSL_VERSION_NUMBER >= $3 -good -#endif], [$1=yes], [$1=no])])]) - -dnl Less noisy replacement for PKG_CHECK_MODULES -AC_DEFUN([NE_PKG_CONFIG], [ - -AC_PATH_PROG(PKG_CONFIG, pkg-config, no) -if test "$PKG_CONFIG" = "no"; then - : Not using pkg-config - $4 -else - AC_CACHE_CHECK([for $2 pkg-config data], ne_cv_pkg_$2, - [if $PKG_CONFIG $2; then - ne_cv_pkg_$2=yes - else - ne_cv_pkg_$2=no - fi]) - - if test "$ne_cv_pkg_$2" = "yes"; then - $1_CFLAGS=`$PKG_CONFIG --cflags $2` - $1_LIBS=`$PKG_CONFIG --libs $2` - : Using provided pkg-config data - $3 - else - : No pkg-config for $2 provided - $4 - fi -fi]) - -dnl Check for an SSL library (GNU TLS or OpenSSL) -AC_DEFUN([NEON_SSL], [ - -AC_ARG_WITH(ssl, - AS_HELP_STRING([--with-ssl=openssl|gnutls], - [enable SSL support (default OpenSSL)])) - -AC_ARG_WITH(egd, -[[ --with-egd[=PATH] enable EGD support [using EGD socket at PATH]]]) - -case $with_ssl in -/*) - AC_MSG_NOTICE([to use SSL libraries in non-standard locations, try --with-ssl --with-libs=$with_ssl]) - AC_MSG_ERROR([--with-ssl does not take a path argument]) - ;; -yes|openssl) - NE_PKG_CONFIG(NE_SSL, openssl, - [AC_MSG_NOTICE(using SSL library configuration from pkg-config) - CPPFLAGS="$CPPFLAGS ${NE_SSL_CFLAGS}" - NEON_LIBS="$NEON_LIBS ${NE_SSL_LIBS}"], - [# Either OpenSSL library may require -ldl if built with dynamic engine support - NE_SEARCH_LIBS(RSA_new, crypto, -ldl) - NE_SEARCH_LIBS(SSL_library_init, ssl, -ldl)]) - - AC_CHECK_HEADERS(openssl/ssl.h openssl/opensslv.h,, - [AC_MSG_ERROR([OpenSSL headers not found, cannot enable SSL support])]) - - # Enable EGD support if using 0.9.7 or newer - NE_CHECK_OPENSSLVER(ne_cv_lib_ssl097, 0.9.7, 0x00907000L) - if test "$ne_cv_lib_ssl097" = "yes"; then - AC_MSG_NOTICE([OpenSSL >= 0.9.7; EGD support not needed in neon]) - NE_ENABLE_SUPPORT(SSL, [SSL support enabled, using OpenSSL (0.9.7 or later)]) - NE_CHECK_FUNCS(CRYPTO_set_idptr_callback) - else - # Fail if OpenSSL is older than 0.9.6 - NE_CHECK_OPENSSLVER(ne_cv_lib_ssl096, 0.9.6, 0x00906000L) - if test "$ne_cv_lib_ssl096" != "yes"; then - AC_MSG_ERROR([OpenSSL 0.9.6 or later is required]) - fi - NE_ENABLE_SUPPORT(SSL, [SSL support enabled, using OpenSSL (0.9.6 or later)]) - - case "$with_egd" in - yes|no) ne_cv_lib_sslegd=$with_egd ;; - /*) ne_cv_lib_sslegd=yes - AC_DEFINE_UNQUOTED([EGD_PATH], "$with_egd", - [Define to specific EGD socket path]) ;; - *) # Guess whether EGD support is needed - AC_CACHE_CHECK([whether to enable EGD support], [ne_cv_lib_sslegd], - [if test -r /dev/random || test -r /dev/urandom; then - ne_cv_lib_sslegd=no - else - ne_cv_lib_sslegd=yes - fi]) - ;; - esac - if test "$ne_cv_lib_sslegd" = "yes"; then - AC_MSG_NOTICE([EGD support enabled for seeding OpenSSL PRNG]) - AC_DEFINE([ENABLE_EGD], 1, [Define if EGD should be supported]) - fi - fi - - AC_DEFINE([HAVE_OPENSSL], 1, [Define if OpenSSL support is enabled]) - NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_openssl" - ;; -gnutls) - AC_PATH_PROG(GNUTLS_CONFIG, libgnutls-config, no) - - if test "$GNUTLS_CONFIG" = "no"; then - AC_MSG_ERROR([could not find libgnutls-config in \$PATH]) - fi - - ne_gnutls_ver=`$GNUTLS_CONFIG --version` - case $ne_gnutls_ver in - 1.0.?|1.0.1?|1.0.20|1.0.21) - AC_MSG_ERROR([GNU TLS version $ne_gnutls_ver is too old -- 1.0.22 or later required]) - ;; - esac - - CPPFLAGS="$CPPFLAGS `$GNUTLS_CONFIG --cflags`" - - AC_CHECK_HEADER([gnutls/gnutls.h],, - [AC_MSG_ERROR([could not find gnutls/gnutls.h in include path])]) - - NE_ENABLE_SUPPORT(SSL, [SSL support enabled, using GnuTLS $ne_gnutls_ver]) - NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_gnutls" - NEON_LIBS="$NEON_LIBS `$GNUTLS_CONFIG --libs`" - AC_DEFINE([HAVE_GNUTLS], 1, [Define if GnuTLS support is enabled]) - - # Check for functions in later releases - NE_CHECK_FUNCS(gnutls_session_get_data2 gnutls_x509_dn_get_rdn_ava) - - # Check for iconv support if using the new RDN access functions: - if test ${ac_cv_func_gnutls_x509_dn_get_rdn_ava}X${ac_cv_header_iconv_h} = yesXyes; then - AC_CHECK_FUNCS(iconv) - fi - ;; -*) # Default to off; only create crypto-enabled binaries if requested. - NE_DISABLE_SUPPORT(SSL, [SSL support is not enabled]) - NE_DISABLE_SUPPORT(TS_SSL, [Thread-safe SSL support is not enabled]) - NEON_EXTRAOBJS="$NEON_EXTRAOBJS ne_stubssl" - ;; -esac -AC_SUBST(NEON_SUPPORTS_SSL) - -AC_ARG_WITH(ca-bundle, - AS_HELP_STRING(--with-ca-bundle, specify filename of an SSL CA root bundle),, - with_ca_bundle=no) - -case ${NE_FLAG_SSL}-${with_ca_bundle} in -*-no) ;; -yes-*) - AC_DEFINE_UNQUOTED([NE_SSL_CA_BUNDLE], ["${with_ca_bundle}"], - [Define to be filename of an SSL CA root bundle]) - AC_MSG_NOTICE([Using ${with_ca_bundle} as default SSL CA bundle]) - ;; -esac - -AC_ARG_ENABLE(threadsafe-ssl, -AS_HELP_STRING(--enable-threadsafe-ssl=posix, -[enable SSL library thread-safety using POSIX threads: suitable -CC/CFLAGS/LIBS must be used to make the POSIX library interfaces -available]),, -enable_threadsafe_ssl=no) - -case $enable_threadsafe_ssl in -posix|yes) - ne_pthr_ok=yes - AC_CHECK_FUNCS([pthread_mutex_init pthread_mutex_lock],,[ne_pthr_ok=no]) - if test "${ne_pthr_ok}" = "no"; then - AC_MSG_ERROR([could not find POSIX mutex interfaces; (try CC="${CC} -pthread"?)]) - fi - NE_ENABLE_SUPPORT(TS_SSL, [Thread-safe SSL supported using POSIX threads]) - ;; -*) - NE_DISABLE_SUPPORT(TS_SSL, [Thread-safe SSL not supported]) - ;; -esac - -]) - -dnl Check for Kerberos installation -AC_DEFUN([NEON_GSSAPI], [ -AC_ARG_WITH(gssapi, AS_HELP_STRING(--without-gssapi, disable GSSAPI support)) -if test "$with_gssapi" != "no"; then - AC_PATH_PROG([KRB5_CONFIG], krb5-config, none, $PATH:/usr/kerberos/bin) -else - KRB5_CONFIG=none -fi -if test "x$KRB5_CONFIG" != "xnone"; then - ne_save_CPPFLAGS=$CPPFLAGS - ne_save_LIBS=$NEON_LIBS - NEON_LIBS="$NEON_LIBS `${KRB5_CONFIG} --libs gssapi`" - CPPFLAGS="$CPPFLAGS `${KRB5_CONFIG} --cflags gssapi`" - # MIT and Heimdal put gssapi.h in different places - AC_CHECK_HEADERS(gssapi/gssapi.h gssapi.h, [ - NE_CHECK_FUNCS(gss_init_sec_context, [ - ne_save_CPPFLAGS=$CPPFLAGS - ne_save_LIBS=$NEON_LIBS - AC_MSG_NOTICE([GSSAPI authentication support enabled]) - AC_DEFINE(HAVE_GSSAPI, 1, [Define if GSSAPI support is enabled]) - AC_CHECK_HEADERS(gssapi/gssapi_generic.h) - # Older versions of MIT Kerberos lack GSS_C_NT_HOSTBASED_SERVICE - AC_CHECK_DECL([GSS_C_NT_HOSTBASED_SERVICE],, - [AC_DEFINE([GSS_C_NT_HOSTBASED_SERVICE], gss_nt_service_name, - [Define if GSS_C_NT_HOSTBASED_SERVICE is not defined otherwise])], - [#ifdef HAVE_GSSAPI_GSSAPI_H -#include -#else -#include -#endif])]) - break - ]) - CPPFLAGS=$ne_save_CPPFLAGS - NEON_LIBS=$ne_save_LIBS -fi]) - -dnl Adds an --enable-warnings argument to configure to allow enabling -dnl compiler warnings -AC_DEFUN([NEON_WARNINGS],[ - -AC_REQUIRE([AC_PROG_CC]) dnl so that $GCC is set - -AC_ARG_ENABLE(warnings, -AS_HELP_STRING(--enable-warnings, [enable compiler warnings])) - -if test "$enable_warnings" = "yes"; then - case $GCC:`uname` in - yes:*) - CFLAGS="$CFLAGS -Wall -Wmissing-declarations -Wshadow -Wreturn-type -Wsign-compare -Wundef -Wpointer-arith -Wbad-function-cast -Wformat-security" - if test -z "$with_ssl" -o "$with_ssl" = "no"; then - # OpenSSL headers fail strict prototypes checks - CFLAGS="$CFLAGS -Wstrict-prototypes" - fi - ;; - no:OSF1) CFLAGS="$CFLAGS -check -msg_disable returnchecks -msg_disable alignment -msg_disable overflow" ;; - no:IRIX) CFLAGS="$CFLAGS -fullwarn" ;; - no:UnixWare) CFLAGS="$CFLAGS -v" ;; - *) AC_MSG_WARN([warning flags unknown for compiler on this platform]) ;; - esac -fi -]) - -dnl Adds an --disable-debug argument to configure to allow disabling -dnl debugging messages. -dnl Usage: -dnl NEON_WARNINGS([actions-if-debug-enabled], [actions-if-debug-disabled]) -dnl -AC_DEFUN([NEON_DEBUG], [ - -AC_ARG_ENABLE(debug, -AS_HELP_STRING(--disable-debug,[disable runtime debugging messages])) - -# default is to enable debugging -case $enable_debug in -no) AC_MSG_NOTICE([debugging is disabled]) -$2 ;; -*) AC_MSG_NOTICE([debugging is enabled]) -AC_DEFINE(NE_DEBUGGING, 1, [Define to enable debugging]) -$1 -;; -esac]) - -dnl Macro to optionally enable socks support -AC_DEFUN([NEON_SOCKS], [ - -AC_ARG_WITH([socks], AS_HELP_STRING([--with-socks],[use SOCKSv5 library])) - -if test "$with_socks" = "yes"; then - ne_save_LIBS=$LIBS - - AC_CHECK_HEADERS(socks.h, - [AC_CHECK_LIB(socks5, connect, [:], - [AC_MSG_ERROR([could not find libsocks5 for SOCKS support])])], - [AC_MSG_ERROR([could not find socks.h for SOCKS support])]) - - NE_ENABLE_SUPPORT(SOCKS, [SOCKSv5 support is enabled]) - NEON_LIBS="$NEON_LIBS -lsocks5" - LIBS=$ne_save_LIBS -else - NE_DISABLE_SUPPORT(SOCKS, [SOCKSv5 support is not enabled]) -fi]) - -AC_DEFUN([NEON_WITH_LIBS], [ -AC_ARG_WITH([libs], -[[ --with-libs=DIR[:DIR2...] look for support libraries in DIR/{bin,lib,include}]], -[case $with_libs in -yes|no) AC_MSG_ERROR([--with-libs must be passed a directory argument]) ;; -*) ne_save_IFS=$IFS; IFS=: - for dir in $with_libs; do - ne_add_CPPFLAGS="$ne_add_CPPFLAGS -I${dir}/include" - ne_add_LDFLAGS="$ne_add_LDFLAGS -L${dir}/lib" - ne_add_PATH="${ne_add_PATH}${dir}/bin:" - done - IFS=$ne_save_IFS - CPPFLAGS="${ne_add_CPPFLAGS} $CPPFLAGS" - LDFLAGS="${ne_add_LDFLAGS} $LDFLAGS" - PATH=${ne_add_PATH}$PATH ;; -esac])]) - -AC_DEFUN([NEON_I18N], [ - -dnl Check for NLS iff libintl.h was detected. -AC_ARG_ENABLE(nls, - AS_HELP_STRING(--disable-nls, [disable internationalization support]),, - [enable_nls=${ac_cv_header_libintl_h}]) - -if test x${enable_nls} = xyes; then - # presume that dgettext() is available if bindtextdomain() is... - # checking for dgettext() itself is awkward because gcc has a - # builtin of that function, which confuses AC_CHECK_FUNCS et al. - NE_SEARCH_LIBS(bindtextdomain, intl,,[enable_nls=no]) - NE_CHECK_FUNCS(bind_textdomain_codeset) -fi - -if test "$enable_nls" = "no"; then - NE_DISABLE_SUPPORT(I18N, [Internationalization support not enabled]) -else - NE_ENABLE_SUPPORT(I18N, [Internationalization support enabled]) - eval localedir="${datadir}/locale" - AC_DEFINE_UNQUOTED([LOCALEDIR], "$localedir", - [Define to be location of localedir]) -fi - -]) diff --git a/client/neon-0.27.2/macros/socklen-arg-type.m4 b/client/neon-0.27.2/macros/socklen-arg-type.m4 deleted file mode 100644 index 2d84ac445..000000000 --- a/client/neon-0.27.2/macros/socklen-arg-type.m4 +++ /dev/null @@ -1,43 +0,0 @@ -dnl This function is (C) 1997,98,99 Stephan Kulow (coolo@kde.org) -dnl Modifications (C) Joe Orton 1999,2000 - -AC_DEFUN([SOCKLEN_ARG_TYPE],[ - -dnl Check for the type of the third argument of getsockname -AC_MSG_CHECKING(for the third argument of getsockname) -AC_CACHE_VAL(ac_cv_ksize_t, -[AC_TRY_COMPILE([ -#include -#include -],[ -socklen_t a=0; -getsockname(0,(struct sockaddr*)0, &a); -], -ac_cv_ksize_t=socklen_t, -ac_cv_ksize_t=) -if test -z "$ac_cv_ksize_t"; then -ac_safe_cflags="$CFLAGS" -if test "$GCC" = "yes"; then - CFLAGS="-Werror $CFLAGS" -fi -AC_TRY_COMPILE([ -#include -#include -],[ -int a=0; -getsockname(0,(struct sockaddr*)0, &a); -], -ac_cv_ksize_t=int, -ac_cv_ksize_t=size_t) -CFLAGS="$ac_safe_cflags" -fi -]) - -if test -z "$ac_cv_ksize_t"; then - ac_cv_ksize_t=int -fi - -AC_MSG_RESULT($ac_cv_ksize_t) -AC_DEFINE_UNQUOTED(ksize_t, $ac_cv_ksize_t, [Define to be the type of the third argument to getsockname]) - -]) \ No newline at end of file diff --git a/client/neon-0.27.2/neon-config.in b/client/neon-0.27.2/neon-config.in deleted file mode 100644 index 34751223a..000000000 --- a/client/neon-0.27.2/neon-config.in +++ /dev/null @@ -1,110 +0,0 @@ -#! /bin/sh -# Originally from libxml, Copyright (C) Daniel Veillard -# Modifications for neon Copyright (C) 2000-2006 Joe Orton. - -prefix=@prefix@ -exec_prefix=@exec_prefix@ -includedir=@includedir@ -libdir=@libdir@ - -usage() -{ - cat <&2 - ;; - esac - shift -done - -exit 0 diff --git a/client/neon-0.27.2/neon.mak b/client/neon-0.27.2/neon.mak deleted file mode 100644 index d77b2a948..000000000 --- a/client/neon-0.27.2/neon.mak +++ /dev/null @@ -1,250 +0,0 @@ -#**** neon Win32 -*- Makefile -*- ******************************************** -# -# Define DEBUG_BUILD to create a debug version of the library. - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -######## -# Debug vs. Release build -!IF "$(DEBUG_BUILD)" == "" -INTDIR = Release -CFLAGS = /MD /W3 /GX /O2 /D "NDEBUG" -TARGET = .\libneon.lib -!ELSE -INTDIR = Debug -CFLAGS = /MDd /W3 /Gm /GX /Zi /Od /D "_DEBUG" -TARGET = .\libneonD.lib -!ENDIF - -######## -# Whether to build SSPI -!IF "$(SSPI_BUILD)" != "" -CFLAGS = $(CFLAGS) /D HAVE_SSPI -!ENDIF - -######## -# Support for Expat integration -# -# If EXPAT_SRC or EXPAT_INC are set, then assume compiling against a -# pre-built binary Expat 1.95.X. You can use either EXPAT_SRC -# to specify the top-level Expat directory, or EXPAT_INC to directly -# specify the Expat include directory. (If both are set, EXPAT_SRC -# is ignored). -# -# If EXPAT_SRC and EXPAT_INC are not set, then the user can -# still set EXPAT_FLAGS to specify very specific compile behavior. -# -# If none of EXPAT_SRC, EXPAT_INC and EXPAT_FLAGS are set, disable -# WebDAV support. - -!IF "$(EXPAT_INC)" == "" -!IF "$(EXPAT_SRC)" != "" -EXPAT_INC = $(EXPAT_SRC)\Source\Lib -!ENDIF -!ENDIF - -BUILD_EXPAT = 1 -!IF "$(EXPAT_INC)" == "" -!IFNDEF EXPAT_FLAGS -EXPAT_FLAGS = -BUILD_EXPAT = -!ENDIF -!ELSE -EXPAT_FLAGS = /I "$(EXPAT_INC)" /D HAVE_EXPAT /D HAVE_EXPAT_H /D NE_HAVE_DAV -!ENDIF - -######## -# Support for OpenSSL integration -!IF "$(OPENSSL_SRC)" == "" -OPENSSL_FLAGS = -!ELSE -OPENSSL_FLAGS = /I "$(OPENSSL_SRC)\inc32" /D NE_HAVE_SSL /D HAVE_OPENSSL -!ENDIF - -######## -# Support for zlib integration -!IF "$(ZLIB_SRC)" == "" -ZLIB_FLAGS = -ZLIB_LIBS = -ZLIB_CLEAN = -!ELSE -ZLIB_CLEAN = ZLIB_CLEAN -!IF "$(DEBUG_BUILD)" == "" -ZLIB_STATICLIB = zlib.lib -ZLIB_SHAREDLIB = zlib1.dll -ZLIB_IMPLIB = zdll.lib -ZLIB_LDFLAGS = /nologo /release -!ELSE -ZLIB_STATICLIB = zlib_d.lib -ZLIB_SHAREDLIB = zlib1_d.dll -ZLIB_IMPLIB = zdll_d.lib -ZLIB_LDFLAGS = /nologo /debug -!ENDIF -ZLIB_FLAGS = /I "$(ZLIB_SRC)" /D NE_HAVE_ZLIB -!IF "$(ZLIB_DLL)" == "" -ZLIB_LIBS = "$(ZLIB_SRC)\$(ZLIB_STATICLIB)" -!ELSE -ZLIB_FLAGS = $(ZLIB_FLAGS) /D ZLIB_DLL -ZLIB_LIBS = "$(ZLIB_SRC)\$(ZLIB_IMPLIB)" -!ENDIF -!ENDIF - -######## -# Support for IPv6 -!IF "$(ENABLE_IPV6)" == "yes" -IPV6_FLAGS = /D USE_GETADDRINFO -!ENDIF - - -# Exclude stuff we don't need from the Win32 headers -WIN32_DEFS = /D WIN32_LEAN_AND_MEAN /D NOUSER /D NOGDI /D NONLS /D NOCRYPT - -CPP=cl.exe -CPP_PROJ = /c /nologo $(CFLAGS) $(WIN32_DEFS) $(EXPAT_FLAGS) $(OPENSSL_FLAGS) $(ZLIB_FLAGS) $(IPV6_FLAGS) /D "HAVE_CONFIG_H" /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" -LIB32=link.exe -lib -LIB32_FLAGS=/nologo /out:"$(TARGET)" - -LIB32_OBJS= \ - "$(INTDIR)\ne_alloc.obj" \ - "$(INTDIR)\ne_auth.obj" \ - "$(INTDIR)\ne_basic.obj" \ - "$(INTDIR)\ne_compress.obj" \ - "$(INTDIR)\ne_dates.obj" \ - "$(INTDIR)\ne_i18n.obj" \ - "$(INTDIR)\ne_md5.obj" \ - "$(INTDIR)\ne_redirect.obj" \ - "$(INTDIR)\ne_request.obj" \ - "$(INTDIR)\ne_session.obj" \ - "$(INTDIR)\ne_socket.obj" \ - "$(INTDIR)\ne_sspi.obj" \ - "$(INTDIR)\ne_string.obj" \ - "$(INTDIR)\ne_uri.obj" \ - "$(INTDIR)\ne_utils.obj" - -!IF "$(BUILD_EXPAT)" != "" -LIB32_OBJS= \ - $(LIB32_OBJS) \ - "$(INTDIR)\ne_207.obj" \ - "$(INTDIR)\ne_xml.obj" \ - "$(INTDIR)\ne_xmlreq.obj" \ - "$(INTDIR)\ne_acl.obj" \ - "$(INTDIR)\ne_props.obj" \ - "$(INTDIR)\ne_locks.obj" -!ENDIF - - -!IF "$(OPENSSL_SRC)" != "" -LIB32_OBJS = $(LIB32_OBJS) "$(INTDIR)\ne_openssl.obj" -!IFDEF OPENSSL_STATIC -LIB32_OBJS = $(LIB32_OBJS) "$(OPENSSL_SRC)\out32\libeay32.lib" \ - "$(OPENSSL_SRC)\out32\ssleay32.lib" -!ELSE -LIB32_OBJS = $(LIB32_OBJS) "$(OPENSSL_SRC)\out32dll\libeay32.lib" \ - "$(OPENSSL_SRC)\out32dll\ssleay32.lib" -!ENDIF -!ELSE -# Provide ABI-compatibility stubs for SSL interface -LIB32_OBJS = $(LIB32_OBJS) "$(INTDIR)\ne_stubssl.obj" -!ENDIF -!IF "$(ZLIB_SRC)" != "" -LIB32_OBJS = $(LIB32_OBJS) $(ZLIB_LIBS) -!ENDIF - - -ALL: ".\src\config.h" "$(TARGET)" - -CLEAN: $(ZLIB_CLEAN) - -@erase "$(INTDIR)\ne_207.obj" - -@erase "$(INTDIR)\ne_alloc.obj" - -@erase "$(INTDIR)\ne_acl.obj" - -@erase "$(INTDIR)\ne_auth.obj" - -@erase "$(INTDIR)\ne_basic.obj" - -@erase "$(INTDIR)\ne_compress.obj" - -@erase "$(INTDIR)\ne_dates.obj" - -@erase "$(INTDIR)\ne_i18n.obj" - -@erase "$(INTDIR)\ne_locks.obj" - -@erase "$(INTDIR)\ne_md5.obj" - -@erase "$(INTDIR)\ne_props.obj" - -@erase "$(INTDIR)\ne_redirect.obj" - -@erase "$(INTDIR)\ne_request.obj" - -@erase "$(INTDIR)\ne_session.obj" - -@erase "$(INTDIR)\ne_openssl.obj" - -@erase "$(INTDIR)\ne_stubssl.obj" - -@erase "$(INTDIR)\ne_socket.obj" - -@erase "$(INTDIR)\ne_sspi.obj" - -@erase "$(INTDIR)\ne_string.obj" - -@erase "$(INTDIR)\ne_uri.obj" - -@erase "$(INTDIR)\ne_utils.obj" - -@erase "$(INTDIR)\ne_xml.obj" - -@erase "$(INTDIR)\ne_xmlreq.obj" - -@erase "$(TARGET)" - -@erase ".\src\config.h" - -"$(TARGET)": $(DEF_FILE) $(LIB32_OBJS) - -@if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" - $(LIB32) @<< - $(LIB32_FLAGS) $(DEF_FLAGS) $(LIB32_OBJS) -<< - -{src}.c{$(INTDIR)}.obj:: - -@if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" - $(CPP) @<< - $(CPP_PROJ) $< -<< - -".\src\config.h": config.hw - -@if not exist "$(INTDIR)/$(NULL)" mkdir "$(INTDIR)" - < nul - echo Created config.h from config.hw -<< - -"$(INTDIR)\ne_207.obj": .\src\ne_207.c -"$(INTDIR)\ne_alloc.obj": .\src\ne_alloc.c -"$(INTDIR)\ne_acl.obj": .\src\ne_acl.c -"$(INTDIR)\ne_auth.obj": .\src\ne_auth.c -"$(INTDIR)\ne_basic.obj": .\src\ne_basic.c -"$(INTDIR)\ne_compress.obj": .\src\ne_compress.c -"$(INTDIR)\ne_dates.obj": .\src\ne_dates.c -"$(INTDIR)\ne_i18n.obj": .\src\ne_i18n.c -"$(INTDIR)\ne_locks.obj": .\src\ne_locks.c -"$(INTDIR)\ne_md5.obj": .\src\ne_md5.c -"$(INTDIR)\ne_props.obj": .\src\ne_props.c -"$(INTDIR)\ne_redirect.obj": .\src\ne_redirect.c -"$(INTDIR)\ne_request.obj": .\src\ne_request.c -"$(INTDIR)\ne_session.obj": .\src\ne_session.c -"$(INTDIR)\ne_openssl.obj": .\src\ne_openssl.c -"$(INTDIR)\ne_stubssl.obj": .\src\ne_stubssl.c -"$(INTDIR)\ne_socket.obj": .\src\ne_socket.c -"$(INTDIR)\ne_sspi.obj": .\src\ne_sspi.c -"$(INTDIR)\ne_string.obj": .\src\ne_string.c -"$(INTDIR)\ne_uri.obj": .\src\ne_uri.c -"$(INTDIR)\ne_utils.obj": .\src\ne_utils.c -"$(INTDIR)\ne_xml.obj": .\src\ne_xml.c -"$(INTDIR)\ne_xmlreq.obj": .\src\ne_xmlreq.c - -"$(ZLIB_SRC)\$(ZLIB_STATICLIB)": - <=*vq1EBL;0&%AnrH@ z{4Ed}K3=s?r42`T1^|x3V7?cLWtrS#?8C;8s@{1Hej?2tTSAe@BBQ-H4wWyfEBfq!=94=}3rFkg~o_S@7 zIhiR69w8wC3P`R}$jpOrQ*%;tQ}ap`5=+4DRZvY)$WMbCY{eCf@QXruVlmheKACwS zSLG|@1)Bme?T}uSS)89%qL*A{$K{il zmtLBfo~j#?nwV>)kX*&(>*?!?@Ry;U0he=rUP)?RiEc<`L8_HPNoqxjenC!RW}dY| zat0`&mDpw$=j&Qnm|E%@Arylgk(OGd>zbFGpOTrEZlz$6lv%>X;Fp?Hm8wvjs!;GF zvmie!vqT{qC5e|}RRKxjFuAINqQvC, 2000-2002. -# -msgid "" -msgstr "" -"Project-Id-Version: sitecopy 0.11.4\n" -"Report-Msgid-Bugs-To: neon@webdav.org\n" -"POT-Creation-Date: 2007-09-25 10:21+0100\n" -"PO-Revision-Date: 2002-04-09 11:12+0100\n" -"Last-Translator: Petr Prazak \n" -"Language-Team: cz\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-2\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/ne_207.c:198 -#, c-format -msgid "" -"Invalid HTTP status line in status element at line %d of response:\n" -"Status line was: %s" -msgstr "" -"Neplatn dka HTTP stavu ve stavovm prvku na dku %d odpovdi:\n" -"Stavov dka byla: %s" - -# src/console_fe.c:961 -#: src/ne_auth.c:130 -#, fuzzy, c-format -msgid "Could not authenticate to server: %s" -msgstr "Nelze se pipojit k serveru" - -# src/console_fe.c:961 -#: src/ne_auth.c:135 -#, fuzzy, c-format -msgid "Could not authenticate to proxy server: %s" -msgstr "Nelze se pipojit k proxy serveru" - -#: src/ne_auth.c:342 -#, c-format -msgid "rejected %s challenge" -msgstr "" - -#: src/ne_auth.c:358 -msgid "missing realm in Basic challenge" -msgstr "" - -#: src/ne_auth.c:453 -msgid "invalid Negotiate token" -msgstr "" - -#: src/ne_auth.c:476 -#, fuzzy -msgid "GSSAPI authentication error: " -msgstr "Je vyadovna autentizace na %s `%s':\n" - -#: src/ne_auth.c:489 -#, c-format -msgid "GSSAPI failure (code %u)" -msgstr "" - -#: src/ne_auth.c:524 -msgid "ignoring empty Negotiate continuation" -msgstr "" - -#: src/ne_auth.c:539 -#, c-format -msgid "Negotiate response verification failed: invalid response header token" -msgstr "" - -#: src/ne_auth.c:561 -#, c-format -msgid "Negotiate response verification failure: %s" -msgstr "" - -#: src/ne_auth.c:624 -msgid "unknown algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:628 -msgid "incompatible algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:632 -msgid "missing parameter in Digest challenge" -msgstr "" - -#: src/ne_auth.c:636 -msgid "initial Digest challenge was stale" -msgstr "" - -#: src/ne_auth.c:643 -msgid "stale Digest challenge with new algorithm or realm" -msgstr "" - -#: src/ne_auth.c:921 -#, c-format -msgid "Digest mutual authentication failure: missing parameters" -msgstr "" - -#: src/ne_auth.c:926 -#, c-format -msgid "Digest mutual authentication failure: client nonce mismatch" -msgstr "" - -#: src/ne_auth.c:936 -#, c-format -msgid "Digest mutual authentication failure: could not parse nonce count" -msgstr "" - -#: src/ne_auth.c:941 -#, c-format -msgid "Digest mutual authentication failure: nonce count mismatch (%u not %u)" -msgstr "" - -#: src/ne_auth.c:984 -#, c-format -msgid "Digest mutual authentication failure: request-digest mismatch" -msgstr "" - -#: src/ne_auth.c:1069 -msgid ", " -msgstr "" - -#: src/ne_auth.c:1110 -#, c-format -msgid "ignored %s challenge" -msgstr "" - -#: src/ne_auth.c:1186 -#, fuzzy -msgid "could not parse challenge" -msgstr "Nelze zpracovat velikost bloku" - -# src/console_fe.c:992 -#: src/ne_basic.c:94 -#, fuzzy, c-format -msgid "Could not determine file size: %s" -msgstr "Nelze zjistit dlku souboru: %s" - -#: src/ne_basic.c:145 -#, c-format -msgid "Response did not include requested range" -msgstr "" - -#: src/ne_basic.c:179 -#, fuzzy, c-format -msgid "Range is not satisfiable" -msgstr "Rozsah nen uspokojiv." - -#: src/ne_basic.c:184 -#, fuzzy, c-format -msgid "Resource does not support ranged GET requests" -msgstr "Server nedovoluje sten pkazy GET." - -#: src/ne_compress.c:173 -#, fuzzy, c-format -msgid "%s: %s" -msgstr "%s: Chyba: %s\n" - -#: src/ne_compress.c:184 -#, c-format -msgid "%s: %s (code %d)" -msgstr "" - -# src/console_fe.c:992 -#: src/ne_compress.c:232 -#, fuzzy -msgid "Could not inflate data" -msgstr "Nelze otevt soubor: " - -# src/console_fe.c:992 -#: src/ne_compress.c:293 -#, fuzzy -msgid "Could not initialize zlib" -msgstr "Nelze otevt soubor: " - -#: src/ne_gnutls.c:162 -#, c-format -msgid "[unprintable:#%lu]" -msgstr "" - -#: src/ne_gnutls.c:188 -msgid "[unprintable]" -msgstr "" - -#: src/ne_gnutls.c:685 src/ne_openssl.c:419 -#, c-format -msgid "Server certificate was missing commonName attribute in subject name" -msgstr "" - -# src/console_fe.c:992 -#: src/ne_gnutls.c:721 src/ne_openssl.c:632 -#, fuzzy, c-format -msgid "SSL negotiation failed: %s" -msgstr "Nelze zapsat do souboru: %s" - -#: src/ne_gnutls.c:730 -#, c-format -msgid "Server did not send certificate chain" -msgstr "" - -#: src/ne_locks.c:584 -msgid "LOCK response missing Lock-Token header" -msgstr "" - -#: src/ne_locks.c:759 -#, c-format -msgid "Response missing activelock for %s" -msgstr "" - -#: src/ne_locks.c:801 -#, c-format -msgid "No activelock for <%s> returned in LOCK refresh response" -msgstr "" - -#: src/ne_openssl.c:451 -#, c-format -msgid "Certificate verification error: %s" -msgstr "" - -#: src/ne_openssl.c:651 -#, c-format -msgid "SSL server did not present certificate" -msgstr "" - -#: src/ne_openssl.c:660 -#, c-format -msgid "Server certificate changed: connection intercepted?" -msgstr "" - -#: src/ne_props.c:371 src/ne_props.c:411 -#, fuzzy -msgid "Response exceeds maximum property count" -msgstr "Odpov pekrocila maximln poet poloek v hlavicce." - -#: src/ne_redirect.c:92 -#, fuzzy, c-format -msgid "Could not parse redirect destination URL" -msgstr "Nelze zpracovat stavov dek odpovdi." - -#: src/ne_request.c:193 -#, fuzzy, c-format -msgid "%s: connection was closed by proxy server" -msgstr "%s: proxy server ukonil spojen." - -#: src/ne_request.c:196 -#, fuzzy, c-format -msgid "%s: connection was closed by server" -msgstr "%s: server ukonil spojen." - -#: src/ne_request.c:201 -#, fuzzy, c-format -msgid "%s: connection timed out" -msgstr "%s: spojen vyprelo." - -#: src/ne_request.c:306 -msgid "offset invalid" -msgstr "" - -# src/console_fe.c:992 -#: src/ne_request.c:311 -#, fuzzy, c-format -msgid "Could not seek to offset %s of request body file: %s" -msgstr "Nelze zapsat do souboru: %s" - -#: src/ne_request.c:359 -msgid "Could not send request body" -msgstr "Nelze odeslat tlo poadavku" - -#: src/ne_request.c:692 -msgid "Could not read chunk size" -msgstr "Nelze nast velikost bloku" - -#: src/ne_request.c:699 -msgid "Could not parse chunk size" -msgstr "Nelze zpracovat velikost bloku" - -#: src/ne_request.c:736 -msgid "Could not read response body" -msgstr "Nelze nast tlo odpovdi" - -#: src/ne_request.c:752 -#, fuzzy -msgid "Could not read chunk delimiter" -msgstr "Nelze nast velikost bloku" - -#: src/ne_request.c:755 -msgid "Chunk delimiter was invalid" -msgstr "" - -#: src/ne_request.c:861 -msgid "Could not read status line" -msgstr "Nelze pest stavov dek" - -#: src/ne_request.c:883 -#, fuzzy -msgid "Could not parse response status line" -msgstr "Nelze zpracovat stavov dek odpovdi." - -#: src/ne_request.c:895 -#, fuzzy -msgid "Could not read interim response headers" -msgstr "Nelze nast tlo odpovdi" - -#: src/ne_request.c:929 -msgid "Could not send request" -msgstr "Nelze poslat poadavek" - -#: src/ne_request.c:977 src/ne_request.c:995 src/ne_request.c:1005 -msgid "Error reading response headers" -msgstr "Chyba pi ten hlaviek odpovdi" - -#: src/ne_request.c:1023 -#, c-format -msgid "Response header too long" -msgstr "Hlavika odpovdi je pli dlouh" - -#: src/ne_request.c:1105 -#, fuzzy -msgid "Response exceeded maximum number of header fields" -msgstr "Odpov pekrocila maximln poet poloek v hlavicce." - -# src/console_fe.c:956 -#: src/ne_request.c:1122 -#, fuzzy, c-format -msgid "Could not resolve hostname `%s': %s" -msgstr "%s: Chyba: Nelze najt adresu vzdlenho potae (%s).\n" - -#: src/ne_request.c:1233 -msgid "Unknown transfer-coding in response" -msgstr "" - -#: src/ne_request.c:1244 -msgid "Invalid Content-Length in response" -msgstr "" - -# src/console_fe.c:992 -#: src/ne_request.c:1317 -#, c-format -msgid "Could not write to file: %s" -msgstr "Nelze zapsat do souboru: %s" - -#: src/ne_request.c:1390 -#, fuzzy, c-format -msgid "Could not create SSL connection through proxy server: %s" -msgstr "Nelze navzat SSL spojen pes proxy server." - -#: src/ne_request.c:1437 -#, fuzzy, c-format -msgid "Could not create socket" -msgstr "Nelze navzat SSL spojen" - -# src/console_fe.c:961 -#: src/ne_request.c:1496 -msgid "Could not connect to proxy server" -msgstr "Nelze se pipojit k proxy serveru" - -# src/console_fe.c:961 -#: src/ne_request.c:1497 -msgid "Could not connect to server" -msgstr "Nelze se pipojit k serveru" - -#: src/ne_session.c:339 src/ne_session.c:350 -msgid "[invalid date]" -msgstr "" - -#: src/ne_session.c:363 -msgid "certificate is not yet valid" -msgstr "" - -#: src/ne_session.c:364 -msgid "certificate has expired" -msgstr "" - -#: src/ne_session.c:365 -msgid "certificate issued for a different hostname" -msgstr "" - -#: src/ne_session.c:366 -msgid "issuer is not trusted" -msgstr "" - -#: src/ne_session.c:371 -msgid "Server certificate verification failed: " -msgstr "" - -#: src/ne_socket.c:501 src/ne_socket.c:555 src/ne_socket.c:658 -#, fuzzy -msgid "Connection closed" -msgstr "Server ukonil spojen." - -#: src/ne_socket.c:565 src/ne_socket.c:670 -#, fuzzy -msgid "Secure connection truncated" -msgstr "Spojen vyprelo." - -#: src/ne_socket.c:577 src/ne_socket.c:682 -#, fuzzy, c-format -msgid "SSL error: %s" -msgstr "%s: Chyba: %s\n" - -#: src/ne_socket.c:580 -#, c-format -msgid "SSL error code %d/%d/%lu" -msgstr "" - -#: src/ne_socket.c:663 -#, fuzzy, c-format -msgid "SSL alert received: %s" -msgstr "%s: Chyba: %s\n" - -#: src/ne_socket.c:678 -msgid "SSL socket read failed" -msgstr "" - -#: src/ne_socket.c:777 -msgid "Line too long" -msgstr "dek je pli dlouh" - -#: src/ne_socket.c:917 src/ne_socket.c:923 -msgid "Host not found" -msgstr "Pota nenalezen" - -#: src/ne_socket.c:1030 -#, fuzzy -msgid "Connection timed out" -msgstr "%s: spojen vyprelo." - -#: src/ne_socket.c:1128 -msgid "Socket descriptor number exceeds FD_SETSIZE" -msgstr "" - -#: src/ne_socket.c:1342 -msgid "Client certificate verification failed" -msgstr "" - -#: src/ne_socket.c:1358 -msgid "SSL disabled due to lack of entropy" -msgstr "" - -#: src/ne_socket.c:1365 -msgid "SSL disabled due to library version mismatch" -msgstr "" - -#: src/ne_socket.c:1371 -#, fuzzy -msgid "Could not create SSL structure" -msgstr "Nelze navzat SSL spojen" - -# src/console_fe.c:821 -#: src/ne_xml.c:280 -#, fuzzy, c-format -msgid "XML parse error at line %d: invalid element name" -msgstr "Chyba zpracovn XML na dku %d: %s." - -# src/common.c:87 -#: src/ne_xml.c:452 -#, fuzzy -msgid "Unknown error" -msgstr "Neznm systmov chyba" - -#: src/ne_xml.c:537 -msgid "Invalid Byte Order Mark" -msgstr "" - -# src/console_fe.c:821 -#: src/ne_xml.c:625 -#, fuzzy, c-format -msgid "XML parse error at line %d: %s" -msgstr "Chyba zpracovn XML na dku %d: %s." - -#: src/ne_xmlreq.c:36 -#, fuzzy, c-format -msgid "Could not parse response: %s" -msgstr "Nelze nast tlo odpovdi" - -# src/console_fe.c:992 -#, fuzzy -#~ msgid " of request body file: %s" -#~ msgstr "Nelze zapsat do souboru: %s" diff --git a/client/neon-0.27.2/po/de.gmo b/client/neon-0.27.2/po/de.gmo deleted file mode 100644 index 86ec7a564131c2a1dc9ab5db96991dbc8db9f526..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1702 zcmca7#4?qEfq{Xafq_AWfq`KP0|SFN0|NsOBS@5iA%l^DL6L!hA(N4TL7IVqp_`F` zL5hKaVL2lMgCqk3!y!h9zB^FypNtF)VhjunB1{nV+ECh^iGe|mfq@~JiGhKSfq|ik ziGd-Efq`Kn69WS;0|UbgCI$ux1_p+2ObiS*j0_C?%nS_r3=9lDEDQ{q3=9l4EDQ|V z3=9m*SQr>I7#J8Xu`n>GFfcIuhKeh&GBBuv)U!g=m9RqeEnsC}FlAt1IK|4qAPn*n z8v{c$$bD=Odkfeg`s&yi7(iZTWnf@n2B`yu0h9*0mkY`UQS2asfq{Vq8gASS3=Eu5 zF_2$4plmh<1_mZ5o54B1G$%zNFTX?~IX^EiHMvBgBwwMRD8Hgop*XduEVT%`3Jke| z#G>LWtrS#?8C;8s@{1Hej?2tTSAe@BBQ-H4 zwWyfEBfq!=94=}3rFkg~o_S@7IhiR69w8wC3P`R}$jpOrQ*%;tQ}ap`5=+4DRZvY) z$WMbCY{eCf@QXruVlmheKACwSSLG|@bV$#w&`U|RNJ}l!bZ%t=*9Ni9}@ zxUv|V+U!(NT64@xD@sgHRnUNDA5Deg83?#e0j3TBOquP_ diff --git a/client/neon-0.27.2/po/de.po b/client/neon-0.27.2/po/de.po deleted file mode 100644 index b6a5f6c19..000000000 --- a/client/neon-0.27.2/po/de.po +++ /dev/null @@ -1,464 +0,0 @@ -# The German translation for sitecopy. -# Thomas Schultz , 2000. -# -msgid "" -msgstr "" -"Project-Id-Version: sitecopy 0.11.3\n" -"Report-Msgid-Bugs-To: neon@webdav.org\n" -"POT-Creation-Date: 2007-09-25 10:21+0100\n" -"PO-Revision-Date: 2002-01-13 13:37+0100\n" -"Last-Translator: Thomas Schultz \n" -"Language-Team: de\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/ne_207.c:198 -#, c-format -msgid "" -"Invalid HTTP status line in status element at line %d of response:\n" -"Status line was: %s" -msgstr "" -"Ungltige HTTP Status-Zeile im Status-Element in Zeile %d der Antwort:\n" -"Status-Zeile war: %s" - -#: src/ne_auth.c:130 -#, fuzzy, c-format -msgid "Could not authenticate to server: %s" -msgstr "Verbindungsaufbau zum Server gescheitert." - -#: src/ne_auth.c:135 -#, fuzzy, c-format -msgid "Could not authenticate to proxy server: %s" -msgstr "Verbindungsaufbau zum Proxy-Server gescheitert." - -#: src/ne_auth.c:342 -#, c-format -msgid "rejected %s challenge" -msgstr "" - -#: src/ne_auth.c:358 -msgid "missing realm in Basic challenge" -msgstr "" - -#: src/ne_auth.c:453 -msgid "invalid Negotiate token" -msgstr "" - -#: src/ne_auth.c:476 -#, fuzzy -msgid "GSSAPI authentication error: " -msgstr "Anmeldung wird bentigt auf %s `%s':\n" - -#: src/ne_auth.c:489 -#, c-format -msgid "GSSAPI failure (code %u)" -msgstr "" - -#: src/ne_auth.c:524 -msgid "ignoring empty Negotiate continuation" -msgstr "" - -#: src/ne_auth.c:539 -#, c-format -msgid "Negotiate response verification failed: invalid response header token" -msgstr "" - -#: src/ne_auth.c:561 -#, c-format -msgid "Negotiate response verification failure: %s" -msgstr "" - -#: src/ne_auth.c:624 -msgid "unknown algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:628 -msgid "incompatible algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:632 -msgid "missing parameter in Digest challenge" -msgstr "" - -#: src/ne_auth.c:636 -msgid "initial Digest challenge was stale" -msgstr "" - -#: src/ne_auth.c:643 -msgid "stale Digest challenge with new algorithm or realm" -msgstr "" - -#: src/ne_auth.c:921 -#, c-format -msgid "Digest mutual authentication failure: missing parameters" -msgstr "" - -#: src/ne_auth.c:926 -#, c-format -msgid "Digest mutual authentication failure: client nonce mismatch" -msgstr "" - -#: src/ne_auth.c:936 -#, c-format -msgid "Digest mutual authentication failure: could not parse nonce count" -msgstr "" - -#: src/ne_auth.c:941 -#, c-format -msgid "Digest mutual authentication failure: nonce count mismatch (%u not %u)" -msgstr "" - -#: src/ne_auth.c:984 -#, c-format -msgid "Digest mutual authentication failure: request-digest mismatch" -msgstr "" - -#: src/ne_auth.c:1069 -msgid ", " -msgstr "" - -#: src/ne_auth.c:1110 -#, c-format -msgid "ignored %s challenge" -msgstr "" - -#: src/ne_auth.c:1186 -#, fuzzy -msgid "could not parse challenge" -msgstr "Parser-Fehler bei Ermittlung der Blockgre" - -#: src/ne_basic.c:94 -#, fuzzy, c-format -msgid "Could not determine file size: %s" -msgstr "Konnte Lnge der Datei nicht herausfinden: %s" - -#: src/ne_basic.c:145 -#, c-format -msgid "Response did not include requested range" -msgstr "" - -#: src/ne_basic.c:179 -#, fuzzy, c-format -msgid "Range is not satisfiable" -msgstr "Range is not satisfiable." - -#: src/ne_basic.c:184 -#, fuzzy, c-format -msgid "Resource does not support ranged GET requests" -msgstr "Server ermglicht keine teilweisen GETs." - -#: src/ne_compress.c:173 -#, fuzzy, c-format -msgid "%s: %s" -msgstr "%s: %s\n" - -#: src/ne_compress.c:184 -#, c-format -msgid "%s: %s (code %d)" -msgstr "" - -#: src/ne_compress.c:232 -#, fuzzy -msgid "Could not inflate data" -msgstr "Konnte Datei nicht ffnen: " - -#: src/ne_compress.c:293 -#, fuzzy -msgid "Could not initialize zlib" -msgstr "Konnte Datei nicht ffnen: " - -#: src/ne_gnutls.c:162 -#, c-format -msgid "[unprintable:#%lu]" -msgstr "" - -#: src/ne_gnutls.c:188 -msgid "[unprintable]" -msgstr "" - -#: src/ne_gnutls.c:685 src/ne_openssl.c:419 -#, c-format -msgid "Server certificate was missing commonName attribute in subject name" -msgstr "" - -#: src/ne_gnutls.c:721 src/ne_openssl.c:632 -#, fuzzy, c-format -msgid "SSL negotiation failed: %s" -msgstr "Konnte nicht in diese Datei schreiben: %s" - -#: src/ne_gnutls.c:730 -#, c-format -msgid "Server did not send certificate chain" -msgstr "" - -#: src/ne_locks.c:584 -msgid "LOCK response missing Lock-Token header" -msgstr "" - -#: src/ne_locks.c:759 -#, c-format -msgid "Response missing activelock for %s" -msgstr "" - -#: src/ne_locks.c:801 -#, c-format -msgid "No activelock for <%s> returned in LOCK refresh response" -msgstr "" - -#: src/ne_openssl.c:451 -#, c-format -msgid "Certificate verification error: %s" -msgstr "" - -#: src/ne_openssl.c:651 -#, c-format -msgid "SSL server did not present certificate" -msgstr "" - -#: src/ne_openssl.c:660 -#, c-format -msgid "Server certificate changed: connection intercepted?" -msgstr "" - -#: src/ne_props.c:371 src/ne_props.c:411 -#, fuzzy -msgid "Response exceeds maximum property count" -msgstr "Antwort hatte zu viele Header-Felder." - -#: src/ne_redirect.c:92 -#, fuzzy, c-format -msgid "Could not parse redirect destination URL" -msgstr "Konnte Status-Zeile des Servers nicht interpretieren." - -#: src/ne_request.c:193 -#, fuzzy, c-format -msgid "%s: connection was closed by proxy server" -msgstr "%s: Verbindung vom Proxy-Server geschlossen." - -#: src/ne_request.c:196 -#, fuzzy, c-format -msgid "%s: connection was closed by server" -msgstr "%s: Verbindung vom Server geschlossen." - -#: src/ne_request.c:201 -#, fuzzy, c-format -msgid "%s: connection timed out" -msgstr "%s: Verbindung wegen Zeitberschreitung geschlossen." - -#: src/ne_request.c:306 -msgid "offset invalid" -msgstr "" - -#: src/ne_request.c:311 -#, fuzzy, c-format -msgid "Could not seek to offset %s of request body file: %s" -msgstr "Konnte nicht in diese Datei schreiben: %s" - -#: src/ne_request.c:359 -msgid "Could not send request body" -msgstr "Konnte den Rumpf der Anfrage nicht schicken" - -#: src/ne_request.c:692 -msgid "Could not read chunk size" -msgstr "Lesefehler bei Ermittlung der Blockgre" - -#: src/ne_request.c:699 -msgid "Could not parse chunk size" -msgstr "Parser-Fehler bei Ermittlung der Blockgre" - -#: src/ne_request.c:736 -msgid "Could not read response body" -msgstr "Konnte Rumpf der Antwort nicht lesen" - -#: src/ne_request.c:752 -#, fuzzy -msgid "Could not read chunk delimiter" -msgstr "Lesefehler bei Ermittlung der Blockgre" - -#: src/ne_request.c:755 -msgid "Chunk delimiter was invalid" -msgstr "" - -#: src/ne_request.c:861 -msgid "Could not read status line" -msgstr "Konnte Status-Zeile des Servers nicht lesen" - -#: src/ne_request.c:883 -#, fuzzy -msgid "Could not parse response status line" -msgstr "Konnte Status-Zeile des Servers nicht interpretieren." - -#: src/ne_request.c:895 -#, fuzzy -msgid "Could not read interim response headers" -msgstr "Konnte Rumpf der Antwort nicht lesen" - -#: src/ne_request.c:929 -msgid "Could not send request" -msgstr "Konnte keine Anfrage (request) schicken" - -#: src/ne_request.c:977 src/ne_request.c:995 src/ne_request.c:1005 -msgid "Error reading response headers" -msgstr "Fehler beim Lesen der Kopfzeilen (header) der Antwort" - -#: src/ne_request.c:1023 -#, c-format -msgid "Response header too long" -msgstr "Kopfzeilen (header) der Antwort zu lang" - -#: src/ne_request.c:1105 -#, fuzzy -msgid "Response exceeded maximum number of header fields" -msgstr "Antwort hatte zu viele Header-Felder." - -#: src/ne_request.c:1122 -#, fuzzy, c-format -msgid "Could not resolve hostname `%s': %s" -msgstr "%s: Fehler: Konnte den Namen des Servers nicht auflsen (%s).\n" - -#: src/ne_request.c:1233 -msgid "Unknown transfer-coding in response" -msgstr "" - -#: src/ne_request.c:1244 -msgid "Invalid Content-Length in response" -msgstr "" - -#: src/ne_request.c:1317 -#, c-format -msgid "Could not write to file: %s" -msgstr "Konnte nicht in diese Datei schreiben: %s" - -#: src/ne_request.c:1390 -#, fuzzy, c-format -msgid "Could not create SSL connection through proxy server: %s" -msgstr "Konnte durch den Proxy-Server keine SSL-Verbindung herstellen" - -#: src/ne_request.c:1437 -#, fuzzy, c-format -msgid "Could not create socket" -msgstr "Konnte keine SSL-Sitzung herstellen" - -#: src/ne_request.c:1496 -msgid "Could not connect to proxy server" -msgstr "Verbindungsaufbau zum Proxy-Server gescheitert." - -#: src/ne_request.c:1497 -msgid "Could not connect to server" -msgstr "Verbindungsaufbau zum Server gescheitert." - -#: src/ne_session.c:339 src/ne_session.c:350 -msgid "[invalid date]" -msgstr "" - -#: src/ne_session.c:363 -msgid "certificate is not yet valid" -msgstr "" - -#: src/ne_session.c:364 -msgid "certificate has expired" -msgstr "" - -#: src/ne_session.c:365 -msgid "certificate issued for a different hostname" -msgstr "" - -#: src/ne_session.c:366 -msgid "issuer is not trusted" -msgstr "" - -#: src/ne_session.c:371 -msgid "Server certificate verification failed: " -msgstr "" - -#: src/ne_socket.c:501 src/ne_socket.c:555 src/ne_socket.c:658 -#, fuzzy -msgid "Connection closed" -msgstr "Verbindung vom Server geschlossen" - -#: src/ne_socket.c:565 src/ne_socket.c:670 -#, fuzzy -msgid "Secure connection truncated" -msgstr "Verbindung wegen Zeitberschreitung abgebrochen." - -#: src/ne_socket.c:577 src/ne_socket.c:682 -#, fuzzy, c-format -msgid "SSL error: %s" -msgstr "%s: Fehler: %s\n" - -#: src/ne_socket.c:580 -#, c-format -msgid "SSL error code %d/%d/%lu" -msgstr "" - -#: src/ne_socket.c:663 -#, fuzzy, c-format -msgid "SSL alert received: %s" -msgstr "%s: Fehler: %s\n" - -#: src/ne_socket.c:678 -msgid "SSL socket read failed" -msgstr "" - -#: src/ne_socket.c:777 -msgid "Line too long" -msgstr "Zeile zu lang" - -#: src/ne_socket.c:917 src/ne_socket.c:923 -msgid "Host not found" -msgstr "Host nicht gefunden" - -#: src/ne_socket.c:1030 -#, fuzzy -msgid "Connection timed out" -msgstr "%s: Verbindung wegen Zeitberschreitung geschlossen." - -#: src/ne_socket.c:1128 -msgid "Socket descriptor number exceeds FD_SETSIZE" -msgstr "" - -#: src/ne_socket.c:1342 -msgid "Client certificate verification failed" -msgstr "" - -#: src/ne_socket.c:1358 -msgid "SSL disabled due to lack of entropy" -msgstr "" - -#: src/ne_socket.c:1365 -msgid "SSL disabled due to library version mismatch" -msgstr "" - -#: src/ne_socket.c:1371 -#, fuzzy -msgid "Could not create SSL structure" -msgstr "Konnte keine SSL-Sitzung herstellen" - -#: src/ne_xml.c:280 -#, fuzzy, c-format -msgid "XML parse error at line %d: invalid element name" -msgstr "Fehler beim XML-Parsing in Zeile %d: %s." - -#: src/ne_xml.c:452 -#, fuzzy -msgid "Unknown error" -msgstr "Unbekannter System-Fehler" - -#: src/ne_xml.c:537 -msgid "Invalid Byte Order Mark" -msgstr "" - -#: src/ne_xml.c:625 -#, fuzzy, c-format -msgid "XML parse error at line %d: %s" -msgstr "Fehler beim XML-Parsing in Zeile %d: %s." - -#: src/ne_xmlreq.c:36 -#, fuzzy, c-format -msgid "Could not parse response: %s" -msgstr "Konnte Rumpf der Antwort nicht lesen" - -#, fuzzy -#~ msgid " of request body file: %s" -#~ msgstr "Konnte nicht in diese Datei schreiben: %s" diff --git a/client/neon-0.27.2/po/fr.gmo b/client/neon-0.27.2/po/fr.gmo deleted file mode 100644 index 4a8f06b8684dbf1b7f4799e770e93b579f6ca424..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 377 zcmca7#4?qEfq{XMfq_AWfq_AVfq{XUfq_8>B*?(PV8Ot^V9&_FUp27aQ78a(Kx`qhF bAa|st7U{a?CFiGP=A~OHSR`eZa4`S?z&B|? diff --git a/client/neon-0.27.2/po/fr.po b/client/neon-0.27.2/po/fr.po deleted file mode 100644 index b6332d1b6..000000000 --- a/client/neon-0.27.2/po/fr.po +++ /dev/null @@ -1,471 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: sitecopy 0.9.3\n" -"Report-Msgid-Bugs-To: neon@webdav.org\n" -"POT-Creation-Date: 2007-09-25 10:21+0100\n" -"PO-Revision-Date: 2000-01-31 00:00+0100\n" -"Last-Translator: Sylvain Glaize \n" -"Language-Team: fr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=ISO-8859-1\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/ne_207.c:198 -#, c-format -msgid "" -"Invalid HTTP status line in status element at line %d of response:\n" -"Status line was: %s" -msgstr "" - -#: src/ne_auth.c:130 -#, fuzzy, c-format -msgid "Could not authenticate to server: %s" -msgstr "%s: erreur: impossible de se connecter l'hte distant.\n" - -#: src/ne_auth.c:135 -#, fuzzy, c-format -msgid "Could not authenticate to proxy server: %s" -msgstr "%s: erreur: impossible de se connecter l'hte distant.\n" - -#: src/ne_auth.c:342 -#, c-format -msgid "rejected %s challenge" -msgstr "" - -#: src/ne_auth.c:358 -msgid "missing realm in Basic challenge" -msgstr "" - -#: src/ne_auth.c:453 -msgid "invalid Negotiate token" -msgstr "" - -#: src/ne_auth.c:476 -msgid "GSSAPI authentication error: " -msgstr "" - -#: src/ne_auth.c:489 -#, c-format -msgid "GSSAPI failure (code %u)" -msgstr "" - -#: src/ne_auth.c:524 -msgid "ignoring empty Negotiate continuation" -msgstr "" - -#: src/ne_auth.c:539 -#, c-format -msgid "Negotiate response verification failed: invalid response header token" -msgstr "" - -#: src/ne_auth.c:561 -#, c-format -msgid "Negotiate response verification failure: %s" -msgstr "" - -#: src/ne_auth.c:624 -msgid "unknown algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:628 -msgid "incompatible algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:632 -msgid "missing parameter in Digest challenge" -msgstr "" - -#: src/ne_auth.c:636 -msgid "initial Digest challenge was stale" -msgstr "" - -#: src/ne_auth.c:643 -msgid "stale Digest challenge with new algorithm or realm" -msgstr "" - -#: src/ne_auth.c:921 -#, c-format -msgid "Digest mutual authentication failure: missing parameters" -msgstr "" - -#: src/ne_auth.c:926 -#, c-format -msgid "Digest mutual authentication failure: client nonce mismatch" -msgstr "" - -#: src/ne_auth.c:936 -#, c-format -msgid "Digest mutual authentication failure: could not parse nonce count" -msgstr "" - -#: src/ne_auth.c:941 -#, c-format -msgid "Digest mutual authentication failure: nonce count mismatch (%u not %u)" -msgstr "" - -#: src/ne_auth.c:984 -#, c-format -msgid "Digest mutual authentication failure: request-digest mismatch" -msgstr "" - -#: src/ne_auth.c:1069 -msgid ", " -msgstr "" - -#: src/ne_auth.c:1110 -#, c-format -msgid "ignored %s challenge" -msgstr "" - -#: src/ne_auth.c:1186 -#, fuzzy -msgid "could not parse challenge" -msgstr "%s: erreur: impossible d'ouvrir le fichier de ressources: %s\n" - -#: src/ne_basic.c:94 -#, fuzzy, c-format -msgid "Could not determine file size: %s" -msgstr "%s: erreur: impossible d'ouvrir le fichier de ressources: %s\n" - -#: src/ne_basic.c:145 -#, c-format -msgid "Response did not include requested range" -msgstr "" - -#: src/ne_basic.c:179 -#, c-format -msgid "Range is not satisfiable" -msgstr "" - -#: src/ne_basic.c:184 -#, c-format -msgid "Resource does not support ranged GET requests" -msgstr "" - -#: src/ne_compress.c:173 -#, fuzzy, c-format -msgid "%s: %s" -msgstr "" -"%s: dans issue_error\n" -"%s" - -#: src/ne_compress.c:184 -#, c-format -msgid "%s: %s (code %d)" -msgstr "" - -#: src/ne_compress.c:232 -#, fuzzy -msgid "Could not inflate data" -msgstr "%s: erreur: impossible d'ouvrir le fichier de ressources: %s\n" - -#: src/ne_compress.c:293 -#, fuzzy -msgid "Could not initialize zlib" -msgstr "%s: erreur: impossible d'ouvrir le fichier de ressources: %s\n" - -#: src/ne_gnutls.c:162 -#, c-format -msgid "[unprintable:#%lu]" -msgstr "" - -#: src/ne_gnutls.c:188 -msgid "[unprintable]" -msgstr "" - -#: src/ne_gnutls.c:685 src/ne_openssl.c:419 -#, c-format -msgid "Server certificate was missing commonName attribute in subject name" -msgstr "" - -#: src/ne_gnutls.c:721 src/ne_openssl.c:632 -#, fuzzy, c-format -msgid "SSL negotiation failed: %s" -msgstr "%s: erreur: impossible d'ouvrir le fichier de ressources: %s\n" - -#: src/ne_gnutls.c:730 -#, c-format -msgid "Server did not send certificate chain" -msgstr "" - -#: src/ne_locks.c:584 -msgid "LOCK response missing Lock-Token header" -msgstr "" - -#: src/ne_locks.c:759 -#, c-format -msgid "Response missing activelock for %s" -msgstr "" - -#: src/ne_locks.c:801 -#, c-format -msgid "No activelock for <%s> returned in LOCK refresh response" -msgstr "" - -#: src/ne_openssl.c:451 -#, c-format -msgid "Certificate verification error: %s" -msgstr "" - -#: src/ne_openssl.c:651 -#, c-format -msgid "SSL server did not present certificate" -msgstr "" - -#: src/ne_openssl.c:660 -#, c-format -msgid "Server certificate changed: connection intercepted?" -msgstr "" - -#: src/ne_props.c:371 src/ne_props.c:411 -msgid "Response exceeds maximum property count" -msgstr "" - -#: src/ne_redirect.c:92 -#, fuzzy, c-format -msgid "Could not parse redirect destination URL" -msgstr "%s: erreur: impossible d'ouvrir le fichier de ressources: %s\n" - -#: src/ne_request.c:193 -#, fuzzy, c-format -msgid "%s: connection was closed by proxy server" -msgstr "%s: erreur: impossible de se connecter l'hte distant.\n" - -#: src/ne_request.c:196 -#, c-format -msgid "%s: connection was closed by server" -msgstr "" - -#: src/ne_request.c:201 -#, c-format -msgid "%s: connection timed out" -msgstr "" - -#: src/ne_request.c:306 -msgid "offset invalid" -msgstr "" - -#: src/ne_request.c:311 -#, fuzzy, c-format -msgid "Could not seek to offset %s of request body file: %s" -msgstr "%s: erreur: impossible d'ouvrir le fichier de ressources: %s\n" - -#: src/ne_request.c:359 -msgid "Could not send request body" -msgstr "" - -#: src/ne_request.c:692 -msgid "Could not read chunk size" -msgstr "" - -#: src/ne_request.c:699 -#, fuzzy -msgid "Could not parse chunk size" -msgstr "%s: erreur: impossible d'ouvrir le fichier de ressources: %s\n" - -#: src/ne_request.c:736 -msgid "Could not read response body" -msgstr "" - -#: src/ne_request.c:752 -#, fuzzy -msgid "Could not read chunk delimiter" -msgstr "%s: erreur: impossible d'ouvrir le fichier de ressources: %s\n" - -#: src/ne_request.c:755 -msgid "Chunk delimiter was invalid" -msgstr "" - -#: src/ne_request.c:861 -msgid "Could not read status line" -msgstr "" - -#: src/ne_request.c:883 -#, fuzzy -msgid "Could not parse response status line" -msgstr "%s: erreur: impossible d'ouvrir le fichier de ressources: %s\n" - -#: src/ne_request.c:895 -#, fuzzy -msgid "Could not read interim response headers" -msgstr "%s: erreur: impossible d'ouvrir le fichier de ressources: %s\n" - -#: src/ne_request.c:929 -msgid "Could not send request" -msgstr "" - -#: src/ne_request.c:977 src/ne_request.c:995 src/ne_request.c:1005 -msgid "Error reading response headers" -msgstr "" - -#: src/ne_request.c:1023 -#, c-format -msgid "Response header too long" -msgstr "" - -#: src/ne_request.c:1105 -msgid "Response exceeded maximum number of header fields" -msgstr "" - -#: src/ne_request.c:1122 -#, fuzzy, c-format -msgid "Could not resolve hostname `%s': %s" -msgstr "%s: erreur: impossible de trouver le nom de l'hte distant.\n" - -#: src/ne_request.c:1233 -msgid "Unknown transfer-coding in response" -msgstr "" - -#: src/ne_request.c:1244 -msgid "Invalid Content-Length in response" -msgstr "" - -#: src/ne_request.c:1317 -#, fuzzy, c-format -msgid "Could not write to file: %s" -msgstr "%s: erreur: impossible d'ouvrir le fichier de ressources: %s\n" - -#: src/ne_request.c:1390 -#, fuzzy, c-format -msgid "Could not create SSL connection through proxy server: %s" -msgstr "%s: erreur: impossible de se connecter l'hte distant.\n" - -#: src/ne_request.c:1437 -#, fuzzy, c-format -msgid "Could not create socket" -msgstr "%s: erreur: impossible de se connecter l'hte distant.\n" - -#: src/ne_request.c:1496 -#, fuzzy -msgid "Could not connect to proxy server" -msgstr "%s: erreur: impossible de se connecter l'hte distant.\n" - -#: src/ne_request.c:1497 -#, fuzzy -msgid "Could not connect to server" -msgstr "%s: erreur: impossible de se connecter l'hte distant.\n" - -#: src/ne_session.c:339 src/ne_session.c:350 -msgid "[invalid date]" -msgstr "" - -#: src/ne_session.c:363 -msgid "certificate is not yet valid" -msgstr "" - -#: src/ne_session.c:364 -msgid "certificate has expired" -msgstr "" - -#: src/ne_session.c:365 -msgid "certificate issued for a different hostname" -msgstr "" - -#: src/ne_session.c:366 -msgid "issuer is not trusted" -msgstr "" - -#: src/ne_session.c:371 -msgid "Server certificate verification failed: " -msgstr "" - -#: src/ne_socket.c:501 src/ne_socket.c:555 src/ne_socket.c:658 -msgid "Connection closed" -msgstr "" - -#: src/ne_socket.c:565 src/ne_socket.c:670 -msgid "Secure connection truncated" -msgstr "" - -#: src/ne_socket.c:577 src/ne_socket.c:682 -#, fuzzy, c-format -msgid "SSL error: %s" -msgstr "" -"%s: dans issue_error\n" -"%s" - -#: src/ne_socket.c:580 -#, c-format -msgid "SSL error code %d/%d/%lu" -msgstr "" - -#: src/ne_socket.c:663 -#, fuzzy, c-format -msgid "SSL alert received: %s" -msgstr "" -"%s: dans issue_error\n" -"%s" - -#: src/ne_socket.c:678 -msgid "SSL socket read failed" -msgstr "" - -#: src/ne_socket.c:777 -msgid "Line too long" -msgstr "" - -#: src/ne_socket.c:917 src/ne_socket.c:923 -msgid "Host not found" -msgstr "" - -#: src/ne_socket.c:1030 -msgid "Connection timed out" -msgstr "" - -#: src/ne_socket.c:1128 -msgid "Socket descriptor number exceeds FD_SETSIZE" -msgstr "" - -#: src/ne_socket.c:1342 -msgid "Client certificate verification failed" -msgstr "" - -#: src/ne_socket.c:1358 -msgid "SSL disabled due to lack of entropy" -msgstr "" - -#: src/ne_socket.c:1365 -msgid "SSL disabled due to library version mismatch" -msgstr "" - -#: src/ne_socket.c:1371 -#, fuzzy -msgid "Could not create SSL structure" -msgstr "%s: erreur: impossible de se connecter l'hte distant.\n" - -#: src/ne_xml.c:280 -#, fuzzy, c-format -msgid "XML parse error at line %d: invalid element name" -msgstr "" -"%s: erreur dans le fichier de ressources la ligne %d:\n" -"%s\n" - -#: src/ne_xml.c:452 -#, fuzzy -msgid "Unknown error" -msgstr "Erreur systme inconnue" - -#: src/ne_xml.c:537 -msgid "Invalid Byte Order Mark" -msgstr "" - -#: src/ne_xml.c:625 -#, fuzzy, c-format -msgid "XML parse error at line %d: %s" -msgstr "" -"%s: erreur dans le fichier de ressources la ligne %d:\n" -"%s\n" - -#: src/ne_xmlreq.c:36 -#, fuzzy, c-format -msgid "Could not parse response: %s" -msgstr "%s: erreur: impossible d'ouvrir le fichier de ressources: %s\n" - -#, fuzzy -#~ msgid " of request body file: %s" -#~ msgstr "%s: erreur: impossible d'ouvrir le fichier de ressources: %s\n" diff --git a/client/neon-0.27.2/po/ja.gmo b/client/neon-0.27.2/po/ja.gmo deleted file mode 100644 index 24d54f91aac36dcb5dcc1292b5bd77e3a1cf4537..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 867 zcmca7#4?qEfq{XYfq_AWfq@}}fq{XWfq|h1B*?(Pu!DhtL6L!hVJ8CvgERvJ!)*oz z1}O#xhVKjv43Z2C3_^?$eL9Q~c~3?L1`tkVWMEKYU|?9!1fef6F)+w6Ffe>&g6J1v zhS2)V3=9$s3=Ce(3=E7=J3$mPh+tq~V1>GkiGhKE1uDh{qMh?gb5a!Y@=Fww^Yijj zlS>pz@)Zh-@+&G8ic^cqQi~X{s=$ydNGvK&RY=Y#&C6CO&a6sB(pHq3n1V;9D7CmC zKd(4dAt^tl5=mQmQD#Xh$Tex1IjL3(s>KWeMfq8&$tAj;DY{{)Ma7x0AN+ zA-c{*sfi_-`FXl7i6yC43PuJ7=DG%!x<;l7h6YwfhS~;(1_oRK{<=Y_Wtkw$5b6wd z4GeV+%@hpGt&EMd4J-`|xO@_eOLRku67!045=-)ntQ7q6lS(T~vojS!ic6C-GIL9d z5*2JpN=v{jhrB$!%*-s4QoZ~ly{rN|E}z7_^wPxiRNau S+dtVAwfPhVGrHx2a+ zxSaFzN>cMmbVDi&Qmqt9QY%XI3vv=O^Q;w;GeDtVV(S{}tm_qkPzZ8PT56H5YhH4G zN@iZVm4bzCQf3Jk!_wxN~UplH*I(F1fd4_ma=V zD1pTGl5>ZiFIl@}>yl5KJ{>rZWCEJ>nqw!IJcJsK66Xp_kfoMhUAl1TlBKVgtl9f< L$wr8JaO?vBk1;06 diff --git a/client/neon-0.27.2/po/ja.po b/client/neon-0.27.2/po/ja.po deleted file mode 100644 index 80d0357ee..000000000 --- a/client/neon-0.27.2/po/ja.po +++ /dev/null @@ -1,465 +0,0 @@ -# The Japanese translation for sitecopy -# Nobuyuki Tsuchimura , 2000. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: sitecopy 0.10.14\n" -"Report-Msgid-Bugs-To: neon@webdav.org\n" -"POT-Creation-Date: 2007-09-25 10:21+0100\n" -"PO-Revision-Date: 2001-01-16 07:32+0900\n" -"Last-Translator: Nobuyuki Tsuchimura \n" -"Language-Team: ja\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=EUC-JP\n" -"Content-Transfer-Encoding: 8-bit\n" - -#: src/ne_207.c:198 -#, c-format -msgid "" -"Invalid HTTP status line in status element at line %d of response:\n" -"Status line was: %s" -msgstr "" - -#: src/ne_auth.c:130 -#, fuzzy, c-format -msgid "Could not authenticate to server: %s" -msgstr "ץС³Ǥޤ" - -#: src/ne_auth.c:135 -#, fuzzy, c-format -msgid "Could not authenticate to proxy server: %s" -msgstr "ץС³Ǥޤ" - -#: src/ne_auth.c:342 -#, c-format -msgid "rejected %s challenge" -msgstr "" - -#: src/ne_auth.c:358 -msgid "missing realm in Basic challenge" -msgstr "" - -#: src/ne_auth.c:453 -msgid "invalid Negotiate token" -msgstr "" - -#: src/ne_auth.c:476 -#, fuzzy -msgid "GSSAPI authentication error: " -msgstr "%s ؤǧڤ %s ɬפǤ '%s':\n" - -#: src/ne_auth.c:489 -#, c-format -msgid "GSSAPI failure (code %u)" -msgstr "" - -#: src/ne_auth.c:524 -msgid "ignoring empty Negotiate continuation" -msgstr "" - -#: src/ne_auth.c:539 -#, c-format -msgid "Negotiate response verification failed: invalid response header token" -msgstr "" - -#: src/ne_auth.c:561 -#, c-format -msgid "Negotiate response verification failure: %s" -msgstr "" - -#: src/ne_auth.c:624 -msgid "unknown algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:628 -msgid "incompatible algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:632 -msgid "missing parameter in Digest challenge" -msgstr "" - -#: src/ne_auth.c:636 -msgid "initial Digest challenge was stale" -msgstr "" - -#: src/ne_auth.c:643 -msgid "stale Digest challenge with new algorithm or realm" -msgstr "" - -#: src/ne_auth.c:921 -#, c-format -msgid "Digest mutual authentication failure: missing parameters" -msgstr "" - -#: src/ne_auth.c:926 -#, c-format -msgid "Digest mutual authentication failure: client nonce mismatch" -msgstr "" - -#: src/ne_auth.c:936 -#, c-format -msgid "Digest mutual authentication failure: could not parse nonce count" -msgstr "" - -#: src/ne_auth.c:941 -#, c-format -msgid "Digest mutual authentication failure: nonce count mismatch (%u not %u)" -msgstr "" - -#: src/ne_auth.c:984 -#, c-format -msgid "Digest mutual authentication failure: request-digest mismatch" -msgstr "" - -#: src/ne_auth.c:1069 -msgid ", " -msgstr "" - -#: src/ne_auth.c:1110 -#, c-format -msgid "ignored %s challenge" -msgstr "" - -#: src/ne_auth.c:1186 -#, fuzzy -msgid "could not parse challenge" -msgstr "chunk 礭ϤǤޤ" - -#: src/ne_basic.c:94 -#, fuzzy, c-format -msgid "Could not determine file size: %s" -msgstr "ե뤬ɤޤ: " - -#: src/ne_basic.c:145 -#, c-format -msgid "Response did not include requested range" -msgstr "" - -#: src/ne_basic.c:179 -#, c-format -msgid "Range is not satisfiable" -msgstr "" - -#: src/ne_basic.c:184 -#, fuzzy, c-format -msgid "Resource does not support ranged GET requests" -msgstr "Сեʬ򥵥ݡȤƤޤ" - -#: src/ne_compress.c:173 -#, fuzzy, c-format -msgid "%s: %s" -msgstr "桼̾: %s\n" - -#: src/ne_compress.c:184 -#, c-format -msgid "%s: %s (code %d)" -msgstr "" - -#: src/ne_compress.c:232 -#, fuzzy -msgid "Could not inflate data" -msgstr "ե뤬ɤޤ: " - -#: src/ne_compress.c:293 -#, fuzzy -msgid "Could not initialize zlib" -msgstr "ե뤬񤱤ޤ: " - -#: src/ne_gnutls.c:162 -#, c-format -msgid "[unprintable:#%lu]" -msgstr "" - -#: src/ne_gnutls.c:188 -msgid "[unprintable]" -msgstr "" - -#: src/ne_gnutls.c:685 src/ne_openssl.c:419 -#, c-format -msgid "Server certificate was missing commonName attribute in subject name" -msgstr "" - -#: src/ne_gnutls.c:721 src/ne_openssl.c:632 -#, fuzzy, c-format -msgid "SSL negotiation failed: %s" -msgstr "ե뤬񤱤ޤ: %s" - -#: src/ne_gnutls.c:730 -#, c-format -msgid "Server did not send certificate chain" -msgstr "" - -#: src/ne_locks.c:584 -msgid "LOCK response missing Lock-Token header" -msgstr "" - -#: src/ne_locks.c:759 -#, c-format -msgid "Response missing activelock for %s" -msgstr "" - -#: src/ne_locks.c:801 -#, c-format -msgid "No activelock for <%s> returned in LOCK refresh response" -msgstr "" - -#: src/ne_openssl.c:451 -#, c-format -msgid "Certificate verification error: %s" -msgstr "" - -#: src/ne_openssl.c:651 -#, c-format -msgid "SSL server did not present certificate" -msgstr "" - -#: src/ne_openssl.c:660 -#, c-format -msgid "Server certificate changed: connection intercepted?" -msgstr "" - -#: src/ne_props.c:371 src/ne_props.c:411 -msgid "Response exceeds maximum property count" -msgstr "" - -#: src/ne_redirect.c:92 -#, fuzzy, c-format -msgid "Could not parse redirect destination URL" -msgstr "chunk 礭ϤǤޤ" - -#: src/ne_request.c:193 -#, fuzzy, c-format -msgid "%s: connection was closed by proxy server" -msgstr "%s: ³ץСڤޤ" - -#: src/ne_request.c:196 -#, fuzzy, c-format -msgid "%s: connection was closed by server" -msgstr "%s: ³Сڤޤ" - -#: src/ne_request.c:201 -#, fuzzy, c-format -msgid "%s: connection timed out" -msgstr "%s: ³ॢȤǤ" - -#: src/ne_request.c:306 -msgid "offset invalid" -msgstr "" - -#: src/ne_request.c:311 -#, fuzzy, c-format -msgid "Could not seek to offset %s of request body file: %s" -msgstr "ե뤬񤱤ޤ: %s" - -#: src/ne_request.c:359 -msgid "Could not send request body" -msgstr "" - -#: src/ne_request.c:692 -msgid "Could not read chunk size" -msgstr "chunk 礭ɤޤ" - -#: src/ne_request.c:699 -msgid "Could not parse chunk size" -msgstr "chunk 礭ϤǤޤ" - -#: src/ne_request.c:736 -msgid "Could not read response body" -msgstr "response body ɤޤ" - -#: src/ne_request.c:752 -#, fuzzy -msgid "Could not read chunk delimiter" -msgstr "chunk 礭ɤޤ" - -#: src/ne_request.c:755 -msgid "Chunk delimiter was invalid" -msgstr "" - -#: src/ne_request.c:861 -msgid "Could not read status line" -msgstr "" - -#: src/ne_request.c:883 -#, fuzzy -msgid "Could not parse response status line" -msgstr "response body ɤޤ" - -#: src/ne_request.c:895 -#, fuzzy -msgid "Could not read interim response headers" -msgstr "response body ɤޤ" - -#: src/ne_request.c:929 -msgid "Could not send request" -msgstr "" - -#: src/ne_request.c:977 src/ne_request.c:995 src/ne_request.c:1005 -msgid "Error reading response headers" -msgstr "" - -#: src/ne_request.c:1023 -#, c-format -msgid "Response header too long" -msgstr "" - -#: src/ne_request.c:1105 -msgid "Response exceeded maximum number of header fields" -msgstr "" - -#: src/ne_request.c:1122 -#, fuzzy, c-format -msgid "Could not resolve hostname `%s': %s" -msgstr "%s: 顼: СΥۥ̾ (%s) IP ɥ쥹ѴǤޤ\n" - -#: src/ne_request.c:1233 -msgid "Unknown transfer-coding in response" -msgstr "" - -#: src/ne_request.c:1244 -msgid "Invalid Content-Length in response" -msgstr "" - -#: src/ne_request.c:1317 -#, c-format -msgid "Could not write to file: %s" -msgstr "ե뤬񤱤ޤ: %s" - -#: src/ne_request.c:1390 -#, fuzzy, c-format -msgid "Could not create SSL connection through proxy server: %s" -msgstr "ץС SSL ³Ǥޤ" - -#: src/ne_request.c:1437 -#, fuzzy, c-format -msgid "Could not create socket" -msgstr "ץС SSL ³Ǥޤ" - -#: src/ne_request.c:1496 -msgid "Could not connect to proxy server" -msgstr "ץС³Ǥޤ" - -#: src/ne_request.c:1497 -msgid "Could not connect to server" -msgstr "ץС³Ǥޤ" - -#: src/ne_session.c:339 src/ne_session.c:350 -msgid "[invalid date]" -msgstr "" - -#: src/ne_session.c:363 -msgid "certificate is not yet valid" -msgstr "" - -#: src/ne_session.c:364 -msgid "certificate has expired" -msgstr "" - -#: src/ne_session.c:365 -msgid "certificate issued for a different hostname" -msgstr "" - -#: src/ne_session.c:366 -msgid "issuer is not trusted" -msgstr "" - -#: src/ne_session.c:371 -msgid "Server certificate verification failed: " -msgstr "" - -#: src/ne_socket.c:501 src/ne_socket.c:555 src/ne_socket.c:658 -#, fuzzy -msgid "Connection closed" -msgstr "%s: ³Сڤޤ" - -#: src/ne_socket.c:565 src/ne_socket.c:670 -#, fuzzy -msgid "Secure connection truncated" -msgstr "³ॢȡ" - -#: src/ne_socket.c:577 src/ne_socket.c:682 -#, c-format -msgid "SSL error: %s" -msgstr "" - -#: src/ne_socket.c:580 -#, c-format -msgid "SSL error code %d/%d/%lu" -msgstr "" - -#: src/ne_socket.c:663 -#, c-format -msgid "SSL alert received: %s" -msgstr "" - -#: src/ne_socket.c:678 -msgid "SSL socket read failed" -msgstr "" - -#: src/ne_socket.c:777 -msgid "Line too long" -msgstr "" - -#: src/ne_socket.c:917 src/ne_socket.c:923 -msgid "Host not found" -msgstr "" - -#: src/ne_socket.c:1030 -#, fuzzy -msgid "Connection timed out" -msgstr "%s: ³ॢȤǤ" - -#: src/ne_socket.c:1128 -msgid "Socket descriptor number exceeds FD_SETSIZE" -msgstr "" - -#: src/ne_socket.c:1342 -msgid "Client certificate verification failed" -msgstr "" - -#: src/ne_socket.c:1358 -msgid "SSL disabled due to lack of entropy" -msgstr "" - -#: src/ne_socket.c:1365 -msgid "SSL disabled due to library version mismatch" -msgstr "" - -#: src/ne_socket.c:1371 -#, fuzzy -msgid "Could not create SSL structure" -msgstr "ץС SSL ³Ǥޤ" - -#: src/ne_xml.c:280 -#, fuzzy, c-format -msgid "XML parse error at line %d: invalid element name" -msgstr "" -"%s: rcfile %d ԤǴְäƤޤ:\n" -"%s\n" - -#: src/ne_xml.c:452 -#, fuzzy -msgid "Unknown error" -msgstr "̤ΤΥƥ२顼" - -#: src/ne_xml.c:537 -msgid "Invalid Byte Order Mark" -msgstr "" - -#: src/ne_xml.c:625 -#, fuzzy, c-format -msgid "XML parse error at line %d: %s" -msgstr "" -"%s: rcfile %d ԤǴְäƤޤ:\n" -"%s\n" - -#: src/ne_xmlreq.c:36 -#, fuzzy, c-format -msgid "Could not parse response: %s" -msgstr "response body ɤޤ" - -#, fuzzy -#~ msgid " of request body file: %s" -#~ msgstr "ե뤬񤱤ޤ: %s" diff --git a/client/neon-0.27.2/po/neon.pot b/client/neon-0.27.2/po/neon.pot deleted file mode 100644 index 6465703bb..000000000 --- a/client/neon-0.27.2/po/neon.pot +++ /dev/null @@ -1,447 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER -# This file is distributed under the same license as the PACKAGE package. -# FIRST AUTHOR , YEAR. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"Report-Msgid-Bugs-To: neon@webdav.org\n" -"POT-Creation-Date: 2007-09-25 10:21+0100\n" -"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=CHARSET\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/ne_207.c:198 -#, c-format -msgid "" -"Invalid HTTP status line in status element at line %d of response:\n" -"Status line was: %s" -msgstr "" - -#: src/ne_auth.c:130 -#, c-format -msgid "Could not authenticate to server: %s" -msgstr "" - -#: src/ne_auth.c:135 -#, c-format -msgid "Could not authenticate to proxy server: %s" -msgstr "" - -#: src/ne_auth.c:342 -#, c-format -msgid "rejected %s challenge" -msgstr "" - -#: src/ne_auth.c:358 -msgid "missing realm in Basic challenge" -msgstr "" - -#: src/ne_auth.c:453 -msgid "invalid Negotiate token" -msgstr "" - -#: src/ne_auth.c:476 -msgid "GSSAPI authentication error: " -msgstr "" - -#: src/ne_auth.c:489 -#, c-format -msgid "GSSAPI failure (code %u)" -msgstr "" - -#: src/ne_auth.c:524 -msgid "ignoring empty Negotiate continuation" -msgstr "" - -#: src/ne_auth.c:539 -#, c-format -msgid "Negotiate response verification failed: invalid response header token" -msgstr "" - -#: src/ne_auth.c:561 -#, c-format -msgid "Negotiate response verification failure: %s" -msgstr "" - -#: src/ne_auth.c:624 -msgid "unknown algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:628 -msgid "incompatible algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:632 -msgid "missing parameter in Digest challenge" -msgstr "" - -#: src/ne_auth.c:636 -msgid "initial Digest challenge was stale" -msgstr "" - -#: src/ne_auth.c:643 -msgid "stale Digest challenge with new algorithm or realm" -msgstr "" - -#: src/ne_auth.c:921 -#, c-format -msgid "Digest mutual authentication failure: missing parameters" -msgstr "" - -#: src/ne_auth.c:926 -#, c-format -msgid "Digest mutual authentication failure: client nonce mismatch" -msgstr "" - -#: src/ne_auth.c:936 -#, c-format -msgid "Digest mutual authentication failure: could not parse nonce count" -msgstr "" - -#: src/ne_auth.c:941 -#, c-format -msgid "Digest mutual authentication failure: nonce count mismatch (%u not %u)" -msgstr "" - -#: src/ne_auth.c:984 -#, c-format -msgid "Digest mutual authentication failure: request-digest mismatch" -msgstr "" - -#: src/ne_auth.c:1069 -msgid ", " -msgstr "" - -#: src/ne_auth.c:1110 -#, c-format -msgid "ignored %s challenge" -msgstr "" - -#: src/ne_auth.c:1186 -msgid "could not parse challenge" -msgstr "" - -#: src/ne_basic.c:94 -#, c-format -msgid "Could not determine file size: %s" -msgstr "" - -#: src/ne_basic.c:145 -#, c-format -msgid "Response did not include requested range" -msgstr "" - -#: src/ne_basic.c:179 -#, c-format -msgid "Range is not satisfiable" -msgstr "" - -#: src/ne_basic.c:184 -#, c-format -msgid "Resource does not support ranged GET requests" -msgstr "" - -#: src/ne_compress.c:173 -#, c-format -msgid "%s: %s" -msgstr "" - -#: src/ne_compress.c:184 -#, c-format -msgid "%s: %s (code %d)" -msgstr "" - -#: src/ne_compress.c:232 -msgid "Could not inflate data" -msgstr "" - -#: src/ne_compress.c:293 -msgid "Could not initialize zlib" -msgstr "" - -#: src/ne_gnutls.c:162 -#, c-format -msgid "[unprintable:#%lu]" -msgstr "" - -#: src/ne_gnutls.c:188 -msgid "[unprintable]" -msgstr "" - -#: src/ne_gnutls.c:685 src/ne_openssl.c:419 -#, c-format -msgid "Server certificate was missing commonName attribute in subject name" -msgstr "" - -#: src/ne_gnutls.c:721 src/ne_openssl.c:632 -#, c-format -msgid "SSL negotiation failed: %s" -msgstr "" - -#: src/ne_gnutls.c:730 -#, c-format -msgid "Server did not send certificate chain" -msgstr "" - -#: src/ne_locks.c:584 -msgid "LOCK response missing Lock-Token header" -msgstr "" - -#: src/ne_locks.c:759 -#, c-format -msgid "Response missing activelock for %s" -msgstr "" - -#: src/ne_locks.c:801 -#, c-format -msgid "No activelock for <%s> returned in LOCK refresh response" -msgstr "" - -#: src/ne_openssl.c:451 -#, c-format -msgid "Certificate verification error: %s" -msgstr "" - -#: src/ne_openssl.c:651 -#, c-format -msgid "SSL server did not present certificate" -msgstr "" - -#: src/ne_openssl.c:660 -#, c-format -msgid "Server certificate changed: connection intercepted?" -msgstr "" - -#: src/ne_props.c:371 src/ne_props.c:411 -msgid "Response exceeds maximum property count" -msgstr "" - -#: src/ne_redirect.c:92 -#, c-format -msgid "Could not parse redirect destination URL" -msgstr "" - -#: src/ne_request.c:193 -#, c-format -msgid "%s: connection was closed by proxy server" -msgstr "" - -#: src/ne_request.c:196 -#, c-format -msgid "%s: connection was closed by server" -msgstr "" - -#: src/ne_request.c:201 -#, c-format -msgid "%s: connection timed out" -msgstr "" - -#: src/ne_request.c:306 -msgid "offset invalid" -msgstr "" - -#: src/ne_request.c:311 -#, c-format -msgid "Could not seek to offset %s of request body file: %s" -msgstr "" - -#: src/ne_request.c:359 -msgid "Could not send request body" -msgstr "" - -#: src/ne_request.c:692 -msgid "Could not read chunk size" -msgstr "" - -#: src/ne_request.c:699 -msgid "Could not parse chunk size" -msgstr "" - -#: src/ne_request.c:736 -msgid "Could not read response body" -msgstr "" - -#: src/ne_request.c:752 -msgid "Could not read chunk delimiter" -msgstr "" - -#: src/ne_request.c:755 -msgid "Chunk delimiter was invalid" -msgstr "" - -#: src/ne_request.c:861 -msgid "Could not read status line" -msgstr "" - -#: src/ne_request.c:883 -msgid "Could not parse response status line" -msgstr "" - -#: src/ne_request.c:895 -msgid "Could not read interim response headers" -msgstr "" - -#: src/ne_request.c:929 -msgid "Could not send request" -msgstr "" - -#: src/ne_request.c:977 src/ne_request.c:995 src/ne_request.c:1005 -msgid "Error reading response headers" -msgstr "" - -#: src/ne_request.c:1023 -#, c-format -msgid "Response header too long" -msgstr "" - -#: src/ne_request.c:1105 -msgid "Response exceeded maximum number of header fields" -msgstr "" - -#: src/ne_request.c:1122 -#, c-format -msgid "Could not resolve hostname `%s': %s" -msgstr "" - -#: src/ne_request.c:1233 -msgid "Unknown transfer-coding in response" -msgstr "" - -#: src/ne_request.c:1244 -msgid "Invalid Content-Length in response" -msgstr "" - -#: src/ne_request.c:1317 -#, c-format -msgid "Could not write to file: %s" -msgstr "" - -#: src/ne_request.c:1390 -#, c-format -msgid "Could not create SSL connection through proxy server: %s" -msgstr "" - -#: src/ne_request.c:1437 -#, c-format -msgid "Could not create socket" -msgstr "" - -#: src/ne_request.c:1496 -msgid "Could not connect to proxy server" -msgstr "" - -#: src/ne_request.c:1497 -msgid "Could not connect to server" -msgstr "" - -#: src/ne_session.c:339 src/ne_session.c:350 -msgid "[invalid date]" -msgstr "" - -#: src/ne_session.c:363 -msgid "certificate is not yet valid" -msgstr "" - -#: src/ne_session.c:364 -msgid "certificate has expired" -msgstr "" - -#: src/ne_session.c:365 -msgid "certificate issued for a different hostname" -msgstr "" - -#: src/ne_session.c:366 -msgid "issuer is not trusted" -msgstr "" - -#: src/ne_session.c:371 -msgid "Server certificate verification failed: " -msgstr "" - -#: src/ne_socket.c:501 src/ne_socket.c:555 src/ne_socket.c:658 -msgid "Connection closed" -msgstr "" - -#: src/ne_socket.c:565 src/ne_socket.c:670 -msgid "Secure connection truncated" -msgstr "" - -#: src/ne_socket.c:577 src/ne_socket.c:682 -#, c-format -msgid "SSL error: %s" -msgstr "" - -#: src/ne_socket.c:580 -#, c-format -msgid "SSL error code %d/%d/%lu" -msgstr "" - -#: src/ne_socket.c:663 -#, c-format -msgid "SSL alert received: %s" -msgstr "" - -#: src/ne_socket.c:678 -msgid "SSL socket read failed" -msgstr "" - -#: src/ne_socket.c:777 -msgid "Line too long" -msgstr "" - -#: src/ne_socket.c:917 src/ne_socket.c:923 -msgid "Host not found" -msgstr "" - -#: src/ne_socket.c:1030 -msgid "Connection timed out" -msgstr "" - -#: src/ne_socket.c:1128 -msgid "Socket descriptor number exceeds FD_SETSIZE" -msgstr "" - -#: src/ne_socket.c:1342 -msgid "Client certificate verification failed" -msgstr "" - -#: src/ne_socket.c:1358 -msgid "SSL disabled due to lack of entropy" -msgstr "" - -#: src/ne_socket.c:1365 -msgid "SSL disabled due to library version mismatch" -msgstr "" - -#: src/ne_socket.c:1371 -msgid "Could not create SSL structure" -msgstr "" - -#: src/ne_xml.c:280 -#, c-format -msgid "XML parse error at line %d: invalid element name" -msgstr "" - -#: src/ne_xml.c:452 -msgid "Unknown error" -msgstr "" - -#: src/ne_xml.c:537 -msgid "Invalid Byte Order Mark" -msgstr "" - -#: src/ne_xml.c:625 -#, c-format -msgid "XML parse error at line %d: %s" -msgstr "" - -#: src/ne_xmlreq.c:36 -#, c-format -msgid "Could not parse response: %s" -msgstr "" diff --git a/client/neon-0.27.2/po/nn.gmo b/client/neon-0.27.2/po/nn.gmo deleted file mode 100644 index 481166ec73682ead0f900cf19ed724b31ecdd7ad..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1616 zcmca7#4?qEfq{Xafq_AWfq`KP0|SFN0|NsOBS@5iA%l^DL6L!hA(N4TL7IVqp_`F` zL5hKaVL2lMgCqk3!y!h9zB^FypNtF)VhjunB1{nV+ECh^iGe|mfq@~JiGhKSfq|ik ziGd-Efq`Kn69WS;0|UbgCI$ux1_p+2ObiTJj0_C?%nS@l3=9laEDQ|t3=9l&Sr`~} z7#JA#vM?}cGcYi`Vu9Er#>&7T%fP^(%L-BF4W+Z8bT=!+eXCg^emud-z!1W~z;J^V z;tpLl1_ogU1_m281_qFqSs54@m?2(g;DOR0_i{nmAc`GCFfcH%K*Nojfq{V&DhBck z2b9gmz`(!+WivSEm*%7>yI!Y4Bi`p_BncMmbVDi& zQmqt9QY%XI3vv=O^Q;w;GeAkR#J02~P1gdU4&>sr)FNHiyyX0p%)E3f1&gH25-tYs zoW!D%RE5m!?5tFU?EHe9M1_*f9EIG}oSgjJlGMD!B3w$qlBs!msPZNGIoXK{#U=Sg zIjNc13I&IkD&!Xwq@?DQC={2W8DEFt{b=hlCo<8d diff --git a/client/neon-0.27.2/po/nn.po b/client/neon-0.27.2/po/nn.po deleted file mode 100644 index 222d29e70..000000000 --- a/client/neon-0.27.2/po/nn.po +++ /dev/null @@ -1,479 +0,0 @@ -# Norwegian Nynorsk sitecopy translation. -# Copyright (C) 2001 Karl Ove Hufthammer. -# Karl Ove Hufthammer , 2002. -# -msgid "" -msgstr "" -"Project-Id-Version: sitecopy 0.11.4\n" -"Report-Msgid-Bugs-To: neon@webdav.org\n" -"POT-Creation-Date: 2007-09-25 10:21+0100\n" -"PO-Revision-Date: 2002-11-07 18:11+0100\n" -"Last-Translator: Karl Ove Hufthammer \n" -"Language-Team: Norwegian Nynorsk \n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=utf-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/ne_207.c:198 -#, c-format -msgid "" -"Invalid HTTP status line in status element at line %d of response:\n" -"Status line was: %s" -msgstr "" -"Ugyldig HTTP-statuslinje i statuselement på linje %d av svaret:\n" -"Statuslinja var: %s" - -#: src/ne_auth.c:130 -#, fuzzy, c-format -msgid "Could not authenticate to server: %s" -msgstr "Klarte ikkje kopla til tenaren." - -#: src/ne_auth.c:135 -#, fuzzy, c-format -msgid "Could not authenticate to proxy server: %s" -msgstr "Klarte ikkje kopla til mellomtenar" - -#: src/ne_auth.c:342 -#, c-format -msgid "rejected %s challenge" -msgstr "" - -#: src/ne_auth.c:358 -msgid "missing realm in Basic challenge" -msgstr "" - -#: src/ne_auth.c:453 -msgid "invalid Negotiate token" -msgstr "" - -#: src/ne_auth.c:476 -#, fuzzy -msgid "GSSAPI authentication error: " -msgstr "Krev autentisering på %s «%s»:\n" - -#: src/ne_auth.c:489 -#, c-format -msgid "GSSAPI failure (code %u)" -msgstr "" - -#: src/ne_auth.c:524 -msgid "ignoring empty Negotiate continuation" -msgstr "" - -#: src/ne_auth.c:539 -#, c-format -msgid "Negotiate response verification failed: invalid response header token" -msgstr "" - -#: src/ne_auth.c:561 -#, fuzzy, c-format -msgid "Negotiate response verification failure: %s" -msgstr "Tenarsertifikatet er utgått på dato." - -#: src/ne_auth.c:624 -msgid "unknown algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:628 -msgid "incompatible algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:632 -msgid "missing parameter in Digest challenge" -msgstr "" - -#: src/ne_auth.c:636 -msgid "initial Digest challenge was stale" -msgstr "" - -#: src/ne_auth.c:643 -msgid "stale Digest challenge with new algorithm or realm" -msgstr "" - -#: src/ne_auth.c:921 -#, c-format -msgid "Digest mutual authentication failure: missing parameters" -msgstr "" - -#: src/ne_auth.c:926 -#, c-format -msgid "Digest mutual authentication failure: client nonce mismatch" -msgstr "" - -#: src/ne_auth.c:936 -#, c-format -msgid "Digest mutual authentication failure: could not parse nonce count" -msgstr "" - -#: src/ne_auth.c:941 -#, c-format -msgid "Digest mutual authentication failure: nonce count mismatch (%u not %u)" -msgstr "" - -#: src/ne_auth.c:984 -#, c-format -msgid "Digest mutual authentication failure: request-digest mismatch" -msgstr "" - -#: src/ne_auth.c:1069 -msgid ", " -msgstr "" - -#: src/ne_auth.c:1110 -#, c-format -msgid "ignored %s challenge" -msgstr "" - -#: src/ne_auth.c:1186 -#, fuzzy -msgid "could not parse challenge" -msgstr "Klarte ikkje tolka storleik på oppdelt svar" - -#: src/ne_basic.c:94 -#, fuzzy, c-format -msgid "Could not determine file size: %s" -msgstr "Fann ikkje fillengda: %s" - -#: src/ne_basic.c:145 -#, c-format -msgid "Response did not include requested range" -msgstr "" - -#: src/ne_basic.c:179 -#, fuzzy, c-format -msgid "Range is not satisfiable" -msgstr "Området finst ikkje." - -#: src/ne_basic.c:184 -#, fuzzy, c-format -msgid "Resource does not support ranged GET requests" -msgstr "Tenaren kan ikkje handtera kommandoar for delvis GET." - -#: src/ne_compress.c:173 -#, fuzzy, c-format -msgid "%s: %s" -msgstr "%s: %s\n" - -#: src/ne_compress.c:184 -#, c-format -msgid "%s: %s (code %d)" -msgstr "" - -#: src/ne_compress.c:232 -#, fuzzy -msgid "Could not inflate data" -msgstr "Klarte ikkje opna fil: " - -#: src/ne_compress.c:293 -#, fuzzy -msgid "Could not initialize zlib" -msgstr "Klarte ikkje opna fil: " - -#: src/ne_gnutls.c:162 -#, c-format -msgid "[unprintable:#%lu]" -msgstr "" - -#: src/ne_gnutls.c:188 -msgid "[unprintable]" -msgstr "" - -#: src/ne_gnutls.c:685 src/ne_openssl.c:419 -#, c-format -msgid "Server certificate was missing commonName attribute in subject name" -msgstr "" - -#: src/ne_gnutls.c:721 src/ne_openssl.c:632 -#, fuzzy, c-format -msgid "SSL negotiation failed: %s" -msgstr "Klarte ikkje skriva til fil: %s" - -#: src/ne_gnutls.c:730 -#, c-format -msgid "Server did not send certificate chain" -msgstr "" - -#: src/ne_locks.c:584 -msgid "LOCK response missing Lock-Token header" -msgstr "" - -#: src/ne_locks.c:759 -#, c-format -msgid "Response missing activelock for %s" -msgstr "" - -#: src/ne_locks.c:801 -#, c-format -msgid "No activelock for <%s> returned in LOCK refresh response" -msgstr "" - -#: src/ne_openssl.c:451 -#, c-format -msgid "Certificate verification error: %s" -msgstr "" - -#: src/ne_openssl.c:651 -#, c-format -msgid "SSL server did not present certificate" -msgstr "" - -#: src/ne_openssl.c:660 -#, fuzzy, c-format -msgid "Server certificate changed: connection intercepted?" -msgstr "Tenarsertifikatet er utgått på dato." - -#: src/ne_props.c:371 src/ne_props.c:411 -#, fuzzy -msgid "Response exceeds maximum property count" -msgstr "Svaret inneheld for mange header-felt." - -#: src/ne_redirect.c:92 -#, fuzzy, c-format -msgid "Could not parse redirect destination URL" -msgstr "Klarte ikkje tolka vidaresendingsadresse." - -#: src/ne_request.c:193 -#, fuzzy, c-format -msgid "%s: connection was closed by proxy server" -msgstr "%s: tilkoplinga vart lukka av mellomtenaren." - -#: src/ne_request.c:196 -#, fuzzy, c-format -msgid "%s: connection was closed by server" -msgstr "%s: tilkoplinga vart lukka av tenaren." - -#: src/ne_request.c:201 -#, fuzzy, c-format -msgid "%s: connection timed out" -msgstr "%s: sambandet vart tidsavbrote." - -#: src/ne_request.c:306 -msgid "offset invalid" -msgstr "" - -#: src/ne_request.c:311 -#, fuzzy, c-format -msgid "Could not seek to offset %s of request body file: %s" -msgstr "Klarte ikkje skriva til fil: %s" - -#: src/ne_request.c:359 -msgid "Could not send request body" -msgstr "Klarte ikkje senda førespurnad" - -#: src/ne_request.c:692 -msgid "Could not read chunk size" -msgstr "Klarte ikkje lesa storleik på oppdelt svar" - -#: src/ne_request.c:699 -msgid "Could not parse chunk size" -msgstr "Klarte ikkje tolka storleik på oppdelt svar" - -#: src/ne_request.c:736 -msgid "Could not read response body" -msgstr "Klarte ikkje lesa svar" - -#: src/ne_request.c:752 -#, fuzzy -msgid "Could not read chunk delimiter" -msgstr "Klarte ikkje lesa storleik på oppdelt svar" - -#: src/ne_request.c:755 -msgid "Chunk delimiter was invalid" -msgstr "" - -#: src/ne_request.c:861 -msgid "Could not read status line" -msgstr "Klarte ikkje lesa statuslinja" - -#: src/ne_request.c:883 -#, fuzzy -msgid "Could not parse response status line" -msgstr "Klarte ikkje tolka statuslinja i svaret." - -#: src/ne_request.c:895 -#, fuzzy -msgid "Could not read interim response headers" -msgstr "Klarte ikkje lesa svarlinje" - -#: src/ne_request.c:929 -msgid "Could not send request" -msgstr "Klarte ikkje senda førespurnad" - -#: src/ne_request.c:977 src/ne_request.c:995 src/ne_request.c:1005 -msgid "Error reading response headers" -msgstr "Feil ved lesing av svarhovud" - -#: src/ne_request.c:1023 -#, c-format -msgid "Response header too long" -msgstr "For langt svarhovud" - -#: src/ne_request.c:1105 -#, fuzzy -msgid "Response exceeded maximum number of header fields" -msgstr "Svaret inneheld for mange header-felt." - -#: src/ne_request.c:1122 -#, fuzzy, c-format -msgid "Could not resolve hostname `%s': %s" -msgstr "%s: Feil: Fann ikkje adressa til nettverksvert (%s).\n" - -#: src/ne_request.c:1233 -msgid "Unknown transfer-coding in response" -msgstr "" - -#: src/ne_request.c:1244 -msgid "Invalid Content-Length in response" -msgstr "" - -#: src/ne_request.c:1317 -#, c-format -msgid "Could not write to file: %s" -msgstr "Klarte ikkje skriva til fil: %s" - -#: src/ne_request.c:1390 -#, fuzzy, c-format -msgid "Could not create SSL connection through proxy server: %s" -msgstr "Klarte ikkje oppretta SSL-tilkopling til mellomtenar" - -#: src/ne_request.c:1437 -#, fuzzy, c-format -msgid "Could not create socket" -msgstr "Klarte ikkje forhandla SSL-økt" - -#: src/ne_request.c:1496 -msgid "Could not connect to proxy server" -msgstr "Klarte ikkje kopla til mellomtenar" - -#: src/ne_request.c:1497 -msgid "Could not connect to server" -msgstr "Klarte ikkje kopla til tenaren." - -#: src/ne_session.c:339 src/ne_session.c:350 -#, fuzzy -msgid "[invalid date]" -msgstr "[ugyldig dato]" - -#: src/ne_session.c:363 -#, fuzzy -msgid "certificate is not yet valid" -msgstr "Sertifikatet er gyldig" - -#: src/ne_session.c:364 -#, fuzzy -msgid "certificate has expired" -msgstr "Tenarsertifikatet er utgått på dato." - -#: src/ne_session.c:365 -#, fuzzy -msgid "certificate issued for a different hostname" -msgstr "Sertifikatet er utferda av:" - -#: src/ne_session.c:366 -msgid "issuer is not trusted" -msgstr "" - -#: src/ne_session.c:371 -#, fuzzy -msgid "Server certificate verification failed: " -msgstr "Tenarsertifikatet er utgått på dato." - -#: src/ne_socket.c:501 src/ne_socket.c:555 src/ne_socket.c:658 -#, fuzzy -msgid "Connection closed" -msgstr "Tilkoplinga vart lukka av tenaren" - -#: src/ne_socket.c:565 src/ne_socket.c:670 -#, fuzzy -msgid "Secure connection truncated" -msgstr "Sambandet vart tidsavbrote." - -#: src/ne_socket.c:577 src/ne_socket.c:682 -#, fuzzy, c-format -msgid "SSL error: %s" -msgstr "%s: Feil: %s\n" - -#: src/ne_socket.c:580 -#, c-format -msgid "SSL error code %d/%d/%lu" -msgstr "" - -#: src/ne_socket.c:663 -#, fuzzy, c-format -msgid "SSL alert received: %s" -msgstr "%s: Feil: %s\n" - -#: src/ne_socket.c:678 -msgid "SSL socket read failed" -msgstr "" - -#: src/ne_socket.c:777 -msgid "Line too long" -msgstr "For lang linje" - -#: src/ne_socket.c:917 src/ne_socket.c:923 -msgid "Host not found" -msgstr "Fann ikkje vert" - -#: src/ne_socket.c:1030 -#, fuzzy -msgid "Connection timed out" -msgstr "%s: sambandet vart tidsavbrote." - -#: src/ne_socket.c:1128 -msgid "Socket descriptor number exceeds FD_SETSIZE" -msgstr "" - -#: src/ne_socket.c:1342 -#, fuzzy -msgid "Client certificate verification failed" -msgstr "Tenarsertifikatet er utgått på dato." - -#: src/ne_socket.c:1358 -#, fuzzy -msgid "SSL disabled due to lack of entropy" -msgstr "SSL avslått grunna mangel på entropi" - -#: src/ne_socket.c:1365 -#, fuzzy -msgid "SSL disabled due to library version mismatch" -msgstr "SSL avslått grunna mangel på entropi" - -#: src/ne_socket.c:1371 -#, fuzzy -msgid "Could not create SSL structure" -msgstr "Klarte ikkje forhandla SSL-økt" - -#: src/ne_xml.c:280 -#, fuzzy, c-format -msgid "XML parse error at line %d: invalid element name" -msgstr "XML-tolkingsfeil på linje %d: %s." - -#: src/ne_xml.c:452 -#, fuzzy -msgid "Unknown error" -msgstr "Ukjend systemfeil" - -#: src/ne_xml.c:537 -msgid "Invalid Byte Order Mark" -msgstr "" - -#: src/ne_xml.c:625 -#, fuzzy, c-format -msgid "XML parse error at line %d: %s" -msgstr "XML-tolkingsfeil på linje %d: %s." - -#: src/ne_xmlreq.c:36 -#, fuzzy, c-format -msgid "Could not parse response: %s" -msgstr "Klarte ikkje lesa «LIST»-svar." - -#~ msgid "Server was not authenticated correctly." -#~ msgstr "Tenaren vart ikkje rett autentisert." - -#~ msgid "Proxy server was not authenticated correctly." -#~ msgstr "Mellomtenaren vart ikkje rett autentisert." - -#, fuzzy -#~ msgid " of request body file: %s" -#~ msgstr "Klarte ikkje skriva til fil: %s" diff --git a/client/neon-0.27.2/po/ru.gmo b/client/neon-0.27.2/po/ru.gmo deleted file mode 100644 index 9567ef00be4e284d22f6660b0cc448c72728ec19..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 373 zcmca7#4?qEfq{XMfq_AWfq_AVfq{XUfq_8>B*?(PV8Ot^V9m(DUDhpDr6iQMnO7shI5;OCx6_PU&i;7cAY_sz-Ep&?z3PDatOD)oM%}dTt Q$;?Z)Qm{zMEa74R0PRj_h5!Hn diff --git a/client/neon-0.27.2/po/ru.po b/client/neon-0.27.2/po/ru.po deleted file mode 100644 index e0cf364fa..000000000 --- a/client/neon-0.27.2/po/ru.po +++ /dev/null @@ -1,457 +0,0 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) Michael Sobolev, 1999 -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: sitecopy 0.11.5\n" -"Report-Msgid-Bugs-To: neon@webdav.org\n" -"POT-Creation-Date: 2007-09-25 10:21+0100\n" -"PO-Revision-Date: 2002-11-11 14:28+0000\n" -"Last-Translator: Michael Sobolev \n" -"Language-Team: ru\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=koi8-r\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/ne_207.c:198 -#, c-format -msgid "" -"Invalid HTTP status line in status element at line %d of response:\n" -"Status line was: %s" -msgstr "" - -#: src/ne_auth.c:130 -#, fuzzy, c-format -msgid "Could not authenticate to server: %s" -msgstr "%s: : : %s\n" - -#: src/ne_auth.c:135 -#, fuzzy, c-format -msgid "Could not authenticate to proxy server: %s" -msgstr "%s: : : %s\n" - -#: src/ne_auth.c:342 -#, c-format -msgid "rejected %s challenge" -msgstr "" - -#: src/ne_auth.c:358 -msgid "missing realm in Basic challenge" -msgstr "" - -#: src/ne_auth.c:453 -msgid "invalid Negotiate token" -msgstr "" - -#: src/ne_auth.c:476 -msgid "GSSAPI authentication error: " -msgstr "" - -#: src/ne_auth.c:489 -#, c-format -msgid "GSSAPI failure (code %u)" -msgstr "" - -#: src/ne_auth.c:524 -msgid "ignoring empty Negotiate continuation" -msgstr "" - -#: src/ne_auth.c:539 -#, c-format -msgid "Negotiate response verification failed: invalid response header token" -msgstr "" - -#: src/ne_auth.c:561 -#, c-format -msgid "Negotiate response verification failure: %s" -msgstr "" - -#: src/ne_auth.c:624 -msgid "unknown algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:628 -msgid "incompatible algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:632 -msgid "missing parameter in Digest challenge" -msgstr "" - -#: src/ne_auth.c:636 -msgid "initial Digest challenge was stale" -msgstr "" - -#: src/ne_auth.c:643 -msgid "stale Digest challenge with new algorithm or realm" -msgstr "" - -#: src/ne_auth.c:921 -#, c-format -msgid "Digest mutual authentication failure: missing parameters" -msgstr "" - -#: src/ne_auth.c:926 -#, c-format -msgid "Digest mutual authentication failure: client nonce mismatch" -msgstr "" - -#: src/ne_auth.c:936 -#, c-format -msgid "Digest mutual authentication failure: could not parse nonce count" -msgstr "" - -#: src/ne_auth.c:941 -#, c-format -msgid "Digest mutual authentication failure: nonce count mismatch (%u not %u)" -msgstr "" - -#: src/ne_auth.c:984 -#, c-format -msgid "Digest mutual authentication failure: request-digest mismatch" -msgstr "" - -#: src/ne_auth.c:1069 -msgid ", " -msgstr "" - -#: src/ne_auth.c:1110 -#, c-format -msgid "ignored %s challenge" -msgstr "" - -#: src/ne_auth.c:1186 -#, fuzzy -msgid "could not parse challenge" -msgstr "%s: : : %s\n" - -#: src/ne_basic.c:94 -#, fuzzy, c-format -msgid "Could not determine file size: %s" -msgstr "%s: : : %s\n" - -#: src/ne_basic.c:145 -#, c-format -msgid "Response did not include requested range" -msgstr "" - -#: src/ne_basic.c:179 -#, c-format -msgid "Range is not satisfiable" -msgstr "" - -#: src/ne_basic.c:184 -#, c-format -msgid "Resource does not support ranged GET requests" -msgstr "" - -#: src/ne_compress.c:173 -#, fuzzy, c-format -msgid "%s: %s" -msgstr "%s\n" - -#: src/ne_compress.c:184 -#, c-format -msgid "%s: %s (code %d)" -msgstr "" - -#: src/ne_compress.c:232 -#, fuzzy -msgid "Could not inflate data" -msgstr "%s: : : %s\n" - -#: src/ne_compress.c:293 -#, fuzzy -msgid "Could not initialize zlib" -msgstr "%s: : : %s\n" - -#: src/ne_gnutls.c:162 -#, c-format -msgid "[unprintable:#%lu]" -msgstr "" - -#: src/ne_gnutls.c:188 -msgid "[unprintable]" -msgstr "" - -#: src/ne_gnutls.c:685 src/ne_openssl.c:419 -#, c-format -msgid "Server certificate was missing commonName attribute in subject name" -msgstr "" - -#: src/ne_gnutls.c:721 src/ne_openssl.c:632 -#, fuzzy, c-format -msgid "SSL negotiation failed: %s" -msgstr "%s: : : %s\n" - -#: src/ne_gnutls.c:730 -#, c-format -msgid "Server did not send certificate chain" -msgstr "" - -#: src/ne_locks.c:584 -msgid "LOCK response missing Lock-Token header" -msgstr "" - -#: src/ne_locks.c:759 -#, c-format -msgid "Response missing activelock for %s" -msgstr "" - -#: src/ne_locks.c:801 -#, c-format -msgid "No activelock for <%s> returned in LOCK refresh response" -msgstr "" - -#: src/ne_openssl.c:451 -#, c-format -msgid "Certificate verification error: %s" -msgstr "" - -#: src/ne_openssl.c:651 -#, c-format -msgid "SSL server did not present certificate" -msgstr "" - -#: src/ne_openssl.c:660 -#, c-format -msgid "Server certificate changed: connection intercepted?" -msgstr "" - -#: src/ne_props.c:371 src/ne_props.c:411 -msgid "Response exceeds maximum property count" -msgstr "" - -#: src/ne_redirect.c:92 -#, fuzzy, c-format -msgid "Could not parse redirect destination URL" -msgstr "%s: : : %s\n" - -#: src/ne_request.c:193 -#, c-format -msgid "%s: connection was closed by proxy server" -msgstr "" - -#: src/ne_request.c:196 -#, c-format -msgid "%s: connection was closed by server" -msgstr "" - -#: src/ne_request.c:201 -#, c-format -msgid "%s: connection timed out" -msgstr "" - -#: src/ne_request.c:306 -msgid "offset invalid" -msgstr "" - -#: src/ne_request.c:311 -#, fuzzy, c-format -msgid "Could not seek to offset %s of request body file: %s" -msgstr "%s: : : %s\n" - -#: src/ne_request.c:359 -msgid "Could not send request body" -msgstr "" - -#: src/ne_request.c:692 -msgid "Could not read chunk size" -msgstr "" - -#: src/ne_request.c:699 -#, fuzzy -msgid "Could not parse chunk size" -msgstr "%s: : : %s\n" - -#: src/ne_request.c:736 -msgid "Could not read response body" -msgstr "" - -#: src/ne_request.c:752 -#, fuzzy -msgid "Could not read chunk delimiter" -msgstr "%s: : : %s\n" - -#: src/ne_request.c:755 -msgid "Chunk delimiter was invalid" -msgstr "" - -#: src/ne_request.c:861 -msgid "Could not read status line" -msgstr "" - -#: src/ne_request.c:883 -#, fuzzy -msgid "Could not parse response status line" -msgstr "%s: : : %s\n" - -#: src/ne_request.c:895 -#, fuzzy -msgid "Could not read interim response headers" -msgstr "%s: : : %s\n" - -#: src/ne_request.c:929 -msgid "Could not send request" -msgstr "" - -#: src/ne_request.c:977 src/ne_request.c:995 src/ne_request.c:1005 -msgid "Error reading response headers" -msgstr "" - -#: src/ne_request.c:1023 -#, c-format -msgid "Response header too long" -msgstr "" - -#: src/ne_request.c:1105 -msgid "Response exceeded maximum number of header fields" -msgstr "" - -#: src/ne_request.c:1122 -#, fuzzy, c-format -msgid "Could not resolve hostname `%s': %s" -msgstr "%s: : : %s.\n" - -#: src/ne_request.c:1233 -msgid "Unknown transfer-coding in response" -msgstr "" - -#: src/ne_request.c:1244 -msgid "Invalid Content-Length in response" -msgstr "" - -#: src/ne_request.c:1317 -#, fuzzy, c-format -msgid "Could not write to file: %s" -msgstr "%s: : : %s\n" - -#: src/ne_request.c:1390 -#, c-format -msgid "Could not create SSL connection through proxy server: %s" -msgstr "" - -#: src/ne_request.c:1437 -#, fuzzy, c-format -msgid "Could not create socket" -msgstr "%s: : : %s\n" - -#: src/ne_request.c:1496 -msgid "Could not connect to proxy server" -msgstr "" - -#: src/ne_request.c:1497 -msgid "Could not connect to server" -msgstr "" - -#: src/ne_session.c:339 src/ne_session.c:350 -msgid "[invalid date]" -msgstr "" - -#: src/ne_session.c:363 -msgid "certificate is not yet valid" -msgstr "" - -#: src/ne_session.c:364 -msgid "certificate has expired" -msgstr "" - -#: src/ne_session.c:365 -msgid "certificate issued for a different hostname" -msgstr "" - -#: src/ne_session.c:366 -msgid "issuer is not trusted" -msgstr "" - -#: src/ne_session.c:371 -msgid "Server certificate verification failed: " -msgstr "" - -#: src/ne_socket.c:501 src/ne_socket.c:555 src/ne_socket.c:658 -msgid "Connection closed" -msgstr "" - -#: src/ne_socket.c:565 src/ne_socket.c:670 -msgid "Secure connection truncated" -msgstr "" - -#: src/ne_socket.c:577 src/ne_socket.c:682 -#, c-format -msgid "SSL error: %s" -msgstr "" - -#: src/ne_socket.c:580 -#, c-format -msgid "SSL error code %d/%d/%lu" -msgstr "" - -#: src/ne_socket.c:663 -#, c-format -msgid "SSL alert received: %s" -msgstr "" - -#: src/ne_socket.c:678 -msgid "SSL socket read failed" -msgstr "" - -#: src/ne_socket.c:777 -msgid "Line too long" -msgstr "" - -#: src/ne_socket.c:917 src/ne_socket.c:923 -msgid "Host not found" -msgstr "" - -#: src/ne_socket.c:1030 -msgid "Connection timed out" -msgstr "" - -#: src/ne_socket.c:1128 -msgid "Socket descriptor number exceeds FD_SETSIZE" -msgstr "" - -#: src/ne_socket.c:1342 -msgid "Client certificate verification failed" -msgstr "" - -#: src/ne_socket.c:1358 -msgid "SSL disabled due to lack of entropy" -msgstr "" - -#: src/ne_socket.c:1365 -msgid "SSL disabled due to library version mismatch" -msgstr "" - -#: src/ne_socket.c:1371 -msgid "Could not create SSL structure" -msgstr "" - -#: src/ne_xml.c:280 -#, c-format -msgid "XML parse error at line %d: invalid element name" -msgstr "" - -#: src/ne_xml.c:452 -#, fuzzy -msgid "Unknown error" -msgstr " " - -#: src/ne_xml.c:537 -msgid "Invalid Byte Order Mark" -msgstr "" - -#: src/ne_xml.c:625 -#, c-format -msgid "XML parse error at line %d: %s" -msgstr "" - -#: src/ne_xmlreq.c:36 -#, fuzzy, c-format -msgid "Could not parse response: %s" -msgstr "%s: : : %s\n" - -#, fuzzy -#~ msgid " of request body file: %s" -#~ msgstr "%s: : : %s\n" diff --git a/client/neon-0.27.2/po/tr.gmo b/client/neon-0.27.2/po/tr.gmo deleted file mode 100644 index 7d74603c76157ea20d83ca170c27960be5fda103..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1513 zcmca7#4?qEfq{Xafq_AWfq`KP0|SFN0|NsOBS@5iA%l^DL6L!hA(N4TL7IVqp_`F` zL5hKaVL2lMgCqk3!y!h9zB^FypNtF)VhjunB1{nV+ECh^iGe|mfq@~JiGhKSfq|ik ziGd-Efq`Kn69WS;0|UbgCI$ux1_p+2ObiURj0_C?%n*BhSr`~(85kJySs?cHLh0o! z3=EZPU|?WifrcA50|NsmR1D-74k(+Afq{Vu z%4TrRFU?6&$jdKLNY2m8OHD3OD9KkSD9W#>R47g@DoZWGt^z}@AhD=8RUtW}G%s7B zII}7hNn25BVhSFaqSWGo{Ji2+g{1tHN_1_-C5a`a#R@r@dB`Rfr{<+76r~oHrWThV z=|C1nH?6!Vvm_Pdx3tWhR4WD5Vg}cuqWmHSkmEA*(iPyY$Vg30Ni8a7@W?MN0f$Rk zera9`gJ)h@Voqj?f=5V5fC7@M6f*N*+|-=Z+|;}hg~SrDdlghu6!O#H23v6jBmAOJ zo>&ZagimH3$W{3YIr(|%3_-A-Bp)gfP?VpQnp~pmnW7t(T2!2wpJ$~|oLQ2Z zoL^9>YoKQcLR>+q1^GoKy1vEfnJKzXrRl}GA^BDcd8zq%4&|vyDT!rz`9cMmbVDi&Qmqt9 zQY%XI3vv=O^Q;w;Ge8Ng#5S`yU)RFI)Kb?Hp%~^f>C4UvNON&Z#5_1z%{xSsPl?_NNdY-6|lwVm|QmT-c zmy`JKFH|3j%(o9ksd<^8M39on5Sf_ww?rW~wInZ7AwRn`4`Po?X;EpeLUCfr-=e=r z!gq^HQnMA(zvZQ*7QqaFh(QcMl~FBLNXaj*Of3GJm#9#gSoJqop)#=m<|K&4Ns0e* z{$}SSLaiw+%1+Hw$Veka0V302rp66#Plvb7IK?4Nrt`C0^!T_3| Bz(@c9 diff --git a/client/neon-0.27.2/po/tr.po b/client/neon-0.27.2/po/tr.po deleted file mode 100644 index 1cc58e693..000000000 --- a/client/neon-0.27.2/po/tr.po +++ /dev/null @@ -1,473 +0,0 @@ -# sitecopy localization for turkish (tr) -# Copyright (C) 2001 Free Software Foundation, Inc. -# A. Sinan Unur , 2001. -# -#, fuzzy -msgid "" -msgstr "" -"Project-Id-Version: sitecopy-0.10.10\n" -"Report-Msgid-Bugs-To: neon@webdav.org\n" -"POT-Creation-Date: 2007-09-25 10:21+0100\n" -"PO-Revision-Date: 2001-01-03 HO:MI+ZONE\n" -"Last-Translator: A. Sinan Unur \n" -"Language-Team: tr\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-9\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/ne_207.c:198 -#, c-format -msgid "" -"Invalid HTTP status line in status element at line %d of response:\n" -"Status line was: %s" -msgstr "" -"Invalid HTTP status line in status element at line %d of response:\n" -"Status line was: %s" - -#: src/ne_auth.c:130 -#, fuzzy, c-format -msgid "Could not authenticate to server: %s" -msgstr "Sunucuyla balant kurulamad" - -#: src/ne_auth.c:135 -#, fuzzy, c-format -msgid "Could not authenticate to proxy server: %s" -msgstr "Ara sunucuyla balant kurulamad" - -#: src/ne_auth.c:342 -#, c-format -msgid "rejected %s challenge" -msgstr "" - -#: src/ne_auth.c:358 -msgid "missing realm in Basic challenge" -msgstr "" - -#: src/ne_auth.c:453 -msgid "invalid Negotiate token" -msgstr "" - -#: src/ne_auth.c:476 -msgid "GSSAPI authentication error: " -msgstr "" - -#: src/ne_auth.c:489 -#, c-format -msgid "GSSAPI failure (code %u)" -msgstr "" - -#: src/ne_auth.c:524 -msgid "ignoring empty Negotiate continuation" -msgstr "" - -#: src/ne_auth.c:539 -#, c-format -msgid "Negotiate response verification failed: invalid response header token" -msgstr "" - -#: src/ne_auth.c:561 -#, c-format -msgid "Negotiate response verification failure: %s" -msgstr "" - -#: src/ne_auth.c:624 -msgid "unknown algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:628 -msgid "incompatible algorithm in Digest challenge" -msgstr "" - -#: src/ne_auth.c:632 -msgid "missing parameter in Digest challenge" -msgstr "" - -#: src/ne_auth.c:636 -msgid "initial Digest challenge was stale" -msgstr "" - -#: src/ne_auth.c:643 -msgid "stale Digest challenge with new algorithm or realm" -msgstr "" - -#: src/ne_auth.c:921 -#, c-format -msgid "Digest mutual authentication failure: missing parameters" -msgstr "" - -#: src/ne_auth.c:926 -#, c-format -msgid "Digest mutual authentication failure: client nonce mismatch" -msgstr "" - -#: src/ne_auth.c:936 -#, c-format -msgid "Digest mutual authentication failure: could not parse nonce count" -msgstr "" - -#: src/ne_auth.c:941 -#, c-format -msgid "Digest mutual authentication failure: nonce count mismatch (%u not %u)" -msgstr "" - -#: src/ne_auth.c:984 -#, c-format -msgid "Digest mutual authentication failure: request-digest mismatch" -msgstr "" - -#: src/ne_auth.c:1069 -msgid ", " -msgstr "" - -#: src/ne_auth.c:1110 -#, c-format -msgid "ignored %s challenge" -msgstr "" - -#: src/ne_auth.c:1186 -#, fuzzy -msgid "could not parse challenge" -msgstr "Para boyutu anlalamad" - -#: src/ne_basic.c:94 -#, fuzzy, c-format -msgid "Could not determine file size: %s" -msgstr "Dosya alamad: " - -#: src/ne_basic.c:145 -#, c-format -msgid "Response did not include requested range" -msgstr "" - -#: src/ne_basic.c:179 -#, c-format -msgid "Range is not satisfiable" -msgstr "" - -#: src/ne_basic.c:184 -#, fuzzy, c-format -msgid "Resource does not support ranged GET requests" -msgstr "Sunucu ksmi GET ilemini desteklemiyor." - -#: src/ne_compress.c:173 -#, fuzzy, c-format -msgid "%s: %s" -msgstr "%s: Hata: %s\n" - -#: src/ne_compress.c:184 -#, c-format -msgid "%s: %s (code %d)" -msgstr "" - -#: src/ne_compress.c:232 -#, fuzzy -msgid "Could not inflate data" -msgstr "Dosya alamad: " - -#: src/ne_compress.c:293 -#, fuzzy -msgid "Could not initialize zlib" -msgstr "Dosyaya yazm yaplamad: " - -#: src/ne_gnutls.c:162 -#, c-format -msgid "[unprintable:#%lu]" -msgstr "" - -#: src/ne_gnutls.c:188 -msgid "[unprintable]" -msgstr "" - -#: src/ne_gnutls.c:685 src/ne_openssl.c:419 -#, c-format -msgid "Server certificate was missing commonName attribute in subject name" -msgstr "" - -#: src/ne_gnutls.c:721 src/ne_openssl.c:632 -#, fuzzy, c-format -msgid "SSL negotiation failed: %s" -msgstr "%s dosyasna yazm yaplamad" - -#: src/ne_gnutls.c:730 -#, c-format -msgid "Server did not send certificate chain" -msgstr "" - -#: src/ne_locks.c:584 -msgid "LOCK response missing Lock-Token header" -msgstr "" - -#: src/ne_locks.c:759 -#, c-format -msgid "Response missing activelock for %s" -msgstr "" - -#: src/ne_locks.c:801 -#, c-format -msgid "No activelock for <%s> returned in LOCK refresh response" -msgstr "" - -#: src/ne_openssl.c:451 -#, c-format -msgid "Certificate verification error: %s" -msgstr "" - -#: src/ne_openssl.c:651 -#, c-format -msgid "SSL server did not present certificate" -msgstr "" - -#: src/ne_openssl.c:660 -#, c-format -msgid "Server certificate changed: connection intercepted?" -msgstr "" - -#: src/ne_props.c:371 src/ne_props.c:411 -msgid "Response exceeds maximum property count" -msgstr "" - -#: src/ne_redirect.c:92 -#, fuzzy, c-format -msgid "Could not parse redirect destination URL" -msgstr "Durum satr anlalamad." - -#: src/ne_request.c:193 -#, fuzzy, c-format -msgid "%s: connection was closed by proxy server" -msgstr "%s: balant ara sunucu tarafinden kesildi." - -#: src/ne_request.c:196 -#, fuzzy, c-format -msgid "%s: connection was closed by server" -msgstr "%s: balant sunucu tarafinden kesildi." - -#: src/ne_request.c:201 -#, fuzzy, c-format -msgid "%s: connection timed out" -msgstr "%s: balant bekleme snr ald." - -#: src/ne_request.c:306 -msgid "offset invalid" -msgstr "" - -#: src/ne_request.c:311 -#, fuzzy, c-format -msgid "Could not seek to offset %s of request body file: %s" -msgstr "%s dosyasna yazm yaplamad" - -#: src/ne_request.c:359 -msgid "Could not send request body" -msgstr "stek metni gnderilemedi" - -#: src/ne_request.c:692 -msgid "Could not read chunk size" -msgstr "Para boyutu renilemedi" - -#: src/ne_request.c:699 -msgid "Could not parse chunk size" -msgstr "Para boyutu anlalamad" - -#: src/ne_request.c:736 -msgid "Could not read response body" -msgstr "Yant metni okunamad" - -#: src/ne_request.c:752 -#, fuzzy -msgid "Could not read chunk delimiter" -msgstr "Para boyutu renilemedi" - -#: src/ne_request.c:755 -msgid "Chunk delimiter was invalid" -msgstr "" - -#: src/ne_request.c:861 -msgid "Could not read status line" -msgstr "Durum satr okunamad" - -#: src/ne_request.c:883 -#, fuzzy -msgid "Could not parse response status line" -msgstr "Durum satr anlalamad." - -#: src/ne_request.c:895 -#, fuzzy -msgid "Could not read interim response headers" -msgstr "Yant metni okunamad" - -#: src/ne_request.c:929 -msgid "Could not send request" -msgstr "stek gnderilemedi" - -#: src/ne_request.c:977 src/ne_request.c:995 src/ne_request.c:1005 -msgid "Error reading response headers" -msgstr "Yant balklar okunurken hata" - -#: src/ne_request.c:1023 -#, c-format -msgid "Response header too long" -msgstr "Yant bal ok uzun" - -#: src/ne_request.c:1105 -msgid "Response exceeded maximum number of header fields" -msgstr "" - -#: src/ne_request.c:1122 -#, fuzzy, c-format -msgid "Could not resolve hostname `%s': %s" -msgstr "%s: Hata: %s sunucusunun adresi bulunamad.\n" - -#: src/ne_request.c:1233 -msgid "Unknown transfer-coding in response" -msgstr "" - -#: src/ne_request.c:1244 -msgid "Invalid Content-Length in response" -msgstr "" - -#: src/ne_request.c:1317 -#, c-format -msgid "Could not write to file: %s" -msgstr "%s dosyasna yazm yaplamad" - -#: src/ne_request.c:1390 -#, fuzzy, c-format -msgid "Could not create SSL connection through proxy server: %s" -msgstr "Ara sunucu zerinden SSL balants kurulamad" - -#: src/ne_request.c:1437 -#, fuzzy, c-format -msgid "Could not create socket" -msgstr "SSL balants kurulamad" - -#: src/ne_request.c:1496 -msgid "Could not connect to proxy server" -msgstr "Ara sunucuyla balant kurulamad" - -#: src/ne_request.c:1497 -msgid "Could not connect to server" -msgstr "Sunucuyla balant kurulamad" - -#: src/ne_session.c:339 src/ne_session.c:350 -msgid "[invalid date]" -msgstr "" - -#: src/ne_session.c:363 -msgid "certificate is not yet valid" -msgstr "" - -#: src/ne_session.c:364 -msgid "certificate has expired" -msgstr "" - -#: src/ne_session.c:365 -msgid "certificate issued for a different hostname" -msgstr "" - -#: src/ne_session.c:366 -msgid "issuer is not trusted" -msgstr "" - -#: src/ne_session.c:371 -msgid "Server certificate verification failed: " -msgstr "" - -#: src/ne_socket.c:501 src/ne_socket.c:555 src/ne_socket.c:658 -#, fuzzy -msgid "Connection closed" -msgstr "Balant sunucu tarafndan kesildi" - -#: src/ne_socket.c:565 src/ne_socket.c:670 -#, fuzzy -msgid "Secure connection truncated" -msgstr "Balant sre snr ald." - -#: src/ne_socket.c:577 src/ne_socket.c:682 -#, fuzzy, c-format -msgid "SSL error: %s" -msgstr "%s: Hata: %s\n" - -#: src/ne_socket.c:580 -#, c-format -msgid "SSL error code %d/%d/%lu" -msgstr "" - -#: src/ne_socket.c:663 -#, fuzzy, c-format -msgid "SSL alert received: %s" -msgstr "%s: Hata: %s\n" - -#: src/ne_socket.c:678 -msgid "SSL socket read failed" -msgstr "" - -#: src/ne_socket.c:777 -msgid "Line too long" -msgstr "Satr ok uzun" - -#: src/ne_socket.c:917 src/ne_socket.c:923 -msgid "Host not found" -msgstr "Sunucu bulunamad" - -#: src/ne_socket.c:1030 -#, fuzzy -msgid "Connection timed out" -msgstr "%s: balant bekleme snr ald." - -#: src/ne_socket.c:1128 -msgid "Socket descriptor number exceeds FD_SETSIZE" -msgstr "" - -#: src/ne_socket.c:1342 -msgid "Client certificate verification failed" -msgstr "" - -#: src/ne_socket.c:1358 -msgid "SSL disabled due to lack of entropy" -msgstr "" - -#: src/ne_socket.c:1365 -msgid "SSL disabled due to library version mismatch" -msgstr "" - -#: src/ne_socket.c:1371 -#, fuzzy -msgid "Could not create SSL structure" -msgstr "SSL balants kurulamad" - -#: src/ne_xml.c:280 -#, fuzzy, c-format -msgid "XML parse error at line %d: invalid element name" -msgstr "" -"%s: kurulum dosyasnda bozukluk var. satr %d:\n" -"%s\n" - -#: src/ne_xml.c:452 -#, fuzzy -msgid "Unknown error" -msgstr "Bilinmeyen sistem hatas" - -#: src/ne_xml.c:537 -msgid "Invalid Byte Order Mark" -msgstr "" - -#: src/ne_xml.c:625 -#, fuzzy, c-format -msgid "XML parse error at line %d: %s" -msgstr "" -"%s: kurulum dosyasnda bozukluk var. satr %d:\n" -"%s\n" - -#: src/ne_xmlreq.c:36 -#, fuzzy, c-format -msgid "Could not parse response: %s" -msgstr "Yant metni okunamad" - -#~ msgid "Server was not authenticated correctly." -#~ msgstr "Server was not authenticated correctly." - -#~ msgid "Proxy server was not authenticated correctly." -#~ msgstr "Proxy server was not authenticated correctly." - -#, fuzzy -#~ msgid " of request body file: %s" -#~ msgstr "%s dosyasna yazm yaplamad" diff --git a/client/neon-0.27.2/po/zh.gmo b/client/neon-0.27.2/po/zh.gmo deleted file mode 100644 index 2286d0b5ad7ea6626e4734c31c9a3d01150bf722..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 5753 zcmca7#4?qEfq}u1fq_AWfq_AViGd-Kfq_AX1tiMAFoBhUfsKKIVInI7g8%~q!wgmi z1|l_RWwhRmma-0zRVmKKX_!t-%syQLkFm!VSN-8_)C(9fx(!8fx(mqVqYc?1A{XI1H&X91_o6I z28L@q3=G-~3=DsGAm(ZCGB6l0Fff?$Lj0G`3-MnWFC;wscp>Un^D;1qg2Dx=?kz6^ zgE1om!yjG-26hGp1_OQu1`!4Z1`B?OeqVkD1|bFphE#rt`z!bv7?h}Bh^AdoVp8(}oK-KjLKzM!~To?r*=9&sZ)O!d*%u5u6ghQnuBz{&2GB9{EFfd$#ipvQ>?DrRf=uZ`bq~{7D zhg7#J8VMIio25rL?$7lD}9FT%he&%nU2R0NVAj*39scV7hJ zpHCu?bfGNDz+le6z+f*5vALBl*@Ma^r~s(E0i{(C7gQF3Xiy#jl`}>l4zyeZm0O^+4=NI^7$ETh zk_MHF+#m)NgUU}s1_lOZC?7;|g344-xyZo4pa~LyVo(|3z`(#@#{h{RP+1Df&kU-? zRtl=cP)b1~IX@*;K{Z8_!8x_4Br`2DIk6;Fp)9os!pzLiQ%Ef;$}a-zan2~s%T`E9 z&B@HoEJ-a=C{HX_$jmEC%*jk)aL&n0%_~tz#$`%cVrEWi3WIZgUS4W)3CP^!ocv<2 zNNG-rLSBA}LNY{7p(J0SpeVnhQlU7ts4TUJ!8sp`3QW18RFKnygMAc=ONvU9OG=AU zk+njki}RDSQ%jJg^c{- zlDx#+RD}f9Vs*4oDo#z!2E|-{T3T^xiGpgeLVlV;QEFjnYH^7I$SQF7Vra@sfhj_A zN^vSe7_1jbuDmF-Bo$;4D7wJLxn!n;?8q%GDNW2#NGvVMNX;t&rDISc10}oCqEst| zWJvnV%g;+rRmjaO&P^;y&R`%;Z*FFBab{k+LP26tVlF7X6cectVq0>4XN>cMmbbV6u(n~TFGV|a`39iH=BqTrqDUE;>LAj|pskxv6 zAh86TdK6SsAPE4P(z${WDGO9?fMd?b-`N{(2`GTTq3n~NoUI#@pPiZqO~MR5pzK+a zpRbUUpO?hRT#{Lqnv=Fey$f$t+IGOiap2We9@iM}?G3NJ*5Lmz-0Yk_t9M=eSkf>0AyB%&5EJ>mHM75X!RDdPsq!yJZ6s0Do zW|pO*c7k?+}^y@^!$>{L~yAM%1}s7f)vB>fGa3UEe53mq-p?c z9;Da>CshTA2@Juh$)!c9utFc?w34FIJW%zM!VnBD_)#j8V4!DYrf0wvlvr|RvtQ(SVrI44JpXX4Xnv{}Qrk7uo&K2MvqU#K*!87yobX^ilQmqt>3=GV54J>ty zOce|btc(n`4GawoxB~ojgHp>fL3Sb3nduss>KYn?)R`J+8(0_^aQP$_m*|ERCFT|9 zB$j}hH#RBxdFjO&sd?#o#rb*Z4(YjxnK^pN`MGvnK8bnhrHSdOx*@5FxmF5Q8C<@e zzOD!_8R{8u!3xii%7RoYg_6{Y68(al#LPTvP*Nx=PA#zw4RO=8K&S&*ot9dp>zbFG zpOTrEZlz$6lv%>Xpj!NX&n$5J?ERiuplVd($?nC^7c_#~XfM_`KH0hK*@A^HSM@wy zvhl^1r4Yq0=gxb!dFu07El)ezo_20}zGfN2({+oUb!^Af!0=-Kyk~t&pSEs(Iejg| zlO4S;n)gD5IyQi;n$Y%aPVdvMg->U$K$k|Bc-k@h>F!;@!9LG-PkuJ91*#k(`gG}Z zkTq+kLq(r2T=#U{tmm^@o=t0ivU}UpCCi^~=!dxe#qz~Z`?{Y^-SDh;9mH1*Pdny5 zUEck)XBwz!1r>w3b@}3F^CmoNZ5K}4VI*!^VhWQ4@?u5Hg68ec5zfeC?K@npyDXLEMJ zn@CURta!10`?HNr5Zw^(L)`In-K-~jd!Ke}c-q+ieEDt#aNL6$=TPbXi7y)(A)28! zJVg?Mmzp6;6RV*S!*GuA7p zmcHN9^JGUagsq9sEQr6Mj)FV##roaw=yX z$^M1U8rMJBu@=;%d9kqP`K%U5ygzMie!gYFlO1az_ChQKwU8jvFBbN^-!qE~&UrRt zJ-9*zwM{@d6`al>LHcA@8=}zzN={Fgta>?h|MOWbU{1&OXVW&koYMGo9k@V%Ylisx z#r`QzXU}`GWB1dp6)&eWLes;u-3woA+YBhfhQ*{N|;240{+lOVYGWq7)-^J(h}SOMDpY}#4|xIqxj&!+5r+CSs{o>|Xk ztbaOT*^5Q1pLH*L*0Ji@l-*C;cfa2=A43CD@s2L{bk2$=J9fWZG~?-n-sj7qIT9XW zh^7ldAJjL{asyO-yqvs`0qz-4wr=l-L_AV!JR~DPT*MF!5qma$>9aZWV;LY}0EyTa``e#Q-v$+Wv3~~0k}30_P3>TK zwiZ-AfvUC{>!0k{1&Zqlpo|8|%Mg=aE^2(*KM|_?Y5zo!gBn^v-dnW#$^L~;cJGGf JXh>no002+QiBbRn diff --git a/client/neon-0.27.2/po/zh.po b/client/neon-0.27.2/po/zh.po deleted file mode 100644 index ba8fd6790..000000000 --- a/client/neon-0.27.2/po/zh.po +++ /dev/null @@ -1,458 +0,0 @@ -# The simplified chinese translation for neon. -# Dongsheng Song , 2006. -# -msgid "" -msgstr "" -"Project-Id-Version: sitecopy 0.26.0\n" -"Report-Msgid-Bugs-To: neon@webdav.org\n" -"POT-Creation-Date: 2007-09-25 10:21+0100\n" -"PO-Revision-Date: 2006-05-11 10:50+0800\n" -"Last-Translator: \n" -"Language-Team: zh\n" -"MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=UTF-8\n" -"Content-Transfer-Encoding: 8bit\n" - -#: src/ne_207.c:198 -#, c-format -msgid "" -"Invalid HTTP status line in status element at line %d of response:\n" -"Status line was: %s" -msgstr "" -"响应信息中 %d 行的状态元素中发现非法HTTP状态行:\n" -"状态行是: %s" - -#: src/ne_auth.c:130 -#, fuzzy, c-format -msgid "Could not authenticate to server: %s" -msgstr "不能连接到服务器" - -#: src/ne_auth.c:135 -#, fuzzy, c-format -msgid "Could not authenticate to proxy server: %s" -msgstr "不能连接到代理服务器" - -#: src/ne_auth.c:342 -#, c-format -msgid "rejected %s challenge" -msgstr "" - -#: src/ne_auth.c:358 -#, fuzzy -msgid "missing realm in Basic challenge" -msgstr "在摘要认证询问中丢失了现时或领域" - -#: src/ne_auth.c:453 -msgid "invalid Negotiate token" -msgstr "" - -#: src/ne_auth.c:476 -#, fuzzy -msgid "GSSAPI authentication error: " -msgstr "GSSAPI 认证错误 (%s)" - -#: src/ne_auth.c:489 -#, c-format -msgid "GSSAPI failure (code %u)" -msgstr "" - -#: src/ne_auth.c:524 -msgid "ignoring empty Negotiate continuation" -msgstr "" - -#: src/ne_auth.c:539 -#, c-format -msgid "Negotiate response verification failed: invalid response header token" -msgstr "" - -#: src/ne_auth.c:561 -#, fuzzy, c-format -msgid "Negotiate response verification failure: %s" -msgstr "服务器证书校验失败" - -#: src/ne_auth.c:624 -#, fuzzy -msgid "unknown algorithm in Digest challenge" -msgstr "在摘要认证询问中发现未知的算法" - -#: src/ne_auth.c:628 -#, fuzzy -msgid "incompatible algorithm in Digest challenge" -msgstr "在摘要认证询问中发现不兼容的算法" - -#: src/ne_auth.c:632 -#, fuzzy -msgid "missing parameter in Digest challenge" -msgstr "在摘要认证询问中丢失了现时或领域" - -#: src/ne_auth.c:636 -msgid "initial Digest challenge was stale" -msgstr "" - -#: src/ne_auth.c:643 -msgid "stale Digest challenge with new algorithm or realm" -msgstr "" - -#: src/ne_auth.c:921 -#, c-format -msgid "Digest mutual authentication failure: missing parameters" -msgstr "摘要互相认证失败:参数遗漏" - -#: src/ne_auth.c:926 -#, c-format -msgid "Digest mutual authentication failure: client nonce mismatch" -msgstr "摘要互相认证失败:客户现时不匹配" - -#: src/ne_auth.c:936 -#, fuzzy, c-format -msgid "Digest mutual authentication failure: could not parse nonce count" -msgstr "摘要互相认证失败:客户现时不匹配" - -#: src/ne_auth.c:941 -#, c-format -msgid "Digest mutual authentication failure: nonce count mismatch (%u not %u)" -msgstr "摘要互相认证失败:现时计算不匹配 (应该是 %u,不是 %u)" - -#: src/ne_auth.c:984 -#, c-format -msgid "Digest mutual authentication failure: request-digest mismatch" -msgstr "摘要互相认证失败:请求摘要不匹配" - -#: src/ne_auth.c:1069 -msgid ", " -msgstr "" - -#: src/ne_auth.c:1110 -#, c-format -msgid "ignored %s challenge" -msgstr "" - -#: src/ne_auth.c:1186 -#, fuzzy -msgid "could not parse challenge" -msgstr "不能解析块大小" - -#: src/ne_basic.c:94 -#, c-format -msgid "Could not determine file size: %s" -msgstr "不能确定的文件大小:%s" - -#: src/ne_basic.c:145 -#, c-format -msgid "Response did not include requested range" -msgstr "响应没有包含请求范围" - -#: src/ne_basic.c:179 -#, c-format -msgid "Range is not satisfiable" -msgstr "不能满足的范围" - -#: src/ne_basic.c:184 -#, fuzzy, c-format -msgid "Resource does not support ranged GET requests" -msgstr "资源不支持部分存取" - -#: src/ne_compress.c:173 -#, c-format -msgid "%s: %s" -msgstr "%s:%s" - -#: src/ne_compress.c:184 -#, c-format -msgid "%s: %s (code %d)" -msgstr "%s: %s (代码 %d)" - -#: src/ne_compress.c:232 -msgid "Could not inflate data" -msgstr "解压数据失败" - -#: src/ne_compress.c:293 -msgid "Could not initialize zlib" -msgstr "初始化zlib失败" - -#: src/ne_gnutls.c:162 -#, c-format -msgid "[unprintable:#%lu]" -msgstr "" - -#: src/ne_gnutls.c:188 -msgid "[unprintable]" -msgstr "" - -#: src/ne_gnutls.c:685 src/ne_openssl.c:419 -#, c-format -msgid "Server certificate was missing commonName attribute in subject name" -msgstr "服务器证书在主题名称遗漏了属性commonName" - -#: src/ne_gnutls.c:721 src/ne_openssl.c:632 -#, c-format -msgid "SSL negotiation failed: %s" -msgstr "SSL 协商失败:%s" - -#: src/ne_gnutls.c:730 -#, c-format -msgid "Server did not send certificate chain" -msgstr "服务器不能发送证书链" - -#: src/ne_locks.c:584 -msgid "LOCK response missing Lock-Token header" -msgstr "LOCK的响应遗漏了Lock-Token行" - -#: src/ne_locks.c:759 -#, c-format -msgid "Response missing activelock for %s" -msgstr "锁定 %s 的响应遗漏了主动锁" - -#: src/ne_locks.c:801 -#, c-format -msgid "No activelock for <%s> returned in LOCK refresh response" -msgstr "刷新锁定 %s 的响应没有返回主动锁" - -#: src/ne_openssl.c:451 -#, c-format -msgid "Certificate verification error: %s" -msgstr "证书校验失败:%s" - -#: src/ne_openssl.c:651 -#, c-format -msgid "SSL server did not present certificate" -msgstr "SSL 服务器不能呈现证书" - -#: src/ne_openssl.c:660 -#, c-format -msgid "Server certificate changed: connection intercepted?" -msgstr "服务器证书改变:是否被拦截攻击?" - -#: src/ne_props.c:371 src/ne_props.c:411 -msgid "Response exceeds maximum property count" -msgstr "响应超过了属性的最大计数" - -#: src/ne_redirect.c:92 -#, fuzzy, c-format -msgid "Could not parse redirect destination URL" -msgstr "不能解析重定向位置" - -#: src/ne_request.c:193 -#, fuzzy, c-format -msgid "%s: connection was closed by proxy server" -msgstr "%s:连接被代理服务器关闭" - -#: src/ne_request.c:196 -#, fuzzy, c-format -msgid "%s: connection was closed by server" -msgstr "%s:连接被服务器关闭" - -#: src/ne_request.c:201 -#, fuzzy, c-format -msgid "%s: connection timed out" -msgstr "%s:连接超时" - -#: src/ne_request.c:306 -msgid "offset invalid" -msgstr "非法偏移" - -#: src/ne_request.c:311 -#, c-format -msgid "Could not seek to offset %s of request body file: %s" -msgstr "在请求主体文件不能定位到偏移 %s: %s" - -#: src/ne_request.c:359 -msgid "Could not send request body" -msgstr "不能发送请求主体" - -#: src/ne_request.c:692 -msgid "Could not read chunk size" -msgstr "不能读块大小" - -#: src/ne_request.c:699 -msgid "Could not parse chunk size" -msgstr "不能解析块大小" - -#: src/ne_request.c:736 -msgid "Could not read response body" -msgstr "不能读取响应主体" - -#: src/ne_request.c:752 -msgid "Could not read chunk delimiter" -msgstr "不能读块分割符" - -#: src/ne_request.c:755 -msgid "Chunk delimiter was invalid" -msgstr "非法的分割符" - -#: src/ne_request.c:861 -msgid "Could not read status line" -msgstr "不能读状态行" - -#: src/ne_request.c:883 -#, fuzzy -msgid "Could not parse response status line" -msgstr "不能解析块状态行" - -#: src/ne_request.c:895 -msgid "Could not read interim response headers" -msgstr "不能读临时响应头" - -#: src/ne_request.c:929 -msgid "Could not send request" -msgstr "不能发送请求" - -#: src/ne_request.c:977 src/ne_request.c:995 src/ne_request.c:1005 -msgid "Error reading response headers" -msgstr "读取响应头出错" - -#: src/ne_request.c:1023 -#, c-format -msgid "Response header too long" -msgstr "响应头太长" - -#: src/ne_request.c:1105 -#, fuzzy -msgid "Response exceeded maximum number of header fields" -msgstr "响应域超出了最大数量" - -#: src/ne_request.c:1122 -#, c-format -msgid "Could not resolve hostname `%s': %s" -msgstr "不能解析主机`%s': %s" - -#: src/ne_request.c:1233 -msgid "Unknown transfer-coding in response" -msgstr "" - -#: src/ne_request.c:1244 -msgid "Invalid Content-Length in response" -msgstr "非法的Content-Length响应域" - -#: src/ne_request.c:1317 -#, c-format -msgid "Could not write to file: %s" -msgstr "不能写入文件:%s" - -#: src/ne_request.c:1390 -#, fuzzy, c-format -msgid "Could not create SSL connection through proxy server: %s" -msgstr "不能通过代理服务器创建SSL连接" - -#: src/ne_request.c:1437 -#, c-format -msgid "Could not create socket" -msgstr "不能创建套接字" - -#: src/ne_request.c:1496 -msgid "Could not connect to proxy server" -msgstr "不能连接到代理服务器" - -#: src/ne_request.c:1497 -msgid "Could not connect to server" -msgstr "不能连接到服务器" - -#: src/ne_session.c:339 src/ne_session.c:350 -msgid "[invalid date]" -msgstr "[非法日期]" - -#: src/ne_session.c:363 -msgid "certificate is not yet valid" -msgstr "证书还未生效" - -#: src/ne_session.c:364 -msgid "certificate has expired" -msgstr "证书已经过时" - -#: src/ne_session.c:365 -msgid "certificate issued for a different hostname" -msgstr "此证书是为不同的主机名称颁发" - -#: src/ne_session.c:366 -msgid "issuer is not trusted" -msgstr "证书发行者不被信任" - -#: src/ne_session.c:371 -msgid "Server certificate verification failed: " -msgstr "服务器证书校验失败" - -#: src/ne_socket.c:501 src/ne_socket.c:555 src/ne_socket.c:658 -msgid "Connection closed" -msgstr "连接关闭" - -#: src/ne_socket.c:565 src/ne_socket.c:670 -msgid "Secure connection truncated" -msgstr "安全连接切断" - -#: src/ne_socket.c:577 src/ne_socket.c:682 -#, c-format -msgid "SSL error: %s" -msgstr "SSL 错误:%s" - -#: src/ne_socket.c:580 -#, c-format -msgid "SSL error code %d/%d/%lu" -msgstr "SSL 错误代码 %d/%d/%lu" - -#: src/ne_socket.c:663 -#, c-format -msgid "SSL alert received: %s" -msgstr "收到SSL警报: %s" - -#: src/ne_socket.c:678 -msgid "SSL socket read failed" -msgstr "SSL 套接字读取失败" - -#: src/ne_socket.c:777 -msgid "Line too long" -msgstr "太长的行" - -#: src/ne_socket.c:917 src/ne_socket.c:923 -msgid "Host not found" -msgstr "没有发现主机" - -#: src/ne_socket.c:1030 -#, fuzzy -msgid "Connection timed out" -msgstr "%s:连接超时" - -#: src/ne_socket.c:1128 -msgid "Socket descriptor number exceeds FD_SETSIZE" -msgstr "套接字数量超过FD_SETSIZE" - -#: src/ne_socket.c:1342 -msgid "Client certificate verification failed" -msgstr "客户证书校验失败" - -#: src/ne_socket.c:1358 -msgid "SSL disabled due to lack of entropy" -msgstr "由于缺少熵,SSL已经禁用" - -#: src/ne_socket.c:1365 -msgid "SSL disabled due to library version mismatch" -msgstr "由于库版本不匹配,SSL已经禁用" - -#: src/ne_socket.c:1371 -msgid "Could not create SSL structure" -msgstr "不能创建SSL结构" - -#: src/ne_xml.c:280 -#, c-format -msgid "XML parse error at line %d: invalid element name" -msgstr "在%d行解析XML错误:非法元素名称" - -#: src/ne_xml.c:452 -msgid "Unknown error" -msgstr "未知错误" - -#: src/ne_xml.c:537 -msgid "Invalid Byte Order Mark" -msgstr "非法字节顺序标记(BOM)" - -#: src/ne_xml.c:625 -#, fuzzy, c-format -msgid "XML parse error at line %d: %s" -msgstr "在%d行解析XML错误:%s。" - -#: src/ne_xmlreq.c:36 -#, c-format -msgid "Could not parse response: %s" -msgstr "不能解析响应:%s" - -#~ msgid "No Lock-Token header given" -#~ msgstr "没有Lock-Token行" diff --git a/client/neon-0.27.2/src/COPYING.LIB b/client/neon-0.27.2/src/COPYING.LIB deleted file mode 100644 index 161a3d1d4..000000000 --- a/client/neon-0.27.2/src/COPYING.LIB +++ /dev/null @@ -1,482 +0,0 @@ - GNU LIBRARY GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1991 Free Software Foundation, Inc. - 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - -[This is the first released version of the library GPL. It is - numbered 2 because it goes with version 2 of the ordinary GPL.] - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -Licenses are intended to guarantee your freedom to share and change -free software--to make sure the software is free for all its users. - - This license, the Library General Public License, applies to some -specially designated Free Software Foundation software, and to any -other libraries whose authors decide to use it. You can use it for -your libraries, 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 -this service 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 make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if -you distribute copies of the library, or if you modify it. - - For example, if you distribute copies of the library, whether gratis -or for a fee, you must give the recipients all the rights that we gave -you. You must make sure that they, too, receive or can get the source -code. If you link a program with the library, you must provide -complete object files to the recipients so that they can relink them -with the library, after making changes to the library and recompiling -it. And you must show them these terms so they know their rights. - - Our method of protecting your rights has two steps: (1) copyright -the library, and (2) offer you this license which gives you legal -permission to copy, distribute and/or modify the library. - - Also, for each distributor's protection, we want to make certain -that everyone understands that there is no warranty for this free -library. If the library is modified by someone else and passed on, we -want its recipients to know that what they have is not the original -version, so that any problems introduced by others will not reflect on -the original authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that companies distributing free -software will individually obtain patent licenses, thus in effect -transforming the program into proprietary software. To prevent this, -we have made it clear that any patent must be licensed for everyone's -free use or not licensed at all. - - Most GNU software, including some libraries, is covered by the ordinary -GNU General Public License, which was designed for utility programs. This -license, the GNU Library General Public License, applies to certain -designated libraries. This license is quite different from the ordinary -one; be sure to read it in full, and don't assume that anything in it is -the same as in the ordinary license. - - The reason we have a separate public license for some libraries is that -they blur the distinction we usually make between modifying or adding to a -program and simply using it. Linking a program with a library, without -changing the library, is in some sense simply using the library, and is -analogous to running a utility program or application program. However, in -a textual and legal sense, the linked executable is a combined work, a -derivative of the original library, and the ordinary General Public License -treats it as such. - - Because of this blurred distinction, using the ordinary General -Public License for libraries did not effectively promote software -sharing, because most developers did not use the libraries. We -concluded that weaker conditions might promote sharing better. - - However, unrestricted linking of non-free programs would deprive the -users of those programs of all benefit from the free status of the -libraries themselves. This Library General Public License is intended to -permit developers of non-free programs to use free libraries, while -preserving your freedom as a user of such programs to change the free -libraries that are incorporated in them. (We have not seen how to achieve -this as regards changes in header files, but we have achieved it as regards -changes in the actual functions of the Library.) The hope is that this -will lead to faster development of free libraries. - - The precise terms and conditions for copying, distribution and -modification follow. Pay close attention to the difference between a -"work based on the library" and a "work that uses the library". The -former contains code derived from the library, while the latter only -works together with the library. - - Note that it is possible for a library to be covered by the ordinary -General Public License rather than by this special one. - - GNU LIBRARY GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library which -contains a notice placed by the copyright holder or other authorized -party saying it may be distributed under the terms of this Library -General Public License (also called "this License"). Each licensee is -addressed as "you". - - A "library" means a collection of software functions and/or data -prepared so as to be conveniently linked with application programs -(which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work -which has been distributed under these terms. A "work based on the -Library" means either the Library or any derivative work under -copyright law: that is to say, a work containing the Library or a -portion of it, either verbatim or with modifications and/or translated -straightforwardly into another language. (Hereinafter, translation is -included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for -making modifications to it. For a library, complete source code means -all the source code for all modules it contains, plus any associated -interface definition files, plus the scripts used to control compilation -and installation of the library. - - Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running a program using the Library is not restricted, and output from -such a program is covered only if its contents constitute a work based -on the Library (independent of the use of the Library in a tool for -writing it). Whether that is true depends on what the Library does -and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's -complete source code as you receive it, in any medium, provided that -you conspicuously and appropriately publish on each copy an -appropriate copyright notice and disclaimer of warranty; keep intact -all the notices that refer to this License and to the absence of any -warranty; and distribute a copy of this License along with the -Library. - - You may charge a fee for the physical act of transferring a copy, -and you may at your option offer warranty protection in exchange for a -fee. - - 2. You may modify your copy or copies of the Library or any portion -of it, thus forming a work based on the Library, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Library, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Library, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote -it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Library. - -In addition, mere aggregation of another work not based on the Library -with the Library (or with a work based on the Library) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public -License instead of this License to a given copy of the Library. To do -this, you must alter all the notices that refer to this License, so -that they refer to the ordinary GNU General Public License, version 2, -instead of to this License. (If a newer version than version 2 of the -ordinary GNU General Public License has appeared, then you can specify -that version instead if you wish.) Do not make any other change in -these notices. - - Once this change is made in a given copy, it is irreversible for -that copy, so the ordinary GNU General Public License applies to all -subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of -the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or -derivative of it, under Section 2) in object code or executable form -under the terms of Sections 1 and 2 above provided that you accompany -it with the complete corresponding machine-readable source code, which -must be distributed under the terms of Sections 1 and 2 above on a -medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy -from a designated place, then offering equivalent access to copy the -source code from the same place satisfies the requirement to -distribute the source code, even though third parties are not -compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the -Library, but is designed to work with the Library by being compiled or -linked with it, is called a "work that uses the Library". Such a -work, in isolation, is not a derivative work of the Library, and -therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library -creates an executable that is a derivative of the Library (because it -contains portions of the Library), rather than a "work that uses the -library". The executable is therefore covered by this License. -Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file -that is part of the Library, the object code for the work may be a -derivative work of the Library even though the source code is not. -Whether this is true is especially significant if the work can be -linked without the Library, or if the work is itself a library. The -threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data -structure layouts and accessors, and small macros and small inline -functions (ten lines or less in length), then the use of the object -file is unrestricted, regardless of whether it is legally a derivative -work. (Executables containing this object code plus portions of the -Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may -distribute the object code for the work under the terms of Section 6. -Any executables containing that work also fall under Section 6, -whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also compile or -link a "work that uses the Library" with the Library to produce a -work containing portions of the Library, and distribute that work -under terms of your choice, provided that the terms permit -modification of the work for the customer's own use and reverse -engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the -Library is used in it and that the Library and its use are covered by -this License. You must supply a copy of this License. If the work -during execution displays copyright notices, you must include the -copyright notice for the Library among them, as well as a reference -directing the user to the copy of this License. Also, you must do one -of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above); and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - c) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - d) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the -Library" must include any data and utility programs needed for -reproducing the executable from it. However, as a special exception, -the source code distributed need not include anything that is normally -distributed (in either source or binary form) with the major -components (compiler, kernel, and so on) of the operating system on -which the executable runs, unless that component itself accompanies -the executable. - - It may happen that this requirement contradicts the license -restrictions of other proprietary libraries that do not normally -accompany the operating system. Such a contradiction means you cannot -use both them and the Library together in an executable that you -distribute. - - 7. You may place library facilities that are a work based on the -Library side-by-side in a single library together with other library -facilities not covered by this License, and distribute such a combined -library, provided that the separate distribution of the work based on -the Library and of the other library facilities is otherwise -permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute -the Library except as expressly provided under this License. Any -attempt otherwise to copy, modify, sublicense, link with, or -distribute the Library is void, and will automatically terminate your -rights under this License. However, parties who have received copies, -or rights, from you under this License will not have their licenses -terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Library or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Library (or any work based on the -Library), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the -Library), the recipient automatically receives a license from the -original licensor to copy, distribute, link with or modify the Library -subject to these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 11. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -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 -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Library at all. For example, if a patent -license would not permit royalty-free redistribution of the Library by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Library. - -If any portion of this section is held invalid or unenforceable under any -particular circumstance, the balance of the section is intended to apply, -and the section as a whole is intended to apply in other circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Library under this License may add -an explicit geographical distribution limitation excluding those countries, -so that distribution is permitted only in or among countries not thus -excluded. In such case, this License incorporates the limitation as if -written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new -versions of the Library 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 Library -specifies a version number of this License which applies to it and -"any later version", you have the option of following the terms and -conditions either of that version or of any later version published by -the Free Software Foundation. If the Library does not specify a -license version number, you may choose any version ever published by -the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free -programs whose distribution conditions are incompatible with these, -write to the author to ask for permission. For software which is -copyrighted by the Free Software Foundation, write to the Free -Software Foundation; we sometimes make exceptions for this. Our -decision will be guided by the two goals of preserving the free status -of all derivatives of our free software and of promoting the sharing -and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO -WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. -EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR -OTHER PARTIES PROVIDE THE LIBRARY "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 -LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME -THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN -WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY -AND/OR REDISTRIBUTE THE LIBRARY 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 -LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF -SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH -DAMAGES. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest -possible use to the public, we recommend making it free software that -everyone can redistribute and change. You can do so by permitting -redistribution under these terms (or, alternatively, under the terms of the -ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is -safest to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least the -"copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - 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 - -Also add information on how to contact you by electronic and paper mail. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the library, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - -That's all there is to it! diff --git a/client/neon-0.27.2/src/ChangeLog b/client/neon-0.27.2/src/ChangeLog deleted file mode 100644 index 7859493c7..000000000 --- a/client/neon-0.27.2/src/ChangeLog +++ /dev/null @@ -1,5563 +0,0 @@ -Sun Sep 12 19:21:30 2004 Joe Orton - - * ne_locks.c (ne_lock_refresh): Fix to pass correct userdata to - callbacks, and do call lk_cdata. - -Sun Sep 12 18:53:15 2004 Joe Orton - - * Makefile.in (libneon.a): Remove the archive first, avoiding - strange problems when build $(OBJECTS) change. - -Sun Sep 12 18:40:50 2004 Joe Orton - - * ne_utils.h: Add NE_FEATURE_SOCKS. - - * ne_utils.c (ne_has_support): Add NE_FEATURE_SOCKS. - (version_string): Use NE_HAVE_SOCKS, add NE_HAVE_IDNA. - - * ne_socket.c (ne_sock_init): Use NE_HAVE_SOCKS. - -Sun Sep 12 17:29:54 2004 Joe Orton - - * ne_utils.c (version_string): Declare as array rather than - pointer; include "IPv6" component as necessary - -Sun Sep 12 15:51:38 2004 Joe Orton - - * ne_socket.c (ne_iaddr_typeof): New function. - -Sun Sep 12 12:00:10 2004 Joe Orton - - * ne_defs.h (ne_attribute_malloc): New macro. - - * ne_alloc.h: Use it to avoid warnings with older GCCs. - -Wed Aug 25 21:03:40 2004 Joe Orton - - * ne_string.h (split_string, split_string_c, pair_string, - split_string_free, pair_string_free): Remove obsolete interfaces. - -Wed Aug 25 21:01:03 2004 Joe Orton - - * ne_cookies.c, ne_cookies.h: Drop cookies support: used old spec - revision and wasn't very complete anyway. - -Wed Aug 25 20:40:26 2004 Joe Orton - - * ne_socket.c: Remove ne_read, ne_write macros and just use recv - and send; remove unused SOCK_ERR macro. - -Wed Aug 25 20:27:43 2004 Joe Orton - - * ne_xml.c (declare_nspaces): Drop rejection of names including a - colon to prevent breaking SVN deployments. - -Wed Aug 25 19:45:20 2004 Joe Orton - - * ne_socket.c (readable_raw): Use poll where available. - (ne_sock_connect): Fail if not using poll and fd returned by - socket() is greater than FD_SETSIZE. - -Wed Aug 25 18:40:28 2004 Joe Orton - - * ne_xml.h (ne_xml_parse): Clarify that a len=0 call is required - to signify end-of-document. - -Wed Aug 25 18:37:13 2004 Joe Orton - - * ne_request.c (resolve_first, resolve_next): New functions. - (lookup_host): Use them to allow user-forced addresses. - - * ne_session.c (ne_set_addrlist): New function. - - * ne_private.h (struct ne_session_s): Add addrlist, numaddrs, - curaddr fields. - -Wed Aug 25 18:25:31 2004 Joe Orton - - * ne_xml.c (struct ne_xml_parser_s): Add bom_pos field. - (ne_xml_parse): Skip over the UTF-8 Byte Order Mark since - the XML parsers do not support it yet. - -Wed Jul 7 16:07:44 2004 Joe Orton - - * ne_request.c (do_connect): Fix ne_conn_connected status call - (Shameek Basu). - -Mon Jul 5 18:40:35 2004 Joe Orton - - * ne_basic.c (ne_content_type_handler): Use us-ascii as default - charset for text/xml, as per RFC3280. - -Mon Jul 5 10:56:19 2004 Joe Orton - - * ne_compress.c (struct ne_decompress_s): Add acceptor field. - (gz_acceptor): New function. - (ne_decompress_reader): Fix to pass the user-supplied userdata - pointer to the user-supplied acceptor callback, via gz_acceptor. - -Mon Jul 5 10:52:40 2004 Joe Orton - - * ne_compress.c (do_inflate): Don't invoke the reader callback if - no bytes where produced by inflate(). - (process_footer): Call the reader callback with size=0 to indicate - end-of-response for a good checksum match. - -Sat Jul 3 14:33:56 2004 Joe Orton - - * ne_auth.c (auth_challenge): Fix to set got_qop in challenge - correctly (Hideaki Takahashi). - -Mon May 17 15:03:54 2004 Joe Orton - - * ne_socket.h (ne_addr_resolve): Clarify that 'flags' must - be passed as zero for forwards-compat. - -Sun May 2 21:14:14 2004 Joe Orton - - Fix buffer overflow in RFC1036 date parser, CVE CAN-2004-0389. - - * ne_dates.c (RFC1036_FORMAT): Specify maximum field with for day - name. - (ne_rfc1123_parse, ne_rfc1036_parse, ne_asctime_parse): Make - thread-safe; remove static buffers. - -Sun May 2 16:59:39 2004 Joe Orton - - * ne_dates.c [RFC1123_TEST] (main): Remove embedded test cases. - -Sun May 2 13:18:29 2004 Joe Orton - - * Makefile.in (LINK): Add -no-undefined. - -Fri Apr 16 22:53:59 2004 Joe Orton - - * ne_xml.c (declare_nspaces, expand_qname): Don't try to include - document context in error strings. - -Fri Apr 16 11:44:34 2004 Joe Orton - - * Makefile.in (LIBS): Include NEON_LTLIBS. - -Wed Apr 14 10:39:53 2004 Joe Orton - - Fix format string vulnerabilities, CVE CAN-2004-0179: - - * ne_207.c (ne_simple_request): Avoid format string - vulnerabilities. - - * ne_xml.c (ne_xml_set_error): Likewise. - - * ne_props.c (propfind): Likewise. - - * ne_locks.c (ne_lock, ne_lock_refresh): Likewise. - -Wed Apr 14 10:33:46 2004 Joe Orton - - * ne_auth.c (ah_post_send): Avoid false positives from gcc - -Wformat-security. - -Tue Apr 13 20:51:41 2004 Joe Orton - - * ne_auth.c: Conditionally include gssapi_generic.h. - -Thu Apr 8 13:40:03 2004 Joe Orton - - * ne_props.h: Don't use an anonymous enum for the proppatch - operation type, as some C++ compilers don't like it. - -Wed Apr 7 13:50:10 2004 Joe Orton - - * ne_request.c (add_fixed_headers): Don't both sending Keep-Alive - header if persistent connections are disabled. - -Wed Apr 7 13:47:46 2004 Joe Orton - - * ne_auth.c (auth_challenge): Allow Negotiate challenges from - a proxy. - -Wed Apr 7 13:36:55 2004 Joe Orton - - * ne_auth.c (clean_session): Remove redundant assignment of - GSS_C_NO_CONTEXT; gss_delete_sec_context already does this. - -Wed Apr 7 13:33:10 2004 Joe Orton - - * ne_auth.c (get_gss_name): Handle failure case internally. - (auth_register): Updated accordingly. - -Wed Apr 7 13:15:57 2004 Joe Orton - - * ne_request.c: Use strtoq to print off_t's where necessary. - -Wed Apr 7 11:14:24 2004 Joe Orton - - * ne_auth.c (get_gss_name): Take a hostname string. - (auth_register): Pass proxy or server hostname to get_gss_name as - appropriate. - -Wed Apr 7 11:09:50 2004 Joe Orton - - * ne_auth.c (continue_negotiate): If given no input token, and the - gssctx is not in the initial state, reset it. - -Mon Mar 29 17:06:49 2004 Joe Orton - - * ne_auth.c: Adjust to cope with GSSAPI continuation: - (struct auth_session_s): Store GSSAPI context, name and mechanism. - (get_gss_name): Take an ne_session. - (continue_negotiate): Renamed from gssapi_challenge; take input - token, handle GSS_S_CONTINUE_NEEDED return value. - (verify_digest_response): Renamed from verify_response. - (verify_negotiate_response): New function. - (auth_challenge): Cope with Negotiate responses which gratuitously - break the auth-param grammar. - (ah_post_send): Handle Negotiate responses. - (free_auth, clean_session): Free persisted GSSAPI objects. - (auth_register): Initialize GSSAPI objects. - -Sun Mar 28 03:03:17 2004 Joe Orton - - * ne_auth.c (get_gss_name): Don't leak token.value. - -Sun Mar 28 02:59:58 2004 Joe Orton - - * ne_auth.c (get_cnonce): Only use RAND_pseudo_bytes() if the PRNG - is seeded. - -Sun Mar 28 02:47:20 2004 Joe Orton - - * ne_auth.c (gssapi_challenge, get_gss_name): Simplify. - -Sun Mar 28 02:35:48 2004 Joe Orton - - * ne_auth.c (request_gssapi, get_gss_name, auth_challenge): - Implement the Negotiate protocol rather than the obsoleted - GSS-Negotiate. - (make_gss_error): New function. - (gssapi_challenge): Use it for better error handling (set session - error string); fix memory leaks. Don't delegate credentials. - -Sat Mar 27 20:49:24 2004 Joe Orton - - * ne_auth.c (ah_post_send): Clear auth header collector buffers - after each request. - -Fri Mar 26 12:16:15 2004 Joe Orton - - * ne_socket.c (init_ssl): Just initialize the SSL library; delay - seeding PRNG until really necessary (performance fix). - (seed_ssl_prng): Split from init_ssl. - (ne_sock_connect_ssl): Call seed_ssl_prng(). - (ne_sock_init): Adjust since init_ssl() can't fail. - -Fri Mar 26 12:01:38 2004 Joe Orton - - * ne_utils.c: Include zlib.h before ne_*.h to fix issues - on platforms where zconf.h does "#define const". - -Thu Mar 11 23:38:01 2004 Joe Orton - - * ne_openssl.c (provide_client_cert): Avoid malloc(0) when server - sends no CA names in CertificateRequest. - (ne_ssl_cert_write): Be paranoid and clear the OpenSSL error stack - on write failures. - -Sun Mar 7 11:17:04 2004 Joe Orton - - * Makefile.in (CFLAGS): Don't use NEON_CFLAGS. - -Mon Feb 23 23:03:08 2004 Joe Orton - - * ne_string.c (ne_vsnprintf, ne_snprintf): New functions. - -Sun Feb 22 23:34:47 2004 Joe Orton - - * ne_private.h (struct ne_session_s): Remove expect100_works field. - - * ne_request.c (ne_set_request_expect100): New function. - (ne_begin_request): Remove req->use_expect100 manipulation. - (send_request): Handle enabling 100continue without a request - body. - - * ne_session.c (ne_set_expect100): Removed function. - -Sun Feb 22 20:17:04 2004 Joe Orton - - * ne_socket.c (error_ossl): Check for ERR_reason_error_string - returning NULL. - -Sun Feb 22 17:54:43 2004 Joe Orton - - * ne_socket.c: Don't disable getaddrinfo support here. - -Sun Feb 22 17:40:07 2004 Joe Orton - - * ne_utils.h (min): Remove definition to... - - * ne_uri.c (min): ...here. - -Sun Feb 22 17:31:35 2004 Joe Orton - - * ne_props.h: Give the 'type' enum a tag name. - -Sun Feb 22 17:27:28 2004 Joe Orton - - * ne_207.c (end_element): Strip whitespace from cdata. - -Sun Feb 22 16:27:58 2004 Joe Orton - - * ne_auth.c (struct auth_request): Make auth_hdr, auth_info_hdr - fields into ne_buffer *'s. - (ah_collect_header): New function. - (ah_create): Create ne_buffers for auth_{,info_}hdr; use - ah_collect_header rather than ne_duplicate_header to fix handling - of multiple auth challenge headers. - (ah_post_send): Adjust for char * -> ne_buffer *. - (tokenize): Recognize a challenge scheme which is terminated with - a comma (i.e. with no challange parameters). - (auth_challenge): Fix handling of unrecognized challenges. - (ah_destroy): Destroy ne_buffers. - -Sun Feb 22 15:04:46 2004 Joe Orton - - * ne_request.c (ne_set_request_body_provider64): New function. - -Sun Feb 15 13:37:03 2004 Joe Orton - - * ne_ssl.h: Define that ne_ssl_readable_dname returns UTF-8 - encoded strings. - - * ne_openssl.c (ne_ssl_readable_dname): Convert dname strings to - UTF-8, or use "???". - -Sat Feb 14 21:57:25 2004 Joe Orton - - * ne_xml.c (invalid_ncname_ch1): New macro. - (declare_nspaces): Use it, to reject some more invalid namespace - prefixes; also check for a colon anywhere in the NCName. - (expand_qname): Likewise for the element name. - -Mon Feb 9 21:38:03 2004 Joe Orton - - * ne_dates.c [WIN32] (GMTOFF): Use gmt_to_local_win32; - (gmt_to_local_win32): New function, from Jiang Lei. - -Mon Jan 26 14:38:05 2004 Joe Orton - - * ne_socket.c (ne_sock_connect_ssl): Check that OpenSSL version - matches between library at run-time and headers at compile-time. - -Sat Jan 24 17:49:27 2004 Joe Orton - - * ne_dates.c (HAVE_STRUCT_TM___TM_GMTOFF): Alternative GMTOFF() - macro. - -Sat Jan 24 16:49:30 2004 Joe Orton - - * ne_auth.c (basic_challenge): Cast first parameter to ne_base64 - to unsigned char * to fix warnings with some compilers. - -Sat Jan 3 13:17:36 2004 Joe Orton - - * ne_request.h (ne_set_request_body_fd64): Define conditional on - NE_LFS. - - * ne_request.c (ne_set_request_body_fd64): Likewise. - -Thu Jan 1 18:01:45 2004 Joe Orton - - * ne_request.c: Use NE_HAVE_LFS not _LARGEFILE64_SOURCE in - conditional support for off64_t. - -Thu Jan 1 17:38:55 2004 Joe Orton - - * ne_request.h [_LARGEFILE64_SOURCE] (ne_set_request_body_fd64): - New function. - - * ne_request.c: Define ne_lseek, ne_off_t, ne_strtoff, - NE_OFFT_MAX, FMT_NE_OFF_T appropriately for _LARGEFILE64_SOURCE or - otherwise. - (struct ne_request_s): Use ne_off_t in place of off_t throughout. - (body_fd_send): Use ne_lseek; reset 'remain' after seeking. - (clength_hdr_handler): Use ne_off_t, ne_strtoff and NE_OFFT_MAX. - (set_body_length): Take an ne_off_t length parameter; use - FMT_NE_OFF_T to print it. - (ne_set_request_body_fd64): New function. - - * ne_utils.h (NE_FEATURE_LFS): New feature. - - * ne_utils.c (ne_has_support): Support NE_FEATURE_LFS. - -Mon Nov 24 20:13:14 2003 Joe Orton - - * ne_request.c (struct ne_response): Split handling for chunked vs - clength-delimited responses into a union. Use off_t for storing - whole-length-of-response values. - (read_response_block, ne_read_response_block): Update accordingly. - (ne_begin_request): Remove unnecessary variable assignments. - -Sun Nov 23 16:03:22 2003 Joe Orton - - * ne_request.h (ne_set_request_body_fd): Take offset and length - arguments, return void. - (ne_set_request_body_provider): Take off_t length argument. - - * ne_request.c (struct ne_request_s): Store current position - within buffer/file used as request body source. Store request - body lengths using off_t type. - (body_string_send): Adjust for renamed fields. - (body_fd_send): Seek to requested offset; don't read past - requested body length. - (set_body_length): Renamed from set_body_size. - - * ne_basic.c (ne_put): Determine file size here; adjust for new - ne_set_request_body_fd API. - -Sun Nov 23 15:05:12 2003 Joe Orton - - * ne_basic.c, ne_basic.h: Remove two-functions-in-one, - ne_put_if_unmodified. - -Fri Nov 14 14:05:32 2003 Joe Orton - - * ne_utils.c (ne_has_support): Add NE_FEATURE_IDNA. - -Fri Nov 14 13:11:49 2003 Joe Orton - - * ne_session.c (set_hostinfo): [NE_HAVE_LIBIDN]: Use string from - IDNA ToAscii operation on provided hostname if successful. - -Fri Nov 14 11:23:16 2003 Joe Orton - - All files: replace use of NEON_NODAV with NE_HAVE_DAV, NEON_SSL - with NE_HAVE_SSL, NEON_ZLIB with NE_HAVE_ZLIB. Use NE_HAVE_DAV - not USE_DAV_LOCKS. - - * ne_utils.c (ne_has_support): New feature detection interface, - replaces ne_supports_ssl. - -Thu Nov 13 20:38:28 2003 Joe Orton - - * ne_request.c (ne_begin_request): Presume a 205 response has no - message-body too; RFC2616 compliance fix. - -Thu Nov 13 20:31:07 2003 Joe Orton - - * ne_auth.c (ah_post_send): Treat a 401 response to a CONNECT - request as a valid proxy auth challenge, to work around buggy - proxies. - -Tue Nov 11 21:13:18 2003 Joe Orton - - Place library-internal symbols in the "ne__" namespace. - - * ne_request.c (ne__pull_request_body): Renamed from - ne_pull_request_body; all callers updated. - - * ne_session.c (ne__negotiate_ssl): Renamed from - ne_negotiate_ssl; all callers updated. - -Tue Nov 11 21:08:54 2003 Joe Orton - - * ne_alloc.h: Mark all allocation functions as having 'malloc' - attribute for GCC. - -Tue Nov 11 20:36:12 2003 Joe Orton - - * ne_xml.h (ne_xml_failure): Replaces ne_xml_valid, - inverted and more useful return value. - - * ne_xml.c (struct ne_xml_parser_s): Replace 'valid' field with - 'failure', with inverted logic. - (start_element, end_element, char_data): Check failure flag - appropriately. Set failure flag to return value of callback. - Set failure flag to positive integer on a parse error. - (ne_xml_create): Don't initialize failure flag. - (ne_xml_parse): Check/set failure flag appropriately. - (sax_error): Only set an error string (and the error flag) - if failure is zero. - - * ne_207.c (ne_simple_request): Adjust to use ne_xml_failure. - - * ne_locks.c (ne_lock, ne_lock_refresh): Likewise. - - * ne_props.c (propfind): Likewise. - -Wed Oct 22 22:19:19 2003 Joe Orton - - * ne_request.c (read_response_block): Treat an EOF without clean - SSL closure as a valid request body delimiter in any case. - -Wed Oct 22 21:44:48 2003 Joe Orton - - * ne_defs.h (ne_attribute): New macro. - - * ne_request.h, ne_session.h, ne_utils.h: Use ne_attribute instead - of littering #ifdef __GNUC__ and __attribute__ everywhere. - -Tue Oct 21 20:03:47 2003 Joe Orton - - Fix various strict signedness bugs: - - * ne_auth.c (auth_session): Make nonce_count argument unsigned. - (get_cnonce): Use unsigned data buffer. - (get_gss_name, gssapi_challenge): Use unsigned integers for status - variables. - (request_digest): Print nonce count as unsigned. - (verify_response): Make nonce_count unsigned. - -Tue Oct 7 20:52:06 2003 Joe Orton - - When using SSL via a proxy, don't leak server auth credentials to - the proxy, and vice versa. - - * ne_auth.c (auth_session): Add context field. - (ah_create): Ignore challenges in a bad context. - (ah_pre_send, ah_destroy): Check that the request-private cookie - is not NULL. - (auth_register): Take an isproxy flag; set context field - appropriately in session structure. - (ne_set_server_auth, ne_set_proxy_auth): Adjust accordingly. - -Tue Oct 7 19:58:52 2003 Joe Orton - - * ne_openssl.c (ne_negotiate_ssl): If the returned cert chain was - NULL, try and create one from the peer certificate alone (fix for - use of SSLv2 connections). - -Mon Sep 29 21:57:40 2003 Joe Orton - - * ne_auth.c [WIN32]: Include windows.h to fix non-SSL build. - -Thu Sep 25 20:05:18 2003 Joe Orton - - * ne_xml.c (ne_xml_create): Specify an initial error string. - -Sun Sep 21 23:00:10 2003 Joe Orton - - * ne_cookies.c (set_cookie_hdl): Strip whitespace around cookie - name and value. - -Sun Sep 14 10:50:01 2003 Joe Orton - - * ne_socket.c (ne_addr_resolve): Use result of autoconf test for - working AI_ADDRCONFIG support. - -Sat Sep 6 12:05:00 2003 Joe Orton - - * ne_openssl.c (check_identity): Take an optional server address - argument; check identity against IPaddress extension too if given. - (check_certificate): Optionally pass server address to - check_identity. - (populate_cert): Adjust accordingly. - -Thu Sep 4 21:41:38 2003 Joe Orton - - * ne_socket.c (ne_sock_init): Succeed even if PRNG was not seeded. - -Thu Sep 4 21:33:34 2003 Joe Orton - - * ne_session.c (ne_set_useragent): Build and store the entire - User-Agent header field in sess->user_agent. - - * ne_request.c (add_fixed_headers): Adjust accordingly; avoid - unnecessary calls to ne_buffer_*. - -Thu Sep 4 21:27:34 2003 Joe Orton - - * ne_socket.c: Include netinet/tcp.h. - (ne_sock_connect): Disable the Nagle algorithm; thanks to Jim - Whitehead and Teng Xu for the analysis. - -Thu Sep 4 11:24:04 2003 Joe Orton - - * ne_defs.h: Define ssize_t here for Win32. - - * ne_socket.h: Don't define ssize_t here. - -Tue Sep 2 20:20:16 2003 Joe Orton - - * ne_auth.c (auth_challenge): Update to use ne_token not - split_string, patch by Tom Lee . - -Wed Jul 30 21:54:38 2003 Joe Orton - - * ne_cookies.c (set_cookie_hdl): Fix NULL pointer dereference; - thanks to Markus Mueller . - -Fri Jul 25 11:05:52 2003 Joe Orton - - * ne_request.c (do_connect): On failure to connect, set error - string and call ne_sock_close directly rather than using - aborted(); fix leak of socket structure. - -Wed Jul 23 23:20:42 2003 Joe Orton - - Fix SEGV if inflateInit2 fails with Z_MEM_ERROR etc. - - * ne_compress.c (set_zlib_error): New function. - (do_inflate, gz_reader): Use it. - -Wed Jul 23 22:50:50 2003 Joe Orton - - Add support for GSS-Negotiate; patch from Risko Gergely and Burjan - Gabor: - - * ne_auth.c [HAVE_GSSAPI]: Include gssapi.h. - (auth_scheme): Add auth_scheme_gssapi. - (auth_session): Add gssapi_token. - (clean_session): Free gssapi_token. - (request_gssapi, get_gss_name, gssapi_challenge): New functions. - (tokenize): Handle challenge with single token. - (auth_challenge): Accept and process a GSS-Negotiate challenge. - (ah_pre_send): Send GSS-Negotiate handshake. - -Wed Jul 23 22:46:28 2003 Joe Orton - - * ne_207.c (ne_207_set_response_handlers, - ne_207_set_propstat_handlers): Fix to match declarations (thanks - to Diego Trtara). - -Fri Jun 27 20:30:45 2003 Joe Orton - - * ne_openssl.c [OPENSSL_VERSION_NUMBER < 0x0090700fL]: - Fix build against OpenSSL < 0.9.7. - -Sun Jun 22 23:07:45 2003 Joe Orton - - * ne_session.c (ne_session_destroy): Replace unnecessary use of - NE_FREE with ne_free. - (set_hostinfo): Don't free hostport/hostinfo here. - (ne_session_proxy): Free existing proxy hostname here if - necessary. - -Sat Jun 21 12:58:25 2003 Joe Orton - - * ne_request.c (ne_begin_request): Set or clear is_http11 flag - for each request. - -Wed Jun 18 20:54:44 2003 Joe Orton - - * ne_socket.c: Add AI_ADDRCONFIG support; - [USE_CHECK_IPV6]: Define only if __linux__. - (init_ipv6) [USE_CHECK_IPV6]: New conditional. - (ne_addr_resolve) [USE_ADDRCONFIG]: Use AI_ADDRCONFIG. - -Wed Jun 18 20:03:13 2003 Joe Orton - - * ne_socket.c (ne_sock_create): New function (renamed from - create_sock). - (ne_sock_connect): Take an ne_socket *, return int. - (ne_sock_accept): Likewise. - (ne_sock_close): Only call ne_close if fd is non-negative. - - * ne_request.c (aborted): Handle NE_SOCK_* errors specially. - (do_connect): Adapt for ne_sock_create/connect interface. Set - sess->connected here on success. - (open_connection): Don't set sess->connected here. - -Sun Jun 15 12:14:22 2003 Joe Orton - - * ne_ssl.h (ne_ssl_cert_digest): Pass digest as a pointer rather - than an array. - -Sun Jun 15 11:00:09 2003 Joe Orton - - * ne_stubssl.c (ne_ssl_cert_cmp): Add stub. - -Wed May 28 21:37:27 2003 Joe Orton - - * ne_openssl.c (ne_ssl_context_create): Enable workarounds in - OpenSSL for better interop with buggy SSL servers. - -Fri May 23 23:13:30 2003 Joe Orton - - * ne_stubssl.c (ne_ssl_set_clicert): Add stub. - -Sat May 10 17:05:26 2003 Joe Orton - - * ne_xml.c: Rename struct ne_xml_handler to struct handler. - -Thu May 8 20:55:46 2003 Joe Orton - - * ne_openssl.c (ne_ssl_clicert_read): Pass "b" to fopen. - -Tue May 6 22:08:08 2003 Joe Orton - - * ne_openssl.c (check_certificate): Re-order verify failure - handling to allow caller to set a custom session error string. - -Tue May 6 20:21:27 2003 Joe Orton - - * ne_md5.c (md5_stream): Restore. - -Sat Apr 26 19:21:03 2003 Joe Orton - - * ne_request.c (te_hdr_handler): Treat presence of any T-E - response header as implying the response is chunked, regardless of - value. - -Sat Apr 26 18:11:24 2003 Joe Orton - - * ne_xml.c: Rename struct ne_xml_nspace to struct namespace. - -Wed Apr 23 22:19:29 2003 Joe Orton - - * ne_openssl.c (ne_ssl_cert_export): Don't bother checking for - i2d_X509() failure; no OpenSSL code ever checks, so everyone's - doomed if it really can fail. - -Wed Apr 23 22:01:23 2003 Joe Orton - - * ne_openssl.c (ne_ssl_cert_import, ne_ssl_cert_export, - ne_ssl_cert_write): Clear OpenSSL error stack on errors. - -Wed Apr 23 18:23:53 2003 Joe Orton - - * ne_stubssl.c (ne_ssl_cert_write, ne_ssl_cert_import, - ne_ssl_cert_export): Add stubs. - -Wed Apr 23 14:05:32 2003 Joe Orton - - * ne_openssl.c (ne_ssl_cert_write): New function. - -Tue Apr 22 23:21:22 2003 Joe Orton - - * ne_string.c (ne_unbase64): Optimise out some redundant branches. - -Tue Apr 22 20:24:44 2003 Joe Orton - - * ne_openssl.c (ne_ssl_cert_export, ne_ssl_cert_import, - ne_ssl_cert_cmp): New functions. - -Tue Apr 22 18:31:55 2003 Joe Orton - - * ne_string.c (ne_unbase64): New function. - -Tue Apr 22 15:53:41 2003 Joe Orton - - * ne_string.c (ne_base64): Fix encoding binary data; take unsigned - argument. - -Tue Apr 22 13:07:48 2003 Joe Orton - - * ne_stubssl.c (ne_ssl_cert_validity): Add stub. - -Tue Apr 22 09:22:26 2003 Joe Orton - - * ne_openssl.c (ne_ssl_cert_validity): New function. - (asn1time_to_string): Format into a fixed-size buffer. - -Tue Apr 22 08:38:30 2003 Joe Orton - - * ne_locks.c (ne_lock_discover, ne_lock): Don't leak the cdata - buffer. - - * ne_props.c (ne_propfind_destroy): Don't leak the value buffer. - -Mon Apr 21 23:52:25 2003 Joe Orton - - * ne_xml.c (ne_xml_destroy): Free root element. - -Mon Apr 21 23:46:17 2003 Joe Orton - - * ne_openssl.c (dup_client_cert): Set decrypted state; dup the - friendly name. - (ne_ssl_clicert_free): Free friendly name. - -Mon Apr 21 19:44:55 2003 Joe Orton - - * ne_md5.h (ne_md5_buffer, ne_md5_stream): Remove unused - functions. - -Mon Apr 21 18:17:14 2003 Joe Orton - - * ne_locks.c, ne_207.c: s/NE_ELM_/ELM_/ since no element ids are - exported. - -Mon Apr 21 16:38:14 2003 Joe Orton - - Redesign the XML interface: have startelm callback map {nspace, - name} onto a state integer or decline. Remove "valid"/"invalid"; - don't abort the parse if no handler accepts an element. Push - cdata accumulation down into the caller; drop collect mode, - stripws mode. - - * ne_xml.h (ne_xml_elmid, struct ne_xml_elm): Removed. - (ne_xml_startelm_cb): Return a state/acceptance integer, take a - state integer, nspace, name and atts. - (ne_xml_endelm_cb, ne_xml_cdata_cb): Take a state integer. - (ne_xml_push_mixed_handler): Removed. - (ne_xml_push_handler): Removed element list argument. - (struct ne_xml_idmap, ne_xml_mapid): New interface. - - * ne_xml.c (struct element): Replaces ne_xml_state. Add name, - nspace, state fields. - (friendly_name, find_handler, parse_element, - ne_xml_push_mixed_handler, push_handler): Removed functions. - (declare_nspaces, expand_qname): Factored out from find_handler - and parse_element. - (start_element): Use expand_qname, declare_nspaces. Find - appropriate handler here. Guarantee not to pass a NULL atts array - to the start-element callback. Drop collect mode. - (end_element): Drop collect mode - (ne_xml_push_handler): Fold push_handler back in. - (ne_xml_mapid): New function. - - * ne_207.h (NE_ELM_*): Don't export element id. - (NE_207_STATE_PROP, NE_207_STATE_TOP): Export state integers. - - * ne_207.c (struct ne_207_parser_s): Add cdata field. - (map207): Replace element list with idmap array. - (can_handle): New function, replacing check_context logic. - (start_element): Determine new state integer; only accept the - element in valid states. Clear cdata. - (end_element): Use state rather than element id. Do nothing for - end of 'response' element if element is incomplete. - (ne_207_create): Create cdata buffer. - (ne_207_destroy): Destroy cdata buffer. - (ne_207_ignore_unknown): Removed function. - (ne_simple_request): Don't call ne_207_ignore_unknown. - - * ne_props.h (NE_PROPS_STATE_TOP): Define state. - - * ne_props.c (struct ne_propfind_handler_s): Add value and depth - fields. - (ELM_flatprop): Define state. - (flat_elms): Removed array. - (chardata): Append to value field when in ELM_flatprop state. - (startelm): Decline everything other than elements within the - 'prop' state. Collect flatprop contents. - (endelm): Collect flatprop contents. - - * ne_locks.c (struct discover_ctx, struct lock_ctx): Store cdata. - (element_map): Replace element list with idmap array. - (can_accept): Replaces check_context callback. - (ld_startelm, lk_cdata, ld_cdata): New functions. - -Mon Apr 14 00:04:20 2003 Joe Orton - - * ne_207.h (ne_207_start_response, ne_207_end_response, - ne_207_start_propstat, ne_207_end_propstat): Use ANSI-style - function pointers in typedefs. - - * ne_207.c (struct ne_207_parser_s): Updated accordingly. - -Mon Apr 14 00:02:10 2003 Joe Orton - - * ne_request.c (read_response_block): Better error messages for - invalid chunks, don't use strncmp for a two-character comparison. - -Mon Apr 7 22:26:50 2003 Joe Orton - - * ne_stubssl.c (ne_ssl_cert_identity): New function. - -Mon Apr 7 22:16:16 2003 Joe Orton - - * ne_openssl.c (struct ne_ssl_certificate_s): Add identity field. - (check_identity): Add optional identity argument. - (populate_cert): Retrieve cert identity using check_identity. - (check_certificate): Pass extra NULL to check_identity. - (ne_ssl_cert_identity): New function. - (ne_ssl_cert_free): Free the identity field. - -Mon Apr 7 21:29:54 2003 Joe Orton - - * ne_openssl.c (check_identity): Take a string hostname rather - than a session object. - (check_certificate): Adjust accordingly. - -Sun Apr 6 21:26:05 2003 Joe Orton - - * ne_string.h (NE_HEX2ASC): Cast result to char to avoid warnings - with some compilers. - -Sun Apr 6 20:11:42 2003 Joe Orton - - * ne_openssl.c (ne_ssl_readable_dname): Include commonName or - emailAddress in returned string if either is the only attribute. - -Sun Mar 30 10:54:20 2003 Joe Orton - - Split decryption of client certs into two steps - - * ne_openssl.c (ne_ssl_clicert_encrypted, ne_ssl_clicert_decrypt): - New functions. - (ne_ssl_client_cert_s): Add p12 and decrypted fields. - (find_friendly_name): New function. - (get_friendly_name): Removed function. - (ne_ssl_clicert_read): Drop password callback; on decrypt failure, - extract friendly name and set decrypted state of clicert. - -Sun Mar 30 10:54:01 2003 Joe Orton - - * ne_stubssl.c (ne_ssl_clicert_encrypted, ne_ssl_clicert_decrypt): - New stubs. - (ne_ssl_clicert_read): Adjusted for API change. - -Sat Mar 29 14:23:37 2003 Joe Orton - - * ne_openssl.c (ne_ssl_dname_cmp): New function. - - * ne_stubssl.c (ne_ssl_dname_cmp): New function. - -Sat Mar 29 13:52:47 2003 Joe Orton - - * ne_openssl.c (struct ne_ssl_client_cert_s): Add 'friendly_name' - field. - (get_friendly_name, ne_ssl_clicert_name): New functions. - (ne_ssl_clicert_read): Store the cert's friendly name. - - * ne_stubssl.c (ne_ssl_clicert_name): New function. - -Sat Mar 29 13:16:14 2003 Joe Orton - - * ne_openssl.c (ne_ssl_clicert_owner): New function. - -Fri Mar 28 22:12:57 2003 Joe Orton - - * ne_stubssl.c (ne_ssl_cert_digest): New function. - - * ne_openssl.c (ne_ssl_cert_digest): New function. - -Wed Mar 26 20:41:57 2003 Joe Orton - - * ne_session.c (ne_ssl_trust_cert) [NEON_SSL]: Only build when SSL - support is present. - -Wed Mar 26 20:01:00 2003 Joe Orton - - Begin abstraction of SSL layer to better isolate - SSL-library-specific code, and to improve certificate handling - interface. - - Drop support for PEM-encoded client certificates. - - * ne_session.h (ne_ssl_trust_cert): Replaces ne_ssl_load_ca, in - conjunction with ne_ssl_load_cert. - (ne_ssl_trust_default_ca): Replaces ne_ssl_load_default_ca. - (ne_ssl_keypw_prompt): Removed function, no longer needed. - (ne_ssl_set_clicert): Replaces ne_ssl_load_pkcs12, in conjunction - with ne_ssl_clicert_read. - (ne_ssl_provide_clicert): Replaces ne_ssl_provide_ccert, callback - type changed. - - * ne_openssl.c: New file; much code moved from ne_session.c. - - * ne_privssl.h: New file, private interface between ne_socket.c - and ne_openssl.c. - - * ne_ssl.h: New file. - - * ne_private.h (struct ne_session_s): Store pointers to - ne_ssl_client_cert etc opaque objects, not OpenSSL structures. - - * ne_session.c: Most of ne_ssl_* moved to ne_openssl.c. - (ne_session_create, ne_session_destroy): Use ne_ssl_cert_* etc to - manage cert objects. - - * ne_socket.c (struct ne_socket_s): Replace SSL *, SSL_CTX * - pointers with an ne_ssl_socket * pointer. - (readable_ossl, error_ossl, read_ossl, write_ossl, ne_sock_close): - Compensate for above change. - (ne_sock_use_ssl): Removed function. - (ne_sock_switch_ssl): Pass in SSL * as void for time being. - (ne_sock_connect_ssl): Renamed and cleaned up version of - ne_sock_use_ssl_os. - (ne_sock_sslsock): New function. - - * Makefile.in: Add deps for ne_openssl.c. - -Sun Mar 23 13:02:58 2003 Joe Orton - - * ne_session.c (ne_set_useragent): Use ne_malloc. - -Sat Mar 22 21:06:45 2003 Joe Orton - - * ne_socket.c (raw_connect): Fill in sin6_family or sin_family - since AIX 4.3 fails to do so. - -Wed Mar 19 20:44:11 2003 Joe Orton - - * ne_session.c [NEON_SSL] (free_client_cert): Build conditional on - NEON_SSL. - -Mon Mar 17 20:33:32 2003 Joe Orton - - * ne_socket.c: Include netdb.h conditional on HAVE_NETDB_H. (fix - build for older versions of CygWin). - -Sun Mar 16 23:30:20 2003 Joe Orton - - * ne_session.c (check_identity): Fix leak of subject alt. name - structures. - -Sun Mar 16 19:21:22 2003 Joe Orton - - * ne_session.c (free_client_cert): New function. - (ne_session_destroy, ne_ssl_load_pem, ne_ssl_load_pkcs12): Call - it; prevent memory leak if ne_ssl_load_{pem,pkcs12} are called >1 - per session. - -Sun Mar 16 18:00:34 2003 Joe Orton - - * ne_session.c (provide_client_cert): Free peer certificate after - use. - (ne_session_destroy): Free client cert and key if present. - -Sun Mar 16 14:23:05 2003 Joe Orton - - * ne_xml.c [HAVE_EXPAT]: Include xmlparse.h for bundled expat - build. - - * ne_utils.c: Only include expat.h if HAVE_XMLPARSE_H is not - defined. - -Wed Mar 12 15:04:13 2003 Joe Orton - - * ne_redirect.c (struct redirect): Add 'valid' field. - (post_send): Set and clear 'valid' to keep track of whether stored - URI is valid. - (ne_redirect_location): Return NULL if stored URI is not valid. - -Wed Mar 12 14:52:49 2003 Joe Orton - - * ne_uri.c (ne_uri_free): Zero-initialize structure after - free'ing. - -Tue Mar 11 22:01:11 2003 Joe Orton - - * ne_redirect.c (ne_redirect_location): Return NULL if no redirect - session is registered, rather than SEGV; Ralf Mattes - . - -Sun Mar 9 16:33:24 2003 Joe Orton - - Fix a memory leak if an XML parse error occurs during a PROPFIND - response: - - * ne_props.c (ne_propfind_current_private): Return NULL if no - propset is being processed. - (free_propset): Free propset href here. - (end_response): Don't free propset href here. Set current field - of handler to NULL after free'ing propset. - (ne_propfind_destroy): Free current propset if one was being - processed. - -Sun Mar 9 11:53:58 2003 Joe Orton - - * ne_207.c (ne_207_destroy): Fix possible leak of reason_phrase - string. - -Sun Mar 9 11:01:15 2003 Joe Orton - - * ne_utils.c (ne_parse_statusline): Use ne_strclean. - - * ne_session.c (ne_get_error): Use ne_strclean. - -Sun Mar 9 10:53:52 2003 Joe Orton - - * ne_xml.c: Remove broken "UTF-8 decoding" support used for libxml - 1.x. - -Sun Mar 9 09:55:26 2003 Joe Orton - - * ne_xml.c: Drop support for expat < 1.95.0 and libxml 1.x. - - * ne_utils.c (version_string): Include expat version string. - -Sun Mar 9 09:54:00 2003 Joe Orton - - * ne_socket.c: Don't declare h_errno on Win32 either. - -Sun Mar 9 08:49:40 2003 Joe Orton - - * ne_string.c (do_concat) [HAVE_STPCPY]: Use stpcpy rather than - strlen/memcpy, when available. - -Mon Mar 3 22:17:04 2003 Joe Orton - - * ne_socket.c [!USE_GETADDRINFO && !HAVE_DECL_H_ERRNO): Declare - h_errno (fix build on SCO OpenServer 5.0). - -Sat Mar 1 21:22:19 2003 Joe Orton - - * ne_redirect.c (free_redirect): Fix once-per-session memory leak. - -Sat Mar 1 20:23:47 2003 Joe Orton - - Add implemention of simple memory leak tracking, for testing - purposes. - - * ne_alloc.c [NEON_MEMLEAK] (tracking_malloc, ne_free_ml, - ne_malloc_ml, ne_calloc_ml, ne_realloc_ml, ne_strdup_ml, - ne_strndup_ml, ne_memleak_dump): New functions. - - * memleak.h: New header. - -Sat Mar 1 13:44:26 2003 Joe Orton - - First step towards automated memory leak tests. - - * ne_alloc.c (ne_free): New function. - - * All files: replace use of free() with ne_free(). - -Sat Mar 1 09:48:39 2003 Joe Orton - - * ne_uri.c (ne_path_unescape): Fix memory leak on invalid URI. - -Sat Mar 1 08:03:18 2003 Joe Orton - - * ne_string.c (ne_strclean): New function. - -Wed Feb 26 21:45:12 2003 Joe Orton - - * ne_request.c (ne_begin_request, proxy_tunnel, open_connection) - [NEON_SSL] Don't build CONNECT tunnel support code if SSL is not - supported. - -Wed Feb 26 21:44:18 2003 Joe Orton - - * ne_utils.c (ne_debug_init): Allow ne_debug_init(NULL, 0) to turn - off debugging. Fix to produce debug output if the any of the - specified "channels" are active, not all. (also fixing - NE_DBG_FLUSH support). - -Tue Feb 25 23:12:31 2003 Joe Orton - - * ne_compress.c (process_footer): Mention number of extra bytes in - error message for oversized footer. - -Sun Feb 23 21:19:20 2003 Joe Orton - - * ne_auth.c (verify_response): Fix to parse nonce count as hex - string rather than decimal; fix verification of >9 responses. - -Thu Feb 13 20:35:45 2003 Joe Orton - - * ne_session.c (ne_set_useragent): Fix to append "neon/x.y.z" to - application-supplied token rather prepend. - -Thu Feb 13 09:06:22 2003 Joe Orton - - * ne_request.c (open_connection): Fix for CONNECT tunnelling - (regression since 0.23.x), thanks to Nathan Hand - . - -Mon Feb 3 22:10:54 2003 Joe Orton - - Implement Daniel Stenberg's trick to avoid the slow AF_UNSPEC - lookups on Linux: - - * ne_socket.c (init_ipv6, ipv6_disabled): New function and global. - (ne_sock_init): Call init_ipv6. - (ne_addr_resolve) [USE_GETADDRINFO]: Pass AF_INET in hints if - ipv6_disabled is set. - -Mon Feb 3 20:55:47 2003 Joe Orton - - * ne_socket.c [__hpux && USE_GETADDRINFO]: Undefine - USE_GETADDRINFO to work around broken implementation in HP-UX - 11.11. - -Mon Jan 27 21:39:31 2003 Joe Orton - - * ne_socket.c (write_raw): Fix for handling EINTR during write(), - from Sergey N Ushakov. - -Thu Jan 16 21:59:03 2003 Joe Orton - - Allow _init after _finish to succeed: Sergey N Ushakov. - * ne_socket.c (init_result): New global variable. - (ne_sock_init): Use init_result global rather than result. - (ne_sock_finish): Clear init_result. - -Fri Dec 27 17:03:17 2002 Joe Orton - - * ne_request.c (build_request): Remove redundant call to - ne_buffer_clear. - -Fri Dec 27 14:38:08 2002 Joe Orton - - * ne_request.c (ne_request_create): strdup the method string. - (ne_request_destroy): free the method. - -Mon Dec 23 17:04:32 2002 Joe Orton - - * ne_socket.c (ne_write, ne_read, ne_close, ne_errno): Renamed - macros from NEON_WRITE, NEON_READ, NEON_CLOSE, NEON_ERRNO. - All callers changed. - -Mon Dec 23 16:58:43 2002 Joe Orton - - Add proper Win32 socket error handling, merged efforts of Johan - Lindh and Sergey N Ushakov : - - * ne_socket.c (ne_errno, NE_ISINTR, NE_ISRESET, NE_ISCLOSED): New - macros. - [WIN32] (print_error): New function. - (set_strerror) [WIN32]: Use print_error. - (readable_raw, read_raw, write_raw): Use new error handling - macros. - (ne_addr_resolve) [WIN32]: Use WSAGetLastError() rather than - h_errno. - (ne_addr_error) [WIN32]: Use print_error. - -Tue Dec 10 21:41:26 2002 Joe Orton - - * ne_socket.c (ne_iaddr_print): Renamed from ne_addr_print for - consistency with other ne_iaddr_ functions. - -Sun Dec 8 20:08:31 2002 Joe Orton - - * ne_auth.c (get_cnonce): Use GetCurrentThreadId() on Win32. - -Sun Nov 24 18:45:32 2002 Joe Orton - - * ne_auth.c: Remove qop_values and algorithm_names arrays. - (request_digest): Inlined qop, algorithm name lookups accordingly. - -Sun Nov 24 16:45:39 2002 Joe Orton - - * ne_auth.h: Renamed ne_request_auth typedef to ne_auth_creds. - - * ne_auth.c (auth_session): Renamed reqcreds, recreds_ud fields to - creds, userdata. - (auth_register, ne_set_proxy_auth, ne_set_server_auth): Update for - ne_request_auth rename. - -Fri Nov 22 17:39:35 2002 Joe Orton - - * ne_auth.c (auth_challenge): Fix support for RFC2617-style digest - auth; notice the qop= parameter in challenge. Fix leak of parsed - qop array. - -Fri Nov 22 17:08:01 2002 Joe Orton - - * ne_auth.c (get_cnonce): Rewrite to use either pseudo-random data - from the SSL library (if available), or really-not-random data - from gettimeofday/getpid otherwise. - -Sun Nov 17 22:13:49 2002 Joe Orton - - * ne_socket.c (ne_addr_print) [USE_GETADDRINFO]: Use the SACAST() - macro. - -Sun Nov 17 19:29:23 2002 Joe Orton - - * ne_socket.c (ne_sock_connect): Make address argument const. - (raw_connect): Make address argument const; adjust to use a copy - of the sockaddr structure, which is correct anyway. - (ne_addr_first, ne_addr_next): Make return pointer const. - - * ne_private.h (struct host_info): Store current address as const. - -Sun Nov 17 19:03:01 2002 Joe Orton - - * ne_socket.c (ne_register_progress): Removed function. - - * ne_socket.h (ne_block_reader, ne_progress, - ne_register_progress): Removed. - - * ne_request.c (do_connect): Don't call ne_register_progress. - - * ne_request.h: Add ne_block_reader typedef. - - * ne_session.h: Include sys/types.h; add ne_progress typedef. - -Sun Nov 17 18:59:29 2002 Joe Orton - - * ne_socket.c (ne_iaddr_make, ne_iaddr_cmp, ne_iaddr_free): - New functions. - -Mon Nov 11 19:51:24 2002 Joe Orton - - Allow discovery of document encoding. - - * ne_xml.c [HAVE_EXPAT]: (struct ne_xml_parser_s): Add encoding - field. (decl_handler): New function. - (ne_xml_doc_encoding): New function. - -Mon Nov 11 19:48:43 2002 Joe Orton - - * ne_xml.c (sax_handler): Use sax_error for fatal error callback. - -Fri Oct 11 23:50:01 2002 Joe Orton - - * ne_private.h (struct ne_session_s): Change 'connected' to be a - simple boolean flag. - - * ne_session.c (ne_close_connection): Treat 'connected' as a - boolean. - - * ne_request.c (open_connection): Greatly simplified. - -Fri Oct 11 00:46:52 2002 Joe Orton - - * ne_props.c (end_propstat): Fix NULL pointer dereference - if no status object is given. - -Tue Oct 8 20:10:24 2002 Joe Orton - - * ne_xml.c (ne_xml_create) [!HAVE_EXPAT]: Set 'replaceEntities' - flag in created parser so that entities are dereferenced in - attribute values. - -Mon Oct 7 22:08:46 2002 Joe Orton - - * ne_socket.c (init_ssl): Attempt to seed PRNG using EGD socket at - path EGD_PATH or a set of predetermined locations if EGD_PATH is - not defined. No longer try $EGDSOCKET or $HOME/.entropy. - -Mon Oct 7 21:32:33 2002 Joe Orton - - * ne_auth.c (register_hooks): Removed function. - (auth_register): Fold in register_hooks. - -Tue Sep 24 21:24:44 2002 Joe Orton - - * ne_request.c (ne_request_create): Pass Request-URI to - create_request hooks. - -Tue Sep 24 20:42:45 2002 Joe Orton - - * ne_socket.c [__hpux]: Define _XOPEN_SOURCE_EXTENDED to 1, to - pick up h_errno definition on HP-UX 10.20. - -Wed Sep 18 21:46:28 2002 Joe Orton - - * ne_compress.c (struct ne_decompress_s): Add zstrinit field. - (gz_reader): Set zstrinit after inflateInit2 succeeds. - (ne_decompress_destroy): Only call inflateEnd if zstrinit is set. - -Wed Sep 18 19:56:00 2002 Joe Orton - - * ne_auth.c: Remove incomplete domain support. - -Tue Sep 17 21:05:11 2002 Joe Orton - - Fix rejection of server certificates which have commonName as the - least specific attribute. - - * ne_session.c (check_identity): Don't ignore commonName if it is - the least specific attribute. - -Tue Sep 10 21:08:18 2002 Joe Orton - - * ne_request.c (lookup_host): Destroy cached address if resolve - fails; fix segfault if a second request in the session is - dispatched after the DNS lookup fails on the first. - -Mon Sep 9 22:26:03 2002 Joe Orton - - * ne_request.c (RETRY_RET): Treat SSL truncation as a legitimate - persistent connection timeout. - -Fri Aug 30 21:58:45 2002 Joe Orton - - * ne_request.c (read_response_block): Clear can_persist flag if an - EOF was read (fix for read-till-EOF response terminated by an - unclean SSL shutdown). - -Mon Aug 26 18:05:00 2002 Joe Orton - - * ne_socket.c: Fix HAVE_LIMITS check (Blair Zajac). - -Sun Aug 25 23:29:06 2002 Joe Orton - - * ne_request.c (do_connect): Add debug message for connection - attempt. - -Sun Aug 25 22:54:04 2002 Joe Orton - - * ne_socket.h (ne_addr_print): Make address argument const. - -Sun Aug 25 11:52:32 2002 Joe Orton - - * ne_socket.c (ne_addr_print): New function. - -Sun Aug 25 10:09:10 2002 Joe Orton - - Fix interop with Tomcat/3.2 SSL server, which performs an unclean - shutdown on an HTTP/1.0 response without a C-L header. - - * ne_request.c (read_response_block): Ignore SSL connection - truncation for a read-till-EOF response, where no reseponse - content has been read yet. - (ne_read_response_block): Always increase 'total' counter. - -Sun Aug 25 08:47:41 2002 Joe Orton - - * ne_request.c (aborted): Handle code=0 case specifically, and - NE_SOCK_* as default. - -Sun Aug 25 08:24:48 2002 Joe Orton - - * ne_socket.h: Add `NE_SOCK_TRUNC' return value. - - * ne_socket.c (error_ossl): Return NE_SOCK_TRUNC when an EOF is - received without a close_notify. - -Sat Aug 24 17:37:14 2002 Joe Orton - - * ne_socket.h (ne_inet_addr): New type. - (ne_addr_first, ne_addr_next): New public interface. - (ne_sock_connect): Change first parameter to ne_inet_addr. - - * ne_socket.c: Predefine ne_inet_addr for ne_socket.h, replacing - ne_raw_addr. - (ne_addr_first, ne_addr_first): Renamed from addr_first, - addr_next; return type now ne_inet_addr; made public. - (ne_sock_connect): Fold in make_socket() macro; just connect to - single IP address passed in. - - * ne_private.h (struct host_info): Renamed 'addr' to 'address', - dded 'current' field, removed 'resolved' field. - - * ne_request.c (lookup_host): Adjust for addr->address rename. - (ne_begin_request): Call lookup_host if 'address' is NULL in - host_info structure, don't use 'resolved' flag. - (do_connect): Replaces init_socket; factor more code out from - open_connection. Loop over available addresses until an - ne_sock_connect call succeeds. - (open_connection): Moved code into do_connect. - - * ne_session.c (ne_session_destroy): Adjust for addr->address - rename. - -Sat Aug 24 13:45:26 2002 Joe Orton - - * ne_string.c (count_concat, do_concat): Compact into while() - loops. - -Sat Aug 24 13:36:04 2002 Joe Orton - - * ne_private.h (VERSION_PRE11): Removed macro. - (struct ne_session_s): Add is_http11 field; removed version_major, - version_minor fields. - - * ne_request.c (add_fixed_headers): Use is_http11 flag rather than - VERSION_PRE11 macro. - (ne_begin_request): Set and use is_http11 flag. - - * ne_session.c (ne_version_pre_http11): Use is_http11 flag. - (ne_session_create): Don't set version_major, version_minor fields. - -Sat Aug 24 09:00:13 2002 Joe Orton - - * ne_request.c (struct ne_request_s): Removed abs_path field. - (ne_set_request_uri): Removed function. - (ne_request_create): Set req->uri to be the actual Request-URI. - Don't use an absoluteURI in Request-URI if using SSL via a proxy - tunnel, or if passed-in path does not begin with a '/'. - (build_request): Use pre-determined Request-URI. - (proxy_tunnel): Pass true Request-URI to ne_request_create. - (ne_request_destroy): Don't free abs_path. - -Sat Aug 24 00:37:25 2002 Joe Orton - - * ne_request.c (aborted): Fix handling of _CLOSED and _TIMEOUT - socket errors, and of non-socket errors. Presume ne_sock_error - cannot return NULL. - -Sat Aug 24 00:07:33 2002 Joe Orton - - * ne_cookies.c (set_cookie_hdl): Ensure that each cookie field is - safe to free(). - -Fri Aug 23 23:46:58 2002 Joe Orton - - * ne_request.c (aborted): Close the connection after setting the - session error, otherwise the socket error is lost. - -Fri Aug 23 22:50:30 2002 Joe Orton - - * ne_socket.c (ne_sock_init): Set SIGPIPE disposition before SSL - library initalization, so it happens even if SSL library - initialization fails. - -Fri Aug 23 22:03:26 2002 Joe Orton - - * ne_socket.c [USE_GETADDRINFO] (make_socket): Pass SOCK_STREAM to - socket() rather than ai_socktype: on RHL6.2, ai_socktype is - returned as zero. - -Wed Aug 21 18:06:36 2002 Joe Orton - - * ne_socket.c: Reinstate stdlib.h include. - - * ne_socket.h: Reinstate sys/socket.h include. - -Wed Aug 21 12:58:47 2002 Joe Orton - - * ne_socket.c (ne_addr_resolve): Accept IPv6 addresses enclosed in - square brackets. - -Wed Aug 21 09:37:24 2002 Joe Orton - - * ne_uri.c (ne_uri_parse): Parse literal IPv6 address using the - RFC2732 `[address]' syntax. - -Mon Aug 19 17:18:45 2002 Joe Orton - - * ne_socket.c (ne_addr_error): Override a horribly generic error - message from gai_strerror(). - -Mon Aug 19 16:24:37 2002 Joe Orton - - * ne_socket.h: Remove netinet/in.h etc includes. - (ne_sock_addr): Add new opaque type. - (ne_addr_resolve, ne_addr_result, ne_addr_error, ne_addr_destroy): - New functions. - (ne_sock_connect): Changes address argument to `ne_sock_addr *'. - (ne_name_lookup): Removed function. - - * ne_socket.c: Added netinet/in.h etc includes. - (ne_sock_addr, ne_raw_addr): Define types. - (make_socket): New macro. - (ne_addr_resolve): Replace ne_name_lookup; store results (multiple - addresses if returned) in returned ne_sock_addr object. Use - getaddrinfo() if available. - (raw_connect, addr_first, addr_next, ne_addr_result, - ne_addr_error, ne_addr_destroy): New functions. - (ne_sock_connect): Re-implement to loop through available - addresses until a connect() succeeds; use make_socket, raw_connect - auxiliaries. - - * ne_private.h (struct host_info): Store an ne_sock_addr pointer. - - * ne_request.c (lookup_host): Use new ne_addr_* interface. - - * ne_session.c (ne_session_destroy): Destroy address objects. - -Mon Aug 19 00:19:49 2002 Joe Orton - - * ne_socket.c: Move prng_seeded inside ifdef NEON_SSL region to - prevent unused variable warning for non-SSL build. - -Sun Aug 18 23:21:21 2002 Joe Orton - - * ne_string.h (ne_strerror): Return buffer. - -Sun Aug 18 23:17:56 2002 Joe Orton - - * ne_socket.c (set_error): Use ne_strnzcpy. - -Sun Aug 18 23:14:07 2002 Joe Orton - - * ne_string.c (ne_strerror): Use ne_strnzcpy. - -Sun Aug 18 23:11:45 2002 Joe Orton - - * ne_string.h (ne_strnzcpy): New macro. - -Sun Aug 18 22:48:27 2002 Joe Orton - - * ne_socket.c (ne_sock_init): Check directly for SIGPIPE - definition rather than HAVE_SIGPIPE. - -Sun Aug 18 13:49:49 2002 Joe Orton - - * ne_session.c (set_hostport): Use %u for printing unsigned int. - -Sun Aug 18 13:47:43 2002 Joe Orton - - * ne_utils.h (NE_DBG_SSL): New constant. - - * ne_session.c [NEON_SSL] (everywhere): Use NE_DBG_SSL channel for - debugging messages. - -Sun Aug 18 08:17:19 2002 Joe Orton - - * ne_session.c (match_hostname): Fix to use case-insensitive - string comparison. - -Sun Aug 18 08:10:12 2002 Joe Orton - - * ne_session.c (check_identity): Check the commonName if no - alt. names of DNS type were found. - -Sun Aug 18 07:39:35 2002 Joe Orton - - * ne_session.c (check_identity): Use the most specific commonName - attribute found, not the first. (for RFC2818 compliance) - -Sun Aug 18 01:54:53 2002 Joe Orton - - * ne_session.c (match_hostname): Invert return value. - (check_identity): New function; split out commonName check from - check_certificate, check subjectAltName extension instead if - present. - (check_certificate): Use check_identity. - -Sat Aug 17 19:59:21 2002 Joe Orton - - * ne_session.c (check_certificate): Extend debugging code to dump - the whole certificate chain, but #if 0 it by default. - -Mon Aug 12 12:04:51 2002 Joe Orton - - * ne_request.c (aborted): Use NE_FMT_SSIZE_T to print ssize_t - value. - -Mon Aug 12 11:08:35 2002 Joe Orton - - Support PRNG seeding via EGD to make SSL work on platforms which - lack /dev/random: - - * ne_socket.c (init_ssl): New function. - (ne_sock_init): Call init_ssl, set prng_seeded global on success. - (ne_sock_use_ssl_os): Fail early if prng_seeded is not set, and - RAND_status returns false. - -Tue Aug 6 07:18:30 2002 Joe Orton - - * ne_socket.c (ne_sock_use_ssl_os): Remove goto-based error - handling. Don't call SSL_shutdown after SSL_connect fails. - -Mon Aug 5 23:18:55 2002 Joe Orton - - * ne_session.c (ne_ssl_keypw_prompt): Don't set SSL_CTX default - password callbacks, since these are never invoked. Implement - once, stub for !NEON_SSL is no longer needed. - -Mon Aug 5 21:01:54 2002 Joe Orton - - * ne_session.c (ne_ssl_load_pem): Pass private key prompt callback - to PEM_read_X509, PEM_read_PrivateKey (patch by Daniel Berlin). - Also handle errors properly; call ERR_get_error() to pop the - errors of the error stack. - -Mon Aug 5 20:15:10 2002 Joe Orton - - * ne_session.c (provide_client_cert): Increase reference count on - key and certificate, to prevent them being free'd too early. - -Sun Aug 4 22:35:27 2002 Joe Orton - - Fix `retry_after_abort' test in request.c: - - * ne_request.c (send_request): Don't use the 'persisted' flag - until after a new connection has been opened, when it may have - been reset. - -Sun Aug 4 17:26:37 2002 Joe Orton - - * ne_request.c (struct ne_request_s): Remove reqbuf field. - (ne_request_create, ne_request_destroy): Don't (de)allocate reqbuf. - (build_request): Allocate the returned buffer internally. - (ne_begin_request): Destroy the buffer after use. - -Sun Aug 4 15:36:01 2002 Joe Orton - - * ne_session.c (ne_ssl_load_pem): Close file after use. - -Sun Aug 4 12:55:49 2002 Joe Orton - - Factor out EPIPE, ECONNRESET handling from write_raw: - - * ne_socket.c (MAP_ERR): New macro. - (write_raw, error_ossl): Use MAP_ERR. - -Sun Aug 4 12:25:34 2002 Joe Orton - - * ne_socket.c (ne_sock_switch_ssl): New function. - -Sun Aug 4 12:24:23 2002 Joe Orton - - * ne_socket.c (ne_sock_switch_ssl): New function, really just for - test suite. - -Sat Aug 3 22:11:33 2002 Joe Orton - - * ne_auth.c (ne_forget_auth): Fix segfault if either server or - proxy auth is not in use. - -Sat Aug 3 22:06:32 2002 Joe Orton - - * ne_redirect.c (create, post_send, ne_redirect_register, - ne_redirect_location): Updated for new hook interface. - -Sat Aug 3 19:02:33 2002 Joe Orton - - Adjustment of hook interface and use: fixing a design flaw causing - a segfault in the auth hooks when two requests are used - concurrently for a single session during a CONNECT tunnel. - - * ne_request.h, ne_session.h: - (ne_get_request_private, ne_get_session_private): Replace - ne_request_hook_private, ne_session_hook_private. - (ne_set_session_private, ne_set_request_private): Replace - ne_hook_session_accessor, ne_hook_request_accessor. - - * ne_request.h (ne_create_request_fn, ne_pre_send_fn, - ne_post_send_fn): Add ne_request pointer as first argument. - (ne_hook_destroy_request): Take ne_destroy_req_fn function. - (ne_hook_destroy_session): Take ne_destroy_sess_fn function. - - * ne_request.c (struct ne_request_s): Renamed `accessor_hooks' - field to `private'. - (get_private): Renamed from call_access; don't invoke function. - (ne_null_accessor): Removed function. - - * ne_auth.c (struct auth_class): Store hook id. - (auth_session): Remove auth_request pointer. - (ah_create): Store auth_request pointer as request-private data. - (ah_pre_send, ah_post_send, ah_destroy): Retrieve auth_request - pointer from request-private data. - (register_hooks, ne_forget_auth): Use - ne_{get,set}_session_private. - - * ne_locks.c (struct lh_req_cookie): New structure. - (struct ne_lock_store_s): Remove submit_locks field. - (lk_create, lk_pre_send, submit_lock, ne_lock_using_resource, - ne_lock_using_parent, lk_destroy): Adjust to use lh_req_cookie - pointer as request-private data. - - * ne_cookies.c (create, pre_send): Adjust for hook prototype - changes. - -Wed Jul 31 23:46:17 2002 Joe Orton - - * ne_socket.c [NEON_SSL]: Include limits.h for INT_MAX definition. - -Mon Jul 29 20:55:57 2002 Joe Orton - - * ne_auth.c (struct auth_class): New structure; abstracts out - proxy/server generic auth handling more cleanly. - (ah_server_class, ah_proxy_class): Declare variables. - (auth_session): Reference an auth_class structure. - (auth_register): Replaces auth_create. - (ne_set_server_auth, ne_set_proxy_auth): Simplify, use - auth_register. - (everywhere): Reference req_hdr etc via ->spec-> reference. - -Sun Jul 28 12:29:23 2002 Joe Orton - - * ne_request.c (proxy_tunnel): Reset 'persisted' flag, so that a - newly tunnelled connection is not treated as persistent. - -Sun Jul 28 12:26:49 2002 Joe Orton - - * ne_string.h (CONCAT2, CONCAT3, CONCAT4): Removed macros. - -Thu Jul 25 23:16:00 2002 Joe Orton - - * ne_request.c (send_request): Don't clear retry until a - status-line has been read. - -Thu Jul 25 00:03:17 2002 Joe Orton - - * ne_auth.c (basic_challenge, request_basic): Use ne_concat not - the CONCAT? macros. - - * ne_basic.c (ne_mkcol): Use ne_concat not the CONCAT2 macro. - -Wed Jul 24 00:16:39 2002 Joe Orton - - * ne_string.c (count_concat, do_concat): Factored out from - ne_buffer_concat. - (ne_buffer_concat): Rewrite to use count_concat, do_concat. - (ne_concat): New (resurrected) function. - -Thu Jul 18 21:52:12 2002 Joe Orton - - * ne_request.c (proxy_tunnel): Don't use server.hostport in - Request-URI; always include `:port' even if default port is used; - fix CONNECT through Inktomi Traffic-Server. - -Thu Jul 18 21:33:43 2002 Joe Orton - - * ne_request.c (aborted, ne_set_request_body_fd): Use ne_strerror. - - * ne_session.c (ne_ssl_load_pem, ne_ssl_load_pkcs12): Use ne_strerror. - - * ne_basic.c (get_to_fd): Use ne_strerror. - -Thu Jul 18 20:19:30 2002 Joe Orton - - * ne_string.c (ne_strerror): New function. - - * ne_socket.c (set_strerror): Move portability logic to - ne_strerror; just use that here. - -Thu Jul 18 20:00:46 2002 Joe Orton - - * ne_socket.c (read_raw, write_raw): Don't re-evaluate 'errno', - per Ulrich Drepper's advice. - -Wed Jul 17 23:47:01 2002 Joe Orton - - * ne_socket.c (struct ne_socket_s): Store buffer for error string. - (set_error, set_strerror): New macros. - (everywhere): Use set_error, set_strerror or ne_snprintf to set - the socket error string. - -Wed Jul 17 23:19:18 2002 Joe Orton - - * ne_utils.c (ne_version_match): Fix inverted minor version test. - -Sun Jul 14 20:13:59 2002 Joe Orton - - * ne_uri.h (ne_uri): Store port as unsigned. - - * ne_uri.c (ne_uri_defaultport): Return unsigned int, and zero for - undefined port. - -Sun Jul 14 20:07:35 2002 Joe Orton - - * ne_session.c (ne_session_proxy): Take port parameter as unsigned - int, as per ne_session_create. - -Sun Jul 14 20:03:21 2002 Joe Orton - - * ne_request.c (strip_eol): Take ssize_t 'len' parameter. - (read_message_header): Use ssize_t for 'n'. - -Sun Jul 14 12:45:40 2002 Joe Orton - - * ne_socket.c (ne_sock_use_ssl_os): Unconditionally enable - SSL_MODE_AUTO_RETRY now OpenSSL 0.9.6 is required. - -Sun Jul 14 12:15:40 2002 Joe Orton - - * ne_xml.h (NE_XML_MEDIA_TYPE): New definition. - - * ne_acl.c (ne_acl_set), - * ne_props.c (ne_proppatch, propfind): Use NE_XML_MEDIA_TYPE, - rather than hard-coding the incorrect "text/xml" media type. - -Sun Jul 14 10:53:33 2002 Joe Orton - - * ne_utils.c (ne_version_match): Replace ne_version_minimum. - -Sat Jul 13 11:40:37 2002 Joe Orton - - * ne_session.c (ne_negotiate_ssl): Include socket error string in - session error if SSL negotiation fails. - -Sat Jul 13 11:27:50 2002 Joe Orton - - * ne_socket.c (error_ossl): New function. - (ERROR_SSL_STRING): Removed macro. - (CAST2INT): New macro; safety harness for OpenSSL compatibility. - (read_ossl, write_ossl): Use error_ossl, CAST2INT. - (ne_sock_use_ssl_os): Use error_ssl. - -Sat Jul 13 11:16:07 2002 Joe Orton - - * ne_socket.c: Define ECONNRESET as WSAECONNRESET on Win32. - -Sat Jul 13 10:10:03 2002 Joe Orton - - * ne_private.h (struct ne_session_s): Replace 'reqcount' with - 'persisted' flag. - - * ne_request.c (ne_end_request): Set 'persisted' flag if - connection is left open. - (send_request): Adjust to allow retry if 'persisted' flag is set. - (init_socket): Clear 'persisted' flag here... - (open_connection): ... rather than here. - -Wed Jul 10 22:51:39 2002 Joe Orton - - * ne_request.c (RETRY_RET): Retry on an NE_SOCK_RESET too. - (send_request): Fix to only retry if not on the first request on a - connection (close_not_retried test). - -Sun Jul 7 20:49:09 2002 Joe Orton - - * ne_socket.h: Add NE_SOCK_RESET return value; improve comments. - - * ne_socket.c (read_raw, write_raw): Return NE_SOCK_RESET if an - ECONNRESET error is received when reading or writing. - -Sat Jul 6 13:30:15 2002 Joe Orton - - * ne_request.c (read_status_line, discard_headers): New functions, - split out from send_request. - (send_request_body): Move debugging here from send_request. - (RETRY_RET): Renamed from CAN_RETRY. - (send_request): Simplify: remove complex 100-continue graceful - failure logic; use read_status_line, discard_headers, RETRY_RET. - Fix to only send request body once (expect_100_once test case). - Fix to not return NE_RETRY if reading status-line other than the - first fails (fail_eof_continued test case). - -Fri Jul 5 21:47:49 2002 Joe Orton - - * ne_request.c (build_request): Fix from previous commit: clear - the buffer before building the request. - -Fri Jul 5 21:00:20 2002 Joe Orton - - * ne_request.c (build_request): Fold Host header and Request-Line - into single ne_buffer_concat call. Don't set req->use_expect100 - here. Fold an if/else into an ?:. Optimise to use - ne_buffer_append to add 100-continue, user-supplied headers, and - trailing EOL, since they all have known lengths. - (send_request): Take request data as argument. - (ne_begin_request): Call build_request here; pass to send_request. - Move Expect100 logic here. - -Fri Jul 5 17:12:56 2002 Joe Orton - - * ne_basic.c (ne_read_file): Removed function. - -Fri Jul 5 17:10:11 2002 Joe Orton - - * ne_compress.c (process_footer): Take unsigned char buffer. - Store calculated CRC in a uLong. - (do_inflate, gz_reader): Cast buffers to unsigned char for - strict compatibility with zlib interface. - -Wed Jul 3 19:21:17 2002 Joe Orton - - * ne_request.c (struct ne_request_s): Use a fixed char array for - respbuf field. - (ne_request_create, ne_request_destroy): Don't allocate respbuf - dynamically. - (send_request): Move 'buffer' to appropriate scope. - (ne_request_dispatch): Remove 'buffer'; read into respbuf. - -Tue Jul 2 08:35:05 2002 Joe Orton - - * ne_request.c (proxy_tunnel): Remove redundant sess->connected - assignment. - -Sun Jun 30 21:04:50 2002 Joe Orton - - * ne_request.c (ne_begin_request): Only set host->resolved if - lookup is successful. - -Sun Jun 30 18:25:51 2002 Joe Orton - - * ne_request.c (SOCK_ERR): New macro. - (struct ne_request_s): Remove 'forced_close' field. - (aborted): Renamed from set_sockerr; also closes connection and - prints message in debug log. - (send_request_body): Don't use set_sockerr or set forced_close. - (read_response_block, read_message_header): Use SOCK_ERR; adjust - to use aborted(). - (ne_read_response_block, read_response_headers): Don't set - forced_close. - (CAN_RETRY): New macro. - (send_request): Adjust to use CAN_RETRY(); use aborted() to make - sure connection is closed in error cases. - (ne_begin_request): Don't close connection here in error cases; - don't use forced_close. - (open_connection): Adjust to use aborted() not set_sockerr(). - -Sun Jun 30 17:26:41 2002 Joe Orton - - * ne_session.c (ne_close_connection): Clarify debug messages. - -Sun Jun 30 14:36:11 2002 Joe Orton - - * ne_request.c (read_response_block): Fail on chunk size lines - which contain no valid chunk size digits. - -Sun Jun 30 12:35:35 2002 Joe Orton - - * ne_session.c (ne_negotiate_ssl): Use ne_get_session rather - than req->session. - - * ne_request.c (struct header_handler, struct body_reader, - struct ne_request_s): Moved from ne_private.h. - -Sun Jun 30 12:13:58 2002 Joe Orton - - Cleanup of response handling: - - * ne_private.h (struct ne_response): Replace 'is_chunked' field with - 'mode' enum. - - * ne_request.c (te_hdr_handler): Set mode. - (connection_hdr_handler): Reset can_persist for 'close'. - (clength_hdr_handler): New function. - (ne_request_create): Use clength_hdr_handler to parse Content-Length - header. - (read_response_block, ne_read_response_block): Adapt for 'mode' enum; - simplify. - (normalize_response_length): Removed function. - (ne_begin_request): Fold in normalize_response_length logic. - (ne_end_request): Simplify logic. - -Sun Jun 30 11:08:26 2002 Joe Orton - - * ne_session.c: Remove X509_NAME workaround in favour of a - neon.mak change. - -Tue Jun 25 23:14:34 2002 Joe Orton - - * ne_session.c: Undefine X509_NAME if it is defined (by a Windows - header). - -Tue Jun 25 22:51:15 2002 Joe Orton - - * ne_socket.c: Rename READ_BUFFER to RDBUFSIZ. - -Tue Jun 25 21:07:13 2002 Joe Orton - - * ne_private.h (struct host_info): Store port as unsigned int. - - * ne_session.c (set_hostport, set_hostinfo, ne_session_create): - Take port argument as unsigned int. - - * ne_socket.c (ne_sock_connect): Take port argument as unsigned - int. - -Tue Jun 25 20:59:14 2002 Joe Orton - - * ne_utils.h [__GNUCC__] (NE_DEBUG): Remove implementation using - GNU C extensions. - -Sun Jun 23 22:47:52 2002 Joe Orton - - * ne_request.c (set_request_uri): Renamed from ne_set_request_uri; - made static. - (ne_request_create): Update accordingly. - - * ne_private.h (ne_set_request_uri): Removed prototype. - -Sun Jun 23 15:40:57 2002 Joe Orton - - * ne_request.c (send_request, ne_request_destroy): Free - reason_phrase now it is malloc-allocated. - -Sun Jun 23 14:59:04 2002 Joe Orton - - Simplify given loss of const qualifier on ne_status.reason_phrase: - - * ne_props.c (struct propstat): Remove r_phrase field. - (end_propstat, free_propset): Use status.reason_phrase not - r_phrase field. - -Sun Jun 23 14:42:22 2002 Joe Orton - - * ne_207.h (ne_207_end_response, ne_207_end_propstat): Remove - status_line parameter from callbacks. - - * ne_207.c (struct ne_207_parser_s): Remove status_line field. - (end_element): Don't store status_line. - (handle_error): Drop status_line argument, recreate dummy status - line from status object. - (end_response, end_propstat): Drop status_line arguments. - - * ne_props.c (end_propstat, end_response): Drop status_line - arguments. - -Sun Jun 23 14:39:00 2002 Joe Orton - - * ne_utils.h (ne_status): Remove const qualifier from - 'reason_phrase' field. - - * ne_utils.c (ne_parse_statusline): strdup the reason_phrase on - successful return. - -Sun Jun 23 11:39:24 2002 Joe Orton - - * ne_compress.c (struct ne_decompress_s): Replace footer union - with buffer. - (BUF2UINT): New macro. - (process_footer): Convert footer to integer in a portable manner, - using BUF2UINT. - -Sun Jun 23 09:05:25 2002 Joe Orton - - * ne_compress.c (ne_decompress_s): Use unsigned int for 32-bit - integers, not uLong (fix for 64-bit platforms). - -Wed Jun 19 18:46:40 2002 Joe Orton - - * ne_session.c (ne_session_destroy): Don't leak the proxy - hostname. - -Sun Jun 16 14:09:31 2002 Joe Orton - - * ne_request.c (read_response_block): Use NE_FMT_SSIZE_T rather - than %d, cast field precision argument to int. - (ne_pull_request_body): Use ssize_t for store callback return - value, use NE_FMT_SSIZE_T rather than %d, cast field precision - argument to int. - -Sun Jun 16 12:15:19 2002 Joe Orton - - * ne_session.c (ne_negotiate_ssl): Don't leak peer certificate in - error cases. Fix spelling mistake in error message. - -Sun Jun 16 11:23:23 2002 Joe Orton - - * ne_request.c (open_connection): When SSL negotation fails after - doing CONNECT request, use ne_close_connection so that - sess->connection is reset to 0, and ne_sock_close isn't called - twice for the socket. - -Wed Jun 12 23:22:20 2002 Joe Orton - - * ne_props.c (ne_proppatch): Add missing call to - ne_lock_using_resource. - -Mon Jun 10 20:45:27 2002 Joe Orton - - * ne_auth.c (verify_response): Remove redundant prototype, fix - sscanf format string to use signed integer. - -Mon Jun 10 20:13:57 2002 Joe Orton - - * ne_compress.c (do_inflate): Continue calling inflate() whilst - unconsumed input remains: fix from Justin Erenkrantz - . - -Mon Jun 10 19:53:59 2002 Joe Orton - - * ne_socket.c (ne_sock_readline): If a complete line is found in - the buffer, avoid the memmove() and simply copy the line directly - out of the buffer. - -Sun Jun 9 11:39:20 2002 Joe Orton - - * ne_redirect.c (post_send): Perform simple relative URI - resolution. - -Tue Jun 4 16:51:54 2002 Joe Orton - - * ne_uri.c (ne_path_parent): Simplify. - -Mon Jun 3 17:50:27 2002 Joe Orton - - * ne_cookies.c (set_cookie_hdl): Avoid free'ing cookie name/value, - thanks to Dan Mullen. - -Mon Jun 3 17:45:33 2002 Joe Orton - - * ne_string.c (ne_base64): Use size_t for outlen. - -Mon Jun 3 17:42:34 2002 Joe Orton - - * ne_utils.h, ne_socket.h [WIN32]: Move ssize_t definition to - ne_socket.h. - -Mon Jun 3 17:27:21 2002 Joe Orton - - * ne_request.c (read_response_block): Use correct types for - passing to/from ne_sock_*. - -Mon Jun 3 11:32:20 2002 Joe Orton - - * ne_compress.c (ne_decompress_destroy): Don't fail if response - reader callback is never invoked. - -Sun Jun 2 12:51:35 2002 Joe Orton - - * ne_socket.c (read_ossl, read_raw): Call readable_{ossl,raw} - function here. - (ne_sock_read, ne_sock_peek, ne_sock_readline): Remove explicit - calls to ops->readable before ops->read. - -Thu May 30 22:00:07 2002 Joe Orton - - * ne_socket.c (ne_sock_readline): Optimise to use socket read - buffer directly, and use ->read (and ->readable) functions. - -Tue May 28 17:00:34 2002 Joe Orton - - * ne_session.c (ne_session_destroy): Don't free proxy.hostport, - since it's no longer set. - -Sun May 26 19:11:46 2002 Joe Orton - - * ne_xml.c: #error if no expat header is configured; flatten - nested #if's, include libxml/xmlversion.h if present. - -Sun May 26 19:09:04 2002 Joe Orton - - * ne_utils.c: Include libxml/xmlversion.h if present. - -Sun May 26 11:55:30 2002 Joe Orton - - * ne_session.c (set_hostport): Renamed from get_hostport: set - host_info field directly; take defaultport argument. - (set_hostinfo): Don't use get_hostport. - (ne_session_create): Use set_hostinfo and set_hostport; pass - in default port correctly for http:/https:. - -Thu May 23 19:44:44 2002 Joe Orton - - * ne_xml.c (resolve_nspace): Split out from parse_element. - (ne_xml_get_attr): Take parser object, and optional - namespace; resolve the namespace if necessary. - (parse_element): Use resolve_nspace. - - * ne_props.c (startelm): Use new ne_xml_get_attr interface. - -Wed May 22 22:29:05 2002 Joe Orton - - * ne_dates.c: Renamed HAVE_TM_GMTOFF to HAVE_STRUCT_TM_TM_GMTOFF - from use of AC_CHECK_MEMBERS. - -Tue May 21 21:21:31 2002 Joe Orton - - * ne_redirect.c (ne_redirect_register): Drop confirm, notify, - userdata arguments. - (struct redirect): Drop most fields; add a uri structure. - (auto_redirect): Removed function. - (post_send): Remove functionality which retries a request with a - different URI to automatically follow redirects. Qualify the URI - if non-absolute. - (create): Remove now redundant code. - (ne_redirect_location): Return an ne_uri object. - -Sun May 19 18:53:22 2002 Joe Orton - - * ne_session.c (ne_set_useragent): Use strcat/malloc/strcpy - directly, rather than CONCAT2; allow compiler optimisations. - (AGENT): Renamed from NEON_USERAGENT, append space. - -Sun May 19 17:31:43 2002 Joe Orton - - Move everything exported by ne_socket.h into ne_*/NE_* namespace; - purge inappropriate and unused interfaces. Renaming done by Olof - Oberg. - - * ne_socket.h: - - (SOCK_FULL): Removed constant. - (sock_call_progress, sock_transfer, sock_sendline, - sock_send_string, sock_readfile_blocked): Removed functions. - - (NE_SOCK_ERROR, NE_SOCK_TIMEOUT, NE_SOCK_CLOSED): - Renamed constants. - - (ne_progress, ne_block_reader): Renamed types. - - (ne_register_progress, ne_sock_init, ne_sock_exit, ne_sock_read, - ne_sock_peek, ne_sock_block, ne_sock_fullwrite, ne_sock_readline, - ne_sock_connect, ne_sock_accept, ne_sock_fd, ne_sock_error, - ne_sock_read_timeout, ne_name_lookup, ne_service_lookup, - ne_sock_use_ssl, ne_sock_use_ssl_os): Renamed functions. - - * ne_private.h, ne_request.c, ne_session.c: Update accordingly. - - * ne_request.c (build_request): Return the ne_buffer pointer. - (send_request): Remove redundant strlen(), use known buffer - length. - - * ne_request.h: Drop ne_block_reader definition. - -Sun May 19 13:32:12 2002 Joe Orton - - * ne_request.c (ne_get_session, ne_get_request): Take const - request pointer. - -Sun May 19 13:21:17 2002 Joe Orton - - * ne_string.c (ne_buffer_ncreate): Renamed from - ne_buffer_create_sized. - - * ne_session.c (check_certificate, provide_client_cert): Update - accordingly. - - * ne_request.c (ne_request_create): Update accordingly. - -Sun May 19 13:12:14 2002 Joe Orton - - * ne_string.c (ne_token): Drop quotes parameter. - (ne_qtoken): Split out from ne_token. - - * ne_basic.c (dav_hdr_handler, ne_content_type_handler): Use - ne_qtoken. - - * ne_compress.c (find_token): Removed function. - (gz_reader): Compare header value directly against "gzip", - remove a stale comment. - -Sun May 19 09:45:28 2002 Joe Orton - - * ne_socket.h (sock_fullread): Return ssize_t; takes buflen as - size_t. - (sock_read, sock_peek): Fix prototypes to match actual definition. - - * ne_socket.c (write_raw): Return ssize_t. - -Sat May 18 14:53:45 2002 Joe Orton - - * ne_string.h (ne_buffer): Remove separate struct ne_buffer_s - definition. - - * ne_string.c (ne_buffer_create_sized): Don't use struct - ne_buffer_s. - -Sun May 12 11:33:02 2002 Joe Orton - - * ne_string.c (ne_base64): Moved from base64.c. - - * base64.c, base64.h: Removed files. - - * Makefile.in: Updated accordingly. - - * ne_auth.c: Don't include base64.h. - -Sun May 12 11:26:05 2002 Joe Orton - - * ne_string.h (ne_utf8_decode, ne_utf8_encode): Removed functions. - -Sat May 11 15:42:24 2002 Joe Orton - - As part of patch from Olof Oberg : - - * ne_request.h (ne_destroy_fn): Renamed from typo'ed - ne_destory_fn. - - * ne_request.c (ne_request_destroy, ne_hook_destroy_request, - ne_hook_destroy_session): Update accordingly. - - * ne_session.c (ne_session_destroy): Update accordingly. - -Thu May 9 21:44:15 2002 Joe Orton - - Major improvements to socket layer to incorporate socket read - buffering and rewrite sock_readline, and add an abstraction layer - to simplify SSL support. Grunt work by Jeff Johnson - - - * ne_socket.c (struct iofns): New type. - (struct nsocket_s): Store 'ops' pointer to I/O functions in use - for the socket. Add buffer, bufpos, bufavail fields for read - buffering. - (sock_block, sock_read, sock_peek): Reimplement to add read - buffer, simplify to use I/O functions abstraction. - (readable_raw, read_raw, write_raw, readable_ossl, read_ossl, - write_ossl): Factored out from sock_read/fullwrite, avoiding - in-lined ifdefs. - (sock_fullwrite): Just use ops->write. - (sock_readline): Simplify greatly to exploit read-buffering, return - ssize_t. - (sock_fullread): Simplify, removing unnecessary local variables, - return ssize_t. - (create_sock, sock_enable_ssl_os): Set ops pointer. - -Wed May 8 11:54:48 2002 Joe Orton - - * ne_socket.c (sock_name_lookup): Avoid casts; use INADDR_NONE. - [!INADDR_NONE]: Define to (unsigned long) -1. - -Wed May 1 22:19:18 2002 Joe Orton - - * ne_locks.h (ne_lock): Document that ->token and ->owner fields - must be malloc-allocated if non-NULL. - -Wed May 1 22:15:41 2002 Joe Orton - - * ne_locks.c (get_ltoken_hdr): New function. - (ne_lock): Correctly parse Coded-URL from Lock-Token response - header. - -Wed May 1 22:03:08 2002 Joe Orton - - * ne_redirect.c (post_send): Adjust for ne_uri_parse handling of - unspecified port. - -Wed May 1 22:00:50 2002 Joe Orton - - * ne_session.c (provide_client_cert): Fail if peer certificate not - known when client cert requested. - -Wed May 1 21:58:35 2002 Joe Orton - - * ne_session.h (ne_ssl_provide_fn): Adjust callback typedef to - return void. - -Wed May 1 21:52:40 2002 Joe Orton - - * ne_request.h: Remove NE_SERVERAUTH and NE_AUTHPROXY; fix - NE_PROXYAUTH description. - -Wed May 1 21:32:54 2002 Joe Orton - - * ne_uri.c (ne_uri_parse): For consistency, port field is 0 if - unspecified. - -Tue Apr 30 10:05:48 2002 Joe Orton - - * ne_string.c (shave_string): Removed function. - -Tue Apr 23 21:19:53 2002 Joe Orton - - * ne_props.c (start_propstat, startelm): Use ne_realloc not - realloc (thanks to Jeff Johnson). - -Tue Apr 23 20:55:56 2002 Joe Orton - - * ne_xml.c: Include parser.h or libxml/parser.h, depending on - which is found. - -Mon Apr 15 00:37:43 2002 Joe Orton - - * ne_request.c (build_request, send_request): Simplify logic. - -Sun Apr 14 16:59:50 2002 Joe Orton - - * ne_props.c: Remove unused accidental 'propstat' global. - (struct propstat): Add r_phrase field. - (end_propstat): Dup the reason_phrase string. - (free_propset): Free the reason_phrase. Avoid another possible - free(NULL) call. - -Sun Apr 14 12:00:54 2002 Joe Orton - - * ne_basic.c (ne_content_type_handler): For text/* media types, - use default charset of ISO-8859-1. - -Sat Apr 13 23:11:07 2002 Joe Orton - - * ne_utils.h: Include trio.h if NEON_TRIO is defined. - -Sun Apr 7 17:38:14 2002 Joe Orton - - * ne_request.c (read_response_headers): Don't zero-initialize hdr. - -Sun Apr 7 17:15:23 2002 Joe Orton - - * ne_request.c (read_response_headers): Ignore whitespace between - header name and colon, simplify logic a little. - -Sun Apr 7 14:09:07 2002 Joe Orton - - * ne_session.c (ne_ssl_readable_dname): New function. - -Sun Apr 7 12:32:25 2002 Joe Orton - - * ne_string.c (ne_buffer_destroy): Remove redundant check for data - pointer being NULL. - -Wed Apr 3 19:44:59 2002 Joe Orton - - Optimisation/simplification of header name hashing. - - * ne_request.c (hash_and_lower): Renamed from hdr_hash; convert - string to lower-case in-place too. - (lower_string): Removed function. - (ne_add_response_header_handler): Use hash_and_lower rather than - lower_string. - (HH_ITERATE): Change parameter name to 'ch'. - -Fri Mar 29 23:00:57 2002 Joe Orton - - * ne_uri.c (ne_uri_parse): Minor optimisation. - -Mon Mar 25 21:45:36 2002 Joe Orton - - Pass a lock context around during LOCK processing; search for the - correct element in the response body. - - * ne_locks.c (ne_lock_create): Don't take a path argument. - (ne_unlock): Constify lock parameter. - (discover_results): Don't parse out href here... - (ld_create): do it here instead; renamed from create_private. - (lk_startelm): New function. - (lk_endelm): Renamed from end_element_lock. - (ne_lock): Require a Lock-Token response header; pass lock context - to callbacks. Copy lock back out. - -Mon Mar 25 21:35:42 2002 Joe Orton - - * ne_session.h (NE_SSL_FAILMASK): New constant. - (NE_SSL_*): Shift right one bit. - -Mon Mar 25 21:21:18 2002 Joe Orton - - * ne_session.c (ne_close_connection): Return void. - -Mon Mar 25 20:09:33 2002 Joe Orton - - * ne_props.c (free_propset): Avoid free(NULL). - -Mon Mar 11 19:59:04 2002 Joe Orton - - * ne_locks.c (ne_lock_using_parent): Iterate over the lock list by - hand: check for infinite depth locks with cover the parent too - (fixing if_covered_child test). - -Mon Mar 11 19:25:44 2002 Joe Orton - - * ne_request.c (ne_request_dispatch): Move variable to scope in - which is is used. - -Sun Mar 10 22:04:58 2002 Joe Orton - - * Makefile.in (NEON_BASEOBJS): Always build ne_compress.o. - -Sun Mar 10 22:01:54 2002 Joe Orton - - * ne_compress.c [!NEON_ZLIB] (ne_decompress_reader, - ne_decompress_destroy): Add stubs. - -Sun Mar 10 21:42:11 2002 Joe Orton - - * ne_locks.c (struct discover_ctx): Store an ne_session pointer. - (discover_results): If lock URI is not an absoluteURI, qualify it - using the server host/port/scheme from the session. Don't leak - the lock object. - (create_private): Simplify, use ne_lock_create. - -Thu Mar 7 20:08:07 2002 Joe Orton - - * ne_uri.c (ne_uri_defaultport): Fix default port number for https - scheme. - -Wed Mar 6 21:22:23 2002 Joe Orton - - * ne_locks.c (lk_pre_send): Use an absoluteURI in the If: header. - -Wed Mar 6 21:15:00 2002 Joe Orton - - * ne_uri.c (ne_uri_unparse): New function. - -Tue Mar 5 22:57:00 2002 Joe Orton - - * ne_uri.c (ne_uri_cmp): Compare hostnames and schemes - case-insensitively, and compare empty abspath and "/" as - equivalent, as per RFC 2616. - -Tue Mar 5 20:53:54 2002 Joe Orton - - * ne_uri.c (ne_uri_defaultport): New function. - -Mon Mar 4 21:10:29 2002 Joe Orton - - * ne_uri.h (ne_uri): Renamed from struct uri. - - * ne_uri.c (ne_path_parent): Renamed from uri_parent. - (ne_path_has_trailing_slash): Renamed from uri_has_trailing_slash. - (uri_abspath, uri_absolute): Removed. - (ne_uri_parse): Renamed from uri_parse, don't take a 'defaults' - parameter. - (ne_uri_free): Renamed from uri_free. - (ne_path_unescape): Renamed from uri_unescape. - (ne_path_escape): Renamed from uri_abspath_escape. - (ne_uri_cmp): Renamed from uri_cmp. - (ne_path_compare): Renamed from uri_compare. - (ne_path_childof): Renamed from uri_childof. - - * ne_basic.c, ne_locks.c, ne_uri.c, ne_redirect.c, ne_session.c, - ne_session.h: all callers changed. - -Mon Mar 4 01:03:23 2002 Joe Orton - - * ne_request.c (strip_eol): Fix potential segfault. - -Mon Mar 4 00:38:10 2002 Joe Orton - - * ne_locks.c (insert_lock): New function. - (ne_lockstore_add, submit_lock): use insert_lock. - -Mon Mar 4 00:33:39 2002 Joe Orton - - * ne_locks.c (ne_lockstore_remove): Free list item. - -Mon Mar 4 00:31:08 2002 Joe Orton - - * ne_locks.c (free_list): Really destroy the lock. - (ne_lock_free): Don't free the lock object itself. - -Mon Mar 4 00:17:18 2002 Joe Orton - - * ne_request.c (ne_request_destroy): Free accessor hook list. - -Sun Mar 3 20:35:09 2002 Joe Orton - - Changes to lock interface; replacing "lock session" with a lock - store, which can be registered with an ne_session. Lock objects - now store URI as complete URI structure. - - * ne_locks.h (struct ne_lock): Store URI as complete URI - structure. Remove next/prev fields. - (ne_lock_store): New type. - - * ne_locks.c (struct lock_list): New type. - (struct ne_lock_store_s): Replaces ne_lock_session_s; store - lock_list pointers for stored locks, cursor, and locks to - submit. - (ne_lock_create): New function. - (lk_create): Renamed from create. - (lk_pre_send): Renamed from pre_send; adjust for lock list - type and to use URI path. - (free_list): New function; split out from old 'destroy'. - (lk_destroy): Renamed from destroy; use free_list. - (ne_lockstore_create, ne_lockstore_destroy, - ne_lockstore_first, ne_lockstore_next): New functions. - (ne_lockstore_register): Most of old ne_lock_register. - (submit_lock): Adjusted for lock_list type. - (ne_lockstore_findbyuri): Renamed from ne_lock_find; use - full URI structure. - (ne_lock_using_resource, ne_lock_using_parent): Adjusted - for lock_list/full URI changes. - (ne_lock_iterate): Removed function. - (ne_lockstore_add, ne_lockstore_remove): Renamed from - ne_lock_add, ne_lock_copy; adjusted for lock_list/full URI. - (ne_lock_copy): Adjusted for full URI. - (ne_lock_create, ne_lock_destroy): New function. - (ne_lock, ne_lock_refresh, ne_unlock): Adjusted for full URI. - -Sun Mar 3 15:23:40 2002 Joe Orton - - * ne_uri.c (uri_cmp): New function. - -Sun Mar 3 11:01:30 2002 Joe Orton - - * ne_session.c (ne_fill_server_uri): New function. - -Mon Feb 25 21:25:27 2002 Joe Orton - - * ne_utils.c (version_string): Add zlib version. - -Mon Feb 25 20:49:07 2002 Joe Orton - - * (everywhere): Replace use of snprintf, vsnprintf with - ne_snprintf, ne_vsnprintf so that trio replacements are used when - appropriate. - - * ne_dates.h: Pick up ne_utils.h for ne_{v,}snprintf defines. - -Sun Feb 24 11:23:05 2002 Joe Orton - - * ne_utils.h: Define ne_snprintf, ne_vsnprintf for trio or - non-trio builds. - -Sun Feb 24 11:20:42 2002 Joe Orton - - * Makefile.in (check-incl): Add target to check that each header - file can be included standalone. - -Sun Feb 24 11:17:54 2002 Joe Orton - - * ne_xml.h: Add missing sys/types.h include. - -Sun Feb 24 11:12:22 2002 Joe Orton - - * ne_utils.h: Remove HTTP_QUOTES, HTTP_WHITESPACE globals. - - * ne_cookies.c (set_cookie_hdl): Don't use HTTP_QUOTES, - HTTP_WHITESPACE globals. - -Wed Feb 20 19:32:48 2002 Joe Orton - - * ne_request.c (set_sockerr, ne_set_request_body_fd, - send_request): Use ne_set_error rather than accessing session - error directly. - -Tue Feb 19 21:34:59 2002 Joe Orton - - * ne_utils.c (version_string) [NEON_SOCKS]: Mention SOCKSv5 - support. - - * ne_socket.c (sock_init) [NEON_SOCKS]: Call SOCKSinit. - -Tue Feb 19 19:21:07 2002 Joe Orton - - * ne_request.c (open_connection): Remove notify_status call - duplicated with ne_negotiate_ssl. - -Tue Feb 19 19:16:44 2002 Joe Orton - - * ne_socket.c (sock_get_version): Removed function. - -Tue Feb 19 19:12:52 2002 Joe Orton - - * ne_session.c (ne_ssl_provide_ccert): Moved outside ifdef - NEON_SSL. - [!NEON_SSL] (ne_ssl_load_pem, ne_ssl_load_pkcs12, - ne_ssl_keypw_prompt): Added stubs. - -Sun Feb 17 21:15:34 2002 Joe Orton - - * ne_session.c (ne_session_create, ne_session_destroy): Only use - the SSL context is SSL is being used for the session. - -Sun Feb 17 20:19:05 2002 Joe Orton - - Add back client certificate support, much improved. - - * ne_private.h (struct ne_session_s): Add client cert/key fields, - provider, privkey password callbacks. - - * ne_socket.c (sock_init): Call PKCS12_PBE_add. - (sock_enable_ssl_os): Add optional 'appdata' argument. - (sock_enable_ssl): Adjust accordingly. - - * ne_session.c (provide_client_cert, privkey_prompt, - ne_ssl_keypw_prompt, ne_ssl_load_pkcs12, ne_ssl_load_pem, - ne_ssl_provide_ccert): New functions. - (ne_negotiate_ssl): Pass session as appdata to sock_enable_ssl_os. - -Sun Feb 17 12:32:34 2002 Joe Orton - - * ne_session.c (make_dname): New function. - (check_certificate): Use make_dname. - -Sun Feb 17 11:29:10 2002 Joe Orton - - * ne_basic.c (struct get_context): Remove unused 'progress' field, - add 'session' field. - (get_to_fd, content_range_hdr_handler, clength_hdr_handler): Set - session error directly. - (clength_hdr_handler): Also fix check for expected range. - (everywhere): Initialize session field, don't set session error; - use NE_FMT_OFF_T to print off_t's rather than casting to long int. - -Sat Feb 16 23:24:10 2002 Joe Orton - - * ne_xml.h (NE_XML_STRIPWS): New element flag. - - * ne_xml.c (start_element): Clear cdata buffer if not in mixed - mode. (char_data): Only strip leading whitespace if - NE_XML_STRIPWS is set for the element. - -Sat Feb 16 14:52:59 2002 Joe Orton - - * ne_compress.c (enum state): New state NE_Z_AFTER_DATA. - (struct ne_decompress_s): Add fields for storing and parsing - stream footer; add checksum field for storing current crc. - (process_footer): New function. - (do_inflate): Compute checksum. Switch to AFTER_DATA state and - process footer after reading DEFLATE data. - (gz_reader): Fail on trailing content. Handle AFTER_DATA state. - (ne_decompress_destroy): Return error if final state was not - PASSTHROUGH, or FINISHED. - (ne_decompress_reader): Initialize crc. - -Sat Feb 16 14:26:54 2002 Joe Orton - - * ne_compress.c (ne_decompress_destroy): Fix potential segfault - with use-after-free. - -Thu Feb 14 16:50:40 2002 Joe Orton - - * ne_request.c (read_response_headers): Ignore header lines - without a ':', rather than failing the request. - -Tue Feb 12 20:17:49 2002 Joe Orton - - * ne_request.c (read_response_block): Read chunk size as unsigned - using strtoul; check that it fits within an unsigned int (and - hence, probably a size_t). - -Tue Feb 12 20:15:13 2002 Joe Orton - - * ne_string.h (STRIP_EOL): Removed macro. - -Mon Feb 11 22:11:03 2002 Joe Orton - - * ne_session.c (match_hostname): Match fully-qualified hostnames - against commonName with leading "*." wildcard. - -Mon Feb 11 20:47:28 2002 Joe Orton - - * ne_session.c (match_hostname): New function. - (check_certificate): Use it. - -Sun Feb 10 00:50:49 2002 Joe Orton - - * ne_request.c (lookup_host): Set error string on lookup failure. - -Sun Feb 10 00:34:42 2002 Joe Orton - - * ne_request.c (strip_eol): New function; more efficient - STRIP_EOL. - (send_request): Use strip_eol. - (read_message_header): Use strip_eol, simplify, remove redundant - variables. - -Sat Feb 9 21:02:31 2002 Joe Orton - - * ne_session.c (ne_set_error): Drop STRIP_EOL call. - -Sat Feb 9 21:01:01 2002 Joe Orton - - * ne_session.c (ne_set_error): Take printf-style format string + - varargs list. - -Sat Feb 9 16:15:09 2002 Joe Orton - - * ne_socket.h (SOCKET_READ_TIMEOUT): Moved to ne_socket.c. - - * ne_socket.c (struct nsocket_s): Add rdtimeout field. - (create_sock): Initialize rdtimeout to SOCKET_READ_TIMEOUT. - (sock_read, sock_recv): Use ->rdtimeout field for read timeout. - (sock_set_read_timeout): New function. - - * ne_private.h (struct ne_session_s): Add rdtimeout field. - - * ne_session.c (ne_set_read_timeout): New function. - - * ne_request.c (init_socket): New function. - (open_connection): Use init_socket. - -Sat Feb 9 15:11:59 2002 Joe Orton - - * ne_session.c (ne_session_destroy): Don't leak the server cert. - -Sat Feb 9 09:59:11 2002 Joe Orton - - * ne_session.c (check_certificate): Only call verification - callback once per certificate; watch for the server cert - changing and fail if it does. - -Wed Feb 6 20:28:27 2002 Joe Orton - - * ne_session.c (check_certificate): Only call verification - callback if failures is non-zero. - (ne_ssl_load_ca): Renamed from ne_ssl_add_ca. - (ne_ssl_load_default_ca): New function. - -Wed Feb 6 20:21:29 2002 Joe Orton - - * ne_socket.c (sock_init): Cache and return result of - initialization. - -Wed Feb 6 01:12:20 2002 Joe Orton - - * ne_session.c (check_certificate): Ignore cert validity errors - from OpenSSL since these are duplicated. - -Wed Feb 6 01:08:57 2002 Joe Orton - - * ne_session.c (ne_negotiate_ssl): Fix for invalidating cached - SSL_SESSION. - -Wed Feb 6 01:03:37 2002 Joe Orton - - * ne_session.c [!NEON_SSL] (STUB): New function. - (ne_negotiate_ssl, ne_ssl_add_ca): Implement using STUB. - -Tue Feb 5 19:56:43 2002 Joe Orton - - * ne_session.h (ne_ssl_certificate): New type. - - * ne_session.c (ne_session_create) [NEON_SSL]: Create the SSL_CTX - structure. - (ne_ssl_get_context): Return the SSL_CTX rather than setting it. - (ne_session_destroy): Free the SSL_CTX. - - (asn1time_to_string): Function moved in from sslcerts.c. - (check_certificate): Use OpenSSL's internal validity result. - Pass back an ne_ssl_certificate to the verification function; - including validity dates. - (ne_ssl_add_ca): New function, registers CA certs. - -Sat Feb 2 14:05:26 2002 Joe Orton - - * ne_socket.c (sock_enable_ssl_os): Take an optional SSL_SESSION - argument. - - * ne_private.h (struct ne_session_s): Add an SSL_SESSION field. - - * ne_session.c (ne_negotiate_ssl): Pass stored SSL session to - sock_enable_ssl_os, cache session after successful negotiation. - (ne_session_destroy): Free cached session. - -Sat Feb 2 10:45:46 2002 Joe Orton - - * ne_socket.c, ne_utils.c: Globally replace ENABLE_SSL cpp symbol - with NEON_SSL. - -Sat Feb 2 09:43:27 2002 Joe Orton - - * ne_session.c (check_certificate): Use 1K on-stack buffer. - -Sat Feb 2 08:27:08 2002 Joe Orton - - * ne_private.h (struct host_info): Add 'resolved' flag. - (struct ne_session_s): Add scheme field, rename have_proxy to - use_proxy, remove proxy_decider. - (struct ne_request_s): Remove use_proxy field. - - * ne_request.c (set_sockerr, ne_set_request_uri, build_request, - open_connection): Use session->use_proxy field to determine - whether proxy is used. - (ne_request_create): Drop use of proxy_decider callback. - (lookup_host): Moved here from ne_session.c. - (ne_begin_request): Lookup server/proxy hostname if not already - resolved. - - * ne_session.c (ne_session_create): Moved within file; takes - scheme, and server hostname, port as arguments. - (ne_ssl_enable, ne_session_decide_proxy, ne_session_server): - Removed functions. - (ne_get_scheme): Simply return scheme field. - -Fri Feb 1 23:12:38 2002 Joe Orton - - * ne_request.c (add_fixed_headers): Remove last traces of TLS - upgrade support. - -Thu Jan 31 20:50:12 2002 Joe Orton - - * ne_private.h (struct ne_session_s): Rename use_secure to - use_ssl; removed nssl_context, added SSL_CTX, server cert, verify - callback pointers. - - * ne_request.c (send_request): Remove support for TLS upgrade. - (open_connection): Use ne_negotiate_ssl; close socket properly if - negotiation fails. - - * ne_session.c (ne_session_destroy): Free SSL_CTX stored in - session. - (ne_ssl_set_context, ne_ssl_set_verify, verify_err, getx509field, - check_context, ne_negotiate_ssl, ne_ssl_server_cert): New - functions. - (ne_set_secure_context, ne_set_request_secure_upgrade, - ne_set_accept_secure_upgrade): Removed functions. - (ne_ssl_enable): Renamed from ne_set_secure. - - * ne_socket.c (struct nssl_context_s): Removed type. - (sock_create_ssl_context, sock_destroy_ssl_context, - sock_disable_*, key_prompt_cb, sock_set_key_prompt, - sock_set_client_cert): Removed functions. - (sock_enable_ssl_os): Renamed from sock_make_secure; take an - SSL_CTX pointer, and optionally pass out the SSL structure. - (sock_enable_ssl): New function. - -Wed Jan 30 19:47:42 2002 Joe Orton - - * ne_string.c (ne_buffer_concat, ne_buffer_zappend, - ne_buffer_append, ne_buffer_grow): Don't return success value, - presume universe ends at OOM. - -Sat Jan 26 10:57:42 2002 Joe Orton - - * ne_compress.c: Renamed enum state constants to have prefix - NE_Z_, to avoid conflict with Windows headers (Branko ibej). - -Mon Jan 14 20:26:31 2002 Joe Orton - - * ne_string.c (ne_concat): Removed function - it didn't work, and - it wasn't used. - -Mon Jan 14 02:09:38 2002 Joe Orton - - * ne_basic.c (ne_content_type_handler): Parse charset parameter. - -Sun Jan 13 14:29:00 2002 Joe Orton - - * ne_basic.c (ne_content_type_handler): Remove trailing '/' from - parsed type, fix search for parms separator (Greg Stein). - -Sun Jan 13 12:07:51 2002 Joe Orton - - * ne_207.c (ne_simple_request): Drop unused Content-Type handling. - -Thu Jan 10 00:39:17 2002 Joe Orton - - * ne_request.c (hdr_hash): Mark as inline. - -Tue Jan 8 22:03:42 2002 Joe Orton - - * ne_locks.c (add_timeout_header): New function. (ne_lock, - ne_lock_refresh): Send a Timeout header if lock->timeout is set. - -Mon Jan 7 21:48:38 2002 Joe Orton - - * ne_locks.c (parse_timeout): Fix parsing lock timeout (Arun - Garg). - -Mon Dec 17 22:46:36 2001 Joe Orton - - * ne_private.h (struct ne_session_s): Make expect100_works a plain - integer (rather than a bitfield). - -Sun Dec 9 14:04:27 2001 Joe Orton - - * ne_string.c (ne_buffer_grow, ne_buffer_create_sized): Don't - zero-fill new memory. (ne_buffer_concat): Zero terminate the - string as _grow doesn't do it. - -Sun Dec 9 13:31:55 2001 Joe Orton - - * ne_string.c (ne_buffer_zappend): Minor optimisation; implement - using ne_buffer_append. - -Sun Dec 9 13:18:35 2001 Joe Orton - - * ne_string.c (ne_buffer_concat): Optimise to use time O(n) [n == - total string length). - -Sun Dec 9 11:57:56 2001 Joe Orton - - * Makefile.in (NEON_DAVOBJS): Remove ne_acl.o. - -Sat Dec 8 01:11:30 2001 Joe Orton - - * ne_request.c (ne_pull_request_body): Use NE_FMT_SIZE_T in - debugging message; cast size_t to int to avoid GCC warning for - field size parameter. (set_body_size): Use NE_FMT_SIZE_T. - - * ne_xml.c (ne_xml_parse): Similarly. - -Mon Dec 3 19:56:07 2001 Joe Orton - - * ne_session.c (ne_session_destroy): Return void. - -Sat Dec 1 18:37:43 2001 Joe Orton - - * ne_auth.c (ah_create): Reset attempt counter - here... (ah_post_send): ...rather than here. - -Tue Nov 27 21:26:01 2001 Joe Orton - - * ne_request.c (send_with_progress): Actually call the callback; - fix for correct sock_fullwrite return codes. - -Tue Nov 27 20:20:40 2001 Joe Orton - - * ne_private.h (VERSION_PRE11): Define macro; as - ne_version_pre_http11. - - * ne_session.c (ne_version_pre_http11): Use VERSION_PRE11. - - * ne_request.c (add_fixed_headers, build_request, ne_end_request): - Use VERSION_PRE11. - -Sun Nov 18 19:32:56 2001 Joe Orton - - * ne_locks.c (discover_results): Check status is 2xx before - invoking callback; pass NULL lock and non-NULL status pointer in - failure cases. (create_private): Initialize lock to some "value - unspecified" defaults. - -Sun Nov 18 19:25:10 2001 Joe Orton - - * ne_auth.c (auth_session): Rename 'tries' field to 'attempt'. - (get_credentials, ah_pre_send, ah_post_send): Increment attempt - counter only when requesting credentials; reset it to zero when no - auth failure is signaled. - -Sun Nov 18 15:49:00 2001 Joe Orton - - * ne_auth.h (ne_request_auth): Pass username and password as - buffers of size NE_ABUFSIZ to callback. Add 'attempt' argument. - - * ne_auth.c (auth_session): Store username in buffer. - (get_credentials, basic_challenge, digest_challenge): Updated for - callback prototype changes. (ah_post_send): Request credentials, - and retry authentication until callback returns non-zero. - -Mon Nov 12 20:57:56 2001 Joe Orton - - * ne_basic.c (get_to_fd): Really cope with short writes (thanks to - rado ). - -Sun Nov 4 15:09:03 2001 Joe Orton - - * ne_props.h: Define NE_ELM_PROPS_UNUSED for picking element ids - for use with the propfind XML parser. - -Sat Nov 3 19:06:04 2001 Joe Orton - - * ne_props.c (NSPACE): New macro. (set_body, pnamecmp, startelm, - free_propset): Handle property having NULL nspace element in - propfind code. - -Sun Oct 28 22:04:49 2001 Joe Orton - - * ne_xml.c (parse_element): Prevent false matches of found prefix - "abcde" against stored prefix "abcdeFGH". Compare - case-sensitively. - -Fri Oct 26 20:28:03 2001 Joe Orton - - * ne_request.c (send_request): Fix case where persistent - connection times out, and improve error handling. - -Thu Oct 25 20:42:24 2001 Joe Orton - - * ne_props.c (ne_proppatch): Really handle properties with a NULL - namespace correctly; use the "D:" prefix for elements in the - "DAV:" namespace; allow properties to have no namespace. - -Tue Oct 16 08:54:46 2001 Joe Orton - - * ne_xml.c (parse_element): Fail the parse if a namespace prefix - definition is given with an empty value. - -Tue Oct 16 08:52:40 2001 Joe Orton - - * ne_props.h, ne_207.h: Move ne_propname definition into - ne_props.h. - -Tue Oct 16 08:49:42 2001 Joe Orton - - * ne_props.c (ne_proppatch): Handle properties with a NULL nspace - field correctly. - -Sun Oct 7 19:31:06 2001 Joe Orton - - * ne_acl.c (ne_acl_set) [USE_DAV_LOCKS]: Notify use of resource to - locking code. - -Sun Oct 7 17:45:01 2001 Joe Orton - - * ne_acl.c, ne_acl.h: New files, contributed by Arun Garg - . - - * Makefile.in: Add ne_acl.* to build. - -Sun Oct 7 16:10:05 2001 Joe Orton - - * ne_private (struct ne_session_s): Add 'reqcount' field. - - * ne_request.c (send_request): Refactor slightly; don't loop, but - return NE_RETRY when appropriate. Increment reqcount. - (ne_begin_request): Loop if send_request returns NE_RETRY. - (open_connection): Reset reqcount field. - -Tue Oct 2 21:11:39 2001 Joe Orton - - * ne_dates.c (GMTOFF): New macro. (ne_iso8601_parse, - ne_rfc1123_parse, ne_rfc1036_parse, ne_asctime_parse): Use new - macro, fix up date handling on some platforms. - -Sat Sep 29 14:20:47 2001 Joe Orton - - * ne_compress.c (gz_reader): Fix tests 4 and 7: don't try to - inflate after reading header if no bytes are left in the buffer. - -Sat Sep 29 14:04:11 2001 Joe Orton - - * ne_compress.c: Fix API; return an opaque object which must - be destroyed later. - - (ne_decompress_reader): Renamed from ne_gzip_response_body_reader. - Doesn't need the session object passed in any more. - (ne_decompress_destroy): Merge of co_destroy, co_post_end. - -Sat Sep 29 13:50:43 2001 Joe Orton - - * ne_request.c (ne_get_session): New function. - -Sat Sep 29 12:52:31 2001 Joe Orton - - * ne_compress.c (parse_header): Bail if flags are set to something - unexpected. - -Sat Sep 29 11:15:30 2001 Joe Orton - - * ne_compress.c, ne_compress.h: New files. - - * Makefile.in: Add deps for ne_compress. - -Thu Sep 27 09:05:24 2001 Joe Orton - - * ne_redirect.c: Adapted for new hooks interface. - - * ne_cookies.c: Adapted for new hooks interface. - (ne_cookie_register): New function. - -Thu Sep 27 09:01:03 2001 Joe Orton - - * ne_auth.c, ne_locks.c: Adapted for new hooks interface. Store - pointer to per-request object in the per-session object. - -Thu Sep 27 08:48:16 2001 Joe Orton - - Re-write hooks interface to register callbacks individually rather - than as a block. Inspired by the Apache 2.0/APR hooks interface. - - * ne_private.h (struct hook): Store a callback, userdata, id. - (struct hook_request): Removed. (struct ne_session_s): Store - hooks lists for create_req, pre_send, post_send, destroy_req, - destroy_sess, accessor. (struct ne_request_s): Store accessor - hooks list. - - * ne_request.c (ne_add_hooks): Removed. - (ne_hook_create_request, ne_hook_pre_send, ne_hook_post_send, - ne_hook_destroy_request, ne_hook_destroy_session, - ne_hook_session_accessor, ne_hook_request_accessor, - ne_null_accessor, call_access, add_hook): New functions. - (ne_request_create, ne_request_destroy, build_request, - ne_end_request): Adapt for new interface. - - * ne_session.c (destroy_hooks): New function. - (ne_session_destroy): Use it to destroy hooks lists appropriately. - -Tue Sep 25 07:46:32 2001 Joe Orton - - * ne_xml.c: Only decode UTF-8 for parsers other than libxml 1.x. - -Tue Sep 25 07:33:09 2001 Mo DeJong - - * src/ne_socket.c: Include instead of . - (sock_init): Only use signal() to ignore SIGPIPE if both - HAVE_SIGNAL and HAVE_SIGPIPE are defined. - -Tue Sep 25 07:09:53 2001 Mo DeJong - - * ne_socket.c (sock_init): Declare local variables before invoking - any instructions since that is not valid C code. - -Sun Sep 23 10:30:54 2001 Joe Orton - - * ne_auth.c (struct auth_challenge): Make members const. - (clean_session): Free the realm string. (basic_challenge, - digest_challenge): strdup the realm string. (request_digest): - opaque is no longer stored quoted. (tokenize): New function. - (verify_response, auth_challenge): Rejig to use tokenize(). - -Sat Sep 22 20:17:00 2001 Joe Orton - - * ne_string.c (ne_shave): Fix possible memory corruption when - result should be the empty string. - -Thu Sep 20 21:27:57 2001 Joe Orton - - * ne_request.c (ne_pull_request_body): Add debugging dump of body - blocks. - -Thu Sep 20 21:23:43 2001 Joe Orton - - * ne_private.h: Remove obsolete 'if_locks' member from struct - ne_request_s. - -Tue Sep 18 23:35:30 2001 Joe Orton - - * ne_basic.c (ne_get_range): Handle write errors too. - -Tue Sep 18 22:14:49 2001 Joe Orton - - * ne_xml.h (ne_xml_validate_cb): Take userdata parameter. - - * ne_xml.c (find_handler): Pass validate callback the handler's - userdata. - - * ne_207.c, ne_props.c, ne_locks.c: All users changed. - -Tue Sep 18 21:49:14 2001 Joe Orton - - * ne_locks.c (ne_lock_refresh): New function. - -Tue Sep 18 21:17:29 2001 Joe Orton - - * ne_basic.c (copy_or_move): Take a depth parameter, add depth - header, for COPY requests. (ne_copy): Take depth parameter, pass - through. (ne_move): Adjusted accordingly. - -Mon Sep 17 23:29:58 2001 Joe Orton - - * ne_utils.c (ne_debug_init): Set debug stream to be unbuffered if - setvbuf() is available. - -Mon Aug 27 00:36:37 2001 Joe Orton - - * ne_207.c (start_element, end_element): Remember when context is - valid for a , and only invoke callback then. - -Sun Aug 26 22:30:39 2001 Joe Orton - - * ne_basic.c (ne_get_range): Better error handling. Cope with - Apache's 416 problem. - -Sun Aug 26 18:58:47 2001 Joe Orton - - * ne_auth.c: Store unquoted challenge parameters in session - object, prevent having to unquote/free them >1 times. - -Sun Aug 26 18:57:51 2001 Joe Orton - - * ne_socket.c (sock_init): Do nothing on any calls after first. - -Sun Aug 26 12:45:04 2001 Joe Orton - - * ne_basic.c (server_hdr_handler): Remove function. (ne_options): - Don't add server_hdr_handler. - -Tue Jul 17 11:25:06 2001 Joe Orton - - * ne_socket.c (sock_init): Set signal dispostion for SIGPIPE to - ignore. - -Sat Jun 30 12:11:44 2001 Joe Orton - - * ne_utils.c (ne_supports_ssl): New function. - -Tue Jun 19 21:57:49 2001 Joe Orton - - * ne_dates.c (ne_iso8601_parse): Fix month off-by-one bug, use - separate vars for offsets. (ne_rfc1036_parse): Fix Y2K bug, - parsing problem. - -Tue Jun 19 21:57:42 2001 Joe Orton - - * ne_dates.c (ne_iso8601_parse): New function. - -Sun Jun 10 15:39:40 2001 Joe Orton - - * ne_request.c (send_with_progress): New function. - (send_request_body): Use send_with_progress to trigger progress - callbacks if necessary. - -Sat Jun 9 15:42:33 2001 Joe Orton - - * ne_string.h: Bring back NE_ASC2HEX/HEX2ASC. - - * ne_md5.c: Use them. - -Sat Jun 9 15:42:08 2001 Joe Orton - - * ne_xml.h: Include ne_defs.h. - -Fri Jun 8 23:02:49 2001 Joe Orton - - * ne_socket.h, ne_socket.c: Update for includes (Mo DeJong). - -Fri Jun 8 21:34:00 2001 Joe Orton - - * ne_basic.c (dav_hdr_handler): Use ne_token. - -Sat Jun 2 14:37:07 2001 Joe Orton - - * ne_private.h: Renamed from http_private.h. - -Sat Jun 2 14:35:23 2001 Joe Orton - - * ne_auth.c, ne_auth.h: Renamed from http_auth.c, ne_auth.h. - -Sat Jun 2 14:35:02 2001 Joe Orton - - * ne_cookies.c, ne_cookies.h: Renamed from http_cookies.c, - http_cookies.h. - -Sat Jun 2 14:34:51 2001 Joe Orton - - * ne_dates.c, ne_dates.h: Renamed from dates.c, dates.h - -Sat Jun 2 14:22:49 2001 Joe Orton - - * ne_redirect.c, ne_redirect.h: Renamed from http_redirect.c, - http_redirec.h. Big rename... s/http_/ne_g/ - -Sat Jun 2 12:54:51 2001 Joe Orton - - * ne_md5.c (md5_process_block): Fix for word alignment issue on - Sparc from Kai Sommerfeld. - -Wed May 30 23:15:31 2001 Joe Orton - - * ne_basic.c (ne_put, ne_get, ne_put_if_unmodified, ne_get_range, - ne_post): Take an integer fd rather than FILE * stream. - (get_to_fd): Write to fd rather than stream. - -Wed May 30 23:08:55 2001 Joe Orton - - * ne_i18n.h, ne_i18n.c: Renamed from neon_i18n.h, neon_i18n.c. - - * *.c: All changed accordingly. - -Wed May 30 23:02:47 2001 Joe Orton - - * ne_defs.h: Renamed from neon_defs.h. - - * *.h: All changed accordingly. - -Wed May 30 22:58:57 2001 Joe Orton - - * ne_md5.c, ne_md5.h: Renamed from md5.c, neon_md5.h - -Wed May 30 22:55:19 2001 Joe Orton - - * ne_utils.h: In-line ne_debug for GCC which can cope with varargs - preprocessor macros. - -Wed May 30 00:43:05 2001 Joe Orton - - * http_auth.c (ah_use_body): Removed function. (digest_body): New - function. (request_digest): Use ne_pull_request_body to find the - MD5 digest of the request body, when necessary. - -Wed May 30 00:30:52 2001 Joe Orton - - * http_redirect.c: Store Request-URI, session pointer, and method - string in redirect object. Avoid looking inside - ne_request/ne_session internals. - -Wed May 30 00:04:30 2001 Joe Orton - - * ne_request.c: Re-implement request body handling in terms of a - callback which provides the request body blocks on demand. Remove - 'use_body' hook, in favour of the hooks calling - ne_pull_request_body when necessary. (ne_pull_request_body, - body_fd_send, body_string_send): New functions. - (send_request_body): Re-implemented using ne_pull_request_body. - (run_set_body_hooks): Removed function. (ne_set_request_body_fd): - Replacement for ne_set_request_body_stream, using a raw fd rather - than a FILE *. - -Tue May 29 22:39:39 2001 Joe Orton - - * dav_basic.h, dav_basic.h: Removed. - -Tue May 29 22:38:54 2001 Joe Orton - - * ne_207.c (ne_simple_request, etc): Copied in from dav_basic.c. - -Tue May 29 22:12:23 2001 Joe Orton - - * ne_locks.c, ne_locks.h, ne_props.c, ne_props.h, ne_207.c, - ne_207.h: Big rename. dav_* -> ne_*, and so on. - -Tue May 29 22:06:24 2001 Joe Orton - - * ne_basic.c (ne_add_depth_header): Moved from dav_basic.c. - -Tue May 29 21:55:30 2001 Joe Orton - - * ne_props.c, ne_props.h: Renamed from dav_props.c, dav_props.h. - -Tue May 29 21:43:15 2001 Joe Orton - - * ne_207.c, ne_207.h: Renamed from dav_207.c, dav_207.h. - -Tue May 29 21:22:25 2001 Joe Orton - - * ne_locks.c, ne_locks.h: Renamed from dav_locks.c, dav_locks.h. - -Tue May 29 21:21:44 2001 Joe Orton - - * ne_socket.c (sock_fullwrite): Cast return value of SSL_write to - size_t to prevent comparison of signed with unsigned. - -Tue May 29 21:05:27 2001 Joe Orton - - * ne_basic.c [!NEON_NODAV]: Move ne_copy, ne_mkcol, ne_move, - ne_delete in here. - -Tue May 29 20:12:50 2001 Joe Orton - - * ne_uri.c, ne_uri.h: Renamed from uri.c, uri.h. - -Tue May 29 19:17:09 2001 Joe Orton - - * ne_socket.c, ne_socket.h: Renamed from socket.c, nsocket.h. - -Tue May 29 18:58:51 2001 Joe Orton - - * ne_basic.c (ne_mkcol, ne_copy, ne_move, ne_delete): Renamed from - dav_*. - -Tue May 29 17:58:09 2001 Joe Orton - - * ne_basic.c (copy_or_move, dav_copy, dav_move, dav_delete, - dav_mkcol): Copied in from dav_basic.c. - -Tue May 29 17:55:33 2001 Joe Orton - - * ne_basic.c, ne_basic.h: Renamed from http_basic.c, http_basic.h. - -Tue May 29 17:47:50 2001 Joe Orton - - * http_auth.c (ah_create, ah_pre_send): Add the response body - handler in pre_send, and only if qop=auth-int. - -Wed May 16 20:54:51 2001 Joe Orton - - * ne_request.c (ne_get_request_headers): Removed function. - -Sat May 12 18:48:46 2001 Joe Orton - - * ne_request.c (read_message_header, read_response_headers): Use a - fixed-size char * buffer argument rather than an ne_buffer. - Append directly to it when header-folding. - -Mon May 7 10:42:38 2001 Joe Orton - - * ne_string.c (ne_token): Use an optimized search (strchr) if - quotes is NULL. - -Mon May 7 01:33:48 2001 Joe Orton - - * http_auth.c (basic_challenge, get_cnonce): Updated for ne_base64 - change. - -Mon May 7 01:32:22 2001 Joe Orton - - * base64.c (ne_base64): Take length parameter. [BASE64_TEST] - (main): Remove function, obsoleted by test code. - -Wed May 2 12:06:59 2001 Joe Orton - - * ne_string.c, ne_string.h (ne_token, ne_shave): New functions, - destined to replace split_string, shave_string, etc. - - * ne_string.c [SPLIT_STRING_TEST, PAIR_STRING_TEST] (main): Remove - tests, functions are obsolete. - -Tue May 1 22:14:14 2001 Joe Orton - - * dates.c (ne_httpdate_parse): Moved from ne_utils.c. - -Tue May 1 21:55:45 2001 Joe Orton - - * ne_utils.c, ne_utils.h: Renamed from http_utils.c, http_utils.h. - Big rename. http_* -> ne_*. neon_* -> ne_*. DEBUG() -> - NE_DEBUG(). DEBUG_* -> NE_DBG_*. - -Tue May 1 21:35:10 2001 Joe Orton - - * ne_request.c: Updated for ne_buffer changes. - -Tue May 1 21:28:58 2001 Joe Orton - - * ne_string.h (ne_buffer_size): Implement as macro. - - * ne_string.c (ne_buffer_size): Remove function. - -Tue May 1 21:23:47 2001 Joe Orton - - * ne_string.c, ne_string.h: Make ne_buffer a transparent type, and - no longer be an implicit pointer type. (ne_buffer_*): All - changed. (ne_buffer_data, NE_BUFFER_CAST): Removed. - -Tue May 1 21:17:40 2001 Joe Orton - - * ne_string.c, ne_string.h: Renamed sbuffer -> ne_buffer. - Implicit pointer removed ne_buffer type. - -Tue May 1 21:12:15 2001 Joe Orton - - * ne_string.c, ne_string.h: Renamed from string_utils.c, - string_utils.h (CVS copy'n'delete). - -Tue May 1 20:49:46 2001 Joe Orton - - * md5.c (ASC2HEX, HEX2ASC): Moved here from string_utils.h. - - * string_utils.h: As above. - -Tue May 1 20:47:20 2001 Joe Orton - - * http_request.c, http_request.h: Removed files. - - * ne_request.c, ne_request.h: Copied from old http_request.[ch]. - Renamed http_* -> ne_*. - -Tue May 1 20:43:11 2001 Joe Orton - - * hip_xml.c renamed to ne_xml.c, hip_xml.h renamed to ne_xml.h: - CVS repository copy'n'delete. - -Tue May 1 20:41:03 2001 Joe Orton - - * hip_xml.c, hip_xml.h: Big rename. hip_xml_* -> ne_xml_*. - -Tue May 1 20:37:13 2001 Joe Orton - - * http_basic.c, http_basic.h: Big rename. http_* -> ne_*. - -Tue May 1 19:59:01 2001 Joe Orton - - * ne_session.c: Renamed http_* to ne_*. - -Tue May 1 19:55:47 2001 Joe Orton - - * ne_alloc.h (NE_FREE): Renamed from HTTP_FREE() in http_utils.h - -Tue May 1 19:54:42 2001 Joe Orton - - * socket.c (sock_make_secure): Set SSL_MODE_AUTO_RETRY when - available. - -Mon Apr 30 00:36:34 2001 Joe Orton - - * ne_session.[ch]: New files, split down from http_request.[ch]. - -Sun Apr 29 15:02:23 2001 Joe Orton - - * uri.c [URITEST] (main): Remove, obsoleted by new test suite. - -Sun Apr 29 15:01:30 2001 Joe Orton - - * uri.c (uri_has_trailing_slash): Return false if uri is "". - -Sun Apr 29 13:53:41 2001 Joe Orton - - * dates.c (ne_asctime_parse, ne_rfc1123_date, ne_rfc1036_parse): - Set tm_isdst to -1 in struct tm. - -Sun Apr 29 13:28:26 2001 Joe Orton - - * http_utils.c (http_parse_statusline): Skip leading whitespace. - (Johan Lindh). (http_parse_statusline): Ensure status-code is not - more than three digits. - -Sun Apr 29 13:26:47 2001 Joe Orton - - * http_request.c (build_request): Don't add "Content-Length: 0" - header if no body: Squid 2.3-STABLE1 doesn't like this. - -Sun Apr 29 13:25:16 2001 Joe Orton - - * http_auth.c (everywhere): Renamed md5_* -> ne_md5_*. - -Sun Apr 29 13:24:12 2001 Joe Orton - - * md5.c: Renamed md5_* -> ne_md5_*. (ne_ascii_to_md5, - ne_md5_to_ascii): Moved from string_utils.c. - -Thu Apr 26 22:39:05 2001 Joe Orton - - * uri.c (uri_parse): A zero-length URI is invalid. - -Wed Apr 25 23:11:51 2001 Joe Orton - - * dav_props.c (startelm): Check for xml:lang attribute and store - as prop->lang. (dav_propset_lang): New function. (free_propset): - Free lang. - -Wed Apr 25 23:08:52 2001 Joe Orton - - * hip_xml.c (hip_xml_get_attr): New function. - -Sun Apr 22 21:48:06 2001 Joe Orton - - * uri.c (uri_parse): Skip a userinfo@ segment if present (Johan - Lindh ). - -Wed Apr 18 13:29:46 2001 Joe Orton - - * dav_locks.c (dav_lock_copy): Allow owner to be NULL. - -Tue Apr 17 22:57:50 2001 Joe Orton - - * ne_alloc.h, dav_locks.h: Add C++ inclusion safety. - -Tue Apr 17 22:56:50 2001 Joe Orton - - * uri.c (uri_parse): Correctly handle URIs with no scheme or - hostport segments (i.e. just a path). - -Tue Apr 10 00:29:25 2001 Joe Orton - - * socket.c [HAVE_SOCKS_H]: Include socks.h for SOCKSv5 support. - -Wed Apr 4 21:41:47 2001 Joe Orton - - * http_utils.h [WIN32]: Define ssize_t (Kai). - -Tue Apr 3 21:03:28 2001 Joe Orton - - * dav_locks.c (dav_lock_discover): Cope with below API change. - -Tue Apr 3 20:43:50 2001 Joe Orton - - * dav_props.c (propfind): Register the flat element handler here, - to pick up *any* properties and store them as 'flat' if they are - not handled by a handler further down the stack. (make_elms, - free_elms, dav_propfind_set_flat, dav_propfind_set_complex): - Removed functions. (dav_propfind_named): Take the list of - property names, and call set_body here. - (dav_propfind_set_private): New function. - -Tue Apr 3 09:33:09 2001 Joe Orton - - * http_auth.h: Added C++ inclusion safety. (Kai Sommerfeld) - -Mon Apr 2 02:39:18 2001 Joe Orton - - * hip_xml.c (sax_error): Add parse error callback for libxml. - -Mon Apr 2 02:23:06 2001 Joe Orton - - * http_redirect.c (post_send): Clean up and fix logic. Only check - for confirmation for same-server redirects. - -Mon Apr 2 02:13:48 2001 Joe Orton - - * http_redirect.c (http_redirect_location): New function. - (destroy): Removed function. (create): Free location. - (post_send): Only call notify callback for followed redirects. - -Mon Apr 2 01:55:27 2001 Joe Orton - - * http_request.c (http_set_request_uri): Allow using the '*' URI - even when using a proxy server. - -Mon Apr 2 01:32:06 2001 Joe Orton - - * http_redirect.c (post_send): Give up on trying to follow a - redirect to another server. Return HTTP_REDIRECT on such a - redirect. - - * http_redirect.c (post_send): Fix leaks of URI object (Kai - Sommerfeld). - -Mon Apr 2 01:08:33 2001 Joe Orton - - * http_request.c (read_response_headers): Don't read more than 100 - response headers. - -Mon Apr 2 00:54:43 2001 Joe Orton - - * http_request.c (http_request_dispatch): Remove mapping of auth - status codes to return values, the hook does it now. - -Mon Apr 2 00:53:20 2001 Joe Orton - - * http_request.c (http_set_request_uri): New function, split out - from http_request_create. (http_request_create): Use it. - -Mon Apr 2 00:51:23 2001 Joe Orton - - * http_auth.c (http_set_proxy_auth, http_set_server_auth): Add - failure codes. (ah_post_send): Return failure code if - authentication fails. - -Mon Apr 2 00:19:17 2001 Joe Orton - - * http_utils.c: Pick up xmlversion.h from libxml2. - (neon_version_string): Include libxml2 version string if defined. - -Sun Apr 1 21:40:00 2001 Joe Orton - - * http_basic.c (http_get_range): Fix total length - calculation. (Johan Lindh ). - (clength_hdr_handler): Use range->total. - -Sun Apr 1 21:26:09 2001 Joe Orton - - * hip_xml.c: Add expat2 support (Sam TH ). - -Sun Apr 1 21:07:19 2001 Joe Orton - - * string_utils.h (CONCAT2, CONCAT3, CONCAT4): Use ne_malloc. - -Sun Apr 1 20:59:09 2001 Joe Orton - - * dav_props.c (propfind, dav_proppatch): As below. - -Sun Apr 1 20:32:29 2001 Joe Orton - - * http_basic.c (http_post): Changed as per - http_set_request_body_buffer change. - - * dav_locks.c (dav_lock): Likewise. - -Sun Apr 1 20:31:06 2001 Joe Orton - - * http_request.c (http_set_request_body_buffer): Pass in size - parameter too. (send_request_body): Use sized rather than - NUL-terminated buffer. - -Sun Apr 1 20:12:51 2001 Joe Orton - - * http_private.h: Added 'body_callback' request body type, and - body_cb, body_ud fields to http_req. - - * http_request.c (http_set_request_body_provider): New function. - (set_body_size): New function, factored out from old - http_set_request_body_*. (http_set_request_body_stream, - http_set_request_body_buffer): Use it. - -Sun Apr 1 19:56:17 2001 Joe Orton - - * dav_props.c: Replaced 'uri' and 'depth' fields in propfind - handler object with an 'http_req' pointer. (dav_propfind_create): - Create the request object here, and set the depth header. - (propfind): Changed accordingly. (dav_propfind_destroy): Destroy - request object too. - - * dav_props.c (dav_propfind_get_request): New function. - -Fri Mar 30 16:50:51 2001 Joe Orton - - * hip_xml.c (start_element): Quote attributes in collect (Kai - Sommerfeld). - -Fri Mar 30 16:36:08 2001 Joe Orton - - * http_basic.c (http_put_if_unmodified): Changed as below. - -Thu Mar 22 14:05:52 2001 Joe Orton - - * http_utils.c (http_dateparse): Changed as below. - - * http_auth.c (get_conce, basic_challenge): Likewise. - -Thu Mar 22 14:04:54 2001 Joe Orton - - * dates.c (ne_rfc1123_date, ne_rfc1123_date, ne_asctime_parse, - ne_rfc1036_parse): Added ne_ prefix. - -Thu Mar 22 14:03:12 2001 Joe Orton - - * base64.c (ne_base64): Renamed from base64. - -Tue Mar 20 20:34:44 2001 Joe Orton - - * dav_props.c (make_elms): Don't request UTF-8 decoding of - property values. - -Tue Mar 20 20:33:39 2001 Joe Orton - - * string_utils.c (ne_utf8_decode): New function. - -Mon Mar 19 22:08:45 2001 Joe Orton - - * http_basic.c (get_callback): Removed function. (http_get, - http_read_file, http_post): Use callbacks directly rather than - indirectly through get_callback. - -Mon Mar 19 21:55:19 2001 Joe Orton - - * http_request.c (notify_status, http_set_status, - http_set_progress): New functions: request status and progress - callbacks. (open_connection, lookup_host): Use notify_status to - trigger status callbacks, and register socket progress callbacks. - -Mon Mar 19 21:53:07 2001 Joe Orton - - * socket.c (sock_register_notify): Removed function. - (sock_connect_u): Renamed to sock_connect. - (sock_register_progress): Per-socket progress callbacks rather - than global ones. (sock_call_progress): Take socket argument. - (all callers changed). - -Mon Mar 19 21:52:50 2001 Joe Orton - - * socket.c (sock_get_version): New function. - -Mon Mar 19 13:59:21 2001 Joe Orton - - * dav_props.c (propfind): Destroy the handler. - -Mon Mar 19 13:36:55 2001 Joe Orton - - * dav_props.c (dav_propnames): New function. - -Wed Mar 14 22:42:12 2001 Joe Orton - - * http_request.h (http_begin_request, http_end_request, - http_read_response_block): New functions. - (http_request_dispatch): Reimplemented using new caller-pulls - interface. - -Wed Mar 14 22:20:38 2001 Joe Orton - - * http_auth.c (ah_post_send): If authentication fails (i.e. bad - credentials), clean the session details. - -Wed Mar 14 20:46:55 2001 Joe Orton - - * http_auth.c: Retry the request simply if it has not been tried - before with authentication details, otherwise, fail on 40[17]. - -Wed Mar 14 20:12:52 2001 Joe Orton - - * http_request.c (open_connection): Make sure to close the - connection, and return HTTP_CONNECT if the SSL negotiation fails. - -Tue Mar 6 18:37:43 2001 Joe Orton - - * ne_alloc.c (ne_strndup): Allocate n+1 bytes not 'n' (Kai - Sommerfeld). - -Mon Mar 5 01:05:31 2001 Joe Orton - - * http_request.c: Moved local sbuffer variables of - http_request_dispatch into http_req members 'reqbuf' and - 'respbuf'. (build_request): Return a const char * of the request. - (send_request): Call build_request directly, use req->respbuf. - (http_request_dispatch): Don't call build_request. Removed 'goto' - exception handling (hoorah). (http_request_create, - http_request_destroy): Create and destroy reqbuf and respbuf here. - -Mon Mar 5 00:43:40 2001 Joe Orton - - * http_request.c (http_set_request_body_stream): Set - req->body_size and Content-Length header here: return success - value. (http_set_request_body_buffer): Likewise (but no return - value). (get_request_bodysize): Removed function. - (build_request): Add Content-Length: 0 header if no request body. - -Mon Mar 5 00:27:24 2001 Joe Orton - - * http_auth.c (http_forget_auth): New function. - -Mon Mar 5 00:25:15 2001 Joe Orton - - * http_request.c (http_request_hook_private): Renamed from - http_get_hook_private. (http_session_hook_private): New function. - - * dav_locks.c (dav_lock_using_resource, dav_lock_using_parent): - Renamed simiarly. - -Sun Mar 4 23:12:12 2001 Joe Orton - - * http_auth.c: Moved per-request state into struct auth_request. - (request_digest): Take struct auth_request argument. (free_auth): - New function. (http_add_hooks): Pass free_auth as cleanup - function for auth session. - -Sun Mar 4 23:08:46 2001 Joe Orton - - * http_redirect.c (auto_redirect): Auto-redirect OPTIONS requests. - (free_redirect): New function. (http_redirect_register): Pass - cleanup function. - -Sun Mar 4 23:07:01 2001 Joe Orton - - * dav_locks.c (dav_lock_unregister): Removed function. - (free_locks): New function. (dav_lock_register): Pass free_locks - as cleanup function for hooks. - -Sun Mar 4 22:54:57 2001 Joe Orton - - * http_request.h (http_add_hooks): Added fourth argument to - register a cleanup function for the cookie. - -Sun Mar 4 19:53:03 2001 Joe Orton - - * http_auth.c (request_digest): Use an sbuffer to create the - header value. - -Sun Mar 4 19:44:18 2001 Joe Orton - - * http_auth.c: Remove namespace protection for private - functions. s/http_auth/auth/g. - -Sun Mar 4 19:39:13 2001 Joe Orton - - * http_auth.c (ah_pre_send): Increase attempt counter here, ... - (ah_post_send): instead of here. - -Sun Mar 4 18:40:03 2001 Joe Orton - - * http_request.c (http_request_dispatch): Simplify post_send hook - invocation: run them until one doesn't return HTTP_OK. Don't run - pre_send hooks here. Loop while a hook returns HTTP_RETRY. - (build_request): Run pre_send hooks here. - - * http_request.c (read_response_body): Call - normalize_response_length here. - -Sun Mar 4 18:12:26 2001 Joe Orton - - Re-implemented HTTP authentication using generic hooks interface. - - * http_auth.c: Added http_auth.h. (http_auth_init, - http_auth_set_creds_cb, http_auth_new_request, - http_auth_request_header): Removed functions, merged into new - hooks code. (ah_create, ah_post_send, ah_pre_send, ah_use_body, - ah_destroy): New functions. (auth_body_reader, - http_set_server_auth, http_set_proxy_auth): Moved over from - http_request.c and redone for hooks interface. - - * http_request.c (http_set_server_auth, http_set_proxy_auth, - give_creds, auth_body_reader): Moved to http_auth.c. - (http_accept_always): Renamed from always_accept_response and made - public. (http_request_create, build_request, - http_request_dispatch): Removed authentication code. - -Tue Feb 27 19:49:42 2001 Joe Orton - - * dav_props.c (set_body): Remove UTF-8 encoding again. - -Mon Feb 26 22:38:41 2001 Joe Orton - - Patch from Kai Sommerfeld to remove URI escaping from inside neon. - - * dav_207.c (end_element): Don't unescape href elements. - - * http_request.c (http_request_create): Don't escape Request-URI. - - * dav_basic.c (copy_or_move): Don't escape destination URI. - -Mon Feb 26 21:44:56 2001 Joe Orton - - * dav_props.c (set_body): UTF-8 encode the property name and - value. (make_elms): Request UTF-8 decoding of property values. - -Mon Feb 26 21:40:14 2001 Joe Orton - - * hip_xml.c: Do perform UTF-8 decoding when using libxml. - (char_data): Fix UTF-8 decoding bug where the byte after a - multi-byte encoded sequence would be skipped. - -Sun Feb 25 20:04:05 2001 Joe Orton - - * string_utils.c (ne_utf8_encode): New function. - -Sun Feb 25 19:52:01 2001 Joe Orton - - * ne_alloc.c (ne_realloc): New function. - -Sun Feb 25 17:00:32 2001 Joe Orton - - * Makefile.in (all): Rename NEON_IS_BUNDLED to NEON_BUILD_BUNDLED. - -Sun Feb 25 16:52:43 2001 Joe Orton - - * Makefile.in (all): Build according to NEON_IS_BUNDLED. - -Fri Feb 23 23:38:10 2001 Joe Orton - - * Makefile.in: Fix deps: neon_config.h has gone. - -Fri Feb 23 22:57:47 2001 Joe Orton - - * dav_props.c (dav_simple_propfind): Support a NULL 'props' - argument to do an allprop request, as per the advertising - literature. Register a catch-all handler in this case. - -Fri Feb 23 22:16:42 2001 Joe Orton - - * http_request.c (http_session_destroy): Free up hooks list. - -Thu Feb 22 21:54:36 2001 Joe Orton - - * http_request.h (http_add_hooks): Make request_hooks 'const'. - -Thu Feb 15 08:36:56 2001 Joe Orton - - * http_request.c (read_response_body): Accept SOCK_CLOSED as - end-of-response if we don't have a Content-Length (and not - chunked). (Kai Sommerfeld). - -Thu Feb 15 08:36:23 2001 Joe Orton - - * http_request.c (add_fixed_headers): Don't add the Host header - here. (http_request_dispatch): Add it here instead. - - * http_request.c (set_hostinfo): Dup the hostname. - (http_session_destroy): Free the hostname. (Kai Sommerfeld). - -Thu Feb 15 08:35:49 2001 Joe Orton - - * http_private.h: Make hostname in struct host_info char *. (Kai - Sommerfeld). - -Thu Feb 15 08:08:50 2001 Joe Orton - - * http_redirect.h: Add C++ header-inclusion safety macros (Kai - Sommerfeld ). - -Wed Feb 14 23:37:57 2001 Joe Orton - - * http_request.c (read_response_body): Use a size_t for readlen, - as read_response_block requires. - -Wed Feb 14 23:25:44 2001 Joe Orton - - * http_auth.c (request_digest): Fix incorrect signed-ness of - buffer. - -Wed Feb 14 23:22:13 2001 Joe Orton - - * uri.h, string_utils.h: Comment-out tokens after #endif. - -Sun Feb 4 14:36:11 2001 Joe Orton - - * http_redirect.c (post_send): Prototype change. - -Sun Feb 4 14:31:42 2001 Joe Orton - - * socket.c: Added key_prompt, key_userdata, key_file to - nssl_context. (sock_set_key_prompt, key_prompt_cb): New - functions. (sock_make_secure): Set ctx->key_file to private key - filename. - -Sun Feb 4 13:31:44 2001 Joe Orton - - * http_request.h: Make http_status argument of post_send a const - pointer. - -Sun Feb 4 10:38:12 2001 Joe Orton - - * http_request.c (set_sockerr): Only use the socket error if it is - NULL, else print generic "something went wrong"-type error - message. - -Sun Feb 4 10:29:37 2001 Joe Orton - - * socket.c (sock_set_client_cert): Call SSL_CTX_check_private_key - to ensure that the cert and private key match. - -Sun Feb 4 10:28:02 2001 Joe Orton - - * socket.c (sock_make_secure): In error cases after SSL_connect - succeeds, call SSL_shutdown and assign sock->ssl = NULL before - returning. - -Sat Feb 3 18:33:56 2001 Joe Orton - - * socket.c (sock_close): Call SSL_shutdown before close()'ing the - fd. - -Sat Feb 3 18:30:48 2001 Joe Orton - - * socket.c: Store an default SSL_CTX in nsocket, to be used when - no nssl_context is supplied. (create_socket): Create default - SSL_CTX (sock_close): Free it here. (sock_make_secure): Use it - here. - -Sat Feb 3 15:52:15 2001 Joe Orton - - * socket.c (sock_set_client_cert): New function. - -Sat Feb 3 15:48:51 2001 Joe Orton - - * socket.c: Rejig of nssl_context handling. An nssl_context is - now really a wrapper for an SSL_CTX. (sock_create_ssl_context): - Create the SSL_CTX here. (sock_disable_tlsv1, sock_disable_sslv2, - sock_disable_sslv3): Set the SSL_CTX option directly. - (sock_make_secure): Create an SSL_CTX if no nssl_context is - supplied, otherwise use SSL_CTX from nssl_context. - -Sun Jan 28 13:52:03 2001 Joe Orton - - * http_utils.c (neon_version_minimum): New function. - -Sun Jan 28 10:37:28 2001 Joe Orton - - * neon_config.h.in: Removed file. - - * http_request.c, http_utils.c: Don't include neon_config.h. - -Sat Jan 27 22:52:37 2001 Joe Orton - - * socket.c: Use closesocket() as NEON_CLOSE (Markus Fleck - ). - -Sat Jan 27 22:35:16 2001 Joe Orton - - * hip_xml.c: Add 'char_data' as libxml cdataBlock handler. - -Tue Jan 23 23:17:00 2001 Joe Orton - - * neon_config.h.in: Renamed from neon_config.h. Define - NEON_VERSION_MAJOR and NEON_VERSION_MINOR too: all picked up from - the NEON_VERSIONS macro. - -Sun Jan 21 22:07:34 2001 Joe Orton - - * string_utils.c (ne_concat): New function. - -Thu Jan 18 22:25:34 2001 Joe Orton - - * ne_alloc.h: Added ne_oom_callback. - - * ne_alloc.c: Added DO_MALLOC macro to do the malloc and oom - callback test. (ne_malloc): Use DO_MALLOC. (ne_strdup, - ne_calloc, ne_strndup): Reimplement using DO_MALLOC rather than - calling ne_malloc(). - -Tue Jan 16 20:16:35 2001 Joe Orton - - * neon_config.h: Bumped version to 0.10.1. - -Tue Jan 16 20:14:40 2001 Joe Orton - - * http_request.c (http_session_create): Default expect-100 support - to OFF. - -Mon Jan 15 22:59:33 2001 Joe Orton - - * neon_config.h: Bumped version to 0.10.0. - -Mon Jan 15 22:58:04 2001 Joe Orton - - * dav_basic.c (dav_simple_request): Use dav_207_ignore_unknown. - -Sun Jan 14 22:52:31 2001 Joe Orton - - * dav_props.c (propfind): Call dav_207_ignore_unknown. - -Sun Jan 14 22:49:06 2001 Joe Orton - - * dav_207.c: Don't handle unknown elements in normal handler. - (ignore_cc, dav_207_ignore_unknown): New functions, for ignoring - any unknown elements in the parse. - -Sun Jan 14 21:53:00 2001 Joe Orton - - * hip_xml.c: Renamed 'handlers' back to top_handlers. - (push_handler): Now, p->root->handlers points to BASE of stack, - p->top_handlers points to TOP of stack. (hip_xml_destroy): - Changed to start from new BASE of stack. - -Sun Jan 14 10:50:09 2001 Joe Orton - - * http_request.c (http_session_server): Do perform the DNS lookup - if we have a proxy_decider function, since that means we MIGHT - need to know the IP address of the origin server. - (http_request_create): Pass the real scheme back to the proxy - decider callback. - -Wed Jan 10 22:43:16 2001 Joe Orton - - * Makefile.in: Rename OBJ_EXT to NEON_OBJEXT. Remove - NEON_INTERFACE_VERSION, use NEON_LINK_FLAGS instead. - -Wed Jan 10 22:02:02 2001 Joe Orton - - * dav_locks.c (create_private): New function. - (dav_lock_discover): Switch to using new dav_propfind_set_complex - API. - -Wed Jan 10 21:59:36 2001 Joe Orton - - * dav_props.h (dav_propfind_set_complex): Switch the - 'sizeof_private' argument for a callback 'creator': the return - value of this callback is used as the 'private' field for the - current resource. - -Mon Jan 8 22:09:55 2001 Joe Orton - - * dav_locks.h (dav_lock_result): Re-order arguments. Make lock - object const. - - * dav_locks.c (dav_lock_copy): New function. (discover_results): - Set lock->uri given href for current results. Free lock object - after passing to results. - -Sun Jan 7 21:55:14 2001 Joe Orton - - * dav_locks.c (dav_lock): Destroy XML parser after use. Remove - handling of Lock-Token header: it wasn't used and it leaked. - -Sun Jan 7 19:58:29 2001 Joe Orton - - * dav_props.c (free_propset): Free the property values, and the - result set URI too. - -Sun Jan 7 16:58:19 2001 Joe Orton - - * http_request.c (read_response_block): Fix handling of - SOCK_CLOSED from sock_read as end-of-connection. - -Sat Jan 6 15:02:57 2001 Joe Orton - - * hip_xml.c (struct hip_xml_parser): Renamed 'top_handlers' to - 'handlers' in hip_xml_parser. (push_handler): New function. - (hip_xml_push_handler, hip_xml_push_mixed_handler): Use - push_handler. - - * hip_xml.c (find_handler): Begin the search for a new handler - from the handler of the current (parent) element, and work up the - stack. - -Sat Jan 6 11:15:17 2001 Joe Orton - - * hip_xml.c (find_handler): Display error message for unknown XML - element as 'elmname (in nspace)' rather than 'nspace:elmname' - since the latter produces confusing errors like - 'DAV::displayname'. - -Wed Jan 3 21:34:44 2001 Joe Orton - - * Makefile.in: Hard-code top_builddir as '..' (possibly wrong, but - true for all neon apps so far). Remove INCLUDES, now unused. Add - top_srcdir. - -Fri Dec 22 22:51:27 2000 Joe Orton - - * dav_props.c: Added 'has_props' field to propfind_handler struct. - (set_body): Only add leading 'prop' element if has_props is not - set. Set has_props. Don't add trailing element here. - (dav_propfind_named): ... add it here instead. - (dav_propfind_set_complex, dav_propfind_set_flat): New set_body - interface. - -Fri Dec 22 21:10:39 2000 Joe Orton - - * socket.c (sock_transfer): Don't use NEON_READ here, this is - for reading from a non-socket fd. - -Wed Dec 20 00:19:34 2000 Joe Orton - - * neon_config.h: Bumped version to 0.9.1. - -Wed Dec 20 00:19:09 2000 Joe Orton - - * dav_props.c (free_propset): Don't free the private structure, - make this the caller's responsibility. - -Wed Dec 20 00:12:36 2000 Joe Orton - - * dav_props.c (end_propstat): Rename propstat argument to - 'pstat_v' to kill warnings. - -Tue Dec 19 23:42:39 2000 Joe Orton - - * dav_props.c (start_response): Zero-out the private structure on - creation. - -Tue Dec 19 22:54:06 2000 Joe Orton - - * http_request.c (read_response_block): Rename local variable - 'socket' to 'sock'. - -Tue Dec 19 22:52:56 2000 Joe Orton - - * http_request.h: Rename argument from 'stat' in post_send - definition. - -Tue Dec 19 22:52:32 2000 Joe Orton - - * http_utils.h: Add 'const' to char * argument. - -Tue Dec 19 22:19:28 2000 Joe Orton - - * neon_config.h: Bumped version to 0.9.0. - -Tue Dec 19 22:12:19 2000 Joe Orton - - * Makefile.in: New file. - -Tue Dec 19 22:07:50 2000 Joe Orton - - * Makefile.incl: Removed file. - -Tue Dec 19 22:06:06 2000 Joe Orton - - * dav_locks.c (dav_lock_discover): New callback-based lock - discovery interface. Re-implemented using new propfind interface. - -Tue Dec 19 21:22:43 2000 Joe Orton - - * dav_props.h: Replace old dav_propfind_* interface with better - one. (dav_simple_propfind): Renamed from dav_get_props. - (dav_propfind_current_private, dav_propfind_set_complex, - dav_propfind_set_flat): New functions. - (dav_propfind_get_current_resource): Removed function. - (dav_propfind_named, dav_propfind_allprop): Change second argument - to be the results callback. - - * dav_props.c: Replace implementatino of old interface with new - one. (dav_simple_propfind): Re-implemented on top of new - all-singing all-dancing dav_propfind_* interface. - -Sun Dec 17 18:24:50 2000 Joe Orton - - * dav_props.c: Add dav_get_props, and all its auxiliaries. - -Sun Dec 17 15:43:55 2000 Joe Orton - - * dav_props.c (propfind): Destroy the request after calling - http_get_status. - -Sun Dec 17 18:04:58 2000 Joe Orton - - * hip_xml.c (find_handler): Allow using NULL as name and nspace in - HIP_ELM_unknown elements. - -Sun Dec 17 18:03:03 2000 Joe Orton - - * dav_207.c (check_context): Don't handle the unknown element when - it is a child of the prop element, this prevents handling allprop - responses. - -Thu Dec 14 21:48:06 2000 Joe Orton - - * neon_config.h: Bumped version to 0.8.0. - -Thu Dec 14 21:43:31 2000 Joe Orton - - * dav_basic.c, dav_locks.c, dav_props.c (everywhere): Changed to - new response-status interface, and _class->klass change. - -Thu Dec 14 21:37:38 2000 Joe Orton - - * http_request.c (http_get_status): Add new response-status - interface. - -Thu Dec 14 21:30:25 2000 Joe Orton - - * http_basic.c (everywhere): Use new status interface. - -Thu Dec 14 21:25:03 2000 Joe Orton - - * http_private.h: Made http_status pointer in http_req a declared - object. - - * http_request.h: Removed passing status pointer to - http_request_dispatch. - - * http_request.c (everywhere): Removed passing extra http_status * - to auxiliaries, use req->status instead. Renamed '_class' to - 'klass' everywhere. - -Thu Dec 14 21:15:54 2000 Joe Orton - - * http_utils.h: Renamed '_class' member of http_status to 'klass'. - (http_parse_statusline): Change accordingly. - -Wed Dec 13 23:00:23 2000 Joe Orton - - * socket.c: Changes for pre-BONE BeOS (David Reid - ). - -Wed Dec 13 21:29:36 2000 Joe Orton - - * uri.c (ESCAPE): Explicitly cast the character to const unsigned - int. (uri_abspath_escape): Make 'pnt' a normal const char *. - -Wed Dec 13 21:17:31 2000 Joe Orton - - * http_request.c: Remove netinet/in.h include, add limits.h - include. (Peter Boos) (read_response_block): Make readlen a size_t - (David Reid). - -Wed Dec 13 21:08:08 2000 Joe Orton - - * ne_alloc.h [WIN32]: Include stdlib.h. (Peter Boos) - -Wed Dec 13 20:54:27 2000 Joe Orton - - Patches from Peter Boos and David Reid for Win32 and - BeOS changes respectively: - - * socket.c: Add NEON_READ, NEON_WRITE, NEON_CLOSE macros to use - send/recv/closesocket for BeOS, send/recv/close for Win32, - write/read/close otherwise. Include WinSock2.h in Windows. Add - arpa/inet.h check. (sock_read, sock_write): Use the NEON_ macros. - (sock_connect, sock_close): Use NEON_CLOSE. (sock_init): Winsock - initialization. (sock_exit) Winsock cleanup. (sock_fullwrite): - Use size_t rather than ssize_t for 'sent'. (sock_connect, - sock_connect_u): Make 'port' parameter an unsigned short int. - -Wed Dec 13 20:42:18 2000 Joe Orton - - * http_basic.c (clength_hdr_handler): Use an off_t for len, to - avoid comparison with size_t. - -Wed Dec 13 20:38:59 2000 Joe Orton - - * hip_xml.c (char_data): Use an 'int' for wslen, avoid comparison - between size_t (which is signed) and int (which [is|might be?] - unsigned). - -Wed Dec 13 20:29:12 2000 Joe Orton - - * nsocket.h [WIN32]: Use Windows headers rather than Unixy ones. - (sock_exit): New function. - -Wed Dec 13 20:21:22 2000 Joe Orton - - * string_utils.c, string_utils.h, uri.h: Includes change (Peter - Boos). - -Wed Dec 13 20:20:09 2000 Joe Orton - - * http_auth.c (http_auth_response_body): Don't make - inline. Includes change. (both by Peter Boos). - -Wed Dec 13 20:18:38 2000 Joe Orton - - * uri.c (uri_unescape): Cast strtol return to (char). Includes - change as below (both by Peter Boos). - -Wed Dec 13 20:07:38 2000 Joe Orton - - * base64.c, dates.c, dates.h, dav_207.c, dav_207.h, dav_basic.h, - dav_locks.h, hip_xml.h, http_auth.h, http_basic.h, http_cookies.c, - http_redirect.c, http_redirect.h, http_request.h, http_utils.c, - md5.c, ne_alloc.c: Use #include "..." rather than #include <...> - for neon headers. (Peter Boos ). - -Thu Dec 7 21:45:02 2000 Joe Orton - - * socket.c (sock_read): Return zero immediately if a zero count - parameter is passed, following SUSv2 semantics. - -Thu Dec 7 21:41:36 2000 Joe Orton - - * nsocket.h (sock_readfile_blocked): Define an interface, allow - taking -1 as the length parameter. Only return SOCK_CLOSED if - length == -1 is NOT passed. - -Sun Nov 26 09:46:53 2000 Joe Orton - - * nsocket.h: Fix use of 'socket' in function prototypes. - -Sun Nov 19 00:29:48 2000 Joe Orton - - * nsocket.h: Increase read timeout to 120 seconds. - -Sun Nov 5 14:42:46 2000 Joe Orton - - * dav_locks.c: Fix element id's (fixes segfault when using locks). - -Thu Oct 26 22:28:17 2000 Joe Orton - - * socket.c (sock_peek): Return SOCK_CLOSED if recv() returns zero. - -Thu Oct 26 22:24:14 2000 Joe Orton - - * socket.c (sock_block): Return "got data" if SSL_pending - indicates data pending. Otherwise select on socket as normal. - -Thu Oct 26 22:15:14 2000 Joe Orton - - * socket.c (sock_readline, sock_peek): Check whether SSL - connection has been closed if SSL_peek returns 0 (thanks to Jeff - Costlow ). - -Thu Oct 14 19:57:31 2000 Joe Orton - - * Makefile.incl: Fix spurius backslash at line 69 (thanks to - Dirk Bergstrom ). - -Sat Oct 14 19:51:44 2000 Joe Orton - - * dav_basic.c (copy_or_move): Use http_get_scheme rather than - hard-coding "http". - -2000-10-02 Joe Orton - - * http_request.c (http_get_scheme): New function. - -Tue Oct 10 19:56:42 2000 Joe Orton - - * neon_config.h: Bumped version to 0.7.5. - -Sat Oct 7 19:26:58 2000 Joe Orton - - * neon_config.h: Bumped version to 0.7.4. - -Sat Oct 7 19:19:37 2000 Joe Orton - - * http_auth.c (request_digest): Quote algorithm and qop parameters - in digest header. - -Sat Oct 7 19:15:29 2000 Joe Orton - - * socket.c (sock_connect_u): Don't leak the fd if connect fails - (David Sloat). - -Sat Sep 16 16:49:57 2000 Joe Orton - - * hip_xml.h: Add 'HIP_ELM_UNUSED', defining lowest element ID - which should be used. - - * hip_xml.c, hip_xml.h (hip_xml_push_handler, - hip_xml_push_mixed_handler): Renamed from hip_xml_add_handler / - hip_xml_add_mixed_handler to reflect stack-like usage of handlers. - 'handlers' field of hip_xml_parser renamed to top_handler for same - reason (globally search'n'replaced). - - * hip_xml.h: Documentation update. - -Thu Sep 14 22:37:33 2000 Joe Orton - - * http_auth.c (request_digest): Quote qop= value, fixes - IIS5 interop. - -Thu Sep 14 00:40:04 2000 Joe Orton - - * socket.c (sock_connect_u): If connect() fails, close the socket - before returning: thanks to David Sloat . - -Tue Sep 12 20:08:40 2000 Joe Orton - - * http_request.c (read_response_headers): Remove redundant - tolower(). - -Tue Sep 12 00:41:39 2000 Joe Orton - - * neon_config.h: Bumped version to 0.7.3. - -Mon Sep 11 15:31:13 2000 Joe Orton - - * http_request.c, http_auth.c: Include snprintf.h if - HAVE_SNPRINTF_H is defined. - -Fri Sep 8 10:46:53 2000 Joe Orton - - * neon_config.h: Bumped version to 0.7.2. - -Fri Sep 8 10:44:42 2000 Joe Orton - - * socket.c (sock_block): Return immediately if this is an SSL - socket. - -Thu Sep 7 00:31:12 2000 Joe Orton - - * hip_xml.h: Correct order of hip_xml_validate_cb arguments in - prototype (thanks to Greg Stein). - -Thu Sep 7 00:27:29 2000 Joe Orton - - * dav_props.c (propfind): Don't destroy the handler after use. - (dav_propfind_destroy): New function. - -Thu Sep 7 00:08:45 2000 Joe Orton - - * Makefile.incl: Added targets for ne_alloc.o, string_utils.o, - uri.o, base64.o. - -Tue Aug 15 21:53:53 2000 Joe Orton - - * neon_config.h: Bumped version to 0.7.1. - -Tue Aug 15 21:16:34 2000 Joe Orton - - * http_request.c (http_request_create): Only add authentication - response body callbacks if a supply-credentials callback has been - set for the session. (http_request_dispatch): Similarly for - response header callbacks. - -Mon Aug 14 09:28:38 2000 Joe Orton - - * neon_config.h: Bumped version to 0.7.0. - -Mon Aug 14 09:23:54 2000 Joe Orton - - * string_utils.h (SBUFFER_CAST): New macro. - -Mon Aug 14 09:13:05 2000 Joe Orton - - * http_private.h: Use a hash table for storing response header - handlers. Added response header 'catchers', which are passed ALL - response headers. - - * http_request.c (http_add_response_header_handler): Place the - handler in the correct hash bucket. (hdr_hash): New function. - (http_add_response_header_catcher): New function. - (http_request_destroy): Destroy the header catchers, and iterate - over the hash table to destroy the handlers. - (read_response_headers): Optimisation: hash and search for ':' in - a single loop. Remove another local variable. Iterate through - catchers too. - -Sun Aug 13 15:57:35 2000 Joe Orton - - * neon_config.h: Bumped version to 0.6.1. - -Sun Aug 13 15:50:42 2000 Joe Orton - - * http_request.c (send_request): Only go through the loop at most - twice. - -Sun Aug 13 15:49:52 2000 Joe Orton - - * http_redirect.c (destroy): Don't free the redirect structure. - -Sat Aug 12 17:10:32 2000 Joe Orton - - * neon_config.h: Bumped version to 0.6.0. - -Sat Aug 12 16:48:47 2000 Joe Orton - - * http_request.c (http_session_decide_proxy): New function. - (http_request_create): Call proxy "decider callback" to determine - whether to use the proxy server for a given request or not. - -Sat Aug 12 16:39:10 2000 Joe Orton - - * Makefile.incl: Updated for http_private.h and - http_redirect.[ch]. - -Sat Aug 12 16:36:49 2000 Joe Orton - - * http_request.c: Removed data structure definitions. - - * http_private.h: New file, contains data structure definitions. - Interface NOT exported. - -Sat Aug 12 16:31:32 2000 Joe Orton - - * http_redirect.c (destroy): No return value. - -Sat Aug 12 16:04:02 2000 Joe Orton - - * http_redirect.[ch]: First cut at HTTP redirect handling. - -Sat Aug 12 11:05:13 2000 Joe Orton - - * neon_config.h: Bumped version to 0.5.1. - -Sat Aug 12 02:04:15 2000 Joe Orton - - * dav_locks.c (dav_lock_using_resource, dav_lock_using_parent): - Prevent segfault if locking is not in use. - -Fri Aug 11 17:19:06 2000 Joe Orton - - * neon_config.h: Bumped version to 0.5.0. - -Fri Aug 11 16:31:23 2000 Joe Orton - - * http_request.c (read_message_header): Take a buffer for storing - continuation lines. (read_response_headers): No need to strip EOL - since read_message_header does this already. Use one less - variable. - -Fri Aug 4 22:12:04 2000 Joe Orton - - * http_request.c (send_request): Don't retry sending the request - more than once. - -Wed Aug 2 11:08:31 2000 Joe Orton - - * ne_alloc.[ch]: Renamed from xalloc.[ch]. - -Wed Aug 2 02:15:32 2000 Joe Orton - - * socket.c (sock_transfer): Return SOCK_CLOSED, or set sock->error - appropriately on read failure. - -Tue Aug 1 13:04:27 2000 Joe Orton - - * socket.c, nsocket.h (sock_progress, sock_call_progress, - sock_transfer, sock_readfile_blocked): Use 'off_t' not 'size_t' as - file size type. - -Fri Jul 28 13:32:37 2000 Joe Orton - - * neon_config.h: Bumped version to 0.4.2. - -Fri Jul 28 13:31:38 2000 Joe Orton - - * http_request.c (send_request): Fix sending request body after - getting 100-continue response. - -Fri Jul 28 11:26:47 2000 Joe Orton - - * neon_config.h: Bumped version to 0.4.1. - -Fri Jul 28 10:32:34 2000 Joe Orton - - * neon_config.h: Bumped version to 0.4.0. - -Fri Jul 28 10:28:21 2000 Joe Orton - - * http_basic.[ch] (http_post): New function, from Sander Alberink - . - -Thu Jul 27 18:55:49 2000 Joe Orton - - * http_utils.c (neon_debug): No conditional compilation for - function body: compile it all regardless of whether debugging is - enabled or not, to allow applications to be debugged regardless of - whether debugging is compiled into the library or not. - -Thu Jul 27 16:59:26 2000 Joe Orton - - * http_basic.c (clength_hdr_handler): Cast off_t to long int for - printing. - -Tue Jul 25 18:14:15 2000 Joe Orton - - * http_request.c (read_message_header): Iterate over header - handler list before placing zero-terminator at ':': if a handler - has a NULL name field, pass it the entire header value. - -Tue Jul 25 18:00:49 2000 Joe Orton - - * http_request.c (http_get_request_headers): New function. - -Mon Jul 24 16:55:29 2000 Joe Orton - - * neon_config.h: Bumped version to 0.3.9. - -Mon Jul 24 16:54:33 2000 Joe Orton - - * http_basic.h: Use 'off_t' in http_content_range. - - * http_basic.c (http_get_range): Cast range values to (long int) - to prevent compiler warnings. - -Thu Jul 20 20:03:30 2000 Joe Orton - - * http_request.[ch], socket.c, http_basic.c: Include nsocket.h not - socket.h. - -Thu Jul 20 20:02:20 2000 Joe Orton - - * http_utils.c (version_string): Indicate which XML parser is - supported. - -Thu Jul 20 20:01:12 2000 Joe Orton - - * nsocket.h: Renamed from socket.h. - -Thu Jul 20 15:02:35 2000 Joe Orton - - * http_utils.c, socket.c, http_request.c: SSL_ENABLE renamaed to - ENABLE_SSL. - -Thu Jul 20 12:20:13 2000 Joe Orton - - * md5.c, http_auth.h: Include neon_md5.h. - -Thu Jul 20 12:19:23 2000 Joe Orton - - * neon_md5.h: Renamed from md5.h. - -Wed Jul 19 22:33:46 2000 Joe Orton - - * dav_basic.c (dav_simple_request): Don't leak ctype.value. - -Wed Jul 19 22:32:03 2000 Joe Orton - - * dav_207.c (check_context): Accept unknown elements. - -Wed Jul 19 22:31:10 2000 Joe Orton - - * dav_locks.c (dav_lock_iterate): Allow passing func as NULL. - -Wed Jul 19 22:26:13 2000 Joe Orton - - * socket.h (SOCKET_READ_TIMEOUT): Increase to 60. - -Wed Jul 19 22:25:51 2000 Joe Orton - - * dav_locks.h: Include http_request.h. - -Mon Jul 17 11:41:16 2000 Joe Orton - - * dates.c (asctime_parse, rfc1036_parse): Actually pass the string - to sscanf (thanks to lclint). (rfc1123_date): Check for gmtime() - returning NULL. - -Mon Jul 17 09:16:43 2000 Joe Orton - - * neon_config.h: Bumped version to 0.3.1. - -Mon Jul 17 09:07:58 2000 Joe Orton - - * dav_locks.c: Include limits.h: thanks to Paul D'Anna. - -Sun Jul 16 18:47:15 2000 Joe Orton - - * neon_config.h: Bumped version to 0.3.0. - -Sun Jul 16 16:44:25 2000 Joe Orton - - * neon_i18n.c (neon_i18n_init) [ENABLE_NLS && NEON_IS_LIBRARY]: - New compilation conditions. - -Sun Jul 16 16:41:12 2000 Joe Orton - - * neon_i18n.c: New file. - -Sun Jul 16 16:15:02 2000 Joe Orton - - * string_utils.c (sbuffer_*): Change to assert postcondition - (buf->used == strlen(buf->data) + 1). (sbuffer_append): Fix - brokenness. - -Sun Jul 16 16:11:05 2000 Joe Orton - - * socket.c (sock_transfer): Increase sum length written correctly. - -Sun Jul 16 16:10:23 2000 Joe Orton - - * http_request.c (http_get_hook_private): New function. - -Sun Jul 16 16:07:11 2000 Joe Orton - - * hip_xml.c (find_handler): Call validate_cb for any handler which - recognizes the element. Allow return codes - HIP_XML_{VALID,INVALID,DECLINE} from validate_cb. If DECLINE is - returned, continue searching handlers until one returns - (IN)VALID. (start_element): Don't call validate_cb. - - * hip_xml.c (start_element, end_element): In collect mode, don't - print namespace prefix if present. - -Sun Jul 16 15:30:19 2000 Joe Orton - - * dav_locks.[ch]: New file, code mainly taken from cadaver and - adapted for neon HTTP request/response handling. - -Sun Jul 16 15:28:25 2000 Joe Orton - - * dav_basic.c (copy_or_move, dav_move, dav_copy): Pass overwrite - as parameter. - -Sun Jul 16 15:26:24 2000 Joe Orton - - * uri.c (uri_compare): Fixed to only return equal if *shorter* - string has no trailing slash. - -Sat Jul 15 20:14:07 2000 Joe Orton - - * dav_207.c (dav_207_get_current_response, - dav_207_get_current_propstat): New functions. - - * dav_props.c (dav_propfind_get_current_resource): Implement using - dav_207_get_current_response. - -Sat Jul 15 17:36:37 2000 Joe Orton - - * xalloc.c (xcalloc): New function. - -Sat Jul 15 14:11:14 2000 Joe Orton - - * http_utils.[ch] and elsewhere: Replace 'class' field of - http_status with '_class' to be C++-safe. (patch from Tom - Bednarz). - -Thu Jul 6 18:48:52 2000 Joe Orton - - * dav_basic.c (copy_or_move): Escape the destination URI. - -Thu Jul 6 18:45:51 2000 Joe Orton - - * dav_props.c (end_response): Added description parameter. - -Thu Jul 6 18:43:14 2000 Joe Orton - - * dav_207.[ch] (end_element): Fix handling of responsedescription. - Add "description" parameter to dav_207_end_response callback, and - pass the contents of responsedescription. - - * dav_basic.c (handle_error, end_response, end_propstat): Pass - description and add to error string when present. - -Tue Jul 4 11:43:03 2000 Joe Orton - - * dav_basic.c, dav_props.c, http_basic.c: Use - http_{add,print}_request_header rather than - http_get_request_header. - -Tue Jul 4 11:41:00 2000 Joe Orton - - * http_request.[ch] (http_add_request_header, - http_print_request_header): New functions. - (http_get_request_header): Removed function. - -Mon Jul 3 21:50:40 2000 Joe Orton - - * http_request.c: Add basic support for TLS upgrade (RFC2817). - (http_set_request_secure_upgrade, http_set_accept_secure_upgrade): - New functions. (send_request): If upgrade is requested, and a 101 - response is received, negotiate the TLS connection. - (add_fixed_headers): Add Upgrade header if necessary. - -Mon Jul 3 21:46:00 2000 Joe Orton - - * http_request.c (send_request): Don't go into an infinite loop. - (read_message_header): Simplyify checking for end-of-line. - -Tue Jun 13 00:29:42 2000 Joe Orton - - * http_request.c (http_session_proxy, http_session_server): Allow - calling >1 time per session, to switch servers. (send_request): - Only retry sending request once. - -Mon Jun 12 21:50:41 2000 Joe Orton - - * http_request.c (http_add_hooks): New function. - -Mon Jun 12 21:37:24 2000 Joe Orton - - * http_cookies.[ch]: Added basic cookies support. - -Mon Jun 12 21:33:33 2000 Joe Orton - - * socket.c (sock_create_ssl_context, sock_destroy_ssl_context, - sock_disable_tlsv1, sock_disable_sslv2, sock_disable_sslv3, - sock_make_secure): Added nssl_context handling. - -Mon Jun 12 21:29:52 2000 Joe Orton - - * http_request.c (http_request_dispatch, http_request_create, - http_request_destroy, http_set_request_body_buffer, - http_set_request_body_stream): Added hook support. - -Mon Jun 12 21:04:00 2000 Joe Orton - - * http_request.c (http_set_secure): Store an nssl_context. - (open_connection): Give the nssl_context. - -Sun Jun 11 16:37:52 2000 Joe Orton - - * sslcerts.c: Import of SSL support from mutt, relicensed under - the LGPL for use in neon by the author, Tommi Komulainen - . - -Sun Jun 11 11:30:16 2000 Joe Orton - - * http_request.c (set_sockerr): Updated to use sock_get_error. - -Sun Jun 11 11:29:29 2000 Joe Orton - - * uri.c (uri_parse): Allow scheme to be omitted. - -Fri Jun 9 20:39:24 2000 Joe Orton - - * socket.c (sock_get_error): New function. (sock_*): Set - sock->error and SOCK_ERROR on error. - -Mon May 29 16:32:46 2000 Joe Orton - - * uri.c (uri_abspath_escape): Allocate the exact amount of memory - needed. - -Mon May 29 15:53:33 2000 Joe Orton - - * dav_basic.c (dav_simple_request): Correct invalid XML logic. - -Mon May 29 15:52:08 2000 Joe Orton - - * socket.c (create_sock, sock_accept, sock_get_fd): New - functions. (sock_connect_u): Use create_sock. - -Sun May 28 21:00:37 2000 Joe Orton - - * http_utils.c (neon_version_string): New function. - -Sun May 28 19:36:45 2000 Joe Orton - - * socket.c (sock_connect_u): Zero out allocated nsocket object. - -Thu May 25 01:27:04 2000 Joe Orton - - * *.h: Include other neon headers with . - -Thu May 25 01:02:12 2000 Joe Orton - - * dav_props.c: Include stdlib.h for 'free'. - -Wed May 24 20:15:08 2000 Joe Orton - - * http_request.c (read_message_header): Return HTTP_RETRY if more - headers to read, HTTP_OK on end-of-headers. - (read_response_headers): Changed accordingly. - -Wed May 24 19:56:29 2000 Joe Orton - - * http_request.c (send_request_body): Return a SOCK_* code. - (send_request): Re-send request if socket has been closed (due to - persistent connection timeout). - -Wed May 24 19:00:01 2000 Joe Orton - - * hip_xml.c (find_element): Fix unknown element handling. - -Tue May 23 19:12:26 2000 Joe Orton - - * dav_props.c (propfind): Destroy the request body sbuffer after - use. - -Tue May 23 15:43:42 2000 Joe Orton - - * socket.c (sock_make_secure) [SSL_ENABLE]: Conditionally compile - SSL code. [!SSL_ENABLE]: Return failure. (sock_close) - [SSL_ENABLE]: Conditionally compile SSL code. - -Tue May 23 15:37:53 2000 Joe Orton - - * http_request.c (http_session_create): Renamed from - http_session_init. (http_session_destroy): Renamed frmo - http_session_finish. - -Sun May 21 23:50:58 2000 Joe Orton - - * http_request.c (lookup_host): Use sock_name_lookup. - -Sun May 21 23:40:39 2000 Joe Orton - - * http_request.c (http_request_create): Allow passing NULL uri - (internal use only). (http_set_secure): New function. - (read_response_block, read_message_headers): Redone for new socket - API. (build_request): Moved http_auth_new_request calls here - (from http_request_dispatch). (send_request): Always call - open_connection before sending the request. - (read_message_header, read_response_headers): Looser check for - empty line. (normalize_response_length): Set response body length - to zero on 2xx class response whilst in CONNECT, if no other - response body length is given. (http_request_dispatch): Don't - close the connection on a HTTP/1.0 2xx class response after a - CONNECT request. (proxy_tunnel): New function. - (open_connection): Use an SSL connection where appropriate. Use - proxy_tunnel for tunnelling through a proxy. - -Sun May 21 01:35:40 2000 Joe Orton - - * src/socket.c: Added 'nsocket' ADT for handling sockets. - (sock_*): All changed to take 'nsocket *' argument rather than - integer file descriptor. Added 'sock_secure_details' to - sock_status enum. (sock_make_secure, sock_init): New function. - (sock_peek): Renamed from sock_recv. (send_file_*, recv_file_*): - Removed functions. (sock_name_lookup): Renamed from host_lookup. - (sock_service_lookup): Renamed from get_tcp_port. (sock_block, - sock_read, sock_fullwrite, sock_peek, sock_readline): Added SSL - support. (sock_transfer): Use sock_fullwrite and sock_read. - -Sun May 21 01:25:03 2000 Joe Orton - - * http_request.c (http_request_destroy): Free header handlers and - body readers. - -Sun May 21 01:24:30 2000 Joe Orton - - * dav_props.h: Removed obsolte got_property callback type. - -Sun May 21 01:23:59 2000 Joe Orton - - * dav_props.c (propfind): Free handler object after use. - -Sun May 21 01:23:12 2000 Joe Orton - - * dav_207.c (dav_207_destroy): Don't try to free the 'response' - field. - -Sat May 20 21:45:32 2000 Joe Orton - - * http_request.c: Changed 'te' enum of struct http_response to - 'is_chunked' boolean. - -Sun May 14 01:00:42 2000 Joe Orton - - * dav_props.c (propfind): Return error on parse error. - -Sun May 14 00:40:50 2000 Joe Orton - - * neon_config.h (NEON_VERSION): Bumped to 0.2.0. - -Sat May 13 23:31:28 2000 Joe Orton - - * neon_defs.h (BEGIN_NEON_DECLS, END_NEON_DECLS): Added C++ safety - macros. - - * *.h: Surround with C++ safety macros. - -Sat May 13 22:36:06 2000 Joe Orton - - * hip_xml.c (hip_xml_destroy): Free handlers. - -Sat May 13 21:12:14 2000 Joe Orton - - * hip_xml.c (hip_xml_valid): Reversed return value. - -Sat May 13 21:11:17 2000 Joe Orton - - * http_utils.c: Renamed http_debug_mask to neon_debug_mask, - similarly neon_debug_stream. (neon_debug_init): Renamed from - http_debug_init. - -Sat May 13 19:24:40 2000 Joe Orton - - * http_utils.c: Initialize http_debug_mask to zero. - (http_debug_init): New function. - - * http_utils.h: Fixed #ifdef DEBUGGING. Only define relevant - DEBUG_* constants. - -Sat May 13 19:23:34 2000 Joe Orton - - * neon_config.h: New file. - - * http_request.c: Include neon_config.h for NEON_VERSION. - -Sat May 13 18:28:05 2000 Joe Orton - - * dav_props.c (dav_propfind_create): Create a hip_xml_parser, a - 207 parser, register start+end response handlers with 207 layer. - (propfind): Fix allprop (Michael Sobolev). - - * dav_basic.c (dav_simple_request): Create and destroy - hip_xml_parser and 207 parser appropriately. - -Sat May 13 18:24:49 2000 Joe Orton - - * dav_207.c: Now takes an externally-declared hip_xml parser - pointer. (dav_207_create, dav_207_destroy): New functions. - (dav_207_init, dav_207_init_with_handler, dav_207_parse, - dav_207_error, dav_207_finish): Removed functions. - -Sat May 13 17:32:45 2000 Joe Orton - - * hip_xml.[ch]: Rewritten to use opaque hip_xml_parser pointer. - struct hip_xml_handler and struct hip_xml_state removed from - external interface. struct hip_xml_elm * passed to startelm_cb and - endelm_cb. (hip_xml_add_handler, hip_xml_valid, hip_xml_create, - hip_xml_destroy, hip_xml_set_error, hip_xml_get_error): New - functions. (hip_xml_init, hip_xml_destroy): Removed functions. - -Sat May 13 13:43:56 2000 Joe Orton - - * neon.h: Removed. - -Sat May 13 13:42:20 2000 Joe Orton - - * string_utils.h: Don't include config.h. (CONCAT*): Don't use - xmalloc, use malloc and abort manually. - -Sat May 13 13:32:46 2000 Joe Orton - - * http_utils.h, dates.h, http_basic.h: Don't include config.h - -Sat May 13 13:31:37 2000 Joe Orton - - * hip_xml.[ch], dav_207.c: Use HIP_ERR_SIZE for size of parser - error string. - -Sat May 13 13:30:40 2000 Joe Orton - - * Makefile.incl: Use obj_ext for object file extension. - -Thu May 11 18:21:53 2000 Joe Orton - - * neon.h: Bumped version to 0.1.1. - -Thu May 11 18:16:08 2000 Joe Orton - - * http_basic.c (get_to_fd): Fix short writes. - -Wed May 10 19:22:01 2000 Joe Orton - - * neon.h: Bumped version to 0.1.0. - -Wed May 10 17:46:48 2000 Joe Orton - - * uri.c (uri_parse, uri_free): New functions. - -Wed May 10 17:43:37 2000 Joe Orton - - * http_basic.c (get_to_fd, http_get): Set error appropriately if - fwrite() fails. - -Wed May 10 14:25:38 2000 Joe Orton - - * http_utils.c (http_debug): New function. - -Wed May 10 14:25:08 2000 Joe Orton - - * http_basic.c (get_callback): Call sock_call_progress. - -Wed May 10 14:24:20 2000 Joe Orton - - * socket.c (sock_call_progress): New function. (many places): Use - it. - -Wed May 10 14:22:48 2000 Joe Orton - - * uri.c (uri_has_trailing_slash): Moved from being inline. - -Tue May 9 23:34:25 2000 Joe Orton - - * dav_props.c: Use handler as userdata for 207 callbacks, unified - handler and context structures. (start_prop, end_prop, - start_propelm, end_propelm): Removed functions. - (dav_propfind_get_current_resource): New function. - -Tue May 9 23:29:44 2000 Joe Orton - - * xalloc.[ch]: New files. - -Tue May 9 23:05:47 2000 Joe Orton - - * dav_207.[ch]: Removed property and property element callbacks. - -Tue May 9 23:01:00 2000 Joe Orton - - * dav_207.c: Use separate name/namespace for element names. - (dav_207_init_with_handler): New function. (end_element): - Unescape URI in href element. - -Tue May 9 19:54:07 2000 Joe Orton - - * dav_props.c (dav_propfind_allprop, dav_propfind_named, propfind, - start_response, end_response, start_prop, end_prop, start_propelm, - end_propelm): New functions; PROPFIND support. - -Tue May 9 19:45:17 2000 Joe Orton - - * http_request.c (build_request): Renamed from make_request. - -Tue May 9 19:36:01 2000 Joe Orton - - * socket.[ch]: Added sock_block_reader. - -Tue May 9 15:52:56 2000 Joe Orton - - * uri.c (uri_childof): Return false when parent is the same length - as child. - -Sun May 7 15:07:49 2000 Joe Orton - - * dav_207.c: Separated element namespace/names. - -Tue May 2 16:40:59 2000 Joe Orton - - * hip_xml.[ch]: Added HIP_XML_UTF8DECODE flag. - -Tue May 2 16:16:57 2000 Joe Orton - - * hip_xml.[ch]: Separate element name and namespace. - -Mon May 1 00:21:24 2000 Joe Orton - - * dav_207.c (dav_accept_207): Moved function from dav_basic.c. - - * dav_basic.c (dav_accept_207, dav_parse_xml_block): Removed - functions. - -Sun Apr 30 22:47:47 2000 Joe Orton - - * dav_props.[ch]: Renamed dav_proppatch_item to - dav_proppatch_operation. - -Sun Apr 30 22:45:04 2000 Joe Orton - - * hip_xml.c (start_element): Clearer error message. - -Sun Apr 30 19:12:07 2000 Joe Orton - - * http_basic.c (http_content_type_handler, dav_hdr_handler): New - functions. (http_options): Handle DAV header. - -Sun Apr 30 18:08:53 2000 Joe Orton - - * dav_props.c (dav_proppatch): New function. - -Sun Apr 30 18:05:55 2000 Joe Orton - - * dav_basic.c (handle_error): New function. (end_response, - end_propstat): Use it. (dav_simple_request): Don't return the 207 - error string if we get all 2xx class status elements. - -Sun Apr 30 16:56:41 2000 Joe Orton - - * dav_basic.c (dav_add_depth_header): New function. - -Sun Apr 30 14:49:06 2000 Joe Orton - - * dav_207.c (start_element): Unknown element is only a property if - the parent is DAV:propstat. - -Sun Apr 30 14:43:28 2000 Joe Orton - - * dav_basic.c (end_response, end_propstat): Only write error line - if we have status information and the status is not a 424. - -Sun Apr 30 14:28:23 2000 Joe Orton - - * dav_basic.h: Added DAV_DEPTH_*. - -Sun Apr 30 12:47:50 2000 Joe Orton - - * dav_207.c (check_context): Allow (and ignore) unknown elements - anywhere other than as the root. - -Sun Apr 30 12:35:39 2000 Joe Orton - - * string_utils.h (ASC2HEX, HEX2ASC): New macros. - -Sun Apr 30 12:34:37 2000 Joe Orton - - * http_auth.c [STANDALONE]: Removed. (everywhere): Switch to using - md5_to_ascii rather than md5_hexify. - -Sun Apr 30 12:32:35 2000 Joe Orton - - * http_request.c (read_response_block): Fixed to return errors - properly and block length to parameter. (read_response_body): - Changed accordingly. - -Sun Apr 30 12:29:45 2000 Joe Orton - - * hip_xml.c (friendly_name): New function, was PRETTY_NAME macro. - (start_element, end_element): Fix COLLECT handling. - (hip_xml_parse): Only write parse error if the document has not - already been marked invalid. - -Sun Apr 30 12:28:36 2000 Joe Orton - - * dav_basic.c (dav_simple_request): Rewritten for new 207 - interface. (start_response, end_response, end_propstat): New - functions. - -Sun Apr 30 12:27:52 2000 Joe Orton - - * dav_207.c (dav_207_error): Return the parser error. - -Sat Apr 29 14:46:48 2000 Joe Orton - - * socket.c (sock_register_progress, sock_register_notify): New - functions. (everywhere): Use progress + notify callbacks rather - than fe_*. - -Sat Apr 29 14:15:23 2000 Joe Orton - - * string_utils.c (md5_to_ascii, ascii_to_md5): New functions. - -Sat Apr 29 13:55:39 2000 Joe Orton - - * hip_xml.c (hip_xml_init): abort() on out-of-memory. - -Sat Apr 29 12:56:11 2000 Joe Orton - - * neon_i18n.h: New file. - -Sat Apr 29 12:55:24 2000 Joe Orton - - * dav_207.[ch]: Re-implemented with sensible interface. - -Fri Apr 28 14:56:01 2000 Joe Orton - - * http_auth.c (http_auth_request_header): Renamed from - http_auth_request. - - * http_request.c (make_request): As above. - -Thu Apr 13 11:52:14 2000 Joe Orton - - * http_basic.c (http_put): Switched URI and stream arguments. - -Thu Apr 13 09:51:21 2000 Joe Orton - - * http_request.c: Added user_agent field to session structure. - (http_set_useragent): New function. (add_fixed_headers): Only set - user-agent if sess->user_agent is set. - -Thu Apr 13 09:49:32 2000 Joe Orton - - * http_request.c (lookup_host): New function, split from - set_hostinfo. (set_hostinfo): Doesn't perform DNS lookup. - (http_session_server): Don't do a DNS lookup if we have a proxy. - -Wed Apr 12 22:32:21 2000 Joe Orton - - * http_request.c (http_request_dispatch, http_request_create): - Store auth header values in local variables rather than request - structure. (http_request_create): Don't leak everything on error. - Handle http_auth_challenge return value. - -Wed Apr 12 22:30:06 2000 Joe Orton - - * http_basic.c (http_options): Pass server capabilites object, - parse Server header to detect Apache/1.3.6 and before, indicating - broken 100-continue support. (server_hdr_handler): New function. - -Mon Apr 10 17:42:07 2000 Joe Orton - - * socket.c: Use 'int' for return values. - -Mon Apr 10 17:41:40 2000 Joe Orton - - * http_auth.c (is_in_domain): Dummy implementation. - -Mon Apr 10 17:40:21 2000 Joe Orton - - * http_request.c: Handle read() returning 0 when it shouldn't. - i18n'ized error messages. - -Mon Apr 10 14:45:09 2000 Joe Orton - - * dates.[ch], md5.[ch], base64.[ch]: Imported date handling - utilities, MD5 checksum functions, and text->base64 converter. - -Mon Apr 10 14:44:08 2000 Joe Orton - - * Makefile.incl: Dependancies updated for socket.[ch]. - -Mon Apr 10 14:43:36 2000 Joe Orton - - * dav_207.c: Replaced malloc() calls with xmalloc() calls. - -Mon Apr 10 14:42:35 2000 Joe Orton - - * http_auth.c, uri.c, string_utils.h: Replaced malloc() calls with - xmalloc() calls. - -Mon Apr 10 14:41:40 2000 Joe Orton - - * socket.[ch]: Imported socket handling utilities. - -Mon Apr 10 14:36:03 2000 Joe Orton - - * string_utils.h (CONCAT*): Use xmalloc. - -Mon Apr 10 13:52:17 2000 Joe Orton - - * http_request.c (set_sockerr): Added handling for socket errors. - -Sat Apr 8 13:49:07 2000 Joe Orton - - * string_utils.[ch]: Imported string utilites. - -Sat Apr 8 00:26:06 2000 Joe Orton - - * http_request.c (http_set_persist, http_set_expect100): New - functions. - -Sat Apr 8 00:25:37 2000 Joe Orton - - * http_basic.c (http_options): New function. - -Fri Apr 7 13:01:35 2000 Joe Orton - - * neon.h: New file. - -Fri Apr 7 12:59:40 2000 Joe Orton - - * http_request.c (normalize_response_length, read_response_body): - New functions. (http_add_response_body_reader): Take a callback - to determine whether the body reader wants to read the response - body. - -Fri Apr 7 11:46:41 2000 Joe Orton - - * http_request.c (http_set_server_auth, http_set_proxy_auth): New - functions. (give_creds): Use supplied callbacks for - authentication. (get_request_bodysize): Send Content-Length: 0 if - no entity-body is being sent with a request. (te_hdr_handler, - connection_hdr_handler): New functions. (make_request): Don't use - Expect: 100-continue if server is not HTTP/1.1 compliant. - (read_message_header): Only read until HTTP_MAXIMUM_HEADER_LENGTH - bytes of header have been read. (read_response_headers): No - hard-coded header handling. (http_request_create): Set - req->method_is_head here. - -Thu Apr 6 14:39:28 2000 Joe Orton - - * hip_xml.c [HIP_XML_DECODE_UTF8] (decode_utf8_double): New - function. (char_data) [HIP_XML_DECODE_UTF8]: Decode UTF-8. - -Tue Mar 28 13:54:51 2000 Joe Orton - - * Makefile.incl: Imported makefile fragment. - -Tue Mar 28 13:54:09 2000 Joe Orton - - * http_request.[ch] (http_get_error): New function. - -Thu Mar 23 18:48:42 2000 Joe Orton - - * hip_xml.[ch]: Imported generic XML parsing layer. - - * dav_207.[ch]: Imported generic WebDAV 207 response handling. - - * dav_basic.[ch]: Imported/implemented DAV response handling and - basic Class 1 namespace methods. - -Thu Mar 23 18:46:14 2000 Joe Orton - - * http_request.c (add_hooks, run_hooks, http_add_destroy_hook): - Adding hooks support. (add_fixed_headers): Send TE token in - Connection header. Only send Keep-Alive header & token to pre-1.1 - origin servers (i.e., not proxies). - -Thu Mar 23 12:49:01 2000 Joe Orton - - * http_auth.[ch], uri.[ch]: Imported HTTP authentication and URI - handling modules. - -Thu Mar 23 12:47:05 2000 Joe Orton - - * http_utils.c: Imported HTTP utility functions. - -Thu Mar 23 12:44:38 2000 Joe Orton - - * http_request.[ch]: Implemented modular HTTP request handling. - - * http_basic.[ch]: Implemented basic HTTP methods GET, PUT, and - PUT with If-Unmodified. - diff --git a/client/neon-0.27.2/src/Makefile.in b/client/neon-0.27.2/src/Makefile.in deleted file mode 100644 index e7fac2343..000000000 --- a/client/neon-0.27.2/src/Makefile.in +++ /dev/null @@ -1,154 +0,0 @@ -# -# neon source directory Makefile -# -# Use the NEON_NORMAL_BUILD or NEON_LIBTOOL_BUILD autoconf -# macros to set up this Makefile correctly. -# - -SHELL = @SHELL@ - -# Installation paths -prefix = @prefix@ -exec_prefix = @exec_prefix@ -libdir = @libdir@ - -# Build paths -VPATH = @srcdir@ -top_builddir = @top_builddir@ -top_srcdir = @top_srcdir@ - -# Toolchain settings. -CC = @CC@ -AR = @AR@ -RANLIB = @RANLIB@ -LIBTOOL = @LIBTOOL@ - -# Flags -CPPFLAGS = @DEFS@ @CPPFLAGS@ -CFLAGS = @CFLAGS@ -LDFLAGS = @LDFLAGS@ -NEON_LINK_FLAGS = @NEON_LINK_FLAGS@ -# Note: don't substitute @LIBS@ in here; during a bundled -# build of this directory, @LIBS@ may include -lneon. -LIBS = @NEON_LIBS@ @NEON_LTLIBS@ - -COMPILE = $(CC) $(CPPFLAGS) $(CFLAGS) -LINK = $(LIBTOOL) --quiet --mode=link $(CC) -no-undefined $(LDFLAGS) - -NEON_BASEOBJS = ne_request.@NEON_OBJEXT@ ne_session.@NEON_OBJEXT@ \ - ne_basic.@NEON_OBJEXT@ ne_string.@NEON_OBJEXT@ \ - ne_uri.@NEON_OBJEXT@ ne_dates.@NEON_OBJEXT@ ne_alloc.@NEON_OBJEXT@ \ - ne_md5.@NEON_OBJEXT@ ne_utils.@NEON_OBJEXT@ \ - ne_socket.@NEON_OBJEXT@ ne_auth.@NEON_OBJEXT@ \ - ne_redirect.@NEON_OBJEXT@ ne_compress.@NEON_OBJEXT@ \ - ne_i18n.@NEON_OBJEXT@ - -NEON_DAVOBJS = $(NEON_BASEOBJS) \ - ne_207.@NEON_OBJEXT@ ne_xml.@NEON_OBJEXT@ \ - ne_props.@NEON_OBJEXT@ ne_locks.@NEON_OBJEXT@ \ - ne_xmlreq.@NEON_OBJEXT@ - -OBJECTS = @NEONOBJS@ @NEON_EXTRAOBJS@ - -.SUFFIXES: -.SUFFIXES: .c .lo .o - -NEON_TARGET = @NEON_TARGET@ - -# Thanks to gettext for this neat trick. -all: all-@NEON_BUILD_BUNDLED@ - -all-yes: $(NEON_TARGET) -all-no: - @echo "Bundled neon build not being used." - -.c.lo: - $(LIBTOOL) --quiet --mode=compile $(COMPILE) -c $< -o $@ -.c.o: - $(COMPILE) -c $< -o $@ - -libneon.la: $(OBJECTS) - $(LINK) -rpath $(libdir) $(NEON_LINK_FLAGS) -o $@ $(OBJECTS) $(LIBS) - -libneon.a: $(OBJECTS) - @rm -f $@ - $(AR) cru $@ $(OBJECTS) - $(RANLIB) $@ - -clean: - rm -f $(NEON_TARGET) *.o *.lo *.bbg *.bb *.gc* - rm -rf .libs - -c++.c: - find . -name ne_\*.h -print | sed 's/.*/#include "&"/;/ne_priv/d' > $@ - echo "int main(void) {}" >> $@ - -check-c++: c++.c - c++ -I. c++.c - -check-incl: - @for f in ne_*.h; do \ - echo Checking $$f...; \ - echo "#include \"$$f\"" > checkincl.c; \ - $(COMPILE) -c checkincl.c -o checkincl.o || exit 1; done - -neonreq = ne_request.h ne_session.h ne_utils.h ne_string.h ne_socket.h \ - ne_alloc.h $(top_builddir)/config.h ne_internal.h ne_uri.h - -ne_request.@NEON_OBJEXT@: ne_request.c $(neonreq) ne_private.h ne_uri.h - -ne_session.@NEON_OBJEXT@: ne_session.c ne_session.h ne_alloc.h \ - ne_utils.h ne_private.h ne_uri.h $(top_builddir)/config.h - -ne_openssl.@NEON_OBJEXT@: ne_openssl.c ne_session.h ne_ssl.h ne_privssl.h \ - ne_private.h $(top_builddir)/config.h - -ne_gnutls.@NEON_OBJEXT@: ne_gnutls.c ne_session.h ne_ssl.h ne_privssl.h \ - ne_private.h $(top_builddir)/config.h - -ne_socket.@NEON_OBJEXT@: ne_socket.c ne_socket.h $(top_builddir)/config.h \ - ne_privssl.h ne_string.h - -ne_auth.@NEON_OBJEXT@: ne_auth.c ne_auth.h $(neonreq) ne_private.h \ - ne_dates.h ne_md5.h ne_uri.h - -ne_basic.@NEON_OBJEXT@: ne_basic.c ne_basic.h $(neonreq) - -ne_utils.@NEON_OBJEXT@: ne_utils.c $(top_builddir)/config.h \ - ne_utils.h ne_dates.h - -ne_xml.@NEON_OBJEXT@: ne_xml.c ne_xml.h ne_string.h ne_utils.h \ - $(top_builddir)/config.h - -ne_207.@NEON_OBJEXT@: ne_207.c ne_207.h ne_xml.h ne_uri.h \ - $(top_builddir)/config.h ne_utils.h ne_internal.h - -ne_string.@NEON_OBJEXT@: ne_string.c ne_string.h ne_alloc.h \ - $(top_builddir)/config.h - -ne_alloc.@NEON_OBJEXT@: ne_alloc.c ne_alloc.h $(top_builddir)/config.h - -ne_dates.@NEON_OBJEXT@: ne_dates.c ne_dates.h $(top_builddir)/config.h - -ne_uri.@NEON_OBJEXT@: ne_uri.c ne_uri.h ne_utils.h ne_string.h ne_alloc.h \ - $(top_builddir)/config.h - -ne_md5.@NEON_OBJEXT@: ne_md5.c ne_md5.h $(top_builddir)/config.h - -ne_props.@NEON_OBJEXT@: ne_props.c $(top_builddir)/config.h \ - ne_props.h ne_207.h ne_xml.h $(neonreq) - -ne_locks.@NEON_OBJEXT@: ne_locks.c $(neonreq) ne_locks.h ne_207.h ne_xml.h - -ne_redirect.@NEON_OBJEXT@: ne_redirect.c $(neonreq) ne_redirect.h \ - ne_uri.h ne_private.h - -ne_compress.@NEON_OBJEXT@: ne_compress.c $(neonreq) ne_compress.h - -ne_acl.@NEON_OBJEXT@: ne_acl.c ne_acl.h $(neonreq) - -ne_xmlreq.@NEON_OBJEXT@: ne_xmlreq.c ne_xmlreq.h ne_xml.h $(neonreq) - -ne_stubssl.@NEON_OBJEXT@: ne_stubssl.c $(neonreq) - -ne_i18n.@NEON_OBJEXT@: ne_i18n.c ne_i18n.h $(top_builddir)/config.h diff --git a/client/neon-0.27.2/src/README b/client/neon-0.27.2/src/README deleted file mode 100644 index 0cb9a3f45..000000000 --- a/client/neon-0.27.2/src/README +++ /dev/null @@ -1,15 +0,0 @@ - -This is the source directory of the 'neon' HTTP/WebDAV client library, -which can be bundled inside other packages. For the complete neon -package, see: - - http://www.webdav.org/neon/ - -This source directory may be distributed and/or modified under the -terms of the GNU Library General Public License, as given in -COPYING.LIB. - -Please send questions, bug reports, feature requests, etc, regarding -the neon library, to the mailing list at: - - neon@webdav.org diff --git a/client/neon-0.27.2/src/memleak.h b/client/neon-0.27.2/src/memleak.h deleted file mode 100644 index 8d77dcbaf..000000000 --- a/client/neon-0.27.2/src/memleak.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Memory leak wrappers - Copyright (C) 2003, Joe Orton - - 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 - -*/ - -/* WARNING: THIS IS AN INTERNAL NEON INTERFACE AND MUST NOT BE USED - * from NEON APPLICATIONS. */ - -/* This file contains an alternate interface to the memory allocation - * wrappers in ne_alloc.c, which perform simple leak detection. It - * MUST NOT BE INSTALLED, or used from neon applications. */ - -#ifndef MEMLEAK_H -#define MEMLEAK_H - -#include - -#define ne_malloc(s) ne_malloc_ml(s, __FILE__, __LINE__) -#define ne_calloc(s) ne_calloc_ml(s, __FILE__, __LINE__) -#define ne_realloc(p, s) ne_realloc_ml(p, s, __FILE__, __LINE__) -#define ne_strdup(s) ne_strdup_ml(s, __FILE__, __LINE__) -#define ne_strndup(s, n) ne_strndup_ml(s, n, __FILE__, __LINE__) -#define ne_free ne_free_ml - -/* Prototypes of allocation functions: */ -void *ne_malloc_ml(size_t size, const char *file, int line); -void *ne_calloc_ml(size_t size, const char *file, int line); -void *ne_realloc_ml(void *ptr, size_t s, const char *file, int line); -char *ne_strdup_ml(const char *s, const char *file, int line); -char *ne_strndup_ml(const char *s, size_t n, const char *file, int line); -void ne_free_ml(void *ptr); - -/* Dump the list of currently allocated blocks to 'f'. */ -void ne_alloc_dump(FILE *f); - -/* Current number of bytes in allocated but not free'd. */ -extern size_t ne_alloc_used; - -#endif /* MEMLEAK_H */ diff --git a/client/neon-0.27.2/src/ne_207.c b/client/neon-0.27.2/src/ne_207.c deleted file mode 100644 index b9cc9e8b8..000000000 --- a/client/neon-0.27.2/src/ne_207.c +++ /dev/null @@ -1,371 +0,0 @@ -/* - WebDAV 207 multi-status response handling - Copyright (C) 1999-2006, Joe Orton - - 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 - -*/ - -/* Generic handling for WebDAV 207 Multi-Status responses. */ - -#include "config.h" - -#ifdef HAVE_STDLIB_H -#include -#endif - -#include "ne_alloc.h" -#include "ne_utils.h" -#include "ne_xml.h" -#include "ne_207.h" -#include "ne_uri.h" -#include "ne_basic.h" - -#include "ne_internal.h" - -struct ne_207_parser_s { - ne_207_start_response *start_response; - ne_207_end_response *end_response; - ne_207_start_propstat *start_propstat; - ne_207_end_propstat *end_propstat; - ne_xml_parser *parser; - void *userdata; - - ne_uri base; - - ne_buffer *cdata; - - /* remember whether we are in a response: the validation - * doesn't encapsulate this since we only count as being - * "in a response" when we've seen the href element. */ - int in_response; - - /* current position */ - void *response, *propstat; - /* caching */ - ne_status status; - char *description, *href; -}; - -#define ELM_multistatus 1 -#define ELM_response 2 -#define ELM_responsedescription 3 -#define ELM_href 4 -#define ELM_prop (NE_207_STATE_PROP) -#define ELM_status 6 -#define ELM_propstat 7 - -static const struct ne_xml_idmap map207[] = { - { "DAV:", "multistatus", ELM_multistatus }, - { "DAV:", "response", ELM_response }, - { "DAV:", "responsedescription", ELM_responsedescription }, - { "DAV:", "href", ELM_href }, - { "DAV:", "propstat", ELM_propstat }, - { "DAV:", "prop", ELM_prop }, - { "DAV:", "status", ELM_status } -}; - -/* Set the callbacks for the parser */ -void ne_207_set_response_handlers(ne_207_parser *p, - ne_207_start_response *start, - ne_207_end_response *end) -{ - p->start_response = start; - p->end_response = end; -} - -void ne_207_set_propstat_handlers(ne_207_parser *p, - ne_207_start_propstat *start, - ne_207_end_propstat *end) -{ - p->start_propstat = start; - p->end_propstat = end; -} - -void *ne_207_get_current_response(ne_207_parser *p) -{ - return p->response; -} - -void *ne_207_get_current_propstat(ne_207_parser *p) -{ - return p->propstat; -} - -/* return non-zero if (child, parent) is an interesting element */ -static int can_handle(int parent, int child) -{ - return (parent == 0 && child == ELM_multistatus) || - (parent == ELM_multistatus && child == ELM_response) || - (parent == ELM_response && - (child == ELM_href || child == ELM_status || - child == ELM_propstat || child == ELM_responsedescription)) || - (parent == ELM_propstat && - (child == ELM_prop || child == ELM_status || - child == ELM_responsedescription)); -} - -static int cdata_207(void *userdata, int state, const char *buf, size_t len) -{ - ne_207_parser *p = userdata; - - if ((state == ELM_href || state == ELM_responsedescription || - state == ELM_status) && p->cdata->used + len < 2048) - ne_buffer_append(p->cdata, buf, len); - - return 0; -} - -static int start_element(void *userdata, int parent, - const char *nspace, const char *name, - const char **atts) -{ - ne_207_parser *p = userdata; - int state = ne_xml_mapid(map207, NE_XML_MAPLEN(map207), nspace, name); - - if (!can_handle(parent, state)) - return NE_XML_DECLINE; - - /* if not in a response, ignore everything. */ - if (!p->in_response && state != ELM_response && state != ELM_multistatus && - state != ELM_href) - return NE_XML_DECLINE; - - if (state == ELM_propstat && p->start_propstat) { - p->propstat = p->start_propstat(p->userdata, p->response); - if (p->propstat == NULL) { - return NE_XML_ABORT; - } - } - - ne_buffer_clear(p->cdata); - - return state; -} - -#define GIVE_STATUS(p) ((p)->status.reason_phrase?&(p)->status:NULL) - -#define HAVE_CDATA(p) ((p)->cdata->used > 1) - -static int -end_element(void *userdata, int state, const char *nspace, const char *name) -{ - ne_207_parser *p = userdata; - const char *cdata = ne_shave(p->cdata->data, "\r\n\t "); - - switch (state) { - case ELM_responsedescription: - if (HAVE_CDATA(p)) { - if (p->description) ne_free(p->description); - p->description = ne_strdup(cdata); - } - break; - case ELM_href: - /* Now we have the href, begin the response */ - if (p->start_response && HAVE_CDATA(p)) { - ne_uri ref, resolved; - - if (ne_uri_parse(cdata, &ref) == 0) { - ne_uri_resolve(&p->base, &ref, &resolved); - - p->response = p->start_response(p->userdata, &resolved); - p->in_response = 1; - ne_uri_free(&resolved); - } - ne_uri_free(&ref); - } - break; - case ELM_status: - if (HAVE_CDATA(p)) { - if (p->status.reason_phrase) ne_free(p->status.reason_phrase); - if (ne_parse_statusline(cdata, &p->status)) { - char buf[500]; - NE_DEBUG(NE_DBG_HTTP, "Status line: %s\n", cdata); - ne_snprintf(buf, 500, - _("Invalid HTTP status line in status element " - "at line %d of response:\nStatus line was: %s"), - ne_xml_currentline(p->parser), cdata); - ne_xml_set_error(p->parser, buf); - return -1; - } else { - NE_DEBUG(NE_DBG_XML, "Decoded status line: %s\n", cdata); - } - } - break; - case ELM_propstat: - if (p->end_propstat) - p->end_propstat(p->userdata, p->propstat, GIVE_STATUS(p), - p->description); - p->propstat = NULL; - if (p->description) ne_free(p->description); - if (p->status.reason_phrase) ne_free(p->status.reason_phrase); - p->description = p->status.reason_phrase = NULL; - break; - case ELM_response: - if (!p->in_response) break; - if (p->end_response) - p->end_response(p->userdata, p->response, GIVE_STATUS(p), - p->description); - p->response = NULL; - p->in_response = 0; - if (p->description) ne_free(p->description); - if (p->status.reason_phrase) ne_free(p->status.reason_phrase); - p->description = p->status.reason_phrase = NULL; - break; - } - return 0; -} - -ne_207_parser *ne_207_create(ne_xml_parser *parser, const ne_uri *base, - void *userdata) -{ - ne_207_parser *p = ne_calloc(sizeof *p); - - p->parser = parser; - p->userdata = userdata; - p->cdata = ne_buffer_create(); - - ne_uri_copy(&p->base, base); - - /* Add handler for the standard 207 elements */ - ne_xml_push_handler(parser, start_element, cdata_207, end_element, p); - - return p; -} - -void ne_207_destroy(ne_207_parser *p) -{ - if (p->status.reason_phrase) ne_free(p->status.reason_phrase); - ne_buffer_destroy(p->cdata); - ne_uri_free(&p->base); - ne_free(p); -} - -int ne_accept_207(void *userdata, ne_request *req, const ne_status *status) -{ - return (status->code == 207); -} - -/* Handling of 207 errors: we keep a string buffer, and append - * messages to it as they come down. - * - * Note, 424 means it would have worked but something else went wrong. - * We will have had the error for "something else", so we display - * that, and skip 424 errors. */ - -/* This is passed as userdata to the 207 code. */ -struct context { - char *href; - ne_buffer *buf; - unsigned int is_error; -}; - -static void *start_response(void *userdata, const ne_uri *uri) -{ - struct context *ctx = userdata; - if (ctx->href) ne_free(ctx->href); - ctx->href = ne_uri_unparse(uri); - return NULL; -} - -static void handle_error(struct context *ctx, const ne_status *status, - const char *description) -{ - if (status && status->klass != 2 && status->code != 424) { - char buf[50]; - ctx->is_error = 1; - sprintf(buf, "%d", status->code); - ne_buffer_concat(ctx->buf, ctx->href, ": ", - buf, " ", status->reason_phrase, "\n", NULL); - if (description != NULL) { - /* TODO: these can be multi-line. Would be good to - * word-wrap this at col 80. */ - ne_buffer_concat(ctx->buf, " -> ", description, "\n", NULL); - } - } - -} - -static void end_response(void *userdata, void *response, - const ne_status *status, const char *description) -{ - struct context *ctx = userdata; - handle_error(ctx, status, description); -} - -static void -end_propstat(void *userdata, void *propstat, - const ne_status *status, const char *description) -{ - struct context *ctx = userdata; - handle_error(ctx, status, description); -} - -/* Dispatch a DAV request and handle a 207 error response appropriately */ -/* TODO: hook up Content-Type parsing; passing charset to XML parser */ -int ne_simple_request(ne_session *sess, ne_request *req) -{ - int ret; - struct context ctx = {0}; - ne_207_parser *p207; - ne_xml_parser *p = ne_xml_create(); - ne_uri base = {0}; - - /* Mock up a base URI; it should really be retrieved from the - * request object. */ - ne_fill_server_uri(sess, &base); - base.path = ne_strdup("/"); - p207 = ne_207_create(p, &base, &ctx); - ne_uri_free(&base); - - /* The error string is progressively written into the - * ne_buffer by the element callbacks */ - ctx.buf = ne_buffer_create(); - - ne_207_set_response_handlers(p207, start_response, end_response); - ne_207_set_propstat_handlers(p207, NULL, end_propstat); - - ne_add_response_body_reader(req, ne_accept_207, ne_xml_parse_v, p); - - ret = ne_request_dispatch(req); - - if (ret == NE_OK) { - if (ne_get_status(req)->code == 207) { - if (ne_xml_failed(p)) { - /* The parse was invalid */ - ne_set_error(sess, "%s", ne_xml_get_error(p)); - ret = NE_ERROR; - } else if (ctx.is_error) { - /* If we've actually got any error information - * from the 207, then set that as the error */ - ne_set_error(sess, "%s", ctx.buf->data); - ret = NE_ERROR; - } - } else if (ne_get_status(req)->klass != 2) { - ret = NE_ERROR; - } - } - - ne_207_destroy(p207); - ne_xml_destroy(p); - ne_buffer_destroy(ctx.buf); - if (ctx.href) ne_free(ctx.href); - - ne_request_destroy(req); - - return ret; -} - diff --git a/client/neon-0.27.2/src/ne_207.h b/client/neon-0.27.2/src/ne_207.h deleted file mode 100644 index 2779e56c1..000000000 --- a/client/neon-0.27.2/src/ne_207.h +++ /dev/null @@ -1,103 +0,0 @@ -/* - WebDAV 207 multi-status response handling - Copyright (C) 1999-2006, Joe Orton - - 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 - -*/ - -#ifndef NE_207_H -#define NE_207_H - -#include "ne_xml.h" -#include "ne_request.h" /* for ne_request */ -#include "ne_uri.h" /* for ne_uri */ - -NE_BEGIN_DECLS - -/* The defined state integer for the '{DAV:}prop' element. */ -#define NE_207_STATE_PROP (50) -/* This interface reserves the state integers 'x' where 0 < x < 100 */ -#define NE_207_STATE_TOP (100) - -/* Handling of 207 multistatus XML documents. A "multistatus" - * document is made up of a set of responses, each concerned with a - * particular resource. Each response may have an associated result - * status and failure description. A response is made up of a set of - * propstats, each of which again may have an associated result status - * and failure description. */ - -/* Start and end response callbacks trigger at the start and end of - * each "response" within the multistatus body. 'uri' gives the URI - * of the resource which is subject of this response. The return - * value of a 'start_response' callback is passed as the 'response' - * parameter to the corresponding 'end_response' parameter. */ -typedef void *ne_207_start_response(void *userdata, const ne_uri *uri); -typedef void ne_207_end_response(void *userdata, void *response, - const ne_status *status, - const char *description); - -/* Similarly, start and end callbacks for each propstat within the - * response. The return value of the 'start_response' callback for - * the response in which this propstat is contains is passed as the - * 'response' parameter. The return value of each 'start_propstat' is - * passed as the 'propstat' parameter' to the corresponding - * 'end_propstat' callback. If the start_propstat callback returns - * NULL, parsing is aborted (the XML parser error must be set by the - * callback). */ -typedef void *ne_207_start_propstat(void *userdata, void *response); -typedef void ne_207_end_propstat(void *userdata, void *propstat, - const ne_status *status, - const char *description); - -typedef struct ne_207_parser_s ne_207_parser; - -/* Create 207 parser an add the handlers the the given parser's - * handler stack. URI references in the 207 response will be resolved - * relative to the base URI 'base'. */ -ne_207_parser *ne_207_create(ne_xml_parser *parser, const ne_uri *base, - void *userdata); - -/* Register response handling callbacks. */ -void ne_207_set_response_handlers(ne_207_parser *p, - ne_207_start_response *start, - ne_207_end_response *end); - -/* Register propstat handling callbacks. */ -void ne_207_set_propstat_handlers(ne_207_parser *p, - ne_207_start_propstat *start, - ne_207_end_propstat *end); - -/* Destroy the parser */ -void ne_207_destroy(ne_207_parser *p); - -/* An acceptance function which only accepts 207 responses */ -int ne_accept_207(void *userdata, ne_request *req, const ne_status *status); - -void *ne_207_get_current_propstat(ne_207_parser *p); -void *ne_207_get_current_response(ne_207_parser *p); - -/* Dispatch request 'req', returning: - * NE_ERROR: for a dispatch error, or a non-2xx response, or a - * 207 response which contained a non-2xx propstat - * NE_OK: for a 2xx response or a 207 response which contained - * only 2xx-class propstats. - * The request object is destroyed in both cases. */ -int ne_simple_request(ne_session *sess, ne_request *req); - -NE_END_DECLS - -#endif /* NE_207_H */ diff --git a/client/neon-0.27.2/src/ne_acl.c b/client/neon-0.27.2/src/ne_acl.c deleted file mode 100644 index 80a683847..000000000 --- a/client/neon-0.27.2/src/ne_acl.c +++ /dev/null @@ -1,132 +0,0 @@ -/* - Access control - Copyright (C) 2001-2006, Joe Orton - - 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 - -*/ - -/* Contributed by Arun Garg */ - -#include "config.h" - -#include - -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif - -#include "ne_request.h" -#include "ne_locks.h" -#include "ne_alloc.h" -#include "ne_string.h" -#include "ne_acl.h" -#include "ne_uri.h" -#include "ne_xml.h" /* for NE_XML_MEDIA_TYPE */ - -#define EOL "\r\n" - -static ne_buffer *acl_body(const ne_acl_entry *right, int count) -{ - ne_buffer *body = ne_buffer_create(); - int m; - - ne_buffer_zappend(body, - "" EOL - "" EOL); - - for (m = 0; m < count; m++) { - const char *type; - - type = (right[m].type == ne_acl_grant ? "grant" : "deny"); - - ne_buffer_concat(body, "" EOL "", NULL); - - switch (right[m].apply) { - case ne_acl_all: - ne_buffer_zappend(body, "" EOL); - break; - case ne_acl_property: - ne_buffer_concat(body, "<", right[m].principal, - "/>" EOL, NULL); - break; - case ne_acl_href: - ne_buffer_concat(body, "", right[m].principal, - "" EOL, NULL); - break; - } - - ne_buffer_concat(body, "" EOL "<", type, ">" EOL, NULL); - - if (right[m].read == 0) - ne_buffer_concat(body, - "" "" "" EOL, - NULL); - if (right[m].read_acl == 0) - ne_buffer_concat(body, - "" "" "" EOL, - NULL); - if (right[m].write == 0) - ne_buffer_concat(body, - "" "" "" EOL, - NULL); - if (right[m].write_acl == 0) - ne_buffer_concat(body, - "" "" "" EOL, - NULL); - if (right[m].read_cuprivset == 0) - ne_buffer_concat(body, - "" - "" - "" EOL, NULL); - ne_buffer_concat(body, "" EOL, NULL); - ne_buffer_zappend(body, "" EOL); - } - ne_buffer_zappend(body, "" EOL); - - return body; -} - -int ne_acl_set(ne_session *sess, const char *uri, - const ne_acl_entry *entries, int numentries) -{ - int ret; - ne_request *req = ne_request_create(sess, "ACL", uri); - ne_buffer *body = acl_body(entries, numentries); - -#ifdef NE_HAVE_DAV - ne_lock_using_resource(req, uri, 0); -#endif - - ne_set_request_body_buffer(req, body->data, ne_buffer_size(body)); - ne_add_request_header(req, "Content-Type", NE_XML_MEDIA_TYPE); - ret = ne_request_dispatch(req); - - ne_buffer_destroy(body); - - if (ret == NE_OK && ne_get_status(req)->code == 207) { - ret = NE_ERROR; - } - - ne_request_destroy(req); - return ret; -} diff --git a/client/neon-0.27.2/src/ne_acl.h b/client/neon-0.27.2/src/ne_acl.h deleted file mode 100644 index 7bcc80a9a..000000000 --- a/client/neon-0.27.2/src/ne_acl.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Access control - Copyright (C) 2001-2006, Joe Orton - - 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 - -*/ - -#ifndef NE_ACL_H -#define NE_ACL_H - -#include "ne_session.h" - -NE_BEGIN_DECLS - -typedef struct -{ - enum { - ne_acl_href, - ne_acl_property, - ne_acl_all - } apply; - - enum { - ne_acl_grant, - ne_acl_deny - } type; - - char *principal; - int read; - int read_acl; - int write; - int write_acl; - int read_cuprivset; -} ne_acl_entry; - -/* Set the ACL for the given resource to the list of ACL entries. */ -int ne_acl_set(ne_session *sess, const char *uri, - const ne_acl_entry entries[], int numentries); - -NE_END_DECLS - -#endif /* NE_ACL_H */ diff --git a/client/neon-0.27.2/src/ne_alloc.c b/client/neon-0.27.2/src/ne_alloc.c deleted file mode 100644 index d7eca981d..000000000 --- a/client/neon-0.27.2/src/ne_alloc.c +++ /dev/null @@ -1,215 +0,0 @@ -/* - Replacement memory allocation handling etc. - Copyright (C) 1999-2005, Joe Orton - - 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 - -*/ - -#include "config.h" - -#ifdef HAVE_STRING_H -#include -#endif - -#ifdef HAVE_STDLIB_H -#include -#endif - -#include - -#include "ne_alloc.h" - -static ne_oom_callback_fn oom; - -void ne_oom_callback(ne_oom_callback_fn callback) -{ - oom = callback; -} - -#ifndef NEON_MEMLEAK - -#define DO_MALLOC(ptr, len) do { \ - ptr = malloc((len)); \ - if (!ptr) { \ - if (oom != NULL) \ - oom(); \ - abort(); \ - } \ -} while(0); - -void *ne_malloc(size_t len) -{ - void *ptr; - DO_MALLOC(ptr, len); - return ptr; -} - -void *ne_calloc(size_t len) -{ - void *ptr; - DO_MALLOC(ptr, len); - return memset(ptr, 0, len); -} - -void *ne_realloc(void *ptr, size_t len) -{ - void *ret = realloc(ptr, len); - if (!ret) { - if (oom) - oom(); - abort(); - } - return ret; -} - -char *ne_strdup(const char *s) -{ - char *ret; - DO_MALLOC(ret, strlen(s) + 1); - return strcpy(ret, s); -} - -char *ne_strndup(const char *s, size_t n) -{ - char *new; - DO_MALLOC(new, n+1); - new[n] = '\0'; - memcpy(new, s, n); - return new; -} - -#else /* NEON_MEMLEAK */ - -#include - -/* Memory-leak detection implementation: ne_malloc and friends are - * #defined to ne_malloc_ml etc by memleak.h, which is conditionally - * included by config.h. */ - -/* memory allocated be ne_*alloc, but not freed. */ -size_t ne_alloc_used = 0; - -static struct block { - void *ptr; - size_t len; - const char *file; - int line; - struct block *next; -} *blocks = NULL; - -void ne_alloc_dump(FILE *f) -{ - struct block *b; - - for (b = blocks; b != NULL; b = b->next) - fprintf(f, "%" NE_FMT_SIZE_T "b@%s:%d%s", b->len, b->file, b->line, - b->next?", ":""); -} - -static void *tracking_malloc(size_t len, const char *file, int line) -{ - void *ptr = malloc((len)); - struct block *block; - - if (!ptr) { - if (oom) oom(); - abort(); - } - - block = malloc(sizeof *block); - if (block != NULL) { - block->ptr = ptr; - block->len = len; - block->file = file; - block->line = line; - block->next = blocks; - blocks = block; - ne_alloc_used += len; - } - - return ptr; -} - -void *ne_malloc_ml(size_t size, const char *file, int line) -{ - return tracking_malloc(size, file, line); -} - -void *ne_calloc_ml(size_t size, const char *file, int line) -{ - return memset(tracking_malloc(size, file, line), 0, size); -} - -void *ne_realloc_ml(void *ptr, size_t s, const char *file, int line) -{ - void *ret; - struct block *b; - - if (ptr == NULL) - return tracking_malloc(s, file, line); - - ret = realloc(ptr, s); - if (!ret) { - if (oom) oom(); - abort(); - } - - for (b = blocks; b != NULL; b = b->next) { - if (b->ptr == ptr) { - ne_alloc_used += s - b->len; - b->ptr = ret; - b->len = s; - break; - } - } - assert(b != NULL); - - return ret; -} - -char *ne_strdup_ml(const char *s, const char *file, int line) -{ - return strcpy(tracking_malloc(strlen(s) + 1, file, line), s); -} - -char *ne_strndup_ml(const char *s, size_t n, const char *file, int line) -{ - char *ret = tracking_malloc(n + 1, file, line); - ret[n] = '\0'; - return memcpy(ret, s, n); -} - -void ne_free_ml(void *ptr) -{ - struct block *b, *last = NULL; - - for (b = blocks; b != NULL; last = b, b = b->next) { - if (b->ptr == ptr) { - ne_alloc_used -= b->len; - if (last) - last->next = b->next; - else - blocks = b->next; - free(b); - break; - } - } - - free(ptr); -} - -#endif /* NEON_MEMLEAK */ diff --git a/client/neon-0.27.2/src/ne_alloc.h b/client/neon-0.27.2/src/ne_alloc.h deleted file mode 100644 index a0421f0e6..000000000 --- a/client/neon-0.27.2/src/ne_alloc.h +++ /dev/null @@ -1,56 +0,0 @@ -/* - Replacement memory allocation handling etc. - Copyright (C) 1999-2005, Joe Orton - - 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 - -*/ - -#ifndef NE_ALLOC_H -#define NE_ALLOC_H - -#ifdef WIN32 -#include -#else -#include -#endif - -#include "ne_defs.h" - -NE_BEGIN_DECLS - -typedef void (*ne_oom_callback_fn)(void); - -/* Set callback which is called if malloc() returns NULL. */ -void ne_oom_callback(ne_oom_callback_fn callback); - -#ifndef NEON_MEMLEAK -/* Replacements for standard C library memory allocation functions, - * which never return NULL. If the C library malloc() returns NULL, - * neon will abort(); calling an OOM callback beforehand if one is - * registered. The C library will only ever return NULL if the - * operating system does not use optimistic memory allocation. */ -void *ne_malloc(size_t size) ne_attribute_malloc; -void *ne_calloc(size_t size) ne_attribute_malloc; -void *ne_realloc(void *ptr, size_t s); -char *ne_strdup(const char *s) ne_attribute_malloc; -char *ne_strndup(const char *s, size_t n) ne_attribute_malloc; -#define ne_free free -#endif - -NE_END_DECLS - -#endif /* NE_ALLOC_H */ diff --git a/client/neon-0.27.2/src/ne_auth.c b/client/neon-0.27.2/src/ne_auth.c deleted file mode 100644 index 178d705dd..000000000 --- a/client/neon-0.27.2/src/ne_auth.c +++ /dev/null @@ -1,1456 +0,0 @@ -/* - HTTP Authentication routines - Copyright (C) 1999-2007, Joe Orton - - 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 - -*/ - -#include "config.h" - -#include - -#ifdef HAVE_SYS_TIME_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_STRINGS_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include /* for getpid() */ -#endif - -#ifdef WIN32 -#include /* for GetCurrentThreadId() etc */ -#endif - -#ifdef HAVE_OPENSSL -#include -#endif - -#include -#include - -#include "ne_md5.h" -#include "ne_dates.h" -#include "ne_request.h" -#include "ne_auth.h" -#include "ne_string.h" -#include "ne_utils.h" -#include "ne_alloc.h" -#include "ne_uri.h" -#include "ne_internal.h" - -#ifdef HAVE_GSSAPI -#ifdef HAVE_GSSAPI_GSSAPI_H -#include -#ifdef HAVE_GSSAPI_GSSAPI_GENERIC_H -#include -#endif -#else -#include -#endif -#endif - -#ifdef HAVE_SSPI -#include "ne_sspi.h" -#endif - -#define HOOK_SERVER_ID "http://webdav.org/neon/hooks/server-auth" -#define HOOK_PROXY_ID "http://webdav.org/neon/hooks/proxy-auth" - -typedef enum { - auth_alg_md5, - auth_alg_md5_sess, - auth_alg_unknown -} auth_algorithm; - -/* Selected method of qop which the client is using */ -typedef enum { - auth_qop_none, - auth_qop_auth -} auth_qop; - -/* A callback/userdata pair registered by the application for - * a particular set of protocols. */ -struct auth_handler { - unsigned protomask; - - ne_auth_creds creds; - void *userdata; - int attempt; /* number of invocations of this callback for - * current request. */ - - struct auth_handler *next; -}; - -/* A challenge */ -struct auth_challenge { - const struct auth_protocol *protocol; - struct auth_handler *handler; - const char *realm; - const char *nonce; - const char *opaque; - unsigned int stale; /* if stale=true */ - unsigned int got_qop; /* we were given a qop directive */ - unsigned int qop_auth; /* "auth" token in qop attrib */ - auth_algorithm alg; - struct auth_challenge *next; -}; - -static const struct auth_class { - const char *id, *req_hdr, *resp_hdr, *resp_info_hdr; - int status_code; /* Response status-code to trap. */ - int fail_code; /* NE_* request to fail with. */ - const char *error_noauth; /* Error message template use when - * giving up authentication attempts. */ -} ah_server_class = { - HOOK_SERVER_ID, - "Authorization", "WWW-Authenticate", "Authentication-Info", - 401, NE_AUTH, - N_("Could not authenticate to server: %s") -}, ah_proxy_class = { - HOOK_PROXY_ID, - "Proxy-Authorization", "Proxy-Authenticate", "Proxy-Authentication-Info", - 407, NE_PROXYAUTH, - N_("Could not authenticate to proxy server: %s") -}; - -/* Authentication session state. */ -typedef struct { - ne_session *sess; - - /* Which context will auth challenges be accepted? */ - enum { - AUTH_ANY, /* ignore nothing. */ - AUTH_CONNECT, /* only in response to a CONNECT request. */ - AUTH_NOTCONNECT /* only in non-CONNECT responsees */ - } context; - - /* Protocol type for server/proxy auth. */ - const struct auth_class *spec; - - /* The protocol used for this authentication session */ - const struct auth_protocol *protocol; - - struct auth_handler *handlers; - - /*** Session details ***/ - - /* The username and password we are using to authenticate with */ - char username[NE_ABUFSIZ]; - - /* This used for Basic auth */ - char *basic; -#ifdef HAVE_GSSAPI - /* for the GSSAPI/Negotiate scheme: */ - char *gssapi_token; - gss_ctx_id_t gssctx; - gss_name_t gssname; - gss_OID gssmech; -#endif -#ifdef HAVE_SSPI - /* This is used for SSPI (Negotiate/NTLM) auth */ - char *sspi_token; - void *sspi_context; -#endif - /* These all used for Digest auth */ - char *realm; - char *nonce; - char *cnonce; - char *opaque; - auth_qop qop; - auth_algorithm alg; - unsigned int nonce_count; - /* The ASCII representation of the session's H(A1) value */ - char h_a1[33]; - - /* Temporary store for half of the Request-Digest - * (an optimisation - used in the response-digest calculation) */ - struct ne_md5_ctx *stored_rdig; -} auth_session; - -struct auth_request { - /*** Per-request details. ***/ - ne_request *request; /* the request object. */ - - /* The method and URI we are using for the current request */ - const char *uri; - const char *method; - - int attempt; /* number of times this request has been retries due - * to auth challenges. */ -}; - -/* Used if this protocol takes an unquoted non-name/value-pair - * parameter in the challenge. */ -#define AUTH_FLAG_OPAQUE_PARAM (0x0001) -/* Used if this Authentication-Info may be sent for non-40[17] - * response for this protocol. */ -#define AUTH_FLAG_VERIFY_NON40x (0x0002) -/* Used for broken the connection-based auth schemes. */ -#define AUTH_FLAG_CONN_AUTH (0x0004) - -struct auth_protocol { - unsigned id; /* public NE_AUTH_* id. */ - - int strength; /* protocol strength for sort order. */ - - const char *name; /* protocol name. */ - - /* Parse the authentication challenge; returns zero on success, or - * non-zero if this challenge be handled. 'attempt' is the number - * of times the request has been resent due to auth challenges. - * On failure, challenge_error() should be used to append an error - * message to the error buffer 'errmsg'. */ - int (*challenge)(auth_session *sess, int attempt, - struct auth_challenge *chall, ne_buffer **errmsg); - - /* Return the string to send in the -Authenticate request header: - * (ne_malloc-allocated, NUL-terminated string) */ - char *(*response)(auth_session *sess, struct auth_request *req); - - /* Parse a Authentication-Info response; returns NE_* error code - * on failure; on failure, the session error string must be - * set. */ - int (*verify)(struct auth_request *req, auth_session *sess, - const char *value); - - int flags; /* AUTH_FLAG_* flags */ -}; - -/* Helper function to append an error to the buffer during challenge - * handling. Pass printf-style string. *errmsg may be NULL and is - * allocated if necessary. errmsg must be non-NULL. */ -static void challenge_error(ne_buffer **errmsg, const char *fmt, ...) - ne_attribute((format(printf, 2, 3))); - -static void clean_session(auth_session *sess) -{ - if (sess->basic) ne_free(sess->basic); - if (sess->nonce) ne_free(sess->nonce); - if (sess->cnonce) ne_free(sess->cnonce); - if (sess->opaque) ne_free(sess->opaque); - if (sess->realm) ne_free(sess->realm); - sess->realm = sess->basic = sess->cnonce = sess->nonce = - sess->opaque = NULL; - if (sess->stored_rdig) { - ne_md5_destroy_ctx(sess->stored_rdig); - sess->stored_rdig = NULL; - } -#ifdef HAVE_GSSAPI - { - unsigned int major; - - if (sess->gssctx != GSS_C_NO_CONTEXT) - gss_delete_sec_context(&major, &sess->gssctx, GSS_C_NO_BUFFER); - - } - if (sess->gssapi_token) ne_free(sess->gssapi_token); - sess->gssapi_token = NULL; -#endif -#ifdef HAVE_SSPI - if (sess->sspi_token) ne_free(sess->sspi_token); - sess->sspi_token = NULL; - ne_sspi_destroy_context(sess->sspi_context); - sess->sspi_context = NULL; -#endif -} - -/* Returns client nonce string. */ -static char *get_cnonce(void) -{ - char ret[33]; - unsigned char data[256]; - struct ne_md5_ctx *hash; - - hash = ne_md5_create_ctx(); - -#ifdef HAVE_OPENSSL - if (RAND_status() == 1 && RAND_pseudo_bytes(data, sizeof data) >= 0) - ne_md5_process_bytes(data, sizeof data, hash); - else { -#endif - /* Fallback sources of random data: all bad, but no good sources - * are available. */ - - /* Uninitialized stack data; yes, happy valgrinders, this is - * supposed to be here. */ - ne_md5_process_bytes(data, sizeof data, hash); - -#ifdef HAVE_GETTIMEOFDAY - { - struct timeval tv; - if (gettimeofday(&tv, NULL) == 0) - ne_md5_process_bytes(&tv, sizeof tv, hash); - } -#else /* HAVE_GETTIMEOFDAY */ - { - time_t t = time(NULL); - ne_md5_process_bytes(&t, sizeof t, hash); - } -#endif - { -#ifdef WIN32 - DWORD pid = GetCurrentThreadId(); -#else - pid_t pid = getpid(); -#endif - ne_md5_process_bytes(&pid, sizeof pid, hash); - } - -#ifdef HAVE_OPENSSL - } -#endif - - ne_md5_finish_ascii(hash, ret); - ne_md5_destroy_ctx(hash); - - return ne_strdup(ret); -} - -/* Callback to retrieve user credentials for given session on given - * attempt (pre request) for given challenge. Password is written to - * pwbuf (of size NE_ABUFSIZ. On error, challenge_error() is used - * with errmsg. */ -static int get_credentials(auth_session *sess, ne_buffer **errmsg, int attempt, - struct auth_challenge *chall, char *pwbuf) -{ - if (chall->handler->creds(chall->handler->userdata, sess->realm, - chall->handler->attempt++, sess->username, pwbuf) == 0) { - return 0; - } else { - challenge_error(errmsg, _("rejected %s challenge"), - chall->protocol->name); - return -1; - } -} - -/* Examine a Basic auth challenge. - * Returns 0 if an valid challenge, else non-zero. */ -static int basic_challenge(auth_session *sess, int attempt, - struct auth_challenge *parms, - ne_buffer **errmsg) -{ - char *tmp, password[NE_ABUFSIZ]; - - /* Verify challenge... must have a realm */ - if (parms->realm == NULL) { - challenge_error(errmsg, _("missing realm in Basic challenge")); - return -1; - } - - clean_session(sess); - - sess->realm = ne_strdup(parms->realm); - - if (get_credentials(sess, errmsg, attempt, parms, password)) { - /* Failed to get credentials */ - return -1; - } - - tmp = ne_concat(sess->username, ":", password, NULL); - sess->basic = ne_base64((unsigned char *)tmp, strlen(tmp)); - ne_free(tmp); - - /* Paranoia. */ - memset(password, 0, sizeof password); - - return 0; -} - -/* Add Basic authentication credentials to a request */ -static char *request_basic(auth_session *sess, struct auth_request *req) -{ - return ne_concat("Basic ", sess->basic, "\r\n", NULL); -} - -#ifdef HAVE_GSSAPI -/* Add GSSAPI authentication credentials to a request */ -static char *request_negotiate(auth_session *sess, struct auth_request *req) -{ - if (sess->gssapi_token) - return ne_concat("Negotiate ", sess->gssapi_token, "\r\n", NULL); - else - return NULL; -} - -/* Create an GSSAPI name for server HOSTNAME; returns non-zero on - * error. */ -static void get_gss_name(gss_name_t *server, const char *hostname) -{ - unsigned int major, minor; - gss_buffer_desc token; - - token.value = ne_concat("HTTP@", hostname, NULL); - token.length = strlen(token.value); - - major = gss_import_name(&minor, &token, GSS_C_NT_HOSTBASED_SERVICE, - server); - ne_free(token.value); - - if (GSS_ERROR(major)) { - NE_DEBUG(NE_DBG_HTTPAUTH, "gssapi: gss_import_name failed.\n"); - *server = GSS_C_NO_NAME; - } -} - -/* Append GSSAPI error(s) for STATUS of type TYPE to BUF; prepending - * ": " to each error if *FLAG is non-zero, setting *FLAG after an - * error has been appended. */ -static void make_gss_error(ne_buffer *buf, int *flag, - unsigned int status, int type) -{ - unsigned int major, minor; - unsigned int context = 0; - - do { - gss_buffer_desc msg; - major = gss_display_status(&minor, status, type, - GSS_C_NO_OID, &context, &msg); - if (major == GSS_S_COMPLETE && msg.length) { - if ((*flag)++) ne_buffer_append(buf, ": ", 2); - ne_buffer_append(buf, msg.value, msg.length); - } - if (msg.length) gss_release_buffer(&minor, &msg); - } while (context); -} - -/* Continue a GSS-API Negotiate exchange, using input TOKEN if - * non-NULL. Returns non-zero on error, in which case *errmsg is - * guaranteed to be non-NULL (i.e. an error message is set). */ -static int continue_negotiate(auth_session *sess, const char *token, - ne_buffer **errmsg) -{ - unsigned int major, minor; - gss_buffer_desc input = GSS_C_EMPTY_BUFFER; - gss_buffer_desc output = GSS_C_EMPTY_BUFFER; - unsigned char *bintoken = NULL; - int ret; - - if (token) { - input.length = ne_unbase64(token, &bintoken); - if (input.length == 0) { - challenge_error(errmsg, _("invalid Negotiate token")); - return -1; - } - input.value = bintoken; - NE_DEBUG(NE_DBG_HTTPAUTH, "gssapi: Continuation token [%s]\n", token); - } - else if (sess->gssctx != GSS_C_NO_CONTEXT) { - NE_DEBUG(NE_DBG_HTTPAUTH, "gssapi: Reset incomplete context.\n"); - gss_delete_sec_context(&minor, &sess->gssctx, GSS_C_NO_BUFFER); - } - - major = gss_init_sec_context(&minor, GSS_C_NO_CREDENTIAL, &sess->gssctx, - sess->gssname, sess->gssmech, - GSS_C_MUTUAL_FLAG, GSS_C_INDEFINITE, - GSS_C_NO_CHANNEL_BINDINGS, - &input, &sess->gssmech, &output, NULL, NULL); - - /* done with the input token. */ - if (bintoken) ne_free(bintoken); - - if (GSS_ERROR(major)) { - int flag = 0; - - challenge_error(errmsg, _("GSSAPI authentication error: ")); - make_gss_error(*errmsg, &flag, major, GSS_C_GSS_CODE); - make_gss_error(*errmsg, &flag, minor, GSS_C_MECH_CODE); - - return -1; - } - - if (major == GSS_S_CONTINUE_NEEDED || major == GSS_S_COMPLETE) { - NE_DEBUG(NE_DBG_HTTPAUTH, "gssapi: init_sec_context OK. (major=%d)\n", - major); - ret = 0; - } - else { - challenge_error(errmsg, _("GSSAPI failure (code %u)"), major); - ret = -1; - } - - if (major != GSS_S_CONTINUE_NEEDED) { - /* context no longer needed: destroy it */ - gss_delete_sec_context(&minor, &sess->gssctx, GSS_C_NO_BUFFER); - } - - if (output.length) { - sess->gssapi_token = ne_base64(output.value, output.length); - NE_DEBUG(NE_DBG_HTTPAUTH, "gssapi: Output token: [%s]\n", - sess->gssapi_token); - gss_release_buffer(&minor, &output); - } else { - NE_DEBUG(NE_DBG_HTTPAUTH, "gssapi: No output token.\n"); - } - - return ret; -} - -/* Process a Negotiate challange CHALL in session SESS; returns zero - * if challenge is accepted. */ -static int negotiate_challenge(auth_session *sess, int attempt, - struct auth_challenge *chall, - ne_buffer **errmsg) -{ - const char *token = chall->opaque; - - /* Respect an initial challenge - which must have no input token, - * or a continuation - which must have an input token. */ - if (attempt == 0 || token) { - return continue_negotiate(sess, token, errmsg); - } - else { - challenge_error(errmsg, _("ignoring empty Negotiate continuation")); - return -1; - } -} - -/* Verify the header HDR in a Negotiate response. */ -static int verify_negotiate_response(struct auth_request *req, auth_session *sess, - const char *hdr) -{ - char *duphdr = ne_strdup(hdr); - char *sep, *ptr = strchr(duphdr, ' '); - int ret; - ne_buffer *errmsg = NULL; - - if (strncmp(hdr, "Negotiate", ptr - duphdr) != 0) { - ne_set_error(sess->sess, _("Negotiate response verification failed: " - "invalid response header token")); - ne_free(duphdr); - return NE_ERROR; - } - - ptr++; - - if (strlen(ptr) == 0) { - NE_DEBUG(NE_DBG_HTTPAUTH, "gssapi: No token in Negotiate response!\n"); - ne_free(duphdr); - return NE_OK; - } - - if ((sep = strchr(ptr, ',')) != NULL) - *sep = '\0'; - if ((sep = strchr(ptr, ' ')) != NULL) - *sep = '\0'; - - NE_DEBUG(NE_DBG_HTTPAUTH, "gssapi: Negotiate response token [%s]\n", ptr); - ret = continue_negotiate(sess, ptr, &errmsg); - if (ret) { - ne_set_error(sess->sess, _("Negotiate response verification failure: %s"), - errmsg->data); - } - - if (errmsg) ne_buffer_destroy(errmsg); - ne_free(duphdr); - - return ret ? NE_ERROR : NE_OK; -} -#endif - -#ifdef HAVE_SSPI -static char *request_sspi(auth_session *sess, struct auth_request *request) -{ - return ne_concat(sess->protocol->name, " ", sess->sspi_token, "\r\n", NULL); -} - -static int sspi_challenge(auth_session *sess, int attempt, - struct auth_challenge *parms, - ne_buffer **errmsg) -{ - int ntlm = ne_strcasecmp(parms->protocol->name, "NTLM") == 0; - int status; - char *response = NULL; - - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: SSPI challenge.\n"); - - if (!sess->sspi_context) { - ne_uri uri = {0}; - - ne_fill_server_uri(sess->sess, &uri); - - status = ne_sspi_create_context(&sess->sspi_context, uri.host, ntlm); - - ne_uri_free(&uri); - - if (status) { - return status; - } - } - - status = ne_sspi_authenticate(sess->sspi_context, parms->opaque, &response); - if (status) { - return status; - } - - sess->sspi_token = response; - - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: SSPI challenge [%s]\n", sess->sspi_token); - - return 0; -} -#endif - -/* Examine a digest challenge: return 0 if it is a valid Digest challenge, - * else non-zero. */ -static int digest_challenge(auth_session *sess, int attempt, - struct auth_challenge *parms, - ne_buffer **errmsg) -{ - char password[NE_ABUFSIZ]; - - if (parms->alg == auth_alg_unknown) { - challenge_error(errmsg, _("unknown algorithm in Digest challenge")); - return -1; - } - else if (parms->alg == auth_alg_md5_sess && !parms->qop_auth) { - challenge_error(errmsg, _("incompatible algorithm in Digest challenge")); - return -1; - } - else if (parms->realm == NULL || parms->nonce == NULL) { - challenge_error(errmsg, _("missing parameter in Digest challenge")); - return -1; - } - else if (parms->stale && sess->nonce_count == 0) { - challenge_error(errmsg, _("initial Digest challenge was stale")); - return -1; - } - else if (parms->stale && (sess->alg != parms->alg - || strcmp(sess->realm, parms->realm))) { - /* With stale=true the realm and algorithm cannot change since these - * require re-hashing H(A1) which defeats the point. */ - challenge_error(errmsg, _("stale Digest challenge with new algorithm or realm")); - return -1; - } - - if (!parms->stale) { - /* Non-stale challenge: clear session and request credentials. */ - clean_session(sess); - - sess->realm = ne_strdup(parms->realm); - sess->alg = parms->alg; - sess->cnonce = get_cnonce(); - - if (get_credentials(sess, errmsg, attempt, parms, password)) { - /* Failed to get credentials */ - return -1; - } - } - else { - /* Stale challenge: accept a new nonce or opaque. */ - if (sess->nonce) ne_free(sess->nonce); - if (sess->opaque && parms->opaque) ne_free(sess->opaque); - } - - sess->nonce = ne_strdup(parms->nonce); - if (parms->opaque) { - sess->opaque = ne_strdup(parms->opaque); - } - - if (parms->got_qop) { - /* What type of qop are we to apply to the message? */ - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: Got qop, using 2617-style.\n"); - sess->nonce_count = 0; - sess->qop = auth_qop_auth; - } else { - /* No qop at all/ */ - sess->qop = auth_qop_none; - } - - if (!parms->stale) { - struct ne_md5_ctx *tmp; - - /* Calculate H(A1). - * tmp = H(unq(username-value) ":" unq(realm-value) ":" passwd) - */ - tmp = ne_md5_create_ctx(); - ne_md5_process_bytes(sess->username, strlen(sess->username), tmp); - ne_md5_process_bytes(":", 1, tmp); - ne_md5_process_bytes(sess->realm, strlen(sess->realm), tmp); - ne_md5_process_bytes(":", 1, tmp); - ne_md5_process_bytes(password, strlen(password), tmp); - memset(password, 0, sizeof password); /* done with that. */ - if (sess->alg == auth_alg_md5_sess) { - struct ne_md5_ctx *a1; - char tmp_md5_ascii[33]; - - /* Now we calculate the SESSION H(A1) - * A1 = H(...above...) ":" unq(nonce-value) ":" unq(cnonce-value) - */ - ne_md5_finish_ascii(tmp, tmp_md5_ascii); - a1 = ne_md5_create_ctx(); - ne_md5_process_bytes(tmp_md5_ascii, 32, a1); - ne_md5_process_bytes(":", 1, a1); - ne_md5_process_bytes(sess->nonce, strlen(sess->nonce), a1); - ne_md5_process_bytes(":", 1, a1); - ne_md5_process_bytes(sess->cnonce, strlen(sess->cnonce), a1); - ne_md5_finish_ascii(a1, sess->h_a1); - ne_md5_destroy_ctx(a1); - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: Session H(A1) is [%s]\n", sess->h_a1); - } else { - ne_md5_finish_ascii(tmp, sess->h_a1); - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: H(A1) is [%s]\n", sess->h_a1); - } - ne_md5_destroy_ctx(tmp); - - } - - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: Accepting digest challenge.\n"); - - return 0; -} - -/* Return Digest authentication credentials header value for the given - * session. */ -static char *request_digest(auth_session *sess, struct auth_request *req) -{ - struct ne_md5_ctx *a2, *rdig; - char a2_md5_ascii[33], rdig_md5_ascii[33]; - char nc_value[9] = {0}; - const char *qop_value = "auth"; /* qop-value */ - ne_buffer *ret; - - /* Increase the nonce-count */ - if (sess->qop != auth_qop_none) { - sess->nonce_count++; - ne_snprintf(nc_value, 9, "%08x", sess->nonce_count); - } - - /* Calculate H(A2). */ - a2 = ne_md5_create_ctx(); - ne_md5_process_bytes(req->method, strlen(req->method), a2); - ne_md5_process_bytes(":", 1, a2); - ne_md5_process_bytes(req->uri, strlen(req->uri), a2); - ne_md5_finish_ascii(a2, a2_md5_ascii); - ne_md5_destroy_ctx(a2); - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: H(A2): %s\n", a2_md5_ascii); - - /* Now, calculation of the Request-Digest. - * The first section is the regardless of qop value - * H(A1) ":" unq(nonce-value) ":" */ - rdig = ne_md5_create_ctx(); - - /* Use the calculated H(A1) */ - ne_md5_process_bytes(sess->h_a1, 32, rdig); - - ne_md5_process_bytes(":", 1, rdig); - ne_md5_process_bytes(sess->nonce, strlen(sess->nonce), rdig); - ne_md5_process_bytes(":", 1, rdig); - if (sess->qop != auth_qop_none) { - /* Add on: - * nc-value ":" unq(cnonce-value) ":" unq(qop-value) ":" - */ - ne_md5_process_bytes(nc_value, 8, rdig); - ne_md5_process_bytes(":", 1, rdig); - ne_md5_process_bytes(sess->cnonce, strlen(sess->cnonce), rdig); - ne_md5_process_bytes(":", 1, rdig); - /* Store a copy of this structure (see note below) */ - if (sess->stored_rdig) ne_md5_destroy_ctx(sess->stored_rdig); - sess->stored_rdig = ne_md5_dup_ctx(rdig); - ne_md5_process_bytes(qop_value, strlen(qop_value), rdig); - ne_md5_process_bytes(":", 1, rdig); - } - - /* And finally, H(A2) */ - ne_md5_process_bytes(a2_md5_ascii, 32, rdig); - ne_md5_finish_ascii(rdig, rdig_md5_ascii); - ne_md5_destroy_ctx(rdig); - - ret = ne_buffer_create(); - - ne_buffer_concat(ret, - "Digest username=\"", sess->username, "\", " - "realm=\"", sess->realm, "\", " - "nonce=\"", sess->nonce, "\", " - "uri=\"", req->uri, "\", " - "response=\"", rdig_md5_ascii, "\", " - "algorithm=\"", sess->alg == auth_alg_md5 ? "MD5" : "MD5-sess", "\"", - NULL); - - if (sess->opaque != NULL) { - ne_buffer_concat(ret, ", opaque=\"", sess->opaque, "\"", NULL); - } - - if (sess->qop != auth_qop_none) { - /* Add in cnonce and nc-value fields */ - ne_buffer_concat(ret, ", cnonce=\"", sess->cnonce, "\", " - "nc=", nc_value, ", " - "qop=\"", qop_value, "\"", NULL); - } - - ne_buffer_zappend(ret, "\r\n"); - - return ne_buffer_finish(ret); -} - -/* Parse line of comma-separated key-value pairs. If 'ischall' == 1, - * then also return a leading space-separated token, as *value == - * NULL. Otherwise, if return value is 0, *key and *value will be - * non-NULL. If return value is non-zero, parsing has ended. If - * 'sep' is non-NULL and ischall is 1, the separator character is - * written to *sep when a challenge is parsed. */ -static int tokenize(char **hdr, char **key, char **value, char *sep, - int ischall) -{ - char *pnt = *hdr; - enum { BEFORE_EQ, AFTER_EQ, AFTER_EQ_QUOTED } state = BEFORE_EQ; - - if (**hdr == '\0') - return 1; - - *key = NULL; - - do { - switch (state) { - case BEFORE_EQ: - if (*pnt == '=') { - if (*key == NULL) - return -1; - *pnt = '\0'; - *value = pnt + 1; - state = AFTER_EQ; - } else if ((*pnt == ' ' || *pnt == ',') - && ischall && *key != NULL) { - *value = NULL; - if (sep) *sep = *pnt; - *pnt = '\0'; - *hdr = pnt + 1; - return 0; - } else if (*key == NULL && strchr(" \r\n\t", *pnt) == NULL) { - *key = pnt; - } - break; - case AFTER_EQ: - if (*pnt == ',') { - *pnt = '\0'; - *hdr = pnt + 1; - return 0; - } else if (*pnt == '\"') { - state = AFTER_EQ_QUOTED; - } - break; - case AFTER_EQ_QUOTED: - if (*pnt == '\"') { - state = AFTER_EQ; - } - break; - } - } while (*++pnt != '\0'); - - if (state == BEFORE_EQ && ischall && *key != NULL) { - *value = NULL; - if (sep) *sep = '\0'; - } - - *hdr = pnt; - - /* End of string: */ - return 0; -} - -/* Pass this the value of the 'Authentication-Info:' header field, if - * one is received. - * Returns: - * 0 if it gives a valid authentication for the server - * non-zero otherwise (don't believe the response in this case!). - */ -static int verify_digest_response(struct auth_request *req, auth_session *sess, - const char *value) -{ - char *hdr, *pnt, *key, *val; - auth_qop qop = auth_qop_none; - char *nextnonce, *rspauth, *cnonce, *nc, *qop_value; - unsigned int nonce_count; - int ret = NE_OK; - - nextnonce = rspauth = cnonce = nc = qop_value = NULL; - - pnt = hdr = ne_strdup(value); - - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: Got Auth-Info header: %s\n", value); - - while (tokenize(&pnt, &key, &val, NULL, 0) == 0) { - val = ne_shave(val, "\""); - - if (ne_strcasecmp(key, "qop") == 0) { - qop_value = val; - if (ne_strcasecmp(val, "auth") == 0) { - qop = auth_qop_auth; - } else { - qop = auth_qop_none; - } - } else if (ne_strcasecmp(key, "nextnonce") == 0) { - nextnonce = val; - } else if (ne_strcasecmp(key, "rspauth") == 0) { - rspauth = val; - } else if (ne_strcasecmp(key, "cnonce") == 0) { - cnonce = val; - } else if (ne_strcasecmp(key, "nc") == 0) { - nc = val; - } - } - - if (qop == auth_qop_none) { - /* The 2069-style A-I header only has the entity and nextnonce - * parameters. */ - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: 2069-style A-I header.\n"); - } - else if (!rspauth || !cnonce || !nc) { - ret = NE_ERROR; - ne_set_error(sess->sess, _("Digest mutual authentication failure: " - "missing parameters")); - } - else if (strcmp(cnonce, sess->cnonce) != 0) { - ret = NE_ERROR; - ne_set_error(sess->sess, _("Digest mutual authentication failure: " - "client nonce mismatch")); - } - else if (nc) { - char *ptr; - - errno = 0; - nonce_count = strtoul(nc, &ptr, 16); - if (*ptr != '\0' || errno) { - ret = NE_ERROR; - ne_set_error(sess->sess, _("Digest mutual authentication failure: " - "could not parse nonce count")); - } - else if (nonce_count != sess->nonce_count) { - ret = NE_ERROR; - ne_set_error(sess->sess, _("Digest mutual authentication failure: " - "nonce count mismatch (%u not %u)"), - nonce_count, sess->nonce_count); - } - } - - /* Finally, for qop=auth cases, if everything else is OK, verify - * the response-digest field. */ - if (qop == auth_qop_auth && ret == NE_OK) { - struct ne_md5_ctx *a2; - char a2_md5_ascii[33], rdig_md5_ascii[33]; - - /* Modified H(A2): */ - a2 = ne_md5_create_ctx(); - ne_md5_process_bytes(":", 1, a2); - ne_md5_process_bytes(req->uri, strlen(req->uri), a2); - ne_md5_finish_ascii(a2, a2_md5_ascii); - ne_md5_destroy_ctx(a2); - - /* sess->stored_rdig contains digest-so-far of: - * H(A1) ":" unq(nonce-value) - */ - - /* Add in qop-value */ - ne_md5_process_bytes(qop_value, strlen(qop_value), - sess->stored_rdig); - ne_md5_process_bytes(":", 1, sess->stored_rdig); - - /* Digest ":" H(A2) */ - ne_md5_process_bytes(a2_md5_ascii, 32, sess->stored_rdig); - /* All done */ - ne_md5_finish_ascii(sess->stored_rdig, rdig_md5_ascii); - ne_md5_destroy_ctx(sess->stored_rdig); - sess->stored_rdig = NULL; - - /* And... do they match? */ - ret = ne_strcasecmp(rdig_md5_ascii, rspauth) == 0 ? NE_OK : NE_ERROR; - - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: response-digest match: %s " - "(expected [%s] vs actual [%s])\n", - ret == NE_OK ? "yes" : "no", rdig_md5_ascii, rspauth); - - if (ret) { - ne_set_error(sess->sess, _("Digest mutual authentication failure: " - "request-digest mismatch")); - } - } - - /* Check for a nextnonce */ - if (nextnonce != NULL) { - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: Found nextnonce of [%s].\n", nextnonce); - ne_free(sess->nonce); - sess->nonce = ne_strdup(nextnonce); - sess->nonce_count = 0; - } - - ne_free(hdr); - - return ret; -} - -static const struct auth_protocol protocols[] = { - { NE_AUTH_BASIC, 10, "Basic", - basic_challenge, request_basic, NULL, - 0 }, - { NE_AUTH_DIGEST, 20, "Digest", - digest_challenge, request_digest, verify_digest_response, - 0 }, -#ifdef HAVE_GSSAPI - { NE_AUTH_NEGOTIATE, 30, "Negotiate", - negotiate_challenge, request_negotiate, verify_negotiate_response, - AUTH_FLAG_OPAQUE_PARAM|AUTH_FLAG_VERIFY_NON40x|AUTH_FLAG_CONN_AUTH }, -#endif -#ifdef HAVE_SSPI - { NE_AUTH_NEGOTIATE, 30, "NTLM", - sspi_challenge, request_sspi, NULL, - AUTH_FLAG_OPAQUE_PARAM|AUTH_FLAG_VERIFY_NON40x|AUTH_FLAG_CONN_AUTH }, - { NE_AUTH_NEGOTIATE, 30, "Negotiate", - sspi_challenge, request_sspi, NULL, - AUTH_FLAG_OPAQUE_PARAM|AUTH_FLAG_VERIFY_NON40x|AUTH_FLAG_CONN_AUTH }, -#endif - { 0 } -}; - -/* Insert a new auth challenge for protocol 'proto' in list of - * challenges 'list'. The challenge list is kept in sorted order of - * strength, with highest strength first. */ -static struct auth_challenge *insert_challenge(struct auth_challenge **list, - const struct auth_protocol *proto) -{ - struct auth_challenge *ret = ne_calloc(sizeof *ret); - struct auth_challenge *chall, *prev; - - for (chall = *list, prev = NULL; chall != NULL; - prev = chall, chall = chall->next) { - if (proto->strength > chall->protocol->strength) { - break; - } - } - - if (prev) { - ret->next = prev->next; - prev->next = ret; - } else { - ret->next = *list; - *list = ret; - } - - ret->protocol = proto; - - return ret; -} - -static void challenge_error(ne_buffer **errbuf, const char *fmt, ...) -{ - char err[128]; - va_list ap; - size_t len; - - va_start(ap, fmt); - len = ne_vsnprintf(err, sizeof err, fmt, ap); - va_end(ap); - - if (*errbuf == NULL) { - *errbuf = ne_buffer_create(); - ne_buffer_append(*errbuf, err, len); - } - else { - ne_buffer_concat(*errbuf, _(", "), err, NULL); - } -} - -/* Passed the value of a "(Proxy,WWW)-Authenticate: " header field. - * Returns 0 if valid challenge was accepted; non-zero if no valid - * challenge was found. */ -static int auth_challenge(auth_session *sess, int attempt, - const char *value) -{ - char *pnt, *key, *val, *hdr, sep; - struct auth_challenge *chall = NULL, *challenges = NULL; - ne_buffer *errmsg = NULL; - - pnt = hdr = ne_strdup(value); - - /* The header value may be made up of one or more challenges. We - * split it down into attribute-value pairs, then search for - * schemes in the pair keys. */ - - while (!tokenize(&pnt, &key, &val, &sep, 1)) { - - if (val == NULL) { - const struct auth_protocol *proto = NULL; - struct auth_handler *hdl; - size_t n; - - for (hdl = sess->handlers; hdl; hdl = hdl->next) { - for (n = 0; protocols[n].id; n++) { - if (protocols[n].id & hdl->protomask - && ne_strcasecmp(key, protocols[n].name) == 0) { - proto = &protocols[n]; - break; - } - } - if (proto) break; - } - - if (proto == NULL) { - /* Ignore this challenge. */ - chall = NULL; - challenge_error(&errmsg, _("ignored %s challenge"), key); - continue; - } - - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: Got '%s' challenge.\n", proto->name); - chall = insert_challenge(&challenges, proto); - chall->handler = hdl; - - if ((proto->flags & AUTH_FLAG_OPAQUE_PARAM) && sep == ' ') { - /* Cope with the fact that the unquoted base64 - * paramater token doesn't match the 2617 auth-param - * grammar: */ - chall->opaque = ne_shave(ne_token(&pnt, ','), " \t"); - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: %s opaque parameter '%s'\n", - proto->name, chall->opaque); - if (!pnt) break; /* stop parsing at end-of-string. */ - } - continue; - } else if (chall == NULL) { - /* Ignore pairs for an unknown challenge. */ - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: Ignored parameter: %s = %s\n", key, val); - continue; - } - - /* Strip quotes off value. */ - val = ne_shave(val, "\"'"); - - if (ne_strcasecmp(key, "realm") == 0) { - chall->realm = val; - } else if (ne_strcasecmp(key, "nonce") == 0) { - chall->nonce = val; - } else if (ne_strcasecmp(key, "opaque") == 0) { - chall->opaque = val; - } else if (ne_strcasecmp(key, "stale") == 0) { - /* Truth value */ - chall->stale = (ne_strcasecmp(val, "true") == 0); - } else if (ne_strcasecmp(key, "algorithm") == 0) { - if (ne_strcasecmp(val, "md5") == 0) { - chall->alg = auth_alg_md5; - } else if (ne_strcasecmp(val, "md5-sess") == 0) { - chall->alg = auth_alg_md5_sess; - } else { - chall->alg = auth_alg_unknown; - } - } else if (ne_strcasecmp(key, "qop") == 0) { - /* iterate over each token in the value */ - do { - const char *tok = ne_shave(ne_token(&val, ','), " \t"); - - if (ne_strcasecmp(tok, "auth") == 0) { - chall->qop_auth = 1; - } - } while (val); - - chall->got_qop = chall->qop_auth; - } - } - - sess->protocol = NULL; - - /* Iterate through the challenge list (which is sorted from - * strongest to weakest) attempting to accept each one. */ - for (chall = challenges; chall != NULL; chall = chall->next) { - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: Trying %s challenge...\n", - chall->protocol->name); - if (chall->protocol->challenge(sess, attempt, chall, &errmsg) == 0) { - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: Accepted %s challenge.\n", - chall->protocol->name); - sess->protocol = chall->protocol; - break; - } - } - - if (!sess->protocol) { - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: No challenges accepted.\n"); - ne_set_error(sess->sess, _(sess->spec->error_noauth), - errmsg ? errmsg->data : _("could not parse challenge")); - } - - while (challenges != NULL) { - chall = challenges->next; - ne_free(challenges); - challenges = chall; - } - - ne_free(hdr); - if (errmsg) ne_buffer_destroy(errmsg); - - return !(sess->protocol != NULL); -} - -static void ah_create(ne_request *req, void *session, const char *method, - const char *uri) -{ - auth_session *sess = session; - int is_connect = strcmp(method, "CONNECT") == 0; - - if (sess->context == AUTH_ANY || - (is_connect && sess->context == AUTH_CONNECT) || - (!is_connect && sess->context == AUTH_NOTCONNECT)) { - struct auth_request *areq = ne_calloc(sizeof *areq); - struct auth_handler *hdl; - - NE_DEBUG(NE_DBG_HTTPAUTH, "ah_create, for %s\n", sess->spec->resp_hdr); - - areq->method = method; - areq->uri = uri; - areq->request = req; - - ne_set_request_private(req, sess->spec->id, areq); - - /* For each new request, reset the attempt counter in every - * registered handler. */ - for (hdl = sess->handlers; hdl; hdl = hdl->next) { - hdl->attempt = 0; - } - } -} - - -static void ah_pre_send(ne_request *r, void *cookie, ne_buffer *request) -{ - auth_session *sess = cookie; - struct auth_request *req = ne_get_request_private(r, sess->spec->id); - - if (sess->protocol && req) { - char *value; - - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: Sending '%s' response.\n", - sess->protocol->name); - - value = sess->protocol->response(sess, req); - - if (value != NULL) { - ne_buffer_concat(request, sess->spec->req_hdr, ": ", value, NULL); - ne_free(value); - } - } - -} - -static int ah_post_send(ne_request *req, void *cookie, const ne_status *status) -{ - auth_session *sess = cookie; - struct auth_request *areq = ne_get_request_private(req, sess->spec->id); - const char *auth_hdr, *auth_info_hdr; - int ret = NE_OK; - - if (!areq) return NE_OK; - - auth_hdr = ne_get_response_header(req, sess->spec->resp_hdr); - auth_info_hdr = ne_get_response_header(req, sess->spec->resp_info_hdr); - - if (sess->context == AUTH_CONNECT && status->code == 401 && !auth_hdr) { - /* Some broken proxies issue a 401 as a proxy auth challenge - * to a CONNECT request; handle this here. */ - auth_hdr = ne_get_response_header(req, "WWW-Authenticate"); - auth_info_hdr = NULL; - } - -#ifdef HAVE_GSSAPI - /* whatever happens: forget the GSSAPI token cached thus far */ - if (sess->gssapi_token) { - ne_free(sess->gssapi_token); - sess->gssapi_token = NULL; - } -#endif - - NE_DEBUG(NE_DBG_HTTPAUTH, - "ah_post_send (#%d), code is %d (want %d), %s is %s\n", - areq->attempt, status->code, sess->spec->status_code, - sess->spec->resp_hdr, auth_hdr ? auth_hdr : "(none)"); - if (auth_info_hdr && sess->protocol && sess->protocol->verify - && (sess->protocol->flags & AUTH_FLAG_VERIFY_NON40x) == 0) { - ret = sess->protocol->verify(areq, sess, auth_info_hdr); - } - else if (sess->protocol && sess->protocol->verify - && (sess->protocol->flags & AUTH_FLAG_VERIFY_NON40x) - && (status->klass == 2 || status->klass == 3) - && auth_hdr) { - ret = sess->protocol->verify(areq, sess, auth_hdr); - } - else if ((status->code == sess->spec->status_code || - (status->code == 401 && sess->context == AUTH_CONNECT)) && - auth_hdr) { - /* note above: allow a 401 in response to a CONNECT request - * from a proxy since some buggy proxies send that. */ - NE_DEBUG(NE_DBG_HTTPAUTH, "auth: Got challenge (code %d).\n", status->code); - if (!auth_challenge(sess, areq->attempt++, auth_hdr)) { - ret = NE_RETRY; - } else { - clean_session(sess); - ret = sess->spec->fail_code; - } - - /* Set or clear the conn-auth flag according to whether this - * was an accepted challenge for a borked protocol. */ - ne_set_session_flag(sess->sess, NE_SESSFLAG_CONNAUTH, - sess->protocol - && (sess->protocol->flags & AUTH_FLAG_CONN_AUTH)); - } -#ifdef HAVE_SSPI - else if (sess->sspi_context) { - ne_sspi_clear_context(sess->sspi_context); - } -#endif - - return ret; -} - -static void ah_destroy(ne_request *req, void *session) -{ - auth_session *sess = session; - struct auth_request *areq = ne_get_request_private(req, sess->spec->id); - - if (areq) { - ne_free(areq); - } -} - -static void free_auth(void *cookie) -{ - auth_session *sess = cookie; - struct auth_handler *hdl, *next; - -#ifdef HAVE_GSSAPI - if (sess->gssname != GSS_C_NO_NAME) { - unsigned int major; - gss_release_name(&major, &sess->gssname); - } -#endif - - for (hdl = sess->handlers; hdl; hdl = next) { - next = hdl->next; - ne_free(hdl); - } - - clean_session(sess); - ne_free(sess); -} - -static void auth_register(ne_session *sess, int isproxy, unsigned protomask, - const struct auth_class *ahc, const char *id, - ne_auth_creds creds, void *userdata) -{ - auth_session *ahs; - struct auth_handler **hdl; - - ahs = ne_get_session_private(sess, id); - if (ahs == NULL) { - ahs = ne_calloc(sizeof *ahs); - - ahs->sess = sess; - ahs->spec = ahc; - - if (strcmp(ne_get_scheme(sess), "https") == 0) { - ahs->context = isproxy ? AUTH_CONNECT : AUTH_NOTCONNECT; - } else { - ahs->context = AUTH_ANY; - } - - /* Register hooks */ - ne_hook_create_request(sess, ah_create, ahs); - ne_hook_pre_send(sess, ah_pre_send, ahs); - ne_hook_post_send(sess, ah_post_send, ahs); - ne_hook_destroy_request(sess, ah_destroy, ahs); - ne_hook_destroy_session(sess, free_auth, ahs); - - ne_set_session_private(sess, id, ahs); - } - -#ifdef HAVE_GSSAPI - if (protomask & NE_AUTH_NEGOTIATE && ahs->gssname == GSS_C_NO_NAME) { - ne_uri uri = {0}; - - if (isproxy) - ne_fill_proxy_uri(sess, &uri); - else - ne_fill_server_uri(sess, &uri); - - get_gss_name(&ahs->gssname, uri.host); - - ne_uri_free(&uri); - } -#endif - - /* Find the end of the handler list, and add a new one. */ - hdl = &ahs->handlers; - while (*hdl) - hdl = &(*hdl)->next; - - *hdl = ne_malloc(sizeof **hdl); - (*hdl)->protomask = protomask; - (*hdl)->creds = creds; - (*hdl)->userdata = userdata; - (*hdl)->next = NULL; - (*hdl)->attempt = 0; -} - -static void auth_register_default(ne_session *sess, int isproxy, - const struct auth_class *ahc, const char *id, - ne_auth_creds creds, void *userdata) -{ - unsigned protomask = NE_AUTH_BASIC|NE_AUTH_DIGEST; - - if (strcmp(ne_get_scheme(sess), "https") == 0 || isproxy) { - protomask |= NE_AUTH_NEGOTIATE; - } - - auth_register(sess, isproxy, protomask, ahc, id, creds, userdata); -} - -void ne_set_server_auth(ne_session *sess, ne_auth_creds creds, void *userdata) -{ - auth_register_default(sess, 0, &ah_server_class, HOOK_SERVER_ID, - creds, userdata); -} - -void ne_set_proxy_auth(ne_session *sess, ne_auth_creds creds, void *userdata) -{ - auth_register_default(sess, 1, &ah_proxy_class, HOOK_PROXY_ID, - creds, userdata); -} - -void ne_add_server_auth(ne_session *sess, unsigned protocol, - ne_auth_creds creds, void *userdata) -{ - auth_register(sess, 0, protocol, &ah_server_class, HOOK_SERVER_ID, - creds, userdata); -} - -void ne_add_proxy_auth(ne_session *sess, unsigned protocol, - ne_auth_creds creds, void *userdata) -{ - auth_register(sess, 1, protocol, &ah_proxy_class, HOOK_PROXY_ID, - creds, userdata); -} - -void ne_forget_auth(ne_session *sess) -{ - auth_session *as; - if ((as = ne_get_session_private(sess, HOOK_SERVER_ID)) != NULL) - clean_session(as); - if ((as = ne_get_session_private(sess, HOOK_PROXY_ID)) != NULL) - clean_session(as); -} - diff --git a/client/neon-0.27.2/src/ne_auth.h b/client/neon-0.27.2/src/ne_auth.h deleted file mode 100644 index 5156f4bd8..000000000 --- a/client/neon-0.27.2/src/ne_auth.h +++ /dev/null @@ -1,113 +0,0 @@ -/* - HTTP authentication routines - Copyright (C) 1999-2006, Joe Orton - - 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 - -*/ - -#ifndef NE_AUTH_H -#define NE_AUTH_H - -#include "ne_session.h" /* for ne_session */ - -NE_BEGIN_DECLS - -/* Size of username/password buffers passed to ne_auth_creds - * callback. */ -#define NE_ABUFSIZ (256) - -/* The callback used to request the username and password in the given - * realm. The username and password must be copied into the buffers - * which are both of size NE_ABUFSIZ. The 'attempt' parameter is zero - * on the first call to the callback, and increases by one each time - * an attempt to authenticate fails. - * - * The callback must return zero to indicate that authentication - * should be attempted with the username/password, or non-zero to - * cancel the request. (if non-zero, username and password are - * ignored.) - * - * IMPORTANT NOTE: The callback will be invoked repeatedly until - * either it returns non-zero, or authentication is successful. - * - * Hint: if you just wish to attempt authentication just once (even if - * the user gets the username/password wrong), have the callback - * function use 'attempt' value as the function return value. */ -typedef int (*ne_auth_creds)(void *userdata, const char *realm, int attempt, - char *username, char *password); - -/* Set callbacks to provide credentials for server and proxy - * authentication, using the default set of authentication protocols. - * userdata is passed as the first argument to the callback. */ -void ne_set_server_auth(ne_session *sess, ne_auth_creds creds, void *userdata); -void ne_set_proxy_auth(ne_session *sess, ne_auth_creds creds, void *userdata); - -/* As an alternative to using ne_set_server_auth and - * ne_set_proxy_auth, the following interfaces may be used; these - * allow control over which authentication protocol is used. */ - -/* NE_AUTH_BASIC: Basic authentication transmits the username and - * password unprotected over the channel; this allows a passive attack - * to steal the credentials if using an unsecured channel - * (i.e. non-SSL). */ -#define NE_AUTH_BASIC (0x0001) -/* NE_AUTH_DIGEST: Digest authentication uses a hash of the username, - * password, and certain aspects of the request, so prevents passive - * attackers from obtaining the credentials; active attackers can - * still modify most of the request/response if using an unsecured - * channel. */ -#define NE_AUTH_DIGEST (0x0002) -/* NE_AUTH_NEGOTIATE: Negotiate uses GSSAPI/SSPI to authenticate the - * user; an active attacker can modify any of the request/response at - * will, so this must not be used over an unsecured channel. */ -#define NE_AUTH_NEGOTIATE (0x0004) -/* All supported protocols. */ -#define NE_AUTH_ALL (NE_AUTH_BASIC | NE_AUTH_DIGEST | NE_AUTH_NEGOTIATE) - -/* Add a callback to provide credentials for server and proxy - * authentication using a particular auth protocol or set of - * protocols. The protocol is supplied as a bitmask of NE_AUTH_* - * values. For NE_AUTH_NEGOTIATE, the creds and userdata arguments - * are ignored and may be NULL. - * - * These functions may be called multiple times per session to - * register callbacks for different protocols. If the server presents - * more than one protocol in an auth challenge, the following - * algorithm will be used to determine which callback is used: - * - * - iterate over the registered callbacks in the order registered - * - for each each callback, iterate over the known set of protocols - * in order of algorithm strength (strongest first). - * - if the protocol mask for that callback matches the protocol, - * attempt authentication using this protocol. - * - * Therefore, if multiple calls to ne_add_server_auth or - * ne_add_proxy_auth are used for a given session, the caller must - * ensure that the order in which those calls are made reflects the - * precedence of protocols to be used. */ -void ne_add_server_auth(ne_session *sess, unsigned protocol, - ne_auth_creds creds, void *userdata); -void ne_add_proxy_auth(ne_session *sess, unsigned protocol, - ne_auth_creds creds, void *userdata); - -/* Clear any cached authentication credentials for the given - * session. */ -void ne_forget_auth(ne_session *sess); - -NE_END_DECLS - -#endif /* NE_AUTH_H */ diff --git a/client/neon-0.27.2/src/ne_basic.c b/client/neon-0.27.2/src/ne_basic.c deleted file mode 100644 index 3e8144a25..000000000 --- a/client/neon-0.27.2/src/ne_basic.c +++ /dev/null @@ -1,456 +0,0 @@ -/* - Basic HTTP and WebDAV methods - Copyright (C) 1999-2007, Joe Orton - - 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 - -*/ - -#include "config.h" - -#include -#include /* for struct stat */ - -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif - -#include - -#include "ne_request.h" -#include "ne_alloc.h" -#include "ne_utils.h" -#include "ne_basic.h" -#include "ne_207.h" - -#ifdef NE_HAVE_DAV -#include "ne_uri.h" -#include "ne_locks.h" -#endif - -#include "ne_dates.h" -#include "ne_internal.h" - -int ne_getmodtime(ne_session *sess, const char *uri, time_t *modtime) -{ - ne_request *req = ne_request_create(sess, "HEAD", uri); - const char *value; - int ret; - - ret = ne_request_dispatch(req); - - value = ne_get_response_header(req, "Last-Modified"); - - if (ret == NE_OK && ne_get_status(req)->klass != 2) { - *modtime = -1; - ret = NE_ERROR; - } else if (value) { - *modtime = ne_httpdate_parse(value); - } - - ne_request_destroy(req); - - return ret; -} - -#ifdef NE_LFS -#define ne_fstat fstat64 -typedef struct stat64 struct_stat; -#else -#define ne_fstat fstat -typedef struct stat struct_stat; -#endif - -/* PUT's from fd to URI */ -int ne_put(ne_session *sess, const char *uri, int fd) -{ - ne_request *req; - struct_stat st; - int ret; - - if (ne_fstat(fd, &st)) { - int errnum = errno; - char buf[200]; - - ne_set_error(sess, _("Could not determine file size: %s"), - ne_strerror(errnum, buf, sizeof buf)); - return NE_ERROR; - } - - req = ne_request_create(sess, "PUT", uri); - -#ifdef NE_HAVE_DAV - ne_lock_using_resource(req, uri, 0); - ne_lock_using_parent(req, uri); -#endif - - ne_set_request_body_fd(req, fd, 0, st.st_size); - - ret = ne_request_dispatch(req); - - if (ret == NE_OK && ne_get_status(req)->klass != 2) - ret = NE_ERROR; - - ne_request_destroy(req); - - return ret; -} - -/* Dispatch a GET request REQ, writing the response body to FD fd. If - * RANGE is non-NULL, then it is the value of the Range request - * header, e.g. "bytes=1-5". Returns an NE_* error code. */ -static int dispatch_to_fd(ne_request *req, int fd, const char *range) -{ - ne_session *const sess = ne_get_session(req); - const ne_status *const st = ne_get_status(req); - int ret; - size_t rlen; - - /* length of bytespec after "bytes=" */ - rlen = range ? strlen(range + 6) : 0; - - do { - const char *value; - - ret = ne_begin_request(req); - if (ret != NE_OK) break; - - value = ne_get_response_header(req, "Content-Range"); - - /* For a 206 response, check that a Content-Range header is - * given which matches the Range request header. */ - if (range && st->code == 206 - && (value == NULL || strncmp(value, "bytes ", 6) != 0 - || strncmp(range + 6, value + 6, rlen) - || value[6 + rlen] != '/')) { - ne_set_error(sess, _("Response did not include requested range")); - return NE_ERROR; - } - - if ((range && st->code == 206) || (!range && st->klass == 2)) { - ret = ne_read_response_to_fd(req, fd); - } else { - ret = ne_discard_response(req); - } - - if (ret == NE_OK) ret = ne_end_request(req); - } while (ret == NE_RETRY); - - return ret; -} - -static int get_range_common(ne_session *sess, const char *uri, - const char *brange, int fd) - -{ - ne_request *req = ne_request_create(sess, "GET", uri); - const ne_status *status; - int ret; - - ne_add_request_header(req, "Range", brange); - ne_add_request_header(req, "Accept-Ranges", "bytes"); - - ret = dispatch_to_fd(req, fd, brange); - - status = ne_get_status(req); - - if (ret == NE_OK && status->code == 416) { - /* connection is terminated too early with Apache/1.3, so we check - * this even if ret == NE_ERROR... */ - ne_set_error(sess, _("Range is not satisfiable")); - ret = NE_ERROR; - } - else if (ret == NE_OK) { - if (status->klass == 2 && status->code != 206) { - ne_set_error(sess, _("Resource does not support ranged GET requests")); - ret = NE_ERROR; - } - else if (status->klass != 2) { - ret = NE_ERROR; - } - } - - ne_request_destroy(req); - - return ret; -} - -int ne_get_range(ne_session *sess, const char *uri, - ne_content_range *range, int fd) -{ - char brange[64]; - - if (range->end == -1) { - ne_snprintf(brange, sizeof brange, "bytes=%" FMT_NE_OFF_T "-", - range->start); - } - else { - ne_snprintf(brange, sizeof brange, - "bytes=%" FMT_NE_OFF_T "-%" FMT_NE_OFF_T, - range->start, range->end); - } - - return get_range_common(sess, uri, brange, fd); -} - -/* Get to given fd */ -int ne_get(ne_session *sess, const char *uri, int fd) -{ - ne_request *req = ne_request_create(sess, "GET", uri); - int ret; - - ret = dispatch_to_fd(req, fd, NULL); - - if (ret == NE_OK && ne_get_status(req)->klass != 2) { - ret = NE_ERROR; - } - - ne_request_destroy(req); - - return ret; -} - - -/* Get to given fd */ -int ne_post(ne_session *sess, const char *uri, int fd, const char *buffer) -{ - ne_request *req = ne_request_create(sess, "POST", uri); - int ret; - - ne_set_request_flag(req, NE_REQFLAG_IDEMPOTENT, 0); - - ne_set_request_body_buffer(req, buffer, strlen(buffer)); - - ret = dispatch_to_fd(req, fd, NULL); - - if (ret == NE_OK && ne_get_status(req)->klass != 2) { - ret = NE_ERROR; - } - - ne_request_destroy(req); - - return ret; -} - -int ne_get_content_type(ne_request *req, ne_content_type *ct) -{ - const char *value; - char *sep, *stype; - - value = ne_get_response_header(req, "Content-Type"); - if (value == NULL || strchr(value, '/') == NULL) { - return -1; - } - - ct->value = ne_strdup(value); - - stype = strchr(ct->value, '/'); - - *stype++ = '\0'; - ct->type = ct->value; - ct->charset = NULL; - - sep = strchr(stype, ';'); - - if (sep) { - char *tok; - /* look for the charset parameter. TODO; probably better to - * hand-carve a parser than use ne_token/strstr/shave here. */ - *sep++ = '\0'; - do { - tok = ne_qtoken(&sep, ';', "\"\'"); - if (tok) { - tok = strstr(tok, "charset="); - if (tok) - ct->charset = ne_shave(tok+8, "\"\'"); - } else { - break; - } - } while (sep != NULL); - } - - /* set subtype, losing any trailing whitespace */ - ct->subtype = ne_shave(stype, " \t"); - - if (ct->charset == NULL && ne_strcasecmp(ct->type, "text") == 0) { - /* 3280§3.1: text/xml without charset implies us-ascii. */ - if (ne_strcasecmp(ct->subtype, "xml") == 0) - ct->charset = "us-ascii"; - /* 2616§3.7.1: subtypes of text/ default to charset ISO-8859-1. */ - else - ct->charset = "ISO-8859-1"; - } - - return 0; -} - -static void parse_dav_header(const char *value, ne_server_capabilities *caps) -{ - char *tokens = ne_strdup(value), *pnt = tokens; - - do { - char *tok = ne_qtoken(&pnt, ',', "\"'"); - if (!tok) break; - - tok = ne_shave(tok, " \r\t\n"); - - if (strcmp(tok, "1") == 0) { - caps->dav_class1 = 1; - } else if (strcmp(tok, "2") == 0) { - caps->dav_class2 = 1; - } else if (strcmp(tok, "") == 0) { - caps->dav_executable = 1; - } - } while (pnt != NULL); - - ne_free(tokens); -} - -int ne_options(ne_session *sess, const char *uri, ne_server_capabilities *caps) -{ - ne_request *req = ne_request_create(sess, "OPTIONS", uri); - int ret = ne_request_dispatch(req); - const char *header = ne_get_response_header(req, "DAV"); - - if (header) parse_dav_header(header, caps); - - if (ret == NE_OK && ne_get_status(req)->klass != 2) { - ret = NE_ERROR; - } - - ne_request_destroy(req); - - return ret; -} - -#ifdef NE_HAVE_DAV - -void ne_add_depth_header(ne_request *req, int depth) -{ - const char *value; - switch(depth) { - case NE_DEPTH_ZERO: - value = "0"; - break; - case NE_DEPTH_ONE: - value = "1"; - break; - default: - value = "infinity"; - break; - } - ne_add_request_header(req, "Depth", value); -} - -static int copy_or_move(ne_session *sess, int is_move, int overwrite, - int depth, const char *src, const char *dest) -{ - ne_request *req = ne_request_create( sess, is_move?"MOVE":"COPY", src ); - - /* 2518 S8.9.2 says only use Depth: infinity with MOVE. */ - if (!is_move) { - ne_add_depth_header(req, depth); - } - -#ifdef NE_HAVE_DAV - if (is_move) { - ne_lock_using_resource(req, src, NE_DEPTH_INFINITE); - } - ne_lock_using_resource(req, dest, NE_DEPTH_INFINITE); - /* And we need to be able to add members to the destination's parent */ - ne_lock_using_parent(req, dest); -#endif - - if (ne_get_session_flag(sess, NE_SESSFLAG_RFC4918)) { - ne_add_request_header(req, "Destination", dest); - } - else { - ne_print_request_header(req, "Destination", "%s://%s%s", - ne_get_scheme(sess), - ne_get_server_hostport(sess), dest); - } - - ne_add_request_header(req, "Overwrite", overwrite?"T":"F"); - - return ne_simple_request(sess, req); -} - -int ne_copy(ne_session *sess, int overwrite, int depth, - const char *src, const char *dest) -{ - return copy_or_move(sess, 0, overwrite, depth, src, dest); -} - -int ne_move(ne_session *sess, int overwrite, - const char *src, const char *dest) -{ - return copy_or_move(sess, 1, overwrite, 0, src, dest); -} - -/* Deletes the specified resource. (and in only two lines of code!) */ -int ne_delete(ne_session *sess, const char *uri) -{ - ne_request *req = ne_request_create(sess, "DELETE", uri); - -#ifdef NE_HAVE_DAV - ne_lock_using_resource(req, uri, NE_DEPTH_INFINITE); - ne_lock_using_parent(req, uri); -#endif - - /* joe: I asked on the DAV WG list about whether we might get a - * 207 error back from a DELETE... conclusion, you shouldn't if - * you don't send the Depth header, since we might be an HTTP/1.1 - * client and a 2xx response indicates success to them. But - * it's all a bit unclear. In any case, DAV servers today do - * return 207 to DELETE even if we don't send the Depth header. - * So we handle 207 errors appropriately. */ - - return ne_simple_request(sess, req); -} - -int ne_mkcol(ne_session *sess, const char *uri) -{ - ne_request *req; - char *real_uri; - int ret; - - if (ne_path_has_trailing_slash(uri)) { - real_uri = ne_strdup(uri); - } else { - real_uri = ne_concat(uri, "/", NULL); - } - - req = ne_request_create(sess, "MKCOL", real_uri); - -#ifdef NE_HAVE_DAV - ne_lock_using_resource(req, real_uri, 0); - ne_lock_using_parent(req, real_uri); -#endif - - ret = ne_simple_request(sess, req); - - ne_free(real_uri); - - return ret; -} - -#endif /* NE_HAVE_DAV */ diff --git a/client/neon-0.27.2/src/ne_basic.h b/client/neon-0.27.2/src/ne_basic.h deleted file mode 100644 index c6b374f38..000000000 --- a/client/neon-0.27.2/src/ne_basic.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - HTTP/1.1 methods - Copyright (C) 1999-2006, Joe Orton - - 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 - -*/ - -#ifndef NE_BASIC_H -#define NE_BASIC_H - -#include /* for time_t */ - -#include "ne_request.h" - -NE_BEGIN_DECLS - -/* Perform a GET request on resource at 'path', writing the entity - * body which is returned to 'fd'. */ -int ne_get(ne_session *sess, const char *path, int fd); - -/* Perform a PUT request on resource at 'path', reading the entity - * body to submit from 'fd'. */ -int ne_put(ne_session *sess, const char *path, int fd); - -#define NE_DEPTH_ZERO (0) -#define NE_DEPTH_ONE (1) -#define NE_DEPTH_INFINITE (2) - -/* For ne_copy and ne_move: - * - * If a resource exists at "dest" and overwrite is zero, the operation - * will fail; if overwrite is non-zero, any existing resource will - * be over-written. - */ - -/* Copy resource from 'src to 'dest' paths. If 'src' identifies a - * collection resource, depth may be NE_DEPTH_ZERO to request that the - * collection and its properties are to be copied, or - * NE_DEPTH_INFINITE to request that the collection and its contents - * are to be copied. */ -int ne_copy(ne_session *sess, int overwrite, int depth, - const char *src, const char *dest); - -/* Move resource from 'src' to dest 'path'. */ -int ne_move(ne_session *sess, int overwrite, - const char *src, const char *dest); - -/* Delete resource at 'path'. */ -int ne_delete(ne_session *sess, const char *path); -/* Create a collection at 'path', which MUST have a trailing slash. */ -int ne_mkcol(ne_session *sess, const char *path); - -/* Adds a Depth: header to a request */ -void ne_add_depth_header(ne_request *req, int depth); - -/* Retrieve modification time of resource at location 'path', place in - * *modtime. (uses HEAD) */ -int ne_getmodtime(ne_session *sess, const char *path, time_t *modtime); - -typedef struct { - const char *type, *subtype; - const char *charset; - char *value; -} ne_content_type; - -/* Retrieve the content-type of the response; returns zero if response - * had valid content-type, in which case all fields in *ctype are set - * (and never NULL); the caller must free(ctype->value) after use. - * Returns non-zero on error, in which case *ctype is not altered. */ -int ne_get_content_type(ne_request *req, ne_content_type *ctype); - -/* Server capabilities: */ -typedef struct { - unsigned int dav_class1; /* True if Class 1 WebDAV server */ - unsigned int dav_class2; /* True if Class 2 WebDAV server */ - unsigned int dav_executable; /* True if supports the 'executable' - * property a. la. mod_dav */ -} ne_server_capabilities; - -/* Determines server capabilities (using OPTIONS). Pass 'path' as "*" - * to determine proxy server capabilities if using a proxy server. */ -int ne_options(ne_session *sess, const char *path, - ne_server_capabilities *caps); - -/* Defines a range of bytes, starting at 'start' and ending - * at 'end'. 'total' is the number of bytes in the range. - */ -typedef struct { - ne_off_t start, end, total; -} ne_content_range; - -/* Partial GET. range->start must be >= 0. range->total is ignored. - * - * If range->end is -1, then the rest of the resource from start is - * requested, and range->total and end are filled in on success. - * - * Otherwise, bytes from range->start to range->end are requested. - * - * This will write to the CURRENT position of f; so if you want - * to do a resume download, use: - * struct ne_content_range range; - * range.start = resume_from; - * range.end = range.start + 999; (= 1000 bytes) - * fseek(myfile, resume_from, SEEK_SET); - * ne_get_range(sess, path, &range, myfile); */ -int ne_get_range(ne_session *sess, const char *path, - ne_content_range *range, int fd); - -/* Post using buffer as request-body: stream response into f */ -int ne_post(ne_session *sess, const char *path, int fd, const char *buffer); - -NE_END_DECLS - -#endif /* NE_BASIC_H */ diff --git a/client/neon-0.27.2/src/ne_compress.c b/client/neon-0.27.2/src/ne_compress.c deleted file mode 100644 index aa665e724..000000000 --- a/client/neon-0.27.2/src/ne_compress.c +++ /dev/null @@ -1,449 +0,0 @@ -/* - Handling of compressed HTTP responses - Copyright (C) 2001-2006, Joe Orton - - 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 - -*/ - -#include "config.h" - -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif - -#include "ne_request.h" -#include "ne_compress.h" -#include "ne_utils.h" -#include "ne_internal.h" - -#ifdef NE_HAVE_ZLIB - -#include - -/* Adds support for the 'gzip' Content-Encoding in HTTP. gzip is a - * file format which wraps the DEFLATE compression algorithm. zlib - * implements DEFLATE: we have to unwrap the gzip format (specified in - * RFC1952) as it comes off the wire, and hand off chunks of data to - * be inflated. */ - -struct ne_decompress_s { - ne_request *request; /* associated request. */ - ne_session *session; /* associated session. */ - /* temporary buffer for holding inflated data. */ - char outbuf[NE_BUFSIZ]; - z_stream zstr; - int zstrinit; /* non-zero if zstr has been initialized */ - - /* pass blocks back to this. */ - ne_block_reader reader; - ne_accept_response acceptor; - void *userdata; - - /* buffer for gzip header bytes. */ - unsigned char header[10]; - size_t hdrcount; /* bytes in header */ - - unsigned char footer[8]; - size_t footcount; /* bytes in footer. */ - - /* CRC32 checksum: odd that zlib uses uLong for this since it is a - * 64-bit integer on LP64 platforms. */ - uLong checksum; - - /* current state. */ - enum state { - NE_Z_BEFORE_DATA, /* not received any response blocks yet. */ - NE_Z_PASSTHROUGH, /* response not compressed: passing through. */ - NE_Z_IN_HEADER, /* received a few bytes of response data, but not - * got past the gzip header yet. */ - NE_Z_POST_HEADER, /* waiting for the end of the NUL-terminated bits. */ - NE_Z_INFLATING, /* inflating response bytes. */ - NE_Z_AFTER_DATA, /* after data; reading CRC32 & ISIZE */ - NE_Z_FINISHED /* stream is finished. */ - } state; -}; - -/* Convert 'buf' to unsigned int; 'buf' must be 'unsigned char *' */ -#define BUF2UINT(buf) (((buf)[3]<<24) + ((buf)[2]<<16) + ((buf)[1]<<8) + (buf)[0]) - -#define ID1 0x1f -#define ID2 0x8b - -#define HDR_DONE 0 -#define HDR_EXTENDED 1 -#define HDR_ERROR 2 - -#define HDR_ID1(ctx) ((ctx)->header[0]) -#define HDR_ID2(ctx) ((ctx)->header[1]) -#define HDR_CMETH(ctx) ((ctx)->header[2]) -#define HDR_FLAGS(ctx) ((ctx)->header[3]) -#define HDR_MTIME(ctx) (BUF2UINT(&(ctx)->header[4])) -#define HDR_XFLAGS(ctx) ((ctx)->header[8]) -#define HDR_OS(ctx) ((ctx)->header[9]) - -/* parse_header parses the gzip header, sets the next state and returns - * HDR_DONE: all done, bytes following are raw DEFLATE data. - * HDR_EXTENDED: all done, expect a NUL-termianted string - * before the DEFLATE data - * HDR_ERROR: invalid header, give up (session error is set). - */ -static int parse_header(ne_decompress *ctx) -{ - NE_DEBUG(NE_DBG_HTTP, "ID1: %d ID2: %d, cmeth %d, flags %d\n", - HDR_ID1(ctx), HDR_ID2(ctx), HDR_CMETH(ctx), HDR_FLAGS(ctx)); - - if (HDR_ID1(ctx) != ID1 || HDR_ID2(ctx) != ID2 || HDR_CMETH(ctx) != 8) { - ne_set_error(ctx->session, "Compressed stream invalid"); - return HDR_ERROR; - } - - NE_DEBUG(NE_DBG_HTTP, "mtime: %d, xflags: %d, os: %d\n", - HDR_MTIME(ctx), HDR_XFLAGS(ctx), HDR_OS(ctx)); - - /* TODO: we can only handle one NUL-terminated extensions field - * currently. Really, we should count the number of bits set, and - * skip as many fields as bits set (bailing if any reserved bits - * are set. */ - if (HDR_FLAGS(ctx) == 8) { - ctx->state = NE_Z_POST_HEADER; - return HDR_EXTENDED; - } else if (HDR_FLAGS(ctx) != 0) { - ne_set_error(ctx->session, "Compressed stream not supported"); - return HDR_ERROR; - } - - NE_DEBUG(NE_DBG_HTTP, "compress: Good stream.\n"); - - ctx->state = NE_Z_INFLATING; - return HDR_DONE; -} - -/* Process extra 'len' bytes of 'buf' which were received after the - * DEFLATE data. */ -static int process_footer(ne_decompress *ctx, - const unsigned char *buf, size_t len) -{ - if (len + ctx->footcount > 8) { - ne_set_error(ctx->session, - "Too many bytes (%" NE_FMT_SIZE_T ") in gzip footer", - len); - return -1; - } else { - memcpy(ctx->footer + ctx->footcount, buf, len); - ctx->footcount += len; - if (ctx->footcount == 8) { - uLong crc = BUF2UINT(ctx->footer) & 0xFFFFFFFF; - if (crc == ctx->checksum) { - ctx->state = NE_Z_FINISHED; - NE_DEBUG(NE_DBG_HTTP, "compress: End of response; checksum match.\n"); - } else { - NE_DEBUG(NE_DBG_HTTP, "compress: End of response; checksum mismatch: " - "given %lu vs computed %lu\n", crc, ctx->checksum); - ne_set_error(ctx->session, - "Checksum invalid for compressed stream"); - return -1; - } - } - } - return 0; -} - -/* A zlib function failed with 'code'; set the session error string - * appropriately. */ -static void set_zlib_error(ne_decompress *ctx, const char *msg, int code) -{ - if (ctx->zstr.msg) - ne_set_error(ctx->session, _("%s: %s"), msg, ctx->zstr.msg); - else { - const char *err; - switch (code) { - case Z_STREAM_ERROR: err = "stream error"; break; - case Z_DATA_ERROR: err = "data corrupt"; break; - case Z_MEM_ERROR: err = "out of memory"; break; - case Z_BUF_ERROR: err = "buffer error"; break; - case Z_VERSION_ERROR: err = "library version mismatch"; break; - default: err = "unknown error"; break; - } - ne_set_error(ctx->session, _("%s: %s (code %d)"), msg, err, code); - } -} - -/* Inflate response buffer 'buf' of length 'len'. */ -static int do_inflate(ne_decompress *ctx, const char *buf, size_t len) -{ - int ret; - - ctx->zstr.avail_in = len; - ctx->zstr.next_in = (unsigned char *)buf; - ctx->zstr.total_in = 0; - - do { - ctx->zstr.avail_out = sizeof ctx->outbuf; - ctx->zstr.next_out = (unsigned char *)ctx->outbuf; - ctx->zstr.total_out = 0; - - ret = inflate(&ctx->zstr, Z_NO_FLUSH); - - NE_DEBUG(NE_DBG_HTTP, - "compress: inflate %d, %ld bytes out, %d remaining\n", - ret, ctx->zstr.total_out, ctx->zstr.avail_in); -#if 0 - NE_DEBUG(NE_DBG_HTTPBODY, - "Inflated body block (%ld):\n[%.*s]\n", - ctx->zstr.total_out, (int)ctx->zstr.total_out, - ctx->outbuf); -#endif - /* update checksum. */ - ctx->checksum = crc32(ctx->checksum, (unsigned char *)ctx->outbuf, - ctx->zstr.total_out); - - /* pass on the inflated data, if any */ - if (ctx->zstr.total_out > 0) { - int rret = ctx->reader(ctx->userdata, ctx->outbuf, - ctx->zstr.total_out); - if (rret) return rret; - } - } while (ret == Z_OK && ctx->zstr.avail_in > 0); - - if (ret == Z_STREAM_END) { - NE_DEBUG(NE_DBG_HTTP, "compress: end of data stream, %d bytes remain.\n", - ctx->zstr.avail_in); - /* process the footer. */ - ctx->state = NE_Z_AFTER_DATA; - return process_footer(ctx, ctx->zstr.next_in, ctx->zstr.avail_in); - } else if (ret != Z_OK) { - set_zlib_error(ctx, _("Could not inflate data"), ret); - return NE_ERROR; - } - return 0; -} - -/* Callback which is passed blocks of the response body. */ -static int gz_reader(void *ud, const char *buf, size_t len) -{ - ne_decompress *ctx = ud; - const char *zbuf; - size_t count; - const char *hdr; - - if (len == 0) { - /* End of response: */ - switch (ctx->state) { - case NE_Z_BEFORE_DATA: - hdr = ne_get_response_header(ctx->request, "Content-Encoding"); - if (hdr && ne_strcasecmp(hdr, "gzip") == 0) { - /* response was truncated: return error. */ - break; - } - /* else, fall through */ - case NE_Z_FINISHED: /* complete gzip response */ - case NE_Z_PASSTHROUGH: /* complete uncompressed response */ - return ctx->reader(ctx->userdata, buf, 0); - default: - /* invalid state: truncated response. */ - break; - } - /* else: truncated response, fail. */ - ne_set_error(ctx->session, "Compressed response was truncated"); - return NE_ERROR; - } - - switch (ctx->state) { - case NE_Z_PASSTHROUGH: - /* move along there. */ - return ctx->reader(ctx->userdata, buf, len); - - case NE_Z_FINISHED: - /* Could argue for tolerance, and ignoring trailing content; - * but it could mean something more serious. */ - if (len > 0) { - ne_set_error(ctx->session, - "Unexpected content received after compressed stream"); - return NE_ERROR; - } - break; - - case NE_Z_BEFORE_DATA: - /* work out whether this is a compressed response or not. */ - hdr = ne_get_response_header(ctx->request, "Content-Encoding"); - if (hdr && ne_strcasecmp(hdr, "gzip") == 0) { - int ret; - NE_DEBUG(NE_DBG_HTTP, "compress: got gzipped stream.\n"); - - /* inflateInit2() works here where inflateInit() doesn't. */ - ret = inflateInit2(&ctx->zstr, -MAX_WBITS); - if (ret != Z_OK) { - set_zlib_error(ctx, _("Could not initialize zlib"), ret); - return -1; - } - ctx->zstrinit = 1; - - } else { - /* No Content-Encoding header: pass it on. TODO: we could - * hack it and register the real callback now. But that - * would require add_resp_body_rdr to have defined - * ordering semantics etc etc */ - ctx->state = NE_Z_PASSTHROUGH; - return ctx->reader(ctx->userdata, buf, len); - } - - ctx->state = NE_Z_IN_HEADER; - /* FALLTHROUGH */ - - case NE_Z_IN_HEADER: - /* copy as many bytes as possible into the buffer. */ - if (len + ctx->hdrcount > 10) { - count = 10 - ctx->hdrcount; - } else { - count = len; - } - memcpy(ctx->header + ctx->hdrcount, buf, count); - ctx->hdrcount += count; - /* have we got the full header yet? */ - if (ctx->hdrcount != 10) { - return 0; - } - - buf += count; - len -= count; - - switch (parse_header(ctx)) { - case HDR_EXTENDED: - if (len == 0) - return 0; - break; - case HDR_ERROR: - return NE_ERROR; - case HDR_DONE: - if (len > 0) { - return do_inflate(ctx, buf, len); - } - break; - } - - /* FALLTHROUGH */ - - case NE_Z_POST_HEADER: - /* eating the filename string. */ - zbuf = memchr(buf, '\0', len); - if (zbuf == NULL) { - /* not found it yet. */ - return 0; - } - - NE_DEBUG(NE_DBG_HTTP, - "compresss: skipped %" NE_FMT_SIZE_T " header bytes.\n", - zbuf - buf); - /* found end of string. */ - len -= (1 + zbuf - buf); - buf = zbuf + 1; - ctx->state = NE_Z_INFLATING; - if (len == 0) { - /* end of string was at end of buffer. */ - return 0; - } - - /* FALLTHROUGH */ - - case NE_Z_INFLATING: - return do_inflate(ctx, buf, len); - - case NE_Z_AFTER_DATA: - return process_footer(ctx, (unsigned char *)buf, len); - } - - return 0; -} - -/* Prepare for a compressed response; may be called many times per - * request, for auth retries etc. */ -static void gz_pre_send(ne_request *r, void *ud, ne_buffer *req) -{ - ne_decompress *ctx = ud; - - if (ctx->request == r) { - NE_DEBUG(NE_DBG_HTTP, "compress: Initialization.\n"); - - /* (Re-)Initialize the context */ - ctx->state = NE_Z_BEFORE_DATA; - if (ctx->zstrinit) inflateEnd(&ctx->zstr); - ctx->zstrinit = 0; - ctx->hdrcount = ctx->footcount = 0; - ctx->checksum = crc32(0L, Z_NULL, 0); - } -} - -/* Wrapper for user-passed acceptor function. */ -static int gz_acceptor(void *userdata, ne_request *req, const ne_status *st) -{ - ne_decompress *ctx = userdata; - return ctx->acceptor(ctx->userdata, req, st); -} - -/* A slightly ugly hack: the pre_send hook is scoped per-session, so - * must check that the invoking request is this one, before doing - * anything, and must be unregistered when the context is - * destroyed. */ -ne_decompress *ne_decompress_reader(ne_request *req, ne_accept_response acpt, - ne_block_reader rdr, void *userdata) -{ - ne_decompress *ctx = ne_calloc(sizeof *ctx); - - ne_add_request_header(req, "Accept-Encoding", "gzip"); - - ne_add_response_body_reader(req, gz_acceptor, gz_reader, ctx); - - ctx->reader = rdr; - ctx->userdata = userdata; - ctx->session = ne_get_session(req); - ctx->request = req; - ctx->acceptor = acpt; - - ne_hook_pre_send(ne_get_session(req), gz_pre_send, ctx); - - return ctx; -} - -void ne_decompress_destroy(ne_decompress *ctx) -{ - if (ctx->zstrinit) inflateEnd(&ctx->zstr); - - ne_unhook_pre_send(ctx->session, gz_pre_send, ctx); - - ne_free(ctx); -} - -#else /* !NE_HAVE_ZLIB */ - -/* Pass-through interface present to provide ABI compatibility. */ - -ne_decompress *ne_decompress_reader(ne_request *req, ne_accept_response acpt, - ne_block_reader rdr, void *userdata) -{ - ne_add_response_body_reader(req, acpt, rdr, userdata); - /* an arbitrary return value: don't confuse them by returning NULL. */ - return (ne_decompress *)req; -} - -void ne_decompress_destroy(ne_decompress *dc) -{ -} - -#endif /* NE_HAVE_ZLIB */ diff --git a/client/neon-0.27.2/src/ne_compress.h b/client/neon-0.27.2/src/ne_compress.h deleted file mode 100644 index 039cebd67..000000000 --- a/client/neon-0.27.2/src/ne_compress.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Compressed HTTP response handling - Copyright (C) 2001-2004, Joe Orton - - 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 - -*/ - -#ifndef NE_COMPRESS_H -#define NE_COMPRESS_H - -#include "ne_request.h" - -NE_BEGIN_DECLS - -typedef struct ne_decompress_s ne_decompress; - -/* Call this to register a 'reader' callback which will be passed - * blocks of response body (if the 'acceptance' callback is - * successful). If the response body is returned compressed by the - * server, this reader will receive UNCOMPRESSED blocks. - * - * Returns pointer to context object which must be passed to - * ne_decompress_destroy after the request has been dispatched, to - * free any internal state. If an error occurs during decompression, - * the request will be aborted and session error string set. */ -ne_decompress *ne_decompress_reader(ne_request *req, ne_accept_response accpt, - ne_block_reader rdr, void *userdata); - -/* Destroys decompression state. */ -void ne_decompress_destroy(ne_decompress *ctx); - -NE_END_DECLS - -#endif /* NE_COMPRESS_H */ diff --git a/client/neon-0.27.2/src/ne_dates.c b/client/neon-0.27.2/src/ne_dates.c deleted file mode 100644 index 6fd53bccc..000000000 --- a/client/neon-0.27.2/src/ne_dates.c +++ /dev/null @@ -1,248 +0,0 @@ -/* - Date manipulation routines - Copyright (C) 1999-2006, Joe Orton - Copyright (C) 2004 Jiang Lei - - 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 - -*/ - -#include "config.h" - -#include - -#include -#ifdef HAVE_STDLIB_H -#include -#endif -#include - -#ifdef HAVE_STRING_H -#include -#endif - -#ifdef WIN32 -#include /* for TIME_ZONE_INFORMATION */ -#endif - -#include "ne_alloc.h" -#include "ne_dates.h" -#include "ne_string.h" - -/* Generic date manipulation routines. */ - -/* ISO8601: 2001-01-01T12:30:00Z */ -#define ISO8601_FORMAT_Z "%04d-%02d-%02dT%02d:%02d:%lfZ" -#define ISO8601_FORMAT_M "%04d-%02d-%02dT%02d:%02d:%lf-%02d:%02d" -#define ISO8601_FORMAT_P "%04d-%02d-%02dT%02d:%02d:%lf+%02d:%02d" - -/* RFC1123: Sun, 06 Nov 1994 08:49:37 GMT */ -#define RFC1123_FORMAT "%3s, %02d %3s %4d %02d:%02d:%02d GMT" -/* RFC850: Sunday, 06-Nov-94 08:49:37 GMT */ -#define RFC1036_FORMAT "%10s %2d-%3s-%2d %2d:%2d:%2d GMT" -/* asctime: Wed Jun 30 21:49:08 1993 */ -#define ASCTIME_FORMAT "%3s %3s %2d %2d:%2d:%2d %4d" - -static const char rfc1123_weekdays[7][4] = { - "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" -}; -static const char short_months[12][4] = { - "Jan", "Feb", "Mar", "Apr", "May", "Jun", - "Jul", "Aug", "Sep", "Oct", "Nov", "Dec" -}; - -#if defined(HAVE_STRUCT_TM_TM_GMTOFF) -#define GMTOFF(t) ((t).tm_gmtoff) -#elif defined(HAVE_STRUCT_TM___TM_GMTOFF) -#define GMTOFF(t) ((t).__tm_gmtoff) -#elif defined(WIN32) -#define GMTOFF(t) (gmt_to_local_win32()) -#else -/* FIXME: work out the offset anyway. */ -#define GMTOFF(t) (0) -#endif - -#ifdef WIN32 -time_t gmt_to_local_win32(void) -{ - TIME_ZONE_INFORMATION tzinfo; - DWORD dwStandardDaylight; - long bias; - - dwStandardDaylight = GetTimeZoneInformation(&tzinfo); - bias = tzinfo.Bias; - - if (dwStandardDaylight == TIME_ZONE_ID_STANDARD) - bias += tzinfo.StandardBias; - - if (dwStandardDaylight == TIME_ZONE_ID_DAYLIGHT) - bias += tzinfo.DaylightBias; - - return (- bias * 60); -} -#endif - -/* Returns the time/date GMT, in RFC1123-type format: eg - * Sun, 06 Nov 1994 08:49:37 GMT. */ -char *ne_rfc1123_date(time_t anytime) { - struct tm *gmt; - char *ret; - gmt = gmtime(&anytime); - if (gmt == NULL) - return NULL; - ret = ne_malloc(29 + 1); /* dates are 29 chars long */ -/* it goes: Sun, 06 Nov 1994 08:49:37 GMT */ - ne_snprintf(ret, 30, RFC1123_FORMAT, - rfc1123_weekdays[gmt->tm_wday], gmt->tm_mday, - short_months[gmt->tm_mon], 1900 + gmt->tm_year, - gmt->tm_hour, gmt->tm_min, gmt->tm_sec); - - return ret; -} - -/* Takes an ISO-8601-formatted date string and returns the time_t. - * Returns (time_t)-1 if the parse fails. */ -time_t ne_iso8601_parse(const char *date) -{ - struct tm gmt = {0}; - int off_hour, off_min; - double sec; - off_t fix; - int n; - - /* it goes: ISO8601: 2001-01-01T12:30:00+03:30 */ - if ((n = sscanf(date, ISO8601_FORMAT_P, - &gmt.tm_year, &gmt.tm_mon, &gmt.tm_mday, - &gmt.tm_hour, &gmt.tm_min, &sec, - &off_hour, &off_min)) == 8) { - gmt.tm_sec = (int)sec; - fix = - off_hour * 3600 - off_min * 60; - } - /* it goes: ISO8601: 2001-01-01T12:30:00-03:30 */ - else if ((n = sscanf(date, ISO8601_FORMAT_M, - &gmt.tm_year, &gmt.tm_mon, &gmt.tm_mday, - &gmt.tm_hour, &gmt.tm_min, &sec, - &off_hour, &off_min)) == 8) { - gmt.tm_sec = (int)sec; - fix = off_hour * 3600 + off_min * 60; - } - /* it goes: ISO8601: 2001-01-01T12:30:00Z */ - else if ((n = sscanf(date, ISO8601_FORMAT_Z, - &gmt.tm_year, &gmt.tm_mon, &gmt.tm_mday, - &gmt.tm_hour, &gmt.tm_min, &sec)) == 6) { - gmt.tm_sec = (int)sec; - fix = 0; - } - else { - return (time_t)-1; - } - - gmt.tm_year -= 1900; - gmt.tm_isdst = -1; - gmt.tm_mon--; - - return mktime(&gmt) + fix + GMTOFF(gmt); -} - -/* Takes an RFC1123-formatted date string and returns the time_t. - * Returns (time_t)-1 if the parse fails. */ -time_t ne_rfc1123_parse(const char *date) -{ - struct tm gmt = {0}; - char wkday[4], mon[4]; - int n; -/* it goes: Sun, 06 Nov 1994 08:49:37 GMT */ - n = sscanf(date, RFC1123_FORMAT, - wkday, &gmt.tm_mday, mon, &gmt.tm_year, &gmt.tm_hour, - &gmt.tm_min, &gmt.tm_sec); - /* Is it portable to check n==7 here? */ - gmt.tm_year -= 1900; - for (n=0; n<12; n++) - if (strcmp(mon, short_months[n]) == 0) - break; - /* tm_mon comes out as 12 if the month is corrupt, which is desired, - * since the mktime will then fail */ - gmt.tm_mon = n; - gmt.tm_isdst = -1; - return mktime(&gmt) + GMTOFF(gmt); -} - -/* Takes a string containing a RFC1036-style date and returns the time_t */ -time_t ne_rfc1036_parse(const char *date) -{ - struct tm gmt = {0}; - int n; - char wkday[11], mon[4]; - /* RFC850/1036 style dates: Sunday, 06-Nov-94 08:49:37 GMT */ - n = sscanf(date, RFC1036_FORMAT, - wkday, &gmt.tm_mday, mon, &gmt.tm_year, - &gmt.tm_hour, &gmt.tm_min, &gmt.tm_sec); - if (n != 7) { - return (time_t)-1; - } - - /* portable to check n here? */ - for (n=0; n<12; n++) - if (strcmp(mon, short_months[n]) == 0) - break; - /* tm_mon comes out as 12 if the month is corrupt, which is desired, - * since the mktime will then fail */ - - /* Defeat Y2K bug. */ - if (gmt.tm_year < 50) - gmt.tm_year += 100; - - gmt.tm_mon = n; - gmt.tm_isdst = -1; - return mktime(&gmt) + GMTOFF(gmt); -} - - -/* (as)ctime dates are like: - * Wed Jun 30 21:49:08 1993 - */ -time_t ne_asctime_parse(const char *date) -{ - struct tm gmt = {0}; - int n; - char wkday[4], mon[4]; - n = sscanf(date, ASCTIME_FORMAT, - wkday, mon, &gmt.tm_mday, - &gmt.tm_hour, &gmt.tm_min, &gmt.tm_sec, - &gmt.tm_year); - /* portable to check n here? */ - for (n=0; n<12; n++) - if (strcmp(mon, short_months[n]) == 0) - break; - /* tm_mon comes out as 12 if the month is corrupt, which is desired, - * since the mktime will then fail */ - gmt.tm_mon = n; - gmt.tm_isdst = -1; - return mktime(&gmt) + GMTOFF(gmt); -} - -/* HTTP-date parser */ -time_t ne_httpdate_parse(const char *date) -{ - time_t tmp; - tmp = ne_rfc1123_parse(date); - if (tmp == -1) { - tmp = ne_rfc1036_parse(date); - if (tmp == -1) - tmp = ne_asctime_parse(date); - } - return tmp; -} diff --git a/client/neon-0.27.2/src/ne_dates.h b/client/neon-0.27.2/src/ne_dates.h deleted file mode 100644 index 7be69b166..000000000 --- a/client/neon-0.27.2/src/ne_dates.h +++ /dev/null @@ -1,54 +0,0 @@ -/* - Date manipulation routines - Copyright (C) 1999-2002, 2005, Joe Orton - - 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 - -*/ - -#ifndef NE_DATES_H -#define NE_DATES_H - -#include - -#include "ne_defs.h" - -NE_BEGIN_DECLS - -/* Date manipulation routines as per RFC1123 and RFC1036 */ - -/* Return current date/time in RFC1123 format */ -char *ne_rfc1123_date(time_t anytime); - -/* Returns time from date/time using the subset of the ISO8601 format - * referenced in RFC2518 (e.g as used in the creationdate property in - * the DAV: namespace). */ -time_t ne_iso8601_parse(const char *date); - -/* Returns time from date/time in RFC1123 format */ -time_t ne_rfc1123_parse(const char *date); - -time_t ne_rfc1036_parse(const char *date); - -/* Parses asctime date string */ -time_t ne_asctime_parse(const char *date); - -/* Parse an HTTP-date as per RFC2616 */ -time_t ne_httpdate_parse(const char *date); - -NE_END_DECLS - -#endif /* NE_DATES_H */ diff --git a/client/neon-0.27.2/src/ne_defs.h b/client/neon-0.27.2/src/ne_defs.h deleted file mode 100644 index 9d291e25a..000000000 --- a/client/neon-0.27.2/src/ne_defs.h +++ /dev/null @@ -1,64 +0,0 @@ -/* - Standard definitions for neon headers - Copyright (C) 2003-2006, Joe Orton - - 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 - -*/ - -#undef NE_BEGIN_DECLS -#undef NE_END_DECLS -#ifdef __cplusplus -# define NE_BEGIN_DECLS extern "C" { -# define NE_END_DECLS } -#else -# define NE_BEGIN_DECLS /* empty */ -# define NE_END_DECLS /* empty */ -#endif - -#ifndef NE_DEFS_H -#define NE_DEFS_H - -#include - -#ifdef NE_LFS -typedef off64_t ne_off_t; -#else -typedef off_t ne_off_t; -#endif - -/* define ssize_t for Win32 */ -#if defined(WIN32) && !defined(ssize_t) -#define ssize_t int -#endif - -#ifdef __GNUC__ -#if __GNUC__ >= 3 -#define ne_attribute_malloc __attribute__((malloc)) -#else -#define ne_attribute_malloc -#endif -#define ne_attribute(x) __attribute__(x) -#else -#define ne_attribute(x) -#define ne_attribute_malloc -#endif - -#ifndef NE_BUFSIZ -#define NE_BUFSIZ 8192 -#endif - -#endif /* NE_DEFS_H */ diff --git a/client/neon-0.27.2/src/ne_gnutls.c b/client/neon-0.27.2/src/ne_gnutls.c deleted file mode 100644 index 52620397d..000000000 --- a/client/neon-0.27.2/src/ne_gnutls.c +++ /dev/null @@ -1,1138 +0,0 @@ -/* - neon SSL/TLS support using GNU TLS - Copyright (C) 2002-2007, Joe Orton - Copyright (C) 2004, Aleix Conchillo Flaque - - 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 - -*/ - -#include "config.h" - -#include -#include -#include - -#ifdef HAVE_STRING_H -#include -#endif - -#include -#include -#include -#include - -#include -#include - -#ifdef NE_HAVE_TS_SSL -#include -#include -#include -GCRY_THREAD_OPTION_PTHREAD_IMPL; -#endif - -#ifdef HAVE_ICONV -#include -#endif - -#include "ne_ssl.h" -#include "ne_string.h" -#include "ne_session.h" -#include "ne_internal.h" - -#include "ne_private.h" -#include "ne_privssl.h" - -struct ne_ssl_dname_s { - int subject; /* non-zero if this is the subject DN object */ - gnutls_x509_crt cert; -}; - -struct ne_ssl_certificate_s { - ne_ssl_dname subj_dn, issuer_dn; - gnutls_x509_crt subject; - ne_ssl_certificate *issuer; - char *identity; -}; - -struct ne_ssl_client_cert_s { - gnutls_pkcs12 p12; - int decrypted; /* non-zero if successfully decrypted. */ - ne_ssl_certificate cert; - gnutls_x509_privkey pkey; - char *friendly_name; -}; - -/* Returns the highest used index in subject (or issuer) DN of - * certificate CERT for OID, or -1 if no RDNs are present in the DN - * using that OID. */ -static int oid_find_highest_index(gnutls_x509_crt cert, int subject, const char *oid) -{ - int ret, idx = -1; - - do { - size_t len = 0; - - if (subject) - ret = gnutls_x509_crt_get_dn_by_oid(cert, oid, ++idx, 0, - NULL, &len); - else - ret = gnutls_x509_crt_get_issuer_dn_by_oid(cert, oid, ++idx, 0, - NULL, &len); - } while (ret == GNUTLS_E_SHORT_MEMORY_BUFFER); - - return idx - 1; -} - -#ifdef HAVE_GNUTLS_X509_DN_GET_RDN_AVA -/* New-style RDN handling introduced in GnuTLS 1.7.x. */ - -#ifdef HAVE_ICONV -static void convert_dirstring(ne_buffer *buf, const char *charset, - gnutls_datum *data) -{ - iconv_t id = iconv_open("UTF-8", charset); - size_t inlen = data->size, outlen = buf->length - buf->used; - char *inbuf = (char *)data->data; - char *outbuf = buf->data + buf->used - 1; - - if (id == (iconv_t)-1) { - char err[128], err2[128]; - - ne_snprintf(err, sizeof err, "[unprintable in %s: %s]", - charset, ne_strerror(errno, err2, sizeof err2)); - ne_buffer_zappend(buf, err); - return; - } - - ne_buffer_grow(buf, buf->used + 64); - - while (inlen && outlen - && iconv(id, &inbuf, &inlen, &outbuf, &outlen) == 0) - ; - - iconv_close(id); - buf->used += buf->length - buf->used - outlen; - buf->data[buf->used - 1] = '\0'; -} -#endif - -/* From section 11.13 of the Dubuisson ASN.1 bible: */ -#define TAG_UTF8 (12) -#define TAG_PRINTABLE (19) -#define TAG_T61 (20) -#define TAG_IA5 (22) -#define TAG_VISIBLE (26) -#define TAG_UNIVERSAL (28) -#define TAG_BMP (30) - -static void append_dirstring(ne_buffer *buf, gnutls_datum *data, unsigned long tag) -{ - switch (tag) { - case TAG_UTF8: - case TAG_IA5: - case TAG_PRINTABLE: - case TAG_VISIBLE: - ne_buffer_append(buf, (char *)data->data, data->size); - break; -#ifdef HAVE_ICONV - case TAG_T61: - convert_dirstring(buf, "ISO-8859-1", data); - break; - case TAG_BMP: - convert_dirstring(buf, "UCS-2BE", data); - break; -#endif - default: { - char tmp[128]; - ne_snprintf(tmp, sizeof tmp, _("[unprintable:#%lu]"), tag); - ne_buffer_zappend(buf, tmp); - } break; - } -} - -/* OIDs to not include in readable DNs by default: */ -#define OID_emailAddress "1.2.840.113549.1.9.1" -#define OID_commonName "2.5.4.3" - -#define CMPOID(a,o) ((a)->oid.size == sizeof(o) \ - && memcmp((a)->oid.data, o, strlen(o)) == 0) - -char *ne_ssl_readable_dname(const ne_ssl_dname *name) -{ - gnutls_x509_dn_t dn; - int ret, rdn = 0, flag = 0; - ne_buffer *buf; - gnutls_x509_ava_st val; - - if (name->subject) - ret = gnutls_x509_crt_get_subject(name->cert, &dn); - else - ret = gnutls_x509_crt_get_issuer(name->cert, &dn); - - if (ret) - return ne_strdup(_("[unprintable]")); - - buf = ne_buffer_create(); - - /* Find the highest rdn... */ - while (gnutls_x509_dn_get_rdn_ava(dn, rdn++, 0, &val) == 0) - ; - - /* ..then iterate back to the first: */ - while (--rdn >= 0) { - int ava = 0; - - /* Iterate through all AVAs for multivalued AVAs; better than - * ne_openssl can do! */ - do { - ret = gnutls_x509_dn_get_rdn_ava(dn, rdn, ava, &val); - - /* If the *only* attribute to append is the common name or - * email address, use it; otherwise skip those - * attributes. */ - if (ret == 0 && val.value.size > 0 - && ((!CMPOID(&val, OID_emailAddress) - && !CMPOID(&val, OID_commonName)) - || (buf->used == 1 && rdn == 0))) { - flag = 1; - if (buf->used > 1) ne_buffer_append(buf, ", ", 2); - - append_dirstring(buf, &val.value, val.value_tag); - } - - ava++; - } while (ret == 0); - } - - return ne_buffer_finish(buf); -} - -#else /* !HAVE_GNUTLS_X509_DN_GET_RDN_AVA */ - -/* Appends the value of RDN with given oid from certitifcate x5 - * subject (if subject is non-zero), or issuer DN to buffer 'buf': */ -static void append_rdn(ne_buffer *buf, gnutls_x509_crt x5, int subject, const char *oid) -{ - int idx, top, ret; - char rdn[50]; - - top = oid_find_highest_index(x5, subject, oid); - - for (idx = top; idx >= 0; idx--) { - size_t rdnlen = sizeof rdn; - - if (subject) - ret = gnutls_x509_crt_get_dn_by_oid(x5, oid, idx, 0, rdn, &rdnlen); - else - ret = gnutls_x509_crt_get_issuer_dn_by_oid(x5, oid, idx, 0, rdn, &rdnlen); - - if (ret < 0) - return; - - if (buf->used > 1) { - ne_buffer_append(buf, ", ", 2); - } - - ne_buffer_append(buf, rdn, rdnlen); - } -} - -char *ne_ssl_readable_dname(const ne_ssl_dname *name) -{ - ne_buffer *buf = ne_buffer_create(); - int ret, idx = 0; - - do { - char oid[32] = {0}; - size_t oidlen = sizeof oid; - - ret = name->subject - ? gnutls_x509_crt_get_dn_oid(name->cert, idx, oid, &oidlen) - : gnutls_x509_crt_get_issuer_dn_oid(name->cert, idx, oid, &oidlen); - - if (ret == 0) { - append_rdn(buf, name->cert, name->subject, oid); - idx++; - } - } while (ret != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE); - - return ne_buffer_finish(buf); -} -#endif /* HAVE_GNUTLS_X509_DN_GET_RDN_AVA */ - -int ne_ssl_dname_cmp(const ne_ssl_dname *dn1, const ne_ssl_dname *dn2) -{ - char c1[1024], c2[1024]; - size_t s1 = sizeof c1, s2 = sizeof c2; - int ret; - - if (dn1->subject) - ret = gnutls_x509_crt_get_dn(dn1->cert, c1, &s1); - else - ret = gnutls_x509_crt_get_issuer_dn(dn1->cert, c1, &s1); - if (ret) - return 1; - - if (dn2->subject) - ret = gnutls_x509_crt_get_dn(dn2->cert, c2, &s2); - else - ret = gnutls_x509_crt_get_issuer_dn(dn2->cert, c2, &s2); - if (ret) - return -1; - - if (s1 != s2) - return s2 - s1; - - return memcmp(c1, c2, s1); -} - -void ne_ssl_clicert_free(ne_ssl_client_cert *cc) -{ - if (cc->p12) - gnutls_pkcs12_deinit(cc->p12); - if (cc->decrypted) { - if (cc->cert.identity) ne_free(cc->cert.identity); - if (cc->pkey) gnutls_x509_privkey_deinit(cc->pkey); - if (cc->cert.subject) gnutls_x509_crt_deinit(cc->cert.subject); - } - if (cc->friendly_name) ne_free(cc->friendly_name); - ne_free(cc); -} - -void ne_ssl_cert_validity_time(const ne_ssl_certificate *cert, - time_t *from, time_t *until) -{ - if (from) { - *from = gnutls_x509_crt_get_activation_time(cert->subject); - } - if (until) { - *until = gnutls_x509_crt_get_expiration_time(cert->subject); - } -} - -/* Return non-zero if hostname from certificate (cn) matches hostname - * used for session (hostname). (Wildcard matching is no longer - * mandated by RFC3280, but certs are deployed which use wildcards) */ -static int match_hostname(char *cn, const char *hostname) -{ - const char *dot; - NE_DEBUG(NE_DBG_SSL, "Match %s on %s...\n", cn, hostname); - dot = strchr(hostname, '.'); - if (dot == NULL) { - char *pnt = strchr(cn, '.'); - /* hostname is not fully-qualified; unqualify the cn. */ - if (pnt != NULL) { - *pnt = '\0'; - } - } - else if (strncmp(cn, "*.", 2) == 0) { - hostname = dot + 1; - cn += 2; - } - return !ne_strcasecmp(cn, hostname); -} - -/* Check certificate identity. Returns zero if identity matches; 1 if - * identity does not match, or <0 if the certificate had no identity. - * If 'identity' is non-NULL, store the malloc-allocated identity in - * *identity. If 'server' is non-NULL, it must be the network address - * of the server in use, and identity must be NULL. */ -static int check_identity(const ne_uri *server, gnutls_x509_crt cert, - char **identity) -{ - char name[255]; - unsigned int critical; - int ret, seq = 0; - int match = 0, found = 0; - size_t len; - const char *hostname; - - hostname = server ? server->host : ""; - - do { - len = sizeof name; - ret = gnutls_x509_crt_get_subject_alt_name(cert, seq, name, &len, - &critical); - switch (ret) { - case GNUTLS_SAN_DNSNAME: - if (identity && !found) *identity = ne_strdup(name); - match = match_hostname(name, hostname); - found = 1; - break; - case GNUTLS_SAN_IPADDRESS: { - ne_inet_addr *ia; - if (len == 4) - ia = ne_iaddr_make(ne_iaddr_ipv4, (unsigned char *)name); - else if (len == 16) - ia = ne_iaddr_make(ne_iaddr_ipv6, (unsigned char *)name); - else - ia = NULL; - if (ia) { - char buf[128]; - - match = strcmp(hostname, - ne_iaddr_print(ia, buf, sizeof buf)) == 0; - if (identity) *identity = ne_strdup(buf); - found = 1; - ne_iaddr_free(ia); - } else { - NE_DEBUG(NE_DBG_SSL, "iPAddress name with unsupported " - "address type (length %" NE_FMT_SIZE_T "), skipped.\n", - len); - } - } break; - case GNUTLS_SAN_URI: { - ne_uri uri; - - if (ne_uri_parse(name, &uri) == 0 && uri.host && uri.scheme) { - ne_uri tmp; - - if (identity && !found) *identity = ne_strdup(name); - found = 1; - - if (server) { - /* For comparison purposes, all that matters is - * host, scheme and port; ignore the rest. */ - memset(&tmp, 0, sizeof tmp); - tmp.host = uri.host; - tmp.scheme = uri.scheme; - tmp.port = uri.port; - - match = ne_uri_cmp(server, &tmp) == 0; - } - } - - ne_uri_free(&uri); - } break; - - default: - break; - } - seq++; - } while (!match && ret != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE); - - /* Check against the commonName if no DNS alt. names were found, - * as per RFC3280. */ - if (!found) { - seq = oid_find_highest_index(cert, 1, GNUTLS_OID_X520_COMMON_NAME); - - if (seq >= 0) { - len = sizeof name; - name[0] = '\0'; - ret = gnutls_x509_crt_get_dn_by_oid(cert, GNUTLS_OID_X520_COMMON_NAME, - seq, 0, name, &len); - if (ret == 0) { - if (identity) *identity = ne_strdup(name); - match = match_hostname(name, hostname); - } - } else { - return -1; - } - } - - NE_DEBUG(NE_DBG_SSL, "Identity match: %s\n", match ? "good" : "bad"); - return match ? 0 : 1; -} - -/* Populate an ne_ssl_certificate structure from an X509 object. */ -static ne_ssl_certificate *populate_cert(ne_ssl_certificate *cert, - gnutls_x509_crt x5) -{ - cert->subj_dn.cert = x5; - cert->subj_dn.subject = 1; - cert->issuer_dn.cert = x5; - cert->issuer_dn.subject = 0; - cert->issuer = NULL; - cert->subject = x5; - cert->identity = NULL; - check_identity(NULL, x5, &cert->identity); - return cert; -} - -/* Returns a copy certificate of certificate SRC. */ -static gnutls_x509_crt x509_crt_copy(gnutls_x509_crt src) -{ - int ret; - size_t size; - gnutls_datum tmp; - gnutls_x509_crt dest; - - if (gnutls_x509_crt_init(&dest) != 0) { - return NULL; - } - - if (gnutls_x509_crt_export(src, GNUTLS_X509_FMT_DER, NULL, &size) - != GNUTLS_E_SHORT_MEMORY_BUFFER) { - gnutls_x509_crt_deinit(dest); - return NULL; - } - - tmp.data = ne_malloc(size); - ret = gnutls_x509_crt_export(src, GNUTLS_X509_FMT_DER, tmp.data, &size); - if (ret == 0) { - tmp.size = size; - ret = gnutls_x509_crt_import(dest, &tmp, GNUTLS_X509_FMT_DER); - } - - if (ret) { - gnutls_x509_crt_deinit(dest); - dest = NULL; - } - - ne_free(tmp.data); - return dest; -} - -/* Duplicate a client certificate, which must be in the decrypted state. */ -static ne_ssl_client_cert *dup_client_cert(const ne_ssl_client_cert *cc) -{ - int ret; - ne_ssl_client_cert *newcc = ne_calloc(sizeof *newcc); - - newcc->decrypted = 1; - - ret = gnutls_x509_privkey_init(&newcc->pkey); - if (ret != 0) goto dup_error; - - ret = gnutls_x509_privkey_cpy(newcc->pkey, cc->pkey); - if (ret != 0) goto dup_error; - - newcc->cert.subject = x509_crt_copy(cc->cert.subject); - if (!newcc->cert.subject) goto dup_error; - - if (cc->friendly_name) newcc->friendly_name = ne_strdup(cc->friendly_name); - - populate_cert(&newcc->cert, newcc->cert.subject); - return newcc; - -dup_error: - if (newcc->pkey) gnutls_x509_privkey_deinit(newcc->pkey); - if (newcc->cert.subject) gnutls_x509_crt_deinit(newcc->cert.subject); - ne_free(newcc); - return NULL; -} - -/* Callback invoked when the SSL server requests a client certificate. */ -static int provide_client_cert(gnutls_session session, - const gnutls_datum *req_ca_rdn, int nreqs, - const gnutls_pk_algorithm *sign_algos, - int sign_algos_length, gnutls_retr_st *st) -{ - ne_session *sess = gnutls_session_get_ptr(session); - - if (!sess) { - return -1; - } - - if (!sess->client_cert && sess->ssl_provide_fn) { - /* The dname array cannot be converted without better dname - * support from GNUTLS. */ - sess->ssl_provide_fn(sess->ssl_provide_ud, sess, - NULL, 0); - } - - NE_DEBUG(NE_DBG_SSL, "In client cert provider callback.\n"); - - if (sess->client_cert) { - gnutls_certificate_type type = gnutls_certificate_type_get(session); - if (type == GNUTLS_CRT_X509) { - NE_DEBUG(NE_DBG_SSL, "Supplying client certificate.\n"); - - st->type = type; - st->ncerts = 1; - st->cert.x509 = &sess->client_cert->cert.subject; - st->key.x509 = sess->client_cert->pkey; - - /* tell GNU TLS not to deallocate the certs. */ - st->deinit_all = 0; - } else { - return -1; - } - } else { - NE_DEBUG(NE_DBG_SSL, "No client certificate supplied.\n"); - } - - return 0; -} - -void ne_ssl_set_clicert(ne_session *sess, const ne_ssl_client_cert *cc) -{ - sess->client_cert = dup_client_cert(cc); -} - -ne_ssl_context *ne_ssl_context_create(int flags) -{ - ne_ssl_context *ctx = ne_calloc(sizeof *ctx); - gnutls_certificate_allocate_credentials(&ctx->cred); - if (flags == NE_SSL_CTX_CLIENT) { - gnutls_certificate_client_set_retrieve_function(ctx->cred, - provide_client_cert); - } - return ctx; -} - -int ne_ssl_context_keypair(ne_ssl_context *ctx, - const char *cert, const char *key) -{ - gnutls_certificate_set_x509_key_file(ctx->cred, cert, key, - GNUTLS_X509_FMT_PEM); - return 0; -} - -int ne_ssl_context_set_verify(ne_ssl_context *ctx, int required, - const char *ca_names, const char *verify_cas) -{ - ctx->verify = required; - if (verify_cas) { - gnutls_certificate_set_x509_trust_file(ctx->cred, verify_cas, - GNUTLS_X509_FMT_PEM); - } - /* gnutls_certificate_send_x509_rdn_sequence in gnutls >= 1.2 can - * be used to *suppress* sending the CA names, but not control it, - * it seems. */ - return 0; -} - -void ne_ssl_context_set_flag(ne_ssl_context *ctx, int flag, int value) -{ - /* SSLv2 not supported. */ -} - -void ne_ssl_context_destroy(ne_ssl_context *ctx) -{ - gnutls_certificate_free_credentials(ctx->cred); - if (ctx->cache.client.data) { - ne_free(ctx->cache.client.data); - } else if (ctx->cache.server.key.data) { - gnutls_free(ctx->cache.server.key.data); - gnutls_free(ctx->cache.server.data.data); - } - ne_free(ctx); -} - -/* Return the certificate chain sent by the peer, or NULL on error. */ -static ne_ssl_certificate *make_peers_chain(gnutls_session sock) -{ - ne_ssl_certificate *current = NULL, *top = NULL; - const gnutls_datum *certs; - unsigned int n, count; - - certs = gnutls_certificate_get_peers(sock, &count); - if (!certs) { - return NULL; - } - - for (n = 0; n < count; n++) { - ne_ssl_certificate *cert; - gnutls_x509_crt x5; - - if (gnutls_x509_crt_init(&x5) || - gnutls_x509_crt_import(x5, &certs[n], GNUTLS_X509_FMT_DER)) { - ne_ssl_cert_free(top); - return NULL; - } - - cert = populate_cert(ne_malloc(sizeof *cert), x5); - - if (top == NULL) { - current = top = cert; - } else { - current->issuer = cert; - current = cert; - } - } - - return top; -} - -/* Verifies an SSL server certificate. */ -static int check_certificate(ne_session *sess, gnutls_session sock, - ne_ssl_certificate *chain) -{ - time_t before, after, now = time(NULL); - int ret, failures = 0; - ne_uri server; - - before = gnutls_x509_crt_get_activation_time(chain->subject); - after = gnutls_x509_crt_get_expiration_time(chain->subject); - - if (now < before) - failures |= NE_SSL_NOTYETVALID; - else if (now > after) - failures |= NE_SSL_EXPIRED; - - memset(&server, 0, sizeof server); - ne_fill_server_uri(sess, &server); - ret = check_identity(&server, chain->subject, NULL); - ne_uri_free(&server); - - if (ret < 0) { - ne_set_error(sess, _("Server certificate was missing commonName " - "attribute in subject name")); - return NE_ERROR; - } else if (ret > 0) { - failures |= NE_SSL_IDMISMATCH; - } - - if (gnutls_certificate_verify_peers(sock)) { - failures |= NE_SSL_UNTRUSTED; - } - - NE_DEBUG(NE_DBG_SSL, "Failures = %d\n", failures); - - if (failures == 0) { - ret = NE_OK; - } else { - ne__ssl_set_verify_err(sess, failures); - ret = NE_ERROR; - if (sess->ssl_verify_fn - && sess->ssl_verify_fn(sess->ssl_verify_ud, failures, chain) == 0) - ret = NE_OK; - } - - return ret; -} - -/* Negotiate an SSL connection. */ -int ne__negotiate_ssl(ne_session *sess) -{ - ne_ssl_context *const ctx = sess->ssl_context; - ne_ssl_certificate *chain; - gnutls_session sock; - - NE_DEBUG(NE_DBG_SSL, "Negotiating SSL connection.\n"); - - if (ne_sock_connect_ssl(sess->socket, ctx, sess)) { - ne_set_error(sess, _("SSL negotiation failed: %s"), - ne_sock_error(sess->socket)); - return NE_ERROR; - } - - sock = ne__sock_sslsock(sess->socket); - - chain = make_peers_chain(sock); - if (chain == NULL) { - ne_set_error(sess, _("Server did not send certificate chain")); - return NE_ERROR; - } - - if (sess->server_cert && ne_ssl_cert_cmp(sess->server_cert, chain) == 0) { - /* Same cert as last time; presume OK. This is not optimal as - * make_peers_chain() has already gone through and done the - * expensive DER parsing stuff for the whole chain by now. */ - ne_ssl_cert_free(chain); - return NE_OK; - } - - if (check_certificate(sess, sock, chain)) { - ne_ssl_cert_free(chain); - return NE_ERROR; - } - - sess->server_cert = chain; - - return NE_OK; -} - -const ne_ssl_dname *ne_ssl_cert_issuer(const ne_ssl_certificate *cert) -{ - return &cert->issuer_dn; -} - -const ne_ssl_dname *ne_ssl_cert_subject(const ne_ssl_certificate *cert) -{ - return &cert->subj_dn; -} - -const ne_ssl_certificate *ne_ssl_cert_signedby(const ne_ssl_certificate *cert) -{ - return cert->issuer; -} - -const char *ne_ssl_cert_identity(const ne_ssl_certificate *cert) -{ - return cert->identity; -} - -void ne_ssl_context_trustcert(ne_ssl_context *ctx, const ne_ssl_certificate *cert) -{ - gnutls_x509_crt certs = cert->subject; - gnutls_certificate_set_x509_trust(ctx->cred, &certs, 1); -} - -void ne_ssl_trust_default_ca(ne_session *sess) -{ -#ifdef NE_SSL_CA_BUNDLE - gnutls_certificate_set_x509_trust_file(sess->ssl_context->cred, - NE_SSL_CA_BUNDLE, - GNUTLS_X509_FMT_PEM); -#endif -} - -/* Read the contents of file FILENAME into *DATUM. */ -static int read_to_datum(const char *filename, gnutls_datum *datum) -{ - FILE *f = fopen(filename, "r"); - ne_buffer *buf; - char tmp[4192]; - size_t len; - - if (!f) { - return -1; - } - - buf = ne_buffer_ncreate(8192); - while ((len = fread(tmp, 1, sizeof tmp, f)) > 0) { - ne_buffer_append(buf, tmp, len); - } - - if (!feof(f)) { - ne_buffer_destroy(buf); - return -1; - } - - datum->size = ne_buffer_size(buf); - datum->data = (unsigned char *)ne_buffer_finish(buf); - return 0; -} - -/* Parses a PKCS#12 structure and loads the certificate, private key - * and friendly name if possible. Returns zero on success, non-zero - * on error. */ -static int pkcs12_parse(gnutls_pkcs12 p12, gnutls_x509_privkey *pkey, - gnutls_x509_crt *x5, char **friendly_name, - const char *password) -{ - gnutls_pkcs12_bag bag = NULL; - int i, j, ret = 0; - - for (i = 0; ret == 0; ++i) { - if (bag) gnutls_pkcs12_bag_deinit(bag); - - ret = gnutls_pkcs12_bag_init(&bag); - if (ret < 0) continue; - - ret = gnutls_pkcs12_get_bag(p12, i, bag); - if (ret < 0) continue; - - gnutls_pkcs12_bag_decrypt(bag, password); - - for (j = 0; ret == 0 && j < gnutls_pkcs12_bag_get_count(bag); ++j) { - gnutls_pkcs12_bag_type type; - gnutls_datum data; - - if (friendly_name && *friendly_name == NULL) { - char *name = NULL; - gnutls_pkcs12_bag_get_friendly_name(bag, j, &name); - if (name) { - if (name[0] == '.') name++; /* weird GnuTLS bug? */ - *friendly_name = ne_strdup(name); - } - } - - type = gnutls_pkcs12_bag_get_type(bag, j); - switch (type) { - case GNUTLS_BAG_PKCS8_KEY: - case GNUTLS_BAG_PKCS8_ENCRYPTED_KEY: - gnutls_x509_privkey_init(pkey); - - ret = gnutls_pkcs12_bag_get_data(bag, j, &data); - if (ret < 0) continue; - - ret = gnutls_x509_privkey_import_pkcs8(*pkey, &data, - GNUTLS_X509_FMT_DER, - password, - 0); - if (ret < 0) continue; - break; - case GNUTLS_BAG_CERTIFICATE: - gnutls_x509_crt_init(x5); - - ret = gnutls_pkcs12_bag_get_data(bag, j, &data); - if (ret < 0) continue; - - ret = gnutls_x509_crt_import(*x5, &data, GNUTLS_X509_FMT_DER); - if (ret < 0) continue; - - break; - default: - break; - } - } - } - - /* Make sure last bag is freed */ - if (bag) gnutls_pkcs12_bag_deinit(bag); - - /* Free in case of error */ - if (ret < 0 && ret != GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) { - if (*x5) gnutls_x509_crt_deinit(*x5); - if (*pkey) gnutls_x509_privkey_deinit(*pkey); - if (friendly_name && *friendly_name) ne_free(*friendly_name); - } - - if (ret == GNUTLS_E_REQUESTED_DATA_NOT_AVAILABLE) ret = 0; - return ret; -} - -ne_ssl_client_cert *ne_ssl_clicert_read(const char *filename) -{ - int ret; - gnutls_datum data; - gnutls_pkcs12 p12; - ne_ssl_client_cert *cc; - char *friendly_name = NULL; - gnutls_x509_crt cert = NULL; - gnutls_x509_privkey pkey = NULL; - - if (read_to_datum(filename, &data)) - return NULL; - - if (gnutls_pkcs12_init(&p12) != 0) { - return NULL; - } - - ret = gnutls_pkcs12_import(p12, &data, GNUTLS_X509_FMT_DER, 0); - ne_free(data.data); - if (ret < 0) { - gnutls_pkcs12_deinit(p12); - return NULL; - } - - if (gnutls_pkcs12_verify_mac(p12, "") == 0) { - if (pkcs12_parse(p12, &pkey, &cert, &friendly_name, "") != 0) { - gnutls_pkcs12_deinit(p12); - return NULL; - } - - cc = ne_calloc(sizeof *cc); - cc->pkey = pkey; - cc->decrypted = 1; - cc->friendly_name = friendly_name; - populate_cert(&cc->cert, cert); - gnutls_pkcs12_deinit(p12); - cc->p12 = NULL; - return cc; - } else { - /* TODO: calling pkcs12_parse() here to find the friendly_name - * seems to break horribly. */ - cc = ne_calloc(sizeof *cc); - cc->p12 = p12; - return cc; - } -} - -int ne_ssl_clicert_encrypted(const ne_ssl_client_cert *cc) -{ - return !cc->decrypted; -} - -int ne_ssl_clicert_decrypt(ne_ssl_client_cert *cc, const char *password) -{ - int ret; - gnutls_x509_crt cert = NULL; - gnutls_x509_privkey pkey = NULL; - - if (gnutls_pkcs12_verify_mac(cc->p12, password) != 0) { - return -1; - } - - ret = pkcs12_parse(cc->p12, &pkey, &cert, NULL, password); - if (ret < 0) - return ret; - - gnutls_pkcs12_deinit(cc->p12); - populate_cert(&cc->cert, cert); - cc->pkey = pkey; - cc->decrypted = 1; - cc->p12 = NULL; - return 0; -} - -const ne_ssl_certificate *ne_ssl_clicert_owner(const ne_ssl_client_cert *cc) -{ - return &cc->cert; -} - -const char *ne_ssl_clicert_name(const ne_ssl_client_cert *ccert) -{ - return ccert->friendly_name; -} - -ne_ssl_certificate *ne_ssl_cert_read(const char *filename) -{ - int ret; - gnutls_datum data; - gnutls_x509_crt x5; - - if (read_to_datum(filename, &data)) - return NULL; - - if (gnutls_x509_crt_init(&x5) != 0) - return NULL; - - ret = gnutls_x509_crt_import(x5, &data, GNUTLS_X509_FMT_PEM); - ne_free(data.data); - if (ret < 0) { - gnutls_x509_crt_deinit(x5); - return NULL; - } - - return populate_cert(ne_calloc(sizeof(struct ne_ssl_certificate_s)), x5); -} - -int ne_ssl_cert_write(const ne_ssl_certificate *cert, const char *filename) -{ - unsigned char buffer[10*1024]; - size_t len = sizeof buffer; - - FILE *fp = fopen(filename, "w"); - - if (fp == NULL) return -1; - - if (gnutls_x509_crt_export(cert->subject, GNUTLS_X509_FMT_PEM, buffer, - &len) < 0) { - fclose(fp); - return -1; - } - - if (fwrite(buffer, len, 1, fp) != 1) { - fclose(fp); - return -1; - } - - if (fclose(fp) != 0) - return -1; - - return 0; -} - -void ne_ssl_cert_free(ne_ssl_certificate *cert) -{ - gnutls_x509_crt_deinit(cert->subject); - if (cert->identity) ne_free(cert->identity); - if (cert->issuer) ne_ssl_cert_free(cert->issuer); - ne_free(cert); -} - -int ne_ssl_cert_cmp(const ne_ssl_certificate *c1, const ne_ssl_certificate *c2) -{ - char digest1[NE_SSL_DIGESTLEN], digest2[NE_SSL_DIGESTLEN]; - - if (ne_ssl_cert_digest(c1, digest1) || ne_ssl_cert_digest(c2, digest2)) { - return -1; - } - - return strcmp(digest1, digest2); -} - -/* The certificate import/export format is the base64 encoding of the - * raw DER; PEM without the newlines and wrapping. */ - -ne_ssl_certificate *ne_ssl_cert_import(const char *data) -{ - int ret; - size_t len; - unsigned char *der; - gnutls_datum buffer = { NULL, 0 }; - gnutls_x509_crt x5; - - if (gnutls_x509_crt_init(&x5) != 0) - return NULL; - - /* decode the base64 to get the raw DER representation */ - len = ne_unbase64(data, &der); - if (len == 0) return NULL; - - buffer.data = der; - buffer.size = len; - - ret = gnutls_x509_crt_import(x5, &buffer, GNUTLS_X509_FMT_DER); - ne_free(der); - - if (ret < 0) { - gnutls_x509_crt_deinit(x5); - return NULL; - } - - return populate_cert(ne_calloc(sizeof(struct ne_ssl_certificate_s)), x5); -} - -char *ne_ssl_cert_export(const ne_ssl_certificate *cert) -{ - unsigned char *der; - size_t len = 0; - char *ret; - - /* find the length of the DER encoding. */ - if (gnutls_x509_crt_export(cert->subject, GNUTLS_X509_FMT_DER, NULL, &len) != - GNUTLS_E_SHORT_MEMORY_BUFFER) { - return NULL; - } - - der = ne_malloc(len); - if (gnutls_x509_crt_export(cert->subject, GNUTLS_X509_FMT_DER, der, &len)) { - ne_free(der); - return NULL; - } - - ret = ne_base64(der, len); - ne_free(der); - return ret; -} - -int ne_ssl_cert_digest(const ne_ssl_certificate *cert, char *digest) -{ - char sha1[20], *p; - int j; - size_t len = sizeof sha1; - - if (gnutls_x509_crt_get_fingerprint(cert->subject, GNUTLS_DIG_SHA, - sha1, &len) < 0) - return -1; - - for (j = 0, p = digest; j < 20; j++) { - *p++ = NE_HEX2ASC((sha1[j] >> 4) & 0x0f); - *p++ = NE_HEX2ASC(sha1[j] & 0x0f); - *p++ = ':'; - } - - *--p = '\0'; - return 0; -} - -int ne__ssl_init(void) -{ -#ifdef NE_HAVE_TS_SSL - gcry_control(GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); -#endif - return gnutls_global_init(); -} - -void ne__ssl_exit(void) -{ - /* No way to unregister the thread callbacks. Doomed. */ -#if LIBGNUTLS_VERSION_MAJOR > 1 || LIBGNUTLS_VERSION_MINOR > 3 \ - || (LIBGNUTLS_VERSION_MINOR == 3 && LIBGNUTLS_VERSION_PATCH >= 3) - /* It's safe to call gnutls_global_deinit() here only with - * gnutls >= 1.3., since older versions don't refcount and - * doing so would prevent any other use of gnutls within - * the process. */ - gnutls_global_deinit(); -#endif -} diff --git a/client/neon-0.27.2/src/ne_i18n.c b/client/neon-0.27.2/src/ne_i18n.c deleted file mode 100644 index 0fb4a3b9e..000000000 --- a/client/neon-0.27.2/src/ne_i18n.c +++ /dev/null @@ -1,47 +0,0 @@ -/* - Internationalization of neon - Copyright (C) 1999-2005, Joe Orton - - 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 - -*/ - -#include "config.h" - -#include "ne_i18n.h" - -#ifdef HAVE_LIBINTL_H -#include -#endif - -void ne_i18n_init(const char *encoding) -{ -#if defined(NE_HAVE_I18N) && defined(NEON_IS_LIBRARY) - /* The bindtextdomain call is only enabled if neon is built as a - * library rather than as a bundled source; it would be possible - * in the future to allow it for bundled builds too, if the neon - * message catalogs could be installed alongside the app's own - * message catalogs. */ - bindtextdomain("neon", LOCALEDIR); - -#ifdef HAVE_BIND_TEXTDOMAIN_CODESET - if (encoding) { - bind_textdomain_codeset("neon", encoding); - } -#endif /* HAVE_BIND_TEXTDOMAIN_CODESET */ - -#endif -} diff --git a/client/neon-0.27.2/src/ne_i18n.h b/client/neon-0.27.2/src/ne_i18n.h deleted file mode 100644 index b6dd21956..000000000 --- a/client/neon-0.27.2/src/ne_i18n.h +++ /dev/null @@ -1,55 +0,0 @@ -/* - Internationalization of neon - Copyright (C) 2005-2006, Joe Orton - - 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 - -*/ - -#ifndef NE_I18N_H -#define NE_I18N_H - -#include "ne_defs.h" - -NE_BEGIN_DECLS - -/* Initialize translated error messages within neon. If 'encoding' is - * non-NULL, it specifies the character encoding for the generated - * translated strings. If it is NULL, the appropriate character - * encoding for the locale will be used. - * - * This call is only strictly necessary if either: - * - * a) neon has been installed into a different prefix than the - * gettext() implementation on which it depends for i18n purposes, or - * - * b) the caller requires that translated messages are in a particular - * character encoding. - * - * If ne_i18n_init() is never called, the message catalogs will not be - * found if case (a) applies (and so English error messages will be - * used), and will use the default character encoding specified by the - * process locale. The library will otherwise operate correctly. - * - * Note that the encoding used is a process-global setting and so - * results may be unexpected if other users of neon within the process - * call ne_i18n_init() with a different encoding parameter. - */ -void ne_i18n_init(const char *encoding); - -NE_END_DECLS - -#endif /* NE_I18N_H */ diff --git a/client/neon-0.27.2/src/ne_internal.h b/client/neon-0.27.2/src/ne_internal.h deleted file mode 100644 index c9c6efff9..000000000 --- a/client/neon-0.27.2/src/ne_internal.h +++ /dev/null @@ -1,86 +0,0 @@ -/* - Global interfaces private to neon. - Copyright (C) 2005-2006, Joe Orton - - 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 - -*/ - -/* NOTE WELL: The interfaces defined in this file are internal to neon - * and MUST NOT be used by neon-based applications. */ - -#ifndef NE_INTERNAL_H -#define NE_INTERNAL_H 1 - -#include "config.h" - -#ifdef HAVE_SYS_LIMITS_H -#include -#endif -#ifdef HAVE_LIMITS_H -#include /* for UINT_MAX etc */ -#endif - -#include "ne_defs.h" - -#undef _ -#ifdef NE_HAVE_I18N -#include -#define _(str) dgettext(PACKAGE_NAME, str) -#else -#define _(str) (str) -#endif /* NE_ENABLE_NLS */ -#define N_(str) (str) - -#if !defined(LONG_LONG_MAX) && defined(LLONG_MAX) -#define LONG_LONG_MAX LLONG_MAX -#elif !defined(LONG_LONG_MAX) && defined(LONGLONG_MAX) -#define LONG_LONG_MAX LONGLONG_MAX -#endif - -#if defined(NE_LFS) - -#define ne_lseek lseek64 -#define FMT_NE_OFF_T NE_FMT_OFF64_T -#define NE_OFFT_MAX LONG_LONG_MAX -#ifdef HAVE_STRTOLL -#define ne_strtoff strtoll -#else -#define ne_strtoff strtoq -#endif - -#else /* !NE_LFS */ - -#define ne_lseek lseek -#define FMT_NE_OFF_T NE_FMT_OFF_T - -#if defined(SIZEOF_LONG_LONG) && defined(LONG_LONG_MAX) \ - && SIZEOF_OFF_T == SIZEOF_LONG_LONG -#define NE_OFFT_MAX LONG_LONG_MAX -#else -#define NE_OFFT_MAX LONG_MAX -#endif - -#if SIZEOF_OFF_T > SIZEOF_LONG && defined(HAVE_STRTOLL) -#define ne_strtoff strtoll -#elif SIZEOF_OFF_T > SIZEOF_LONG && defined(HAVE_STRTOQ) -#define ne_strtoff strtoq -#else -#define ne_strtoff strtol -#endif -#endif /* NE_LFS */ - -#endif /* NE_INTERNAL_H */ diff --git a/client/neon-0.27.2/src/ne_locks.c b/client/neon-0.27.2/src/ne_locks.c deleted file mode 100644 index fbe390c2f..000000000 --- a/client/neon-0.27.2/src/ne_locks.c +++ /dev/null @@ -1,816 +0,0 @@ -/* - WebDAV Class 2 locking operations - Copyright (C) 1999-2006, Joe Orton - - 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 - -*/ - -#include "config.h" - -#ifdef HAVE_STDLIB_H -#include -#endif - -#ifdef HAVE_STRING_H -#include -#endif - -#ifdef HAVE_LIMITS_H -#include -#endif - -#include /* for isdigit() */ - -#include "ne_alloc.h" - -#include "ne_request.h" -#include "ne_xml.h" -#include "ne_locks.h" -#include "ne_uri.h" -#include "ne_basic.h" -#include "ne_props.h" -#include "ne_207.h" -#include "ne_internal.h" -#include "ne_xmlreq.h" - -#define HOOK_ID "http://webdav.org/neon/hooks/webdav-locking" - -/* A list of lock objects. */ -struct lock_list { - struct ne_lock *lock; - struct lock_list *next, *prev; -}; - -struct ne_lock_store_s { - struct lock_list *locks; - struct lock_list *cursor; /* current position in 'locks' */ -}; - -struct lh_req_cookie { - const ne_lock_store *store; - struct lock_list *submit; -}; - -/* Context for PROPFIND/lockdiscovery callbacks */ -struct discover_ctx { - ne_propfind_handler *phandler; - ne_lock_result results; - void *userdata; - ne_buffer *cdata; -}; - -/* Context for handling LOCK response */ -struct lock_ctx { - struct ne_lock active; /* activelock */ - ne_request *req; /* the request in question */ - ne_xml_parser *parser; - char *token; /* the token we're after. */ - int found; - ne_buffer *cdata; -}; - -/* use the "application" state space. */ -#define ELM_LOCK_FIRST (NE_PROPS_STATE_TOP + 66) - -#define ELM_lockdiscovery (ELM_LOCK_FIRST) -#define ELM_activelock (ELM_LOCK_FIRST + 1) -#define ELM_lockscope (ELM_LOCK_FIRST + 2) -#define ELM_locktype (ELM_LOCK_FIRST + 3) -#define ELM_depth (ELM_LOCK_FIRST + 4) -#define ELM_owner (ELM_LOCK_FIRST + 5) -#define ELM_timeout (ELM_LOCK_FIRST + 6) -#define ELM_locktoken (ELM_LOCK_FIRST + 7) -#define ELM_lockinfo (ELM_LOCK_FIRST + 8) -#define ELM_write (ELM_LOCK_FIRST + 9) -#define ELM_exclusive (ELM_LOCK_FIRST + 10) -#define ELM_shared (ELM_LOCK_FIRST + 11) -#define ELM_href (ELM_LOCK_FIRST + 12) -#define ELM_prop (NE_207_STATE_PROP) - -static const struct ne_xml_idmap element_map[] = { -#define ELM(x) { "DAV:", #x, ELM_ ## x } - ELM(lockdiscovery), ELM(activelock), ELM(prop), ELM(lockscope), - ELM(locktype), ELM(depth), ELM(owner), ELM(timeout), ELM(locktoken), - ELM(lockinfo), ELM(lockscope), ELM(locktype), ELM(write), ELM(exclusive), - ELM(shared), ELM(href) - /* no "lockentry" */ -#undef ELM -}; - -static const ne_propname lock_props[] = { - { "DAV:", "lockdiscovery" }, - { NULL } -}; - -/* this simply registers the accessor for the function. */ -static void lk_create(ne_request *req, void *session, - const char *method, const char *uri) -{ - struct lh_req_cookie *lrc = ne_malloc(sizeof *lrc); - lrc->store = session; - lrc->submit = NULL; - ne_set_request_private(req, HOOK_ID, lrc); -} - -static void lk_pre_send(ne_request *r, void *userdata, ne_buffer *req) -{ - struct lh_req_cookie *lrc = ne_get_request_private(r, HOOK_ID); - - if (lrc->submit != NULL) { - struct lock_list *item; - - /* Add in the If header */ - ne_buffer_czappend(req, "If:"); - for (item = lrc->submit; item != NULL; item = item->next) { - char *uri = ne_uri_unparse(&item->lock->uri); - ne_buffer_concat(req, " <", uri, "> (<", - item->lock->token, ">)", NULL); - ne_free(uri); - } - ne_buffer_czappend(req, "\r\n"); - } -} - -/* Insert 'lock' into lock list *list. */ -static void insert_lock(struct lock_list **list, struct ne_lock *lock) -{ - struct lock_list *item = ne_malloc(sizeof *item); - if (*list != NULL) { - (*list)->prev = item; - } - item->prev = NULL; - item->next = *list; - item->lock = lock; - *list = item; -} - -static void free_list(struct lock_list *list, int destroy) -{ - struct lock_list *next; - - while (list != NULL) { - next = list->next; - if (destroy) - ne_lock_destroy(list->lock); - ne_free(list); - list = next; - } -} - -static void lk_destroy(ne_request *req, void *userdata) -{ - struct lh_req_cookie *lrc = ne_get_request_private(req, HOOK_ID); - free_list(lrc->submit, 0); - ne_free(lrc); -} - -void ne_lockstore_destroy(ne_lock_store *store) -{ - free_list(store->locks, 1); - ne_free(store); -} - -ne_lock_store *ne_lockstore_create(void) -{ - return ne_calloc(sizeof(ne_lock_store)); -} - -#define CURSOR_RET(s) ((s)->cursor?(s)->cursor->lock:NULL) - -struct ne_lock *ne_lockstore_first(ne_lock_store *store) -{ - store->cursor = store->locks; - return CURSOR_RET(store); -} - -struct ne_lock *ne_lockstore_next(ne_lock_store *store) -{ - store->cursor = store->cursor->next; - return CURSOR_RET(store); -} - -void ne_lockstore_register(ne_lock_store *store, ne_session *sess) -{ - /* Register the hooks */ - ne_hook_create_request(sess, lk_create, store); - ne_hook_pre_send(sess, lk_pre_send, store); - ne_hook_destroy_request(sess, lk_destroy, store); -} - -/* Submit the given lock for the given URI */ -static void submit_lock(struct lh_req_cookie *lrc, struct ne_lock *lock) -{ - struct lock_list *item; - - /* Check for dups */ - for (item = lrc->submit; item != NULL; item = item->next) { - if (ne_strcasecmp(item->lock->token, lock->token) == 0) - return; - } - - insert_lock(&lrc->submit, lock); -} - -struct ne_lock *ne_lockstore_findbyuri(ne_lock_store *store, - const ne_uri *uri) -{ - struct lock_list *cur; - - for (cur = store->locks; cur != NULL; cur = cur->next) { - if (ne_uri_cmp(&cur->lock->uri, uri) == 0) { - return cur->lock; - } - } - - return NULL; -} - -void ne_lock_using_parent(ne_request *req, const char *path) -{ - struct lh_req_cookie *lrc = ne_get_request_private(req, HOOK_ID); - ne_uri u = {0}; - struct lock_list *item; - char *parent; - - if (lrc == NULL) - return; - - parent = ne_path_parent(path); - if (parent == NULL) - return; - - ne_fill_server_uri(ne_get_session(req), &u); - - for (item = lrc->store->locks; item != NULL; item = item->next) { - - /* Only care about locks which are on this server. */ - u.path = item->lock->uri.path; - if (ne_uri_cmp(&u, &item->lock->uri)) - continue; - - /* This lock is needed if it is an infinite depth lock which - * covers the parent, or a lock on the parent itself. */ - if ((item->lock->depth == NE_DEPTH_INFINITE && - ne_path_childof(item->lock->uri.path, parent)) || - ne_path_compare(item->lock->uri.path, parent) == 0) { - NE_DEBUG(NE_DBG_LOCKS, "Locked parent, %s on %s\n", - item->lock->token, item->lock->uri.path); - submit_lock(lrc, item->lock); - } - } - - u.path = parent; /* handy: makes u.path valid and ne_free(parent). */ - ne_uri_free(&u); -} - -void ne_lock_using_resource(ne_request *req, const char *uri, int depth) -{ - struct lh_req_cookie *lrc = ne_get_request_private(req, HOOK_ID); - struct lock_list *item; - int match; - - if (lrc == NULL) - return; - - /* Iterate over the list of stored locks to see if any of them - * apply to this resource */ - for (item = lrc->store->locks; item != NULL; item = item->next) { - - match = 0; - - if (depth == NE_DEPTH_INFINITE && - ne_path_childof(uri, item->lock->uri.path)) { - /* Case 1: this is a depth-infinity request which will - * modify a lock somewhere inside the collection. */ - NE_DEBUG(NE_DBG_LOCKS, "Has child: %s\n", item->lock->token); - match = 1; - } - else if (ne_path_compare(uri, item->lock->uri.path) == 0) { - /* Case 2: this request is directly on a locked resource */ - NE_DEBUG(NE_DBG_LOCKS, "Has direct lock: %s\n", item->lock->token); - match = 1; - } - else if (item->lock->depth == NE_DEPTH_INFINITE && - ne_path_childof(item->lock->uri.path, uri)) { - /* Case 3: there is a higher-up infinite-depth lock which - * covers the resource that this request will modify. */ - NE_DEBUG(NE_DBG_LOCKS, "Is child of: %s\n", item->lock->token); - match = 1; - } - - if (match) { - submit_lock(lrc, item->lock); - } - } - -} - -void ne_lockstore_add(ne_lock_store *store, struct ne_lock *lock) -{ - insert_lock(&store->locks, lock); -} - -void ne_lockstore_remove(ne_lock_store *store, struct ne_lock *lock) -{ - struct lock_list *item; - - /* Find the lock */ - for (item = store->locks; item != NULL; item = item->next) - if (item->lock == lock) - break; - - if (item->prev != NULL) { - item->prev->next = item->next; - } else { - store->locks = item->next; - } - if (item->next != NULL) { - item->next->prev = item->prev; - } - ne_free(item); -} - -struct ne_lock *ne_lock_copy(const struct ne_lock *lock) -{ - struct ne_lock *ret = ne_calloc(sizeof *ret); - - ne_uri_copy(&ret->uri, &lock->uri); - ret->token = ne_strdup(lock->token); - ret->depth = lock->depth; - ret->type = lock->type; - ret->scope = lock->scope; - if (lock->owner) ret->owner = ne_strdup(lock->owner); - ret->timeout = lock->timeout; - - return ret; -} - -struct ne_lock *ne_lock_create(void) -{ - struct ne_lock *lock = ne_calloc(sizeof *lock); - lock->depth = NE_DEPTH_ZERO; - lock->type = ne_locktype_write; - lock->scope = ne_lockscope_exclusive; - lock->timeout = NE_TIMEOUT_INVALID; - return lock; -} - -void ne_lock_free(struct ne_lock *lock) -{ - ne_uri_free(&lock->uri); - if (lock->owner) { - ne_free(lock->owner); - lock->owner = NULL; - } - if (lock->token) { - ne_free(lock->token); - lock->token = NULL; - } -} - -void ne_lock_destroy(struct ne_lock *lock) -{ - ne_lock_free(lock); - ne_free(lock); -} - -int ne_unlock(ne_session *sess, const struct ne_lock *lock) -{ - ne_request *req = ne_request_create(sess, "UNLOCK", lock->uri.path); - int ret; - - ne_print_request_header(req, "Lock-Token", "<%s>", lock->token); - - /* UNLOCK of a lock-null resource removes the resource from the - * parent collection; so an UNLOCK may modify the parent - * collection. (somewhat counter-intuitive, and not easily derived - * from 2518.) */ - ne_lock_using_parent(req, lock->uri.path); - - ret = ne_request_dispatch(req); - - if (ret == NE_OK && ne_get_status(req)->klass != 2) { - ret = NE_ERROR; - } - - ne_request_destroy(req); - - return ret; -} - -static int parse_depth(const char *depth) -{ - if (ne_strcasecmp(depth, "infinity") == 0) { - return NE_DEPTH_INFINITE; - } else if (isdigit(depth[0])) { - return atoi(depth); - } else { - return -1; - } -} - -static long parse_timeout(const char *timeout) -{ - if (ne_strcasecmp(timeout, "infinite") == 0) { - return NE_TIMEOUT_INFINITE; - } else if (strncasecmp(timeout, "Second-", 7) == 0) { - long to = strtol(timeout+7, NULL, 10); - if (to == LONG_MIN || to == LONG_MAX) - return NE_TIMEOUT_INVALID; - return to; - } else { - return NE_TIMEOUT_INVALID; - } -} - -static void discover_results(void *userdata, const ne_uri *uri, - const ne_prop_result_set *set) -{ - struct discover_ctx *ctx = userdata; - struct ne_lock *lock = ne_propset_private(set); - const ne_status *status = ne_propset_status(set, &lock_props[0]); - - /* Require at least that the lock has a token. */ - if (lock->token) { - if (status && status->klass != 2) { - ctx->results(ctx->userdata, NULL, uri, status); - } else { - ctx->results(ctx->userdata, lock, uri, NULL); - } - } - else if (status) { - ctx->results(ctx->userdata, NULL, uri, status); - } - - NE_DEBUG(NE_DBG_LOCKS, "End of response for %s\n", uri->path); -} - -static int -end_element_common(struct ne_lock *l, int state, const char *cdata) -{ - switch (state) { - case ELM_write: - l->type = ne_locktype_write; - break; - case ELM_exclusive: - l->scope = ne_lockscope_exclusive; - break; - case ELM_shared: - l->scope = ne_lockscope_shared; - break; - case ELM_depth: - NE_DEBUG(NE_DBG_LOCKS, "Got depth: %s\n", cdata); - l->depth = parse_depth(cdata); - if (l->depth == -1) { - return -1; - } - break; - case ELM_timeout: - NE_DEBUG(NE_DBG_LOCKS, "Got timeout: %s\n", cdata); - l->timeout = parse_timeout(cdata); - if (l->timeout == NE_TIMEOUT_INVALID) { - return -1; - } - break; - case ELM_owner: - l->owner = strdup(cdata); - break; - case ELM_href: - l->token = strdup(cdata); - break; - } - return 0; -} - -/* End-element handler for lock discovery PROPFIND response */ -static int end_element_ldisc(void *userdata, int state, - const char *nspace, const char *name) -{ - struct discover_ctx *ctx = userdata; - struct ne_lock *lock = ne_propfind_current_private(ctx->phandler); - - return end_element_common(lock, state, ctx->cdata->data); -} - -static inline int can_accept(int parent, int id) -{ - return (parent == NE_XML_STATEROOT && id == ELM_prop) || - (parent == ELM_prop && id == ELM_lockdiscovery) || - (parent == ELM_lockdiscovery && id == ELM_activelock) || - (parent == ELM_activelock && - (id == ELM_lockscope || id == ELM_locktype || - id == ELM_depth || id == ELM_owner || - id == ELM_timeout || id == ELM_locktoken)) || - (parent == ELM_lockscope && - (id == ELM_exclusive || id == ELM_shared)) || - (parent == ELM_locktype && id == ELM_write) || - (parent == ELM_locktoken && id == ELM_href); -} - -static int ld_startelm(void *userdata, int parent, - const char *nspace, const char *name, - const char **atts) -{ - struct discover_ctx *ctx = userdata; - int id = ne_xml_mapid(element_map, NE_XML_MAPLEN(element_map), - nspace, name); - - ne_buffer_clear(ctx->cdata); - - if (can_accept(parent, id)) - return id; - else - return NE_XML_DECLINE; -} - -#define MAX_CDATA (256) - -static int lk_cdata(void *userdata, int state, - const char *cdata, size_t len) -{ - struct lock_ctx *ctx = userdata; - - if (ctx->cdata->used + len < MAX_CDATA) - ne_buffer_append(ctx->cdata, cdata, len); - - return 0; -} - -static int ld_cdata(void *userdata, int state, - const char *cdata, size_t len) -{ - struct discover_ctx *ctx = userdata; - - if (ctx->cdata->used + len < MAX_CDATA) - ne_buffer_append(ctx->cdata, cdata, len); - - return 0; -} - -static int lk_startelm(void *userdata, int parent, - const char *nspace, const char *name, - const char **atts) -{ - struct lock_ctx *ctx = userdata; - int id; - - id = ne_xml_mapid(element_map, NE_XML_MAPLEN(element_map), nspace, name); - - NE_DEBUG(NE_DBG_LOCKS, "lk_startelm: %s => %d\n", name, id); - - if (id == 0) - return NE_XML_DECLINE; - - if (parent == 0 && ctx->token == NULL) { - const char *token = ne_get_response_header(ctx->req, "Lock-Token"); - /* at the root element; retrieve the Lock-Token header, - * and bail if it wasn't given. */ - if (token == NULL) { - ne_xml_set_error(ctx->parser, - _("LOCK response missing Lock-Token header")); - return NE_XML_ABORT; - } - - if (token[0] == '<') token++; - ctx->token = ne_strdup(token); - ne_shave(ctx->token, ">"); - NE_DEBUG(NE_DBG_LOCKS, "lk_startelm: Finding token %s\n", - ctx->token); - } - - /* TODO: only accept 'prop' as root for LOCK response */ - if (!can_accept(parent, id)) - return NE_XML_DECLINE; - - if (id == ELM_activelock && !ctx->found) { - /* a new activelock */ - ne_lock_free(&ctx->active); - memset(&ctx->active, 0, sizeof ctx->active); - ctx->active.timeout = NE_TIMEOUT_INVALID; - } - - ne_buffer_clear(ctx->cdata); - - return id; -} - -/* End-element handler for LOCK response */ -static int lk_endelm(void *userdata, int state, - const char *nspace, const char *name) -{ - struct lock_ctx *ctx = userdata; - - if (ctx->found) - return 0; - - if (end_element_common(&ctx->active, state, ctx->cdata->data)) - return -1; - - if (state == ELM_activelock) { - if (ctx->active.token && strcmp(ctx->active.token, ctx->token) == 0) { - ctx->found = 1; - } - } - - return 0; -} - -/* Creator callback for private structure. */ -static void *ld_create(void *userdata, const ne_uri *uri) -{ - struct ne_lock *lk = ne_lock_create(); - - ne_uri_copy(&lk->uri, uri); - - return lk; -} - -/* Destructor callback for private structure. */ -static void ld_destroy(void *userdata, void *private) -{ - struct ne_lock *lk = private; - - ne_lock_destroy(lk); -} - -/* Discover all locks on URI */ -int ne_lock_discover(ne_session *sess, const char *uri, - ne_lock_result callback, void *userdata) -{ - ne_propfind_handler *handler; - struct discover_ctx ctx = {0}; - int ret; - - ctx.results = callback; - ctx.userdata = userdata; - ctx.cdata = ne_buffer_create(); - ctx.phandler = handler = ne_propfind_create(sess, uri, NE_DEPTH_ZERO); - - ne_propfind_set_private(handler, ld_create, ld_destroy, &ctx); - - ne_xml_push_handler(ne_propfind_get_parser(handler), - ld_startelm, ld_cdata, end_element_ldisc, &ctx); - - ret = ne_propfind_named(handler, lock_props, discover_results, &ctx); - - ne_buffer_destroy(ctx.cdata); - ne_propfind_destroy(handler); - - return ret; -} - -static void add_timeout_header(ne_request *req, long timeout) -{ - if (timeout == NE_TIMEOUT_INFINITE) { - ne_add_request_header(req, "Timeout", "Infinite"); - } - else if (timeout != NE_TIMEOUT_INVALID && timeout > 0) { - ne_print_request_header(req, "Timeout", "Second-%ld", timeout); - } - /* just ignore it if timeout == 0 or invalid. */ -} - -int ne_lock(ne_session *sess, struct ne_lock *lock) -{ - ne_request *req = ne_request_create(sess, "LOCK", lock->uri.path); - ne_buffer *body = ne_buffer_create(); - ne_xml_parser *parser = ne_xml_create(); - int ret; - struct lock_ctx ctx; - - memset(&ctx, 0, sizeof ctx); - ctx.cdata = ne_buffer_create(); - ctx.req = req; - ctx.parser = parser; - - /* LOCK is not idempotent. */ - ne_set_request_flag(req, NE_REQFLAG_IDEMPOTENT, 0); - - ne_xml_push_handler(parser, lk_startelm, lk_cdata, lk_endelm, &ctx); - - /* Create the body */ - ne_buffer_concat(body, "\n" - "\n" " ", - lock->scope==ne_lockscope_exclusive? - "":"", - "\n" - "", NULL); - - if (lock->owner) { - ne_buffer_concat(body, "", lock->owner, "\n", NULL); - } - ne_buffer_czappend(body, "\n"); - - ne_set_request_body_buffer(req, body->data, ne_buffer_size(body)); - ne_add_request_header(req, "Content-Type", NE_XML_MEDIA_TYPE); - ne_add_depth_header(req, lock->depth); - add_timeout_header(req, lock->timeout); - - /* TODO: - * By 2518, we need this only if we are creating a lock-null resource. - * Since we don't KNOW whether the lock we're given is a lock-null - * or not, we cover our bases. - */ - ne_lock_using_parent(req, lock->uri.path); - /* This one is clearer from 2518 sec 8.10.4. */ - ne_lock_using_resource(req, lock->uri.path, lock->depth); - - ret = ne_xml_dispatch_request(req, parser); - - ne_buffer_destroy(body); - ne_buffer_destroy(ctx.cdata); - - if (ret == NE_OK && ne_get_status(req)->klass == 2) { - if (ne_get_status(req)->code == 207) { - ret = NE_ERROR; - /* TODO: set the error string appropriately */ - } else if (ctx.found) { - /* it worked: copy over real lock details if given. */ - if (lock->token) ne_free(lock->token); - lock->token = ctx.token; - ctx.token = NULL; - if (ctx.active.timeout != NE_TIMEOUT_INVALID) - lock->timeout = ctx.active.timeout; - lock->scope = ctx.active.scope; - lock->type = ctx.active.type; - if (ctx.active.depth >= 0) - lock->depth = ctx.active.depth; - if (ctx.active.owner) { - if (lock->owner) ne_free(lock->owner); - lock->owner = ctx.active.owner; - ctx.active.owner = NULL; - } - } else { - ret = NE_ERROR; - ne_set_error(sess, _("Response missing activelock for %s"), - ctx.token); - } - } else if (ret == NE_OK /* && status != 2xx */) { - ret = NE_ERROR; - } - - ne_lock_free(&ctx.active); - if (ctx.token) ne_free(ctx.token); - ne_request_destroy(req); - ne_xml_destroy(parser); - - return ret; -} - -int ne_lock_refresh(ne_session *sess, struct ne_lock *lock) -{ - ne_request *req = ne_request_create(sess, "LOCK", lock->uri.path); - ne_xml_parser *parser = ne_xml_create(); - int ret; - struct lock_ctx ctx; - - memset(&ctx, 0, sizeof ctx); - ctx.cdata = ne_buffer_create(); - ctx.req = req; - ctx.token = lock->token; - ctx.parser = parser; - - /* Handle the response and update *lock appropriately. */ - ne_xml_push_handler(parser, lk_startelm, lk_cdata, lk_endelm, &ctx); - - /* For a lock refresh, submitting only this lock token must be - * sufficient. */ - ne_print_request_header(req, "If", "(<%s>)", lock->token); - add_timeout_header(req, lock->timeout); - - ret = ne_xml_dispatch_request(req, parser); - - if (ret == NE_OK) { - if (ne_get_status(req)->klass != 2) { - ret = NE_ERROR; /* and use default session error */ - } else if (!ctx.found) { - ne_set_error(sess, _("No activelock for <%s> returned in " - "LOCK refresh response"), lock->token); - ret = NE_ERROR; - } else /* success! */ { - /* update timeout for passed-in lock structure. */ - lock->timeout = ctx.active.timeout; - } - } - - ne_lock_free(&ctx.active); - ne_buffer_destroy(ctx.cdata); - ne_request_destroy(req); - ne_xml_destroy(parser); - - return ret; -} diff --git a/client/neon-0.27.2/src/ne_locks.h b/client/neon-0.27.2/src/ne_locks.h deleted file mode 100644 index db98f1133..000000000 --- a/client/neon-0.27.2/src/ne_locks.h +++ /dev/null @@ -1,165 +0,0 @@ -/* - WebDAV Class 2 locking operations - Copyright (C) 1999-2006, Joe Orton - - 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 - -*/ - -#ifndef NE_LOCKS_H -#define NE_LOCKS_H - -#include "ne_request.h" /* for ne_session + ne_request */ -#include "ne_uri.h" /* for ne_uri */ - -NE_BEGIN_DECLS - -/* The scope of a lock */ -enum ne_lock_scope { - ne_lockscope_exclusive, - ne_lockscope_shared -}; - -/* Lock type. Only write locks are defined in RFC2518. */ -enum ne_lock_type { - ne_locktype_write -}; - -/* A lock object. */ -struct ne_lock { - ne_uri uri; - int depth; /* the depth of the lock (NE_DEPTH_*). */ - enum ne_lock_type type; - enum ne_lock_scope scope; - char *token; /* the lock token: uniquely identifies this lock. */ - char *owner; /* string describing the owner of the lock. */ - long timeout; /* timeout in seconds. (or NE_TIMEOUT_*) */ -}; -/* NB: struct ne_lock Would be typedef'ed to ne_lock except lock is - * a verb and a noun, so we already have ne_lock the function. Damn - * the English language. */ - -#define NE_TIMEOUT_INFINITE -1 -#define NE_TIMEOUT_INVALID -2 - -/* Create a depth zero, exclusive write lock, with default timeout - * (allowing a server to pick a default). token, owner and uri are - * unset. */ -struct ne_lock *ne_lock_create(void); - -/* HINT: to initialize uri host/port/scheme for the lock's URI, use - * ne_fill_server_uri from ne_session.h. */ - -/* Deep-copy a lock structure: strdup's any of path, token, owner, - * hostport which are set. */ -struct ne_lock *ne_lock_copy(const struct ne_lock *lock); - -/* Free a lock structure; free's any of any of the URI, token and - * owner which are set, but not the lock object itself. */ -void ne_lock_free(struct ne_lock *lock); - -/* Like ne_lock_free; but free's the lock object itself too. */ -void ne_lock_destroy(struct ne_lock *lock); - -/* ne_lock_store: an opaque type which is used to store a set of lock - * objects. */ -typedef struct ne_lock_store_s ne_lock_store; - -/* Create a lock store. */ -ne_lock_store *ne_lockstore_create(void); - -/* Register the lock store 'store' with the HTTP session 'sess': any - * operations made using 'sess' which operate on a locked resource, - * can use the locks from 'store' if needed. */ -void ne_lockstore_register(ne_lock_store *store, ne_session *sess); - -/* Destroy a lock store, free'ing any locks remaining inside. */ -void ne_lockstore_destroy(ne_lock_store *store); - -/* Add a lock to the store: the store then "owns" the lock object, and - * you must not free it. The lock MUST have all of: - * - a completed URI structure: scheme, host, port, and path all set - * - a valid lock token - * - a valid depth - */ -void ne_lockstore_add(ne_lock_store *store, struct ne_lock *lock); - -/* Remove given lock object from store: 'lock' MUST point to a lock - * object which is known to be in the store. */ -void ne_lockstore_remove(ne_lock_store *store, struct ne_lock *lock); - -/* Returns the first lock in the lock store, or NULL if the store is - * empty. */ -struct ne_lock *ne_lockstore_first(ne_lock_store *store); - -/* After ne_lockstore_first has been called; returns the next lock in - * the lock store, or NULL if there are no more locks stored. - * Behaviour is undefined if ne_lockstore_first has not been called on - * 'store' since the store was created, or the last time this function - * returned NULL for the store.. */ -struct ne_lock *ne_lockstore_next(ne_lock_store *store); - -/* Find a lock in the store for the given server, and with the given - * path. */ -struct ne_lock *ne_lockstore_findbyuri(ne_lock_store *store, - const ne_uri *uri); - -/* Issue a LOCK request for the given lock. Requires that the uri, - * depth, type, scope, and timeout members of 'lock' are filled in. - * owner and token must be malloc-allocated if not NULL; and may be - * free()d by this function. On successful return, lock->token will - * contain the lock token. */ -int ne_lock(ne_session *sess, struct ne_lock *lock); - -/* Issue an UNLOCK request for the given lock */ -int ne_unlock(ne_session *sess, const struct ne_lock *lock); - -/* Refresh a lock. Updates lock->timeout appropriately. */ -int ne_lock_refresh(ne_session *sess, struct ne_lock *lock); - -/* Callback for lock discovery. If 'lock' is NULL, something went - * wrong performing lockdiscovery for the resource, look at 'status' - * for the details. - * - * If lock is non-NULL, at least lock->uri and lock->token will be - * filled in; and status will be NULL. */ -typedef void (*ne_lock_result)(void *userdata, const struct ne_lock *lock, - const ne_uri *uri, const ne_status *status); - -/* Perform lock discovery on the given path. 'result' is called with - * the results (possibly >1 times). */ -int ne_lock_discover(ne_session *sess, const char *path, - ne_lock_result result, void *userdata); - -/* The ne_lock_using_* functions should be used before dispatching a - * request which modify resources. If a lock store has been - * registered with the session associated with the request, and locks - * are present in the lock store which cover the resources which are - * being modified by the request, then the appropriate lock tokens are - * submitted in the request headers. */ - -/* Indicate that request 'req' will modify the resource at 'path', and - * is an operation of given 'depth'. */ -void ne_lock_using_resource(ne_request *req, const char *path, int depth); - -/* Indicate that request 'req' will modify the parent collection of - * the resource found at 'path' (for instance when removing the - * resource from the collection). */ -void ne_lock_using_parent(ne_request *req, const char *path); - -NE_END_DECLS - -#endif /* NE_LOCKS_H */ diff --git a/client/neon-0.27.2/src/ne_md5.c b/client/neon-0.27.2/src/ne_md5.c deleted file mode 100644 index 42877afb1..000000000 --- a/client/neon-0.27.2/src/ne_md5.c +++ /dev/null @@ -1,472 +0,0 @@ -/* md5.c - Functions to compute MD5 message digest of files or memory blocks - according to the definition of MD5 in RFC 1321 from April 1992. - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C 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. - - The GNU C 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 the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -/* Written by Ulrich Drepper , 1995. */ - -#include "config.h" - -#include - -#include -#include -#ifdef HAVE_LIMITS_H -# include -#endif - -#include "ne_md5.h" -#include "ne_string.h" /* for NE_ASC2HEX */ - -#define md5_process_block ne_md5_process_block -#define md5_process_bytes ne_md5_process_bytes -#define md5_finish_ctx ne_md5_finish_ctx -#define md5_read_ctx ne_md5_read_ctx -#define md5_stream ne_md5_stream -#define md5_ctx ne_md5_ctx - -#ifdef WORDS_BIGENDIAN -# define SWAP(n) \ - (((n) << 24) | (((n) & 0xff00) << 8) | (((n) >> 8) & 0xff00) | ((n) >> 24)) -#else -# define SWAP(n) (n) -#endif - -#if SIZEOF_INT == 4 -typedef unsigned int md5_uint32; -#elif SIZEOF_LONG == 4 -typedef unsigned long md5_uint32; -#else -# error "Cannot determine unsigned 32-bit data type." -#endif - -/* Structure to save state of computation between the single steps. */ -struct md5_ctx -{ - md5_uint32 A; - md5_uint32 B; - md5_uint32 C; - md5_uint32 D; - - md5_uint32 total[2]; - md5_uint32 buflen; - char buffer[128]; -}; - -/* This array contains the bytes used to pad the buffer to the next - 64-byte boundary. (RFC 1321, 3.1: Step 1) */ -static const unsigned char fillbuf[64] = { 0x80, 0 /* , 0, 0, ... */ }; - - -/* Initialize structure containing state of computation. - (RFC 1321, 3.3: Step 3) */ -static void -md5_init_ctx (struct md5_ctx *ctx) -{ - ctx->A = 0x67452301; - ctx->B = 0xefcdab89; - ctx->C = 0x98badcfe; - ctx->D = 0x10325476; - - ctx->total[0] = ctx->total[1] = 0; - ctx->buflen = 0; -} - -struct ne_md5_ctx * -ne_md5_create_ctx(void) -{ - struct md5_ctx *ctx = ne_malloc(sizeof *ctx); - md5_init_ctx(ctx); - return ctx; -} - -extern void -ne_md5_reset_ctx(struct ne_md5_ctx *ctx) -{ - md5_init_ctx(ctx); -} - -struct ne_md5_ctx * -ne_md5_dup_ctx(struct ne_md5_ctx *ctx) -{ - return memcpy(ne_malloc(sizeof *ctx), ctx, sizeof *ctx); -} - -void -ne_md5_destroy_ctx(struct ne_md5_ctx *ctx) -{ - ne_free(ctx); -} - -/* Put result from CTX in first 16 bytes following RESBUF. The result - must be in little endian byte order. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -void * -md5_read_ctx (ctx, resbuf) - const struct md5_ctx *ctx; - void *resbuf; -{ - ((md5_uint32 *) resbuf)[0] = SWAP (ctx->A); - ((md5_uint32 *) resbuf)[1] = SWAP (ctx->B); - ((md5_uint32 *) resbuf)[2] = SWAP (ctx->C); - ((md5_uint32 *) resbuf)[3] = SWAP (ctx->D); - - return resbuf; -} - -/* Process the remaining bytes in the internal buffer and the usual - prolog according to the standard and write the result to RESBUF. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -void * -md5_finish_ctx (ctx, resbuf) - struct md5_ctx *ctx; - void *resbuf; -{ - /* Take yet unprocessed bytes into account. */ - md5_uint32 bytes = ctx->buflen; - size_t pad; - - /* Now count remaining bytes. */ - ctx->total[0] += bytes; - if (ctx->total[0] < bytes) - ++ctx->total[1]; - - pad = bytes >= 56 ? 64 + 56 - bytes : 56 - bytes; - memcpy (&ctx->buffer[bytes], fillbuf, pad); - - /* Put the 64-bit file length in *bits* at the end of the buffer. */ - *(md5_uint32 *) &ctx->buffer[bytes + pad] = SWAP (ctx->total[0] << 3); - *(md5_uint32 *) &ctx->buffer[bytes + pad + 4] = SWAP ((ctx->total[1] << 3) | - (ctx->total[0] >> 29)); - - /* Process last bytes. */ - md5_process_block (ctx->buffer, bytes + pad + 8, ctx); - - return md5_read_ctx (ctx, resbuf); -} - -/* Compute MD5 message digest for bytes read from STREAM. The - resulting message digest number will be written into the 16 bytes - beginning at RESBLOCK. */ -int -md5_stream (stream, resblock) - FILE *stream; - void *resblock; -{ - /* Important: BLOCKSIZE must be a multiple of 64. */ -#define BLOCKSIZE 4096 - struct md5_ctx ctx; - char buffer[BLOCKSIZE + 72]; - size_t sum; - - /* Initialize the computation context. */ - md5_init_ctx (&ctx); - - /* Iterate over full file contents. */ - while (1) - { - /* We read the file in blocks of BLOCKSIZE bytes. One call of the - computation function processes the whole buffer so that with the - next round of the loop another block can be read. */ - size_t n; - sum = 0; - - /* Read block. Take care for partial reads. */ - do - { - n = fread (buffer + sum, 1, BLOCKSIZE - sum, stream); - - sum += n; - } - while (sum < BLOCKSIZE && n != 0); - if (n == 0 && ferror (stream)) - return 1; - - /* If end of file is reached, end the loop. */ - if (n == 0) - break; - - /* Process buffer with BLOCKSIZE bytes. Note that - BLOCKSIZE % 64 == 0 - */ - md5_process_block (buffer, BLOCKSIZE, &ctx); - } - - /* Add the last bytes if necessary. */ - if (sum > 0) - md5_process_bytes (buffer, sum, &ctx); - - /* Construct result in desired memory. */ - md5_finish_ctx (&ctx, resblock); - return 0; -} - -void -md5_process_bytes (buffer, len, ctx) - const void *buffer; - size_t len; - struct md5_ctx *ctx; -{ - /* When we already have some bits in our internal buffer concatenate - both inputs first. */ - if (ctx->buflen != 0) - { - size_t left_over = ctx->buflen; - size_t add = 128 - left_over > len ? len : 128 - left_over; - - memcpy (&ctx->buffer[left_over], buffer, add); - ctx->buflen += add; - - if (left_over + add > 64) - { - md5_process_block (ctx->buffer, (left_over + add) & ~63, ctx); - /* The regions in the following copy operation cannot overlap. */ - memcpy (ctx->buffer, &ctx->buffer[(left_over + add) & ~63], - (left_over + add) & 63); - ctx->buflen = (left_over + add) & 63; - } - - buffer = (const char *) buffer + add; - len -= add; - } - - /* Process available complete blocks. */ - if (len > 64) - { - md5_process_block (buffer, len & ~63, ctx); - buffer = (const char *) buffer + (len & ~63); - len &= 63; - } - - /* Move remaining bytes in internal buffer. */ - if (len > 0) - { - memcpy (ctx->buffer, buffer, len); - ctx->buflen = len; - } -} - - -/* These are the four functions used in the four steps of the MD5 algorithm - and defined in the RFC 1321. The first function is a little bit optimized - (as found in Colin Plumbs public domain implementation). */ -/* #define FF(b, c, d) ((b & c) | (~b & d)) */ -#define FF(b, c, d) (d ^ (b & (c ^ d))) -#define FG(b, c, d) FF (d, b, c) -#define FH(b, c, d) (b ^ c ^ d) -#define FI(b, c, d) (c ^ (b | ~d)) - -/* Process LEN bytes of BUFFER, accumulating context into CTX. - It is assumed that LEN % 64 == 0. */ - -void -md5_process_block (buffer, len, ctx) - const void *buffer; - size_t len; - struct md5_ctx *ctx; -{ - md5_uint32 correct_words[16]; - const unsigned char *words = buffer; - const unsigned char *endp = words + len; - md5_uint32 A = ctx->A; - md5_uint32 B = ctx->B; - md5_uint32 C = ctx->C; - md5_uint32 D = ctx->D; - - /* First increment the byte count. RFC 1321 specifies the possible - length of the file up to 2^64 bits. Here we only compute the - number of bytes. Do a double word increment. */ - ctx->total[0] += len; - if (ctx->total[0] < len) - ++ctx->total[1]; - - /* Process all bytes in the buffer with 64 bytes in each round of - the loop. */ - while (words < endp) - { - md5_uint32 *cwp = correct_words; - md5_uint32 A_save = A; - md5_uint32 B_save = B; - md5_uint32 C_save = C; - md5_uint32 D_save = D; - - /* First round: using the given function, the context and a constant - the next context is computed. Because the algorithms processing - unit is a 32-bit word and it is determined to work on words in - little endian byte order we perhaps have to change the byte order - before the computation. To reduce the work for the next steps - we store the swapped words in the array CORRECT_WORDS. */ - -#define OP(a, b, c, d, s, T) \ - do \ - { \ - md5_uint32 WORD_ = (md5_uint32)words[0] | ((md5_uint32)words[1] << 8) \ - | ((md5_uint32)words[2] << 16) | ((md5_uint32)words[3] << 24); \ - a += FF (b, c, d) + (*cwp++ = WORD_) + T; \ - words += 4; \ - CYCLIC (a, s); \ - a += b; \ - } \ - while (0) - - /* It is unfortunate that C does not provide an operator for - cyclic rotation. Hope the C compiler is smart enough. */ -#define CYCLIC(w, s) (w = (w << s) | (w >> (32 - s))) - - /* Before we start, one word to the strange constants. - They are defined in RFC 1321 as - - T[i] = (int) (4294967296.0 * fabs (sin (i))), i=1..64 - */ - - /* Round 1. */ - OP (A, B, C, D, 7, 0xd76aa478); - OP (D, A, B, C, 12, 0xe8c7b756); - OP (C, D, A, B, 17, 0x242070db); - OP (B, C, D, A, 22, 0xc1bdceee); - OP (A, B, C, D, 7, 0xf57c0faf); - OP (D, A, B, C, 12, 0x4787c62a); - OP (C, D, A, B, 17, 0xa8304613); - OP (B, C, D, A, 22, 0xfd469501); - OP (A, B, C, D, 7, 0x698098d8); - OP (D, A, B, C, 12, 0x8b44f7af); - OP (C, D, A, B, 17, 0xffff5bb1); - OP (B, C, D, A, 22, 0x895cd7be); - OP (A, B, C, D, 7, 0x6b901122); - OP (D, A, B, C, 12, 0xfd987193); - OP (C, D, A, B, 17, 0xa679438e); - OP (B, C, D, A, 22, 0x49b40821); - - /* For the second to fourth round we have the possibly swapped words - in CORRECT_WORDS. Redefine the macro to take an additional first - argument specifying the function to use. */ -#undef OP -#define OP(f, a, b, c, d, k, s, T) \ - do \ - { \ - a += f (b, c, d) + correct_words[k] + T; \ - CYCLIC (a, s); \ - a += b; \ - } \ - while (0) - - /* Round 2. */ - OP (FG, A, B, C, D, 1, 5, 0xf61e2562); - OP (FG, D, A, B, C, 6, 9, 0xc040b340); - OP (FG, C, D, A, B, 11, 14, 0x265e5a51); - OP (FG, B, C, D, A, 0, 20, 0xe9b6c7aa); - OP (FG, A, B, C, D, 5, 5, 0xd62f105d); - OP (FG, D, A, B, C, 10, 9, 0x02441453); - OP (FG, C, D, A, B, 15, 14, 0xd8a1e681); - OP (FG, B, C, D, A, 4, 20, 0xe7d3fbc8); - OP (FG, A, B, C, D, 9, 5, 0x21e1cde6); - OP (FG, D, A, B, C, 14, 9, 0xc33707d6); - OP (FG, C, D, A, B, 3, 14, 0xf4d50d87); - OP (FG, B, C, D, A, 8, 20, 0x455a14ed); - OP (FG, A, B, C, D, 13, 5, 0xa9e3e905); - OP (FG, D, A, B, C, 2, 9, 0xfcefa3f8); - OP (FG, C, D, A, B, 7, 14, 0x676f02d9); - OP (FG, B, C, D, A, 12, 20, 0x8d2a4c8a); - - /* Round 3. */ - OP (FH, A, B, C, D, 5, 4, 0xfffa3942); - OP (FH, D, A, B, C, 8, 11, 0x8771f681); - OP (FH, C, D, A, B, 11, 16, 0x6d9d6122); - OP (FH, B, C, D, A, 14, 23, 0xfde5380c); - OP (FH, A, B, C, D, 1, 4, 0xa4beea44); - OP (FH, D, A, B, C, 4, 11, 0x4bdecfa9); - OP (FH, C, D, A, B, 7, 16, 0xf6bb4b60); - OP (FH, B, C, D, A, 10, 23, 0xbebfbc70); - OP (FH, A, B, C, D, 13, 4, 0x289b7ec6); - OP (FH, D, A, B, C, 0, 11, 0xeaa127fa); - OP (FH, C, D, A, B, 3, 16, 0xd4ef3085); - OP (FH, B, C, D, A, 6, 23, 0x04881d05); - OP (FH, A, B, C, D, 9, 4, 0xd9d4d039); - OP (FH, D, A, B, C, 12, 11, 0xe6db99e5); - OP (FH, C, D, A, B, 15, 16, 0x1fa27cf8); - OP (FH, B, C, D, A, 2, 23, 0xc4ac5665); - - /* Round 4. */ - OP (FI, A, B, C, D, 0, 6, 0xf4292244); - OP (FI, D, A, B, C, 7, 10, 0x432aff97); - OP (FI, C, D, A, B, 14, 15, 0xab9423a7); - OP (FI, B, C, D, A, 5, 21, 0xfc93a039); - OP (FI, A, B, C, D, 12, 6, 0x655b59c3); - OP (FI, D, A, B, C, 3, 10, 0x8f0ccc92); - OP (FI, C, D, A, B, 10, 15, 0xffeff47d); - OP (FI, B, C, D, A, 1, 21, 0x85845dd1); - OP (FI, A, B, C, D, 8, 6, 0x6fa87e4f); - OP (FI, D, A, B, C, 15, 10, 0xfe2ce6e0); - OP (FI, C, D, A, B, 6, 15, 0xa3014314); - OP (FI, B, C, D, A, 13, 21, 0x4e0811a1); - OP (FI, A, B, C, D, 4, 6, 0xf7537e82); - OP (FI, D, A, B, C, 11, 10, 0xbd3af235); - OP (FI, C, D, A, B, 2, 15, 0x2ad7d2bb); - OP (FI, B, C, D, A, 9, 21, 0xeb86d391); - - /* Add the starting values of the context. */ - A += A_save; - B += B_save; - C += C_save; - D += D_save; - } - - /* Put checksum in context given as argument. */ - ctx->A = A; - ctx->B = B; - ctx->C = C; - ctx->D = D; -} - -/* Writes the ASCII representation of the MD5 digest into the - * given buffer, which must be at least 33 characters long. */ -void ne_md5_to_ascii(const unsigned char md5_buf[16], char *buffer) -{ - int count; - for (count = 0; count<16; count++) { - buffer[count*2] = NE_HEX2ASC(md5_buf[count] >> 4); - buffer[count*2+1] = NE_HEX2ASC(md5_buf[count] & 0x0f); - } - buffer[32] = '\0'; -} - -/* Reads the ASCII representation of an MD5 digest. The buffer must - * be at least 32 characters long. */ -void ne_ascii_to_md5(const char *buffer, unsigned char md5_buf[16]) -{ - int count; - for (count = 0; count<16; count++) { - md5_buf[count] = ((NE_ASC2HEX(buffer[count*2])) << 4) | - NE_ASC2HEX(buffer[count*2+1]); - } -} - -char *ne_md5_finish_ascii(struct ne_md5_ctx *ctx, char buffer[33]) -{ - md5_uint32 result[4]; - - ne_md5_finish_ctx(ctx, (void *)result); - ne_md5_to_ascii((void *)result, buffer); - - return buffer; -} - diff --git a/client/neon-0.27.2/src/ne_md5.h b/client/neon-0.27.2/src/ne_md5.h deleted file mode 100644 index 9a625bc65..000000000 --- a/client/neon-0.27.2/src/ne_md5.h +++ /dev/null @@ -1,98 +0,0 @@ -/* Declaration of functions and data types used for MD5 sum computing - library functions. - Copyright (C) 2006, Joe Orton - Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - The GNU C 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. - - The GNU C 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 the GNU C Library; see the file COPYING.LIB. If not, - write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, - Boston, MA 02111-1307, USA. */ - -#ifndef NE_MD5_H -#define NE_MD5_H 1 - -#include - -#include "ne_defs.h" - -NE_BEGIN_DECLS - -/* - * The following three functions are build up the low level used in - * the functions `md5_stream' and `md5_buffer'. - */ -struct ne_md5_ctx; - -/* Create structure containing state of computation. */ -extern struct ne_md5_ctx *ne_md5_create_ctx(void); - -/* Starting with the result of former calls of this function (or the - initialization function update the context for the next LEN bytes - starting at BUFFER. - It is necessary that LEN is a multiple of 64!!! */ -extern void ne_md5_process_block(const void *buffer, size_t len, - struct ne_md5_ctx *ctx); - -/* Starting with the result of former calls of this function (or the - initialization function update the context for the next LEN bytes - starting at BUFFER. - It is NOT required that LEN is a multiple of 64. */ -extern void ne_md5_process_bytes(const void *buffer, size_t len, - struct ne_md5_ctx *ctx); - -/* Process the remaining bytes in the buffer and put result from CTX - in first 16 bytes following RESBUF. The result is always in little - endian byte order, so that a byte-wise output yields to the wanted - ASCII representation of the message digest. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -extern void *ne_md5_finish_ctx(struct ne_md5_ctx *ctx, void *resbuf); - - -/* Put result from CTX in first 16 bytes following RESBUF. The result is - always in little endian byte order, so that a byte-wise output yields - to the wanted ASCII representation of the message digest. - - IMPORTANT: On some systems it is required that RESBUF is correctly - aligned for a 32 bits value. */ -extern void *ne_md5_read_ctx(const struct ne_md5_ctx *ctx, void *resbuf); - -/* Take a copy of the state structure. */ -extern struct ne_md5_ctx *ne_md5_dup_ctx(struct ne_md5_ctx *ctx); - -/* Re-initialize the context structure. */ -extern void ne_md5_reset_ctx(struct ne_md5_ctx *ctx); - -/* Destroy the context structure. */ -extern void ne_md5_destroy_ctx(struct ne_md5_ctx *ctx); - -/* Compute MD5 message digest for bytes read from STREAM. The - resulting message digest number will be written into the 16 bytes - beginning at RESBLOCK. */ -extern int ne_md5_stream(FILE *stream, void *resblock); - -/* Process the remaining bytes in the buffer and put ASCII - representation of the resulting message digest from CTX in the - first 33 bytes of BUFFER, including a trailing NUL terminator - byte. Returns pointer to buffer. */ -char *ne_md5_finish_ascii(struct ne_md5_ctx *ctx, char buffer[33]); - -/* MD5 ascii->binary conversion */ -void ne_md5_to_ascii(const unsigned char md5_buf[16], char *buffer); -void ne_ascii_to_md5(const char *buffer, unsigned char md5_buf[16]); - -NE_END_DECLS - -#endif /* NE_MD5_H */ diff --git a/client/neon-0.27.2/src/ne_openssl.c b/client/neon-0.27.2/src/ne_openssl.c deleted file mode 100644 index 66b89f54c..000000000 --- a/client/neon-0.27.2/src/ne_openssl.c +++ /dev/null @@ -1,1105 +0,0 @@ -/* - neon SSL/TLS support using OpenSSL - Copyright (C) 2002-2007, Joe Orton - Portions are: - Copyright (C) 1999-2000 Tommi Komulainen - - 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 - -*/ - -#include "config.h" - -#include - -#ifdef HAVE_STRING_H -#include -#endif - -#include - -#include -#include -#include -#include -#include - -#ifdef NE_HAVE_TS_SSL -#include /* for abort() */ -#include -#endif - -#include "ne_ssl.h" -#include "ne_string.h" -#include "ne_session.h" -#include "ne_internal.h" - -#include "ne_private.h" -#include "ne_privssl.h" - -/* OpenSSL 0.9.6 compatibility */ -#if OPENSSL_VERSION_NUMBER < 0x0090700fL -#define PKCS12_unpack_authsafes M_PKCS12_unpack_authsafes -#define PKCS12_unpack_p7data M_PKCS12_unpack_p7data -/* cast away lack of const-ness */ -#define OBJ_cmp(a,b) OBJ_cmp((ASN1_OBJECT *)(a), (ASN1_OBJECT *)(b)) -#endif - -/* Second argument for d2i_X509() changed type in 0.9.8. */ -#if OPENSSL_VERSION_NUMBER < 0x0090800fL -typedef unsigned char ne_d2i_uchar; -#else -typedef const unsigned char ne_d2i_uchar; -#endif - -struct ne_ssl_dname_s { - X509_NAME *dn; -}; - -struct ne_ssl_certificate_s { - ne_ssl_dname subj_dn, issuer_dn; - X509 *subject; - ne_ssl_certificate *issuer; - char *identity; -}; - -struct ne_ssl_client_cert_s { - PKCS12 *p12; - int decrypted; /* non-zero if successfully decrypted. */ - ne_ssl_certificate cert; - EVP_PKEY *pkey; - char *friendly_name; -}; - -/* Append an ASN.1 DirectoryString STR to buffer BUF as UTF-8. - * Returns zero on success or non-zero on error. */ -static int append_dirstring(ne_buffer *buf, ASN1_STRING *str) -{ - unsigned char *tmp = (unsigned char *)""; /* initialize to workaround 0.9.6 bug */ - int len; - - switch (str->type) { - case V_ASN1_UTF8STRING: - case V_ASN1_IA5STRING: /* definitely ASCII */ - case V_ASN1_VISIBLESTRING: /* probably ASCII */ - case V_ASN1_PRINTABLESTRING: /* subset of ASCII */ - ne_buffer_append(buf, (char *)str->data, str->length); - break; - case V_ASN1_UNIVERSALSTRING: - case V_ASN1_T61STRING: /* let OpenSSL convert it as ISO-8859-1 */ - case V_ASN1_BMPSTRING: - len = ASN1_STRING_to_UTF8(&tmp, str); - if (len > 0) { - ne_buffer_append(buf, (char *)tmp, len); - OPENSSL_free(tmp); - break; - } else { - ERR_clear_error(); - return -1; - } - break; - default: - NE_DEBUG(NE_DBG_SSL, "Could not convert DirectoryString type %d\n", - str->type); - return -1; - } - return 0; -} - -/* Returns a malloc-allocate version of IA5 string AS. Really only - * here to prevent char * vs unsigned char * type mismatches without - * losing all hope at type-safety. */ -static char *dup_ia5string(const ASN1_IA5STRING *as) -{ - unsigned char *data = as->data; - return ne_strndup((char *)data, as->length); -} - -char *ne_ssl_readable_dname(const ne_ssl_dname *name) -{ - int n, flag = 0; - ne_buffer *dump = ne_buffer_create(); - const ASN1_OBJECT * const cname = OBJ_nid2obj(NID_commonName), - * const email = OBJ_nid2obj(NID_pkcs9_emailAddress); - - for (n = X509_NAME_entry_count(name->dn); n > 0; n--) { - X509_NAME_ENTRY *ent = X509_NAME_get_entry(name->dn, n-1); - - /* Skip commonName or emailAddress except if there is no other - * attribute in dname. */ - if ((OBJ_cmp(ent->object, cname) && OBJ_cmp(ent->object, email)) || - (!flag && n == 1)) { - if (flag++) - ne_buffer_append(dump, ", ", 2); - - if (append_dirstring(dump, ent->value)) - ne_buffer_czappend(dump, "???"); - } - } - - return ne_buffer_finish(dump); -} - -int ne_ssl_dname_cmp(const ne_ssl_dname *dn1, const ne_ssl_dname *dn2) -{ - return X509_NAME_cmp(dn1->dn, dn2->dn); -} - -void ne_ssl_clicert_free(ne_ssl_client_cert *cc) -{ - if (cc->p12) - PKCS12_free(cc->p12); - if (cc->decrypted) { - if (cc->cert.identity) ne_free(cc->cert.identity); - EVP_PKEY_free(cc->pkey); - X509_free(cc->cert.subject); - } - if (cc->friendly_name) ne_free(cc->friendly_name); - ne_free(cc); -} - -/* Format an ASN1 time to a string. 'buf' must be at least of size - * 'NE_SSL_VDATELEN'. */ -static time_t asn1time_to_timet(const ASN1_TIME *atm) -{ - struct tm tm = {0}; - int i = atm->length; - - if (i < 10) - return (time_t )-1; - - tm.tm_year = (atm->data[0]-'0') * 10 + (atm->data[1]-'0'); - - /* Deal with Year 2000 */ - if (tm.tm_year < 70) - tm.tm_year += 100; - - tm.tm_mon = (atm->data[2]-'0') * 10 + (atm->data[3]-'0') - 1; - tm.tm_mday = (atm->data[4]-'0') * 10 + (atm->data[5]-'0'); - tm.tm_hour = (atm->data[6]-'0') * 10 + (atm->data[7]-'0'); - tm.tm_min = (atm->data[8]-'0') * 10 + (atm->data[9]-'0'); - tm.tm_sec = (atm->data[10]-'0') * 10 + (atm->data[11]-'0'); - -#ifdef HAVE_TIMEZONE - /* ANSI C time handling is... interesting. */ - return mktime(&tm) - timezone; -#else - return mktime(&tm); -#endif -} - -void ne_ssl_cert_validity_time(const ne_ssl_certificate *cert, - time_t *from, time_t *until) -{ - if (from) { - *from = asn1time_to_timet(X509_get_notBefore(cert->subject)); - } - if (until) { - *until = asn1time_to_timet(X509_get_notAfter(cert->subject)); - } -} - -/* Return non-zero if hostname from certificate (cn) matches hostname - * used for session (hostname). Doesn't implement complete RFC 2818 - * logic; omits "f*.example.com" support for simplicity. */ -static int match_hostname(char *cn, const char *hostname) -{ - const char *dot; - - dot = strchr(hostname, '.'); - if (dot == NULL) { - char *pnt = strchr(cn, '.'); - /* hostname is not fully-qualified; unqualify the cn. */ - if (pnt != NULL) { - *pnt = '\0'; - } - } - else if (strncmp(cn, "*.", 2) == 0) { - hostname = dot + 1; - cn += 2; - } - - return !ne_strcasecmp(cn, hostname); -} - -/* Check certificate identity. Returns zero if identity matches; 1 if - * identity does not match, or <0 if the certificate had no identity. - * If 'identity' is non-NULL, store the malloc-allocated identity in - * *identity. Logic specified by RFC 2818 and RFC 3280. */ -static int check_identity(const ne_uri *server, X509 *cert, char **identity) -{ - STACK_OF(GENERAL_NAME) *names; - int match = 0, found = 0; - const char *hostname; - - hostname = server ? server->host : ""; - - names = X509_get_ext_d2i(cert, NID_subject_alt_name, NULL, NULL); - if (names) { - int n; - - /* subjectAltName contains a sequence of GeneralNames */ - for (n = 0; n < sk_GENERAL_NAME_num(names) && !match; n++) { - GENERAL_NAME *nm = sk_GENERAL_NAME_value(names, n); - - /* handle dNSName and iPAddress name extensions only. */ - if (nm->type == GEN_DNS) { - char *name = dup_ia5string(nm->d.ia5); - if (identity && !found) *identity = ne_strdup(name); - match = match_hostname(name, hostname); - ne_free(name); - found = 1; - } - else if (nm->type == GEN_IPADD) { - /* compare IP address with server IP address. */ - ne_inet_addr *ia; - if (nm->d.ip->length == 4) - ia = ne_iaddr_make(ne_iaddr_ipv4, nm->d.ip->data); - else if (nm->d.ip->length == 16) - ia = ne_iaddr_make(ne_iaddr_ipv6, nm->d.ip->data); - else - ia = NULL; - /* ne_iaddr_make returns NULL if address type is unsupported */ - if (ia != NULL) { /* address type was supported. */ - char buf[128]; - - match = strcmp(hostname, - ne_iaddr_print(ia, buf, sizeof buf)) == 0; - found = 1; - ne_iaddr_free(ia); - } else { - NE_DEBUG(NE_DBG_SSL, "iPAddress name with unsupported " - "address type (length %d), skipped.\n", - nm->d.ip->length); - } - } - else if (nm->type == GEN_URI) { - char *name = dup_ia5string(nm->d.ia5); - ne_uri uri; - - if (ne_uri_parse(name, &uri) == 0 && uri.host && uri.scheme) { - ne_uri tmp; - - if (identity && !found) *identity = ne_strdup(name); - found = 1; - - if (server) { - /* For comparison purposes, all that matters is - * host, scheme and port; ignore the rest. */ - memset(&tmp, 0, sizeof tmp); - tmp.host = uri.host; - tmp.scheme = uri.scheme; - tmp.port = uri.port; - - match = ne_uri_cmp(server, &tmp) == 0; - } - } - - ne_uri_free(&uri); - ne_free(name); - } - } - /* free the whole stack. */ - sk_GENERAL_NAME_pop_free(names, GENERAL_NAME_free); - } - - /* Check against the commonName if no DNS alt. names were found, - * as per RFC3280. */ - if (!found) { - X509_NAME *subj = X509_get_subject_name(cert); - X509_NAME_ENTRY *entry; - ne_buffer *cname = ne_buffer_ncreate(30); - int idx = -1, lastidx; - - /* find the most specific commonName attribute. */ - do { - lastidx = idx; - idx = X509_NAME_get_index_by_NID(subj, NID_commonName, lastidx); - } while (idx >= 0); - - if (lastidx < 0) { - /* no commonName attributes at all. */ - ne_buffer_destroy(cname); - return -1; - } - - /* extract the string from the entry */ - entry = X509_NAME_get_entry(subj, lastidx); - if (append_dirstring(cname, X509_NAME_ENTRY_get_data(entry))) { - ne_buffer_destroy(cname); - return -1; - } - if (identity) *identity = ne_strdup(cname->data); - match = match_hostname(cname->data, hostname); - ne_buffer_destroy(cname); - } - - NE_DEBUG(NE_DBG_SSL, "Identity match for '%s': %s\n", hostname, - match ? "good" : "bad"); - return match ? 0 : 1; -} - -/* Populate an ne_ssl_certificate structure from an X509 object. */ -static ne_ssl_certificate *populate_cert(ne_ssl_certificate *cert, X509 *x5) -{ - cert->subj_dn.dn = X509_get_subject_name(x5); - cert->issuer_dn.dn = X509_get_issuer_name(x5); - cert->issuer = NULL; - cert->subject = x5; - /* Retrieve the cert identity; pass a dummy hostname to match. */ - cert->identity = NULL; - check_identity(NULL, x5, &cert->identity); - return cert; -} - -/* Return a linked list of certificate objects from an OpenSSL chain. */ -static ne_ssl_certificate *make_chain(STACK_OF(X509) *chain) -{ - int n, count = sk_X509_num(chain); - ne_ssl_certificate *top = NULL, *current = NULL; - - NE_DEBUG(NE_DBG_SSL, "Chain depth: %d\n", count); - - for (n = 0; n < count; n++) { - ne_ssl_certificate *cert = ne_malloc(sizeof *cert); - populate_cert(cert, X509_dup(sk_X509_value(chain, n))); -#ifdef NE_DEBUGGING - if (ne_debug_mask & NE_DBG_SSL) { - fprintf(ne_debug_stream, "Cert #%d:\n", n); - X509_print_fp(ne_debug_stream, cert->subject); - } -#endif - if (top == NULL) { - current = top = cert; - } else { - current->issuer = cert; - current = cert; - } - } - - return top; -} - -/* Verifies an SSL server certificate. */ -static int check_certificate(ne_session *sess, SSL *ssl, ne_ssl_certificate *chain) -{ - X509 *cert = chain->subject; - ASN1_TIME *notBefore = X509_get_notBefore(cert); - ASN1_TIME *notAfter = X509_get_notAfter(cert); - int ret, failures = 0; - long result; - ne_uri server; - - /* check expiry dates */ - if (X509_cmp_current_time(notBefore) >= 0) - failures |= NE_SSL_NOTYETVALID; - else if (X509_cmp_current_time(notAfter) <= 0) - failures |= NE_SSL_EXPIRED; - - /* Check certificate was issued to this server; pass URI of - * server. */ - memset(&server, 0, sizeof server); - ne_fill_server_uri(sess, &server); - ret = check_identity(&server, cert, NULL); - ne_uri_free(&server); - if (ret < 0) { - ne_set_error(sess, _("Server certificate was missing commonName " - "attribute in subject name")); - return NE_ERROR; - } else if (ret > 0) failures |= NE_SSL_IDMISMATCH; - - /* get the result of the cert verification out of OpenSSL */ - result = SSL_get_verify_result(ssl); - - NE_DEBUG(NE_DBG_SSL, "Verify result: %ld = %s\n", result, - X509_verify_cert_error_string(result)); - - switch (result) { - case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT_LOCALLY: - case X509_V_ERR_SELF_SIGNED_CERT_IN_CHAIN: - case X509_V_ERR_DEPTH_ZERO_SELF_SIGNED_CERT: - /* TODO: and probably more result codes here... */ - failures |= NE_SSL_UNTRUSTED; - break; - /* ignore these, since we've already noticed them: */ - case X509_V_ERR_CERT_NOT_YET_VALID: - case X509_V_ERR_CERT_HAS_EXPIRED: - /* cert was trusted: */ - case X509_V_OK: - break; - default: - /* TODO: tricky to handle the 30-odd failure cases OpenSSL - * presents here (see x509_vfy.h), and present a useful API to - * the application so it in turn can then present a meaningful - * UI to the user. The only thing to do really would be to - * pass back the error string, but that's not localisable. So - * just fail the verification here - better safe than - * sorry. */ - ne_set_error(sess, _("Certificate verification error: %s"), - X509_verify_cert_error_string(result)); - return NE_ERROR; - } - - if (failures == 0) { - /* verified OK! */ - ret = NE_OK; - } else { - /* Set up the error string. */ - ne__ssl_set_verify_err(sess, failures); - ret = NE_ERROR; - /* Allow manual override */ - if (sess->ssl_verify_fn && - sess->ssl_verify_fn(sess->ssl_verify_ud, failures, chain) == 0) - ret = NE_OK; - } - - return ret; -} - -/* Duplicate a client certificate, which must be in the decrypted state. */ -static ne_ssl_client_cert *dup_client_cert(const ne_ssl_client_cert *cc) -{ - ne_ssl_client_cert *newcc = ne_calloc(sizeof *newcc); - - newcc->decrypted = 1; - newcc->pkey = cc->pkey; - if (cc->friendly_name) - newcc->friendly_name = ne_strdup(cc->friendly_name); - - populate_cert(&newcc->cert, cc->cert.subject); - - cc->cert.subject->references++; - cc->pkey->references++; - return newcc; -} - -/* Callback invoked when the SSL server requests a client certificate. */ -static int provide_client_cert(SSL *ssl, X509 **cert, EVP_PKEY **pkey) -{ - ne_session *const sess = SSL_get_app_data(ssl); - - if (!sess->client_cert && sess->ssl_provide_fn) { - ne_ssl_dname **dnames = NULL; - int n, count = 0; - STACK_OF(X509_NAME) *ca_list = SSL_get_client_CA_list(ssl); - - count = ca_list ? sk_X509_NAME_num(ca_list) : 0; - - if (count > 0) { - dnames = ne_malloc(count * sizeof(ne_ssl_dname *)); - - for (n = 0; n < count; n++) { - dnames[n] = ne_malloc(sizeof(ne_ssl_dname)); - dnames[n]->dn = sk_X509_NAME_value(ca_list, n); - } - } - - NE_DEBUG(NE_DBG_SSL, "Calling client certificate provider...\n"); - sess->ssl_provide_fn(sess->ssl_provide_ud, sess, - (const ne_ssl_dname *const *)dnames, count); - if (count) { - for (n = 0; n < count; n++) - ne_free(dnames[n]); - ne_free(dnames); - } - } - - if (sess->client_cert) { - ne_ssl_client_cert *const cc = sess->client_cert; - NE_DEBUG(NE_DBG_SSL, "Supplying client certificate.\n"); - cc->pkey->references++; - cc->cert.subject->references++; - *cert = cc->cert.subject; - *pkey = cc->pkey; - return 1; - } else { - NE_DEBUG(NE_DBG_SSL, "No client certificate supplied.\n"); - return 0; - } -} - -void ne_ssl_set_clicert(ne_session *sess, const ne_ssl_client_cert *cc) -{ - sess->client_cert = dup_client_cert(cc); -} - -ne_ssl_context *ne_ssl_context_create(int mode) -{ - ne_ssl_context *ctx = ne_calloc(sizeof *ctx); - if (mode == NE_SSL_CTX_CLIENT) { - ctx->ctx = SSL_CTX_new(SSLv23_client_method()); - ctx->sess = NULL; - /* set client cert callback. */ - SSL_CTX_set_client_cert_cb(ctx->ctx, provide_client_cert); - /* enable workarounds for buggy SSL server implementations */ - SSL_CTX_set_options(ctx->ctx, SSL_OP_ALL); - } else if (mode == NE_SSL_CTX_SERVER) { - ctx->ctx = SSL_CTX_new(SSLv23_server_method()); - } else { - ctx->ctx = SSL_CTX_new(SSLv2_server_method()); - } - return ctx; -} - -void ne_ssl_context_set_flag(ne_ssl_context *ctx, int flag, int value) -{ - long opts = SSL_CTX_get_options(ctx->ctx); - - switch (flag) { - case NE_SSL_CTX_SSLv2: - if (value) { - /* Enable SSLv2 support; clear the "no SSLv2" flag. */ - opts &= ~SSL_OP_NO_SSLv2; - } else { - /* Disable it: set the flag. */ - opts |= SSL_OP_NO_SSLv2; - } - break; - } - - SSL_CTX_set_options(ctx->ctx, opts); -} - -int ne_ssl_context_keypair(ne_ssl_context *ctx, const char *cert, - const char *key) -{ - int ret; - - ret = SSL_CTX_use_PrivateKey_file(ctx->ctx, key, SSL_FILETYPE_PEM); - if (ret == 1) { - ret = SSL_CTX_use_certificate_file(ctx->ctx, cert, SSL_FILETYPE_PEM); - } - - return ret == 1 ? 0 : -1; -} - -int ne_ssl_context_set_verify(ne_ssl_context *ctx, - int required, - const char *ca_names, - const char *verify_cas) -{ - if (required) { - SSL_CTX_set_verify(ctx->ctx, SSL_VERIFY_PEER | - SSL_VERIFY_FAIL_IF_NO_PEER_CERT, NULL); - } - if (ca_names) { - SSL_CTX_set_client_CA_list(ctx->ctx, - SSL_load_client_CA_file(ca_names)); - } - if (verify_cas) { - SSL_CTX_load_verify_locations(ctx->ctx, verify_cas, NULL); - } - return 0; -} - -void ne_ssl_context_destroy(ne_ssl_context *ctx) -{ - SSL_CTX_free(ctx->ctx); - if (ctx->sess) - SSL_SESSION_free(ctx->sess); - ne_free(ctx); -} - -/* For internal use only. */ -int ne__negotiate_ssl(ne_session *sess) -{ - ne_ssl_context *ctx = sess->ssl_context; - SSL *ssl; - STACK_OF(X509) *chain; - int freechain = 0; /* non-zero if chain should be free'd. */ - - NE_DEBUG(NE_DBG_SSL, "Doing SSL negotiation.\n"); - - if (ne_sock_connect_ssl(sess->socket, ctx, sess)) { - if (ctx->sess) { - /* remove cached session. */ - SSL_SESSION_free(ctx->sess); - ctx->sess = NULL; - } - ne_set_error(sess, _("SSL negotiation failed: %s"), - ne_sock_error(sess->socket)); - return NE_ERROR; - } - - ssl = ne__sock_sslsock(sess->socket); - - chain = SSL_get_peer_cert_chain(ssl); - /* For an SSLv2 connection, the cert chain will always be NULL. */ - if (chain == NULL) { - X509 *cert = SSL_get_peer_certificate(ssl); - if (cert) { - chain = sk_X509_new_null(); - sk_X509_push(chain, cert); - freechain = 1; - } - } - - if (chain == NULL || sk_X509_num(chain) == 0) { - ne_set_error(sess, _("SSL server did not present certificate")); - return NE_ERROR; - } - - if (sess->server_cert) { - int diff = X509_cmp(sk_X509_value(chain, 0), sess->server_cert->subject); - if (freechain) sk_X509_free(chain); /* no longer need the chain */ - if (diff) { - /* This could be a MITM attack: fail the request. */ - ne_set_error(sess, _("Server certificate changed: " - "connection intercepted?")); - return NE_ERROR; - } - /* certificate has already passed verification: no need to - * verify it again. */ - } else { - /* new connection: create the chain. */ - ne_ssl_certificate *cert = make_chain(chain); - - if (freechain) sk_X509_free(chain); /* no longer need the chain */ - - if (check_certificate(sess, ssl, cert)) { - NE_DEBUG(NE_DBG_SSL, "SSL certificate checks failed: %s\n", - sess->error); - ne_ssl_cert_free(cert); - return NE_ERROR; - } - /* remember the chain. */ - sess->server_cert = cert; - } - - if (ctx->sess) { - SSL_SESSION *newsess = SSL_get0_session(ssl); - /* Replace the session if it has changed. */ - if (newsess != ctx->sess || SSL_SESSION_cmp(ctx->sess, newsess)) { - SSL_SESSION_free(ctx->sess); - ctx->sess = SSL_get1_session(ssl); /* bumping the refcount */ - } - } else { - /* Store the session. */ - ctx->sess = SSL_get1_session(ssl); - } - - return NE_OK; -} - -const ne_ssl_dname *ne_ssl_cert_issuer(const ne_ssl_certificate *cert) -{ - return &cert->issuer_dn; -} - -const ne_ssl_dname *ne_ssl_cert_subject(const ne_ssl_certificate *cert) -{ - return &cert->subj_dn; -} - -const ne_ssl_certificate *ne_ssl_cert_signedby(const ne_ssl_certificate *cert) -{ - return cert->issuer; -} - -const char *ne_ssl_cert_identity(const ne_ssl_certificate *cert) -{ - return cert->identity; -} - -void ne_ssl_context_trustcert(ne_ssl_context *ctx, const ne_ssl_certificate *cert) -{ - X509_STORE *store = SSL_CTX_get_cert_store(ctx->ctx); - - X509_STORE_add_cert(store, cert->subject); -} - -void ne_ssl_trust_default_ca(ne_session *sess) -{ - X509_STORE *store = SSL_CTX_get_cert_store(sess->ssl_context->ctx); - -#ifdef NE_SSL_CA_BUNDLE - X509_STORE_load_locations(store, NE_SSL_CA_BUNDLE, NULL); -#else - X509_STORE_set_default_paths(store); -#endif -} - -/* Find a friendly name in a PKCS12 structure the hard way, without - * decrypting the parts which are encrypted.. */ -static char *find_friendly_name(PKCS12 *p12) -{ - STACK_OF(PKCS7) *safes = PKCS12_unpack_authsafes(p12); - int n, m; - char *name = NULL; - - if (safes == NULL) return NULL; - - /* Iterate over the unpacked authsafes: */ - for (n = 0; n < sk_PKCS7_num(safes) && !name; n++) { - PKCS7 *safe = sk_PKCS7_value(safes, n); - STACK_OF(PKCS12_SAFEBAG) *bags; - - /* Only looking for unencrypted authsafes. */ - if (OBJ_obj2nid(safe->type) != NID_pkcs7_data) continue; - - bags = PKCS12_unpack_p7data(safe); - if (!bags) continue; - - /* Iterate through the bags, picking out a friendly name */ - for (m = 0; m < sk_PKCS12_SAFEBAG_num(bags) && !name; m++) { - PKCS12_SAFEBAG *bag = sk_PKCS12_SAFEBAG_value(bags, m); - name = PKCS12_get_friendlyname(bag); - } - - sk_PKCS12_SAFEBAG_pop_free(bags, PKCS12_SAFEBAG_free); - } - - sk_PKCS7_pop_free(safes, PKCS7_free); - return name; -} - -ne_ssl_client_cert *ne_ssl_clicert_read(const char *filename) -{ - PKCS12 *p12; - FILE *fp; - X509 *cert; - EVP_PKEY *pkey; - ne_ssl_client_cert *cc; - - fp = fopen(filename, "rb"); - if (fp == NULL) - return NULL; - - p12 = d2i_PKCS12_fp(fp, NULL); - - fclose(fp); - - if (p12 == NULL) { - ERR_clear_error(); - return NULL; - } - - /* Try parsing with no password. */ - if (PKCS12_parse(p12, NULL, &pkey, &cert, NULL) == 1) { - /* Success - no password needed for decryption. */ - int len = 0; - unsigned char *name = X509_alias_get0(cert, &len); - - cc = ne_calloc(sizeof *cc); - cc->pkey = pkey; - cc->decrypted = 1; - if (name && len > 0) - cc->friendly_name = ne_strndup((char *)name, len); - populate_cert(&cc->cert, cert); - PKCS12_free(p12); - return cc; - } else { - /* Failed to parse the file */ - int err = ERR_get_error(); - ERR_clear_error(); - if (ERR_GET_LIB(err) == ERR_LIB_PKCS12 && - ERR_GET_REASON(err) == PKCS12_R_MAC_VERIFY_FAILURE) { - /* Decryption error due to bad password. */ - cc = ne_calloc(sizeof *cc); - cc->friendly_name = find_friendly_name(p12); - cc->p12 = p12; - return cc; - } else { - /* Some parse error, give up. */ - PKCS12_free(p12); - return NULL; - } - } -} - -int ne_ssl_clicert_encrypted(const ne_ssl_client_cert *cc) -{ - return !cc->decrypted; -} - -int ne_ssl_clicert_decrypt(ne_ssl_client_cert *cc, const char *password) -{ - X509 *cert; - EVP_PKEY *pkey; - - if (PKCS12_parse(cc->p12, password, &pkey, &cert, NULL) != 1) { - ERR_clear_error(); - return -1; - } - - if (X509_check_private_key(cert, pkey) != 1) { - ERR_clear_error(); - X509_free(cert); - EVP_PKEY_free(pkey); - NE_DEBUG(NE_DBG_SSL, "Decrypted private key/cert are not matched."); - return -1; - } - - PKCS12_free(cc->p12); - populate_cert(&cc->cert, cert); - cc->pkey = pkey; - cc->decrypted = 1; - cc->p12 = NULL; - return 0; -} - -const ne_ssl_certificate *ne_ssl_clicert_owner(const ne_ssl_client_cert *cc) -{ - return &cc->cert; -} - -const char *ne_ssl_clicert_name(const ne_ssl_client_cert *ccert) -{ - return ccert->friendly_name; -} - -ne_ssl_certificate *ne_ssl_cert_read(const char *filename) -{ - FILE *fp = fopen(filename, "r"); - X509 *cert; - - if (fp == NULL) - return NULL; - - cert = PEM_read_X509(fp, NULL, NULL, NULL); - fclose(fp); - - if (cert == NULL) { - NE_DEBUG(NE_DBG_SSL, "d2i_X509_fp failed: %s\n", - ERR_reason_error_string(ERR_get_error())); - ERR_clear_error(); - return NULL; - } - - return populate_cert(ne_calloc(sizeof(struct ne_ssl_certificate_s)), cert); -} - -int ne_ssl_cert_write(const ne_ssl_certificate *cert, const char *filename) -{ - FILE *fp = fopen(filename, "w"); - - if (fp == NULL) return -1; - - if (PEM_write_X509(fp, cert->subject) != 1) { - ERR_clear_error(); - fclose(fp); - return -1; - } - - if (fclose(fp) != 0) - return -1; - - return 0; -} - -void ne_ssl_cert_free(ne_ssl_certificate *cert) -{ - X509_free(cert->subject); - if (cert->issuer) - ne_ssl_cert_free(cert->issuer); - if (cert->identity) - ne_free(cert->identity); - ne_free(cert); -} - -int ne_ssl_cert_cmp(const ne_ssl_certificate *c1, const ne_ssl_certificate *c2) -{ - return X509_cmp(c1->subject, c2->subject); -} - -/* The certificate import/export format is the base64 encoding of the - * raw DER; PEM without the newlines and wrapping. */ - -ne_ssl_certificate *ne_ssl_cert_import(const char *data) -{ - unsigned char *der; - ne_d2i_uchar *p; - size_t len; - X509 *x5; - - /* decode the base64 to get the raw DER representation */ - len = ne_unbase64(data, &der); - if (len == 0) return NULL; - - p = der; - x5 = d2i_X509(NULL, &p, len); /* p is incremented */ - ne_free(der); - if (x5 == NULL) { - ERR_clear_error(); - return NULL; - } - - return populate_cert(ne_calloc(sizeof(struct ne_ssl_certificate_s)), x5); -} - -char *ne_ssl_cert_export(const ne_ssl_certificate *cert) -{ - int len; - unsigned char *der, *p; - char *ret; - - /* find the length of the DER encoding. */ - len = i2d_X509(cert->subject, NULL); - - p = der = ne_malloc(len); - i2d_X509(cert->subject, &p); /* p is incremented */ - - ret = ne_base64(der, len); - ne_free(der); - return ret; -} - -#if SHA_DIGEST_LENGTH != 20 -# error SHA digest length is not 20 bytes -#endif - -int ne_ssl_cert_digest(const ne_ssl_certificate *cert, char *digest) -{ - unsigned char sha1[EVP_MAX_MD_SIZE]; - unsigned int len, j; - char *p; - - if (!X509_digest(cert->subject, EVP_sha1(), sha1, &len) || len != 20) { - ERR_clear_error(); - return -1; - } - - for (j = 0, p = digest; j < 20; j++) { - *p++ = NE_HEX2ASC((sha1[j] >> 4) & 0x0f); - *p++ = NE_HEX2ASC(sha1[j] & 0x0f); - *p++ = ':'; - } - - p[-1] = '\0'; - return 0; -} - -#ifdef NE_HAVE_TS_SSL -/* Implementation of locking callbacks to make OpenSSL thread-safe. - * If the OpenSSL API was better designed, this wouldn't be necessary. - * In OpenSSL releases without CRYPTO_set_idptr_callback, it's not - * possible to implement the locking in a POSIX-compliant way, since - * it's necessary to cast from a pthread_t to an unsigned long at some - * point. */ - -static pthread_mutex_t *locks; -static size_t num_locks; - -#ifndef HAVE_CRYPTO_SET_IDPTR_CALLBACK -/* Named to be obvious when it shows up in a backtrace. */ -static unsigned long thread_id_neon(void) -{ - /* This will break if pthread_t is a structure; upgrading OpenSSL - * >= 0.9.9 (which does not require this callback) is the only - * solution. */ - return (unsigned long) pthread_self(); -} -#endif - -/* Another great API design win for OpenSSL: no return value! So if - * the lock/unlock fails, all that can be done is to abort. */ -static void thread_lock_neon(int mode, int n, const char *file, int line) -{ - if (mode & CRYPTO_LOCK) { - if (pthread_mutex_lock(&locks[n])) { - abort(); - } - } - else { - if (pthread_mutex_unlock(&locks[n])) { - abort(); - } - } -} - -#endif - -/* ID_CALLBACK_IS_{NEON,OTHER} evaluate as true if the currently - * registered OpenSSL ID callback is the neon function (_NEON), or has - * been overwritten by some other app (_OTHER). */ -#ifdef HAVE_CRYPTO_SET_IDPTR_CALLBACK -#define ID_CALLBACK_IS_OTHER (0) -#define ID_CALLBACK_IS_NEON (1) -#else -#define ID_CALLBACK_IS_OTHER (CRYPTO_get_id_callback() != NULL) -#define ID_CALLBACK_IS_NEON (CRYPTO_get_id_callback() == thread_id_neon) -#endif - -int ne__ssl_init(void) -{ - CRYPTO_malloc_init(); - SSL_load_error_strings(); - SSL_library_init(); - OpenSSL_add_all_algorithms(); - -#ifdef NE_HAVE_TS_SSL - /* If some other library has already come along and set up the - * thread-safety callbacks, then it must be presumed that the - * other library will have a longer lifetime in the process than - * neon. If the library which has installed the callbacks is - * unloaded, then all bets are off. */ - if (ID_CALLBACK_IS_OTHER || CRYPTO_get_locking_callback() != NULL) { - NE_DEBUG(NE_DBG_SOCKET, "ssl: OpenSSL thread-safety callbacks already installed.\n"); - NE_DEBUG(NE_DBG_SOCKET, "ssl: neon will not replace existing callbacks.\n"); - } else { - size_t n; - - num_locks = CRYPTO_num_locks(); - - /* For releases where CRYPTO_set_idptr_callback is present, - * the default ID callback should be sufficient. */ -#ifndef HAVE_CRYPTO_SET_IDPTR_CALLBACK - CRYPTO_set_id_callback(thread_id_neon); -#endif - CRYPTO_set_locking_callback(thread_lock_neon); - - locks = malloc(num_locks * sizeof *locks); - for (n = 0; n < num_locks; n++) { - if (pthread_mutex_init(&locks[n], NULL)) { - NE_DEBUG(NE_DBG_SOCKET, "ssl: Failed to initialize pthread mutex.\n"); - return -1; - } - } - - NE_DEBUG(NE_DBG_SOCKET, "ssl: Initialized OpenSSL thread-safety callbacks " - "for %" NE_FMT_SIZE_T " locks.\n", num_locks); - } -#endif - - return 0; -} - -void ne__ssl_exit(void) -{ - /* Cannot call ERR_free_strings() etc here in case any other code - * in the process using OpenSSL. */ - -#ifdef NE_HAVE_TS_SSL - /* Only unregister the callbacks if some *other* library has not - * come along in the mean-time and trampled over the callbacks - * installed by neon. */ - if (CRYPTO_get_locking_callback() == thread_lock_neon - && ID_CALLBACK_IS_NEON) { - size_t n; - -#ifndef HAVE_CRYPTO_SET_IDPTR_CALLBACK - CRYPTO_set_id_callback(NULL); -#endif - CRYPTO_set_locking_callback(NULL); - - for (n = 0; n < num_locks; n++) { - pthread_mutex_destroy(&locks[n]); - } - - free(locks); - } -#endif -} diff --git a/client/neon-0.27.2/src/ne_private.h b/client/neon-0.27.2/src/ne_private.h deleted file mode 100644 index 2ffe47289..000000000 --- a/client/neon-0.27.2/src/ne_private.h +++ /dev/null @@ -1,123 +0,0 @@ -/* - HTTP Request Handling - Copyright (C) 1999-2006, Joe Orton - - 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 - -*/ - -/* THIS IS NOT A PUBLIC INTERFACE. You CANNOT include this header file - * from an application. */ - -#ifndef NE_PRIVATE_H -#define NE_PRIVATE_H - -#include "ne_request.h" -#include "ne_socket.h" -#include "ne_ssl.h" - -struct host_info { - char *hostname; - unsigned int port; - ne_sock_addr *address; /* if non-NULL, result of resolving 'hostname'. */ - /* current network address obtained from 'address' being used. */ - const ne_inet_addr *current; - char *hostport; /* URI hostport segment */ -}; - -/* Store every registered callback in a generic container, and cast - * the function pointer when calling it. */ -struct hook { - void (*fn)(void); - void *userdata; - const char *id; /* non-NULL for accessors. */ - struct hook *next; -}; - -#define HAVE_HOOK(st,func) (st->hook->hooks->func != NULL) -#define HOOK_FUNC(st, func) (*st->hook->hooks->func) - -/* Session support. */ -struct ne_session_s { - /* Connection information */ - ne_socket *socket; - - /* non-zero if connection has been established. */ - int connected; - - /* non-zero if connection has persisted beyond one request. */ - int persisted; - - int is_http11; /* >0 if connected server is known to be - * HTTP/1.1 compliant. */ - - char *scheme; - struct host_info server, proxy; - - /* application-provided address list */ - const ne_inet_addr **addrlist; - size_t numaddrs, curaddr; - - /* Settings */ - int use_proxy; /* do we have a proxy server? */ - int use_ssl; /* whether a secure connection is required */ - int in_connect; /* doing a proxy CONNECT */ - - int flags[NE_SESSFLAG_LAST]; - - ne_progress progress_cb; - void *progress_ud; - - ne_notify_status notify_cb; - void *notify_ud; - - int rdtimeout, cotimeout; /* read, connect timeouts. */ - - struct hook *create_req_hooks, *pre_send_hooks, *post_send_hooks, - *post_headers_hooks, *destroy_req_hooks, *destroy_sess_hooks, *private; - - char *user_agent; /* full User-Agent: header field */ - -#ifdef NE_HAVE_SSL - ne_ssl_client_cert *client_cert; - ne_ssl_certificate *server_cert; - ne_ssl_context *ssl_context; -#endif - - /* Server cert verification callback: */ - ne_ssl_verify_fn ssl_verify_fn; - void *ssl_verify_ud; - /* Client cert provider callback: */ - ne_ssl_provide_fn ssl_provide_fn; - void *ssl_provide_ud; - - ne_session_status_info status; - - /* Error string */ - char error[512]; -}; - -/* Pushes block of 'count' bytes at 'buf'. Returns non-zero on - * error. */ -typedef int (*ne_push_fn)(void *userdata, const char *buf, size_t count); - -/* Do the SSL negotiation. */ -int ne__negotiate_ssl(ne_session *sess); - -/* Set the session error appropriate for SSL verification failures. */ -void ne__ssl_set_verify_err(ne_session *sess, int failures); - -#endif /* HTTP_PRIVATE_H */ diff --git a/client/neon-0.27.2/src/ne_privssl.h b/client/neon-0.27.2/src/ne_privssl.h deleted file mode 100644 index ea485bc82..000000000 --- a/client/neon-0.27.2/src/ne_privssl.h +++ /dev/null @@ -1,85 +0,0 @@ -/* - SSL interface definitions internal to neon. - Copyright (C) 2003-2005, Joe Orton - Copyright (C) 2004, Aleix Conchillo Flaque - - 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 - -*/ - -/* THIS IS NOT A PUBLIC INTERFACE. You CANNOT include this header file - * from an application. */ - -#ifndef NE_PRIVSSL_H -#define NE_PRIVSSL_H - -/* This is the private interface between ne_socket, ne_gnutls and - * ne_openssl. */ - -#include "ne_ssl.h" -#include "ne_socket.h" - -#ifdef HAVE_OPENSSL - -#include - -struct ne_ssl_context_s { - SSL_CTX *ctx; - SSL_SESSION *sess; -}; - -typedef SSL *ne_ssl_socket; - -#endif /* HAVE_OPENSSL */ - -#ifdef HAVE_GNUTLS - -#include - -struct ne_ssl_context_s { - gnutls_certificate_credentials cred; - int verify; /* non-zero if client cert verification required */ - - /* Session cache. */ - union ne_ssl_scache { - struct { - gnutls_datum key, data; - } server; -#if defined(HAVE_GNUTLS_SESSION_GET_DATA2) - gnutls_datum client; -#else - struct { - char *data; - size_t len; - } client; -#endif - } cache; -}; - -typedef gnutls_session ne_ssl_socket; - -#endif /* HAVE_GNUTLS */ - -ne_ssl_socket ne__sock_sslsock(ne_socket *sock); - -/* Process-global initialization of the SSL library; returns non-zero - * on error. */ -int ne__ssl_init(void); - -/* Process-global de-initialization of the SSL library. */ -void ne__ssl_exit(void); - -#endif /* NE_PRIVSSL_H */ diff --git a/client/neon-0.27.2/src/ne_props.c b/client/neon-0.27.2/src/ne_props.c deleted file mode 100644 index cb8f19f27..000000000 --- a/client/neon-0.27.2/src/ne_props.c +++ /dev/null @@ -1,651 +0,0 @@ -/* - WebDAV property manipulation - Copyright (C) 2000-2006, Joe Orton - - 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 - -*/ - -#include "config.h" - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif - -#include "ne_alloc.h" -#include "ne_xml.h" -#include "ne_props.h" -#include "ne_basic.h" -#include "ne_locks.h" -#include "ne_internal.h" - -/* don't store flat props with a value > 10K */ -#define MAX_FLATPROP_LEN (102400) - -struct ne_propfind_handler_s { - ne_session *sess; - ne_request *request; - - int has_props; /* whether we've already written some - * props to the body. */ - ne_buffer *body; - - ne_207_parser *parser207; - ne_xml_parser *parser; - - /* Creator/destructor callbacks. */ - ne_props_create_complex creator; - ne_props_destroy_complex destructor; - void *cd_userdata; - - /* Current propset, or NULL if none being processed. */ - ne_prop_result_set *current; - - ne_buffer *value; /* current flat property value */ - int depth; /* nesting depth within a flat property */ - - ne_props_result callback; - void *userdata; -}; - -#define ELM_flatprop (NE_207_STATE_TOP - 1) - -/* We build up the results of one 'response' element in memory. */ -struct prop { - char *name, *nspace, *value, *lang; - /* Store a ne_propname here too, for convienience. pname.name = - * name, pname.nspace = nspace, but they are const'ed in pname. */ - ne_propname pname; -}; - -#define NSPACE(x) ((x) ? (x) : "") - -struct propstat { - struct prop *props; - int numprops; - ne_status status; -}; - -/* Results set. */ -struct ne_prop_result_set_s { - struct propstat *pstats; - int numpstats, counter; - void *private; - ne_uri uri; -}; - -#define MAX_PROP_COUNTER (1024) - -static int -startelm(void *userdata, int state, const char *name, const char *nspace, - const char **atts); -static int -endelm(void *userdata, int state, const char *name, const char *nspace); - -/* Handle character data; flat property value. */ -static int chardata(void *userdata, int state, const char *data, size_t len) -{ - ne_propfind_handler *hdl = userdata; - - if (state == ELM_flatprop && hdl->value->length < MAX_FLATPROP_LEN) - ne_buffer_append(hdl->value, data, len); - - return 0; -} - -ne_xml_parser *ne_propfind_get_parser(ne_propfind_handler *handler) -{ - return handler->parser; -} - -ne_request *ne_propfind_get_request(ne_propfind_handler *handler) -{ - return handler->request; -} - -static int propfind(ne_propfind_handler *handler, - ne_props_result results, void *userdata) -{ - int ret; - ne_request *req = handler->request; - - /* Register the flat property handler to catch any properties - * which the user isn't handling as 'complex'. */ - ne_xml_push_handler(handler->parser, startelm, chardata, endelm, handler); - - handler->callback = results; - handler->userdata = userdata; - - ne_set_request_body_buffer(req, handler->body->data, - ne_buffer_size(handler->body)); - - ne_add_request_header(req, "Content-Type", NE_XML_MEDIA_TYPE); - - ne_add_response_body_reader(req, ne_accept_207, ne_xml_parse_v, - handler->parser); - - ret = ne_request_dispatch(req); - - if (ret == NE_OK && ne_get_status(req)->klass != 2) { - ret = NE_ERROR; - } else if (ne_xml_failed(handler->parser)) { - ne_set_error(handler->sess, "%s", ne_xml_get_error(handler->parser)); - ret = NE_ERROR; - } - - return ret; -} - -static void set_body(ne_propfind_handler *hdl, const ne_propname *names) -{ - ne_buffer *body = hdl->body; - int n; - - if (!hdl->has_props) { - ne_buffer_czappend(body, "\n"); - hdl->has_props = 1; - } - - for (n = 0; names[n].name != NULL; n++) { - ne_buffer_concat(body, "<", names[n].name, " xmlns=\"", - NSPACE(names[n].nspace), "\"/>\n", NULL); - } - -} - -int ne_propfind_allprop(ne_propfind_handler *handler, - ne_props_result results, void *userdata) -{ - ne_buffer_czappend(handler->body, "\n"); - return propfind(handler, results, userdata); -} - -int ne_propfind_named(ne_propfind_handler *handler, const ne_propname *props, - ne_props_result results, void *userdata) -{ - set_body(handler, props); - ne_buffer_czappend(handler->body, "\n"); - return propfind(handler, results, userdata); -} - - -/* The easy one... PROPPATCH */ -int ne_proppatch(ne_session *sess, const char *uri, - const ne_proppatch_operation *items) -{ - ne_request *req = ne_request_create(sess, "PROPPATCH", uri); - ne_buffer *body = ne_buffer_create(); - int n, ret; - - /* Create the request body */ - ne_buffer_czappend(body, "\n" - ""); - - for (n = 0; items[n].name != NULL; n++) { - const char *elm = (items[n].type == ne_propset) ? "set" : "remove"; - - /* value */ - ne_buffer_concat(body, "" - "<", items[n].name->name, NULL); - - if (items[n].name->nspace) { - ne_buffer_concat(body, " xmlns=\"", items[n].name->nspace, "\"", NULL); - } - - if (items[n].type == ne_propset) { - ne_buffer_concat(body, ">", items[n].value, NULL); - } else { - ne_buffer_append(body, ">", 1); - } - - ne_buffer_concat(body, "name, ">\n", NULL); - } - - ne_buffer_czappend(body, "\n"); - - ne_set_request_body_buffer(req, body->data, ne_buffer_size(body)); - ne_add_request_header(req, "Content-Type", NE_XML_MEDIA_TYPE); - -#ifdef NE_HAVE_DAV - ne_lock_using_resource(req, uri, NE_DEPTH_ZERO); -#endif - - ret = ne_simple_request(sess, req); - - ne_buffer_destroy(body); - - return ret; -} - -/* Compare two property names. */ -static int pnamecmp(const ne_propname *pn1, const ne_propname *pn2) -{ - if (pn1->nspace == NULL && pn2->nspace != NULL) { - return 1; - } else if (pn1->nspace != NULL && pn2->nspace == NULL) { - return -1; - } else if (pn1->nspace == NULL) { - return strcmp(pn1->name, pn2->name); - } else { - return (strcmp(pn1->nspace, pn2->nspace) || - strcmp(pn1->name, pn2->name)); - } -} - -/* Find property in 'set' with name 'pname'. If found, set pstat_ret - * to the containing propstat, likewise prop_ret, and returns zero. - * If not found, returns non-zero. */ -static int findprop(const ne_prop_result_set *set, const ne_propname *pname, - struct propstat **pstat_ret, struct prop **prop_ret) -{ - - int ps, p; - - for (ps = 0; ps < set->numpstats; ps++) { - for (p = 0; p < set->pstats[ps].numprops; p++) { - struct prop *prop = &set->pstats[ps].props[p]; - - if (pnamecmp(&prop->pname, pname) == 0) { - if (pstat_ret != NULL) - *pstat_ret = &set->pstats[ps]; - if (prop_ret != NULL) - *prop_ret = prop; - return 0; - } - } - } - - return -1; -} - -const char *ne_propset_value(const ne_prop_result_set *set, - const ne_propname *pname) -{ - struct prop *prop; - - if (findprop(set, pname, NULL, &prop)) { - return NULL; - } else { - return prop->value; - } -} - -const char *ne_propset_lang(const ne_prop_result_set *set, - const ne_propname *pname) -{ - struct prop *prop; - - if (findprop(set, pname, NULL, &prop)) { - return NULL; - } else { - return prop->lang; - } -} - -void *ne_propfind_current_private(ne_propfind_handler *handler) -{ - return handler->current ? handler->current->private : NULL; -} - -void *ne_propset_private(const ne_prop_result_set *set) -{ - return set->private; -} - -int ne_propset_iterate(const ne_prop_result_set *set, - ne_propset_iterator iterator, void *userdata) -{ - int ps, p; - - for (ps = 0; ps < set->numpstats; ps++) { - for (p = 0; p < set->pstats[ps].numprops; p++) { - struct prop *prop = &set->pstats[ps].props[p]; - int ret = iterator(userdata, &prop->pname, prop->value, - &set->pstats[ps].status); - if (ret) - return ret; - - } - } - - return 0; -} - -const ne_status *ne_propset_status(const ne_prop_result_set *set, - const ne_propname *pname) -{ - struct propstat *pstat; - - if (findprop(set, pname, &pstat, NULL)) { - /* TODO: it is tempting to return a dummy status object here - * rather than NULL, which says "Property result was not given - * by server." but I'm not sure if this is best left to the - * client. */ - return NULL; - } else { - return &pstat->status; - } -} - -static void *start_response(void *userdata, const ne_uri *uri) -{ - ne_prop_result_set *set = ne_calloc(sizeof(*set)); - ne_propfind_handler *hdl = userdata; - - ne_uri_copy(&set->uri, uri); - - if (hdl->creator) { - set->private = hdl->creator(hdl->cd_userdata, &set->uri); - } - - hdl->current = set; - - return set; -} - -static void *start_propstat(void *userdata, void *response) -{ - ne_prop_result_set *set = response; - ne_propfind_handler *hdl = userdata; - struct propstat *pstat; - int n; - - if (++hdl->current->counter == MAX_PROP_COUNTER) { - ne_xml_set_error(hdl->parser, _("Response exceeds maximum property count")); - return NULL; - } - - n = set->numpstats; - set->pstats = ne_realloc(set->pstats, sizeof(struct propstat) * (n+1)); - set->numpstats = n+1; - - pstat = &set->pstats[n]; - memset(pstat, 0, sizeof(*pstat)); - - /* And return this as the new pstat. */ - return &set->pstats[n]; -} - -static int startelm(void *userdata, int parent, - const char *nspace, const char *name, const char **atts) -{ - ne_propfind_handler *hdl = userdata; - struct propstat *pstat = ne_207_get_current_propstat(hdl->parser207); - struct prop *prop; - int n; - const char *lang; - - /* Just handle all children of propstat and their descendants. */ - if ((parent != NE_207_STATE_PROP && parent != ELM_flatprop) - || pstat == NULL) - return NE_XML_DECLINE; - - if (parent == ELM_flatprop) { - /* collecting the flatprop value. */ - hdl->depth++; - if (hdl->value->used < MAX_FLATPROP_LEN) - ne_buffer_concat(hdl->value, "<", name, ">", NULL); - return ELM_flatprop; - } - - /* Enforce maximum number of properties per resource to prevent a - * memory exhaustion attack by a hostile server. */ - if (++hdl->current->counter == MAX_PROP_COUNTER) { - ne_xml_set_error(hdl->parser, _("Response exceeds maximum property count")); - return NE_XML_ABORT; - } - - /* Add a property to this propstat */ - n = pstat->numprops; - - pstat->props = ne_realloc(pstat->props, sizeof(struct prop) * (n + 1)); - pstat->numprops = n+1; - - /* Fill in the new property. */ - prop = &pstat->props[n]; - - prop->pname.name = prop->name = ne_strdup(name); - if (nspace[0] == '\0') { - prop->pname.nspace = prop->nspace = NULL; - } else { - prop->pname.nspace = prop->nspace = ne_strdup(nspace); - } - prop->value = NULL; - - NE_DEBUG(NE_DBG_XML, "Got property #%d: {%s}%s.\n", n, - NSPACE(prop->nspace), prop->name); - - /* This is under discussion at time of writing (April '01), and it - * looks like we need to retrieve the xml:lang property from any - * element here or above. - * - * Also, I think we might need attribute namespace handling here. */ - lang = ne_xml_get_attr(hdl->parser, atts, NULL, "xml:lang"); - if (lang != NULL) { - prop->lang = ne_strdup(lang); - NE_DEBUG(NE_DBG_XML, "Property language is %s\n", prop->lang); - } else { - prop->lang = NULL; - } - - hdl->depth = 0; - - return ELM_flatprop; -} - -static int endelm(void *userdata, int state, - const char *nspace, const char *name) -{ - ne_propfind_handler *hdl = userdata; - struct propstat *pstat = ne_207_get_current_propstat(hdl->parser207); - int n; - - if (hdl->depth > 0) { - /* nested. */ - if (hdl->value->used < MAX_FLATPROP_LEN) - ne_buffer_concat(hdl->value, "", NULL); - hdl->depth--; - } else { - /* end of the current property value */ - n = pstat->numprops - 1; - pstat->props[n].value = ne_buffer_finish(hdl->value); - hdl->value = ne_buffer_create(); - } - return 0; -} - -static void end_propstat(void *userdata, void *pstat_v, - const ne_status *status, - const char *description) -{ - struct propstat *pstat = pstat_v; - - /* Nothing to do if no status was given. */ - if (!status) return; - - /* If we get a non-2xx response back here, we wipe the value for - * each of the properties in this propstat, so the caller knows to - * look at the status instead. It's annoying, since for each prop - * we will have done an unnecessary strdup("") above, but there is - * no easy way round that given the fact that we don't know - * whether we've got an error or not till after we get the - * property element. - * - * Interestingly IIS breaks the 2518 DTD and puts the status - * element first in the propstat. This is useful since then we - * *do* know whether each subsequent empty prop element means, but - * we can't rely on that here. */ - if (status->klass != 2) { - int n; - - for (n = 0; n < pstat->numprops; n++) { - ne_free(pstat->props[n].value); - pstat->props[n].value = NULL; - } - } - - /* copy the status structure, and dup the reason phrase. */ - pstat->status = *status; - pstat->status.reason_phrase = ne_strdup(status->reason_phrase); -} - -/* Frees up a results set */ -static void free_propset(ne_propfind_handler *handler, - ne_prop_result_set *set) -{ - int n; - - if (handler->destructor && set->private) { - handler->destructor(handler->cd_userdata, set->private); - } - - for (n = 0; n < set->numpstats; n++) { - int m; - struct propstat *p = &set->pstats[n]; - - for (m = 0; m < p->numprops; m++) { - if (p->props[m].nspace) ne_free(p->props[m].nspace); - ne_free(p->props[m].name); - if (p->props[m].lang) ne_free(p->props[m].lang); - if (p->props[m].value) ne_free(p->props[m].value); - p->props[m].nspace = p->props[m].lang = - p->props[m].value = NULL; - } - - if (p->status.reason_phrase) - ne_free(p->status.reason_phrase); - if (p->props) - ne_free(p->props); - } - - if (set->pstats) - ne_free(set->pstats); - ne_uri_free(&set->uri); - ne_free(set); -} - -static void end_response(void *userdata, void *resource, - const ne_status *status, - const char *description) -{ - ne_propfind_handler *handler = userdata; - ne_prop_result_set *set = resource; - - /* Pass back the results for this resource. */ - if (handler->callback && set->numpstats > 0) - handler->callback(handler->userdata, &set->uri, set); - - /* Clean up the propset tree we've just built. */ - free_propset(handler, set); - handler->current = NULL; -} - -ne_propfind_handler * -ne_propfind_create(ne_session *sess, const char *uri, int depth) -{ - ne_propfind_handler *ret = ne_calloc(sizeof(ne_propfind_handler)); - ne_uri base = {0}; - - ne_fill_server_uri(sess, &base); - base.path = ne_strdup(uri); - - ret->parser = ne_xml_create(); - ret->parser207 = ne_207_create(ret->parser, &base, ret); - ret->sess = sess; - ret->body = ne_buffer_create(); - ret->request = ne_request_create(sess, "PROPFIND", uri); - ret->value = ne_buffer_create(); - - ne_add_depth_header(ret->request, depth); - - ne_207_set_response_handlers(ret->parser207, - start_response, end_response); - - ne_207_set_propstat_handlers(ret->parser207, start_propstat, - end_propstat); - - /* The start of the request body is fixed: */ - ne_buffer_czappend(ret->body, - "\n" - ""); - - ne_uri_free(&base); - - return ret; -} - -/* Destroy a propfind handler */ -void ne_propfind_destroy(ne_propfind_handler *handler) -{ - ne_buffer_destroy(handler->value); - if (handler->current) - free_propset(handler, handler->current); - ne_207_destroy(handler->parser207); - ne_xml_destroy(handler->parser); - ne_buffer_destroy(handler->body); - ne_request_destroy(handler->request); - ne_free(handler); -} - -int ne_simple_propfind(ne_session *sess, const char *href, int depth, - const ne_propname *props, - ne_props_result results, void *userdata) -{ - ne_propfind_handler *hdl; - int ret; - - hdl = ne_propfind_create(sess, href, depth); - if (props != NULL) { - ret = ne_propfind_named(hdl, props, results, userdata); - } else { - ret = ne_propfind_allprop(hdl, results, userdata); - } - - ne_propfind_destroy(hdl); - - return ret; -} - -int ne_propnames(ne_session *sess, const char *href, int depth, - ne_props_result results, void *userdata) -{ - ne_propfind_handler *hdl; - int ret; - - hdl = ne_propfind_create(sess, href, depth); - - ne_buffer_czappend(hdl->body, ""); - - ret = propfind(hdl, results, userdata); - - ne_propfind_destroy(hdl); - - return ret; -} - -void ne_propfind_set_private(ne_propfind_handler *hdl, - ne_props_create_complex creator, - ne_props_destroy_complex destructor, - void *userdata) -{ - hdl->creator = creator; - hdl->destructor = destructor; - hdl->cd_userdata = userdata; -} diff --git a/client/neon-0.27.2/src/ne_props.h b/client/neon-0.27.2/src/ne_props.h deleted file mode 100644 index fdeb8ffb2..000000000 --- a/client/neon-0.27.2/src/ne_props.h +++ /dev/null @@ -1,249 +0,0 @@ -/* - WebDAV Properties manipulation - Copyright (C) 1999-2006, Joe Orton - - 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 - -*/ - -#ifndef NE_PROPS_H -#define NE_PROPS_H - -#include "ne_request.h" -#include "ne_207.h" - -NE_BEGIN_DECLS - -/* There are two interfaces for fetching properties. The first is - * 'ne_simple_propfind', which is relatively simple, and easy to use, - * but only lets you fetch FLAT properties, i.e. properties which are - * just a string of bytes. The complex interface is 'ne_propfind_*', - * which is complicated, and hard to use, but lets you parse - * structured properties, i.e. properties which have XML content. */ - -/* The 'ne_simple_propfind' interface. *** - * - * ne_simple_propfind allows you to fetch a set of properties for a - * single resource, or a tree of resources. You set the operation - * going by passing these arguments: - * - * - the session which should be used. - * - the URI and the depth of the operation (0, 1, infinite) - * - the names of the properties which you want to fetch - * - a results callback, and the userdata for the callback. - * - * For each resource found, the results callback is called, passing - * you two things along with the userdata you passed in originally: - * - * - the URI of the resource (const ne_uri *uri) - * - the properties results set (const ne_prop_result_set *results) - * */ - -/* The name of a WebDAV property. 'nspace' may be NULL. */ -typedef struct { - const char *nspace, *name; -} ne_propname; - -typedef struct ne_prop_result_set_s ne_prop_result_set; - -/* Get the value of a given property. Will return NULL if there was an - * error fetching this property on this resource. Call - * ne_propset_result to get the response-status if so. */ -const char *ne_propset_value(const ne_prop_result_set *set, - const ne_propname *propname); - -/* Returns the status structure for fetching the given property on - * this resource. This function will return NULL if the server did not - * return the property (which is a server error). */ -const ne_status *ne_propset_status(const ne_prop_result_set *set, - const ne_propname *propname); - -/* Returns the private pointer for the given propset. */ -void *ne_propset_private(const ne_prop_result_set *set); - -/* Return language string of property (may be NULL). */ -const char *ne_propset_lang(const ne_prop_result_set *set, - const ne_propname *pname); - -/* ne_propset_iterate iterates over a properties result set, - * calling the callback for each property in the set. userdata is - * passed as the first argument to the callback. value may be NULL, - * indicating an error occurred fetching this property: look at - * status for the error in that case. - * - * If the iterator returns non-zero, ne_propset_iterate will return - * immediately with that value. - */ -typedef int (*ne_propset_iterator)(void *userdata, - const ne_propname *pname, - const char *value, - const ne_status *status); - -/* Iterate over all the properties in 'set', calling 'iterator' - * for each, passing 'userdata' as the first argument to callback. - * - * Returns: - * whatever value iterator returns. - */ -int ne_propset_iterate(const ne_prop_result_set *set, - ne_propset_iterator iterator, void *userdata); - -/* Callback for handling the results of fetching properties for a - * single resource (identified by URI 'uri'). The results are stored - * in the result set 'results': use ne_propset_* to examine this - * object. */ -typedef void (*ne_props_result)(void *userdata, const ne_uri *uri, - const ne_prop_result_set *results); - -/* Fetch properties for a resource (if depth == NE_DEPTH_ZERO), - * or a tree of resources (if depth == NE_DEPTH_ONE or _INFINITE). - * - * Names of the properties required must be given in 'props', - * or if props is NULL, *all* properties are fetched. - * - * 'results' is called for each resource in the response, userdata is - * passed as the first argument to the callback. It is important to - * note that the callback is called as the response is read off the - * socket, so don't do anything silly in it (e.g. sleep(100), or call - * any functions which use this session). - * - * Note that if 'depth' is NE_DEPTH_INFINITY, some servers may refuse - * the request. - * - * Returns NE_*. */ -int ne_simple_propfind(ne_session *sess, const char *path, int depth, - const ne_propname *props, - ne_props_result results, void *userdata); - -/* The properties of a resource can be manipulated using ne_proppatch. - * A single proppatch request may include any number of individual - * "set" and "remove" operations, and is defined to have - * "all-or-nothing" semantics, so either all the operations succeed, - * or none do. */ - -/* A proppatch operation may either set a property to have a new - * value, in which case 'type' must be ne_propset, and 'value' must be - * non-NULL; or it can remove a property; in which case 'type' must be - * ne_propremove, and 'value' is ignored. In both cases, 'name' must - * be set to the name of the property to alter. */ -enum ne_proppatch_optype { - ne_propset, - ne_propremove -}; -typedef struct { - const ne_propname *name; - enum ne_proppatch_optype type; - const char *value; -} ne_proppatch_operation; - -/* Execute a set of property operations 'ops' on 'path'. 'ops' is an - * array terminated by an operation with a NULL 'name' field. Returns - * NE_*. */ -int ne_proppatch(ne_session *sess, const char *path, - const ne_proppatch_operation *ops); - -/* Retrieve property names for the resources at 'path'. 'results' - * callback is called for each resource. Use 'ne_propset_iterate' on - * the passed results object to retrieve the list of property names. - * */ -int ne_propnames(ne_session *sess, const char *path, int depth, - ne_props_result results, void *userdata); - -/* The complex, you-do-all-the-work, property fetch interface: - */ - -struct ne_propfind_handler_s; -typedef struct ne_propfind_handler_s ne_propfind_handler; - -/* Retrieve the 'private' pointer for the current propset for the - * given handler, as returned by the ne_props_create_complex callback - * installed using 'ne_propfind_set_private'. If this callback was - * not registered, this function will return NULL. */ -void *ne_propfind_current_private(ne_propfind_handler *handler); - -/* Create a PROPFIND handler, for the given resource or set of - * resources. - * - * Depth must be one of NE_DEPTH_*. */ -ne_propfind_handler * -ne_propfind_create(ne_session *sess, const char *path, int depth); - -/* Return the XML parser for the given handler (only need if you want - * to handle complex properties). */ -ne_xml_parser *ne_propfind_get_parser(ne_propfind_handler *handler); - -/* This interface reserves the state integer range 'x' where 0 < x - * and x < NE_PROPS_STATE_TOP. */ -#define NE_PROPS_STATE_TOP (NE_207_STATE_TOP + 100) - -/* Return the request object for the given handler. You MUST NOT use - * ne_set_request_body_* on this request object. (this call is only - * needed if for instance, you want to add extra headers to the - * PROPFIND request). The result of using the request pointer after - * ne_propfind_destroy(handler) has been called is undefined. */ -ne_request *ne_propfind_get_request(ne_propfind_handler *handler); - -/* A "complex property" has a value which is structured XML. To handle - * complex properties, you must set up and register an XML handler - * which will understand the elements which make up such properties. - * The handler must be registered with the parser returned by - * 'ne_propfind_get_parser'. - * - * To store the parsed value of the property, a 'private' structure is - * allocated in each propset (i.e. one per resource). When parsing the - * property value elements, for each new resource encountered in the - * response, the 'creator' callback is called to retrieve a 'private' - * structure for this resource. When the private structure is no longer - * needed, the 'destructor' callback is called to deallocate any - * memory, if necessary. - * - * Whilst in XML element callbacks you will have registered to handle - * complex properties, you can use the 'ne_propfind_current_private' - * call to retrieve the pointer to this private structure. - * - * To retrieve this 'private' structure from the propset in the - * results callback, simply call 'ne_propset_private'. - * */ -typedef void *(*ne_props_create_complex)(void *userdata, const ne_uri *uri); -typedef void (*ne_props_destroy_complex)(void *userdata, void *complex); - -void ne_propfind_set_private(ne_propfind_handler *handler, - ne_props_create_complex creator, - ne_props_destroy_complex destructor, - void *userdata); - -/* Fetch all properties. - * - * Returns NE_*. */ -int ne_propfind_allprop(ne_propfind_handler *handler, - ne_props_result result, void *userdata); - -/* Fetch all properties with names listed in array 'names', which is - * terminated by a property with a NULL name field. For each resource - * encountered, the result callback will be invoked, passing in - * 'userdata' as the first argument. - * - * Returns NE_*. */ -int ne_propfind_named(ne_propfind_handler *handler, - const ne_propname *names, - ne_props_result result, void *userdata); - -/* Destroy a propfind handler after use. */ -void ne_propfind_destroy(ne_propfind_handler *handler); - -NE_END_DECLS - -#endif /* NE_PROPS_H */ diff --git a/client/neon-0.27.2/src/ne_redirect.c b/client/neon-0.27.2/src/ne_redirect.c deleted file mode 100644 index 171795bd7..000000000 --- a/client/neon-0.27.2/src/ne_redirect.c +++ /dev/null @@ -1,141 +0,0 @@ -/* - HTTP-redirect support - Copyright (C) 1999-2007, Joe Orton - - 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 - -*/ - -#include "config.h" - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif - -#include "ne_session.h" -#include "ne_request.h" -#include "ne_alloc.h" -#include "ne_uri.h" -#include "ne_redirect.h" -#include "ne_internal.h" -#include "ne_string.h" - -#define REDIRECT_ID "http://www.webdav.org/neon/hooks/http-redirect" - -struct redirect { - char *requri; - int valid; /* non-zero if .uri contains a redirect */ - ne_uri uri; - ne_session *sess; -}; - -static void -create(ne_request *req, void *session, const char *method, const char *uri) -{ - struct redirect *red = session; - if (red->requri) ne_free(red->requri); - red->requri = ne_strdup(uri); -} - -#define REDIR(n) ((n) == 301 || (n) == 302 || (n) == 303 || \ - (n) == 307) - -static int post_send(ne_request *req, void *private, const ne_status *status) -{ - struct redirect *red = private; - const char *location = ne_get_response_header(req, "Location"); - ne_buffer *path = NULL; - int ret; - - /* Don't do anything for non-redirect status or no Location header. */ - if (!REDIR(status->code) || location == NULL) - return NE_OK; - - if (strstr(location, "://") == NULL && location[0] != '/') { - char *pnt; - - path = ne_buffer_create(); - ne_buffer_zappend(path, red->requri); - pnt = strrchr(path->data, '/'); - - if (pnt && pnt[1] != '\0') { - /* Chop off last path segment. */ - pnt[1] = '\0'; - ne_buffer_altered(path); - } - ne_buffer_zappend(path, location); - location = path->data; - } - - /* free last uri. */ - ne_uri_free(&red->uri); - - /* Parse the Location header */ - if (ne_uri_parse(location, &red->uri) || red->uri.path == NULL) { - red->valid = 0; - ne_set_error(red->sess, _("Could not parse redirect destination URL")); - ret = NE_ERROR; - } else { - /* got a valid redirect. */ - red->valid = 1; - ret = NE_REDIRECT; - - if (!red->uri.host) { - /* Not an absoluteURI: breaks 2616 but everybody does it. */ - ne_fill_server_uri(red->sess, &red->uri); - } - } - - if (path) ne_buffer_destroy(path); - - return ret; -} - -static void free_redirect(void *cookie) -{ - struct redirect *red = cookie; - ne_uri_free(&red->uri); - if (red->requri) - ne_free(red->requri); - ne_free(red); -} - -void ne_redirect_register(ne_session *sess) -{ - struct redirect *red = ne_calloc(sizeof *red); - - red->sess = sess; - - ne_hook_create_request(sess, create, red); - ne_hook_post_send(sess, post_send, red); - ne_hook_destroy_session(sess, free_redirect, red); - - ne_set_session_private(sess, REDIRECT_ID, red); -} - -const ne_uri *ne_redirect_location(ne_session *sess) -{ - struct redirect *red = ne_get_session_private(sess, REDIRECT_ID); - - if (red && red->valid) - return &red->uri; - else - return NULL; -} - diff --git a/client/neon-0.27.2/src/ne_redirect.h b/client/neon-0.27.2/src/ne_redirect.h deleted file mode 100644 index f9b437a0c..000000000 --- a/client/neon-0.27.2/src/ne_redirect.h +++ /dev/null @@ -1,42 +0,0 @@ -/* - HTTP-redirect support - Copyright (C) 1999-2002, Joe Orton - - 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 - -*/ - -#ifndef NE_REDIRECT_H -#define NE_REDIRECT_H - -#include "ne_request.h" - -NE_BEGIN_DECLS - -/* Register redirect handling for the session: if a valid redirect - * (30x) response is given for any request in this session, the - * request will fail with the NE_REDIRECT code, and the destination of - * the redirect can be retrieved using ne_redirect_location(). */ -void ne_redirect_register(ne_session *sess); - -/* Returns location of last redirect for the session. Returns NULL if - * no redirect has been encountered for given session, or the last - * redirect encountered could not be parsed. */ -const ne_uri *ne_redirect_location(ne_session *sess); - -NE_END_DECLS - -#endif /* NE_REDIRECT_H */ diff --git a/client/neon-0.27.2/src/ne_request.c b/client/neon-0.27.2/src/ne_request.c deleted file mode 100644 index 4f3290cdc..000000000 --- a/client/neon-0.27.2/src/ne_request.c +++ /dev/null @@ -1,1516 +0,0 @@ -/* - HTTP request/response handling - Copyright (C) 1999-2007, Joe Orton - - 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 - -*/ - -/* This is the HTTP client request/response implementation. - * The goal of this code is to be modular and simple. - */ - -#include "config.h" - -#include - -#include -#include -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_STRINGS_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "ne_internal.h" - -#include "ne_alloc.h" -#include "ne_request.h" -#include "ne_string.h" /* for ne_buffer */ -#include "ne_utils.h" -#include "ne_socket.h" -#include "ne_uri.h" - -#include "ne_private.h" - -#define SOCK_ERR(req, op, msg) do { ssize_t sret = (op); \ -if (sret < 0) return aborted(req, msg, sret); } while (0) - -#define EOL "\r\n" - -struct body_reader { - ne_block_reader handler; - ne_accept_response accept_response; - unsigned int use; - void *userdata; - struct body_reader *next; -}; - -struct field { - char *name, *value; - size_t vlen; - struct field *next; -}; - -/* Maximum number of header fields per response: */ -#define MAX_HEADER_FIELDS (100) -/* Size of hash table; 43 is the smallest prime for which the common - * header names hash uniquely using the *33 hash function. */ -#define HH_HASHSIZE (43) -/* Hash iteration step: *33 known to be a good hash for ASCII, see RSE. */ -#define HH_ITERATE(hash, ch) (((hash)*33 + (unsigned char)(ch)) % HH_HASHSIZE) - -/* pre-calculated hash values for given header names: */ -#define HH_HV_CONNECTION (0x14) -#define HH_HV_CONTENT_LENGTH (0x13) -#define HH_HV_TRANSFER_ENCODING (0x07) - -struct ne_request_s { - char *method, *uri; /* method and Request-URI */ - - ne_buffer *headers; /* request headers */ - - /* Request body. */ - ne_provide_body body_cb; - void *body_ud; - - /* Request body source: file or buffer (if not callback). */ - union { - struct { - int fd; - ne_off_t offset, length; - ne_off_t remain; /* remaining bytes to send. */ - } file; - struct { - /* length bytes @ buffer = whole body. - * remain bytes @ pnt = remaining bytes to send */ - const char *buffer, *pnt; - size_t length, remain; - } buf; - } body; - - ne_off_t body_length; /* length of request body */ - - /* temporary store for response lines. */ - char respbuf[NE_BUFSIZ]; - - /**** Response ***/ - - /* The transfer encoding types */ - struct ne_response { - enum { - R_TILLEOF = 0, /* read till eof */ - R_NO_BODY, /* implicitly no body (HEAD, 204, 304) */ - R_CHUNKED, /* using chunked transfer-encoding */ - R_CLENGTH /* using given content-length */ - } mode; - union { - /* clen: used if mode == R_CLENGTH; total and bytes - * remaining to be read of response body. */ - struct { - ne_off_t total, remain; - } clen; - /* chunk: used if mode == R_CHUNKED; total and bytes - * remaining to be read of current chunk */ - struct { - size_t total, remain; - } chunk; - } body; - ne_off_t progress; /* number of bytes read of response */ - } resp; - - struct hook *private; - - /* response header fields */ - struct field *response_headers[HH_HASHSIZE]; - - unsigned int current_index; /* response_headers cursor for iterator */ - - /* List of callbacks which are passed response body blocks */ - struct body_reader *body_readers; - - /*** Miscellaneous ***/ - unsigned int method_is_head; - unsigned int can_persist; - - int flags[NE_REQFLAG_LAST]; - - ne_session *session; - ne_status status; -}; - -static int open_connection(ne_session *sess); - -/* Returns hash value for header 'name', converting it to lower-case - * in-place. */ -static inline unsigned int hash_and_lower(char *name) -{ - char *pnt; - unsigned int hash = 0; - - for (pnt = name; *pnt != '\0'; pnt++) { - *pnt = ne_tolower(*pnt); - hash = HH_ITERATE(hash,*pnt); - } - - return hash; -} - -/* Abort a request due to an non-recoverable HTTP protocol error, - * whilst doing 'doing'. 'code', if non-zero, is the socket error - * code, NE_SOCK_*, or if zero, is ignored. */ -static int aborted(ne_request *req, const char *doing, ssize_t code) -{ - ne_session *sess = req->session; - int ret = NE_ERROR; - - NE_DEBUG(NE_DBG_HTTP, "Aborted request (%" NE_FMT_SSIZE_T "): %s\n", - code, doing); - - switch(code) { - case NE_SOCK_CLOSED: - if (sess->use_proxy) { - ne_set_error(sess, _("%s: connection was closed by proxy server"), - doing); - } else { - ne_set_error(sess, _("%s: connection was closed by server"), - doing); - } - break; - case NE_SOCK_TIMEOUT: - ne_set_error(sess, _("%s: connection timed out"), doing); - ret = NE_TIMEOUT; - break; - case NE_SOCK_ERROR: - case NE_SOCK_RESET: - case NE_SOCK_TRUNC: - ne_set_error(sess, "%s: %s", doing, ne_sock_error(sess->socket)); - break; - case 0: - ne_set_error(sess, "%s", doing); - break; - } - - ne_close_connection(sess); - return ret; -} - -static void notify_status(ne_session *sess, ne_session_status status) -{ - if (sess->notify_cb) { - sess->notify_cb(sess->notify_ud, status, &sess->status); - } -} - -static void *get_private(const struct hook *hk, const char *id) -{ - for (; hk != NULL; hk = hk->next) - if (strcmp(hk->id, id) == 0) - return hk->userdata; - return NULL; -} - -void *ne_get_request_private(ne_request *req, const char *id) -{ - return get_private(req->private, id); -} - -void *ne_get_session_private(ne_session *sess, const char *id) -{ - return get_private(sess->private, id); -} - -void ne_set_request_private(ne_request *req, const char *id, void *userdata) -{ - struct hook *hk = ne_malloc(sizeof (struct hook)), *pos; - - if (req->private != NULL) { - for (pos = req->private; pos->next != NULL; pos = pos->next) - /* nullop */; - pos->next = hk; - } else { - req->private = hk; - } - - hk->id = id; - hk->fn = NULL; - hk->userdata = userdata; - hk->next = NULL; -} - -static ssize_t body_string_send(void *userdata, char *buffer, size_t count) -{ - ne_request *req = userdata; - - if (count == 0) { - req->body.buf.remain = req->body.buf.length; - req->body.buf.pnt = req->body.buf.buffer; - } else { - /* if body_left == 0 we fall through and return 0. */ - if (req->body.buf.remain < count) - count = req->body.buf.remain; - - memcpy(buffer, req->body.buf.pnt, count); - req->body.buf.pnt += count; - req->body.buf.remain -= count; - } - - return count; -} - -static ssize_t body_fd_send(void *userdata, char *buffer, size_t count) -{ - ne_request *req = userdata; - - if (count) { - if (req->body.file.remain == 0) - return 0; - if ((off_t)count > req->body.file.remain) - count = req->body.file.remain; - return read(req->body.file.fd, buffer, count); - } else { - ne_off_t newoff; - - /* rewind for next send. */ - newoff = ne_lseek(req->body.file.fd, req->body.file.offset, SEEK_SET); - if (newoff == req->body.file.offset) { - req->body.file.remain = req->body.file.length; - return 0; - } else { - char err[200], offstr[20]; - - if (newoff == -1) { - /* errno was set */ - ne_strerror(errno, err, sizeof err); - } else { - strcpy(err, _("offset invalid")); - } - ne_snprintf(offstr, sizeof offstr, "%" FMT_NE_OFF_T, - req->body.file.offset); - ne_set_error(req->session, - _("Could not seek to offset %s" - " of request body file: %s"), - offstr, err); - return -1; - } - } -} - -/* For accurate persistent connection handling, for any write() or - * read() operation for a new request on an already-open connection, - * an EOF or RST error MUST be treated as a persistent connection - * timeout, and the request retried on a new connection. Once a - * read() operation has succeeded, any subsequent error MUST be - * treated as fatal. A 'retry' flag is used; retry=1 represents the - * first case, retry=0 the latter. */ - -/* RETRY_RET() crafts a function return value given the 'retry' flag, - * the socket error 'code', and the return value 'acode' from the - * aborted() function. */ -#define RETRY_RET(retry, code, acode) \ -((((code) == NE_SOCK_CLOSED || (code) == NE_SOCK_RESET || \ - (code) == NE_SOCK_TRUNC) && retry) ? NE_RETRY : (acode)) - -/* Sends the request body; returns 0 on success or an NE_* error code. - * If retry is non-zero; will return NE_RETRY on persistent connection - * timeout. On error, the session error string is set and the - * connection is closed. */ -static int send_request_body(ne_request *req, int retry) -{ - ne_session *const sess = req->session; - char buffer[NE_BUFSIZ]; - ssize_t bytes; - - NE_DEBUG(NE_DBG_HTTP, "Sending request body:\n"); - - req->session->status.sr.progress = 0; - req->session->status.sr.total = req->body_length; - notify_status(sess, ne_status_sending); - - /* tell the source to start again from the beginning. */ - if (req->body_cb(req->body_ud, NULL, 0) != 0) { - ne_close_connection(sess); - return NE_ERROR; - } - - while ((bytes = req->body_cb(req->body_ud, buffer, sizeof buffer)) > 0) { - int ret = ne_sock_fullwrite(sess->socket, buffer, bytes); - if (ret < 0) { - int aret = aborted(req, _("Could not send request body"), ret); - return RETRY_RET(retry, ret, aret); - } - - NE_DEBUG(NE_DBG_HTTPBODY, - "Body block (%" NE_FMT_SSIZE_T " bytes):\n[%.*s]\n", - bytes, (int)bytes, buffer); - - /* invoke progress callback */ - req->session->status.sr.progress += bytes; - notify_status(sess, ne_status_sending); - } - - if (bytes == 0) { - return NE_OK; - } else { - NE_DEBUG(NE_DBG_HTTP, "Request body provider failed with " - "%" NE_FMT_SSIZE_T "\n", bytes); - ne_close_connection(sess); - return NE_ERROR; - } -} - -/* Lob the User-Agent, connection and host headers in to the request - * headers */ -static void add_fixed_headers(ne_request *req) -{ - if (req->session->user_agent) { - ne_buffer_zappend(req->headers, req->session->user_agent); - } - - /* If persistent connections are disabled, just send Connection: - * close; otherwise, send Connection: Keep-Alive to pre-1.1 origin - * servers to try harder to get a persistent connection, except if - * using a proxy as per 2068§19.7.1. Always add TE: trailers. */ - if (!req->session->flags[NE_SESSFLAG_PERSIST]) { - ne_buffer_czappend(req->headers, - "Connection: TE, close" EOL - "TE: trailers" EOL); - } else if (!req->session->is_http11 && !req->session->use_proxy) { - ne_buffer_czappend(req->headers, - "Keep-Alive: " EOL - "Connection: TE, Keep-Alive" EOL - "TE: trailers" EOL); - } else { - ne_buffer_czappend(req->headers, - "Connection: TE" EOL - "TE: trailers" EOL); - } -} - -int ne_accept_always(void *userdata, ne_request *req, const ne_status *st) -{ - return 1; -} - -int ne_accept_2xx(void *userdata, ne_request *req, const ne_status *st) -{ - return (st->klass == 2); -} - -ne_request *ne_request_create(ne_session *sess, - const char *method, const char *path) -{ - ne_request *req = ne_calloc(sizeof *req); - - req->session = sess; - req->headers = ne_buffer_create(); - - /* Presume the method is idempotent by default. */ - req->flags[NE_REQFLAG_IDEMPOTENT] = 1; - - /* Add in the fixed headers */ - add_fixed_headers(req); - - /* Set the standard stuff */ - req->method = ne_strdup(method); - req->method_is_head = (strcmp(method, "HEAD") == 0); - - /* Only use an absoluteURI here when absolutely necessary: some - * servers can't parse them. */ - if (req->session->use_proxy && !req->session->use_ssl && path[0] == '/') - req->uri = ne_concat(req->session->scheme, "://", - req->session->server.hostport, path, NULL); - else - req->uri = ne_strdup(path); - - { - struct hook *hk; - - for (hk = sess->create_req_hooks; hk != NULL; hk = hk->next) { - ne_create_request_fn fn = (ne_create_request_fn)hk->fn; - fn(req, hk->userdata, method, req->uri); - } - } - - return req; -} - -/* Set the request body length to 'length' */ -static void set_body_length(ne_request *req, ne_off_t length) -{ - req->body_length = length; - ne_print_request_header(req, "Content-Length", "%" FMT_NE_OFF_T, length); -} - -void ne_set_request_body_buffer(ne_request *req, const char *buffer, - size_t size) -{ - req->body.buf.buffer = buffer; - req->body.buf.length = size; - req->body_cb = body_string_send; - req->body_ud = req; - set_body_length(req, size); -} - -void ne_set_request_body_provider(ne_request *req, ne_off_t bodysize, - ne_provide_body provider, void *ud) -{ - req->body_cb = provider; - req->body_ud = ud; - set_body_length(req, bodysize); -} - -void ne_set_request_body_fd(ne_request *req, int fd, - ne_off_t offset, ne_off_t length) -{ - req->body.file.fd = fd; - req->body.file.offset = offset; - req->body.file.length = length; - req->body_cb = body_fd_send; - req->body_ud = req; - set_body_length(req, length); -} - -void ne_set_request_flag(ne_request *req, ne_request_flag flag, int value) -{ - if (flag < NE_SESSFLAG_LAST) { - req->flags[flag] = value; - } -} - -int ne_get_request_flag(ne_request *req, ne_request_flag flag) -{ - if (flag < NE_REQFLAG_LAST) { - return req->flags[flag]; - } - return -1; -} - -void ne_add_request_header(ne_request *req, const char *name, - const char *value) -{ - ne_buffer_concat(req->headers, name, ": ", value, EOL, NULL); -} - -void ne_print_request_header(ne_request *req, const char *name, - const char *format, ...) -{ - va_list params; - char buf[NE_BUFSIZ]; - - va_start(params, format); - ne_vsnprintf(buf, sizeof buf, format, params); - va_end(params); - - ne_buffer_concat(req->headers, name, ": ", buf, EOL, NULL); -} - -/* Returns the value of the response header 'name', for which the hash - * value is 'h', or NULL if the header is not found. */ -static inline char *get_response_header_hv(ne_request *req, unsigned int h, - const char *name) -{ - struct field *f; - - for (f = req->response_headers[h]; f; f = f->next) - if (strcmp(f->name, name) == 0) - return f->value; - - return NULL; -} - -const char *ne_get_response_header(ne_request *req, const char *name) -{ - char *lcname = ne_strdup(name); - unsigned int hash = hash_and_lower(lcname); - char *value = get_response_header_hv(req, hash, lcname); - ne_free(lcname); - return value; -} - -/* The return value of the iterator function is a pointer to the - * struct field of the previously returned header. */ -void *ne_response_header_iterate(ne_request *req, void *iterator, - const char **name, const char **value) -{ - struct field *f = iterator; - unsigned int n; - - if (f == NULL) { - n = 0; - } else if ((f = f->next) == NULL) { - n = req->current_index + 1; - } - - if (f == NULL) { - while (n < HH_HASHSIZE && req->response_headers[n] == NULL) - n++; - if (n == HH_HASHSIZE) - return NULL; /* no more headers */ - f = req->response_headers[n]; - req->current_index = n; - } - - *name = f->name; - *value = f->value; - return f; -} - -/* Removes the response header 'name', which has hash value 'hash'. */ -static void remove_response_header(ne_request *req, const char *name, - unsigned int hash) -{ - struct field **ptr = req->response_headers + hash; - - while (*ptr) { - struct field *const f = *ptr; - - if (strcmp(f->name, name) == 0) { - *ptr = f->next; - ne_free(f->name); - ne_free(f->value); - ne_free(f); - return; - } - - ptr = &f->next; - } -} - -/* Free all stored response headers. */ -static void free_response_headers(ne_request *req) -{ - int n; - - for (n = 0; n < HH_HASHSIZE; n++) { - struct field **ptr = req->response_headers + n; - - while (*ptr) { - struct field *const f = *ptr; - *ptr = f->next; - ne_free(f->name); - ne_free(f->value); - ne_free(f); - } - } -} - -void ne_add_response_body_reader(ne_request *req, ne_accept_response acpt, - ne_block_reader rdr, void *userdata) -{ - struct body_reader *new = ne_malloc(sizeof *new); - new->accept_response = acpt; - new->handler = rdr; - new->userdata = userdata; - new->next = req->body_readers; - req->body_readers = new; -} - -void ne_request_destroy(ne_request *req) -{ - struct body_reader *rdr, *next_rdr; - struct hook *hk, *next_hk; - - ne_free(req->uri); - ne_free(req->method); - - for (rdr = req->body_readers; rdr != NULL; rdr = next_rdr) { - next_rdr = rdr->next; - ne_free(rdr); - } - - free_response_headers(req); - - ne_buffer_destroy(req->headers); - - NE_DEBUG(NE_DBG_HTTP, "Running destroy hooks.\n"); - for (hk = req->session->destroy_req_hooks; hk; hk = next_hk) { - ne_destroy_req_fn fn = (ne_destroy_req_fn)hk->fn; - next_hk = hk->next; - fn(req, hk->userdata); - } - - for (hk = req->private; hk; hk = next_hk) { - next_hk = hk->next; - ne_free(hk); - } - - if (req->status.reason_phrase) - ne_free(req->status.reason_phrase); - - NE_DEBUG(NE_DBG_HTTP, "Request ends.\n"); - ne_free(req); -} - - -/* Reads a block of the response into BUFFER, which is of size - * *BUFLEN. Returns zero on success or non-zero on error. On - * success, *BUFLEN is updated to be the number of bytes read into - * BUFFER (which will be 0 to indicate the end of the repsonse). On - * error, the connection is closed and the session error string is - * set. */ -static int read_response_block(ne_request *req, struct ne_response *resp, - char *buffer, size_t *buflen) -{ - ne_socket *const sock = req->session->socket; - size_t willread; - ssize_t readlen; - - switch (resp->mode) { - case R_CHUNKED: - /* Chunked transfer-encoding: chunk syntax is "SIZE CRLF CHUNK - * CRLF SIZE CRLF CHUNK CRLF ..." followed by zero-length - * chunk: "CHUNK CRLF 0 CRLF". resp.chunk.remain contains the - * number of bytes left to read in the current chunk. */ - if (resp->body.chunk.remain == 0) { - unsigned long chunk_len; - char *ptr; - - /* Read the chunk size line into a temporary buffer. */ - SOCK_ERR(req, - ne_sock_readline(sock, req->respbuf, sizeof req->respbuf), - _("Could not read chunk size")); - NE_DEBUG(NE_DBG_HTTP, "[chunk] < %s", req->respbuf); - chunk_len = strtoul(req->respbuf, &ptr, 16); - /* limit chunk size to <= UINT_MAX, so it will probably - * fit in a size_t. */ - if (ptr == req->respbuf || - chunk_len == ULONG_MAX || chunk_len > UINT_MAX) { - return aborted(req, _("Could not parse chunk size"), 0); - } - NE_DEBUG(NE_DBG_HTTP, "Got chunk size: %lu\n", chunk_len); - resp->body.chunk.remain = chunk_len; - } - willread = resp->body.chunk.remain > *buflen - ? *buflen : resp->body.chunk.remain; - break; - case R_CLENGTH: - willread = resp->body.clen.remain > (off_t)*buflen - ? *buflen : (size_t)resp->body.clen.remain; - break; - case R_TILLEOF: - willread = *buflen; - break; - case R_NO_BODY: - default: - willread = 0; - break; - } - if (willread == 0) { - *buflen = 0; - return 0; - } - NE_DEBUG(NE_DBG_HTTP, - "Reading %" NE_FMT_SIZE_T " bytes of response body.\n", willread); - readlen = ne_sock_read(sock, buffer, willread); - - /* EOF is only valid when response body is delimited by it. - * Strictly, an SSL truncation should not be treated as an EOF in - * any case, but SSL servers are just too buggy. */ - if (resp->mode == R_TILLEOF && - (readlen == NE_SOCK_CLOSED || readlen == NE_SOCK_TRUNC)) { - NE_DEBUG(NE_DBG_HTTP, "Got EOF.\n"); - req->can_persist = 0; - readlen = 0; - } else if (readlen < 0) { - return aborted(req, _("Could not read response body"), readlen); - } else { - NE_DEBUG(NE_DBG_HTTP, "Got %" NE_FMT_SSIZE_T " bytes.\n", readlen); - } - /* safe to cast: readlen guaranteed to be >= 0 above */ - *buflen = (size_t)readlen; - NE_DEBUG(NE_DBG_HTTPBODY, - "Read block (%" NE_FMT_SSIZE_T " bytes):\n[%.*s]\n", - readlen, (int)readlen, buffer); - if (resp->mode == R_CHUNKED) { - resp->body.chunk.remain -= readlen; - if (resp->body.chunk.remain == 0) { - char crlfbuf[2]; - /* If we've read a whole chunk, read a CRLF */ - readlen = ne_sock_fullread(sock, crlfbuf, 2); - if (readlen < 0) - return aborted(req, _("Could not read chunk delimiter"), - readlen); - else if (crlfbuf[0] != '\r' || crlfbuf[1] != '\n') - return aborted(req, _("Chunk delimiter was invalid"), 0); - } - } else if (resp->mode == R_CLENGTH) { - resp->body.clen.remain -= readlen; - } - resp->progress += readlen; - return NE_OK; -} - -ssize_t ne_read_response_block(ne_request *req, char *buffer, size_t buflen) -{ - struct body_reader *rdr; - size_t readlen = buflen; - struct ne_response *const resp = &req->resp; - - if (read_response_block(req, resp, buffer, &readlen)) - return -1; - - if (readlen) { - req->session->status.sr.progress += readlen; - notify_status(req->session, ne_status_recving); - } - - for (rdr = req->body_readers; rdr!=NULL; rdr=rdr->next) { - if (rdr->use && rdr->handler(rdr->userdata, buffer, readlen) != 0) { - ne_close_connection(req->session); - return -1; - } - } - - return readlen; -} - -/* Build the request string, returning the buffer. */ -static ne_buffer *build_request(ne_request *req) -{ - struct hook *hk; - ne_buffer *buf = ne_buffer_create(); - - /* Add Request-Line and Host header: */ - ne_buffer_concat(buf, req->method, " ", req->uri, " HTTP/1.1" EOL, - "Host: ", req->session->server.hostport, EOL, NULL); - - /* Add custom headers: */ - ne_buffer_append(buf, req->headers->data, ne_buffer_size(req->headers)); - -#define E100 "Expect: 100-continue" EOL - if (req->flags[NE_REQFLAG_EXPECT100]) - ne_buffer_append(buf, E100, strlen(E100)); - - NE_DEBUG(NE_DBG_HTTP, "Running pre_send hooks\n"); - for (hk = req->session->pre_send_hooks; hk!=NULL; hk = hk->next) { - ne_pre_send_fn fn = (ne_pre_send_fn)hk->fn; - fn(req, hk->userdata, buf); - } - - ne_buffer_append(buf, "\r\n", 2); - return buf; -} - -#ifdef NE_DEBUGGING -#define DEBUG_DUMP_REQUEST(x) dump_request(x) - -static void dump_request(const char *request) -{ - if (ne_debug_mask & NE_DBG_HTTPPLAIN) { - /* Display everything mode */ - NE_DEBUG(NE_DBG_HTTP, "Sending request headers:\n%s", request); - } else if (ne_debug_mask & NE_DBG_HTTP) { - /* Blank out the Authorization paramaters */ - char *reqdebug = ne_strdup(request), *pnt = reqdebug; - while ((pnt = strstr(pnt, "Authorization: ")) != NULL) { - for (pnt += 15; *pnt != '\r' && *pnt != '\0'; pnt++) { - *pnt = 'x'; - } - } - NE_DEBUG(NE_DBG_HTTP, "Sending request headers:\n%s", reqdebug); - ne_free(reqdebug); - } -} - -#else -#define DEBUG_DUMP_REQUEST(x) -#endif /* DEBUGGING */ - -/* remove trailing EOL from 'buf', where strlen(buf) == *len. *len is - * adjusted in accordance with any changes made to the string to - * remain equal to strlen(buf). */ -static inline void strip_eol(char *buf, ssize_t *len) -{ - char *pnt = buf + *len - 1; - while (pnt >= buf && (*pnt == '\r' || *pnt == '\n')) { - *pnt-- = '\0'; - (*len)--; - } -} - -/* Read and parse response status-line into 'status'. 'retry' is non-zero - * if an NE_RETRY should be returned if an EOF is received. */ -static int read_status_line(ne_request *req, ne_status *status, int retry) -{ - char *buffer = req->respbuf; - ssize_t ret; - - ret = ne_sock_readline(req->session->socket, buffer, sizeof req->respbuf); - if (ret <= 0) { - int aret = aborted(req, _("Could not read status line"), ret); - return RETRY_RET(retry, ret, aret); - } - - NE_DEBUG(NE_DBG_HTTP, "[status-line] < %s", buffer); - strip_eol(buffer, &ret); - - if (status->reason_phrase) ne_free(status->reason_phrase); - memset(status, 0, sizeof *status); - - /* Hack to allow ShoutCast-style servers, if requested. */ - if (req->session->flags[NE_SESSFLAG_ICYPROTO] - && strncmp(buffer, "ICY ", 4) == 0 && strlen(buffer) > 8 - && buffer[7] == ' ') { - status->code = atoi(buffer + 4); - status->major_version = 1; - status->minor_version = 0; - status->reason_phrase = ne_strclean(ne_strdup(buffer + 8)); - status->klass = buffer[4] - '0'; - NE_DEBUG(NE_DBG_HTTP, "[status-line] ICY protocol; code %d\n", - status->code); - } else if (ne_parse_statusline(buffer, status)) { - return aborted(req, _("Could not parse response status line"), 0); - } - - return 0; -} - -/* Discard a set of message headers. */ -static int discard_headers(ne_request *req) -{ - do { - SOCK_ERR(req, ne_sock_readline(req->session->socket, req->respbuf, - sizeof req->respbuf), - _("Could not read interim response headers")); - NE_DEBUG(NE_DBG_HTTP, "[discard] < %s", req->respbuf); - } while (strcmp(req->respbuf, EOL) != 0); - return NE_OK; -} - -/* Send the request, and read the response Status-Line. Returns: - * NE_RETRY connection closed by server; persistent connection - * timeout - * NE_OK success - * NE_* error - * On NE_RETRY and NE_* responses, the connection will have been - * closed already. - */ -static int send_request(ne_request *req, const ne_buffer *request) -{ - ne_session *const sess = req->session; - ne_status *const status = &req->status; - int sentbody = 0; /* zero until body has been sent. */ - int ret, retry; /* retry non-zero whilst the request should be retried */ - ssize_t sret; - - /* Send the Request-Line and headers */ - NE_DEBUG(NE_DBG_HTTP, "Sending request-line and headers:\n"); - /* Open the connection if necessary */ - ret = open_connection(sess); - if (ret) return ret; - - /* Allow retry if a persistent connection has been used. */ - retry = sess->persisted; - - sret = ne_sock_fullwrite(req->session->socket, request->data, - ne_buffer_size(request)); - if (sret < 0) { - int aret = aborted(req, _("Could not send request"), sret); - return RETRY_RET(retry, sret, aret); - } - - if (!req->flags[NE_REQFLAG_EXPECT100] && req->body_length > 0) { - /* Send request body, if not using 100-continue. */ - ret = send_request_body(req, retry); - if (ret) { - return ret; - } - } - - NE_DEBUG(NE_DBG_HTTP, "Request sent; retry is %d.\n", retry); - - /* Loop eating interim 1xx responses (RFC2616 says these MAY be - * sent by the server, even if 100-continue is not used). */ - while ((ret = read_status_line(req, status, retry)) == NE_OK - && status->klass == 1) { - NE_DEBUG(NE_DBG_HTTP, "Interim %d response.\n", status->code); - retry = 0; /* successful read() => never retry now. */ - /* Discard headers with the interim response. */ - if ((ret = discard_headers(req)) != NE_OK) break; - - if (req->flags[NE_REQFLAG_EXPECT100] && (status->code == 100) - && req->body_length > 0 && !sentbody) { - /* Send the body after receiving the first 100 Continue */ - if ((ret = send_request_body(req, 0)) != NE_OK) break; - sentbody = 1; - } - } - - return ret; -} - -/* Read a message header from sock into buf, which has size 'buflen'. - * - * Returns: - * NE_RETRY: Success, read a header into buf. - * NE_OK: End of headers reached. - * NE_ERROR: Error (session error is set, connection closed). - */ -static int read_message_header(ne_request *req, char *buf, size_t buflen) -{ - ssize_t n; - ne_socket *sock = req->session->socket; - - n = ne_sock_readline(sock, buf, buflen); - if (n <= 0) - return aborted(req, _("Error reading response headers"), n); - NE_DEBUG(NE_DBG_HTTP, "[hdr] %s", buf); - - strip_eol(buf, &n); - - if (n == 0) { - NE_DEBUG(NE_DBG_HTTP, "End of headers.\n"); - return NE_OK; - } - - buf += n; - buflen -= n; - - while (buflen > 0) { - char ch; - - /* Collect any extra lines into buffer */ - SOCK_ERR(req, ne_sock_peek(sock, &ch, 1), - _("Error reading response headers")); - - if (ch != ' ' && ch != '\t') { - /* No continuation of this header: stop reading. */ - return NE_RETRY; - } - - /* Otherwise, read the next line onto the end of 'buf'. */ - n = ne_sock_readline(sock, buf, buflen); - if (n <= 0) { - return aborted(req, _("Error reading response headers"), n); - } - - NE_DEBUG(NE_DBG_HTTP, "[cont] %s", buf); - - strip_eol(buf, &n); - - /* assert(buf[0] == ch), which implies len(buf) > 0. - * Otherwise the TCP stack is lying, but we'll be paranoid. - * This might be a \t, so replace it with a space to be - * friendly to applications (2616 says we MAY do this). */ - if (n) buf[0] = ' '; - - /* ready for the next header. */ - buf += n; - buflen -= n; - } - - ne_set_error(req->session, _("Response header too long")); - return NE_ERROR; -} - -#define MAX_HEADER_LEN (8192) - -/* Add a respnose header field for the given request, using - * precalculated hash value. */ -static void add_response_header(ne_request *req, unsigned int hash, - char *name, char *value) -{ - struct field **nextf = &req->response_headers[hash]; - size_t vlen = strlen(value); - - while (*nextf) { - struct field *const f = *nextf; - if (strcmp(f->name, name) == 0) { - if (vlen + f->vlen < MAX_HEADER_LEN) { - /* merge the header field */ - f->value = ne_realloc(f->value, f->vlen + vlen + 3); - memcpy(f->value + f->vlen, ", ", 2); - memcpy(f->value + f->vlen + 2, value, vlen + 1); - f->vlen += vlen + 2; - } - return; - } - nextf = &f->next; - } - - (*nextf) = ne_malloc(sizeof **nextf); - (*nextf)->name = ne_strdup(name); - (*nextf)->value = ne_strdup(value); - (*nextf)->vlen = vlen; - (*nextf)->next = NULL; -} - -/* Read response headers. Returns NE_* code, sets session error and - * closes connection on error. */ -static int read_response_headers(ne_request *req) -{ - char hdr[MAX_HEADER_LEN]; - int ret, count = 0; - - while ((ret = read_message_header(req, hdr, sizeof hdr)) == NE_RETRY - && ++count < MAX_HEADER_FIELDS) { - char *pnt; - unsigned int hash = 0; - - /* Strip any trailing whitespace */ - pnt = hdr + strlen(hdr) - 1; - while (pnt > hdr && (*pnt == ' ' || *pnt == '\t')) - *pnt-- = '\0'; - - /* Convert the header name to lower case and hash it. */ - for (pnt = hdr; (*pnt != '\0' && *pnt != ':' && - *pnt != ' ' && *pnt != '\t'); pnt++) { - *pnt = ne_tolower(*pnt); - hash = HH_ITERATE(hash,*pnt); - } - - /* Skip over any whitespace before the colon. */ - while (*pnt == ' ' || *pnt == '\t') - *pnt++ = '\0'; - - /* ignore header lines which lack a ':'. */ - if (*pnt != ':') - continue; - - /* NUL-terminate at the colon (when no whitespace before) */ - *pnt++ = '\0'; - - /* Skip any whitespace after the colon... */ - while (*pnt == ' ' || *pnt == '\t') - pnt++; - - /* pnt now points to the header value. */ - NE_DEBUG(NE_DBG_HTTP, "Header Name: [%s], Value: [%s]\n", hdr, pnt); - add_response_header(req, hash, hdr, pnt); - } - - if (count == MAX_HEADER_FIELDS) - ret = aborted( - req, _("Response exceeded maximum number of header fields"), 0); - - return ret; -} - -/* Perform any necessary DNS lookup for the host given by *info; - * return NE_ code. */ -static int lookup_host(ne_session *sess, struct host_info *info) -{ - if (sess->addrlist) return NE_OK; - - NE_DEBUG(NE_DBG_HTTP, "Doing DNS lookup on %s...\n", info->hostname); - sess->status.lu.hostname = info->hostname; - notify_status(sess, ne_status_lookup); - info->address = ne_addr_resolve(info->hostname, 0); - if (ne_addr_result(info->address)) { - char buf[256]; - ne_set_error(sess, _("Could not resolve hostname `%s': %s"), - info->hostname, - ne_addr_error(info->address, buf, sizeof buf)); - ne_addr_destroy(info->address); - info->address = NULL; - return NE_LOOKUP; - } else { - return NE_OK; - } -} - -int ne_begin_request(ne_request *req) -{ - struct body_reader *rdr; - ne_buffer *data; - const ne_status *const st = &req->status; - const char *value; - struct hook *hk; - int ret; - - /* If a non-idempotent request is sent on a persisted connection, - * then it is impossible to distinguish between a server failure - * and a connection timeout if an EOF/RST is received. So don't - * do that. */ - if (!req->flags[NE_REQFLAG_IDEMPOTENT] && req->session->persisted - && !req->session->flags[NE_SESSFLAG_CONNAUTH]) { - NE_DEBUG(NE_DBG_HTTP, "req: Closing connection for non-idempotent " - "request.\n"); - ne_close_connection(req->session); - } - - /* Build the request string, and send it */ - data = build_request(req); - DEBUG_DUMP_REQUEST(data->data); - ret = send_request(req, data); - /* Retry this once after a persistent connection timeout. */ - if (ret == NE_RETRY) { - NE_DEBUG(NE_DBG_HTTP, "Persistent connection timed out, retrying.\n"); - ret = send_request(req, data); - } - ne_buffer_destroy(data); - if (ret != NE_OK) return ret == NE_RETRY ? NE_ERROR : ret; - - /* Determine whether server claims HTTP/1.1 compliance. */ - req->session->is_http11 = (st->major_version == 1 && - st->minor_version > 0) || st->major_version > 1; - - /* Persistent connections supported implicitly in HTTP/1.1 */ - if (req->session->is_http11) req->can_persist = 1; - - ne_set_error(req->session, "%d %s", st->code, st->reason_phrase); - - /* Empty the response header hash, in case this request was - * retried: */ - free_response_headers(req); - - /* Read the headers */ - ret = read_response_headers(req); - if (ret) return ret; - - /* check the Connection header */ - value = get_response_header_hv(req, HH_HV_CONNECTION, "connection"); - if (value) { - char *vcopy = ne_strdup(value), *ptr = vcopy; - - do { - char *token = ne_shave(ne_token(&ptr, ','), " \t"); - unsigned int hash = hash_and_lower(token); - - if (strcmp(token, "close") == 0) { - req->can_persist = 0; - } else if (strcmp(token, "keep-alive") == 0) { - req->can_persist = 1; - } else if (!req->session->is_http11 - && strcmp(token, "connection")) { - /* Strip the header per 2616§14.10, last para. Avoid - * danger from "Connection: connection". */ - remove_response_header(req, token, hash); - } - } while (ptr); - - ne_free(vcopy); - } - - /* Decide which method determines the response message-length per - * 2616§4.4 (multipart/byteranges is not supported): */ - -#ifdef NE_HAVE_SSL - /* Special case for CONNECT handling: the response has no body, - * and the connection can persist. */ - if (req->session->in_connect && st->klass == 2) { - req->resp.mode = R_NO_BODY; - req->can_persist = 1; - } else -#endif - /* HEAD requests and 204, 304 responses have no response body, - * regardless of what headers are present. */ - if (req->method_is_head || st->code == 204 || st->code == 304) { - req->resp.mode = R_NO_BODY; - } - /* Broken intermediaries exist which use "transfer-encoding: identity" - * to mean "no transfer-coding". So that case must be ignored. */ - else if ((value = get_response_header_hv(req, HH_HV_TRANSFER_ENCODING, - "transfer-encoding")) != NULL - && ne_strcasecmp(value, "identity") != 0) { - /* Otherwise, fail iff an unknown transfer-coding is used. */ - if (ne_strcasecmp(value, "chunked") == 0) { - req->resp.mode = R_CHUNKED; - req->resp.body.chunk.remain = 0; - } - else { - return aborted(req, _("Unknown transfer-coding in response"), 0); - } - } - else if ((value = get_response_header_hv(req, HH_HV_CONTENT_LENGTH, - "content-length")) != NULL) { - ne_off_t len = ne_strtoff(value, NULL, 10); - if (len != NE_OFFT_MAX && len >= 0) { - req->resp.mode = R_CLENGTH; - req->resp.body.clen.total = req->resp.body.clen.remain = len; - } else { - /* fail for an invalid content-length header. */ - return aborted(req, _("Invalid Content-Length in response"), 0); - } - } else { - req->resp.mode = R_TILLEOF; /* otherwise: read-till-eof mode */ - } - - NE_DEBUG(NE_DBG_HTTP, "Running post_headers hooks\n"); - for (hk = req->session->post_headers_hooks; hk != NULL; hk = hk->next) { - ne_post_headers_fn fn = (ne_post_headers_fn)hk->fn; - fn(req, hk->userdata, &req->status); - } - - /* Prepare for reading the response entity-body. Call each of the - * body readers and ask them whether they want to accept this - * response or not. */ - for (rdr = req->body_readers; rdr != NULL; rdr=rdr->next) { - rdr->use = rdr->accept_response(rdr->userdata, req, st); - } - - req->session->status.sr.progress = 0; - req->session->status.sr.total = - req->resp.mode == R_CLENGTH ? req->resp.body.clen.total : -1; - notify_status(req->session, ne_status_recving); - - return NE_OK; -} - -int ne_end_request(ne_request *req) -{ - struct hook *hk; - int ret; - - /* Read headers in chunked trailers */ - if (req->resp.mode == R_CHUNKED) { - ret = read_response_headers(req); - if (ret) return ret; - } else { - ret = NE_OK; - } - - NE_DEBUG(NE_DBG_HTTP, "Running post_send hooks\n"); - for (hk = req->session->post_send_hooks; - ret == NE_OK && hk != NULL; hk = hk->next) { - ne_post_send_fn fn = (ne_post_send_fn)hk->fn; - ret = fn(req, hk->userdata, &req->status); - } - - /* Close the connection if persistent connections are disabled or - * not supported by the server. */ - if (!req->session->flags[NE_SESSFLAG_PERSIST] || !req->can_persist) - ne_close_connection(req->session); - else - req->session->persisted = 1; - - return ret; -} - -int ne_read_response_to_fd(ne_request *req, int fd) -{ - ssize_t len; - - while ((len = ne_read_response_block(req, req->respbuf, - sizeof req->respbuf)) > 0) { - const char *block = req->respbuf; - - do { - ssize_t ret = write(fd, block, len); - if (ret == -1 && errno == EINTR) { - continue; - } else if (ret < 0) { - char err[200]; - ne_strerror(errno, err, sizeof err); - ne_set_error(ne_get_session(req), - _("Could not write to file: %s"), err); - return NE_ERROR; - } else { - len -= ret; - block += ret; - } - } while (len > 0); - } - - return len == 0 ? NE_OK : NE_ERROR; -} - -int ne_discard_response(ne_request *req) -{ - ssize_t len; - - do { - len = ne_read_response_block(req, req->respbuf, sizeof req->respbuf); - } while (len > 0); - - return len == 0 ? NE_OK : NE_ERROR; -} - -int ne_request_dispatch(ne_request *req) -{ - int ret; - - do { - ret = ne_begin_request(req); - if (ret == NE_OK) ret = ne_discard_response(req); - if (ret == NE_OK) ret = ne_end_request(req); - } while (ret == NE_RETRY); - - NE_DEBUG(NE_DBG_HTTP | NE_DBG_FLUSH, - "Request ends, status %d class %dxx, error line:\n%s\n", - req->status.code, req->status.klass, req->session->error); - - return ret; -} - -const ne_status *ne_get_status(const ne_request *req) -{ - return &req->status; -} - -ne_session *ne_get_session(const ne_request *req) -{ - return req->session; -} - -#ifdef NE_HAVE_SSL -/* Create a CONNECT tunnel through the proxy server. - * Returns HTTP_* */ -static int proxy_tunnel(ne_session *sess) -{ - /* Hack up an HTTP CONNECT request... */ - ne_request *req; - int ret = NE_OK; - char ruri[200]; - - /* Can't use server.hostport here; Request-URI must include `:port' */ - ne_snprintf(ruri, sizeof ruri, "%s:%u", sess->server.hostname, - sess->server.port); - req = ne_request_create(sess, "CONNECT", ruri); - - sess->in_connect = 1; - ret = ne_request_dispatch(req); - sess->in_connect = 0; - - sess->persisted = 0; /* don't treat this is a persistent connection. */ - - if (ret != NE_OK || !sess->connected || req->status.klass != 2) { - char *err = ne_strdup(sess->error); - ne_set_error(sess, _("Could not create SSL connection " - "through proxy server: %s"), err); - ne_free(err); - if (ret == NE_OK) ret = NE_ERROR; - } - - ne_request_destroy(req); - return ret; -} -#endif - -/* Return the first resolved address for the given host. */ -static const ne_inet_addr *resolve_first(ne_session *sess, - struct host_info *host) -{ - if (sess->addrlist) { - sess->curaddr = 0; - return sess->addrlist[0]; - } else { - return ne_addr_first(host->address); - } -} - -/* Return the next resolved address for the given host or NULL if - * there are no more addresses. */ -static const ne_inet_addr *resolve_next(ne_session *sess, - struct host_info *host) -{ - if (sess->addrlist) { - if (sess->curaddr++ < sess->numaddrs) - return sess->addrlist[sess->curaddr]; - else - return NULL; - } else { - return ne_addr_next(host->address); - } -} - -/* Make new TCP connection to server at 'host' of type 'name'. Note - * that once a connection to a particular network address has - * succeeded, that address will be used first for the next attempt to - * connect. */ -static int do_connect(ne_session *sess, struct host_info *host, const char *err) -{ - int ret; - - if ((sess->socket = ne_sock_create()) == NULL) { - ne_set_error(sess, _("Could not create socket")); - return NE_ERROR; - } - - if (sess->cotimeout) - ne_sock_connect_timeout(sess->socket, sess->cotimeout); - - if (host->current == NULL) - host->current = resolve_first(sess, host); - - sess->status.ci.hostname = host->hostname; - - do { - sess->status.ci.address = host->current; - notify_status(sess, ne_status_connecting); -#ifdef NE_DEBUGGING - if (ne_debug_mask & NE_DBG_HTTP) { - char buf[150]; - NE_DEBUG(NE_DBG_HTTP, "Connecting to %s\n", - ne_iaddr_print(host->current, buf, sizeof buf)); - } -#endif - ret = ne_sock_connect(sess->socket, host->current, host->port); - } while (ret && /* try the next address... */ - (host->current = resolve_next(sess, host)) != NULL); - - if (ret) { - ne_set_error(sess, "%s: %s", err, ne_sock_error(sess->socket)); - ne_sock_close(sess->socket); - return NE_CONNECT; - } - - notify_status(sess, ne_status_connected); - - if (sess->rdtimeout) - ne_sock_read_timeout(sess->socket, sess->rdtimeout); - - sess->connected = 1; - /* clear persistent connection flag. */ - sess->persisted = 0; - return NE_OK; -} - -static int open_connection(ne_session *sess) -{ - int ret; - struct host_info *host; - - if (sess->connected) return NE_OK; - - /* Resolve hostname if necessary. */ - host = sess->use_proxy ? &sess->proxy : &sess->server; - if (host->address == NULL) { - ret = lookup_host(sess, host); - if (ret) return ret; - } - - ret = do_connect(sess, host, - sess->use_proxy ? - _("Could not connect to proxy server") - : _("Could not connect to server")); - if (ret != NE_OK) return ret; - -#ifdef NE_HAVE_SSL - /* Negotiate SSL layer if required. */ - if (sess->use_ssl && !sess->in_connect) { - /* CONNECT tunnel */ - if (sess->use_proxy) - ret = proxy_tunnel(sess); - - if (ret == NE_OK) { - ret = ne__negotiate_ssl(sess); - if (ret != NE_OK) - ne_close_connection(sess); - } - } -#endif - - return ret; -} diff --git a/client/neon-0.27.2/src/ne_request.h b/client/neon-0.27.2/src/ne_request.h deleted file mode 100644 index b0578695e..000000000 --- a/client/neon-0.27.2/src/ne_request.h +++ /dev/null @@ -1,309 +0,0 @@ -/* - HTTP Request Handling - Copyright (C) 1999-2006, Joe Orton - - 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 - -*/ - -#ifndef NE_REQUEST_H -#define NE_REQUEST_H - -#include "ne_utils.h" /* For ne_status */ -#include "ne_string.h" /* For ne_buffer */ -#include "ne_session.h" - -NE_BEGIN_DECLS - -#define NE_OK (0) /* Success */ -#define NE_ERROR (1) /* Generic error; use ne_get_error(session) for message */ -#define NE_LOOKUP (2) /* Server or proxy hostname lookup failed */ -#define NE_AUTH (3) /* User authentication failed on server */ -#define NE_PROXYAUTH (4) /* User authentication failed on proxy */ -#define NE_CONNECT (5) /* Could not connect to server */ -#define NE_TIMEOUT (6) /* Connection timed out */ -#define NE_FAILED (7) /* The precondition failed */ -#define NE_RETRY (8) /* Retry request (ne_end_request ONLY) */ -#define NE_REDIRECT (9) /* See ne_redirect.h */ - -/* Opaque object representing a single HTTP request. */ -typedef struct ne_request_s ne_request; - -/***** Request Handling *****/ - -/* Create a request in session 'sess', with given method and path. - * 'path' must conform to the 'abs_path' grammar in RFC2396, with an - * optional "? query" part, and MUST be URI-escaped by the caller. */ -ne_request *ne_request_create(ne_session *sess, - const char *method, const char *path); - -/* The request body will be taken from 'size' bytes of 'buffer'. */ -void ne_set_request_body_buffer(ne_request *req, const char *buffer, - size_t size); - -/* The request body will be taken from 'length' bytes read from the - * file descriptor 'fd', starting from file offset 'offset'. */ -void ne_set_request_body_fd(ne_request *req, int fd, - ne_off_t offset, ne_off_t length); - -/* "Pull"-based request body provider: a callback which is invoked to - * provide blocks of request body on demand. - * - * Before each time the body is provided, the callback will be called - * once with buflen == 0. The body may have to be provided >1 time - * per request (for authentication retries etc.). - * - * For a call with buflen == 0, the callback must return zero on success - * or non-zero on error; the session error string must be set on error. - * For a call with buflen > 0, the callback must return: - * <0 : error, abort request; session error string must be set. - * 0 : ignore 'buffer' contents, end of body. - * 0 < x <= buflen : buffer contains x bytes of body data. */ -typedef ssize_t (*ne_provide_body)(void *userdata, - char *buffer, size_t buflen); - -/* Install a callback which is invoked as needed to provide the - * request body, a block at a time. The total size of the request - * body is 'length'; the callback must ensure that it returns no more - * than 'length' bytes in total. */ -void ne_set_request_body_provider(ne_request *req, ne_off_t length, - ne_provide_body provider, void *userdata); - -/* Handling response bodies; two callbacks must be provided: - * - * 1) 'acceptance' callback: determines whether you want to handle the - * response body given the response-status information, e.g., if you - * only want 2xx responses, say so here. - * - * 2) 'reader' callback: passed blocks of the response-body as they - * arrive, if the acceptance callback returned non-zero. */ - -/* 'acceptance' callback type. Return non-zero to accept the response, - * else zero to ignore it. */ -typedef int (*ne_accept_response)(void *userdata, ne_request *req, - const ne_status *st); - -/* An 'acceptance' callback which only accepts 2xx-class responses. - * Ignores userdata. */ -int ne_accept_2xx(void *userdata, ne_request *req, const ne_status *st); - -/* An acceptance callback which accepts all responses. Ignores - * userdata. */ -int ne_accept_always(void *userdata, ne_request *req, const ne_status *st); - -/* Callback for reading a block of data. Returns zero on success, or - * non-zero on error. If returning an error, the response will be - * aborted and the callback will not be invoked again. The request - * dispatch (or ne_read_response_block call) will fail with NE_ERROR; - * the session error string should have been set by the callback. */ -typedef int (*ne_block_reader)(void *userdata, const char *buf, size_t len); - -/* Add a response reader for the given request, with the given - * acceptance function. userdata is passed as the first argument to - * the acceptance + reader callbacks. - * - * The acceptance callback is called once each time the request is - * sent: it may be sent >1 time because of authentication retries etc. - * For each time the acceptance callback is called, if it returns - * non-zero, blocks of the response body will be passed to the reader - * callback as the response is read. After all the response body has - * been read, the callback will be called with a 'len' argument of - * zero. */ -void ne_add_response_body_reader(ne_request *req, ne_accept_response accpt, - ne_block_reader reader, void *userdata); - -/* Retrieve the value of the response header field with given name; - * returns NULL if no response header with given name was found. The - * return value is valid only until the next call to either - * ne_request_destroy or ne_begin_request for this request. */ -const char *ne_get_response_header(ne_request *req, const char *name); - -/* Iterator interface for response headers: if passed a NULL cursor, - * returns the first header; if passed a non-NULL cursor pointer, - * returns the next header. The return value is a cursor pointer: if - * it is non-NULL, *name and *value are set to the name and value of - * the header field. If the return value is NULL, no more headers are - * found, *name and *value are undefined. - * - * The order in which response headers is returned is undefined. Both - * the cursor and name/value pointers are valid only until the next - * call to either ne_request_destroy or ne_begin_request for this - * request. */ -void *ne_response_header_iterate(ne_request *req, void *cursor, - const char **name, const char **value); - -/* Adds a header to the request with given name and value. */ -void ne_add_request_header(ne_request *req, const char *name, - const char *value); -/* Adds a header to the request with given name, using printf-like - * format arguments for the value. */ -void ne_print_request_header(ne_request *req, const char *name, - const char *format, ...) - ne_attribute((format(printf, 3, 4))); - -/* ne_request_dispatch: Sends the given request, and reads the - * response. Returns: - * - NE_OK if the request was sent and response read successfully - * - NE_AUTH, NE_PROXYAUTH for a server or proxy server authentication error - * - NE_CONNECT if connection could not be established - * - NE_TIMEOUT if an timeout occurred sending or reading from the server - * - NE_ERROR for other fatal dispatch errors - * On any error, the session error string is set. On success or - * authentication error, the actual response-status can be retrieved using - * ne_get_status(). */ -int ne_request_dispatch(ne_request *req); - -/* Returns a pointer to the response status information for the given - * request; pointer is valid until request object is destroyed. */ -const ne_status *ne_get_status(const ne_request *req) ne_attribute((const)); - -/* Returns pointer to session associated with request. */ -ne_session *ne_get_session(const ne_request *req) ne_attribute((const)); - -/* Destroy memory associated with request pointer */ -void ne_request_destroy(ne_request *req); - -/* "Caller-pulls" request interface. This is an ALTERNATIVE interface - * to ne_request_dispatch: either use that, or do all this yourself: - * - * caller must call: - * 1. ne_begin_request (fail if returns non-NE_OK) - * 2. while(ne_read_response_block(...) > 0) ... loop ...; - * (fail if ne_read_response_block returns <0) - * 3. ne_end_request - * - * ne_end_request and ne_begin_request both return an NE_* code; if - * ne_end_request returns NE_RETRY, you must restart the loop from (1) - * above. */ -int ne_begin_request(ne_request *req); -int ne_end_request(ne_request *req); - -/* Read a block of the response into the passed buffer of size 'buflen'. - * - * Returns: - * <0 - error, stop reading. - * 0 - end of response - * >0 - number of bytes read into buffer. - */ -ssize_t ne_read_response_block(ne_request *req, char *buffer, size_t buflen); - -/* Read response blocks until end of response; exactly equivalent to - * calling ne_read_response_block() until it returns 0. Returns - * non-zero on error. */ -int ne_discard_response(ne_request *req); - -/* Read response blocks until end of response, writing content to the - * given file descriptor. Returns NE_ERROR on error. */ -int ne_read_response_to_fd(ne_request *req, int fd); - -/* Defined request flags: */ -typedef enum ne_request_flag_e { - NE_REQFLAG_EXPECT100 = 0, /* enable this flag to enable use of the - * "Expect: 100-continue" for the - * request. */ - - NE_REQFLAG_IDEMPOTENT, /* disable this flag if the request uses a - * non-idempotent method such as POST. */ - - NE_REQFLAG_LAST /* enum sentinel value */ -} ne_request_flag; - -/* Set a new value for a particular request flag. */ -void ne_set_request_flag(ne_request *req, ne_request_flag flag, int value); - -/* Return 0 if the given flag is not set, >0 it is set, or -1 if the - * flag is not supported. */ -int ne_get_request_flag(ne_request *req, ne_request_flag flag); - -/**** Request hooks handling *****/ - -typedef void (*ne_free_hooks)(void *cookie); - -/* Hook called when a request is created; passed the request method, - * and the string used as the Request-URI (note that this may be a - * absolute URI if a proxy is in use, an absolute path, a "*", etc). - * A create_request hook is called exactly once per request. */ -typedef void (*ne_create_request_fn)(ne_request *req, void *userdata, - const char *method, const char *requri); -void ne_hook_create_request(ne_session *sess, - ne_create_request_fn fn, void *userdata); - -/* Hook called before the request is sent. 'header' is the raw HTTP - * header before the trailing CRLF is added; more headers can be added - * here. A pre_send hook may be called >1 time per request if the - * request is retried due to a post_send hook returning NE_RETRY. */ -typedef void (*ne_pre_send_fn)(ne_request *req, void *userdata, - ne_buffer *header); -void ne_hook_pre_send(ne_session *sess, ne_pre_send_fn fn, void *userdata); - -/* Hook called directly after the response headers have been read, but - * before the resposnse body has been read. 'status' is the response - * status-code. A post_header hook may be called >1 time per request - * if the request is retried due to a post_send hook returning - * NE_RETRY. */ -typedef void (*ne_post_headers_fn)(ne_request *req, void *userdata, - const ne_status *status); -void ne_hook_post_headers(ne_session *sess, - ne_post_headers_fn fn, void *userdata); - -/* Hook called after the request is dispatched (request sent, and - * the entire response read). If an error occurred reading the response, - * this hook will not run. May return: - * NE_OK everything is okay - * NE_RETRY try sending the request again. - * anything else signifies an error, and the request is failed. The return - * code is passed back the _dispatch caller, so the session error must - * also be set appropriately (ne_set_error). - */ -typedef int (*ne_post_send_fn)(ne_request *req, void *userdata, - const ne_status *status); -void ne_hook_post_send(ne_session *sess, ne_post_send_fn fn, void *userdata); - -/* Hook called when the function is destroyed. */ -typedef void (*ne_destroy_req_fn)(ne_request *req, void *userdata); -void ne_hook_destroy_request(ne_session *sess, - ne_destroy_req_fn fn, void *userdata); - -typedef void (*ne_destroy_sess_fn)(void *userdata); -/* Hook called when the session is destroyed. */ -void ne_hook_destroy_session(ne_session *sess, - ne_destroy_sess_fn fn, void *userdata); - -/* The ne_unhook_* functions remove a hook registered with the given - * session. If a hook is found which was registered with a given - * function 'fn', and userdata pointer 'userdata', then it will be - * removed from the hooks list. - * - * It is unsafe to use any of these functions from a hook function to - * unregister itself, except for ne_unhook_destroy_request. */ -void ne_unhook_create_request(ne_session *sess, - ne_create_request_fn fn, void *userdata); -void ne_unhook_pre_send(ne_session *sess, ne_pre_send_fn fn, void *userdata); -void ne_unhook_post_headers(ne_session *sess, ne_post_headers_fn fn, void *userdata); -void ne_unhook_post_send(ne_session *sess, ne_post_send_fn fn, void *userdata); -void ne_unhook_destroy_request(ne_session *sess, - ne_destroy_req_fn fn, void *userdata); -void ne_unhook_destroy_session(ne_session *sess, - ne_destroy_sess_fn fn, void *userdata); - -/* Store an opaque context for the request, 'priv' is returned by a - * call to ne_request_get_private with the same ID. */ -void ne_set_request_private(ne_request *req, const char *id, void *priv); -void *ne_get_request_private(ne_request *req, const char *id); - -NE_END_DECLS - -#endif /* NE_REQUEST_H */ diff --git a/client/neon-0.27.2/src/ne_session.c b/client/neon-0.27.2/src/ne_session.c deleted file mode 100644 index 090a45f1a..000000000 --- a/client/neon-0.27.2/src/ne_session.c +++ /dev/null @@ -1,493 +0,0 @@ -/* - HTTP session handling - Copyright (C) 1999-2007, Joe Orton - Portions are: - Copyright (C) 1999-2000 Tommi Komulainen - - 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 - -*/ - -#include "config.h" - -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_ERRNO_H -#include -#endif - -#include "ne_session.h" -#include "ne_alloc.h" -#include "ne_utils.h" -#include "ne_internal.h" -#include "ne_string.h" -#include "ne_dates.h" - -#include "ne_private.h" - -/* Destroy a a list of hooks. */ -static void destroy_hooks(struct hook *hooks) -{ - struct hook *nexthk; - - while (hooks) { - nexthk = hooks->next; - ne_free(hooks); - hooks = nexthk; - } -} - -void ne_session_destroy(ne_session *sess) -{ - struct hook *hk; - - NE_DEBUG(NE_DBG_HTTP, "ne_session_destroy called.\n"); - - /* Run the destroy hooks. */ - for (hk = sess->destroy_sess_hooks; hk != NULL; hk = hk->next) { - ne_destroy_sess_fn fn = (ne_destroy_sess_fn)hk->fn; - fn(hk->userdata); - } - - /* Close the connection; note that the notifier callback could - * still be invoked here. */ - if (sess->connected) { - ne_close_connection(sess); - } - - destroy_hooks(sess->create_req_hooks); - destroy_hooks(sess->pre_send_hooks); - destroy_hooks(sess->post_headers_hooks); - destroy_hooks(sess->post_send_hooks); - destroy_hooks(sess->destroy_req_hooks); - destroy_hooks(sess->destroy_sess_hooks); - destroy_hooks(sess->private); - - ne_free(sess->scheme); - ne_free(sess->server.hostname); - ne_free(sess->server.hostport); - if (sess->server.address) ne_addr_destroy(sess->server.address); - if (sess->proxy.address) ne_addr_destroy(sess->proxy.address); - if (sess->proxy.hostname) ne_free(sess->proxy.hostname); - if (sess->user_agent) ne_free(sess->user_agent); - -#ifdef NE_HAVE_SSL - if (sess->ssl_context) - ne_ssl_context_destroy(sess->ssl_context); - - if (sess->server_cert) - ne_ssl_cert_free(sess->server_cert); - - if (sess->client_cert) - ne_ssl_clicert_free(sess->client_cert); -#endif - - ne_free(sess); -} - -int ne_version_pre_http11(ne_session *s) -{ - return !s->is_http11; -} - -/* Stores the "hostname[:port]" segment */ -static void set_hostport(struct host_info *host, unsigned int defaultport) -{ - size_t len = strlen(host->hostname); - host->hostport = ne_malloc(len + 10); - strcpy(host->hostport, host->hostname); - if (host->port != defaultport) - ne_snprintf(host->hostport + len, 9, ":%u", host->port); -} - -/* Stores the hostname/port in *info, setting up the "hostport" - * segment correctly. */ -static void -set_hostinfo(struct host_info *info, const char *hostname, unsigned int port) -{ - info->hostname = ne_strdup(hostname); - info->port = port; -} - -ne_session *ne_session_create(const char *scheme, - const char *hostname, unsigned int port) -{ - ne_session *sess = ne_calloc(sizeof *sess); - - NE_DEBUG(NE_DBG_HTTP, "HTTP session to %s://%s:%d begins.\n", - scheme, hostname, port); - - strcpy(sess->error, "Unknown error."); - - /* use SSL if scheme is https */ - sess->use_ssl = !strcmp(scheme, "https"); - - /* set the hostname/port */ - set_hostinfo(&sess->server, hostname, port); - set_hostport(&sess->server, sess->use_ssl?443:80); - -#ifdef NE_HAVE_SSL - if (sess->use_ssl) { - sess->ssl_context = ne_ssl_context_create(0); - sess->flags[NE_SESSFLAG_SSLv2] = 1; - } -#endif - - sess->scheme = ne_strdup(scheme); - - /* Set flags which default to on: */ - sess->flags[NE_SESSFLAG_PERSIST] = 1; - - return sess; -} - -void ne_session_proxy(ne_session *sess, const char *hostname, - unsigned int port) -{ - sess->use_proxy = 1; - if (sess->proxy.hostname) ne_free(sess->proxy.hostname); - set_hostinfo(&sess->proxy, hostname, port); -} - -void ne_set_addrlist(ne_session *sess, const ne_inet_addr **addrs, size_t n) -{ - sess->addrlist = addrs; - sess->numaddrs = n; -} - -void ne_set_error(ne_session *sess, const char *format, ...) -{ - va_list params; - - va_start(params, format); - ne_vsnprintf(sess->error, sizeof sess->error, format, params); - va_end(params); -} - -void ne_set_session_flag(ne_session *sess, ne_session_flag flag, int value) -{ - if (flag < NE_SESSFLAG_LAST) { - sess->flags[flag] = value; -#ifdef NE_HAVE_SSL - if (flag == NE_SESSFLAG_SSLv2 && sess->ssl_context) { - ne_ssl_context_set_flag(sess->ssl_context, NE_SSL_CTX_SSLv2, value); - } -#endif - } -} - -int ne_get_session_flag(ne_session *sess, ne_session_flag flag) -{ - if (flag < NE_SESSFLAG_LAST) { - return sess->flags[flag]; - } - return -1; -} - -static void progress_notifier(void *userdata, ne_session_status status, - const ne_session_status_info *info) -{ - ne_session *sess = userdata; - - if (status == ne_status_sending || status == ne_status_recving) { - sess->progress_cb(sess->progress_ud, info->sr.progress, info->sr.total); - } -} - -void ne_set_progress(ne_session *sess, ne_progress progress, void *userdata) -{ - sess->progress_cb = progress; - sess->progress_ud = userdata; - ne_set_notifier(sess, progress_notifier, sess); -} - -void ne_set_notifier(ne_session *sess, - ne_notify_status status, void *userdata) -{ - sess->notify_cb = status; - sess->notify_ud = userdata; -} - -void ne_set_read_timeout(ne_session *sess, int timeout) -{ - sess->rdtimeout = timeout; -} - -void ne_set_connect_timeout(ne_session *sess, int timeout) -{ - sess->cotimeout = timeout; -} - -#define UAHDR "User-Agent: " -#define AGENT " neon/" NEON_VERSION "\r\n" - -void ne_set_useragent(ne_session *sess, const char *token) -{ - if (sess->user_agent) ne_free(sess->user_agent); - sess->user_agent = ne_malloc(strlen(UAHDR) + strlen(AGENT) + - strlen(token) + 1); -#ifdef HAVE_STPCPY - strcpy(stpcpy(stpcpy(sess->user_agent, UAHDR), token), AGENT); -#else - strcat(strcat(strcpy(sess->user_agent, UAHDR), token), AGENT); -#endif -} - -const char *ne_get_server_hostport(ne_session *sess) -{ - return sess->server.hostport; -} - -const char *ne_get_scheme(ne_session *sess) -{ - return sess->scheme; -} - -void ne_fill_server_uri(ne_session *sess, ne_uri *uri) -{ - uri->host = ne_strdup(sess->server.hostname); - uri->port = sess->server.port; - uri->scheme = ne_strdup(sess->scheme); -} - -void ne_fill_proxy_uri(ne_session *sess, ne_uri *uri) -{ - if (sess->use_proxy) { - uri->host = ne_strdup(sess->proxy.hostname); - uri->port = sess->proxy.port; - } -} - -const char *ne_get_error(ne_session *sess) -{ - return ne_strclean(sess->error); -} - -void ne_close_connection(ne_session *sess) -{ - if (sess->connected) { - if (sess->notify_cb) { - sess->status.cd.hostname = - sess->use_proxy ? sess->proxy.hostname : sess->server.hostname; - sess->notify_cb(sess->notify_ud, ne_status_disconnected, - &sess->status); - } - NE_DEBUG(NE_DBG_SOCKET, "Closing connection.\n"); - ne_sock_close(sess->socket); - sess->socket = NULL; - NE_DEBUG(NE_DBG_SOCKET, "Connection closed.\n"); - } else { - NE_DEBUG(NE_DBG_SOCKET, "(Not closing closed connection!).\n"); - } - sess->connected = 0; -} - -void ne_ssl_set_verify(ne_session *sess, ne_ssl_verify_fn fn, void *userdata) -{ - sess->ssl_verify_fn = fn; - sess->ssl_verify_ud = userdata; -} - -void ne_ssl_provide_clicert(ne_session *sess, - ne_ssl_provide_fn fn, void *userdata) -{ - sess->ssl_provide_fn = fn; - sess->ssl_provide_ud = userdata; -} - -void ne_ssl_trust_cert(ne_session *sess, const ne_ssl_certificate *cert) -{ -#ifdef NE_HAVE_SSL - if (sess->ssl_context) { - ne_ssl_context_trustcert(sess->ssl_context, cert); - } -#endif -} - -void ne_ssl_cert_validity(const ne_ssl_certificate *cert, char *from, char *until) -{ -#ifdef NE_HAVE_SSL - time_t tf, tu; - char *date; - - ne_ssl_cert_validity_time(cert, &tf, &tu); - - if (from) { - if (tf != (time_t) -1) { - date = ne_rfc1123_date(tf); - ne_strnzcpy(from, date, NE_SSL_VDATELEN); - ne_free(date); - } - else { - ne_strnzcpy(from, _("[invalid date]"), NE_SSL_VDATELEN); - } - } - - if (until) { - if (tu != (time_t) -1) { - date = ne_rfc1123_date(tu); - ne_strnzcpy(until, date, NE_SSL_VDATELEN); - ne_free(date); - } - else { - ne_strnzcpy(until, _("[invalid date]"), NE_SSL_VDATELEN); - } - } -#endif -} - -#ifdef NE_HAVE_SSL -void ne__ssl_set_verify_err(ne_session *sess, int failures) -{ - static const struct { - int bit; - const char *str; - } reasons[] = { - { NE_SSL_NOTYETVALID, N_("certificate is not yet valid") }, - { NE_SSL_EXPIRED, N_("certificate has expired") }, - { NE_SSL_IDMISMATCH, N_("certificate issued for a different hostname") }, - { NE_SSL_UNTRUSTED, N_("issuer is not trusted") }, - { 0, NULL } - }; - int n, flag = 0; - - strcpy(sess->error, _("Server certificate verification failed: ")); - - for (n = 0; reasons[n].bit; n++) { - if (failures & reasons[n].bit) { - if (flag) strncat(sess->error, ", ", sizeof sess->error); - strncat(sess->error, _(reasons[n].str), sizeof sess->error); - flag = 1; - } - } -} -#endif - -typedef void (*void_fn)(void); - -#define ADD_HOOK(hooks, fn, ud) add_hook(&(hooks), NULL, (void_fn)(fn), (ud)) - -static void add_hook(struct hook **hooks, const char *id, void_fn fn, void *ud) -{ - struct hook *hk = ne_malloc(sizeof (struct hook)), *pos; - - if (*hooks != NULL) { - for (pos = *hooks; pos->next != NULL; pos = pos->next) - /* nullop */; - pos->next = hk; - } else { - *hooks = hk; - } - - hk->id = id; - hk->fn = fn; - hk->userdata = ud; - hk->next = NULL; -} - -void ne_hook_create_request(ne_session *sess, - ne_create_request_fn fn, void *userdata) -{ - ADD_HOOK(sess->create_req_hooks, fn, userdata); -} - -void ne_hook_pre_send(ne_session *sess, ne_pre_send_fn fn, void *userdata) -{ - ADD_HOOK(sess->pre_send_hooks, fn, userdata); -} - -void ne_hook_post_send(ne_session *sess, ne_post_send_fn fn, void *userdata) -{ - ADD_HOOK(sess->post_send_hooks, fn, userdata); -} - -void ne_hook_post_headers(ne_session *sess, ne_post_headers_fn fn, - void *userdata) -{ - ADD_HOOK(sess->post_headers_hooks, fn, userdata); -} - -void ne_hook_destroy_request(ne_session *sess, - ne_destroy_req_fn fn, void *userdata) -{ - ADD_HOOK(sess->destroy_req_hooks, fn, userdata); -} - -void ne_hook_destroy_session(ne_session *sess, - ne_destroy_sess_fn fn, void *userdata) -{ - ADD_HOOK(sess->destroy_sess_hooks, fn, userdata); -} - -void ne_set_session_private(ne_session *sess, const char *id, void *userdata) -{ - add_hook(&sess->private, id, NULL, userdata); -} - -static void remove_hook(struct hook **hooks, void_fn fn, void *ud) -{ - struct hook **p = hooks; - - while (*p) { - if ((*p)->fn == fn && (*p)->userdata == ud) { - struct hook *next = (*p)->next; - ne_free(*p); - (*p) = next; - break; - } - p = &(*p)->next; - } -} - -#define REMOVE_HOOK(hooks, fn, ud) remove_hook(&hooks, (void_fn)fn, ud) - -void ne_unhook_create_request(ne_session *sess, - ne_create_request_fn fn, void *userdata) -{ - REMOVE_HOOK(sess->create_req_hooks, fn, userdata); -} - -void ne_unhook_pre_send(ne_session *sess, ne_pre_send_fn fn, void *userdata) -{ - REMOVE_HOOK(sess->pre_send_hooks, fn, userdata); -} - -void ne_unhook_post_headers(ne_session *sess, ne_post_headers_fn fn, - void *userdata) -{ - REMOVE_HOOK(sess->post_headers_hooks, fn, userdata); -} - -void ne_unhook_post_send(ne_session *sess, ne_post_send_fn fn, void *userdata) -{ - REMOVE_HOOK(sess->post_send_hooks, fn, userdata); -} - -void ne_unhook_destroy_request(ne_session *sess, - ne_destroy_req_fn fn, void *userdata) -{ - REMOVE_HOOK(sess->destroy_req_hooks, fn, userdata); -} - -void ne_unhook_destroy_session(ne_session *sess, - ne_destroy_sess_fn fn, void *userdata) -{ - REMOVE_HOOK(sess->destroy_sess_hooks, fn, userdata); -} diff --git a/client/neon-0.27.2/src/ne_session.h b/client/neon-0.27.2/src/ne_session.h deleted file mode 100644 index 92e6bd082..000000000 --- a/client/neon-0.27.2/src/ne_session.h +++ /dev/null @@ -1,276 +0,0 @@ -/* - HTTP session handling - Copyright (C) 1999-2007, Joe Orton - - 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 - -*/ - -#ifndef NE_SESSION_H -#define NE_SESSION_H 1 - -#include - -#include "ne_ssl.h" -#include "ne_uri.h" /* for ne_uri */ -#include "ne_defs.h" -#include "ne_socket.h" - -NE_BEGIN_DECLS - -typedef struct ne_session_s ne_session; - -/* Create a session to the given server, using the given scheme. If - * "https" is passed as the scheme, SSL will be used to connect to the - * server. */ -ne_session *ne_session_create(const char *scheme, - const char *hostname, unsigned int port); - -/* Finish an HTTP session */ -void ne_session_destroy(ne_session *sess); - -/* Prematurely force the connection to be closed for the given - * session. */ -void ne_close_connection(ne_session *sess); - -/* Set the proxy server to be used for the session. */ -void ne_session_proxy(ne_session *sess, - const char *hostname, unsigned int port); - -/* Defined session flags: */ -typedef enum ne_session_flag_e { - NE_SESSFLAG_PERSIST = 0, /* disable this flag to prevent use of - * persistent connections. */ - - NE_SESSFLAG_ICYPROTO, /* enable this flag to enable support for - * non-HTTP ShoutCast-style "ICY" responses. */ - - NE_SESSFLAG_SSLv2, /* disable this flag to disable support for - * SSLv2, if supported by the SSL library. */ - - NE_SESSFLAG_RFC4918, /* enable this flag to enable support for - * RFC4918-only WebDAV features; losing - * backwards-compatibility with RFC2518 - * servers. */ - - NE_SESSFLAG_CONNAUTH, /* enable this flag if an awful, broken, - * RFC-violating, connection-based HTTP - * authentication scheme is in use. */ - - NE_SESSFLAG_LAST /* enum sentinel value */ -} ne_session_flag; - -/* Set a new value for a particular session flag. */ -void ne_set_session_flag(ne_session *sess, ne_session_flag flag, int value); - -/* Return 0 if the given flag is not set, >0 it is set, or -1 if the - * flag is not supported. */ -int ne_get_session_flag(ne_session *sess, ne_session_flag flag); - -/* Bypass the normal name resolution; force the use of specific set of - * addresses for this session, addrs[0]...addrs[n-1]. The addrs array - * must remain valid until the session is destroyed. */ -void ne_set_addrlist(ne_session *sess, const ne_inet_addr **addrs, size_t n); - -/* DEPRECATED: Progress callback. */ -typedef void (*ne_progress)(void *userdata, ne_off_t progress, ne_off_t total); - -/* DEPRECATED API: Set a progress callback for the session; this is - * deprecated in favour of ne_set_notifier(). The progress callback - * is invoked for after each block of the request and response body to - * indicate request and response progress (there is no way to - * distinguish between the two using this interface alone). - * - * NOTE: Use of this interface is mutually exclusive with the use of - * ne_set_notifier(). A call to ne_set_progress() removes the - * notifier callback, and vice versa. */ -void ne_set_progress(ne_session *sess, ne_progress progress, void *userdata); - -/* Store an opaque context for the session, 'priv' is returned by a - * call to ne_session_get_private with the same ID. */ -void ne_set_session_private(ne_session *sess, const char *id, void *priv); -void *ne_get_session_private(ne_session *sess, const char *id); - -/* Status event type. NOTE: More event types may be added in - * subsequent releases, so callers must ignore unknown status types - * for forwards-compatibility. */ -typedef enum { - ne_status_lookup = 0, /* looking up hostname */ - ne_status_connecting, /* connecting to host */ - ne_status_connected, /* connected to host */ - ne_status_sending, /* sending a request body */ - ne_status_recving, /* receiving a response body */ - ne_status_disconnected /* disconnected from host */ -} ne_session_status; - -/* Status event information union; the relevant structure within - * corresponds to the event type. WARNING: the size of this union is - * not limited by ABI constraint; it may be extended with additional - * members of different size, or existing members may be extended. */ -typedef union ne_session_status_info_u { - struct /* ne_status_lookup */ { - /* The hostname which is being resolved: */ - const char *hostname; - } lu; - struct /* ne_status_connecting */ { - /* The hostname and network address to which a connection - * attempt is being made: */ - const char *hostname; - const ne_inet_addr *address; - } ci; - struct /* ne_status_connected, ne_status_disconnected */ { - /* The hostname to which a connection has just been - * established or closed: */ - const char *hostname; - } cd; - struct /* ne_status_sending and ne_status_recving */ { - /* Request/response body transfer progress; if total == -1, the - * total size is unknown; else 0 <= progress <= total: */ - ne_off_t progress, total; - } sr; -} ne_session_status_info; - -/* Callback invoked to notify a new session status event, given by the - * 'status' argument. On invocation, the contents of exactly one of - * the structures in the info union will be valid, as indicated - * above. */ -typedef void (*ne_notify_status)(void *userdata, ne_session_status status, - const ne_session_status_info *info); - -/* Set a status notification callback for the session, to report - * session status events. Only one notification callback per session - * can be registered; the most recent of successive calls to this - * function takes effect. Note that - * - * NOTE: Use of this interface is mutually exclusive with the use of - * ne_set_progress(). A call to ne_set_notifier() removes the - * progress callback, and vice versa. */ -void ne_set_notifier(ne_session *sess, ne_notify_status status, void *userdata); - -/* Certificate verification failures. - * The certificate is not yet valid: */ -#define NE_SSL_NOTYETVALID (0x01) -/* The certificate has expired: */ -#define NE_SSL_EXPIRED (0x02) -/* The hostname for which the certificate was issued does not - * match the hostname of the server; this could mean that the - * connection is being intercepted: */ -#define NE_SSL_IDMISMATCH (0x04) -/* The certificate authority which signed the server certificate is - * not trusted: there is no indicatation the server is who they claim - * to be: */ -#define NE_SSL_UNTRUSTED (0x08) - -/* The bitmask of known failure bits: if (failures & ~NE_SSL_FAILMASK) - * is non-zero, an unrecognized failure is given, and the verification - * should be failed. */ -#define NE_SSL_FAILMASK (0x0f) - -/* A callback which is used when server certificate verification is - * needed. The reasons for verification failure are given in the - * 'failures' parameter, which is a binary OR of one or more of the - * above NE_SSL_* values. failures is guaranteed to be non-zero. The - * callback must return zero to accept the certificate: a non-zero - * return value will fail the SSL negotiation. */ -typedef int (*ne_ssl_verify_fn)(void *userdata, int failures, - const ne_ssl_certificate *cert); - -/* Install a callback to handle server certificate verification. This - * is required when the CA certificate is not known for the server - * certificate, or the server cert has other verification problems. */ -void ne_ssl_set_verify(ne_session *sess, ne_ssl_verify_fn fn, void *userdata); - -/* Use the given client certificate for the session. The client cert - * MUST be in the decrypted state, otherwise behaviour is undefined. - * The 'clicert' object is duplicated internally so can be destroyed - * by the caller. */ -void ne_ssl_set_clicert(ne_session *sess, const ne_ssl_client_cert *clicert); - -/* Indicate that the certificate 'cert' is trusted; the 'cert' object - * is duplicated internally so can be destroyed by the caller. This - * function has no effect for non-SSL sessions. */ -void ne_ssl_trust_cert(ne_session *sess, const ne_ssl_certificate *cert); - -/* If the SSL library provided a default set of CA certificates, trust - * this set of CAs. */ -void ne_ssl_trust_default_ca(ne_session *sess); - -/* Callback used to load a client certificate on demand. If dncount - * is > 0, the 'dnames' array dnames[0] through dnames[dncount-1] - * gives the list of CA names which the server indicated were - * acceptable. The callback should load an appropriate client - * certificate and then pass it to 'ne_ssl_set_clicert'. */ -typedef void (*ne_ssl_provide_fn)(void *userdata, ne_session *sess, - const ne_ssl_dname *const *dnames, - int dncount); - -/* Register a function to be called when the server requests a client - * certificate. */ -void ne_ssl_provide_clicert(ne_session *sess, - ne_ssl_provide_fn fn, void *userdata); - -/* Set the timeout (in seconds) used when reading from a socket. The - * timeout value must be greater than zero. */ -void ne_set_read_timeout(ne_session *sess, int timeout); - -/* Set the timeout (in seconds) used when making a connection. The - * timeout value must be greater than zero. */ -void ne_set_connect_timeout(ne_session *sess, int timeout); - -/* Sets the user-agent string. neon/VERSION will be appended, to make - * the full header "User-Agent: product neon/VERSION". - * If this function is not called, the User-Agent header is not sent. - * The product string must follow the RFC2616 format, i.e. - * product = token ["/" product-version] - * product-version = token - * where token is any alpha-numeric-y string [a-zA-Z0-9]* */ -void ne_set_useragent(ne_session *sess, const char *product); - -/* Returns non-zero if next-hop server does not claim compliance to - * HTTP/1.1 or later. */ -int ne_version_pre_http11(ne_session *sess); - -/* Returns the 'hostport' URI segment for the end-server, e.g. - * "my.server.com:8080". */ -const char *ne_get_server_hostport(ne_session *sess); - -/* Returns the URL scheme being used for the current session, omitting - * the trailing ':'; e.g. "http" or "https". */ -const char *ne_get_scheme(ne_session *sess); - -/* Sets the host, scheme, and port fields of the given URI structure - * to that of the configured server and scheme for the session; host - * and scheme are malloc-allocated. No other fields in the URI - * structure are changed. */ -void ne_fill_server_uri(ne_session *sess, ne_uri *uri); - -/* If a proxy is configured, sets the host and port fields in the - * given URI structure to that of the proxy. The hostname is - * malloc-allocated. No other fields in the URI structure are - * changed; if a proxy is not configured, no fields are changed. */ -void ne_fill_proxy_uri(ne_session *sess, ne_uri *uri); - -/* Set the error string for the session; takes printf-like format - * string. */ -void ne_set_error(ne_session *sess, const char *format, ...) - ne_attribute((format (printf, 2, 3))); - -/* Retrieve the error string for the session */ -const char *ne_get_error(ne_session *sess); - -NE_END_DECLS - -#endif /* NE_SESSION_H */ diff --git a/client/neon-0.27.2/src/ne_socket.c b/client/neon-0.27.2/src/ne_socket.c deleted file mode 100644 index c1a4230ea..000000000 --- a/client/neon-0.27.2/src/ne_socket.c +++ /dev/null @@ -1,1510 +0,0 @@ -/* - Socket handling routines - Copyright (C) 1998-2007, Joe Orton , - Copyright (C) 1999-2000 Tommi Komulainen - Copyright (C) 2004 Aleix Conchillo Flaque - - 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 -*/ - -/* - portions were originally under GPL in Mutt, http://www.mutt.org/ - Relicensed under LGPL for neon, http://www.webdav.org/neon/ -*/ - -#include "config.h" - -#include -#ifdef HAVE_SYS_TIME_H -#include -#endif -#include -#ifdef HAVE_SYS_SOCKET_H -#include -#endif - -#ifdef NE_USE_POLL -#include -#elif defined(HAVE_SYS_SELECT_H) -#include -#endif - -#ifdef HAVE_NETINET_IN_H -#include -#endif -#ifdef HAVE_NETINET_TCP_H -#include -#endif -#ifdef HAVE_ARPA_INET_H -#include -#endif -#ifdef HAVE_NETDB_H -#include -#endif - -#ifdef WIN32 -#include -#include -#ifdef USE_GETADDRINFO -#include -#endif -#endif - -#if defined(HAVE_OPENSSL) && defined(HAVE_LIMITS_H) -#include /* for INT_MAX */ -#endif -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_STRINGS_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_SIGNAL_H -#include -#endif -#ifdef HAVE_ERRNO_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_FCNTL_H -#include -#endif - -#ifdef HAVE_SOCKS_H -#include -#endif - -#ifdef HAVE_OPENSSL -#include -#include -#include /* for PKCS12_PBE_add */ -#include -#include /* for OPENSSL_VERSION_NUMBER */ -#endif - -#ifdef HAVE_GNUTLS -#include -#endif - -#define NE_INET_ADDR_DEFINED -/* A slightly ugly hack: change the ne_inet_addr definition to be the - * real address type used. The API only exposes ne_inet_addr as a - * pointer to an opaque object, so this should be well-defined - * behaviour. It avoids the hassle of a real wrapper ne_inet_addr - * structure, or losing type-safety by using void *. */ -#ifdef USE_GETADDRINFO -typedef struct addrinfo ne_inet_addr; -#else -typedef struct in_addr ne_inet_addr; -#endif - -#ifdef NE_HAVE_SSL -#include "ne_privssl.h" /* MUST come after ne_inet_addr is defined */ -#endif - -/* To avoid doing AAAA queries unless absolutely necessary, either use - * AI_ADDRCONFIG where available, or a run-time check for working IPv6 - * support; the latter is only known to work on Linux. */ -#if defined(USE_GETADDRINFO) && !defined(USE_GAI_ADDRCONFIG) && defined(__linux__) -#define USE_CHECK_IPV6 -#endif - -/* "Be Conservative In What You Build". */ -#if defined(HAVE_FCNTL) && defined(O_NONBLOCK) && defined(F_SETFL) \ - && defined(HAVE_GETSOCKOPT) && defined(SO_ERROR) \ - && defined(HAVE_SOCKLEN_T) && defined(SOL_SOCKET) \ - && defined(EINPROGRESS) -#define USE_NONBLOCKING_CONNECT -#endif - -#include "ne_internal.h" -#include "ne_utils.h" -#include "ne_string.h" -#include "ne_socket.h" -#include "ne_alloc.h" -#include "ne_sspi.h" - -#if defined(__BEOS__) && !defined(BONE_VERSION) -/* pre-BONE */ -#define ne_close(s) closesocket(s) -#define ne_errno errno -#elif defined(WIN32) -#define ne_close(s) closesocket(s) -#define ne_errno WSAGetLastError() -#else /* really Unix! */ -#define ne_close(s) close(s) -#define ne_errno errno -#endif - -#ifdef WIN32 -#define NE_ISRESET(e) ((e) == WSAECONNABORTED || (e) == WSAETIMEDOUT || \ - (e) == WSAECONNRESET || (e) == WSAENETRESET) -#define NE_ISCLOSED(e) ((e) == WSAESHUTDOWN || (e) == WSAENOTCONN) -#define NE_ISINTR(e) (0) -#define NE_ISINPROGRESS(e) ((e) == WSAEWOULDBLOCK) /* says MSDN */ -#else /* Unix */ -/* Also treat ECONNABORTED and ENOTCONN as "connection reset" errors; - * both can be returned by Winsock-based sockets layers e.g. CygWin */ -#ifndef ECONNABORTED -#define ECONNABORTED ECONNRESET -#endif -#ifndef ENOTCONN -#define ENOTCONN ECONNRESET -#endif -#define NE_ISRESET(e) ((e) == ECONNRESET || (e) == ECONNABORTED || (e) == ENOTCONN) -#define NE_ISCLOSED(e) ((e) == EPIPE) -#define NE_ISINTR(e) ((e) == EINTR) -#define NE_ISINPROGRESS(e) ((e) == EINPROGRESS) -#endif - -/* Socket read timeout */ -#define SOCKET_READ_TIMEOUT 120 - -/* Critical I/O functions on a socket: useful abstraction for easily - * handling SSL I/O alongside raw socket I/O. */ -struct iofns { - /* Read up to 'len' bytes into 'buf' from socket. Return <0 on - * error or EOF, or >0; number of bytes read. */ - ssize_t (*sread)(ne_socket *s, char *buf, size_t len); - /* Write up to 'len' bytes from 'buf' to socket. Return number of - * bytes written on success, or <0 on error. */ - ssize_t (*swrite)(ne_socket *s, const char *buf, size_t len); - /* Wait up to 'n' seconds for socket to become readable. Returns - * 0 when readable, otherwise NE_SOCK_TIMEOUT or NE_SOCK_ERROR. */ - int (*readable)(ne_socket *s, int n); -}; - -struct ne_socket_s { - int fd; - char error[200]; - void *progress_ud; - int rdtimeout, cotimeout; /* timeouts */ - const struct iofns *ops; -#ifdef NE_HAVE_SSL - ne_ssl_socket ssl; -#endif - /* The read buffer: ->buffer stores byte which have been read; as - * these are consumed and passed back to the caller, bufpos - * advances through ->buffer. ->bufavail gives the number of - * bytes which remain to be consumed in ->buffer (from ->bufpos), - * and is hence always <= RDBUFSIZ. */ -#define RDBUFSIZ 4096 - char buffer[RDBUFSIZ]; - char *bufpos; - size_t bufavail; -}; - -/* ne_sock_addr represents an Internet address. */ -struct ne_sock_addr_s { -#ifdef USE_GETADDRINFO - struct addrinfo *result, *cursor; -#else - struct in_addr *addrs; - size_t cursor, count; -#endif - int errnum; -}; - -/* set_error: set socket error string to 'str'. */ -#define set_error(s, str) ne_strnzcpy((s)->error, (str), sizeof (s)->error) - -/* set_strerror: set socket error to system error string for 'errnum' */ -#ifdef WIN32 -/* Print system error message to given buffer. */ -static void print_error(int errnum, char *buffer, size_t buflen) -{ - if (FormatMessage (FORMAT_MESSAGE_FROM_SYSTEM - | FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, (DWORD) errnum, 0, - buffer, buflen, NULL) == 0) - ne_snprintf(buffer, buflen, "Socket error %d", errnum); -} -#define set_strerror(s, e) print_error((e), (s)->error, sizeof (s)->error) -#else /* not WIN32 */ -#define set_strerror(s, e) ne_strerror((e), (s)->error, sizeof (s)->error) -#endif - -#ifdef HAVE_OPENSSL -/* Seed the SSL PRNG, if necessary; returns non-zero on failure. */ -static int seed_ssl_prng(void) -{ - /* Check whether the PRNG has already been seeded. */ - if (RAND_status() == 1) - return 0; - -#if defined(EGD_PATH) - NE_DEBUG(NE_DBG_SOCKET, "Seeding PRNG from " EGD_PATH "...\n"); - if (RAND_egd(EGD_PATH) != -1) - return 0; -#elif defined(ENABLE_EGD) - { - static const char *paths[] = { "/var/run/egd-pool", "/dev/egd-pool", - "/etc/egd-pool", "/etc/entropy" }; - size_t n; - for (n = 0; n < sizeof(paths) / sizeof(char *); n++) { - NE_DEBUG(NE_DBG_SOCKET, "Seeding PRNG from %s...\n", paths[n]); - if (RAND_egd(paths[n]) != -1) - return 0; - } - } -#endif /* EGD_PATH */ - - NE_DEBUG(NE_DBG_SOCKET, "No entropy source found; could not seed PRNG.\n"); - return -1; -} -#endif /* HAVE_OPENSSL */ - -#ifdef USE_CHECK_IPV6 -static int ipv6_disabled = 0; - -/* On Linux kernels, IPv6 is typically built as a loadable module, and - * socket(AF_INET6, ...) will fail if this module is not loaded, so - * the slow AAAA lookups can be avoided for this common case. */ -static void init_ipv6(void) -{ - int fd = socket(AF_INET6, SOCK_STREAM, 0); - - if (fd < 0) - ipv6_disabled = 1; - else - close(fd); -} -#else -#define ipv6_disabled (0) -#endif - -/* If init_state is N where > 0, ne_sock_init has been called N times; - * if == 0, library is not initialized; if < 0, library initialization - * has failed. */ -static int init_state = 0; - -int ne_sock_init(void) -{ -#ifdef WIN32 - WORD wVersionRequested; - WSADATA wsaData; - int err; -#endif - - if (init_state > 0) { - init_state++; - return 0; - } - else if (init_state < 0) { - return -1; - } - -#ifdef WIN32 - wVersionRequested = MAKEWORD(2, 2); - - err = WSAStartup(wVersionRequested, &wsaData); - if (err != 0) { - return init_state = -1; - } -#ifdef HAVE_SSPI - if (ne_sspi_init() < 0) { - return init_state = -1; - } -#endif -#endif - -#ifdef NE_HAVE_SOCKS - SOCKSinit("neon"); -#endif - -#if defined(HAVE_SIGNAL) && defined(SIGPIPE) - (void) signal(SIGPIPE, SIG_IGN); -#endif - -#ifdef USE_CHECK_IPV6 - init_ipv6(); -#endif - -#ifdef NE_HAVE_SSL - if (ne__ssl_init()) { - return init_state = -1; - } -#endif - - init_state = 1; - return 0; -} - -void ne_sock_exit(void) -{ - if (init_state > 0 && --init_state == 0) { -#ifdef WIN32 - WSACleanup(); -#endif -#ifdef NE_HAVE_SSL - ne__ssl_exit(); -#endif - -#ifdef HAVE_SSPI - ne_sspi_deinit(); -#endif - } -} - -/* Await readability (rdwr = 0) or writability (rdwr != 0) for socket - * fd for secs seconds. Returns <0 on error, zero on timeout, >0 if - * data is available. */ -static int raw_poll(int fdno, int rdwr, int secs) -{ - int ret; -#ifdef NE_USE_POLL - struct pollfd fds; - int timeout = secs > 0 ? secs * 1000 : -1; - - fds.fd = fdno; - fds.events = rdwr == 0 ? POLLIN : POLLOUT; - fds.revents = 0; - - do { - ret = poll(&fds, 1, timeout); - } while (ret < 0 && NE_ISINTR(ne_errno)); -#else - fd_set rdfds, wrfds; - struct timeval timeout, *tvp = (secs >= 0 ? &timeout : NULL); - - /* Init the fd set */ - FD_ZERO(&rdfds); - FD_ZERO(&wrfds); - if (rdwr == 0) - FD_SET(fdno, &rdfds); - else - FD_SET(fdno, &wrfds); - - if (tvp) { - tvp->tv_sec = secs; - tvp->tv_usec = 0; - } - do { - ret = select(fdno + 1, &rdfds, &wrfds, NULL, tvp); - } while (ret < 0 && NE_ISINTR(ne_errno)); -#endif - return ret; -} - -int ne_sock_block(ne_socket *sock, int n) -{ - if (sock->bufavail) - return 0; - return sock->ops->readable(sock, n); -} - -/* Cast address object AD to type 'sockaddr_TY' */ -#define SACAST(ty, ad) ((struct sockaddr_##ty *)(ad)) - -ssize_t ne_sock_read(ne_socket *sock, char *buffer, size_t buflen) -{ - ssize_t bytes; - -#if 0 - NE_DEBUG(NE_DBG_SOCKET, "buf: at %d, %d avail [%s]\n", - sock->bufpos - sock->buffer, sock->bufavail, sock->bufpos); -#endif - - if (sock->bufavail > 0) { - /* Deliver buffered data. */ - if (buflen > sock->bufavail) - buflen = sock->bufavail; - memcpy(buffer, sock->bufpos, buflen); - sock->bufpos += buflen; - sock->bufavail -= buflen; - return buflen; - } else if (buflen >= sizeof sock->buffer) { - /* No need for read buffer. */ - return sock->ops->sread(sock, buffer, buflen); - } else { - /* Fill read buffer. */ - bytes = sock->ops->sread(sock, sock->buffer, sizeof sock->buffer); - if (bytes <= 0) - return bytes; - - if (buflen > (size_t)bytes) - buflen = bytes; - memcpy(buffer, sock->buffer, buflen); - sock->bufpos = sock->buffer + buflen; - sock->bufavail = bytes - buflen; - return buflen; - } -} - -ssize_t ne_sock_peek(ne_socket *sock, char *buffer, size_t buflen) -{ - ssize_t bytes; - - if (sock->bufavail) { - /* just return buffered data. */ - bytes = sock->bufavail; - } else { - /* fill the buffer. */ - bytes = sock->ops->sread(sock, sock->buffer, sizeof sock->buffer); - if (bytes <= 0) - return bytes; - - sock->bufpos = sock->buffer; - sock->bufavail = bytes; - } - - if (buflen > (size_t)bytes) - buflen = bytes; - - memcpy(buffer, sock->bufpos, buflen); - - return buflen; -} - -/* Await data on raw fd in socket. */ -static int readable_raw(ne_socket *sock, int secs) -{ - int ret = raw_poll(sock->fd, 0, secs); - - if (ret < 0) { - set_strerror(sock, ne_errno); - return NE_SOCK_ERROR; - } - return (ret == 0) ? NE_SOCK_TIMEOUT : 0; -} - -static ssize_t read_raw(ne_socket *sock, char *buffer, size_t len) -{ - ssize_t ret; - - ret = readable_raw(sock, sock->rdtimeout); - if (ret) return ret; - - do { - ret = recv(sock->fd, buffer, len, 0); - } while (ret == -1 && NE_ISINTR(ne_errno)); - - if (ret == 0) { - set_error(sock, _("Connection closed")); - ret = NE_SOCK_CLOSED; - } else if (ret < 0) { - int errnum = ne_errno; - ret = NE_ISRESET(errnum) ? NE_SOCK_RESET : NE_SOCK_ERROR; - set_strerror(sock, errnum); - } - - return ret; -} - -#define MAP_ERR(e) (NE_ISCLOSED(e) ? NE_SOCK_CLOSED : \ - (NE_ISRESET(e) ? NE_SOCK_RESET : NE_SOCK_ERROR)) - -static ssize_t write_raw(ne_socket *sock, const char *data, size_t length) -{ - ssize_t ret; - -#ifdef __QNX__ - /* Test failures seen on QNX over loopback, if passing large - * buffer lengths to send(). */ - if (length > 8192) length = 8192; -#endif - - do { - ret = send(sock->fd, data, length, 0); - } while (ret == -1 && NE_ISINTR(ne_errno)); - - if (ret < 0) { - int errnum = ne_errno; - set_strerror(sock, errnum); - return MAP_ERR(errnum); - } - return ret; -} - -static const struct iofns iofns_raw = { read_raw, write_raw, readable_raw }; - -#ifdef HAVE_OPENSSL -/* OpenSSL I/O function implementations. */ -static int readable_ossl(ne_socket *sock, int secs) -{ - if (SSL_pending(sock->ssl)) - return 0; - return readable_raw(sock, secs); -} - -/* SSL error handling, according to SSL_get_error(3). */ -static int error_ossl(ne_socket *sock, int sret) -{ - int errnum = SSL_get_error(sock->ssl, sret); - unsigned long err; - - if (errnum == SSL_ERROR_ZERO_RETURN) { - set_error(sock, _("Connection closed")); - return NE_SOCK_CLOSED; - } - - /* for all other errors, look at the OpenSSL error stack */ - err = ERR_get_error(); - if (err == 0) { - /* Empty error stack, presume this is a system call error: */ - if (sret == 0) { - /* EOF without close_notify, possible truncation */ - set_error(sock, _("Secure connection truncated")); - return NE_SOCK_TRUNC; - } else { - /* Other socket error. */ - errnum = ne_errno; - set_strerror(sock, errnum); - return MAP_ERR(errnum); - } - } - - if (ERR_reason_error_string(err)) { - ne_snprintf(sock->error, sizeof sock->error, - _("SSL error: %s"), ERR_reason_error_string(err)); - } else { - ne_snprintf(sock->error, sizeof sock->error, - _("SSL error code %d/%d/%lu"), sret, errnum, err); - } - - /* make sure the error stack is now empty. */ - ERR_clear_error(); - return NE_SOCK_ERROR; -} - -/* Work around OpenSSL's use of 'int' rather than 'size_t', to prevent - * accidentally passing a negative number, etc. */ -#define CAST2INT(n) (((n) > INT_MAX) ? INT_MAX : (n)) - -static ssize_t read_ossl(ne_socket *sock, char *buffer, size_t len) -{ - int ret; - - ret = readable_ossl(sock, sock->rdtimeout); - if (ret) return ret; - - ret = SSL_read(sock->ssl, buffer, CAST2INT(len)); - if (ret <= 0) - ret = error_ossl(sock, ret); - - return ret; -} - -static ssize_t write_ossl(ne_socket *sock, const char *data, size_t len) -{ - int ret, ilen = CAST2INT(len); - ret = SSL_write(sock->ssl, data, ilen); - /* ssl.h says SSL_MODE_ENABLE_PARTIAL_WRITE must be enabled to - * have SSL_write return < length... so, SSL_write should never - * return < length. */ - if (ret != ilen) - return error_ossl(sock, ret); - return ret; -} - -static const struct iofns iofns_ssl = { - read_ossl, - write_ossl, - readable_ossl -}; - -#elif defined(HAVE_GNUTLS) - -/* Return zero if an alert value can be ignored. */ -static int check_alert(ne_socket *sock, ssize_t ret) -{ - const char *alert; - - if (ret == GNUTLS_E_WARNING_ALERT_RECEIVED) { - alert = gnutls_alert_get_name(gnutls_alert_get(sock->ssl)); - NE_DEBUG(NE_DBG_SOCKET, "TLS warning alert: %s\n", alert); - return 0; - } else if (ret == GNUTLS_E_FATAL_ALERT_RECEIVED) { - alert = gnutls_alert_get_name(gnutls_alert_get(sock->ssl)); - NE_DEBUG(NE_DBG_SOCKET, "TLS fatal alert: %s\n", alert); - return -1; - } - return ret; -} - -static int readable_gnutls(ne_socket *sock, int secs) -{ - if (gnutls_record_check_pending(sock->ssl)) { - return 0; - } - return readable_raw(sock, secs); -} - -static ssize_t error_gnutls(ne_socket *sock, ssize_t sret) -{ - ssize_t ret; - - switch (sret) { - case 0: - ret = NE_SOCK_CLOSED; - set_error(sock, _("Connection closed")); - break; - case GNUTLS_E_FATAL_ALERT_RECEIVED: - ret = NE_SOCK_ERROR; - ne_snprintf(sock->error, sizeof sock->error, - _("SSL alert received: %s"), - gnutls_alert_get_name(gnutls_alert_get(sock->ssl))); - break; - case GNUTLS_E_UNEXPECTED_PACKET_LENGTH: - /* It's not exactly an API guarantee but this error will - * always mean a premature EOF. */ - ret = NE_SOCK_TRUNC; - set_error(sock, _("Secure connection truncated")); - break; - case GNUTLS_E_PUSH_ERROR: - ret = NE_SOCK_RESET; - set_error(sock, ("SSL socket write failed")); - break; - case GNUTLS_E_PULL_ERROR: - ret = NE_SOCK_RESET; - set_error(sock, _("SSL socket read failed")); - break; - default: - ret = NE_SOCK_ERROR; - ne_snprintf(sock->error, sizeof sock->error, _("SSL error: %s"), - gnutls_strerror(sret)); - } - return ret; -} - -#define RETRY_GNUTLS(sock, ret) ((ret < 0) \ - && (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN \ - || check_alert(sock, ret) == 0)) - -static ssize_t read_gnutls(ne_socket *sock, char *buffer, size_t len) -{ - ssize_t ret; - - ret = readable_gnutls(sock, sock->rdtimeout); - if (ret) return ret; - - do { - ret = gnutls_record_recv(sock->ssl, buffer, len); - } while (RETRY_GNUTLS(sock, ret)); - - if (ret <= 0) - ret = error_gnutls(sock, ret); - - return ret; -} - -static ssize_t write_gnutls(ne_socket *sock, const char *data, size_t len) -{ - ssize_t ret; - - do { - ret = gnutls_record_send(sock->ssl, data, len); - } while (RETRY_GNUTLS(sock, ret)); - - if (ret < 0) - return error_gnutls(sock, ret); - - return ret; -} - -static const struct iofns iofns_ssl = { - read_gnutls, - write_gnutls, - readable_gnutls -}; - -#endif - -int ne_sock_fullwrite(ne_socket *sock, const char *data, size_t len) -{ - ssize_t ret; - - do { - ret = sock->ops->swrite(sock, data, len); - if (ret > 0) { - data += ret; - len -= ret; - } - } while (ret > 0 && len > 0); - - return ret < 0 ? ret : 0; -} - -ssize_t ne_sock_readline(ne_socket *sock, char *buf, size_t buflen) -{ - char *lf; - size_t len; - - if ((lf = memchr(sock->bufpos, '\n', sock->bufavail)) == NULL - && sock->bufavail < RDBUFSIZ) { - /* The buffered data does not contain a complete line: move it - * to the beginning of the buffer. */ - if (sock->bufavail) - memmove(sock->buffer, sock->bufpos, sock->bufavail); - sock->bufpos = sock->buffer; - - /* Loop filling the buffer whilst no newline is found in the data - * buffered so far, and there is still buffer space available */ - do { - /* Read more data onto end of buffer. */ - ssize_t ret = sock->ops->sread(sock, sock->buffer + sock->bufavail, - RDBUFSIZ - sock->bufavail); - if (ret < 0) return ret; - sock->bufavail += ret; - } while ((lf = memchr(sock->buffer, '\n', sock->bufavail)) == NULL - && sock->bufavail < RDBUFSIZ); - } - - if (lf) - len = lf - sock->bufpos + 1; - else - len = buflen; /* fall into "line too long" error... */ - - if ((len + 1) > buflen) { - set_error(sock, _("Line too long")); - return NE_SOCK_ERROR; - } - - memcpy(buf, sock->bufpos, len); - buf[len] = '\0'; - /* consume the line from buffer: */ - sock->bufavail -= len; - sock->bufpos += len; - return len; -} - -ssize_t ne_sock_fullread(ne_socket *sock, char *buffer, size_t buflen) -{ - ssize_t len; - - while (buflen > 0) { - len = ne_sock_read(sock, buffer, buflen); - if (len < 0) return len; - buflen -= len; - buffer += len; - } - - return 0; -} - -#ifndef INADDR_NONE -#define INADDR_NONE ((in_addr_t) -1) -#endif - -#if !defined(USE_GETADDRINFO) && !defined(WIN32) && !HAVE_DECL_H_ERRNO -/* Ancient versions of netdb.h don't export h_errno. */ -extern int h_errno; -#endif - -/* This implemementation does not attempt to support IPv6 using - * gethostbyname2 et al. */ -ne_sock_addr *ne_addr_resolve(const char *hostname, int flags) -{ - ne_sock_addr *addr = ne_calloc(sizeof *addr); -#ifdef USE_GETADDRINFO - struct addrinfo hints = {0}; - char *pnt; - hints.ai_socktype = SOCK_STREAM; - if (hostname[0] == '[' && ((pnt = strchr(hostname, ']')) != NULL)) { - char *hn = ne_strdup(hostname + 1); - hn[pnt - hostname - 1] = '\0'; -#ifdef AI_NUMERICHOST /* added in the RFC2553 API */ - hints.ai_flags = AI_NUMERICHOST; -#endif - hints.ai_family = AF_INET6; - addr->errnum = getaddrinfo(hn, NULL, &hints, &addr->result); - ne_free(hn); - } else { -#ifdef USE_GAI_ADDRCONFIG /* added in the RFC3493 API */ - hints.ai_flags = AI_ADDRCONFIG; - hints.ai_family = AF_UNSPEC; - addr->errnum = getaddrinfo(hostname, NULL, &hints, &addr->result); -#else - hints.ai_family = ipv6_disabled ? AF_INET : AF_UNSPEC; - addr->errnum = getaddrinfo(hostname, NULL, &hints, &addr->result); -#endif - } -#else /* Use gethostbyname() */ - in_addr_t laddr; - struct hostent *hp; - - laddr = inet_addr(hostname); - if (laddr == INADDR_NONE) { - hp = gethostbyname(hostname); - if (hp == NULL) { -#ifdef WIN32 - addr->errnum = WSAGetLastError(); -#else - addr->errnum = h_errno; -#endif - } else if (hp->h_length != sizeof(struct in_addr)) { - /* fail gracefully if somebody set RES_USE_INET6 */ - addr->errnum = NO_RECOVERY; - } else { - size_t n; - /* count addresses */ - for (n = 0; hp->h_addr_list[n] != NULL; n++) - /* noop */; - - addr->count = n; - addr->addrs = ne_malloc(n * sizeof *addr->addrs); - - for (n = 0; n < addr->count; n++) - memcpy(&addr->addrs[n], hp->h_addr_list[n], hp->h_length); - } - } else { - addr->addrs = ne_malloc(sizeof *addr->addrs); - addr->count = 1; - memcpy(addr->addrs, &laddr, sizeof *addr->addrs); - } -#endif - return addr; -} - -int ne_addr_result(const ne_sock_addr *addr) -{ - return addr->errnum; -} - -const ne_inet_addr *ne_addr_first(ne_sock_addr *addr) -{ -#ifdef USE_GETADDRINFO - addr->cursor = addr->result->ai_next; - return addr->result; -#else - addr->cursor = 0; - return &addr->addrs[0]; -#endif -} - -const ne_inet_addr *ne_addr_next(ne_sock_addr *addr) -{ -#ifdef USE_GETADDRINFO - struct addrinfo *ret = addr->cursor; - if (addr->cursor) addr->cursor = addr->cursor->ai_next; -#else - struct in_addr *ret; - if (++addr->cursor < addr->count) - ret = &addr->addrs[addr->cursor]; - else - ret = NULL; -#endif - return ret; -} - -char *ne_addr_error(const ne_sock_addr *addr, char *buf, size_t bufsiz) -{ -#ifdef WIN32 - print_error(addr->errnum, buf, bufsiz); -#else - const char *err; -#ifdef USE_GETADDRINFO - /* override horrible generic "Name or service not known" error. */ - if (addr->errnum == EAI_NONAME) - err = _("Host not found"); - else - err = gai_strerror(addr->errnum); -#elif defined(HAVE_HSTRERROR) - err = hstrerror(addr->errnum); -#else - err = _("Host not found"); -#endif - ne_strnzcpy(buf, err, bufsiz); -#endif /* WIN32 */ - return buf; -} - -char *ne_iaddr_print(const ne_inet_addr *ia, char *buf, size_t bufsiz) -{ -#if defined(USE_GETADDRINFO) && defined(HAVE_INET_NTOP) - const char *ret; -#ifdef AF_INET6 - if (ia->ai_family == AF_INET6) { - struct sockaddr_in6 *in6 = SACAST(in6, ia->ai_addr); - ret = inet_ntop(AF_INET6, &in6->sin6_addr, buf, bufsiz); - } else -#endif - if (ia->ai_family == AF_INET) { - struct sockaddr_in *in = SACAST(in, ia->ai_addr); - ret = inet_ntop(AF_INET, &in->sin_addr, buf, bufsiz); - } else - ret = NULL; - if (ret == NULL) - ne_strnzcpy(buf, "[IP address]", bufsiz); -#elif defined(USE_GETADDRINFO) && defined(NI_NUMERICHOST) - /* use getnameinfo instead for Win32, which lacks inet_ntop: */ - if (getnameinfo(ia->ai_addr, ia->ai_addrlen, buf, bufsiz, NULL, 0, - NI_NUMERICHOST)) - ne_strnzcpy(buf, "[IP address]", bufsiz); -#else /* USE_GETADDRINFO */ - ne_strnzcpy(buf, inet_ntoa(*ia), bufsiz); -#endif - return buf; -} - -int ne_iaddr_reverse(const ne_inet_addr *ia, char *buf, size_t bufsiz) -{ -#ifdef USE_GETADDRINFO - return getnameinfo(ia->ai_addr, ia->ai_addrlen, buf, bufsiz, - NULL, 0, 0); -#else - struct hostent *hp; - - hp = gethostbyaddr(ia, sizeof *ia, AF_INET); - if (hp && hp->h_name) { - ne_strnzcpy(buf, hp->h_name, bufsiz); - return 0; - } - return -1; -#endif -} - -void ne_addr_destroy(ne_sock_addr *addr) -{ -#ifdef USE_GETADDRINFO - if (addr->result) - freeaddrinfo(addr->result); -#else - if (addr->addrs) - ne_free(addr->addrs); -#endif - ne_free(addr); -} - -/* Perform a connect() for fd to address sa of length salen, with a - * timeout if supported on this platform. Returns zero on success or - * NE_SOCK_* on failure, with sock->error set appropriately. */ -static int timed_connect(ne_socket *sock, int fd, - const struct sockaddr *sa, size_t salen) -{ - int ret; - -#ifdef USE_NONBLOCKING_CONNECT - if (sock->cotimeout) { - int errnum, flags; - - /* Get flags and then set O_NONBLOCK. */ - flags = fcntl(fd, F_GETFL); - if (fcntl(fd, F_SETFL, flags | O_NONBLOCK) == -1) { - set_strerror(sock, errno); - return NE_SOCK_ERROR; - } - - ret = connect(fd, sa, salen); - if (ret == -1) { - errnum = ne_errno; - if (NE_ISINPROGRESS(errnum)) { - ret = raw_poll(fd, 1, sock->cotimeout); - if (ret > 0) { /* poll got data */ - socklen_t len = sizeof(errnum); - - /* Check whether there is a pending error for the - * socket. Per Stevens UNPv1§15.4, Solaris will - * return a pending error via errno by failing the - * getsockopt() call. */ - - errnum = 0; - if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &errnum, &len)) - errnum = errno; - - if (errnum == 0) { - ret = 0; - } else { - set_strerror(sock, errnum); - ret = NE_SOCK_ERROR; - } - } else if (ret == 0) { /* poll timed out */ - set_error(sock, _("Connection timed out")); - ret = NE_SOCK_TIMEOUT; - } else /* poll failed */ { - set_strerror(sock, errno); - ret = NE_SOCK_ERROR; - } - } else /* non-EINPROGRESS error from connect() */ { - set_strerror(sock, errnum); - ret = NE_SOCK_ERROR; - } - } - - /* Reset to old flags: */ - if (fcntl(fd, F_SETFL, flags) == -1) { - set_strerror(sock, errno); - ret = NE_SOCK_ERROR; - } - } else -#endif /* USE_NONBLOCKING_CONNECT */ - { - ret = connect(fd, sa, salen); - - if (ret < 0) { - set_strerror(sock, errno); - ret = NE_SOCK_ERROR; - } - } - - return ret; -} - -/* Connect socket to address 'addr' on given 'port'. Returns zero on - * success or NE_SOCK_* on failure with sock->error set - * appropriately. */ -static int connect_socket(ne_socket *sock, int fd, - const ne_inet_addr *addr, unsigned int port) -{ -#ifdef USE_GETADDRINFO -#ifdef AF_INET6 - /* fill in the _family field for AIX 4.3, which forgets to do so. */ - if (addr->ai_family == AF_INET6) { - struct sockaddr_in6 in6; - memcpy(&in6, addr->ai_addr, sizeof in6); - in6.sin6_port = port; - in6.sin6_family = AF_INET6; - return timed_connect(sock, fd, (struct sockaddr *)&in6, sizeof in6); - } else -#endif - if (addr->ai_family == AF_INET) { - struct sockaddr_in in; - memcpy(&in, addr->ai_addr, sizeof in); - in.sin_port = port; - in.sin_family = AF_INET; - return timed_connect(sock, fd, (struct sockaddr *)&in, sizeof in); - } else { - set_strerror(sock, EINVAL); - return NE_SOCK_ERROR; - } -#else - struct sockaddr_in sa = {0}; - sa.sin_family = AF_INET; - sa.sin_port = port; - sa.sin_addr = *addr; - return timed_connect(sock, fd, (struct sockaddr *)&sa, sizeof sa); -#endif -} - -ne_socket *ne_sock_create(void) -{ - ne_socket *sock = ne_calloc(sizeof *sock); - sock->rdtimeout = SOCKET_READ_TIMEOUT; - sock->cotimeout = 0; - sock->bufpos = sock->buffer; - sock->ops = &iofns_raw; - sock->fd = -1; - return sock; -} - -int ne_sock_connect(ne_socket *sock, - const ne_inet_addr *addr, unsigned int port) -{ - int fd, ret; - -#ifdef USE_GETADDRINFO - /* use SOCK_STREAM rather than ai_socktype: some getaddrinfo - * implementations do not set ai_socktype, e.g. RHL6.2. */ - fd = socket(addr->ai_family, SOCK_STREAM, addr->ai_protocol); -#else - fd = socket(AF_INET, SOCK_STREAM, 0); -#endif - if (fd < 0) { - set_strerror(sock, ne_errno); - return -1; - } - -#if !defined(NE_USE_POLL) && !defined(WIN32) - if (fd > FD_SETSIZE) { - ne_close(fd); - set_error(sock, _("Socket descriptor number exceeds FD_SETSIZE")); - return NE_SOCK_ERROR; - } -#endif - -#if defined(TCP_NODELAY) && defined(HAVE_SETSOCKOPT) && defined(IPPROTO_TCP) - { /* Disable the Nagle algorithm; better to add write buffering - * instead of doing this. */ - int flag = 1; - setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &flag, sizeof flag); - } -#endif - - ret = connect_socket(sock, fd, addr, htons(port)); - if (ret == 0) - sock->fd = fd; - - return ret; -} - -ne_inet_addr *ne_iaddr_make(ne_iaddr_type type, const unsigned char *raw) -{ - ne_inet_addr *ia; -#if !defined(AF_INET6) || !defined(USE_GETADDRINFO) - /* fail if IPv6 address is given if IPv6 is not supported. */ - if (type == ne_iaddr_ipv6) - return NULL; -#endif - ia = ne_calloc(sizeof *ia); -#ifdef USE_GETADDRINFO - /* ai_protocol and ai_socktype aren't used by connect_socket() so - * ignore them here. (for now) */ - if (type == ne_iaddr_ipv4) { - struct sockaddr_in *in4 = ne_calloc(sizeof *in4); - ia->ai_family = AF_INET; - ia->ai_addr = (struct sockaddr *)in4; - ia->ai_addrlen = sizeof *in4; - in4->sin_family = AF_INET; - memcpy(&in4->sin_addr.s_addr, raw, sizeof in4->sin_addr.s_addr); - } -#ifdef AF_INET6 - else { - struct sockaddr_in6 *in6 = ne_calloc(sizeof *in6); - ia->ai_family = AF_INET6; - ia->ai_addr = (struct sockaddr *)in6; - ia->ai_addrlen = sizeof *in6; - in6->sin6_family = AF_INET6; - memcpy(&in6->sin6_addr, raw, sizeof in6->sin6_addr.s6_addr); - } -#endif -#else /* !USE_GETADDRINFO */ - memcpy(&ia->s_addr, raw, sizeof ia->s_addr); -#endif - return ia; -} - -ne_iaddr_type ne_iaddr_typeof(const ne_inet_addr *ia) -{ -#ifdef USE_GETADDRINFO - return ia->ai_family == AF_INET6 ? ne_iaddr_ipv6 : ne_iaddr_ipv4; -#else - return ne_iaddr_ipv4; -#endif -} - -int ne_iaddr_cmp(const ne_inet_addr *i1, const ne_inet_addr *i2) -{ -#ifdef USE_GETADDRINFO - if (i1->ai_family != i2->ai_family) - return i2->ai_family - i1->ai_family; - if (i1->ai_family == AF_INET) { - struct sockaddr_in *in1 = SACAST(in, i1->ai_addr), - *in2 = SACAST(in, i2->ai_addr); - return memcmp(&in1->sin_addr.s_addr, &in2->sin_addr.s_addr, - sizeof in1->sin_addr.s_addr); - } else if (i1->ai_family == AF_INET6) { - struct sockaddr_in6 *in1 = SACAST(in6, i1->ai_addr), - *in2 = SACAST(in6, i2->ai_addr); - return memcmp(in1->sin6_addr.s6_addr, in2->sin6_addr.s6_addr, - sizeof in1->sin6_addr.s6_addr); - } else - return -1; -#else - return memcmp(&i1->s_addr, &i2->s_addr, sizeof i1->s_addr); -#endif -} - -void ne_iaddr_free(ne_inet_addr *addr) -{ -#ifdef USE_GETADDRINFO - ne_free(addr->ai_addr); -#endif - ne_free(addr); -} - -int ne_sock_accept(ne_socket *sock, int listener) -{ - int fd = accept(listener, NULL, NULL); - - if (fd < 0) - return -1; - - sock->fd = fd; - return 0; -} - -int ne_sock_fd(const ne_socket *sock) -{ - return sock->fd; -} - -void ne_sock_read_timeout(ne_socket *sock, int timeout) -{ - sock->rdtimeout = timeout; -} - -void ne_sock_connect_timeout(ne_socket *sock, int timeout) -{ - sock->cotimeout = timeout; -} - -#ifdef NE_HAVE_SSL - -#ifdef HAVE_GNUTLS -/* Dumb server session cache implementation for GNUTLS; holds a single - * session. */ - -/* Copy datum 'src' to 'dest'. */ -static void copy_datum(gnutls_datum *dest, gnutls_datum *src) -{ - dest->size = src->size; - dest->data = memcpy(gnutls_malloc(src->size), src->data, src->size); -} - -/* Callback to store a session 'data' with id 'key'. */ -static int store_sess(void *userdata, gnutls_datum key, gnutls_datum data) -{ - ne_ssl_context *ctx = userdata; - - if (ctx->cache.server.key.data) { - gnutls_free(ctx->cache.server.key.data); - gnutls_free(ctx->cache.server.data.data); - } - - copy_datum(&ctx->cache.server.key, &key); - copy_datum(&ctx->cache.server.data, &data); - - return 0; -} - -/* Returns non-zero if d1 and d2 are the same datum. */ -static int match_datum(gnutls_datum *d1, gnutls_datum *d2) -{ - return d1->size == d2->size - && memcmp(d1->data, d2->data, d1->size) == 0; -} - -/* Callback to retrieve a session of id 'key'. */ -static gnutls_datum retrieve_sess(void *userdata, gnutls_datum key) -{ - ne_ssl_context *ctx = userdata; - gnutls_datum ret = { NULL, 0 }; - - if (match_datum(&ctx->cache.server.key, &key)) { - copy_datum(&ret, &ctx->cache.server.data); - } - - return ret; -} - -/* Callback to remove a session of id 'key'; stub needed but - * implementation seems unnecessary. */ -static int remove_sess(void *userdata, gnutls_datum key) -{ - return -1; -} -#endif - -int ne_sock_accept_ssl(ne_socket *sock, ne_ssl_context *ctx) -{ - int ret; - ne_ssl_socket ssl; - -#if defined(HAVE_OPENSSL) - ssl = SSL_new(ctx->ctx); - - SSL_set_fd(ssl, sock->fd); - - sock->ssl = ssl; - ret = SSL_accept(ssl); - if (ret != 1) { - return error_ossl(sock, ret); - } -#elif defined(HAVE_GNUTLS) - gnutls_init(&ssl, GNUTLS_SERVER); - gnutls_credentials_set(ssl, GNUTLS_CRD_CERTIFICATE, ctx->cred); - gnutls_set_default_priority(ssl); - - /* Set up dummy session cache. */ - gnutls_db_set_store_function(ssl, store_sess); - gnutls_db_set_retrieve_function(ssl, retrieve_sess); - gnutls_db_set_remove_function(ssl, remove_sess); - gnutls_db_set_ptr(ssl, ctx); - - if (ctx->verify) - gnutls_certificate_server_set_request(ssl, GNUTLS_CERT_REQUEST); - - sock->ssl = ssl; - gnutls_transport_set_ptr(sock->ssl, (gnutls_transport_ptr) sock->fd); - ret = gnutls_handshake(ssl); - if (ret < 0) { - return error_gnutls(sock, ret); - } - if (ctx->verify && gnutls_certificate_verify_peers(ssl)) { - set_error(sock, _("Client certificate verification failed")); - return NE_SOCK_ERROR; - } -#endif - sock->ops = &iofns_ssl; - return 0; -} - -int ne_sock_connect_ssl(ne_socket *sock, ne_ssl_context *ctx, void *userdata) -{ - int ret; - -#if defined(HAVE_OPENSSL) - SSL *ssl; - - if (seed_ssl_prng()) { - set_error(sock, _("SSL disabled due to lack of entropy")); - return NE_SOCK_ERROR; - } - - /* If runtime library version differs from compile-time version - * number in major/minor/fix level, abort soon. */ - if ((SSLeay() ^ OPENSSL_VERSION_NUMBER) & 0xFFFFF000) { - set_error(sock, _("SSL disabled due to library version mismatch")); - return NE_SOCK_ERROR; - } - - sock->ssl = ssl = SSL_new(ctx->ctx); - if (!ssl) { - set_error(sock, _("Could not create SSL structure")); - return NE_SOCK_ERROR; - } - - SSL_set_app_data(ssl, userdata); - SSL_set_mode(ssl, SSL_MODE_AUTO_RETRY); - SSL_set_fd(ssl, sock->fd); - sock->ops = &iofns_ssl; - - if (ctx->sess) - SSL_set_session(ssl, ctx->sess); - - ret = SSL_connect(ssl); - if (ret != 1) { - error_ossl(sock, ret); - SSL_free(ssl); - sock->ssl = NULL; - return NE_SOCK_ERROR; - } -#elif defined(HAVE_GNUTLS) - /* DH and RSA params are set in ne_ssl_context_create */ - gnutls_init(&sock->ssl, GNUTLS_CLIENT); - gnutls_set_default_priority(sock->ssl); - gnutls_session_set_ptr(sock->ssl, userdata); - gnutls_credentials_set(sock->ssl, GNUTLS_CRD_CERTIFICATE, ctx->cred); - - gnutls_transport_set_ptr(sock->ssl, (gnutls_transport_ptr) sock->fd); - - if (ctx->cache.client.data) { -#if defined(HAVE_GNUTLS_SESSION_GET_DATA2) - gnutls_session_set_data(sock->ssl, - ctx->cache.client.data, - ctx->cache.client.size); -#else - gnutls_session_set_data(sock->ssl, - ctx->cache.client.data, - ctx->cache.client.len); -#endif - } - sock->ops = &iofns_ssl; - - ret = gnutls_handshake(sock->ssl); - if (ret < 0) { - error_gnutls(sock, ret); - return NE_SOCK_ERROR; - } - - if (!gnutls_session_is_resumed(sock->ssl)) { - /* New session. The old method of using the _get_data - * function seems to be broken with 1.3.0 and later*/ -#if defined(HAVE_GNUTLS_SESSION_GET_DATA2) - gnutls_session_get_data2(sock->ssl, &ctx->cache.client); -#else - ctx->cache.client.len = 0; - if (gnutls_session_get_data(sock->ssl, NULL, - &ctx->cache.client.len) == 0) { - ctx->cache.client.data = ne_malloc(ctx->cache.client.len); - gnutls_session_get_data(sock->ssl, ctx->cache.client.data, - &ctx->cache.client.len); - } -#endif - } -#endif - return 0; -} - -ne_ssl_socket ne__sock_sslsock(ne_socket *sock) -{ - return sock->ssl; -} - -#endif - -int ne_sock_sessid(ne_socket *sock, unsigned char *buf, size_t *buflen) -{ -#ifdef NE_HAVE_SSL -#ifdef HAVE_GNUTLS - if (sock->ssl) { - return gnutls_session_get_id(sock->ssl, buf, buflen); - } else { - return -1; - } -#else - SSL_SESSION *sess; - - if (!sock->ssl) { - return -1; - } - - sess = SSL_get0_session(sock->ssl); - - if (!buf) { - *buflen = sess->session_id_length; - return 0; - } - - if (*buflen < sess->session_id_length) { - return -1; - } - - memcpy(buf, sess->session_id, *buflen); - *buflen = sess->session_id_length; - return 0; -#endif -#else - return -1; -#endif -} - -const char *ne_sock_error(const ne_socket *sock) -{ - return sock->error; -} - -/* Closes given ne_socket */ -int ne_sock_close(ne_socket *sock) -{ - int ret; - -#if defined(HAVE_OPENSSL) - if (sock->ssl) { - SSL_shutdown(sock->ssl); - SSL_free(sock->ssl); - } -#elif defined(HAVE_GNUTLS) - if (sock->ssl) { - do { - ret = gnutls_bye(sock->ssl, GNUTLS_SHUT_RDWR); - } while (ret < 0 - && (ret == GNUTLS_E_INTERRUPTED || ret == GNUTLS_E_AGAIN)); - } -#endif - - if (sock->fd < 0) - ret = 0; - else - ret = ne_close(sock->fd); - ne_free(sock); - return ret; -} diff --git a/client/neon-0.27.2/src/ne_socket.h b/client/neon-0.27.2/src/ne_socket.h deleted file mode 100644 index 26a129d4d..000000000 --- a/client/neon-0.27.2/src/ne_socket.h +++ /dev/null @@ -1,214 +0,0 @@ -/* - socket handling interface - Copyright (C) 1999-2006, Joe Orton - - 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 - -*/ - -#ifndef NE_SOCKET_H -#define NE_SOCKET_H - -#include - -#include "ne_defs.h" -#include "ne_ssl.h" /* for ne_ssl_context */ - -NE_BEGIN_DECLS - -#define NE_SOCK_ERROR (-1) -/* Read/Write timed out */ -#define NE_SOCK_TIMEOUT (-2) -/* Socket was closed */ -#define NE_SOCK_CLOSED (-3) -/* Connection was reset (e.g. server crashed) */ -#define NE_SOCK_RESET (-4) -/* Secure connection was closed without proper SSL shutdown. */ -#define NE_SOCK_TRUNC (-5) - -/* ne_socket represents a TCP socket. */ -typedef struct ne_socket_s ne_socket; - -/* ne_sock_addr represents an address object. */ -typedef struct ne_sock_addr_s ne_sock_addr; - -#ifndef NE_INET_ADDR_DEFINED -typedef struct ne_inet_addr_s ne_inet_addr; -#endif - -/* Perform process-global initialization of any libraries in use. - * Returns non-zero on error. */ -int ne_sock_init(void); - -/* Perform process-global shutdown of any libraries in use. This - * function only has effect when it has been called an equal number of - * times to ne_sock_init() for the process. */ -void ne_sock_exit(void); - -/* Resolve the given hostname. 'flags' must be zero. Hex - * string IPv6 addresses (e.g. `::1') may be enclosed in brackets - * (e.g. `[::1]'). */ -ne_sock_addr *ne_addr_resolve(const char *hostname, int flags); - -/* Returns zero if name resolution was successful, non-zero on - * error. */ -int ne_addr_result(const ne_sock_addr *addr); - -/* Returns the first network address associated with the 'addr' - * object. Undefined behaviour if ne_addr_result returns non-zero for - * 'addr'; otherwise, never returns NULL. */ -const ne_inet_addr *ne_addr_first(ne_sock_addr *addr); - -/* Returns the next network address associated with the 'addr' object, - * or NULL if there are no more. */ -const ne_inet_addr *ne_addr_next(ne_sock_addr *addr); - -/* NB: the pointers returned by ne_addr_first and ne_addr_next are - * valid until ne_addr_destroy is called for the corresponding - * ne_sock_addr object. They must not be passed to ne_iaddr_free. */ - -/* If name resolution fails, copies the error string into 'buffer', - * which is of size 'bufsiz'. 'buffer' is returned. */ -char *ne_addr_error(const ne_sock_addr *addr, char *buffer, size_t bufsiz); - -/* Destroys an address object created by ne_addr_resolve. */ -void ne_addr_destroy(ne_sock_addr *addr); - -/* Network address type; IPv4 or IPv6 */ -typedef enum { - ne_iaddr_ipv4 = 0, - ne_iaddr_ipv6 -} ne_iaddr_type; - -/* Create a network address object from raw byte representation (in - * network byte order) of given type. 'raw' must be four bytes for an - * IPv4 address, 16 bytes for an IPv6 address. May return NULL if - * address type is not supported. */ -ne_inet_addr *ne_iaddr_make(ne_iaddr_type type, const unsigned char *raw); - -/* Compare two network address objects i1 and i2; returns zero if they - * are equivalent or non-zero otherwise. */ -int ne_iaddr_cmp(const ne_inet_addr *i1, const ne_inet_addr *i2); - -/* Return the type of the given network address object. */ -ne_iaddr_type ne_iaddr_typeof(const ne_inet_addr *ia); - -/* Print the string representation of network address 'ia' into the - * buffer 'buffer', which is of length 'bufsiz'. Returns 'buffer'. */ -char *ne_iaddr_print(const ne_inet_addr *ia, char *buffer, size_t bufsiz); - -/* Perform the reverse name lookup on network address 'ia', placing - * the returned name in the 'buf' buffer (of length 'bufsiz') if - * successful. Returns zero on success, or non-zero on error. */ -int ne_iaddr_reverse(const ne_inet_addr *ia, char *buf, size_t bufsiz); - -/* Destroy a network address object created using ne_iaddr_make. */ -void ne_iaddr_free(ne_inet_addr *addr); - -/* Create a socket object; returns NULL on error. */ -ne_socket *ne_sock_create(void); - -/* Connect the socket to server at address 'addr' on port 'port'. - * Returns zero on success, NE_SOCK_TIMEOUT if a timeout occurs when a - * non-zero connect timeout is configured (and is supported), or - * NE_SOCK_ERROR on failure. */ -int ne_sock_connect(ne_socket *sock, const ne_inet_addr *addr, - unsigned int port); - -/* Read up to 'count' bytes from socket into 'buffer'. Returns: - * NE_SOCK_* on error, - * >0 length of data read into buffer (may be less than 'count') - */ -ssize_t ne_sock_read(ne_socket *sock, char *buffer, size_t count); - -/* Read up to 'count' bytes into 'buffer', leaving the data available - * in the socket buffer to be returned by a subsequent call to - * ne_sock_read or ne_sock_peek. Returns: - * NE_SOCK_* on error, - * >0 length of data read into buffer. - */ -ssize_t ne_sock_peek(ne_socket *sock, char *buffer, size_t count); - -/* Block for up to 'n' seconds until data becomes available for reading - * from the socket. Returns: - * NE_SOCK_* on error, - * NE_SOCK_TIMEOUT if no data arrives in 'n' seconds, - * 0 if data arrived on the socket. - */ -int ne_sock_block(ne_socket *sock, int n); - -/* Write 'count' bytes of 'data' to the socket. Guarantees to either - * write all the bytes or to fail. Returns 0 on success, or NE_SOCK_* - * on error. */ -int ne_sock_fullwrite(ne_socket *sock, const char *data, size_t count); - -/* Read an LF-terminated line into 'buffer', and NUL-terminate it. - * At most 'len' bytes are read (including the NUL terminator). - * Returns: - * NE_SOCK_* on error, - * >0 number of bytes read (including NUL terminator) - */ -ssize_t ne_sock_readline(ne_socket *sock, char *buffer, size_t len); - -/* Read exactly 'len' bytes into buffer, or fail; returns 0 on - * success, NE_SOCK_* on error. */ -ssize_t ne_sock_fullread(ne_socket *sock, char *buffer, size_t len); - -/* Accepts a connection from listening socket 'fd' and places the - * socket in 'sock'. Returns zero on success or -1 on failure. */ -int ne_sock_accept(ne_socket *sock, int fd); - -/* Returns the file descriptor used for socket 'sock'. */ -int ne_sock_fd(const ne_socket *sock); - -/* Close the socket and destroy the socket object. Returns zero on - * success, or an errno value if close() failed. */ -int ne_sock_close(ne_socket *sock); - -/* Return current error string for socket. */ -const char *ne_sock_error(const ne_socket *sock); - -/* Set read timeout for socket, in seconds; must be a non-zero - * positive integer. */ -void ne_sock_read_timeout(ne_socket *sock, int timeout); - -/* Set connect timeout for socket, in seconds; must be a positive - * integer. If a timeout of 'zero' is used then then no explicit - * timeout handling will be used for ne_sock_connect(), and the - * connect call will only timeout as dictated by the TCP stack. */ -void ne_sock_connect_timeout(ne_socket *sock, int timeout); - -/* Negotiate an SSL connection on socket as an SSL server, using given - * SSL context. */ -int ne_sock_accept_ssl(ne_socket *sock, ne_ssl_context *ctx); - -/* Negotiate an SSL connection on socket as an SSL client, using given - * SSL context. The 'userdata' parameter is associated with the - * underlying SSL library's socket structure for use in callbacks. - * Returns zero on success, or non-zero on error. */ -int ne_sock_connect_ssl(ne_socket *sock, ne_ssl_context *ctx, - void *userdata); - -/* Retrieve the session ID of the current SSL session. If 'buf' is - * non-NULL, on success, copies at most *buflen bytes to 'buf' and - * sets *buflen to the exact number of bytes copied. If 'buf' is - * NULL, on success, sets *buflen to the length of the session ID. - * Returns zero on success, non-zero on error. */ -int ne_sock_sessid(ne_socket *sock, unsigned char *buf, size_t *buflen); - -NE_END_DECLS - -#endif /* NE_SOCKET_H */ diff --git a/client/neon-0.27.2/src/ne_ssl.h b/client/neon-0.27.2/src/ne_ssl.h deleted file mode 100644 index ded5ed1f4..000000000 --- a/client/neon-0.27.2/src/ne_ssl.h +++ /dev/null @@ -1,180 +0,0 @@ -/* - SSL/TLS abstraction layer for neon - Copyright (C) 2003-2006, Joe Orton - - 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 - -*/ - -/* ne_ssl.h defines an interface for loading and accessing the - * properties of SSL certificates. */ - -#ifndef NE_SSL_H -#define NE_SSL_H 1 - -#include - -#include "ne_defs.h" - -NE_BEGIN_DECLS - -/* A "distinguished name"; a unique name for some entity. */ -typedef struct ne_ssl_dname_s ne_ssl_dname; - -/* Returns a single-line string representation of a distinguished - * name, intended to be human-readable (e.g. "Acme Ltd., Norfolk, - * GB"). Return value is a UTF-8-encoded malloc-allocated string and - * must be free'd by the caller. */ -char *ne_ssl_readable_dname(const ne_ssl_dname *dn); - -/* Returns zero if 'dn1' and 'dn2' refer to same name, or non-zero if - * they are different. */ -int ne_ssl_dname_cmp(const ne_ssl_dname *dn1, const ne_ssl_dname *dn2); - -/* An SSL certificate. */ -typedef struct ne_ssl_certificate_s ne_ssl_certificate; - -/* Read a certificate from a file in PEM format; returns NULL if the - * certificate could not be parsed. */ -ne_ssl_certificate *ne_ssl_cert_read(const char *filename); - -/* Write a certificate to a file in PEM format; returns non-zero if - * the certificate could not be written. */ -int ne_ssl_cert_write(const ne_ssl_certificate *cert, const char *filename); - -/* Export a certificate to a base64-encoded, NUL-terminated string. - * The returned string is malloc-allocated and must be free()d by the - * caller. */ -char *ne_ssl_cert_export(const ne_ssl_certificate *cert); - -/* Import a certificate from a base64-encoded string as returned by - * ne_ssl_cert_export(). Returns a certificate object or NULL if - * 'data' was not valid. */ -ne_ssl_certificate *ne_ssl_cert_import(const char *data); - -/* Returns the identity of the certificate, or NULL if none is given. - * For a server certificate this will be the hostname of the server to - * whom the cert was issued. String returned is UTF-8-encoded. */ -const char *ne_ssl_cert_identity(const ne_ssl_certificate *cert); - -/* Return the certificate of the entity which signed certificate - * 'cert'. Returns NULL if 'cert' is self-signed or the issuer - * certificate is not available. */ -const ne_ssl_certificate *ne_ssl_cert_signedby(const ne_ssl_certificate *cert); - -/* Returns the distinguished name of the certificate issuer. */ -const ne_ssl_dname *ne_ssl_cert_issuer(const ne_ssl_certificate *cert); - -/* Returns the distinguished name of the certificate subject. */ -const ne_ssl_dname *ne_ssl_cert_subject(const ne_ssl_certificate *cert); - -#define NE_SSL_DIGESTLEN (60) - -/* Calculate the certificate digest ("fingerprint") and format it as a - * NUL-terminated hex string in 'digest', of the form "aa:bb:...:ff". - * Returns zero on success or non-zero if there was an internal error - * whilst calculating the digest. 'digest' must be at least - * NE_SSL_DIGESTLEN bytes in length. */ -int ne_ssl_cert_digest(const ne_ssl_certificate *cert, char *digest); - -/* Copy the validity times for the certificate 'cert' into 'from' and - * 'until' (either may be NULL). If the time cannot be represented by - * a time_t value, then (time_t)-1 will be written. */ -void ne_ssl_cert_validity_time(const ne_ssl_certificate *cert, - time_t *from, time_t *until); - -#define NE_SSL_VDATELEN (30) -/* Copy the validity times into buffers 'from' and 'until' as - * NUL-terminated human-readable strings, using RFC 1123-style date - * formatting (and not localized, so always using English month/week - * names). The buffers must be at least NE_SSL_VDATELEN bytes in - * length, and either may be NULL. */ -void ne_ssl_cert_validity(const ne_ssl_certificate *cert, - char *from, char *until); - -/* Returns zero if 'c1' and 'c2' refer to the same certificate, or - * non-zero otherwise. */ -int ne_ssl_cert_cmp(const ne_ssl_certificate *c1, - const ne_ssl_certificate *c2); - -/* Deallocate memory associated with certificate. */ -void ne_ssl_cert_free(ne_ssl_certificate *cert); - -/* A client certificate (and private key). */ -typedef struct ne_ssl_client_cert_s ne_ssl_client_cert; - -/* Read a client certificate and private key from a PKCS12 file; - * returns NULL if the file could not be parsed, or otherwise - * returning a client certificate object. */ -ne_ssl_client_cert *ne_ssl_clicert_read(const char *filename); - -/* Returns the "friendly name" given for the client cert, or NULL if - * none given. This can be called before or after the client cert has - * been decrypted. Returns a NUL-terminated, UTF-8-encoded string. */ -const char *ne_ssl_clicert_name(const ne_ssl_client_cert *ccert); - -/* Returns non-zero if client cert is encrypted. */ -int ne_ssl_clicert_encrypted(const ne_ssl_client_cert *ccert); - -/* Decrypt the encrypted client cert using given password. Returns - * non-zero on failure, in which case, the function can be called - * again with a different password. For a ccert on which _encrypted() - * returns 0, calling _decrypt results in undefined behaviour. */ -int ne_ssl_clicert_decrypt(ne_ssl_client_cert *ccert, const char *password); - -/* Return the actual certificate part of the client certificate (never - * returns NULL). */ -const ne_ssl_certificate *ne_ssl_clicert_owner(const ne_ssl_client_cert *ccert); - -/* Destroy a client certificate object. */ -void ne_ssl_clicert_free(ne_ssl_client_cert *ccert); - - -/* SSL context object. The interfaces to manipulate an SSL context - * are only needed when interfacing directly with ne_socket.h. */ -typedef struct ne_ssl_context_s ne_ssl_context; - -/* Context creation modes: */ -#define NE_SSL_CTX_CLIENT (0) /* client context */ -#define NE_SSL_CTX_SERVER (1) /* default server context */ -#define NE_SSL_CTX_SERVERv2 (2) /* SSLv2-specific server context */ - -/* Create an SSL context. */ -ne_ssl_context *ne_ssl_context_create(int mode); - -/* Client mode: trust the given certificate 'cert' in context 'ctx'. */ -void ne_ssl_context_trustcert(ne_ssl_context *ctx, const ne_ssl_certificate *cert); - -/* Server mode: use given cert and key (filenames to PEM certificates). */ -int ne_ssl_context_keypair(ne_ssl_context *ctx, - const char *cert, const char *key); - -/* Server mode: set client cert verification options: required is non-zero if - * a client cert is required, if ca_names is non-NULL it is a filename containing - * a set of PEM certs from which CA names are sent in the ccert request. */ -int ne_ssl_context_set_verify(ne_ssl_context *ctx, int required, - const char *ca_names, const char *verify_cas); - -#define NE_SSL_CTX_SSLv2 (0) -/* Set a flag for the SSL context. */ -void ne_ssl_context_set_flag(ne_ssl_context *ctx, int flag, int value); - -/* Destroy an SSL context. */ -void ne_ssl_context_destroy(ne_ssl_context *ctx); - -NE_END_DECLS - -#endif diff --git a/client/neon-0.27.2/src/ne_sspi.c b/client/neon-0.27.2/src/ne_sspi.c deleted file mode 100644 index 4b59cdc86..000000000 --- a/client/neon-0.27.2/src/ne_sspi.c +++ /dev/null @@ -1,615 +0,0 @@ -/* - Microsoft SSPI based authentication routines - Copyright (C) 2004-2005, Vladimir Berezniker @ http://public.xdi.org/=vmpn - Copyright (C) 2007, Yves Martin - - 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 - -*/ - -#include "config.h" - -#include "ne_utils.h" -#include "ne_string.h" -#include "ne_socket.h" -#include "ne_sspi.h" - -#ifdef HAVE_SSPI - -#define SEC_SUCCESS(Status) ((Status) >= 0) - -#ifndef SECURITY_ENTRYPOINT /* Missing in MingW 3.7 */ -#define SECURITY_ENTRYPOINT "InitSecurityInterfaceA" -#endif - -struct SSPIContextStruct { - CtxtHandle context; - char *serverName; - CredHandle credentials; - int continueNeeded; - int authfinished; - char *mechanism; - int ntlm; - ULONG maxTokenSize; -}; - -typedef struct SSPIContextStruct SSPIContext; - -static ULONG negotiateMaxTokenSize = 0; -static ULONG ntlmMaxTokenSize = 0; -static HINSTANCE hSecDll = NULL; -static PSecurityFunctionTable pSFT = NULL; -static int initialized = 0; - -/* - * Query specified package for it's maximum token size. - */ -static int getMaxTokenSize(char *package, ULONG * maxTokenSize) -{ - SECURITY_STATUS status; - SecPkgInfo *packageSecurityInfo = NULL; - - status = pSFT->QuerySecurityPackageInfo(package, &packageSecurityInfo); - if (status == SEC_E_OK) { - *maxTokenSize = packageSecurityInfo->cbMaxToken; - if (pSFT->FreeContextBuffer(packageSecurityInfo) != SEC_E_OK) { - NE_DEBUG(NE_DBG_HTTPAUTH, - "sspi: Unable to free security package info."); - } - } else { - NE_DEBUG(NE_DBG_HTTPAUTH, - "sspi: QuerySecurityPackageInfo [failed] [%x].", status); - return -1; - } - - return 0; -} - -/* - * Initialize all the SSPI data - */ -static void initDll(HINSTANCE hSecDll) -{ - INIT_SECURITY_INTERFACE initSecurityInterface = NULL; - - initSecurityInterface = - (INIT_SECURITY_INTERFACE) GetProcAddress(hSecDll, - SECURITY_ENTRYPOINT); - - if (initSecurityInterface == NULL) { - NE_DEBUG(NE_DBG_HTTPAUTH, - "sspi: Obtaining security interface [fail].\n"); - initialized = -1; - return; - } else { - NE_DEBUG(NE_DBG_HTTPAUTH, - "sspi: Obtaining security interface [ok].\n"); - } - - pSFT = (initSecurityInterface) (); - - if (pSFT == NULL) { - NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: Security Function Table [fail].\n"); - initialized = -2; - return; - } else { - NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: Security Function Table [ok].\n"); - } - - if (getMaxTokenSize("Negotiate", &negotiateMaxTokenSize)) { - NE_DEBUG(NE_DBG_HTTPAUTH, - "sspi: Unable to get negotiate maximum packet size"); - initialized = -3; - } - - if (getMaxTokenSize("NTLM", &ntlmMaxTokenSize)) { - NE_DEBUG(NE_DBG_HTTPAUTH, - "sspi: Unable to get negotiate maximum packet size"); - initialized = -3; - } -} - -/* - * This function needs to be called at least once before using any other. - */ -int ne_sspi_init(void) -{ - if (initialized) { - return 0; - } - - NE_DEBUG(NE_DBG_SOCKET, "sspiInit\n"); - NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: Loading security dll.\n"); - hSecDll = LoadLibrary("security.dll"); - - if (hSecDll == NULL) { - NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: Loading of security dll [fail].\n"); - } else { - NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: Loading of security dll [ok].\n"); - initDll(hSecDll); - if (initialized == 0) { - initialized = 1; - } - } - - NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: sspiInit [%d].\n", initialized); - if (initialized < 0) { - return initialized; - } else { - return 0; - } -} - -/* - * This function can be called to free resources used by SSPI. - */ -int ne_sspi_deinit(void) -{ - NE_DEBUG(NE_DBG_SOCKET, "sspi: DeInit\n"); - if (initialized <= 0) { - return initialized; - } - - pSFT = NULL; - - if (hSecDll != NULL) { - NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: Unloading security dll.\n"); - if (FreeLibrary(hSecDll)) { - NE_DEBUG(NE_DBG_HTTPAUTH, - "sspi: Unloading of security dll [ok].\n"); - } else { - NE_DEBUG(NE_DBG_HTTPAUTH, - "sspi: Unloading of security dll [fail].\n"); - return -1; - } - hSecDll = NULL; - } - - initialized = 0; - return 0; -} - -/* - * Simplification wrapper arround AcquireCredentialsHandle as most of - * the parameters do not change. - */ -static int acquireCredentialsHandle(CredHandle * credentials, char *package) -{ - SECURITY_STATUS status; - TimeStamp timestamp; - - status = - pSFT->AcquireCredentialsHandle(NULL, package, SECPKG_CRED_OUTBOUND, - NULL, NULL, NULL, NULL, credentials, - ×tamp); - - if (status != SEC_E_OK) { - NE_DEBUG(NE_DBG_HTTPAUTH, - "sspi: AcquireCredentialsHandle [fail] [%x].\n", status); - return -1; - } - - return 0; -} - -/* - * Wrapper arround initializeSecurityContext. Supplies several - * default parameters as well as logging in case of errors. - */ -static SECURITY_STATUS -initializeSecurityContext(CredHandle * credentials, CtxtHandle * context, - char *spn, ULONG contextReq, - SecBufferDesc * inBuffer, CtxtHandle * newContext, - SecBufferDesc * outBuffer) -{ - ULONG contextAttributes; - SECURITY_STATUS status; - - status = - pSFT->InitializeSecurityContext(credentials, context, spn, contextReq, - 0, SECURITY_NETWORK_DREP, inBuffer, 0, - newContext, outBuffer, - &contextAttributes, NULL); - - if (!SEC_SUCCESS(status)) { - if (status == SEC_E_INVALID_TOKEN) { - NE_DEBUG(NE_DBG_HTTPAUTH, - "InitializeSecurityContext [fail] SEC_E_INVALID_TOKEN.\n"); - } else if (status == SEC_E_UNSUPPORTED_FUNCTION) { - NE_DEBUG(NE_DBG_HTTPAUTH, - "InitializeSecurityContext [fail] SEC_E_UNSUPPORTED_FUNCTION.\n"); - } else { - NE_DEBUG(NE_DBG_HTTPAUTH, - "InitializeSecurityContext [fail] [%x].\n", status); - } - } - - return status; -} - -/* - * Validates that the pointer is not NULL and converts it to its real type. - */ -static int getContext(void *context, SSPIContext **sspiContext) -{ - if (!context) { - return -1; - } - - *sspiContext = context; - return 0; -} - -/* - * Verifies that the buffer descriptor point only to one buffer and - * returns the pointer to it. - */ -static int getSingleBufferDescriptor(SecBufferDesc *secBufferDesc, - SecBuffer **secBuffer) -{ - if (secBufferDesc->cBuffers != 1) { - NE_DEBUG(NE_DBG_HTTPAUTH, - "sspi: fillBufferDescriptor " - "[fail] numbers of descriptor buffers. 1 != [%d].\n", - secBufferDesc->cBuffers); - return -1; - } - - *secBuffer = secBufferDesc->pBuffers; - return 0; -} - -/* - * Decodes BASE64 string into SSPI SecBuffer - */ -static int base64ToBuffer(const char *token, SecBufferDesc * secBufferDesc) -{ - SecBuffer *buffer; - if (getSingleBufferDescriptor(secBufferDesc, &buffer)) { - return -1; - } - - buffer->BufferType = SECBUFFER_TOKEN; - buffer->cbBuffer = - ne_unbase64(token, (unsigned char **) &buffer->pvBuffer); - - if (buffer->cbBuffer == 0) { - NE_DEBUG(NE_DBG_HTTPAUTH, - "sspi: Unable to decode BASE64 SSPI token.\n"); - return -1; - } - - return 0; -} - -/* - * Creates a SecBuffer of a specified size. - */ -static int makeBuffer(SecBufferDesc * secBufferDesc, ULONG size) -{ - SecBuffer *buffer; - if (getSingleBufferDescriptor(secBufferDesc, &buffer)) { - return -1; - } - - buffer->BufferType = SECBUFFER_TOKEN; - buffer->cbBuffer = size; - buffer->pvBuffer = ne_calloc(size); - - return 0; -} - -/* - * Frees data allocated in the buffer. - */ -static int freeBuffer(SecBufferDesc * secBufferDesc) -{ - SecBuffer *buffer; - if (getSingleBufferDescriptor(secBufferDesc, &buffer)) { - return -1; - } - - if (buffer->cbBuffer > 0 && buffer->pvBuffer) { - ne_free(buffer->pvBuffer); - buffer->cbBuffer = 0; - buffer->pvBuffer = NULL; - } - - return 0; -} - -/* - * Canonicalize a server host name if possible. - * The returned pointer must be freed after usage. - */ -static char *canonical_hostname(const char *serverName) -{ - char *hostname; - ne_sock_addr *addresses; - - /* DNS resolution. It would be useful to be able to use the - * AI_CANONNAME flag where getaddrinfo() is available, but the - * reverse-lookup is sufficient and simpler. */ - addresses = ne_addr_resolve(serverName, 0); - if (ne_addr_result(addresses)) { - /* Lookup failed */ - char buf[256]; - NE_DEBUG(NE_DBG_HTTPAUTH, - "sspi: Could not resolve IP address for `%s': %s\n", - serverName, ne_addr_error(addresses, buf, sizeof buf)); - hostname = ne_strdup(serverName); - } else { - char hostbuffer[256]; - const ne_inet_addr *address = ne_addr_first(addresses); - - if (ne_iaddr_reverse(address, hostbuffer, sizeof hostbuffer) == 0) { - hostname = ne_strdup(hostbuffer); - } else { - NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: Could not resolve host name" - "from IP address for `%s'\n", serverName); - hostname = ne_strdup(serverName); - } - } - - ne_addr_destroy(addresses); - return hostname; -} - -/* - * Create a context to authenticate to specified server, using either - * ntlm or negotiate. - */ -int ne_sspi_create_context(void **context, char *serverName, int ntlm) -{ - SSPIContext *sspiContext; - char *canonicalName; - - if (initialized <= 0) { - return -1; - } - - sspiContext = ne_calloc(sizeof(SSPIContext)); - sspiContext->continueNeeded = 0; - - if (ntlm) { - sspiContext->mechanism = "NTLM"; - sspiContext->serverName = ne_strdup(serverName); - sspiContext->maxTokenSize = ntlmMaxTokenSize; - } else { - sspiContext->mechanism = "Negotiate"; - /* Canonicalize to conform to GSSAPI behavior */ - canonicalName = canonical_hostname(serverName); - sspiContext->serverName = ne_concat("HTTP/", canonicalName, NULL); - ne_free(canonicalName); - NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: Created context with SPN '%s'\n", - sspiContext->serverName); - sspiContext->maxTokenSize = negotiateMaxTokenSize; - } - - sspiContext->ntlm = ntlm; - sspiContext->authfinished = 0; - *context = sspiContext; - return 0; -} - -/* - * Resets the context - */ -static void resetContext(SSPIContext * sspiContext) -{ - pSFT->DeleteSecurityContext(&(sspiContext->context)); -#if defined(_MSC_VER) && _MSC_VER <= 1200 - pSFT->FreeCredentialHandle(&(sspiContext->credentials)); -#else - pSFT->FreeCredentialsHandle(&(sspiContext->credentials)); -#endif - sspiContext->continueNeeded = 0; -} - -/* - * Initializes supplied SecBufferDesc to point to supplied SecBuffer - * that is also initialized; - */ -static void -initSingleEmptyBuffer(SecBufferDesc * bufferDesc, SecBuffer * buffer) -{ - buffer->BufferType = SECBUFFER_EMPTY; - buffer->cbBuffer = 0; - buffer->pvBuffer = NULL; - - bufferDesc->cBuffers = 1; - bufferDesc->ulVersion = SECBUFFER_VERSION; - bufferDesc->pBuffers = buffer; - -} - -/* - * Destroyes the supplied context. - */ -int ne_sspi_destroy_context(void *context) -{ - - int status; - SSPIContext *sspiContext; - - if (initialized <= 0) { - return -1; - } - - status = getContext(context, &sspiContext); - if (status) { - return status; - } - - resetContext(sspiContext); - if (sspiContext->serverName) { - ne_free(sspiContext->serverName); - sspiContext->serverName = NULL; - } - - ne_free(sspiContext); - return 0; -} -int ne_sspi_clear_context(void *context) -{ - int status; - SSPIContext *sspiContext; - - if (initialized <= 0) { - return -1; - } - - status = getContext(context, &sspiContext); - if (status) { - return status; - } - sspiContext->authfinished = 0; - return 0; -} -/* - * Processes received authentication tokens as well as supplies the - * response token. - */ -int ne_sspi_authenticate(void *context, const char *base64Token, char **responseToken) -{ - SecBufferDesc outBufferDesc; - SecBuffer outBuffer; - int status; - SECURITY_STATUS securityStatus; - ULONG contextFlags; - - SSPIContext *sspiContext; - if (initialized <= 0) { - return -1; - } - - status = getContext(context, &sspiContext); - if (status) { - return status; - } - - /* TODO: Not sure what flags should be set. joe: this needs to be - * driven by the ne_auth interface; the GSSAPI code needs similar - * flags. */ - contextFlags = ISC_REQ_CONFIDENTIALITY | ISC_REQ_MUTUAL_AUTH; - - initSingleEmptyBuffer(&outBufferDesc, &outBuffer); - status = makeBuffer(&outBufferDesc, sspiContext->maxTokenSize); - if (status) { - return status; - } - - if (base64Token) { - SecBufferDesc inBufferDesc; - SecBuffer inBuffer; - - if (!sspiContext->continueNeeded) { - freeBuffer(&outBufferDesc); - NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: Got an unexpected token.\n"); - return -1; - } - - initSingleEmptyBuffer(&inBufferDesc, &inBuffer); - - status = base64ToBuffer(base64Token, &inBufferDesc); - if (status) { - freeBuffer(&outBufferDesc); - return status; - } - - securityStatus = - initializeSecurityContext(&sspiContext->credentials, - &(sspiContext->context), - sspiContext->serverName, contextFlags, - &inBufferDesc, &(sspiContext->context), - &outBufferDesc); - if (securityStatus == SEC_E_OK) - { - sspiContext->authfinished = 1; - } - freeBuffer(&inBufferDesc); - } else { - if (sspiContext->continueNeeded) { - freeBuffer(&outBufferDesc); - NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: Expected a token from server.\n"); - return -1; - } - if (sspiContext->authfinished && (sspiContext->credentials.dwLower || sspiContext->credentials.dwUpper)) { - if (sspiContext->authfinished) - { - freeBuffer(&outBufferDesc); - sspiContext->authfinished = 0; - NE_DEBUG(NE_DBG_HTTPAUTH,"sspi: failing because starting over from failed try.\n"); - return -1; - } - sspiContext->authfinished = 0; - } - - /* Reset any existing context since we are starting over */ - resetContext(sspiContext); - - if (acquireCredentialsHandle - (&sspiContext->credentials, sspiContext->mechanism) != SEC_E_OK) { - freeBuffer(&outBufferDesc); - NE_DEBUG(NE_DBG_HTTPAUTH, - "sspi: acquireCredentialsHandle failed.\n"); - return -1; - } - - securityStatus = - initializeSecurityContext(&sspiContext->credentials, NULL, - sspiContext->serverName, contextFlags, - NULL, &(sspiContext->context), - &outBufferDesc); - } - - if (securityStatus == SEC_I_COMPLETE_AND_CONTINUE - || securityStatus == SEC_I_COMPLETE_NEEDED) { - SECURITY_STATUS compleStatus = - pSFT->CompleteAuthToken(&(sspiContext->context), &outBufferDesc); - - if (compleStatus != SEC_E_OK) { - freeBuffer(&outBufferDesc); - NE_DEBUG(NE_DBG_HTTPAUTH, "sspi: CompleteAuthToken failed.\n"); - return -1; - } - } - - if (securityStatus == SEC_I_COMPLETE_AND_CONTINUE - || securityStatus == SEC_I_CONTINUE_NEEDED) { - sspiContext->continueNeeded = 1; - } else { - sspiContext->continueNeeded = 0; - } - - if (!(securityStatus == SEC_I_COMPLETE_AND_CONTINUE - || securityStatus == SEC_I_COMPLETE_NEEDED - || securityStatus == SEC_I_CONTINUE_NEEDED - || securityStatus == SEC_E_OK)) { - NE_DEBUG(NE_DBG_HTTPAUTH, - "sspi: initializeSecurityContext [failed] [%x].\n", - securityStatus); - freeBuffer(&outBufferDesc); - return -1; - } - - *responseToken = ne_base64(outBufferDesc.pBuffers->pvBuffer, - outBufferDesc.pBuffers->cbBuffer); - freeBuffer(&outBufferDesc); - - return 0; -} -#endif /* HAVE_SSPI */ diff --git a/client/neon-0.27.2/src/ne_sspi.h b/client/neon-0.27.2/src/ne_sspi.h deleted file mode 100644 index 73f2b17dc..000000000 --- a/client/neon-0.27.2/src/ne_sspi.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - Microsoft SSPI based authentication routines - Copyright (C) 2004-2005, Vladimir Berezniker @ http://public.xdi.org/=vmpn - - 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 - -*/ - -#ifndef NE_SSPI_H -#define NE_SSPI_H - -/* Win32 SSPI-based authentication interfaces. PRIVATE TO NEON -- NOT - * PART OF THE EXTERNAL API. */ - -#ifdef HAVE_SSPI - -#include -#define SECURITY_WIN32 -#include - -int ne_sspi_init(void); -int ne_sspi_deinit(void); - -int ne_sspi_create_context(void **context, char * serverName, int ntlm); - -int ne_sspi_destroy_context(void *context); - -int ne_sspi_clear_context(void *context); - -int ne_sspi_authenticate(void *context, const char *base64Token, - char **responseToken); - -#endif /* HAVE_SSPI */ - -#endif /* NE_SSPI_H */ diff --git a/client/neon-0.27.2/src/ne_string.c b/client/neon-0.27.2/src/ne_string.c deleted file mode 100644 index facba5b58..000000000 --- a/client/neon-0.27.2/src/ne_string.c +++ /dev/null @@ -1,487 +0,0 @@ -/* - String utility functions - Copyright (C) 1999-2007, Joe Orton - strcasecmp/strncasecmp implementations are: - Copyright (C) 1991, 1992, 1995, 1996, 1997 Free Software Foundation, Inc. - This file is part of the GNU C Library. - - 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 - -*/ - -#include "config.h" - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include - -#include /* for isprint() etc in ne_strclean() */ - -#include "ne_alloc.h" -#include "ne_string.h" - -char *ne_token(char **str, char separator) -{ - char *ret = *str, *pnt = strchr(*str, separator); - - if (pnt) { - *pnt = '\0'; - *str = pnt + 1; - } else { - /* no separator found: return end of string. */ - *str = NULL; - } - - return ret; -} - -char *ne_qtoken(char **str, char separator, const char *quotes) -{ - char *pnt, *ret = NULL; - - for (pnt = *str; *pnt != '\0'; pnt++) { - char *quot = strchr(quotes, *pnt); - - if (quot) { - char *qclose = strchr(pnt+1, *quot); - - if (!qclose) { - /* no closing quote: invalid string. */ - return NULL; - } - - pnt = qclose; - } else if (*pnt == separator) { - /* found end of token. */ - *pnt = '\0'; - ret = *str; - *str = pnt + 1; - return ret; - } - } - - /* no separator found: return end of string. */ - ret = *str; - *str = NULL; - return ret; -} - -char *ne_shave(char *str, const char *whitespace) -{ - char *pnt, *ret = str; - - while (*ret != '\0' && strchr(whitespace, *ret) != NULL) { - ret++; - } - - /* pnt points at the NUL terminator. */ - pnt = &ret[strlen(ret)]; - - while (pnt > ret && strchr(whitespace, *(pnt-1)) != NULL) { - pnt--; - } - - *pnt = '\0'; - return ret; -} - -void ne_buffer_clear(ne_buffer *buf) -{ - memset(buf->data, 0, buf->length); - buf->used = 1; -} - -/* Grows for given size, returns 0 on success, -1 on error. */ -void ne_buffer_grow(ne_buffer *buf, size_t newsize) -{ -#define NE_BUFFER_GROWTH 512 - if (newsize > buf->length) { - /* If it's not big enough already... */ - buf->length = ((newsize / NE_BUFFER_GROWTH) + 1) * NE_BUFFER_GROWTH; - - /* Reallocate bigger buffer */ - buf->data = ne_realloc(buf->data, buf->length); - } -} - -static size_t count_concat(va_list *ap) -{ - size_t total = 0; - char *next; - - while ((next = va_arg(*ap, char *)) != NULL) - total += strlen(next); - - return total; -} - -static void do_concat(char *str, va_list *ap) -{ - char *next; - - while ((next = va_arg(*ap, char *)) != NULL) { -#ifdef HAVE_STPCPY - str = stpcpy(str, next); -#else - size_t len = strlen(next); - memcpy(str, next, len); - str += len; -#endif - } -} - -void ne_buffer_concat(ne_buffer *buf, ...) -{ - va_list ap; - ssize_t total; - - va_start(ap, buf); - total = buf->used + count_concat(&ap); - va_end(ap); - - /* Grow the buffer */ - ne_buffer_grow(buf, total); - - va_start(ap, buf); - do_concat(buf->data + buf->used - 1, &ap); - va_end(ap); - - buf->used = total; - buf->data[total - 1] = '\0'; -} - -char *ne_concat(const char *str, ...) -{ - va_list ap; - size_t total, slen = strlen(str); - char *ret; - - va_start(ap, str); - total = slen + count_concat(&ap); - va_end(ap); - - ret = memcpy(ne_malloc(total + 1), str, slen); - - va_start(ap, str); - do_concat(ret + slen, &ap); - va_end(ap); - - ret[total] = '\0'; - return ret; -} - -/* Append zero-terminated string... returns 0 on success or -1 on - * realloc failure. */ -void ne_buffer_zappend(ne_buffer *buf, const char *str) -{ - ne_buffer_append(buf, str, strlen(str)); -} - -void ne_buffer_append(ne_buffer *buf, const char *data, size_t len) -{ - ne_buffer_grow(buf, buf->used + len); - memcpy(buf->data + buf->used - 1, data, len); - buf->used += len; - buf->data[buf->used - 1] = '\0'; -} - -size_t ne_buffer_snprintf(ne_buffer *buf, size_t max, const char *fmt, ...) -{ - va_list ap; - size_t ret; - - ne_buffer_grow(buf, buf->used + max); - - va_start(ap, fmt); - ret = ne_vsnprintf(buf->data + buf->used - 1, max, fmt, ap); - va_end(ap); - buf->used += ret; - - return ret; -} - -ne_buffer *ne_buffer_create(void) -{ - return ne_buffer_ncreate(512); -} - -ne_buffer *ne_buffer_ncreate(size_t s) -{ - ne_buffer *buf = ne_malloc(sizeof(*buf)); - buf->data = ne_malloc(s); - buf->data[0] = '\0'; - buf->length = s; - buf->used = 1; - return buf; -} - -void ne_buffer_destroy(ne_buffer *buf) -{ - ne_free(buf->data); - ne_free(buf); -} - -char *ne_buffer_finish(ne_buffer *buf) -{ - char *ret = buf->data; - ne_free(buf); - return ret; -} - -void ne_buffer_altered(ne_buffer *buf) -{ - buf->used = strlen(buf->data) + 1; -} - -static const char b64_alphabet[] = - "ABCDEFGHIJKLMNOPQRSTUVWXYZ" - "abcdefghijklmnopqrstuvwxyz" - "0123456789+/="; - -char *ne_base64(const unsigned char *text, size_t inlen) -{ - /* The tricky thing about this is doing the padding at the end, - * doing the bit manipulation requires a bit of concentration only */ - char *buffer, *point; - size_t outlen; - - /* Use 'buffer' to store the output. Work out how big it should be... - * This must be a multiple of 4 bytes */ - - outlen = (inlen*4)/3; - if ((inlen % 3) > 0) /* got to pad */ - outlen += 4 - (inlen % 3); - - buffer = ne_malloc(outlen + 1); /* +1 for the \0 */ - - /* now do the main stage of conversion, 3 bytes at a time, - * leave the trailing bytes (if there are any) for later */ - - for (point=buffer; inlen>=3; inlen-=3, text+=3) { - *(point++) = b64_alphabet[ (*text)>>2 ]; - *(point++) = b64_alphabet[ ((*text)<<4 & 0x30) | (*(text+1))>>4 ]; - *(point++) = b64_alphabet[ ((*(text+1))<<2 & 0x3c) | (*(text+2))>>6 ]; - *(point++) = b64_alphabet[ (*(text+2)) & 0x3f ]; - } - - /* Now deal with the trailing bytes */ - if (inlen > 0) { - /* We always have one trailing byte */ - *(point++) = b64_alphabet[ (*text)>>2 ]; - *(point++) = b64_alphabet[ (((*text)<<4 & 0x30) | - (inlen==2?(*(text+1))>>4:0)) ]; - *(point++) = (inlen==1?'=':b64_alphabet[ (*(text+1))<<2 & 0x3c ]); - *(point++) = '='; - } - - /* Null-terminate */ - *point = '\0'; - - return buffer; -} - -/* VALID_B64: fail if 'ch' is not a valid base64 character */ -#define VALID_B64(ch) (((ch) >= 'A' && (ch) <= 'Z') || \ - ((ch) >= 'a' && (ch) <= 'z') || \ - ((ch) >= '0' && (ch) <= '9') || \ - (ch) == '/' || (ch) == '+' || (ch) == '=') - -/* DECODE_B64: decodes a valid base64 character. */ -#define DECODE_B64(ch) ((ch) >= 'a' ? ((ch) + 26 - 'a') : \ - ((ch) >= 'A' ? ((ch) - 'A') : \ - ((ch) >= '0' ? ((ch) + 52 - '0') : \ - ((ch) == '+' ? 62 : 63)))) - -size_t ne_unbase64(const char *data, unsigned char **out) -{ - size_t inlen = strlen(data); - unsigned char *outp; - const unsigned char *in; - - if (inlen == 0 || (inlen % 4) != 0) return 0; - - outp = *out = ne_malloc(inlen * 3 / 4); - - for (in = (const unsigned char *)data; *in; in += 4) { - unsigned int tmp; - if (!VALID_B64(in[0]) || !VALID_B64(in[1]) || !VALID_B64(in[2]) || - !VALID_B64(in[3]) || in[0] == '=' || in[1] == '=' || - (in[2] == '=' && in[3] != '=')) { - ne_free(*out); - return 0; - } - tmp = (DECODE_B64(in[0]) & 0x3f) << 18 | - (DECODE_B64(in[1]) & 0x3f) << 12; - *outp++ = (tmp >> 16) & 0xff; - if (in[2] != '=') { - tmp |= (DECODE_B64(in[2]) & 0x3f) << 6; - *outp++ = (tmp >> 8) & 0xff; - if (in[3] != '=') { - tmp |= DECODE_B64(in[3]) & 0x3f; - *outp++ = tmp & 0xff; - } - } - } - - return outp - *out; -} - -char *ne_strclean(char *str) -{ - char *pnt; - for (pnt = str; *pnt; pnt++) - if (iscntrl(*pnt) || !isprint(*pnt)) *pnt = ' '; - return str; -} - -char *ne_strerror(int errnum, char *buf, size_t buflen) -{ -#ifdef HAVE_STRERROR_R -#ifdef STRERROR_R_CHAR_P - /* glibc-style strerror_r which may-or-may-not use provided buffer. */ - char *ret = strerror_r(errnum, buf, buflen); - if (ret != buf) - ne_strnzcpy(buf, ret, buflen); -#else /* POSIX-style strerror_r: */ - char tmp[256]; - - if (strerror_r(errnum, tmp, sizeof tmp) == 0) - ne_strnzcpy(buf, tmp, buflen); - else - ne_snprintf(buf, buflen, "Unknown error %d", errnum); -#endif -#else /* no strerror_r: */ - ne_strnzcpy(buf, strerror(errnum), buflen); -#endif - return buf; -} - - -/* Wrapper for ne_snprintf. */ -size_t ne_snprintf(char *str, size_t size, const char *fmt, ...) -{ - va_list ap; - va_start(ap, fmt); -#ifdef HAVE_TRIO - trio_vsnprintf(str, size, fmt, ap); -#else - vsnprintf(str, size, fmt, ap); -#endif - va_end(ap); - str[size-1] = '\0'; - return strlen(str); -} - -/* Wrapper for ne_vsnprintf. */ -size_t ne_vsnprintf(char *str, size_t size, const char *fmt, va_list ap) -{ -#ifdef HAVE_TRIO - trio_vsnprintf(str, size, fmt, ap); -#else - vsnprintf(str, size, fmt, ap); -#endif - str[size-1] = '\0'; - return strlen(str); -} - -/* Locale-independent strcasecmp implementations. */ -static const unsigned char ascii_tolower[256] = { -0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, -0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, -0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, -0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, -0x20, 0x21, 0x22, 0x23, 0x24, 0x25, 0x26, 0x27, -0x28, 0x29, 0x2a, 0x2b, 0x2c, 0x2d, 0x2e, 0x2f, -0x30, 0x31, 0x32, 0x33, 0x34, 0x35, 0x36, 0x37, -0x38, 0x39, 0x3a, 0x3b, 0x3c, 0x3d, 0x3e, 0x3f, -0x40, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, -0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, -0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, -0x78, 0x79, 0x7a, 0x5b, 0x5c, 0x5d, 0x5e, 0x5f, -0x60, 0x61, 0x62, 0x63, 0x64, 0x65, 0x66, 0x67, -0x68, 0x69, 0x6a, 0x6b, 0x6c, 0x6d, 0x6e, 0x6f, -0x70, 0x71, 0x72, 0x73, 0x74, 0x75, 0x76, 0x77, -0x78, 0x79, 0x7a, 0x7b, 0x7c, 0x7d, 0x7e, 0x7f, -0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, -0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, -0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, -0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, -0xa0, 0xa1, 0xa2, 0xa3, 0xa4, 0xa5, 0xa6, 0xa7, -0xa8, 0xa9, 0xaa, 0xab, 0xac, 0xad, 0xae, 0xaf, -0xb0, 0xb1, 0xb2, 0xb3, 0xb4, 0xb5, 0xb6, 0xb7, -0xb8, 0xb9, 0xba, 0xbb, 0xbc, 0xbd, 0xbe, 0xbf, -0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6, 0xc7, -0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd, 0xce, 0xcf, -0xd0, 0xd1, 0xd2, 0xd3, 0xd4, 0xd5, 0xd6, 0xd7, -0xd8, 0xd9, 0xda, 0xdb, 0xdc, 0xdd, 0xde, 0xdf, -0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6, 0xe7, -0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed, 0xee, 0xef, -0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, -0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff -}; - -#define TOLOWER(ch) ascii_tolower[ch] - -const unsigned char *ne_tolower_array(void) -{ - return ascii_tolower; -} - -int ne_strcasecmp(const char *s1, const char *s2) -{ - const unsigned char *p1 = (const unsigned char *) s1; - const unsigned char *p2 = (const unsigned char *) s2; - unsigned char c1, c2; - - if (p1 == p2) - return 0; - - do { - c1 = TOLOWER(*p1++); - c2 = TOLOWER(*p2++); - if (c1 == '\0') - break; - } while (c1 == c2); - - return c1 - c2; -} - -int ne_strncasecmp(const char *s1, const char *s2, size_t n) -{ - const unsigned char *p1 = (const unsigned char *) s1; - const unsigned char *p2 = (const unsigned char *) s2; - unsigned char c1, c2; - - if (p1 == p2 || n == 0) - return 0; - - do { - c1 = TOLOWER(*p1++); - c2 = TOLOWER(*p2++); - if (c1 == '\0' || c1 != c2) - return c1 - c2; - } while (--n > 0); - - return c1 - c2; -} diff --git a/client/neon-0.27.2/src/ne_string.h b/client/neon-0.27.2/src/ne_string.h deleted file mode 100644 index fd195699d..000000000 --- a/client/neon-0.27.2/src/ne_string.h +++ /dev/null @@ -1,177 +0,0 @@ -/* - String utility functions - Copyright (C) 1999-2007, Joe Orton - - 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 - -*/ - -#ifndef NE_STRING_H -#define NE_STRING_H - -#include "ne_defs.h" -#include "ne_alloc.h" - -#include - -NE_BEGIN_DECLS - -/* ne_token and ne_qtoken return the next token in *str before either - * the next separator character 'sep' or the NUL terminator. - * ne_qtoken skips over any parts quoted using a pair of any one of - * the characters given in 'quotes'. After returning, *str will point - * to the next character after the separator, or NULL if no separator - * character was found. - * - * ne_qtoken will return NULL if unterminated quotes are found. */ -char *ne_token(char **str, char sep); -char *ne_qtoken(char **str, char sep, const char *quotes); - -/* Return portion of 'str' with any characters in 'whitespace' shaved - * off the beginning and end. Modifies str in-place. */ -char *ne_shave(char *str, const char *whitespace); - -/* Cleanse 'str' of non-printable (e.g. control) characters. 'str' is - * modified in-place, and returned. */ -char *ne_strclean(char *str); - -/* Encode 'len' bytes of 'text' to base64. Returns malloc-allocated - * NUL-terminated buffer which the caller must free(). */ -char *ne_base64(const unsigned char *text, size_t len); - -/* Decode NUL-terminated base64-encoded string 'data', placing - * malloc-allocated raw decoder output in '*out'. Returns length, or - * zero on decode error (in which case the content of *out is - * undefined). */ -size_t ne_unbase64(const char *data, unsigned char **out); - -/* Dynamically-allocated string buffer. A string buffer which grows - * dynamically . (Strings are zero-terminated still). A - * string buffer ne_buffer which grows dynamically with the string. */ -typedef struct { - char *data; /* contents: NUL-terminated string */ - size_t used; /* strlen(data) + 1 */ - size_t length; /* number of bytes allocated */ -} ne_buffer; - -/* Create a new string buffer object. */ -ne_buffer *ne_buffer_create(void); - -/* Create a new string buffer object with at least 'size' bytes of - * allocated space. */ -ne_buffer *ne_buffer_ncreate(size_t size); - -/* Returns size of data in buffer, equiv to strlen(ne_buffer_data(buf)) */ -#define ne_buffer_size(buf) ((buf)->used - 1) - -/* Concatenate all given strings onto the end of the buffer. The - * strings must all be NUL-terminated, and MUST be followed by a NULL - * argument marking the end of the list. */ -void ne_buffer_concat(ne_buffer *buf, ...); - -/* Append a NUL-terminated string 'str' to buf. */ -void ne_buffer_zappend(ne_buffer *buf, const char *str); - -/* Append 'len' bytes of 'data' to buf, where 'data' does not contain - * a NUL terminator. (A NUL terminator is appended to buf) */ -void ne_buffer_append(ne_buffer *buf, const char *data, size_t len); - -/* Print a string to the end of the buffer using printf-style format - * string 'format' and subsqeuent arguments. At most 'max' characters - * are appended; the number of characters appended (excluding the NUL - * terminator) is returned. Behaviour is undefined if 'max' is passed - * as zero. */ -size_t ne_buffer_snprintf(ne_buffer *buf, size_t max, - const char *format, ...) - ne_attribute((format(printf, 3, 4))); - -/* Append a literal, NUL-terminated constant string 'str' to buffer - * 'buf'. */ -#define ne_buffer_czappend(buf, str) \ -ne_buffer_append((buf), (str), sizeof((str)) - 1) - -/* Clear the string buffer 'buf', making it equivalent to the empty - * string. */ -void ne_buffer_clear(ne_buffer *buf); - -/* Grow the allocated size of string buffer 'buf' to at least 'size' - * bytes. */ -void ne_buffer_grow(ne_buffer *buf, size_t size); - -/* Re-establish the 'used' invariant if the string buffer data field is - * altered directly. */ -void ne_buffer_altered(ne_buffer *buf); - -/* Destroy the string buffer object 'buf' without deallocating the - * data string. The data string must subsequently be freed using - * ne_free(). */ -char *ne_buffer_finish(ne_buffer *buf); - -/* Destroy a string buffer object. */ -void ne_buffer_destroy(ne_buffer *buf); - -/* Thread-safe strerror() wrapper; place system error for errno value - * 'errnum' in 'buffer', which is of length 'buflen'. Returns - * 'buffer'. */ -char *ne_strerror(int errnum, char *buffer, size_t buflen); - -/* ne_strnzcpy copies at most 'n'-1 bytes of 'src' to 'dest', and - * ensures that 'dest' is subsequently NUL-terminated. */ -#define ne_strnzcpy(dest, src, n) do { size_t ne__nm1 = (n) - 1; \ -strncpy(dest, src, ne__nm1); dest[ne__nm1] = '\0'; } while (0) - -/* Return malloc-allocated concatenation of all NUL-terminated string - * arguments, up to a terminating NULL pointer. */ -char *ne_concat(const char *str, ...); - -/* Wrapper for snprintf: always NUL-terminates returned buffer, and - * returns strlen(str). */ -size_t ne_snprintf(char *str, size_t size, const char *fmt, ...) - ne_attribute((format(printf, 3, 4))); - -/* Wrapper for vsnprintf. */ -size_t ne_vsnprintf(char *str, size_t size, const char *fmt, va_list ap) - ne_attribute((format(printf, 3, 0))); - -/* Implementations of strcasecmp and strncasecmp which behave as - * defined by the ANSI C strcasecmp() and strncasecmp() when in the - * POSIX locale; i.e. ignoring the process locale. */ - -/* Compares 's1' and 's2', ignoring differences in case. */ -int ne_strcasecmp(const char *s1, const char *s2); -/* Compares up to 'n' characters of 's1' and 's2', ignoring - * differences in case. */ -int ne_strncasecmp(const char *s1, const char *s2, size_t n); - -/* Return lowercase 'c' as in POSIX locale; note difference from ANSI - * C semantics as both the argument and return value are unsigned - * char. */ -#define ne_tolower(c) (ne_tolower_array()[(unsigned char)c]) - -const unsigned char *ne_tolower_array(void); - -/* Convert an ASCII hexadecimal character in the ranges '0'..'9' - * 'a'..'f' 'A'..'F' to its numeric equivalent. */ -#define NE_ASC2HEX(x) (((x) <= '9') ? ((x) - '0') : \ - (ne_tolower((x)) + 10 - 'a')) - -/* Convert an integer in the range 0..15 to the equivalent (lowercase) - * ASCII hexadecimal equivalent character, in the range '0..9,'a..f' */ -#define NE_HEX2ASC(x) ((char) ((x) > 9 ? ((x) - 10 + 'a') : ((x) + '0'))) - -NE_END_DECLS - -#endif /* NE_STRING_H */ diff --git a/client/neon-0.27.2/src/ne_stubssl.c b/client/neon-0.27.2/src/ne_stubssl.c deleted file mode 100644 index 77f905580..000000000 --- a/client/neon-0.27.2/src/ne_stubssl.c +++ /dev/null @@ -1,145 +0,0 @@ -/* - Stubs for SSL support when no SSL library has been configured - Copyright (C) 2002-2006, Joe Orton - - 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 - -*/ - -#include "config.h" - -#include /* for NULL */ - -#include "ne_ssl.h" -#include "ne_session.h" - -char *ne_ssl_readable_dname(const ne_ssl_dname *dn) -{ - return NULL; -} - -ne_ssl_certificate *ne_ssl_cert_read(const char *filename) -{ - return NULL; -} - -int ne_ssl_cert_cmp(const ne_ssl_certificate *c1, const ne_ssl_certificate *c2) -{ - return 1; -} - -const ne_ssl_certificate *ne_ssl_cert_signedby(const ne_ssl_certificate *cert) -{ - return NULL; -} - -const ne_ssl_dname *ne_ssl_cert_issuer(const ne_ssl_certificate *cert) -{ - return NULL; -} - -const ne_ssl_dname *ne_ssl_cert_subject(const ne_ssl_certificate *cert) -{ - return NULL; -} - -void ne_ssl_cert_free(ne_ssl_certificate *cert) {} - -ne_ssl_client_cert *ne_ssl_clicert_read(const char *filename) -{ - return NULL; -} - -const ne_ssl_certificate *ne_ssl_clicert_owner(const ne_ssl_client_cert *ccert) -{ - return NULL; -} - -int ne_ssl_clicert_encrypted(const ne_ssl_client_cert *ccert) -{ - return -1; -} - -int ne_ssl_clicert_decrypt(ne_ssl_client_cert *ccert, const char *password) -{ - return -1; -} - -void ne_ssl_clicert_free(ne_ssl_client_cert *ccert) {} - -void ne_ssl_trust_default_ca(ne_session *sess) {} - -ne_ssl_context *ne_ssl_context_create(int mode) -{ - return NULL; -} - -void ne_ssl_context_trustcert(ne_ssl_context *ctx, const ne_ssl_certificate *cert) -{} - -int ne_ssl_context_set_verify(ne_ssl_context *ctx, - int required, - const char *ca_names, - const char *verify_cas) -{ - return -1; -} - -void ne_ssl_context_set_flag(ne_ssl_context *ctx, int flag, int value) {} - -void ne_ssl_context_destroy(ne_ssl_context *ctx) {} - -int ne_ssl_cert_digest(const ne_ssl_certificate *cert, char digest[60]) -{ - return -1; -} - -void ne_ssl_cert_validity_time(const ne_ssl_certificate *cert, - time_t *from, time_t *until) {} - -const char *ne_ssl_cert_identity(const ne_ssl_certificate *cert) -{ - return NULL; -} - - -const char *ne_ssl_clicert_name(const ne_ssl_client_cert *ccert) -{ - return NULL; -} - -int ne_ssl_dname_cmp(const ne_ssl_dname *dn1, const ne_ssl_dname *dn2) -{ - return -1; -} - -int ne_ssl_cert_write(const ne_ssl_certificate *cert, const char *filename) -{ - return -1; -} - -char *ne_ssl_cert_export(const ne_ssl_certificate *cert) -{ - return NULL; -} - -ne_ssl_certificate *ne_ssl_cert_import(const char *data) -{ - return NULL; -} - -void ne_ssl_set_clicert(ne_session *sess, const ne_ssl_client_cert *cc) -{} diff --git a/client/neon-0.27.2/src/ne_uri.c b/client/neon-0.27.2/src/ne_uri.c deleted file mode 100644 index 681a47682..000000000 --- a/client/neon-0.27.2/src/ne_uri.c +++ /dev/null @@ -1,617 +0,0 @@ -/* - URI manipulation routines. - Copyright (C) 1999-2006, Joe Orton - - 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 - -*/ - -#include "config.h" - -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_STRINGS_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif - -#include - -#include - -#include "ne_string.h" /* for ne_buffer */ -#include "ne_alloc.h" -#include "ne_uri.h" - -/* URI ABNF from RFC 3986: */ - -#define PS (0x0001) /* "+" */ -#define PC (0x0002) /* "%" */ -#define DS (0x0004) /* "-" */ -#define DT (0x0008) /* "." */ -#define US (0x0010) /* "_" */ -#define TD (0x0020) /* "~" */ -#define FS (0x0040) /* "/" */ -#define CL (0x0080) /* ":" */ -#define AT (0x0100) /* "@" */ -#define QU (0x0200) /* "?" */ - -#define DG (0x0400) /* DIGIT */ -#define AL (0x0800) /* ALPHA */ - -#define GD (0x1000) /* gen-delims = "#" / "[" / "]" - * ... except ":", "/", "@", and "?" */ - -#define SD (0x2000) /* sub-delims = "!" / "$" / "&" / "'" / "(" / ")" - * / "*" / "+" / "," / ";" / "=" - * ... except "+" which is PS */ - -#define OT (0x4000) /* others */ - -#define URI_ALPHA (AL) -#define URI_DIGIT (DG) - -/* unreserved = ALPHA / DIGIT / "-" / "." / "_" / "~" */ -#define URI_UNRESERVED (AL | DG | DS | DT | US | TD) -/* scheme = ALPHA *( ALPHA / DIGIT / "+" / "-" / "." ) */ -#define URI_SCHEME (AL | DG | PS | DS | DT) -/* real sub-delims definition, including "+" */ -#define URI_SUBDELIM (PS | SD) -/* real gen-delims definition, including ":", "/", "@" and "?" */ -#define URI_GENDELIM (GD | CL | FS | AT | QU) -/* userinfo = *( unreserved / pct-encoded / sub-delims / ":" ) */ -#define URI_USERINFO (URI_UNRESERVED | PC | URI_SUBDELIM | CL) -/* pchar = unreserved / pct-encoded / sub-delims / ":" / "@" */ -#define URI_PCHAR (URI_UNRESERVED | PC | URI_SUBDELIM | CL | AT) -/* invented: segchar = pchar / "/" */ -#define URI_SEGCHAR (URI_PCHAR | FS) -/* query = *( pchar / "/" / "?" ) */ -#define URI_QUERY (URI_PCHAR | FS | QU) -/* fragment == query */ -#define URI_FRAGMENT URI_QUERY - -/* any characters which should be path-escaped: */ -#define URI_ESCAPE ((URI_GENDELIM & ~(FS)) | URI_SUBDELIM | OT | PC) - -static const unsigned int uri_chars[256] = { -/* 0xXX x0 x2 x4 x6 x8 xA xC xE */ -/* 0x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, -/* 1x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, -/* 2x */ OT, SD, OT, GD, SD, PC, SD, SD, SD, SD, SD, PS, SD, DS, DT, FS, -/* 3x */ DG, DG, DG, DG, DG, DG, DG, DG, DG, DG, CL, SD, OT, SD, OT, QU, -/* 4x */ AT, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, -/* 5x */ AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, GD, OT, GD, OT, US, -/* 6x */ OT, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, -/* 7x */ AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, AL, OT, OT, OT, TD, OT, -/* 8x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, -/* 9x */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, -/* Ax */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, -/* Bx */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, -/* Cx */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, -/* Dx */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, -/* Ex */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, -/* Fx */ OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT, OT -}; - -#define uri_lookup(ch) (uri_chars[(unsigned char)ch]) - -char *ne_path_parent(const char *uri) -{ - size_t len = strlen(uri); - const char *pnt = uri + len - 1; - /* skip trailing slash (parent of "/foo/" is "/") */ - if (pnt >= uri && *pnt == '/') - pnt--; - /* find previous slash */ - while (pnt > uri && *pnt != '/') - pnt--; - if (pnt < uri || (pnt == uri && *pnt != '/')) - return NULL; - return ne_strndup(uri, pnt - uri + 1); -} - -int ne_path_has_trailing_slash(const char *uri) -{ - size_t len = strlen(uri); - return ((len > 0) && - (uri[len-1] == '/')); -} - -unsigned int ne_uri_defaultport(const char *scheme) -{ - /* RFC2616/3.2.3 says use case-insensitive comparisons here. */ - if (ne_strcasecmp(scheme, "http") == 0) - return 80; - else if (ne_strcasecmp(scheme, "https") == 0) - return 443; - else - return 0; -} - -int ne_uri_parse(const char *uri, ne_uri *parsed) -{ - const char *p, *s; - - memset(parsed, 0, sizeof *parsed); - - p = s = uri; - - /* => s = p = URI-reference */ - - if (uri_lookup(*p) & URI_ALPHA) { - while (uri_lookup(*p) & URI_SCHEME) - p++; - - if (*p == ':') { - parsed->scheme = ne_strndup(uri, p - s); - s = p + 1; - } - } - - /* => s = heir-part, or s = relative-part */ - - if (s[0] == '/' && s[1] == '/') { - const char *pa; - - /* => s = "//" authority path-abempty (from expansion of - * either heir-part of relative-part) */ - - /* authority = [ userinfo "@" ] host [ ":" port ] */ - - s = pa = s + 2; /* => s = authority */ - - while (*pa != '/' && *pa != '\0') - pa++; - /* => pa = path-abempty */ - - p = s; - while (p < pa && uri_lookup(*p) & URI_USERINFO) - p++; - - if (*p == '@') { - parsed->userinfo = ne_strndup(s, p - s); - s = p + 1; - } - /* => s = host */ - - if (s[0] == '[') { - p = s + 1; - - while (*p != ']' && p < pa) - p++; - - if (p == pa || (p + 1 != pa && p[1] != ':')) { - /* Ill-formed IP-literal. */ - return -1; - } - - p++; /* => p = colon */ - } else { - /* Find the colon. */ - p = pa; - while (*p != ':' && p > s) - p--; - } - - if (p == s) { - p = pa; - /* No colon; => p = path-abempty */ - } else if (p + 1 != pa) { - /* => p = colon */ - parsed->port = atoi(p + 1); - } - parsed->host = ne_strndup(s, p - s); - - s = pa; - - if (*s == '\0') { - s = "/"; /* FIXME: scheme-specific. */ - } - } - - /* => s = path-abempty / path-absolute / path-rootless - * / path-empty / path-noscheme */ - - p = s; - - while (uri_lookup(*p) & URI_SEGCHAR) - p++; - - /* => p = [ "?" query ] [ "#" fragment ] */ - - parsed->path = ne_strndup(s, p - s); - - if (*p != '\0') { - s = p++; - - while (uri_lookup(*p) & URI_QUERY) - p++; - - /* => p = [ "#" fragment ] */ - /* => s = [ "?" query ] [ "#" fragment ] */ - - if (*s == '?') { - parsed->query = ne_strndup(s + 1, p - s - 1); - - if (*p != '\0') { - s = p++; - - while (uri_lookup(*p) & URI_FRAGMENT) - p++; - } - } - - /* => p now points to the next character after the - * URI-reference; which should be the NUL byte. */ - - if (*s == '#') { - parsed->fragment = ne_strndup(s + 1, p - s - 1); - } - else if (*p || *s != '?') { - return -1; - } - } - - return 0; -} - -/* This function directly implements the "Merge Paths" algorithm - * described in RFC 3986 section 5.2.3. */ -static char *merge_paths(const ne_uri *base, const char *path) -{ - const char *p; - - if (base->host && base->path[0] == '\0') { - return ne_concat("/", path, NULL); - } - - p = strrchr(base->path, '/'); - if (p == NULL) { - return ne_strdup(path); - } else { - size_t len = p - base->path + 1; - char *ret = ne_malloc(strlen(path) + len + 1); - - memcpy(ret, base->path, len); - memcpy(ret + len, path, strlen(path) + 1); - return ret; - } -} - -/* This function directly implements the "Remove Dot Segments" - * algorithm described in RFC 3986 section 5.2.4. */ -static char *remove_dot_segments(const char *path) -{ - char *in, *inc, *out; - - inc = in = ne_strdup(path); - out = ne_malloc(strlen(path) + 1); - out[0] = '\0'; - - while (in[0]) { - /* case 2.A: */ - if (strncmp(in, "./", 2) == 0) { - in += 2; - } - else if (strncmp(in, "../", 3) == 0) { - in += 3; - } - - /* case 2.B: */ - else if (strncmp(in, "/./", 3) == 0) { - in += 2; - } - else if (strcmp(in, "/.") == 0) { - in[1] = '\0'; - } - - /* case 2.C: */ - else if (strncmp(in, "/../", 4) == 0 || strcmp(in, "/..") == 0) { - char *p; - - /* Make the next character in the input buffer a "/": */ - if (in[3] == '\0') { - /* terminating "/.." case */ - in += 2; - in[0] = '/'; - } else { - /* "/../" prefix case */ - in += 3; - } - - /* Trim the last component from the output buffer, or - * empty it. */ - p = strrchr(out, '/'); - if (p) { - *p = '\0'; - } else { - out[0] = '\0'; - } - } - - /* case 2.D: */ - else if (strcmp(in, ".") == 0 || strcmp(in, "..") == 0) { - in[0] = '\0'; - } - - /* case 2.E */ - else { - char *p; - - /* Search for the *second* "/" if the leading character is - * already "/": */ - p = strchr(in + (in[0] == '/'), '/'); - /* Otherwise, copy the whole string */ - if (p == NULL) p = strchr(in, '\0'); - - strncat(out, in, p - in); - in = p; - } - } - - ne_free(inc); - - return out; -} - -/* Copy authority components from 'src' to 'dest' if defined. */ -static void copy_authority(ne_uri *dest, const ne_uri *src) -{ - if (src->host) dest->host = ne_strdup(src->host); - dest->port = src->port; - if (src->userinfo) dest->userinfo = ne_strdup(src->userinfo); -} - -/* This function directly implements the "Transform References" - * algorithm described in RFC 3986 section 5.2.2. */ -ne_uri *ne_uri_resolve(const ne_uri *base, const ne_uri *relative, - ne_uri *target) -{ - memset(target, 0, sizeof *target); - - if (relative->scheme) { - target->scheme = ne_strdup(relative->scheme); - copy_authority(target, relative); - target->path = remove_dot_segments(relative->path); - if (relative->query) target->query = ne_strdup(relative->query); - } else { - if (relative->host) { - copy_authority(target, relative); - target->path = remove_dot_segments(relative->path); - if (relative->query) target->query = ne_strdup(relative->query); - } else { - if (relative->path[0] == '\0') { - target->path = ne_strdup(base->path); - if (relative->query) { - target->query = ne_strdup(relative->query); - } else if (base->query) { - target->query = ne_strdup(base->query); - } - } else { - if (relative->path[0] == '/') { - target->path = remove_dot_segments(relative->path); - } else { - char *merged = merge_paths(base, relative->path); - target->path = remove_dot_segments(merged); - ne_free(merged); - } - if (relative->query) target->query = ne_strdup(relative->query); - } - copy_authority(target, base); - } - if (base->scheme) target->scheme = ne_strdup(base->scheme); - } - - if (relative->fragment) target->fragment = ne_strdup(relative->fragment); - - return target; -} - -ne_uri *ne_uri_copy(ne_uri *dest, const ne_uri *src) -{ - memset(dest, 0, sizeof *dest); - - if (src->scheme) dest->scheme = ne_strdup(src->scheme); - copy_authority(dest, src); - if (src->path) dest->path = ne_strdup(src->path); - if (src->query) dest->query = ne_strdup(src->query); - if (src->fragment) dest->fragment = ne_strdup(src->fragment); - - return dest; -} - -void ne_uri_free(ne_uri *u) -{ - if (u->host) ne_free(u->host); - if (u->path) ne_free(u->path); - if (u->scheme) ne_free(u->scheme); - if (u->userinfo) ne_free(u->userinfo); - if (u->fragment) ne_free(u->fragment); - if (u->query) ne_free(u->query); - memset(u, 0, sizeof *u); -} - -char *ne_path_unescape(const char *uri) -{ - const char *pnt; - char *ret, *retpos, buf[5] = { "0x00\0" }; - retpos = ret = ne_malloc(strlen(uri) + 1); - for (pnt = uri; *pnt != '\0'; pnt++) { - if (*pnt == '%') { - if (!isxdigit((unsigned char) pnt[1]) || - !isxdigit((unsigned char) pnt[2])) { - /* Invalid URI */ - ne_free(ret); - return NULL; - } - buf[2] = *++pnt; buf[3] = *++pnt; /* bit faster than memcpy */ - *retpos++ = (char)strtol(buf, NULL, 16); - } else { - *retpos++ = *pnt; - } - } - *retpos = '\0'; - return ret; -} - -/* CH must be an unsigned char; evaluates to 1 if CH should be - * percent-encoded. */ -#define path_escape_ch(ch) (uri_lookup(ch) & URI_ESCAPE) - -char *ne_path_escape(const char *path) -{ - const unsigned char *pnt; - char *ret, *p; - size_t count = 0; - - for (pnt = (const unsigned char *)path; *pnt != '\0'; pnt++) { - count += path_escape_ch(*pnt); - } - - if (count == 0) { - return ne_strdup(path); - } - - p = ret = ne_malloc(strlen(path) + 2 * count + 1); - for (pnt = (const unsigned char *)path; *pnt != '\0'; pnt++) { - if (path_escape_ch(*pnt)) { - /* Escape it - % */ - sprintf(p, "%%%02x", (unsigned char) *pnt); - p += 3; - } else { - *p++ = *pnt; - } - } - *p = '\0'; - return ret; -} - -#undef path_escape_ch - -#define CMPWITH(field, func) \ - do { \ - if (u1->field) { \ - if (!u2->field) return -1; \ - n = func(u1->field, u2->field); \ - if (n) return n; \ - } else if (u2->field) { \ - return 1; \ - } \ - } while (0) - -#define CMP(field) CMPWITH(field, strcmp) -#define CASECMP(field) CMPWITH(field, ne_strcasecmp) - -/* As specified by RFC 2616, section 3.2.3. */ -int ne_uri_cmp(const ne_uri *u1, const ne_uri *u2) -{ - int n; - - CMP(path); - CASECMP(host); - CASECMP(scheme); - CMP(query); - CMP(fragment); - CMP(userinfo); - - return u2->port - u1->port; -} - -#undef CMP -#undef CASECMP -#undef CMPWITH - -/* TODO: implement properly */ -int ne_path_compare(const char *a, const char *b) -{ - int ret = ne_strcasecmp(a, b); - if (ret) { - /* This logic says: "If the lengths of the two URIs differ by - * exactly one, and the LONGER of the two URIs has a trailing - * slash and the SHORTER one DOESN'T, then..." */ - int traila = ne_path_has_trailing_slash(a), - trailb = ne_path_has_trailing_slash(b), - lena = strlen(a), lenb = strlen(b); - if (traila != trailb && abs(lena - lenb) == 1 && - ((traila && lena > lenb) || (trailb && lenb > lena))) { - /* Compare them, ignoring the trailing slash on the longer - * URI */ - if (strncasecmp(a, b, lena < lenb ? lena : lenb) == 0) - ret = 0; - } - } - return ret; -} - -char *ne_uri_unparse(const ne_uri *uri) -{ - ne_buffer *buf = ne_buffer_create(); - - if (uri->scheme) { - ne_buffer_concat(buf, uri->scheme, ":", NULL); - } - - if (uri->host) { - ne_buffer_czappend(buf, "//"); - if (uri->userinfo) { - ne_buffer_concat(buf, uri->userinfo, "@", NULL); - } - ne_buffer_zappend(buf, uri->host); - - if (uri->port > 0 - && (!uri->scheme - || ne_uri_defaultport(uri->scheme) != uri->port)) { - char str[20]; - ne_snprintf(str, 20, ":%d", uri->port); - ne_buffer_zappend(buf, str); - } - } - - ne_buffer_zappend(buf, uri->path); - - if (uri->query) { - ne_buffer_concat(buf, "?", uri->query, NULL); - } - - if (uri->fragment) { - ne_buffer_concat(buf, "#", uri->fragment, NULL); - } - - return ne_buffer_finish(buf); -} - -/* Give it a path segment, it returns non-zero if child is - * a child of parent. */ -int ne_path_childof(const char *parent, const char *child) -{ - char *root = ne_strdup(child); - int ret; - if (strlen(parent) >= strlen(child)) { - ret = 0; - } else { - /* root is the first of child, equal to length of parent */ - root[strlen(parent)] = '\0'; - ret = (ne_path_compare(parent, root) == 0); - } - ne_free(root); - return ret; -} diff --git a/client/neon-0.27.2/src/ne_uri.h b/client/neon-0.27.2/src/ne_uri.h deleted file mode 100644 index f5d3f1471..000000000 --- a/client/neon-0.27.2/src/ne_uri.h +++ /dev/null @@ -1,100 +0,0 @@ -/* - URI manipulation routines. - Copyright (C) 1999-2006, Joe Orton - - 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 - -*/ - -#ifndef NE_URI_H -#define NE_URI_H - -#include "ne_defs.h" - -NE_BEGIN_DECLS - -/* Return a copy of a path string with anything other than - * "unreserved" and the forward-slash character percent-encoded - * according to the URI encoding rules. Returns a malloc-allocated - * string and never NULL. */ -char *ne_path_escape(const char *path); - -/* Return a decoded copy of a percent-encoded path string. Returns - * malloc-allocated path on success, or NULL if the string contained - * any syntactically invalid percent-encoding sequences. */ -char *ne_path_unescape(const char *epath); - -/* Returns malloc-allocated parent of path, or NULL if path has no - * parent (such as "/"). */ -char *ne_path_parent(const char *path); - -/* Returns strcmp-like value giving comparison between p1 and p2, - * ignoring trailing-slashes. */ -int ne_path_compare(const char *p1, const char *p2); - -/* Returns non-zero if child is a child of parent */ -int ne_path_childof(const char *parent, const char *child); - -/* Returns non-zero if path has a trailing slash character */ -int ne_path_has_trailing_slash(const char *path); - -/* Return the default port for the given scheme, or 0 if none is - * known. */ -unsigned int ne_uri_defaultport(const char *scheme); - -typedef struct { - char *scheme; - char *host, *userinfo; - unsigned int port; - char *path, *query, *fragment; -} ne_uri; - -/* Parse a URI-reference 'uri' and place parsed components in *parsed. - * Returns zero on success, non-zero on parse error. On successful or - * error return, all the 'char *' fields of *parsed are either set to - * NULL, or point to malloc-allocated NUL-terminated strings. - * ne_uri_free can be used to free the structure after use. */ -int ne_uri_parse(const char *uri, ne_uri *parsed); - -/* Turns a URI structure back into a string. The returned string is - * malloc-allocated, and must be freed by the caller. */ -char *ne_uri_unparse(const ne_uri *uri); - -/* Resolve a relative URI 'relative', with respect to base URI 'base', - * placing the resultant URI in '*result'. On return, all the 'char - * *' fields of *result are either set to NULL or point to - * malloc-allocated NUL-terminated strings. ne_uri_free can be used - * to free the structure after use. Returns 'result'. */ -ne_uri *ne_uri_resolve(const ne_uri *base, const ne_uri *relative, - ne_uri *result); - -/* Compares URIs u1 and u2, returns non-zero if they are found to be - * non-equal. The sign of the return value is <0 if 'u1' is less than - * 'u2', or >0 if 'u2' is greater than 'u1'. */ -int ne_uri_cmp(const ne_uri *u1, const ne_uri *u2); - -/* Copy components of URI 'src' to destination 'dest'. Returns - * 'dest'. */ -ne_uri *ne_uri_copy(ne_uri *dest, const ne_uri *src); - -/* Frees any non-NULL fields of parsed URI structure *parsed. All - * fields are then zero-initialized. */ -void ne_uri_free(ne_uri *parsed); - -NE_END_DECLS - -#endif /* NE_URI_H */ - diff --git a/client/neon-0.27.2/src/ne_utils.c b/client/neon-0.27.2/src/ne_utils.c deleted file mode 100644 index 93985afaf..000000000 --- a/client/neon-0.27.2/src/ne_utils.c +++ /dev/null @@ -1,213 +0,0 @@ -/* - HTTP utility functions - Copyright (C) 1999-2006, Joe Orton - - 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 - -*/ - -#include "config.h" - -#include - -#ifdef HAVE_STRING_H -#include -#endif - -#include -#include /* isdigit() for ne_parse_statusline */ - -#ifdef NE_HAVE_ZLIB -#include -#endif - -#ifdef HAVE_OPENSSL -#include -#endif - -#ifdef HAVE_GNUTLS -#include -#endif - -/* libxml2: pick up the version string. */ -#if defined(HAVE_LIBXML) -#include -#elif defined(HAVE_EXPAT) && !defined(HAVE_XMLPARSE_H) -#include -#endif - -#include "ne_utils.h" -#include "ne_string.h" /* for ne_strdup */ -#include "ne_dates.h" - -int ne_debug_mask = 0; -FILE *ne_debug_stream = NULL; - -void ne_debug_init(FILE *stream, int mask) -{ - ne_debug_stream = stream; - ne_debug_mask = mask; -#if defined(HAVE_SETVBUF) && defined(_IONBF) - /* If possible, turn off buffering on the debug log. this is very - * helpful if debugging segfaults. */ - if (stream) setvbuf(stream, NULL, _IONBF, 0); -#endif -} - -void ne_debug(int ch, const char *template, ...) -{ - va_list params; - if ((ch & ne_debug_mask) == 0) return; - fflush(stdout); - va_start(params, template); - vfprintf(ne_debug_stream, template, params); - va_end(params); - if ((ch & NE_DBG_FLUSH) == NE_DBG_FLUSH) - fflush(ne_debug_stream); -} - -#define NE_STRINGIFY(x) # x -#define NE_EXPAT_VER(x,y,z) NE_STRINGIFY(x) "." NE_STRINGIFY(y) "." NE_STRINGIFY(z) - -static const char version_string[] = "neon " NEON_VERSION ": " -#ifdef NEON_IS_LIBRARY - "Library build" -#else - "Bundled build" -#endif -#ifdef NE_HAVE_IPV6 - ", IPv6" -#endif -#ifdef HAVE_EXPAT - ", Expat" -/* expat >=1.95.2 exported the version */ -#ifdef XML_MAJOR_VERSION -" " NE_EXPAT_VER(XML_MAJOR_VERSION, XML_MINOR_VERSION, XML_MICRO_VERSION) -#endif -#else /* !HAVE_EXPAT */ -#ifdef HAVE_LIBXML - ", libxml " LIBXML_DOTTED_VERSION -#endif /* HAVE_LIBXML */ -#endif /* !HAVE_EXPAT */ -#if defined(NE_HAVE_ZLIB) && defined(ZLIB_VERSION) - ", zlib " ZLIB_VERSION -#endif /* NE_HAVE_ZLIB && ... */ -#ifdef NE_HAVE_SOCKS - ", SOCKSv5" -#endif -#ifdef HAVE_OPENSSL -#ifdef OPENSSL_VERSION_TEXT - ", " OPENSSL_VERSION_TEXT -#else - "OpenSSL (unknown version)" -#endif /* OPENSSL_VERSION_TEXT */ -#endif /* HAVE_OPENSSL */ -#ifdef HAVE_GNUTLS - ", GNU TLS " LIBGNUTLS_VERSION -#endif /* HAVE_GNUTLS */ - "." -; - -const char *ne_version_string(void) -{ - return version_string; -} - -int ne_version_match(int major, int minor) -{ - return NE_VERSION_MAJOR != major || NE_VERSION_MINOR < minor - || (NE_VERSION_MAJOR == 0 && NE_VERSION_MINOR != minor); -} - -int ne_has_support(int feature) -{ - switch (feature) { -#if defined(NE_HAVE_SSL) || defined(NE_HAVE_ZLIB) || defined(NE_HAVE_IPV6) \ - || defined(NE_HAVE_SOCKS) || defined(NE_HAVE_LFS) \ - || defined(NE_HAVE_TS_SSL) || defined(NE_HAVE_I18N) -#ifdef NE_HAVE_SSL - case NE_FEATURE_SSL: -#endif -#ifdef NE_HAVE_ZLIB - case NE_FEATURE_ZLIB: -#endif -#ifdef NE_HAVE_IPV6 - case NE_FEATURE_IPV6: -#endif -#ifdef NE_HAVE_SOCKS - case NE_FEATURE_SOCKS: -#endif -#ifdef NE_HAVE_LFS - case NE_FEATURE_LFS: -#endif -#ifdef NE_HAVE_TS_SSL - case NE_FEATURE_TS_SSL: -#endif -#ifdef NE_HAVE_I18N - case NE_FEATURE_I18N: -#endif - return 1; -#endif /* NE_HAVE_* */ - default: - return 0; - } -} - -int ne_parse_statusline(const char *status_line, ne_status *st) -{ - const char *part; - int major, minor, status_code, klass; - - /* skip leading garbage if any. */ - part = strstr(status_line, "HTTP/"); - if (part == NULL) return -1; - - minor = major = 0; - - /* Parse version string, skipping leading zeroes. */ - for (part += 5; *part != '\0' && isdigit(*part); part++) - major = major*10 + (*part-'0'); - - if (*part++ != '.') return -1; - - for (;*part != '\0' && isdigit(*part); part++) - minor = minor*10 + (*part-'0'); - - if (*part != ' ') return -1; - - /* Skip any spaces */ - for (; *part == ' '; part++) /* noop */; - - /* Parse the Status-Code; part now points at the first Y in - * "HTTP/x.x YYY". */ - if (!isdigit(part[0]) || !isdigit(part[1]) || !isdigit(part[2]) || - (part[3] != '\0' && part[3] != ' ')) return -1; - status_code = 100*(part[0]-'0') + 10*(part[1]-'0') + (part[2]-'0'); - klass = part[0]-'0'; - - /* Skip whitespace between status-code and reason-phrase */ - for (part+=3; *part == ' ' || *part == '\t'; part++) /* noop */; - - /* part now may be pointing to \0 if reason phrase is blank */ - - /* Fill in the results */ - st->major_version = major; - st->minor_version = minor; - st->reason_phrase = ne_strclean(ne_strdup(part)); - st->code = status_code; - st->klass = klass; - return 0; -} diff --git a/client/neon-0.27.2/src/ne_utils.h b/client/neon-0.27.2/src/ne_utils.h deleted file mode 100644 index d23a9456c..000000000 --- a/client/neon-0.27.2/src/ne_utils.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - HTTP utility functions - Copyright (C) 1999-2006, Joe Orton - - 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 - -*/ - -#ifndef NE_UTILS_H -#define NE_UTILS_H - -#include - -#include -#include - -#include "ne_defs.h" - -#ifdef NEON_TRIO -#include -#endif - -NE_BEGIN_DECLS - -/* Returns a human-readable library version string describing the - * version and build information; for example: - * "neon 0.2.0: Library build, OpenSSL support" */ -const char *ne_version_string(void); - -/* Returns non-zero if library version is not of major version - * 'major', or if minor version is not greater than or equal to - * 'minor'. For neon versions with major == 0, all minor versions are - * presumed to be incompatible. */ -int ne_version_match(int major, int minor); - -/* Feature codes: */ -#define NE_FEATURE_SSL (1) /* SSL/TLS support */ -#define NE_FEATURE_ZLIB (2) /* zlib compression in compress interface */ -#define NE_FEATURE_IPV6 (3) /* IPv6 is supported in resolver */ -#define NE_FEATURE_LFS (4) /* large file support */ -#define NE_FEATURE_SOCKS (5) /* SOCKSv5 support */ -#define NE_FEATURE_TS_SSL (6) /* Thread-safe SSL/TLS support */ -#define NE_FEATURE_I18N (7) /* i18n error message support */ - -/* Returns non-zero if library is built with support for the given - * NE_FEATURE_* feature code 'code'. */ -int ne_has_support(int feature); - -/* Debugging macro to allow code to be optimized out if debugging is - * disabled at build time. */ -#ifndef NE_DEBUGGING -#define NE_DEBUG if (0) ne_debug -#else /* DEBUGGING */ -#define NE_DEBUG ne_debug -#endif /* DEBUGGING */ - -/* Debugging masks. */ -#define NE_DBG_SOCKET (1<<0) /* raw socket */ -#define NE_DBG_HTTP (1<<1) /* HTTP request/response handling */ -#define NE_DBG_XML (1<<2) /* XML parser */ -#define NE_DBG_HTTPAUTH (1<<3) /* HTTP authentication (hiding credentials) */ -#define NE_DBG_HTTPPLAIN (1<<4) /* plaintext HTTP authentication */ -#define NE_DBG_LOCKS (1<<5) /* WebDAV locking */ -#define NE_DBG_XMLPARSE (1<<6) /* low-level XML parser */ -#define NE_DBG_HTTPBODY (1<<7) /* HTTP response body blocks */ -#define NE_DBG_SSL (1<<8) /* SSL/TLS */ -#define NE_DBG_FLUSH (1<<30) /* always flush debugging */ - -/* Send debugging output to 'stream', for all of the given debug - * channels. To disable debugging, pass 'stream' as NULL and 'mask' - * as 0. */ -void ne_debug_init(FILE *stream, int mask); - -/* The current debug mask and stream set by the last call to - * ne_debug_init. */ -extern int ne_debug_mask; -extern FILE *ne_debug_stream; - -/* Produce debug output if any of channels 'ch' is enabled for - * debugging. */ -void ne_debug(int ch, const char *, ...) ne_attribute((format(printf, 2, 3))); - -/* Storing an HTTP status result */ -typedef struct { - int major_version; - int minor_version; - int code; /* Status-Code value */ - int klass; /* Class of Status-Code (1-5) */ - char *reason_phrase; -} ne_status; - -/* NB: couldn't use 'class' in ne_status because it would clash with - * the C++ reserved word. */ - -/* Parse 'status_line' using the the RFC2616 Status-Line grammar. - * s->reason_phrase is malloc-allocated if non-NULL, and must be - * free'd by the caller. Returns 0 on success, in which case all - * fields of '*s' will be set; or -1 on parse error, in which case - * '*s' is unmodified. */ -int ne_parse_statusline(const char *status_line, ne_status *s); - -NE_END_DECLS - -#endif /* NE_UTILS_H */ diff --git a/client/neon-0.27.2/src/ne_xml.c b/client/neon-0.27.2/src/ne_xml.c deleted file mode 100644 index 7c95a2e51..000000000 --- a/client/neon-0.27.2/src/ne_xml.c +++ /dev/null @@ -1,674 +0,0 @@ -/* - Wrapper interface to XML parser - Copyright (C) 1999-2007, Joe Orton - - 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 - -*/ - -#include "config.h" - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_STRINGS_H -#include -#endif - -#include "ne_internal.h" - -#include "ne_alloc.h" -#include "ne_xml.h" -#include "ne_utils.h" -#include "ne_string.h" - -#if defined(HAVE_EXPAT) -/* expat support: */ -#ifdef HAVE_XMLPARSE_H -#include "xmlparse.h" -#else -#include -#endif -typedef XML_Char ne_xml_char; - -#if !defined(XML_MAJOR_VERSION) -#define NEED_BOM_HANDLING -#elif XML_MAJOR_VERSION < 2 && XML_MINOR_VERSION == 95 && XML_MICRO_VERSION < 2 -#define NEED_BOM_HANDLING -#endif - -#elif defined(HAVE_LIBXML) -/* libxml2 support: */ -#include -#include -typedef xmlChar ne_xml_char; - -#if LIBXML_VERSION < 20619 -/* 2.6.19 and earlier have broken BOM handling */ -#define NEED_BOM_HANDLING -#endif -#else /* not HAVE_LIBXML */ -# error need an XML parser -#endif /* not HAVE_EXPAT */ - -/* Approx. one screen of text: */ -#define ERR_SIZE (2048) - -struct handler { - ne_xml_startelm_cb *startelm_cb; /* start-element callback */ - ne_xml_endelm_cb *endelm_cb; /* end-element callback */ - ne_xml_cdata_cb *cdata_cb; /* character-data callback. */ - void *userdata; /* userdata for the above. */ - struct handler *next; /* next handler in stack. */ -}; - -#ifdef HAVE_LIBXML -static void sax_error(void *ctx, const char *msg, ...); -#endif - -struct element { - const ne_xml_char *nspace; - ne_xml_char *name; - - int state; /* opaque state integer */ - - /* Namespaces declared in this element */ - ne_xml_char *default_ns; /* A default namespace */ - struct namespace *nspaces; /* List of other namespace scopes */ - - struct handler *handler; /* Handler for this element */ - - struct element *parent; /* parent element, or NULL */ -}; - -/* We pass around a ne_xml_parser as the userdata in the parsing - * library. This maintains the current state of the parse and various - * other bits and bobs. Within the parse, we store the current branch - * of the tree, i.e., the current element and all its parents, up to - * the root, but nothing other than that. */ -struct ne_xml_parser_s { - struct element *root; /* the root of the document */ - struct element *current; /* current element in the branch */ - struct handler *top_handlers; /* always points at the - * handler on top of the stack. */ - int failure; /* zero whilst parse should continue */ - int prune; /* if non-zero, depth within a dead branch */ - -#ifdef NEED_BOM_HANDLING - int bom_pos; -#endif - -#ifdef HAVE_EXPAT - XML_Parser parser; - char *encoding; -#else - xmlParserCtxtPtr parser; -#endif - char error[ERR_SIZE]; -}; - -/* The callback handlers */ -static void start_element(void *userdata, const ne_xml_char *name, const ne_xml_char **atts); -static void end_element(void *userdata, const ne_xml_char *name); -static void char_data(void *userdata, const ne_xml_char *cdata, int len); -static const char *resolve_nspace(const struct element *elm, - const char *prefix, size_t pfxlen); - -/* Linked list of namespace scopes */ -struct namespace { - ne_xml_char *name; - ne_xml_char *uri; - struct namespace *next; -}; - -#ifdef HAVE_LIBXML - -/* Could be const as far as we care, but libxml doesn't want that */ -static xmlSAXHandler sax_handler = { - NULL, /* internalSubset */ - NULL, /* isStandalone */ - NULL, /* hasInternalSubset */ - NULL, /* hasExternalSubset */ - NULL, /* resolveEntity */ - NULL, /* getEntity */ - NULL, /* entityDecl */ - NULL, /* notationDecl */ - NULL, /* attributeDecl */ - NULL, /* elementDecl */ - NULL, /* unparsedEntityDecl */ - NULL, /* setDocumentLocator */ - NULL, /* startDocument */ - NULL, /* endDocument */ - start_element, /* startElement */ - end_element, /* endElement */ - NULL, /* reference */ - char_data, /* characters */ - NULL, /* ignorableWhitespace */ - NULL, /* processingInstruction */ - NULL, /* comment */ - NULL, /* xmlParserWarning */ - sax_error, /* xmlParserError */ - sax_error, /* fatal error (never called by libxml2?) */ - NULL, /* getParameterEntity */ - char_data /* cdataBlock */ -}; - -/* empty attributes array to mimic expat behaviour */ -static const char *const empty_atts[] = {NULL, NULL}; - -/* macro for determining the attributes array to pass */ -#define PASS_ATTS(atts) (atts ? (const char **)(atts) : empty_atts) - -#else - -#define PASS_ATTS(atts) ((const char **)(atts)) - -/* XML declaration callback for expat. */ -static void decl_handler(void *userdata, - const XML_Char *version, const XML_Char *encoding, - int standalone) -{ - ne_xml_parser *p = userdata; - if (encoding) p->encoding = ne_strdup(encoding); -} - -#endif /* HAVE_LIBXML */ - -int ne_xml_currentline(ne_xml_parser *p) -{ -#ifdef HAVE_EXPAT - return XML_GetCurrentLineNumber(p->parser); -#else - return p->parser->input->line; -#endif -} - -const char *ne_xml_doc_encoding(const ne_xml_parser *p) -{ -#ifdef HAVE_LIBXML - return p->parser->encoding; -#else - return p->encoding; -#endif -} - -/* The first character of the REC-xml-names "NCName" rule excludes - * "Digit | '.' | '-' | '_' | CombiningChar | Extender"; the XML - * parser will not enforce this rule in a namespace declaration since - * it treats the entire attribute name as a REC-xml "Name" rule. It's - * too hard to check for all of CombiningChar | Digit | Extender here, - * but the valid_ncname_ch1 macro catches some of the rest. */ - -/* Return non-zero if 'ch' is an invalid start character for an NCName: */ -#define invalid_ncname_ch1(ch) ((ch) == '\0' || strchr("-.0123456789", (ch)) != NULL) - -/* Subversion repositories have been deployed which use property names - * marshalled as NCNames including a colon character; these should - * also be rejected but will be allowed for the time being. */ -#define invalid_ncname(xn) (invalid_ncname_ch1((xn)[0])) - -/* Extract the namespace prefix declarations from 'atts'. */ -static int declare_nspaces(ne_xml_parser *p, struct element *elm, - const ne_xml_char **atts) -{ - int n; - - for (n = 0; atts && atts[n]; n += 2) { - if (strcmp(atts[n], "xmlns") == 0) { - /* New default namespace */ - elm->default_ns = ne_strdup(atts[n+1]); - } else if (strncmp(atts[n], "xmlns:", 6) == 0) { - struct namespace *ns; - - /* Reject some invalid NCNames as namespace prefix, and an - * empty URI as the namespace URI */ - if (invalid_ncname(atts[n] + 6) || atts[n+1][0] == '\0') { - ne_snprintf(p->error, ERR_SIZE, - ("XML parse error at line %d: invalid namespace " - "declaration"), ne_xml_currentline(p)); - return -1; - } - - /* New namespace scope */ - ns = ne_calloc(sizeof(*ns)); - ns->next = elm->nspaces; - elm->nspaces = ns; - ns->name = ne_strdup(atts[n]+6); /* skip the xmlns= */ - ns->uri = ne_strdup(atts[n+1]); - } - } - - return 0; -} - -/* Expand an XML qualified name, which may include a namespace prefix - * as well as the local part. */ -static int expand_qname(ne_xml_parser *p, struct element *elm, - const ne_xml_char *qname) -{ - const ne_xml_char *pfx; - - pfx = strchr(qname, ':'); - if (pfx == NULL) { - struct element *e = elm; - - /* Find default namespace; guaranteed to terminate as the root - * element always has default_ns="". */ - while (e->default_ns == NULL) - e = e->parent; - - elm->name = ne_strdup(qname); - elm->nspace = e->default_ns; - } else if (invalid_ncname(pfx + 1) || qname == pfx) { - ne_snprintf(p->error, ERR_SIZE, - _("XML parse error at line %d: invalid element name"), - ne_xml_currentline(p)); - return -1; - } else { - const char *uri = resolve_nspace(elm, qname, pfx-qname); - - if (uri) { - elm->name = ne_strdup(pfx+1); - elm->nspace = uri; - } else { - ne_snprintf(p->error, ERR_SIZE, - ("XML parse error at line %d: undeclared namespace prefix"), - ne_xml_currentline(p)); - return -1; - } - } - return 0; -} - -/* Called with the start of a new element. */ -static void start_element(void *userdata, const ne_xml_char *name, - const ne_xml_char **atts) -{ - ne_xml_parser *p = userdata; - struct element *elm; - struct handler *hand; - int state = NE_XML_DECLINE; - - if (p->failure) return; - - if (p->prune) { - p->prune++; - return; - } - - /* Create a new element */ - elm = ne_calloc(sizeof *elm); - elm->parent = p->current; - p->current = elm; - - if (declare_nspaces(p, elm, atts) || expand_qname(p, elm, name)) { - p->failure = 1; - return; - } - - /* Find a handler which will accept this element (or abort the parse) */ - for (hand = elm->parent->handler; hand && state == NE_XML_DECLINE; - hand = hand->next) { - elm->handler = hand; - state = hand->startelm_cb(hand->userdata, elm->parent->state, - elm->nspace, elm->name, PASS_ATTS(atts)); - } - - NE_DEBUG(NE_DBG_XML, "XML: start-element (%d, {%s, %s}) => %d\n", - elm->parent->state, elm->nspace, elm->name, state); - - if (state > 0) - elm->state = state; - else if (state == NE_XML_DECLINE) - /* prune this branch. */ - p->prune++; - else /* state < 0 => abort parse */ - p->failure = state; -} - -/* Destroys an element structure. */ -static void destroy_element(struct element *elm) -{ - struct namespace *this_ns, *next_ns; - ne_free(elm->name); - /* Free the namespaces */ - this_ns = elm->nspaces; - while (this_ns != NULL) { - next_ns = this_ns->next; - ne_free(this_ns->name); - ne_free(this_ns->uri); - ne_free(this_ns); - this_ns = next_ns; - } - if (elm->default_ns) - ne_free(elm->default_ns); - ne_free(elm); -} - -/* cdata SAX callback */ -static void char_data(void *userdata, const ne_xml_char *data, int len) -{ - ne_xml_parser *p = userdata; - struct element *elm = p->current; - - if (p->failure || p->prune) return; - - if (elm->handler->cdata_cb) { - p->failure = elm->handler->cdata_cb(elm->handler->userdata, elm->state, data, len); - NE_DEBUG(NE_DBG_XML, "XML: char-data (%d) returns %d\n", - elm->state, p->failure); - } -} - -/* Called with the end of an element */ -static void end_element(void *userdata, const ne_xml_char *name) -{ - ne_xml_parser *p = userdata; - struct element *elm = p->current; - - if (p->failure) return; - - if (p->prune) { - if (p->prune-- > 1) return; - } else if (elm->handler->endelm_cb) { - p->failure = elm->handler->endelm_cb(elm->handler->userdata, elm->state, - elm->nspace, elm->name); - if (p->failure) { - NE_DEBUG(NE_DBG_XML, "XML: end-element for %d failed with %d.\n", - elm->state, p->failure); - } - } - - NE_DEBUG(NE_DBG_XML, "XML: end-element (%d, {%s, %s})\n", - elm->state, elm->nspace, elm->name); - - /* move back up the tree */ - p->current = elm->parent; - p->prune = 0; - - destroy_element(elm); -} - -/* Find a namespace definition for 'prefix' in given element, where - * length of prefix is 'pfxlen'. Returns the URI or NULL. */ -static const char *resolve_nspace(const struct element *elm, - const char *prefix, size_t pfxlen) -{ - const struct element *s; - - /* Search up the tree. */ - for (s = elm; s != NULL; s = s->parent) { - const struct namespace *ns; - /* Iterate over defined spaces on this node. */ - for (ns = s->nspaces; ns != NULL; ns = ns->next) { - if (strlen(ns->name) == pfxlen && - memcmp(ns->name, prefix, pfxlen) == 0) - return ns->uri; - } - } - - return NULL; -} - -const char *ne_xml_resolve_nspace(ne_xml_parser *parser, - const char *prefix, size_t length) -{ - if (prefix) { - return resolve_nspace(parser->current, prefix, length); - } - else { - struct element *e = parser->current; - - while (e->default_ns == NULL) - e = e->parent; - - return e->default_ns; - } -} - -ne_xml_parser *ne_xml_create(void) -{ - ne_xml_parser *p = ne_calloc(sizeof *p); - /* Placeholder for the root element */ - p->current = p->root = ne_calloc(sizeof *p->root); - p->root->default_ns = ""; - p->root->state = 0; - strcpy(p->error, _("Unknown error")); -#ifdef HAVE_EXPAT - p->parser = XML_ParserCreate(NULL); - if (p->parser == NULL) { - abort(); - } - XML_SetElementHandler(p->parser, start_element, end_element); - XML_SetCharacterDataHandler(p->parser, char_data); - XML_SetUserData(p->parser, (void *) p); - XML_SetXmlDeclHandler(p->parser, decl_handler); -#else - p->parser = xmlCreatePushParserCtxt(&sax_handler, - (void *)p, NULL, 0, NULL); - if (p->parser == NULL) { - abort(); - } - p->parser->replaceEntities = 1; -#endif - return p; -} - -void ne_xml_push_handler(ne_xml_parser *p, - ne_xml_startelm_cb *startelm_cb, - ne_xml_cdata_cb *cdata_cb, - ne_xml_endelm_cb *endelm_cb, - void *userdata) -{ - struct handler *hand = ne_calloc(sizeof(struct handler)); - - hand->startelm_cb = startelm_cb; - hand->cdata_cb = cdata_cb; - hand->endelm_cb = endelm_cb; - hand->userdata = userdata; - - /* If this is the first handler registered, update the - * base pointer too. */ - if (p->top_handlers == NULL) { - p->root->handler = hand; - p->top_handlers = hand; - } else { - p->top_handlers->next = hand; - p->top_handlers = hand; - } -} - -int ne_xml_parse_v(void *userdata, const char *block, size_t len) -{ - ne_xml_parser *p = userdata; - return ne_xml_parse(p, (const ne_xml_char *)block, len); -} - -#define BOM_UTF8 "\xEF\xBB\xBF" /* UTF-8 BOM */ - -int ne_xml_parse(ne_xml_parser *p, const char *block, size_t len) -{ - int ret, flag; - /* duck out if it's broken */ - if (p->failure) { - NE_DEBUG(NE_DBG_XMLPARSE, "XML: Failed; ignoring %" NE_FMT_SIZE_T - " bytes.\n", len); - return p->failure; - } - if (len == 0) { - flag = -1; - block = ""; - NE_DEBUG(NE_DBG_XMLPARSE, "XML: End of document.\n"); - } else { - NE_DEBUG(NE_DBG_XMLPARSE, "XML: Parsing %" NE_FMT_SIZE_T " bytes.\n", len); - flag = 0; - } - -#ifdef NEED_BOM_HANDLING - if (p->bom_pos < 3) { - NE_DEBUG(NE_DBG_XMLPARSE, "Checking for UTF-8 BOM.\n"); - while (len > 0 && p->bom_pos < 3 && - block[0] == BOM_UTF8[p->bom_pos]) { - block++; - len--; - p->bom_pos++; - } - if (len == 0) - return 0; - if (p->bom_pos == 0) { - p->bom_pos = 3; /* no BOM */ - } else if (p->bom_pos > 0 && p->bom_pos < 3) { - strcpy(p->error, _("Invalid Byte Order Mark")); - return p->failure = 1; - } - } -#endif - - /* Note, don't write a parser error if p->failure, since an error - * will already have been written in that case. */ -#ifdef HAVE_EXPAT - ret = XML_Parse(p->parser, block, len, flag); - NE_DEBUG(NE_DBG_XMLPARSE, "XML: XML_Parse returned %d\n", ret); - if (ret == 0 && p->failure == 0) { - ne_snprintf(p->error, ERR_SIZE, - "XML parse error at line %" NE_FMT_XML_SIZE ": %s", - XML_GetCurrentLineNumber(p->parser), - XML_ErrorString(XML_GetErrorCode(p->parser))); - p->failure = 1; - NE_DEBUG(NE_DBG_XMLPARSE, "XML: Parse error: %s\n", p->error); - } -#else - ret = xmlParseChunk(p->parser, block, len, flag); - NE_DEBUG(NE_DBG_XMLPARSE, "XML: xmlParseChunk returned %d\n", ret); - /* Parse errors are normally caught by the sax_error() callback, - * which clears p->valid. */ - if (p->parser->errNo && p->failure == 0) { - ne_snprintf(p->error, ERR_SIZE, "XML parse error at line %d", - ne_xml_currentline(p)); - p->failure = 1; - NE_DEBUG(NE_DBG_XMLPARSE, "XML: Parse error: %s\n", p->error); - } -#endif - return p->failure; -} - -int ne_xml_failed(ne_xml_parser *p) -{ - return p->failure; -} - -void ne_xml_destroy(ne_xml_parser *p) -{ - struct element *elm, *parent; - struct handler *hand, *next; - - /* Free up the handlers on the stack: the root element has the - * pointer to the base of the handler stack. */ - for (hand = p->root->handler; hand!=NULL; hand=next) { - next = hand->next; - ne_free(hand); - } - - /* Clean up remaining elements */ - for (elm = p->current; elm != p->root; elm = parent) { - parent = elm->parent; - destroy_element(elm); - } - - /* free root element */ - ne_free(p->root); - -#ifdef HAVE_EXPAT - XML_ParserFree(p->parser); - if (p->encoding) ne_free(p->encoding); -#else - xmlFreeParserCtxt(p->parser); -#endif - - ne_free(p); -} - -void ne_xml_set_error(ne_xml_parser *p, const char *msg) -{ - ne_snprintf(p->error, ERR_SIZE, "%s", msg); -} - -#ifdef HAVE_LIBXML -static void sax_error(void *ctx, const char *msg, ...) -{ - ne_xml_parser *p = ctx; - va_list ap; - char buf[1024]; - - va_start(ap, msg); - ne_vsnprintf(buf, 1024, msg, ap); - va_end(ap); - - if (p->failure == 0) { - ne_snprintf(p->error, ERR_SIZE, - _("XML parse error at line %d: %s"), - p->parser->input->line, buf); - p->failure = 1; - } -} -#endif - -const char *ne_xml_get_error(ne_xml_parser *p) -{ - return p->error; -} - -const char * -ne_xml_get_attr(ne_xml_parser *p, const char **attrs, - const char *nspace, const char *name) -{ - int n; - - for (n = 0; attrs[n] != NULL; n += 2) { - char *pnt = strchr(attrs[n], ':'); - - if (!nspace && !pnt && strcmp(attrs[n], name) == 0) { - return attrs[n+1]; - } else if (nspace && pnt) { - /* If a namespace is given, and the local part matches, - * then resolve the namespace and compare that too. */ - if (strcmp(pnt + 1, name) == 0) { - const char *uri = resolve_nspace(p->current, - attrs[n], pnt - attrs[n]); - if (uri && strcmp(uri, nspace) == 0) - return attrs[n+1]; - } - } - } - - return NULL; -} - -int ne_xml_mapid(const struct ne_xml_idmap map[], size_t maplen, - const char *nspace, const char *name) -{ - size_t n; - - for (n = 0; n < maplen; n++) - if (strcmp(name, map[n].name) == 0 && - strcmp(nspace, map[n].nspace) == 0) - return map[n].id; - - return 0; -} diff --git a/client/neon-0.27.2/src/ne_xml.h b/client/neon-0.27.2/src/ne_xml.h deleted file mode 100644 index 7fcd4771d..000000000 --- a/client/neon-0.27.2/src/ne_xml.h +++ /dev/null @@ -1,165 +0,0 @@ -/* - neon XML parser interface - Copyright (C) 1999-2007, Joe Orton - - 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 - -*/ - -#ifndef NE_XML_H -#define NE_XML_H - -#include /* for size_t */ - -#include "ne_defs.h" - -NE_BEGIN_DECLS - -/* The neon XML interface filters a streamed XML tree through a stack - * of SAX "handlers". A handler is made up of three callbacks - * (start-element, char-data, end-element). Each start-element event - * is passed to each handler in the stack in turn until one until one - * accepts the element. This handler then receives subsequent - * char-data and end-element events for the element. - * - * For each new start-element event, the search up the handler stack - * begins with the handler for the parent element (for the root - * element, at the base of the stack). - * - * For each accepted element, a "state" integer is stored, which is - * passed to the corresponding char-data and end-element callbacks for - * the element. This integer is also passed to the start-element - * callback of child elements so they can determine context. - * - * If no handler in the stack accepts a particular element, it (and - * its children, if any) is ignored. */ - -#define NE_XML_DECLINE (0) -#define NE_XML_ABORT (-1) - -/* A start-element callback for element with given namespace/name. - * The callback may return: - * <0 => abort the parse (NE_XML_ABORT) - * 0 => decline this element (NE_XML_DECLINE) - * >0 => accept this element; value is state for this element. - * - * The 'parent' integer is the state returned by the handler of the - * parent element. The attributes array gives name/value pairs - * in atts[n] and atts[n+1] from n=0 up to atts[n]==NULL. */ -typedef int ne_xml_startelm_cb(void *userdata, int parent, - const char *nspace, const char *name, - const char **atts); - -/* state for the root element */ -#define NE_XML_STATEROOT (0) - -/* Character data callback; may return non-zero to abort the parse. */ -typedef int ne_xml_cdata_cb(void *userdata, int state, - const char *cdata, size_t len); -/* End element callback; may return non-zero to abort the parse. */ -typedef int ne_xml_endelm_cb(void *userdata, int state, - const char *nspace, const char *name); - -typedef struct ne_xml_parser_s ne_xml_parser; - -/* Create an XML parser. */ -ne_xml_parser *ne_xml_create(void); - -/* Push a new handler on the stack of parser 'p'. 'cdata' and/or - * 'endelm' may be NULL; startelm must be non-NULL. */ -void ne_xml_push_handler(ne_xml_parser *p, - ne_xml_startelm_cb *startelm, - ne_xml_cdata_cb *cdata, - ne_xml_endelm_cb *endelm, - void *userdata); - -/* ne_xml_failed returns non-zero if there was an error during - * parsing, or zero if the parse completed successfully. The return - * value is equal to that of the last ne_xml_parse() call for this - * parser object. */ -int ne_xml_failed(ne_xml_parser *p); - -/* Set error string for parser. (The string may be truncated - * internally). */ -void ne_xml_set_error(ne_xml_parser *p, const char *msg); - -/* Return the error string (and never NULL). After ne_xml_failed - * returns >0, this will describe the parse error. Otherwise it will - * be a default error string. */ -const char *ne_xml_get_error(ne_xml_parser *p); - -/* Parse the given block of input of length len. Parser must be - * called with len=0 to signify the end of the document (for that - * case, the block argument is ignored). Returns zero on success, or - * non-zero on error: for an XML syntax error, a positive number is - * returned; if parsing is aborted by a caller-supplied callback, that - * callback's return value is returned. */ -int ne_xml_parse(ne_xml_parser *p, const char *block, size_t len); - -/* As ne_xml_parse, casting (ne_xml_parser *)userdata internally. - * (This function can be passed to ne_add_response_body_reader) */ -int ne_xml_parse_v(void *userdata, const char *block, size_t len); - -/* Return current line of document during parsing or after parsing is - * complete. */ -int ne_xml_currentline(ne_xml_parser *p); - -/* From a start_element callback which was passed 'attrs' using given - * parser, return attribute of given name and namespace. If nspace is - * NULL, no namespace resolution is performed. Note that this call is - * context-specific; if called outside a start_element callback, - * behaviour is undefined. */ -const char *ne_xml_get_attr(ne_xml_parser *parser, - const char **attrs, const char *nspace, - const char *name); - -/* From a start_element callback, resolve a given XML Namespace - * prefix, if defined. Given a non-NULL prefix, returns the namespace - * URI which corresponds to the prefix 'prefix' (of length 'length'), - * or NULL if no such namespace prefix is defined. Given a NULL - * prefix, returns the default namespace URI or the empty string if - * none is defined. Note that this call is context-specific; if - * called outside a start_element callback, behaviour is undefined. */ -const char *ne_xml_resolve_nspace(ne_xml_parser *parser, - const char *prefix, size_t length); - -/* Return the encoding of the document being parsed. May return NULL - * if no encoding is defined or if the XML declaration has not yet - * been parsed. */ -const char *ne_xml_doc_encoding(const ne_xml_parser *p); - -/* Destroy the parser object. */ -void ne_xml_destroy(ne_xml_parser *p); - -/* A utility interface for mapping {nspace, name} onto an integer. */ -struct ne_xml_idmap { - const char *nspace, *name; - int id; -}; - -/* Return the size of an idmap array */ -#define NE_XML_MAPLEN(map) (sizeof(map) / sizeof(struct ne_xml_idmap)) - -/* Return the 'id' corresponding to {nspace, name}, or zero. */ -int ne_xml_mapid(const struct ne_xml_idmap map[], size_t maplen, - const char *nspace, const char *name); - -/* media type, appropriate for adding to a Content-Type header */ -#define NE_XML_MEDIA_TYPE "application/xml" - -NE_END_DECLS - -#endif /* NE_XML_H */ diff --git a/client/neon-0.27.2/src/ne_xmlreq.c b/client/neon-0.27.2/src/ne_xmlreq.c deleted file mode 100644 index c4fbf5ad6..000000000 --- a/client/neon-0.27.2/src/ne_xmlreq.c +++ /dev/null @@ -1,110 +0,0 @@ -/* - XML/HTTP response handling - Copyright (C) 2004-2006, Joe Orton - - 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 - -*/ - -#include "config.h" - -#include -#include - -#include "ne_internal.h" -#include "ne_xmlreq.h" -#include "ne_basic.h" -#include "ne_string.h" - -/* Handle an XML response parse error, setting session error string - * and closing the connection. */ -static int parse_error(ne_session *sess, ne_xml_parser *parser) -{ - ne_set_error(sess, _("Could not parse response: %s"), - ne_xml_get_error(parser)); - ne_close_connection(sess); - return NE_ERROR; -} - -int ne_xml_parse_response(ne_request *req, ne_xml_parser *parser) -{ - char buf[8000]; - ssize_t bytes; - int ret = 0; - - while ((bytes = ne_read_response_block(req, buf, sizeof buf)) > 0) { - ret = ne_xml_parse(parser, buf, bytes); - if (ret) - return parse_error(ne_get_session(req), parser); - } - - if (bytes == 0) { - /* Tell the parser that end of document was reached: */ - if (ne_xml_parse(parser, NULL, 0) == 0) - return NE_OK; - else - return parse_error(ne_get_session(req), parser); - } else { - return NE_ERROR; - } -} - -/* Returns non-zero if given content-type is an XML media type, - * following the RFC 3023 rules. */ -static int media_type_is_xml(const ne_content_type *ctype) -{ - size_t stlen; - - return - (ne_strcasecmp(ctype->type, "text") == 0 - && ne_strcasecmp(ctype->subtype, "xml") == 0) - || (ne_strcasecmp(ctype->type, "application") == 0 - && ne_strcasecmp(ctype->subtype, "xml") == 0) - || ((stlen = strlen(ctype->subtype)) > 4 - && ne_strcasecmp(ctype->subtype + stlen - 4, "+xml") == 0); -} - -int ne_xml_dispatch_request(ne_request *req, ne_xml_parser *parser) -{ - int ret; - - do { - int parseit = 0; - - ret = ne_begin_request(req); - if (ret) break; - - if (ne_get_status(req)->klass == 2) { - ne_content_type ctype; - - if (ne_get_content_type(req, &ctype) == 0) { - parseit = media_type_is_xml(&ctype); - ne_free(ctype.value); - } - } - - if (parseit) - ret = ne_xml_parse_response(req, parser); - else - ret = ne_discard_response(req); - - if (ret == NE_OK) - ret = ne_end_request(req); - } while (ret == NE_RETRY); - - return ret; -} - diff --git a/client/neon-0.27.2/src/ne_xmlreq.h b/client/neon-0.27.2/src/ne_xmlreq.h deleted file mode 100644 index 1bf667dc4..000000000 --- a/client/neon-0.27.2/src/ne_xmlreq.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - XML/HTTP response handling - Copyright (C) 2004-2006, Joe Orton - - 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 - -*/ - -#ifndef NE_XMLREQ_H -#define NE_XMLREQ_H - -#include "ne_request.h" -#include "ne_xml.h" - -NE_BEGIN_DECLS - -/* Read the HTTP response body using calls to ne_read_response_block - * (so must be enclosed by ne_begin_request/ne_end_request calls), and - * parse it as an XML document, using the given parser. Returns NE_* - * error codes. If an XML parse error occurs, the session error - * string is set to the XML parser's error string, and NE_ERROR is - * returned. */ -int ne_xml_parse_response(ne_request *req, ne_xml_parser *parser); - -/* Dispatch the HTTP request, parsing the response body as an XML - * document using the given parser, if the response status class is - * 2xx and an XML media type is specified for the response entity. If - * a non-2xx response code is given, or a non-XML media type is - * specified, then the response body will be silently discarded. - * - * Returns NE_* error codes. If an XML parse error occurs, the - * session error string is set to the XML parser's error string, and - * NE_ERROR is returned. */ -int ne_xml_dispatch_request(ne_request *req, ne_xml_parser *parser); - -NE_END_DECLS - -#endif /* NE_XMLREQ_H */ diff --git a/client/neon-0.27.2/test/COPYING b/client/neon-0.27.2/test/COPYING deleted file mode 100644 index a43ea2126..000000000 --- a/client/neon-0.27.2/test/COPYING +++ /dev/null @@ -1,339 +0,0 @@ - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc. - 675 Mass Ave, Cambridge, MA 02139, USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your -freedom to share and change it. By contrast, the GNU General Public -License is intended to guarantee your freedom to share and change free -software--to make sure the software is free for all its users. This -General Public License applies to most of the Free Software -Foundation's software and to any other program whose authors commit to -using it. (Some other Free Software Foundation software is covered by -the GNU Library General Public License instead.) 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 -this service 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 make restrictions that forbid -anyone to deny you these rights or to ask you to surrender the rights. -These restrictions translate to certain responsibilities for you if you -distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether -gratis or for a fee, you must give the recipients all the rights that -you have. 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. - - We protect your rights with two steps: (1) copyright the software, and -(2) offer you this license which gives you legal permission to copy, -distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain -that everyone understands that there is no warranty for this free -software. If the software is modified by someone else and passed on, we -want its recipients to know that what they have is not the original, so -that any problems introduced by others will not reflect on the original -authors' reputations. - - Finally, any free program is threatened constantly by software -patents. We wish to avoid the danger that redistributors of a free -program will individually obtain patent licenses, in effect making the -program proprietary. To prevent this, we have made it clear that any -patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and -modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains -a notice placed by the copyright holder saying it may be distributed -under the terms of this General Public License. The "Program", below, -refers to any such program or work, and a "work based on the Program" -means either the Program or any derivative work under copyright law: -that is to say, a work containing the Program or a portion of it, -either verbatim or with modifications and/or translated into another -language. (Hereinafter, translation is included without limitation in -the term "modification".) Each licensee is addressed as "you". - -Activities other than copying, distribution and modification are not -covered by this License; they are outside its scope. The act of -running the Program is not restricted, and the output from the Program -is covered only if its contents constitute a work based on the -Program (independent of having been made by running the Program). -Whether that is true depends on what the Program does. - - 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the -notices that refer to this License and to the absence of any warranty; -and give any other recipients of the Program a copy of this License -along with the Program. - -You may charge a fee for the physical act of transferring a copy, and -you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion -of it, thus forming a work based on the Program, and copy and -distribute such modifications or work under the terms of Section 1 -above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - -These requirements apply to the modified work as a whole. If -identifiable sections of that work are not derived from the Program, -and can be reasonably considered independent and separate works in -themselves, then this License, and its terms, do not apply to those -sections when you distribute them as separate works. But when you -distribute the same sections as part of a whole which is a work based -on the Program, the distribution of the whole must be on the terms of -this License, whose permissions for other licensees extend to the -entire whole, and thus to each and every part regardless of who wrote it. - -Thus, it is not the intent of this section to claim rights or contest -your rights to work written entirely by you; rather, the intent is to -exercise the right to control the distribution of derivative or -collective works based on the Program. - -In addition, mere aggregation of another work not based on the Program -with the Program (or with a work based on the Program) on a volume of -a storage or distribution medium does not bring the other work under -the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, -under Section 2) in object code or executable form under the terms of -Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange; or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange; or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - -The source code for a work means the preferred form of the work for -making modifications to it. For an executable work, complete source -code means all the source code for all modules it contains, plus any -associated interface definition files, plus the scripts used to -control compilation and installation of the executable. However, as a -special exception, the source code distributed need not include -anything that is normally distributed (in either source or binary -form) with the major components (compiler, kernel, and so on) of the -operating system on which the executable runs, unless that component -itself accompanies the executable. - -If distribution of executable or object code is made by offering -access to copy from a designated place, then offering equivalent -access to copy the source code from the same place counts as -distribution of the source code, even though third parties are not -compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program -except as expressly provided under this License. Any attempt -otherwise to copy, modify, sublicense or distribute the Program is -void, and will automatically terminate your rights under this License. -However, parties who have received copies, or rights, from you under -this License will not have their licenses terminated so long as such -parties remain in full compliance. - - 5. You are not required to accept this License, since you have not -signed it. However, nothing else grants you permission to modify or -distribute the Program or its derivative works. These actions are -prohibited by law if you do not accept this License. Therefore, by -modifying or distributing the Program (or any work based on the -Program), you indicate your acceptance of this License to do so, and -all its terms and conditions for copying, distributing or modifying -the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the -Program), the recipient automatically receives a license from the -original licensor to copy, distribute or modify the Program subject to -these terms and conditions. You may not impose any further -restrictions on the recipients' exercise of the rights granted herein. -You are not responsible for enforcing compliance by third parties to -this License. - - 7. If, as a consequence of a court judgment or allegation of patent -infringement or for any other reason (not limited to patent issues), -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 -distribute so as to satisfy simultaneously your obligations under this -License and any other pertinent obligations, then as a consequence you -may not distribute the Program at all. For example, if a patent -license would not permit royalty-free redistribution of the Program by -all those who receive copies directly or indirectly through you, then -the only way you could satisfy both it and this License would be to -refrain entirely from distribution of the Program. - -If any portion of this section is held invalid or unenforceable under -any particular circumstance, the balance of the section is intended to -apply and the section as a whole is intended to apply in other -circumstances. - -It is not the purpose of this section to induce you to infringe any -patents or other property right claims or to contest validity of any -such claims; this section has the sole purpose of protecting the -integrity of the free software distribution system, which is -implemented by public license practices. Many people have made -generous contributions to the wide range of software distributed -through that system in reliance on consistent application of that -system; it is up to the author/donor to decide if he or she is willing -to distribute software through any other system and a licensee cannot -impose that choice. - -This section is intended to make thoroughly clear what is believed to -be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in -certain countries either by patents or by copyrighted interfaces, the -original copyright holder who places the Program under this License -may add an explicit geographical distribution limitation excluding -those countries, so that distribution is permitted only in or among -countries not thus excluded. In such case, this License incorporates -the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions -of the 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 a version number of this License which applies to it and "any -later version", you have the option of following the terms and conditions -either of that version or of any later version published by the Free -Software Foundation. If the Program does not specify a version number of -this License, you may choose any version ever published by the Free Software -Foundation. - - 10. If you wish to incorporate parts of the Program into other free -programs whose distribution conditions are different, write to the author -to ask for permission. For software which is copyrighted by the Free -Software Foundation, write to the Free Software Foundation; we sometimes -make exceptions for this. Our decision will be guided by the two goals -of preserving the free status of all derivatives of our free software and -of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING -WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR -REDISTRIBUTE 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. - - END OF TERMS AND CONDITIONS - - Appendix: How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest -possible use to the public, the best way to achieve this is to make it -free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest -to attach them to the start of each source file to most effectively -convey the exclusion of warranty; and each file should have at least -the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) 19yy - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -Also add information on how to contact you by electronic and paper mail. - -If the program is interactive, make it output a short notice like this -when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) 19yy name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions; type `show c' for details. - -The hypothetical commands `show w' and `show c' should show the appropriate -parts of the General Public License. Of course, the commands you use may -be called something other than `show w' and `show c'; they could even be -mouse-clicks or menu items--whatever suits your program. - -You should also get your employer (if you work as a programmer) or your -school, if any, to sign a "copyright disclaimer" for the program, if -necessary. Here is a sample; alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - -This General Public License does not permit incorporating your program into -proprietary programs. If your program is a subroutine library, you may -consider it more useful to permit linking proprietary applications with the -library. If this is what you want to do, use the GNU Library General -Public License instead of this License. diff --git a/client/neon-0.27.2/test/ChangeLog b/client/neon-0.27.2/test/ChangeLog deleted file mode 100644 index d484dedfa..000000000 --- a/client/neon-0.27.2/test/ChangeLog +++ /dev/null @@ -1,1548 +0,0 @@ -Wed Aug 25 21:05:28 2004 Joe Orton - - * cookies.c: Removed. - - * Makefile.in: Updated. - -Wed Aug 25 19:47:28 2004 Joe Orton - - * socket.c (do_connect, begin): Simplify do_connect use. - -Wed Aug 25 18:28:19 2004 Joe Orton - - * xml.c (matches, fail_parse): Test for UTF-8 BOM handling. - -Mon Jul 5 18:41:07 2004 Joe Orton - - * basic.c (content_type): Test for correct default charset for - text/xml content-type by RFC3280. - -Mon Jul 5 10:59:17 2004 Joe Orton - - Add XFAIL regression tests for trio of ne_compress.c bugs: - - * compress.c (reader): Validate that a size=0 call comes only - after the expected response data, and use struct string. - (do_fetch): Pass a struct string to reader and adapt for failure - logic. - (auth_cb, retry_compress_helper, retry_compress, - retry_notcompress): New tests. - -Sun Jul 4 21:55:00 2004 Joe Orton - - * utils.c (serve_sstring_slowly, serve_sstring): Moved from - sockets.c, renamed from serve_string_slowly, serve_sstring. - - * sockets.c: All callers updated. - -Sun May 2 21:16:45 2004 Joe Orton - - * util-tests.c (regress_dates): Add regression tests. - -Wed Apr 14 10:45:43 2004 Joe Orton - - * props.c (regress, patch_regress): Add regression tests for - CAN-2004-0179 issues. - -Thu Apr 8 13:57:04 2004 Joe Orton - - * largefile.c (read_large_response): Go faster: turn off debugging - during request dispatch. - -Wed Apr 7 13:39:37 2004 Joe Orton - - * auth.c (basic): Add some multi-scheme challenges. - -Wed Apr 7 13:14:16 2004 Joe Orton - - * request.c (s_progress): Use NE_FMT_OFF_T for printing off_t's - throughout. - -Sun Feb 22 23:38:05 2004 Joe Orton - - * request.c (expect_100_once, serve_100_once): Adjust for new - 100-continue interface. - (expect_100_nobody): New test. - -Sun Feb 22 20:39:15 2004 Joe Orton - - * cookies.c (parsing): Use ne_cookie_empty_cache. - -Sun Feb 22 17:28:41 2004 Joe Orton - - * props.c (pfind_simple): Test for whitespace handling. - -Sun Feb 22 16:31:52 2004 Joe Orton - - * auth.c (basic): Test handling of Basic challenge in presence of - multiple challenges. - -Sun Feb 15 12:34:13 2004 Joe Orton - - * makekeys.sh, openssl.conf: Create new utf8subj.cert, - bmpsubj.cert, t61subj.cert certificates. - - * ssl.c (dname_readable): Test that ne_ssl_readable_dname always - gives back UTF-8. - -Sat Feb 14 21:59:17 2004 Joe Orton - - * xml.c (fail_parse): Add tests for invalid NCNames in namespace - prefix declaration and as element names. - -Sun Jan 25 15:21:56 2004 Joe Orton - - * largefile.c (serve_large_response, read_large_response): New - test. - -Sat Jan 24 18:10:14 2004 Joe Orton - - * Makefile.in: Fix test suite for 'make' implementatinos which - don't handle single-suffix inference rules. - -Sat Jan 3 14:10:14 2004 Joe Orton - - * largefile.c (send_high_offset): Renamed from send_large_file. - -Sat Jan 3 13:57:16 2004 Joe Orton - - * Makefile.in (BASIC_TESTS): Add cookies. - -Thu Jan 1 17:42:30 2004 Joe Orton - - * util-tests.c (support): Check for NE_FEATURE_LFS. - - * largefile.c: New file. - - * Makefile.in: Add lfs-check, largefile, largefile.lo targets. - -Sat Nov 15 08:04:22 2003 Joe Orton - - * request.c (idna_hostname, dup_header, serve_check_host): New - test. - -Fri Nov 14 14:06:57 2003 Joe Orton - - * util-tests.c (support): Test for NE_FEATURE_IDNA. - -Fri Nov 14 11:26:29 2003 Joe Orton - - * acl.c: Remove NEON_NODAV condition. - - * stubs.c: Use new NE_HAVE_* conditions. - - * util-tests.c (supports): Test new ne_has_support interface. - -Thu Nov 13 20:33:44 2003 Joe Orton - - * request.c (no_body_205): New test. - -Tue Nov 11 20:36:43 2003 Joe Orton - - Adjust for ne_xml_valid->ne_xml_failure API change. - - * xml.c (chardata, startelm_abort, endelm_abort, parse_match): - Check for propagation of negative failure codes. - (fail_parse): Check for positive failure code. - (attributes): Use ne_xml_failure. - -Sat Oct 25 00:11:29 2003 Joe Orton - - * ssl.c (fail_truncated_eof): Remove test. - -Tue Oct 21 20:29:46 2003 Joe Orton - - * ssl.c (fail_tunnel, proxy_tunnel): Fix non-C89 code, - Radu Greab. - -Thu Oct 9 19:42:13 2003 Joe Orton - - * socket.c (ssl_closure): Fix occassional spurious errors. - -Tue Oct 7 20:23:35 2003 Joe Orton - - * ssl.c (ssl_server): Handle several requests if required. - (tunnel_header): New function. - (serve_tunnel): Fail with a 500 if the request included - an Authenticate header; take an ssl_server_args pointer - as userdata. - (fail_tunnel, proxy_tunnel): Adjust accordingly. - (apt_post_send): Adjust for 401 check. - (auth_tunnel_creds): New test. - -Wed Oct 1 00:30:25 2003 Joe Orton - - * ssl.c (simple_sslv2): Regression test. - (ssl_server): Create SSL_CTX locally; optionally create an - SSLv2-only server. - (init_ssl): Do not create the SSL_CTX. - -Wed Sep 17 19:57:22 2003 Joe Orton - - * ssl.c: Refactor around single SSL server function. - (ssl_server): Combination of do_ssl_response and old serve_* - functions. All callers updated. - -Sun Sep 14 12:27:22 2003 Joe Orton - - * socket.c (write_reset, read_reset): Skip if no RESET was - returned. - -Sun Sep 14 11:01:08 2003 Joe Orton - - * Makefile.in: Fix building the 'resolve' tool. - -Sat Sep 6 12:29:53 2003 Joe Orton - - * makekeys.sh, openssl.conf: Generate altname5.cert with an IPv4 - address in the subjectAltName attribute. - - * ssl.c (ipaddr_altname): Test for IPv4 address in subjectAltName. - -Sat Sep 6 12:28:55 2003 Joe Orton - - * Makefile.in: Clear the SUFFIXES list; use standard make syntax; - fix build of 'basic' on some platforms. - -Sat Aug 30 18:59:24 2003 Joe Orton - - * Makefile.in: Rewrite to use libtool to build object files and - libtest. - - * run.sh: Don't set LD_LIBRARY_PATH. - -Wed Jul 23 23:25:39 2003 Joe Orton - - * compress.c (do_fetch): Check for response truncation - for success case. - (fail_corrupt1, fail_corrupt2): New tests. - -Sat Jun 21 12:59:49 2003 Joe Orton - - * request.c (versions): Fix and enable test. - -Wed Jun 18 20:09:59 2003 Joe Orton - - * request.c (is_alive): Adapt for new socket API. - - * socket.c (do_connect, addr_connect): Likewise. - -Tue May 20 20:14:03 2003 Joe Orton - - * ssl.c (cert_fingerprint): Fix for VPATH builds. - -Sat May 10 17:13:05 2003 Joe Orton - - * xml.c (matches): Add regression test for prefix matching bug - fixed in 0.18.0. - -Sat Apr 26 19:22:29 2003 Joe Orton - - * request.c (any_te_header): New function. - -Wed Apr 23 18:24:19 2003 Joe Orton - - * stubs.c (stub_ssl): Test ne_ssl_cert_import, ne_ssl_cert_export, - ne_ssl_cert_write stubs. - -Wed Apr 23 14:05:38 2003 Joe Orton - - * ssl.c (read_write): New function. - -Wed Apr 23 00:34:44 2003 Joe Orton - - * ssl.c (cache_cert, verify_cache): New functions. - -Wed Apr 23 00:14:14 2003 Joe Orton - - * ssl.c (any_ssl_request): Free the cert after passing it to - ne_ssl_trust_cert. - -Tue Apr 22 23:24:33 2003 Joe Orton - - * string-tests.c (unbase64): Improve coverage. - -Tue Apr 22 20:25:15 2003 Joe Orton - - * ssl.c (import_export, flatten_pem, cert_compare): New functions. - -Tue Apr 22 18:32:43 2003 Joe Orton - - * string-tests.c (b64_check, unbase64): New functions. - (base64): Use b64_check. - -Tue Apr 22 15:54:04 2003 Joe Orton - - * string-tests.c (base64): Test decoding binary data which - contains bytes with the high bit set. - -Tue Apr 22 14:18:03 2003 Joe Orton - - * string-tests.c (base64): Moved here... - - * util-tests.c (base64): ...from here. - -Tue Apr 22 13:17:48 2003 Joe Orton - - * ssl.c (just_serve_string, fail_not_ssl): New functions. - -Tue Apr 22 13:09:13 2003 Joe Orton - - * stubs.c (stub_ssl): Test ne_ssl_cert_validity stub. - -Tue Apr 22 11:35:10 2003 Joe Orton - - * request.c (versions): Run test as XFAIL. - -Tue Apr 22 11:33:43 2003 Joe Orton - - * util-tests.c (version_string): New function. - -Tue Apr 22 09:23:27 2003 Joe Orton - - * ssl.c (check_validity, cert_validity): New functions. - -Mon Apr 21 19:45:39 2003 Joe Orton - - * util-tests.c (digest_md5): Replace ne_md5_buffer. - (md5): Use digest_md5; test 500-byte string. - -Mon Apr 21 18:38:02 2003 Joe Orton - - * xml.c (fail_parse): Call ne_xml_parse with length=0 finish - parse. - -Mon Apr 21 17:18:45 2003 Joe Orton - - * props.c: Add tests for ne_207.h interface and ne_simple_propfind - from ne_props.h. - - * xml.c: Add tests for new XML interface. - - * Makefile.in: Run props tests before lock since the latter is - implemented using the former. - -Mon Apr 7 22:27:18 2003 Joe Orton - - * stubs.c (stub_ssl): Test for ne_ssl_cert_identity stub. - -Mon Apr 7 22:17:56 2003 Joe Orton - - * ssl.c (cert_fingerprint): Renamed from fingerprint. - (check_identity, cert_identities): New functions. - -Sun Apr 6 20:18:30 2003 Joe Orton - - * stubs.c (stub_ssl): Adjust for new clicert API. - -Sun Apr 6 20:12:48 2003 Joe Orton - - * ssl.c (dname_compare): Renamed from comparisons. - (dname_readable): New function. - - * makekeys.sh: Create justmail.cert. - -Sun Apr 6 20:00:18 2003 Joe Orton - - * ssl.c (keypw_prompt): Removed function. - (init, load_client_cert, client_cert_provided): Adapt for new - clicert API. - (ccert_unencrypted): New function. - -Fri Apr 4 22:34:12 2003 Joe Orton - - * request.c (fail_request_with_error): Refactored from - fail_request; check for a particular error string. - (fail_request): Use fail_request_with_error. - (invalid_response_gives_error): New function. - (fail_long_header): Use it. - (fail_corrupt_chunks): New function. - -Sat Mar 29 14:39:20 2003 Joe Orton - - * ssl.c (comparisons): New function. - - * stubs.c (stub_ssl): Test ne_ssl_dname_cmp. - -Sat Mar 29 13:58:37 2003 Joe Orton - - * makekeys.sh: Generate noclient.p12. - - * ssl.c (load_client_cert): Test ne_ssl_clicert_name. - - * stubs.c (stub_ssl): Check for ne_ssl_clicert_name stub. - -Sat Mar 29 13:31:35 2003 Joe Orton - - * ssl.c (load_client_cert): Test ne_ssl_clicert_owner. - -Fri Mar 28 22:13:55 2003 Joe Orton - - * ssl.c (fingerprint): New function. - - * stubs.c (stub_ssl): Check for ne_ssl_cert_digest stub. - -Wed Mar 26 22:52:15 2003 Joe Orton - - * ssl.c (fail_missing_CN): New function. - - * makekeys.sh: Generate missingcn.cert. - - * openssl.conf: Allow commonName to be omitted from CSR. - -Wed Mar 26 22:41:48 2003 Joe Orton - - * ssl.c (load_server_certs): Renamed from load_ca; test loading - non-existent file. - -Wed Mar 26 20:38:08 2003 Joe Orton - - * stubs.c (stub_ssl): Updated for new SSL interface. - -Tue Mar 25 20:32:07 2003 Joe Orton - - Update tests for changes to SSL interface: - - * socket.c (init_ssl): Use ne_ssl_context_create, - ne_ssl_cert_read, ne_ssl_ctx_trustcert. - (begin): Use ne_sock_connect_ssl. - - * ssl.c (serve_ssl_chained, trust_default_ca, load_client_cert, - check_dname, check_cert_dnames, check_cert, check_chain, - parse_chain, cc_check_dnames, cc_provided_dnames): New functions. - (serve_ccert): Always trust SERVER_CERT; optionally call - SSL_CTX_set_client_CA_list. - (any_ssl_request, load_ca, fail_truncated_eof): Use - ne_ssl_cert_read and ne_ssl_trust_cert. - (keypw_prompt): Fail if userdata is NULL. - (fail_load_ccerts, load_pkcs12_ccert, load_pem_ccert, check_DNs): - Removed functions. - (parse_cert): Use check_cert. - (client_cert_provided, client_cert_pkcs12): Rewritten for new API. - - * makekeys.sh: Generate calist.pem, unclient.p12. - -Wed Mar 12 22:36:27 2003 Joe Orton - - * redirect.c (simple): Fold in tests for 30[237] redirects for - better coverage. - (no_redirect): Another test for _location returning NULL. - -Wed Mar 12 22:29:45 2003 Joe Orton - - * redirect.c (process_redir): Factored out from check_redir. - (no_redirect): New function. - -Sun Mar 9 17:46:37 2003 Joe Orton - - * lock.c (fail_discover): New function. - -Sat Mar 1 10:53:58 2003 Joe Orton - - * uri-tests.c (authinfo): Removed. - (escapes): Test nothing-to-escape and invalid URI cases. - (compares): Gain 100% branch coverage in ne_path_compare. - (default_port): Test unknown scheme case. - (parse): Test authinfo here, and some edge cases. - (unparse): Fill in port if default. - -Sat Mar 1 09:20:42 2003 Joe Orton - - * socket.c (multi_init): New function. - -Sat Mar 1 08:04:09 2003 Joe Orton - - * string-tests.c (cleaner): New function. - -Wed Feb 26 22:13:14 2003 Joe Orton - - * request.c (fail_eof_chunk, fail_eof_badclen): New tests. - -Wed Feb 26 21:54:39 2003 Joe Orton - - * util-tests.c (support): New function. - (bad_sl, accept_sl): More status-lines. - -Tue Feb 25 21:06:18 2003 Joe Orton - - * ssl.c (do_ssl_response): Fail if response contains - "Proxy-Authorization" header. - (apt_post_send, apt_creds, auth_proxy_tunnel): New functions. - -Thu Nov 28 21:25:01 2002 Joe Orton - - * request.c (te_over_clength2): New test. - -Sun Nov 17 18:59:04 2002 Joe Orton - - * socket.c (addr_make_v4, addr_make_v6, addr_compare): New - functions. - -Fri Oct 11 00:49:01 2002 Joe Orton - - * props.c (regress): Moved from regress.c:propfind_segv; add - regression test for ne_props.c segfault fixed in rev 1.83. - - * regress.c: Removed. - -Tue Oct 8 20:06:55 2002 Joe Orton - - * xml.c (matches): Add tests that entities in attribute values are - dereferenced by the XML parser. - -Fri Oct 4 17:10:19 2002 Joe Orton - - * request.c (no_body_bad_clength, no_body_empty_clength): New - tests. - (expect_no_body): Use better paths in the requests. - -Tue Sep 24 21:27:33 2002 Joe Orton - - * request.c (fail_long_header, versions, hook_create_req): New - functions. - -Tue Sep 17 21:08:17 2002 Joe Orton - - * openssl.conf (neonca): Make 'countryName' optional in CA policy. - (reqDN.CNfirst): New section. - - * makekeys.sh: Generate 'cnfirst.cert', which has commonName as - first attribute in subject DN. - - * ssl.c (commonName_first): New function. - -Tue Sep 10 21:11:18 2002 Joe Orton - - * request.c (fail_double_lookup): New function. - -Sun Aug 25 23:16:33 2002 Joe Orton - - * ssl.c (do_ssl_response): Add 'unclean' argument. - (all callers changed). - (serve_response_unclean, empty_truncated_eof, fail_truncated_eof): - New functions. - -Sun Aug 25 19:16:00 2002 Joe Orton - - * socket.c (resolve_numeric): Test ne_addr_print too. - -Sun Aug 25 13:39:37 2002 Joe Orton - - * resolve.c: New file. - -Sun Aug 25 11:25:12 2002 Joe Orton - - * request.c (is_alive): Update for new ne_addr_* interface. - -Sun Aug 25 08:31:16 2002 Joe Orton - - * socket.c (serve_truncate, ssl_truncate): New functions. - -Sun Aug 25 08:28:17 2002 Joe Orton - - * socket.c (do_connect): New function; use new - ne_sock_connect/ne_addr interface. - (begin) [SOCKET_SSL, !SOCKET_SSL]: Use do_connect. - (resolve_numeric): Adjust for new ne_addr interface. - (resolve_ipv6): Disable test. - -Sat Aug 24 08:50:06 2002 Joe Orton - - * request.c (fail_statusline): New function. - -Fri Aug 23 22:52:38 2002 Joe Orton - - * ssl.c (init): FAILHARD if initialization fails. - -Wed Aug 21 13:29:58 2002 Joe Orton - - * uri-tests.c (null_uri): Removed test. - (parse): More tests including IPv6 address tests; use ONCMP macro. - (failparse): New function. - (unparse): Add URI with IPv6 address. - -Wed Aug 21 13:28:37 2002 Joe Orton - - * socket.c (resolve_ipv6): New function. - -Mon Aug 19 16:59:46 2002 Joe Orton - - * socket.c (resolve): Adapt for new ne_addr_resolve interface. - (resolve_numeric): New test. - - * request.c (is_alive): Use new ne_addr_resolve interface. - -Mon Aug 19 16:57:53 2002 Joe Orton - - * socket.c (begin): Fix handling of connect failure. - (TO_BEGIN): Handle errors from to_begin properly. - -Sun Aug 18 23:37:34 2002 Joe Orton - - * string-tests.c (str_errors): Check return value and behaviour - when error string is truncated, an - -Sun Aug 18 23:31:51 2002 Joe Orton - - * util-tests.c (str_errors): Moved to... - - * string-tests.c (str_errors): here. - -Sun Aug 18 23:11:28 2002 Joe Orton - - * string-tests.c (strnzcpy): New function. - -Sun Aug 18 08:18:24 2002 Joe Orton - - * ssl.c (caseless_match): New function. - - * makekeys.sh: Create caseless.cert. - -Sun Aug 18 08:12:32 2002 Joe Orton - - * ssl.c (notdns_altname): New function. - - * makekeys.sh: Create altname4.cert. - - * openssl.conf (altExt4): New section. - -Sun Aug 18 07:42:30 2002 Joe Orton - - * ssl.c (multi_commonName): New function. - - * openssl.conf (req): Use distinguished_name section as - specificied by $REQDN. - (reqDN.doubleCN): New section. - - * makekeys.sh: Set $REQDN; create twocn.cert. - -Sun Aug 18 00:47:19 2002 Joe Orton - - * ssl.c (accept_signed_cert): New function, factored out from - simple. - (simple): Use accept_signed_cert. - (subject_altname, two_subject_altname, two_subject_altname2): - New function. - - * openssl.conf: Add extension sections altExt, altExt2, altExt3. - - * makekeys.sh: Generate altname.cert, altname2.cert, - altname3.cert. - -Sat Aug 17 18:41:42 2002 Joe Orton - - * makekeys.sh (csr_fields): New function; generate output for - `openssl req'. - -Sat Aug 17 18:27:36 2002 Joe Orton - - * makekeys.sh: Add CA and REQ variables to simplify OpenSSL - invocation. Pass -config to req rather than relying on installed - default configuration. - - * openssl.conf: Add `req' and `reqDN' sections to allow use with - `openssl req' command. Add CA basic constraint extention to - certificates used. - -Sat Aug 10 10:42:57 2002 Joe Orton - - * makekeys.sh: Use openssl binary as ${OPENSSL}. - - * Makefile.in: Pick up OPENSSL from configure, and pass it through - to makekeys.sh. - -Sat Aug 10 10:18:15 2002 Joe Orton - - * socket.c (begin): Don't use run-time initialization. - - * request.c (s_progress): Fix warnings on FreeBSD. - -Mon Aug 5 21:08:24 2002 Joe Orton - - * ssl.c (ccert_provider, client_cert_provided): New functions. - (fail_load_ccerts): Enable function. - -Sun Aug 4 22:32:43 2002 Joe Orton - - * request.c (serve_abort, retry_after_abort): New functions. - -Sun Aug 4 13:28:47 2002 Joe Orton - - * request.c (continued_header): New function. - -Sun Aug 4 12:54:52 2002 Joe Orton - - * socket.c [SOCKET_SSL] (ssl_closure): New function; use instead - of read_reset, write_reset for SOCKET_SSL build. - -Sun Aug 4 12:27:34 2002 Joe Orton - - Build socket.c twice, once for testing over SSL connections: - - * Makefile.in (socket-ssl.o, socket-ssl): New targets. - (SSL_TESTS): Include socket-ssl target. - - * socket.c [SOCKET_SSL] (init_ssl, wrap_serve): New functions. - [SOCKET_SSL] (begin): Alternate implementation. - -Sat Aug 3 22:20:59 2002 Joe Orton - - * session.c (privates): New function. - -Sat Aug 3 22:20:14 2002 Joe Orton - - * auth.c (fail_auth_cb, tunnel_regress): New function. - -Sat Aug 3 22:12:48 2002 Joe Orton - - * auth.c (forget_regress): New function. - -Sun Jul 28 12:24:02 2002 Joe Orton - - * lock.c (lock_timeout, submit_test, lock_shared): Use ne_concat, - not CONCAT? macros. - - * ssl.c (init, fail_expired, fail_notvalid): Likewise. - -Thu Jul 25 00:04:47 2002 Joe Orton - - * string-tests.c (buf_concat, buf_concat2, buf_concat3): Renamed - from concat, concat1, concat3). - (concat): New function. - -Sun Jul 14 11:42:03 2002 Joe Orton - - * util-tests.c (versioning): New function. - -Thu Jul 11 17:24:29 2002 Joe Orton - - * request.c (no_headers): New function. - -Wed Jul 10 22:58:01 2002 Joe Orton - - * utils.c (any_2xx_request_body): New function. - -Wed Jul 10 22:44:12 2002 Joe Orton - - * request.c (ptimeout_eof, ptimeout_eof2, close_not_retried, - serve_close2): New functions. - (abort_respbody): Rejoin child earlier for reliable results. - -Sun Jul 7 12:17:11 2002 Joe Orton - - * socket.c (expect_eof): Better error reporting. - (good_close): Split from finish(). - (finish): Use good_close. - (expect_write_closed, write_reset, read_reset): Add tests that - an ECONNRESET is treated as a SOCK_CLOSED failure. - -Sun Jul 7 08:38:12 2002 Joe Orton - - * utils.c (serve_response): Use discard_body(). - -Sun Jul 7 08:28:56 2002 Joe Orton - - * socket.c (serve_expect, full_write, small_writes, large_writes, - echo_server, echo_expect, echo_lines): New functions. - -Sat Jul 6 13:11:33 2002 Joe Orton - - * request.c (serve_eof, fail_early_eof, fail_eof_continued, - fail_eof_headers): New functions. - -Sat Jul 6 08:58:17 2002 Joe Orton - - * request.c (serve_100_once, expect_100_once): New functions. - -Fri Jul 5 21:43:58 2002 Joe Orton - - * auth.c (username): Use the correct spelling of Aladdin. - (auth_hdr): Simplify debug messages. - (auth_serve): Fail if no Authorization header is given. - (basic): Check for response status. - -Fri Jul 5 21:41:02 2002 Joe Orton - - * utils.c (any_2xx_request): New function. - -Sun Jun 30 17:10:59 2002 Joe Orton - - * request.c (fail_noserver): Factor out from host_not_found. - (fail_lookup): Equivalent to old host_not_found. - (fail_connect, abort_respbody): New function. - -Sun Jun 30 14:32:32 2002 Joe Orton - - * request.c (fail_chunksize): New function. - -Sun Jun 30 10:39:17 2002 Joe Orton - - * request.c (test_persist): Factor out from persist; take - response and response body as arguments. - (persist_http11): New function, equivalent to old persist. - (persist_chunked, persist_http10): New functions. - -Sun Jun 30 10:25:07 2002 Joe Orton - - * utils.c (serve_response): Factor out from single_serve_string, - many_serve_string. - (single_serve_string, many_serve_string): Use serve_response. - -Sun Jun 30 09:13:55 2002 Joe Orton - - * request.c (expect_response, persist, persist_timeout, - multi_header): Rely on the fact that the test framework - will reap the server. - (expect_no_body, no_body_304, no_body_204, no_body_HEAD, - no_body_chunks): New functions. - -Tue Jun 25 23:05:42 2002 Joe Orton - - * request.c (trailing_header): New function. - -Sun Jun 23 23:00:03 2002 Joe Orton - - * ssl.c (no_verify): Fix sixth argument to any_ssl_request. - -Sun Jun 23 15:21:06 2002 Joe Orton - - * Makefile.in (grind): New target. - - * run.sh: Respect $HARNESS. - -Sun Jun 23 15:20:38 2002 Joe Orton - - * props.c: New file. - -Sun Jun 23 09:37:10 2002 Joe Orton - - * makekeys.sh: Ignore failure from `hostname -[sdf]' commands, as - appropriate tests are skipped on failure. - -Sun Jun 23 08:33:50 2002 Joe Orton - - * request.c (host_not_found): Use any_request(); simplify. - (proxy_no_resolve): New function. - -Sun Jun 16 11:40:19 2002 Joe Orton - - * ssl.c (do_ssl_response): Succeed if connection is closed - by client after negotiation. - (serve_tunnel, fail_tunnel, proxy_tunnel): New functions. - -Mon Jun 10 21:18:03 2002 Joe Orton - - * redirect.c (check_redir): Await server child before returning. - -Sun Jun 9 13:05:25 2002 Joe Orton - - * socket.c (DECL): Don't use run-time initialization. - (single_read, single_peek, small_reads, read_and_peek, line_closure, - larger_read, line_toolong): Use DECL, as last declaration. - -Sun Jun 9 13:03:36 2002 Joe Orton - - * compress.c (reader, do_fetch): Check that inflated data is of - expected length. - -Sun Jun 9 11:40:54 2002 Joe Orton - - * redirect.c (struct redir_args): Add 'path' field. - (any_request): Use path in Request-URI. - (simple, redir_303, non_absolute): Fill in path. - (relative_1, relative_2): New functions. - -Tue Jun 4 16:56:08 2002 Joe Orton - - * uri-tests.c (parents): Improve ne_path_parent tests. - -Mon Jun 3 18:22:31 2002 Joe Orton - - * cookies.c: New file. - -Sun Jun 2 10:06:42 2002 Joe Orton - - * basic.c (dav_capabilities): New function. - -Sat Jun 1 10:39:04 2002 Joe Orton - - * socket.c (to_begin, to_end, peek_timeout, read_timeout, - readline_timeout, fullread_timeout): New functions. - -Sat Jun 1 10:38:13 2002 Joe Orton - - * request.c (read_timeout): Use sleepy_server. - (hung_server): Removed. - -Sat Jun 1 10:32:45 2002 Joe Orton - - * utils.c (sleepy_server): New function. - -Thu May 30 20:00:40 2002 Joe Orton - - * socket.c (finish): New function, factored out from common code. - (small_reads, read_and_peek, larger_read): Use it. - (line_simple, line_closure, line_empty, line_toolong, line_mingle, - line_chunked): New functions. - -Sun May 26 14:54:52 2002 Joe Orton - - * request.c (fill_uri, match_hostport, hostports): Moved functions - to session.c. - - * session.c: New file. - -Fri May 24 08:14:21 2002 Joe Orton - - * request.c (match_hostport, hostports): New functions. - -Tue May 21 21:29:25 2002 Joe Orton - - * redirect.c: New file. - -Sun May 19 18:25:48 2002 Joe Orton - - * auth.c, lock.c, regress.c, socket.c, ssl.c, utils.c, utils.h: - Update for socket API change; s/sock_/ne_sock_/, - s/SOCK_/NE_SOCK_/. - -Wed May 8 19:41:24 2002 Joe Orton - - * ssl.c (do_ssl_response): Take response body as parameter; all - callers changed. - (serve_eof, simple_eof): New functions. - -Wed May 8 17:17:27 2002 Joe Orton - - * socket.c: New file. - - * sock-tests.c: Removed file. - - * Makefile.in: Updated accordingly. - -Wed May 8 11:53:35 2002 Joe Orton - - * request.c (host_not_found): New function. - -Wed May 1 21:41:02 2002 Joe Orton - - * uri-tests.c (parse): New function. - (simple, simple_ssl): Adjust for ne_uri_parse port default. - -Tue Apr 23 21:39:09 2002 Joe Orton - - * request.c (read_timeout): Better diagnostic for test failure - cases. - -Sun Apr 14 12:00:19 2002 Joe Orton - - * basic.c (content_type): Updated to reflect default charset - ISO-8859-1 for text/ media types. - -Sun Apr 7 17:35:21 2002 Joe Orton - - * run.sh: Set MALLOC_CHECK_ so glibc's heap corruption detection - is enabled. - -Sun Apr 7 17:30:37 2002 Joe Orton - - * compress.c (do_fetch): Reset 'failed' flag to zero each time. - -Wed Apr 3 20:16:43 2002 Joe Orton - - * request.c (NO_BODY): Renamed from NOBODY (all callers changed). - (empty_header, ignore_header_ws, ignore_header_ws2): New tests. - (ignore_header_ws3): Renamed from ignore_header_spaces. - -Tue Apr 2 21:09:33 2002 Joe Orton - - * request.c (expect_header_value): New function. - (ignore_header_case, ignore_header_spaces, - ignore_header_tabs): New tests. - -Mon Mar 25 21:51:24 2002 Joe Orton - - * lock.c (multi_lock_response, lock_shared): New function. - (lock_compare): Factored out from discover_results. - (discover, lock_timeout, submit_test): Adjust for lock API - changes. - -Mon Mar 25 21:36:55 2002 Joe Orton - - * ssl.c (fail_ssl_request): Check failure bits against - NE_SSL_FAILMASK. - -Sun Mar 10 22:07:48 2002 Joe Orton - - * stubs.c (stub_decompress, sd_reader): New function. - -Sun Mar 10 21:39:29 2002 Joe Orton - - * lock.c (activelock): New function, factored out from - lock_response. - (lock_response): Use activelock; adjust argument types. - (make_lock): Adjusted for lock_response arg changes. - (discard_response, serve_discovery, discover_result, discover): - New functions. - -Wed Mar 6 22:22:04 2002 Joe Orton - - * lock.c (submit_test): Handle failures gracefully. - -Wed Mar 6 21:23:27 2002 Joe Orton - - * lock.c (submit_test): Update to expect an absoluteURI in If: - headers. - -Wed Mar 6 21:17:37 2002 Joe Orton - - * uri-tests.c (unparse): New function. - -Tue Mar 5 22:59:37 2002 Joe Orton - - * uri-tests.c (cmp): Checks for case-insensitive comparison, and - empty path, "/" equivalence. - -Mon Mar 4 01:07:03 2002 Joe Orton - - * request.c (blank_response): Add test for potential segfault - in strip_eol (would fail if run under Electric Fence). - -Sun Mar 3 20:50:01 2002 Joe Orton - - * lock.c (make_lock, store_single, store_several, got_if_header, - serve_verify_if, do_request, submit_test, if_simple, - if_under_infinite, if_infinite_over, if_child, if_covered_child): - New tests. - - (lock_timeout): Adjusted for API changes. - -Sun Mar 3 15:29:05 2002 Joe Orton - - * uri-tests.c (cmp_differ, cmp): New functions. - -Sun Mar 3 11:08:36 2002 Joe Orton - - * request.c (fill_uri): New function. - -Sun Feb 17 21:31:21 2002 Joe Orton - - * ssl.c (fqdn_match): Removed test. - -Sun Feb 17 20:32:16 2002 Joe Orton - - * makekeys.sh: Create keypair for client cert. - - * ssl.c (do_ssl_response, any_ssl_request, all callers thereof): - Better error handling. - (serve_ccert, load_pem_ccert, keypw_prompt, load_pkcs12_ccert, - fail_load_ccerts, client_cert_pem, client_cert_pkcs12): New - functions. - -Sun Feb 17 11:54:19 2002 Joe Orton - - * basic.c (do_range): Factored out from - get_range/fail_range_length. - (get_range, fail_range_length): Use do_range. - (fail_range_units, fail_range_notrange, fail_range_unsatify): New - tests. - -Sun Feb 17 11:36:00 2002 Joe Orton - - * basic.c (get_range, fail_range_length): New functions. - -Sat Feb 16 23:29:40 2002 Joe Orton - - * xml.c: New file. - - * Makefile.in (DAV_TESTS): Add xml tests. - -Sat Feb 16 15:26:27 2002 Joe Orton - - * compress.c (do_fetch): Rename from fetch(); add 'expect_fail' - paramater. (fetch): Re-implement using do_fetch. - (fail_trailing, fail_bad_csum, fail_truncate): New functions. - - * Makefile.in (trailing.gz, truncated.gz, badcsum.gz): New helper - files. - -Thu Feb 14 19:09:42 2002 Joe Orton - - * request.c (everywhere): Simplify use of expect_response. - -Thu Feb 14 19:05:48 2002 Joe Orton - - * request.c (ignore_bad_headers): New function. - -Mon Feb 11 22:06:40 2002 Joe Orton - - * makekeys.sh: If the hostname command is clever enough to give - FQDN, hostname, domainname, then create wildcard.cert; cert with a - wildcard commonName. - - * ssl.c (wildcard_match): New function - -Mon Feb 11 21:55:52 2002 Joe Orton - - * ssl.c (any_ssl_request): Take session pointer, don't - initialize here. (DEFSESS): New macro. - (everywhere): Use DEFSESS rather than passing pointer-to- - session pointer. - -Mon Feb 11 20:44:44 2002 Joe Orton - - * ssl.c (fqdn_match): Test for FQDN matching against non-qualified - FQDN. - (makekeys.sh): Create server cert with FQDN. - -Sun Feb 10 12:36:55 2002 Joe Orton - - * request.c (chunk_oversize): New function. - -Sat Feb 9 21:12:47 2002 Joe Orton - - * request.c (reason_phrase): New function. - -Sat Feb 9 16:50:58 2002 Joe Orton - - * request.c (read_timeout, hung_server): New functions. - -Thu Feb 7 22:58:31 2002 Joe Orton - - * ssl.c (cache_verify, no_verify, count_vfy): New functions. - -Thu Feb 7 19:39:33 2002 Joe Orton - - * ssl.c (any_ssl_request): Take server function as argument: all - callers changed. - (fail_ssl_request): Renamed from failreq; uses any_ssl_request. - -Wed Feb 6 20:43:32 2002 Joe Orton - - * ssl.c (load_ca): New function. - -Wed Feb 6 20:36:15 2002 Joe Orton - - * ssl.c (any_ssl_request): Make ca_cert and verify_fn arguments - optional. - (trustall): Removed function. - (simple): Use the CA cert; no need for a verify function. - (parse_cert): Don't give a CA cert, force use of verify function. - (failreq): Bug fix, don't trust server cert as CA. - (fail_wrongCN, fail_notvalid, fail_expired): Pass server cert - as CA cert server cert is self-signed. - -Tue Feb 5 20:33:42 2002 Joe Orton - - * ssl.c (fail_untrusted_ca, fail_self_signed): New tests. - (fail_serve): New function. - (failreq, any_ssl_request): Take ca cert argument. - (check_DNs, trustall, get_failures): Adjust for new verify - callback interface. - -Sat Feb 2 14:18:11 2002 Joe Orton - - * ssl.c (do_ssl_response): Factored out from serve_ssl. - (serve_ssl): Use do_ssl_response. - (serve_scache, session_cache): New functions. - -Thu Jan 31 21:09:58 2002 Joe Orton - - * Makefile.in (ca-stamp): New target. - - * makekeys.sh: New helper script. - - * ssl.c (parse_cert, fail_wrongCN, fail_expired, fail_notvalid): - New tests. - (any_ssl_request, trustall, check_DNs, failreq): New auxiliaries. - -Thu Jan 31 20:42:38 2002 Joe Orton - - * wrongcn.pem, notvalid.pem, expired.pem, server.key: New files. - - * Makefile.in: Remove targets to generate certs. - -Wed Jan 30 21:15:33 2002 Joe Orton - - * Makefile.in (wrongcn.pem): New target. - -Wed Jan 30 19:58:18 2002 Joe Orton - - * string-tests.c: Updated for ne_buffer API change. - -Sat Jan 26 11:23:34 2002 Joe Orton - - * Makefile.in: Pick up appropriate TESTS, HELPERS from configure. - (ssltests*, davtests*): Remove crud. - - * compress.c: Presume zlib support present if built. - -Sun Jan 20 23:29:37 2002 Joe Orton - - * ssl.c: New file. - - * Makefile.in (ssltests-no, ssltests-yes, server.pem, server.key): - New targets. - (check): Conditionally run SSL tests. - -Sun Jan 20 13:20:56 2002 Joe Orton - - * Makefile.in (davtests-no, davtests-yes): Separate test programs - which require DAV support; only run if DAV is enabled. - - * Makefile.in (test): Pass SRCDIR env var through to run.sh. - - * run.sh: Pass SRCDIR as argv[1] to test programs. - - * compress.c (init): New function. Use 'newsfn' global for - filename of NEWS file. - -Sun Jan 20 13:06:40 2002 Joe Orton - - * Makefile.in: Fixes for VPATH build - -Mon Jan 14 01:58:39 2002 Joe Orton - - * basic.c (content_type): Add harsher charset handling tests. - -Sun Jan 13 14:01:57 2002 Joe Orton - - * lock.c (lock_timeout): Use make_session. - - * acl.c (test_acl): Use make_session. - - * auth.c (basic, retries): Use make_session. - -Sun Jan 13 14:01:13 2002 Joe Orton - - * utils.c (make_session): New function. - -Sun Jan 13 14:00:34 2002 Joe Orton - - * basic.c (content_type): Rename ctype to ct; check if charset is - unexpectedly set. - -Sun Jan 13 13:58:07 2002 Joe Orton - - * basic.c: New file. - - * Makefile.in: Add `basic' test suite. - -Mon Jan 7 22:05:33 2002 Joe Orton - - * Makefile.in: Don't pass CFLAGS to CC when linking. - -Mon Jan 7 21:46:03 2002 Joe Orton - - * lock.c: New file. - - * Makefile.in: Add 'lock' to TESTS, build lock. - -Mon Jan 7 21:17:21 2002 Joe Orton - - * skeleton.c: Add skeleton test suite. - -Tue Jan 1 21:47:09 2002 Joe Orton - - * Makefile.in: Use CPPFLAGS correctly. - -Sun Dec 9 14:02:50 2001 Joe Orton - - * string-tests.c (ONCMP): New macro. (everywhere): Use it. - (grow): Add ne_buffer_grow test. - -Sun Dec 9 13:12:27 2001 Joe Orton - - * string-tests.c (concat2, concat3): New ne_buffer_concat tests. - -Sat Dec 1 18:35:29 2001 Joe Orton - - * utils.c (any_request): Don't set the error context. - -Sat Dec 1 12:21:48 2001 Joe Orton - - * auth.c (retry_failure, retry_fail_cb, retry_fail_serve): New - functions. - -Tue Nov 27 21:24:22 2001 Joe Orton - - * request.c (s_progress, provide_progress, send_progress): New - functions. - -Sun Nov 18 19:11:23 2001 Joe Orton - - * auth.c (send_response): New function. (auth_serve): Simplify - using send_response. (retry_serve, retry_cb, retries): New - functions. - -Sat Nov 17 22:32:29 2001 Joe Orton - - * auth.c (auth_serve, basic): Simplify, use a persistent - connection and any_request() to work with --disable-dav builds. - -Sat Nov 17 22:30:43 2001 Joe Orton - - * utils.c (any_request): New function. - -Sun Oct 28 19:38:05 2001 Joe Orton - - * Makefile.in: Use explicit link rules. - -Fri Oct 26 20:08:33 2001 Joe Orton - - * request.c (persist_timeout): Test behaviour when connection - closes after between 1 and 10 requests. - -Fri Oct 26 20:04:27 2001 Joe Orton - - * utils.c (many_serve_string): New function. - -Sun Oct 7 17:48:53 2001 Joe Orton - - * utils.c: New file. - - * request.c (single_serve_string): Moved to utils.c. - - * Makefile.in: Link utils.o into all libtest.a. Move libtest.a - into this directory. - -Sun Oct 7 15:01:47 2001 Joe Orton - - * request.c (persist, persist_timeout, serve_twice, is_alive): New - functions. (closed_connection): Avoid race condition. - -Sat Oct 6 14:33:42 2001 Joe Orton - - * request.c (prepare_request, finish_request): Renamed from - make_request, destroy_request. (skip_interim_1xx, skip_many_1xx, - skip_1xx_hdrs): New functions. - -Wed Oct 3 00:03:33 2001 Joe Orton - - * request.c (fail_request): Optionally include a request body, and - optionally presume the server runs "forever". (all callers - changed). (serve_close, closed_connection): New function. - -Sat Sep 29 14:08:16 2001 Joe Orton - - * compress.c (fetch): Update for new decompression API. - -Sat Sep 29 11:21:56 2001 Joe Orton - - * compress.c: New file. - - * Makefile.in: Build compress test, and some its helpers. Add - -lneon to LIBS, and pick up NEON_CFLAGS. - -Thu Sep 27 20:31:51 2001 Joe Orton - - * utils.h: New file. - - * request.c: Moved ONREQ() into utils.h - -Mon Aug 27 00:34:56 2001 Joe Orton - - * regress.c: New file. - -Mon Aug 27 00:33:13 2001 Joe Orton - - * request.c (discard_request): Moved into common/child.c. - (make_request, destroy_request): Convenience functions. - (serve_non_http, not_http): New test. - -Sun Jun 24 22:15:46 2001 Joe Orton - - * test.[ch], child.[ch]: Moved into 'common' subdir. - - * Makefile.in: Updated likewise. - -Tue Jun 19 22:00:06 2001 Joe Orton - - * util-tests.c (parse_dates): Test date parsers. - -Sun Jun 10 17:36:11 2001 Joe Orton - - * request.c (infinite_headers, unbounded_headers): New test. - -Sun Jun 10 16:38:53 2001 Joe Orton - - * child.c [HAVE_PIPE]: Use a pipe between child and parent to know - when the child is ready to accept connections. Avoids boring - sleep()ing. - -Fri Jun 8 21:19:35 2001 Joe Orton - - * tests.c (segv, main): Remove SEGV handler in favour of useful - core dumps. - -Mon Jun 4 01:15:52 2001 Joe Orton - - * child.c (server_socket): Set socket family correctly. - -Thu May 31 08:58:41 2001 Joe Orton - - * util-tests.c (md5_alignment): New test for MD5 alignment issue - on Sparc. - -Thu May 31 00:40:43 2001 Joe Orton - - * child.c (minisleep): Just sleep for a second anyway. - -Thu May 31 00:19:16 2001 Joe Orton - - * child.c (server_socket): Casts for bind and setsockopt arguments. - -Thu May 31 00:02:21 2001 Joe Orton - - * request.c (send_bodies): Test callback-provided request bodies. - -Wed May 30 22:37:08 2001 Joe Orton - - * tests.c (child_segv): New function. (in_child): Install - different SEGV handler. (segv): Sleep so the re-raised SEGV - signal gets handled and we dump core. - -Wed May 30 19:24:32 2001 Joe Orton - - * request.c (send_bodies): New test for sending request bodies. - -Wed May 16 21:19:49 2001 Joe Orton - - * request.c (expect_response): Renamed, fold together - single_request and do_get_request. (all callers changed) - -Wed May 16 20:59:19 2001 Joe Orton - - * request.c (construct_get, run_request): New functions. - (fold_headers, fold_many_headers, multi_header): New tests. - -Sat May 12 17:37:36 2001 Joe Orton - - * server.c: Renamed from http-tests.c. - -Sat May 12 17:35:05 2001 Joe Orton - - * child.c (minisleep): New function. (spawn_server, reap_server): - New functions. (server_child): Call in_child. - -Sat May 12 17:33:57 2001 Joe Orton - - * tests.c (main): Open two log files for debugging messages. - (in_child): Switch to debug using child log. - -Sat May 12 11:18:18 2001 Joe Orton - - * tests.c (main): Call sock_init. (segv): Re-raise SEGV signal - after printing message. - -Mon May 7 10:38:50 2001 Joe Orton - - * request.c (chunk_syntax_1, chunk_syntax_2, chunk_syntax_3, - chunk_syntax_4, chunk_syntax_5): Split down from chunk_syntax. - -Mon May 7 10:37:38 2001 Joe Orton - - * util-tests.c (base64): Update for ne_base64() changes. Add - tests for binary data. - -Sun May 6 23:55:36 2001 Joe Orton - - * tests.h (ON): Use global buffer 'on_err_buf'. Make 'name' - variable public. - -Sun May 6 23:53:06 2001 Joe Orton - - * request.c (single_serve_string): General version of - single_serve_*. (single_request): Pass in expected response body. - (single_get_*): Use new single_request/single_serve_string. - (chunk_syntax): Add some tests for chunk syntax. - -Sun May 6 22:29:36 2001 Joe Orton - - * child.c, child.h: New files, split down from request.c. - -Sun May 6 21:53:28 2001 Joe Orton - - * request.c (spawn_server): Sleep for a while to let the server - get going. (do_request): Use passed parameters when creating - request. - -Sun May 6 21:34:27 2001 Joe Orton - - * request.c (spawn_server): Use callback to handle the server side - of connection. (single_request): New function. (single_get_eof, - single_get_clength, single_get_chunked): New functions. - (reap_server): New function. - -Sun May 6 20:02:32 2001 Joe Orton - - * request.c: New file. - -Wed May 2 12:08:53 2001 Joe Orton - - * string-tests.c (token1, token2, nulls, empty, quoted, badquotes, - shave, combo): New tests for ne_token and ne_shave. - -Wed May 2 12:04:52 2001 Joe Orton - - * string-tests.c: Updated for sbuffer -> ne_buffer changes. - -Wed May 2 01:08:45 2001 Joe Orton - - * Makefile.in (check): Alias for test goal. - -Wed May 2 01:08:36 2001 Joe Orton - - * tests.c (segv): Disable SEGV handler once handling it. - -Sun Apr 29 14:57:59 2001 Joe Orton - - * uri-tests.c (slash): Check behaviour of passing zero-length URI. - -Sun Apr 29 13:43:59 2001 Joe Orton - - * Makefile.in (clean): New target. (libtest.a): Depend on libneon - to force rebuilds when necessary. (all): Build but don't test. - -Sun Apr 29 13:41:13 2001 Joe Orton - - * util-tests.c: Add status line with leading garbage. - -Sun Apr 29 13:39:53 2001 Joe Orton - - * util-tests.c (status_lines): Add some tests for invalid status - lines too. - -Sun Apr 29 13:38:31 2001 Joe Orton - - * tests.c (main): Use basename(argv[0]) as suite name. Fail if no - tests are in the functions vector. - -Sun Apr 29 11:06:45 2001 Joe Orton - - * tests.c (segv): New function. (main): Add SIGSEGV handler. - -Fri Apr 27 00:00:12 2001 Joe Orton - - * util-tests.c (base64): New test. - -Thu Apr 26 22:39:44 2001 Joe Orton - - * uri-tests.c (just_hostname, just_path, null_uri): New tests. - -Thu Apr 26 22:03:58 2001 Joe Orton - - * util-tests.c (md5): Test of MD5 functions. - -Mon Apr 23 23:08:02 2001 Joe Orton - - * http-tests.c (simple_head): Add HEAD test. - -Mon Apr 23 22:49:52 2001 Joe Orton - - * http-tests.c (simple_get): Check for EOF after reading response - body of HTTP/1.0 GET request. - - (null_resource): New function, test for 404 on null resource. - - diff --git a/client/neon-0.27.2/test/Makefile.in b/client/neon-0.27.2/test/Makefile.in deleted file mode 100644 index f852bfa75..000000000 --- a/client/neon-0.27.2/test/Makefile.in +++ /dev/null @@ -1,222 +0,0 @@ -# Makefile for neon test suite. - -SHELL = @SHELL@ -CPPFLAGS = @CPPFLAGS@ -I. -I$(top_srcdir)/src -I$(top_srcdir)/test/common -CFLAGS = @CFLAGS@ @NEON_CFLAGS@ -LDFLAGS = @LDFLAGS@ -DEFS = @DEFS@ - -top_builddir = .. -top_srcdir = @top_srcdir@ -srcdir = @srcdir@ -VPATH = @srcdir@ - -AR = ar - -RANLIB = @RANLIB@ -LIBS = $(LIBTEST) -CC = @CC@ -OPENSSL = @OPENSSL@ - -HELPERS = @HELPERS@ -BASIC_TESTS = uri-tests util-tests string-tests socket \ - session request auth basic stubs redirect -ZLIB_TESTS = compress -ZLIB_HELPERS = file1.gz file2.gz trailing.gz badcsum.gz truncated.gz \ - corrupt1.gz corrupt2.gz empty.gz random.txt -DAV_TESTS = xml xmlreq acl props lock -SSL_TESTS = socket-ssl ssl -SSL_HELPERS = ca-stamp -TESTS = @TESTS@ -VALGRIND = valgrind --tool=memcheck --leak-check=yes --trace-children=no --show-reachable=yes - -# Make every object depend on libneon.la to force a rebuild on any src/* changes -OBJDEPS = $(srcdir)/common/tests.h $(srcdir)/common/child.h $(srcdir)/utils.h \ - $(top_builddir)/config.h $(top_builddir)/src/libneon.la -# Test program just depends on libtest -DEPS = $(LIBTEST) - -LIBTEST = libtest.la -LIBNEON = $(top_builddir)/src/libneon.la - -LIBTOOL = @LIBTOOL@ --silent -TEST_LDFLAGS = @TEST_LDFLAGS@ -LINK = $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) $(TEST_LDFLAGS) -COMPILE = $(LIBTOOL) --mode=compile $(CC) $(CPPFLAGS) $(CFLAGS) - -prefix = @prefix@ -exec_prefix = @exec_prefix@ -libdir = @libdir@ - -INSTALL_PROGRAM = @INSTALL_PROGRAM@ -INSTALL_DATA = @INSTALL_DATA@ -INSTALL_SCRIPT = @INSTALL_SCRIPT@ -INSTALL = @INSTALL@ - -INSTALL_HELPERS = $(HELPERS) server.key $(srcdir)/makekeys.sh \ - $(srcdir)/openssl.conf $(srcdir)/notvalid.pem \ - $(srcdir)/expired.pem - -.SUFFIXES: -.SUFFIXES: .lo .c - -# By default, compile but don't run the tests. -all: $(TESTS) - -clean: - rm -f $(TESTS) $(HELPERS) *.*o common/*.*o libtest.*a *.log - rm -f *.gc* *.da *.bb* common/*.bb* common/*.gc* common/*.da - rm -rf ca .libs - rm -f ca-stamp client.key *.csr ssigned.pem wrongcn.pem \ - server.cert client.cert *.p12 *.cert sparse.bin - -check: $(TESTS) $(HELPERS) - @SRCDIR=$(srcdir) $(SHELL) $(srcdir)/run.sh $(TESTS) - -grind: $(TESTS) $(HELPERS) - @SRCDIR=$(srcdir) HARNESS="$(VALGRIND)" $(SHELL) $(srcdir)/run.sh $(TESTS) - -lfs-check: largefile $(LFS_HELPERS) - @SRCDIR=$(srcdir) $(SHELL) $(srcdir)/run.sh largefile - -install: $(TESTS) $(HELPERS) - @$(INSTALL) -d $(DESTDIR)$(libdir)/neon-tests - @$(INSTALL) -d $(DESTDIR)$(libdir)/neon-tests/bin - @$(INSTALL) -d $(DESTDIR)$(libdir)/neon-tests/data - @for t in $(TESTS); do \ - $(LIBTOOL) --mode=install \ - $(INSTALL_PROGRAM) $$t $(DESTDIR)$(libdir)/neon-tests/bin; \ - done - @for h in $(INSTALL_HELPERS); do \ - $(INSTALL_DATA) $$h $(DESTDIR)$(libdir)/neon-tests/data; \ - done - @$(INSTALL_PROGRAM) $(srcdir)/run-tests.sh $(DESTDIR)$(libdir)/neon-tests - -NEWS = $(top_srcdir)/NEWS - -file1.gz: $(NEWS) - gzip -c --no-name $(NEWS) > $@ - -file2.gz: $(NEWS) - gzip -c --name $(NEWS) > $@ - -# gzip file with trailing bytes. -trailing.gz: $(NEWS) - gzip -c --no-name $(NEWS) > $@ - echo "hello, world" >> $@ - -truncated.gz: file1.gz - dd if=file1.gz of=$@ bs=2048 count=2 - -badcsum.gz: file1.gz - dd of=$@ if=file1.gz bs=1 count=`perl -e 'printf "%d", (stat("file1.gz"))[7] - 8;'` - echo 'broken!' >> $@ - -corrupt1.gz: file1.gz - dd of=$@ if=file1.gz bs=1 count=500 - cat $(NEWS) >> $@ - -corrupt2.gz: $(NEWS) - cat $(NEWS) > $@ - -empty.gz: - touch $@ - -random.txt: $(NEWS) - cat $(NEWS) > $@ - -# Dummy target to create the CA keys etc. makekeys stderr is redirected -# since it changes for every invocation; not helpful for regression -# testing. -ca-stamp: $(srcdir)/makekeys.sh $(srcdir)/openssl.conf - rm -rf ca - OPENSSL=$(OPENSSL) \ - $(SHELL) $(srcdir)/makekeys.sh $(srcdir) 2>makekeys.out - @echo timestamp > ca-stamp - -Makefile: $(srcdir)/Makefile.in - cd .. && ./config.status test/Makefile - -LIBOBJS = common/tests.lo common/child.lo utils.lo - -$(LIBTEST): $(LIBOBJS) - $(LINK) -o $(LIBTEST) $(LIBOBJS) $(LIBNEON) - -.c.lo: - $(COMPILE) -c $< -o $@ - -# Recompile socket.c with SOCKET_SSL defined -socket-ssl.lo: $(srcdir)/socket.c $(HDRS) - $(COMPILE) -DSOCKET_SSL -c $(srcdir)/socket.c -o $@ - -socket-ssl: socket-ssl.lo $(LIBTEST) - $(LINK) -o $@ socket-ssl.lo $(LIBS) - -resolve: resolve.lo $(LIBNEON) - $(LINK) -o $@ resolve.lo $(LIBNEON) - -common/tests.lo: $(srcdir)/common/tests.c $(OBJDEPS) -common/child.lo: $(srcdir)/common/child.c $(OBJDEPS) -utils.lo: $(srcdir)/utils.c $(OBJDEPS) -auth.lo: $(srcdir)/auth.c $(OBJDEPS) -uri-tests.lo: $(srcdir)/uri-tests.c $(OBJDEPS) -util-tests.lo: $(srcdir)/util-tests.c $(OBJDEPS) -string-tests.lo: $(srcdir)/string-tests.c $(OBJDEPS) -socket.lo: $(srcdir)/socket.c $(OBJDEPS) -server.lo: $(srcdir)/server.c $(OBJDEPS) -request.lo: $(srcdir)/request.c $(OBJDEPS) -regress.lo: $(srcdir)/regress.c $(OBJDEPS) -compress.lo: $(srcdir)/compress.c $(OBJDEPS) -acl.lo: $(srcdir)/acl.c $(OBJDEPS) -utils.lo: $(srcdir)/utils.c $(OBJDEPS) -stubs.lo: $(srcdir)/stubs.c $(OBJDEPS) -props.lo: $(srcdir)/props.c $(OBJDEPS) -session.lo: $(srcdir)/session.c $(OBJDEPS) -redirect.lo: $(srcdir)/redirect.c $(OBJDEPS) -basic.lo: $(srcdir)/basic.c $(OBJDEPS) -ssl.lo: $(srcdir)/ssl.c $(OBJDEPS) -lock.lo: $(srcdir)/lock.c $(OBJDEPS) -largefile.lo: $(srcdir)/largefile.c $(OBJDEPS) - -auth: auth.lo $(DEPS) - $(LINK) -o $@ auth.lo $(DEPS) -basic: basic.lo $(DEPS) - $(LINK) -o $@ basic.lo $(DEPS) -uri-tests: uri-tests.lo $(DEPS) - $(LINK) -o $@ uri-tests.lo $(DEPS) -util-tests: util-tests.lo $(DEPS) - $(LINK) -o $@ util-tests.lo $(DEPS) -string-tests: string-tests.lo $(DEPS) - $(LINK) -o $@ string-tests.lo $(DEPS) -socket: socket.lo $(DEPS) - $(LINK) -o $@ socket.lo $(DEPS) -server: server.lo $(DEPS) - $(LINK) -o $@ server.lo $(DEPS) -request: request.lo $(DEPS) - $(LINK) -o $@ request.lo $(DEPS) -regress: regress.lo $(DEPS) - $(LINK) -o $@ regress.lo $(DEPS) -compress: compress.lo $(DEPS) - $(LINK) -o $@ compress.lo $(DEPS) -acl: acl.lo $(DEPS) - $(LINK) -o $@ acl.lo $(DEPS) -utils: utils.lo $(DEPS) - $(LINK) -o $@ utils.lo $(DEPS) -stubs: stubs.lo $(DEPS) - $(LINK) -o $@ stubs.lo $(DEPS) -props: props.lo $(DEPS) - $(LINK) -o $@ props.lo $(DEPS) -session: session.lo $(DEPS) - $(LINK) -o $@ session.lo $(DEPS) -redirect: redirect.lo $(DEPS) - $(LINK) -o $@ redirect.lo $(DEPS) -ssl: ssl.lo $(DEPS) - $(LINK) -o $@ ssl.lo $(DEPS) -xml: xml.lo $(DEPS) - $(LINK) -o $@ xml.lo $(DEPS) -xmlreq: xmlreq.lo $(DEPS) - $(LINK) -o $@ xmlreq.lo $(DEPS) -lock: lock.lo $(DEPS) - $(LINK) -o $@ lock.lo $(DEPS) -largefile: largefile.lo $(DEPS) - $(LINK) -o $@ largefile.lo $(DEPS) diff --git a/client/neon-0.27.2/test/README b/client/neon-0.27.2/test/README deleted file mode 100644 index d8f652891..000000000 --- a/client/neon-0.27.2/test/README +++ /dev/null @@ -1,39 +0,0 @@ - -Stupidly Simple Test Suite for neon ------------------------------------ - -The aim of the test suite is two-fold: - - 1. ensure compliance to the relevant RFCs in network behaviour. - - 2. ensure that the promises made by the public API are met - by the current implementation. - -The file `STATUS' makes an attempt at listing RFC requirements and how -the test suite tests whether neon meets them or not (it's not finished -yet). - -The test suite is licensed under the GPL. - -Important Note About Test Failures ----------------------------------- - -Note that a test failure either means a bug in the test or a bug in -the code itself. On platforms without pipe(), there is a race -condition in the code which forks a server process: if you get random -failures on a slow or loaded box, increase the sleep time in -common/child.c:minisleep(). - -Extra Stuff ------------ - -server-tests requires that you have a running HTTP server on localhost -port 80, and you have copied htdocs/* to server-htdocs-root/test/* - -Credits -------- - -This test suite is inspired by the Subversion project, discussion on -the subversion mailing list, and seeing chromatic's talks on XP. The -presentation is inspired by the standard Perl test suite. Imitation -is the greatest form of flattery, right? diff --git a/client/neon-0.27.2/test/STATUS b/client/neon-0.27.2/test/STATUS deleted file mode 100644 index a5483effd..000000000 --- a/client/neon-0.27.2/test/STATUS +++ /dev/null @@ -1,74 +0,0 @@ - -*- text -*- - -This document attempts to list RFC requirements and determine whether -neon meets them, or where they do not apply, etc. - - Yes: test written, succeeds - No: test written, but currently fails - ???: no test written - ---: feature not supported - App: this is an application issue not a neon issue - - RFC2616 - ======= - -3.1: MUST treat major/minor as separate digits Yes -3.1: MUST ignore leading zeros Yes -3.1: MUST only send HTTP/1.1 when appropriate ??? - -3.2.2: MUST use abs_path of "/" in Request-URI App -3.2.3: comparisons of host names MUST be case-insensitive Yes - comparisons of scheme names MUST be ... Yes - comparison of empty abs_path equivalent to "/" No/--- - -3.3.1: MUST accept three date formats App/Yes [2] - MUST only generate RFC1123-style dates App - -3.3.1: MUST use GMT for http-dates ??? - MUST assume GMT when parsing asctime dates ??? - -3.4.1: MUST respect charset label provided Yes/App - -3.5*: content codings App - -3.6: MUST requirements for multiple transfer-codings --- [4] - -3.6.1: parsing of chunked transfer coding Yes - MUST be able to handle "chunked" transfer-coding Yes - MUST ignore unknown chunk-extension extensions Yes - -3.7: parsing of Content-Type headers Yes - -3.7: MUST NOT have LWS between type/subtype in C-T hdr App - SHOULD only send parameters to "new HTTP apps" (>1.0?) App - -3.7.1: MUST represent HTTP message in canonical form App - MUST accept CRLF/CR/LF as line-breaks in text/* media App - MUST NOT use only CR or LF in HTTP control structures ??? - MUST specify charset if not ISO-8859-1 App - -3.7.2: multipart types --- - -3.8: SHOULD have short product token Yes/App [5] - SHOULD use product-version for version identifier Yes/App - only product-version differs between versions Yes/App - -3.9: Content Negotiation ---/App - -3.10: Language Tags ---/App - -3.11: Entity Tags ---/App - - - - - -[2]: date parser is provided which handles all three formats, but no -handling of the Date header is present within neon. - -[3]: not sure if neon should be handling of this internally. - -[4]: neon only supports using just chunked Transfer-Coding or none. - -[5]: these reflect that applications may add their own product tokens - alongside neon's. diff --git a/client/neon-0.27.2/test/acl.c b/client/neon-0.27.2/test/acl.c deleted file mode 100644 index 2e72caa80..000000000 --- a/client/neon-0.27.2/test/acl.c +++ /dev/null @@ -1,101 +0,0 @@ -/* - Dummy ACL tests - Copyright (C) 2001-2003, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "ne_acl.h" - -#include "tests.h" -#include "child.h" -#include "utils.h" - -/**** DUMMY TESTS: just makes sure the stuff doesn't dump core. */ - -static int test_acl(const char *uri, ne_acl_entry *es, int nume) -{ - ne_session *sess; - - CALL(make_session(&sess, single_serve_string, - "HTTP/1.1 200 OK\r\n" - "Connection: close\r\n\r\n")); - - ON(ne_acl_set(sess, uri, es, nume)); - - CALL(await_server()); - ne_session_destroy(sess); - - return OK; -} - -static int grant_all(void) -{ - ne_acl_entry e = {0}; - - e.apply = ne_acl_all; - e.type = ne_acl_grant; - - CALL(test_acl("/foo", &e, 1)); - - return OK; -} - -static int deny_all(void) -{ - ne_acl_entry e = {0}; - - e.apply = ne_acl_all; - e.type = ne_acl_deny; - - CALL(test_acl("/foo", &e, 1)); - - return OK; -} - -static int deny_one(void) -{ - ne_acl_entry e = {0}; - - e.apply = ne_acl_href; - e.type = ne_acl_deny; - e.principal = "http://webdav.org/users/joe"; - - CALL(test_acl("/foo", &e, 1)); - - return OK; -} - -static int deny_byprop(void) -{ - ne_acl_entry e = {0}; - - e.apply = ne_acl_property; - e.type = ne_acl_deny; - e.principal = "owner"; - - CALL(test_acl("/foo", &e, 1)); - - return OK; -} - -ne_test tests[] = { - T(grant_all), - T(deny_all), - T(deny_one), - T(deny_byprop), - T(NULL) -}; diff --git a/client/neon-0.27.2/test/auth.c b/client/neon-0.27.2/test/auth.c deleted file mode 100644 index a0c87eea9..000000000 --- a/client/neon-0.27.2/test/auth.c +++ /dev/null @@ -1,1028 +0,0 @@ -/* - Authentication tests - Copyright (C) 2001-2007, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "ne_request.h" -#include "ne_auth.h" -#include "ne_basic.h" -#include "ne_md5.h" - -#include "tests.h" -#include "child.h" -#include "utils.h" - -static const char username[] = "Aladdin", password[] = "open sesame"; -static int auth_failed; - -#define BASIC_WALLY "Basic realm=WallyWorld" -#define CHAL_WALLY "WWW-Authenticate: " BASIC_WALLY - -#define EOL "\r\n" - -static int auth_cb(void *userdata, const char *realm, int tries, - char *un, char *pw) -{ - if (strcmp(realm, "WallyWorld")) { - NE_DEBUG(NE_DBG_HTTP, "Got wrong realm '%s'!\n", realm); - return -1; - } - strcpy(un, username); - strcpy(pw, password); - return tries; -} - -static void auth_hdr(char *value) -{ -#define B "Basic QWxhZGRpbjpvcGVuIHNlc2FtZQ==" - auth_failed = strcmp(value, B); - NE_DEBUG(NE_DBG_HTTP, "Got auth header: [%s]\nWanted header: [%s]\n" - "Result: %d\n", value, B, auth_failed); -#undef B -} - -/* Sends a response with given response-code. If hdr is not NULL, - * sends that header string too (appending an EOL). If eoc is - * non-zero, request must be last sent down a connection; otherwise, - * clength 0 is sent to maintain a persistent connection. */ -static int send_response(ne_socket *sock, const char *hdr, int code, int eoc) -{ - char buffer[BUFSIZ]; - - sprintf(buffer, "HTTP/1.1 %d Blah Blah" EOL, code); - - if (hdr) { - strcat(buffer, hdr); - strcat(buffer, EOL); - } - - if (eoc) { - strcat(buffer, "Connection: close" EOL EOL); - } else { - strcat(buffer, "Content-Length: 0" EOL EOL); - } - - return SEND_STRING(sock, buffer); -} - -/* Server function which sends two responses: first requires auth, - * second doesn't. */ -static int auth_serve(ne_socket *sock, void *userdata) -{ - char *hdr = userdata; - - auth_failed = 1; - - /* Register globals for discard_request. */ - got_header = auth_hdr; - want_header = "Authorization"; - - discard_request(sock); - send_response(sock, hdr, 401, 0); - - discard_request(sock); - send_response(sock, NULL, auth_failed?500:200, 1); - - return 0; -} - -/* Test that various Basic auth challenges are correctly handled. */ -static int basic(void) -{ - const char *hdrs[] = { - /* simplest case */ - CHAL_WALLY, - - /* several challenges, one header */ - "WWW-Authenticate: BarFooScheme, " BASIC_WALLY, - - /* several challenges, one header */ - CHAL_WALLY ", BarFooScheme realm=\"PenguinWorld\"", - - /* whitespace tests. */ - "WWW-Authenticate: Basic realm=WallyWorld ", - - /* nego test. */ - "WWW-Authenticate: Negotiate fish, Basic realm=WallyWorld", - - /* nego test. */ - "WWW-Authenticate: Negotiate fish, bar=boo, Basic realm=WallyWorld", - - /* nego test. */ - "WWW-Authenticate: Negotiate, Basic realm=WallyWorld", - - /* multi-header case 1 */ - "WWW-Authenticate: BarFooScheme\r\n" - CHAL_WALLY, - - /* multi-header cases 1 */ - CHAL_WALLY "\r\n" - "WWW-Authenticate: BarFooScheme bar=\"foo\"", - - /* multi-header case 3 */ - "WWW-Authenticate: FooBarChall foo=\"bar\"\r\n" - CHAL_WALLY "\r\n" - "WWW-Authenticate: BarFooScheme bar=\"foo\"" - }; - size_t n; - - for (n = 0; n < sizeof(hdrs)/sizeof(hdrs[0]); n++) { - ne_session *sess; - - CALL(make_session(&sess, auth_serve, (void *)hdrs[n])); - ne_set_server_auth(sess, auth_cb, NULL); - - CALL(any_2xx_request(sess, "/norman")); - - ne_session_destroy(sess); - CALL(await_server()); - } - - return OK; -} - -static int retry_serve(ne_socket *sock, void *ud) -{ - discard_request(sock); - send_response(sock, CHAL_WALLY, 401, 0); - - discard_request(sock); - send_response(sock, CHAL_WALLY, 401, 0); - - discard_request(sock); - send_response(sock, NULL, 200, 0); - - discard_request(sock); - send_response(sock, CHAL_WALLY, 401, 0); - - discard_request(sock); - send_response(sock, NULL, 200, 0); - - discard_request(sock); - send_response(sock, NULL, 200, 0); - - discard_request(sock); - send_response(sock, NULL, 200, 0); - - discard_request(sock); - send_response(sock, CHAL_WALLY, 401, 0); - - discard_request(sock); - send_response(sock, NULL, 200, 0); - - discard_request(sock); - send_response(sock, CHAL_WALLY, 401, 0); - - discard_request(sock); - send_response(sock, CHAL_WALLY, 401, 0); - - discard_request(sock); - send_response(sock, CHAL_WALLY, 401, 0); - - discard_request(sock); - send_response(sock, NULL, 200, 0); - - return OK; -} - -static int retry_cb(void *userdata, const char *realm, int tries, - char *un, char *pw) -{ - int *count = userdata; - - /* dummy creds; server ignores them anyway. */ - strcpy(un, "a"); - strcpy(pw, "b"); - - switch (*count) { - case 0: - case 1: - if (tries == *count) { - *count += 1; - return 0; - } else { - t_context("On request #%d, got attempt #%d", *count, tries); - *count = -1; - return 1; - } - break; - case 2: - case 3: - /* server fails a subsequent request, check that tries has - * reset to zero. */ - if (tries == 0) { - *count += 1; - return 0; - } else { - t_context("On retry after failure #%d, tries was %d", - *count, tries); - *count = -1; - return 1; - } - break; - case 4: - case 5: - if (tries > 1) { - t_context("Attempt counter reached #%d", tries); - *count = -1; - return 1; - } - return tries; - default: - t_context("Count reached %d!?", *count); - *count = -1; - } - return 1; -} - -/* Test that auth retries are working correctly. */ -static int retries(void) -{ - ne_session *sess; - int count = 0; - - CALL(make_session(&sess, retry_serve, NULL)); - - ne_set_server_auth(sess, retry_cb, &count); - - /* This request will be 401'ed twice, then succeed. */ - ONREQ(any_request(sess, "/foo")); - - /* auth_cb will have set up context. */ - CALL(count != 2); - - /* this request will be 401'ed once, then succeed. */ - ONREQ(any_request(sess, "/foo")); - - /* auth_cb will have set up context. */ - CALL(count != 3); - - /* some 20x requests. */ - ONREQ(any_request(sess, "/foo")); - ONREQ(any_request(sess, "/foo")); - - /* this request will be 401'ed once, then succeed. */ - ONREQ(any_request(sess, "/foo")); - - /* auth_cb will have set up context. */ - CALL(count != 4); - - /* First request is 401'ed by the server at both attempts. */ - ONV(any_request(sess, "/foo") != NE_AUTH, - ("auth succeeded, should have failed: %s", ne_get_error(sess))); - - count++; - - /* Second request is 401'ed first time, then will succeed if - * retried. 0.18.0 didn't reset the attempt counter though so - * this didn't work. */ - ONV(any_request(sess, "/foo") == NE_AUTH, - ("auth failed on second try, should have succeeded: %s", ne_get_error(sess))); - - ne_session_destroy(sess); - - CALL(await_server()); - - return OK; -} - -/* crashes with neon <0.22 */ -static int forget_regress(void) -{ - ne_session *sess = ne_session_create("http", "localhost", 7777); - ne_forget_auth(sess); - ne_session_destroy(sess); - return OK; -} - -static int fail_auth_cb(void *ud, const char *realm, int attempt, - char *un, char *pw) -{ - return 1; -} - -/* this may trigger a segfault in neon 0.21.x and earlier. */ -static int tunnel_regress(void) -{ - ne_session *sess = ne_session_create("https", "localhost", 443); - ne_session_proxy(sess, "localhost", 7777); - ne_set_server_auth(sess, fail_auth_cb, NULL); - CALL(spawn_server(7777, single_serve_string, - "HTTP/1.1 401 Auth failed.\r\n" - "WWW-Authenticate: Basic realm=asda\r\n" - "Content-Length: 0\r\n\r\n")); - any_request(sess, "/foo"); - ne_session_destroy(sess); - CALL(await_server()); - return OK; -} - -/* regression test for parsing a Negotiate challenge with on parameter - * token. */ -static int negotiate_regress(void) -{ - ne_session *sess = ne_session_create("http", "localhost", 7777); - ne_set_server_auth(sess, fail_auth_cb, NULL); - CALL(spawn_server(7777, single_serve_string, - "HTTP/1.1 401 Auth failed.\r\n" - "WWW-Authenticate: Negotiate\r\n" - "Content-Length: 0\r\n\r\n")); - any_request(sess, "/foo"); - ne_session_destroy(sess); - CALL(await_server()); - return OK; -} - -static char *digest_hdr = NULL; - -static void dup_header(char *header) -{ - if (digest_hdr) ne_free(digest_hdr); - digest_hdr = ne_strdup(header); -} - -struct digest_parms { - const char *realm, *nonce, *opaque; - int rfc2617; - int send_ainfo; - int md5_sess; - int proxy; - int send_nextnonce; - int num_requests; - int stale; - enum digest_failure { - fail_not, - fail_bogus_alg, - fail_req0_stale, - fail_omit_qop, - fail_omit_realm, - fail_omit_nonce, - fail_ai_bad_nc, - fail_ai_bad_nc_syntax, - fail_ai_bad_digest, - fail_ai_bad_cnonce, - fail_ai_omit_cnonce, - fail_ai_omit_digest, - fail_ai_omit_nc - } failure; -}; - -struct digest_state { - const char *realm, *nonce, *uri, *username, *password, *algorithm, *qop, - *method, *opaque; - char *cnonce, *digest, *ncval; - long nc; -}; - -/* Write the request-digest into 'digest' (or response-digest if - * auth_info is non-zero) for given digest auth state and - * parameters. */ -static void make_digest(struct digest_state *state, struct digest_parms *parms, - int auth_info, char digest[33]) -{ - struct ne_md5_ctx *ctx; - char h_a1[33], h_a2[33]; - - /* H(A1) */ - ctx = ne_md5_create_ctx(); - ne_md5_process_bytes(state->username, strlen(state->username), ctx); - ne_md5_process_bytes(":", 1, ctx); - ne_md5_process_bytes(state->realm, strlen(state->realm), ctx); - ne_md5_process_bytes(":", 1, ctx); - ne_md5_process_bytes(state->password, strlen(state->password), ctx); - ne_md5_finish_ascii(ctx, h_a1); - - if (parms->md5_sess) { - ne_md5_reset_ctx(ctx); - ne_md5_process_bytes(h_a1, 32, ctx); - ne_md5_process_bytes(":", 1, ctx); - ne_md5_process_bytes(state->nonce, strlen(state->nonce), ctx); - ne_md5_process_bytes(":", 1, ctx); - ne_md5_process_bytes(state->cnonce, strlen(state->cnonce), ctx); - ne_md5_finish_ascii(ctx, h_a1); - } - - /* H(A2) */ - ne_md5_reset_ctx(ctx); - if (!auth_info) - ne_md5_process_bytes(state->method, strlen(state->method), ctx); - ne_md5_process_bytes(":", 1, ctx); - ne_md5_process_bytes(state->uri, strlen(state->uri), ctx); - ne_md5_finish_ascii(ctx, h_a2); - - /* request-digest */ - ne_md5_reset_ctx(ctx); - ne_md5_process_bytes(h_a1, strlen(h_a1), ctx); - ne_md5_process_bytes(":", 1, ctx); - ne_md5_process_bytes(state->nonce, strlen(state->nonce), ctx); - ne_md5_process_bytes(":", 1, ctx); - - if (parms->rfc2617) { - ne_md5_process_bytes(state->ncval, strlen(state->ncval), ctx); - ne_md5_process_bytes(":", 1, ctx); - ne_md5_process_bytes(state->cnonce, strlen(state->cnonce), ctx); - ne_md5_process_bytes(":", 1, ctx); - ne_md5_process_bytes(state->qop, strlen(state->qop), ctx); - ne_md5_process_bytes(":", 1, ctx); - } - - ne_md5_process_bytes(h_a2, strlen(h_a2), ctx); - ne_md5_finish_ascii(ctx, digest); - ne_md5_destroy_ctx(ctx); -} - -/* Verify that the response-digest matches expected state. */ -static int check_digest(struct digest_state *state, struct digest_parms *parms) -{ - char digest[33]; - - make_digest(state, parms, 0, digest); - - NE_DEBUG(NE_DBG_HTTP, "Got digest: %s, expected: %s\n", - state->digest, digest); - - ONCMP(digest, state->digest, "Digest response", "request-digest"); - - return OK; -} - -#define DIGCMP(field) \ - do { \ - ONCMP(state->field, newstate.field, \ - "Digest response header", #field); \ - } while (0) - -#define PARAM(field) \ - do { \ - if (ne_strcasecmp(name, #field) == 0) { \ - ONV(newstate.field != NULL, \ - ("received multiple %s params: %s, %s", #field, \ - newstate.field, val)); \ - newstate.field = val; \ - } \ - } while (0) - -/* Verify that Digest auth request header, 'header', meets expected - * state and parameters. */ -static int verify_digest_header(struct digest_state *state, - struct digest_parms *parms, - char *header) -{ - char *ptr; - struct digest_state newstate = {0}; - - ptr = ne_token(&header, ' '); - - ONCMP("Digest", ptr, "Digest response", "scheme name"); - - while (header) { - char *name, *val; - - ptr = ne_qtoken(&header, ',', "\"\'"); - ONN("quoting broken", ptr == NULL); - - name = ne_shave(ptr, " "); - - val = strchr(name, '='); - ONV(val == NULL, ("bad name/value pair: %s", val)); - - *val++ = '\0'; - - val = ne_shave(val, "\"\' "); - - NE_DEBUG(NE_DBG_HTTP, "got field: [%s] = [%s]\n", name, val); - - PARAM(uri); - PARAM(realm); - PARAM(username); - PARAM(nonce); - PARAM(algorithm); - PARAM(qop); - PARAM(opaque); - PARAM(cnonce); - - if (ne_strcasecmp(name, "nc") == 0) { - long nc = strtol(val, NULL, 16); - - ONV(nc != state->nc, - ("got bad nonce count: %ld (%s) not %ld", - nc, val, state->nc)); - - state->ncval = ne_strdup(val); - } - else if (ne_strcasecmp(name, "response") == 0) { - state->digest = ne_strdup(val); - } - } - - ONN("cnonce param missing for 2617-style auth", - parms->rfc2617 && !newstate.cnonce); - - DIGCMP(realm); - DIGCMP(username); - DIGCMP(uri); - DIGCMP(nonce); - DIGCMP(opaque); - DIGCMP(algorithm); - - if (parms->rfc2617) { - DIGCMP(qop); - } - - if (newstate.cnonce) { - state->cnonce = ne_strdup(newstate.cnonce); - } - - ONN("no digest param given", !state->digest); - - CALL(check_digest(state, parms)); - - state->nc++; - - return OK; -} - -static char *make_authinfo_header(struct digest_state *state, - struct digest_parms *parms) -{ - ne_buffer *buf = ne_buffer_create(); - char digest[33], *ncval, *cnonce; - - if (parms->failure == fail_ai_bad_digest) { - strcpy(digest, "fish"); - } else { - make_digest(state, parms, 1, digest); - } - - if (parms->failure == fail_ai_bad_nc_syntax) { - ncval = "zztop"; - } else if (parms->failure == fail_ai_bad_nc) { - ncval = "999"; - } else { - ncval = state->ncval; - } - - if (parms->failure == fail_ai_bad_cnonce) { - cnonce = "another-fish"; - } else { - cnonce = state->cnonce; - } - - if (parms->proxy) { - ne_buffer_czappend(buf, "Proxy-"); - } - - ne_buffer_czappend(buf, "Authentication-Info: "); - - if (!parms->rfc2617) { - ne_buffer_concat(buf, "rspauth=\"", digest, "\"", NULL); - } else { - if (parms->failure != fail_ai_omit_nc) { - ne_buffer_concat(buf, "nc=", ncval, ", ", NULL); - } - if (parms->failure != fail_ai_omit_cnonce) { - ne_buffer_concat(buf, "cnonce=\"", cnonce, "\", ", NULL); - } - if (parms->failure != fail_ai_omit_digest) { - ne_buffer_concat(buf, "rspauth=\"", digest, "\", ", NULL); - } - if (parms->send_nextnonce) { - state->nonce = ne_concat("next-", state->nonce, NULL); - ne_buffer_concat(buf, "nextnonce=\"", state->nonce, "\", ", NULL); - state->nc = 1; - } - ne_buffer_czappend(buf, "qop=\"auth\""); - } - - return ne_buffer_finish(buf); -} - -static char *make_digest_header(struct digest_state *state, - struct digest_parms *parms) -{ - ne_buffer *buf = ne_buffer_create(); - const char *algorithm; - - algorithm = parms->failure == fail_bogus_alg ? "fish" - : state->algorithm; - - ne_buffer_concat(buf, - parms->proxy ? "Proxy-Authenticate" - : "WWW-Authenticate", - ": Digest " - "realm=\"", parms->realm, "\", ", NULL); - - if (parms->rfc2617) { - ne_buffer_concat(buf, "algorithm=\"", algorithm, "\", ", - "qop=\"", state->qop, "\", ", NULL); - } - - if (parms->opaque) { - ne_buffer_concat(buf, "opaque=\"", parms->opaque, "\", ", NULL); - } - - if (parms->failure == fail_req0_stale - || parms->stale == parms->num_requests) { - ne_buffer_concat(buf, "stale='true', ", NULL); - } - - ne_buffer_concat(buf, "nonce=\"", state->nonce, "\"", NULL); - - return ne_buffer_finish(buf); -} - -/* Server process for Digest auth handling. */ -static int serve_digest(ne_socket *sock, void *userdata) -{ - struct digest_parms *parms = userdata; - struct digest_state state; - char resp[NE_BUFSIZ]; - - state.uri = parms->proxy ? "http://www.example.com/fish" : "/fish"; - state.method = "GET"; - state.realm = parms->realm; - state.nonce = parms->nonce; - state.opaque = parms->opaque; - state.username = username; - state.password = password; - state.nc = 1; - state.algorithm = parms->md5_sess ? "MD5-sess" : "MD5"; - state.qop = "auth"; - - state.cnonce = state.digest = state.ncval = NULL; - - parms->num_requests += parms->stale ? 1 : 0; - - NE_DEBUG(NE_DBG_HTTP, ">>>> Response sequence begins, %d requests.\n", - parms->num_requests); - - want_header = parms->proxy ? "Proxy-Authorization" : "Authorization"; - digest_hdr = NULL; - got_header = dup_header; - - CALL(discard_request(sock)); - - ONV(digest_hdr != NULL, - ("got unwarranted WWW-Auth header: %s", digest_hdr)); - - ne_snprintf(resp, sizeof resp, - "HTTP/1.1 %d Auth Denied\r\n" - "%s\r\n" - "Content-Length: 0\r\n" "\r\n", - parms->proxy ? 407 : 401, - make_digest_header(&state, parms)); - - SEND_STRING(sock, resp); - - do { - CALL(discard_request(sock)); - - ONN("no Authorization header sent", digest_hdr == NULL); - - CALL(verify_digest_header(&state, parms, digest_hdr)); - - if (parms->num_requests == parms->stale) { - state.nonce = ne_concat("stale-", state.nonce, NULL); - state.nc = 1; - - ne_snprintf(resp, sizeof resp, - "HTTP/1.1 %d Auth Denied\r\n" - "%s\r\n" - "Content-Length: 0\r\n" "\r\n", - parms->proxy ? 407 : 401, - make_digest_header(&state, parms)); - } - else if (parms->send_ainfo) { - char *ai = make_authinfo_header(&state, parms); - - ne_snprintf(resp, sizeof resp, - "HTTP/1.1 200 Well, if you insist\r\n" - "Content-Length: 0\r\n" - "%s\r\n" - "\r\n", ai); - - ne_free(ai); - } else { - ne_snprintf(resp, sizeof resp, - "HTTP/1.1 200 You did good\r\n" - "Content-Length: 0\r\n" "\r\n"); - } - - SEND_STRING(sock, resp); - - NE_DEBUG(NE_DBG_HTTP, "Handled request; %d requests remain.\n", - parms->num_requests - 1); - } while (--parms->num_requests); - - return OK; -} - -static int test_digest(struct digest_parms *parms) -{ - ne_session *sess; - - NE_DEBUG(NE_DBG_HTTP, ">>>> Request sequence begins.\n"); - - if (parms->proxy) { - sess = ne_session_create("http", "www.example.com", 80); - ne_session_proxy(sess, "localhost", 7777); - ne_set_proxy_auth(sess, auth_cb, NULL); - } - else { - sess = ne_session_create("http", "localhost", 7777); - ne_set_server_auth(sess, auth_cb, NULL); - } - - CALL(spawn_server(7777, serve_digest, parms)); - - do { - CALL(any_2xx_request(sess, "/fish")); - } while (--parms->num_requests); - - ne_session_destroy(sess); - return await_server(); -} - -/* Test for RFC2617-style Digest auth. */ -static int digest(void) -{ - struct digest_parms parms[] = { - /* RFC 2617-style */ - { "WallyWorld", "this-is-a-nonce", NULL, 1, 0, 0, 0, 0, 1, 0, fail_not }, - { "WallyWorld", "this-is-also-a-nonce", "opaque-string", 1, 0, 0, 0, 0, 1, 0, fail_not }, - /* ... with A-I */ - { "WallyWorld", "nonce-nonce-nonce", "opaque-string", 1, 1, 0, 0, 0, 1, 0, fail_not }, - /* ... with md5-sess. */ - { "WallyWorld", "nonce-nonce-nonce", "opaque-string", 1, 1, 1, 0, 0, 1, 0, fail_not }, - /* many requests, with changing nonces; tests for next-nonce handling bug. */ - { "WallyWorld", "this-is-a-nonce", "opaque-thingy", 1, 1, 0, 0, 1, 20, 0, fail_not }, - /* staleness. */ - { "WallyWorld", "this-is-a-nonce", "opaque-thingy", 1, 1, 0, 0, 0, 3, 2, fail_not }, - - - /* RFC 2069-style */ - { "WallyWorld", "lah-di-da-di-dah", NULL, 0, 0, 0, 0, 0, 1, 0, fail_not }, - { "WallyWorld", "fee-fi-fo-fum", "opaque-string", 0, 0, 0, 0, 0, 1, 0, fail_not }, - { "WallyWorld", "fee-fi-fo-fum", "opaque-string", 0, 1, 0, 0, 0, 1, 0, fail_not }, - - /* Proxy auth */ - { "WallyWorld", "this-is-also-a-nonce", "opaque-string", 1, 1, 0, 0, 0, 1, 0, fail_not }, - /* Proxy + A-I */ - { "WallyWorld", "this-is-also-a-nonce", "opaque-string", 1, 1, 0, 1, 0, 1, 0, fail_not }, - - { NULL } - }; - size_t n; - - for (n = 0; parms[n].realm; n++) { - CALL(test_digest(&parms[n])); - - } - - return OK; -} - -static int digest_failures(void) -{ - struct digest_parms parms; - static const struct { - enum digest_failure mode; - const char *message; - } fails[] = { - { fail_ai_bad_nc, "nonce count mismatch" }, - { fail_ai_bad_nc_syntax, "could not parse nonce count" }, - { fail_ai_bad_digest, "digest mismatch" }, - { fail_ai_bad_cnonce, "client nonce mismatch" }, - { fail_ai_omit_nc, "missing parameters" }, - { fail_ai_omit_digest, "missing parameters" }, - { fail_ai_omit_cnonce, "missing parameters" }, - { fail_bogus_alg, "unknown algorithm" }, - { fail_req0_stale, "initial Digest challenge was stale" }, - { fail_not, NULL } - }; - size_t n; - - parms.realm = "WallyWorld"; - parms.nonce = "random-invented-string"; - parms.opaque = NULL; - parms.rfc2617 = 1; - parms.send_ainfo = 1; - parms.md5_sess = 0; - parms.proxy = 0; - parms.send_nextnonce = 0; - parms.num_requests = 1; - parms.stale = 0; - - for (n = 0; fails[n].message; n++) { - ne_session *sess = ne_session_create("http", "localhost", 7777); - int ret; - - parms.failure = fails[n].mode; - - ne_set_server_auth(sess, auth_cb, NULL); - CALL(spawn_server(7777, serve_digest, &parms)); - - ret = any_2xx_request(sess, "/fish"); - ONV(ret == NE_OK, - ("request success; expecting error '%s'", - fails[n].message)); - - ONV(strstr(ne_get_error(sess), fails[n].message) == NULL, - ("request fails with error '%s'; expecting '%s'", - ne_get_error(sess), fails[n].message)); - - ne_session_destroy(sess); - - if (fails[n].mode == fail_bogus_alg - || fails[n].mode == fail_req0_stale) { - reap_server(); - } else { - CALL(await_server()); - } - } - - return OK; -} - -static int fail_cb(void *userdata, const char *realm, int tries, - char *un, char *pw) -{ - ne_buffer *buf = userdata; - char str[64]; - - ne_snprintf(str, sizeof str, "<%s, %d>", realm, tries); - ne_buffer_zappend(buf, str); - - return -1; -} - -static int fail_challenge(void) -{ - static const struct { - const char *resp, *error, *challs; - } ts[] = { - /* only possible Basic parse failure. */ - { "Basic", "missing realm in Basic challenge" }, - - /* Digest parameter invalid/omitted failure cases: */ - { "Digest algorithm=MD5, qop=auth, nonce=\"foo\"", - "missing parameter in Digest challenge" }, - { "Digest algorithm=MD5, qop=auth, realm=\"foo\"", - "missing parameter in Digest challenge" }, - { "Digest algorithm=ZEBEDEE-GOES-BOING, qop=auth, realm=\"foo\"", - "unknown algorithm in Digest challenge" }, - { "Digest algorithm=MD5-sess, realm=\"foo\"", - "incompatible algorithm in Digest challenge" }, - - /* Multiple challenge failure cases: */ - { "Basic, Digest", - "missing parameter in Digest challenge, missing realm in Basic challenge" }, - - { "Digest realm=\"foo\", algorithm=MD5, qop=auth, nonce=\"foo\"," - " Basic realm=\"foo\"", - "rejected Digest challenge, rejected Basic challenge" }, - - { "WhizzBangAuth realm=\"foo\", " - "Basic realm='foo'", - "ignored WhizzBangAuth challenge, rejected Basic challenge" }, - { "", "could not parse challenge" }, - - /* neon 0.26.x regression in "attempt" handling. */ - { "Basic realm=\"foo\", " - "Digest realm=\"bar\", algorithm=MD5, qop=auth, nonce=\"foo\"", - "rejected Digest challenge, rejected Basic challenge" - , "" /* Digest challenge first, Basic second. */ - } - }; - unsigned n; - - for (n = 0; n < sizeof(ts)/sizeof(ts[0]); n++) { - char resp[512]; - ne_session *sess; - int ret; - ne_buffer *buf = ne_buffer_create(); - - ne_snprintf(resp, sizeof resp, - "HTTP/1.1 401 Auth Denied\r\n" - "WWW-Authenticate: %s\r\n" - "Content-Length: 0\r\n" "\r\n", - ts[n].resp); - - CALL(make_session(&sess, single_serve_string, resp)); - - ne_set_server_auth(sess, fail_cb, buf); - - ret = any_2xx_request(sess, "/fish"); - ONV(ret == NE_OK, - ("request success; expecting error '%s'", - ts[n].error)); - - ONV(strstr(ne_get_error(sess), ts[n].error) == NULL, - ("request fails with error '%s'; expecting '%s'", - ne_get_error(sess), ts[n].error)); - - if (ts[n].challs) { - ONCMP(ts[n].challs, buf->data, "challenge callback", - "invocation order"); - } - - ne_session_destroy(sess); - ne_buffer_destroy(buf); - CALL(await_server()); - } - - return OK; -} - -struct multi_context { - int id; - ne_buffer *buf; -}; - -static int multi_cb(void *userdata, const char *realm, int tries, - char *un, char *pw) -{ - struct multi_context *ctx = userdata; - - ne_buffer_snprintf(ctx->buf, 128, "[id=%d, realm=%s, tries=%d]", - ctx->id, realm, tries); - - return -1; -} - -static int multi_handler(void) -{ - ne_session *sess; - struct multi_context c[2]; - unsigned n; - ne_buffer *buf = ne_buffer_create(); - - CALL(make_session(&sess, single_serve_string, - "HTTP/1.1 401 Auth Denied\r\n" - "WWW-Authenticate: Basic realm='fish'," - " Digest realm='food', algorithm=MD5, qop=auth, nonce=gaga\r\n" - "Content-Length: 0\r\n" "\r\n")); - - for (n = 0; n < 2; n++) { - c[n].buf = buf; - c[n].id = n + 1; - } - - ne_add_server_auth(sess, NE_AUTH_BASIC, multi_cb, &c[0]); - ne_add_server_auth(sess, NE_AUTH_DIGEST, multi_cb, &c[1]); - - any_request(sess, "/fish"); - - ONCMP("[id=2, realm=food, tries=0]" - "[id=1, realm=fish, tries=0]", buf->data, - "multiple callback", "invocation order"); - - ne_session_destroy(sess); - ne_buffer_destroy(buf); - - return await_server(); -} - -/* test logout */ - -/* proxy auth, proxy AND origin */ - -ne_test tests[] = { - T(lookup_localhost), - T(basic), - T(retries), - T(forget_regress), - T(tunnel_regress), - T(negotiate_regress), - T(digest), - T(digest_failures), - T(fail_challenge), - T(multi_handler), - T(NULL) -}; diff --git a/client/neon-0.27.2/test/basic.c b/client/neon-0.27.2/test/basic.c deleted file mode 100644 index 3b5fae1f4..000000000 --- a/client/neon-0.27.2/test/basic.c +++ /dev/null @@ -1,278 +0,0 @@ -/* - Tests for high-level HTTP interface (ne_basic.h) - Copyright (C) 2002-2006, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include - -#include "ne_basic.h" - -#include "tests.h" -#include "child.h" -#include "utils.h" - -static int content_type(void) -{ - int n; - static const struct { - const char *value, *type, *subtype, *charset; - } ctypes[] = { - { "foo/bar", "foo", "bar", NULL }, - { "foo/bar ", "foo", "bar", NULL }, - { "application/xml", "application", "xml", NULL }, - /* text/ subtypes default to charset ISO-8859-1, per 2616. */ - { "text/lemon", "text", "lemon", "ISO-8859-1" }, - /* text/xml defaults to charset us-ascii, per 3280 */ - { "text/xml", "text", "xml", "us-ascii" }, -#undef TXU -#define TXU "text", "xml", "utf-8" - /* 2616 doesn't *say* that charset can be quoted, but bets are - * that some servers do it anyway. */ - { "text/xml; charset=utf-8", TXU }, - { "text/xml; charset=utf-8; foo=bar", TXU }, - { "text/xml;charset=utf-8", TXU }, - { "text/xml ;charset=utf-8", TXU }, - { "text/xml;charset=utf-8;foo=bar", TXU }, - { "text/xml; foo=bar; charset=utf-8", TXU }, - { "text/xml; foo=bar; charset=utf-8; bar=foo", TXU }, - { "text/xml; charset=\"utf-8\"", TXU }, - { "text/xml; charset='utf-8'", TXU }, - { "text/xml; foo=bar; charset=\"utf-8\"; bar=foo", TXU }, -#undef TXU - /* badly quoted charset should come out as NULL */ - { "foo/lemon; charset=\"utf-8", "foo", "lemon", NULL }, - { NULL } - }; - - for (n = 0; ctypes[n].value != NULL; n++) { - ne_content_type ct; - ne_session *sess; - ne_request *req; - char resp[200]; - int rv; - - ct.type = ct.subtype = ct.charset = ct.value = "unset"; - - ne_snprintf(resp, sizeof resp, - "HTTP/1.0 200 OK\r\n" "Content-Length: 0\r\n" - "Content-Type: %s\r\n" "\r\n", ctypes[n].value); - - CALL(make_session(&sess, single_serve_string, resp)); - - req = ne_request_create(sess, "GET", "/anyfoo"); - ONREQ(ne_request_dispatch(req)); - rv = ne_get_content_type(req, &ct); - - ONV(rv == 0 && !ctypes[n].type, - ("expected c-t parse failure for %s", ctypes[n].value)); - - ONV(rv != 0 && ctypes[n].type, - ("c-t parse failure %d for %s", rv, ctypes[n].value)); - - ne_request_destroy(req); - ne_session_destroy(sess); - CALL(await_server()); - - if (rv) continue; - - ONV(strcmp(ct.type, ctypes[n].type), - ("for `%s': type was `%s'", ctypes[n].value, ct.type)); - - ONV(strcmp(ct.subtype, ctypes[n].subtype), - ("for `%s': subtype was `%s'", ctypes[n].value, ct.subtype)); - - ONV(ctypes[n].charset && ct.charset == NULL, - ("for `%s': charset unset", ctypes[n].value)); - - ONV(ctypes[n].charset == NULL && ct.charset != NULL, - ("for `%s': unexpected charset `%s'", ctypes[n].value, - ct.charset)); - - ONV(ctypes[n].charset && ct.charset && - strcmp(ctypes[n].charset, ct.charset), - ("for `%s': charset was `%s'", ctypes[n].value, ct.charset)); - - ne_free(ct.value); - } - - return OK; -} - -/* Do ranged GET for range 'start' to 'end'; with 'resp' as response. - * If 'fail' is non-NULL, expect ne_get_range to fail, and fail the - * test with given message if it doesn't. */ -static int do_range(off_t start, off_t end, const char *fail, - char *resp) -{ - ne_session *sess; - ne_content_range range = {0}; - int fd, ret; - - CALL(make_session(&sess, single_serve_string, resp)); - - range.start = start; - range.end = end; - - fd = open("/dev/null", O_WRONLY); - - ret = ne_get_range(sess, "/foo", &range, fd); - - close(fd); - CALL(await_server()); - - if (fail) { -#if 0 - t_warning("error was %s", ne_get_error(sess)); -#endif - ONV(ret == NE_OK, ("%s", fail)); - } else { - ONREQ(ret); - } - - ne_session_destroy(sess); - return OK; -} - -static int get_range(void) -{ - return do_range(1, 10, NULL, - "HTTP/1.1 206 Widgets\r\n" "Connection: close\r\n" - "Content-Range: bytes 1-10/10\r\n" - "Content-Length: 10\r\n\r\nabcdefghij"); -} - -static int fail_range_length(void) -{ - return do_range(1, 10, "range response length mismatch should fail", - "HTTP/1.1 206 Widgets\r\n" "Connection: close\r\n" - "Content-Range: bytes 1-2/2\r\n" - "Content-Length: 2\r\n\r\nab"); -} - -static int fail_range_units(void) -{ - return do_range(1, 2, "range response units check should fail", - "HTTP/1.1 206 Widgets\r\n" "Connection: close\r\n" - "Content-Range: fish 1-2/2\r\n" - "Content-Length: 2\r\n\r\nab"); -} - -static int fail_range_notrange(void) -{ - return do_range(1, 2, "non-ranged response should fail", - "HTTP/1.1 200 Widgets\r\n" "Connection: close\r\n" - "Content-Range: bytes 1-2/2\r\n" - "Content-Length: 2\r\n\r\nab"); -} - -static int fail_range_unsatify(void) -{ - return do_range(1, 2, "unsatisfiable range should fail", - "HTTP/1.1 416 No Go\r\n" "Connection: close\r\n" - "Content-Length: 2\r\n\r\nab"); -} - -static int dav_capabilities(void) -{ - static const struct { - const char *hdrs; - unsigned int class1, class2, exec; - } caps[] = { - { "DAV: 1,2\r\n", 1, 1, 0 }, - { "DAV: 1 2\r\n", 0, 0, 0 }, - /* these aren't strictly legal DAV: headers: */ - { "DAV: 2,1\r\n", 1, 1, 0 }, - { "DAV: 1, 2 \r\n", 1, 1, 0 }, - { "DAV: 1\r\nDAV:2\r\n", 1, 1, 0 }, - { NULL, 0, 0, 0 } - }; - char resp[BUFSIZ]; - int n; - - for (n = 0; caps[n].hdrs != NULL; n++) { - ne_server_capabilities c = {0}; - ne_session *sess; - - ne_snprintf(resp, BUFSIZ, "HTTP/1.0 200 OK\r\n" - "Connection: close\r\n" - "%s" "\r\n", caps[n].hdrs); - - CALL(make_session(&sess, single_serve_string, resp)); - - ONREQ(ne_options(sess, "/foo", &c)); - - ONV(c.dav_class1 != caps[n].class1, - ("class1 was %d not %d", c.dav_class1, caps[n].class1)); - ONV(c.dav_class2 != caps[n].class2, - ("class2 was %d not %d", c.dav_class2, caps[n].class2)); - ONV(c.dav_executable != caps[n].exec, - ("class2 was %d not %d", c.dav_executable, caps[n].exec)); - - CALL(await_server()); - - ne_session_destroy(sess); - } - - return OK; -} - -static int get(void) -{ - ne_session *sess; - int fd; - - CALL(make_session(&sess, single_serve_string, - "HTTP/1.0 200 OK\r\n" - "Content-Length: 5\r\n" - "\r\n" - "abcde")); - - fd = open("/dev/null", O_WRONLY); - ONREQ(ne_get(sess, "/getit", fd)); - close(fd); - - ne_session_destroy(sess); - CALL(await_server()); - - return OK; -} - -ne_test tests[] = { - T(lookup_localhost), - T(content_type), - T(get_range), - T(fail_range_length), - T(fail_range_units), - T(fail_range_notrange), - T(fail_range_unsatify), - T(dav_capabilities), - T(get), - T(NULL) -}; - diff --git a/client/neon-0.27.2/test/common/ChangeLog b/client/neon-0.27.2/test/common/ChangeLog deleted file mode 100644 index f17d47dba..000000000 --- a/client/neon-0.27.2/test/common/ChangeLog +++ /dev/null @@ -1,245 +0,0 @@ -Wed Aug 25 19:27:26 2004 Joe Orton - - * child.c (reset_socket): New function. - -Mon Jul 5 18:38:08 2004 Joe Orton - - * tests.c (main): Print 'xfail' for expected failures. - -Tue Oct 7 21:19:56 2003 Joe Orton - - * child.c (close_socket): New function. - (server_child, spawn_server_repeat): Use it. - -Fri Jul 25 12:13:59 2003 Joe Orton - - Add support for test type which is expected to fail - memory leak checks. - - * tests.h (T_XLEAKY, T_EXPECT_LEAKS): New defines. - - * test.c (main) [NEON_MEMLEAK]: If T_EXPECT_LEAKS is set, fail if - the test did not leak memory. - -Wed Jun 18 20:10:45 2003 Joe Orton - - * child.c (server_child, spawn_server_repeat): Adapt for new - socket API. - -Sun Mar 9 17:52:11 2003 Joe Orton - - * test.h (T_EXPECT_FAIL): New constant. - (T_XFAIL): New test function wrapper. - - * tests.c (main): Handle expected failures. - -Sat Mar 1 21:04:35 2003 Joe Orton - - Extend the ne_test structure with a 'flags' field which can - optionally request leak checking at run-time. - - * tests.h (ne_test): Add 'flags' field. - (T_CHECK_LEAKS): New flag. - (T): Use T_CHECK_LEAKS flag by default. - (T_LEAKY): Like T, but with no flags set. - - * tests.c (main) [NEON_MEMLEAK]: If leak checking is requested, - if a test passes, but leaks memory, fail the test. - -Wed Feb 26 21:52:15 2003 Joe Orton - - * tests.c (main): Test the "disable debugging" mode of - ne_debug_init, NE_DBG_FLUSH, and a ne_debug() with no output. - -Fri Aug 23 22:54:35 2002 Joe Orton - - * tests.c (main): Call ne_sock_init after ne_debug_init, so that - debugging messages are caught from ne_sock_init. Print a warning - message if ne_sock_init fails. - -Wed Aug 21 13:29:20 2002 Joe Orton - - * tests.h (ONCMP): New macro. - -Mon Aug 19 16:53:20 2002 Joe Orton - - * child.c (lookup_localhost): Just use inet_addr to resolve - 127.0.0.1. - -Sun Aug 18 13:50:30 2002 Joe Orton - - * tests.c (TEST_DEBUG): Add NE_DBG_SSL. - -Sat Aug 10 10:19:18 2002 Joe Orton - - * child.c (server_send): Fix declaration. - (discard_body): Use NE_FMT_SSIZE_T for print ssize_t's. - -Sat Jul 6 08:42:37 2002 Joe Orton - - * child.c (discard_body): New function. - -Sun Jun 30 10:26:33 2002 Joe Orton - - * child.c (server_send): New function. - (discard_request): Fail with appropriate error. - -Sun Jun 30 09:03:51 2002 Joe Orton - - * tests.c (main): Reap server after each test has run. - -Sun Jun 30 09:00:43 2002 Joe Orton - - * child.c (reap_server): Set `child' to 0 so child can't be reaped - twice. - -Sun Jun 23 12:09:09 2002 Joe Orton - - * child.c (serve_file): Use large buffer when sending in chunked - mode to support large chunk sizes. - -Sun Jun 23 09:35:09 2002 Joe Orton - - * child.c (serve_file): Use NE_FMT_OFF_T and NE_FMT_SSIZE_T. - -Thu May 30 21:57:39 2002 Joe Orton - - * child.c (minisleep): Export function. - -Sun May 19 18:23:19 2002 Joe Orton - - * child.c, tests.c: s/sock_/ne_sock_/, s/SOCK_/NE_SOCK_/ for - socket layer API change. - - * child.h (SEND_STRING): New macro. - -Sun May 19 08:57:21 2002 Joe Orton - - * child.c (lookup_hostname): Conditionally use hstrerror(). - -Mon Feb 25 20:54:56 2002 Joe Orton - - * tests.c (t_context): Use ne_vsnprintf. - -Mon Feb 11 21:52:23 2002 Joe Orton - - * child.c (lookup_hostname): New function. - (server_child, do_listen): Pass around struct in_addr argument. - (spawn_server_addr): Renamed from spawn_server, take bind_local - flag to use localhost or "real" hostname to bind to. - (spawn_server): New function, use spawn_server - -Mon Feb 11 20:51:27 2002 Joe Orton - - * child.c (minisleep) [HAVE_USLEEP]: Use nice short usleep() - rather than boring long sleep(). - -Sat Feb 2 14:15:25 2002 Joe Orton - - * child.c (spawn_server_repeat): Exit child process (with failure) - if the server callback fails. - -Fri Jan 4 22:06:17 2002 Joe Orton - - * tests.h: Add SKIPREST result value. - - * tests.c (TEST_DEBUG): Add NE_DBG_LOCKS. (main): Support - SKIPREST. - -Tue Jan 1 20:36:58 2002 Joe Orton - - * tests.h: Make test_suite symbol have external linkage. - -Sat Nov 10 22:28:55 2001 Joe Orton - - * tests.c, test.h: Export name of test suite. - -Sun Nov 4 13:56:42 2001 Joe Orton - - * child.c (discard_request): Support retrieving arbitrary header - values from request via want_request, got_request globals. - -Wed Oct 24 21:41:39 2001 Joe Orton - - * tests.h (ONV): New macro. (ON, ONN): Redefine in terms of ONV. - -Wed Oct 24 20:44:59 2001 Joe Orton - - * tests.c (main, t_warning, segv): Use colours when stdout is a - terminal device. - -Wed Oct 24 20:36:38 2001 Joe Orton - - * tests.c (t_context, t_warning): Renamed from i_am, warning. - (t_context): Take printf varargs. - - * tests.h (ONN, ON): Update, simplify. - - * child.c: Update. - -Tue Oct 23 22:15:17 2001 Joe Orton - - * tests.c (main): Vertically align results after warnings. - -Tue Oct 2 23:36:44 2001 Joe Orton - - * child.c (do_listen): Refactored from server_socket, only does - bind/listen. (spawn_server): Moved awaken/accept calls here. - (spawn_server_repeat, dead_server): New functions. - -Sun Sep 30 10:14:35 2001 Joe Orton - - * tests.h: Use a function/name structure for tests, add 'T' macro - for easily writing initializers. Rename 'name' global variable to - 'test_context' to avoid parameter name collisions. - - * child.c (spawn_server): Update accordingly. - - * tests.c (i_am): Update accordingly. (main): Update; prettify - output using new 'name' from test structure. Cope better when all - tests in a suite are skipped. - -Sat Sep 29 11:04:40 2001 Joe Orton - - * child.c (serve_file): If 'chunks' is set in argument object, - then deliver the file as a series of chunks. - -Thu Sep 27 20:28:45 2001 Joe Orton - - * child.c (serve_file): New function. - -Thu Sep 27 20:28:41 2001 Joe Orton - - * child.c (discard_request): Reset clength. - -Mon Aug 27 00:31:09 2001 Joe Orton - - * tests.c (test_num): Expose test counter. (segv): Handle - segfault nicely. - -Mon Aug 27 00:30:20 2001 Joe Orton - - * child.c (discard_request): New function, from request.c in - neon/test. - -Wed Aug 8 22:09:21 2001 Joe Orton - - * tests.c, test.h: Only define test_argc/argv once. - -Mon Jul 16 16:30:28 2001 Joe Orton - - * tests.c (warning): Take printf-style arguments list. - -Mon Jul 16 16:16:08 2001 Joe Orton - - * tests.c (main): Cope with skipped tests properly. - -Mon Jul 16 16:00:59 2001 Joe Orton - - * tests.c (warning): New function. (main): Cope with warnings. - -Sun Jul 8 16:09:33 2001 Joe Orton - - * tests.c (main): Export argc/argv as test_argc, test_argv. - - diff --git a/client/neon-0.27.2/test/common/README b/client/neon-0.27.2/test/common/README deleted file mode 100644 index a910a23ca..000000000 --- a/client/neon-0.27.2/test/common/README +++ /dev/null @@ -1,4 +0,0 @@ - -Simple test framework for neon; licensed under the GNU GPL. - -Copyright (C) 2001-2002 Joe Orton diff --git a/client/neon-0.27.2/test/common/child.c b/client/neon-0.27.2/test/common/child.c deleted file mode 100644 index 0e2cff709..000000000 --- a/client/neon-0.27.2/test/common/child.c +++ /dev/null @@ -1,478 +0,0 @@ -/* - Framework for testing with a server process - Copyright (C) 2001-2004, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#include -#include -#include -#include - -#include - -#ifdef HAVE_ERRNO_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif - -#include -#include -#include - -#include "ne_socket.h" -#include "ne_utils.h" -#include "ne_string.h" - -#include "tests.h" -#include "child.h" - -static pid_t child = 0; - -int clength; - -static struct in_addr lh_addr = {0}, hn_addr = {0}; - -const char *want_header = NULL; -got_header_fn got_header = NULL; -char *local_hostname = NULL; - -/* If we have pipe(), then use a pipe between the parent and child to - * know when the child is ready to accept incoming connections. - * Otherwise use boring sleep()s trying to avoid the race condition - * between listen() and connect() in the two processes. */ -#ifdef HAVE_PIPE -#define USE_PIPE 1 -#endif - -int lookup_localhost(void) -{ - /* this will break if a system is set up so that `localhost' does - * not resolve to 127.0.0.1, but... */ - lh_addr.s_addr = inet_addr("127.0.0.1"); - return OK; -} - -int lookup_hostname(void) -{ - char buf[BUFSIZ]; - struct hostent *ent; - - local_hostname = NULL; - ONV(gethostname(buf, BUFSIZ) < 0, - ("gethostname failed: %s", strerror(errno))); - - ent = gethostbyname(buf); -#ifdef HAVE_HSTRERROR - ONV(ent == NULL, - ("could not resolve `%s': %s", buf, hstrerror(h_errno))); -#else - ONV(ent == NULL, ("could not resolve `%s'", buf)); -#endif - - local_hostname = ne_strdup(ent->h_name); - - return OK; -} - -static int do_listen(struct in_addr addr, int port) -{ - int ls = socket(AF_INET, SOCK_STREAM, 0); - struct sockaddr_in saddr = {0}; - int val = 1; - - setsockopt(ls, SOL_SOCKET, SO_REUSEADDR, (void *)&val, sizeof(int)); - - saddr.sin_addr = addr; - saddr.sin_port = htons(port); - saddr.sin_family = AF_INET; - - if (bind(ls, (struct sockaddr *)&saddr, sizeof(saddr))) { - printf("bind failed: %s\n", strerror(errno)); - return -1; - } - if (listen(ls, 5)) { - printf("listen failed: %s\n", strerror(errno)); - return -1; - } - - return ls; -} - -void minisleep(void) -{ -#ifdef HAVE_USLEEP - usleep(500); -#else - sleep(1); -#endif -} - -int reset_socket(ne_socket *sock) -{ -#ifdef SO_LINGER - /* Stevens' magic trick to send an RST on close(). */ - struct linger l = {1, 0}; - return setsockopt(ne_sock_fd(sock), SOL_SOCKET, SO_LINGER, &l, sizeof l); -#else - return 1; -#endif -} - -/* close 'sock', performing lingering close to avoid premature RST. */ -static int close_socket(ne_socket *sock) -{ -#ifdef HAVE_SHUTDOWN - char buf[20]; - int fd = ne_sock_fd(sock); - - shutdown(fd, 0); - while (ne_sock_read(sock, buf, sizeof buf) > 0); -#endif - return ne_sock_close(sock); -} - -/* This runs as the child process. */ -static int server_child(int readyfd, struct in_addr addr, int port, - server_fn callback, void *userdata) -{ - ne_socket *s = ne_sock_create(); - int ret, listener; - - in_child(); - - listener = do_listen(addr, port); - if (listener < 0) - return FAIL; - -#ifdef USE_PIPE - /* Tell the parent we're ready for the request. */ - if (write(readyfd, "a", 1) != 1) abort(); -#endif - - ONN("accept failed", ne_sock_accept(s, listener)); - - ret = callback(s, userdata); - - close_socket(s); - - return ret; -} - -int spawn_server(int port, server_fn fn, void *ud) -{ - return spawn_server_addr(1, port, fn, ud); -} - -int spawn_server_addr(int bind_local, int port, server_fn fn, void *ud) -{ - int fds[2]; - struct in_addr addr; - - addr = bind_local?lh_addr:hn_addr; - -#ifdef USE_PIPE - if (pipe(fds)) { - perror("spawn_server: pipe"); - return FAIL; - } -#else - /* avoid using uninitialized variable. */ - fds[0] = fds[1] = 0; -#endif - - child = fork(); - - ONN("fork server", child == -1); - - if (child == 0) { - /* this is the child. */ - int ret; - - ret = server_child(fds[1], addr, port, fn, ud); - -#ifdef USE_PIPE - close(fds[0]); - close(fds[1]); -#endif - - /* print the error out otherwise it gets lost. */ - if (ret) { - printf("server child failed: %s\n", test_context); - } - - /* and quit the child. */ - exit(ret); - } else { - char ch; - -#ifdef USE_PIPE - if (read(fds[0], &ch, 1) < 0) - perror("parent read"); - - close(fds[0]); - close(fds[1]); -#else - minisleep(); -#endif - - return OK; - } -} - -int spawn_server_repeat(int port, server_fn fn, void *userdata, int n) -{ - int fds[2]; - -#ifdef USE_PIPE - if (pipe(fds)) { - perror("spawn_server: pipe"); - return FAIL; - } -#else - /* avoid using uninitialized variable. */ - fds[0] = fds[1] = 0; -#endif - - child = fork(); - - if (child == 0) { - /* this is the child. */ - int listener, count = 0; - - in_child(); - - listener = do_listen(lh_addr, port); - -#ifdef USE_PIPE - if (write(fds[1], "Z", 1) != 1) abort(); -#endif - - close(fds[1]); - close(fds[0]); - - /* Loop serving requests. */ - while (++count < n) { - ne_socket *sock = ne_sock_create(); - int ret; - - NE_DEBUG(NE_DBG_HTTP, "child awaiting connection #%d.\n", count); - ONN("accept failed", ne_sock_accept(sock, listener)); - ret = fn(sock, userdata); - close_socket(sock); - NE_DEBUG(NE_DBG_HTTP, "child served request, %d.\n", ret); - if (ret) { - printf("server child failed: %s\n", test_context); - exit(-1); - } - /* don't send back notification to parent more than - * once. */ - } - - NE_DEBUG(NE_DBG_HTTP, "child aborted.\n"); - close(listener); - - exit(-1); - - } else { - char ch; - /* this is the parent. wait for the child to get ready */ -#ifdef USE_PIPE - if (read(fds[0], &ch, 1) < 0) - perror("parent read"); - - close(fds[0]); - close(fds[1]); -#else - minisleep(); -#endif - } - - return OK; -} - -int dead_server(void) -{ - int status; - - if (waitpid(child, &status, WNOHANG)) { - /* child quit already! */ - return FAIL; - } - - NE_DEBUG(NE_DBG_HTTP, "child has not quit.\n"); - - return OK; -} - - -int await_server(void) -{ - int status; - - (void) wait(&status); - - /* so that we aren't reaped by mistake. */ - child = 0; - - ONN("error from server process", WEXITSTATUS(status)); - - return OK; -} - -int reap_server(void) -{ - int status; - - if (child != 0) { - (void) kill(child, SIGTERM); - minisleep(); - (void) wait(&status); - child = 0; - } - - return OK; -} - -ssize_t server_send(ne_socket *sock, const char *str, size_t len) -{ - NE_DEBUG(NE_DBG_HTTP, "Sending: %.*s\n", (int)len, str); - return ne_sock_fullwrite(sock, str, len); -} - -int discard_request(ne_socket *sock) -{ - char buffer[1024]; - size_t offset = want_header?strlen(want_header):0; - - clength = 0; - - NE_DEBUG(NE_DBG_HTTP, "Discarding request...\n"); - do { - ONV(ne_sock_readline(sock, buffer, 1024) < 0, - ("error reading line: %s", ne_sock_error(sock))); - NE_DEBUG(NE_DBG_HTTP, "[req] %s", buffer); - if (strncasecmp(buffer, "content-length:", 15) == 0) { - clength = atoi(buffer + 16); - } - if (got_header != NULL && want_header != NULL && - strncasecmp(buffer, want_header, offset) == 0 && - buffer[offset] == ':') { - char *value = buffer + offset + 1; - if (*value == ' ') value++; - got_header(ne_shave(value, "\r\n")); - } - } while (strcmp(buffer, "\r\n") != 0); - - return OK; -} - -int discard_body(ne_socket *sock) -{ - while (clength > 0) { - char buf[BUFSIZ]; - size_t bytes = clength; - ssize_t ret; - if (bytes > sizeof(buf)) bytes = sizeof(buf); - NE_DEBUG(NE_DBG_HTTP, "Discarding %" NE_FMT_SIZE_T " bytes.\n", - bytes); - ret = ne_sock_read(sock, buf, bytes); - ONV(ret < 0, ("socket read failed (%" NE_FMT_SSIZE_T "): %s", - ret, ne_sock_error(sock))); - clength -= ret; - NE_DEBUG(NE_DBG_HTTP, "Got %" NE_FMT_SSIZE_T " bytes.\n", ret); - } - NE_DEBUG(NE_DBG_HTTP, "Discard successful.\n"); - return OK; -} - -int serve_file(ne_socket *sock, void *ud) -{ - char buffer[BUFSIZ]; - struct stat st; - struct serve_file_args *args = ud; - ssize_t ret; - int fd; - - CALL(discard_request(sock)); - - ne_sock_fullread(sock, buffer, clength); - - fd = open(args->fname, O_RDONLY); - if (fd < 0) { - SEND_STRING(sock, - "HTTP/1.0 404 File Not Found\r\n" - "Content-Length: 0\r\n\r\n"); - return 0; - } - - ONN("fstat fd", fstat(fd, &st)); - - SEND_STRING(sock, "HTTP/1.0 200 OK\r\n"); - if (args->chunks) { - sprintf(buffer, "Transfer-Encoding: chunked\r\n"); - } else { - sprintf(buffer, "Content-Length: %" NE_FMT_OFF_T "\r\n", - st.st_size); - } - - if (args->headers) { - strcat(buffer, args->headers); - } - - strcat(buffer, "\r\n"); - - SEND_STRING(sock, buffer); - - NE_DEBUG(NE_DBG_HTTP, "Serving %s (%" NE_FMT_OFF_T " bytes).\n", - args->fname, st.st_size); - - if (args->chunks) { - char buf[1024]; - - while ((ret = read(fd, &buf, args->chunks)) > 0) { - /* this is a small integer, cast it explicitly to avoid - * warnings with printing an ssize_t. */ - sprintf(buffer, "%x\r\n", (unsigned int)ret); - SEND_STRING(sock, buffer); - ONN("writing body", ne_sock_fullwrite(sock, buf, ret)); - SEND_STRING(sock, "\r\n"); - } - - SEND_STRING(sock, "0\r\n\r\n"); - - } else { - while ((ret = read(fd, buffer, BUFSIZ)) > 0) { - ONN("writing body", ne_sock_fullwrite(sock, buffer, ret)); - } - } - - ONN("error reading from file", ret < 0); - - (void) close(fd); - - return OK; -} diff --git a/client/neon-0.27.2/test/common/child.h b/client/neon-0.27.2/test/common/child.h deleted file mode 100644 index 39bdb1d68..000000000 --- a/client/neon-0.27.2/test/common/child.h +++ /dev/null @@ -1,117 +0,0 @@ -/* - Framework for testing with a server process - Copyright (C) 2001-2004, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef CHILD_H -#define CHILD_H 1 - -#include "config.h" - -#ifdef HAVE_STRING_H -#include /* for strlen() */ -#endif - -#include "ne_socket.h" - -/* Test which does DNS lookup on "localhost": this must be the first - * named test. */ -int lookup_localhost(void); - -/* Test which looks up real local hostname. */ -int lookup_hostname(void); - -/* set to local hostname if lookup_hostname succeeds. */ -extern char *local_hostname; - -/* Callback for spawn_server. */ -typedef int (*server_fn)(ne_socket *sock, void *userdata); - -/* Spawns server child process: - * - forks child process. - * - child process listens on localhost at given port. - * - when you connect to it, 'fn' is run... - * fn is passed the client/server socket as first argument, - * and userdata as second. - * - the socket is closed when 'fn' returns, so don't close in in 'fn'. - */ -int spawn_server(int port, server_fn fn, void *userdata); - -/* Like spawn_server; if bind_local is non-zero, binds server to - * localhost, otherwise, binds server to real local hostname. (must - * have called lookup_localhost or lookup_hostname as approprate - * beforehand). */ -int spawn_server_addr(int bind_local, int port, server_fn fn, void *userdata); - -/* Like spawn server except will continue accepting connections and - * processing requests, up to 'n' times. If 'n' is reached, then the - * child process exits with a failure status. */ -int spawn_server_repeat(int port, server_fn fn, void *userdata, int n); - -/* Blocks until child process exits, and gives return code of 'fn'. */ -int await_server(void); - -/* Kills child process. */ -int reap_server(void); - -/* Returns non-zero if server process has already died. */ -int dead_server(void); - -/* If discard_request comes across a header called 'want_header', it - * will call got_header passing the header field value. */ -extern const char *want_header; -typedef void (*got_header_fn)(char *value); -extern got_header_fn got_header; - -/* Send string to child; ne_sock_fullwrite with debugging. */ -ssize_t server_send(ne_socket *sock, const char *data, size_t len); - -/* Utility macro: send given string down socket. */ -#define SEND_STRING(sock, str) server_send((sock), (str), strlen((str))) - -/* Tries to ensure that the socket will be closed using RST rather - * than FIN. */ -int reset_socket(ne_socket *sock); - -/* Utility function: discard request. Sets context on error. */ -int discard_request(ne_socket *sock); - -/* Utility function: discard request body. Sets context on error. */ -int discard_body(ne_socket *sock); - -struct serve_file_args { - const char *fname; - const char *headers; - int chunks; -}; - -/* Utility function: callback for spawn_server: pass pointer to - * serve_file_args as userdata, and args->fname is served as a 200 - * request. If args->headers is non-NULL, it must be a set of - * CRLF-terminated lines which is added in to the response headers. - * If args->chunks is non-zero, the file is delivered using chunks of - * that size. */ -int serve_file(ne_socket *sock, void *ud); - -/* set to value of C-L header by discard_request. */ -extern int clength; - -/* Sleep for a short time. */ -void minisleep(void); - -#endif /* CHILD_H */ diff --git a/client/neon-0.27.2/test/common/run.sh b/client/neon-0.27.2/test/common/run.sh deleted file mode 100755 index 01ed5a9c7..000000000 --- a/client/neon-0.27.2/test/common/run.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/sh - -rm -f debug.log -rm -f child.log - -# for shared builds. -LD_LIBRARY_PATH=../src/.libs:$LD_LIBRARY_PATH -export LD_LIBRARY_PATH - -for f in $*; do - if ./$f; then - : - else - echo FAILURE - exit 1 - fi -done - -exit 0 diff --git a/client/neon-0.27.2/test/common/tests.c b/client/neon-0.27.2/test/common/tests.c deleted file mode 100644 index f5d0caba2..000000000 --- a/client/neon-0.27.2/test/common/tests.c +++ /dev/null @@ -1,362 +0,0 @@ -/* - Stupidly simple test framework - Copyright (C) 2001-2002, 2004, 2005, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#include - -#include -#ifdef HAVE_SIGNAL_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_ERRNO_H -#include -#endif -#ifdef HAVE_LOCALE_H -#include -#endif - -#include "ne_string.h" -#include "ne_utils.h" -#include "ne_socket.h" -#include "ne_i18n.h" - -#include "tests.h" -#include "child.h" - -char test_context[BUFSIZ]; -int have_context = 0; - -static FILE *child_debug, *debug; - -char **test_argv; -int test_argc; - -const char *test_suite; -int test_num; - -/* statistics for all tests so far */ -static int passes = 0, fails = 0, skipped = 0, warnings = 0; - -/* per-test globals: */ -static int warned, aborted = 0; -static const char *test_name; /* current test name */ - -static int use_colour = 0; - -/* resource for ANSI escape codes: - * http://www.isthe.com/chongo/tech/comp/ansi_escapes.html */ -#define COL(x) do { if (use_colour) printf("\033[" x "m"); } while (0) - -#define NOCOL COL("00") - -void t_context(const char *context, ...) -{ - va_list ap; - va_start(ap, context); - ne_vsnprintf(test_context, BUFSIZ, context, ap); - va_end(ap); - have_context = 1; -} - -void t_warning(const char *str, ...) -{ - va_list ap; - COL("43;01"); printf("WARNING:"); NOCOL; - putchar(' '); - va_start(ap, str); - vprintf(str, ap); - va_end(ap); - warnings++; - warned++; - putchar('\n'); -} - -#define TEST_DEBUG \ -(NE_DBG_HTTP | NE_DBG_SOCKET | NE_DBG_HTTPBODY | NE_DBG_HTTPAUTH | \ - NE_DBG_LOCKS | NE_DBG_XMLPARSE | NE_DBG_XML | NE_DBG_SSL | \ - NE_DBG_HTTPPLAIN) - -#define W(m) do { if (write(0, m, strlen(m)) < 0) exit(99); } while(0) - -#define W_RED(m) do { if (use_colour) W("\033[41;37;01m"); \ -W(m); if (use_colour) W("\033[00m\n"); } while (0); - -/* Signal handler for child processes. */ -static void child_segv(int signo) -{ - signal(SIGSEGV, SIG_DFL); - signal(SIGABRT, SIG_DFL); - W_RED("Fatal signal in child!"); - kill(getpid(), SIGSEGV); - minisleep(); -} - -/* Signal handler for parent process. */ -static void parent_segv(int signo) -{ - signal(SIGSEGV, SIG_DFL); - signal(SIGABRT, SIG_DFL); - if (signo == SIGSEGV) { - W_RED("FAILED - segmentation fault"); - } else if (signo == SIGABRT) { - W_RED("ABORTED"); - } - reap_server(); - kill(getpid(), SIGSEGV); - minisleep(); -} - -void in_child(void) -{ - ne_debug_init(child_debug, TEST_DEBUG); - NE_DEBUG(TEST_DEBUG, "**** Child forked for test %s ****\n", test_name); - signal(SIGSEGV, child_segv); - signal(SIGABRT, child_segv); -} - -int main(int argc, char *argv[]) -{ - int n; - static const char dots[] = "......................"; - - /* get basename(argv[0]) */ - test_suite = strrchr(argv[0], '/'); - if (test_suite == NULL) { - test_suite = argv[0]; - } else { - test_suite++; - } - -#ifdef HAVE_SETLOCALE - setlocale(LC_MESSAGES, ""); -#endif - - ne_i18n_init(NULL); - -#if defined(HAVE_ISATTY) && defined(STDOUT_FILENO) - if (isatty(STDOUT_FILENO)) { - use_colour = 1; - } -#endif - - test_argc = argc; - test_argv = argv; - - debug = fopen("debug.log", "a"); - if (debug == NULL) { - fprintf(stderr, "%s: Could not open debug.log: %s\n", test_suite, - strerror(errno)); - return -1; - } - child_debug = fopen("child.log", "a"); - if (child_debug == NULL) { - fprintf(stderr, "%s: Could not open child.log: %s\n", test_suite, - strerror(errno)); - fclose(debug); - return -1; - } - - if (tests[0].fn == NULL) { - printf("-> no tests found in `%s'\n", test_suite); - return -1; - } - - /* install special SEGV handler. */ - signal(SIGSEGV, parent_segv); - signal(SIGABRT, parent_segv); - - /* test the "no-debugging" mode of ne_debug. */ - ne_debug_init(NULL, 0); - NE_DEBUG(TEST_DEBUG, "This message should go to /dev/null"); - - /* enable debugging for real. */ - ne_debug_init(debug, TEST_DEBUG); - NE_DEBUG(TEST_DEBUG | NE_DBG_FLUSH, "Version string: %s\n", - ne_version_string()); - - /* another silly test. */ - NE_DEBUG(0, "This message should also go to /dev/null"); - - if (ne_sock_init()) { - COL("43;01"); printf("WARNING:"); NOCOL; - printf(" Socket library initalization failed.\n"); - } - - printf("-> running `%s':\n", test_suite); - - for (n = 0; !aborted && tests[n].fn != NULL; n++) { - int result, is_xfail = 0; -#ifdef NEON_MEMLEAK - size_t allocated = ne_alloc_used; - int is_xleaky = 0; -#endif - - test_name = tests[n].name; - printf("%2d. %s%.*s ", n, test_name, - (int) (strlen(dots) - strlen(test_name)), dots); - have_context = 0; - test_num = n; - warned = 0; - fflush(stdout); - NE_DEBUG(TEST_DEBUG, "******* Running test %d: %s ********\n", - n, test_name); - - /* run the test. */ - result = tests[n].fn(); - -#ifdef NEON_MEMLEAK - /* issue warnings for memory leaks, if requested */ - if ((tests[n].flags & T_CHECK_LEAKS) && result == OK && - ne_alloc_used > allocated) { - t_context("memory leak of %" NE_FMT_SIZE_T " bytes", - ne_alloc_used - allocated); - fprintf(debug, "Blocks leaked: "); - ne_alloc_dump(debug); - result = FAIL; - } else if (tests[n].flags & T_EXPECT_LEAKS && result == OK && - ne_alloc_used == allocated) { - t_context("expected memory leak not detected"); - result = FAIL; - } else if (tests[n].flags & T_EXPECT_LEAKS && result == OK) { - fprintf(debug, "Blocks leaked (expected): "); - ne_alloc_dump(debug); - is_xleaky = 1; - } -#endif - - if (tests[n].flags & T_EXPECT_FAIL) { - if (result == OK) { - t_context("test passed but expected failure"); - result = FAIL; - } else if (result == FAIL) { - result = OK; - is_xfail = 1; - } - } - - /* align the result column if we've had warnings. */ - if (warned) { - printf(" %s ", dots); - } - - switch (result) { - case OK: - if (is_xfail) { - COL("32;07"); - printf("xfail"); - } else { - COL("32"); - printf("pass"); - } - NOCOL; - if (warned) { - printf(" (with %d warning%s)", warned, (warned > 1)?"s":""); - } -#ifdef NEON_MEMLEAK - if (is_xleaky) { - printf(" (with expected leak, %" NE_FMT_SIZE_T " bytes)", - ne_alloc_used - allocated); - } -#endif - putchar('\n'); - passes++; - break; - case FAILHARD: - aborted = 1; - /* fall-through */ - case FAIL: - COL("41;37;01"); printf("FAIL"); NOCOL; - if (have_context) { - printf(" (%s)", test_context); - } - putchar('\n'); - fails++; - break; - case SKIPREST: - aborted = 1; - /* fall-through */ - case SKIP: - COL("44;37;01"); printf("SKIPPED"); NOCOL; - if (have_context) { - printf(" (%s)", test_context); - } - putchar('\n'); - skipped++; - break; - default: - COL("41;37;01"); printf("OOPS"); NOCOL; - printf(" unexpected test result `%d'\n", result); - break; - } - - reap_server(); - } - - /* discount skipped tests */ - if (skipped) { - printf("-> %d %s.\n", skipped, - skipped==1?"test was skipped":"tests were skipped"); - n -= skipped; - if (passes + fails != n) { - printf("-> ARGH! Number of test results does not match " - "number of tests.\n" - "-> ARGH! Test Results are INRELIABLE.\n"); - } - } - /* print the summary. */ - if (skipped && n == 0) { - printf("<- all tests skipped for `%s'.\n", test_suite); - } else { - printf("<- summary for `%s': " - "of %d tests run: %d passed, %d failed. %.1f%%\n", - test_suite, n, passes, fails, 100*(float)passes/n); - if (warnings) { - printf("-> %d warning%s issued.\n", warnings, - warnings==1?" was":"s were"); - } - } - - if (fclose(debug)) { - fprintf(stderr, "Error closing debug.log: %s\n", strerror(errno)); - fails = 1; - } - - if (fclose(child_debug)) { - fprintf(stderr, "Error closing child.log: %s\n", strerror(errno)); - fails = 1; - } - - ne_sock_exit(); - - return fails; -} - diff --git a/client/neon-0.27.2/test/common/tests.h b/client/neon-0.27.2/test/common/tests.h deleted file mode 100644 index fe6ed3fc4..000000000 --- a/client/neon-0.27.2/test/common/tests.h +++ /dev/null @@ -1,128 +0,0 @@ -/* - Stupidly simple test framework - Copyright (C) 2001-2004, Joe Orton - - 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 - -*/ - -#ifndef TESTS_H -#define TESTS_H 1 - -#ifdef HAVE_STRING_H -#include -#endif - -#include - -#define OK 0 -#define FAIL 1 -#define FAILHARD 2 /* fail and skip all succeeding tests in this suite. */ -#define SKIP 3 /* test was skipped because precondition was not met */ -#define SKIPREST 4 /* skipped, and skip all succeeding tests in suite */ - -/* A test function. Must return any of OK, FAIL, FAILHARD, SKIP, or - * SKIPREST. May call t_warning() any number of times. If not - * returning OK, optionally call t_context to provide an error - * message. */ -typedef int (*test_func)(void); - -typedef struct { - test_func fn; /* the function to test. */ - const char *name; /* the name of the test. */ - int flags; -} ne_test; - -/* possible values for flags: */ -#define T_CHECK_LEAKS (1) /* check for memory leaks */ -#define T_EXPECT_FAIL (2) /* expect failure */ -#define T_EXPECT_LEAKS (4) /* expect memory leak failures */ - -/* array of tests to run: must be defined by each test suite. */ -extern ne_test tests[]; - -/* define a test function which has the same name as the function, - * and does check for memory leaks. */ -#define T(fn) { fn, #fn, T_CHECK_LEAKS } -/* define a test function which is expected to return FAIL. */ -#define T_XFAIL(fn) { fn, #fn, T_EXPECT_FAIL | T_CHECK_LEAKS } -/* define a test function which isn't checked for memory leaks. */ -#define T_LEAKY(fn) { fn, #fn, 0 } -/* define a test function which is expected to fail memory leak checks */ -#define T_XLEAKY(fn) { fn, #fn, T_EXPECT_LEAKS } - -/* current test number */ -extern int test_num; - -/* name of test suite */ -extern const char *test_suite; - -/* Provide result context message. */ -void t_context(const char *ctx, ...) -#ifdef __GNUC__ - __attribute__ ((format (printf, 1, 2))) -#endif /* __GNUC__ */ - ; - -extern char test_context[]; - -/* the command-line arguments passed in to the test suite: */ -extern char **test_argv; -extern int test_argc; - -/* child process should call this. */ -void in_child(void); - -/* issue a warning. */ -void t_warning(const char *str, ...) -#ifdef __GNUC__ - __attribute__ ((format (printf, 1, 2))) -#endif /* __GNUC__ */ -; - -/* Macros for easily writing is-not-zero comparison tests; the ON* - * macros fail the function if a comparison is not zero. - * - * ONV(x,vs) takes a comparison X, and a printf varargs list for - * the failure message. - * e.g. ONV(strcmp(bar, "foo"), ("bar was %s not 'foo'", bar)) - * - * ON(x) takes a comparison X, and uses the line number for the failure - * message. e.g. ONV(strcmp(bar, "foo")) - * - * ONN(n, x) takes a comparison X, and a flat string failure message. - * e.g. ONN("foo was wrong", strcmp(bar, "foo")) */ - -#define ONV(x,vs) do { if ((x)) { t_context vs; return FAIL; } } while (0) -#define ON(x) ONV((x), ("line %d", __LINE__ )) -#define ONN(n,x) ONV((x), (n)) - -/* ONCMP(exp, act, name): 'exp' is the expected string, 'act' is the - * actual string for some field 'name'. Succeeds if strcmp(exp,act) - * == 0 or both are NULL. */ -#define ONCMP(exp, act, ctx, name) do { \ - ONV(exp && !act, ("%s: " name " was NULL, expected '%s'", ctx, exp)); \ - ONV(!exp && act, ("%s: " name " was '%s', expected NULL", ctx, act)); \ - ONV(exp && strcmp(exp, act), ("%s: " name " was '%s' not '%s'", ctx, act, exp)); \ -} while (0) - -/* return immediately with result of test 'x' if it fails. */ -#define CALL(x) do { int t_ret = (x); if (t_ret != OK) return t_ret; } while (0) - -/* PRECOND: skip current test if condition 'x' is not true. */ -#define PRECOND(x) do { if (!(x)) { return SKIP; } } while (0) - -#endif /* TESTS_H */ diff --git a/client/neon-0.27.2/test/compress.c b/client/neon-0.27.2/test/compress.c deleted file mode 100644 index c80f0cdec..000000000 --- a/client/neon-0.27.2/test/compress.c +++ /dev/null @@ -1,447 +0,0 @@ -/* - tests for compressed response handling. - Copyright (C) 2001-2004, 2006, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#ifdef HAVE_UNISTD_H -#include -#endif - -#include - -#include "ne_compress.h" -#include "ne_auth.h" - -#include "tests.h" -#include "child.h" -#include "utils.h" - -static enum { f_partial = 0, f_mismatch, f_complete } failed; - -static const char *newsfn = "random.txt"; - -static int init(void) -{ - return lookup_localhost(); -} - -#define EXTRA_DEBUG 0 /* disabled by default */ - -static int reader(void *ud, const char *block, size_t len) -{ - struct string *b = ud; - -#if EXTRA_DEBUG - NE_DEBUG(NE_DBG_HTTP, "reader: got (%d): [[[%.*s]]]\n", (int)len, - (int)len, block); -#endif - - if (failed == f_mismatch) return -1; - - /* catch multiple len == 0 call as issued by 0.25.0 only: */ - if (failed == f_complete) { - NE_DEBUG(NE_DBG_HTTP, "reader: called after complete, len=%d\n", - (int)len); - failed = f_mismatch; - return -1; - } - - if (failed == f_partial && len == 0) { - if (b->len != 0) { - NE_DEBUG(NE_DBG_HTTP, "reader: got length %d at EOF\n", - (int)b->len); - failed = f_mismatch; - } else { - failed = f_complete; - } - return 0; - } - - if (len > b->len || memcmp(b->data, block, len) != 0) { - NE_DEBUG(NE_DBG_HTTP, "reader: failed, got [[%.*s]] not [[%.*s]]\n", - (int)len, block, (int)b->len, b->data); - failed = f_mismatch; - return -1; - } else { - b->data += len; - b->len -= len; -#if EXTRA_DEBUG - NE_DEBUG(NE_DBG_HTTP, "reader: OK, %d bytes remaining\n", - (int)b->len); -#endif - } - - return 0; -} - -static int file2buf(int fd, ne_buffer *buf) -{ - char buffer[BUFSIZ]; - ssize_t n; - - while ((n = read(fd, buffer, BUFSIZ)) > 0) { - ne_buffer_append(buf, buffer, n); - } - - return 0; -} - -static int do_fetch(const char *realfn, const char *gzipfn, - int chunked, int expect_fail) -{ - ne_session *sess; - ne_request *req; - int fd, ret; - ne_buffer *buf = ne_buffer_create(); - struct serve_file_args sfargs; - ne_decompress *dc; - struct string body; - - fd = open(realfn, O_RDONLY); - ONN("failed to open file", fd < 0); - file2buf(fd, buf); - (void) close(fd); - - body.data = buf->data; - body.len = buf->used - 1; - - failed = f_partial; - - if (gzipfn) { - sfargs.fname = gzipfn; - sfargs.headers = "Content-Encoding: gzip\r\n"; - } else { - sfargs.fname = realfn; - sfargs.headers = NULL; - } - sfargs.chunks = chunked; - - CALL(make_session(&sess, serve_file, &sfargs)); - - req = ne_request_create(sess, "GET", "/"); - dc = ne_decompress_reader(req, ne_accept_2xx, reader, &body); - -#ifdef NE_DEBUGGING - ne_debug_init(ne_debug_stream, ne_debug_mask & ~NE_DBG_HTTPBODY); -#endif - - ret = ne_request_dispatch(req); - -#ifdef NE_DEBUGGING - ne_debug_init(ne_debug_stream, ne_debug_mask | NE_DBG_HTTPBODY); -#endif - - ONN("file not served", ne_get_status(req)->code != 200); - - ONN("decompress succeeded", expect_fail && !ret); - ONV(!expect_fail && ret, ("decompress failed: %s", ne_get_error(sess))); - - NE_DEBUG(NE_DBG_HTTP, "session error: %s\n", ne_get_error(sess)); - - ne_decompress_destroy(dc); - ne_request_destroy(req); - ne_session_destroy(sess); - ne_buffer_destroy(buf); - - if (expect_fail) { - /* if the decompress callback fails, the connection may - * be aborted and hence the server will abort. */ - reap_server(); - } else { - CALL(await_server()); - } - - if (!expect_fail) { - ONN("inflated response truncated", failed == f_partial); - ONN("inflated response mismatch", failed == f_mismatch); - } - - return OK; -} - -static int fetch(const char *realfn, const char *gzipfn, int chunked) -{ - return do_fetch(realfn, gzipfn, chunked, 0); -} - -/* Test the no-compression case. */ -static int not_compressed(void) -{ - return fetch(newsfn, NULL, 0); -} - -static int simple(void) -{ - return fetch(newsfn, "file1.gz", 0); -} - -/* file1.gz has an embedded filename. */ -static int withname(void) -{ - return fetch(newsfn, "file2.gz", 0); -} - -/* deliver various different sizes of chunks: tests the various - * decoding cases. */ -static int chunked_1b_wn(void) -{ - return fetch(newsfn, "file2.gz", 1); -} - -static int chunked_1b(void) -{ - return fetch(newsfn, "file1.gz", 1); -} - -static int chunked_12b(void) -{ - return fetch(newsfn, "file2.gz", 12); -} - -static int chunked_20b(void) -{ - return fetch(newsfn, "file2.gz", 20); -} - -static int chunked_10b(void) -{ - return fetch(newsfn, "file1.gz", 10); -} - -static int chunked_10b_wn(void) -{ - return fetch(newsfn, "file2.gz", 10); -} - -static int fail_trailing(void) -{ - return do_fetch(newsfn, "trailing.gz", 0, 1); -} - -static int fail_trailing_1b(void) -{ - return do_fetch(newsfn, "trailing.gz", 1, 1); -} - -static int fail_truncate(void) -{ - return do_fetch(newsfn, "truncated.gz", 0, 1); -} - -static int fail_bad_csum(void) -{ - return do_fetch(newsfn, "badcsum.gz", 0, 1); -} - -static int fail_corrupt1(void) -{ - return do_fetch(newsfn, "corrupt1.gz", 0, 1); -} - -static int fail_corrupt2(void) -{ - return do_fetch(newsfn, "corrupt2.gz", 0, 1); -} - -static int fail_empty(void) -{ - return do_fetch(newsfn, "empty.gz", 0, 1); -} - -static int notcomp_empty(void) -{ - return fetch("empty.gz", NULL, 0); -} - -static int auth_cb(void *userdata, const char *realm, int tries, - char *un, char *pw) -{ - strcpy(un, "foo"); - strcpy(pw, "bar"); - return tries; -} - -static int retry_compress_helper(ne_accept_response acceptor, - struct string *resp, struct string *expect) -{ - ne_session *sess; - ne_request *req; - ne_decompress *dc; - - CALL(make_session(&sess, serve_sstring, resp)); - - ne_set_server_auth(sess, auth_cb, NULL); - - req = ne_request_create(sess, "GET", "/"); - dc = ne_decompress_reader(req, acceptor, reader, expect); - failed = f_partial; - - ONREQ(ne_request_dispatch(req)); - - ne_decompress_destroy(dc); - - ONN("got bad response body", failed != f_complete); - - CALL(await_server()); - - ne_request_destroy(req); - ne_session_destroy(sess); - - return OK; -} - -static char retry_gz_resp[] = -"HTTP/1.1 401 Get Away\r\n" -"Content-Encoding: gzip\r\n" -"WWW-Authenticate: Basic realm=WallyWorld\r\n" -"Content-Length: 5\r\n" -"\r\n" -"abcde" -"HTTP/1.1 200 OK\r\n" -"Server: foo\r\n" -"Content-Length: 5\r\n" -"Connection: close\r\n" -"\r\n" -"hello"; - -/* Test where the response to the retried request does *not* have - * a content-encoding, whereas the original 401 response did. */ -static int retry_notcompress(void) -{ - struct string response = { retry_gz_resp, strlen(retry_gz_resp) }; - struct string expect = { "hello", 5 }; - return retry_compress_helper(ne_accept_2xx, &response, &expect); -} - -static char retry_gz_resp2[] = -"HTTP/1.1 401 Get Away\r\n" -"Content-Encoding: gzip\r\n" -"WWW-Authenticate: Basic realm=WallyWorld\r\n" -"Content-Length: 25\r\n" -"\r\n" -"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03\xcb\x48\xcd\xc9\xc9\x07" -"\x00\x86\xa6\x10\x36\x05\x00\x00\x00" -"HTTP/1.1 200 OK\r\n" -"Server: foo\r\n" -"Content-Encoding: gzip\r\n" -"Content-Length: 25\r\n" -"Connection: close\r\n" -"\r\n" -"\x1f\x8b\x08\x00\x00\x00\x00\x00\x00\x03\x2b\xcf\x2f\xca\x49\x01" -"\x00\x43\x11\x77\x3a\x05\x00\x00\x00"; - -static int retry_accept(void *ud, ne_request *req, const ne_status *st) -{ - struct string *expect = ud; - - NE_DEBUG(NE_DBG_HTTP, "retry_accept callback for %d response\n", - st->code); - - if (expect->len == 4 && strcmp(expect->data, "fish") == 0) { - /* first time through */ - expect->data = "hello"; - } else { - expect->data = "world"; - } - - expect->len = 5; - failed = f_partial; /* reset the state */ - return 1; -} - -/* Test where the response to the retried request *does* have a - * content-encoding, as did the original 401 response. */ -static int retry_compress(void) -{ - struct string resp = { retry_gz_resp2, sizeof(retry_gz_resp2) - 1 }; - struct string expect = { "fish", 4 }; - return retry_compress_helper(retry_accept, &resp, &expect); -} - -#define READER_ABORT_ERR "reader_abort error string" - -static int reader_abort(void *ud, const char *buf, size_t len) -{ - ne_session *sess = ud; - ne_set_error(sess, READER_ABORT_ERR); - return len; -} - -/* check that a callback abort does abort the response */ -static int compress_abort(void) -{ - ne_session *sess; - ne_request *req; - struct serve_file_args sfargs; - ne_decompress *dc; - int ret; - - sfargs.fname = "file1.gz"; - sfargs.headers = "Content-Encoding: gzip\r\n"; - sfargs.chunks = 0; - - CALL(make_session(&sess, serve_file, &sfargs)); - - req = ne_request_create(sess, "GET", "/abort"); - - dc = ne_decompress_reader(req, ne_accept_2xx, reader_abort, sess); - - ret = ne_request_dispatch(req); - - reap_server(); - - ONN("request was not aborted", ret != NE_ERROR); - ONV(strcmp(ne_get_error(sess), READER_ABORT_ERR), - ("session error was %s not %s", - ne_get_error(sess), READER_ABORT_ERR)); - - reap_server(); - ne_decompress_destroy(dc); - ne_request_destroy(req); - ne_session_destroy(sess); - - return OK; - -} - -ne_test tests[] = { - T_LEAKY(init), - T(not_compressed), - T(simple), - T(withname), - T(fail_trailing), - T(fail_trailing_1b), - T(fail_bad_csum), - T(fail_truncate), - T(fail_corrupt1), - T(fail_corrupt2), - T(fail_empty), - T(notcomp_empty), - T(chunked_1b), - T(chunked_1b_wn), - T(chunked_12b), - T(chunked_20b), - T(chunked_10b), - T(chunked_10b_wn), - T(retry_notcompress), - T(retry_compress), - T(compress_abort), - T(NULL) -}; diff --git a/client/neon-0.27.2/test/expired.pem b/client/neon-0.27.2/test/expired.pem deleted file mode 100644 index 0062cc8c3..000000000 --- a/client/neon-0.27.2/test/expired.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDODCCAuKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBoTELMAkGA1UEBhMCR0Ix -FzAVBgNVBAgTDkNhbWJyaWRnZXNoaXJlMRIwEAYDVQQHEwlDYW1icmlkZ2UxGjAY -BgNVBAoTEU5lb24gSGFja2VycyBMdGQuMRUwEwYDVQQLEwxOZW9uIFFBIERlcHQx -EjAQBgNVBAMTCWxvY2FsaG9zdDEeMBwGCSqGSIb3DQEJARYPbmVvbkB3ZWJkYXYu -b3JnMB4XDTAyMDEyMTIwMzkwNFoXDTAyMDEzMTIwMzkwNFowgaExCzAJBgNVBAYT -AkdCMRcwFQYDVQQIEw5DYW1icmlkZ2VzaGlyZTESMBAGA1UEBxMJQ2FtYnJpZGdl -MRowGAYDVQQKExFOZW9uIEhhY2tlcnMgTHRkLjEVMBMGA1UECxMMTmVvbiBRQSBE -ZXB0MRIwEAYDVQQDEwlsb2NhbGhvc3QxHjAcBgkqhkiG9w0BCQEWD25lb25Ad2Vi -ZGF2Lm9yZzBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDzRU5sZ8+CWQPvPkqJw9Kl -oEgT2FqzZR9RT/qbJuRBmRphiRr0g7JOh5Mr7LXaKShedFLhGidutyKKwIZJnRht -AgMBAAGjggEBMIH+MB0GA1UdDgQWBBRFA3ktzHSuD9uB6mJOWoElmOtknzCBzgYD -VR0jBIHGMIHDgBRFA3ktzHSuD9uB6mJOWoElmOtkn6GBp6SBpDCBoTELMAkGA1UE -BhMCR0IxFzAVBgNVBAgTDkNhbWJyaWRnZXNoaXJlMRIwEAYDVQQHEwlDYW1icmlk -Z2UxGjAYBgNVBAoTEU5lb24gSGFja2VycyBMdGQuMRUwEwYDVQQLEwxOZW9uIFFB -IERlcHQxEjAQBgNVBAMTCWxvY2FsaG9zdDEeMBwGCSqGSIb3DQEJARYPbmVvbkB3 -ZWJkYXYub3JnggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADQQBDSFbe -9EjP+IyZ4vhJSk66gLSN8CnafoGm5JHpNOHy5gWLh7j0a/dxWRd4gpoBYBB6Y9rO -YV6Eq3njdj0gu+NN ------END CERTIFICATE----- diff --git a/client/neon-0.27.2/test/htdocs/plain b/client/neon-0.27.2/test/htdocs/plain deleted file mode 100644 index bce1946c2..000000000 --- a/client/neon-0.27.2/test/htdocs/plain +++ /dev/null @@ -1 +0,0 @@ -Test file. diff --git a/client/neon-0.27.2/test/largefile.c b/client/neon-0.27.2/test/largefile.c deleted file mode 100644 index e99e96084..000000000 --- a/client/neon-0.27.2/test/largefile.c +++ /dev/null @@ -1,194 +0,0 @@ -/* - Tests for LFS support in neon - Copyright (C) 2004-2006, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#include -#include - -#ifdef HAVE_STDINT_H -#include -#endif - -#include "ne_request.h" - -#include "child.h" -#include "utils.h" -#include "tests.h" - -#ifndef INT64_C -#define INT64_C(x) x ## LL -#endif - -static const char data[] = "Hello, world.\n"; -static off64_t point = INT64_C(2) << 32; -#define SPARSE "sparse.bin" - -/* make a sparse large file */ -static int make_sparse_file(void) -{ - int fd = open64(SPARSE, O_CREAT | O_TRUNC | O_WRONLY, 0644); - - ONN("could not create large file " SPARSE, fd < 0); - ONN("seek to point", lseek64(fd, point, SEEK_SET) != point); - ONN("could not write to file", - write(fd, data, strlen(data)) != (ssize_t)strlen(data)); - ONN("close failed", close(fd)); - - return OK; -} - -/* server function which checks that the request body sent was the - * same as the 'data' array. */ -static int serve_check_body(ne_socket *sock, void *userdata) -{ - CALL(discard_request(sock)); - - if (clength != (ssize_t)strlen(data)) { - CALL(discard_body(sock)); - SEND_STRING(sock, "HTTP/1.0 400 Bad Request Body Length\r\n" - "\r\n"); - } else { - char buf[20]; - - if (ne_sock_fullread(sock, buf, clength) == 0) { - SEND_STRING(sock, "HTTP/1.0 200 OK Then!\r\n\r\n"); - } - } - return 0; -} - -/* sends a small segment of the file from a high offset. */ -static int send_high_offset(void) -{ - int ret, fd = open64(SPARSE, O_RDONLY); - ne_session *sess; - ne_request *req; - - ONN("could not open sparse file", fd < 0); - - CALL(make_session(&sess, serve_check_body, NULL)); - - req = ne_request_create(sess, "PUT", "/sparse"); - ne_set_request_body_fd(req, fd, point, strlen(data)); - ret = ne_request_dispatch(req); - CALL(await_server()); - ONV(ret != NE_OK || ne_get_status(req)->klass != 2, - ("request failed: %s", ne_get_error(sess))); - ne_request_destroy(req); - ne_session_destroy(sess); - close(fd); - return OK; -} - -#if 1 -#define RESPSIZE INT64_C(4295008256) -#define RESPSTR "4295008256" -#else -#define RESPSIZE INT64_C(2147491840) /* 2^31+8192 */ -#define RESPSTR "2147491840" -#endif - -/* Reads a request, sends a large response, reads a request, then - * sends a little response. */ -static int serve_large_response(ne_socket *sock, void *ud) -{ - int n = 0; - char empty[8192]; - - CALL(discard_request(sock)); - - SEND_STRING(sock, - "HTTP/1.1 200 OK\r\n" - "Content-Length: " RESPSTR "\r\n" - "Server: BigFileServerTM\r\n" "\r\n"); - - memset(empty, 0, sizeof empty); - - for (n = 0; n < RESPSIZE/sizeof(empty); n++) { - if (ne_sock_fullwrite(sock, empty, sizeof empty)) { - NE_DEBUG(NE_DBG_SOCKET, "fullwrite failed\n"); - return 1; - } - } - - NE_DEBUG(NE_DBG_SOCKET, "Wrote %d lots of %d\n", n, (int)sizeof empty); - - CALL(discard_request(sock)); - - SEND_STRING(sock, "HTTP/1.1 200 OK\r\n" - "Connection: close\r\n\r\n"); - - return 0; -} - -static int read_large_response(void) -{ - ne_session *sess; - ne_request *req; - off64_t count = 0; - int ret; - char buf[8192]; -#ifdef NE_DEBUGGING - int old_mask = ne_debug_mask; -#endif - - CALL(make_session(&sess, serve_large_response, NULL)); - - req = ne_request_create(sess, "GET", "/foo"); - - ret = ne_begin_request(req); - -#ifdef NE_DEBUGGING - ne_debug_init(ne_debug_stream, ne_debug_mask & ~(NE_DBG_HTTPBODY|NE_DBG_HTTP)); -#endif - - if (ret == NE_OK) { - while ((ret = ne_read_response_block(req, buf, sizeof buf)) > 0) - count += ret; - if (ret == NE_OK) - ret = ne_end_request(req); - } - -#ifdef NE_DEBUGGING - ne_debug_init(ne_debug_stream, old_mask); -#endif - - ONV(ret, ("request failed: %s", ne_get_error(sess))); - ONV(count != RESPSIZE, - ("response body was %" NE_FMT_OFF64_T " not %" NE_FMT_OFF64_T, - count, RESPSIZE)); - - ne_request_destroy(req); - - CALL(any_2xx_request(sess, "/bar")); - CALL(await_server()); - ne_session_destroy(sess); - return OK; -} - -ne_test tests[] = { - T(make_sparse_file), - T(send_high_offset), - T(read_large_response), - T(NULL), -}; diff --git a/client/neon-0.27.2/test/lock.c b/client/neon-0.27.2/test/lock.c deleted file mode 100644 index 0322ee8ce..000000000 --- a/client/neon-0.27.2/test/lock.c +++ /dev/null @@ -1,625 +0,0 @@ -/* - lock tests - Copyright (C) 2002-2006, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "ne_request.h" -#include "ne_locks.h" -#include "ne_socket.h" -#include "ne_basic.h" -#include "ne_auth.h" - -#include "tests.h" -#include "child.h" -#include "utils.h" - -#define EOL "\r\n" - -/* returns an activelock XML element. */ -static char *activelock(enum ne_lock_scope scope, - int depth, - const char *owner, - long timeout, - const char *token_href) -{ - static char buf[BUFSIZ]; - - ne_snprintf(buf, BUFSIZ, - "\n" - "\n" - "\n" - "%d\n" - "%s\n" - "Second-%ld\n" - "%s\n" - "", - scope==ne_lockscope_exclusive?"exclusive":"shared", - depth, owner, timeout, token_href); - - return buf; -} - -/* return body of LOCK response for given lock. */ -static char *lock_response(enum ne_lock_scope scope, - int depth, - const char *owner, - long timeout, - const char *token_href) -{ - static char buf[BUFSIZ]; - sprintf(buf, - "\n" - "" - "%s\n", - activelock(scope, depth, owner, timeout, token_href)); - return buf; -} - -/* return body of LOCK response where response gives multiple - * activelocks (i.e. shared locks). */ -static char *multi_lock_response(struct ne_lock **locks) -{ - ne_buffer *buf = ne_buffer_create(); - int n; - - ne_buffer_zappend(buf, - "\n" - "" - ""); - - for (n = 0; locks[n] != NULL; n++) { - char *lk = activelock(locks[n]->scope, locks[n]->depth, - locks[n]->owner, locks[n]->timeout, - locks[n]->token); - ne_buffer_zappend(buf, lk); - } - - ne_buffer_zappend(buf, ""); - return ne_buffer_finish(buf); -} - -static char *discover_response(const char *href, const struct ne_lock *lk) -{ - static char buf[BUFSIZ]; - ne_snprintf(buf, BUFSIZ, - "\n" - "\n" - "%s\n" - "%s\n" - "HTTP/1.1 200 OK\n" - "\n", - href, activelock(lk->scope, lk->depth, lk->owner, - 7200, lk->token)); - return buf; -} - -static struct ne_lock *make_lock(const char *path, const char *token, - enum ne_lock_scope scope, int depth) -{ - struct ne_lock *lock = ne_calloc(sizeof *lock); - - if (lock->token) lock->token = ne_strdup(token); - lock->scope = scope; - lock->depth = depth; - lock->uri.host = ne_strdup("localhost"); - lock->uri.scheme = ne_strdup("http"); - lock->uri.path = ne_strdup(path); - lock->uri.port = 7777; - - return lock; -} - -/* Tests for lock store handling. */ -static int store_single(void) -{ - ne_lock_store *store = ne_lockstore_create(); - struct ne_lock *lk = make_lock("/foo", "blah", ne_lockscope_exclusive, 0); - struct ne_lock *lk2; - - ONN("create failed", store == NULL); - - ONN("new lock store not empty", ne_lockstore_first(store) != NULL); - - ne_lockstore_add(store, lk); - - ONN("lock not found in store", ne_lockstore_first(store) != lk); - - ONN(">1 locks in store?", ne_lockstore_next(store) != NULL); - - lk2 = ne_lockstore_findbyuri(store, &lk->uri); - - ONN("lock not found by URI", lk2 == NULL); - ONN("other lock found by URI", lk2 != lk); - - ne_lockstore_remove(store, lk); - - ONN("store not empty after removing lock", - ne_lockstore_first(store) != NULL); - - ONN("lock still found after removing lock", - ne_lockstore_findbyuri(store, &lk->uri) != NULL); - - ne_lockstore_destroy(store); - ne_lock_destroy(lk); - - return OK; -} - -static int store_several(void) -{ - ne_lock_store *store = ne_lockstore_create(); - struct ne_lock *lk = make_lock("/foo", "blah", ne_lockscope_exclusive, 0); - struct ne_lock *lk2 = make_lock("/bar", "blee", ne_lockscope_exclusive, 0); - struct ne_lock *lf, *lf2; - - ONN("create failed", store == NULL); - - ne_lockstore_add(store, lk); - ne_lockstore_add(store, lk2); - - lf = ne_lockstore_first(store); - ONN("lock store empty", lf == NULL); - lf2 = ne_lockstore_next(store); - ONN("lock store >2 locks", ne_lockstore_next(store) != NULL); - - /* guarantee that _first, _next returned either of the - * combinations: (lf, lf2) or (lf2, lf) */ - ONN("found wrong locks", ((lf != lk && lf != lk2) || - (lf2 != lk && lf2 != lk2) || - (lf == lf2))); - - ONN("first find failed", - ne_lockstore_findbyuri(store, &lk->uri) != lk); - ONN("second find failed", - ne_lockstore_findbyuri(store, &lk2->uri) != lk2); - - ne_lockstore_remove(store, lk); - ne_lock_destroy(lk); - - ONN("remove left stray lock?", ne_lockstore_first(store) != lk2); - - ONN("remove left >1 lock?", ne_lockstore_next(store) != NULL); - - ne_lockstore_remove(store, lk2); - ne_lock_destroy(lk2); - - ONN("store not empty after removing all locks", - ne_lockstore_first(store) != NULL); - - ne_lockstore_destroy(store); - - return OK; -} - -/* regression test for <= 0.18.2, where timeout field was not parsed correctly. */ -static int lock_timeout(void) -{ - ne_session *sess; - char *resp, *rbody = lock_response(ne_lockscope_exclusive, 0, "me", - 6500, "opaquelocktoken:foo"); - struct ne_lock *lock = ne_lock_create(); - - resp = ne_concat("HTTP/1.1 200 OK\r\n" "Server: neon-test-server\r\n" - "Content-type: application/xml" EOL - "Lock-Token: " EOL - "Connection: close\r\n\r\n", rbody, NULL); - - CALL(make_session(&sess, single_serve_string, resp)); - ne_free(resp); - - ne_fill_server_uri(sess, &lock->uri); - lock->uri.path = ne_strdup("/foo"); - lock->timeout = 5; - - ONREQ(ne_lock(sess, lock)); - - ONN("lock timeout ignored in response", - lock->timeout != 6500); - - ne_session_destroy(sess); - ne_lock_destroy(lock); - - CALL(await_server()); - - return OK; -} - -static int verify_if; -static const char *verify_if_expect; - -static void got_if_header(char *value) -{ - verify_if = !strcmp(verify_if_expect, value); - NE_DEBUG(NE_DBG_HTTP, "Verified If header, %d: got [%s] expected [%s]\n", - verify_if, value, verify_if_expect); -} - -/* Server callback which checks that an If: header is recevied. */ -static int serve_verify_if(ne_socket *sock, void *userdata) -{ - /* tell us about If headers in the request. */ - want_header = "If"; - got_header = got_if_header; - verify_if_expect = userdata; - - verify_if = 0; - - CALL(discard_request(sock)); - - if (verify_if) { - ON(SEND_STRING(sock, "HTTP/1.1 200 OK" EOL)); - } else { - ON(SEND_STRING(sock, "HTTP/1.1 403 Wrong If Header" EOL)); - } - - ON(SEND_STRING(sock, "Connection: close" EOL EOL)); - - return OK; -} - -/* Make a request which will require a lock. */ -static int do_request(ne_session *sess, const char *path, int depth, - int modparent) -{ - ne_request *req = ne_request_create(sess, "RANDOM", path); - - if (depth > 0) { - ne_add_depth_header(req, depth); - } - - if (depth != -1) - ne_lock_using_resource(req, path, depth); - if (modparent) - ne_lock_using_parent(req, path); - - ONREQ(ne_request_dispatch(req)); - - ONV(ne_get_status(req)->code != 200, - ("request failed: %s", ne_get_error(sess))); - - ne_request_destroy(req); - - return OK; -} - -/* Tests If: header submission, for a lock of depth 'lockdepth' at - * 'lockpath', with a request to 'reqpath' which Depth header of - * 'reqdepth'. If modparent is non-zero; the request is flagged to - * modify the parent resource too. */ -static int submit_test(const char *lockpath, int lockdepth, - const char *reqpath, int reqdepth, - int modparent) -{ - ne_lock_store *store = ne_lockstore_create(); - ne_session *sess; - struct ne_lock *lk = ne_lock_create(); - char *expect_if; - int ret; - - expect_if = ne_concat(" ()", NULL); - CALL(make_session(&sess, serve_verify_if, expect_if)); - ne_free(expect_if); - - ne_fill_server_uri(sess, &lk->uri); - lk->uri.path = ne_strdup(lockpath); - lk->token = ne_strdup("somelocktoken"); - lk->depth = lockdepth; - - /* register the lock store, and add our lock for "/foo" to it. */ - ne_lockstore_register(store, sess); - ne_lockstore_add(store, lk); - - ret = do_request(sess, reqpath, reqdepth, modparent); - CALL(await_server()); - - ne_lockstore_destroy(store); - ne_session_destroy(sess); - - return ret; -} - -static int if_simple(void) -{ - return submit_test("/foo", 0, "/foo", 0, 0); -} - -static int if_under_infinite(void) -{ - return submit_test("/foo", NE_DEPTH_INFINITE, "/foo/bar", 0, 0); -} - -static int if_infinite_over(void) -{ - return submit_test("/foo/bar", 0, "/foo/", NE_DEPTH_INFINITE, 0); -} - -static int if_child(void) -{ - return submit_test("/foo/", 0, "/foo/bar", 0, 1); -} - -/* this is a special test, where the PARENT resource of "/foo/bar" is - * modified, but NOT "/foo/bar" itself. An UNLOCK request on a - * lock-null resource can do this; see ne_unlock() for the comment. - * Regression test for neon <= 0.19.3, which didn't handle this - * correctly. */ -static int if_covered_child(void) -{ - return submit_test("/", NE_DEPTH_INFINITE, "/foo/bar", -1, 1); -} - -static int serve_discovery(ne_socket *sock, void *userdata) -{ - char buf[BUFSIZ], *resp = userdata; - - ON(discard_request(sock)); - ONN("no PROPFIND body", clength == 0); - ON(ne_sock_read(sock, buf, clength) < 0); - ON(SEND_STRING(sock, "HTTP/1.0 207 OK" EOL - "Connection: close" EOL EOL)); - ON(SEND_STRING(sock, resp)); - return OK; -} - -struct result_args { - struct ne_lock *lock; - int result; -}; - -static int lock_compare(const char *ctx, - const struct ne_lock *a, const struct ne_lock *b) -{ - ONV(!a->uri.host || !a->uri.scheme || !a->uri.path, - ("URI structure incomplete in %s", ctx)); - ONV(ne_uri_cmp(&a->uri, &b->uri) != 0, - ("URI comparison failed for %s: %s not %s", ctx, - ne_uri_unparse(&a->uri), ne_uri_unparse(&b->uri))); - ONV(a->depth != b->depth, - ("%s depth was %d not %d", ctx, a->depth, b->depth)); - ONV(a->scope != b->scope, - ("%s scope was %d not %d", ctx, a->scope, b->scope)); - ONV(a->type != b->type, - ("%s type was %d not %d", ctx, a->type, b->type)); - return OK; -} - -static void discover_result(void *userdata, const struct ne_lock *lk, - const ne_uri *uri, const ne_status *st) -{ - struct result_args *args = userdata; - args->result = lock_compare("discovered lock", lk, args->lock); -} - -static int discover(void) -{ - ne_session *sess = ne_session_create("http", "localhost", 7777); - char *response; - int ret; - struct result_args args; - - args.lock = ne_lock_create(); - - args.lock->owner = ne_strdup("someowner"); - args.lock->token = ne_strdup("sometoken"); - - /* default */ - args.result = FAIL; - t_context("results callback never invoked"); - - ne_fill_server_uri(sess, &args.lock->uri); - args.lock->uri.path = ne_strdup("/lockme"); - - response = discover_response("/lockme", args.lock); - CALL(spawn_server(7777, serve_discovery, response)); - - ret = ne_lock_discover(sess, "/lockme", discover_result, &args); - CALL(await_server()); - ONREQ(ret); - - ne_lock_destroy(args.lock); - ne_session_destroy(sess); - - return args.result; -} - -/* Check that the token for the response header */ -static int lock_shared(void) -{ - ne_session *sess; - char *resp, *rbody; - struct ne_lock *lock, *resplocks[3]; - -#define FILLK(l, s) do { \ -(l)->token = strdup("opaquelocktoken:" s); \ -(l)->owner = strdup("owner " s); \ -(l)->uri.path = strdup("/" s); (l)->uri.host = strdup("localhost"); \ -(l)->uri.scheme = strdup("http"); (l)->uri.port = 7777; } while (0) - - resplocks[0] = ne_lock_create(); - resplocks[1] = ne_lock_create(); - resplocks[2] = NULL; - FILLK(resplocks[0], "alpha"); - FILLK(resplocks[1], "beta"); - resplocks[0]->timeout = 100; - resplocks[1]->timeout = 200; - - rbody = multi_lock_response(resplocks); - - resp = ne_concat("HTTP/1.1 200 OK\r\n" "Server: neon-test-server\r\n" - "Content-type: application/xml" EOL - "Lock-Token: " EOL - "Connection: close\r\n\r\n", rbody, NULL); - ne_free(rbody); - - CALL(make_session(&sess, single_serve_string, resp)); - ne_free(resp); - - lock = ne_lock_create(); - ne_fill_server_uri(sess, &lock->uri); - lock->uri.path = ne_strdup("/beta"); - - ONREQ(ne_lock(sess, lock)); - - CALL(await_server()); - - CALL(lock_compare("returned lock", resplocks[1], lock)); - - ne_session_destroy(sess); - ne_lock_destroy(lock); - ne_lock_destroy(resplocks[0]); - ne_lock_destroy(resplocks[1]); - - return OK; -} - -static void dummy_discover(void *userdata, const struct ne_lock *lock, - const ne_uri *uri, const ne_status *status) -{ -} - -/* This failed with neon 0.25.x and earlier when memory leak detection - * is enabled. */ -static int fail_discover(void) -{ - ne_session *sess; - int ret; - - CALL(make_session(&sess, single_serve_string, - "HTTP/1.0 207 OK\r\n" "Connection: close\r\n" "\r\n" - "\n" - "\n" - "/foo/bar\n" - "\n")); - - ret = ne_lock_discover(sess, "/foo", dummy_discover, NULL); - CALL(await_server()); - - ONN("discovery okay for response with invalid XML!?", ret != NE_ERROR); - - ne_session_destroy(sess); - return OK; -} - -static int no_creds(void *ud, const char *realm, int attempt, - char *username, char *password) -{ - return -1; -} - -static int fail_lockauth(void) -{ - ne_session *sess; - struct ne_lock *lock; - int ret; - struct many_serve_args args; - - args.str = "HTTP/1.1 401 Auth Denied\r\n" - "WWW-Authenticate: Basic realm=\"realm@host\"\r\n" - "Content-Length: 0\r\n" - "\r\n"; - args.count = 2; - - CALL(make_session(&sess, many_serve_string, &args)); - - ne_set_server_auth(sess, no_creds, NULL); - - lock = make_lock("/foo", NULL, ne_lockscope_exclusive, NE_DEPTH_ZERO); - ret = ne_lock(sess, lock); - ONV(ret != NE_AUTH, - ("attempt to lock did not fail with NE_AUTH: %d (%s)", - ret, ne_get_error(sess))); - ne_lock_destroy(lock); - - lock = make_lock("/bar", "fish", ne_lockscope_exclusive, NE_DEPTH_ZERO); - lock->token = ne_strdup("opaquelocktoken:gah"); - ret = ne_unlock(sess, lock); - ONV(ret != NE_AUTH, - ("attempt to unlock did not fail with NE_AUTH: %d (%s)", - ret, ne_get_error(sess))); - ne_lock_destroy(lock); - - CALL(await_server()); - ne_session_destroy(sess); - - return OK; -} - -/* Regression test for neon 0.25.0 regression in ne_lock() error - * handling. */ -static int fail_noheader(void) -{ - ne_session *sess; - char *resp, *rbody = lock_response(ne_lockscope_exclusive, 0, "me", - 6500, "opaquelocktoken:foo"); - struct ne_lock *lock = ne_lock_create(); - int ret; - - resp = ne_concat("HTTP/1.1 200 OK\r\n" "Server: neon-test-server\r\n" - "Content-type: application/xml" EOL - "Connection: close\r\n\r\n", rbody, NULL); - - CALL(make_session(&sess, single_serve_string, resp)); - ne_free(resp); - - ne_fill_server_uri(sess, &lock->uri); - lock->uri.path = ne_strdup("/foo"); - lock->timeout = NE_TIMEOUT_INFINITE; - - ret = ne_lock(sess, lock); - ONN("LOCK request did not fail", ret != NE_ERROR); - - ONV(strstr(ne_get_error(sess), - "LOCK response missing Lock-Token header") == NULL, - ("unexpected error: %s", ne_get_error(sess))); - - ne_session_destroy(sess); - ne_lock_destroy(lock); - - return await_server(); -} - -ne_test tests[] = { - T(lookup_localhost), - T(store_single), - T(store_several), - T(if_simple), - T(if_under_infinite), - T(if_infinite_over), - T(if_child), - T(if_covered_child), - T(lock_timeout), - T(lock_shared), - T(discover), - T(fail_discover), - T(fail_lockauth), - T(fail_noheader), - T(NULL) -}; - diff --git a/client/neon-0.27.2/test/makekeys.sh b/client/neon-0.27.2/test/makekeys.sh deleted file mode 100755 index dff78362a..000000000 --- a/client/neon-0.27.2/test/makekeys.sh +++ /dev/null @@ -1,175 +0,0 @@ -#!/bin/sh -# Helper script to create CA and server certificates. - -srcdir=${1-.} - -OPENSSL=${OPENSSL-openssl} -CONF=${srcdir}/openssl.conf -REQ="${OPENSSL} req -config ${CONF}" -CA="${OPENSSL} ca -config ${CONF} -batch" -# MKCERT makes a self-signed cert -MKCERT="${REQ} -x509 -new -days 900" - -REQDN=reqDN -STRMASK=default -export REQDN STRMASK - -set -ex - -mkdir ca -touch ca/index.txt -echo 01 > ca/serial - -${OPENSSL} genrsa -rand ${srcdir}/../configure > ca/key.pem -${OPENSSL} genrsa -rand ${srcdir}/../configure > client.key - -${MKCERT} -key ca/key.pem -out ca/cert.pem < T61String -csr_fields "`echo -e 'H\0350llo World'`" localhost | -${MKCERT} -key ${srcdir}/server.key -out t61subj.cert - -STRMASK=pkix # => BMPString -csr_fields "`echo -e 'H\0350llo World'`" localhost | -${MKCERT} -key ${srcdir}/server.key -out bmpsubj.cert - -STRMASK=utf8only # => UTF8String -csr_fields "`echo -e 'H\0350llo World'`" localhost | -${MKCERT} -key ${srcdir}/server.key -out utf8subj.cert - -STRMASK=default - -### produce a set of CA certs - -csr_fields "First Random CA" "first.example.com" "CAs Ltd." Lincoln Lincolnshire | \ -${MKCERT} -key ${srcdir}/server.key -out ca1.pem - -csr_fields "Second Random CA" "second.example.com" "CAs Ltd." Falmouth Cornwall | \ -${MKCERT} -key ${srcdir}/server.key -out ca2.pem - -csr_fields "Third Random CA" "third.example.com" "CAs Ltd." Ipswich Suffolk | \ -${MKCERT} -key ${srcdir}/server.key -out ca3.pem - -csr_fields "Fourth Random CA" "fourth.example.com" "CAs Ltd." Norwich Norfolk | \ -${MKCERT} -key ${srcdir}/server.key -out ca4.pem - -cat ca[1234].pem > calist.pem - -csr_fields "Wildcard Cert Dept" "*.example.com" | \ -${REQ} -new -key ${srcdir}/server.key -out wildcard.csr - -csr_fields "Neon Client Cert" ignored.example.com | \ -${REQ} -new -key client.key -out client.csr - -### requests using special DN. - -REQDN=reqDN.doubleCN -csr_fields "Double CN Dept" "nohost.example.com -localhost" | ${REQ} -new -key ${srcdir}/server.key -out twocn.csr - -REQDN=reqDN.CNfirst -echo localhost | ${REQ} -new -key ${srcdir}/server.key -out cnfirst.csr - -REQDN=reqDN.missingCN -echo GB | ${REQ} -new -key ${srcdir}/server.key -out missingcn.csr - -REQDN=reqDN.justEmail -echo blah@example.com | ${REQ} -new -key ${srcdir}/server.key -out justmail.csr - -# presume AVAs will come out in least->most specific order still... -REQDN=reqDN.twoOU -csr_fields "Second OU Dept -First OU Dept" | ${REQ} -new -key ${srcdir}/server.key -out twoou.csr - -### don't put ${REQ} invocations after here - -for f in server client twocn caseless cnfirst missingcn justmail twoou wildcard; do - ${CA} -days 900 -in ${f}.csr -out ${f}.cert -done - -for n in 1 2 3 4 5 6 7 8; do - ${CA} -extensions altExt${n} -days 900 \ - -in altname${n}.csr -out altname${n}.cert -done - -MKPKCS12="${OPENSSL} pkcs12 -export -passout stdin -in client.cert -inkey client.key" - -# generate a PKCS12 cert from the client cert: -passOUT because it's the -# passphrase on the OUTPUT cert, confusing... -echo foobar | ${MKPKCS12} -name "Just A Neon Client Cert" -out client.p12 - -# generate a PKCS#12 cert with no password and a friendly name -echo | ${MKPKCS12} -name "An Unencrypted Neon Client Cert" -out unclient.p12 - -# generate a PKCS#12 cert with no friendly name -echo | ${MKPKCS12} -out noclient.p12 - -# a PKCS#12 cert including a bundled CA cert -echo foobar | ${MKPKCS12} -certfile ca/cert.pem -name "A Neon Client Cert With CA" -out clientca.p12 - -### a file containing a complete chain - -cat ca/cert.pem server.cert > chain.pem diff --git a/client/neon-0.27.2/test/notvalid.pem b/client/neon-0.27.2/test/notvalid.pem deleted file mode 100644 index 42008b3aa..000000000 --- a/client/neon-0.27.2/test/notvalid.pem +++ /dev/null @@ -1,20 +0,0 @@ ------BEGIN CERTIFICATE----- -MIIDODCCAuKgAwIBAgIBADANBgkqhkiG9w0BAQQFADCBoTELMAkGA1UEBhMCR0Ix -FzAVBgNVBAgTDkNhbWJyaWRnZXNoaXJlMRIwEAYDVQQHEwlDYW1icmlkZ2UxGjAY -BgNVBAoTEU5lb24gSGFja2VycyBMdGQuMRUwEwYDVQQLEwxOZW9uIFFBIERlcHQx -EjAQBgNVBAMTCWxvY2FsaG9zdDEeMBwGCSqGSIb3DQEJARYPbmVvbkB3ZWJkYXYu -b3JnMB4XDTIzMTIyNzIwNDAyOVoXDTIzMTIyODIwNDAyOVowgaExCzAJBgNVBAYT -AkdCMRcwFQYDVQQIEw5DYW1icmlkZ2VzaGlyZTESMBAGA1UEBxMJQ2FtYnJpZGdl -MRowGAYDVQQKExFOZW9uIEhhY2tlcnMgTHRkLjEVMBMGA1UECxMMTmVvbiBRQSBE -ZXB0MRIwEAYDVQQDEwlsb2NhbGhvc3QxHjAcBgkqhkiG9w0BCQEWD25lb25Ad2Vi -ZGF2Lm9yZzBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDzRU5sZ8+CWQPvPkqJw9Kl -oEgT2FqzZR9RT/qbJuRBmRphiRr0g7JOh5Mr7LXaKShedFLhGidutyKKwIZJnRht -AgMBAAGjggEBMIH+MB0GA1UdDgQWBBRFA3ktzHSuD9uB6mJOWoElmOtknzCBzgYD -VR0jBIHGMIHDgBRFA3ktzHSuD9uB6mJOWoElmOtkn6GBp6SBpDCBoTELMAkGA1UE -BhMCR0IxFzAVBgNVBAgTDkNhbWJyaWRnZXNoaXJlMRIwEAYDVQQHEwlDYW1icmlk -Z2UxGjAYBgNVBAoTEU5lb24gSGFja2VycyBMdGQuMRUwEwYDVQQLEwxOZW9uIFFB -IERlcHQxEjAQBgNVBAMTCWxvY2FsaG9zdDEeMBwGCSqGSIb3DQEJARYPbmVvbkB3 -ZWJkYXYub3JnggEAMAwGA1UdEwQFMAMBAf8wDQYJKoZIhvcNAQEEBQADQQA80TYV -2F4QLveuldmxGoIOq5hHGxCR6aVsdtm4PGY49R5/ObCAgdWw/JV/Tc448JAz5QvU -ahr1x9kA4Vo5NZ4q ------END CERTIFICATE----- diff --git a/client/neon-0.27.2/test/openssl.conf b/client/neon-0.27.2/test/openssl.conf deleted file mode 100644 index 4a3a8b8a7..000000000 --- a/client/neon-0.27.2/test/openssl.conf +++ /dev/null @@ -1,104 +0,0 @@ -[ca] -default_ca = neonca - -[neonca] -dir = ./ca -database = $dir/index.txt -new_certs_dir = $dir -certificate = $dir/cert.pem -serial = $dir/serial -private_key = $dir/key.pem -policy = policy_any -default_md = md5 -x509_extensions = issuedExt - -[policy_any] -countryName = optional -stateOrProvinceName = optional -localityName = optional -organizationName = optional -organizationalUnitName = optional -commonName = optional -emailAddress = optional - -[req] -distinguished_name = $ENV::REQDN -x509_extensions = caExt -string_mask = $ENV::STRMASK - -[caExt] -basicConstraints = CA:true - -[issuedExt] -basicConstraints = CA:false - -# subjectAltName extension sections -[altExt1] -subjectAltName = DNS:localhost - -# 2+3: AltNames with multiple entries to test the matching logic -[altExt2] -subjectAltName = DNS:nohost.example.com, DNS:localhost - -[altExt3] -subjectAltName = DNS:localhost, DNS:nohost.example.com - -# an AltName with no DNS entries; should use commonName instead for -# identity check -[altExt4] -subjectAltName = email:neon@webdav.org - -# an AltName with IP address -[altExt5] -subjectAltName = IP:127.0.0.1 - -# an AltName with a bad IP address -[altExt6] -subjectAltName = IP:1.2.3.4 - -# an AltName with a good URI -[altExt7] -subjectAltName = URI:https://localhost:7777/ - -# an AltName with a bad URI -[altExt8] -subjectAltName = URI:http://nohost.example.com/ - -[reqDN] -countryName = Country Name -stateOrProvinceName = State or Province Name -localityName = Locality Name -organizationName = Organization Name -organizationalUnitName = Organizational Unit Name -commonName = Common Name (eg, your name or your server\'s hostname) -emailAddress = Email Address - -# a DN which gives two commonName attributes. -[reqDN.doubleCN] -countryName = Country Name -stateOrProvinceName = State or Province Name -localityName = Locality Name -organizationName = Organization Name -organizationalUnitName = Organizational Unit Name -0.commonName = Common Name -1.commonName = Common Name -emailAddress = Email Address - -[reqDN.twoOU] -countryName = Country Name -stateOrProvinceName = State or Province Name -localityName = Locality Name -organizationName = Organization Name -0.organizationalUnitName = Organizational Unit Name -1.organizationalUnitName = Organizational Unit Name -commonName = Common Name (eg, your name or your server\'s hostname) -emailAddress = Email Address - -[reqDN.CNfirst] -commonName = Common Name - -[reqDN.missingCN] -countryName = CountryName - -[reqDN.justEmail] -emailAddress = CountryName diff --git a/client/neon-0.27.2/test/props.c b/client/neon-0.27.2/test/props.c deleted file mode 100644 index c3aaee972..000000000 --- a/client/neon-0.27.2/test/props.c +++ /dev/null @@ -1,672 +0,0 @@ -/* - Tests for property handling - Copyright (C) 2002-2006, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "ne_props.h" - -#include "tests.h" -#include "child.h" -#include "utils.h" - -static const ne_propname p_alpha = {"DAV:", "alpha"}, - p_beta = {"http://webdav.org/random/namespace", "beta"}, - p_delta = {NULL, "delta"}; - -/* Tests little except that ne_proppatch() doesn't segfault. */ -static int patch_simple(void) -{ - ne_session *sess; - ne_proppatch_operation ops[] = { - { &p_alpha, ne_propset, "fish" }, - { &p_beta, ne_propremove, NULL }, - { NULL, ne_propset, NULL } - }; - - CALL(make_session(&sess, single_serve_string, - "HTTP/1.1 200 Goferit\r\n" - "Connection: close\r\n\r\n")); - ONREQ(ne_proppatch(sess, "/fish", ops)); - ne_session_destroy(sess); - return await_server(); -} - -#define RESP207 "HTTP/1.0 207 Stuff\r\n" "Server: foo\r\n\r\n" - -static void dummy_results(void *ud, const ne_uri *uri, - const ne_prop_result_set *rset) -{ - NE_DEBUG(NE_DBG_HTTP, "dummy_results.\n"); -} - -/* Regression tests for propfind bodies which caused segfaults. */ -static int regress(void) -{ - static const char *bodies[] = { - RESP207 "\n" - "" - "" - "" - "", - - /* segfaults with neon <= 0.23.5 */ - RESP207 "" - "/foo/" - "" - "HTTP/1.1 404 Not Found" - "", - - /* format string handling with neon <= 0.24.4 */ - RESP207 "" - "/foo/" - "" - "%s%s%s%s" - "", - - NULL, - }; - ne_session *sess; - int n; - - for (n = 0; bodies[n] != NULL; n++) { - CALL(make_session(&sess, single_serve_string, (void *)bodies[n])); - ne_simple_propfind(sess, "/", 0, NULL, dummy_results, NULL); - ne_session_destroy(sess); - CALL(await_server()); - } - - return OK; -} - -static int patch_regress(void) -{ - static const char *bodies[] = { - /* format string handling bugs with neon <= 0.24.4 */ - RESP207 "" - "/foo/" - "HTTP/1.1 500 Bad Voodoo" - "%s%s%s%s" - "", - - RESP207 "" - "/foo/" - "HTTP/1.1 %s%s%s%s", - - NULL - }; - ne_session *sess; - int n; - static const ne_propname pn = { "DAV:", "foobar" }; - ne_proppatch_operation pops[] = { - { &pn, ne_propset, "fish" }, - { NULL, ne_propset, NULL } - }; - - for (n = 0; bodies[n] != NULL; n++) { - CALL(make_session(&sess, single_serve_string, (void *)bodies[n])); - ne_proppatch(sess, "/", pops); - ne_session_destroy(sess); - CALL(await_server()); - } - - return OK; -} - -static int pstat_count; - -/* tos_*: set of 207 callbacks which serialize the data back into a - * text stream, which can be easily checked for correctness. */ -static void *tos_startresp(void *buf, const ne_uri *uri) -{ - ne_buffer_concat(buf, "start-resp[", uri->path, "];", NULL); - pstat_count = 0; - return ne_strdup(uri->path); -} - -static void tos_status_descr(ne_buffer *buf, const ne_status *status, - const char *description) -{ - if (status) { - char s[50]; - ne_snprintf(s, sizeof s, "-status={%d %s}", status->code, - status->reason_phrase); - ne_buffer_zappend(buf, s); - } - if (description) - ne_buffer_concat(buf, "-descr={", description, "}", NULL); -} - -static void tos_endresp(void *buf, void *response, - const ne_status *status, const char *description) -{ - char *href = response; - ne_buffer_concat(buf, "end-resp[", href, "]", NULL); - ne_free(href); - tos_status_descr(buf, status, description); - ne_buffer_zappend(buf, ";"); -} - -static void *tos_startpstat(void *buf, void *resphref) -{ - char num[20], *href; - sprintf(num, "-%d", ++pstat_count); - href = ne_concat(resphref, num, NULL); - ne_buffer_concat(buf, "start-pstat[", href, "];", NULL); - return href; -} - -static void tos_endpstat(void *buf, void *href, - const ne_status *status, const char *description) -{ - ne_buffer_concat(buf, "end-pstat[", href, "]", NULL); - tos_status_descr(buf, status, description); - ne_buffer_zappend(buf, ";"); - ne_free(href); -} - -struct propctx { - ne_207_parser *p207; - ne_buffer *buf; -}; - -#define STATE_myprop (NE_PROPS_STATE_TOP) - -static int tos_startprop(void *userdata, int parent, - const char *nspace, const char *name, - const char **atts) -{ - if (parent == NE_207_STATE_PROP && - strcmp(nspace, "DAV:") == 0 && - (strcmp(name, "propone") == 0 || strcmp(name, "proptwo") == 0)) { - /* Handle this! */ - struct propctx *ctx = userdata; - char *resphref = ne_207_get_current_response(ctx->p207); - char *pstathref = ne_207_get_current_propstat(ctx->p207); - - ne_buffer_concat(ctx->buf, "start-prop[", resphref, ",", pstathref, - ",", name, "];", NULL); - - return STATE_myprop; - } else { - return NE_XML_DECLINE; - } -} - -static int tos_cdata(void *userdata, int state, - const char *cdata, size_t len) -{ - struct propctx *ctx = userdata; - - ne_buffer_zappend(ctx->buf, "cdata-prop["); - ne_buffer_append(ctx->buf, cdata, len); - ne_buffer_zappend(ctx->buf, "];"); - return 0; -} - -static int tos_endprop(void *userdata, int state, - const char *nspace, const char *name) -{ - struct propctx *ctx = userdata; - - ne_buffer_concat(ctx->buf, "end-prop[", name, "];", NULL); - return 0; -} - - -static int run_207_response(char *resp, const char *expected) -{ - ne_buffer *buf = ne_buffer_create(); - ne_session *sess = ne_session_create("http", "localhost", 7777); - ne_xml_parser *p = ne_xml_create(); - ne_207_parser *p207; - ne_request *req = ne_request_create(sess, "PROPFIND", "/foo"); - ne_uri base = {0}; - struct propctx ctx; - - ne_fill_server_uri(sess, &base); - base.path = ne_strdup("/foo"); - p207 = ne_207_create(p, &base, buf); - ne_uri_free(&base); - - ne_add_response_body_reader(req, ne_accept_207, ne_xml_parse_v, p); - - ne_207_set_response_handlers(p207, tos_startresp, tos_endresp); - ne_207_set_propstat_handlers(p207, tos_startpstat, tos_endpstat); - - ctx.buf = buf; - ctx.p207 = p207; - ne_xml_push_handler(p, tos_startprop, tos_cdata, tos_endprop, &ctx); - - CALL(spawn_server(7777, single_serve_string, resp)); - - ONREQ(ne_request_dispatch(req)); - - CALL(await_server()); - - ONV(ne_xml_failed(p), - ("parse error in response body: %s", ne_xml_get_error(p))); - - ONV(strcmp(buf->data, expected), - ("comparison failed.\n" - "expected string: `%s'\n" - "got string: `%s'", expected, buf->data)); - - ne_buffer_destroy(buf); - ne_207_destroy(p207); - ne_xml_destroy(p); - ne_request_destroy(req); - ne_session_destroy(sess); - return OK; -} - -/* Macros for easily writing a 207 response body; all expand to - * a string literal. */ -#define MULTI_207(x) "HTTP/1.0 207 Foo\r\nConnection: close\r\n\r\n" \ -"\r\n" \ -"" x "" -#define RESP_207(href, x) "" href "" x \ -"" -#define PSTAT_207(x) "" x "" -#define STAT_207(s) "HTTP/1.1 " s "" -#define DESCR_207(d) "" d "" -#define DESCR_REM "The end of the world, as we know it" - -#define PROPS_207(x) "" x "" -#define APROP_207(n, c) "" c "" - -/* Tests for the 207 interface: send a 207 response body, compare the - * re-serialized string returned with that expected. */ -static int two_oh_seven(void) -{ - static char *ts[][2] = { - { MULTI_207(RESP_207("/foo", "")), - "start-resp[/foo];end-resp[/foo];" }, - - /* test for response status handling */ - { MULTI_207(RESP_207("/bar", STAT_207("200 OK"))), - "start-resp[/bar];end-resp[/bar]-status={200 OK};" }, - - /* test that empty description == NULL description argument */ - { MULTI_207(RESP_207("/bar", STAT_207("200 OK") DESCR_207(""))), - "start-resp[/bar];end-resp[/bar]-status={200 OK};" }, - - /* test multiple responses */ - { MULTI_207(RESP_207("/hello/world", STAT_207("200 OK")) - RESP_207("/foo/bar", STAT_207("999 French Fries"))), - "start-resp[/hello/world];end-resp[/hello/world]-status={200 OK};" - "start-resp[/foo/bar];end-resp[/foo/bar]" - "-status={999 French Fries};" - }, - - /* test multiple propstats in mulitple responses */ - { MULTI_207(RESP_207("/al/pha", - PSTAT_207(STAT_207("321 Une")) - PSTAT_207(STAT_207("432 Deux")) - PSTAT_207(STAT_207("543 Trois"))) - RESP_207("/be/ta", - PSTAT_207(STAT_207("787 Quatre")) - PSTAT_207(STAT_207("878 Cinq")))), - "start-resp[/al/pha];" - "start-pstat[/al/pha-1];end-pstat[/al/pha-1]-status={321 Une};" - "start-pstat[/al/pha-2];end-pstat[/al/pha-2]-status={432 Deux};" - "start-pstat[/al/pha-3];end-pstat[/al/pha-3]-status={543 Trois};" - "end-resp[/al/pha];" - "start-resp[/be/ta];" - "start-pstat[/be/ta-1];end-pstat[/be/ta-1]-status={787 Quatre};" - "start-pstat[/be/ta-2];end-pstat[/be/ta-2]-status={878 Cinq};" - "end-resp[/be/ta];" - }, - - /* test that incomplete responses are completely ignored. */ - { MULTI_207("" - RESP_207("/", STAT_207("123 Hoorah")) - "" - "hello" - "" - RESP_207("/bar", STAT_207("200 OK"))), - "start-resp[/];end-resp[/]-status={123 Hoorah};" - "start-resp[/bar];end-resp[/bar]-status={200 OK};" }, - - /* tests for propstat status */ - { MULTI_207(RESP_207("/pstat", - PSTAT_207("" STAT_207("666 Doomed")))), - "start-resp[/pstat];start-pstat[/pstat-1];" - "end-pstat[/pstat-1]-status={666 Doomed};end-resp[/pstat];" }, - - { MULTI_207(RESP_207("/pstat", PSTAT_207(""))), - "start-resp[/pstat];start-pstat[/pstat-1];" - "end-pstat[/pstat-1];end-resp[/pstat];" }, - - /* tests for responsedescription handling */ - { MULTI_207(RESP_207("/bar", STAT_207("200 OK") DESCR_207(DESCR_REM))), - "start-resp[/bar];end-resp[/bar]-status={200 OK}" - "-descr={" DESCR_REM "};" }, - - { MULTI_207(RESP_207("/bar", - PSTAT_207(STAT_207("456 Too Hungry") - DESCR_207("Not enough food available")) - STAT_207("200 OK") DESCR_207("Not " DESCR_REM))), - "start-resp[/bar];" - "start-pstat[/bar-1];end-pstat[/bar-1]-status={456 Too Hungry}" - "-descr={Not enough food available};" - "end-resp[/bar]-status={200 OK}-descr={Not " DESCR_REM "};" }, - - /* intermingle some random elements and cdata to make sure - * they are ignored. */ - { MULTI_207("blargl" - RESP_207("/bar", "" - PSTAT_207("blergl") - STAT_207("200 OK") "foop" - DESCR_207(DESCR_REM) "carroon") - "carapi"), - "start-resp[/bar];start-pstat[/bar-1];end-pstat[/bar-1];" - "end-resp[/bar]-status={200 OK}-descr={" DESCR_REM "};" }, - - /* test for properties within a 207. */ - { MULTI_207(RESP_207("/alpha", - PSTAT_207(PROPS_207( - APROP_207("propone", "hello") - APROP_207("proptwo", "foobar")) - STAT_207("200 OK")))), - "start-resp[/alpha];start-pstat[/alpha-1];" - "start-prop[/alpha,/alpha-1,propone];cdata-prop[hello];" - "end-prop[propone];" - "start-prop[/alpha,/alpha-1,proptwo];cdata-prop[foobar];" - "end-prop[proptwo];" - "end-pstat[/alpha-1]-status={200 OK};end-resp[/alpha];" } - - }; - size_t n; - - for (n = 0; n < sizeof(ts)/sizeof(ts[0]); n++) - CALL(run_207_response(ts[n][0], ts[n][1])); - - return OK; -} - -/* Serialize propfind result callbacks into a string */ -static int simple_iterator(void *buf, const ne_propname *name, - const char *value, const ne_status *st) -{ - char code[20]; - ne_buffer_concat(buf, "prop:[{", name->nspace, ",", - name->name, "}=", NULL); - if (value) - ne_buffer_concat(buf, "'", value, "'", NULL); - else - ne_buffer_zappend(buf, "#novalue#"); - sprintf(code, ":{%d ", st->code); - if (st->reason_phrase) - ne_buffer_concat(buf, code, st->reason_phrase, "}];", NULL); - else - ne_buffer_concat(buf, code, "#noreason#}];", NULL); - return 0; -} - -static void simple_results(void *buf, const ne_uri *uri, - const ne_prop_result_set *rset) -{ - ne_buffer_concat(buf, "results(", uri->path, ",", NULL); - ne_propset_iterate(rset, simple_iterator, buf); - ne_buffer_czappend(buf, ")//"); -} - -/* Test function to compare two long strings and print a digestible - * failure message. */ -static int diffcmp(const char *expected, const char *actual) -{ - size_t n; - - if (!strcmp(expected, actual)) return OK; - - NE_DEBUG(NE_DBG_HTTP, - "diffcmp: Expect: [%s]\n" - "diffcmp: Actual: [%s]\n", - expected, actual); - - for (n = 0; expected[n] && actual[n]; n++) { - if (expected[n] != actual[n]) { - t_context("difference at byte %" NE_FMT_SIZE_T ": " - "`%.10s...' not `%.10s...'", - n, actual+n, expected+n); - break; - } - } - - return FAIL; -} - -/* PROPFIND creator callback. */ -static void *pf_creator(void *userdata, const ne_uri *uri) -{ - ne_buffer *buf = userdata; - - NE_DEBUG(NE_DBG_HTTP, "pf: Creator at %s\n", uri->path); - - ne_buffer_concat(buf, "creator[", uri->path, "]//", NULL); - - return ne_strdup(uri->path); -} - -/* PROPFIND destructor callback. */ -static void pf_destructor(void *userdata, void *private) -{ - ne_buffer *buf = userdata; - char *cookie = private; - - NE_DEBUG(NE_DBG_HTTP, "pf: Destructor at %s\n", cookie); - - ne_buffer_concat(buf, "destructor[", cookie, "]//", NULL); - - ne_free(cookie); -} - - -/* PROPFIND test type. */ -enum pftype { - PF_SIMPLE, /* using ne_simple_propfind */ - PF_NAMED, /* using ne_propfind_named */ - PF_ALLPROP /* using ne_propfind_allprop */ -}; - -static int run_propfind(const ne_propname *props, char *resp, - int depth, const char *expected, enum pftype type) -{ - ne_session *sess; - ne_buffer *buf = ne_buffer_create(); - - CALL(make_session(&sess, single_serve_string, resp)); - - if (type == PF_SIMPLE) { - ONREQ(ne_simple_propfind(sess, "/propfind", depth, props, - simple_results, buf)); - } - else { - ne_propfind_handler *hdl; - - hdl = ne_propfind_create(sess, "/propfind", depth); - - ne_propfind_set_private(hdl, pf_creator, pf_destructor, - buf); - - if (type == PF_NAMED) { - ONREQ(ne_propfind_named(hdl, props, simple_results, buf)); - } - else { - ONREQ(ne_propfind_allprop(hdl, simple_results, buf)); - } - - ne_propfind_destroy(hdl); - } - - ne_session_destroy(sess); - CALL(await_server()); - - CALL(diffcmp(expected, buf->data)); - - ne_buffer_destroy(buf); - return OK; -} - -/* a PROPFIND response body for the {DAV:}fishbone property, using - * given property value and status. */ -#define FISHBONE_RESP(value, status) MULTI_207(RESP_207("/foop", \ - PSTAT_207(PROPS_207(APROP_207("fishbone", value)) \ - STAT_207(status)))) - -static int propfind(void) -{ - static const struct { - char *resp; - const char *expected; - int depth; - enum pftype type; - } ts[] = { - /* simple single property. */ - { FISHBONE_RESP("hello, world", "212 Well OK"), - "results(/foop,prop:[{DAV:,fishbone}='hello, world':{212 Well OK}];)//", - 0, PF_SIMPLE }, - /* property with some nested elements. */ - { FISHBONE_RESP("this is a property fish value", - "299 Just About OK"), - "results(/foop,prop:[{DAV:,fishbone}=" - "'this is a property " - "fish value':" - "{299 Just About OK}];)//", - 0, PF_SIMPLE }, - - /* failed to fetch a property. */ - { FISHBONE_RESP("property value is ignored", - "404 Il n'ya pas de property"), - "results(/foop,prop:[{DAV:,fishbone}=#novalue#:" - "{404 Il n'ya pas de property}];)//", - 0, PF_SIMPLE }, - -#if 0 - /* propstat missing status should be ignored; if a response contains no - * valid propstats, it should also be ignored. */ - { MULTI_207(RESP_207("/alpha", PSTAT_207(APROP_207("fishbone", "unseen"))) - RESP_207("/beta", PSTAT_207(APROP_207("fishbone", "hello, world") - STAT_207("200 OK")))), - "results(/beta,prop:[{DAV:,fishbone}='hello, world':{200 OK}];)//", 0, - PF_SIMPLE }, -#endif - - /* props on several resources */ - { MULTI_207(RESP_207("/alpha", - PSTAT_207(PROPS_207(APROP_207("fishbone", "strike one")) - STAT_207("234 First is OK"))) - RESP_207("/beta", - PSTAT_207(PROPS_207(APROP_207("fishbone", "strike two")) - STAT_207("256 Second is OK")))), - "results(/alpha,prop:[{DAV:,fishbone}='strike one':{234 First is OK}];)//" - "results(/beta,prop:[{DAV:,fishbone}='strike two':{256 Second is OK}];)//", - 0, PF_SIMPLE}, - - /* whitespace handling. */ - { MULTI_207(RESP_207("\r\nhttp://localhost:7777/alpha ", - PSTAT_207(PROPS_207(APROP_207("alpha", "beta")) - "\r\nHTTP/1.1 200 OK "))), - "results(/alpha,prop:[{DAV:,alpha}='beta':{200 OK}];)//", - 0, PF_SIMPLE}, - - /* "complex" propfinds. */ - - { FISHBONE_RESP("hello, world", "212 Well OK"), - "creator[/foop]//" - "results(/foop,prop:[{DAV:,fishbone}='hello, world':{212 Well OK}];)//" - "destructor[/foop]//", - 0, PF_NAMED } - - }; - const ne_propname pset1[] = { - { "DAV:", "fishbone", }, - { NULL, NULL } - }; - size_t n; - - for (n = 0; n < sizeof(ts)/sizeof(ts[0]); n++) { - const ne_propname *pset = pset1; - - CALL(run_propfind(pset, ts[n].resp, ts[n].depth, - ts[n].expected, ts[n].type)); - } - - - return OK; -} - -static int unbounded_response(const char *header, const char *repeats) -{ - ne_session *sess; - struct infinite i = { header, repeats}; - int dbg; - - CALL(make_session(&sess, serve_infinite, &i)); - - dbg = ne_debug_mask; - - ONN("unbounded PROPFIND response did not fail", - ne_simple_propfind(sess, "/", 0, NULL, - dummy_results, NULL) != NE_ERROR); - - CALL(reap_server()); - ne_session_destroy(sess); - return OK; -} - -static int unbounded_propstats(void) -{ - return unbounded_response( - RESP207 "\n" - "" - "/", - ""); -} - -static int unbounded_props(void) -{ - return unbounded_response( - RESP207 "\n" - "" - "/", - "hello, world"); -} - -ne_test tests[] = { - T(two_oh_seven), - T(patch_simple), - T(propfind), - T(regress), - T(patch_regress), - T(unbounded_props), - T(unbounded_propstats), - T(NULL) -}; - diff --git a/client/neon-0.27.2/test/redirect.c b/client/neon-0.27.2/test/redirect.c deleted file mode 100644 index 80b23bb7c..000000000 --- a/client/neon-0.27.2/test/redirect.c +++ /dev/null @@ -1,189 +0,0 @@ -/* - Tests for 3xx redirect interface (ne_redirect.h) - Copyright (C) 2002-2003, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "ne_redirect.h" - -#include "tests.h" -#include "child.h" -#include "utils.h" - -struct redir_args { - int code; - const char *dest; - const char *path; -}; - -static int serve_redir(ne_socket *sock, void *ud) -{ - struct redir_args *args = ud; - char buf[BUFSIZ]; - - CALL(discard_request(sock)); - - ne_snprintf(buf, BUFSIZ, - "HTTP/1.0 %d Get Ye Away\r\n" - "Content-Length: 0\r\n" - "Location: %s\r\n\n", - args->code, args->dest); - - SEND_STRING(sock, buf); - - return OK; -} - -/* Run a request to 'path' and retrieve the redirect destination to - * *redir. */ -static int process_redir(ne_session *sess, const char *path, - const ne_uri **redir) -{ - ONN("did not get NE_REDIRECT", any_request(sess, path) != NE_REDIRECT); - *redir = ne_redirect_location(sess); - return OK; -} - -static int check_redir(struct redir_args *args, const char *expect) -{ - ne_session *sess; - const ne_uri *loc; - char *unp; - - CALL(make_session(&sess, serve_redir, args)); - ne_redirect_register(sess); - - CALL(process_redir(sess, args->path, &loc)); - ONN("redirect location was NULL", loc == NULL); - - unp = ne_uri_unparse(loc); - ONV(strcmp(unp, expect), ("redirected to `%s' not `%s'", unp, expect)); - ne_free(unp); - - ne_session_destroy(sess); - CALL(await_server()); - - return OK; -} - -#define DEST "http://foo.com/blah/blah/bar" -#define PATH "/redir/me" - -static int simple(void) -{ - struct redir_args args[] = { - {301, DEST, PATH}, - {302, DEST, PATH}, - {303, DEST, PATH}, - {307, DEST, PATH}, - {0, NULL, NULL} - }; - int n; - - for (n = 0; args[n].code; n++) - CALL(check_redir(&args[n], DEST)); - - return OK; -} - -/* check that a non-absoluteURI is qualified properly */ -static int non_absolute(void) -{ - struct redir_args args = {302, "/foo/bar/blah", PATH}; - return check_redir(&args, "http://localhost:7777/foo/bar/blah"); -} - -static int relative_1(void) -{ - struct redir_args args = {302, "norman", "/foo/bar"}; - return check_redir(&args, "http://localhost:7777/foo/norman"); -} - -static int relative_2(void) -{ - struct redir_args args = {302, "wishbone", "/foo/bar/"}; - return check_redir(&args, "http://localhost:7777/foo/bar/wishbone"); -} - -#if 0 -/* could implement failure on self-referential redirects, but - * realistically, the application must implement a max-redirs count - * check, so it's kind of redundant. Mozilla takes this approach. */ -static int fail_loop(void) -{ - ne_session *sess; - - CALL(make_session(&sess, serve_redir, "http://localhost:7777/foo/bar")); - - ne_redirect_register(sess); - - ONN("followed looping redirect", - any_request(sess, "/foo/bar") != NE_ERROR); - - ne_session_destroy(sess); - return OK; -} -#endif - -/* ensure that ne_redirect_location returns NULL when no redirect has - * been encountered, or redirect hooks aren't registered. */ -static int no_redirect(void) -{ - ne_session *sess = ne_session_create("http", "localhost", 7777); - const ne_uri *loc; - - ONN("redirect non-NULL before register", ne_redirect_location(sess)); - ne_redirect_register(sess); - ONN("initial redirect non-NULL", ne_redirect_location(sess)); - - CALL(spawn_server(7777, single_serve_string, - "HTTP/1.0 200 OK\r\n\r\n\r\n")); - ONREQ(any_request(sess, "/noredir")); - CALL(await_server()); - - ONN("redirect non-NULL after non-redir req", ne_redirect_location(sess)); - - CALL(spawn_server(7777, single_serve_string, "HTTP/1.0 302 Get Ye Away\r\n" - "Location: /blah\r\n" "\r\n")); - CALL(process_redir(sess, "/foo", &loc)); - CALL(await_server()); - - ne_session_destroy(sess); - return OK; -} - -ne_test tests[] = { - T(lookup_localhost), - T(simple), - T(non_absolute), - T(relative_1), - T(relative_2), - T(no_redirect), - T(NULL) -}; - diff --git a/client/neon-0.27.2/test/request.c b/client/neon-0.27.2/test/request.c deleted file mode 100644 index 98db4e7d9..000000000 --- a/client/neon-0.27.2/test/request.c +++ /dev/null @@ -1,2161 +0,0 @@ -/* - HTTP request handling tests - Copyright (C) 2001-2007, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#include /* for time() */ - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif -#include - -#include "ne_request.h" -#include "ne_socket.h" - -#include "tests.h" -#include "child.h" -#include "utils.h" - -static char buffer[BUFSIZ]; - -static ne_session *def_sess; -static ne_request *def_req; - -static int prepare_request(server_fn fn, void *ud) -{ - static char uri[100]; - - def_sess = ne_session_create("http", "localhost", 7777); - - sprintf(uri, "/test%d", test_num); - - def_req = ne_request_create(def_sess, "GET", uri); - - CALL(spawn_server(7777, fn, ud)); - - return OK; -} - -static int finish_request(void) -{ - ne_request_destroy(def_req); - ne_session_destroy(def_sess); - return await_server(); -} - -#define RESP200 "HTTP/1.1 200 OK\r\n" "Server: neon-test-server\r\n" -#define TE_CHUNKED "Transfer-Encoding: chunked\r\n" - -/* takes response body chunks and appends them to a buffer. */ -static int collector(void *ud, const char *data, size_t len) -{ - ne_buffer *buf = ud; - ne_buffer_append(buf, data, len); - return 0; -} - -typedef ne_request *(*construct_request)(ne_session *sess, void *userdata); - -/* construct a get request, callback for run_request. */ -static ne_request *construct_get(ne_session *sess, void *userdata) -{ - ne_request *r = ne_request_create(sess, "GET", "/"); - ne_buffer *buf = userdata; - - ne_add_response_body_reader(r, ne_accept_2xx, collector, buf); - - return r; -} - -/* run a request created by callback 'cb' in session 'sess'. */ -static int run_request(ne_session *sess, int status, - construct_request cb, void *userdata) -{ - ne_request *req = cb(sess, userdata); - - ON(req == NULL); - - ONREQ(ne_request_dispatch(req)); - - ONV(ne_get_status(req)->code != status, - ("response status-code was %d not %d", - ne_get_status(req)->code, status)); - - ne_request_destroy(req); - - return OK; -} - -/* Runs a server function 'fn', expecting to get a header 'name' with - * value 'value' in the response. If 'value' is NULL, expects that - * *no* header of that name is present. */ -static int expect_header_value(const char *name, const char *value, - server_fn fn, void *userdata) -{ - ne_session *sess; - ne_request *req; - const char *gotval; - - CALL(make_session(&sess, fn, userdata)); - - req = ne_request_create(sess, "FOO", "/bar"); - ONREQ(ne_request_dispatch(req)); - CALL(await_server()); - - gotval = ne_get_response_header(req, name); - ONV(value && !gotval, ("header '%s: %s' not sent", name, value)); - ONV(!value && gotval, ("header '%s: %s' not expected", name, gotval)); - - ONV(value && gotval && strcmp(gotval, value), - ("header '%s' mis-match: got '%s' not '%s'", - name, gotval, value)); - - ne_request_destroy(req); - ne_session_destroy(sess); - - return OK; -} - -/* runs a server function 'fn', expecting response body to be equal to - * 'expect' */ -static int expect_response(const char *expect, server_fn fn, void *userdata) -{ - ne_session *sess = ne_session_create("http", "localhost", 7777); - ne_buffer *buf = ne_buffer_create(); - - ON(sess == NULL || buf == NULL); - ON(spawn_server(7777, fn, userdata)); - - CALL(run_request(sess, 200, construct_get, buf)); - - ON(await_server()); - - ONN("response body match", strcmp(buf->data, expect)); - - ne_session_destroy(sess); - ne_buffer_destroy(buf); - - return OK; -} - -#define EMPTY_RESP RESP200 "Content-Length: 0\r\n\r\n" - -/* Process a request with given method and response, expecting to get - * a zero-length response body. A second request is sent down the - * connection (to ensure that the response isn't silently eaten), so - * 'resp' must be an HTTP/1.1 response with no 'Connection: close' - * header. */ -static int expect_no_body(const char *method, const char *resp) -{ - ne_session *sess = ne_session_create("http", "localhost", 7777); - ne_request *req = ne_request_create(sess, method, "/first"); - ssize_t ret; - char *r = ne_malloc(strlen(resp) + sizeof(EMPTY_RESP)); - - strcpy(r, resp); - strcat(r, EMPTY_RESP); - ON(spawn_server(7777, single_serve_string, r)); - ne_free(r); - - ONN("failed to begin request", ne_begin_request(req)); - ret = ne_read_response_block(req, buffer, BUFSIZ); - ONV(ret != 0, ("got response block of size %" NE_FMT_SSIZE_T, ret)); - ONN("failed to end request", ne_end_request(req)); - - /* process following request; makes sure that nothing extra has - * been eaten by the first request. */ - ONV(any_request(sess, "/second"), - ("second request on connection failed: %s",ne_get_error(sess))); - - ON(await_server()); - - ne_request_destroy(req); - ne_session_destroy(sess); - return OK; -} - -static int reason_phrase(void) -{ - ne_session *sess; - - CALL(make_session(&sess, single_serve_string, RESP200 - "Connection: close\r\n\r\n")); - CALL(any_request(sess, "/foo")); - CALL(await_server()); - - ONV(strcmp(ne_get_error(sess), "200 OK"), - ("reason phrase mismatch: got `%s' not `200 OK'", - ne_get_error(sess))); - - ne_session_destroy(sess); - return OK; -} - -static int single_get_eof(void) -{ - return expect_response("a", single_serve_string, - RESP200 - "Connection: close\r\n" - "\r\n" - "a"); -} - -static int single_get_clength(void) -{ - return expect_response("a", single_serve_string, - RESP200 - "Content-Length: 1\r\n" - "\r\n" - "a" - "bbbbbbbbasdasd"); -} - -static int single_get_chunked(void) -{ - return expect_response("a", single_serve_string, - RESP200 TE_CHUNKED - "\r\n" - "1\r\n" - "a\r\n" - "0\r\n" "\r\n" - "g;lkjalskdjalksjd"); -} - -static int no_body_304(void) -{ - return expect_no_body("GET", "HTTP/1.1 304 Not Mfodified\r\n" - "Content-Length: 5\r\n\r\n"); -} - -static int no_body_204(void) -{ - return expect_no_body("GET", "HTTP/1.1 204 Not Modified\r\n" - "Content-Length: 5\r\n\r\n"); -} - -static int no_body_HEAD(void) -{ - return expect_no_body("HEAD", "HTTP/1.1 200 OK\r\n" - "Content-Length: 5\r\n\r\n"); -} - -static int no_body_empty_clength(void) -{ - return expect_no_body("GET", "HTTP/1.1 200 OK\r\n" - "Content-Length:\r\n\r\n"); -} - -static int no_body_bad_clength(void) -{ - return expect_no_body("GET", "HTTP/1.1 200 OK\r\n" - "Content-Length: foobar\r\n\r\n"); -} - -static int no_headers(void) -{ - return expect_response("abcde", single_serve_string, - "HTTP/1.1 200 OK\r\n\r\n" - "abcde"); -} - -#define CHUNK(len, data) #len "\r\n" data "\r\n" - -#define ABCDE_CHUNKS CHUNK(1, "a") CHUNK(1, "b") \ - CHUNK(1, "c") CHUNK(1, "d") \ - CHUNK(1, "e") CHUNK(0, "") - -static int chunks(void) -{ - /* lots of little chunks. */ - return expect_response("abcde", single_serve_string, - RESP200 TE_CHUNKED - "\r\n" - ABCDE_CHUNKS); -} - -static int te_header(void) -{ - return expect_response("abcde", single_serve_string, - RESP200 "Transfer-Encoding: CHUNKED\r\n" - "\r\n" ABCDE_CHUNKS); -} - -static int te_identity(void) -{ - /* http://bugzilla.gnome.org/show_bug.cgi?id=310636 says privoxy - * uses the "identity" transfer-coding. */ - return expect_response("abcde", single_serve_string, - RESP200 "Transfer-Encoding: identity\r\n" - "Content-Length: 5\r\n" - "\r\n" - "abcde"); -} - -static int chunk_numeric(void) -{ - /* leading zero's */ - return expect_response("0123456789abcdef", single_serve_string, - RESP200 TE_CHUNKED - "\r\n" - "000000010\r\n" "0123456789abcdef\r\n" - "000000000\r\n" "\r\n"); -} - -static int chunk_extensions(void) -{ - /* chunk-extensions. */ - return expect_response("0123456789abcdef", single_serve_string, - RESP200 TE_CHUNKED - "\r\n" - "000000010; foo=bar; norm=fish\r\n" - "0123456789abcdef\r\n" - "000000000\r\n" "\r\n"); -} - -static int chunk_trailers(void) -{ - /* trailers. */ - return expect_response("abcde", single_serve_string, - RESP200 TE_CHUNKED - "\r\n" - "00000005; foo=bar; norm=fish\r\n" - "abcde\r\n" - "000000000\r\n" - "X-Hello: world\r\n" - "X-Another: header\r\n" - "\r\n"); -} - -static int chunk_oversize(void) -{ -#define BIG (20000) - char *body = ne_malloc(BIG + 1); - static const char rnd[] = "abcdefghijklm"; - int n; - ne_buffer *buf = ne_buffer_create(); - - for (n = 0; n < BIG; n++) { - body[n] = rnd[n % (sizeof(rnd) - 1)]; - } - body[n] = '\0'; -#undef BIG - - ne_buffer_concat(buf, RESP200 TE_CHUNKED "\r\n" - "4E20\r\n", body, "\r\n", - "0\r\n\r\n", NULL); - - CALL(expect_response(body, single_serve_string, buf->data)); - - ne_buffer_destroy(buf); - ne_free(body); - - return OK; -} - -static int te_over_clength(void) -{ - /* T-E dominates over C-L. */ - return expect_response("abcde", single_serve_string, - RESP200 TE_CHUNKED - "Content-Length: 300\r\n" - "\r\n" - ABCDE_CHUNKS); -} - -/* te_over_clength with the headers the other way round; check for - * ordering problems. */ -static int te_over_clength2(void) -{ - return expect_response("abcde", single_serve_string, - RESP200 "Content-Length: 300\r\n" - TE_CHUNKED - "\r\n" - ABCDE_CHUNKS); -} - -/* obscure case which is possibly a valid request by 2616, but should - * be handled correctly in any case. neon <0.22.0 tries to - * eat the response body, which is probably incorrect. */ -static int no_body_chunks(void) -{ - return expect_no_body("HEAD", "HTTP/1.1 204 Not Modified\r\n" - TE_CHUNKED "\r\n"); -} - -static int serve_twice(ne_socket *sock, void *userdata) -{ - const char *resp = userdata; - - CALL(discard_request(sock)); - SEND_STRING(sock, resp); - - CALL(discard_request(sock)); - SEND_STRING(sock, resp); - - return OK; -} - -/* Test persistent connection handling: serve 'response' twice on a - * single TCP connection, expecting to get a response body equal to - * 'body' both times. */ -static int test_persist(const char *response, const char *body) -{ - ne_session *sess = ne_session_create("http", "localhost", 7777); - ne_buffer *buf = ne_buffer_create(); - - ON(sess == NULL || buf == NULL); - ON(spawn_server(7777, serve_twice, (char *)response)); - - CALL(run_request(sess, 200, construct_get, buf)); - - ONV(strcmp(buf->data, body), - ("response #1 mismatch: [%s] not [%s]", buf->data, body)); - - /* Run it again. */ - ne_buffer_clear(buf); - CALL(run_request(sess, 200, construct_get, buf)); - - ON(await_server()); - - ONV(strcmp(buf->data, body), - ("response #2 mismatch: [%s] not [%s]", buf->data, body)); - - ne_session_destroy(sess); - ne_buffer_destroy(buf); - - return OK; -} - -static int persist_http11(void) -{ - return test_persist(RESP200 "Content-Length: 5\r\n\r\n" "abcde", - "abcde"); -} - -static int persist_chunked(void) -{ - return test_persist(RESP200 TE_CHUNKED "\r\n" ABCDE_CHUNKS, - "abcde"); -} - -static int persist_http10(void) -{ - return test_persist("HTTP/1.0 200 OK\r\n" - "Connection: keep-alive\r\n" - "Content-Length: 5\r\n\r\n" "abcde", - "abcde"); -} - -/* Server function for fail_early_eof */ -static int serve_eof(ne_socket *sock, void *ud) -{ - const char *resp = ud; - - /* dummy request/response. */ - CALL(discard_request(sock)); - CALL(SEND_STRING(sock, RESP200 "Content-Length: 0\r\n\r\n")); - /* real request/response. */ - CALL(discard_request(sock)); - CALL(SEND_STRING(sock, resp)); - - return OK; -} - -/* Utility function: 'resp' is a truncated response; such that an EOF - * arrives early during response processing; but NOT as a valid - * premature EOF due to a persistent connection timeout. It is an - * error if the request is then retried, and the test fails. */ -static int fail_early_eof(const char *resp) -{ - ne_session *sess = ne_session_create("http", "localhost", 7777); - - CALL(spawn_server_repeat(7777, serve_eof, (char *)resp, 3)); - - ONREQ(any_request(sess, "/foo")); - ONN("request retried after early EOF", - any_request(sess, "/foobar") == NE_OK); - - CALL(reap_server()); - ne_session_destroy(sess); - return OK; -} - -/* This failed with neon <0.22. */ -static int fail_eof_continued(void) -{ - return fail_early_eof("HTTP/1.1 100 OK\r\n\r\n"); -} - -static int fail_eof_headers(void) -{ - return fail_early_eof("HTTP/1.1 200 OK\r\nJimbob\r\n"); -} - -static int fail_eof_chunk(void) -{ - return fail_early_eof(RESP200 TE_CHUNKED "\r\n" "1\r\n" "a"); -} - -static int fail_eof_badclen(void) -{ - return fail_early_eof(RESP200 "Content-Length: 10\r\n\r\n" "abcde"); -} - -/* Persistent connection timeout where a FIN is sent to terminate the - * connection, which is caught by a 0 return from the read() when the - * second request reads the status-line. */ -static int ptimeout_eof(void) -{ - ne_session *sess = ne_session_create("http", "localhost", 7777); - - CALL(spawn_server_repeat(7777, single_serve_string, - RESP200 "Content-Length: 0\r\n" "\r\n", 4)); - - CALL(any_2xx_request(sess, "/first")); - CALL(any_2xx_request(sess, "/second")); - - ONN("server died prematurely?", dead_server()); - reap_server(); - - ne_session_destroy(sess); - return OK; -} - -/* Persistent connection timeout where a FIN is sent to terminate the - * connection, but the request fails in the write() call which sends - * the body. */ -static int ptimeout_eof2(void) -{ - ne_session *sess = ne_session_create("http", "localhost", 7777); - - CALL(spawn_server_repeat(7777, single_serve_string, - RESP200 "Content-Length: 0\r\n" "\r\n", 4)); - - CALL(any_2xx_request(sess, "/first")); - minisleep(); - CALL(any_2xx_request_body(sess, "/second")); - - ONN("server died prematurely?", dead_server()); - reap_server(); - - ne_session_destroy(sess); - return OK; -} - -/* TODO: add a ptimeout_reset too, if an RST can be reliably generated - * mid-connection. */ - -/* Emulates a persistent connection timeout on the server. This tests - * the timeout occuring after between 1 and 10 requests down the - * connection. */ -static int persist_timeout(void) -{ - ne_session *sess = ne_session_create("http", "localhost", 7777); - ne_buffer *buf = ne_buffer_create(); - int n; - struct many_serve_args args; - - ON(sess == NULL || buf == NULL); - - args.str = RESP200 "Content-Length: 5\r\n\r\n" "abcde"; - - for (args.count = 1; args.count < 10; args.count++) { - - ON(spawn_server(7777, many_serve_string, &args)); - - for (n = 0; n < args.count; n++) { - - ONV(run_request(sess, 200, construct_get, buf), - ("%d of %d, request failed: %s", n, args.count, - ne_get_error(sess))); - - ONV(strcmp(buf->data, "abcde"), - ("%d of %d, response body mismatch", n, args.count)); - - /* Ready for next time. */ - ne_buffer_clear(buf); - } - - ON(await_server()); - - } - - ne_session_destroy(sess); - ne_buffer_destroy(buf); - - return OK; -} - -/* Test that an HTTP/1.0 server is not presumed to support persistent - * connections by default. */ -static int no_persist_http10(void) -{ - ne_session *sess = ne_session_create("http", "localhost", 7777); - - CALL(spawn_server_repeat(7777, single_serve_string, - "HTTP/1.0 200 OK\r\n" - "Content-Length: 5\r\n\r\n" - "abcde" - "Hello, world - what a nice day!\r\n", - 4)); - - /* if the connection is treated as persistent, the status-line for - * the second request will be "Hello, world...", which will - * fail. */ - - ONREQ(any_request(sess, "/foobar")); - ONREQ(any_request(sess, "/foobar")); - - ONN("server died prematurely?", dead_server()); - CALL(reap_server()); - ne_session_destroy(sess); - return OK; -} - -static int ignore_bad_headers(void) -{ - return expect_response("abcde", single_serve_string, - RESP200 - "Stupid Header\r\n" - "ReallyStupidHeader\r\n" - "Content-Length: 5\r\n" - "\r\n" - "abcde"); -} - -static int fold_headers(void) -{ - return expect_response("abcde", single_serve_string, - RESP200 "Content-Length: \r\n 5\r\n" - "\r\n" - "abcde"); -} - -static int fold_many_headers(void) -{ - return expect_response("abcde", single_serve_string, - RESP200 "Content-Length: \r\n \r\n \r\n \r\n 5\r\n" - "\r\n" - "abcde"); -} - -#define NO_BODY "Content-Length: 0\r\n\r\n" - -static int empty_header(void) -{ - return expect_header_value("ranDom-HEader", "", - single_serve_string, - RESP200 "RANDom-HeADEr:\r\n" - NO_BODY); -} - -static int ignore_header_case(void) -{ - return expect_header_value("ranDom-HEader", "noddy", - single_serve_string, - RESP200 "RANDom-HeADEr: noddy\r\n" - NO_BODY); -} - -static int ignore_header_ws(void) -{ - return expect_header_value("ranDom-HEader", "fishy", - single_serve_string, - RESP200 "RANDom-HeADEr: fishy\r\n" - NO_BODY); -} - -static int ignore_header_ws2(void) -{ - return expect_header_value("ranDom-HEader", "fishy", - single_serve_string, - RESP200 "RANDom-HeADEr \t : fishy\r\n" - NO_BODY); -} - -static int ignore_header_ws3(void) -{ - return expect_header_value("ranDom-HEader", "fishy", - single_serve_string, - RESP200 "RANDom-HeADEr: fishy \r\n" - NO_BODY); -} - -static int ignore_header_tabs(void) -{ - return expect_header_value("ranDom-HEader", "geezer", - single_serve_string, - RESP200 "RANDom-HeADEr: \t \tgeezer\r\n" - NO_BODY); -} - -static int trailing_header(void) -{ - return expect_header_value("gONe", "fishing", - single_serve_string, - RESP200 TE_CHUNKED - "\r\n0\r\n" - "Hello: world\r\n" - "GONE: fishing\r\n" - "\r\n"); -} - -static int continued_header(void) -{ - return expect_header_value("hello", "w o r l d", single_serve_string, - RESP200 "Hello: \n\tw\r\n\to r l\r\n\td \r\n" - NO_BODY); -} - -/* check headers callbacks are working correctly. */ -static int multi_header(void) -{ - return expect_header_value("X-Header", "jim, jab, jar", - single_serve_string, - RESP200 - "X-Header: jim\r\n" - "x-header: jab\r\n" - "x-Header: jar\r\n" - "Content-Length: 0\r\n\r\n"); -} - -/* check headers callbacks are working correctly. */ -static int multi_header2(void) -{ - return expect_header_value("X-Header", "jim, jab, jar", - single_serve_string, - RESP200 - "X-Header: jim \r\n" - "x-header: jab \r\n" - "x-Header: jar \r\n" - "Content-Length: 0\r\n\r\n"); -} - -/* RFC 2616 14.10: headers listed in Connection must be stripped on - * receiving an HTTP/1.0 message in case there was a pre-1.1 proxy - * somewhere. */ -static int strip_http10_connhdr(void) -{ - return expect_header_value("X-Widget", NULL, - single_serve_string, - "HTTP/1.0 200 OK\r\n" - "Connection: x-widget\r\n" - "x-widget: blah\r\n" - "Content-Length: 0\r\n" - "\r\n"); -} - -static int strip_http10_connhdr2(void) -{ - return expect_header_value("X-Widget", NULL, - single_serve_string, - "HTTP/1.0 200 OK\r\n" - "Connection: connection, x-fish, x-widget\r\n" - "x-widget: blah\r\n" - "Content-Length: 0\r\n" - "\r\n"); -} - -static int post_send_retry(ne_request *req, void *userdata, - const ne_status *status) -{ - return status->code == 400 ? NE_RETRY : NE_OK; -} - -/* Test that the stored response headers are forgotten if the request - * is retried. */ -static int reset_headers(void) -{ - ne_session *sess; - ne_request *req; - const char *value; - - CALL(make_session(&sess, single_serve_string, - "HTTP/1.1 400 Hit me again\r\n" - "Content-Length: 0\r\n" - "X-Foo: bar\r\n" "\r\n" - - "HTTP/1.1 200 Thank you kindly\r\n" - "Content-Length: 0\r\n" - "X-Foo: hello fair world\r\n" "\r\n")); - - ne_hook_post_send(sess, post_send_retry, NULL); - - req = ne_request_create(sess, "GET", "/foo"); - - ONREQ(ne_request_dispatch(req)); - - value = ne_get_response_header(req, "X-Foo"); - ONCMP("hello fair world", value, "response header", "X-Foo"); - - ne_request_destroy(req); - ne_session_destroy(sess); - CALL(await_server()); - - return OK; -} - -static int iterate_none(void) -{ - ne_session *sess; - ne_request *req; - - CALL(make_session(&sess, single_serve_string, - "HTTP/1.0 200 OK\r\n\r\n")); - - req = ne_request_create(sess, "GET", "/"); - ONREQ(ne_request_dispatch(req)); - - ONN("iterator was not NULL for no headers", - ne_response_header_iterate(req, NULL, NULL, NULL) != NULL); - - CALL(await_server()); - ne_request_destroy(req); - ne_session_destroy(sess); - - return OK; -} - -#define MANY_HEADERS (90) - -static int iterate_many(void) -{ - ne_request *req; - ne_buffer *buf = ne_buffer_create(); - ne_session *sess; - int n; - struct header { - char name[10], value[10]; - int seen; - } hdrs[MANY_HEADERS]; - void *cursor = NULL; - const char *name, *value; - - ne_buffer_czappend(buf, "HTTP/1.0 200 OK\r\n"); - - for (n = 0; n < MANY_HEADERS; n++) { - sprintf(hdrs[n].name, "x-%d", n); - sprintf(hdrs[n].value, "Y-%d", n); - hdrs[n].seen = 0; - - ne_buffer_concat(buf, hdrs[n].name, ": ", hdrs[n].value, "\r\n", NULL); - } - - ne_buffer_czappend(buf, "\r\n"); - - CALL(make_session(&sess, single_serve_string, buf->data)); - - req = ne_request_create(sess, "GET", "/foo"); - ONREQ(ne_request_dispatch(req)); - - while ((cursor = ne_response_header_iterate(req, cursor, &name, &value))) { - n = -1; - - ONV(strncmp(name, "x-", 2) || strncmp(value, "Y-", 2) - || strcmp(name + 2, value + 2) - || (n = atoi(name + 2)) >= MANY_HEADERS - || n < 0, - ("bad name/value pair: %s = %s", name, value)); - - NE_DEBUG(NE_DBG_HTTP, "iterate: got pair (%d): %s = %s\n", - n, name, value); - - ONV(hdrs[n].seen == 1, ("duplicate pair %d", n)); - hdrs[n].seen = 1; - } - - for (n = 0; n < MANY_HEADERS; n++) { - ONV(hdrs[n].seen == 0, ("unseen pair %d", n)); - } - - ne_buffer_destroy(buf); - ne_request_destroy(req); - ne_session_destroy(sess); - CALL(await_server()); - - return OK; -} - - -struct s1xx_args { - int count; - int hdrs; -}; - -static int serve_1xx(ne_socket *sock, void *ud) -{ - struct s1xx_args *args = ud; - CALL(discard_request(sock)); - - do { - if (args->hdrs) { - SEND_STRING(sock, "HTTP/1.1 100 Continue\r\n" - "Random: header\r\n" - "Another: header\r\n\r\n"); - } else { - SEND_STRING(sock, "HTTP/1.1 100 Continue\r\n\r\n"); - } - } while (--args->count > 0); - - SEND_STRING(sock, RESP200 "Content-Length: 0\r\n\r\n"); - - return OK; -} - -#define sess def_sess - -static int skip_interim_1xx(void) -{ - struct s1xx_args args = {0, 0}; - ON(prepare_request(serve_1xx, &args)); - ONREQ(ne_request_dispatch(def_req)); - return finish_request(); -} - -static int skip_many_1xx(void) -{ - struct s1xx_args args = {5, 0}; - ON(prepare_request(serve_1xx, &args)); - ONREQ(ne_request_dispatch(def_req)); - return finish_request(); -} - -static int skip_1xx_hdrs(void) -{ - struct s1xx_args args = {5, 5}; - ON(prepare_request(serve_1xx, &args)); - ONREQ(ne_request_dispatch(def_req)); - return finish_request(); -} - -#undef sess - -/* server for expect_100_once: serves a 100-continue request, and - * fails if the request body is sent twice. */ -static int serve_100_once(ne_socket *sock, void *ud) -{ - struct s1xx_args args = {2, 0}; - char ch; - CALL(serve_1xx(sock, &args)); - CALL(discard_body(sock)); - ONN("body was served twice", ne_sock_read(sock, &ch, 1) == 1); - return OK; -} - -/* regression test; fails with neon <0.22, where the request body was - * served *every* time a 1xx response was received, rather than just - * once. */ -static int expect_100_once(void) -{ - ne_session *sess; - ne_request *req; - char body[BUFSIZ]; - - CALL(make_session(&sess, serve_100_once, NULL)); - - req = ne_request_create(sess, "GET", "/foo"); - ne_set_request_flag(req, NE_REQFLAG_EXPECT100, 1); - ONN("expect100 flag ignored", - ne_get_request_flag(req, NE_REQFLAG_EXPECT100) != 1); - memset(body, 'A', sizeof(body)); - ne_set_request_body_buffer(req, body, sizeof(body)); - ONREQ(ne_request_dispatch(req)); - ne_request_destroy(req); - ne_session_destroy(sess); - CALL(await_server()); - return OK; -} - -/* regression test for enabling 100-continue without sending a body. */ -static int expect_100_nobody(void) -{ - ne_session *sess; - ne_request *req; - - CALL(make_session(&sess, serve_100_once, NULL)); - - req = ne_request_create(sess, "GET", "/foo"); - ne_set_request_flag(req, NE_REQFLAG_EXPECT100, 1); - ONREQ(ne_request_dispatch(req)); - ne_request_destroy(req); - ne_session_destroy(sess); - - return await_server(); -} - -struct body { - char *body; - size_t size; -}; - -static int want_body(ne_socket *sock, void *userdata) -{ - struct body *b = userdata; - char *buf = ne_malloc(b->size); - - clength = 0; - CALL(discard_request(sock)); - ONN("request has c-l header", clength == 0); - - ONN("request length", clength != (int)b->size); - - NE_DEBUG(NE_DBG_HTTP, - "reading body of %" NE_FMT_SIZE_T " bytes...\n", b->size); - - ON(ne_sock_fullread(sock, buf, b->size)); - - ON(SEND_STRING(sock, RESP200 "Content-Length: 0\r\n\r\n")); - - ON(memcmp(buf, b->body, b->size)); - - ne_free(buf); - return OK; -} - -static ssize_t provide_body(void *userdata, char *buf, size_t buflen) -{ - static const char *pnt; - static size_t left; - struct body *b = userdata; - - if (buflen == 0) { - pnt = b->body; - left = b->size; - } else { - if (left < buflen) buflen = left; - memcpy(buf, pnt, buflen); - left -= buflen; - } - - return buflen; -} - -static int send_bodies(void) -{ - unsigned int n, m; - - struct body bodies[] = { - { "abcde", 5 }, - { "\0\0\0\0\0\0", 6 }, - { NULL, 50000 }, - { NULL } - }; - -#define BIG 2 - /* make the body with some cruft. */ - bodies[BIG].body = ne_malloc(bodies[BIG].size); - for (n = 0; n < bodies[BIG].size; n++) { - bodies[BIG].body[n] = (char)n%80; - } - - for (m = 0; m < 2; m++) { - for (n = 0; bodies[n].body != NULL; n++) { - ne_session *sess = ne_session_create("http", "localhost", 7777); - ne_request *req; - - ON(sess == NULL); - ON(spawn_server(7777, want_body, &(bodies[n]))); - - req = ne_request_create(sess, "PUT", "/"); - ON(req == NULL); - - if (m == 0) { - ne_set_request_body_buffer(req, bodies[n].body, bodies[n].size); - } else { - ne_set_request_body_provider(req, bodies[n].size, - provide_body, &bodies[n]); - } - - ONREQ(ne_request_dispatch(req)); - - CALL(await_server()); - - ne_request_destroy(req); - ne_session_destroy(sess); - } - } - - ne_free(bodies[BIG].body); - return OK; -} - -/* Utility function: run a request using the given server fn, and the - * request should fail. If 'error' is non-NULL, it must be a substring - * of the error string. */ -static int fail_request_with_error(int with_body, server_fn fn, void *ud, - int forever, const char *error) -{ - ne_session *sess = ne_session_create("http", "localhost", 7777); - ne_request *req; - int ret; - - ON(sess == NULL); - - if (forever) { - ON(spawn_server_repeat(7777, fn, ud, 100)); - } else { - ON(spawn_server(7777, fn, ud)); - } - - req = ne_request_create(sess, "GET", "/"); - ON(req == NULL); - - if (with_body) { - static const char *body = "random stuff"; - - ne_set_request_body_buffer(req, body, strlen(body)); - } - - /* request should fail. */ - ret = ne_request_dispatch(req); - ONN("request succeeded", ret == NE_OK); - - if (!forever) { - /* reap the server, don't care what it's doing. */ - reap_server(); - } - - NE_DEBUG(NE_DBG_HTTP, "Response gave error `%s'\n", ne_get_error(sess)); - - ONV(error && strstr(ne_get_error(sess), error) == NULL, - ("failed with error `%s', no `%s'", ne_get_error(sess), error)); - - if (!forever) - ONV(any_request(sess, "/fail/to/connect") != NE_CONNECT, - ("subsequent request re-used connection?")); - - ne_request_destroy(req); - ne_session_destroy(sess); - - return OK; -} - -/* Run a random GET request which is given 'body' as the response; the - * request must fail, and 'error' must be found in the error - * string. */ -static int invalid_response_gives_error(const char *resp, const char *error) -{ - return fail_request_with_error(0, single_serve_string, (void *)resp, 0, error); -} - -/* Utility function: run a request using the given server fn, and the - * request must fail. */ -static int fail_request(int with_body, server_fn fn, void *ud, int forever) -{ - return fail_request_with_error(with_body, fn, ud, forever, NULL); -} - -static int unbounded_headers(void) -{ - struct infinite i = { RESP200, "x-foo: bar\r\n" }; - return fail_request(0, serve_infinite, &i, 0); -} - -static int blank_response(void) -{ - return fail_request(0, single_serve_string, "\r\n", 0); -} - -static int serve_non_http(ne_socket *sock, void *ud) -{ - SEND_STRING(sock, "Hello Mum.\n"); - ne_sock_readline(sock, buffer, BUFSIZ); - return OK; -} - -/* Test behaviour when not speaking to an HTTP server. Regression test - * for infinite loop. */ -static int not_http(void) -{ - return fail_request(0, serve_non_http, NULL, 0); -} - -static int unbounded_folding(void) -{ - struct infinite i = { "HTTP/1.0 200 OK\r\nFoo: bar\r\n", - " hello there.\r\n" }; - return fail_request(0, serve_infinite, &i, 0); -} - -static int serve_close(ne_socket *sock, void *ud) -{ - /* do nothing; the socket will be closed. */ - return 0; -} - -/* Returns non-zero if port is alive. */ -static int is_alive(int port) -{ - ne_sock_addr *addr; - ne_socket *sock = ne_sock_create(); - const ne_inet_addr *ia; - int connected = 0; - - addr = ne_addr_resolve("localhost", 0); - for (ia = ne_addr_first(addr); ia && !connected; ia = ne_addr_next(addr)) - connected = ne_sock_connect(sock, ia, 7777) == 0; - ne_addr_destroy(addr); - if (sock == NULL) - return 0; - else { - ne_sock_close(sock); - return 1; - } -} - -/* This is a regression test for neon 0.17.0 and earlier, which goes - * into an infinite loop if a request with a body is sent to a server - * which simply closes the connection. */ -static int closed_connection(void) -{ - int ret; - - /* This spawns a server process which will run the 'serve_close' - * response function 200 times, then die. This guarantees that the - * request eventually fails... */ - CALL(fail_request(1, serve_close, NULL, 1)); - /* if server died -> infinite loop was detected. */ - ret = !is_alive(7777); - reap_server(); - ONN("server aborted, infinite loop?", ret); - return OK; -} - -static int serve_close2(ne_socket *sock, void *userdata) -{ - int *count = userdata; - *count += 1; - if (*count == 1) - return 0; - NE_DEBUG(NE_DBG_HTTP, "Re-entered! Buggy client.\n"); - CALL(discard_request(sock)); - CALL(SEND_STRING(sock, RESP200 "Content-Length: 0\r\n\r\n")); - return 0; -} - -/* As closed_connection(); but check that the client doesn't retry - * after receiving the EOF on the first request down a new - * connection. */ -static int close_not_retried(void) -{ - int count = 0; - ne_session *sess = ne_session_create("http", "localhost", 7777); - CALL(spawn_server_repeat(7777, serve_close2, &count, 3)); - ONN("request was retried after EOF", any_request(sess, "/foo") == NE_OK); - reap_server(); - ne_session_destroy(sess); - return OK; -} - -static enum { - prog_error, /* error */ - prog_transfer, /* doing a transfer */ - prog_done /* finished. */ -} prog_state = prog_transfer; - -static ne_off_t prog_last = -1, prog_total; - -#define FOFF "%" NE_FMT_NE_OFF_T - -/* callback for send_progress. */ -static void s_progress(void *userdata, ne_off_t prog, ne_off_t total) -{ - NE_DEBUG(NE_DBG_HTTP, - "progress callback: " FOFF "/" FOFF ".\n", - prog, total); - - switch (prog_state) { - case prog_error: - case prog_done: - return; - case prog_transfer: - if (total != prog_total) { - t_context("total unexpected: " FOFF " not " FOFF "", total, prog_total); - prog_state = prog_error; - } - else if (prog > total) { - t_context("first progress was invalid (" FOFF "/" FOFF ")", prog, total); - prog_state = prog_error; - } - else if (prog_last != -1 && prog_last > prog) { - t_context("progess went backwards: " FOFF " to " FOFF, prog_last, prog); - prog_state = prog_error; - } - else if (prog_last == prog) { - t_context("no progress made! " FOFF " to " FOFF, prog_last, prog); - prog_state = prog_error; - } - else if (prog == total) { - prog_state = prog_done; - } - break; - } - - prog_last = prog; -} - -#undef FOFF - -static ssize_t provide_progress(void *userdata, char *buf, size_t bufsiz) -{ - int *count = userdata; - - if (*count >= 0 && buf != NULL) { - buf[0] = 'a'; - *count -= 1; - return 1; - } else { - return 0; - } -} - -static int send_progress(void) -{ - static int count = 200; - - ON(prepare_request(single_serve_string, - RESP200 "Connection: close\r\n\r\n")); - - prog_total = 200; - - ne_set_progress(def_sess, s_progress, NULL); - ne_set_request_body_provider(def_req, count, - provide_progress, &count); - -#define sess def_sess - ONREQ(ne_request_dispatch(def_req)); -#undef sess - - ON(finish_request()); - - CALL(prog_state == prog_error); - - return OK; -} - -static int read_timeout(void) -{ - ne_session *sess; - ne_request *req; - time_t start, finish; - int ret; - - CALL(make_session(&sess, sleepy_server, NULL)); - - /* timeout after one second. */ - ne_set_read_timeout(sess, 1); - - req = ne_request_create(sess, "GET", "/timeout"); - - time(&start); - ret = ne_request_dispatch(req); - time(&finish); - - reap_server(); - - ONN("request succeeded, should have timed out", ret == NE_OK); - ONV(ret != NE_TIMEOUT, - ("request failed non-timeout error: %s", ne_get_error(sess))); - ONN("timeout ignored, or very slow machine", finish - start > 3); - - ne_request_destroy(req); - ne_session_destroy(sess); - - return OK; -} - -/* expect failure code 'code', for request to given hostname and port, - * without running a server. */ -static int fail_noserver(const char *hostname, unsigned int port, int code) -{ - ne_session *sess = ne_session_create("http", hostname, port); - int ret = any_request(sess, "/foo"); - ne_session_destroy(sess); - - ONV(ret == NE_OK, - ("request to server at %s:%u succeded?!", hostname, port)); - ONV(ret != code, ("request failed with %d not %d", ret, code)); - - return OK; -} - -static int fail_lookup(void) -{ - return fail_noserver("no.such.domain", 7777, NE_LOOKUP); -} - -/* neon 0.23.0 to 0.23.3: if a nameserver lookup failed, subsequent - * requests on the session would crash. */ -static int fail_double_lookup(void) -{ - ne_session *sess = ne_session_create("http", "nonesuch.invalid", 80); - ONN("request did not give lookup failure", - any_request(sess, "/foo") != NE_LOOKUP); - ONN("second request did not give lookup failure", - any_request(sess, "/bar") != NE_LOOKUP); - ne_session_destroy(sess); - return OK; -} - -static int fail_connect(void) -{ - return fail_noserver("localhost", 7777, NE_CONNECT); -} - -/* Test that the origin server hostname is NOT resolved for a proxied - * request. */ -static int proxy_no_resolve(void) -{ - ne_session *sess = ne_session_create("http", "nonesuch2.invalid", 80); - int ret; - - ne_session_proxy(sess, "localhost", 7777); - CALL(spawn_server(7777, single_serve_string, - RESP200 "Content-Length: 0\r\n\r\n")); - - ret = any_request(sess, "/foo"); - ne_session_destroy(sess); - - ONN("origin server name resolved when proxy used", ret == NE_LOOKUP); - - CALL(await_server()); - - return OK; -} - -/* If the chunk size is entirely invalid, the request should be - * aborted. Fails with neon <0.22; invalid chunk sizes would be - * silently treated as 'zero'. */ -static int fail_chunksize(void) -{ - return fail_request(0, single_serve_string, - RESP200 TE_CHUNKED "\r\n" "ZZZZZ\r\n\r\n", 0); -} - -/* in neon <0.22, if an error occcurred whilst reading the response - * body, the connection would not be closed (though this test will - * succeed in neon <0.22 since it the previous test fails). */ -static int abort_respbody(void) -{ - ne_session *sess; - - CALL(make_session(&sess, single_serve_string, - RESP200 TE_CHUNKED "\r\n" - "zzz\r\n" - RESP200 "Content-Length: 0\r\n\r\n")); - - /* connection must be aborted on the first request, since it - * contains an invalid chunk size. */ - ONN("invalid chunk size was accepted?", - any_request(sess, "/foo") != NE_ERROR); - - CALL(await_server()); - - /* second request should fail since server has gone away. */ - ONN("connection was not aborted", any_request(sess, "/foo") == NE_OK); - - ne_session_destroy(sess); - return OK; -} - -static int serve_abort(ne_socket *sock, void *ud) -{ - exit(0); -} - -/* Test that after an aborted request on a peristent connection, a - * failure of the *subsequent* request is not treated as a persistent - * connection timeout and retried. */ -static int retry_after_abort(void) -{ - ne_session *sess; - - /* Serve two responses down a single persistent connection, the - * second of which is invalid and will cause the request to be - * aborted. */ - CALL(make_session(&sess, single_serve_string, - RESP200 "Content-Length: 0\r\n\r\n" - RESP200 TE_CHUNKED "\r\n" - "zzzzz\r\n")); - - CALL(any_request(sess, "/first")); - ONN("second request should fail", any_request(sess, "/second") == NE_OK); - CALL(await_server()); - - /* spawn a server, abort the server immediately. If the - * connection reset is interpreted as a p.conn timeout, a new - * connection will be attempted, which will fail with - * NE_CONNECT. */ - CALL(spawn_server(7777, serve_abort, NULL)); - ONN("third request was retried", - any_request(sess, "/third") == NE_CONNECT); - reap_server(); - - ne_session_destroy(sess); - return OK; -} - -/* Fail to parse the response status line: check the error message is - * sane. Failed during 0.23-dev briefly, and possibly with 0.22.0 - * too. */ -static int fail_statusline(void) -{ - ne_session *sess; - int ret; - - CALL(make_session(&sess, single_serve_string, "Fish.\r\n")); - - ret = any_request(sess, "/fail"); - ONV(ret != NE_ERROR, ("request failed with %d not NE_ERROR", ret)); - - ONV(strstr(ne_get_error(sess), - "Could not parse response status line") == NULL, - ("session error was `%s'", ne_get_error(sess))); - - ne_session_destroy(sess); - return OK; -} - -#define LEN (9000) -static int fail_long_header(void) -{ - char resp[LEN + 500] = "HTTP/1.1 200 OK\r\n" - "Server: fish\r\n"; - size_t len = strlen(resp); - - /* add a long header */ - memset(resp + len, 'a', LEN); - resp[len + LEN] = '\0'; - - strcat(resp, "\r\n\r\n"); - - return invalid_response_gives_error(resp, "Line too long"); -} - -static int fail_on_invalid(void) -{ - static const struct { - const char *resp, *error; - } ts[] = { - /* non-chunked TE. */ - { RESP200 "transfer-encoding: punked\r\n" "\r\n" ABCDE_CHUNKS , - "Unknown transfer-coding" }, - /* chunk without trailing CRLF */ - { RESP200 TE_CHUNKED "\r\n" "5\r\n" "abcdeFISH", - "delimiter was invalid" }, - /* chunk with CR then EOF */ - { RESP200 TE_CHUNKED "\r\n" "5\r\n" "abcde\n", - "not read chunk delimiter" }, - /* chunk with CR then notLF */ - { RESP200 TE_CHUNKED "\r\n" "5\r\n" "abcde\rZZZ", - "delimiter was invalid" }, - /* chunk size overflow */ - { RESP200 TE_CHUNKED "\r\n" "800000000\r\n" "abcde\r\n", - "Could not parse chunk size" }, - /* EOF at chunk size */ - { RESP200 TE_CHUNKED "\r\n", "Could not read chunk size" }, - - /* negative C-L */ - { RESP200 "Content-Length: -1\r\n" "\r\n" "abcde", - "Invalid Content-Length" }, - /* stupidly-large C-L */ - { RESP200 "Content-Length: 99999999999999999999999999\r\n" - "\r\n" "abcde", - "Invalid Content-Length" }, - - { NULL, NULL } - }; - int n; - - for (n = 0; ts[n].resp; n++) - CALL(invalid_response_gives_error(ts[n].resp, ts[n].error)); - - return OK; -} - -static int versions(void) -{ - ne_session *sess; - - CALL(make_session(&sess, single_serve_string, - "HTTP/1.1 200 OK\r\n" - "Content-Length: 0\r\n\r\n" - - "HTTP/1.0 200 OK\r\n" - "Content-Length: 0\r\n\r\n")); - - CALL(any_request(sess, "/http11")); - - ONN("did not detect HTTP/1.1 compliance", - ne_version_pre_http11(sess) != 0); - - CALL(any_request(sess, "/http10")); - - ONN("did not detect lack of HTTP/1.1 compliance", - ne_version_pre_http11(sess) == 0); - - ne_session_destroy(sess); - - return OK; -} - -struct cr_args { - const char *method, *uri; - int result; -}; - -static void hk_createreq(ne_request *req, void *userdata, - const char *method, const char *requri) -{ - struct cr_args *args = userdata; - - args->result = 1; /* presume failure */ - - if (strcmp(args->method, method)) - t_context("Hook got method %s not %s", method, args->method); - else if (strcmp(args->uri, requri)) - t_context("Hook got Req-URI %s not %s", requri, args->uri); - else - args->result = 0; -} - -static int hook_create_req(void) -{ - ne_session *sess; - struct cr_args args; - - CALL(make_session(&sess, single_serve_string, EMPTY_RESP EMPTY_RESP)); - - ne_hook_create_request(sess, hk_createreq, &args); - - args.method = "GET"; - args.uri = "/foo"; - args.result = -1; - - CALL(any_request(sess, "/foo")); - - ONN("first hook never called", args.result == -1); - if (args.result) return FAIL; - - args.uri = "http://localhost:7777/bar"; - args.result = -1; - - /* force use of absoluteURI in request-uri */ - ne_session_proxy(sess, "localhost", 7777); - - CALL(any_request(sess, "/bar")); - - ONN("second hook never called", args.result == -1); - if (args.result) return FAIL; - - ne_session_destroy(sess); - - return OK; -} - -static int serve_check_method(ne_socket *sock, void *ud) -{ - char *method = ud; - char buf[20]; - size_t methlen = strlen(method); - - if (ne_sock_read(sock, buf, methlen) != (ssize_t)methlen) - return -1; - - ONN("method corrupted", memcmp(buf, method, methlen)); - - return single_serve_string(sock, "HTTP/1.1 204 OK\r\n\r\n"); -} - - -/* Test that the method string passed to ne_request_create is - * strdup'ed. */ -static int dup_method(void) -{ - char method[] = "FOO"; - ne_session *sess; - ne_request *req; - - CALL(make_session(&sess, serve_check_method, method)); - - req = ne_request_create(sess, method, "/bar"); - - strcpy(method, "ZZZ"); - - ONREQ(ne_request_dispatch(req)); - ne_request_destroy(req); - ne_session_destroy(sess); - CALL(await_server()); - - return OK; -} - -static int abortive_reader(void *userdata, const char *buf, size_t len) -{ - ne_session *sess = userdata; - if (len == 5 && strncmp(buf, "abcde", 5) == 0) { - ne_set_error(sess, "Reader callback failed"); - } else { - ne_set_error(sess, "Reader callback called with length %" NE_FMT_SIZE_T, - len); - } - return NE_ERROR; -} - -static int abort_reader(void) -{ - ne_session *sess; - ne_request *req; - int ret; - - CALL(make_session(&sess, single_serve_string, - RESP200 "Content-Length: 5\r\n\r\n" - "abcde" - "HTTP/1.1 200 OK\r\n" - "Content-Length: 0\r\n\r\n")); - - req = ne_request_create(sess, "GET", "/foo"); - ne_add_response_body_reader(req, ne_accept_2xx, abortive_reader, sess); - ret = ne_request_dispatch(req); - ONV(ret != NE_ERROR, ("request did not fail with NE_ERROR: %d", ret)); - ONV(strcmp(ne_get_error(sess), "Reader callback failed") != 0, - ("unexpected session error string: %s", ne_get_error(sess))); - ne_request_destroy(req); - /* test that the connection was closed. */ - ONN("connection not closed after aborted response", - any_2xx_request(sess, "/failmeplease") == OK); - ne_session_destroy(sess); - CALL(await_server()); - return OK; -} - -/* attempt and fail to send request from offset 500 of /dev/null. */ -static int send_bad_offset(void) -{ - ne_session *sess; - ne_request *req; - char *fn = "empty.txt"; - int ret, fd; - - CALL(make_session(&sess, single_serve_string, - RESP200 "Content-Length: 0\r\n" "\r\n")); - - fd = open(fn, O_RDWR|O_CREAT); - - ONV(fd < 0, ("could not find %s", fn)); - - req = ne_request_create(sess, "PUT", "/null"); - - ne_set_request_body_fd(req, fd, -500, 5); - - ret = ne_request_dispatch(req); - - close(fd); - unlink(fn); - - ONN("request dispatched with bad offset!", ret == NE_OK); - ONV(ret != NE_ERROR, - ("request failed with non-NE_ERROR: %s", ne_get_error(sess))); - - ONV(strstr(ne_get_error(sess), "Could not seek") == NULL, - ("bad error message from seek failure: %s", ne_get_error(sess))); - - reap_server(); - ne_request_destroy(req); - ne_session_destroy(sess); - return OK; -} - -static void thook_create_req(ne_request *req, void *userdata, - const char *method, const char *requri) -{ - ne_buffer *buf = userdata; - - ne_buffer_concat(buf, "(create,", method, ",", requri, ")\n", NULL); -} - -static void hook_pre_send(ne_request *req, void *userdata, - ne_buffer *header) -{ - ne_buffer *buf = userdata; - - ne_buffer_czappend(buf, "(pre-send)\n"); -} - -/* Returns a static string giving a comma-separated representation of - * the status structure passed in. */ -static char *status_to_string(const ne_status *status) -{ - static char sbuf[128]; - - ne_snprintf(sbuf, sizeof sbuf, "HTTP/%d.%d,%d,%s", - status->major_version, status->minor_version, - status->code, status->reason_phrase); - - return sbuf; -} - -static void hook_post_headers(ne_request *req, void *userdata, - const ne_status *status) -{ - ne_buffer *buf = userdata; - - ne_buffer_concat(buf, "(post-headers,", status_to_string(status), ")\n", - NULL); -} - - -static int hook_post_send(ne_request *req, void *userdata, - const ne_status *status) -{ - ne_buffer *buf = userdata; - - ne_buffer_concat(buf, "(post-send,", status_to_string(status), ")\n", - NULL); - - return NE_OK; -} - -static void hook_destroy_req(ne_request *req, void *userdata) -{ - ne_buffer *buf = userdata; - - ne_buffer_czappend(buf, "(destroy-req)\n"); -} - -static void hook_destroy_sess(void *userdata) -{ - ne_buffer *buf = userdata; - - ne_buffer_czappend(buf, "(destroy-sess)\n"); -} - -static int hooks(void) -{ - ne_buffer *buf = ne_buffer_create(); - ne_session *sess; - struct many_serve_args args; - - args.str = RESP200 "Content-Length: 0\r\n" "\r\n"; - args.count = 3; - - CALL(make_session(&sess, many_serve_string, &args)); - - ne_hook_create_request(sess, thook_create_req, buf); - ne_hook_pre_send(sess, hook_pre_send, buf); - ne_hook_post_headers(sess, hook_post_headers, buf); - ne_hook_post_send(sess, hook_post_send, buf); - ne_hook_destroy_request(sess, hook_destroy_req, buf); - ne_hook_destroy_session(sess, hook_destroy_sess, buf); - - CALL(any_2xx_request(sess, "/first")); - - ONCMP("(create,GET,/first)\n" - "(pre-send)\n" - "(post-headers,HTTP/1.1,200,OK)\n" - "(post-send,HTTP/1.1,200,OK)\n" - "(destroy-req)\n", buf->data, "hook ordering", "first result"); - - ne_buffer_clear(buf); - - /* Unhook for mismatched fn/ud pointers: */ - ne_unhook_create_request(sess, hk_createreq, buf); - ne_unhook_create_request(sess, thook_create_req, sess); - - /* Unhook real functions. */ - ne_unhook_pre_send(sess, hook_pre_send, buf); - ne_unhook_destroy_request(sess, hook_destroy_req, buf); - ne_unhook_post_headers(sess, hook_post_headers, buf); - - CALL(any_2xx_request(sess, "/second")); - - ONCMP("(create,GET,/second)\n" - "(post-send,HTTP/1.1,200,OK)\n", - buf->data, "hook ordering", "second result"); - - ne_buffer_clear(buf); - - /* Double hook create, double hook then double unhook post. */ - ne_hook_create_request(sess, thook_create_req, buf); - ne_hook_post_send(sess, hook_post_send, buf); - ne_unhook_post_send(sess, hook_post_send, buf); - ne_unhook_post_send(sess, hook_post_send, buf); - - CALL(any_2xx_request(sess, "/third")); - - ONCMP("(create,GET,/third)\n" - "(create,GET,/third)\n", - buf->data, "hook ordering", "third result"); - - ne_buffer_clear(buf); - - ne_session_destroy(sess); - CALL(await_server()); - - ONCMP("(destroy-sess)\n", buf->data, "hook ordering", "first destroyed session"); - - ne_buffer_clear(buf); - - sess = ne_session_create("http", "www.example.com", 80); - ne_hook_destroy_session(sess, hook_destroy_sess, buf); - ne_unhook_destroy_session(sess, hook_destroy_sess, buf); - ne_session_destroy(sess); - - ONCMP("", buf->data, "hook ordering", "second destroyed session"); - - ne_buffer_destroy(buf); - - return OK; -} - -static void hook_self_destroy_req(ne_request *req, void *userdata) -{ - ne_unhook_destroy_request(ne_get_session(req), - hook_self_destroy_req, userdata); -} - -/* Test that it's safe to call ne_unhook_destroy_request from a - * destroy_request hook. */ -static int hook_self_destroy(void) -{ - ne_session *sess = ne_session_create("http", "localhost", 1234); - - ne_hook_destroy_request(sess, hook_self_destroy_req, NULL); - - ne_request_destroy(ne_request_create(sess, "GET", "/")); - - ne_session_destroy(sess); - - return OK; -} - -static int icy_protocol(void) -{ - ne_session *sess; - - CALL(make_session(&sess, single_serve_string, - "ICY 200 OK\r\n" - "Content-Length: 0\r\n\r\n")); - - ne_set_session_flag(sess, NE_SESSFLAG_ICYPROTO, 1); - - ONREQ(any_request(sess, "/foo")); - - ne_session_destroy(sess); - - return await_server(); -} - -static void status_cb(void *userdata, ne_session_status status, - const ne_session_status_info *info) -{ - ne_buffer *buf = userdata; - char scratch[512]; - - switch (status) { - case ne_status_lookup: - ne_buffer_concat(buf, "lookup(", info->lu.hostname, ")-", NULL); - break; - case ne_status_connecting: - ne_iaddr_print(info->ci.address, scratch, sizeof scratch); - ne_buffer_concat(buf, "connecting(", info->lu.hostname, - ",", scratch, ")-", NULL); - break; - case ne_status_disconnected: - ne_buffer_czappend(buf, "dis"); - /* fallthrough */ - case ne_status_connected: - ne_buffer_concat(buf, "connected(", info->cd.hostname, - ")-", NULL); - break; - case ne_status_sending: - case ne_status_recving: - ne_snprintf(scratch, sizeof scratch, - "%" NE_FMT_NE_OFF_T ",%" NE_FMT_NE_OFF_T, - info->sr.progress, info->sr.total); - ne_buffer_concat(buf, - status == ne_status_sending ? "send" : "recv", - "(", scratch, ")-", NULL); - break; - default: - ne_buffer_czappend(buf, "bork!"); - break; - } -} - -static int status(void) -{ - ne_session *sess; - ne_buffer *buf = ne_buffer_create(); - - CALL(make_session(&sess, single_serve_string, RESP200 - "Content-Length: 5\r\n\r\n" "abcde")); - - ne_set_notifier(sess, status_cb, buf); - - CALL(any_2xx_request_body(sess, "/status")); - - ne_session_destroy(sess); - CALL(await_server()); - - ONCMP("lookup(localhost)-" - "connecting(localhost,127.0.0.1)-" - "connected(localhost)-" - "send(0,5000)-" - "send(5000,5000)-" - "recv(0,5)-" - "recv(5,5)-" - "disconnected(localhost)-", - buf->data, "status events", "result"); - - ne_buffer_destroy(buf); - - return OK; -} - -static int status_chunked(void) -{ - ne_session *sess; - ne_buffer *buf = ne_buffer_create(); - - CALL(make_session(&sess, single_serve_string, - RESP200 TE_CHUNKED "\r\n" ABCDE_CHUNKS)); - - ne_set_notifier(sess, status_cb, buf); - - CALL(any_2xx_request_body(sess, "/status")); - - ne_session_destroy(sess); - CALL(await_server()); - - /* This sequence is not guaranted by the API, but it's what the - * current implementation should do. */ - ONCMP("lookup(localhost)-" - "connecting(localhost,127.0.0.1)-" - "connected(localhost)-" - "send(0,5000)-" - "send(5000,5000)-" - "recv(0,-1)-" - "recv(1,-1)-" - "recv(2,-1)-" - "recv(3,-1)-" - "recv(4,-1)-" - "recv(5,-1)-" - "disconnected(localhost)-", - buf->data, "status events", "result"); - - ne_buffer_destroy(buf); - - return OK; -} - -ne_test tests[] = { - T(lookup_localhost), - T(single_get_clength), - T(single_get_eof), - T(single_get_chunked), - T(no_body_204), - T(no_body_304), - T(no_body_HEAD), - T(no_body_empty_clength), - T(no_body_bad_clength), - T(no_headers), - T(chunks), - T(te_header), - T(te_identity), - T(reason_phrase), - T(chunk_numeric), - T(chunk_extensions), - T(chunk_trailers), - T(chunk_oversize), - T(te_over_clength), - T(te_over_clength2), - T(no_body_chunks), - T(persist_http11), - T(persist_chunked), - T(persist_http10), - T(persist_timeout), - T(no_persist_http10), - T(ptimeout_eof), - T(ptimeout_eof2), - T(closed_connection), - T(close_not_retried), - T(send_progress), - T(ignore_bad_headers), - T(fold_headers), - T(fold_many_headers), - T(multi_header), - T(multi_header2), - T(empty_header), - T(trailing_header), - T(ignore_header_case), - T(ignore_header_ws), - T(ignore_header_ws2), - T(ignore_header_ws3), - T(ignore_header_tabs), - T(strip_http10_connhdr), - T(strip_http10_connhdr2), - T(continued_header), - T(reset_headers), - T(iterate_none), - T(iterate_many), - T(skip_interim_1xx), - T(skip_many_1xx), - T(skip_1xx_hdrs), - T(send_bodies), - T(expect_100_once), - T(expect_100_nobody), - T(unbounded_headers), - T(unbounded_folding), - T(blank_response), - T(not_http), - T(fail_eof_continued), - T(fail_eof_headers), - T(fail_eof_chunk), - T(fail_eof_badclen), - T(fail_long_header), - T(fail_on_invalid), - T(read_timeout), - T(fail_lookup), - T(fail_double_lookup), - T(fail_connect), - T(proxy_no_resolve), - T(fail_chunksize), - T(abort_respbody), - T(retry_after_abort), - T(fail_statusline), - T(dup_method), - T(versions), - T(hook_create_req), - T(abort_reader), - T(send_bad_offset), - T(hooks), - T(hook_self_destroy), - T(icy_protocol), - T(status), - T(status_chunked), - T(NULL) -}; diff --git a/client/neon-0.27.2/test/resolve.c b/client/neon-0.27.2/test/resolve.c deleted file mode 100644 index bd0789ecc..000000000 --- a/client/neon-0.27.2/test/resolve.c +++ /dev/null @@ -1,59 +0,0 @@ -/* - Test program for the neon resolver interface - Copyright (C) 2002-2003, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#include "ne_socket.h" - -int main(int argc, char **argv) -{ - ne_sock_addr *addr; - char buf[256]; - int ret = 0; - - if (argc < 2) { - printf("Usage: %s hostname\n", argv[0]); - return 1; - } - - if (ne_sock_init()) { - printf("%s: Failed to initialize socket library.\n", argv[0]); - return 1; - } - - addr = ne_addr_resolve(argv[1], 0); - if (ne_addr_result(addr)) { - printf("Could not resolve `%s': %s\n", argv[1], - ne_addr_error(addr, buf, sizeof buf)); - ret = 2; - } else { - const ne_inet_addr *ia; - printf("Resolved `%s' OK:", argv[1]); - for (ia = ne_addr_first(addr); ia; ia = ne_addr_next(addr)) { - printf(" <%s>", ne_iaddr_print(ia, buf, sizeof buf)); - } - putchar('\n'); - } - ne_addr_destroy(addr); - - return ret; -} diff --git a/client/neon-0.27.2/test/run-tests.sh b/client/neon-0.27.2/test/run-tests.sh deleted file mode 100644 index 2a9c1b2ec..000000000 --- a/client/neon-0.27.2/test/run-tests.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/bin/sh -# -# This script can be used to run the installed neon test suite -# against an installed copy of the neon library. -# - -# enable glibc malloc safety checks -MALLOC_CHECK_=2 -export MALLOC_CHECK_ - -cd data - -if test -x ../bin/ssl; then - rm -rf ca - - echo "INIT: generating SSL ceritifcates..." - if sh ./makekeys.sh 2> makekeys.out; then :; else - echo FAIL: could not generate SSL certificates - exit 2 - fi -fi - -for t in ../bin/*; do - if ${t}; then :; else - echo FAIL: ${t} - exit 1 - fi -done - -echo "PASS: all tests passed" - -exit 0 diff --git a/client/neon-0.27.2/test/run.sh b/client/neon-0.27.2/test/run.sh deleted file mode 100644 index 4e9c3082c..000000000 --- a/client/neon-0.27.2/test/run.sh +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -rm -f debug.log child.log - -ulimit -c unlimited - -unset LANG -unset LC_MESSAGES - -# Enable glibc heap consistency checks, and memory randomization. -MALLOC_CHECK_=2 -MALLOC_PERTURB_=`expr $RANDOM % 255 2>/dev/null` -export MALLOC_CHECK_ MALLOC_PERTURB_ - -RETVAL=0 - -for f in $*; do - if ${HARNESS} ./$f ${SRCDIR}; then - : - else - RETVAL=$? - fi -done - -exit $RETVAL diff --git a/client/neon-0.27.2/test/server.key b/client/neon-0.27.2/test/server.key deleted file mode 100644 index cdfb91b97..000000000 --- a/client/neon-0.27.2/test/server.key +++ /dev/null @@ -1,9 +0,0 @@ ------BEGIN RSA PRIVATE KEY----- -MIIBOwIBAAJBAPNFTmxnz4JZA+8+SonD0qWgSBPYWrNlH1FP+psm5EGZGmGJGvSD -sk6HkyvstdopKF50UuEaJ263IorAhkmdGG0CAwEAAQJAJBhYdoVAqNqEVu8rKB3C -F4kcqLUlYBDVAL+ZM4QlwgWncAKk2C53BwH4PVWIIfyysleyt3bTAtqg/tgMNM06 -AQIhAP1HKbuppa+UY4rNP4Xcyj5BrCU4wVz77sg/ygW+mWIhAiEA9eKcUnnaIpig -hlWtx9qz++85/JtahA85j6T48v0hBM0CIQCa8ByUg2wq45CdSX+xiOZjfVMslfKb -yjZBY9xW9UjpYQIgdy9j5JqKANEIpnTran95VLot2mMXagHTPeySe331PlUCIQD0 -rL1AXeIR3Vd4D8dgab/FVbg4i94qBiY0731nyPJRoQ== ------END RSA PRIVATE KEY----- diff --git a/client/neon-0.27.2/test/session.c b/client/neon-0.27.2/test/session.c deleted file mode 100644 index e8aee3cb6..000000000 --- a/client/neon-0.27.2/test/session.c +++ /dev/null @@ -1,200 +0,0 @@ -/* - Tests for session handling - Copyright (C) 2002-2006, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "ne_session.h" - -#include "tests.h" - -static int fill_uri(void) -{ - ne_uri uri = {0}; - ne_session *sess = ne_session_create("http", "localhost", 7777); - - ne_fill_server_uri(sess, &uri); - - ONCMP("localhost", uri.host, "fill_uri", "host"); - ONN("port mis-match", uri.port != 7777); - ONCMP("http", uri.scheme, "fill_uri", "scheme"); - - ne_session_destroy(sess); - ne_uri_free(&uri); - - return OK; -} - -static int fill_proxy_uri(void) -{ - ne_uri uri = {0}; - ne_session *sess = ne_session_create("http", "localhost", 7777); - - ne_fill_proxy_uri(sess, &uri); - - ONN("no proxy host should be set", uri.host != NULL); - ONN("no proxy port should be set", uri.port != 0); - - ne_session_proxy(sess, "www.example.com", 345); - - ne_fill_proxy_uri(sess, &uri); - - ONCMP("www.example.com", uri.host, "fill_proxy_uri", "host"); - ONN("proxy port mis-match", uri.port != 345); - - ne_session_destroy(sess); - ne_uri_free(&uri); - - return OK; -} - - -static int match_hostport(const char *scheme, const char *hostname, int port, - const char *hostport) -{ - ne_session *sess = ne_session_create(scheme, hostname, port); - const char *hp = ne_get_server_hostport(sess); - ONV(strcmp(hp, hostport), - ("hostport incorrect for %s: `%s' not `%s'", scheme, hp, hostport)); - ne_session_destroy(sess); - return OK; -} - -static int hostports(void) -{ - static const struct { - const char *scheme, *hostname; - int port; - const char *hostport; - } hps[] = { - { "http", "host.name", 80, "host.name" }, - { "http", "host.name", 555, "host.name:555" }, - { "http", "host.name", 443, "host.name:443" }, - { "https", "host.name", 80, "host.name:80" }, - { "https", "host.name", 443, "host.name" }, - { "https", "host.name", 700, "host.name:700" }, - { NULL } - }; - int n; - - for (n = 0; hps[n].scheme; n++) { - CALL(match_hostport(hps[n].scheme, hps[n].hostname, - hps[n].port, hps[n].hostport)); - } - - return OK; -} - - -/* Check that ne_set_error is passing through to printf correctly. */ -static int errors(void) -{ - ne_session *sess = ne_session_create("http", "foo.com", 80); - -#define EXPECT "foo, hello world, 100, bar!" - - ne_set_error(sess, "foo, %s, %d, bar!", "hello world", 100); - - ONV(strcmp(ne_get_error(sess), EXPECT), - ("session error was `%s' not `%s'", - ne_get_error(sess), EXPECT)); -#undef EXPECT - - ne_session_destroy(sess); - return OK; -} - -#define ID1 "foo" -#define ID2 "bar" - -static int privates(void) -{ - ne_session *sess = ne_session_create("http", "localhost", 80); - char *v1 = "hello", *v2 = "world"; - - ne_set_session_private(sess, ID1, v1); - ne_set_session_private(sess, ID2, v2); - -#define PRIV(msg, id, val) \ -ONN(msg, ne_get_session_private(sess, id) != val) - - PRIV("private #1 wrong", ID1, v1); - PRIV("private #2 wrong", ID2, v2); - PRIV("unknown id wrong", "no such ID", NULL); - - ne_session_destroy(sess); - return OK; -} - -/* test that ne_session_create doesn't really care what scheme you - * give it, and that ne_get_scheme() works. */ -static int get_scheme(void) -{ - static const char *schemes[] = { - "http", "https", "ftp", "ldap", "foobar", NULL - }; - int n; - - for (n = 0; schemes[n]; n++) { - ne_session *sess = ne_session_create(schemes[n], "localhost", 80); - ONV(strcmp(ne_get_scheme(sess), schemes[n]), - ("scheme was `%s' not `%s'!", ne_get_scheme(sess), schemes[n])); - ne_session_destroy(sess); - } - - return OK; -} - -static int flags(void) -{ - ne_session *sess = ne_session_create("https", "localhost", 443); - - ne_set_session_flag(sess, NE_SESSFLAG_PERSIST, 1); - ONN("persist flag was not set", - ne_get_session_flag(sess, NE_SESSFLAG_PERSIST) != 1); - - ne_set_session_flag(sess, NE_SESSFLAG_LAST, 1); - ONN("unsupported flag was recognized", - ne_get_session_flag(sess, NE_SESSFLAG_LAST) != -1); - - ne_session_destroy(sess); - - return OK; -} - -ne_test tests[] = { - T(fill_uri), - T(fill_proxy_uri), - T(hostports), - T(errors), - T(privates), - T(get_scheme), - T(flags), - T(NULL) -}; - diff --git a/client/neon-0.27.2/test/skeleton.c b/client/neon-0.27.2/test/skeleton.c deleted file mode 100644 index 9574bdbf6..000000000 --- a/client/neon-0.27.2/test/skeleton.c +++ /dev/null @@ -1,51 +0,0 @@ -/* - neon test suite - Copyright (C) 2002-2003, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "ne_request.h" -#include "ne_socket.h" - -#include "tests.h" -#include "child.h" -#include "utils.h" - -static int foo(void) -{ - /* This is a skeleton test suite file. */ - return OK; -} - -ne_test tests[] = { - T(foo), /* test functions here */ - - /* end of test functions. */ - T(NULL) -}; - diff --git a/client/neon-0.27.2/test/socket.c b/client/neon-0.27.2/test/socket.c deleted file mode 100644 index 5d69792f8..000000000 --- a/client/neon-0.27.2/test/socket.c +++ /dev/null @@ -1,1105 +0,0 @@ -/* - Socket handling tests - Copyright (C) 2002-2007, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -/* This module can be compiled with -DSOCKET_SSL enabled, to run all - * the tests over an SSL connection. */ - -#include "config.h" - -#include -#include /* for AF_INET6 */ - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif -#include /* for time() */ - -#include "ne_socket.h" -#include "ne_utils.h" -#include "ne_alloc.h" - -#include "child.h" -#include "tests.h" -#include "utils.h" - -#ifdef SOCKET_SSL -#include "ne_ssl.h" -ne_ssl_context *server_ctx, *client_ctx; -#endif - -static ne_sock_addr *localhost; -static char buffer[BUFSIZ]; - -#if defined(AF_INET6) && defined(USE_GETADDRINFO) -#define TEST_IPV6 -#endif - -/* tests for doing init/finish multiple times. */ -static int multi_init(void) -{ - int res1 = ne_sock_init(), res2 = ne_sock_init(); - - ONV(res1 != res2, ("cached init result changed from %d to %d", - res1, res2)); - - ne_sock_exit(); - ne_sock_exit(); - ne_sock_exit(); - - res1 = ne_sock_init(); - ONV(res1 != res2, ("re-init after exit gave %d not %d", - res1, res2)); - ne_sock_exit(); - - res2 = ne_sock_init(); - - ONV(res1 != res2, ("second time, cached init result changed from %d to %d", - res1, res2)); - - return OK; -} - -/* Create and connect *sock to address addr on given port. */ -static int do_connect(ne_socket **sock, ne_sock_addr *addr, unsigned int port) -{ - const ne_inet_addr *ia; - - *sock = ne_sock_create(); - ONN("could not create socket", *sock == NULL); - - for (ia = ne_addr_first(addr); ia; ia = ne_addr_next(addr)) { - if (ne_sock_connect(*sock, ia, port) == 0) - return OK; - } - - t_context("could not connect to server: %s", ne_sock_error(*sock)); - ne_sock_close(*sock); - return FAIL; -} - -#ifdef SOCKET_SSL - -static int init_ssl(void) -{ - char *server_key; - ne_ssl_certificate *cert; - - /* take srcdir as argv[1]. */ - if (test_argc > 1) { - server_key = ne_concat(test_argv[1], "/server.key", NULL); - } else { - server_key = ne_strdup("server.key"); - } - - ONN("sock_init failed", ne_sock_init()); - server_ctx = ne_ssl_context_create(1); - ONN("SSL_CTX_new failed", server_ctx == NULL); - - ne_ssl_context_keypair(server_ctx, "server.cert", server_key); - - client_ctx = ne_ssl_context_create(0); - ONN("SSL_CTX_new failed for client", client_ctx == NULL); - - cert = ne_ssl_cert_read("ca/cert.pem"); - ONN("could not load ca/cert.pem", cert == NULL); - - ne_ssl_context_trustcert(client_ctx, cert); - ne_free(server_key); - - return OK; -} -#endif - -static int resolve(void) -{ - char buf[256]; - localhost = ne_addr_resolve("localhost", 0); - ONV(ne_addr_result(localhost), - ("could not resolve `localhost': %s", - ne_addr_error(localhost, buf, sizeof buf))); - /* and again for child.c */ - return lookup_localhost(); -} - -static int serve_close(ne_socket *sock, void *ud) -{ - return 0; -} - -#ifdef SOCKET_SSL -struct serve_pair { - server_fn fn; - void *userdata; -}; - -static int wrap_serve(ne_socket *sock, void *ud) -{ - struct serve_pair *pair = ud; - - if (ne_sock_accept_ssl(sock, server_ctx)) { - NE_DEBUG(NE_DBG_SOCKET, "SSL_accept failed: %s\n", ne_sock_error(sock)); - return 1; - } - - NE_DEBUG(NE_DBG_SOCKET, "SSL accept okay.\n"); - return pair->fn(sock, pair->userdata); -} - -static int begin(ne_socket **sock, server_fn fn, void *ud) -{ - struct serve_pair pair; - pair.fn = fn; - pair.userdata = ud; - CALL(spawn_server(7777, wrap_serve, &pair)); - CALL(do_connect(sock, localhost, 7777)); - ONV(ne_sock_connect_ssl(*sock, client_ctx, NULL), - ("SSL negotation failed: %s", ne_sock_error(*sock))); - return OK; -} - -#else -/* non-SSL begin() function. */ -static int begin(ne_socket **sock, server_fn fn, void *ud) -{ - CALL(spawn_server(7777, fn, ud)); - return do_connect(sock, localhost, 7777); -} -#endif - -static int resolve_numeric(void) -{ - ne_sock_addr *addr = ne_addr_resolve("127.0.0.1", 0); - ONV(ne_addr_result(addr), - ("failed to resolve 127.0.0.1: %s", - ne_addr_error(addr, buffer, sizeof buffer))); - ONN("ne_addr_first returned NULL", ne_addr_first(addr) == NULL); - ONN("ne_iaddr_print didn't return buffer", - ne_iaddr_print(ne_addr_first(addr), buffer, sizeof buffer) != buffer); - ONV(strcmp(buffer, "127.0.0.1"), ("ntop gave `%s' not 127.0.0.1", buffer)); - ne_addr_destroy(addr); - return OK; -} - -#if 0 -static int resolve_ipv6(void) -{ - char err[256]; - ne_sock_addr *addr = ne_addr_resolve("[::1]", 0); - ONV(ne_addr_result(addr), - ("could not resolve `[::1]': %s", - ne_addr_error(addr, err, sizeof err))); - ne_addr_destroy(addr); - return OK; -} -#endif - -static const unsigned char raw_127[4] = "\x7f\0\0\01", /* 127.0.0.1 */ -raw6_nuls[16] = /* :: */ "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"; -#ifdef TEST_IPV6 -static const unsigned char -raw6_cafe[16] = /* feed::cafe */ "\xfe\xed\0\0\0\0\0\0\0\0\0\0\0\0\xca\xfe", -raw6_babe[16] = /* cafe:babe:: */ "\xca\xfe\xba\xbe\0\0\0\0\0\0\0\0\0\0\0\0"; -#endif - -static int addr_make_v4(void) -{ - ne_inet_addr *ia; - char pr[50]; - - ia = ne_iaddr_make(ne_iaddr_ipv4, raw_127); - ONN("ne_iaddr_make returned NULL", ia == NULL); - - ne_iaddr_print(ia, pr, sizeof pr); - ONV(strcmp(pr, "127.0.0.1"), ("address was %s not 127.0.0.1", pr)); - - ONN("bogus ne_iaddr_typeof return", ne_iaddr_typeof(ia) != ne_iaddr_ipv4); - - ne_iaddr_free(ia); - return OK; -} - -static int addr_make_v6(void) -{ -#ifdef TEST_IPV6 - struct { - const unsigned char *addr; - const char *rep; - } as[] = { - { raw6_cafe, "feed::cafe" }, - { raw6_babe, "cafe:babe::" }, - { raw6_nuls, "::" }, - { NULL, NULL } - }; - int n; - - for (n = 0; as[n].rep != NULL; n++) { - ne_inet_addr *ia = ne_iaddr_make(ne_iaddr_ipv6, as[n].addr); - char pr[128]; - - ONV(ia == NULL, ("could not make address for %d", n)); - ne_iaddr_print(ia, pr, sizeof pr); - ONV(strcmp(pr, as[n].rep), - ("address %d was '%s' not '%s'", n, pr, as[n].rep)); - - ONN("bogus ne_iaddr_typeof return", ne_iaddr_typeof(ia) != ne_iaddr_ipv6); - - ne_iaddr_free(ia); - } - - return OK; -#else - /* should fail when lacking IPv6 support. */ - ne_inet_addr *ia = ne_iaddr_make(ne_iaddr_ipv6, raw6_nuls); - ONN("ne_iaddr_make did not return NULL", ia != NULL); -#endif - return OK; -} - -static const unsigned char raw_1234[] = "\x01\x02\x03\x04"; - -static int addr_compare(void) -{ - ne_inet_addr *ia1, *ia2; - int ret; - - ia1 = ne_iaddr_make(ne_iaddr_ipv4, raw_127); - ia2 = ne_iaddr_make(ne_iaddr_ipv4, raw_127); - ONN("addr_make returned NULL", !ia1 || !ia2); - - ret = ne_iaddr_cmp(ia1, ia2); - ONV(ret != 0, ("comparison of equal IPv4 addresses was %d", ret)); - ne_iaddr_free(ia2); - - ia2 = ne_iaddr_make(ne_iaddr_ipv4, raw_1234); - ret = ne_iaddr_cmp(ia1, ia2); - ONN("comparison of unequal IPv4 addresses was zero", ret == 0); - -#ifdef TEST_IPV6 - ne_iaddr_free(ia2); - ia2 = ne_iaddr_make(ne_iaddr_ipv6, raw6_cafe); - ret = ne_iaddr_cmp(ia1, ia2); - ONN("comparison of IPv4 and IPv6 addresses was zero", ret == 0); - - ne_iaddr_free(ia1); - ia1 = ne_iaddr_make(ne_iaddr_ipv6, raw6_cafe); - ret = ne_iaddr_cmp(ia1, ia2); - ONN("comparison of equal IPv6 addresses was not zero", ret != 0); - - ne_iaddr_free(ia1); - ia1 = ne_iaddr_make(ne_iaddr_ipv6, raw6_babe); - ret = ne_iaddr_cmp(ia1, ia2); - ONN("comparison of unequal IPv6 address was zero", ret == 0); -#endif - - ne_iaddr_free(ia1); - ne_iaddr_free(ia2); - return OK; -} - -static int addr_reverse(void) -{ - ne_inet_addr *ia = ne_iaddr_make(ne_iaddr_ipv4, raw_127); - char buf[128]; - - ONN("ne_iaddr_make returned NULL", ia == NULL); - - ONN("reverse lookup for 127.0.0.1 failed", - ne_iaddr_reverse(ia, buf, sizeof buf) != 0); - - ONV(!(strcmp(buf, "localhost.localdomain") == 0 - || strcmp(buf, "localhost") == 0), - ("reverse lookup for 127.0.0.1 got %s", buf)); - - ne_iaddr_free(ia); - - return OK; -} - -static int just_connect(void) -{ - ne_socket *sock; - - CALL(begin(&sock, serve_close, NULL)); - ne_sock_close(sock); - return await_server(); -} - -/* Connect to an address crafted using ne_iaddr_make rather than from - * the resolver. */ -static int addr_connect(void) -{ - ne_socket *sock = ne_sock_create(); - ne_inet_addr *ia; - - ia = ne_iaddr_make(ne_iaddr_ipv4, raw_127); - ONN("ne_iaddr_make returned NULL", ia == NULL); - - CALL(spawn_server(7777, serve_close, NULL)); - ONN("could not connect", ne_sock_connect(sock, ia, 7777)); - ne_sock_close(sock); - CALL(await_server()); - - ne_iaddr_free(ia); - return OK; -} - -/* Exect a read() to return EOF */ -static int expect_close(ne_socket *sock) -{ - ssize_t n = ne_sock_read(sock, buffer, 1); - ONV(n > 0, ("read got %" NE_FMT_SSIZE_T " bytes not closure", n)); - ONV(n < 0 && n != NE_SOCK_CLOSED, - ("read got error not closure: `%s'", ne_sock_error(sock))); - return OK; -} - -static int good_close(ne_socket *sock) -{ - NE_DEBUG(NE_DBG_SOCKET, "Socket error was %s\n", ne_sock_error(sock)); - ONN("close failed", ne_sock_close(sock)); - return OK; -} - -/* Finish a test, closing socket and rejoining child. If eof is non-zero, - * expects to read EOF from the socket before closing. */ -static int finish(ne_socket *sock, int eof) -{ - if (eof) - CALL(expect_close(sock)); - CALL(good_close(sock)); - return await_server(); -} - -/* Exect a ne_sock_peek() to return EOF */ -static int expect_peek_close(ne_socket *sock) -{ - ssize_t n = ne_sock_read(sock, buffer, 1); - ONV(n != NE_SOCK_CLOSED, ("peek gave %" NE_FMT_SSIZE_T " not closure", n)); - return OK; -} - -/* Test that just does a connect then a close. */ -static int read_close(void) -{ - ne_socket *sock; - - CALL(begin(&sock, serve_close, NULL)); - CALL(expect_close(sock)); - ONN("close failed", ne_sock_close(sock)); - return await_server(); -} - -/* Test that just does a connect then a close (but gets the close via - * ne_sock_peek). */ -static int peek_close(void) -{ - ne_socket *sock; - - CALL(begin(&sock, serve_close, NULL)); - CALL(expect_peek_close(sock)); - ONN("close failed", ne_sock_close(sock)); - return await_server(); -} - -/* Don't change this string. */ -#define STR "Hello, World." - -/* do a sock_peek() on sock for 'len' bytes, and expect 'str'. */ -static int peek_expect(ne_socket *sock, const char *str, size_t len) -{ - ssize_t ret; - memset(buffer, '@', sizeof buffer); - ret = ne_sock_peek(sock, buffer, len); - ONV((ssize_t)len != ret, - ("peek got %" NE_FMT_SSIZE_T " bytes not %" NE_FMT_SIZE_T, ret, len)); - ONV(memcmp(str, buffer, len), - ("peek mismatch: `%.*s' not `%.*s'", - (int)len, buffer, (int)len, str)); - ONV(buffer[len] != '@', - ("buffer overrun: %" NE_FMT_SSIZE_T "nth byte was '%c' not '@'", - len, buffer[len])); - return OK; -} - -/* do a sock_read() on sock for 'len' bytes, and expect 'str'. */ -static int read_expect(ne_socket *sock, const char *str, size_t len) -{ - ssize_t ret = ne_sock_read(sock, buffer, len); - ONV((ssize_t)len != ret, - ("read got %" NE_FMT_SSIZE_T " bytes not %" NE_FMT_SIZE_T, ret, len)); - ONV(memcmp(str, buffer, len), - ("read mismatch: `%.*s' not `%.*s'", - (int)len, buffer, (int)len, str)); - return OK; -} - -/* do a sock_read() on sock for 'len' bytes, and expect 'str'. */ -static int fullread_expect(ne_socket *sock, const char *str, size_t len) -{ - ssize_t ret = ne_sock_fullread(sock, buffer, len); - ONV(ret, ("fullread failed (%" NE_FMT_SSIZE_T "): %s", - ret, ne_sock_error(sock))); - ONV(memcmp(str, buffer, len), - ("fullread mismatch: `%.*s' not `%.*s'", - (int)len, buffer, (int)len, str)); - return OK; -} - - -/* Declare a struct string */ -#define DECL(var,str) struct string var = { str, 0 }; var.len = strlen(str) -#define DECL_LONG(var,ch,n) struct string var; var.data = memset(ne_malloc(n), ch, n); var.len = n; - -/* Test a simple read. */ -static int single_read(void) -{ - ne_socket *sock; - DECL(hello, STR); - - CALL(begin(&sock, serve_sstring, &hello)); - CALL(read_expect(sock, STR, strlen(STR))); - CALL(expect_close(sock)); - CALL(good_close(sock)); - - return await_server(); -} - -/* Test a simple peek. */ -static int single_peek(void) -{ - ne_socket *sock; - DECL(hello, STR); - - CALL(begin(&sock, serve_sstring, &hello)); - CALL(peek_expect(sock, STR, strlen(STR))); - - return finish(sock, 0); -} - -/* Test lots of 1-byte reads. */ -static int small_reads(void) -{ - ne_socket *sock; - char *pnt; - DECL(hello, STR); - - CALL(begin(&sock, serve_sstring, &hello)); - - /* read the string byte-by-byte. */ - for (pnt = hello.data; *pnt; pnt++) { - CALL(read_expect(sock, pnt, 1)); - } - - return finish(sock, 1); -} - -/* peek or read, expecting to get given string. */ -#define READ(str) CALL(read_expect(sock, str, strlen(str))) -#define FULLREAD(str) CALL(fullread_expect(sock, str, strlen(str))) -#define PEEK(str) CALL(peek_expect(sock, str, strlen(str))) - -/* Stress out the read buffer handling a little. */ -static int read_and_peek(void) -{ - ne_socket *sock; - DECL(hello, STR); - - CALL(begin(&sock, serve_sstring, &hello)); - - PEEK("Hello"); - PEEK("Hell"); - PEEK(STR); - READ("He"); - PEEK("llo, "); - READ("l"); - PEEK("lo, World."); - READ("lo, Worl"); - PEEK("d."); PEEK("d"); - READ("d."); - - return finish(sock, 1); -} - -/* Read more bytes than were written. */ -static int larger_read(void) -{ - ne_socket *sock; - ssize_t nb; - DECL(hello, STR); - - CALL(begin(&sock, serve_sstring, &hello)); - - nb = ne_sock_read(sock, buffer, hello.len + 10); - ONV(nb != (ssize_t)hello.len, - ("read gave too many bytes (%" NE_FMT_SSIZE_T ")", nb)); - ONN("read gave wrong data", memcmp(buffer, hello.data, hello.len)); - - return finish(sock, 1); -} - -static int line_expect(ne_socket *sock, const char *line) -{ - ssize_t ret = ne_sock_readline(sock, buffer, BUFSIZ); - size_t len = strlen(line); - ONV(ret == NE_SOCK_CLOSED, ("socket closed, expecting `%s'", line)); - ONV(ret < 0, ("socket error `%s', expecting `%s'", - ne_sock_error(sock), line)); - ONV((size_t)ret != len, - ("readline got %" NE_FMT_SSIZE_T ", expecting `%s'", ret, line)); - ONV(strcmp(line, buffer), - ("readline mismatch: `%s' not `%s'", buffer, line)); - return OK; -} - -#define LINE(x) CALL(line_expect(sock, x)) - -#define STR2 "Goodbye, cruel world." - -static int line_simple(void) -{ - ne_socket *sock; - DECL(oneline, STR "\n" STR2 "\n"); - - CALL(begin(&sock, serve_sstring, &oneline)); - LINE(STR "\n"); - LINE(STR2 "\n"); - - return finish(sock, 1); -} - -static int line_closure(void) -{ - ne_socket *sock; - ssize_t ret; - DECL(oneline, STR "\n" "foobar"); - - CALL(begin(&sock, serve_sstring, &oneline)); - LINE(STR "\n"); - - ret = ne_sock_readline(sock, buffer, BUFSIZ); - ONV(ret != NE_SOCK_CLOSED, - ("readline got %" NE_FMT_SSIZE_T " not EOF: %s", ret, - ne_sock_error(sock))); - - return finish(sock, 0); -} - -/* check that empty lines are handled correctly. */ -static int line_empty(void) -{ - ne_socket *sock; - DECL(oneline, "\n\na\n\n"); - - CALL(begin(&sock, serve_sstring, &oneline)); - LINE("\n"); LINE("\n"); - LINE("a\n"); LINE("\n"); - - return finish(sock, 1); -} - -static int line_toolong(void) -{ - ne_socket *sock; - ssize_t ret; - DECL(oneline, "AAAAAA\n"); - - CALL(begin(&sock, serve_sstring, &oneline)); - ret = ne_sock_readline(sock, buffer, 5); - ONV(ret != NE_SOCK_ERROR, - ("readline should fail on long line: %" NE_FMT_SSIZE_T, ret)); - reap_server(); - ne_sock_close(sock); - return OK; -} - -#define OVERLEN (9000) - -static int line_overflow(void) -{ - ne_socket *sock; - ssize_t ret; - DECL_LONG(line, 'A', OVERLEN); - - CALL(begin(&sock, serve_sstring, &line)); - - PEEK("A"); /* fill the read buffer */ - ret = ne_sock_readline(sock, buffer, OVERLEN); - ONV(ret != NE_SOCK_ERROR, - ("readline should fail on overlong line: %" NE_FMT_SSIZE_T, ret)); - - ne_free(line.data); - return finish(sock, 0); -} - - -/* readline()s mingled with other operations: buffering tests. */ -static int line_mingle(void) -{ - ne_socket *sock; - DECL(oneline, "alpha\nbeta\ndelta\ngamma\n"); - - CALL(begin(&sock, serve_sstring, &oneline)); - - READ("a"); LINE("lpha\n"); - READ("beta"); LINE("\n"); - PEEK("d"); PEEK("delt"); - LINE("delta\n"); - READ("gam"); LINE("ma\n"); - - return finish(sock, 1); -} - -/* readline which needs multiple read() calls. */ -static int line_chunked(void) -{ - ne_socket *sock; - DECL(oneline, "this is a line\n"); - - CALL(begin(&sock, serve_sstring_slowly, &oneline)); - - LINE("this is a line\n"); - - return finish(sock, 1); -} - -static int line_long_chunked(void) -{ - ne_socket *sock; - ssize_t ret; - DECL_LONG(line, 'Z', OVERLEN); - - CALL(begin(&sock, serve_sstring_slowly, &line)); - - FULLREAD("ZZZZZZZZ"); /* fill the buffer */ - ret = ne_sock_readline(sock, buffer, sizeof buffer); - ONV(ret != NE_SOCK_ERROR, - ("readline gave %" NE_FMT_SSIZE_T " not failure", ret)); - - reap_server(); - ne_sock_close(sock); - ne_free(line.data); - return OK; -} - - -static time_t to_start, to_finish; - -static int to_begin(ne_socket **sock) -{ - CALL(begin(sock, sleepy_server, NULL)); - ne_sock_read_timeout(*sock, 1); - to_start = time(NULL); - return OK; -} - -static int to_end(ne_socket *sock) -{ - to_finish = time(NULL); - reap_server(); /* hopefully it's hung. */ - ONN("timeout ignored, or very slow machine", to_finish - to_start > 3); - ONN("close failed", ne_sock_close(sock)); - return OK; -} - -#define TO_BEGIN ne_socket *sock; CALL(to_begin(&sock)) -#define TO_OP(x) do { int to_ret = (x); \ - ONV(to_ret != NE_SOCK_TIMEOUT, ("operation did not timeout: got %d (%s)", to_ret, ne_sock_error(sock))); \ -} while (0) -#define TO_FINISH return to_end(sock) - -#ifndef TEST_CONNECT_TIMEOUT -#define TEST_CONNECT_TIMEOUT 0 -#endif -#if TEST_CONNECT_TIMEOUT - -/* No obvious way to reliably test a connect() timeout. But - * www.example.com seems to drop packets on ports other than 80 so - * that actually works pretty well. Disabled by default. */ -static int connect_timeout(void) -{ - static const unsigned char example_dot_com[] = "\xC0\x00\x22\xA6"; - ne_socket *sock = ne_sock_create(); - ne_inet_addr *ia = ne_iaddr_make(ne_iaddr_ipv4, example_dot_com); - - ne_sock_connect_timeout(sock, 1); - - TO_OP(ne_sock_connect(sock, ia, 8080)); - - ne_iaddr_free(ia); - ne_sock_close(sock); - - return OK; -} -#endif - -static int peek_timeout(void) -{ - TO_BEGIN; - TO_OP(ne_sock_peek(sock, buffer, 1)); - TO_FINISH; -} - -static int read_timeout(void) -{ - TO_BEGIN; - TO_OP(ne_sock_read(sock, buffer, 1)); - TO_FINISH; -} - -static int readline_timeout(void) -{ - TO_BEGIN; - TO_OP(ne_sock_readline(sock, buffer, 1)); - TO_FINISH; -} - -static int fullread_timeout(void) -{ - TO_BEGIN; - TO_OP(ne_sock_fullread(sock, buffer, 1)); - TO_FINISH; -} - -static int serve_expect(ne_socket *sock, void *ud) -{ - struct string *str = ud; - ssize_t ret; - - while (str->len && - (ret = ne_sock_read(sock, buffer, sizeof(buffer))) > 0) { - NE_DEBUG(NE_DBG_SOCKET, "Got %" NE_FMT_SSIZE_T " bytes.\n", ret); - ONV(memcmp(str->data, buffer, ret), - ("unexpected data: [%.*s] not [%.*s]", - (int)ret, buffer, (int)ret, str->data)); - str->data += ret; - str->len -= ret; - NE_DEBUG(NE_DBG_SOCKET, "%" NE_FMT_SIZE_T " bytes left.\n", str->len); - } - - NE_DEBUG(NE_DBG_SOCKET, "All data read.\n"); - return OK; -} - -static int full_write(ne_socket *sock, const char *data, size_t len) -{ - int ret = ne_sock_fullwrite(sock, data, len); - ONV(ret, ("write failed (%d): %s", ret, ne_sock_error(sock))); - return OK; -} - -#define WRITEL(str) CALL(full_write(sock, str, strlen(str))); \ -minisleep() - -static int small_writes(void) -{ - ne_socket *sock; - DECL(str, "This\nIs\nSome\nText.\n"); - - CALL(begin(&sock, serve_expect, &str)); - - WRITEL("This\n"); WRITEL("Is\n"); WRITEL("Some\n"); WRITEL("Text.\n"); - - return finish(sock, 1); -} - -static int large_writes(void) -{ -#define LARGE_SIZE (123456) - struct string str; - ne_socket *sock; - ssize_t n; - - str.data = ne_malloc(LARGE_SIZE); - str.len = LARGE_SIZE; - - for (n = 0; n < LARGE_SIZE; n++) - str.data[n] = 41 + n % 130; - - CALL(begin(&sock, serve_expect, &str)); - CALL(full_write(sock, str.data, str.len)); - - ne_free(str.data); - return finish(sock, 1); -} - -/* echoes back lines. */ -static int echo_server(ne_socket *sock, void *ud) -{ - ssize_t ret; - - while ((ret = ne_sock_readline(sock, buffer, sizeof(buffer))) > 0) { - NE_DEBUG(NE_DBG_SOCKET, "Line: %s", buffer); - ONN("write failed", ne_sock_fullwrite(sock, buffer, ret)); - NE_DEBUG(NE_DBG_SOCKET, "Wrote line.\n"); - } - - ONN("readline failed", ret != NE_SOCK_CLOSED); - return 0; -} - -static int echo_expect(ne_socket *sock, const char *line) -{ - CALL(full_write(sock, line, strlen(line))); - return line_expect(sock, line); -} - -#define ECHO(line) CALL(echo_expect(sock, line)) - -static int echo_lines(void) -{ - ne_socket *sock; - CALL(begin(&sock, echo_server, NULL)); - ECHO("hello,\n"); - ECHO("\n"); - ECHO("world\n"); - return finish(sock, 0); -} - -#ifdef SOCKET_SSL -/* harder to simulate closure cases for an SSL connection, since it - * may be doing multiple read()s or write()s per ne_sock_* call. */ -static int ssl_closure(void) -{ - ne_socket *sock; - ssize_t ret; - CALL(begin(&sock, serve_close, NULL)); - CALL(full_write(sock, "a", 1)); - CALL(await_server()); - do { - ret = ne_sock_fullwrite(sock, "a", 1); - } while (ret == 0); - ONV(ret != NE_SOCK_RESET && ret != NE_SOCK_CLOSED, - ("write got %" NE_FMT_SSIZE_T " not reset or closure: %s", ret, - ne_sock_error(sock))); - return good_close(sock); -} - -static int serve_truncate(ne_socket *sock, void *userdata) -{ - exit(0); -} - -/* when an EOF is received without a clean shutdown (close_notify - message). */ -static int ssl_truncate(void) -{ - ne_socket *sock; int ret; - - CALL(begin(&sock, serve_truncate, NULL)); - ret = ne_sock_read(sock, buffer, 1); - ONV(ret != NE_SOCK_TRUNC, - ("socket got error %d not truncation: `%s'", ret, - ne_sock_error(sock))); - return finish(sock, 0); -} - -#else - -/* use W Richard Stevens' SO_LINGER trick to elicit a TCP RST */ -static int serve_reset(ne_socket *sock, void *ud) -{ - minisleep(); - reset_socket(sock); - exit(0); - return 0; -} - -static int write_reset(void) -{ - ne_socket *sock; - int ret; - CALL(begin(&sock, serve_reset, NULL)); - CALL(full_write(sock, "a", 1)); - CALL(await_server()); - ret = ne_sock_fullwrite(sock, "a", 1); - if (ret == 0) { - ne_sock_close(sock); - return SKIP; - } - if (ret == NE_SOCK_CLOSED) { - t_warning("got EOF, failed to elicit TCP RST"); - } else { - ONV(ret != NE_SOCK_RESET, - ("write got %d not reset: %s", ret, ne_sock_error(sock))); - } - return good_close(sock); -} - -static int read_reset(void) -{ - ne_socket *sock; - ssize_t ret; - CALL(begin(&sock, serve_reset, NULL)); - CALL(full_write(sock, "a", 1)); - CALL(await_server()); - ret = ne_sock_read(sock, buffer, 1); - if (ret == NE_SOCK_CLOSED) { - ne_sock_close(sock); - return SKIP; - } - ONV(ret != NE_SOCK_RESET, - ("read got %" NE_FMT_SSIZE_T " not reset: %s", ret, - ne_sock_error(sock))); - return good_close(sock); -} -#endif - -static int expect_block_timeout(ne_socket *sock, int timeout, const char *msg) -{ - int ret; - NE_DEBUG(NE_DBG_SOCKET, "blocking for %d\n", timeout); - ret = ne_sock_block(sock, timeout); - ONV(ret != NE_SOCK_TIMEOUT, ( - "ne_sock_block got %d not timeout: %s", ret, msg)); - return OK; -} - -static int blocking(void) -{ - ne_socket *sock; - int ret; - - CALL(begin(&sock, echo_server, NULL)); - CALL(expect_block_timeout(sock, 1, "with non-zero timeout")); - - WRITEL("Hello, world.\n"); - - /* poll for data */ - do { - ret = ne_sock_block(sock, 1); - } while (ret == NE_SOCK_TIMEOUT); - - ONV(ret != 0, ("ne_sock_block never got data: %d", ret)); - - PEEK("Hello,"); - ret = ne_sock_block(sock, 1); - ONV(ret != 0, ("ne_sock_block failed after peek: %d", ret)); - - LINE("Hello, world.\n"); - - return finish(sock, 0); -} - -static int block_timeout(void) -{ - TO_BEGIN; - TO_OP(ne_sock_block(sock, 1)); - TO_FINISH; -} - -static int ssl_session_id(void) -{ - ne_socket *sock; - unsigned char buf[128]; - size_t len1; - - CALL(begin(&sock, serve_close, NULL)); - -#ifdef SOCKET_SSL - len1 = 0; - ONN("retrieve session id length", - ne_sock_sessid(sock, NULL, &len1)); - - if (len1 < sizeof buf) { - buf[len1] = 'Z'; - } - - { - size_t len2; - - len2 = len1; - ONN("could not retrieve session id", - ne_sock_sessid(sock, buf, &len2)); - - ONN("buffer size changed!?", len1 != len2); - } - - ONN("buffer written past end", - len1 < sizeof buf && buf[len1] != 'Z'); - - /* Attempt retrieval into too-short buffer: */ - len1 = 0; - ONN("success for buffer overflow case", - ne_sock_sessid(sock, buf, &len1) == 0); - -#else - len1 = sizeof buf; - ONN("retrieved session id for non-SSL socket!?", - ne_sock_sessid(sock, buf, &len1) == 0); -#endif - - ne_sock_close(sock); - return await_server(); -} - - -ne_test tests[] = { - T(multi_init), - T_LEAKY(resolve), - T(resolve_numeric), -#ifdef SOCKET_SSL - T_LEAKY(init_ssl), -#endif - T(addr_make_v4), - T(addr_make_v6), - T(addr_compare), - T(addr_reverse), - T(just_connect), - T(addr_connect), - T(read_close), - T(peek_close), - T(single_read), - T(single_peek), - T(small_reads), - T(read_and_peek), - T(larger_read), - T(ssl_session_id), - T(line_simple), - T(line_closure), - T(line_empty), - T(line_toolong), - T(line_overflow), - T(line_mingle), - T(line_chunked), - T(line_long_chunked), - T(small_writes), - T(large_writes), - T(echo_lines), - T(blocking), -#ifdef SOCKET_SSL - T(ssl_closure), - T(ssl_truncate), -#else - T(write_reset), - T(read_reset), -#endif -#if TEST_CONNECT_TIMEOUT - T(connect_timeout), -#endif - T(read_timeout), - T(peek_timeout), - T(readline_timeout), - T(fullread_timeout), - T(block_timeout), - T(NULL) -}; diff --git a/client/neon-0.27.2/test/ssl.c b/client/neon-0.27.2/test/ssl.c deleted file mode 100644 index f3c6c8cdf..000000000 --- a/client/neon-0.27.2/test/ssl.c +++ /dev/null @@ -1,1587 +0,0 @@ -/* - neon test suite - Copyright (C) 2002-2007, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#include - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "ne_request.h" -#include "ne_socket.h" -#include "ne_ssl.h" -#include "ne_auth.h" - -#include "tests.h" -#include "child.h" -#include "utils.h" - -#ifndef NE_HAVE_SSL -/* this file shouldn't be built if SSL is not enabled. */ -#error SSL not supported -#endif - - -#define SERVER_CERT "server.cert" -#define CA_CERT "ca/cert.pem" - -#define SERVER_DNAME "Neon QA Dept, Neon Hackers Ltd, " \ - "Cambridge, Cambridgeshire, GB" -#define CACERT_DNAME "Random Dept, Neosign, Oakland, California, US" - -static char *srcdir = "."; -static char *server_key = NULL; - -static ne_ssl_certificate *def_ca_cert = NULL, *def_server_cert; -static ne_ssl_client_cert *def_cli_cert; - -static int check_dname(const ne_ssl_dname *dn, const char *expected, - const char *which); - -/* Arguments for running the SSL server */ -struct ssl_server_args { - char *cert; /* the server cert to present. */ - const char *response; /* the response to send. */ - int numreqs; /* number of request/responses to handle over the SSL connection. */ - - /* client cert handling: */ - int require_cc; /* require a client cert if non-NULL */ - const char *ca_list; /* file of CA certs to verify client cert against */ - const char *send_ca; /* file of CA certs to send in client cert request */ - - /* session caching: */ - int cache; /* use the session cache if non-zero */ - struct ssl_session { - unsigned char id[128]; - size_t len; - } session; - int count; /* internal use. */ - - int use_ssl2; /* force use of SSLv2 only */ -}; - -/* default response string if args->response is NULL */ -#define DEF_RESP "HTTP/1.0 200 OK\r\nContent-Length: 0\r\n\r\n" - -/* An SSL server inna bun. */ -static int ssl_server(ne_socket *sock, void *userdata) -{ - struct ssl_server_args *args = userdata; - int ret; - char buf[BUFSIZ]; - static ne_ssl_context *ctx = NULL; - - if (ctx == NULL) { - ctx = ne_ssl_context_create(args->use_ssl2 ? NE_SSL_CTX_SERVERv2 - : NE_SSL_CTX_SERVER); - } - - ONV(ctx == NULL, ("could not create SSL context")); - - ONV(ne_ssl_context_keypair(ctx, args->cert, server_key), - ("failed to load server keypair: ...")); - - NE_DEBUG(NE_DBG_HTTP, "using server cert %s\n", args->cert); - - if (args->require_cc && !args->ca_list) { - args->ca_list = CA_CERT; - } - - ne_ssl_context_set_verify(ctx, args->require_cc, args->send_ca, - args->ca_list); - - ONV(ne_sock_accept_ssl(sock, ctx), - ("SSL accept failed: %s", ne_sock_error(sock))); - - args->count++; - - /* loop handling requests: */ - do { - const char *response = args->response ? args->response : DEF_RESP; - - ret = ne_sock_read(sock, buf, BUFSIZ - 1); - if (ret == NE_SOCK_CLOSED) - return 0; /* connection closed by parent; give up. */ - ONV(ret < 0, ("SSL read failed (%d): %s", ret, - ne_sock_error(sock))); - - buf[ret] = '\0'; - - NE_DEBUG(NE_DBG_HTTP, "Request over SSL was: [%s]\n", buf); - - if (strstr(buf, "Proxy-Authorization:") != NULL) { - NE_DEBUG(NE_DBG_HTTP, "Got Proxy-Auth header over SSL!\n"); - response = "HTTP/1.1 500 Client Leaks Credentials\r\n" - "Content-Length: 0\r\n" "\r\n"; - } - - ONV(ne_sock_fullwrite(sock, response, strlen(response)), - ("SSL write failed: %s", ne_sock_error(sock))); - - } while (--args->numreqs > 0); - - - if (args->cache) { - unsigned char sessid[128]; - size_t len = sizeof sessid; - - ONN("could not retrieve session ID", - ne_sock_sessid(sock, sessid, &len)); - -#ifdef NE_DEBUGGING - { - char *b64 = ne_base64(sessid, len); - NE_DEBUG(NE_DBG_SSL, "Session id retrieved (%d): [%s]\n", - args->count, b64); - ne_free(b64); - } -#endif - - if (args->count == 1) { - /* save the session. */ - memcpy(args->session.id, sessid, len); - args->session.len = len; - } else { - /* Compare with stored session. */ - ONN("cached session not used", - args->session.len != len - || memcmp(args->session.id, sessid, len)); - } - } - - return 0; -} - -/* serve_ssl wrapper which ignores server failure and always succeeds */ -static int fail_serve(ne_socket *sock, void *ud) -{ - struct ssl_server_args args = {0}; - args.cert = ud; - ssl_server(sock, &args); - return OK; -} - -#define DEFSESS (ne_session_create("https", "localhost", 7777)) - -/* Run a request in the given session. */ -static int any_ssl_request(ne_session *sess, server_fn fn, void *server_ud, - char *ca_cert, - ne_ssl_verify_fn verify_fn, void *verify_ud) -{ - int ret; - - if (ca_cert) { - ne_ssl_certificate *ca = ne_ssl_cert_read(ca_cert); - ONV(ca == NULL, ("could not load CA cert `%s'", ca_cert)); - ne_ssl_trust_cert(sess, ca); - ne_ssl_cert_free(ca); - } - - CALL(spawn_server(7777, fn, server_ud)); - - if (verify_fn) - ne_ssl_set_verify(sess, verify_fn, verify_ud); - - ret = any_request(sess, "/foo"); - - CALL(await_server()); - - ONREQ(ret); - - return OK; -} - -static int init(void) -{ - /* take srcdir as argv[1]. */ - if (test_argc > 1) { - srcdir = test_argv[1]; - server_key = ne_concat(srcdir, "/server.key", NULL); - } else { - server_key = "server.key"; - } - - if (ne_sock_init()) { - t_context("could not initialize socket/SSL library."); - return FAILHARD; - } - - def_ca_cert = ne_ssl_cert_read(CA_CERT); - if (def_ca_cert == NULL) { - t_context("couldn't load CA cert %s", CA_CERT); - return FAILHARD; - } - - def_server_cert = ne_ssl_cert_read(SERVER_CERT); - if (def_server_cert == NULL) { - t_context("couldn't load server cert %s", SERVER_CERT); - return FAILHARD; - } - - /* tests for the encrypted client cert, client.p12 */ - def_cli_cert = ne_ssl_clicert_read("client.p12"); - ONN("could not load client.p12", def_cli_cert == NULL); - - ONN("client.p12 is not encrypted!?", - !ne_ssl_clicert_encrypted(def_cli_cert)); - - ONN("failed to decrypt client.p12", - ne_ssl_clicert_decrypt(def_cli_cert, "foobar")); - - return OK; -} - -/* just check the result codes of loading server certs. */ -static int load_server_certs(void) -{ - ne_ssl_certificate *cert; - - cert = ne_ssl_cert_read("Makefile"); - ONN("invalid CA cert file loaded successfully", cert != NULL); - - cert = ne_ssl_cert_read("nonesuch.pem"); - ONN("non-existent 'nonesuch.pem' loaded successfully", cert != NULL); - - cert = ne_ssl_cert_read("ssigned.pem"); - ONN("could not load ssigned.pem", cert == NULL); - ne_ssl_cert_free(cert); - - return OK; -} - -static int trust_default_ca(void) -{ - ne_session *sess = DEFSESS; - ne_ssl_trust_default_ca(sess); - ne_session_destroy(sess); - return OK; -} - -#define CC_NAME "Just A Neon Client Cert" - -/* Tests for loading client certificates */ -static int load_client_cert(void) -{ - ne_ssl_client_cert *cc; - const ne_ssl_certificate *cert; - const char *name; - - cc = ne_ssl_clicert_read("client.p12"); - ONN("could not load client.p12", cc == NULL); - ONN("client.p12 not encrypted!?", !ne_ssl_clicert_encrypted(cc)); - name = ne_ssl_clicert_name(cc); - ONN("no friendly name given", name == NULL); - ONV(strcmp(name, CC_NAME), ("friendly name was %s not %s", name, CC_NAME)); - ONN("failed to decrypt", ne_ssl_clicert_decrypt(cc, "foobar")); - ne_ssl_clicert_free(cc); - - cc = ne_ssl_clicert_read("client.p12"); - ONN("decrypted client.p12 with incorrect password!?", - ne_ssl_clicert_decrypt(cc, "barfoo") == 0); - ne_ssl_clicert_free(cc); - - /* tests for the unencrypted client cert, client2.p12 */ - cc = ne_ssl_clicert_read("unclient.p12"); - ONN("could not load unencrypted cert unclient.p12", cc == NULL); - ONN("unencrypted cert marked encrypted?", ne_ssl_clicert_encrypted(cc)); - cert = ne_ssl_clicert_owner(cc); - ONN("client cert had no certificate", cert == NULL); - CALL(check_dname(ne_ssl_cert_subject(cert), - "Neon Client Cert, Neon Hackers Ltd, " - "Cambridge, Cambridgeshire, GB", - "client cert subject")); - CALL(check_dname(ne_ssl_cert_issuer(cert), CACERT_DNAME, - "client cert issuer")); - ne_ssl_clicert_free(cc); - - /* test for ccert without a friendly name, noclient.p12 */ - cc = ne_ssl_clicert_read("noclient.p12"); - ONN("could not load noclient.p12", cc == NULL); - name = ne_ssl_clicert_name(cc); - ONV(name != NULL, ("noclient.p12 had friendly name `%s'", name)); - ne_ssl_clicert_free(cc); - - /* test for ccert without a friendly name, noclient.p12 */ - cc = ne_ssl_clicert_read("clientca.p12"); - ONN("could not load clientca.p12", cc == NULL); - ONN("encrypted cert marked unencrypted?", !ne_ssl_clicert_encrypted(cc)); - ONN("could not decrypt clientca.p12", ne_ssl_clicert_decrypt(cc, "foobar")); - ne_ssl_clicert_free(cc); - - /* tests for loading bogus files. */ - cc = ne_ssl_clicert_read("Makefile"); - ONN("loaded Makefile as client cert!?", cc != NULL); - - /* test for loading nonexistent file. */ - cc = ne_ssl_clicert_read("nosuch.pem"); - ONN("loaded nonexistent file as client cert!?", cc != NULL); - - return OK; -} - -/* Test that 'cert', which is signed by CA_CERT, is accepted - * unconditionaly. */ -static int accept_signed_cert_for_hostname(char *cert, const char *hostname) -{ - ne_session *sess = ne_session_create("https", hostname, 7777); - struct ssl_server_args args = {cert, 0}; - /* no verify callback needed. */ - CALL(any_ssl_request(sess, ssl_server, &args, CA_CERT, NULL, NULL)); - ne_session_destroy(sess); - return OK; -} - - -static int accept_signed_cert(char *cert) -{ - return accept_signed_cert_for_hostname(cert, "localhost"); -} - -static int simple(void) -{ - return accept_signed_cert(SERVER_CERT); -} - -/* Test for SSL operation when server uses SSLv2 */ -static int simple_sslv2(void) -{ - ne_session *sess = ne_session_create("https", "localhost", 7777); - struct ssl_server_args args = {SERVER_CERT, 0}; - args.use_ssl2 = 1; - ne_set_session_flag(sess, NE_SESSFLAG_SSLv2, 1); - CALL(any_ssl_request(sess, ssl_server, &args, CA_CERT, NULL, NULL)); - ne_session_destroy(sess); - return OK; -} - -/* Serves using HTTP/1.0 get-till-EOF semantics. */ -static int serve_eof(ne_socket *sock, void *ud) -{ - struct ssl_server_args args = {0}; - - args.cert = ud; - args.response = "HTTP/1.0 200 OK\r\n" - "Connection: close\r\n" - "\r\n" - "This is a response body, like it or not."; - - return ssl_server(sock, &args); -} - -/* Test read-til-EOF behaviour with SSL. */ -static int simple_eof(void) -{ - ne_session *sess = DEFSESS; - - CALL(any_ssl_request(sess, serve_eof, SERVER_CERT, CA_CERT, NULL, NULL)); - ne_session_destroy(sess); - return OK; -} - -static int empty_truncated_eof(void) -{ - ne_session *sess = DEFSESS; - struct ssl_server_args args = {0}; - - args.cert = SERVER_CERT; - args.response = "HTTP/1.0 200 OK\r\n" "\r\n"; - - CALL(any_ssl_request(sess, ssl_server, &args, CA_CERT, NULL, NULL)); - - ne_session_destroy(sess); - return OK; -} - -/* Server function which just sends a string then EOF. */ -static int just_serve_string(ne_socket *sock, void *userdata) -{ - const char *str = userdata; - server_send(sock, str, strlen(str)); - return 0; -} - -/* test for the SSL negotiation failing. */ -static int fail_not_ssl(void) -{ - ne_session *sess = DEFSESS; - int ret; - - CALL(spawn_server(7777, just_serve_string, "Hello, world.\n")); - ret = any_request(sess, "/bar"); - CALL(await_server()); - - ONN("request did not fail", ret != NE_ERROR); - - ne_session_destroy(sess); - return OK; -} - -/* Server callback which handles a CONNECT request. */ -static int tunnel_server(ne_socket *sock, void *ud) -{ - struct ssl_server_args *args = ud; - - CALL(discard_request(sock)); - - SEND_STRING(sock, "HTTP/1.1 200 OK\r\nServer: serve_tunnel\r\n\r\n"); - - return ssl_server(sock, args); -} - -static int wildcard_match(void) -{ - ne_session *sess; - struct ssl_server_args args = {"wildcard.cert", 0}; - - sess = ne_session_create("https", "anything.example.com", 443); - ne_session_proxy(sess, "localhost", 7777); - - CALL(any_ssl_request(sess, tunnel_server, &args, CA_CERT, NULL, NULL)); - ne_session_destroy(sess); - - return OK; -} - -/* Check that hostname comparisons are not cases-sensitive. */ -static int caseless_match(void) -{ - return accept_signed_cert("caseless.cert"); -} - -/* Test that the subjectAltName extension has precedence over the - * commonName attribute */ -static int subject_altname(void) -{ - return accept_signed_cert("altname1.cert"); -} - -/* tests for multiple altNames. */ -static int two_subject_altname(void) -{ - return accept_signed_cert("altname2.cert"); -} - -static int two_subject_altname2(void) -{ - return accept_signed_cert("altname3.cert"); -} - -/* Test that a subject altname with *only* an eMail entry is - * ignored, and the commonName is used instead. */ -static int notdns_altname(void) -{ - return accept_signed_cert("altname4.cert"); -} - -static int ipaddr_altname(void) -{ - return accept_signed_cert_for_hostname("altname5.cert", "127.0.0.1"); -} - -static int uri_altname(void) -{ - return accept_signed_cert_for_hostname("altname7.cert", "localhost"); -} - -/* test that the *most specific* commonName attribute is used. */ -static int multi_commonName(void) -{ - return accept_signed_cert("twocn.cert"); -} - -/* regression test for neon <= 0.23.4 where if commonName was the first - * RDN in the subject DN, it was ignored. */ -static int commonName_first(void) -{ - return accept_signed_cert("cnfirst.cert"); -} - -static int check_dname(const ne_ssl_dname *dn, const char *expected, - const char *which) -{ - char *dname; - - ONV(dn == NULL, ("certificate %s dname was NULL", which)); - - dname = ne_ssl_readable_dname(dn); - - NE_DEBUG(NE_DBG_SSL, "Got dname `%s', expecting `%s'\n", dname, expected); - - ONV(strcmp(dname, expected), - ("certificate %s dname was `%s' not `%s'", which, dname, expected)); - - ne_free(dname); - - return 0; -} - -/* Check that the readable subject issuer dnames of 'cert' match - * 'subject' and 'issuer' (if non-NULL). */ -static int check_cert_dnames(const ne_ssl_certificate *cert, - const char *subject, const char *issuer) -{ - ONN("no server certificate presented", cert == NULL); - CALL(check_dname(ne_ssl_cert_subject(cert), subject, "subject")); - return issuer ? check_dname(ne_ssl_cert_issuer(cert), issuer, "issuer") : OK; -} - -/* Verify callback which checks that the certificate presented has the - * predetermined subject and issuer DN (as per makekeys.sh). */ -static int check_cert(void *userdata, int fs, const ne_ssl_certificate *cert) -{ - int *ret = userdata; - - if (check_cert_dnames(cert, SERVER_DNAME, CACERT_DNAME) == FAIL) - *ret = -1; - else - *ret = 1; - - return 0; -} - -/* Check that certificate attributes are passed correctly. */ -static int parse_cert(void) -{ - ne_session *sess = DEFSESS; - int ret = 0; - struct ssl_server_args args = {SERVER_CERT, 0}; - - /* don't give a CA cert; should force the verify callback to be - * used. */ - CALL(any_ssl_request(sess, ssl_server, &args, NULL, - check_cert, &ret)); - ne_session_destroy(sess); - - ONN("cert verification never called", ret == 0); - - if (ret == -1) - return FAIL; - - return OK; -} - -/* Check the certificate chain presented against known dnames. */ -static int check_chain(void *userdata, int fs, const ne_ssl_certificate *cert) -{ - int *ret = userdata; - - if (check_cert_dnames(cert, SERVER_DNAME, CACERT_DNAME) == FAIL) { - *ret = -1; - return 0; - } - - cert = ne_ssl_cert_signedby(cert); - if (cert == NULL) { - t_context("no CA cert in chain"); - *ret = -1; - return 0; - } - - if (check_cert_dnames(cert, CACERT_DNAME, CACERT_DNAME) == FAIL) { - *ret = -1; - return 0; - } - - *ret = 1; - return 0; -} - -/* Check that certificate attributes are passed correctly. */ -static int parse_chain(void) -{ - ne_session *sess = DEFSESS; - int ret = 0; - struct ssl_server_args args = {SERVER_CERT, 0}; - - args.ca_list = "ca/cert.pem"; - - /* don't give a CA cert; should force the verify callback to be - * used. */ - CALL(any_ssl_request(sess, ssl_server, &args, NULL, - check_chain, &ret)); - ne_session_destroy(sess); - - ONN("cert verification never called", ret == 0); - - if (ret == -1) - return FAIL; - - return OK; -} - - -static int count_vfy(void *userdata, int fs, const ne_ssl_certificate *c) -{ - int *count = userdata; - (*count)++; - return 0; -} - -static int no_verify(void) -{ - ne_session *sess = DEFSESS; - int count = 0; - struct ssl_server_args args = {SERVER_CERT, 0}; - - CALL(any_ssl_request(sess, ssl_server, &args, CA_CERT, count_vfy, - &count)); - - ONN("verify callback called unnecessarily", count != 0); - - ne_session_destroy(sess); - - return OK; -} - -static int cache_verify(void) -{ - ne_session *sess = DEFSESS; - int ret, count = 0; - struct ssl_server_args args = {SERVER_CERT, 0}; - - /* force verify cert. */ - ret = any_ssl_request(sess, ssl_server, &args, NULL, count_vfy, - &count); - - CALL(spawn_server(7777, ssl_server, &args)); - ret = any_request(sess, "/foo2"); - CALL(await_server()); - - ONV(count != 1, - ("verify callback result not cached: called %d times", count)); - - ne_session_destroy(sess); - - return OK; -} - -/* Copy failures into *userdata, and fail verification. */ -static int get_failures(void *userdata, int fs, const ne_ssl_certificate *c) -{ - int *out = userdata; - *out = fs; - return -1; -} - -/* Helper function: run a request using the given self-signed server - * certificate, and expect the request to fail with the given - * verification failure flags. */ -static int fail_ssl_request(char *cert, char *cacert, const char *host, - const char *msg, int failures) -{ - ne_session *sess = ne_session_create("https", host, 7777); - int gotf = 0, ret; - - ret = any_ssl_request(sess, fail_serve, cert, cacert, - get_failures, &gotf); - - ONV(gotf == 0, - ("no error in verification callback; request failed: %s", - ne_get_error(sess))); - - ONV(gotf & ~NE_SSL_FAILMASK, - ("verification flags %x outside mask %x", gotf, NE_SSL_FAILMASK)); - - /* check the failure flags were as expected. */ - ONV(failures != gotf, - ("verification flags were %d not %d", gotf, failures)); - - /* and check that the request was failed too. */ - ONV(ret == NE_OK, ("%s", msg)); - - ne_session_destroy(sess); - - return OK; -} - -/* Note that the certs used for fail_* are mostly self-signed, so the - * cert is passed as CA cert and server cert to fail_ssl_request. */ - -/* Check that a certificate with the incorrect commonName attribute is - * flagged as such. */ -static int fail_wrongCN(void) -{ - return fail_ssl_request("wrongcn.pem", "wrongcn.pem", "localhost", - "certificate with incorrect CN was accepted", - NE_SSL_IDMISMATCH); -} - -/* Check that an expired certificate is flagged as such. */ -static int fail_expired(void) -{ - char *c = ne_concat(srcdir, "/expired.pem", NULL); - CALL(fail_ssl_request(c, c, "localhost", - "expired certificate was accepted", NE_SSL_EXPIRED)); - ne_free(c); - return OK; -} - -static int fail_notvalid(void) -{ - char *c = ne_concat(srcdir, "/notvalid.pem", NULL); - CALL(fail_ssl_request(c, c, "localhost", - "not yet valid certificate was accepted", - NE_SSL_NOTYETVALID)); - ne_free(c); - return OK; -} - -/* Check that a server cert with a random issuer and self-signed cert - * fail with UNTRUSTED. */ -static int fail_untrusted_ca(void) -{ - return fail_ssl_request("server.cert", NULL, "localhost", - "untrusted CA.", NE_SSL_UNTRUSTED); -} - -static int fail_self_signed(void) -{ - return fail_ssl_request("ssigned.pem", NULL, "localhost", - "self-signed cert", NE_SSL_UNTRUSTED); -} - -/* Test for failure when a server cert is presented which has no - * commonName (and no alt names either). */ -static int fail_missing_CN(void) -{ - ne_session *sess = DEFSESS; - - ONN("accepted server cert with missing commonName", - any_ssl_request(sess, fail_serve, "missingcn.cert", SERVER_CERT, - NULL, NULL) == NE_OK); - - ONV(strstr(ne_get_error(sess), "missing commonName") == NULL, - ("unexpected session error `%s'", ne_get_error(sess))); - - ne_session_destroy(sess); - return OK; -} - -/* test for a bad ipAddress altname */ -static int fail_bad_ipaltname(void) -{ - return fail_ssl_request("altname6.cert", CA_CERT, "127.0.0.1", - "bad IP altname cert", NE_SSL_IDMISMATCH); -} - -/* test for a ipAddress which matched against the hostname as per neon - * 0.24 behaviour. */ -static int fail_host_ipaltname(void) -{ - return fail_ssl_request("altname5.cert", CA_CERT, "localhost", - "bad IP altname cert", NE_SSL_IDMISMATCH); -} - -static int fail_bad_urialtname(void) -{ - return fail_ssl_request("altname8.cert", CA_CERT, "localhost", - "bad URI altname cert", NE_SSL_IDMISMATCH); -} - -/* Test that the SSL session is cached across connections. */ -static int session_cache(void) -{ - struct ssl_server_args args = {0}; - ne_session *sess = ne_session_create("https", "localhost", 7777); - - args.cert = SERVER_CERT; - args.cache = 1; - - ne_ssl_trust_cert(sess, def_ca_cert); - - /* have spawned server listen for several connections. */ - CALL(spawn_server_repeat(7777, ssl_server, &args, 4)); - - ONREQ(any_request(sess, "/req1")); - ONREQ(any_request(sess, "/req2")); - ne_session_destroy(sess); - /* server should still be waiting for connections: if not, - * something went wrong. */ - ONN("error from child", dead_server()); - /* now get rid of it. */ - reap_server(); - - return OK; -} - -/* Callback for client_cert_provider; takes a c. cert as userdata and - * registers it. */ -static void ccert_provider(void *userdata, ne_session *sess, - const ne_ssl_dname *const *dns, int dncount) -{ - const ne_ssl_client_cert *cc = userdata; - ne_ssl_set_clicert(sess, cc); -} - -/* Test that the on-demand client cert provider callback is used. */ -static int client_cert_provided(void) -{ - ne_session *sess = DEFSESS; - ne_ssl_client_cert *cc; - struct ssl_server_args args = {SERVER_CERT, NULL}; - - args.require_cc = 1; - - cc = ne_ssl_clicert_read("client.p12"); - ONN("could not load client.p12", cc == NULL); - ONN("could not decrypt client.p12", - ne_ssl_clicert_decrypt(cc, "foobar")); - - ne_ssl_provide_clicert(sess, ccert_provider, cc); - CALL(any_ssl_request(sess, ssl_server, &args, CA_CERT, - NULL, NULL)); - - ne_session_destroy(sess); - ne_ssl_clicert_free(cc); - return OK; -} - -static void cc_check_dnames(void *userdata, ne_session *sess, - const ne_ssl_dname *const *dns, int dncount) -{ - int n, *ret = userdata; - static const char *expected[4] = { - "First Random CA, CAs Ltd., Lincoln, Lincolnshire, GB", - "Second Random CA, CAs Ltd., Falmouth, Cornwall, GB", - "Third Random CA, CAs Ltd., Ipswich, Suffolk, GB", - "Fourth Random CA, CAs Ltd., Norwich, Norfolk, GB" - }; - - ne_ssl_set_clicert(sess, def_cli_cert); - - if (dncount != 4) { - t_context("dname count was %d not 4", dncount); - *ret = -1; - return; - } - - for (n = 0; n < 4; n++) { - char which[5]; - - sprintf(which, "%d", n); - - if (check_dname(dns[n], expected[n], which) == FAIL) { - *ret = -1; - return; - } - } - - *ret = 1; -} - -/* Test for the list of acceptable dnames sent to the client. */ -static int cc_provided_dnames(void) -{ - int check = 0; - ne_session *sess = DEFSESS; - struct ssl_server_args args = {SERVER_CERT, NULL}; - - args.require_cc = 1; - args.send_ca = "calist.pem"; - - PRECOND(def_cli_cert); - - ne_ssl_provide_clicert(sess, cc_check_dnames, &check); - - CALL(any_ssl_request(sess, ssl_server, &args, CA_CERT, NULL, NULL)); - - ne_session_destroy(sess); - - ONN("provider function not called", check == 0); - - return (check == -1) ? FAIL : OK; -} - -/* Tests use of a client certificate. */ -static int client_cert_pkcs12(void) -{ - ne_session *sess = DEFSESS; - struct ssl_server_args args = {SERVER_CERT, NULL}; - - args.require_cc = 1; - - PRECOND(def_cli_cert); - - ne_ssl_set_clicert(sess, def_cli_cert); - CALL(any_ssl_request(sess, ssl_server, &args, CA_CERT, NULL, NULL)); - - ne_session_destroy(sess); - return OK; -} - - -/* Tests use of an unencrypted client certificate. */ -static int ccert_unencrypted(void) -{ - ne_session *sess = DEFSESS; - ne_ssl_client_cert *ccert; - struct ssl_server_args args = {SERVER_CERT, NULL}; - - args.require_cc = 1; - - ccert = ne_ssl_clicert_read("unclient.p12"); - ONN("could not load unclient.p12", ccert == NULL); - ONN("unclient.p12 was encrypted", ne_ssl_clicert_encrypted(ccert)); - - ne_ssl_set_clicert(sess, ccert); - CALL(any_ssl_request(sess, ssl_server, &args, CA_CERT, NULL, NULL)); - - ne_ssl_clicert_free(ccert); - ne_session_destroy(sess); - return OK; -} - -/* non-zero if a server auth header was received */ -static int got_server_auth; - -/* Utility function which accepts the 'tunnel' header. */ -static void tunnel_header(char *value) -{ - got_server_auth = 1; -} - -/* Server which acts as a proxy accepting a CONNECT request. */ -static int serve_tunnel(ne_socket *sock, void *ud) -{ - struct ssl_server_args *args = ud; - - /* check for a server auth function */ - want_header = "Authorization"; - got_header = tunnel_header; - got_server_auth = 0; - - /* give the plaintext tunnel reply, acting as the proxy */ - CALL(discard_request(sock)); - - if (got_server_auth) { - SEND_STRING(sock, "HTTP/1.1 500 Leaked Server Auth Creds\r\n" - "Content-Length: 0\r\n" "Server: serve_tunnel\r\n\r\n"); - return 0; - } else { - SEND_STRING(sock, "HTTP/1.1 200 OK\r\nServer: serve_tunnel\r\n\r\n"); - return ssl_server(sock, args); - } -} - -/* neon versions <= 0.21.2 segfault here because ne_sock_close would - * be called twice on the socket after the server cert verification - * fails. */ -static int fail_tunnel(void) -{ - ne_session *sess = ne_session_create("https", "example.com", 443); - struct ssl_server_args args = {SERVER_CERT, NULL}; - - ne_session_proxy(sess, "localhost", 7777); - - ONN("server cert verification didn't fail", - any_ssl_request(sess, serve_tunnel, &args, CA_CERT, - NULL, NULL) != NE_ERROR); - - ne_session_destroy(sess); - return OK; -} - -static int proxy_tunnel(void) -{ - ne_session *sess = ne_session_create("https", "localhost", 443); - struct ssl_server_args args = {SERVER_CERT, NULL}; - - ne_session_proxy(sess, "localhost", 7777); - - /* CA cert is trusted, so no verify callback should be needed. */ - CALL(any_ssl_request(sess, serve_tunnel, &args, CA_CERT, - NULL, NULL)); - - ne_session_destroy(sess); - return OK; -} - -#define RESP_0LENGTH "HTTP/1.1 200 OK\r\n" "Content-Length: 0\r\n" "\r\n" - -/* a tricky test which requires spawning a second server process in - * time for a new connection after a 407. */ -static int apt_post_send(ne_request *req, void *ud, const ne_status *st) -{ - int *code = ud; - if (st->code == *code) { - struct ssl_server_args args = {SERVER_CERT, NULL}; - - if (*code == 407) args.numreqs = 2; - args.response = RESP_0LENGTH; - - NE_DEBUG(NE_DBG_HTTP, "Got challenge, awaiting server...\n"); - CALL(await_server()); - NE_DEBUG(NE_DBG_HTTP, "Spawning proper tunnel server...\n"); - /* serve *two* 200 OK responses. */ - CALL(spawn_server(7777, serve_tunnel, &args)); - NE_DEBUG(NE_DBG_HTTP, "Spawned.\n"); - } - return OK; -} - -static int apt_creds(void *userdata, const char *realm, int attempt, - char *username, char *password) -{ - strcpy(username, "foo"); - strcpy(password, "bar"); - return attempt; -} - -/* Test for using SSL over a CONNECT tunnel via a proxy server which - * requires authentication. Broke briefly between 0.23.x and - * 0.24.0. */ -static int auth_proxy_tunnel(void) -{ - ne_session *sess = ne_session_create("https", "localhost", 443); - int ret, code = 407; - - ne_session_proxy(sess, "localhost", 7777); - ne_hook_post_send(sess, apt_post_send, &code); - ne_set_proxy_auth(sess, apt_creds, NULL); - ne_ssl_trust_cert(sess, def_ca_cert); - - CALL(spawn_server(7777, single_serve_string, - "HTTP/1.0 407 I WANT MORE BISCUITS\r\n" - "Proxy-Authenticate: Basic realm=\"bigbluesea\"\r\n" - "Connection: close\r\n" "\r\n")); - - /* run two requests over the tunnel. */ - ret = any_2xx_request(sess, "/foobar"); - if (!ret) ret = any_2xx_request(sess, "/foobar2"); - CALL(await_server()); - CALL(ret); - - ne_session_destroy(sess); - return 0; -} - -/* Regression test to check that server credentials aren't sent to the - * proxy in a CONNECT request. */ -static int auth_tunnel_creds(void) -{ - ne_session *sess = ne_session_create("https", "localhost", 443); - int ret, code = 401; - struct ssl_server_args args = {SERVER_CERT, 0}; - - ne_session_proxy(sess, "localhost", 7777); - ne_hook_post_send(sess, apt_post_send, &code); - ne_set_server_auth(sess, apt_creds, NULL); - ne_ssl_trust_cert(sess, def_ca_cert); - - args.response = "HTTP/1.1 401 I want a Shrubbery\r\n" - "WWW-Authenticate: Basic realm=\"bigredocean\"\r\n" - "Server: Python\r\n" "Content-Length: 0\r\n" "\r\n"; - - CALL(spawn_server(7777, serve_tunnel, &args)); - ret = any_2xx_request(sess, "/foobar"); - CALL(await_server()); - CALL(ret); - - ne_session_destroy(sess); - return OK; -} - -static int auth_tunnel_fail(void) -{ - ne_session *sess = ne_session_create("https", "localhost", 443); - int ret; - - CALL(spawn_server(7777, single_serve_string, - "HTTP/1.1 407 Nyaaaaah\r\n" - "Proxy-Authenticate: GaBoogle\r\n" - "Connection: close\r\n" - "\r\n")); - - ne_session_proxy(sess, "localhost", 7777); - - ne_set_proxy_auth(sess, apt_creds, NULL); - - ret = any_request(sess, "/bar"); - ONV(ret != NE_PROXYAUTH, ("bad error code for tunnel failure: %d", ret)); - - ONV(strstr(ne_get_error(sess), "GaBoogle") == NULL, - ("bad error string for tunnel failure: %s", ne_get_error(sess))); - - ne_session_destroy(sess); - - return await_server(); -} - -/* compare against known digest of notvalid.pem. Via: - * $ openssl x509 -fingerprint -sha1 -noout -in notvalid.pem */ -#define THE_DIGEST "cf:5c:95:93:76:c6:3c:01:8b:62:" \ - "b1:6f:f7:7f:42:32:ac:e6:69:1b" - -static int cert_fingerprint(void) -{ - char *fn = ne_concat(srcdir, "/notvalid.pem", NULL); - ne_ssl_certificate *cert = ne_ssl_cert_read(fn); - char digest[60]; - - ne_free(fn); - - ONN("could not load notvalid.pem", cert == NULL); - - ONN("failed to digest", ne_ssl_cert_digest(cert, digest)); - ne_ssl_cert_free(cert); - - ONV(strcmp(digest, THE_DIGEST), - ("digest was %s not %s", digest, THE_DIGEST)); - - return OK; -} - -/* verify that identity of certificate in filename 'fname' is 'identity' */ -static int check_identity(const char *fname, const char *identity) -{ - ne_ssl_certificate *cert = ne_ssl_cert_read(fname); - const char *id; - - ONV(cert == NULL, ("could not read cert `%s'", fname)); - - id = ne_ssl_cert_identity(cert); - - if (identity) { - ONV(id == NULL, ("certificate `%s' had no identity", fname)); - ONV(strcmp(id, identity), - ("certificate `%s' had identity `%s' not `%s'", fname, - id, identity)); - } else { - ONV(id != NULL, ("certificate `%s' had identity `%s' (expected none)", - fname, id)); - } - - ne_ssl_cert_free(cert); - return OK; -} - -/* check certificate identities. */ -static int cert_identities(void) -{ - static const struct { - const char *fname, *identity; - } certs[] = { - { "ssigned.pem", "localhost" }, - { "twocn.cert", "localhost" }, - { "altname1.cert", "localhost" }, - { "altname2.cert", "nohost.example.com" }, - { "altname4.cert", "localhost" }, - { "ca4.pem", "fourth.example.com" }, - { "altname8.cert", "http://nohost.example.com/" }, - { NULL, NULL } - }; - int n; - - for (n = 0; certs[n].fname != NULL; n++) - CALL(check_identity(certs[n].fname, certs[n].identity)); - - return OK; -} - -static int check_validity(const char *fname, - const char *from, const char *until) -{ - char actfrom[NE_SSL_VDATELEN], actuntil[NE_SSL_VDATELEN]; - ne_ssl_certificate *cert; - - cert = ne_ssl_cert_read(fname); - ONV(cert == NULL, ("could not load cert `%s'", fname)); - - /* cover all calling combos for nice coverage analysis */ - ne_ssl_cert_validity(cert, NULL, NULL); - ne_ssl_cert_validity(cert, actfrom, NULL); - ne_ssl_cert_validity(cert, NULL, actuntil); - ne_ssl_cert_validity(cert, actfrom, actuntil); - - ONV(strcmp(actfrom, from), - ("%s: start time was `%s' not `%s'", fname, actfrom, from)); - - ONV(strcmp(actuntil, until), - ("%s: end time was `%s' not `%s'", fname, actuntil, until)); - - ne_ssl_cert_free(cert); - return OK; -} - -/* ceritificate validity times. */ -static int cert_validity(void) -{ - char *cert = ne_concat(srcdir, "/expired.pem", NULL); - CALL(check_validity(cert, - "Mon, 21 Jan 2002 20:39:04 GMT", "Thu, 31 Jan 2002 20:39:04 GMT")); - ne_free(cert); - cert = ne_concat(srcdir, "/notvalid.pem", NULL); - CALL(check_validity(cert, - "Wed, 27 Dec 2023 20:40:29 GMT", "Thu, 28 Dec 2023 20:40:29 GMT")); - ne_free(cert); - return OK; -} - -/* dname comparisons. */ -static int dname_compare(void) -{ - ne_ssl_certificate *ssigned; - const ne_ssl_dname *dn1, *dn2; - - dn1 = ne_ssl_cert_subject(def_server_cert); - dn2 = ne_ssl_cert_subject(def_server_cert); - ONN("identical subject names not equal", ne_ssl_dname_cmp(dn1, dn2) != 0); - - dn2 = ne_ssl_cert_issuer(def_server_cert); - ONN("issuer and subject names equal for signed cert", - ne_ssl_dname_cmp(dn1, dn2) == 0); - - dn1 = ne_ssl_cert_subject(def_ca_cert); - ONN("issuer of signed cert not equal to subject of CA cert", - ne_ssl_dname_cmp(dn1, dn2) != 0); - - ssigned = ne_ssl_cert_read("ssigned.pem"); - ONN("could not load ssigned.pem", ssigned == NULL); - - dn1 = ne_ssl_cert_subject(ssigned); - dn2 = ne_ssl_cert_issuer(ssigned); - ONN("issuer and subject names not equal for self-signed cert", - ne_ssl_dname_cmp(dn1, dn2)); - ne_ssl_cert_free(ssigned); - - return OK; -} - -/* The dname with the UTF-8 encoding of the Unicode string: - * "Hllo World". */ -#define I18N_DNAME "H\xc3\xa8llo World, Neon Hackers Ltd, Cambridge, Cambridgeshire, GB" - -/* N.B. t61subj.cert encodes an ISO-8859-1 string in a T61String - * field, which is strictly wrong but the common usage. */ - -/* tests for ne_ssl_readable_dname */ -static int dname_readable(void) -{ - struct { - const char *cert; - const char *subjdn, *issuerdn; - } ts[] = { - { "justmail.cert", "blah@example.com", NULL }, - { "t61subj.cert", I18N_DNAME, NULL }, - { "bmpsubj.cert", I18N_DNAME, NULL }, - { "utf8subj.cert", I18N_DNAME, NULL }, - { "twoou.cert", "First OU Dept, Second OU Dept, Neon Hackers Ltd, " - "Cambridge, Cambridgeshire, GB" } - }; - size_t n; - - for (n = 0; n < sizeof(ts)/sizeof(ts[0]); n++) { - ne_ssl_certificate *cert = ne_ssl_cert_read(ts[n].cert); - ONV(cert == NULL, ("could not load cert %s", ts[n].cert)); - CALL(check_cert_dnames(cert, ts[n].subjdn, ts[n].issuerdn)); - ne_ssl_cert_free(cert); - } - - return OK; -} - -/* test cert comparisons */ -static int cert_compare(void) -{ - ne_ssl_certificate *c1, *c2; - - c1 = ne_ssl_cert_read("server.cert"); - c2 = ne_ssl_cert_read("server.cert"); - ONN("identical certs don't compare equal", ne_ssl_cert_cmp(c1, c2) != 0); - ONN("identical certs don't compare equal", ne_ssl_cert_cmp(c2, c1) != 0); - ne_ssl_cert_free(c2); - - c2 = ne_ssl_cert_read("ssigned.pem"); - ONN("different certs don't compare different", - ne_ssl_cert_cmp(c1, c2) == 0); - ONN("different certs don't compare different", - ne_ssl_cert_cmp(c2, c1) == 0); - ne_ssl_cert_free(c2); - ne_ssl_cert_free(c1); - - return OK; -} - -/* Extract raw base64 string from a PEM file */ -static int flatten_pem(const char *fname, char **out) -{ - FILE *fp = fopen(fname, "r"); - char buf[80]; - size_t outlen = 0; - int ignore = 1; - - ONV(fp == NULL, ("could not open %s", fname)); - - *out = NULL; - - while (fgets(buf, sizeof buf, fp) != NULL) { - size_t len = strlen(buf) - 1; - - if (len < 1) continue; - - /* look for the wrapper lines. */ - if (strncmp(buf, "-----", 5) == 0) { - ignore = !ignore; - continue; - } - - /* ignore until the first wrapper line */ - if (ignore) continue; - - *out = realloc(*out, outlen + len + 1); - memcpy(*out + outlen, buf, len); - outlen += len; - } - - (*out)[outlen] = '\0'; - fclose(fp); - - return OK; -} - -/* check export cert data 'actual' against expected data 'expected */ -static int check_exported_data(const char *actual, const char *expected) -{ - ONN("could not export cert", actual == NULL); - - ONN("export data contained newline", - strchr(actual, '\r') || strchr(actual, '\n')); - - ONV(strcmp(actual, expected), ("exported cert differed from expected:\n" - "actual: %s\nexpected: %s", - actual, expected)); - return OK; -} - -/* Test import and export of certificates. The export format is PEM - * without the line feeds and wrapping; compare against . */ -static int import_export(void) -{ - char *expected, *actual; - ne_ssl_certificate *cert, *imp; - - CALL(flatten_pem("server.cert", &expected)); - - cert = ne_ssl_cert_read("server.cert"); - ONN("could not load server.cert", cert == NULL); - - /* export the cert to and compare it with the PEM file */ - actual = ne_ssl_cert_export(cert); - CALL(check_exported_data(actual, expected)); - - /* import the exported cert data, check it looks the same */ - imp = ne_ssl_cert_import(actual); - ONN("failed to import exported cert", imp == NULL); - ONN("imported cert was different to original", - ne_ssl_cert_cmp(imp, cert)); - - /* re-export the imported cert and check that looks the same */ - ne_free(actual); - actual = ne_ssl_cert_export(imp); - CALL(check_exported_data(actual, expected)); - ne_ssl_cert_free(imp); - - /* try importing from bogus data */ - imp = ne_ssl_cert_import("!!"); - ONN("imported bogus cert from bogus base64", imp != NULL); - imp = ne_ssl_cert_import("aaaa"); - ONN("imported bogus cert from valid base64", imp != NULL); - - ne_ssl_cert_free(cert); - ne_free(actual); - ne_free(expected); - return OK; -} - -/* Test write/read */ -static int read_write(void) -{ - ne_ssl_certificate *c1, *c2; - - c1 = ne_ssl_cert_read("server.cert"); - ONN("could not load server.cert", c1 == NULL); - - ONN("could not write output.pem", ne_ssl_cert_write(c1, "output.pem")); - - ONN("wrote to nonexistent directory", - ne_ssl_cert_write(c1, "nonesuch/output.pem") == 0); - - c2 = ne_ssl_cert_read("output.pem"); - ONN("could not read output.pem", c2 == NULL); - - ONN("read of output.pem differs from original", - ne_ssl_cert_cmp(c2, c1)); - - ne_ssl_cert_free(c1); - ne_ssl_cert_free(c2); - - return OK; -} - -/* A verification callback which caches the passed cert. */ -static int verify_cache(void *userdata, int fs, - const ne_ssl_certificate *cert) -{ - char **cache = userdata; - - if (*cache == NULL) { - *cache = ne_ssl_cert_export(cert); - return 0; - } else { - return -1; - } -} - -/* Test a common use of the SSL API; cache the server cert across - * sessions. */ -static int cache_cert(void) -{ - ne_session *sess = DEFSESS; - char *cache = NULL; - ne_ssl_certificate *cert; - struct ssl_server_args args = {0}; - - args.cert = "ssigned.pem"; - args.cache = 1; - - ONREQ(any_ssl_request(sess, ssl_server, &args, CA_CERT, - verify_cache, &cache)); - ne_session_destroy(sess); - - ONN("no cert was cached", cache == NULL); - - /* make a real cert */ - cert = ne_ssl_cert_import(cache); - ONN("could not import cached cert", cert == NULL); - ne_free(cache); - - /* create a new session */ - sess = DEFSESS; - /* trust the cert */ - ne_ssl_trust_cert(sess, cert); - ne_ssl_cert_free(cert); - /* now, the request should succeed without manual verification */ - ONREQ(any_ssl_request(sess, ssl_server, &args, CA_CERT, - NULL, NULL)); - ne_session_destroy(sess); - return OK; -} - -static int nonssl_trust(void) -{ - ne_session *sess = ne_session_create("http", "www.example.com", 80); - - ne_ssl_trust_cert(sess, def_ca_cert); - - ne_session_destroy(sess); - - return OK; -} - -/* TODO: code paths still to test in cert verification: - * - server cert changes between connections: Mozilla gives - * a "bad MAC decode" error for this; can do better? - * - server presents no certificate (using ADH ciphers)... can - * only really happen if they mess with the SSL_CTX and enable - * ADH cipher manually; but good to check the failure case is - * safe. - * From the SSL book: - * - an early FIN should be returned as a possible truncation attack, - * NOT just an NE_SOCK_CLOSED. - * - unexpected close_notify is an error but not an attack. - * - never attempt session resumption after any aborted connection. - */ - -ne_test tests[] = { - T_LEAKY(init), - - T(load_server_certs), - T(trust_default_ca), - - T(cert_fingerprint), - T(cert_identities), - T(cert_validity), - T(cert_compare), - T(dname_compare), - T(dname_readable), - T(import_export), - T(read_write), - - T(load_client_cert), - - T(simple), - T(simple_sslv2), - T(simple_eof), - T(empty_truncated_eof), - T(fail_not_ssl), - T(cache_cert), - - T(client_cert_pkcs12), - T(ccert_unencrypted), - T(client_cert_provided), - T(cc_provided_dnames), - - T(parse_cert), - T(parse_chain), - - T(no_verify), - T(cache_verify), - T(wildcard_match), - T(caseless_match), - - T(subject_altname), - T(two_subject_altname), - T(two_subject_altname2), - T(notdns_altname), - T(ipaddr_altname), - T(uri_altname), - - T(multi_commonName), - T(commonName_first), - - T(fail_wrongCN), - T(fail_expired), - T(fail_notvalid), - T(fail_untrusted_ca), - T(fail_self_signed), - T(fail_missing_CN), - T(fail_host_ipaltname), - T(fail_bad_ipaltname), - T(fail_bad_urialtname), - - T(session_cache), - - T(fail_tunnel), - T(proxy_tunnel), - T(auth_proxy_tunnel), - T(auth_tunnel_creds), - T(auth_tunnel_fail), - - T(nonssl_trust), - - T(NULL) -}; diff --git a/client/neon-0.27.2/test/string-tests.c b/client/neon-0.27.2/test/string-tests.c deleted file mode 100644 index 5f178dee2..000000000 --- a/client/neon-0.27.2/test/string-tests.c +++ /dev/null @@ -1,643 +0,0 @@ -/* - String handling tests - Copyright (C) 2001-2007, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif -#ifdef HAVE_ERRNO_H -#include /* for the ENOENT definitions in str_errors */ -#endif - -#include "ne_string.h" -#include "ne_utils.h" - -#include "tests.h" - -#undef ONCMP -#define ONCMP(a,b) ONV(strcmp(a, b), \ - ("result was [%s] not [%s]", a, b)) - -static int simple(void) { - ne_buffer *s = ne_buffer_create(); - ON(s == NULL); - ne_buffer_zappend(s, "abcde"); - ONCMP(s->data, "abcde"); - ON(ne_buffer_size(s) != 5); - ne_buffer_destroy(s); - return OK; -} - -static int buf_concat(void) -{ - ne_buffer *s = ne_buffer_create(); - ON(s == NULL); - ne_buffer_concat(s, "a", "b", "c", "d", "e", "f", "g", NULL); - ONCMP(s->data, "abcdefg"); - ON(ne_buffer_size(s) != 7); - ne_buffer_destroy(s); - return OK; -} - -static int buf_concat2(void) -{ -#define RES "alphabetagammadeltaepsilonetatheta" - ne_buffer *s = ne_buffer_create(); - ON(s == NULL); - ne_buffer_concat(s, "alpha", "beta", "gamma", "delta", "epsilon", - "eta", "theta", NULL); - ONCMP(s->data, RES); - ON(ne_buffer_size(s) != strlen(RES)); - ne_buffer_destroy(s); - return OK; -} - -static int buf_concat3(void) -{ - ne_buffer *s = ne_buffer_create(); - ON(s == NULL); - ne_buffer_zappend(s, "foobar"); - ne_buffer_concat(s, "norman", NULL); - ONCMP(s->data, "foobarnorman"); - ON(ne_buffer_size(s) != 12); - ne_buffer_destroy(s); - return OK; -} - -static int append(void) -{ - ne_buffer *s = ne_buffer_create(); - ON(s == NULL); - ne_buffer_append(s, "a", 1); - ne_buffer_append(s, "b", 1); - ne_buffer_append(s, "c", 1); - ONCMP(s->data, "abc"); - ON(ne_buffer_size(s) != 3); - ne_buffer_zappend(s, "hello"); - ONCMP(s->data, "abchello"); - ne_buffer_czappend(s, "world"); - ONCMP(s->data, "abchelloworld"); - ON(ne_buffer_size(s) != 13); - ne_buffer_destroy(s); - return OK; -} - -static int grow(void) -{ - ne_buffer *s = ne_buffer_ncreate(2); - ON(s == NULL); - ne_buffer_append(s, "a", 1); - ne_buffer_grow(s, 4); - ONCMP(s->data, "a"); - ne_buffer_destroy(s); - return OK; -} - -static int alter(void) { - ne_buffer *s = ne_buffer_create(); - char *d; - ON(s == NULL); - ne_buffer_zappend(s, "abcdefg"); - d = s->data; - ON(d == NULL); - d[2] = '\0'; - ne_buffer_altered(s); - ONCMP(s->data, "ab"); - ON(ne_buffer_size(s) != 2); - ne_buffer_zappend(s, "hijkl"); - ONCMP(s->data, "abhijkl"); - ne_buffer_destroy(s); - return OK; -} - -/* Macros for testing ne_token. */ - -#define TEST(res) do { \ - char *tok = ne_token(&pnt, ','); \ - ONN(res ": return", tok == NULL); \ - ONN(res ": compare", strcmp(tok, (res))); \ - ONN(res ": modify", pnt == NULL); \ -} while (0) - -#define LASTTEST(res) do { \ - char *tok = ne_token(&pnt, ','); \ - ONN(res ": last return", tok == NULL); \ - ONN(res ": last compare", strcmp(tok, (res))); \ - ONN(res ": last modify", pnt != NULL); \ -} while (0) - -#define QTEST(res) do { \ - char *tok = ne_qtoken(&pnt, ',', QUOTES); \ - ONN(res ": return", tok == NULL); \ - ONN(res ": compare", strcmp(tok, (res))); \ - ONN(res ": modify", pnt == NULL); \ -} while (0) - -#define QLASTTEST(res) do { \ - char *tok = ne_qtoken(&pnt, ',', QUOTES); \ - ONN(res ": last return", tok == NULL); \ - ONN(res ": last compare", strcmp(tok, (res))); \ - ONN(res ": last modify", pnt != NULL); \ -} while (0) - -static int token1(void) -{ - char *str = ne_strdup("a,b,c,d"), *pnt = str; - - TEST("a"); TEST("b"); TEST("c"); LASTTEST("d"); - - ne_free(str); - return OK; -} - -static int token2(void) -{ - char *str = ne_strdup("norman,fishing, elsewhere"), *pnt = str; - - TEST("norman"); TEST("fishing"); LASTTEST(" elsewhere"); - - ne_free(str); - return OK; -} - -static int nulls(void) -{ - char *str = ne_strdup("alpha,,gamma"), *pnt = str; - - TEST("alpha"); TEST(""); LASTTEST("gamma"); - ne_free(str); - - pnt = str = ne_strdup(",,,wooo"); - TEST(""); TEST(""); TEST(""); LASTTEST("wooo"); - ne_free(str); - - pnt = str = ne_strdup("wooo,,,"); - TEST("wooo"); TEST(""); TEST(""); LASTTEST(""); - ne_free(str); - - return OK; -} - -static int empty(void) -{ - char *str = ne_strdup(""), *pnt = str; - - LASTTEST(""); - ne_free(str); - - return OK; -} - -#undef QUOTES -#define QUOTES "'" - -static int quoted(void) -{ - char *str = - ne_strdup("alpha,'beta, a fish called HELLO!?',sandwiches"); - char *pnt = str; - - QTEST("alpha"); - QTEST("'beta, a fish called HELLO!?'"); - QLASTTEST("sandwiches"); - - ne_free(str); - return OK; -} - -static int badquotes(void) -{ - char *str = ne_strdup("alpha,'blah"), *pnt = str; - - QTEST("alpha"); - ON(ne_qtoken(&pnt, ',', QUOTES) != NULL); - - ne_free(str); - return OK; -} - -/* for testing ne_shave. */ -#undef TEST -#define TEST(str, ws, res) do { \ - char *s = ne_strdup((str)); \ - char *r = ne_shave(s, (ws)); \ - ONN("[" str "]", strcmp(r, (res))); \ - ne_free(s); \ -} while (0) - -static int shave(void) -{ - TEST(" b ", " ", "b"); - TEST("b", " ", "b"); - TEST(" b ", " ", "b"); - TEST("--bbb-----", "-", "bbb"); - TEST("hello, world ", " ", "hello, world"); - TEST("<<><<<><<<<<><<", "<>", "this is foo"); - TEST("09809812342347I once saw an helicopter0012312312398", "0123456789", - "I once saw an helicopter"); - return OK; -} - -/* Regression test for ne_shave call which should produce an empty - * string. */ -static int shave_regress(void) -{ - TEST("\"\"", "\"", ""); - return OK; -} - -/* Test the ne_token/ne_shave combination. */ - -#undef TEST -#undef LASTTEST - -#define TEST(res) do { \ - char *tok = ne_token(&pnt, ','); \ - ONN(res ": return", tok == NULL); \ - tok = ne_shave(tok, " "); \ - ONN(res ": shave", tok == NULL); \ - ONN(res ": compare", strcmp(tok, (res))); \ - ONN(res ": modify", pnt == NULL); \ -} while (0) - - -#define LASTTEST(res) do { \ - char *tok = ne_token(&pnt, ','); \ - ONN(res ": last return", tok == NULL); \ - tok = ne_shave(tok, " "); \ - ONN(res ": last shave", tok == NULL); \ - ONN(res ": last compare", strcmp(tok, (res))); \ - ONN(res ": last modify", pnt != NULL); \ -} while (0) - -/* traditional use of ne_token/ne_shave. */ -static int combo(void) -{ - char *str = ne_strdup(" fred , mary, jim , alice, david"), *pnt = str; - - TEST("fred"); TEST("mary"); TEST("jim"); TEST("alice"); - LASTTEST("david"); - - ne_free(str); - return 0; -} - -static int concat(void) -{ -#define CAT(res, args) do { char *str = ne_concat args; \ -ONCMP(str, res); \ -ne_free(str); } while (0) - CAT("alphabeta", ("alpha", "beta", NULL)); - CAT("alpha", ("alpha", "", "", NULL)); - CAT("", ("", NULL)); - CAT("", ("", "", "", NULL)); - CAT("alpha", ("", "a", "lph", "", "a", NULL)); - return OK; -} - -static int str_errors(void) -{ - char expect[200], actual[200]; - - strncpy(expect, strerror(ENOENT), sizeof(expect)); - ONN("ne_strerror did not return passed-in buffer", - ne_strerror(ENOENT, actual, sizeof(actual)) != actual); - - ONV(strcmp(expect, actual), - ("error from ENOENT was `%s' not `%s'", actual, expect)); - - /* Test truncated error string is still NUL-terminated. */ - ne_strerror(ENOENT, actual, 6); - NE_DEBUG(NE_DBG_HTTP, "error: %s\n", actual); - ONN("truncated string had wrong length", strlen(actual) != 5); - - ne_strerror(-1, actual, 6); - ONN("truncated string for bad error had wrong length", - strlen(actual) != 5); - - return OK; -} - -static int strnzcpy(void) -{ - char buf[5]; - - ne_strnzcpy(buf, "abcdefghi", sizeof buf); - ONV(strcmp(buf, "abcd"), ("result was `%s' not `abcd'", buf)); - - ne_strnzcpy(buf, "ab", sizeof buf); - ONV(strcmp(buf, "ab"), ("result was `%s' not `ab'", buf)); - - return OK; -} - -#define FOX_STRING "The quick brown fox jumped over the lazy dog" -#define PUNC_STRING "<>,.;'#:@~[]{}!\"$%^&*()_+-=" - -static int cleaner(void) -{ - static const char *strings[] = { - "alpha", "alpha", - "pretty\033[41mcolours", "pretty [41mcolours", - "beta\n", "beta ", - "del\rt\na", "del t a", - FOX_STRING, FOX_STRING, - "0123456789", "0123456789", - PUNC_STRING, PUNC_STRING, - "\01blah blee\05bloo", " blah blee bloo", - NULL, - }; - unsigned int n; - - for (n = 0; strings[n]; n+=2) { - char *act = ne_strclean(ne_strdup(strings[n])); - - ONV(strcmp(act, strings[n+1]), - ("cleansed to `%s' not `%s'", act, strings[n+1])); - - ne_free(act); - } - - return OK; -} - -/* Check that raw data 'raw', of length 'len', has base64 encoding - * of 'expected'. */ -static int b64_check(const unsigned char *raw, size_t len, - const char *expected) -{ - char *encoded = ne_base64(raw, len); - unsigned char *decoded; - size_t dlen; - - ONV(strcmp(encoded, expected), - ("base64(\"%s\") gave \"%s\" not \"%s\"", raw, encoded, expected)); - - dlen = ne_unbase64(encoded, &decoded); - ONV(dlen != len, - ("decoded `%s' length was %" NE_FMT_SIZE_T " not %" NE_FMT_SIZE_T, - expected, dlen, len)); - - ONV(memcmp(raw, decoded, dlen), - ("decoded `%s' as `%.*s' not `%.*s'", - expected, (int)dlen, decoded, (int)dlen, raw)); - - ne_free(decoded); - ne_free(encoded); - return OK; -} - -/* ALLBITS: base64 encoding of "\0..\377" */ -#define ALLBITS \ -"AAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISIjJCUmJygpKiss" \ -"LS4vMDEyMzQ1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk9QUVJTVFVWV1hZ" \ -"WltcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AgYKDhIWG" \ -"h4iJiouMjY6PkJGSk5SVlpeYmZqbnJ2en6ChoqOkpaanqKmqq6ytrq+wsbKz" \ -"tLW2t7i5uru8vb6/wMHCw8TFxsfIycrLzM3Oz9DR0tPU1dbX2Nna29zd3t/g" \ -"4eLj5OXm5+jp6uvs7e7v8PHy8/T19vf4+fr7/P3+/w==" - -static int base64(void) -{ - unsigned char bits[256]; - size_t n; - -#define B64B(x, l, y) CALL(b64_check((unsigned char *)x, l, y)) -#define B64(x, y) B64B(x, strlen(x), y) - - /* invent these with - * $ printf "string" | uuencode -m blah - */ - B64("a", "YQ=="); - B64("bb", "YmI="); - B64("ccc", "Y2Nj"); - B64("Hello, world", "SGVsbG8sIHdvcmxk"); - B64("Aladdin:open sesame", "QWxhZGRpbjpvcGVuIHNlc2FtZQ=="); - B64("I once saw a dog called norman.\n", - "SSBvbmNlIHNhdyBhIGRvZyBjYWxsZWQgbm9ybWFuLgo="); - B64("The quick brown fox jumped over the lazy dog", - "VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wZWQgb3ZlciB0aGUgbGF6eSBkb2c="); - - /* binary data.. - * $ printf "string" | wc -c # get the length - * $ printf "string" | uuencode -m blah # get the base64 - */ - B64B("\0\0\0\0\0\n", 6, "AAAAAAAK"); - B64B("I once wished \0 upon a \0 fish.", 30, - "SSBvbmNlIHdpc2hlZCAAIHVwb24gYSAAIGZpc2gu"); - B64B("\201\202\203\204", 4, "gYKDhA=="); - - for (n = 0; n < sizeof bits; n++) - bits[n] = (unsigned char)n; - CALL(b64_check(bits, sizeof bits, ALLBITS)); - -#undef B64 -#undef B64B - return OK; -} - -static int unbase64(void) -{ - static const char *ts[] = { - "", "a", "ab", "abc", - "}bcd", "a}cd", "ab}d", "abc}", " ", - "^bcd", "a^cd", "ab^d", "abc^", - "====", "=bcd", "a=cd", "ab=d", "a==d", "a=c=", - NULL - }; - size_t n; - - for (n = 0; ts[n]; n++) { - unsigned char *tmp; - ONV(ne_unbase64(ts[n], &tmp) != 0, - ("invalid string `%s' was decoded", ts[n])); - } - - return OK; -} - -static int printing(void) -{ - struct { - const char *in, *out; - size_t pass, ret; - } ts[] = { - { "alpha", "alpha", 10, 5 }, - { "alpha", "alph", 5, 4 }, - { "foobar", "", 1, 0 }, - { NULL, NULL, 0, 0} - }; - size_t n; - - for (n = 0; ts[n].in; n++) { - char buf[512]; - size_t ret; - - memset(buf, 'A', sizeof buf); - - ret = ne_snprintf(buf, ts[n].pass, "%s", ts[n].in); - - ONCMP(buf, ts[n].out); - ONV(ret != ts[n].ret, - ("got return value %" NE_FMT_SIZE_T " not %" NE_FMT_SIZE_T, - ret, ts[n].ret)); - - /* byte past the NUL must still be 'A' */ - ONN("buffer over-ran!", buf[ret + 1] != 'A'); - } - - return OK; -} - -static int casecmp(void) -{ - static const struct { - const char *left, *right; - int expect; - } ts[] = { - { "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 0 }, - { "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz", 0 }, - { "foo", "bar", 1 }, - { "!#:[@\377", "!#:[@\377", 0 }, - { "bar", "foo", -1 }, - { "foop", "foo", 1 }, - { "foo", "foop", -1 }, - { NULL, NULL, 0 } - }; - size_t n; - - for (n = 0; ts[n].left; n++) { - int actual; - - actual = ne_strcasecmp(ts[n].left, ts[n].right); - - ONV(ts[n].expect == 0 && actual != 0, - ("strcasecmp(%s, %s) gave %d, expected 0", - ts[n].left, ts[n].right, actual)); - - ONV(ts[n].expect > 0 && actual <= 0, - ("strcasecmp(%s, %s) gave %d, expected > 0", - ts[n].left, ts[n].right, actual)); - - ONV(ts[n].expect < 0 && actual >= 0, - ("strcasecmp(%s, %s) gave %d, expected < 0", - ts[n].left, ts[n].right, actual)); - } - - ONN("comparison of identical pointers did not give zero", - ne_strcasecmp(ts[0].left, ts[0].left) != 0); - - return OK; -} - -static int casencmp(void) -{ - static const struct { - const char *left, *right; - size_t n; - int expect; - } ts[] = { - { "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 30, 0 }, - { "abcdefghijklmnopqrstuvwxyz", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", 10, 0 }, - { "ABCDEFGHIJKLMNOPQRSTUVWXYZ", "abcdefghijklmnopqrstuvwxyz", 0, 0 }, - { "foo", "bar", 3, 1 }, - { "bar", "foo", 4, -1 }, - { "bar", "foo", 3, -1 }, - { "foop", "foo", 4, 1 }, - { "foo", "foop", 4, -1 }, - { "bee", "bar", 0, 0}, - { NULL, NULL, 0, 0 } - }; - size_t n; - - for (n = 0; ts[n].left; n++) { - int actual; - - actual = ne_strncasecmp(ts[n].left, ts[n].right, ts[n].n); - - ONV(ts[n].expect == 0 && actual != 0, - ("strncasecmp(%s, %s, %" NE_FMT_SIZE_T ") gave %d, expected 0", - ts[n].left, ts[n].right, ts[n].n, actual)); - - ONV(ts[n].expect > 0 && actual <= 0, - ("strncasecmp(%s, %s, %" NE_FMT_SIZE_T ") gave %d, expected > 0", - ts[n].left, ts[n].right, ts[n].n, actual)); - - ONV(ts[n].expect < 0 && actual >= 0, - ("strncasecmp(%s, %s, %" NE_FMT_SIZE_T ") gave %d, expected < 0", - ts[n].left, ts[n].right, ts[n].n, actual)); - } - - ONN("comparison of identical pointers did not give zero", - ne_strncasecmp(ts[0].left, ts[0].left, 5) != 0); - - return OK; -} - -static int buf_print(void) -{ - ne_buffer *buf = ne_buffer_create(); - - ne_buffer_czappend(buf, "foo-"); - ne_buffer_snprintf(buf, 20, "bar-%s-asda", "norman"); - ne_buffer_czappend(buf, "-bloo"); - ONN("snprintf return value", ne_buffer_snprintf(buf, 2, "---") != 1); - - ONCMP(buf->data, "foo-bar-norman-asda-bloo-"); - - ne_buffer_destroy(buf); - - return OK; -} - - -ne_test tests[] = { - T(simple), - T(buf_concat), - T(buf_concat2), - T(buf_concat3), - T(append), - T(grow), - T(alter), - T(token1), - T(token2), - T(nulls), - T(empty), - T(quoted), - T(badquotes), - T(shave), - T(shave_regress), - T(combo), - T(concat), - T(str_errors), - T(strnzcpy), - T(cleaner), - T(base64), - T(unbase64), - T(printing), - T(casecmp), - T(casencmp), - T(buf_print), - T(NULL) -}; - diff --git a/client/neon-0.27.2/test/stubs.c b/client/neon-0.27.2/test/stubs.c deleted file mode 100644 index 624319046..000000000 --- a/client/neon-0.27.2/test/stubs.c +++ /dev/null @@ -1,173 +0,0 @@ -/* - neon test suite - Copyright (C) 2002-2005, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -/** These tests show that the stub functions produce appropriate - * results to provide ABI-compatibility when a particular feature is - * not supported by the library. - **/ - -#include "config.h" - -#include - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "ne_request.h" -#include "ne_socket.h" -#include "ne_compress.h" - -#include "tests.h" -#include "child.h" -#include "utils.h" - -#if defined(NE_HAVE_ZLIB) && defined(NE_HAVE_SSL) -#define NO_TESTS 1 -#endif - -#define EOL "\r\n" - -#ifndef NE_HAVE_ZLIB -static int sd_result = OK; - -static int sd_reader(void *ud, const char *block, size_t len) -{ - const char *expect = ud; - if (strncmp(expect, block, len) != 0) { - sd_result = FAIL; - t_context("decompress reader got bad data"); - } - return 0; -} - -static int stub_decompress(void) -{ - ne_session *sess; - ne_decompress *dc; - ne_request *req; - int ret; - - CALL(make_session(&sess, single_serve_string, - "HTTP/1.1 200 OK" EOL - "Connection: close" EOL EOL - "abcde")); - - req = ne_request_create(sess, "GET", "/foo"); - - dc = ne_decompress_reader(req, ne_accept_2xx, sd_reader, "abcde"); - - ret = ne_request_dispatch(req); - - CALL(await_server()); - - ONREQ(ret); - - ne_decompress_destroy(dc); - ne_request_destroy(req); - ne_session_destroy(sess); - - /* This is a skeleton test suite file. */ - return sd_result; -} -#endif - -#ifndef NE_HAVE_SSL -static int stub_ssl(void) -{ - ne_session *sess = ne_session_create("https", "localhost", 7777); - ne_ssl_certificate *cert; - ne_ssl_client_cert *cc; - - /* these should all fail when SSL is not supported. */ - cert = ne_ssl_cert_read("Makefile"); - if (cert) { - char *dn, digest[60], date[NE_SSL_VDATELEN]; - const ne_ssl_certificate *issuer; - - /* This branch should never be executed, but lets pretend it - * will to prevent the compiler optimising this code away if - * it's placed after the cert != NULL test. And all that - * needs to be tested is that these functions link OK. */ - dn = ne_ssl_readable_dname(ne_ssl_cert_subject(cert)); - ONN("this code shouldn't run", dn != NULL); - dn = ne_ssl_readable_dname(ne_ssl_cert_issuer(cert)); - ONN("this code shouldn't run", dn != NULL); - issuer = ne_ssl_cert_signedby(cert); - ONN("this code shouldn't run", issuer != NULL); - ONN("this code shouldn't run", ne_ssl_cert_digest(cert, digest)); - ne_ssl_cert_validity(cert, date, date); - ONN("this code shouldn't run", - ne_ssl_dname_cmp(ne_ssl_cert_subject(cert), - ne_ssl_cert_issuer(cert))); - ONN("this code shouldn't run", ne_ssl_cert_identity(issuer) != NULL); - ONN("this code shouldn't run", ne_ssl_cert_export(cert) != NULL); - } - - ONN("this code shouldn't run", ne_ssl_cert_import("foo") != NULL); - ONN("this code shouldn't run", ne_ssl_cert_read("Makefile") != NULL); - ONN("this code shouldn't succeed", ne_ssl_cert_cmp(NULL, NULL) == 0); - - ONN("certificate load succeeded", cert != NULL); - ne_ssl_cert_free(cert); - - cc = ne_ssl_clicert_read("Makefile"); - if (cc) { - const char *name; - /* dead branch as above. */ - cert = (void *)ne_ssl_clicert_owner(cc); - ONN("this code shouldn't run", cert != NULL); - name = ne_ssl_clicert_name(cc); - ONN("this code shouldn't run", name != NULL); - ONN("this code shouldn't run", ne_ssl_clicert_decrypt(cc, "fubar")); - ne_ssl_set_clicert(sess, cc); - } - - ONN("client certificate load succeeded", cc != NULL); - ne_ssl_clicert_free(cc); - - ne_ssl_trust_default_ca(sess); - - ne_session_destroy(sess); - return OK; -} -#endif - -#ifdef NO_TESTS -static int null_test(void) { return OK; } -#endif - -ne_test tests[] = { -#ifndef NE_HAVE_ZLIB - T(stub_decompress), -#endif -#ifndef NE_HAVE_SSL - T(stub_ssl), -#endif -/* to prevent failure when SSL and zlib are supported. */ -#ifdef NO_TESTS - T(null_test), -#endif - T(NULL) -}; - diff --git a/client/neon-0.27.2/test/uri-tests.c b/client/neon-0.27.2/test/uri-tests.c deleted file mode 100644 index c4b21c5ce..000000000 --- a/client/neon-0.27.2/test/uri-tests.c +++ /dev/null @@ -1,571 +0,0 @@ -/* - URI handling tests - Copyright (C) 2001-2006, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif - -#include "ne_uri.h" -#include "ne_alloc.h" - -#include "tests.h" - -static int simple(void) -{ - ne_uri p = {0}; - ON(ne_uri_parse("http://www.webdav.org/foo", &p)); - ON(strcmp(p.host, "www.webdav.org")); - ON(strcmp(p.path, "/foo")); - ON(strcmp(p.scheme, "http")); - ON(p.port); - ON(p.userinfo != NULL); - ne_uri_free(&p); - return 0; -} - -static int simple_ssl(void) -{ - ne_uri p = {0}; - ON(ne_uri_parse("https://webdav.org/", &p)); - ON(strcmp(p.scheme, "https")); - ON(p.port); - ne_uri_free(&p); - return OK; -} - -static int no_path(void) -{ - ne_uri p = {0}; - ON(ne_uri_parse("https://webdav.org", &p)); - ON(strcmp(p.path, "/")); - ne_uri_free(&p); - return OK; -} - -static int escapes(void) -{ - const struct { - const char *plain, *escaped; - } paths[] = { - { "/foo%", "/foo%25" }, - { "/foo bar", "/foo%20bar" }, - { "/foo_bar", "/foo_bar" }, - { "/foobar", "/foobar" }, - { "/a\xb9\xb2\xb3\xbc\xbd/", "/a%b9%b2%b3%bc%bd/" }, - { NULL, NULL} - }; - size_t n; - - for (n = 0; paths[n].plain; n++) { - char *esc = ne_path_escape(paths[n].plain), *un; - - ONCMP(paths[n].escaped, esc, paths[n].plain, "escape"); - - un = ne_path_unescape(esc); - - ONCMP(paths[n].plain, un, paths[n].plain, "unescape"); - ne_free(un); - ne_free(esc); - } - - ONN("unescape accepted invalid URI", - ne_path_unescape("/foo%zzbar") != NULL); - ONN("unescape accepted invalid URI", - ne_path_unescape("/foo%1zbar") != NULL); - - return OK; -} - -static int parents(void) -{ - static const struct { - const char *path, *parent; - } ps[] = { - { "/a/b/c", "/a/b/" }, - { "/a/b/c/", "/a/b/" }, - { "/alpha/beta", "/alpha/" }, - { "/foo", "/" }, - { "norman", NULL }, - { "/", NULL }, - { "", NULL }, - { NULL, NULL } - }; - int n; - - for (n = 0; ps[n].path != NULL; n++) { - char *p = ne_path_parent(ps[n].path); - if (ps[n].parent == NULL) { - ONV(p != NULL, ("parent of `%s' was `%s' not NULL", - ps[n].path, p)); - } else { - ONV(p == NULL, ("parent of `%s' was NULL", ps[n].path)); - ONV(strcmp(p, ps[n].parent), - ("parent of `%s' was `%s' not `%s'", - ps[n].path, p, ps[n].parent)); - ne_free(p); - } - } - - return OK; -} - -static int compares(void) -{ - const char *alpha = "/alpha"; - - ON(ne_path_compare("/a", "/a/") != 0); - ON(ne_path_compare("/a/", "/a") != 0); - ON(ne_path_compare("/ab", "/a/") == 0); - ON(ne_path_compare("/a/", "/ab") == 0); - ON(ne_path_compare("/a/", "/a/") != 0); - ON(ne_path_compare("/alpha/", "/beta/") == 0); - ON(ne_path_compare("/alpha", "/b") == 0); - ON(ne_path_compare("/alpha/", "/alphash") == 0); - ON(ne_path_compare("/fish/", "/food") == 0); - ON(ne_path_compare(alpha, alpha) != 0); - ON(ne_path_compare("/a/b/c/d", "/a/b/c/") == 0); - return OK; -} - -static int cmp(void) -{ - static const struct { - const char *left, *right; - } eq[] = { - { "http://example.com/alpha", "http://example.com/alpha" }, - { "//example.com/alpha", "//example.com/alpha" }, - { "http://example.com/alpha#foo", "http://example.com/alpha#foo" }, - { "http://example.com/alpha?bar", "http://example.com/alpha?bar" }, - { "http://jim@example.com/alpha", "http://jim@example.com/alpha" }, - { "HTTP://example.com/alpha", "http://example.com/alpha" }, - { "http://example.com/", "http://example.com" }, - { "http://Example.Com/", "http://example.com" }, - { NULL, NULL} - }, diff[] = { - { "http://example.com/alpha", "http://example.com/beta" }, - { "http://example.com/alpha", "https://example.com/alpha" }, - { "http://example.com/alpha", "http://www.example.com/alpha" }, - { "http://example.com:443/alpha", "http://example.com:8080/alpha" }, - { "http://example.com/alpha", "http://jim@example.com/alpha" }, - { "http://bob@example.com/alpha", "http://jim@example.com/alpha" }, - { "http://example.com/alpha", "http://example.com/alpha?fish" }, - { "http://example.com/alpha?fish", "http://example.com/alpha?food" }, - { "http://example.com/alpha", "http://example.com/alpha#foo" }, - { "http://example.com/alpha#bar", "http://example.com/alpha#foo" }, - { "http://example.com/alpha", "//example.com/alpha" }, - { "http://example.com/alpha", "///alpha" }, - { NULL, NULL} - }; - size_t n; - - for (n = 0; eq[n].left; n++) { - ne_uri alpha, beta; - int r1, r2; - - ONV(ne_uri_parse(eq[n].left, &alpha), - ("could not parse left URI '%s'", eq[n].left)); - - ONV(ne_uri_parse(eq[n].right, &beta), - ("could not parse right URI '%s'", eq[n].right)); - - r1 = ne_uri_cmp(&alpha, &beta); - r2 = ne_uri_cmp(&beta, &alpha); - - ONV(r1 != 0, - ("cmp('%s', '%s') = %d not zero", - eq[n].left, eq[n].right, r1)); - - ONV(r2 != 0, - ("cmp('%s', '%s') = %d not zero", - eq[n].right, eq[n].left, r2)); - - ne_uri_free(&alpha); - ne_uri_free(&beta); - } - - for (n = 0; diff[n].left; n++) { - ne_uri alpha, beta; - int r1, r2; - - ONV(ne_uri_parse(diff[n].left, &alpha), - ("could not parse left URI '%s'", diff[n].left)); - - ONV(ne_uri_parse(diff[n].right, &beta), - ("could not parse right URI '%s'", diff[n].right)); - - r1 = ne_uri_cmp(&alpha, &beta); - r2 = ne_uri_cmp(&beta, &alpha); - - ONV(r1 == 0, - ("'%s' and '%s' did not compare as different", - diff[n].left, diff[n].right)); - - ONV(r1 + r2 != 0, - ("'%s' and '%s' did not compare reflexively (%d vs %d)", - diff[n].left, diff[n].right, r1, r2)); - - ne_uri_free(&alpha); - ne_uri_free(&beta); - } - - return OK; -} - -static int children(void) -{ - ON(ne_path_childof("/a", "/a/b") == 0); - ON(ne_path_childof("/a/", "/a/b") == 0); - ON(ne_path_childof("/aa/b/c", "/a/b/c/d/e") != 0); - ON(ne_path_childof("////", "/a") != 0); - return OK; -} - -static int slash(void) -{ - ON(ne_path_has_trailing_slash("/a/") == 0); - ON(ne_path_has_trailing_slash("/a") != 0); - { - /* check the uri == "" case. */ - char *foo = "/"; - ON(ne_path_has_trailing_slash(&foo[1])); - } - return OK; -} - -static int default_port(void) -{ - ONN("default http: port incorrect", ne_uri_defaultport("http") != 80); - ONN("default https: port incorrect", ne_uri_defaultport("https") != 443); - ONN("unspecified scheme: port incorrect", ne_uri_defaultport("ldap") != 0); - return OK; -} - -static int parse(void) -{ - static const struct test_uri { - const char *uri, *scheme, *host; - unsigned int port; - const char *path, *userinfo, *query, *fragment; - } uritests[] = { - { "http://webdav.org/norman", "http", "webdav.org", 0, "/norman", NULL, NULL, NULL }, - { "http://webdav.org:/norman", "http", "webdav.org", 0, "/norman", NULL, NULL, NULL }, - { "https://webdav.org/foo", "https", "webdav.org", 0, "/foo", NULL, NULL, NULL }, - { "http://webdav.org:8080/bar", "http", "webdav.org", 8080, "/bar", NULL, NULL, NULL }, - { "http://a/b", "http", "a", 0, "/b", NULL, NULL, NULL }, - { "http://webdav.org/bar:fish", "http", "webdav.org", 0, "/bar:fish", NULL, NULL, NULL }, - { "http://webdav.org", "http", "webdav.org", 0, "/", NULL, NULL, NULL }, - { "http://webdav.org/fish@food", "http", "webdav.org", 0, "/fish@food", NULL, NULL, NULL }, - - /* query/fragments */ - { "http://foo/bar?alpha", "http", "foo", 0, "/bar", NULL, "alpha", NULL }, - { "http://foo/bar?alpha#beta", "http", "foo", 0, "/bar", NULL, "alpha", "beta" }, - { "http://foo/bar#alpha?beta", "http", "foo", 0, "/bar", NULL, NULL, "alpha?beta" }, - { "http://foo/bar#beta", "http", "foo", 0, "/bar", NULL, NULL, "beta" }, - { "http://foo/bar?#beta", "http", "foo", 0, "/bar", NULL, "", "beta" }, - { "http://foo/bar?alpha?beta", "http", "foo", 0, "/bar", NULL, "alpha?beta", NULL }, - - /* Examples from RFC39861.1.2: */ - { "ftp://ftp.is.co.za/rfc/rfc1808.txt", "ftp", "ftp.is.co.za", 0, "/rfc/rfc1808.txt", NULL, NULL, NULL }, - { "http://www.ietf.org/rfc/rfc2396.txt", "http", "www.ietf.org", 0, "/rfc/rfc2396.txt", NULL, NULL, NULL }, - { "ldap://[2001:db8::7]/c=GB?objectClass?one", "ldap", "[2001:db8::7]", 0, "/c=GB", NULL, "objectClass?one", NULL }, - { "mailto:John.Doe@example.com", "mailto", NULL, 0, "John.Doe@example.com", NULL, NULL, NULL }, - { "news:comp.infosystems.www.servers.unix", "news", NULL, 0, "comp.infosystems.www.servers.unix", NULL, NULL, NULL }, - { "tel:+1-816-555-1212", "tel", NULL, 0, "+1-816-555-1212", NULL, NULL, NULL }, - { "telnet://192.0.2.16:80/", "telnet", "192.0.2.16", 80, "/", NULL, NULL, NULL }, - { "urn:oasis:names:specification:docbook:dtd:xml:4.1.2", "urn", NULL, 0, - "oasis:names:specification:docbook:dtd:xml:4.1.2", NULL}, - - /* userinfo */ - { "ftp://jim:bob@jim.com", "ftp", "jim.com", 0, "/", "jim:bob", NULL, NULL }, - { "ldap://fred:bloggs@fish.com/foobar", "ldap", "fish.com", 0, - "/foobar", "fred:bloggs", NULL, NULL }, - - /* IPv6 literals: */ - { "http://[::1]/foo", "http", "[::1]", 0, "/foo", NULL, NULL, NULL }, - { "http://[a:a:a:a::0]/foo", "http", "[a:a:a:a::0]", 0, "/foo", NULL, NULL, NULL }, - { "http://[::1]:8080/bar", "http", "[::1]", 8080, "/bar", NULL, NULL, NULL }, - { "ftp://[feed::cafe]:555", "ftp", "[feed::cafe]", 555, "/", NULL, NULL, NULL }, - - { "DAV:", "DAV", NULL, 0, "", NULL, NULL, NULL }, - - /* Some odd cases: heir-part and relative-ref will both match - * with a zero-length expansion of "authority" (since * - * reg-name can be zero-length); so a triple-slash URI-ref - * will be matched as "//" followed by a zero-length authority - * followed by a path of "/". */ - { "foo:///", "foo", "", 0, "/", NULL, NULL, NULL }, - { "///", NULL, "", 0, "/", NULL, NULL, NULL }, - /* port grammar is "*DIGIT" so may be empty: */ - { "ftp://[feed::cafe]:", "ftp", "[feed::cafe]", 0, "/", NULL, NULL, NULL }, - { "ftp://[feed::cafe]:/", "ftp", "[feed::cafe]", 0, "/", NULL, NULL, NULL }, - { "http://foo:/", "http", "foo", 0, "/", NULL, NULL, NULL }, - - /* URI-references: */ - { "//foo.com/bar", NULL, "foo.com", 0, "/bar", NULL, NULL, NULL }, - { "//foo.com", NULL, "foo.com", 0, "/", NULL, NULL, NULL }, - { "//[::1]/foo", NULL, "[::1]", 0, "/foo", NULL, NULL, NULL }, - { "/bar", NULL, NULL, 0, "/bar", NULL, NULL, NULL }, /* path-absolute */ - { "foo/bar", NULL, NULL, 0, "foo/bar", NULL, NULL, NULL }, /* path-noscheme */ - { "", NULL, NULL, 0, "", NULL, NULL, NULL }, /* path-empty */ - - /* CVE-2007-0157: buffer under-read in 0.26.[012]. */ - { "http://webdav.org\xFF", "http", "webdav.org\xFF", 0, "/", NULL, NULL, NULL }, - - { NULL } - }; - int n; - - for (n = 0; uritests[n].uri != NULL; n++) { - ne_uri res; - const struct test_uri *e = &uritests[n]; - ONV(ne_uri_parse(e->uri, &res) != 0, - ("'%s': parse failed", e->uri)); - ONV(res.port != e->port, - ("'%s': parsed port was %d not %d", e->uri, res.port, e->port)); - ONCMP(e->scheme, res.scheme, e->uri, "scheme"); - ONCMP(e->host, res.host, e->uri, "host"); - ONV(strcmp(res.path, e->path), - ("'%s': parsed path was '%s' not '%s'", e->uri, res.path, e->path)); - ONCMP(e->userinfo, res.userinfo, e->uri, "userinfo"); - ONCMP(e->query, res.query, e->uri, "query"); - ONCMP(e->fragment, res.fragment, e->uri, "fragment"); - ne_uri_free(&res); - } - - return OK; -} - -static int failparse(void) -{ - static const char *uris[] = { - "http://[::1/", - "http://[::1]f:80/", - "http://[::1]]:80/", - "http://foo/bar asda", - "http://fish/[foo]/bar", - NULL - }; - int n; - - for (n = 0; uris[n] != NULL; n++) { - ne_uri p; - ONV(ne_uri_parse(uris[n], &p) == 0, - ("`%s' did not fail to parse", uris[n])); - ne_uri_free(&p); - } - - return 0; -} - -static int unparse(void) -{ - const char *uris[] = { - "http://foo.com/bar", - "https://bar.com/foo/wishbone", - "http://www.random.com:8000/", - "http://[::1]:8080/", - "ftp://ftp.foo.bar/abc/def", - "ftp://joe@bar.com/abc/def", - "http://a/b?c#d", - "http://a/b?c", - "http://a/b#d", - "mailto:foo@bar.com", - "//foo.com/bar", - "//foo.com:8080/bar", - NULL - }; - int n; - - for (n = 0; uris[n] != NULL; n++) { - ne_uri parsed; - char *unp; - - ONV(ne_uri_parse(uris[n], &parsed), - ("failed to parse %s", uris[n])); - - if (parsed.port == 0 && parsed.scheme) - parsed.port = ne_uri_defaultport(parsed.scheme); - - unp = ne_uri_unparse(&parsed); - - ONV(strcmp(unp, uris[n]), - ("unparse got %s from %s", unp, uris[n])); - - ne_uri_free(&parsed); - ne_free(unp); - } - - return OK; -} - -#define BASE "http://a/b/c/d;p?q" - -static int resolve(void) -{ - static const struct { - const char *base, *relative, *expected; - } ts[] = { - /* Examples from RFC39865.4: */ - { BASE, "g:h", "g:h" }, - { BASE, "g", "http://a/b/c/g" }, - { BASE, "./g", "http://a/b/c/g" }, - { BASE, "g/", "http://a/b/c/g/" }, - { BASE, "/g", "http://a/g" }, - { BASE, "//g", "http://g/" }, /* NOTE: modified to mandate non-empty path */ - { BASE, "?y", "http://a/b/c/d;p?y" }, - { BASE, "g?y", "http://a/b/c/g?y" }, - { BASE, "#s", "http://a/b/c/d;p?q#s" }, - { BASE, "g#s", "http://a/b/c/g#s" }, - { BASE, "g?y#s", "http://a/b/c/g?y#s" }, - { BASE, ";x", "http://a/b/c/;x" }, - { BASE, "g;x", "http://a/b/c/g;x" }, - { BASE, "g;x?y#s", "http://a/b/c/g;x?y#s" }, - { BASE, "", "http://a/b/c/d;p?q" }, - { BASE, ".", "http://a/b/c/" }, - { BASE, "./", "http://a/b/c/" }, - { BASE, "..", "http://a/b/" }, - { BASE, "../", "http://a/b/" }, - { BASE, "../g", "http://a/b/g" }, - { BASE, "../..", "http://a/" }, - { BASE, "../../", "http://a/" }, - { BASE, "../../g", "http://a/g" }, - { BASE, "../../../g", "http://a/g" }, - { BASE, "../../../../g", "http://a/g" }, - { BASE, "/./g", "http://a/g" }, - { BASE, "/../g", "http://a/g" }, - { BASE, "g.", "http://a/b/c/g." }, - { BASE, ".g", "http://a/b/c/.g" }, - { BASE, "g..", "http://a/b/c/g.." }, - { BASE, "..g", "http://a/b/c/..g" }, - { BASE, "./../g", "http://a/b/g" }, - { BASE, "./g/.", "http://a/b/c/g/" }, - { BASE, "g/./h", "http://a/b/c/g/h" }, - { BASE, "g/../h", "http://a/b/c/h" }, - { BASE, "g;x=1/./y", "http://a/b/c/g;x=1/y" }, - { BASE, "g;x=1/../y", "http://a/b/c/y" }, - { BASE, "g?y/./x", "http://a/b/c/g?y/./x" }, - { BASE, "g?y/../x", "http://a/b/c/g?y/../x" }, - { BASE, "g#s/./x", "http://a/b/c/g#s/./x" }, - { BASE, "g#s/../x", "http://a/b/c/g#s/../x" }, - { BASE, "http:g", "http:g" }, - /* Additional examples: */ - { BASE, ".", "http://a/b/c/" }, - { "http://foo.com/alpha/beta", "../gamma", "http://foo.com/gamma" }, - { "http://foo.com/alpha//beta", "../gamma", "http://foo.com/alpha/gamma" }, - - { "http://foo.com", "../gamma", "http://foo.com/gamma" }, - { "", "zzz:.", "zzz:" }, - { "", "zzz:./foo", "zzz:foo" }, - { "", "zzz:../foo", "zzz:foo" }, - { "", "zzz:/./foo", "zzz:/foo" }, - { "", "zzz:/.", "zzz:/" }, - { "", "zzz:/../", "zzz:/" }, - { "", "zzz:.", "zzz:" }, - { "", "zzz:..", "zzz:" }, - { "", "zzz://foo@bar/", "zzz://foo@bar/" }, - { "", "zzz://foo/?bar", "zzz://foo/?bar" }, - { "zzz://foo/?bar", "//baz/?jam", "zzz://baz/?jam" }, - { "zzz://foo/baz?biz", "", "zzz://foo/baz?biz" }, - { "zzz://foo/baz", "", "zzz://foo/baz" }, - { "//foo/baz", "", "//foo/baz" }, - - - { NULL, NULL, NULL } - }; - size_t n; - - for (n = 0; ts[n].base; n++) { - ne_uri base, relative, resolved; - char *actual; - - ONV(ne_uri_parse(ts[n].base, &base), - ("could not parse base URI '%s'", ts[n].base)); - - ONV(ne_uri_parse(ts[n].relative, &relative), - ("could not parse input URI '%s'", ts[n].relative)); - - ONN("bad pointer was returned", - ne_uri_resolve(&base, &relative, &resolved) != &resolved); - - actual = ne_uri_unparse(&resolved); - - ONCMP(ts[n].expected, actual, ts[n].relative, "output mismatch"); - - ne_uri_free(&relative); - ne_uri_free(&resolved); - ne_uri_free(&base); - ne_free(actual); - } - - return OK; -} - -static int copy(void) -{ - static const char *ts[] = { - "http://jim@foo.com:8080/bar?baz#bee", - "", - NULL, - }; - size_t n; - - for (n = 0; ts[n]; n++) { - ne_uri parsed, parsed2; - char *actual; - - ONV(ne_uri_parse(ts[n], &parsed), ("could not parse URI '%s'", ts[n])); - ONN("ne_uri_copy returned wrong pointer", - ne_uri_copy(&parsed2, &parsed) != &parsed2); - - actual = ne_uri_unparse(&parsed2); - - ONCMP(ts[n], actual, "copied URI", "unparsed URI"); - - ne_uri_free(&parsed2); - ne_uri_free(&parsed); - ne_free(actual); - } - - return OK; -} - -ne_test tests[] = { - T(simple), - T(simple_ssl), - T(no_path), - T(escapes), - T(parents), - T(compares), - T(cmp), - T(children), - T(slash), - T(default_port), - T(parse), - T(failparse), - T(unparse), - T(resolve), - T(copy), - T(NULL) -}; diff --git a/client/neon-0.27.2/test/util-tests.c b/client/neon-0.27.2/test/util-tests.c deleted file mode 100644 index 95e4c7476..000000000 --- a/client/neon-0.27.2/test/util-tests.c +++ /dev/null @@ -1,311 +0,0 @@ -/* - utils tests - Copyright (C) 2001-2006, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_STRING_H -#include -#endif - -#include "ne_utils.h" -#include "ne_md5.h" -#include "ne_alloc.h" -#include "ne_dates.h" -#include "ne_string.h" - -#include "tests.h" - -static const struct { - const char *status; - int major, minor, code; - const char *rp; -} accept_sl[] = { - /* These are really valid. */ - { "HTTP/1.1 200 OK", 1, 1, 200, "OK" }, - { "HTTP/1.1000 200 OK", 1, 1000, 200, "OK" }, - { "HTTP/1000.1000 200 OK", 1000, 1000, 200, "OK" }, - { "HTTP/00001.1 200 OK", 1, 1, 200, "OK" }, - { "HTTP/1.00001 200 OK", 1, 1, 200, "OK" }, - { "HTTP/99.99 999 99999", 99, 99, 999, "99999" }, - { "HTTP/1.1 100 ", 1, 1, 100, "" }, - - /* these aren't really valid but we should be able to parse them. */ - { "HTTP/1.1 100", 1, 1, 100, "" }, - { "HTTP/1.1 200 OK", 1, 1, 200, "OK" }, - { "HTTP/1.1 200 \t OK", 1, 1, 200, "OK" }, - { " HTTP/1.1 200 OK", 1, 1, 200, "OK" }, - { "Norman is a dog HTTP/1.1 200 OK", 1, 1, 200, "OK" }, - { NULL } -}; - -static const char *bad_sl[] = { - "", - "HTTP/1.1 1000 OK", - "HTTP/1.1 1000", - "HTTP/-1.1 100 OK", - "HTTP/1.1 -100 OK", - "HTTP/ 200 OK", - "HTTP/", - "HTTP/1.1A 100 OK", - "HTTP/1.", - "HTTP/1.1 1", - "Fish/1.1 100 OK", - "HTTP/1.1 10", - "HTTP", - "H\0TP/1.1 100 OK", - NULL -}; - -static int status_lines(void) -{ - ne_status s; - int n; - - for (n = 0; accept_sl[n].status != NULL; n++) { - ONV(ne_parse_statusline(accept_sl[n].status, &s), - ("valid #%d: parse", n)); - ONV(accept_sl[n].major != s.major_version, ("valid #%d: major", n)); - ONV(accept_sl[n].minor != s.minor_version, ("valid #%d: minor", n)); - ONV(accept_sl[n].code != s.code, ("valid #%d: code", n)); - ONV(strcmp(accept_sl[n].rp, s.reason_phrase), - ("valid #%d: reason phrase", n)); - ne_free(s.reason_phrase); - } - - for (n = 0; bad_sl[n] != NULL; n++) { - ONV(ne_parse_statusline(bad_sl[n], &s) == 0, - ("invalid #%d", n)); - } - - return OK; -} - -/* Write MD5 of 'len' bytes of 'str' to 'digest' */ -static unsigned char *digest_md5(const char *data, size_t len, - unsigned int digest[4]) -{ - struct ne_md5_ctx *ctx; - -#define CHUNK 100 - ctx = ne_md5_create_ctx(); - /* exercise the buffering interface */ - while (len > CHUNK) { - ne_md5_process_bytes(data, CHUNK, ctx); - len -= CHUNK; - data += CHUNK; - } - ne_md5_process_bytes(data, len, ctx); - ne_md5_finish_ctx(ctx, digest); - ne_md5_destroy_ctx(ctx); - - return (unsigned char *)digest; -} - -static int md5(void) -{ - unsigned int buf[4], buf2[4] = {0}; - char ascii[33] = {0}; - char zzzs[500]; - - ne_md5_to_ascii(digest_md5("", 0, buf), ascii); - ONN("MD5(null)", strcmp(ascii, "d41d8cd98f00b204e9800998ecf8427e")); - - ne_md5_to_ascii(digest_md5("foobar", 7, buf), ascii); - ONN("MD5(foobar)", strcmp(ascii, "b4258860eea29e875e2ee4019763b2bb")); - - /* $ perl -e 'printf "z"x500' | md5sum - * 8b9323bd72250ea7f1b2b3fb5046391a - */ - memset(zzzs, 'z', sizeof zzzs); - ne_md5_to_ascii(digest_md5(zzzs, sizeof zzzs, buf), ascii); - ONN("MD5(\"z\"x512)", strcmp(ascii, "8b9323bd72250ea7f1b2b3fb5046391a")); - - ne_ascii_to_md5(ascii, (unsigned char *)buf2); - ON(memcmp(buf, buf2, 16)); - - return OK; -} - -static int md5_alignment(void) -{ - char *bb = ne_malloc(66); - struct ne_md5_ctx *ctx; - - /* regression test for a bug in md5.c in <0.15.0 on SPARC, where - * the process_bytes function would SIGBUS if the buffer argument - * isn't 32-bit aligned. Won't trigger on x86 though. */ - ctx = ne_md5_create_ctx(); - ne_md5_process_bytes(bb + 1, 65, ctx); - ne_md5_destroy_ctx(ctx); - ne_free(bb); - - return OK; -} - -static const struct { - const char *str; - time_t time; - enum { d_rfc1123, d_iso8601, d_rfc1036 } type; -} good_dates[] = { - { "Fri, 08 Jun 2001 22:59:46 GMT", 992041186, d_rfc1123 }, - { "Friday, 08-Jun-01 22:59:46 GMT", 992041186, d_rfc1036 }, - { "Wednesday, 06-Jun-01 22:59:46 GMT", 991868386, d_rfc1036 }, - /* some different types of ISO8601 dates. */ - { "2001-06-08T22:59:46Z", 992041186, d_iso8601 }, - { "2001-06-08T22:59:46.9Z", 992041186, d_iso8601 }, - { "2001-06-08T26:00:46+03:01", 992041186, d_iso8601 }, - { "2001-06-08T20:58:46-02:01", 992041186, d_iso8601 }, - { NULL } -}; - -static int parse_dates(void) -{ - int n; - - for (n = 0; good_dates[n].str != NULL; n++) { - time_t res; - const char *str = good_dates[n].str; - - switch (good_dates[n].type) { - case d_rfc1036: res = ne_rfc1036_parse(str); break; - case d_iso8601: res = ne_iso8601_parse(str); break; - case d_rfc1123: res = ne_rfc1123_parse(str); break; - default: res = -1; break; - } - - ONV(res == -1, ("date %d parse", n)); - -#define FT "%" NE_FMT_TIME_T - ONV(res != good_dates[n].time, ( - "date %d incorrect (" FT " not " FT ")", n, - res, good_dates[n].time)); - } - - return OK; -} - -/* trigger segfaults in ne_rfc1036_parse() in <=0.24.5. */ -static int regress_dates(void) -{ - static const char *dates[] = { - "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA" - }; - size_t n; - - for (n = 0; n < sizeof(dates)/sizeof(dates[0]); n++) { - ne_rfc1036_parse(dates[n]); - ne_iso8601_parse(dates[n]); - ne_rfc1123_parse(dates[n]); - } - - return OK; -} - -#define GOOD(n,m,msg) ONV(ne_version_match(n,m), \ -("match of " msg " failed (%d.%d)", n, m)) -#define BAD(n,m,msg) ONV(ne_version_match(n,m) == 0, \ -("match of " msg " succeeded (%d.%d)", n, m)) - -static int versioning(void) -{ - GOOD(NE_VERSION_MAJOR, NE_VERSION_MINOR, "current version"); - BAD(NE_VERSION_MAJOR + 1, 0, "later major"); - BAD(NE_VERSION_MAJOR, NE_VERSION_MINOR + 1, "later minor"); -#if NE_VERSION_MAJOR > 0 - BAD(NE_VERSION_MAJOR - 1, 0, "earlier major"); -#if NE_VERSION_MINOR > 0 - GOOD(NE_VERSION_MAJOR, NE_VERSION_MINOR - 1, "earlier minor"); -#endif /* NE_VERSION_MINOR > 0 */ -#else /* where NE_VERSION_MAJOR == 0 */ - BAD(0, NE_VERSION_MINOR - 1, "earlier minor for 0.x"); -#endif - return OK; -} - -#undef GOOD -#undef BAD - -/* basic ne_version_string() sanity tests */ -static int version_string(void) -{ - char buf[1024]; - - ne_snprintf(buf, sizeof buf, "%s", ne_version_string()); - - NE_DEBUG(NE_DBG_HTTP, "Version string: %s\n", buf); - - ONN("version string too long", strlen(buf) > 200); - ONN("version string contained newline", strchr(buf, '\n') != NULL); - - return OK; -} - -static int support(void) -{ -#ifdef NE_HAVE_SSL - ONN("SSL support not advertised", !ne_has_support(NE_FEATURE_SSL)); -#else - ONN("SSL support advertised", ne_has_support(NE_FEATURE_SSL)); -#endif -#ifdef NE_HAVE_ZLIB - ONN("zlib support not advertised", !ne_has_support(NE_FEATURE_ZLIB)); -#else - ONN("zlib support advertised", ne_has_support(NE_FEATURE_ZLIB)); -#endif -#ifdef NE_HAVE_IPV6 - ONN("IPv6 support not advertised", !ne_has_support(NE_FEATURE_IPV6)); -#else - ONN("IPv6 support advertised", ne_has_support(NE_FEATURE_IPV6)); -#endif -#ifdef NE_HAVE_LFS - ONN("LFS support not advertised", !ne_has_support(NE_FEATURE_LFS)); -#else - ONN("LFS support advertised", ne_has_support(NE_FEATURE_LFS)); -#endif -#ifdef NE_HAVE_TS_SSL - ONN("Thread-safe SSL support not advertised", - !ne_has_support(NE_FEATURE_TS_SSL)); -#else - ONN("Thread-safe SSL support advertised", - ne_has_support(NE_FEATURE_TS_SSL)); -#endif -#ifdef NE_HAVE_I18N - ONN("i18n support not advertised", - !ne_has_support(NE_FEATURE_I18N)); -#else - ONN("i18n SSL support advertised", - ne_has_support(NE_FEATURE_I18N)); -#endif - return OK; -} - -ne_test tests[] = { - T(status_lines), - T(md5), - T(md5_alignment), - T(parse_dates), - T(regress_dates), - T(versioning), - T(version_string), - T(support), - T(NULL) -}; diff --git a/client/neon-0.27.2/test/utils.c b/client/neon-0.27.2/test/utils.c deleted file mode 100644 index 3cc63e1c7..000000000 --- a/client/neon-0.27.2/test/utils.c +++ /dev/null @@ -1,149 +0,0 @@ -/* - Utility functions for HTTP client tests - Copyright (C) 2001-2004, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#ifdef HAVE_UNISTD_H -#include /* for sleep() */ -#endif -#ifdef HAVE_STDLIB_H -#include -#endif - -#include "ne_session.h" - -#include "child.h" -#include "tests.h" -#include "utils.h" - -int make_session(ne_session **sess, server_fn fn, void *ud) -{ - *sess = ne_session_create("http", "localhost", 7777); - return spawn_server(7777, fn, ud); -} - -static int serve_response(ne_socket *s, const char *response) -{ - CALL(discard_request(s)); - CALL(discard_body(s)); - ONN("failed to send response", SEND_STRING(s, response)); - return OK; -} - -int single_serve_string(ne_socket *s, void *userdata) -{ - const char *str = userdata; - return serve_response(s, str); -} - -int sleepy_server(ne_socket *sock, void *userdata) -{ - sleep(10); - return 0; -} - -int many_serve_string(ne_socket *s, void *userdata) -{ - int n; - struct many_serve_args *args = userdata; - - for (n = 0; n < args->count; n++) { - NE_DEBUG(NE_DBG_HTTP, "Serving response %d\n", n); - CALL(serve_response(s, args->str)); - } - - return OK; -} - -int any_request(ne_session *sess, const char *uri) -{ - ne_request *req = ne_request_create(sess, "GET", uri); - int ret = ne_request_dispatch(req); - ne_request_destroy(req); - return ret; -} - -int any_2xx_request(ne_session *sess, const char *uri) -{ - ne_request *req = ne_request_create(sess, "GET", uri); - int ret = ne_request_dispatch(req); - int klass = ne_get_status(req)->klass; - ne_request_destroy(req); - ONV(ret != NE_OK || klass != 2, - ("request failed: %s", ne_get_error(sess))); - return ret; -} - -int any_2xx_request_body(ne_session *sess, const char *uri) -{ - ne_request *req = ne_request_create(sess, "GET", uri); -#define BSIZE 5000 - char *body = memset(ne_malloc(BSIZE), 'A', BSIZE); - int ret; - ne_set_request_body_buffer(req, body, BSIZE); - ret = ne_request_dispatch(req); - ne_free(body); - ONV(ret != NE_OK || ne_get_status(req)->klass != 2, - ("request failed: %s", ne_get_error(sess))); - ne_request_destroy(req); - return ret; -} - -int serve_sstring(ne_socket *sock, void *ud) -{ - struct string *str = ud; - - NE_DEBUG(NE_DBG_SOCKET, "Serving string: [[[%.*s]]]\n", - (int)str->len, str->data); - - ONN("write failed", ne_sock_fullwrite(sock, str->data, str->len)); - - return 0; -} - -int serve_sstring_slowly(ne_socket *sock, void *ud) -{ - struct string *str = ud; - size_t n; - - NE_DEBUG(NE_DBG_SOCKET, "Slowly serving string: [[[%.*s]]]\n", - (int)str->len, str->data); - - for (n = 0; n < str->len; n++) { - ONN("write failed", ne_sock_fullwrite(sock, &str->data[n], 1)); - minisleep(); - } - - return 0; -} - -int serve_infinite(ne_socket *sock, void *ud) -{ - struct infinite *i = ud; - - CALL(discard_request(sock)); - - SEND_STRING(sock, i->header); - - while (server_send(sock, i->repeat, strlen(i->repeat)) == 0) - /* nullop */; - - return OK; -} diff --git a/client/neon-0.27.2/test/utils.h b/client/neon-0.27.2/test/utils.h deleted file mode 100644 index 74a41ab07..000000000 --- a/client/neon-0.27.2/test/utils.h +++ /dev/null @@ -1,78 +0,0 @@ -/* - neon-specific test utils - Copyright (C) 2001-2005, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#ifndef UTILS_H -#define UTILS_H 1 - -#include "ne_request.h" - -#include "child.h" - -#define ONREQ(x) do { int _ret = (x); if (_ret) { t_context("line %d: HTTP error:\n%s", __LINE__, ne_get_error(sess)); return FAIL; } } while (0); - -int single_serve_string(ne_socket *s, void *userdata); - -struct many_serve_args { - int count; - const char *str; -}; - -/* Serves args->str response args->count times down a single - * connection. */ -int many_serve_string(ne_socket *s, void *userdata); - -/* Run a request using URI on the session. */ -int any_request(ne_session *sess, const char *uri); - -/* Run a request using URI on the session; fail on a non-2xx response. - */ -int any_2xx_request(ne_session *sess, const char *uri); - -/* As above but with a request body. */ -int any_2xx_request_body(ne_session *sess, const char *uri); - -/* makes *session, spawns server which will run 'fn(userdata, - * socket)'. sets error context if returns non-zero, i.e use like: - * CALL(make_session(...)); */ -int make_session(ne_session **sess, server_fn fn, void *userdata); - -/* Server which sleeps for 10 seconds then closes the socket. */ -int sleepy_server(ne_socket *sock, void *userdata); - -struct string { - char *data; - size_t len; -}; - -/* Serve a struct string. */ -int serve_sstring(ne_socket *sock, void *ud); - -/* Serve a struct string slowly. */ -int serve_sstring_slowly(ne_socket *sock, void *ud); - -struct infinite { - const char *header, *repeat; -}; - -/* Pass a "struct infinite *" as userdata, this function sends - * ->header and then loops sending ->repeat forever. */ -int serve_infinite(ne_socket *sock, void *ud); - -#endif /* UTILS_H */ diff --git a/client/neon-0.27.2/test/xml.c b/client/neon-0.27.2/test/xml.c deleted file mode 100644 index ac979a2a8..000000000 --- a/client/neon-0.27.2/test/xml.c +++ /dev/null @@ -1,561 +0,0 @@ -/* - neon test suite - Copyright (C) 2002-2007, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "ne_xml.h" - -#include "tests.h" -#include "child.h" -#include "utils.h" - -#define ABORT (-42) /* magic code for abort handlers */ - -#define EVAL_DEFAULT "eval-xmlns-default" -#define EVAL_SPECIFIC "eval-xmlns-specific-" - -struct context { - ne_buffer *buf; - ne_xml_parser *parser; -}; - -/* A set of SAX handlers which serialize SAX events back into a - * pseudo-XML-like string. */ -static int startelm(void *userdata, int state, - const char *nspace, const char *name, - const char **atts) -{ - struct context *ctx = userdata; - ne_buffer *buf = ctx->buf; - int n; - - if (strcmp(name, "decline") == 0) - return NE_XML_DECLINE; - - if (strcmp(name, EVAL_DEFAULT) == 0) { - const char *val = ne_xml_resolve_nspace(ctx->parser, NULL, 0); - - ne_buffer_concat(ctx->buf, EVAL_DEFAULT "=[", val, "]", NULL); - return NE_XML_DECLINE; - } - else if (strncmp(name, EVAL_SPECIFIC, strlen(EVAL_SPECIFIC)) == 0) { - const char *which = name + strlen(EVAL_SPECIFIC); - const char *r = ne_xml_resolve_nspace(ctx->parser, which, strlen(which)); - - ne_buffer_concat(ctx->buf, name, "=[", r, "]", NULL); - return NE_XML_DECLINE; - } - - ne_buffer_concat(buf, "<", "{", nspace, "}", name, NULL); - for (n = 0; atts && atts[n] != NULL; n+=2) { - ne_buffer_concat(buf, " ", atts[n], "='", atts[n+1], "'", NULL); - } - ne_buffer_zappend(buf, ">"); - - return state + 1; -} - -static int chardata(void *userdata, int state, const char *cdata, size_t len) -{ - struct context *ctx = userdata; - ne_buffer_append(ctx->buf, cdata, len); - return strncmp(cdata, "!ABORT!", len) == 0 ? ABORT : NE_XML_DECLINE; -} - -static int endelm(void *userdata, int state, - const char *nspace, const char *name) -{ - struct context *ctx = userdata; - ne_buffer_concat(ctx->buf, "", NULL); - return 0; -} - -/* A set of SAX handlers which do as above, but change some element - * names; used to check nested SAX handling is working properly. */ -static int startelm_xform(void *userdata, int state, - const char *nspace, const char *name, - const char **atts) -{ - if (strcmp(nspace, "two") == 0) - return startelm(userdata, state, nspace, "xform", atts); - else - return NE_XML_DECLINE; -} - -static int endelm_xform(void *userdata, int state, - const char *nspace, const char *name) -{ - if (strcmp(nspace, "two") == 0) - return endelm(userdata, state, nspace, "xform"); - else - return NE_XML_DECLINE; -} - -/* A set of SAX handlers which verify that state handling is working - * correctly. */ -static int startelm_state(void *userdata, int parent, - const char *nspace, const char *name, - const char **atts) -{ - struct context *ctx = userdata; - int n; - - if (strcmp(nspace, "state") != 0) - return NE_XML_DECLINE; - - for (n = 0; atts[n]; n += 2) { - if (strcmp(atts[n], "parent") == 0) { - int expected = atoi(atts[n+1]); - - if (expected != parent) { - char err[50]; - sprintf(err, "parent state of %s was %d not %d", name, parent, - expected); - ne_buffer_zappend(ctx->buf, err); - } - } - } - - return atoi(name+1); -} - -static int endelm_state(void *userdata, int state, - const char *nspace, const char *name) -{ - int expected = atoi(name + 1); - struct context *ctx = userdata; - - if (state != expected) - ne_buffer_concat(ctx->buf, "wrong state in endelm of ", name, NULL); - - return 0; -} - -/* A set of SAX handlers which verify that abort handling is working - * correctly. */ -static int startelm_abort(void *userdata, int parent, - const char *nspace, const char *name, - const char **atts) -{ - struct context *ctx = userdata; - - if (strcmp(name, "abort-start") == 0) { - ne_buffer_zappend(ctx->buf, "ABORT"); - return ABORT; - } else - return startelm(ctx, parent, nspace, name, atts); -} - -static int endelm_abort(void *userdata, int state, - const char *nspace, const char *name) -{ - struct context *ctx = userdata; - - if (strcmp(name, "abort-end") == 0) { - ne_buffer_zappend(ctx->buf, "ABORT"); - return ABORT; - } else - return 0; -} - -/* Test mode for parse_match: */ -enum match_type { - match_valid = 0, /* test that the parse succeeds */ - match_invalid, /* test that the parse fails */ - match_nohands, /* test with no handlers registered */ - match_encoding, /* test whether the encoding is equal to the result string */ - match_chunked /* parse the document one byte at a time */ -}; - -static int parse_match(const char *doc, const char *result, - enum match_type t) -{ - const char *origdoc = doc; - ne_xml_parser *p = ne_xml_create(); - ne_buffer *buf = ne_buffer_create(); - int ret; - struct context ctx; - - ctx.buf = buf; - ctx.parser = p; - - if (t == match_invalid) - ne_xml_push_handler(p, startelm_abort, chardata, endelm_abort, &ctx); - if (t != match_encoding && t != match_nohands) { - ne_xml_push_handler(p, startelm_state, NULL, endelm_state, &ctx); - ne_xml_push_handler(p, startelm, chardata, endelm, &ctx); - ne_xml_push_handler(p, startelm_xform, chardata, endelm_xform, &ctx); - } - - if (t == match_chunked) { - do { - ret = ne_xml_parse(p, doc++, 1); - } while (ret == 0 && *doc); - } else { - ret = ne_xml_parse(p, doc, strlen(doc)); - } - - if (ret == 0) { - ne_xml_parse(p, "", 0); - } - - ONV(ret != ne_xml_failed(p), - ("'%s': ne_xml_failed gave %d not %d", origdoc, ne_xml_failed(p), ret)); - - if (t == match_invalid) - ONV(ret != ABORT, - ("for '%s': parse got %d not abort failure: %s", origdoc, ret, - buf->data)); - else - ONV(ret, ("for '%s': parse failed: %s", origdoc, ne_xml_get_error(p))); - - if (t == match_encoding) { - const char *enc = ne_xml_doc_encoding(p); - ONV(strcmp(enc, result), - ("for '%s': encoding was `%s' not `%s'", origdoc, enc, result)); - } - else if (t == match_valid || t == match_chunked) { - ONV(strcmp(result, buf->data), - ("for '%s': result mismatch: %s not %s", origdoc, buf->data, - result)); - } - - ne_xml_destroy(p); - ne_buffer_destroy(buf); - - return OK; -} - -static int matches(void) -{ -#define PFX "\r\n" -#define E(ns, n) "<{" ns "}" n ">" - static const struct { - const char *in, *out; - enum match_type invalid; - } ms[] = { - - /*** Simplest tests ***/ - { PFX "", "<{}hello>"}, - { PFX "", - "<{}hello foo='bar'>"}, - - /*** Tests for character data handling. ***/ - { PFX " world", "<{}hello> world"}, - /* test for cdata between elements. */ - { PFX "\r\n world", - "<{}hello>\n<{}wide> world"}, - - /* UTF-8 XML Byte Order Mark */ - { "\xEF\xBB\xBF" PFX "", "<{}hello>" }, - /* UTF-8 XML Byte Order Mark */ - { "\xEF\xBB\xBF" PFX "", "<{}hello>", match_chunked }, - /* UTF-8 XML Byte Order Mark sans prolog */ - { "\xEF\xBB\xBF" "", "<{}hello>" }, - - /*** Tests for namespace handling. ***/ -#define NSA "xmlns:foo='bar'" - { PFX "", - "<{bar}widget " NSA ">" - "" }, - /* inherited namespace expansion. */ - { PFX "", - "<{}widget " NSA ">" E("bar", "norman") ""}, - { PFX "" - "", - "<{}widget " NSA " xmlns:abc='def' xmlns:g='z'>" - E("bar", "norman") ""}, - /* empty namespace default takes precedence. */ - { PFX "" - "", - "<{foo}widget xmlns='foo'><{}smidgen xmlns=''>" - E("", "norman") - "" }, - /* inherited empty namespace default */ - { PFX "", - "<{foo}bar xmlns='foo'><{}grok xmlns=''>" - E("", "fish") "" }, - - /* regression test for neon <= 0.23.5 with libxml2, where the - * "dereference entities" flag was not set by default. */ - { PFX "", - "<{}widget foo='no&body'>" }, - { PFX "", - "<{}widget foo='no body'>" }, - - /* tests for declined branches */ - { PFX "fish" - "yesgoodbye", - "<{}hello><{}world>yesgoodbye" }, - { PFX - "fishbar", - "<{}hello>" E("", "fish") "" }, - /* tests for nested SAX handlers */ - { PFX "", - "<{two}hello xmlns='two'>" E("two", "xform") ""}, - - /* test for nspace resolution. */ - { PFX "<" EVAL_DEFAULT "/>", - "<{fish}hello xmlns='fish'>" EVAL_DEFAULT "=[fish]" "" }, - { PFX "<" EVAL_DEFAULT "/>", - "<{}hello>" EVAL_DEFAULT "=[]" }, - - { PFX "<" EVAL_SPECIFIC "foo/>", - "<{}hello xmlns:foo='bar'>" EVAL_SPECIFIC "foo=[bar]" }, - - /* tests for state handling */ - { PFX "", "" }, - { PFX "", "" }, - { PFX "blah", "" }, - - /* tests for abort handling */ - { PFX "", - "<{}hello><{}merry>ABORT", match_invalid }, - { PFX "fish", - "<{}hello><{}merry><{}abort-end>ABORT", match_invalid }, - { PFX "!ABORT!", "<{}hello>!ABORT!", match_invalid }, - { PFX "!ABORT!", "<{}hello>!ABORT!", match_invalid }, - { PFX "!ABORT!", "<{}hello>!ABORT!", match_invalid }, - - /* tests for encodings */ - { "", - "ISO-8859-1", match_encoding }, - - { "", - "UTF-8", match_encoding }, - - /* test that parse is valid even with no handlers registered. */ - { PFX "world", "", match_nohands }, - - /* regression test for prefix matching bug fixed in 0.18.0 */ -#define THENS "xmlns:d='foo' xmlns:dd='bar'" - { PFX "", - "<{foo}hello " THENS ">" }, - - /**** end of list ****/ { NULL, NULL } - }; - int n; - - for (n = 0; ms[n].in != NULL; n++) { - CALL(parse_match(ms[n].in, ms[n].out, ms[n].invalid)); - } - - return OK; -} - -static int mapping(void) -{ - static const struct ne_xml_idmap map[] = { - { "fee", "bar", 1 }, - { "foo", "bar", 2 }, - { "bar", "foo", 3 }, - { "", "bob", 4 }, - { "balloon", "buffoon", 5}, - { NULL, NULL, 0} - }; - int n; - - for (n = 0; map[n].id; n++) { - int id = ne_xml_mapid(map, NE_XML_MAPLEN(map) - 1, - map[n].nspace, map[n].name); - ONV(id != map[n].id, ("mapped to id %d not %d", id, map[n].id)); - } - - n = ne_xml_mapid(map, NE_XML_MAPLEN(map) - 1, "no-such", "element"); - ONV(n != 0, ("unknown element got id %d not zero", n)); - - return OK; -} - -/* Test for some parse failures */ -static int fail_parse(void) -{ - static const char *docs[] = { - "foo", - PFX "", - /* malformed namespace declarations */ - PFX "", - PFX "", - PFX "", - PFX "", - PFX "", - PFX "", - - /* element names which are not valid QNames. */ - PFX "", - PFX "<:fee/>", - PFX "<0fish/>", - PFX "", - PFX "", - PFX "", - PFX "", - -#if 0 /* currently disabled to allow SVN to work */ - PFX "", - PFX "", - PFX "", - PFX "", -#endif - - /* These are tests of XML parser itself really... */ - /* 2-byte encoding of '.': */ - PFX "" "\x2F\xC0\xAE\x2E\x2F" "", - /* 3-byte encoding of '.': */ - PFX "" "\x2F\xE0\x80\xAE\x2E\x2F" "", - /* 4-byte encoding of '.': */ - PFX "" "\x2F\xF0\x80\x80\xAE\x2E\x2F" "", - /* 5-byte encoding of '.': */ - PFX "" "\x2F\xF8\x80\x80\x80\xAE\x2E\x2F" "", - /* 6-byte encoding of '.': */ - PFX "" "\x2F\xFC\x80\x80\x80\x80\xAE\x2E\x2F" "", - /* two-byte encoding of '<' must not be parsed as a '<': */ - PFX "\xC0\xBC" "foo>", - - /* Invalid UTF-8 XML Byte Order Marks */ - "\xEF\xBB" PFX "", - "\xEF" PFX "", - - NULL - }; - int n; - - for (n = 0; docs[n]; n++) { - ne_xml_parser *p = ne_xml_create(); - const char *err; - - ne_xml_parse(p, docs[n], strlen(docs[n])); - ne_xml_parse(p, "", 0); - ONV(ne_xml_failed(p) <= 0, - ("`%s' did not get positive parse error", docs[n])); - - err = ne_xml_get_error(p); - NE_DEBUG(NE_DBG_HTTP, "Parse error for '%s': %s\n", docs[n], err); - ONV(strstr(err, "parse error") == NULL - && strstr(err, "Invalid Byte Order Mark") == NULL, - ("bad error %s", err)); - - ne_xml_destroy(p); - } - - return OK; -} - -static int check_attrib(ne_xml_parser *p, const char **atts, - const char *nspace, const char *name, - const char *value) -{ - const char *act = ne_xml_get_attr(p, atts, nspace, name); - char err[50]; - int ret = 0; - - if (value == NULL) { - if (act != NULL) { - sprintf(err, "attribute %s was set to %s", name, act); - ret = NE_XML_ABORT; - } - } else { - if (act == NULL) { - sprintf(err, "attribute %s not found", name); - ret = NE_XML_ABORT; - } else if (strcmp(act, value) != 0) { - sprintf(err, "attribute %s was %s not %s", name, act, value); - ret = NE_XML_ABORT; - } - } - if (ret == NE_XML_ABORT) ne_xml_set_error(p, err); - return ret; -} - -static int startelm_attrib(void *userdata, int state, - const char *nspace, const char *name, - const char **atts) -{ - ne_xml_parser *p = userdata; - - if (strcmp(name, "hello") == 0) { - CALL(check_attrib(p, atts, NULL, "first", "second")); - CALL(check_attrib(p, atts, NULL, "third", "")); - CALL(check_attrib(p, atts, "garth", "bar", "asda")); - CALL(check_attrib(p, atts, "giraffe", "bar", NULL)); - CALL(check_attrib(p, atts, "hot", "dog", NULL)); - CALL(check_attrib(p, atts, NULL, "nonesuch", NULL)); - } else if (strcmp(name, "goodbye") == 0) { - if (atts[0] != NULL) { - ne_xml_set_error(p, "non-empty attrib array"); - return 1; - } - } - - return 1; -} - -static int attributes(void) -{ - ne_xml_parser *p = ne_xml_create(); - static const char doc[] = PFX - ""; - - ne_xml_push_handler(p, startelm_attrib, NULL, NULL, p); - - ne_xml_parse_v(p, doc, strlen(doc)); - - ONV(ne_xml_failed(p), ("parse error: %s", ne_xml_get_error(p))); - - ne_xml_destroy(p); - return OK; -} - -/* Test for the get/set error interface */ -static int errors(void) -{ - ne_xml_parser *p = ne_xml_create(); - const char *err; - - ONV(strcmp(ne_xml_get_error(p), "Unknown error") != 0, - ("initial error string unspecified")); - - ne_xml_set_error(p, "Fish food"); - err = ne_xml_get_error(p); - - ONV(strcmp(err, "Fish food"), ("wrong error %s!", err)); - - ne_xml_destroy(p); - return 0; -} - -ne_test tests[] = { - T(matches), - T(mapping), - T(fail_parse), - T(attributes), - T(errors), - T(NULL) -}; - diff --git a/client/neon-0.27.2/test/xmlreq.c b/client/neon-0.27.2/test/xmlreq.c deleted file mode 100644 index 1c3344dce..000000000 --- a/client/neon-0.27.2/test/xmlreq.c +++ /dev/null @@ -1,176 +0,0 @@ -/* - Test cases for the ne_xmlreq.h interface. - Copyright (C) 2005-2006, Joe Orton - - 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., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -#include "config.h" - -#include - -#ifdef HAVE_STDLIB_H -#include -#endif -#ifdef HAVE_UNISTD_H -#include -#endif - -#include "ne_xmlreq.h" - -#include "tests.h" -#include "utils.h" - -/* Dummy start_element callback; takes int * userdata and toggles the - * pointed-to int iff the root element has name "hello". Accepts all - * elements. */ -static int startelm(void *userdata, int state, - const char *nspace, const char *name, - const char **atts) -{ - int *flag = userdata; - - if (state == NE_XML_STATEROOT && strcmp(name, "hello") == 0) { - *flag = !*flag; - } - - return ++state; -} - -static int success(void) -{ - ne_session *sess; - ne_request *req; - ne_xml_parser *parser; - int flag = 0; - - CALL(make_session(&sess, single_serve_string, - "HTTP/1.1 200 OK\r\n" - "Content-Type: text/xml\r\n" - "Connection: close\r\n" "\r\n" - "\n" - "")); - - req = ne_request_create(sess, "PARSE", "/"); - parser = ne_xml_create(); - - ne_xml_push_handler(parser, startelm, NULL, NULL, &flag); - - ONREQ(ne_xml_dispatch_request(req, parser)); - - ONN("XML parser not invoked", !flag); - - ne_xml_destroy(parser); - ne_request_destroy(req); - ne_session_destroy(sess); - return await_server(); -} - -static int failure(void) -{ - ne_session *sess; - ne_request *req; - ne_xml_parser *parser; - - CALL(make_session(&sess, single_serve_string, - "HTTP/1.1 200 OK\r\n" - "Content-Type: text/xml\r\n" - "Connection: close\r\n" "\r\n" - "\n" - "")); - - req = ne_request_create(sess, "PARSE", "/"); - parser = ne_xml_create(); - - ONN("XML parse did not fail", - ne_xml_dispatch_request(req, parser) == NE_OK); - - NE_DEBUG(NE_DBG_HTTP, "error string: %s\n", ne_get_error(sess)); - - ONV(strstr(ne_get_error(sess), "200 OK") != NULL, - ("no error string set on parse error: '%s'", ne_get_error(sess))); - - ne_xml_destroy(parser); - ne_request_destroy(req); - ne_session_destroy(sess); - return await_server(); -} - -static int types(void) -{ - static const struct { - const char *type; - int is_xml; - } ts[] = { - { "text/xml", 1 }, - { "tExT/XmL", 1 }, - { "text/html", 0 }, - { "application/foo+xml", 1 }, - { "aPpLiCaTION/FoOOO+xMl", 1 }, - { "application/xml", 1 }, - { "application/+xml", 0 }, - { "application/fish+xml2", 0 }, - { "foo/bar+xml", 1 }, - { "f/b", 0 }, - { "garble garble wotsit", 0 } - }; - unsigned n; - - for (n = 0; n < sizeof(ts)/sizeof(ts[0]); n++) { - char resp[128]; - ne_session *sess; - ne_request *req; - ne_xml_parser *parser; - int flag = 0; - - ne_snprintf(resp, sizeof resp, - "HTTP/1.1 200 OK\r\n" - "Content-Type: %s\r\n" - "Connection: close\r\n" "\r\n" - "\n" - "", - ts[n].type); - - CALL(make_session(&sess, single_serve_string, resp)); - - req = ne_request_create(sess, "PARSE", "/"); - parser = ne_xml_create(); - - ne_xml_push_handler(parser, startelm, NULL, NULL, &flag); - - ONREQ(ne_xml_dispatch_request(req, parser)); - - ONV(flag && !ts[n].is_xml, - ("XML parser invoked for non-XML type: %s", ts[n].type)); - ONV(!flag && ts[n].is_xml, - ("XML parser not invoked for XML type: %s", ts[n].type)); - - ne_xml_destroy(parser); - ne_request_destroy(req); - ne_session_destroy(sess); - CALL(await_server()); - } - - return OK; -} - -ne_test tests[] = { - T(success), - T(failure), - T(types), - T(NULL) -}; - diff --git a/client/src/Makefile b/client/src/Makefile deleted file mode 100644 index 92aa9395e..000000000 --- a/client/src/Makefile +++ /dev/null @@ -1,124 +0,0 @@ -# Copyright (c) 2007, 2008 Matthias Hess, Erich Focht -# This file is part of XtreemFS. -# -# XtreemFS is part of XtreemOS, a Linux-based Grid Operating -# System, see for more details. The -# XtreemOS project has been developed with the financial support -# of the European Commission's IST program under contract -# #FP6-033576. -# -# XtreemFS 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. -# -# XtreemFS 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 XtreemFS. If not, see . - -TOPDIR ?= .. --include $(TOPDIR)/make.config - -TGT = xtfs_mount -ifdef XTFS_BINDIR -REAL_TARGET = $(patsubst %,$(XTFS_BINDIR)/%,$(TGT)) -else -REAL_TARGET = $(TGT) -endif - -LIB = libxtreemfs.a - -CURRENT_CC_INCS = -I$(TOPDIR)/src - -CC_FLAGS += $(FUSE_CC_FLAGS) -CC_INCS += $(NEON_CC_INCS) $(JSON_CC_INCS) $(CURRENT_CC_INCS) -XTREEMFS_LIB_OBJS = xtreemfs.o \ - mrc_channel.o mrc_request.o \ - osd_manager.o osd_proxy.o osd_channel.o osd_request.o \ - dirservice.o \ - workqueue.o signals.o \ - file_inv.o filerw.o fileobj.o file.o fobj_cache.o \ - statinfo.o \ - stripingpolicy.o stripe.o sobj_cache.o \ - transl_engine.o transl_mod.o \ - lease.o obj_set.o \ - xcap.o xcap_inv.o xloc.o xattr.o \ - acl.o \ - xtreemfs_fuse.o xtreemfs_utils.o xtreemfs_security.o xtreemfs_conf.o xtreemfs_prot.o \ - request.o mrc_comm.o \ - creds.o \ - hashtable.o \ - radix-tree.o \ - logger.o bench_timer.o \ - lock_utils.o platforms.o metadata_cache.o - -ifdef ITAC -XTREEMFS_LIB_OBJS += xtreemfs_itac.o -endif - -CC_OBJS = main.o $(XTREEMFS_LIB_OBJS) -# monitor.o xtreemfs_net_utils.o net_utils.o -CC_LIBS += $(FUSE_CC_LIBS) $(NEON_CC_PARTSH_LIBS) -#CC_LIBS += $(FUSE_CC_LIBS) $(NEON_CC_PARTSH_LIBS) -lefence -CC_STATIC_LIBS = $(NEON_CC_STATIC_LIBS) $(JSON_CC_STATIC_LIBS) - -ifdef ITAC -CC_FLAGS += $(ITAC_CC_FLAGS) -DITAC -CC_INCS += $(ITAC_CC_INCS) -CC_LIBS += $(ITAC_CC_LIBS) -endif - -ifeq ($(MSYSTEM), MINGW32) -CC_INCS += -I../win32/fuse4win/include -I../win32/pthreads/include -CC_LIBS = -L../win32/fuse4win -lfuse_static -L../win32/pthreads/lib -lpthreadGCE2 -L../win32/openssl-0.9.8i/ -lssl -lcrypto -L/c/Programme/MinGW/lib/ -lstdc++ -lwsock32 -ladvapi32 -lgdi32 -endif - -CC_FLAGS += -DCONFIG_SMP -fPIC -CC_LDFLAGS += -rdynamic - -all: $(REAL_TARGET) $(LIB) mods - -tools: mkvol lsvol rmvol - - -ifeq ($(MSYSTEM), MINGW32) -$(REAL_TARGET): $(CC_OBJS) - $(CC) $(CC_OBJS) $(CC_STATIC_LIBS) $(CC_LIBS) -o $(REAL_TARGET) -else -$(REAL_TARGET): $(CC_OBJS) - $(call PARTST_LD,$@,$^,$(CC_STATIC_LIBS),$(CC_LIBS)) -endif - - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c $< - -clean: - $(RM) $(CC_OBJS) $(LIB) - $(MAKE) -C mods clean - -distclean: clean - $(RM) $(REAL_TARGET) $(LIB) - $(RM) *~ - $(MAKE) -C mods distclean - -.PHONY: mods -mods: - $(MAKE) -C mods all - -.PHONY: docs -docs: - doxygen - -#### Rules for building a xtreemfs library #### -.PHONY: lib -lib: $(LIB) - -$(LIB): $(XTREEMFS_LIB_OBJS) - $(AR) rv $@ $^ - - diff --git a/client/src/Makefile.am b/client/src/Makefile.am deleted file mode 100644 index bdfe3e83c..000000000 --- a/client/src/Makefile.am +++ /dev/null @@ -1,28 +0,0 @@ -bin_PROGRAMS = xtfs_mount - -xtfs_mount_SOURCES = main.c -xtfs_mount_LDADD = libxtreemfs.a ../json-c-0.7/libjson.la ../neon-0.26.3/src/libneon.la -lfuse -xtfs_mount_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -I../json-c-0.7 -I../neon-0.26.3/src - -noinst_LIBRARIES = libxtreemfs.a -libxtreemfs_a_SOURCES = xtreemfs.c \ - mrc_channel.c mrc_request.c \ - osd_manager.c osd_proxy.c osd_channel.c osd_request.c \ - workqueue.c signals.c \ - file_inv.c filerw.c fileobj.c file.c fobj_cache.c \ - raid_engine.c \ - statinfo.c \ - stripingpolicy.c stripe.c sobj_cache.c \ - xcap.c xcap_inv.c xloc.c xattr.c \ - acl.c \ - xtreemfs_fuse.c xtreemfs_utils.c xtreemfs_security.c \ - request.c mrc_comm.c \ - creds.c \ - hashtable.c \ - radix-tree.c \ - logger.c bench_timer.c \ - lock_utils.c -libxtreemfs_a_CPPFLAGS = -D_FILE_OFFSET_BITS=64 -DFUSE_USE_VERSION=26 -I../json-c-0.7 -I../neon-0.26.3/src -libxtreemfs_a_LIBADD = ../json-c-0.7/libjson.la ../neon-0.26.3/src/libneon.la - -noinst_HEADERS = fileops.h diff --git a/client/src/acl.c b/client/src/acl.c deleted file mode 100644 index 55f2b679f..000000000 --- a/client/src/acl.c +++ /dev/null @@ -1,440 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - * C Implementation: acl - * - * Description: - * - * - * Author: Matthias Hess mhess at hpce dot nec dot com - * - * Copyright: Matthias Hess, 2007, 2008 - * - */ - -#include -#include -#include - -#include -#include -#include -#include - -#include - -#include "acl.h" - -#include "lock_utils.h" -#include "logger.h" - -/* Definition taken from MRC code. */ -#define ACL_MODE_READ 0x0001 -#define ACL_MODE_WRITE 0x0002 -#define ACL_MODE_EXEC 0x0004 -#define ACL_MODE_APPEND 0x0008 -#define ACL_MODE_GAPP 0x0010 -#define ACL_MODE_CREAT 0x0020 -#define ACL_MODE_TRUNC 0x0040 -#define ACL_MODE_SREAD 0x0080 -#define ACL_MODE_DEL 0x0100 - - -/** - * Convert mode_str to ACL mode (see above). - * The string must contain characters 'r', 'w', 'x' and '-' only. - */ -int mode_str_to_mode(char *mode_str) -{ - int rv = 0; - - /*! \todo: For full compliance with withdrawn POSIX ACL standard, some more - checks have to be done (like checking length). - */ - while(*mode_str != '\0' && rv >= 0) { - switch(*mode_str) { - case 'r': rv |= ACL_MODE_READ; break; - case 'w': rv |= ACL_MODE_WRITE; break; - case 'x': rv |= ACL_MODE_EXEC; break; - case '-': /* ignore */ break; - default: - dbg_msg("Ill defined permission string.\n"); - rv = -1; - break; - } - mode_str++; - } - - return rv; -} - -/** - * Create a new ACL entry and initialize it. - */ -struct acl_entry *acl_entry_new() -{ - struct acl_entry *rv = NULL; - - rv = (struct acl_entry *)malloc(sizeof(*rv)); - if (!rv) - goto finish; - - rv->tag = NULL; - rv->qualifier = NULL; - rv->perms = NULL; - - INIT_LIST_HEAD(&rv->head); - -finish: - return rv; -} - -/** - * Destroy an ACL entry (and free all memory). - */ -void acl_entry_destroy(struct acl_entry *ae) -{ - free(ae->tag); - free(ae->qualifier); - free(ae->perms); - free(ae); -} - -/** - * Convert an ACL entry to JSON representation. - */ -struct json_object *acl_entry_to_json(struct acl_entry *ae) -{ - struct json_object *rv = NULL; - char entity_str[1024]; - long pmode; - - rv = json_object_new_object(); - if (!rv) - goto finish; - - pmode = mode_str_to_mode(ae->perms); - snprintf(entity_str, 1024, "%s:%s:", ae->tag, ae->qualifier); - - json_object_object_add(rv, entity_str, json_object_new_int(pmode)); - -finish: - return rv; -} - -/** - * Convert a JSON object representing an ACL entry to the ACL entry struct. - */ -struct acl_entry *json_to_acl_entry(struct json_object *jo) -{ - struct acl_entry *rv = NULL; - - return rv; -} - -/** - * Create a string from tag and qualifier field of an ACL entry. - */ -char *acl_entry_tq_to_str(struct acl_entry *ae) -{ - char *rv = NULL; - size_t len = 0, tlen = 0, qlen = 0, consistency; - - if (ae->tag) { - tlen = strlen(ae->tag); - len += tlen; - } - if (ae->qualifier) { - qlen = strlen(ae->qualifier); - len += qlen; - } - len += 2 + 1; /* Add two ':' characters and a '\0' */ - consistency = len; - - rv = (char *)malloc(sizeof(char) * len); - if (!rv) - goto finish; - - len = 0; - if (ae->tag) { - strcpy(rv, ae->tag); - len += tlen; - } - strcpy(&rv[len], ":"); - len++; - if (ae->qualifier) { - strcpy(&rv[len], ae->qualifier); - len += qlen; - } - strcpy(&rv[len], ":"); - len++; - rv[len] = '\0'; - - if (consistency != len+1) { - dbg_msg("Error! %d should be %d\n", consistency, len+1); - } - -finish: - return rv; -} - - -/** - * Print an ACL entry in info mode. - */ -void acl_entry_print(struct acl_entry *ae) -{ - char out_str[256]; - int len = 0; - size_t slen; - - out_str[0] = '\0'; - if (ae->tag) { - slen = strlen(ae->tag); - if (slen < 256) { - strcpy(out_str, ae->tag); - len += slen; - } - } - if (len + 1 < 256) { - strcpy(&out_str[len], ":"); - len++; - } - if (ae->qualifier) { - slen = strlen(ae->qualifier); - if (len + slen < 256) { - strcpy(&out_str[len], ae->qualifier); - len += slen; - } - } - if (len + 1 < 256) { - strcpy(&out_str[len], ":"); - len++; - } - if (ae->perms) { - slen = strlen(ae->perms); - if (len + slen < 256) - strcpy(&out_str[len], ae->perms); - } - info_msg("%s\n", out_str); -} - -/** - * Initialize an ACL list. - */ -int acl_list_init(struct acl_list *al) -{ - int err = 0; - - INIT_LIST_HEAD(&al->acls); - spin_init(&al->lock, PTHREAD_PROCESS_PRIVATE); - - return err; -} - -/** - * Destroy all entries in an ACL list and free their memory. - */ -void acl_list_clean(struct acl_list *al) -{ - struct list_head *iter; - struct acl_entry *ae; - - spin_lock(&al->lock); - iter = &al->acls; - while (!list_empty(&al->acls)) { - iter = al->acls.next; - list_del(iter); - ae = container_of(iter, struct acl_entry, head); - acl_entry_destroy(ae); - } - spin_unlock(&al->lock); - spin_destroy(&al->lock); -} - -/** - * Create an acl entry from given parameters and add it to the list. - */ -int acl_list_add(struct acl_list *al, char *tag, char *qualifier, char *perms) -{ - int err = 0; - struct acl_entry *ne = NULL; - - if (!tag) { - dbg_msg("No tag specified.\n"); - err = 1; - goto finish; - } - - if (!perms) { - dbg_msg("No permission specified.\n"); - err = 2; - goto finish; - } - - ne = acl_entry_new(); - if (!ne) { - dbg_msg("Cannot allocate memory for new entry.\n"); - err = 3; - goto finish; - } - - ne->tag = strdup(tag); - if (qualifier) - ne->qualifier = strdup(qualifier); - ne->perms = strdup(perms); - - list_add(&ne->head, &al->acls); - -finish: - if (err && ne) { - acl_entry_destroy(ne); - free(ne); - } - - return err; -} - -/** - * Print an ACL list in info mode. - */ -void acl_list_print(struct acl_list *al) -{ - struct list_head *iter; - struct acl_entry *ae; - - spin_lock(&al->lock); - list_for_each(iter, &al->acls) { - ae = container_of(iter, struct acl_entry, head); - acl_entry_print(ae); - } - spin_unlock(&al->lock); -} - - -/** - * Turn an ACL list into the corresponding POSIX mode. - * This might lead to loss of information because POSIX mode does - * not necessarily cover all possible ACL entries. (Entries for - * specific users might be lost, for instance). - */ -mode_t acl_list_to_mode(struct acl_list *al) -{ - mode_t rv = 0; - /* struct acl_entry *ae; */ - - return rv; -} - -/** - * Fill in an ACL list with entries corr. to POSIX mode. - */ -int mode_to_acl_list(mode_t mode, struct acl_list *al) -{ -#ifndef _WIN32 - int err = 0; - char *tags[] = { "user", "group", "other", NULL }; - int flags[] = { S_IRUSR, S_IWUSR, S_IXUSR, - S_IRGRP, S_IWGRP, S_IXGRP, - S_IROTH, S_IWOTH, S_IXOTH }; - char flags_str[] = { 'r', 'w', 'x' }; - char mode_str[4]; - int i, j; - struct acl_entry *ae; - - mode_str[3] = '\0'; - for (i=0; tags[i] != NULL; i++) { - ae = acl_entry_new(); - if (!ae) { - err = -ENOMEM; - break; - } - for (j=0; j<3; j++) { - if (mode & flags[i*3+j]) - mode_str[j] = flags_str[j]; - else - mode_str[j] = '-'; - } - ae->tag = strdup(tags[i]); - ae->perms = strdup(mode_str); - /* Qualifier not set because POSIX mode does not contain info - on this entry. */ - list_add_tail(&ae->head, &al->acls); - } - - if (err) - acl_list_clean(al); - - return err; -#endif -} - -/** - * Create a JSON object representing the ACL list. - */ -struct json_object *acl_list_to_json(struct acl_list *al) -{ - struct json_object *rv = NULL; - struct list_head *iter; - struct acl_entry *ae; - int mode; - char *tq_str; - - rv = json_object_new_object(); - if (!rv) - goto finish; - - spin_lock(&al->lock); - list_for_each(iter, &al->acls) { - ae = container_of(iter, struct acl_entry, head); - mode = mode_str_to_mode(ae->perms); - tq_str = acl_entry_tq_to_str(ae); - if (!tq_str) { - dbg_msg("No memory for ACL entry string!\n"); - json_object_put(rv); - rv = NULL; - goto finish; - } - dbg_msg("tq string: %s\n", tq_str); - json_object_object_add(rv, tq_str, json_object_new_int(mode)); - free(tq_str); - } - spin_unlock(&al->lock); - -finish: - return rv; -} - -/** - * Fill in the ACL list with entries corr. to the JSON object. - */ -int json_to_acl_list(struct json_object *jo, struct acl_list *al) -{ - int err = 0; - - acl_list_init(al); - - return err; -} diff --git a/client/src/acl.h b/client/src/acl.h deleted file mode 100644 index f77d7e28c..000000000 --- a/client/src/acl.h +++ /dev/null @@ -1,74 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - C Interface: acl - - Description: - - - Author: Matthias Hess , (C) 2007 - - Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_ACL_H__ -#define __XTRFS_ACL_H__ - -#include - -#include - -#include "list.h" -#include "lock_utils.h" - -struct acl_entry { - char *tag; - char *qualifier; - char *perms; - struct list_head head; -}; - -extern struct acl_entry *acl_entry_new(); -extern void acl_entry_destroy(struct acl_entry *ae); -extern struct json_object *acl_entry_to_json(struct acl_entry *ae); -extern struct acl_entry *json_to_acl_entry(struct json_object *jo); - -struct acl_list { - struct list_head acls; - spinlock_t lock; -}; - -extern int acl_list_init(struct acl_list *al); -extern void acl_list_clean(struct acl_list *al); -extern void acl_list_print(struct acl_list *al); - -extern mode_t acl_list_to_mode(struct acl_list *al); -extern int mode_to_acl_list(mode_t mode, struct acl_list *al); - -extern struct json_object *acl_list_to_json(struct acl_list *al); -extern int json_to_acl_list(struct json_object *jo, struct acl_list *al); - -#endif diff --git a/client/src/bench_timer.c b/client/src/bench_timer.c deleted file mode 100644 index 0ef4d84db..000000000 --- a/client/src/bench_timer.c +++ /dev/null @@ -1,261 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: bench_timer -* -* Description: -* -* -* Author: Matthias Hess , Copyright 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include - -#include - -#include "bench_timer.h" - - -#ifdef TIMINGS - -struct bench_timer * -bench_timer_new() -{ - struct bench_timer *rv = NULL; - - rv = (struct bench_timer *)malloc(sizeof(struct bench_timer)); - if (rv && bench_timer_init(rv)) { - free(rv); - rv = NULL; - } - - return rv; -} - -int -bench_timer_init(struct bench_timer *bt) -{ - int rv = 0; - double prec = 0.0; - - bench_timer_start(bt); - do { - bench_timer_stop(bt); - prec = bench_timer_ms(bt); - } while(prec == 0.0); - - bt->precision = prec; - - return rv; -} - -void -bench_timer_start(struct bench_timer *bt) -{ - gettimeofday(&bt->start_time, NULL); -} - -void -bench_timer_stop(struct bench_timer *bt) -{ - gettimeofday(&bt->stop_time, NULL); -} - -double -bench_timer_s(struct bench_timer *bt) -{ - double rv = 0.0; - - rv = (double)bt->stop_time.tv_sec + (double)bt->stop_time.tv_usec / 1000000.0; - rv -= ((double)bt->start_time.tv_sec + (double)bt->start_time.tv_usec / 1000000.0); - - return rv; -} - -double -bench_timer_ms(struct bench_timer *bt) -{ - return bench_timer_s(bt) * 1000.0; -} - - -struct bench_data_collection * -bench_data_collection_new() -{ - struct bench_data_collection *rv = NULL; - - rv = (struct bench_data_collection *)malloc(sizeof(struct bench_data_collection)); - if(rv && bench_data_collection_init(rv)) { - bench_data_collection_delete(rv); - rv = NULL; - } - - return rv; -} - -int -bench_data_collection_init(struct bench_data_collection *bdc) -{ - bdc->max_num_data = 0; - bdc->num_data = 0; - bdc->data = NULL; - spin_init(&bdc->lock, PTHREAD_PROCESS_SHARED); - return 0; -} - -void -bench_data_collection_clear(struct bench_data_collection *bdc) -{ - free(bdc->data); - bdc->num_data = 0; - bdc->max_num_data = 0; -} - -void -bench_data_collection_delete(struct bench_data_collection *bdc) -{ - if(bdc) { - bench_data_collection_clear(bdc); - spin_destroy(&bdc->lock); - free(bdc); - } -} - -void -bench_data_collection_add(struct bench_data_collection *bdc, double value) -{ - pthread_spin_lock(&bdc->lock); - if(bdc->num_data >= bdc->max_num_data) { - bdc->max_num_data += 100; - bdc->data = (double *)realloc((void *)bdc->data, - sizeof(double) * bdc->max_num_data); - } - bdc->data[bdc->num_data++] = value; - spin_unlock(&bdc->lock); -} - -double -bench_data_collection_avg(struct bench_data_collection *bdc) -{ - double rv = 0.0; - int i; - - for(i=0; inum_data; i++) rv += bdc->data[i]; - if(i > 0) rv /= (double)i; - - return rv; -} - -double -bench_data_collection_sum(struct bench_data_collection *bdc) -{ - double rv = 0.0; - int i; - - for(i=0; inum_data; i++) rv += bdc->data[i]; - - return rv; -} - - -struct bench_timings * -bench_timings_new() -{ - struct bench_timings *rv = NULL; - - rv = (struct bench_timings *)malloc(sizeof(struct bench_timings)); - if (rv && bench_timings_init(rv)) { - bench_timings_delete(rv); - rv = NULL; - } - - return rv; -} - -int -bench_timings_init(struct bench_timings *bt) -{ - int rv = 0; - rv = bench_data_collection_init(&bt->times_ms); - return rv; -} - -void -bench_timings_clear(struct bench_timings *bt) -{ - bench_data_collection_clear(&bt->times_ms); -} - -void -bench_timings_delete(struct bench_timings *bt) -{ - bench_timings_clear(bt); - free(bt); -} - - -void -bench_timings_add_s(struct bench_timings *bt, double time_s) -{ - bench_data_collection_add(&bt->times_ms, time_s * 1000.0); -} - -void -bench_timings_add_ms(struct bench_timings *bt, double time_ms) -{ - bench_data_collection_add(&bt->times_ms, time_ms); -} - - -double -bench_timings_avg_s(struct bench_timings *bt) -{ - return bench_timings_avg_ms(bt) / 1000.0; -} - -double -bench_timings_avg_ms(struct bench_timings *bt) -{ - return bench_data_collection_avg(&bt->times_ms); -} - -double -bench_timings_sum_s(struct bench_timings *bt) -{ - return bench_timings_sum_ms(bt) / 1000.0; -} - -double -bench_timings_sum_ms(struct bench_timings *bt) -{ - return bench_data_collection_sum(&bt->times_ms); -} - -#endif diff --git a/client/src/bench_timer.h b/client/src/bench_timer.h deleted file mode 100644 index 36981604a..000000000 --- a/client/src/bench_timer.h +++ /dev/null @@ -1,129 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -C Interface: bench_timer - -Description: - - -Author: Matthias Hess , (C) 2007 - -Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_BENCH_TIMER_H__ -#define __XTRFS_BENCH_TIMER_H__ - -#include - -#include - -#include "lock_utils.h" - -struct bench_timer { - struct timeval start_time; - struct timeval stop_time; - double precision; - double overhead; -}; - -#ifdef TIMINGS -extern struct bench_timer *bench_timer_new(); -extern int bench_timer_init(struct bench_timer *bt); - -extern void bench_timer_start(struct bench_timer *bt); -extern void bench_timer_stop(struct bench_timer *bt); -extern double bench_timer_s(struct bench_timer *bt); -extern double bench_timer_ms(struct bench_timer *bt); -#else -#define bench_timer_new() NULL -#define bench_timer_init(x) do { } while(0) -#define bench_timer_start(x) -#define bench_timer_stop(x) -#define bench_timer_s(x) 0.0 -#define bench_timer_ms(x) 0.0 -#endif - - -struct bench_data_collection { - int max_num_data; - int num_data; - double *data; - spinlock_t lock; -}; - -#ifdef TIMINGS -extern struct bench_data_collection *bench_data_collection_new(); -extern int bench_data_collection_init(struct bench_data_collection *bdc); -extern void bench_data_collection_clear(struct bench_data_collection *bdc); -extern void bench_data_collection_delete(struct bench_data_collection *bdc); - -extern void bench_data_collection_add(struct bench_data_collection *bdc, double value); -extern double bench_data_collection_avg(struct bench_data_collection *bdc); -extern double bench_data_collection_sum(struct bench_data_collection *bdc); -#else -#define bench_data_collection_new() NULL -#define bench_data_collection_init(x) do { } while(0) -#define bench_data_collection_clear(x) -#define bench_data_collection_delete(x) -#define bench_data_collection_add(x,y) -#define bench_data_collection_avg(x) 0.0 -#define bench_data_collection_sum(x) 0.0 -#endif - - -struct bench_timings { - struct bench_data_collection times_ms; -}; - -#ifdef TIMINGS -extern struct bench_timings *bench_timings_new(); -extern int bench_timings_init(struct bench_timings *bt); -extern void bench_timings_clear(struct bench_timings *bt); -extern void bench_timings_delete(struct bench_timings *bt); - -extern void bench_timings_add_s(struct bench_timings *bt, double time_s); -extern void bench_timings_add_ms(struct bench_timings *bt, double time_ms); - -extern double bench_timings_avg_s(struct bench_timings *bt); -extern double bench_timings_avg_ms(struct bench_timings *bt); - -extern double bench_timings_sum_s(struct bench_timings *bt); -extern double bench_timings_sum_ms(struct bench_timings *bt); -#else -#define bench_timings_new() NULL -#define bench_timings_init(x) do { } while(0) -#define bench_timings_clear(x) do { } while(0) -#define bench_timings_delete(x) do { } while(0) -#define bench_timings_add_s(x,y) do { } while(0) -#define bench_timings_add_ms(x,y) do { } while(0) -#define bench_timings_avg_s(x) 0.0 -#define bench_timings_avg_ms(x) 0.0 -#define bench_timings_sum_s(x) 0.0 -#define bench_timings_sum_ms(x) 0.0 -#endif - -#endif diff --git a/client/src/creds.c b/client/src/creds.c deleted file mode 100644 index d86b23987..000000000 --- a/client/src/creds.c +++ /dev/null @@ -1,234 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: creds -* -* Description: -* -* -* Author: Matthias Hess , (C) 2008 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include - -#include -#include -#ifndef _WIN32 -#include -#include -#else -#include -#define boolean json_boolean -#endif - -#include - -#include "logger.h" - -#include "creds.h" - -int creds_init(struct creds *c) -{ - c->uid = -1; - c->gid = -1; - c->pid = -1; - - c->guid = NULL; - c->ggid = NULL; - c->subgrp = NULL; - - return 0; -} - -void creds_delete_content(struct creds *c) -{ - if (c) { - free(c->guid); - free(c->ggid); - free(c->subgrp); - } -} - -/** - * Convert JSON object to credentials. - * - * TODO: Implementation! - */ -int json_to_creds(struct creds *c, struct json_object *jo) -{ - int err = 0; - - return err; -} - -int json_to_creds_ip(struct json_object *jo, struct creds *c) -{ - int err = 0; - return err; -} - -struct json_object *creds_to_json(struct creds *c) -{ - int err = 0; - - struct json_object *rv = NULL; - struct json_object *grp = NULL; - -#ifndef _WIN32 - struct passwd passwd; - struct passwd *pwd_res; - struct group group; - char pwd_str[1024]; - struct group *grp_res; - char group_str[1024]; -#endif /* _WIN32 */ - - rv = json_object_new_object(); - if (!rv) - goto out; - - /* So far, only 'nullauth' is supported */ - json_object_object_add(rv, "mechanism", json_object_new_string("nullauth")); - grp = json_object_new_array(); - if (!grp || is_error(grp)) { - err = 1; - goto out; - } - - if (c->guid && c->ggid) { - json_object_object_add(rv, "guid", json_object_new_string(c->guid)); - - json_object_array_add(grp, json_object_new_string(c->ggid)); - } else { - -#ifndef _WIN32 - getpwuid_r(c->uid, &passwd, pwd_str, 1024, &pwd_res); - dbg_msg("Errno after getpwuid: %d\n", errno); - errno = 0; - getgrgid_r(c->gid, &group, group_str, 1024, &grp_res); - dbg_msg("Errno after getgrgid: %d\n", errno); - - if (!pwd_res || !grp_res) { - dbg_msg("Cannot determine user name or group name\n"); - err = 3; - goto out; - } - json_object_object_add(rv, "guid", json_object_new_string(pwd_res->pw_name)); - json_object_array_add(grp, json_object_new_string(grp_res->gr_name)); -#else - char buffer[100]; - DWORD len = 100; - GetUserName(buffer, &len); - json_object_object_add(rv, "guid", json_object_new_string(buffer)); - json_object_array_add(grp, json_object_new_string("")); - -#endif /* _WIN32 */ - } - json_object_object_add(rv, "ggids", grp); - -out: - if (err) { - if (rv) { - json_object_put(rv); - rv = NULL; - } - } - - return rv; -} - -char *creds_to_str(struct creds *c) -{ - char *rv = NULL; - struct json_object *jo; - - jo = creds_to_json(c); - if (jo) { - rv = strdup(json_object_to_json_string(jo)); - json_object_put(jo); - } else { - err_msg("Cannot create JSON from creds.\n"); - } - - return rv; -} - -int creds_to_str_ip(struct creds *c, char *str, int n) -{ - int err = 0; - char *dummy = creds_to_str(c); - - if (dummy) { - strncpy(str, dummy, n); - free(dummy); - } else - err = 1; - - return err; -} - -int creds_copy(struct creds *dest, struct creds *src) -{ - int err = 0; - - dest->uid = src->uid; - dest->gid = src->gid; - dest->pid = src->pid; - - if (dest->guid) free(dest->guid); - if (dest->ggid) free(dest->ggid); - if (dest->subgrp) free(dest->subgrp); - - if (src->guid) { - dbg_msg("guid: %s\n", src->guid); - dest->guid = strdup(src->guid); - } else - dest->guid = NULL; - if (src->ggid) { - dbg_msg("ggid: %s\n", src->ggid); - dest->ggid = strdup(src->ggid); - } else - dest->ggid = NULL; - if (src->subgrp) { - dbg_msg("subgrp: %s\n", src->subgrp); - dest->subgrp = strdup(src->subgrp); - } else - dest->subgrp = NULL; - - return err; -} - -int creds_dbg(struct creds *c) -{ - dbg_msg("uid: %d\n", c->uid); - dbg_msg("gid: %d\n", c->gid); - dbg_msg("guid: %p\n", c->guid); - dbg_msg("ggid: %p\n", c->ggid); - return 0; -} diff --git a/client/src/creds.h b/client/src/creds.h deleted file mode 100644 index 881810517..000000000 --- a/client/src/creds.h +++ /dev/null @@ -1,79 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - C Interface: creds - - Description: - - - Author: Matthias Hess , (C) 2007 - - Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_CREDS_H__ -#define __XTRFS_CREDS_H__ - -#include -#include - -#include - -#if defined(_WIN32) && !defined(_FUSE_WIN_H_) -#define UID_GID_DEF -typedef unsigned int gid_t; -typedef unsigned int uid_t; -#endif - -/** - * Credentials used in MRC communication. - * Passed in to requests, come either from the fuse context or the local - * process. - */ -struct creds { - uid_t uid; /** User ID of the calling process */ - gid_t gid; /** Group ID of the calling process */ - pid_t pid; /** Thread ID of the calling process */ - - /** grid identification certificate stuff should be added below */ - char *guid; /** Global user id */ - char *ggid; /** Global group id */ - char *subgrp; -}; - -extern int creds_init(struct creds *c); -extern void creds_delete_content(struct creds *c); - -extern int json_to_creds(struct creds *c, struct json_object *jo); -extern struct json_object *creds_to_json(struct creds *c); -extern char *creds_to_str(struct creds *c); -extern int creds_to_str_ip(struct creds *c, char *str, int n); - -extern int creds_copy(struct creds *dest, struct creds *src); - -extern int creds_dbg(struct creds *c); - -#endif diff --git a/client/src/dirservice.c b/client/src/dirservice.c deleted file mode 100644 index 029663d14..000000000 --- a/client/src/dirservice.c +++ /dev/null @@ -1,1611 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess - - Author: Matthias Hess - - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - -/* - C Implementation: dirservice - - Description: - */ - -#include -#include -#include - -#ifdef _WIN32 -#include -#define boolean json_boolean -#else -#include -#endif - -#include -#include - -#ifndef __STRICT_ANSI__ -#define __STRICT_ANSI__ -#include -#include -#undef __STRICT_ANSI__ -#else -#include -#include -#endif - -#include "creds.h" - -#include "xtreemfs_utils.h" -#include "xtreemfs_security.h" -#include "dirservice.h" -#include "logger.h" - -struct ds_entry *ds_entry_new(char *uuid, char *version, char *owner, - time_t lastUpdated) -{ - struct ds_entry *rv = NULL; - - rv = (struct ds_entry *)malloc(sizeof(struct ds_entry)); - if (rv && ds_entry_init(rv, uuid, version, owner, lastUpdated)) { - ds_entry_destroy(rv); - rv = NULL; - } - return rv; -} - -int ds_entry_init(struct ds_entry *de, char *uuid, char *version, char *owner, - time_t lastUpdated) -{ - int err = 0; - - if (uuid) - de->uuid = strdup(uuid); - else - de->uuid = NULL; - - if (version) - de->version = strdup(version); - else - de->version = NULL; - - if (owner) - de->owner = strdup(owner); - else - de->owner = NULL; - - de->lastUpdated = lastUpdated; - - de->max_num_attrs = 2; - de->num_attrs = 0; - de->keys = (char **)malloc(sizeof(char *) * de->max_num_attrs); - de->values = (char **)malloc(sizeof(char *) * de->max_num_attrs); - - if (!de->keys || !de->values) { - err = 1; - goto out; - } - - memset((void *)de->keys, 0, sizeof(char *) * de->max_num_attrs); - memset((void *)de->values, 0, sizeof(char *) * de->max_num_attrs); - - INIT_LIST_HEAD(&de->head); -out: - return err; -} - -void ds_entry_del_contents(struct ds_entry *de) -{ - int i; - - free(de->uuid); - free(de->version); - free(de->owner); - - if (de->keys) { - for(i=0; inum_attrs; i++) - free(de->keys[i]); - free(de->keys); - de->keys = NULL; - } - - if (de->values) { - for(i=0; inum_attrs; i++) - free(de->values[i]); - free(de->values); - de->values = NULL; - } -} - -void ds_entry_destroy(struct ds_entry *de) -{ - ds_entry_del_contents(de); - free(de); -} - -int ds_entry_set_uuid(struct ds_entry *de, char *uuid) -{ - int err = 0; - - if (de->uuid) - free(de->uuid); - de->uuid = strdup(uuid); - - return err; -} - -int ds_entry_set_version(struct ds_entry *de, char *version) -{ - int err = 0; - - if (de->version) - free(de->version); - de->version = strdup(version); - - return err; -} - -int ds_entry_set_owner(struct ds_entry *de, char *owner) -{ - int err = 0; - - if (de->owner) - free(de->owner); - de->owner = strdup(owner); - - return err; -} - -int ds_entry_set_value(struct ds_entry *de, int num, char *value) -{ - int err = 0; - - if (de->values[num]) - free(de->values[num]); - de->values[num] = strdup(value); - - return err; -} - -int ds_entry_add_key_value(struct ds_entry *de, char *key, char *value) -{ - int err = 0; - int act = de->num_attrs; - int new_max;; - int num; - int i; - - /* See if the key is one of the required keys */ - if (!strcmp(key, "uuid")) { - ds_entry_set_uuid(de, value); - goto out; - } else if (!strcmp(key, "version")) { - ds_entry_set_version(de, value); - goto out; - } else if (!strcmp(key, "owner")) { - ds_entry_set_owner(de, value); - goto out; - } - - /* Now let's see if we have the key already and want to change - its value only. */ - for (i=0; inum_attrs && strcmp(de->keys[i], key); i++) ; - - if (i < de->num_attrs) { - ds_entry_set_value(de, i, value); - goto out; - } - - /* Nope, we must create a new entry! */ - - de->keys[act] = strdup(key); - de->values[act] = strdup(value); - - if (++de->num_attrs >= de->max_num_attrs) { - de->max_num_attrs += 2; - new_max = de->max_num_attrs; - de->keys = (char **)realloc((void *)de->keys, - new_max * sizeof(char *)); - de->values = (char **)realloc((void *)de->values, - new_max * sizeof(char *)); - act = de->num_attrs; - num = new_max - act; - memset((void *)&de->keys[act], 0, sizeof(char *) * num); - memset((void *)&de->values[act], 0, sizeof(char *) * num); - } -out: - return err; -} - -void ds_entry_print(struct ds_entry *de) -{ - int i; - - if (de->uuid) - info_msg("UUID: %s\n", de->uuid); - if (de->version) - info_msg("Version: %s\n", de->version); - if (de->owner) - info_msg("Owner: %s\n", de->owner); - - for(i=0; inum_attrs; i++) { - info_msg("%s -> %s\n", de->keys[i], de->values[i]); - } -} - -/* DS Entry Set */ - -struct ds_entry_set *ds_entry_set_new() -{ - struct ds_entry_set *rv = NULL; - - rv = (struct ds_entry_set *)malloc(sizeof(struct ds_entry_set)); - if (rv && ds_entry_set_init(rv)) { - ds_entry_set_destroy(rv); - rv = NULL; - } - - return rv; -} - -void ds_entry_set_del_contents(struct ds_entry_set *des) -{ - -} - -void ds_entry_set_destroy(struct ds_entry_set *des) -{ - ds_entry_set_del_contents(des); - free(des); -} - -struct ds_entry_set *json_to_ds_entry_set(struct json_object *jo) -{ - struct ds_entry_set *rv = NULL; - struct ds_entry *new_entry = NULL; - int err = 0; - - rv = ds_entry_set_new(); - if (!rv) { - err_msg("Cannot create entry set as return value.\n"); - goto out; - } - - if (!jo || is_error(jo)) { - err_msg("No valid JSON object!\n"); - err = 1; - goto out; - } - - /* Check type of object */ - if (!json_object_is_type(jo, json_type_object)) { - err_msg("JSON object has wrong type.\n"); - err = 2; - goto out; - } - - json_object_object_foreach(jo, key, val) { - dbg_msg("uuid: %s\n", key); - if (!json_object_is_type(val, json_type_object)) { - err_msg("JSON object must be an object.\n"); - err = 3; - break; - } - new_entry = ds_entry_new(key, NULL, NULL, 0L); - json_object_object_foreach(val, attr, aval) { - struct json_object *parsed_aval; - parsed_aval = json_tokener_parse(json_object_to_json_string(aval)); - dbg_msg("Attr: %s\n", attr); - ds_entry_add_key_value(new_entry, attr, json_object_get_string(parsed_aval)); - } - ds_entry_set_add(rv, new_entry); - } - -out: - if (err) { - err_msg("Error during creation of ds entry set.\n"); - ds_entry_set_destroy(rv); - rv = NULL; - } - return rv; -} - -void ds_entry_set_print(struct ds_entry_set *des) -{ - struct list_head *iter; - struct ds_entry *de = NULL; - - list_for_each(iter, &des->elems) { - de = container_of(iter, struct ds_entry, head); - ds_entry_print(de); - } -} - - - -/* Queries */ - -struct ds_query *ds_query_new() -{ - struct ds_query *rv = NULL; - - rv = (struct ds_query *)malloc(sizeof(struct ds_query)); - if (rv && ds_query_init(rv)) { - ds_query_destroy(rv); - rv = NULL; - } - return rv; -} - -int ds_query_init(struct ds_query *dq) -{ - int err = 0; - - dq->max_num = 2; - dq->num = 0; - dq->names = NULL; - dq->values = NULL; - dq->names = (char **)malloc(sizeof(char *) * dq->max_num); - if (!(dq->names)) { - err_msg("No memory for names\n"); - err = 1; - goto out; - } - memset((void *)dq->names, 0, sizeof(char *) * dq->max_num); - - dq->values = (char **)malloc(sizeof(char *) * dq->max_num); - if (!(dq->values)) { - err_msg("No memory for values\n"); - err = 2; - goto out; - } - memset((void *)dq->values, 0, sizeof(char *) * dq->max_num); - -out: - dbg_msg("Returning %d\n", err); - return err; -} - -void ds_query_del_contents(struct ds_query *dq) -{ - int i; - - if (dq->names) { - for(i=0; inum; i++) - free(dq->names[i]); - free(dq->names); - dq->names = NULL; - } - if (dq->values) { - for(i=0; inum; i++) - free(dq->values[i]); - free(dq->values); - dq->values = NULL; - } -} - -void ds_query_destroy(struct ds_query *dq) -{ - ds_query_del_contents(dq); - free(dq); -} - -int ds_query_add_query(struct ds_query *dq, char *name, char *value) -{ - int err = 0; - int act = dq->num; - int new_max; - - dq->names[act] = strdup(name); - dq->values[act] = strdup(value); - - if (++dq->num >= dq->max_num) { - dq->max_num += 2; - new_max = dq->max_num; - dq->names = (char **)realloc((void *)dq->names, sizeof(char *) * new_max); - dq->values = (char **)realloc((void *)dq->values, sizeof(char *) * new_max); - if (!dq->names || !dq->values) - err = 1; - } - - return err; -} - -struct json_object *ds_query_to_json(struct ds_query *dq) -{ - struct json_object *rv = NULL; - int i; - - rv = json_object_new_object(); - if (!rv) - goto out; - - for(i=0; inum; i++) { - json_object_object_add(rv, dq->names[i], json_object_new_string(dq->values[i])); - } -out: - return rv; -} - - -/* Addresses */ - -struct ds_addr *ds_addr_new(char *protocol, char *address, int port, - char *match_network, int ttl) -{ - struct ds_addr *rv = NULL; - - rv = (struct ds_addr *)malloc(sizeof(struct ds_addr)); - if (rv && ds_addr_init(rv, protocol, address, port, match_network, ttl)) { - ds_addr_destroy(rv); - rv = NULL; - } - return rv; -} - -int ds_addr_init(struct ds_addr *da, char *protocol, char *address, - int port, char *match_network, int ttl) -{ - int err = 0; - - da->protocol = (protocol ? strdup(protocol) : NULL); - da->address = (address ? strdup(address) : NULL); - da->port = port; - da->match_network = - (match_network ? strdup(match_network) : NULL); - da->ttl = ttl; - - INIT_LIST_HEAD(&da->head); - - return err; -} - -void ds_addr_del_contents(struct ds_addr *da) -{ - free(da->protocol); - free(da->address); - free(da->match_network); -} - -void ds_addr_destroy(struct ds_addr *da) -{ - ds_addr_del_contents(da); - free(da); -} - -struct json_object *ds_addr_to_json(struct ds_addr *da) -{ - struct json_object *rv = NULL; - - rv = json_object_new_object(); - if (!rv || is_error(rv)) { - err_msg("Cannot create new JSON object.\n"); - goto out; - } - - if (da->protocol) - json_object_object_add(rv, "protocol", - json_object_new_string(da->protocol)); - if (da->address) - json_object_object_add(rv, "address", - json_object_new_string(da->address)); - json_object_object_add(rv, "port", json_object_new_int(da->port)); - if (da->match_network) - json_object_object_add(rv, "match_network", - json_object_new_string(da->match_network)); - json_object_object_add(rv, "ttl", json_object_new_int(da->ttl)); - -out: - return rv; -} - -struct ds_addr *json_to_ds_addr(struct json_object *jo) -{ - struct ds_addr *rv = NULL; - - if (!jo || is_error(jo)) { - err_msg("Invalid JSON object\n"); - goto out; - } - - if (!json_object_is_type(jo, json_type_object)) { - err_msg("JSON object has wrong type.\n"); - goto out; - } - - rv = ds_addr_new(NULL, NULL, 0, NULL, 0); - if (!rv) { - err_msg("Cannot create new addr\n"); - goto out; - } - - json_object_object_foreach(jo, key, val) { - if (!strcmp(key, "protocol")) { - rv->protocol = strdup(json_object_get_string(val)); - } else if (!strcmp(key, "address")) { - rv->address = strdup(json_object_get_string(val)); - } else if (!strcmp(key, "port")) { - rv->port = json_object_get_int(val); - } else if (!strcmp(key, "match_network")) { - rv->match_network = strdup(json_object_get_string(val)); - } else if (!strcmp(key, "ttl")) { - rv->ttl = json_object_get_int(val); - } - } -out: - return rv; -} - - - -/* Address mapping */ - -struct ds_addr_map *ds_addr_map_new() -{ - struct ds_addr_map *rv = NULL; - - rv = (struct ds_addr_map *)malloc(sizeof(struct ds_addr_map)); - if (rv && ds_addr_map_init(rv)) { - ds_addr_map_destroy(rv); - rv = NULL; - } - - return rv; -} - -int ds_addr_map_init(struct ds_addr_map *dam) -{ - int err = 0; - - INIT_LIST_HEAD(&dam->elems); - - /* Non protocol types */ - dam->uuid = NULL; - dam->version = 0; - - return err; -} - -void ds_addr_map_del_contents(struct ds_addr_map *dam) -{ - struct list_head *act; - struct ds_addr *da; - - while (!list_empty(&dam->elems)) { - act = dam->elems.next; - da = container_of(act, struct ds_addr, head); - list_del(act); - ds_addr_destroy(da); - } - - free(dam->uuid); -} - -void ds_addr_map_destroy(struct ds_addr_map *dam) -{ - ds_addr_map_del_contents(dam); - free(dam); -} - -int ds_addr_map_add(struct ds_addr_map *dam, struct ds_addr *da) -{ - int err = 0; - list_add(&da->head, &dam->elems); - return err; -} - -int ds_addr_map_del(struct ds_addr_map *dam, struct ds_addr *da) -{ - int err = 0; - list_del(&da->head); - return err; -} - - -struct json_object *ds_addr_map_to_json(struct ds_addr_map *dam) -{ - struct json_object *rv = NULL; - struct list_head *iter; - struct ds_addr *da; - - rv = json_object_new_object(); - if (!rv || is_error(rv)) { - rv = NULL; - goto out; - } - - list_for_each(iter, &dam->elems) { - da = container_of(iter, struct ds_addr, head); - json_object_array_add(rv, ds_addr_to_json(da)); - } - -out: - return rv; -} - -struct ds_addr_map *json_to_ds_addr_map(struct json_object *jo) -{ - struct ds_addr_map *rv = NULL; - struct ds_addr *da = NULL; - int i, len; - struct json_object *a; - - if (!jo || is_error(jo)) { - err_msg("JSON object error.\n"); - goto out; - } - - if (!json_object_is_type(jo, json_type_array)) { - err_msg("Wrong JSON type.\n"); - goto out; - } - - rv = ds_addr_map_new(); - if (!rv) { - err_msg("Cannot create address map.\n"); - goto out; - } - - len = json_object_array_length(jo); - for(i=0; ielems); - - return err; -} - -void ds_addr_map_set_del_contents(struct ds_addr_map_set *dams) -{ - struct list_head *iter; - struct ds_addr_map *dam; - - while (!list_empty(&dams->elems)) { - iter = dams->elems.next; - dam = container_of(iter, struct ds_addr_map, head); - list_del(iter); - ds_addr_map_destroy(dam); - } -} - -void ds_addr_map_set_destroy(struct ds_addr_map_set *dams) -{ - ds_addr_map_set_del_contents(dams); - free(dams); -} - -int ds_addr_map_set_add(struct ds_addr_map_set *dams, - struct ds_addr_map *dam) -{ - int err = 0; - list_add(&dam->head, &dams->elems); - return err; -} - -int ds_addr_map_set_del(struct ds_addr_map_set *dams, - struct ds_addr_map *dam) -{ - int err = 0; - list_del(&dam->head); - return err; -} - -struct json_object *ds_addr_map_set_to_json(struct ds_addr_map_set *dams) -{ - struct json_object *rv = NULL; - - return rv; -} - -struct ds_addr_map_set *json_to_ds_addr_map_set(struct json_object *jo) -{ - struct ds_addr_map_set *rv = NULL; - struct ds_addr_map *new_map = NULL; - struct json_object *vers = NULL, *map = NULL; - - if (!jo || is_error(jo)) - goto out; - - if (!json_object_is_type(jo, json_type_object)) - goto out; - - rv = ds_addr_map_set_new(); - if (!rv) - goto out; - - json_object_object_foreach(jo, key, val) { - if (!json_object_is_type(val, json_type_array)) { - err_msg("JSON object is of wrong type.\n"); - break; - } - map = json_object_array_get_idx(val, 1); - new_map = json_to_ds_addr_map(map); - if (!new_map) { - err_msg("Cannot create map from JSON object.\n"); - break; - } - new_map->uuid = strdup(key); - vers = json_object_array_get_idx(val, 0); - new_map->version = json_object_get_int(vers); - ds_addr_map_set_add(rv, new_map); - } -out: - return rv; -} - - -/* JSON Channel */ - -struct ds_channel *ds_channel_new(char *ds_uri, ne_ssl_client_cert *cert, - struct creds *creds) -{ - struct ds_channel *rv = NULL; - - rv = (struct ds_channel *)malloc(sizeof(struct ds_channel)); - if (rv && ds_channel_init(rv, ds_uri, cert, creds)) { - ds_channel_destroy(rv); - rv = NULL; - } - - return rv; -} - -int ds_channel_init(struct ds_channel *dsc, - char *ds_uri, ne_ssl_client_cert *cert, - struct creds *creds) -{ - int err = 0; - - dsc->session = NULL; - dsc->cert = cert; - dsc->use_ssl = 0; - - str_to_uri(ds_uri, &dsc->uri, DS_DEFAULT_PORT); - - if (dsc->uri.scheme) { - dbg_msg("DS scheme: %s\n", dsc->uri.scheme); - if (!strcmp(dsc->uri.scheme, "https")) { - dsc->use_ssl = 1; - dsc->cert = cert; - } - } - - if (dsc->uri.host) - dbg_msg("DS hostname: %s\n", dsc->uri.host); - dbg_msg("DS port: %d\n", dsc->uri.port); - - creds_init(&dsc->creds); - creds_copy(&dsc->creds, creds); - - dsc->resp_buf = ne_buffer_create(); - - dsc->user_buf = NULL; - dsc->user_buf_size = 0; - dsc->user_buf_len = 0; - dsc->use_buf = 0; - - spin_init(&dsc->lock, PTHREAD_PROCESS_SHARED); - - return err; -} - -void ds_channel_delete_contents(struct ds_channel *dsc) -{ - ne_close_connection(dsc->session); - ne_session_destroy(dsc->session); - if (dsc->resp_buf) - ne_buffer_destroy(dsc->resp_buf); - ne_uri_free(&dsc->uri); - creds_delete_content(&dsc->creds); -} - -void ds_channel_destroy(struct ds_channel *dsc) -{ - ds_channel_delete_contents(dsc); - spin_destroy(&dsc->lock); - free(dsc); -} - -int ds_channel_connect(struct ds_channel *dsc) -{ - int err = 0; - - spin_lock(&dsc->lock); - if (!dsc->session) { - dsc->session = ne_session_create(dsc->uri.scheme, - dsc->uri.host, - dsc->uri.port); - if (!dsc->session) { - err = 1; - goto out; - } - - if (dsc->use_ssl) { - if (dsc->cert) { - ne_ssl_set_clicert(dsc->session, dsc->cert); - ne_ssl_trust_default_ca(dsc->session); - ne_ssl_set_verify(dsc->session, - xtreemfs_verify_cert, - dsc->uri.host); - - } else { - err_msg("Need a valid certificate.\n"); - err = 2; - } - } - } -out: - spin_unlock(&dsc->lock); - - return err; -} - -int ds_channel_disconnect(struct ds_channel *dsc) -{ - int err = 0; - - spin_lock(&dsc->lock); - if (dsc->session) { - ne_close_connection(dsc->session); - } - spin_unlock(&dsc->lock); - - return err; -} - -int ds_channel_http_accept(void *userdata, ne_request *req, const ne_status *st) -{ - int acc = 0; - struct ds_channel *dsc = (struct ds_channel *)userdata; - - dsc->err = DSC_ERR_NO_ERROR; - - if (st->klass == 2) { - acc = 1; - dbg_msg("Accept 200 class\n"); - goto finish; - } - - if (st->klass == 4) { - dbg_msg("400 class.\n"); - switch (st->code) { - case 404: - dbg_msg("Object does not exits on DS.\n"); - dsc->err = DSC_ERR_NOEXIST; - break; - default: - acc = 1; - break; - } - goto finish; - } - - dbg_msg("HTTP code: %d\n", st->code); - if (st->reason_phrase) - dbg_msg("HTTP reason: %s\n", st->reason_phrase); - -finish: - return acc; -} - -int ds_channel_req_resp_reader(void *userdata, const char *buf, size_t len) -{ - struct ds_channel *dsc = (struct ds_channel *)userdata; - char *ubuf = (char *)dsc->user_buf; - - dbg_msg("Reading DSC response.\n"); - - if(len > 0) { - if (dsc->use_buf == 0) - ne_buffer_append(dsc->resp_buf, buf, len); - else { - if (dsc->user_buf_len + len <= dsc->user_buf_size) { - memcpy(&ubuf[dsc->user_buf_len], (void *)buf, len); - dsc->user_buf_len += len; - } else { - ne_buffer_append(dsc->resp_buf, dsc->user_buf, dsc->user_buf_len); - ne_buffer_append(dsc->resp_buf, buf, len); - dsc->use_buf = 0; - } - } - } else { - dbg_msg("Request has finished\n"); - if (dsc->use_buf) - dbg_msg("%s\n", dsc->user_buf); - else - dbg_msg("%s\n", dsc->resp_buf); - // pthread_cond_broadcast(&oc->wait_cond); - } - - return NE_OK; -} - -int ds_channel_resp_headers(struct ds_channel *dsc, ne_request *req) -{ - int err = 0; - void *ne_cursor = NULL; - char *header_name = NULL; - char *header_value = NULL; - - ne_cursor = NULL; - - while ((ne_cursor = - ne_response_header_iterate(req, ne_cursor, - (const char **)&header_name, - (const char **)&header_value))) { - if (!header_name || !header_value) - dbg_msg("Empty return values.\n"); - - dbg_msg("Header: %s -> %s\n", header_name, header_value); - } - - - return err; -} - -ne_request *ds_channel_new_req(struct ds_channel *dsc, char *funcname) -{ - ne_request *rv = NULL; - char auth_str[1024]; - - spin_lock(&dsc->lock); - - rv = ne_request_create(dsc->session, "POST", funcname); - if (!rv) - goto out; - - memset((void *)auth_str, 0, 1024); - - if (creds_to_str_ip(&dsc->creds, auth_str, 1024)) { - ne_request_destroy(rv); - rv = NULL; - goto out; - } - - /* snprintf(auth_str, 1024, "nullauth blabla"); */ - dbg_msg("Authorization string: '%s'\n", auth_str); - - ne_add_request_header(rv, "Authorization", auth_str); - -out: - spin_unlock(&dsc->lock); - - return rv; -} - -int ds_channel_dispatch_req(struct ds_channel *dsc, - ne_request *ne_req, char *req_param_str) -{ - int err = 0; - int ne_err; - ne_status const *status = NULL; - - spin_lock(&dsc->lock); - - ne_set_request_body_buffer(ne_req, req_param_str, - strlen(req_param_str)); - - /* How to receive the answer */ - ne_add_response_body_reader(ne_req, ds_channel_http_accept, - ds_channel_req_resp_reader, (void *)dsc); - - /* Clear response buffer */ - ne_buffer_clear(dsc->resp_buf); - - /* Submit request */ - if((ne_err = ne_request_dispatch(ne_req)) != NE_OK) { - err_msg("Error %d while dispatching the request.\n", ne_err); - status = ne_get_status(ne_req); - err_msg("Reason: %s\n", ne_get_error(dsc->session)); - err = 2; - goto out; - } - - /* Get headers from request ans prepare them for analyzation */ - err = ds_channel_resp_headers(dsc, ne_req); - -out: - spin_unlock(&dsc->lock); - - return err; -} - -struct json_object *ds_channel_get_answer(struct ds_channel *dsc) -{ - struct json_object *rv; - - /* And analyse the answer */ - if (dsc->use_buf) { - dbg_msg("Buffer: %s\n", dsc->user_buf); - dbg_msg("Buf len: %d\n", dsc->user_buf_len); - rv = json_tokener_parse(dsc->user_buf); - } else { - dbg_msg("Buffer: %s\n", dsc->resp_buf->data); - dbg_msg("Buf len: %d\n", dsc->resp_buf->used); - rv = json_tokener_parse(dsc->resp_buf->data); - } - - return rv; -} - -int ds_channel_registerEntity(struct ds_channel *dsc, char *uuid, - char *attr, char *val, int oldVersion) -{ - int err = 0; - ne_request *ne_req = NULL; - struct json_object *req_param; - char *req_param_str = NULL; - struct json_object *data_obj; - - ne_req = ds_channel_new_req(dsc, "registerEntity"); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - - req_param = json_object_new_array(); - if (!req_param) { - err = 3; - goto out; - } - - /* Create parameter object */ - json_object_array_add(req_param, json_object_new_string(uuid)); - data_obj = json_object_new_object(); - json_object_object_add(data_obj, attr, json_object_new_string(val)); - json_object_array_add(req_param, data_obj); - json_object_array_add(req_param, json_object_new_int(oldVersion)); - req_param_str = strdup(json_object_to_json_string(req_param)); - json_object_put(req_param); - - dbg_msg("Msg string: '%s'\n", req_param_str); - - err = ds_channel_dispatch_req(dsc, ne_req, req_param_str); - -out: - if (ne_req) { - ne_request_destroy(ne_req); - } - free(req_param_str); - - return err; -} - -int ds_channel_deregisterEntity(struct ds_channel *dsc, char *uuid) -{ - int err = 0; - ne_request *ne_req = NULL; - struct json_object *req_param; - char *req_param_str = NULL; - - ne_req = ds_channel_new_req(dsc, "deregisterEntity"); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - - req_param = json_object_new_array(); - if (!req_param) { - err = 3; - goto out; - } - - /* Create parameter object */ - json_object_array_add(req_param, json_object_new_string(uuid)); - req_param_str = strdup(json_object_to_json_string(req_param)); - json_object_put(req_param); - - dbg_msg("Msg string: '%s'\n", req_param_str); - - err = ds_channel_dispatch_req(dsc, ne_req, req_param_str); - -out: - if (ne_req) { - ne_request_destroy(ne_req); - } - free(req_param_str); - - return err; -} - -struct ds_entry_set *ds_channel_getEntities(struct ds_channel *dsc, - struct ds_query *dq, - char **attrs, - int num_attrs) -{ - struct ds_entry_set *rv = NULL; - int err = 0; - ne_request *ne_req = NULL; - struct json_object *req_param; - struct json_object *attrs_obj = NULL; - struct json_object *answer_obj = NULL; - char *req_param_str = NULL; - int i; - - ne_req = ds_channel_new_req(dsc, "getEntities"); - if (!ne_req) { - err_msg("Cannot create new neon request.\n"); - err = -ENOMEM; - goto out; - } - - req_param = json_object_new_array(); - if (!req_param) { - err_msg("Cannot create parameter object.\n"); - err = 3; - goto out; - } - - /* Fill in parameter object */ - json_object_array_add(req_param, ds_query_to_json(dq)); - attrs_obj = json_object_new_array(); - if (attrs) { - for(i=0; icreds)) { - err = 1; - goto out; - } - get_local_creds(&ds->creds); - - ds->name = strdup(ds_uri); - str_to_uri(ds_uri, &ds->uri, DS_DEFAULT_PORT); - ds->channel = ds_channel_new(ds_uri, cert, &ds->creds); - if (!ds->channel) { - err = 1; - goto out; - } - -out: - return err; -} - -void dirservice_destroy(struct dirservice *ds) -{ - if (ds->channel) { - ds_channel_destroy(ds->channel); - } - - creds_delete_content(&ds->creds); - ne_uri_free(&ds->uri); - free(ds->name); - free(ds); -} - -int dirservice_connect(struct dirservice *ds) -{ - return ds_channel_connect(ds->channel); -} - -int dirservice_disconnect(struct dirservice *ds) -{ - return ds_channel_disconnect(ds->channel); -} - - -int dirservice_registerEntity(struct dirservice *ds, char *uuid, - char *attr, char *val, int oldVersion) -{ - return ds_channel_registerEntity(ds->channel, uuid, attr, - val, oldVersion); -} - -int dirservice_deregisterEntity(struct dirservice *ds, char *uuid) -{ - return ds_channel_deregisterEntity(ds->channel, uuid); -} - -struct ds_entry_set *dirservice_getEntities(struct dirservice *ds, - struct ds_query *dq, - char **attrs, - int num_attrs) -{ - return ds_channel_getEntities(ds->channel, dq, attrs, num_attrs); -} - -struct ds_addr_map_set *dirservice_getAddressMapping(struct dirservice *ds, - char *uuid) -{ - return ds_channel_getAddressMapping(ds->channel, uuid); -} - -int dirservice_register_host(struct dirservice *ds, int port) -{ - int err = 0; - char hostname[1024]; - struct hostent hent, *res; - char buf[1024]; - char *act_addr = NULL; - - gethostname(hostname, 1024); - -#ifdef __linux__ - if (gethostbyname_r(hostname, &hent, buf, 1024, &res, &err)) { - err_msg("Cannot get host information.\n"); - err = 1; - goto out; - } - - if (!res) { - dbg_msg("Host not found in host database (which is kind of strange)\n"); - err = 2; - goto out; - } - - dbg_msg("Official hostname: %s\n", hent.h_name); - dbg_msg("Host address type: %d\n", hent.h_addrtype); - - act_addr = hent.h_addr_list[0]; - while (act_addr) { - - act_addr++; - } -out: -#endif - return err; -} - -int dirservice_unregister_host(struct dirservice *ds, int port) -{ - int err = 0; - - return err; -} - -char *dirservice_get_hostaddress(struct dirservice *ds, char *uuid) -{ - char *rv = NULL; - struct ds_addr_map_set *map = NULL; - struct ds_addr_map *dam = NULL; - struct ds_addr *da = NULL; - char port_str[22]; - int len; - - map = ds_channel_getAddressMapping(ds->channel, uuid); - if (map == NULL) { - goto out; - } - - /* TODO: Better address handling, matching of networks etc. So far we only - take the first entry... */ - if (!list_empty(&map->elems)) { - dam = container_of(map->elems.next, struct ds_addr_map, head); - da = container_of(dam->elems.next, struct ds_addr, head); - snprintf(port_str, 7, "%d", da->port); - dbg_msg("Protocol '%s'\n", da->protocol); - dbg_msg("Address: '%s'\n", da->address); - dbg_msg("Port: '%s'\n", port_str); - - len = strlen(da->protocol) + 3 + strlen(da->address) + 1 + strlen(port_str) + 1; - rv = (char *)malloc(sizeof(char) * (len + 1)); - snprintf(rv, len, "%s://%s:%s\n", da->protocol, da->address, port_str); - rv[len-1] = '\0'; - } - -out: - if (map) - ds_addr_map_set_destroy(map); - - return rv; -} - -/** - * Tranlsate UUID to URI - */ -int dirservice_get_uri(struct dirservice *ds, char *uuid, ne_uri *uri) -{ - int err = 0; - char *url = NULL; - - url = dirservice_get_hostaddress(ds, uuid); - if (!url) { - err = 1; - goto out; - } - - err = str_to_uri(url, uri, 0); - -out: - return err; -} - -/** - * Resolve an UUID into the corresponding URL - * - * This functions first tries to resolve the given UUID directly - * at the directory service. If that does not succeed it tries to - * treat the UUID as a pseudo UUID (meaning a stripped down URL). - * If that does not succeed either, it tries to determine, if the - * given UUID is actually a URL itself. The latter case resembles - * a transition phase, where UUID could potentially be (pseudo) - * URLs. - */ -char *dirservice_resolve_uuid(struct dirservice *ds, char *uuid, int def_port) -{ - char *rv = NULL; - char *pseudo_uuid = NULL; - int len; - ne_uri uri; - char port_str[7]; /* At most 6 + '\0' chars */ - - rv = dirservice_get_hostaddress(ds, uuid); - if (rv) - goto out; - - /* Nope, it was not that easy... Maybe the UUID is a pseudo - URL. */ - - pseudo_uuid = extract_pseudo_uuid(uuid); - rv = dirservice_get_hostaddress(ds, pseudo_uuid); - if (rv) - goto out; - - /* Still no success. As a last resort we try to check if - the given 'uuid' is a proper URL itself. */ - if (str_to_uri(uuid, &uri, def_port)) { - dbg_msg("No success in translating UUID into something meaningful...\n"); - goto out; - } - - /* Construct a URL from uri. */ - - len = strlen(uri.scheme); - len += 3; - len += strlen(uri.host); - if (uri.port != 0) { - snprintf(port_str, 8, "%d", uri.port); - len += 1 + strlen(port_str); - } - len ++; - - rv = (char *)malloc(sizeof(char) * (len + 1)); - if (!rv) - goto out; - - if (uri.port) - snprintf(rv, len, "%s://%s:%s", uri.scheme, uri.host, port_str); - else - snprintf(rv, len, "%s://%s", uri.scheme, uri.host); - -out: - free(pseudo_uuid); - - return rv; -} diff --git a/client/src/dirservice.h b/client/src/dirservice.h deleted file mode 100644 index 9d57e582a..000000000 --- a/client/src/dirservice.h +++ /dev/null @@ -1,285 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess - - Author: Matthias Hess - - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - -/* - C Interface: dirservice - - Description: -*/ - -#ifndef __XTRFS_DIRSERVICE_H__ -#define __XTRFS_DIRSERVICE_H__ - -#include -#include -#include - -#include "creds.h" -#include "list.h" -#include "lock_utils.h" - -#define DS_DEFAULT_PORT 32638 - -#define DSC_ERR_NO_ERROR 0 -#define DSC_ERR_NOEXIST 1 - -/* Entry in the DS */ - -struct ds_entry { - char *uuid; - char *version; - char *owner; - time_t lastUpdated; - - /* TODO: This is a crude implementation and should be refined. - Possibly be something like a patricia trie. */ - int max_num_attrs; - int num_attrs; - char **keys; - char **values; - - struct list_head head; /* Embed entries into list */ -}; - -struct ds_entry *ds_entry_new(char *uuid, char *version, char *owner, - time_t lastUpdated); -int ds_entry_init(struct ds_entry *de, char *uuid, char *version, char *owner, - time_t lastUpdated); -void ds_entry_del_contents(struct ds_entry *de); -void ds_entry_destroy(struct ds_entry *de); - -int ds_entry_set_uuid(struct ds_entry *de, char *uuid); -int ds_entry_set_version(struct ds_entry *de, char *version); -int ds_entry_set_owner(struct ds_entry *de, char *owner); -int ds_entry_set_value(struct ds_entry *de, int num, char *value); - -int ds_entry_add_key_value(struct ds_entry *de, char *key, char *value); - - -/* So far this only implemented as a list but could be something else */ -struct ds_entry_set { - struct list_head elems; -}; - -struct ds_entry_set *ds_entry_set_new(); -void ds_entry_set_destroy(struct ds_entry_set *des); - -static inline int ds_entry_set_init(struct ds_entry_set *des) -{ - int err = 0; - INIT_LIST_HEAD(&des->elems); - return err; -} - -static inline int ds_entry_set_add(struct ds_entry_set *des, struct ds_entry *de) -{ - int err = 0; - list_add(&de->head, &des->elems); - return err; -} - -static inline int ds_entry_set_rem_entry(struct ds_entry_set *des, struct ds_entry *de) -{ - int err = 0; - list_del(&de->head); - return err; -} - -struct ds_entry_set *json_to_ds_entry_set(struct json_object *jo); - -void ds_entry_set_print(struct ds_entry_set *des); - - -/* Queries for DS */ - -struct ds_query { - int max_num; - int num; - char **names; - char **values; -}; - -struct ds_query *ds_query_new(); -int ds_query_init(struct ds_query *dq); -void ds_query_del_contents(struct ds_query *dq); -void ds_query_destroy(struct ds_query *dq); - -int ds_query_add_query(struct ds_query *dq, char *name, char *value); - -struct json_object *ds_query_to_json(struct ds_query *dq); -struct ds_query *json_to_ds_query(struct json_object *jo); - - -/* Address mappings */ - -struct ds_addr { - char *protocol; - char *address; - int port; - char *match_network; - int ttl; - - struct list_head head; -}; - -struct ds_addr *ds_addr_new(char *protocol, char *address, int port, - char *match_network, int ttl); -int ds_addr_init(struct ds_addr *da, char *protocol, char *address, - int port, char *match_network, int ttl); -void ds_addr_del_contents(struct ds_addr *da); -void ds_addr_destroy(struct ds_addr *da); - -struct json_object *ds_addr_to_json(struct ds_addr *da); -struct ds_addr *json_to_ds_addr(struct json_object *jo); - - -struct ds_addr_map { - struct list_head elems; - - /* These entries will not be converted to JSON as they are - not part of the specification. They will have to be filled - in manually. */ - char *uuid; - int version; - - /* To be inserted into collections */ - struct list_head head; -}; - -struct ds_addr_map *ds_addr_map_new(); -int ds_addr_map_init(struct ds_addr_map *dam); -void ds_addr_map_del_contents(struct ds_addr_map *dam); -void ds_addr_map_destroy(struct ds_addr_map *dam); - -int ds_addr_map_add(struct ds_addr_map *dam, struct ds_addr *da); -int ds_addr_map_del(struct ds_addr_map *dam, struct ds_addr *da); - -struct json_object *ds_addr_map_to_json(struct ds_addr_map *dam); -struct ds_addr_map *json_to_ds_addr_map(struct json_object *jo); - - -struct ds_addr_map_set { - struct list_head elems; -}; - -struct ds_addr_map_set *ds_addr_map_set_new(); -int ds_addr_map_set_init(struct ds_addr_map_set *dams); -void ds_addr_map_set_del_contents(struct ds_addr_map_set *dams); -void ds_addr_map_set_destroy(struct ds_addr_map_set *dams); - -int ds_addr_map_set_add(struct ds_addr_map_set *dams, struct ds_addr_map *dam); -int ds_addr_map_set_del(struct ds_addr_map_set *dams, struct ds_addr_map *dam); - -struct ds_addr_map_set *json_to_ds_addr_map_set(struct json_object *jo); - - -/* Generic channel. */ - -struct ds_gen_channel { - int (*connect)(struct ds_gen_channel *c); - int (*disconnect)(struct ds_gen_channel *c); - - int (*registerEntity)(struct ds_gen_channel *c, char *uuid, char *attr, char *val); - int (*deregisterEntity)(struct ds_gen_channel *c, char *uuid); -}; - -/* Currently there is only one channel supported so we name it just 'channel' - It will end up something like 'ds_json_channel' */ - -struct ds_channel { - ne_uri uri; - struct creds creds; - ne_session * session; - ne_ssl_client_cert * cert; - int use_ssl; - ne_buffer * resp_buf; - - char *user_buf; - size_t user_buf_size; /* Max size of user_buf */ - size_t user_buf_len; /* Actual size */ - int use_buf; /* Will be 0 for resp_buf, - 1 for user_buf */ - - pthread_cond_t wait_cond; - mutex_t wait_mutex; - spinlock_t lock; - - int err; -}; - -struct ds_channel *ds_channel_new(char *ds_uri, ne_ssl_client_cert *cert, - struct creds *creds); -int ds_channel_init(struct ds_channel *dsc, - char *ds_uri, ne_ssl_client_cert *cert, - struct creds *creds); -void ds_channel_delete_contents(struct ds_channel *dsc); -void ds_channel_destroy(struct ds_channel *dsc); - -int ds_channel_connect(struct ds_channel *dsc); -int ds_channel_disconnect(struct ds_channel *dsc); - -int ds_channel_registerEntity(struct ds_channel *dsc, char *uuid, - char *attr, char *val, int oldVersion); -int ds_channel_deregisterEntity(struct ds_channel *dsc, char *uuid); -struct ds_entry_set *ds_channel_getEntities(struct ds_channel *dsc, - struct ds_query *query, - char **attrs, int num_attrs); - - -struct dirservice { - char *name; - ne_uri uri; - - struct ds_channel *channel; - - struct creds creds; /* Credentials for communication with DS */ -}; - -struct dirservice *dirservice_new(char *ds_uri, ne_ssl_client_cert *cert); -int dirservice_init(struct dirservice *ds, - char *ds_uri, ne_ssl_client_cert *cert); -void dirservice_destroy(struct dirservice *ds); - -int dirservice_connect(struct dirservice *ds); -int dirservice_disconnect(struct dirservice *ds); - -int dirservice_registerEntity(struct dirservice *ds, char *uuid, - char *attr, char *val, int oldVersion); -int dirservice_deregisterEntity(struct dirservice *ds, char *uuid); -struct ds_entry_set *dirservice_getEntities(struct dirservice *ds, - struct ds_query *query, - char **attrs, int num_attrs); -struct ds_addr_map_set *dirservice_getAddressMapping(struct dirservice *dsc, - char *uuid); - -int dirservice_register_host(struct dirservice *ds, int port); -int dirservice_unregister_host(struct dirservice *ds, int port); - -char *dirservice_get_hostaddress(struct dirservice *ds, char *uuid); -int dirservice_get_uri(struct dirservice *ds, char *uuid, ne_uri *uri); -char *dirservice_resolve_uuid(struct dirservice *ds, char *uuid, int def_port); - -#endif diff --git a/client/src/file.c b/client/src/file.c deleted file mode 100644 index 17dd5f0c3..000000000 --- a/client/src/file.c +++ /dev/null @@ -1,510 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - * C Implementation: file - * - * Description: - * - * - * Authors: Matthias Hess , (C) 2007 - * Erich Focht - * - * Copyright: See COPYING file that comes with this distribution - * - */ - -#include -#include -#include -#include - -#include - -#include "xtreemfs.h" -#include "xtreemfs_utils.h" - -#include "file.h" -#include "filerw.h" -#include "stripe.h" -#include "stripingpolicy.h" -#include "xcap_inv.h" -#include "xcap.h" -#include "xloc.h" -#include "list.h" - -#include "lock_utils.h" -#include "logger.h" - - -/** - * Allocate a new fileid structure. - * It is assumed that fileid_structs have a use count of zero on - * creation. This indicates that they could be removed from the - * inventory if they were to be put into it. - * When someone retrieves entities from the inventory, these entities - * get an increase in use_count to indicate that someone uses that entry. - * So if a file is to be inserted into the inventory the inserter - * has to increase the use_count before doing so. - */ -struct fileid_struct * -fileid_struct_new(char *fileid, char *path, int protection, char *xnewsize, - off_t size) -{ - struct fileid_struct *rv = NULL; - - rv = (struct fileid_struct *)malloc(sizeof(struct fileid_struct)); - if (rv) { - memset((void *)rv, 0, sizeof(struct fileid_struct)); - if (fileid) - rv->fileid = strdup(fileid); - if(path) - rv->path = strdup(path); - rv->protection = protection; -/* if (xnewsize) - rv->xnewsize = strdup(xnewsize);*/ - rv->sz.size = size; - - if ( (fileid && !rv->fileid) - || (path && !rv->path)) { - fileid_struct_delete(rv); - rv = NULL; - goto finish; - } - - spin_init(&rv->lock, PTHREAD_PROCESS_PRIVATE); - spin_init(&rv->flush, PTHREAD_PROCESS_PRIVATE); - atomic_set(&rv->sz.needs_updating, 0); - atomic_set(&rv->sz.order, 0); - /* atomic_set(&rv->use_count, 0); */ - atomic_set(&rv->to_be_deleted, 0); - atomic_set(&rv->to_be_erased, 0); - INIT_LIST_HEAD(&rv->replica_list); - - hash_table_entry_init(&rv->entry, rv->fileid); - } - -finish: - return rv; -} - - -#if 0 -int -fileid_struct_init(struct fileid_struct *fs) -{ - fs->fileid = NULL; - fs->path = NULL; - fs->protection = 0; - fs->xnewsize = NULL; - - spin_init(&fs->lock, PTHREAD_PROCESS_PRIVATE); - - fs->sz.size = 0; - fs->sz.order = 0; - atomic_set(&fs->sz.needs_updating, 0); - atomic_set(&fs->order, 0); - atomic_set(&fs->use_count, 0); - INIT_LIST_HEAD(&fs->replica_list); - return 0; -} -#endif - - -void -fileid_struct_delete_replicas(struct fileid_struct *fs) -{ - struct list_head *iter; - struct file_replica *replica = NULL; - - while(!list_empty(&fs->replica_list)) { - iter = fs->replica_list.next; - replica = container_of(iter, struct file_replica, head); - list_del(iter); - file_replica_delete_user_files(replica); - spin_lock(&replica->lock); - file_replica_destroy(replica); - } -} - - -void -fileid_struct_clear(struct fileid_struct *fs) -{ - if (list_empty(&fs->replica_list)) - dbg_msg("No active replica for file '%s'\n", fs->fileid); - fileid_struct_delete_replicas(fs); - free(fs->fileid); - free(fs->path); - // free(fs->xnewsize); - /* Eventually clear replica list, too. */ -} - -void fileid_struct_delete(struct fileid_struct *fs) -{ - fileid_struct_clear(fs); - if (spin_destroy(&fs->lock)) - err_msg("Spin still in use on destroy!\n"); - spin_destroy(&fs->flush); - free(fs); -} - -void fileid_struct_del_entry(struct hash_table_entry *hte) -{ - struct fileid_struct *fileid; - - fileid = container_of(hte, struct fileid_struct, entry); - hash_table_entry_del_content(hte); - fileid_struct_delete(fileid); -} - -void fileid_struct_print(struct fileid_struct *fileid) -{ - spin_lock(&fileid->lock); - - info_msg("File '%s'\n", fileid->path); - info_msg("\tID: %s\n", fileid->fileid); - info_msg("\tSize: %d\n", fileid->sz.size); - info_msg("\tUse count: %d\n", fileid_struct_read_uc(fileid)); - - spin_unlock(&fileid->lock); -} - - -struct file_replica *file_replica_new(struct fileid_struct *fileid, - char **osd_ids, - char *xloc_inst, - int cache) -{ - struct file_replica *rv = NULL; - struct json_object *jo; - struct striping_policy *sp; - SHA_CTX ctx; - unsigned char digest[SHA_DIGEST_LENGTH]; - char *fid = NULL; - - rv = (struct file_replica *)malloc(sizeof(struct file_replica)); - if (!rv) - goto finish; - - memset((void *)rv, 0, sizeof(struct file_replica)); - rv->fileid_s = fileid; - if (fileid == NULL) { - dbg_msg("Warning: Fileid for replica is NULL\n"); - } else { - fid = fileid->fileid; - } - - spin_init(&rv->lock, PTHREAD_PROCESS_PRIVATE); - atomic_set(&rv->use_count, 0); - INIT_LIST_HEAD(&rv->ufiles); - INIT_LIST_HEAD(&rv->head); - rv->osd_ids = osd_ids; - rv->xloc_inst = strdup(xloc_inst); - - jo = json_tokener_parse(xloc_inst); - sp = json_to_striping_policy(json_object_array_get_idx(jo, 0)); - if (cache) - rv->fobj_cache = fobj_cache_new(sp->stripe_size); - - /* And calculate replica id. This is just the SHA1 sum for the string - */ - SHA1_Init(&ctx); - if (fid != NULL) - SHA1_Update(&ctx, (void *)fid, strlen(fid)); - SHA1_Update(&ctx, (void *)xloc_inst, strlen(xloc_inst)); - SHA1_Final(digest, &ctx); - - rv->id = sha1_digest_to_str(digest); - dbg_msg("Replica ID: %s\n", rv->id); - - /* And find translation module to use. */ - rv->mod = transl_engine_find_by_type(&transl_engine, - sp->id); - if (rv->mod) { - dbg_msg("Found a translation module!\n"); - } - - free(sp); - json_object_put(jo); - -finish: - return rv; -} - -int file_replica_is_the_same(struct file_replica *r1, struct xlocs *xl) -{ - int rv = 0; - int i; - - /* Compare striping policy */ - rv = striping_policy_cmp(&r1->sp, xl->sp); - - if (rv) { - /* Compare OSDs. This is based on their respective UUIDs */ - for(i = 0; i < r1->sp.width; i++) { - if (strcmp(r1->osd_ids[i], xl->osds[i])) { - rv = 0; - break; - } - } - } - return rv; -} - -void file_replica_delete_user_files(struct file_replica *r) -{ - struct list_head *iter; - struct user_file *uf = NULL; - - spin_lock(&r->lock); - - while(!list_empty(&r->ufiles)) { - iter = r->ufiles.next; - uf = container_of(iter, struct user_file, head); - spin_lock(&uf->lock); - list_del(iter); - spin_unlock(&uf->lock); - user_file_destroy(uf); - } - - spin_unlock(&r->lock); -} - - -void file_replica_destroy(struct file_replica *r) -{ - int i; - - for(i=0; isp.width; i++) - free(r->osd_ids[i]); - free(r->osd_ids); - free(r->xloc_inst); - /* Striping policy does not require to be freed. */ - if (r->fobj_cache) { - // file_replica_cache_flush(r); - /* Eventually the last user file might be flushing the - cache, so try to acquire a lock before actually - deleting the cache. */ - spin_lock(&r->fobj_cache->lock); - spin_unlock(&r->fobj_cache->lock); - if (r->fobj_cache) - fobj_cache_destroy(r->fobj_cache); - } - free(r->id); - - dbg_msg("freeing replica %p\n", r); - spin_unlock(&r->lock); - spin_destroy(&r->lock); - free(r); -} - - -void file_replica_dec_uc(struct file_replica *r) -{ - struct fileid_struct *fileid = r->fileid_s; - - spin_lock(&r->lock); - atomic_dec(&r->use_count); - if (atomic_read(&r->use_count) <= 0) { - dbg_msg("Deleting replica.\n"); - file_replica_destroy(r); - fileid_struct_dec_uc(fileid); - } else { - spin_unlock(&r->lock); - } -} - -int file_replica_cache_flush(struct file_replica *r) -{ - int err = 0; - struct fobj_cache *fc = r->fobj_cache; - struct list_head *iter; - struct fobj_cache_entry *fce; - - list_for_each(iter, &fc->lru) { - fce = container_of(iter, struct fobj_cache_entry, lru); - - } - - return err; -} - -void file_replica_print(struct file_replica *r) -{ - info_msg("\t\txloc inst: %s\n", r->xloc_inst); - info_msg("\t\tuse count: %d\n", atomic_read(&r->use_count)); -} - - -/** - * Allocate and init a user_file structure. - * - * @return user_file struct pointer or NULL if allocation failed. - */ -struct user_file *user_file_new(struct xcap *xcap, - struct xlocs *xl, - struct xloc_list *xll) -{ - struct user_file *uf; - - uf = (struct user_file *)malloc(sizeof(struct user_file)); - memset((void *)uf, 0, sizeof(struct user_file)); - if (xcap) - uf->xcap = xcap; - if (xl) - uf->xloc = xl; - if (xll) - uf->xloc_list = xll; - spin_init(&uf->lock, PTHREAD_PROCESS_PRIVATE); - atomic_set(&uf->use_count, 0); - INIT_LIST_HEAD(&uf->head); - - return uf; -} - -/** - * Destroy and free a user_file structure. - * - * @return 0 if all went well, -EBUSY if user_file still in use. - */ -int user_file_destroy(struct user_file *uf) -{ - int err = 0; - int val; - - spin_lock(&uf->lock); - dbg_msg("Destroying user file with location '%s'\n", uf->xloc->repr); - - if ((val = atomic_read(&uf->use_count)) > 0) { - dbg_msg("User file is still in use. Count is %d\n", val); - spin_unlock(&uf->lock); - err = -EBUSY; - goto err; - } - - if (uf->reqs) { -#if 0 - if (list_empty(&uf->reqs->children_list)) - free(uf->reqs); - else { - dbg_msg("User file still has unfinshed child requests.\n"); - err = -EBUSY; - } -#endif - } - if (uf->xloc) - xlocs_delete(uf->xloc); - if (uf->xloc_list) - xloc_list_delete(uf->xloc_list); - - spin_unlock(&uf->lock); - spin_destroy(&uf->lock); - - if (!err) { - /* xcap no longer belongs to us! */ - dbg_msg("freeing user_file %p\n", uf); - free(uf); - } - err: - return err; -} - -int user_file_flush_cache(struct user_file *uf) -{ - int err = 0; - struct fileid_struct *fileid = uf->file->fileid_s; - struct fobj_cache *fc; - struct fobj_cache_entry *fce; - struct list_head *iter; - struct req *req; - off_t new_size, real_size, right_size; - - dbg_msg("Flushing file cache.\n"); - - if (!uf->file) { - dbg_msg("No replica given for user file.\n"); - goto finish; - } - - fc = uf->file->fobj_cache; - if (!fc) { - dbg_msg("No file cache for replica.\n"); - goto finish; - } - - /* Because the OSD does not necessarily know about the right file - size, we must keep the right size here. If caching is allowed - only the cache knows about it (unless it is a read only cache) */ - spin_lock(&fc->lock); - right_size = fileid->sz.size; - list_for_each(iter, &fc->lru) { - fce = container_of(iter, struct fobj_cache_entry, lru); - if (fobj_cache_entry_is_dirty(fce)) { - // pthread_spin_lock(&fce->lock); - dbg_msg("Creating flush request for object %ld with size %ld\n", fce->idx, fc->obj_size); - real_size = fc->obj_size; - new_size = (off_t)(fce->idx + 1) * (off_t)fc->obj_size; - // Locking of fileid required? - if (right_size < new_size) { /* We have the last object! */ - real_size = (off_t)fc->obj_size - (new_size - right_size); - } - if (real_size < 0) { - dbg_msg("Real size is less than zero. This is wrong!\n"); - dbg_msg("New size - right size = %ld - %ld = %ld\n", - new_size, right_size, new_size - right_size); - err = 1; - break; - } - dbg_msg("Real size is: %ld, file size is %ld\n", real_size, fileid->sz.size); - // pthread_spin_unlock(&fce->lock); - req = fobj_req_create(REQ_FOBJ_WRITE, fce->idx, - 0L, real_size, fce->data, - uf, 0, NULL); - dbg_msg("Waiting for request.\n"); - err = req_wait(req); - if (err) { - err_msg("Cannot flush cache!\n"); - goto finish; - } - dbg_msg("Request finished.\n"); - dbg_msg("File size after request: %ld\n", fileid->sz.size); - fobj_cache_entry_set_clean(fce); - } - } - - /* Restore file size for further use... */ - fileid->sz.size = right_size; - spin_unlock(&fc->lock); -finish: - return err; -} - -void -user_file_print(struct user_file *uf) -{ - info_msg(" xlocs: '%s'\n", uf->xloc->repr); - info_msg(" xcap: '%s'\n", uf->xcap->repr); - info_msg(" use count: %d\n", atomic_read(&uf->use_count)); -} diff --git a/client/src/file.h b/client/src/file.h deleted file mode 100644 index fd9f6b28b..000000000 --- a/client/src/file.h +++ /dev/null @@ -1,272 +0,0 @@ -/* Copyright (c) 2007, 2008 Erich Focht, Matthias Hess - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#ifndef __XTRFS_OPEN_FILE_H__ -#define __XTRFS_OPEN_FILE_H__ -/** - * Structures for keeping track of open files. - * - * @author: Erich Focht - */ - -#ifdef DO_KERNEL -#include -#include -#else -#include "kernel_substitutes.h" -#endif - -#include - -#include "request.h" -#include "xloc.h" -#include "xcap.h" -#include "hashtable.h" -#include "list.h" -#include "stripe.h" -#include "fobj_cache.h" - -struct xlocs; - - -/** - * FileID structure keeping track of all used instances of a file replica. - * - */ - -struct file_size { - off_t size; - unsigned int epoch; /*!< Epoch of last update, maybe the same as 'order'? */ - atomic_t order; /*!< order of the latest size update */ - atomic_t needs_updating; -}; - -struct fileid_struct { - char *fileid; - char *path; - int protection; /*!< decoded POSIX protection bits */ - /* extended attributes? */ - /* global user IDs ? VO IDs? */ - struct xcap *xcap; /*!< Capabilities of this file */ - struct file_size sz; /*!< Contains file size update info */ - int border; /*!< Defines local requests order */ - spinlock_t lock; - spinlock_t flush; /*!< Locked if someone is flushing this file. */ - /* atomic_t use_count; */ - atomic_t to_be_deleted; /*!< Entry is to be deleted from inventory. */ - atomic_t to_be_erased; /*!< Entry is to be erased from file system. */ - struct list_head replica_list; /*!< list of file_replicas */ - struct hash_table_entry entry; -}; - -#define NEW_FILEID_ORDER(uf) \ - ((unsigned int)atomic_inc_return(&(uf)->file->fileid_s->sz.order)) -#define GET_EPOCH(uf) \ - ((uf)->xcap->truncateEpoch) - -/** - * File replica object. - * Created when opening a file, destroyed when last used instance is closed. - * Holds several unparsed header strings used in communication requests - * which need to be forwarded to MRC or OSDs. - * All file replicas are members of a linked list inside a fileid_struct. - */ -struct file_replica { - struct fileid_struct *fileid_s; /*!< pointer to parent structure */ - char *id; /*!< Identify replica by id */ - - struct transl_mod *mod; /*!< Module to use for this replica */ - - spinlock_t lock; /*!< protect stripe_policy, osd_urls, lists */ - atomic_t use_count; /*!< avoid freeing while used */ - - /* - decoded info describing the currently used replica instance - */ - struct striping_policy sp; - char **osd_ids; - - /* - The XLocation instance is the first element in the xlocation - array and identifies the replica instance among all which have the - same fileid. - */ - char *xloc_inst; /*!< pointer to XLocation instance string */ - - struct fobj_cache *fobj_cache; /*!< File object cache for this replica. */ - - - struct list_head ufiles; /*!< List with child file descriptors */ - struct list_head head; -}; - - -struct file_replica *file_replica_new(struct fileid_struct *fileid, - char **osd_urls, - char *xloc_inst, - int cache); -int file_replica_is_the_same(struct file_replica *r1, struct xlocs *xl); -void file_replica_delete_user_files(struct file_replica *r); -void file_replica_destroy(struct file_replica *r); - -int file_replica_cache_flush(struct file_replica *r); - -void file_replica_print(struct file_replica *r); - -/** - * User file descriptor structure. - * - * User specific parts of file information, contains pointer to an - * open_file structure which contains the details of a file which - * are user independent. - * [EF: maybe find a more appropriate name...] - */ -struct user_file { - struct file_replica *file; /*!< pointer to parent structure */ - - /* The XCap string is user dependent! - XLocation _can_ be user dependent, too - */ - - /* So far, it seems, we only have 'global' xcaps. But we might have - in the future a 'per-open-file' xcap and therefore we add a reference - to a xcap structure here. This allows to deal with both cases. The - x-capability referenced here belongs to the xcap inventory anyway - and should be manipulated by functions of that inventory only. - */ - struct xcap *xcap; /*!< latest capability seen */ - struct xlocs *xloc; /*!< pointer to current xloc header */ - struct xloc_list *xloc_list; /*!< Keep xloc list from MRC */ - /* is protection necessary? */ - spinlock_t lock; /*!< protect xcap, xloc access */ - atomic_t use_count; /*!< avoid freeing while used */ - /* - When a file with outstanding requests is closed (because the - owner process is killed), the outstanding requests need to be - cancelled. - Provide a linked list to outstanding fileop requests for reverse - lookup such that they can be deleted. - This is currently done by a pseudo-request structure: reqs - */ - struct req *reqs; /*!< pseudo req struct used as parent req. */ - struct list_head head; /*!< chain into list of user_files belonging to a replica */ -}; - -// resolve fileid in debug messages -#define UFILEID(u) (u)->file->fileid_s->fileid - -extern struct fileid_struct *fileid_struct_new(char *fileid, - char *path, - int protection, - char *xnewsize, - off_t size); -extern int fileid_struct_init(struct fileid_struct *fs); -extern void fileid_struct_delete_replicas(struct fileid_struct *fs); -extern void fileid_struct_clear(struct fileid_struct *fs); -extern void fileid_struct_delete(struct fileid_struct *fs); -extern void fileid_struct_del_entry(struct hash_table_entry *hte); -#if 0 -extern void fileid_struct_inc_uc(struct fileid_struct *fs); -extern void fileid_struct_dec_uc(struct fileid_struct *fs); -#endif - -static inline void fileid_struct_inc_uc(struct fileid_struct *fs) -{ - atomic_inc(&fs->entry.use_count); -} - -static inline void fileid_struct_dec_uc(struct fileid_struct *fs) -{ - atomic_dec(&fs->entry.use_count); - if (atomic_read(&fs->entry.use_count) <= 0) { - dbg_msg("Should delete fileid struct.\n"); - /* file_inv_remove(&file_inv, fs); */ - } -} - -static inline int fileid_struct_read_uc(struct fileid_struct *fs) -{ - return atomic_read(&fs->entry.use_count); -} - -void fileid_struct_print(struct fileid_struct *fileid); - -/** - * Get a fileid_struct structure for a path. - * - * Search for it in the hashtable. If not found, create a new one. - * Increase use count atomically and avoid deletion (freeing) while - * another thread is modifying it. - * open() "gets" a file, close() "puts" it. Other accesses should be - * enclosed between get and put. - * - * @param path the full file path - * @param xloc_inst the xlocation instance JSON string - * @return pointer to open file structure, newly allocated if not found in - * hashtable - */ -extern struct fileid_struct *get_fileid(char *path); -extern int put_fileid(struct fileid_struct *fid); - - -extern struct file_replica *get_file_replica(char *fileid, char *xloc_inst); -extern int put_file_replica(struct file_replica *replica); - -extern struct user_file *get_user_file(char *path, char *xloc_inst); -extern int put_user_file(struct user_file *ufile); - -/** - * Allocate and init a user_file structure. - * - * @return user_file struct pointer or NULL if allocation failed. - */ -struct user_file *user_file_new(struct xcap *xcap, - struct xlocs *xl, - struct xloc_list *xll); - -/** - * Destroy and free a user_file structure. - * - * @return 0 if all went well, -EBUSY if user_file still in use. - */ -int user_file_destroy(struct user_file *uf); -int user_file_flush_cache(struct user_file *uf); - -void user_file_print(struct user_file *uf); - -#define file_lock(fileid) \ -{do { \ - dbg_msg("Locking fileid %p using %p.\n", fileid, &fileid->lock); \ - spin_lock(&fileid->lock); \ - dbg_msg("Locked fileid %p using %p.\n", fileid, &fileid->lock); \ -} while(0); } - -#define file_unlock(fileid) \ -{do { \ - dbg_msg("Unlocking fileid %p using %p.\n", fileid, &fileid->lock); \ - spin_unlock(&fileid->lock); \ - dbg_msg("Unlocked fileid %p using %p.\n", fileid, &fileid->lock); \ -} while(0); } - -#endif // __XTRFS_OPEN_FILE_H__ diff --git a/client/src/file_inv.c b/client/src/file_inv.c deleted file mode 100644 index 0c45789d9..000000000 --- a/client/src/file_inv.c +++ /dev/null @@ -1,549 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - * C Implementation: file_inv - * - * Author: Matthias Hess , (C) 2007 - * - * Copyright: See COPYING file that comes with this distribution - * - * Description: - * The file inventory handles all file structure related aspects of - * the file system. There are actually three layers of file related - * strutures: - * 1) A structure describing the actual file: fileid_struct - * 2) A structure for each replica of a specific file: file_replica - * 3) A structure for open files or files the client code has seen - * during processing: user_file. - * - * There will be only one file inventory for all threads that make up - * the client code, so the file inventory must be protected. - * The general idea to keep the inventory consistent is to be able - * to lock entries in the inventory and indicate their use with a - * use counter. - * If a thread wants to change a value in an entry it must acquire - * the entries lock. If a thread uses an entry for example in fuse's - * file_info struct the corresponding use counter will be increased - * s.t. a delete request from another thread does not succeed. - * Such delete operations must not be executed outside the inventory - * but only with the inventory's own functions. - * - * Adding an entry to the inventory does not increase its use count. - * If someone wants to add an entry and still uses it after inserting - * into the inventory he must increase the use count himself. - * This opens up the possibility to have entries which are currently - * not used but might be used in the future (indicated by a use count > 0) - * If there is a need to remove entries (for instance if a maximum - * number of entries is reached) the zero use count entries can safely - * be removed. - * An example is a stat operation for a file. When the file system - * execs stat it might use the entry in later operations but stat is - * only an operation like 'look at it' and does not lead to 'use it'. - */ - -#include -#include -#include -#include - -#include "file_inv.h" -#include "dirservice.h" -#include "stripingpolicy.h" -#include "xloc.h" -#include "xcap_inv.h" -#include "xcap.h" -#include "list.h" -#include "hashtable.h" - -#include "lock_utils.h" -#include "logger.h" - - -hash_idx_t -file_inv_hash_func(void *key) -{ - hash_idx_t rv = -1; - char *fileid = (char *)key; - int i; - - rv = 0; - for(i=0; ifiles, FILE_CACHE_HASH_TABLE_SIZE, - file_inv_hash_func, file_inv_hash_cmp, - fileid_struct_del_entry); - pthread_mutex_init(&fc->lock, NULL); - - return rv; -} - -void -file_inv_clear(struct file_inv *fc) -{ - struct list_head *iter; - struct hash_table_entry *hte; - struct fileid_struct *fileid = NULL; - int i; - - // pthread_mutex_lock(&fc->lock); - - for(i=0; ifiles.size; i++) { - while(!list_empty(&fc->files.entries[i])) { - iter = fc->files.entries[i].next; - hte = (struct hash_table_entry *)iter; - fileid = (struct fileid_struct *) - container_of(hte, struct fileid_struct, entry); - fileid_struct_delete_replicas(fileid); - list_del(iter); - fileid_struct_delete(fileid); - } - } - hash_table_clear(&fc->files); - - // pthread_mutex_unlock(&fc->lock); - -} - - -void -file_inv_destroy(struct file_inv *fc) -{ - file_inv_clear(fc); - pthread_mutex_destroy(&fc->lock); - free(fc); -} - - -/** - * Add an existing fileid_struct to the inventory. The key - * is the fileid which is assumed to exist for every new - * fileid. This implicates that all fileid structs can be - * created only after contacting the MRC (as this is the - * entity that holds the authoritative information) - * - * The caller can hold the lock and indicates with a set - * use_count if he still needs the passed fileid_struct. - */ -void -file_inv_add_fileid(struct file_inv *fc, struct fileid_struct *fs, int lock) -{ - hash_table_insert_entry(&fc->files, &fs->entry, LOCK); -} - - -/** - * Delete a fileid_struct from the inventory. - * This functions removes a given fileid struct from the inventory, - * if it is found. The caller has to make sure that the use_count of - * that fileid_struct is really zero and no locks are held on the - * fileid_struct. - */ -int -file_inv_remove(struct file_inv *fc, struct fileid_struct *fs) -{ - int rv = 0; - - hash_table_remove_entry(&fc->files, &fs->entry); - - return rv; -} - - -int -file_inv_rename(struct file_inv *fc, char *from, char *to) -{ - int rv = 0; - struct fileid_struct *fileid; - struct hash_table_entry *hte; - - dbg_msg("Looking for file '%s'\n", from); - - fileid = file_inv_get_by_path(fc, from, LOCK); - if (fileid) { - hash_table_lock_row(&fc->files, fileid->fileid); - hte = hash_table_find(&fc->files, (void *)fileid->fileid, NO_LOCK); - - if (hte) { - list_del(&hte->head); - atomic_dec(&hte->use_count); /* Entry no longer in list */ - fileid = container_of(hte, struct fileid_struct, entry); - free(fileid->path); - fileid->path = strdup(to); - dbg_msg("Re-inserting fileid struct.\n"); - hash_table_insert_entry(&fc->files, hte, NO_LOCK); - atomic_dec(&hte->use_count); /* Must be removed because we - had an increase in use count - due to 'find' operation. */ - } - hash_table_unlock_row(&fc->files, fileid->fileid); - fileid_struct_dec_uc(fileid); /* Necessary because of 'get_by_path' */ - } else { - dbg_msg("File '%s' not found in inventory.\n", from); - rv = ENOENT; - } - - return rv; -} - - -/** - * Get an entry specified by fileid from the inventory. - * This function will lock the entry if it is in the inventory. - * The caller must release this lock when he no longer needs - * it. - */ -struct fileid_struct * -file_inv_get_fileid(struct file_inv *fc, char *fileid, int lock) -{ - struct fileid_struct *rv = NULL; - struct hash_table_entry *res; - - res = hash_table_find(&fc->files, (void *)fileid, LOCK); - if (res) { - rv = container_of(res, struct fileid_struct, entry); - } - return rv; -} - - -/** - * Find an inventory entry by path. - * As the path is not the key of the hash entries and as there - * are no other orderings, this operation is very costly and should - * be used as little as possible. - * Besides, the entry -- if found -- is locked and must be released - * by the caller. - */ -struct fileid_struct * -file_inv_get_by_path(struct file_inv *fc, char *path, int lock) -{ - struct fileid_struct *rv = NULL, *ifs; - struct hash_table *ht; - struct hash_table_entry *hte; - struct list_head *iter; - - int i; - - dbg_msg("file_inv %p path=%s\n", fc, path); - ht = &fc->files; - - /* In order to find the entry corresponding to 'path' we walk through - the whole hash table in a linear fashion. As there is no ordering - there is no way around that. We also have to lock the whole hash - table for this operation, so this should be avoided. - */ - // hash_table_lock(ht); - - for(i=0; isize && rv == NULL; i++) { - spin_lock(&ht->locks[i]); - list_for_each(iter, &ht->entries[i]) { - hte = list_entry(iter, struct hash_table_entry, head); - ifs = container_of(hte, struct fileid_struct, entry); - if (ifs->path) { - dbg_msg("Comparing '%s' with '%s'\n", path, ifs->path); - if(!strcmp(path, ifs->path)) { - rv = ifs; - atomic_inc(&hte->use_count); - break; - } - } else { - err_msg("IFS path should not be null.\n"); - } - } - spin_unlock(&ht->locks[i]); - } - // hash_table_unlock(ht); - - dbg_msg("Continuing...\n"); - - if (rv) { - dbg_msg("Trying to lock fileid lock.\n"); - dbg_msg("got the fileid lock.\n"); - } - - return rv; -} - - -/** - * Add a user file to the inventory. - */ -int file_inv_add_user_file(struct file_inv *fc, char *fullpath, int prots, - struct user_file *uf, int cache, struct dirservice *ds) -{ - int err = 0; - struct fileid_struct *fileid; - struct file_replica *replica, *ri; - struct xcap *xcap; - struct xlocs *xloc; - struct list_head *iter; - char *this_xloc; - - dbg_msg("fc=%p fullpath=%s uf=%p\n", fc, fullpath, uf); - xcap = uf->xcap; - xloc = uf->xloc; - this_xloc = xloc->repr; - - /* dbg_msg("this_xloc = %s fc=%p fullpath=%s uf=%p\n", this_xloc, fc, - fullpath, uf); */ - - /* Find the right fileid_struct for this file, if an entry is returned - the entry is locked and the use count is increased by one. */ - /* hash_table_lock_row(&fc->files, xcap->fileID); */ - fileid = file_inv_get_fileid(fc, xcap->fileID, 0); - if (!fileid) { - dbg_msg("File ID not found in cache, creating new one.\n"); - fileid = fileid_struct_new(xcap->fileID, - fullpath, - prots, - NULL, - 0); - - if (!fileid) { - err = 1; - /* hash_table_unlock_row(&fc->files, xcap->fileID); */ - goto finish; - } - dbg_msg("Locking fileid struct.\n"); - - /* Keep state of fileid consistent with later 'atomic_dec' */ - fileid_struct_inc_uc(fileid); - file_inv_add_fileid(fc, fileid, NO_LOCK); - } else { - dbg_msg("Found fileid in inventory.\n"); - } - - spin_lock(&fileid->lock); - - /* hash_table_unlock_row(&fc->files, xcap->fileID); */ - - /* At this point, the fileid struct is still locked.*/ - - /* 'fileid' now points to the right 'fileid_struct'. Now let's - see if we already have a replica for this file */ - replica = NULL; - list_for_each(iter, &fileid->replica_list) { - ri = container_of(iter, struct file_replica, head); - dbg_msg("Comparing replica '%s' with '%s'\n", - ri->xloc_inst, this_xloc); - if (!strcmp(ri->xloc_inst, this_xloc)) { - replica = ri; - dbg_msg("assumed to be equal!\n"); - break; - } else { - dbg_msg("not equal\n"); - } - } - - if (!replica) { - dbg_msg("No replica for %s. Creating it...\n", fileid->fileid); - replica = file_replica_new(fileid, NULL, xloc->repr, cache); - err = xloc_inst_parse(replica, xloc->repr, ds); - if (err) { - err_msg("Some error occured for %s xloc=%s\n", - fileid->fileid, this_xloc); - err_msg("The replica might be inconsistent!!!\n"); - } - fileid_struct_inc_uc(fileid); - list_add_tail(&replica->head, &fileid->replica_list); - } else { - dbg_msg("Found replica in inventory.\n"); - } - - spin_unlock(&fileid->lock); - fileid_struct_dec_uc(fileid); /* Decreasing count from 'get' operation */ - dbg_msg("Unlocking fileid %p\n", fileid); - - /* Consistency check... */ - if (replica->fileid_s != fileid) { - err_msg("The file structure of the replica is not identical to the one I figured out in the first step.\n"); - err = 15; - } - uf->file = replica; - spin_lock(&replica->lock); - list_add_tail(&uf->head, &replica->ufiles); - atomic_inc(&replica->use_count); - spin_unlock(&replica->lock); -finish: - return err; -} - -/** - * - */ -int -file_inv_remove_user_file(struct file_inv *fc, struct user_file *uf) -{ - int err = 0; - struct fileid_struct *fileid = uf->file->fileid_s; - struct fileid_struct *nfid = NULL; - struct file_replica *replica = NULL; - - dbg_msg("Locking fileid %p.\n", fileid); - spin_lock(&fileid->lock); - - if (atomic_read(&uf->use_count) > 0) { - err_msg("Not removing user file. File is still in use.\n"); - /* spin_unlock(&fileid->lock); */ - goto finish; - } - - replica = uf->file; - spin_lock(&replica->lock); - list_del(&uf->head); - atomic_dec(&replica->use_count); - spin_unlock(&replica->lock); - - user_file_flush_cache(uf); - xcap_inv_remove(&xcap_inv, uf->xcap); - user_file_destroy(uf); - - dbg_msg("Use count of replica: %d\n", atomic_read(&replica->use_count)); - - spin_lock(&replica->lock); - if (atomic_read(&replica->use_count) <= 0) { - if (atomic_read(&replica->use_count) < 0) { - dbg_msg("Warning: Use counter for replica '%s' is less than zero!\n", - replica->xloc_inst); - } - nfid = replica->fileid_s; - if (nfid != fileid) { - err_msg("Inconsistency in deleting file ids!\n"); - /* dbg_msg("Continuing with the replica fileid!\n"); */ - } - list_del(&replica->head); - fileid_struct_dec_uc(fileid); - dbg_msg("Deleting replica '%s'.\n", replica->xloc_inst); - file_replica_destroy(replica); - - spin_unlock(&fileid->lock); - - if (fileid_struct_read_uc(fileid) <= 0) - file_inv_remove(fc, fileid); - else { - dbg_msg("Fileid is %d time in use. Unlocking fileid %p\n", - fileid_struct_read_uc(fileid), fileid); - } - - } else { - dbg_msg("Unlocking fileid %p\n", fileid); - spin_unlock(&replica->lock); - spin_unlock(&fileid->lock); - } - -finish: - return err; -} - - -/** - * Release a user file structure (eg. when a file is closed) - * @param fi File Inventory - * @param uf User file to be released - * @return 0 on success, 1 if file has been removed - */ -int file_inv_release_user_file(struct file_inv *fi, struct user_file *uf) -{ - int rv = 0; - - /* Use counter must be decreased */ - dbg_msg("User file count before decreasing: %d\n", atomic_read(&uf->use_count)); - atomic_dec(&uf->use_count); - dbg_msg("User file count after decreasing: %d\n", atomic_read(&uf->use_count)); - - if (atomic_read(&uf->use_count) <= 0) { - file_inv_remove_user_file(fi, uf); - rv = 1; - } - return rv; -} - - -struct hash_table_entry * -file_inv_get_entry(struct file_inv *fc, char *fileid, int lock) -{ - return hash_table_find(&fc->files, (void *)fileid, lock); -} - - -void -file_inv_print(struct file_inv *fi) -{ - struct hash_table_iter iter; - struct hash_table_entry *hte; - struct fileid_struct *fileid; - struct list_head *liter, *liter2; - struct list_head *ufiter, *ufiter2; - struct file_replica *replica; - struct user_file *uf; - - ht_for_each(iter, &fi->files) { - hte = container_of(iter.list_iter, struct hash_table_entry, head); - fileid = container_of(hte, struct fileid_struct, entry); - fileid_struct_print(fileid); - - /* Print replica list... */ - list_for_each_safe(liter, liter2, &fileid->replica_list) { - replica = container_of(liter, struct file_replica, head); - file_replica_print(replica); - - list_for_each_safe(ufiter, ufiter2, &replica->ufiles) { - uf = container_of(ufiter, struct user_file, head); - user_file_print(uf); - } - } - } -} - diff --git a/client/src/file_inv.h b/client/src/file_inv.h deleted file mode 100644 index 739f5307e..000000000 --- a/client/src/file_inv.h +++ /dev/null @@ -1,106 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -C Interface: file_inv - -Description: - - -Author: Matthias Hess , (C) 2007 - -Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_FILE_CACHE_H__ -#define __XTRFS_FILE_CACHE_H__ - -#include - -#include "file.h" -#include "xcap.h" -#include "xloc.h" -#include "hashtable.h" - -#define FILE_CACHE_HASH_TABLE_SIZE 100 - -#ifndef LOCK -#define LOCK 1 -#else -#error "LOCK was defined before!!! Need to rename it!!!" -#endif - -#ifndef NO_LOCK -#define NO_LOCK 0 -#else -#error "NO_LOCK was defined before!!! Need to rename it!!!" -#endif - - -/** - * File inventory. - * - * This structure serves as an entry point to all the - * files that this instance of xtreemfs is using or - * has recently been. Files are identified by their - * fileid within the file system which serves as a key - * to the corresponding hash table. - * - * So far only an alias to 'struct hash_table' but during - * the course of development there will be more to it. - */ -struct file_inv { - struct hash_table files; /*!< Key is fileid, value is - 'struct fileid_struct' */ - size_t max_entries; /*!< Maximum number of entries in inventory */ - - mutex_t lock; /*!< The big lock for the whole inventory */ -}; - -struct file_inv *file_inv_new(); -int file_inv_init(struct file_inv *fc); -void file_inv_clear(struct file_inv *fc); -void file_inv_destroy(struct file_inv *fc); - -void file_inv_add_fileid(struct file_inv *fc, struct fileid_struct *fs, int lock); -int file_inv_remove(struct file_inv *fc, struct fileid_struct *fs); -int file_inv_rename(struct file_inv *fc, char *from, char *to); - -struct fileid_struct *file_inv_get_fileid(struct file_inv *fc, char *path, int lock); -struct fileid_struct *file_inv_get_by_path(struct file_inv *fc, char *path, int lock); - -int file_inv_add_user_file(struct file_inv *fc, char *fullpath, int prots, - struct user_file *uf, int cache, struct dirservice *ds); -int file_inv_remove_user_file(struct file_inv *fc, struct user_file *uf); -int file_inv_release_user_file(struct file_inv *fi, struct user_file *uf); - -struct hash_table_entry *file_inv_get_entry(struct file_inv *fc, char *path, int lock); - -struct hash_table_entry *file_inv_entry_new(char *path, - struct fileid_struct *fs); - -void file_inv_print(struct file_inv *fi); - -#endif diff --git a/client/src/fileobj.c b/client/src/fileobj.c deleted file mode 100644 index 365d12c24..000000000 --- a/client/src/fileobj.c +++ /dev/null @@ -1,341 +0,0 @@ -/* Copyright (c) 2007, 2008 Erich Focht, Matthias Hess - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/** - * File object processing stage - * - * In this stage file object requests are processed. They generate file - * stripe requests. File objects are mapped to stripes and OSDs. Striping - * patterns other than RAID0 can generate parity object requests... - * - * - * @author Erich Focht - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "request.h" -#include "workqueue.h" -#include "file.h" -#include "filerw.h" -#include "fobj_cache.h" -#include "fileobj.h" -#include "stripe.h" -#include "logger.h" - -#ifdef ITAC -#include -#endif - -struct work_queue *fobj_wq; -struct work_queue *client_wq; - -static void fobj_handle(struct req *req); -static void fobj_sobj_done(struct req *req); - -char *fobjop_name[] = { - [REQ_FOBJ_READ] = "FOBJ_READ", - [REQ_FOBJ_WRITE] = "FOBJ_WRITE", - [REQ_FOBJ_SOBJ_DONE] = "FOBJ_SOBJ_DONE" }; - -/** - * Create a response data structure - * - */ -static struct fobj_result *fobj_result_new() -{ - struct fobj_result *rv = NULL; - - rv = (struct fobj_result *)malloc(sizeof(struct fobj_result)); - if (rv) { - rv->num_bytes = -1; - rv->new_size = -1; - rv->epoch = -1; - } - return rv; -} - -static void fobj_result_delete(void *r) -{ - free(r); -} - -static void fobj_payload_delete(void *p) -{ - free(p); -} - -static struct fobj_sobj_done_data * -fobj_sobj_done_data_new(int sobj_id, loff_t offset, size_t size, size_t num_bytes, - size_t new_size, long epoch) -{ - struct fobj_sobj_done_data *rv = NULL; - - rv = (struct fobj_sobj_done_data *)malloc(sizeof(struct fobj_sobj_done_data)); - if (rv) { - rv->sobj_id = sobj_id; - rv->offset = offset; - rv->size = size; - rv->num_bytes = num_bytes; - rv->new_size = new_size; - rv->epoch = epoch; - } - return rv; -} - -static void fobj_sobj_done_data_delete(void *fsd) -{ - free(fsd); -} - - -/** - * create a fobj request and queue it. - * - */ -struct req *fobj_req_create(int type, int fobj_id, loff_t offset, - size_t size, void *buffer, struct user_file *fd, - int use_cache, struct req *parent) -{ - struct req *req = NULL; - struct fobj_payload *p; - struct fobj_result *result = NULL; - - p = (struct fobj_payload *)malloc(sizeof(struct fobj_payload)); - if (!p) { - err_msg("Failed to allocate fobj payload struct\n"); - goto out; - } - p->fobj_id = fobj_id; - p->offset = offset; - p->size = size; - p->rsize = 0; - p->buffer = buffer; - p->fd = fd; - p->use_cache = use_cache; - p->new_cache_entry = 0; - p->fce = NULL; - - result = fobj_result_new(); - - req = req_create(type, (void *)p, (void *)result, parent); - req->del_data = fobj_payload_delete; - req->del_result = fobj_result_delete; - - out: - return req; -} - -/** - * Create a fobj_sobj_done request and queue it. - * Called from a finishing sobj request. - * - */ -struct req *fobj_sobj_done_req(int sobj_id, - loff_t offset, size_t size, size_t num_bytes, - size_t new_size, long epoch, - struct req *parent) -{ - struct req *req = NULL; - struct fobj_sobj_done_data *data = NULL; - - data = fobj_sobj_done_data_new(sobj_id, offset, size, num_bytes, - new_size, epoch); - if (!data) - goto out; - - req = req_create(REQ_FOBJ_SOBJ_DONE, (void *)data, NULL, parent); - req->del_data = fobj_sobj_done_data_delete; - req->del_result = NULL; - -out: - return req; -} - -/** - * Main file obj worker task. - * - * Create stripe object requests or serve request from fobj cache (once - * this will be there...). - * - */ -static void fobj_handle(struct req *req) -{ - struct fobj_payload *p = (struct fobj_payload *)req->data; - struct file_replica *replica = p->fd->file; - struct fobj_cache *fc = replica->fobj_cache; - struct req *sr; - int osd_id, err = 0; - int order; - int type; - -#ifdef ITAC - VT_begin(itac_fobj_handle_hdl); -#endif - dbg_msg("fobj_handle start, state=%d, fobj_id=%d\n", - req_state(req), p->fobj_id); - - if (req_state(req) == REQ_STATE_ERROR) - goto out; - - p->new_cache_entry = 0; - - // check striping policy of file - switch (replica->sp.id) { - case SPOL_RAID_0: - // map id to OSD - osd_id = p->fobj_id % replica->sp.width; - - // EF: here we should check whether the osd_id is valid and - // the corresponding OSD is alive. For this we'll need a - // mechanism to track OSD states (based on the noops and - // results of other requests...?) - - if (req->type == REQ_FOBJ_READ) - type = REQ_SOBJ_READ; - if (req->type == REQ_FOBJ_WRITE) - type = REQ_SOBJ_WRITE; - - dbg_msg("Creating sobj request with type 0x%x\n", type); - sr = sobj_req_create(type, p->fobj_id, - p->offset, p->size, p->buffer, - replica->osd_ids[osd_id], - p->fd, req); - if (sr) { - atomic_inc(&req->active_children); - submit_request(sobj_wq, sr); - } - - break; - case SPOL_RAID_5: - // not supported, yet - err_msg("Unable to deal with RAID5 files!\n"); - err = -EINVAL; - break; - default: - err_msg("Unsupported striping policy %d!\n", replica->sp.id); - err = -EINVAL; - break; - } - out: - dbg_msg("fobj_handle end, err=%d\n", err); -#ifdef ITAC - VT_end(itac_fobj_handle_hdl); -#endif -} - -/** - * Finish a sobj request. - * - * The request to finish is passed as the parent of the given request 'req'. - * When this function is called, it 'owns' the parent request and can - * freely access all its data elements. All other finish requests by other - * children are handled sequentially! - * - * The parent request of 'req' will always be a request of type - * FOBJ_{READ|WRITE} and the parent's parent is a FILERW_{READ|WRITE} - */ -static void fobj_sobj_done(struct req *req) -{ - struct fobj_sobj_done_data *d = (struct fobj_sobj_done_data *)req->data; - - struct req *fobj_req = req->parent; - struct fobj_result *pr = (struct fobj_result *)fobj_req->result; - - dbg_msg("sobj done, fobj=%p id=%d state=%d\n", - fobj_req, d->sobj_id, req_state(req)); - - /* Check the processed bytes of the stripe object. */ - if (d->size != d->num_bytes) { - - } - - /* Check new size */ - if ((d->epoch > pr->epoch) || - ((d->epoch == pr->epoch) && (d->new_size > pr->new_size))) { - pr->epoch = d->epoch; - pr->new_size = d->new_size; - } - - dbg_msg("Fobj-req %p has %d child(ren)\n", fobj_req, - atomic_read(&fobj_req->active_children)); - - /* If this is the last child, we must finish the parent fobj req */ - if (atomic_dec_return(&fobj_req->active_children) == 0) { - struct fobj_payload *fp = (struct fobj_payload *)fobj_req->data; - struct req *answer = filerw_fobj_done_req(fp->fobj_id, - fp->offset, - d->num_bytes, - pr->new_size, - pr->epoch, - fobj_req->parent); - /* propagate error state up */ - if (req->error) { - dbg_msg("error = %d\n", req->error); - answer->error = req->error; - } - submit_request(filerw_wq, answer); - finish_request(fobj_req); - } - /* work for this request is done, throw it away */ - finish_request(req); -} - -void fobj_init(void) -{ - fobj_wq = workqueue_new("fobj", 1); - if (!fobj_wq) { - err_msg("Failed to create fobj workqueue!\n"); - exit(1); - } - workqueue_add_func(fobj_wq, REQ_FOBJ_READ, fobj_handle); - workqueue_add_func(fobj_wq, REQ_FOBJ_WRITE, fobj_handle); - workqueue_add_func(fobj_wq, REQ_FOBJ_SOBJ_DONE, fobj_sobj_done); - trace_msg("'fobj_wq' successfully created (%X)\n", fobj_wq); -} - -void fobj_close(void) -{ - workqueue_del(fobj_wq); -} - -/** - * Dump info on one fobj request to log. - * - * @param req pointer to request to be shown - */ -void print_fobj_info(struct req *req) -{ - struct fobj_payload *p = (struct fobj_payload *)req->data; - - info_msg("fobj_id=%d state=%s op=%s offs=%ld buffer=%p fileid=%s\n", - p->fobj_id, reqstate_name[req->state], frwop_name[p->op], - p->offset, p->buffer, UFILEID(p->fd)); -} diff --git a/client/src/fileobj.h b/client/src/fileobj.h deleted file mode 100644 index a58e2f09d..000000000 --- a/client/src/fileobj.h +++ /dev/null @@ -1,69 +0,0 @@ -// -// C++ Interface: fileobj -// -// Description: -// -// -// Author: Matthias Hess , (C) 2008 -// -// Copyright: See COPYING file that comes with this distribution -// -// - -#ifndef __XTRFS_FILEOBJ_H__ -#define __XTRFS_FILEOBJ_H__ - -#include "filerw.h" -#include "fileops.h" - -struct fobj_payload { - enum filerw_op op; /*!< Operation (read/write) */ - int fobj_id; /*!< File object ID */ - loff_t offset; /*!< offset in the file object */ - size_t size; /*!< transfer size (bytes) */ - size_t rsize; /*!< real transfer size (as return value) */ - void *buffer; /*!< pointer to buffer for data */ - struct user_file *fd; /*!< file descriptor of open file */ - int use_cache; /*!< If set try to use cache for operation */ - int new_cache_entry; /*!< Create a new cache entry at the - end of the request. */ - struct fobj_cache_entry *fce; /*!< Cache entry associated with operation */ -}; - -struct fobj_result { - size_t num_bytes; - ssize_t new_size; - long epoch; -}; - -struct fobj_sobj_done_data { - int sobj_id; /*!< Id of sobj that just finished */ - loff_t offset; /*!< Offset within that (stripe-)object */ - size_t size; /*!< Number of bytes to read. */ - size_t num_bytes; /*!< Number of bytes that had been processed */ - ssize_t new_size; /*!< Eventually OSD tells us a new size... */ - long epoch; /*!< ... and epoch. */ - int error; /*!< Eventually there is an error code. */ -}; - -struct req *fobj_sobj_done_req(int sobj_id, - loff_t offset, size_t size, size_t num_bytes, - size_t new_size, long epoch, - struct req *parent); - - -/* fileobj related stubs (not worth creating a separate include file) */ - -void fobj_init(void); -void fobj_close(void); - -struct req *fobj_req_create(int type, int fobj_id, loff_t offset, - size_t size, void *buffer, struct user_file *fd, - int use_cache, - struct req *parent); - -extern struct work_queue *fobj_wq; - -void print_fobj_info(struct req *req); - -#endif diff --git a/client/src/fileops.h b/client/src/fileops.h deleted file mode 100644 index 36d28759d..000000000 --- a/client/src/fileops.h +++ /dev/null @@ -1,28 +0,0 @@ -// -// C++ Interface: fileops -// -// Description: -// -// -// Author: Matthias Hess , (C) 2008 -// -// Copyright: See COPYING file that comes with this distribution -// -// - -#ifndef __XTRFS_FILEOPS_H__ -#define __XTRFS_FILEOPS_H__ - -enum filerw_op { - OP_FILERW_READ = 0, - OP_FILERW_WRITE, - OP_FILERW_DELETE -}; - -extern char *frwop_name[]; - -#ifdef __MINGW32__ -typedef long long loff_t; -#endif - -#endif diff --git a/client/src/filerw.c b/client/src/filerw.c deleted file mode 100644 index 07edac068..000000000 --- a/client/src/filerw.c +++ /dev/null @@ -1,382 +0,0 @@ -/* Copyright (c) 2007, 2008 Erich Focht, Matthias Hess - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/** - * File R/W stage - * - * Read/write requests on the full file are splitted into file object - * requests and submitted to the next processing stage. - * - * @author Erich Focht - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "request.h" -#include "workqueue.h" -#include "filerw.h" -#include "fileops.h" -#include "file.h" -#include "logger.h" - -#ifdef ITAC -#include -#endif - -// #include "fileobj.h" - -char *frwop_name[] = { - [REQ_FILERW_READ] = "FILERW_READ", - [REQ_FILERW_WRITE] = "FILERW_WRITE", - [REQ_FILERW_FOBJ_DONE] = "FILERW_FOBJ_DONE" }; - -struct work_queue *filerw_wq; -struct work_queue *client_wq; - -static void filerw_handle(struct req *req); -static void filerw_finish(struct req *req); -static void filerw_fobj_done(struct req *req); - -static struct filerw_fobj_done_data * -filerw_fobj_done_data_new(int fobj_id, - int offset, - int num_bytes, - ssize_t new_size, - long epoch) -{ - struct filerw_fobj_done_data *rv = NULL; - - rv = (struct filerw_fobj_done_data *)malloc(sizeof(struct filerw_fobj_done_data)); - if (rv) { - rv->fobj_id = fobj_id; - rv->offset = offset; - rv->num_bytes = num_bytes; - rv->new_size = new_size; - rv->epoch = epoch; - } - - return rv; -} - -static void filerw_fobj_done_data_delete(void *data) -{ - free(data); -} - -static void filerw_payload_delete(void *p) -{ - free(p); -} - -static void filerw_response_delete(void *r) -{ - free(r); -} - - -/** - * Create a filerw request. - * - * @param type Type of request. Can be either - * REQ_FILERW_READ{_FINISH} for read operations or - * REQ_FILERW_WRITE{_FINISH} for write operations. - * @param offset Offset in file - * @param size Number of bytes to either read or write. - * @param buffer Buffer to write to (read operation) or read from - * (write op.) - * @param fd User file to operate on - * @param bytes Pointer to the response data. - * @param parent Parent request, NULL if no parent. - */ -struct req *filerw_req_create(int type, - loff_t offset, size_t size, - void *buffer, struct user_file *fd, - size_t *bytes, - struct req *parent) -{ - struct req *req = NULL; - struct filerw_payload *p; - struct filerw_response *r; - int err = 0; - - p = (struct filerw_payload *)malloc(sizeof(struct filerw_payload)); - if (!p) { - err_msg("Failed to allocate payload struct\n"); - err = 1; - goto out; - } - p->offset = offset; - p->size = size; - p->buffer = buffer; - p->fd = fd; - - r = (struct filerw_response *)malloc(sizeof(struct filerw_response)); - if (!r) { - err_msg("Failed to allocate response structure.\n"); - err = 2; - goto out; - } - r->bytes_ptr = bytes; - r->new_size = -1; - r->epoch = -1; - - req = req_create(type, (void *)p, (void *)r, parent); - if (!req) { - err_msg("Could not create filerw request!\n"); - goto out; - } - dbg_msg("***** Creating filerw request %p with size %ld and offset %lld *****\n", - req, p->size, p->offset); - - req->del_data = filerw_payload_delete; - req->del_result = filerw_response_delete; - - out: - return req; -} - -/** - * Create a filerw_fobj_done request. - * - */ -struct req *filerw_fobj_done_req(int fobj_id, int offset, int num_bytes, - ssize_t new_size, long epoch, - struct req *parent) -{ - struct req *req = NULL; - struct filerw_fobj_done_data *data = NULL; - - data = filerw_fobj_done_data_new(fobj_id, offset, num_bytes, - new_size, epoch); - if (!data) - goto out; - - req = req_create(REQ_FILERW_FOBJ_DONE, (void *)data, NULL, parent); - if (!req) { - err_msg("Could not create filerw_fobj_done request!\n"); - goto out; - } - dbg_msg("**** Creating filerw_fobj_done request %p ****", req); - req->del_data = filerw_fobj_done_data_delete; - req->del_result = NULL; - -out: - return req; -} - -/** - * File R/W handler for the first part of the work. - * - * - split request into per fileobject subrequests - * - submit the per fileobject requests to the fileobj_wq - * - * This is a single threaded queue, so we don't worry about locking - * and order of operations. - */ -static void filerw_handle(struct req *req) -{ - struct filerw_payload *p = (struct filerw_payload *)req->data; - struct file_replica *replica = p->fd->file; - size_t stripe_size = replica->sp.stripe_size; - size_t osize; - size_t count = p->size; - loff_t head = p->offset; - loff_t ohead; - char *obuff = (char *)p->buffer; - int fobj, err = 0; - int num_objs; - int fobj_type; - -#ifdef ITAC - VT_begin(itac_filerw_handle_hdl); -#endif - - dbg_msg("filerw_handle start\n"); - dbg_msg("Request %p use count: %d\n", req, atomic_read(&req->use_count)); - - fobj = (int)(head / stripe_size); - num_objs = 0; - - while (count > 0 && req_state(req) != REQ_STATE_ERROR) { - struct req *r; - - ohead = head % stripe_size; - osize = min(stripe_size - ohead, count); - - dbg_msg("head=%lld fobj=%d ohead=%lld osize=%ld, count=%ld\n", head, fobj, ohead, osize, count); - // - // submit fobj child request! - // - if (req->type == REQ_FILERW_READ) - fobj_type = REQ_FOBJ_READ; - if (req->type == REQ_FILERW_WRITE) - fobj_type = REQ_FOBJ_WRITE; - - dbg_msg("Creating fobj request with type 0x%x\n", fobj_type); - r = fobj_req_create(fobj_type, fobj, ohead, osize, obuff, - p->fd, 0, req); - if (r) { - atomic_inc(&req->active_children); - submit_request(fobj_wq, r); - } - else - err = -ENOMEM; - - head += osize; - count -= osize; - obuff += osize; - fobj++; - num_objs++; - } - dbg_msg("Req %p after children creation: Use count = %d Active children = %d\n", - req, atomic_read(&req->use_count), - atomic_read(&req->active_children)); - - /* err_msg("Created %d fobjs\n", num_objs); */ - dbg_msg("filerw_handle end, err=%d\n", err); - -#ifdef ITAC - VT_end(itac_filerw_handle_hdl); -#endif -} - -/** - * File R/W handler for the second part of the work. This is the continuation - * of the filerw_handle work. - * - * Each finishing child request will generate one of these. - * - * This is a single threaded queue, so we don't worry about locking - * and order of operations. - */ -void filerw_fobj_done(struct req *req) -{ - struct filerw_fobj_done_data *data = - (struct filerw_fobj_done_data *)req->data; - struct req *frw_req = req->parent; - struct filerw_payload *pd = NULL; - struct filerw_response *resp = NULL; - - if (!frw_req) { - err_msg("No parent!\n"); - finish_request(req); - return; - } - - dbg_msg("fobj child-req of %p finished. Req uc=%d ac=%d\n", - frw_req, atomic_read(&frw_req->use_count), - atomic_read(&frw_req->active_children)); - - resp = frw_req->result; - pd = (struct filerw_payload *)frw_req->data; - - /* Check if we have to update the new size and epoch field of - the parents response. */ - if (data->epoch != -1) { - if ( (data->new_size > resp->new_size && data->epoch == resp->epoch) - || (data->epoch > resp->epoch)) { - resp->epoch = data->epoch; - resp->new_size = data->new_size; - } - dbg_msg("Size now: %ld (%ld)\n", (long)resp->new_size, (long)data->new_size); - } - *(resp->bytes_ptr) += data->num_bytes; - - if (req->error) { - dbg_msg("error = %d\n", req->error); - frw_req->error = req->error; - } - - /* And now we can finish the original filerw request, if last child */ - if (atomic_dec_return(&frw_req->active_children) == 0) { - struct filerw_payload *data = (struct filerw_payload *)frw_req->data; - struct filerw_response *resp = (struct filerw_response *)frw_req->result; - struct fileid_struct *fileid = data->fd->file->fileid_s; - - dbg_msg("Finishing filerw i/o request %p\n", frw_req); - dbg_msg("Epoch: %ld\n", resp->epoch); - dbg_msg("New size: %d\n", (int)resp->new_size); - dbg_msg("Filerw-req use count: %d\n", atomic_read(&frw_req->use_count)); - - if (resp->epoch != -1 && resp->new_size != -1) { - /* Need a file size update? */ - if ((resp->epoch > fileid->sz.epoch) || - (resp->epoch == fileid->sz.epoch && - resp->new_size > fileid->sz.size)) { - dbg_msg("Setting new file size %ld (old size %ld).\n", - resp->new_size, fileid->sz.size); - fileid->sz.size = resp->new_size; - /* atomic_set(&fileid->sz.order, data->order); */ - fileid->sz.epoch = resp->epoch; - /* Indicate that we must send it to the MRC... */ - atomic_set(&fileid->sz.needs_updating, 1); - } - } - finish_request(frw_req); - } else - dbg_msg("Req %p still has %d children\n", frw_req, - atomic_read(&frw_req->active_children)); - - /* This request (fobj done) is no longer needed and can be finished. */ - finish_request(req); -} - -void filerw_init(void) -{ - /* filerw must be single threaded */ - filerw_wq = workqueue_new("filerw", 1); - if (!filerw_wq) { - err_msg("Failed to create filerw workqueue!\n"); - exit(-ENOMEM); - } - workqueue_add_func(filerw_wq, REQ_FILERW_READ, filerw_handle); - workqueue_add_func(filerw_wq, REQ_FILERW_WRITE, filerw_handle); - workqueue_add_func(filerw_wq, REQ_FILERW_FOBJ_DONE, filerw_fobj_done); -} - -void filerw_close(void) -{ - if (filerw_wq) - workqueue_del(filerw_wq); -} - -/** - * Dump info on one filerw request to log. - * - * @param req pointer to request to be shown - */ -void print_filerw_info(struct req *req) -{ - struct filerw_payload *p = (struct filerw_payload *)req->data; - - info_msg("state=%s offs=%ld size=%ld buffer=%p fileid=%s\n", - reqstate_name[req->state], - p->offset, p->size, p->buffer, UFILEID(p->fd)); -} diff --git a/client/src/filerw.h b/client/src/filerw.h deleted file mode 100644 index 1abb844c0..000000000 --- a/client/src/filerw.h +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (c) 2007, 2008 Erich Focht, Matthias Hess - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#ifndef __XTRFS_FILERW_H__ -#define __XTRFS_FILERW_H__ - -/** - \file filerw.h - - File read/write operations related definitions. - - @author Erich Focht - -*/ - -#include "file.h" -#include "fileobj.h" -#include "request.h" - -#ifndef min -#define min(a,b) (((a) < (b)) ? (a) : (b)) -#endif - -struct filerw_payload { - loff_t offset; /*!< offset in the full file */ - size_t size; /*!< transfer size (bytes) */ - void *buffer; /*!< pointer to buffer for data */ - struct user_file *fd; /*!< file descriptor of open file */ -}; - -struct filerw_response { - size_t *bytes_ptr; /*!< Pointer to result: number of bytes that - have actually been read or written */ - ssize_t new_size; - long epoch; -}; - -/** - * Payload for a filerw_fobj_done request (_finish handler). - */ -struct filerw_fobj_done_data { - int fobj_id; - int offset; - int num_bytes; - ssize_t new_size; - long epoch; -}; - -extern struct work_queue *filerw_wq; - -void filerw_init(void); -void filerw_close(void); - -struct req *filerw_req_create(int type, loff_t offset, size_t size, - void *buffer, struct user_file *fd, - size_t *tsize, struct req *parent); - -struct req *filerw_fobj_done_req(int fobj_id, int offset, int num_bytes, - ssize_t new_size, long epoch, - struct req *parent); - -void print_filerw_info(struct req *req); - - -#endif // __XTRFS_FILERW_H__ diff --git a/client/src/fobj_cache.c b/client/src/fobj_cache.c deleted file mode 100644 index 80dbb5bb1..000000000 --- a/client/src/fobj_cache.c +++ /dev/null @@ -1,356 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - * C Implementation: fobj_cache - * - * Description: - * - * - * Author: Matthias Hess , (C) 2007 - * - * Copyright: See COPYING file that comes with this distribution - * - */ - -#include -#include - -#include "fobj_cache.h" - -#include "lock_utils.h" -#include "logger.h" - -#ifndef ENTER -#define ENTER() dbg_msg("Entering.\n") -#endif - -#ifndef LEAVE -#define LEAVE() dbg_msg("Leaving.\n") -#endif - -inline void fobj_cache_entry_set_dirty(struct fobj_cache_entry *fce) -{ - fce->flags |= (1 << FOBJ_DIRTY_BIT); -} - -inline int fobj_cache_entry_is_dirty(struct fobj_cache_entry *fce) -{ - return (fce->flags & (1 << FOBJ_DIRTY_BIT)) != 0; -} - -inline int fobj_cache_entry_set_clean(struct fobj_cache_entry *fce) -{ - fce->flags = (fce->flags & ~(1 << FOBJ_DIRTY_BIT)); - return 0; -} - -/** - * Create a new entry for an object cache - */ -struct fobj_cache_entry *fobj_cache_entry_new(long idx, long obj_size) -{ - struct fobj_cache_entry *rv = NULL; - - ENTER(); - - rv = (struct fobj_cache_entry *)malloc(sizeof(*rv)); - if (!rv) - goto out; - - memset((void *)rv, 0, sizeof(*rv)); - rv->data = malloc(obj_size); - if (!rv->data) { - free(rv); - rv = NULL; - goto out; - } - rv->idx = idx; - INIT_LIST_HEAD(&rv->lru); - // pthread_spin_init(&rv->lock, PTHREAD_PROCESS_PRIVATE); -out: - LEAVE(); - return rv; -} - -void fobj_cache_entry_destroy(struct fobj_cache_entry *fce) -{ - free(fce->data); - // pthread_spin_destroy(&fce->lock); - free(fce); -} - -struct fobj_cache *fobj_cache_new(long obj_size) -{ - struct fobj_cache *rv = NULL; - - rv = (struct fobj_cache *)malloc(sizeof(*rv)); - if (!rv) - goto finish; - - rv->obj_size = obj_size; - spin_init(&rv->lru_lock, PTHREAD_PROCESS_PRIVATE); - spin_init(&rv->lock, PTHREAD_PROCESS_PRIVATE); - INIT_RADIX_TREE(&rv->entries, 0); - INIT_LIST_HEAD(&rv->lru); - rv->read_misses = 0; - rv->write_misses = 0; - rv->policy = FOBJ_CACHE_WRITE_THROUGH; - rv->expires = 0L; - rv->size = 0L; - rv->max_size = FOBJ_CACHE_INITIAL_SIZE; - -finish: - return rv; -} - -void fobj_cache_clear(struct fobj_cache *fc) -{ - struct list_head *iter; - - while (!list_empty(&fc->lru)) { - struct fobj_cache_entry *fce; - iter = fc->lru.next; - list_del(iter); - fce = container_of(iter, struct fobj_cache_entry, lru); - radix_tree_delete(&fc->entries, fce->idx); - fobj_cache_entry_destroy(fce); - } -} - -void fobj_cache_destroy(struct fobj_cache *fc) -{ - fobj_cache_clear(fc); - spin_destroy(&fc->lru_lock); - spin_destroy(&fc->lock); - free(fc); -} - -struct fobj_cache_entry *fobj_cache_create(struct fobj_cache *fc, long obj_num) -{ - struct fobj_cache_entry *rv = NULL; - - ENTER(); - - if (fc->size + fc->obj_size < fc->max_size) { - rv = fobj_cache_entry_new(obj_num, fc->obj_size); - if (!rv) - goto finish; - if (radix_tree_insert(&fc->entries, obj_num, (void *)rv)) { - err_msg("Cannot insert cache entry into radix tree!\n"); - fobj_cache_entry_destroy(rv); - rv = NULL; - goto finish; - } - - spin_lock(&fc->lru_lock); - list_add_tail(&rv->lru, &fc->lru); - spin_unlock(&fc->lru_lock); - - dbg_msg("Successfully created cache entry.\n"); - } - -finish: - LEAVE(); - return rv; -} - -struct fobj_cache_entry *fobj_cache_get(struct fobj_cache *fc, long obj_num) -{ - struct fobj_cache_entry *rv = NULL; - time_t now = time(NULL); - - ENTER(); - now = 0L; - - if (now <= fc->expires) { - rv = (struct fobj_cache_entry *)radix_tree_lookup(&fc->entries, obj_num); - } else - dbg_msg("Cache has expired.\n"); - - LEAVE(); - return rv; -} - -/** - * Read a file object from the cache. - * @param fc File cache to search in - * @param obj_num Object number - * @param err Pointer to an error variable - * @return NULL if object has not been found or cache is invalid - * The data contained in the cache otherwise. - */ -struct fobj_cache_entry *fobj_cache_read(struct fobj_cache *fc, - long obj_num, - int *err) -{ - struct fobj_cache_entry *fce = NULL; - - ENTER(); - - *err = 0; - fce = fobj_cache_get(fc, obj_num); - if (!fce) - goto finish; - - dbg_msg("Found cache entry at %X\n", fce); - - /* Update access time and lru */ - fce->atime = time(NULL); - dbg_msg("Trying to acquire log.\n"); - spin_lock(&fc->lru_lock); - info_msg("List before removal:\n"); - fobj_cache_print_lru(fc); - list_del(&fce->lru); - INIT_LIST_HEAD(&fce->lru); - list_add_tail(&fce->lru, &fc->lru); - dbg_msg("List after insertion.\n"); - fobj_cache_print_lru(fc); - spin_unlock(&fc->lru_lock); -finish: - LEAVE(); - return fce; -} - -/** - * Write data to the file object cache. - * The user of this function must make sure he is allowed to store data - * in the cache, i.e. the OSDs must have given write caching permission - * before. - * @param fc Cache to write to - * @param obj_num Object number to write - * @param data Data to be written into the cache. - * @return 0 if successful, error code otherwise: - * 1 No more space in cache -> needs removing of old entries - */ -struct fobj_cache_entry *fobj_cache_write(struct fobj_cache *fc, - long obj_num, - void *data, - int *err) -{ - struct fobj_cache_entry *fce = NULL; - int is_new = 0; - time_t now = time(NULL); - - ENTER(); - - trace_msg("Try to write to cache.\n"); - - *err = 0; - now = 0L; - - if (now > fc->expires) { - *err = 2; - dbg_msg("Cache has expired.\n"); - goto finish; - } - - fce = fobj_cache_get(fc, obj_num); - if (!fce) { /* Entry noy found, add to cache */ - if (fc->size + fc->obj_size < fc->max_size) { - fce = fobj_cache_create(fc, obj_num); - if (!fce) { - *err = -ENOMEM; - goto finish; - } - memcpy(fce->data, data, fc->obj_size); - is_new = 1; - } else { - dbg_msg("Cache full!\n"); - *err = 1; - goto finish; - } - } - - /* Mark entry as dirty */ - fobj_cache_entry_set_dirty(fce); - - fce->atime = time(NULL); - dbg_msg("Trying to acquire lock.\n"); - spin_lock(&fc->lru_lock); - dbg_msg("List before removal:\n"); - fobj_cache_print_lru(fc); - list_del(&fce->lru); - INIT_LIST_HEAD(&fce->lru); - list_add_tail(&fce->lru, &fc->lru); - dbg_msg("List afrer insertion.\n"); - fobj_cache_print_lru(fc); - spin_unlock(&fc->lru_lock); -finish: - LEAVE(); - return fce; -} - -struct fobj_cache_entry *fobj_cache_write_partial(struct fobj_cache *fc, - long obj_num, - off_t off, - size_t size, - void *data, - int *err) -{ - struct fobj_cache_entry *rv = NULL; - char *buf; - - /* Check if by any chance we are still writing whole objects */ - if (off == 0L && size == fc->obj_size) - return fobj_cache_write(fc, obj_num, data, err); - - rv = fobj_cache_get(fc, obj_num); - if (!rv) - rv = fobj_cache_create(fc, obj_num); - if (!rv) - goto finish; - - buf = (char *)rv->data; - memcpy((void *)&buf[off], data, size); - -finish: - return rv; -} - - -/** - * Mark an object in the cache as dirty. - */ -void fobj_cache_set_dirty(struct fobj_cache *fc, long obj_num) -{ -} - -/** - * Clear dirty bit in an cache entry. - */ -void fobj_cache_set_clean(struct fobj_cache *fc, long obj_num) -{ -} - -void fobj_cache_print_lru(struct fobj_cache *fc) -{ - struct list_head *iter; - - list_for_each(iter, &fc->lru) { - struct fobj_cache_entry *fce; - fce = container_of(iter, struct fobj_cache_entry, lru); - info_msg("%ld: %ld\n", fce->idx, fce->atime); - } -} diff --git a/client/src/fobj_cache.h b/client/src/fobj_cache.h deleted file mode 100644 index efc972ddf..000000000 --- a/client/src/fobj_cache.h +++ /dev/null @@ -1,117 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - C Interface: file_obj_cache - - Description: - - - Author: Matthias Hess , (C) 2007 - - Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_FOBJ_CACHE_H__ -#define __XTRFS_FOBJ_CACHE_H__ - -#define FOBJ_DIRTY_BIT 0 - -#include -#include -#include - -#include "radix-tree.h" -#include "list.h" -#include "lock_utils.h" - -#define FOBJ_CACHE_INITIAL_SIZE (5*1024*1024) - -struct fobj_cache_entry { - int flags; - time_t atime; /*!< Last access time of this entry */ - void *data; /*!< Data contained in the entry */ - long idx; /*!< For inverse mapping from cache entry - to object id. This is needed for cache - flushing, for instance. */ - struct list_head lru; -}; - -struct fobj_cache_entry *fobj_cache_entry_new(long idx, long obj_size); -void fobj_cache_entry_destroy(struct fobj_cache_entry *fce); - -void fobj_cache_entry_set_dirty(struct fobj_cache_entry *fce); -int fobj_cache_entry_is_dirty(struct fobj_cache_entry *fce); -int fobj_cache_entry_set_clean(struct fobj_cache_entry *fce); - -enum fobj_cache_policy { - FOBJ_CACHE_WRITE_THROUGH=0, - FOBJ_CACHE_WRITE_BACK -}; - -struct fobj_cache { - long obj_size; /*!< Size of objects in cache */ - struct radix_tree_root entries; - struct list_head lru; - spinlock_t lru_lock; - spinlock_t lock; - long read_misses; - long write_misses; - enum fobj_cache_policy policy; - time_t expires; /*! Expiry time of this cache */ -// int enabled; /*!< Cache switched on? */ - size_t size; - size_t max_size; -}; - -struct fobj_cache *fobj_cache_new(long obj_size); -void fobj_cache_destroy(struct fobj_cache *fc); - -struct fobj_cache_entry *fobj_cache_create(struct fobj_cache *fc, long obj_num); - -struct fobj_cache_entry *fobj_cache_get(struct fobj_cache *fc, long obj_num); - -struct fobj_cache_entry *fobj_cache_read(struct fobj_cache *fc, - long obj_num, - int *err); -struct fobj_cache_entry *fobj_cache_write(struct fobj_cache *fc, - long obj_num, - void *data, - int *err); -struct fobj_cache_entry *fobj_cache_write_partial(struct fobj_cache *fc, - long obj_num, - off_t off, - size_t size, - void *data, - int *err); -int fobj_cache_flush(struct fobj_cache *fc); - -void fobj_cache_set_dirty(struct fobj_cache *fc, long obj_num); -int fobj_cache_is_dirty(struct fobj_cache *fc, long obj_num); -void fobj_cache_set_clean(struct fobj_cache *fc, long obj_num); - -void fobj_cache_print_lru(struct fobj_cache *fc); - -#endif diff --git a/client/src/hashtable.c b/client/src/hashtable.c deleted file mode 100644 index 74ac184c4..000000000 --- a/client/src/hashtable.c +++ /dev/null @@ -1,406 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: hashtable -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include - -#include - -#include "lock_utils.h" -#include "logger.h" - - -struct hash_table_entry * -hash_table_entry_new(void *key) -{ - struct hash_table_entry *rv = NULL; - - rv = (struct hash_table_entry *)malloc(sizeof(struct hash_table_entry)); - if(rv != NULL && hash_table_entry_init(rv, key) != 0) - hash_table_entry_delete(&rv); - - return rv; -} - -int -hash_table_entry_init(struct hash_table_entry *hte, void *key) -{ - INIT_LIST_HEAD(&hte->head); - hte->key = key; - spin_init(&hte->lock, PTHREAD_PROCESS_PRIVATE); - atomic_set(&hte->use_count, 0); - return 0; -} - -void hash_table_entry_del_content(struct hash_table_entry *hte) -{ - spin_destroy(&hte->lock); -} - -void -hash_table_entry_delete(struct hash_table_entry **hte) -{ - if(*hte) { - hash_table_entry_del_content(*hte); - free(*hte); - *hte = NULL; - } -} - - -struct hash_table * -hash_table_new(size_t initial_size, - hash_func *func, hash_cmp *cmp, hash_del *del) -{ - struct hash_table *rv = NULL; - - rv = (struct hash_table *)malloc(sizeof(struct hash_table)); - if(rv != NULL && hash_table_init(rv, initial_size, func, cmp, del) != 0) { - hash_table_delete(rv); - rv = NULL; - } - - return rv; -} - - -int -hash_table_init(struct hash_table *ht, size_t initial_size, - hash_func *func, hash_cmp *cmp, hash_del *del) -{ - int rv = 0; - int i; - - memset((void *)ht, 0, sizeof(struct hash_table)); - - ht->func = func; - ht->cmp = cmp; - ht->del_entry = del; - ht->size = initial_size; - ht->entries = (struct list_head *)malloc(sizeof(struct list_head) * ht->size); - if(ht->entries == NULL) { - rv = 1; - goto finish; - } - - ht->locks = (spinlock_t *)malloc(sizeof(spinlock_t) * ht->size); - if (!ht->locks) { - rv = 2; - goto finish; - } - - for(i=0; isize; i++) { - INIT_LIST_HEAD(&ht->entries[i]); - spin_init(&ht->locks[i], PTHREAD_PROCESS_PRIVATE); - } - -finish: - return rv; -} - - -/** - * Clear all entries in the hash table. - * This functions frees all memory occupied by the hash - * table. The caller has to make sure that noone - * still accesses this table. - */ -void -hash_table_clear(struct hash_table *ht) -{ - int i; - - if(ht->entries) { - free(ht->entries); - if (ht->locks) { - for (i=0; isize; i++) - spin_destroy(&ht->locks[i]); - free(ht->locks); - } - ht->entries = NULL; - } -} - - -void -hash_table_delete(struct hash_table *ht) -{ - int i; - - if(ht) { - hash_table_clear(ht); - for(i=0; isize; i++) - spin_destroy(&ht->locks[i]); - free(ht); - } -} - - -void -hash_table_flush(struct hash_table* ht) -{ - struct list_head *iter, *n; - int i; - - for(i=0; isize; i++) { - list_for_each_safe(iter, n, (struct list_head *)&ht->entries[i]) { - list_del(iter); - ht->del_entry((struct hash_table_entry*)iter); - } - } -} - - -hash_idx_t -hash_table_idx(struct hash_table *ht, void *key) -{ - hash_idx_t rv; - - rv = ht->func(key); - rv %= ht->size; - - return rv; -} - - -/** - * Lock the whole hash table. - * As this function should be rarely used and in order to - * circumvent double locks in the remaining functions that - * require locking of a single row, this function tries - * to lock all row locks. - * If one of the locking operations fails we release the previously - * acquired locks. But this is bad anyway and the program can - * probably not recover from this. - */ -int -hash_table_lock(struct hash_table *ht) -{ - int rv = 0; - int i; - - dbg_msg("Locking complete hash table.\n"); - - for(i=0; isize; i++) { - if (spin_lock(&ht->locks[i])) { - i--; - while(i >= 0) { - spin_unlock(&ht->locks[i]); - i--; - } - break; - } - } - - if (i != ht->size) - rv = 1; - - return rv; -} - - -/** - * Unlock the whole hash table. - * This is done by unlocking every row. If one of the unlocking - * operations does not succeed, the program cannot recover from this, - * as there will be no second try to unlock that failing row lock. - */ -int -hash_table_unlock(struct hash_table *ht) -{ - int rv = 0; - int i; - - dbg_msg("Unlocking hash table.\n"); - for(i=ht->size-1; i>=0; i--) - rv |= spin_unlock(&ht->locks[i]); - - return rv; -} - - -/** - * Lock the row corresponding to 'key'. - * As it is possible to lock each row within the table, it must - * be possible to lock a row corresponding to a key. - * Usually the caller does not (and should not!) know the - * row corresponding to the key. - */ -int -hash_table_lock_row(struct hash_table *ht, void *key) -{ - hash_idx_t idx = hash_table_idx(ht, key); - dbg_msg("Locking row %d of hash table.\n", idx); - return spin_lock(&ht->locks[idx]); -} - - -/** - * Release a lock of the row corr. to 'key'. - * This is the inverse function to 'hash_table_lock_row' - */ -int -hash_table_unlock_row(struct hash_table *ht, void *key) -{ - hash_idx_t idx = hash_table_idx(ht, key); - dbg_msg("Unlocking row %d of hash table.\n", idx); - return spin_unlock(&ht->locks[idx]); -} - - -int -hash_table_insert_entry(struct hash_table *ht, - struct hash_table_entry *hte, - int lock) -{ - int rv = 0; - hash_idx_t idx; - - idx = hash_table_idx(ht, hte->key); - - if(lock) - spin_lock(&ht->locks[idx]); - spin_lock(&hte->lock); - list_add((struct list_head *)hte, &ht->entries[idx]); - atomic_inc(&hte->use_count); /* Entry is now added to list. - it can only be deleted, if it - has been removed from that list. */ - spin_unlock(&hte->lock); - if(lock) - spin_unlock(&ht->locks[idx]); - - return rv; -} - - -/** - * Find an entry corresponding to 'key' in the hash table. - * If no such entry exists, NULL is returned. - * - * Usually the caller wants to manipulate the entry after - * finding them, so in order to keep the hash table consistent - * the corresponding table entry can be locked before with - * a call to 'hash_table_lock_row' before calling this function. - * (lock == 0). - * In another case the caller simply wants to check if an element - * is available and locking can be done inside this function. - * (lock==1) - */ -struct hash_table_entry * -hash_table_find(struct hash_table *ht, void *key, int lock) -{ - struct hash_table_entry *rv = NULL, *entry; - struct list_head *iter; - hash_idx_t idx; - - idx = hash_table_idx(ht, key); - - if (lock) - spin_lock(&ht->locks[idx]); - list_for_each(iter, (struct list_head *)&ht->entries[idx]) { - entry = (struct hash_table_entry *)iter; - if(ht->cmp(entry->key, key)) { - rv = entry; - break; - } - } - - if (rv) - atomic_inc(&rv->use_count); /* Entry is handed out */ - - if (lock) - spin_unlock(&ht->locks[idx]); - - return rv; -} - -void hash_table_remove_entry_by_key(struct hash_table *ht, - void *key) -{ - struct hash_table_entry *entry = NULL; - struct list_head *iter, *n; - hash_idx_t idx; - - idx = hash_table_idx(ht, key); - - spin_lock(&ht->locks[idx]); - list_for_each_safe(iter, n, (struct list_head *)&ht->entries[idx]) { - entry = (struct hash_table_entry *)iter; - spin_lock(&entry->lock); - if (ht->cmp(entry->key, key)) { - list_del(iter); - atomic_dec(&entry->use_count); /* Entry is no longer in list. */ - if (atomic_read(&entry->use_count) <= 0) { - spin_unlock(&entry->lock); - ht->del_entry(entry); - break; - } - } - spin_unlock(&entry->lock); - } - spin_unlock(&ht->locks[idx]); -} - -void hash_table_remove_entry(struct hash_table *ht, - struct hash_table_entry *hte) -{ - struct hash_table_entry *entry = NULL; - struct list_head *iter, *n; - hash_idx_t idx; - - idx = hash_table_idx(ht, hte->key); - - spin_lock(&ht->locks[idx]); - list_for_each_safe(iter, n, (struct list_head *)&ht->entries[idx]) { - entry = (struct hash_table_entry *)iter; - spin_lock(&entry->lock); - if (ht->cmp(entry->key, hte->key)) { - if (entry == hte) { - list_del(iter); - atomic_dec(&entry->use_count); - if (atomic_read(&entry->use_count) <= 0) { - spin_unlock(&entry->lock); - ht->del_entry(entry); - break; - } - } else { - dbg_msg("Double entry for key '%s'\n", hte->key); - } - } - spin_unlock(&entry->lock); - } - spin_unlock(&ht->locks[idx]); -} diff --git a/client/src/hashtable.h b/client/src/hashtable.h deleted file mode 100644 index 82d0faf24..000000000 --- a/client/src/hashtable.h +++ /dev/null @@ -1,142 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -C Interface: hashtable - -Description: - - -Author: Matthias Hess , (C) 2007 - -Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef _HASHTABLE_H -#define _HASHTABLE_H - -#include -#include - -#include - -#include - -#include - - -typedef int hash_idx_t; - -struct hash_table_entry { - struct list_head head; - void *key; - spinlock_t lock; - atomic_t use_count; -}; - -typedef hash_idx_t hash_func(void *key); /*!< Hash function prototype */ -typedef int hash_cmp(void *key1, void *key2); /*!< Hash compare function */ -typedef void hash_del(struct hash_table_entry *entry); /*!< How to delete an entry */ - -extern struct hash_table_entry *hash_table_entry_new(void *key); -extern int hash_table_entry_init(struct hash_table_entry *hte, void *key); -extern void hash_table_entry_del_content(struct hash_table_entry *hte); -extern void hash_table_entry_delete(struct hash_table_entry **hte); - -struct hash_table { - hash_func *func; - hash_cmp *cmp; - hash_del *del_entry; - size_t size; /*!< Number of 'list_heads' in table */ - spinlock_t *locks; - struct list_head *entries; /*!< Entries of hash table */ -}; - -extern struct hash_table *hash_table_new(size_t initial_size, - hash_func *func, - hash_cmp *cmp, - hash_del *del); -extern int hash_table_init(struct hash_table *ht, - size_t initial_size, - hash_func *func, - hash_cmp *cmp, - hash_del *del); -extern void hash_table_clear(struct hash_table *ht); -extern void hash_table_delete(struct hash_table *ht); -extern void hash_table_flush(struct hash_table* ht); - -extern int hash_table_lock(struct hash_table *ht); -extern int hash_table_unlock(struct hash_table *ht); - -extern int hash_table_lock_row(struct hash_table *ht, void *key); -extern int hash_table_unlock_row(struct hash_table *ht, void *key); - -extern int hash_table_insert_entry(struct hash_table *ht, - struct hash_table_entry *hte, - int lock); -extern void hash_table_remove_entry(struct hash_table *ht, - struct hash_table_entry *hte); - -extern int hash_table_delete_entry(struct hash_table *ht, void *key); -extern struct hash_table_entry *hash_table_find(struct hash_table *ht, void *key, int lock); - - -struct hash_table_iter { - int idx; - struct list_head *list_iter; -}; - -static inline int hash_table_iter_inc(struct hash_table_iter *hti, struct hash_table *ht) -{ - int rv = 1; - - hti->list_iter = hti->list_iter->next; - while(hti->list_iter == &ht->entries[hti->idx]) { - hti->idx++; - if(hti->idx >= ht->size) { - rv = 0; - break; - } else - hti->list_iter = ht->entries[hti->idx].next; - } - - return rv; -} - -static inline void hash_table_iter_set(struct hash_table_iter *hti, struct hash_table *ht) -{ - hti->idx = 0; - hti->list_iter = &ht->entries[0]; - hash_table_iter_inc(hti, ht); -} - -/* Iterate through a hash table */ -#define ht_for_each(it, ht) \ - for (hash_table_iter_set(&it, ht); \ - it.idx<(ht)->size-1 || (it.idx==(ht)->size-1 && it.list_iter != &(ht)->entries[(ht)->size-1]); \ - hash_table_iter_inc(&it, ht)) - - -#endif diff --git a/client/src/kernel_substitutes.h b/client/src/kernel_substitutes.h deleted file mode 100644 index 808150e9c..000000000 --- a/client/src/kernel_substitutes.h +++ /dev/null @@ -1,39 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Barcelona Supercomputing - Center - Centro Nacional de Supercomputacion - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/** Header file for dealing with portability issues related - * to assembler atomic instructions - */ - -#if defined(__i386__) || defined(__x86_64__) -#include "kernel_substitutes_x86.h" -#elif defined(__arm__) -#include "kernel_substitutes_arm.h" -#elif defined(__powerpc__) -#include "kernel_substitutes_ppc.h" -#else -#error "Architecture not supported" -#endif - diff --git a/client/src/kernel_substitutes_arm.h b/client/src/kernel_substitutes_arm.h deleted file mode 100644 index f348a689a..000000000 --- a/client/src/kernel_substitutes_arm.h +++ /dev/null @@ -1,120 +0,0 @@ -/* Copyright (c) 2007, 2008 Barcelona Supercomputing Center - - Centro Nacional de Supercomputacion - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - - -#ifndef KERNEL_SUBSTITUTES_ARM_H -#define KERNEL_SUBSTITUTES_ARM_H - -// -// WARNING: This stuff is architecture dependent!!! -// - -#ifdef CONFIG_SMP -#error SMP is NOT supported -#endif - -/* - * Save the current interrupt enable state & disable IRQs - */ -#define local_irq_save(x) \ - do { \ - unsigned long temp; \ - __asm__ __volatile__( \ -" mov %0, pc @ save_flags_cli\n" \ -" orr %1, %0, #0x08000000\n" \ -" and %0, %0, #0x0c000000\n" \ -" teqp %1, #0\n" \ - : "=r" (x), "=r" (temp) \ - : \ - : "memory"); \ - } while (0) - - -/* - * restore saved IRQ & FIQ state - */ -#define local_irq_restore(x) \ - do { \ - unsigned long temp; \ - __asm__ __volatile__( \ -" mov %0, pc @ restore_flags\n" \ -" bic %0, %0, #0x0c000000\n" \ -" orr %0, %0, %1\n" \ -" teqp %0, #0\n" \ - : "=&r" (temp) \ - : "r" (x) \ - : "memory"); \ - } while (0) - - - - -typedef struct { int counter; } atomic_t; - - -#define ATOMIC_INIT(i) { (i) } - -/** - * atomic_read - read atomic variable - * @v: pointer of type atomic_t - * - * Atomically reads the value of @v. - */ -#define atomic_read(v) ((v)->counter) - -/** - * atomic_set - set atomic variable - * @v: pointer of type atomic_t - * @i: required value - * - * Atomically sets the value of @v to @i. - */ -#define atomic_set(v,i) (((v)->counter) = (i)) - -static __inline__ int atomic_add_return(int i, atomic_t *v) -{ - unsigned long flags; - int val; - - local_irq_save(flags); - val = v->counter; - v->counter = val += i; - local_irq_restore(flags); - - return val; -} - -static __inline__ int atomic_sub_return(int i, atomic_t *v) -{ - return atomic_add_return(-i,v); -} - -#define atomic_inc(v) (void) atomic_add_return(1, v) -#define atomic_dec(v) (void) atomic_sub_return(1, v) -#define atomic_inc_return(v) (atomic_add_return(1,v)) -#define atomic_dec_return(v) (atomic_sub_return(1,v)) - - -#endif diff --git a/client/src/kernel_substitutes_ppc.h b/client/src/kernel_substitutes_ppc.h deleted file mode 100644 index 9c775fedd..000000000 --- a/client/src/kernel_substitutes_ppc.h +++ /dev/null @@ -1,493 +0,0 @@ -/* This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - * PowerPC atomic operations - */ - -#ifndef __XTRFS_KERNEL_SUBSTITUTES_PPC_H__ -#define __XTRFS_KERNEL_SUBSTITUTES_PPC_H__ - -#ifdef CONFIG_IBM405_ERR77 -/* Erratum #77 on the 405 means we need a sync or dcbt before every - * stwcx. The old ATOMIC_SYNC_FIX covered some but not all of this. - */ -#define PPC405_ERR77(ra,rb) stringify_in_c(dcbt ra, rb;) -#define PPC405_ERR77_SYNC stringify_in_c(sync;) -#else -#define PPC405_ERR77(ra,rb) -#define PPC405_ERR77_SYNC -#endif - -#ifdef CONFIG_SMP -#define ISYNC_ON_SMP "\n\tisync" -#define LWSYNC_ON_SMP __stringify(LWSYNC) "\n" -#else -#define ISYNC_ON_SMP -#define LWSYNC_ON_SMP -#endif - - -typedef struct { volatile int counter; } atomic_t; - -#define ATOMIC_INIT(i) { (i) } - -#define atomic_read(v) ((v)->counter) -#define atomic_set(v,i) (((v)->counter) = (i)) - -static __inline__ void atomic_add(int a, atomic_t *v) -{ - int t; - - __asm__ __volatile__( -"1: lwarx %0,0,%3 # atomic_add\n\ - add %0,%2,%0\n" - PPC405_ERR77(0,%3) -" stwcx. %0,0,%3 \n\ - bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (a), "r" (&v->counter) - : "cc"); -} - -static __inline__ int atomic_add_return(int a, atomic_t *v) -{ - int t; - - __asm__ __volatile__( - LWSYNC_ON_SMP -"1: lwarx %0,0,%2 # atomic_add_return\n\ - add %0,%1,%0\n" - PPC405_ERR77(0,%2) -" stwcx. %0,0,%2 \n\ - bne- 1b" - ISYNC_ON_SMP - : "=&r" (t) - : "r" (a), "r" (&v->counter) - : "cc", "memory"); - - return t; -} - -#define atomic_add_negative(a, v) (atomic_add_return((a), (v)) < 0) - -static __inline__ void atomic_sub(int a, atomic_t *v) -{ - int t; - - __asm__ __volatile__( -"1: lwarx %0,0,%3 # atomic_sub\n\ - subf %0,%2,%0\n" - PPC405_ERR77(0,%3) -" stwcx. %0,0,%3 \n\ - bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (a), "r" (&v->counter) - : "cc"); -} - -static __inline__ int atomic_sub_return(int a, atomic_t *v) -{ - int t; - - __asm__ __volatile__( - LWSYNC_ON_SMP -"1: lwarx %0,0,%2 # atomic_sub_return\n\ - subf %0,%1,%0\n" - PPC405_ERR77(0,%2) -" stwcx. %0,0,%2 \n\ - bne- 1b" - ISYNC_ON_SMP - : "=&r" (t) - : "r" (a), "r" (&v->counter) - : "cc", "memory"); - - return t; -} - -static __inline__ void atomic_inc(atomic_t *v) -{ - int t; - - __asm__ __volatile__( -"1: lwarx %0,0,%2 # atomic_inc\n\ - addic %0,%0,1\n" - PPC405_ERR77(0,%2) -" stwcx. %0,0,%2 \n\ - bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (&v->counter) - : "cc"); -} - -static __inline__ int atomic_inc_return(atomic_t *v) -{ - int t; - - __asm__ __volatile__( - LWSYNC_ON_SMP -"1: lwarx %0,0,%1 # atomic_inc_return\n\ - addic %0,%0,1\n" - PPC405_ERR77(0,%1) -" stwcx. %0,0,%1 \n\ - bne- 1b" - ISYNC_ON_SMP - : "=&r" (t) - : "r" (&v->counter) - : "cc", "memory"); - - return t; -} - -/* - * atomic_inc_and_test - increment and test - * @v: pointer of type atomic_t - * - * Atomically increments @v by 1 - * and returns true if the result is zero, or false for all - * other cases. - */ -#define atomic_inc_and_test(v) (atomic_inc_return(v) == 0) - -static __inline__ void atomic_dec(atomic_t *v) -{ - int t; - - __asm__ __volatile__( -"1: lwarx %0,0,%2 # atomic_dec\n\ - addic %0,%0,-1\n" - PPC405_ERR77(0,%2)\ -" stwcx. %0,0,%2\n\ - bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (&v->counter) - : "cc"); -} - -static __inline__ int atomic_dec_return(atomic_t *v) -{ - int t; - - __asm__ __volatile__( - LWSYNC_ON_SMP -"1: lwarx %0,0,%1 # atomic_dec_return\n\ - addic %0,%0,-1\n" - PPC405_ERR77(0,%1) -" stwcx. %0,0,%1\n\ - bne- 1b" - ISYNC_ON_SMP - : "=&r" (t) - : "r" (&v->counter) - : "cc", "memory"); - - return t; -} - -#define atomic_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) -#define atomic_xchg(v, new) (xchg(&((v)->counter), new)) - -/** - * atomic_add_unless - add unless the number is a given value - * @v: pointer of type atomic_t - * @a: the amount to add to v... - * @u: ...unless v is equal to u. - * - * Atomically adds @a to @v, so long as it was not @u. - * Returns non-zero if @v was not @u, and zero otherwise. - */ -static __inline__ int atomic_add_unless(atomic_t *v, int a, int u) -{ - int t; - - __asm__ __volatile__ ( - LWSYNC_ON_SMP -"1: lwarx %0,0,%1 # atomic_add_unless\n\ - cmpw 0,%0,%3 \n\ - beq- 2f \n\ - add %0,%2,%0 \n" - PPC405_ERR77(0,%2) -" stwcx. %0,0,%1 \n\ - bne- 1b \n" - ISYNC_ON_SMP -" subf %0,%2,%0 \n\ -2:" - : "=&r" (t) - : "r" (&v->counter), "r" (a), "r" (u) - : "cc", "memory"); - - return t != u; -} - -#define atomic_inc_not_zero(v) atomic_add_unless((v), 1, 0) - -#define atomic_sub_and_test(a, v) (atomic_sub_return((a), (v)) == 0) -#define atomic_dec_and_test(v) (atomic_dec_return((v)) == 0) - -/* - * Atomically test *v and decrement if it is greater than 0. - * The function returns the old value of *v minus 1, even if - * the atomic variable, v, was not decremented. - */ -static __inline__ int atomic_dec_if_positive(atomic_t *v) -{ - int t; - - __asm__ __volatile__( - LWSYNC_ON_SMP -"1: lwarx %0,0,%1 # atomic_dec_if_positive\n\ - cmpwi %0,1\n\ - addi %0,%0,-1\n\ - blt- 2f\n" - PPC405_ERR77(0,%1) -" stwcx. %0,0,%1\n\ - bne- 1b" - ISYNC_ON_SMP - "\n\ -2:" : "=&b" (t) - : "r" (&v->counter) - : "cc", "memory"); - - return t; -} - -#define smp_mb__before_atomic_dec() smp_mb() -#define smp_mb__after_atomic_dec() smp_mb() -#define smp_mb__before_atomic_inc() smp_mb() -#define smp_mb__after_atomic_inc() smp_mb() - -#ifdef __powerpc64__ - -typedef struct { volatile long counter; } atomic64_t; - -#define ATOMIC64_INIT(i) { (i) } - -#define atomic64_read(v) ((v)->counter) -#define atomic64_set(v,i) (((v)->counter) = (i)) - -static __inline__ void atomic64_add(long a, atomic64_t *v) -{ - long t; - - __asm__ __volatile__( -"1: ldarx %0,0,%3 # atomic64_add\n\ - add %0,%2,%0\n\ - stdcx. %0,0,%3 \n\ - bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (a), "r" (&v->counter) - : "cc"); -} - -static __inline__ long atomic64_add_return(long a, atomic64_t *v) -{ - long t; - - __asm__ __volatile__( - LWSYNC_ON_SMP -"1: ldarx %0,0,%2 # atomic64_add_return\n\ - add %0,%1,%0\n\ - stdcx. %0,0,%2 \n\ - bne- 1b" - ISYNC_ON_SMP - : "=&r" (t) - : "r" (a), "r" (&v->counter) - : "cc", "memory"); - - return t; -} - -#define atomic64_add_negative(a, v) (atomic64_add_return((a), (v)) < 0) - -static __inline__ void atomic64_sub(long a, atomic64_t *v) -{ - long t; - - __asm__ __volatile__( -"1: ldarx %0,0,%3 # atomic64_sub\n\ - subf %0,%2,%0\n\ - stdcx. %0,0,%3 \n\ - bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (a), "r" (&v->counter) - : "cc"); -} - -static __inline__ long atomic64_sub_return(long a, atomic64_t *v) -{ - long t; - - __asm__ __volatile__( - LWSYNC_ON_SMP -"1: ldarx %0,0,%2 # atomic64_sub_return\n\ - subf %0,%1,%0\n\ - stdcx. %0,0,%2 \n\ - bne- 1b" - ISYNC_ON_SMP - : "=&r" (t) - : "r" (a), "r" (&v->counter) - : "cc", "memory"); - - return t; -} - -static __inline__ void atomic64_inc(atomic64_t *v) -{ - long t; - - __asm__ __volatile__( -"1: ldarx %0,0,%2 # atomic64_inc\n\ - addic %0,%0,1\n\ - stdcx. %0,0,%2 \n\ - bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (&v->counter) - : "cc"); -} - -static __inline__ long atomic64_inc_return(atomic64_t *v) -{ - long t; - - __asm__ __volatile__( - LWSYNC_ON_SMP -"1: ldarx %0,0,%1 # atomic64_inc_return\n\ - addic %0,%0,1\n\ - stdcx. %0,0,%1 \n\ - bne- 1b" - ISYNC_ON_SMP - : "=&r" (t) - : "r" (&v->counter) - : "cc", "memory"); - - return t; -} - -/* - * atomic64_inc_and_test - increment and test - * @v: pointer of type atomic64_t - * - * Atomically increments @v by 1 - * and returns true if the result is zero, or false for all - * other cases. - */ -#define atomic64_inc_and_test(v) (atomic64_inc_return(v) == 0) - -static __inline__ void atomic64_dec(atomic64_t *v) -{ - long t; - - __asm__ __volatile__( -"1: ldarx %0,0,%2 # atomic64_dec\n\ - addic %0,%0,-1\n\ - stdcx. %0,0,%2\n\ - bne- 1b" - : "=&r" (t), "+m" (v->counter) - : "r" (&v->counter) - : "cc"); -} - -static __inline__ long atomic64_dec_return(atomic64_t *v) -{ - long t; - - __asm__ __volatile__( - LWSYNC_ON_SMP -"1: ldarx %0,0,%1 # atomic64_dec_return\n\ - addic %0,%0,-1\n\ - stdcx. %0,0,%1\n\ - bne- 1b" - ISYNC_ON_SMP - : "=&r" (t) - : "r" (&v->counter) - : "cc", "memory"); - - return t; -} - -#define atomic64_sub_and_test(a, v) (atomic64_sub_return((a), (v)) == 0) -#define atomic64_dec_and_test(v) (atomic64_dec_return((v)) == 0) - -/* - * Atomically test *v and decrement if it is greater than 0. - * The function returns the old value of *v minus 1. - */ -static __inline__ long atomic64_dec_if_positive(atomic64_t *v) -{ - long t; - - __asm__ __volatile__( - LWSYNC_ON_SMP -"1: ldarx %0,0,%1 # atomic64_dec_if_positive\n\ - addic. %0,%0,-1\n\ - blt- 2f\n\ - stdcx. %0,0,%1\n\ - bne- 1b" - ISYNC_ON_SMP - "\n\ -2:" : "=&r" (t) - : "r" (&v->counter) - : "cc", "memory"); - - return t; -} - -#define atomic64_cmpxchg(v, o, n) (cmpxchg(&((v)->counter), (o), (n))) -#define atomic64_xchg(v, new) (xchg(&((v)->counter), new)) - -/** - * atomic64_add_unless - add unless the number is a given value - * @v: pointer of type atomic64_t - * @a: the amount to add to v... - * @u: ...unless v is equal to u. - * - * Atomically adds @a to @v, so long as it was not @u. - * Returns non-zero if @v was not @u, and zero otherwise. - */ -static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u) -{ - long t; - - __asm__ __volatile__ ( - LWSYNC_ON_SMP -"1: ldarx %0,0,%1 # atomic_add_unless\n\ - cmpd 0,%0,%3 \n\ - beq- 2f \n\ - add %0,%2,%0 \n" -" stdcx. %0,0,%1 \n\ - bne- 1b \n" - ISYNC_ON_SMP -" subf %0,%2,%0 \n\ -2:" - : "=&r" (t) - : "r" (&v->counter), "r" (a), "r" (u) - : "cc", "memory"); - - return t != u; -} - -#define atomic64_inc_not_zero(v) atomic64_add_unless((v), 1, 0) - -#endif /* __powerpc64__ */ - -#endif - diff --git a/client/src/kernel_substitutes_x86.h b/client/src/kernel_substitutes_x86.h deleted file mode 100644 index cf38975ed..000000000 --- a/client/src/kernel_substitutes_x86.h +++ /dev/null @@ -1,150 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#ifndef KERNEL_SUBSTITUTES_H -#define KERNEL_SUBSTITUTES_H - -// -// WARNING: This stuff is architecture dependent!!! -// - -#ifdef CONFIG_SMP -#define LOCK_PREFIX \ - ".section .smp_locks,\"a\"\n" \ - " .align 4\n" \ - " .long 661f\n" /* address */ \ - ".previous\n" \ - "661:\n\tlock; " - -#else /* ! CONFIG_SMP */ -#define LOCK_PREFIX "" -#endif - - -typedef struct { int counter; } atomic_t; - - -#define ATOMIC_INIT(i) { (i) } - -/** - * atomic_read - read atomic variable - * @v: pointer of type atomic_t - * - * Atomically reads the value of @v. - */ -#define atomic_read(v) ((v)->counter) - -/** - * atomic_set - set atomic variable - * @v: pointer of type atomic_t - * @i: required value - * - * Atomically sets the value of @v to @i. - */ -#define atomic_set(v,i) (((v)->counter) = (i)) - - -/** - * atomic_inc - increment atomic variable - * @v: pointer of type atomic_t - * - * Atomically increments @v by 1. - */ -static __inline__ void atomic_inc(atomic_t *v) -{ - __asm__ __volatile__( - LOCK_PREFIX "incl %0" - :"+m" (v->counter)); -} - -/** - * atomic_dec - decrement atomic variable - * @v: pointer of type atomic_t - * - * Atomically decrements @v by 1. - */ -static __inline__ void atomic_dec(atomic_t *v) -{ - __asm__ __volatile__( - LOCK_PREFIX "decl %0" - :"+m" (v->counter)); -} - -/** - * atomic_add_return - add and return - * @i: integer value to add - * @v: pointer of type atomic_t - * - * Atomically adds @i to @v and returns @i + @v - */ -static __inline__ int atomic_add_return(int i, atomic_t *v) -{ - int __i = i; - __asm__ __volatile__( - LOCK_PREFIX "xaddl %0, %1;" - :"=r"(i) - :"m"(v->counter), "0"(i)); - return i + __i; -} - -static __inline__ int atomic_sub_return(int i, atomic_t *v) -{ - return atomic_add_return(-i,v); -} - -#define atomic_inc_return(v) (atomic_add_return(1,v)) -#define atomic_dec_return(v) (atomic_sub_return(1,v)) - - -/* Kernel substitutes for bit operations. */ -#define ADDR (*(volatile long *) addr) - -static __inline__ int constant_test_bit(int nr, const volatile unsigned long *addr) -{ - return ((1UL << (nr & 31)) & (addr[nr >> 5])) != 0; -} - -static inline int variable_test_bit(int nr, const volatile unsigned long * addr) -{ - int oldbit; - - __asm__ __volatile__( - "btl %2,%1\n\tsbbl %0,%0" - :"=r" (oldbit) - :"m" (ADDR),"Ir" (nr)); - return oldbit; -} - -#define test_bit(nr,addr) \ -(__builtin_constant_p(nr) ? \ - constant_test_bit((nr),(addr)) : \ - variable_test_bit((nr),(addr))) - -/* Kernel substitutes for memory related issues */ -#define __GFP_BITS_SHIFT 20 /* Room for 20 __GFP_FOO bits */ -#define __GFP_BITS_MASK ((gfp_t)((1 << __GFP_BITS_SHIFT) - 1)) - -typedef unsigned gfp_t; - -#endif diff --git a/client/src/lease.c b/client/src/lease.c deleted file mode 100644 index 2c988fcd6..000000000 --- a/client/src/lease.c +++ /dev/null @@ -1,179 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess - - Author: Matthias Hess - - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - -/* - C Implementation: lease - - Description: - */ - -#include -#include - -#include - -#include "lease.h" - -char *lease_ops_str[] = { - [LEASE_OP_UNDEFINED] = "undefined", - [LEASE_OP_READ] = "r", - [LEASE_OP_WRITE] = "w" -}; - -struct lease *lease_new(struct obj_set *os, time_t expires, int alloc) -{ - struct lease *rv = NULL; - - rv = (struct lease *)malloc(sizeof(struct lease)); - if (rv && lease_init(rv, os, expires, alloc)) { - lease_destroy(rv); - rv = NULL; - } - - return rv; -} - -int lease_init(struct lease *l, struct obj_set *os, time_t expires, int alloc) -{ - int err = 0; - - l->clientId = NULL; - l->leaseId = NULL; - l->fileId = NULL; - - /* Right now only a very simple object set is used. This will - change in the future. (Complex RAID level might require that) */ - l->obj_set = os; - - l->op = LEASE_OP_UNDEFINED; - l->expires = expires; - - l->alloc = alloc; - -out: - return err; -} - -/** - * Create a lease for one object id. - * - * @param obj_num Object id - * @param expires Time when this lease should expire - * - * @return New lease or NULL if lease cannot be created. - */ -struct lease *lease_new_num(int obj_num, time_t expires) -{ - struct lease *rv = NULL; - struct obj_set *os = NULL; - - os = obj_set_new_num(obj_num); - if (!os) - goto out; - - rv = lease_new(os, expires, 1); -out: - return rv; -} - -void lease_destroy(struct lease *l) -{ - if (l->alloc) - obj_set_destroy(l->obj_set); - free(l); -} - -/** - * Check if a lease is still valid - * - * @param l Lease to check - * - * @return 1 if lease is valid, 0 otherwise - */ -int lease_is_valid(struct lease *l) -{ - int rv = 1; /* For debugging 1, otherwise 0 */ - time_t now = time(NULL); - - if (!l) - goto out; - - rv = (now < l->expires ? 1 : 0); -out: - return rv; -} - -/** - * Convert a lease structure to a json object - * - * @param l Lease to convert - * - * @return New JSON object if object can be created, - * JSON error object or NULL if not. - */ -struct json_object *lease_to_json(struct lease *l) -{ - struct json_object *rv = NULL; - int start_num; - int end_num; - char *lease_op_str; - - rv = json_object_new_object(); - - json_object_object_add(rv, "clientId", json_object_new_string(l->clientId)); - json_object_object_add(rv, "leaseId", json_object_new_string(l->leaseId)); - json_object_object_add(rv, "fileId", json_object_new_string(l->fileId)); - - /* Right now we have no specific format for an object set, so we use the - information from that set and add it to the lease object. This is - likely to become a JSON object of its own. */ - start_num = l->obj_set->entries[0].start_num; - end_num = l->obj_set->entries[0].end_num; - - json_object_object_add(rv, "firstObject", json_object_new_int(start_num)); - json_object_object_add(rv, "lastObject", json_object_new_int(end_num)); - - json_object_object_add(rv, "expires", json_object_new_int(l->expires)); - lease_op_str = lease_ops_str[l->op]; - - json_object_object_add(rv, "operation", json_object_new_string(lease_op_str)); - - return rv; -} - -/** - * Convert a JSON object into a lease - * - * @param jo JSON object to convert - * - * @return New lease structure or NULL if an error occurred. - */ -struct lease *json_to_lease(struct json_object *jo) -{ - struct lease *rv = NULL; - - return rv; -} diff --git a/client/src/lease.h b/client/src/lease.h deleted file mode 100644 index a0b082bf6..000000000 --- a/client/src/lease.h +++ /dev/null @@ -1,71 +0,0 @@ -/* This file is part of the XtreemFS client. - - XtreemFS client 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. - - The XtreemFS client 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 XtreemFS client. If not, see . - */ - - -/* -C Interface: lease - -Description: - - -Author: Matthias Hess , (C) 2007 - -Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_LEASE_H__ -#define __XTRFS_LEASE_H__ - -#include -#include - -#include - -#include "obj_set.h" - -enum lease_ops { - LEASE_OP_UNDEFINED=0, - LEASE_OP_READ, - LEASE_OP_WRITE -}; - -extern char *lease_ops_str[]; - -struct lease { - char *clientId; - char *leaseId; - char *fileId; - struct obj_set *obj_set; - enum lease_ops op; - time_t expires; - int alloc; /*!< Indicates if object set has been - allocated internally (1) or - externally (0) */ -}; - -extern struct lease *lease_new(struct obj_set *os, time_t expires, int alloc); -extern int lease_init(struct lease *l, struct obj_set *os, time_t expires, int alloc); -extern void lease_destroy(struct lease *l); - -extern struct lease *lease_new_num(int obj_num, time_t expires); - -extern int lease_is_valid(struct lease *l); - -extern struct json_object *lease_to_json(struct lease *l); -extern struct lease *json_to_lease(struct json_object *jo); - -#endif diff --git a/client/src/list.h b/client/src/list.h deleted file mode 100644 index deffedd25..000000000 --- a/client/src/list.h +++ /dev/null @@ -1,175 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#ifndef __XTRFS_LIST_H__ -#define __XTRFS_LIST_H__ - -#ifdef __KERNEL__ - -#include - -#else // __KERNEL__ - -#include - -/** - * Generic list head. - * list_head stuff is actually taken from the kernel linux/list.h such that - * we will be able to replace it when moving into the kernel. - */ -struct list_head { - struct list_head *prev; - struct list_head *next; -}; - -#define LIST_HEAD_INIT(name) { &(name), &(name) } - -#define LIST_HEAD(name) \ - struct list_head name = LIST_HEAD_INIT(name) - -static inline void INIT_LIST_HEAD(struct list_head *list) -{ - list->next = list; - list->prev = list; -} - -/* - * Insert a new entry between two known consecutive entries. - * - * This is only for internal list manipulation where we know - * the prev/next entries already! - */ -static inline void __list_add(struct list_head *new, - struct list_head *prev, - struct list_head *next) -{ - next->prev = new; - new->next = next; - new->prev = prev; - prev->next = new; -} - -/** - * list_add - add a new entry - * @new: new entry to be added - * @head: list head to add it after - * - * Insert a new entry after the specified head. - * This is good for implementing stacks. - */ -static inline void list_add(struct list_head *new, struct list_head *head) -{ - __list_add(new, head, head->next); -} - -/** - * list_add_tail - add a new entry - * @new: new entry to be added - * @head: list head to add it before - * - * Insert a new entry before the specified head. - * This is useful for implementing queues. - */ -static inline void list_add_tail(struct list_head *new, struct list_head *head) -{ - __list_add(new, head->prev, head); -} - -/* - * Delete a list entry by making the prev/next entries - * point to each other. - * - * This is only for internal list manipulation where we know - * the prev/next entries already! - */ -static inline void __list_del(struct list_head * prev, struct list_head * next) -{ - next->prev = prev; - prev->next = next; -} - -/* - * These are non-NULL pointers that will result in page faults - * under normal circumstances, used to verify that nobody uses - * non-initialized list entries. - */ -#define LIST_POISON1 ((void *) 0x00100100) -#define LIST_POISON2 ((void *) 0x00200200) - -/** - * list_del - deletes entry from list. - * @entry: the element to delete from the list. - * Note: list_empty on entry does not return true after this, the entry is - * in an undefined state. - */ -static inline void list_del(struct list_head *entry) -{ - __list_del(entry->prev, entry->next); - entry->next = LIST_POISON1; - entry->prev = LIST_POISON2; -} - -/** - * list_empty - tests whether a list is empty - * @head: the list to test. - */ -static inline int list_empty(const struct list_head *head) -{ - return head->next == head; -} - -#define container_of(ptr, type, member) ({ \ - const typeof( ((type *)0)->member ) *__mptr = (ptr); \ - (type *)( (char *)__mptr - offsetof(type,member) );}) - -/** - * list_entry - get the struct for this entry - * @ptr: the &struct list_head pointer. - * @type: the type of the struct this is embedded in. - * @member: the name of the list_struct within the struct. - */ -#define list_entry(ptr, type, member) \ - container_of(ptr, type, member) - -/** - * list_for_each - iterate over a list - * @pos: the &struct list_head to use as a loop cursor. - * @head: the head for your list. - */ -#define list_for_each(pos, head) \ - for (pos = (head)->next; pos != (head); pos = pos->next) - -/** - * list_for_each_safe - iterate over a list safe against removal of list entry - * @pos: the &struct list_head to use as a loop cursor. - * @n: another &struct list_head to use as temporary storage - * @head: the head for your list. - */ -#define list_for_each_safe(pos, n, head) \ - for (pos = (head)->next, n = pos->next; pos != (head); \ - pos = n, n = pos->next) - -#endif // __KERNEL__ - -#endif // __XTRFS_LIST_H__ diff --git a/client/src/lock_utils.c b/client/src/lock_utils.c deleted file mode 100644 index a7af2fb1d..000000000 --- a/client/src/lock_utils.c +++ /dev/null @@ -1,143 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: lock_utils -* -* Description: -* -* -* Author: Matthias Hess , (C) 2008 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include - -#ifdef ITAC_SPIN -#include -#include -#endif - -#include "lock_utils.h" - -#ifdef ITAC_SPIN - -extern int itac_spin_class; - -int -itac_spin_init(spinlock_t *lock, int shared) -{ - int res; - char func_name[128]; - - res = pthread_spin_init(&lock->lock, shared); - - snprintf(func_name, 128, "lock_%d", lock->lock); - dbg_msg("%s\n", func_name); - VT_scopedef(func_name, itac_spin_class, VT_NOSCL, VT_NOSCL, &lock->lock_handle); - - snprintf(func_name, 128, "locked_%d", lock->lock); - dbg_msg("%s\n", func_name); - VT_scopedef(func_name, itac_spin_class, VT_NOSCL, VT_NOSCL, &lock->locked_handle); - - snprintf(func_name, 128, "unlock_%d", lock->lock); - dbg_msg("%s\n", func_name); - VT_scopedef("unlock", itac_spin_class, VT_NOSCL, VT_NOSCL, &lock->unlock_handle); - - return res; -} - -int -itac_spin_destroy(spinlock_t *lock) -{ - return pthread_spin_destroy(&lock->lock); -} - -int -itac_spin_lock(spinlock_t *lock) -{ - int res; - - VT_scopebegin(lock->lock_handle, VT_NOSCL, NULL); - res = pthread_spin_lock(&lock->lock); - VT_scopeend(lock->lock_handle, 0, VT_NOSCL); - VT_scopebegin(lock->locked_handle, VT_NOSCL, NULL); - - return res; -} - -int -itac_spin_unlock(spinlock_t *lock) -{ - int res; - - VT_scopebegin(lock->unlock_handle, VT_NOSCL, NULL); - res = pthread_spin_unlock(&lock->lock); - VT_scopeend(lock->unlock_handle, 0, VT_NOSCL); - VT_scopeend(lock->locked_handle, 0, VT_NOSCL); - - return res; -} - - -#endif - - -int -log_spin_lock(spinlock_t *lock, char *funcname) -{ - int rv; - - log_msg(&logit, LOGLEV_ERROR, funcname, - "Locking spin %p...\n", lock); - rv = __spin_lock(lock); - if (rv) { - log_msg(&logit, LOGLEV_ERROR, funcname, - "SPIN LOCK ERROR %d\n", rv); - } - log_msg(&logit, LOGLEV_ERROR, funcname, - "locking done (%p)\n", lock); - - return rv; -} - -int -log_spin_unlock(spinlock_t *lock, char *funcname) -{ - int rv; - - log_msg(&logit, LOGLEV_ERROR, funcname, - "Unlocking spin %p...\n", lock); - rv = __spin_unlock(lock); - if (rv) { - log_msg(&logit, LOGLEV_ERROR, funcname, - "SPIN UNLOCK ERROR %d\n", rv); - } - log_msg(&logit, LOGLEV_ERROR, funcname, - "unlocking done (%p)\n", lock); - - return rv; -} diff --git a/client/src/lock_utils.h b/client/src/lock_utils.h deleted file mode 100644 index 950e0abe3..000000000 --- a/client/src/lock_utils.h +++ /dev/null @@ -1,112 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - C Interface: lock_utils - - Description: - All spin locking are abstracted away from their actual implementation - like pthread_spinlocks. This way it is possible to do logging of spins. - This done if source files are compiled with 'SPIN_LOG' defined. - If - in addition - ITAC is enabled, spin locks are also shown in the - time line. - If no logging is required, there is no overhead because the generic - 'spin_{un}lock' is just an alias for 'pthread_spin_{un}lock'. - - Author: Matthias Hess , (C) 2008 - - Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_LOCK_UTILS_H__ -#define __XTRFS_LOCK_UTILS_H__ - -#include - -#include "logger.h" - -/* ITAC needs some handles assoicated with the spin. So we define out - own spinlock_t here. If ITAC is disabled this is simply an alias - to 'pthread_spinlock_t' - */ - -#ifndef ITAC_SPIN -typedef pthread_spinlock_t spinlock_t; -#else -typedef struct { - pthread_spinlock_t lock; - int lock_handle; - int locked_handle; - int unlock_handle; -} spinlock_t; -#endif - -#ifndef ITAC_SPIN -#define spin_init(x,y) pthread_spin_init((x),(y)) -#define spin_destroy(x) pthread_spin_destroy((x)) -#else -int itac_spin_init(spinlock_t *lock, int shared); -int itac_spin_destroy(spinlock_t *lock); -#define spin_init(x,y) itac_spin_init((x),(y)) -#define spin_destroy(x) itac_spin_destroy((x)) -#endif - -#ifndef ITAC_SPIN -#define __spin_lock(x) pthread_spin_lock((x)) -#define __spin_unlock(x) pthread_spin_unlock((x)) -#else -extern int itac_spin_lock(spinlock_t *lock); -extern int itac_spin_unlock(spinlock_t *lock); -#define __spin_lock(x) itac_spin_lock((x)) -#define __spin_unlock(x) itac_spin_unlock((x)) -#endif - -extern int log_spin_lock(spinlock_t *lock, char *funcname); -extern int log_spin_unlock(spinlock_t *lock, char *funcname); - -#ifdef SPIN_LOG -#define spin_lock(x) log_spin_lock((x), (char *)__FUNCTION__) -#define spin_unlock(x) log_spin_unlock((x), (char *)__FUNCTION__) -#else -#define spin_lock(x) __spin_lock(x) -#define spin_unlock(x) __spin_unlock(x) -#endif - -/* Generic spin logging enabled. This can be used even if 'SPIN_LOG' - is not defined. This way it is possible to log only specific - spins without the rest of it. This requires extra care by the - programmer as all logs of locks need the corresposnding log of - unlock. */ - -#define spin_lock_log(x) log_spin_lock((x), (char *)__FUNCTION__) -#define spin_unlock_log(x) log_spin_unlock((x), (char *)__FUNCTION__) - -typedef pthread_mutex_t mutex_t; - -#define mutex_init(x,y) pthread_mutex_init((x),(y)) -#define mutex_lock(x) pthread_mutex_lock((x)) -#define mutex_unlock(x) pthread_mutex_unlock((x)) - -#endif diff --git a/client/src/logger.c b/client/src/logger.c deleted file mode 100644 index feb053e53..000000000 --- a/client/src/logger.c +++ /dev/null @@ -1,194 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: logger -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include -#include - -#ifndef _WIN32 -#include -#else -#include -#endif - -#include "logger.h" - -struct logger logit = { - .level = LOGLEV_DEBUG, - .type = stdout_log, - .logfile = NULL, - .lock_init = 0, - .func_align = 24 -}; - - -int -log_init(struct logger *l, log_type_t type, log_level_t level, char *filename) -{ - l->logfile = NULL; - l->lock_init = 0; - - switch(type) { - case syslog_log: - openlog("xtreemfs", LOG_NOWAIT, LOG_USER); - break; - case file_log: - if (filename) { - l->logfile = fopen(filename, "w"); - setlinebuf(l->logfile); - } - break; - default: - break; - } - - l->level = level; - l->type = type; - - pthread_mutex_init(&l->lock, NULL); - l->lock_init = 1; - l->func_align = -1; - - return 0; -} - -void -log_set_level(struct logger *l, log_level_t level) -{ - pthread_mutex_lock(&l->lock); - l->level = level; - pthread_mutex_unlock(&l->lock); -} - -void -log_end(struct logger *l) -{ - switch(l->type) { - case syslog_log: - closelog(); - break; - case file_log: - if (l->logfile) - fclose(l->logfile); - break; - default: - break; - } - - pthread_mutex_destroy(&l->lock); -} - -int -log_msg(struct logger *l, log_level_t level, char *func, const char *format, ...) -{ - va_list arg; - int done = 0; - char *my_format = NULL; - size_t my_len; - size_t func_len; - char *my_func = NULL; - pthread_t my_thread = pthread_self(); - char my_thread_str[23]; - int i; - - if (level <= l->level) { - - /* In case 'log_init' was not called. */ - if(!l->lock_init) { - pthread_mutex_init(&l->lock, NULL); - l->lock_init = 1; - } - - pthread_mutex_lock(&l->lock); - va_start(arg, format); - if (func != NULL) { - func_len = strlen(func); - if(l->func_align > 0 && func_len + 3 < l->func_align) { - my_func = (char *)malloc(l->func_align+1); - snprintf(my_func, l->func_align+1, "(%s):", func); - func_len = strlen(my_func); - for(i=func_len; ifunc_align; i++) - my_func[i] = ' '; - my_func[i] = '\0'; - } else { - my_func = (char *)malloc(func_len + strlen("():") + 1); - snprintf(my_func, func_len+strlen("():")+1, "(%s):", func); - } - func_len = strlen(my_func); - my_thread = pthread_self(); -#ifdef _WIN32 - snprintf(my_thread_str, 23, "[%04x]", ((int **)&my_thread)[0][0]); -#else - snprintf(my_thread_str, 23, "[%16p]", (void *)my_thread); -#endif - my_len = strlen(format) + strlen(my_thread_str) + 2 + func_len + strlen(" ") + 1; - my_format = (char *)malloc(my_len); - if(my_format == NULL) - goto finish; - snprintf(my_format, my_len, "%s: %s %s", my_thread_str, my_func, format); - free(my_func); - } else - my_format = strdup(format); - -#if 1 - switch(l->type) { - case stdout_log: - done = vfprintf(stdout, (const char *)my_format, arg); - fflush(stdout); - break; - case syslog_log: - vsyslog(LOG_INFO, (const char *)my_format, arg); - done = 1; - break; - case file_log: - if(l->logfile) { - done = vfprintf(l->logfile, (const char *)my_format, arg); - fflush(l->logfile); - } - break; - default: - break; - } -#endif - free(my_format); - va_end(arg); - pthread_mutex_unlock(&l->lock); - } - -finish: - return done; -} diff --git a/client/src/logger.h b/client/src/logger.h deleted file mode 100644 index 4bbba95cd..000000000 --- a/client/src/logger.h +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#ifndef __XTRFS_LOGGER_H__ -#define __XTRFS_LOGGER_H__ - -#include -#include - - -typedef enum { - LOGLEV_NO_LOG=0, - LOGLEV_ERROR, - LOGLEV_INFO, - LOGLEV_TRACE, - LOGLEV_DEBUG, -} log_level_t; - -typedef enum { - stdout_log, - syslog_log, - file_log -} log_type_t; - -struct logger { - log_level_t level; /*!< Current level of messages. All messages above this - level are discarded. */ - log_type_t type; /*!< Type of current logging facility */ - FILE *logfile; - int lock_init; /*!< Cannot assign init'ed mutex. So keep track of init */ - pthread_mutex_t lock; - int func_align; -}; - -extern int log_init(struct logger *l, log_type_t type, log_level_t level, char *filename); -extern int log_msg(struct logger *l, log_level_t level, char *func, const char *format, ...); -extern void log_set_level(struct logger *l, log_level_t level); - -extern void log_end(struct logger *l); - -extern struct logger logit; /*!< Globally usable logger, thread safe */ - -#define log_on() log_set_level(&logit, LOGLEV_DEBUG) -#define log_off() log_set_level(&logit, LOGLEV_NO_LOG) - -#ifdef __GNUC__ - -#ifndef NO_DEBUG -#define dbg_msg(f,...) log_msg(&logit, LOGLEV_DEBUG, (char *)__FUNCTION__, \ - f, ##__VA_ARGS__) -#else -#define dbg_msg(f,...) do { } while(0) -#endif - -#ifndef NO_TRACE -#define trace_msg(f,...) log_msg(&logit, LOGLEV_TRACE, (char *)__FUNCTION__, \ - f, ##__VA_ARGS__) -#else -#define trace_msg(f,...) do { } while(0) -#endif - -#define force_msg(f,...) log_msg(&logit, LOGLEV_NO_LOG, (char *)__FUNCTION__, \ - f, ##__VA_ARGS__) - -#define err_msg(f,...) log_msg(&logit, LOGLEV_ERROR, (char *)__FUNCTION__, \ - f, ##__VA_ARGS__) - -#define info_msg(f,...) log_msg(&logit, LOGLEV_INFO, (char *)__FUNCTION__, \ - f, ##__VA_ARGS__) - -/* This is for ordinary information that have to be printed - without the function name. */ -#define print_msg(f,...) log_msg(&logit, LOGLEV_INFO, NULL, f, ##__VA_ARGS__) - -#ifdef TIMINGS -#define timing_msg(f,...) log_msg(&logit, LOGLEV_TRACE, (char *)__FUNCTION__, \ - f, ##__VA_ARGS__) -#else -#define timing_msg(f,...) -#endif - -#endif - -#endif diff --git a/client/src/main.c b/client/src/main.c deleted file mode 100644 index 1e60ec0f8..000000000 --- a/client/src/main.c +++ /dev/null @@ -1,310 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#include -#include -#include -#include -#ifndef _WIN32 -#include -#else -#include "platforms.h" -#endif -#include -#include - -#include - -#ifdef ITAC -#include -#include -#endif - -#include -#include -#include -#include - -#include -#include -#ifndef _WIN32 -#include -#endif - - -void -usage(char *progpath) -{ -} - -/** - * Limit stack size per thread. - * - * This function has been introduced to come across possible errors - * in memory handling of threads as soon as possible. - */ -extern pthread_attr_t *xpattr; -int limit_thread_stack(int kbytes) -{ - size_t size, newsize = kbytes * 1024; - int err; - - xpattr = (pthread_attr_t *)malloc(sizeof(pthread_attr_t)); - pthread_attr_init(xpattr); - err = pthread_attr_getstacksize(xpattr, &size); - if (err) - return err; - trace_msg("Changing pthread stack size from %ld to %ld\n", - size, newsize); - err = pthread_attr_setstacksize(xpattr, newsize); - if (err) - err_msg("setstacksize returned %d\n",err); - return err; -} - -/** - * Entry point into XtreemFS client. - */ -int -main(int argc, char **argv) -{ - char cert_pw[128]; - int err; - char *mrc_id = NULL; - char *mrc_name = NULL; - - char *vol_id = NULL; - char *real_volume_url = NULL; - int len; - int mem_trace = 0; - -#ifdef ITAC - VT_initialize(&argc, &argv); - dbg_msg("VT initialized.\n"); - - VT_classdef("fuse", &itac_fuse_class); - VT_classdef("osd", &itac_osd_class); - VT_classdef("filerw", &itac_filerw_class); - VT_classdef("fobj", &itac_fobj_class); - VT_classdef("sobj", &itac_sobj_class); - - VT_classdef("spin", &itac_spin_class); - - VT_funcdef("read", itac_fuse_class, &itac_fuse_read_hdl); - VT_funcdef("write", itac_fuse_class, &itac_fuse_write_hdl); - - VT_funcdef("exec", itac_osd_class, &itac_osd_exec_hdl); - VT_funcdef("put", itac_osd_class, &itac_osd_put_hdl); - VT_funcdef("get", itac_osd_class, &itac_osd_get_hdl); - - VT_funcdef("handle", itac_filerw_class, &itac_filerw_handle_hdl); - VT_funcdef("handle", itac_fobj_class, &itac_fobj_handle_hdl); - VT_funcdef("handle", itac_sobj_class, &itac_sobj_handle_hdl); -#endif - - /* Get configuration from command line options and a configuration - file, eventually. */ - if (xtreemfs_conf_get_ip(&conf, argc, argv)) { - err = 1; - dbg_msg("Cannot parse arguments.\n"); - goto out2; - } -#ifndef _WIN32 - if (conf.mem_trace) { - mem_trace = 1; - mtrace(); - } -#endif - - if (conf.volume_url) { - ne_sock_init(); - openlog("xtreemfs", LOG_PID, LOG_USER); - logit.type = syslog_log; - if (conf.logfile) { - dbg_msg("Logging to file '%s'\n", conf.logfile); - closelog(); - logit.logfile = fopen(conf.logfile, "w"); - logit.type = file_log; - } - - err_msg("debugging level is %d\n", conf.debugging); - if (conf.debugging) { - logit.level = conf.debugging; - if (logit.level < LOGLEV_ERROR) - logit.level = LOGLEV_ERROR; - fprintf(stderr, "Set debug level to %d\n", - conf.debugging); - } - - // increasing stack size in the hope to hit the problem sooner - // when problem is found, reduce to 1MB or 512KB (EF) - if (conf.stack_size - && limit_thread_stack(conf.stack_size)) - exit(1); - - /* Check for node certificate */ - if (conf.ssl_cert) { - dbg_msg("SSL certificate file '%s'\n", conf.ssl_cert); - xtreemfs_client_cert = ne_ssl_clicert_read(conf.ssl_cert); - if (!xtreemfs_client_cert) { - fprintf(stderr, "Cannot read certificate file '%s'\n", - conf.ssl_cert); - exit(1); - } - if (ne_ssl_clicert_encrypted(xtreemfs_client_cert)) { - int try=0; - dbg_msg("Certificate is password protected!\n"); - do { - EVP_read_pw_string(cert_pw, 128, "Password: ", 0); - try++; - } while(ne_ssl_clicert_decrypt(xtreemfs_client_cert, cert_pw) && - try < 3); - if (ne_ssl_clicert_encrypted(xtreemfs_client_cert)) { - fprintf(stderr, "Password does not match certificate.\n"); - exit(1); - } - /* Clear password */ - memset((void *)cert_pw, 0, 128); - } else { - dbg_msg("Certificate is not password protected.\n"); - } -#if 0 - xtreemfs_ca_cert = ne_ssl_cert_read("/home/mhess/.xtreemfs/cacert.pem"); - if (!xtreemfs_ca_cert) - dbg_msg("Cannot read CA cert...\n"); -#endif - } - - /* Get mrc id, either uuid or url */ - mrc_id = extract_hostid(conf.volume_url); - if (mrc_id) { - dbg_msg("MRC ID from command line is '%s'\n", mrc_id); - } - - vol_id = extract_volumeid(conf.volume_url); - if (vol_id) { - dbg_msg("Volume ID from command line is '%s'\n", vol_id); - } - - /* If a directory service is specified, then the volume url has the - format /. */ - if (conf.dirservice) { - dirservice = dirservice_new(conf.dirservice, xtreemfs_client_cert); - if (dirservice) { - if (dirservice_connect(dirservice)) { - err_msg("Cannot connect to directory service.\n"); - exit(1); - } - mrc_name = dirservice_resolve_uuid(dirservice, mrc_id, MRC_DEFAULT_PORT); - dirservice_disconnect(dirservice); - if (mrc_name) { - dbg_msg("MRC name from DS: '%s'\n", mrc_name); - } - } else { - dbg_msg("Cannot create dirservice '%s'\n", conf.dirservice); - } - } else { - mrc_name = strdup(mrc_id); - } - - /* Regardless of directory service, we should now have a complete URL - for the MRC. We can then put together the real volume URL. */ - len = strlen(mrc_name) + 1 + strlen(vol_id) + 1; - real_volume_url = (char *)malloc(sizeof(char) * len); - if (!real_volume_url) { - err = -ENOMEM; - goto out; - } - snprintf(real_volume_url, len, "%s/%s", mrc_name, vol_id); - - dbg_msg("Real volume URL is: '%s'\n", real_volume_url); - - free(mrc_name); - free(mrc_id); - free(vol_id); - - ne_sock_exit(); - - err = xtreemfs_init(real_volume_url); - if (err) { - switch(err) { - case 2: - fprintf(stderr, "No volume '%s' on MRC.\n", - volume); - break; - case 3: - fprintf(stderr, "Cannot connect to MRC.\n"); - break; - case 4: - fprintf(stderr, "No volume specified.\n"); - break; - default: - fprintf(stderr, "Cannot mount volume!\n"); - break; - } - goto out; - } - } - dbg_msg("About to start fuse main.\n"); - if (conf.mem_trace) - mtrace(); - - /* This actually starts the file system and mounts it in the correct - place. */ - fuse_main(conf.fargs.argc, conf.fargs.argv, &xtreemfs_ops, NULL); - - /* Clean up the mess that we produced. */ - if (conf.mem_trace) - muntrace(); - - if (dirservice) - dirservice_destroy(dirservice); - - dbg_msg("Fuse main finished.\n"); - -out: - xtreemfs_exit(); - -out2: - log_end(&logit); - - xtreemfs_conf_del_contents(&conf); - - if (!err) { - free(conf.volume_url); - free(conf.logfile); - } - - free(real_volume_url); -#ifndef _WIN32 - if (mem_trace) - muntrace(); -#endif - -#ifdef ITAC - VT_finalize(); - dbg_msg("VT finished.\n"); -#endif - return err; -} diff --git a/client/src/metadata_cache.c b/client/src/metadata_cache.c deleted file mode 100644 index 26ccbac86..000000000 --- a/client/src/metadata_cache.c +++ /dev/null @@ -1,187 +0,0 @@ -/* Copyright (c) 2008 Felix Hupfeld - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - -#include - -#include "metadata_cache.h" - -#include "xtreemfs_utils.h" - -#define CACHE_MAX_AGE_SECS 5.0 /* time after which entries are flushed */ - -struct metadata_cache md_cache; - -struct metadata_cache_entry { - char* filename; - struct xtreemfs_statinfo statinfo; - clock_t creation_time; -}; - -static hash_idx_t -string_hash(struct metadata_cache_entry *key) { - char *str = key->filename; - hash_idx_t hash = 0; - - while ( *str != 0 ) { - hash = hash ^ ( ( hash << 5 ) + ( hash >> 2 ) + *str ); - str++; - } - - return hash; -} - - -static int -entry_compare(struct metadata_cache_entry* k1, struct metadata_cache_entry* k2) { - return strcmp(k1->filename,k2->filename) == 0; -} - - -void -metadata_cache_entry_free(struct hash_table_entry* ht_entry) -{ - struct metadata_cache_entry* entry; - entry = (struct metadata_cache_entry*)ht_entry->key; - - free(entry->filename); - xtreemfs_statinfo_clear(&entry->statinfo); - free(entry); - hash_table_entry_del_content(ht_entry); - free(ht_entry); -} - - -void -metadata_cache_init(struct metadata_cache* md_cache) -{ - hash_table_init(&md_cache->filename_to_statinfo, - 100, /* initial size */ - (hash_func*)string_hash, - (hash_cmp*)entry_compare, - metadata_cache_entry_free); - - spin_init(&md_cache->lock, PTHREAD_PROCESS_PRIVATE); - - md_cache->entries_registered = 0; -} - - -void -metadata_cache_flush(struct metadata_cache* md_cache) -{ - spin_lock(&md_cache->lock); - if(md_cache->entries_registered != 0) - hash_table_flush(&md_cache->filename_to_statinfo); - md_cache->entries_registered = 0; - spin_unlock(&md_cache->lock); -} - - -void -metadata_cache_clear(struct metadata_cache* md_cache) -{ - metadata_cache_flush(&md_cache->filename_to_statinfo); - hash_table_clear(&md_cache->filename_to_statinfo); -} - - -static void -metadata_cache_add_entry(struct metadata_cache* md_cache, - char* filename_malloced, - struct xtreemfs_statinfo* md) -{ - struct metadata_cache_entry* entry = NULL; - struct hash_table_entry* cache_entry = NULL; - - entry = malloc(sizeof(struct metadata_cache_entry)); - entry->filename = filename_malloced; - xtreemfs_statinfo_copy(&entry->statinfo, md); - - cache_entry = hash_table_entry_new(entry); - - dbg_msg("adding %s to cache\n", entry->filename); - - spin_lock(&md_cache->lock); - hash_table_insert_entry(&md_cache->filename_to_statinfo, cache_entry, 1); - spin_unlock(&md_cache->lock); -} - - -void -metadata_cache_insert_entries(struct metadata_cache* md_cache, - const char* dirname, int num_entries, - char** names, - struct xtreemfs_statinfo* entries) -{ - int i; - - for(i = 0; i < num_entries; ++i) { - char* filename = malloc(strlen(dirname) + strlen(names[i]) + 2); - - strcpy(filename,dirname); - if(strlen(dirname) > 1) - strcat(filename,"/"); - strcat(filename,names[i]); - - metadata_cache_add_entry(md_cache, filename, &entries[i]); - } - - md_cache->entries_registered = clock(); -} - -int -metadata_cache_get(struct metadata_cache* md_cache, const char* filename, - struct xtreemfs_statinfo* result) -{ - struct hash_table_entry* cache_entry = NULL; - struct metadata_cache_entry* entry = NULL; - - /* Flush entries if they are older than N seconds */ - if((((double)(clock() - md_cache->entries_registered)) / CLOCKS_PER_SEC) > CACHE_MAX_AGE_SECS) { - dbg_msg("Metadata cache older than %f seconds, flushing.\n", CACHE_MAX_AGE_SECS); - metadata_cache_flush(md_cache); - return 0; - } - - struct metadata_cache_entry key; - key.filename = (char*)filename; - - spin_lock(&md_cache->lock); - cache_entry = hash_table_find(&md_cache->filename_to_statinfo, - (void*)&key, 1); - - if(!cache_entry) { - dbg_msg("%s not in metadata cache\n", filename); - spin_unlock(&md_cache->lock); - return 0; - } - - dbg_msg("%s in metadata cache\n", filename); - entry = (struct metadata_cache_entry*)cache_entry->key; - - xtreemfs_statinfo_copy(result, &entry->statinfo); - atomic_dec(&cache_entry->use_count); - spin_unlock(&md_cache->lock); - - return 1; -} diff --git a/client/src/metadata_cache.h b/client/src/metadata_cache.h deleted file mode 100644 index 4a218cefd..000000000 --- a/client/src/metadata_cache.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2008 Felix Hupfeld - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#ifndef __XTRFS_METADATA_CACHE_H__ -#define __XTRFS_METADATA_CACHE_H__ - -#include - -#include "hashtable.h" -#include "statinfo.h" - -struct metadata_cache { - struct hash_table filename_to_statinfo; - spinlock_t lock; /* for flushing */ - clock_t entries_registered; -}; - -extern struct metadata_cache md_cache; /* The Singleton */ - - -extern void metadata_cache_init(struct metadata_cache* md_cache); -extern void metadata_cache_flush(struct metadata_cache* md_cache); -extern void metadata_cache_clear(struct metadata_cache* md_cache); - -extern void metadata_cache_insert_entries(struct metadata_cache* , - const char* dirname, int num_entries, - char** names, - struct xtreemfs_statinfo* entries); - -extern int metadata_cache_get(struct metadata_cache* md_cache, - const char* filename, - struct xtreemfs_statinfo*); - - -#endif /* __XTRFS_METADATA_CACHE_H__ */ diff --git a/client/src/mods/Makefile b/client/src/mods/Makefile deleted file mode 100644 index 2f8b90030..000000000 --- a/client/src/mods/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -MODULES = raid0 raid5 - --include $(TOPDIR)/make.config - -CURRENT_CC_INCS = -I$(TOPDIR)/src - -CC_FLAGS += -fPIC -CC_INCS = $(CURRENT_CC_INCS) $(JSON_CC_INCS) $(NEON_CC_INCS) - -raid0_CC_OBJS = raid0.o -raid5_CC_OBJS = raid5.o - -all: $(MODULES) - -.PHONY: raid0 -raid0: raid0.so - -.PHONY: raid5 -raid5: raid5.so - -raid0.so: $(raid0_CC_OBJS) - $(CC_LD) $(CC_LDFLAGS) -shared -o $(@).so $(raid0_CC_OBJS) - -raid5.so: $(raid5_CC_OBJS) - $(CC_LD) $(CC_LDFLAGS) -shared -o $(@).so $(raid5_CC_OBJS) - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c $< - -clean: - $(RM) $(raid0_CC_OBJS) $(raid5_CC_OBJS) - -distclean: clean - $(RM) $(MODULES) diff --git a/client/src/mods/raid0.c b/client/src/mods/raid0.c deleted file mode 100644 index 3156f0118..000000000 --- a/client/src/mods/raid0.c +++ /dev/null @@ -1,59 +0,0 @@ -#include -#include - -#include -#include - -#include -#include - -extern struct sobj_cache sobj_cache; - - -char *id = "RAID0"; - -int init(struct transl_mod *mod) -{ - int err = 0; - - return err; -} - -int finish(struct transl_mod *mod) -{ - int err = 0; - - return err; -} - -ssize_t read_fobj(struct transl_mod *tm, - struct file_replica *r, - int fobj_num, - void *data) -{ - ssize_t rv = 0; - void *shandle; - - shandle = sobj_cache_start_op(&sobj_cache, r); - /* We have a one to one mapping */ - sobj_cache_read_sobj(shandle, fobj_num, data); - sobj_cache_exec_op(shandle); - - return rv; -} - -int write_fobj(struct transl_mod *tm, - struct file_replica *r, - int fobj_num, - void *data) -{ - int err = 0; - void *shandle = NULL; - - shandle = sobj_cache_start_op(&sobj_cache, r); - sobj_cache_write_sobj(shandle, fobj_num, data); - sobj_cache_exec_op(shandle); - - return err; -} - diff --git a/client/src/mods/raid5.c b/client/src/mods/raid5.c deleted file mode 100644 index 48a8c3c25..000000000 --- a/client/src/mods/raid5.c +++ /dev/null @@ -1,41 +0,0 @@ -#include -#include - -#include -#include - -char *id = "RAID5"; - -int init(struct transl_mod *mod) -{ - int err = 0; - - return err; -} - -int finish(struct transl_mod *mod) -{ - int err = 0; - - return err; -} - -ssize_t read_fobj(struct transl_mod *tm, - struct file_replica *r, - int fobj_num, - void *data) -{ - ssize_t rv = 0; - - return rv; -} - -int write_fobj(struct transl_mod *tm, - struct file_replica *r, - int fobj_num, - void *data) -{ - int err = 0; - - return err; -} diff --git a/client/src/mrc.h b/client/src/mrc.h deleted file mode 100644 index c50593011..000000000 --- a/client/src/mrc.h +++ /dev/null @@ -1,56 +0,0 @@ -/* Copyright (c) 2007, 2008 Erich Focht, Matthias Hess - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#ifndef __XTRFS_MRC_H__ -#define __XTRFS_MRC_H__ -/* - * $Id$ - * - * Description: - * - * - * Authors: - * Erich Focht , (c) 2007 - * Matthias Hess , (C) 2007 - * - * Copyright: See COPYING file that comes with this distribution - * - */ - -#include "request.h" -#include "mrc_request.h" - -#define MRC_DEFAULT_PORT 32636 - -extern struct work_queue *mrccomm_wq; - -void print_mrccomm_info(struct req *req); - -void mrccomm_init(char *mrc_url, int num_threads); - -struct req *mrccomm_req_create(int *err, struct MRC_payload *p, - struct req *parent, int wait); - - -#endif /* __XTRFS_MRC_H__ */ diff --git a/client/src/mrc_channel.c b/client/src/mrc_channel.c deleted file mode 100644 index 851a22402..000000000 --- a/client/src/mrc_channel.c +++ /dev/null @@ -1,1580 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - C Implementation: mrc_channel - - Description: - The protocol between client and MRC is transported over a communication - channel. This file contains one possible implementation of such a channel - namely, the protocol is represented in a JSON fashion and transported - over an (extended) http connection. - - Author: Matthias Hess , (C) 2007 - Erich Focht - - Copyright: See COPYING file that comes with this distribution - -*/ - -#include -#include - -#include -#include -#ifndef _WIN32 -#include -#include -#endif - - -/* Even if struct ANSI is not required, we need to define it - here because JSONs foreach construct uses C99 which we do - not like here... */ -#ifndef __STRICT_ANSI__ -#define __STRICT_ANSI__ -#include -#undef __STRICT_ANSI__ -#else -#include -#endif - -#include - -#include "xtreemfs_security.h" -#include "xtreemfs_utils.h" - -#include "mrc.h" -#include "mrc_channel.h" - -#include "stripe.h" -#include "stripingpolicy.h" -#include "statinfo.h" -#include "xloc.h" -#include "xcap.h" -#include "xcap_inv.h" -#include "xattr.h" - -#include "logger.h" - -/* All MRC channel functions start with a prefix MRCC and have the same set - of parameters. So we can make function declaration very efficient. */ -#define DECL_MRCC_FUNC(x) static int MRCC_##x(struct MRC_Channel *mc, struct MRC_payload *p) - -DECL_MRCC_FUNC(initFS); - -DECL_MRCC_FUNC(createVol); -DECL_MRCC_FUNC(deleteVol); -DECL_MRCC_FUNC(getVols); - -DECL_MRCC_FUNC(addReplica); - -DECL_MRCC_FUNC(changeAccessMode); -DECL_MRCC_FUNC(checkAccessMode); -DECL_MRCC_FUNC(changeOwner); - -DECL_MRCC_FUNC(setACLEntries); -DECL_MRCC_FUNC(remACLEntries); - -DECL_MRCC_FUNC(getXAttr); -DECL_MRCC_FUNC(setXAttrs); -DECL_MRCC_FUNC(remXAttrs); - -DECL_MRCC_FUNC(stat); -DECL_MRCC_FUNC(move); - -DECL_MRCC_FUNC(createDir); -DECL_MRCC_FUNC(readDir); - -DECL_MRCC_FUNC(createFile); -DECL_MRCC_FUNC(delete); -DECL_MRCC_FUNC(open); -DECL_MRCC_FUNC(updateFileSize); -DECL_MRCC_FUNC(createSymLink); -DECL_MRCC_FUNC(createLink); - -DECL_MRCC_FUNC(renew); - - -/* This must be synchronized with the structures in 'mrc_request.h' */ - -#define EXEC_MAP_ENTRY(x,y,z) [x] = { x, y, z } - -struct MRCC_exec_map MRCC_exec_map[] = { - EXEC_MAP_ENTRY(COM_UNDEFINED, "undefined", NULL), - - EXEC_MAP_ENTRY(COM_INIT_FS, "initFileSystem", MRCC_initFS), - - EXEC_MAP_ENTRY(COM_CREATE_VOLUME, "createVolume", MRCC_createVol), - EXEC_MAP_ENTRY(COM_VOLUME_INFO, "volumeInfo", NULL), - EXEC_MAP_ENTRY(COM_DELETE_VOLUME, "deleteVolume", MRCC_deleteVol), - EXEC_MAP_ENTRY(COM_GET_VOLUMES, "getLocalVolumes", MRCC_getVols), - - EXEC_MAP_ENTRY(COM_ADD_REPLICA, "addReplica", MRCC_addReplica), - - EXEC_MAP_ENTRY(COM_ACCESS_MODE, "changeAccessMode", MRCC_changeAccessMode), - EXEC_MAP_ENTRY(COM_CHECK_ACCESS, "checkAccess", MRCC_checkAccessMode), - EXEC_MAP_ENTRY(COM_CHANGE_OWNER, "changeOwner", MRCC_changeOwner), - EXEC_MAP_ENTRY(COM_SET_ACL_ENTRIES, "setACLEntries", MRCC_setACLEntries), - EXEC_MAP_ENTRY(COM_REM_ACL_ENTRIES, "removeACLEntries", MRCC_remACLEntries), - EXEC_MAP_ENTRY(COM_GET_XATTR, "getXAttr", MRCC_getXAttr), - EXEC_MAP_ENTRY(COM_SET_XATTRS, "setXAttrs", MRCC_setXAttrs), - EXEC_MAP_ENTRY(COM_REM_XATTRS, "removeXAttrs", MRCC_remXAttrs), - EXEC_MAP_ENTRY(COM_STAT, "stat", MRCC_stat), - EXEC_MAP_ENTRY(COM_MOVE, "move", MRCC_move), - - EXEC_MAP_ENTRY(COM_CREATE_DIR, "createDir", MRCC_createDir), - EXEC_MAP_ENTRY(COM_READ_DIR, "readDir", MRCC_readDir), - EXEC_MAP_ENTRY(COM_READ_DIR_AND_STAT, "readDirAndStat", MRCC_readDir), /* has the same input signature */ - - EXEC_MAP_ENTRY(COM_CREATE_FILE, "createFile", MRCC_createFile), - EXEC_MAP_ENTRY(COM_DELETE, "delete", MRCC_delete), - EXEC_MAP_ENTRY(COM_OPEN, "open", MRCC_open), - - EXEC_MAP_ENTRY(COM_CREATE_SYMLINK, "createSymbolicLink", MRCC_createSymLink), - EXEC_MAP_ENTRY(COM_CREATE_LINK, "createLink", MRCC_createLink), - - EXEC_MAP_ENTRY(COM_UPD_FILESIZE, "updateFileSize", MRCC_updateFileSize), - EXEC_MAP_ENTRY(COM_RENEW, "renew", MRCC_renew), -}; - - -struct MRC_Channel_header * -MRC_Channel_header_new(char *key, char *value) -{ - struct MRC_Channel_header *rv = NULL; - - dbg_msg("Creating header for %s -> %s\n", key, value); - - rv = (struct MRC_Channel_header *) - malloc(sizeof(struct MRC_Channel_header)); - if (rv) { - rv->key = strdup(key); - rv->value = strdup(value); - INIT_LIST_HEAD(&rv->head); - } - return rv; -} - -void -MRC_Channel_header_clear(struct MRC_Channel_header *head) -{ - free(head->key); - free(head->value); -} - -struct MRC_Channel * -MRC_Channel_new(char *mrc_url) -{ - struct MRC_Channel *rv = NULL; - - rv = (struct MRC_Channel *)malloc(sizeof(struct MRC_Channel)); - if (rv) - if (MRC_Channel_init(rv, mrc_url)) { - MRC_Channel_delete(rv); - rv = NULL; - } - return rv; -} - -int -MRC_Channel_init(struct MRC_Channel *mc, char *mrc_url) -{ - int rv = 0; - - memset((void *)mc, 0, sizeof(struct MRC_Channel)); - - if (ne_uri_parse(mrc_url, &mc->mrc_uri) || !mc->mrc_uri.host) { - rv = -1; - goto finish; - } - if (!mc->mrc_uri.scheme) - mc->mrc_uri.scheme = strdup("http"); - if (!mc->mrc_uri.port) - mc->mrc_uri.port = MRC_DEFAULT_PORT; - if (!mc->mrc_uri.path) - mc->mrc_uri.path = strdup("/"); - - mc->channel_session = ne_session_create(mc->mrc_uri.scheme, - mc->mrc_uri.host, - mc->mrc_uri.port); - if (!mc->channel_session) { - err_msg("Cannot create session with MRC '%s'\n", - mc->mrc_uri.host); - rv = -2; - goto finish; - } - - /* Check if we have an https session and a certificate. */ - if (!strcmp(mc->mrc_uri.scheme, "https")) { - if (xtreemfs_client_cert) { - dbg_msg("Setting client certificate.\n"); - ne_ssl_set_clicert(mc->channel_session, - xtreemfs_client_cert); - // if (xtreemfs_ca_cert) - // ne_ssl_trust_cert(mc->channel_session, xtreemfs_ca_cert); - ne_ssl_trust_default_ca(mc->channel_session); - ne_ssl_set_verify(mc->channel_session, - xtreemfs_verify_cert, - mc->mrc_uri.host); - } else { - dbg_msg("https selected but no client certificate!\n"); - } - } - mc->prot_vers = -1; - mc->resp_buf = ne_buffer_create(); - INIT_LIST_HEAD(&mc->resp_headers); - - pthread_cond_init(&mc->wait_cond, NULL); - pthread_mutex_init(&mc->wait_mutex, NULL); - - mc->drift.tv_sec = 0; - mc->drift.tv_usec = 0; - -finish: - return rv; -} - -void -MRC_Channel_clear_headers(struct MRC_Channel *mc) -{ - struct list_head *iter; - struct MRC_Channel_header *head; - - while (!list_empty(&mc->resp_headers)) { - iter = mc->resp_headers.next; - list_del(iter); - head = (struct MRC_Channel_header *)iter; - dbg_msg("Clearing header %s -> %s\n", head->key, head->value); - MRC_Channel_header_clear(head); - free(head); - } -} - -void -MRC_Channel_delete_contents(struct MRC_Channel *mc) -{ - ne_uri_free(&mc->mrc_uri); - ne_buffer_destroy(mc->resp_buf); - ne_session_destroy(mc->channel_session); -} - -void -MRC_Channel_delete(struct MRC_Channel *mc) -{ - if (mc) { - pthread_cond_destroy(&mc->wait_cond); - pthread_mutex_destroy(&mc->wait_mutex); - free(mc); - mc = NULL; - } -} - - -int -MRC_Channel_req_resp_block_reader(void *userdata, const char *buf, size_t len) -{ - struct MRC_Channel *mc = (struct MRC_Channel *)userdata; - - dbg_msg("Reading response.\n"); - - if (len > 0) { - ne_buffer_append(mc->resp_buf, buf, len); - } else { - dbg_msg("Request has finished\n"); - pthread_cond_broadcast(&mc->wait_cond); - } - return NE_OK; -} - - -int -MRC_Channel_test_java_exception(struct MRC_Channel *mc) -{ - int rv = 0; - - dbg_msg("Checking for java exception in response.\n"); - - if (mc->resp_buf->used > 10) { - if (!strncmp(mc->resp_buf->data, "\"java.lang", 10)) { - if (strstr(mc->resp_buf->data, "Exception:")) { - dbg_msg("Found java exception\n"); - rv = 1; - } - } else - dbg_msg("No java language id\n"); - } - return rv; -} - -/** - * Translate error messages into our error code. - * - * @param mc Channel for which to analyze error message - * @param errMsg The error message itself. - * @returns Integer error code. - */ -int -MRC_Channel_translate_errors(struct MRC_Channel *mc, char *errMsg) -{ - int rv = -1; - char *errnum = NULL, *p = NULL; - char *endpt = NULL; - - /* Firstly, we try to identify 'errno' */ - errnum = strstr(errMsg, "errno"); - if (errnum) { - dbg_msg("Found 'errno' string in error message.\n"); - p = (char *)errnum + strlen("errno"); - while(*p == ' ' || *p == '\t') p++; - dbg_msg("Rest of the string is '%s'\n", p); - if (*p == '=') { - p++; - /* Next thing should be a number. */ - rv = strtol(p, &endpt, 10); - dbg_msg("rv is now %d\n", rv); - - if (p == endpt) - rv = -1; - } - } - - - if (rv == -1) { - dbg_msg("Need to test other method of determining the error reason.\n"); - } - return rv; -} - -/** - * Test for an MRC exception. - * - * This function tests if there is an (handled) MRC exception. - * It assumes that if there is an exception it is JSON format, - * so it is better called after 'MRC_Channel_test_java_exception' - */ -int -MRC_Channel_test_mrc_exception(struct MRC_Channel *mc) -{ - int rv = 0; - struct json_object *jo; - enum json_type obj_type; - - if (mc->resp_buf->used == 0) - goto finish; - - jo = json_tokener_parse(mc->resp_buf->data); -#if 0 - for (i=0; iresp_buf->length && i<2047; i++) { - dummy_buf[i] = mc->resp_buf->data[i]; - } - dummy_buf[i] = '\0'; - dbg_msg("Buffer: %s\n", dummy_buf); -#endif - - if (!jo) - goto finish; - - if (jo && !is_error(jo)) { - obj_type = json_object_get_type(jo); - - /* Error messages are contained in an object */ - if (obj_type == json_type_object) { - json_object_object_foreach(jo, key, val) { - if (!strcmp(key, "errorMessage")) { - dbg_msg("errorMessage: %s\n", json_object_to_json_string(val)); - rv = MRC_Channel_translate_errors(mc, - json_object_to_json_string(val)); - if(rv == -1) - rv = 2; - } else if (!strcmp(key, "exceptionName")) { - if (rv == 0) - rv = 2; - dbg_msg("exceptionName: %s\n", json_object_to_json_string(val)); - } else if (!strcmp(key, "stackTrace")) { - if (rv == 0) - rv = 2; - dbg_msg("%s\n", json_object_to_json_string(val)); - } - } - } - json_object_put(jo); - } else { - dbg_msg("Error state for json object: %ld %d\n", jo, is_error(jo)); - rv = 1; - } -finish: - return rv; -} - - -static int MRC_Channel_get_headers(struct MRC_Channel *mc, ne_request *req) -{ - int err = 0; - void *ne_cursor = NULL; - char *header_name = NULL; - char *header_value = NULL; - struct MRC_Channel_header *head; - - ne_cursor = NULL; - INIT_LIST_HEAD(&mc->resp_headers); - - while ((ne_cursor = - ne_response_header_iterate(req, ne_cursor, - (const char **)&header_name, - (const char **)&header_value))) { - if (!header_name || !header_value) - dbg_msg("Empty return values.\n"); - - head = MRC_Channel_header_new(header_name, header_value); - list_add(&head->head, &mc->resp_headers); - - dbg_msg("Header: %s -> %s\n", header_name, header_value); - } - - return err; -} - - -/** - * Analyse response from MRC. - * The analysis here is done on the level of JSON and HTTP. So we - * look here into errors that are directly related to JSON over HTTP. - * Analysis on the protocol level (i.e. error and responses from the - * protocol specification) is done somewhere else. - * @param mc MRC channel used for the communication - * @param func Function name - * @return 0 or error code - */ -int -MRC_Channel_analyse_resp(struct MRC_Channel *mc, char *func) -{ - int rv = 0, err = 0; - - /* Before analyzing the response, the headers must be present! */ -#if 0 - ne_cursor = NULL; - - if (list_empty(&mc->resp_headers)) { - MRC_Channel_get_headers(mc, req); - } -#endif - - if (MRC_Channel_test_java_exception(mc)) { - dbg_msg("Unhandled JAVA exception... should NOT happen!\n"); - rv = 1; - goto finish; - } - if ((err = MRC_Channel_test_mrc_exception(mc))) { - rv = err; - dbg_msg("Error code from channel exception: %d\n", err); - goto finish; - } - /* So at this point we can be sure to have no error from MRC! */ -finish: - return rv; -} - -/** - * Check for exception on MRC side. - */ -static int MRC_Channel_exception(struct MRC_Channel *mc, ne_request *req) -{ - int err = 0; - -#if 0 - while ((ne_cursor = - ne_response_header_iterate(req, ne_cursor, - (const char **)&header_name, - (const char **)&header_value))) { - head = MRC_Channel_header_new(header_name, header_value); - list_add(&head->head, &mc->resp_headers); - - dbg_msg("Header: %s -> %s\n", header_name, header_value); - } -#endif - - if (MRC_Channel_test_java_exception(mc)) { - dbg_msg("Unhandled JAVA exception... should NOT happen!\n"); - err = 1; - goto finish; - } - - if ((err = MRC_Channel_test_mrc_exception(mc))) { - dbg_msg("Error code from testing channel exception: %d\n", err); - goto finish; - } - /* So at this point we can be sure to have no error from MRC! */ -finish: - return err; -} - -/** - * Analyse the result of request execution on request level. - * (In contrast to the result on protocol level) - */ -static int -MRC_Channel_analyse_p_response(struct MRC_Channel *mc, struct MRC_payload *p) -{ - int rv = 0; - struct list_head *iter1; - struct MRC_Channel_header *header; - char *header_name, *header_value; - struct json_object *jo; - char *xlocs = NULL, *xcaps = NULL; - int i; - - /* Check for general errors... tbd */ - - /* Extract xcapabilities and xlocations, if available. - The strings will be allocated whether used or not, and freed - at the end of the routine. Set pointers to NULL if used anywhere! - */ - - list_for_each(iter1, &mc->resp_headers) { - header = (struct MRC_Channel_header *)iter1; - header_name = header->key; - header_value = header->value; - if(!strcasecmp(header_name, "x-locations")) { - dbg_msg("- xloc found: %s\n", header_value); - xlocs = strdup(header_value); - } else if (!strcasecmp(header_name, "x-capability")) { - dbg_msg("- xcap found: %s\n",header_value); - xcaps = strdup(header_value); - } else { - dbg_msg("header %s not parsed in response\n",header_name); - dbg_msg("header value: %s\n", header_value); - } - } - - /* Request specific answers */ - switch(p->command) { - case COM_CREATE_FILE: { - struct MRC_Req_create_file_resp *resp = p->resp.createfile; - - /* Create file does not always return xcaps or xlocs. - Only when the file is opened. - */ - if (xlocs && xcaps) { - dbg_msg("xlocs=%s xcaps=%s\n", xlocs, xcaps); - resp->xloc = xlocs; - resp->xcap = xcaps; - xlocs = NULL; - xcaps = NULL; - } else { - resp->xloc = NULL; - resp->xcap = NULL; - } - } - break; - - case COM_OPEN: { - struct MRC_Req_open_resp *resp = p->resp.open; - - dbg_msg("xlocs=%s xcaps=%s\n",xlocs, xcaps); - /* Open always requires returning X-Locations and - X-Capabilities. So if these are not present, we - have an error condition. We assume this happens - when the open operation is not allowed. */ - if (!xlocs || !xcaps) { - dbg_msg("No x-location or x-capability returned.\n"); - rv = -EACCES; - break; - } - - resp->xloc = xlocs; - resp->xcap = xcaps; - xlocs = NULL; - xcaps = NULL; - } - break; - - case COM_GET_VOLUMES: { - struct MRC_Req_get_volumes_resp *resp = - p->resp.get_volumes; - int i, num_vols = 0; - - if (!resp) - break; - jo = json_tokener_parse(mc->resp_buf->data); - if (!jo) - break; - if (is_error(jo) || - json_object_get_type(jo) != json_type_object) { - err_msg("Cannot parse response.\n"); - json_object_put(jo); - break; - } - dbg_msg("Volumes: %s\n", json_object_get_string(jo)); - { - // need this block - json_object_object_foreach(jo, key, val) { - num_vols++; - } - } - resp->num_vols = num_vols; - resp->ids = (char **)malloc(sizeof(char *) - * resp->num_vols); - memset((void *)resp->ids, 0, sizeof(char *) * resp->num_vols); - resp->names = (char **)malloc(sizeof(char *) - * resp->num_vols); - memset((void *)resp->names, 0, sizeof(char *) - * resp->num_vols); - i = 0; - json_object_object_foreach(jo, key, val) { - resp->ids[i] = strdup(key); - resp->names[i] = strdup(json_object_get_string(val)); - i++; - } - json_object_put(jo); - } - break; - - case COM_DELETE: { - struct MRC_Req_delete_resp *resp = p->resp.delete; - - if (!xlocs) // when removing a directory, this is okay - break; - resp->xlocs = str_to_xlocs_list(xlocs); - resp->xcap = str_to_xcap(xcaps); - } - break; - - case COM_READ_DIR: { - struct MRC_Req_readDir_resp *resp = p->resp.readdir; - /* Body of reply should contain a JSON encoded list - of directory entries. Request reply data contain - an empty list_head */ - jo = json_tokener_parse(mc->resp_buf->data); - if (!is_error(jo) && - json_object_get_type(jo) == json_type_array) { - int len = json_object_array_length(jo); - struct json_object *dir_str; - - resp->num_entries = len; - resp->dir_entries = (char **)malloc(sizeof(char *) * len); - for (i = 0; i < len; i++) { - dir_str = json_object_array_get_idx(jo, i); - resp->dir_entries[i] = strdup(json_object_get_string(dir_str)); - } - } else { - resp->dir_entries = NULL; - dbg_msg("Len is zero bytes\n"); - } - json_object_put(jo); - } - break; - - case COM_READ_DIR_AND_STAT: { - struct MRC_Req_readDirAndStat_resp *resp = p->resp.readdirandstat; - /* Body of reply should contain a JSON map/object - of directory entries to stat info */ - jo = json_tokener_parse(mc->resp_buf->data); - if (!is_error(jo) && - json_object_is_type(jo, json_type_object)) { - int len = 0, i = 0; - { /* for scoping the in-macro variable definitions*/ - json_object_object_foreach(jo,key,val) - len++; - } - - resp->num_entries = len; - if (len) { - resp->dir_entries = (char **)malloc(sizeof(char *) * len); - resp->stat_entries = (struct xtreemfs_statinfo*)malloc( - sizeof(struct xtreemfs_statinfo) * len); - - json_object_object_foreach(jo,key,val) { - resp->dir_entries[i] = strdup(key); - xtreemfs_statinfo_init(&(resp->stat_entries[i])); - json_to_xtreemfs_statinfo_ip(val, &(resp->stat_entries[i])); - i++; - } - } else { - resp->dir_entries = NULL; - resp->stat_entries = NULL; - dbg_msg("Len is zero bytes\n"); - } - } - json_object_put(jo); - } - break; - - case COM_RENEW: { - struct MRC_Req_renew_data *data = &p->data.renew; - struct xcap *xcap = data->xcap; - if (xcap && xcaps) { - dbg_msg("Updating x-capability\n"); - dbg_msg("Old truncate epoch: %d\n", xcap->truncateEpoch); - xcap_clear(xcap); - xcap_values_from_str(xcap, xcaps); - dbg_msg("New truncate epoch: %d\n", xcap->truncateEpoch); - } - } - break; - - case COM_STAT: - dbg_msg("response: %s\n",mc->resp_buf->data); - jo = json_tokener_parse(mc->resp_buf->data); - if (jo) { - json_to_xtreemfs_statinfo_ip(jo, p->resp.statinfo); - json_object_put(jo); - } else - rv = -ENOENT; - break; - - case COM_GET_XATTR: { - struct MRC_Req_get_xattr_data *data = &p->data.get_xattr; - struct MRC_Req_get_xattr_resp *resp = p->resp.get_xattr; - - jo = json_tokener_parse(mc->resp_buf->data); - if (jo && - json_object_get_type(jo) == json_type_string) { - resp->value = strdup(json_object_get_string(jo)); - json_object_put(jo); - } - } - break; - - case COM_CHECK_ACCESS: { - struct MRC_Req_check_access_resp *resp = p->resp.chk_access; - - jo = json_tokener_parse(mc->resp_buf->data); - if (jo && - json_object_get_type(jo) == json_type_boolean) { - resp->grant = json_object_get_boolean(jo); - json_object_put(jo); - } else - dbg_msg("Wrong return value.\n"); - } - break; - - default: - break; - } - if (xlocs) - free(xlocs); - if (xcaps) - free(xcaps); - return rv; -} - - -static ne_request *MRCC_prepare(struct MRC_Channel *mc, struct MRC_payload *p) -{ - int err = 0, errno; -#if 0 - struct passwd passwd; - struct passwd *pwd_res; - struct group group; - char pwd_str[1024]; - struct group *grp_res; - char group_str[1024]; -#endif - char auth_str[1024]; - ne_request *ne_req = NULL; - - creds_dbg(p->creds); - - ne_req = ne_request_create(mc->channel_session, "POST", - MRCC_exec_map[p->command].fname); - if (!ne_req) { - err_msg("Cannot create request for cmd=%d\n", p->command); - err = 1; - goto error; - } - - memset((void *)auth_str, 0, 1024); - errno = 0; - - if (creds_to_str_ip(p->creds, auth_str, 1024)) - goto error; - - dbg_msg("Authorization string: %s\n", auth_str); - - ne_add_request_header(ne_req, "Authorization", auth_str); - - goto done; - - error: - if (ne_req) { - ne_request_destroy(ne_req); - ne_req = NULL; - } - done: - return ne_req; -} - -static int MRCC_http_accept(void *userdata, ne_request *req, const ne_status *st) -{ - int acc = 0; - - if (st->klass == 2) { - acc = 1; - dbg_msg("Accept 200 class\n"); - goto finish; - } - - if (st->klass == 4) { - if (st->code == 420) { - acc = 1; - dbg_msg("Accept 420 code.\n"); - goto finish; - } - } - - if (st->klass == 5 && st->code == 500) { - acc = 1; - goto finish; - } - - dbg_msg("HTTP code: %d\n", st->code); - if (st->reason_phrase) - dbg_msg("HTTP reason: %s\n", st->reason_phrase); - -finish: - return acc; -} - -static int MRCC_run(struct MRC_Channel *mc, ne_request *ne_req, - struct json_object *req_params) -{ - char *req_params_str = NULL; - int err = 0; - - - /* If we do not have parameters create an empty json object. - This indicates that we do not have parameters... */ - if (!req_params) - req_params = json_object_new_array(); - - /* Set parameters in body, JSON encoded. */ - req_params_str = json_object_to_json_string(req_params); - dbg_msg("JSON parameter string: %s\n", req_params_str); - - /* If we have parameters add a body to the request */ - if (req_params && req_params_str) - ne_set_request_body_buffer(ne_req, req_params_str, - strlen(req_params_str)); - - /* How to receive the answer */ - ne_add_response_body_reader(ne_req, /* ne_accept_always */ MRCC_http_accept, - MRC_Channel_req_resp_block_reader, - (void *)mc); - - /* Clear response buffer */ - ne_buffer_clear(mc->resp_buf); - - /* Submit request */ - dbg_msg("Dispatching request.\n"); - if ((err = ne_request_dispatch(ne_req)) != NE_OK) { - err_msg("Error while dispatching request %p (%d)\n", - ne_req, err); - err_msg("Error was: %s\n", ne_get_error(mc->channel_session)); - /* TODO: is this error passed back? */ - goto finish; - } - dbg_msg("Request dispatched successfully.\n"); - - /* Store headers in a linked list for later use in the - different analysis phases. */ - MRC_Channel_get_headers(mc, ne_req); - - err = MRC_Channel_exception(mc, ne_req); - - /* We now have prepared the MRC Channel in such a way, that - all further processing should be independent of NEON. */ - - finish: - if (ne_req) - ne_request_destroy(ne_req); - - /* if (req_params_str) - free(req_params_str); */ - if (req_params) - json_object_put(req_params); - - return err; -} - -static int MRCC_open(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - struct json_object *req_params = NULL; - int err = 0; - char *path = p->data.open.path; - char *access_mode = p->data.open.access_mode; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - req_params = json_object_new_array(); - - json_object_array_add(req_params, json_object_new_string(path)); - json_object_array_add(req_params, json_object_new_string(access_mode)); - - err = MRCC_run(mc, ne_req, req_params); - if (err) - err = -EIO; - else - err = MRC_Channel_analyse_resp(mc, MRCC_exec_map[p->command].fname); - out: - return err; -} - -static int MRCC_updateFileSize(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - struct MRC_Req_upd_fs_data *nd = - (struct MRC_Req_upd_fs_data *)&p->data; - struct xcap *xc; - off_t newsize; - int epoch; - char newsize_str[70]; - int err = 0; - - xc = nd->xcap; - newsize = nd->new_size; - epoch = nd->epoch; - - dbg_msg("Updating file size: % in epoch %d\n", - newsize, epoch); - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - ne_add_request_header(ne_req, "X-Capability", xc->repr); - - if (newsize >= 0) { - sprintf(newsize_str, "[%lld,%d]", newsize, epoch); - ne_add_request_header(ne_req, "X-New-File-Size", newsize_str); - dbg_msg("New size is %lld\n", newsize); - } else { - dbg_msg("No new size specified!\n"); - } - - err = MRCC_run(mc, ne_req, NULL); - if (err) - err = -EIO; - else - err = MRC_Channel_analyse_resp(mc, MRCC_exec_map[p->command].fname); -out: - return err; -} - -static int MRCC_createSymLink(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - struct json_object *req_params = NULL; - int err = 0; - char *from = p->data.create_symlink.from; - char *to = p->data.create_symlink.to; - - dbg_msg("Creating symbolic link from '%s' to '%s'\n", from, to); - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - req_params = json_object_new_array(); - - json_object_array_add(req_params, json_object_new_string(from)); - json_object_array_add(req_params, json_object_new_string(to)); - - err = MRCC_run(mc, ne_req, req_params); - out: - return err; -} - -static int MRCC_createLink(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - struct json_object *req_params = NULL; - int err = 0; - char *from = p->data.create_link.from; - char *to = p->data.create_link.to; - - dbg_msg("Creating symbolic link from '%s' to '%s'\n", from, to); - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - req_params = json_object_new_array(); - - json_object_array_add(req_params, json_object_new_string(from)); - json_object_array_add(req_params, json_object_new_string(to)); - - err = MRCC_run(mc, ne_req, req_params); - out: - return err; -} - -static int MRCC_createFile(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - struct json_object *req_params = NULL; - int err = 0; - char *path = p->data.create_file.path; - void *xAttrs = p->data.create_file.xAttrs; - struct striping_policy *sp = p->data.create_file.sp; - void *acl = p->data.create_file.acl; - int mode = p->data.create_file.mode; - int do_open = p->data.create_file.open; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - req_params = json_object_new_array(); - - json_object_array_add(req_params, json_object_new_string(path)); - if (!xAttrs) - json_object_array_add(req_params, json_object_new_object()); - if (sp) - json_object_array_add(req_params, striping_policy_to_json(sp)); - else - json_object_array_add(req_params, json_object_new_object()); - /* WARNING: COMMENTED OUT THIS STATEMENT IN ORDER TO BE CONSISTENT W/ MRC PROTOCOL V1 (Jan) - if (!acl) - json_object_array_add(req_params, json_object_new_object()); - */ - if (acl) { - mode = acl_list_to_mode(acl); - } else { - json_object_array_add(req_params, json_object_new_int(mode)); - } - - json_object_array_add(req_params, json_object_new_boolean(do_open)); - - err = MRCC_run(mc, ne_req, req_params); - out: - return err; -} - -static int MRCC_createDir(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - struct json_object *req_params = NULL; - int err = 0; - char *path = p->data.create_dir.dirPath; - void *xattrs = p->data.create_dir.xAttrs; - /* void *acl = p->data.create_dir.acl; */ - int umask = p->data.create_dir.umask; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - req_params = json_object_new_array(); - - json_object_array_add(req_params, json_object_new_string(path)); - if (!xattrs) { - json_object_array_add(req_params, json_object_new_object()); - } // how should this look like with xattrs? - /* WARNING: COMMENTED OUT THIS STATEMENT IN ORDER TO BE CONSISTENT W/ MRC PROTOCOL V1 (Jan) - if (!acl) { - json_object_array_add(req_params, json_object_new_object()); - } // how does this look like with acl - */ - json_object_array_add(req_params, json_object_new_int(umask)); - - err = MRCC_run(mc, ne_req, req_params); - out: - return err; -} - -static int MRCC_readDir(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - struct json_object *req_params = NULL; - int err = 0; - char *path = (char *)p->data.data; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - req_params = json_object_new_array(); - - json_object_array_add(req_params, json_object_new_string(path)); - - err = MRCC_run(mc, ne_req, req_params); - out: - - return err; -} - -static int MRCC_stat(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - struct json_object *req_params = NULL; - int err = 0; - char *path = p->data.stat.path; - int inclReplicas = p->data.stat.inclReplicas; - int inclXAttrs = p->data.stat.inclXAttrs; - int inclACLs = p->data.stat.inclACLs; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - req_params = json_object_new_array(); - - json_object_array_add(req_params, json_object_new_string(path)); - json_object_array_add(req_params, json_object_new_boolean(inclReplicas)); - json_object_array_add(req_params, json_object_new_boolean(inclXAttrs)); - json_object_array_add(req_params, json_object_new_boolean(inclACLs)); - - err = MRCC_run(mc, ne_req, req_params); - - if (err) - err = -ENOENT; - else - err = MRC_Channel_analyse_resp(mc, MRCC_exec_map[p->command].fname); - out: - return err; -} - -static int MRCC_renew(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - struct json_object *req_params = NULL; - struct MRC_Req_renew_data *rd = (struct MRC_Req_renew_data *)&p->data; - struct xcap *xc; - off_t newsize; - int epoch; - char newsize_str[70]; - int err = 0; - - xc = rd->xcap; - newsize = rd->new_size; - epoch = rd->epoch; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - /* req_params = json_object_new_array(); */ - - ne_add_request_header(ne_req, "X-Capability", xc->repr); - - if (newsize >= 0) { - sprintf(newsize_str, "[%lld,%d]", newsize, epoch); - ne_add_request_header(ne_req, "X-New-File-Size", newsize_str); - dbg_msg("New size is %ld\n", newsize); - } else { - dbg_msg("No new size specified!\n"); - } - - err = MRCC_run(mc, ne_req, req_params); - if (err) - err = -EIO; - else - err = MRC_Channel_analyse_resp(mc, MRCC_exec_map[p->command].fname); - -out: - return err; -} - -static int MRCC_move(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - struct json_object *req_params = NULL; - struct MRC_Req_move_data *data = &p->data.move; - int err = 0; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - - req_params = json_object_new_array(); - json_object_array_add(req_params, - json_object_new_string(data->from)); - json_object_array_add(req_params, - json_object_new_string(data->to)); - - err = MRCC_run(mc, ne_req, req_params); - out: - return err; -} - -static int MRCC_delete(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - struct json_object *req_params = NULL; - char *path = (char *)p->data.data; - int err = 0; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - - req_params = json_object_new_array(); - json_object_array_add(req_params, json_object_new_string(path)); - - err = MRCC_run(mc, ne_req, req_params); - out: - return err; -} - -static int MRCC_createVol(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - struct json_object *req_params = NULL; - struct MRC_Req_create_volume_data *d = &p->data.create_vol; - int err = 0; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - - req_params = json_object_new_array(); - - json_object_array_add(req_params, - json_object_new_string(d->volumeName)); - json_object_array_add(req_params, - json_object_new_int(d->osdSelectionPolicyId)); - if(d->defaultStripingPolicy) { - struct striping_policy *sp = d->defaultStripingPolicy; - json_object_array_add(req_params, striping_policy_to_json(sp)); - } else { - json_object_array_add(req_params, json_object_new_object()); - } - json_object_array_add(req_params, json_object_new_int(d->acPolicyId)); - json_object_array_add(req_params, - json_object_new_int(d->partitioningPolicyId)); - if(!d->acl) { - json_object_array_add(req_params, json_object_new_object()); - } else { - json_object_array_add(req_params, acl_list_to_json(d->acl)); - } - - err = MRCC_run(mc, ne_req, req_params); - out: - return err; -} - -static int MRCC_deleteVol(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - struct json_object *req_params = NULL; - char *volName = (char *)p->data.data; - int err = 0; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - - req_params = json_object_new_array(); - json_object_array_add(req_params, json_object_new_string(volName)); - - err = MRCC_run(mc, ne_req, req_params); - out: - return err; -} - -static int MRCC_getVols(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - int err = 0; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - err = MRCC_run(mc, ne_req, NULL); - out: - return err; -} - -static int MRCC_addReplica(struct MRC_Channel *mc, struct MRC_payload *p) -{ - int err = 0; - ne_request *ne_req; - struct json_object *req_params; - struct json_object *osd_array; - char *fileid = p->data.add_replica.fileid; - struct striping_policy *sp = p->data.add_replica.sp; - int num_osds = p->data.add_replica.num_osds; - char **osds = p->data.add_replica.osds; - int i; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - - req_params = json_object_new_array(); - json_object_array_add(req_params, json_object_new_string(fileid)); - json_object_array_add(req_params, striping_policy_to_json(sp)); - - osd_array = json_object_new_array(); - for(i=0; idata.chg_accmode.path; - int mode = p->data.chg_accmode.mode; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - - req_params = json_object_new_array(); - json_object_array_add(req_params, json_object_new_string(path)); - json_object_array_add(req_params, json_object_new_int(mode)); - - err = MRCC_run(mc, ne_req, req_params); - -out: - return err; -} - -static int MRCC_checkAccessMode(struct MRC_Channel *mc, struct MRC_payload *p) -{ - int err = 0; - ne_request *ne_req; - struct json_object *req_params; - char *path = p->data.chk_access.path; - char *mode = p->data.chk_access.mode; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - - req_params = json_object_new_array(); - json_object_array_add(req_params, json_object_new_string(path)); - json_object_array_add(req_params, json_object_new_string(mode)); - - err = MRCC_run(mc, ne_req, req_params); -out: - return err; -} - -static int MRCC_changeOwner(struct MRC_Channel *mc, struct MRC_payload *p) -{ - int err = 0; - ne_request *ne_req; - struct json_object *req_params; - char *path = p->data.chg_owner.path; - char *userId = p->data.chg_owner.userId; - char *groupId = p->data.chg_owner.groupId; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - - req_params = json_object_new_array(); - json_object_array_add(req_params, json_object_new_string(path)); - if (userId) - json_object_array_add(req_params, json_object_new_string(userId)); - else - json_object_array_add(req_params, NULL); - - if (groupId) - json_object_array_add(req_params, json_object_new_string(groupId)); - else - json_object_array_add(req_params, NULL); - - err = MRCC_run(mc, ne_req, req_params); -out: - return err; -} - -static int MRCC_setACLEntries(struct MRC_Channel *mc, struct MRC_payload *p) -{ - int err = 0; - - return err; -} - -static int MRCC_remACLEntries(struct MRC_Channel *mc, struct MRC_payload *p) -{ - int err = 0; - - return err; -} - -static int MRCC_getXAttr(struct MRC_Channel *mc, struct MRC_payload *p) -{ - int err = 0; - ne_request *ne_req; - struct json_object *req_params; - char *path = p->data.get_xattr.path; - char *key = p->data.get_xattr.key; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - - dbg_msg("Getting value for key '%s' and path '%s'\n", key, path); - req_params = json_object_new_array(); - json_object_array_add(req_params, json_object_new_string(path)); - json_object_array_add(req_params, json_object_new_string(key)); - - err = MRCC_run(mc, ne_req, req_params); -out: - return err; -} - -static int MRCC_setXAttrs(struct MRC_Channel *mc, struct MRC_payload *p) -{ - int err = 0; - ne_request *ne_req; - struct json_object *req_params; - char *path = p->data.set_xattrs.path; - struct xattr_list *xl = p->data.set_xattrs.attrs; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - - req_params = json_object_new_array(); - json_object_array_add(req_params, json_object_new_string(path)); - json_object_array_add(req_params, xattr_list_to_json(xl)); - - err = MRCC_run(mc, ne_req, req_params); -out: - return err; -} - -static int MRCC_remXAttrs(struct MRC_Channel *mc, struct MRC_payload *p) -{ - int err = 0; - ne_request *ne_req; - struct json_object *req_params; - struct json_object *key_array; - - char *path = p->data.rem_xattrs.path; - char *key = p->data.rem_xattrs.key; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - - req_params = json_object_new_array(); - json_object_array_add(req_params, json_object_new_string(path)); - key_array = json_object_new_array(); - json_object_array_add(key_array, json_object_new_string(key)); - json_object_array_add(req_params, key_array); - - err = MRCC_run(mc, ne_req, req_params); -out: - return err; -} - -static int MRCC_initFS(struct MRC_Channel *mc, struct MRC_payload *p) -{ - ne_request *ne_req; - int err = 0; - - ne_req = MRCC_prepare(mc, p); - if (!ne_req) { - err = -ENOMEM; - goto out; - } - err = MRCC_run(mc, ne_req, NULL); - out: - return err; -} - -/* EF: is this blocking ? */ -int MRC_Channel_exec_p(struct MRC_Channel *mc, struct MRC_payload *p, - struct req *req) -{ - int err = 0; - int (*func)(struct MRC_Channel *mc, struct MRC_payload *p); - - dbg_msg("\n******\n** EXECUTING %s req:%p fid:%s\n******\n", - MRCC_exec_map[p->command].fname, req, - p->uf ? p->uf->file->fileid_s->fileid : NULL); - - func = MRCC_exec_map[p->command].func; - if (func) { - err = func(mc, p); - } else { - dbg_msg("Function not yet implemented or unknown command.\n"); - } - - if (!err) - err = MRC_Channel_analyse_p_response(mc, p); - if (err) { - req_state_set(req, REQ_STATE_ERROR); - req->error = err; - dbg_msg("Error code from exec %d\n", err); - } - - /* Reset channel for next request */ - dbg_msg("Clearing headers for MRC channel.\n"); - MRC_Channel_clear_headers(mc); - ne_buffer_clear(mc->resp_buf); - - return err; -} diff --git a/client/src/mrc_channel.h b/client/src/mrc_channel.h deleted file mode 100644 index f74ac1140..000000000 --- a/client/src/mrc_channel.h +++ /dev/null @@ -1,105 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#ifndef __XTRFS_MRC_CHANNEL_H__ -#define __XTRFS_MRC_CHANNEL_H__ -/* - C Interface: mrc_channel - - Description: - - - Author: Matthias Hess , (C) 2007 - - Copyright: See COPYING file that comes with this distribution - -*/ - - -#include -#include -#include "mrc_request.h" - -struct MRC_Channel_header { - struct list_head head; - char *key; - char *value; -}; - -struct MRC_Channel_err_descr { - int code; - char *msg; -}; - -extern struct MRC_Channel_err_descr *MRC_Channel_err_descr_new(); -extern int MRC_Channel_err_descr_init(struct MRC_Channel_err_descr *ed); -extern void MRC_Channel_err_descr_delete(struct MRC_Channel_err_descr *ed); - - -struct MRC_Channel { - ne_uri mrc_uri; - ne_session * channel_session; - ne_buffer * resp_buf; - - int prot_vers; /*!< Max. supported prot version */ - - struct list_head resp_headers; /*!< Needed in order to analyse result */ - - void (*error_cb)(void *); - void (*finish_cb)(void *); - - pthread_cond_t wait_cond; - mutex_t wait_mutex; - - struct timeval drift; /*!< Time drift between MRC and us. */ -}; - -extern struct MRC_Channel *MRC_Channel_new(char *mrc_url); -extern int MRC_Channel_init(struct MRC_Channel *mc, char *mrc_url); -extern void MRC_Channel_delete_contents(struct MRC_Channel *mc); -extern void MRC_Channel_delete(struct MRC_Channel *mc); - -int MRC_Channel_exec_p(struct MRC_Channel *mc, struct MRC_payload *p, - struct req *req); - -/** - * Execution map. - * Maps commands to names of the corresponding MRC RPC. This is only - * required for JSON over HTTP or other protocols that use explicit - * function names. - * This map contains also a pointer to an MRCC function that handles - * the specific command. - * Eventually we will add a pointer to a response handling function, too. - * Make the execution map known to at least the communication stage - */ -struct MRCC_exec_map { - MRC_Com_t comm; - char *fname; - int (*func)(struct MRC_Channel *mc, struct MRC_payload *p); - /* int (*resp_func)(struct MRC_Channel *mc, struct MRC_payload *p); */ -}; - -extern struct MRCC_exec_map MRCC_exec_map[]; - -#endif /* __XTRFS_MRC_CHANNEL_H__ */ diff --git a/client/src/mrc_comm.c b/client/src/mrc_comm.c deleted file mode 100644 index fe946951b..000000000 --- a/client/src/mrc_comm.c +++ /dev/null @@ -1,232 +0,0 @@ -/* Copyright (c) 2007, 2008 Erich Focht, Matthias Hess - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/** - * MRC communication stage - * - * - * @author Erich Focht - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include "request.h" -#include "workqueue.h" -#include "filerw.h" -#include "lock_utils.h" -#include "logger.h" -#include "mrc_request.h" -#include "mrc_channel.h" -#include "xtreemfs.h" -#include "xtreemfs_prot.h" - -static void mrccomm_handle(struct req *req); -static void mrccomm_finish(struct req *req); - -struct work_queue *mrccomm_wq; - -/** - * create a mrccomm request and queue it. - * - */ -struct req *mrccomm_req_create(int *err, struct MRC_payload *p, - struct req *parent, int wait) -{ - struct req *req; - - creds_dbg(p->creds); - - req = req_create(REQ_MRC_EXEC_FUNC, (void *)p, NULL, parent); - if (!req) { - err_msg("Could not create mrccomm request!\n"); - *err = -ENOMEM; - goto out; - } - - req->del_data = MRC_payload_free; - req->del_result = NULL; -out: - return req; -} - -/** - * Dump info on one mrccomm request to log. - * - * @param req pointer to request to be shown - */ -void print_mrccomm_info(struct req *req) -{ - struct MRC_payload *p = (struct MRC_payload *)req->data; - - info_msg("req %p state=%s cmd=%s\n", req, reqstate_name[req->state], - MRCC_exec_map[p->command].fname); -} - -/** - * Main MRC Comm worker task. - * - * - */ -static void mrccomm_handle(struct req *req) -{ - struct MRC_payload *p = (struct MRC_payload *)req->data; - struct MRC_Channel *mc; - struct work_thread *wt; - - int err; - - dbg_msg("mrccomm_handle start\n"); - - wt = find_work_thread(mrccomm_wq, pthread_self()); - mc = (struct MRC_Channel *)wt->data; - - /* Are these locks necessary? */ - pthread_mutex_lock(&mc->wait_mutex); - /* EF: is this blocking? */ - err = MRC_Channel_exec_p(mc, p, req); - pthread_mutex_unlock(&mc->wait_mutex); - - dbg_msg("mrccomm_handle end, err=%d\n", err); - req->error = err; - - finish_request(req); -} - -static void mrccomm_finish(struct req *req) -{ - struct MRC_payload *p = (struct MRC_payload *)req->data; - - dbg_msg("callback for mrccomm start, state=%d\n", req_state(req)); - // generic_cb_head(req); - - // Error handling: - // Don't know how to handle child errors now, so - // simply switch to ERROR state if a child failed. - if (req_state(req) == REQ_STATE_CHLD_ERR) { - dbg_msg("CHLD_ERR state in mrccomm stage.\n"); - dbg_msg("Switching to ERROR state.\n"); - req->state = REQ_STATE_ERROR; - } - - // free payload and request structures - MRC_payload_free(p); - - // generic_cb_tail(req); - dbg_msg("callback for mrccomm end\n"); -} - -void mrccomm_init(char *mrc_url, int num_threads) -{ - struct list_head *lh; - struct prot_list *pl; - struct prot_list *cl = NULL; - int do_not_delete = 1; - - trace_msg("initializing mrccomm\n"); - - mrccomm_wq = workqueue_new("mrccomm", num_threads); - - if (!mrccomm_wq) { - err_msg("Failed to create mrccomm workqueue!\n"); - exit(1); - } - - workqueue_add_func(mrccomm_wq, REQ_MRC_EXEC_FUNC, mrccomm_handle); - workqueue_add_func(mrccomm_wq, REQ_MRC_EXEC_FUNC_FINISH, mrccomm_finish); - - /* The tools do not need all the client's framework. So we - have to create a client protocol list, eventually */ - if (!client_vers) { - cl = prot_list_create_client_list(); - do_not_delete = 0; - } else { - cl = client_vers; - } - - mutex_lock(&mrccomm_wq->lock); - list_for_each(lh, &mrccomm_wq->threads) { - struct work_thread *wt; - struct MRC_Channel *mc; - - wt = list_entry(lh, struct work_thread, tlist); - dbg_msg("Connecting to MRC '%s'\n", mrc_url); - mc = MRC_Channel_new(mrc_url); - if (!mc) { - err_msg("No memory for MRC Channel!\n"); - exit(1); - } - pl = prot_get_versions(mc->channel_session, cl); - if (pl) { - mc->prot_vers = prot_list_cmp(pl, cl); - dbg_msg("Common protocol version is '%d'\n", mc->prot_vers); - prot_list_destroy(pl); - } else { - dbg_msg("Cannot get protocol list from MRC '%s'\n", mrc_url); - } - wt->data = (void *)mc; - } - mutex_unlock(&mrccomm_wq->lock); - - if (!do_not_delete && cl) - prot_list_destroy(cl); - - trace_msg("done: initialized mrccomm\n"); -} - - -void mrccomm_destroy(void) -{ - struct list_head *lh; - struct list_head *temp; - - workqueue_stop(mrccomm_wq); - - mutex_lock(&mrccomm_wq->lock); - dbg_msg("Workqueue locked.\n"); - - while (!list_empty(&mrccomm_wq->threads)) { - list_for_each_safe(lh, temp, &mrccomm_wq->threads) { - struct work_thread *wt; - struct MRC_Channel *mc; - - wt = list_entry(lh, struct work_thread, tlist); - mc = (struct MRC_Channel *)wt->data; - list_del(&wt->tlist); - dbg_msg("Deleting channel.\n"); - MRC_Channel_delete_contents(mc); - free(mc); - } - } - mutex_unlock(&mrccomm_wq->lock); - dbg_msg("Workqueue unlocked (and probably no threads)\n"); - workqueue_del(mrccomm_wq); - mrccomm_wq = NULL; -} - diff --git a/client/src/mrc_comm.h b/client/src/mrc_comm.h deleted file mode 100644 index ad33e8383..000000000 --- a/client/src/mrc_comm.h +++ /dev/null @@ -1,46 +0,0 @@ -/* Copyright (c) 2007, 2008 Erich Focht, Matthias Hess - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#ifndef __XTRFS_MRC_COMM_H__ -#define __XTRFS_MRC_COMM_H__ -/** - * MRC communication stage prototypes. - * - * - * @author Erich Focht - */ - -#include "request.h" -#include "workqueue.h" -#include "mrc_request.h" - -extern struct work_queue *mrccomm_wq; -void print_mrccomm_info(struct req *req); -void mrccomm_init(char *mrc_url, int num_threads); -void mrccomm_destroy(void); - -struct req *mrccomm_req_create(int *err, struct MRC_payload *p, - struct req *parent, int wait); - -#endif /* __XTRFS_MRC_COMM_H__ */ diff --git a/client/src/mrc_request.c b/client/src/mrc_request.c deleted file mode 100644 index d68f906b7..000000000 --- a/client/src/mrc_request.c +++ /dev/null @@ -1,724 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: mrc_request -* -* Description: -* -* -* Authors: Matthias Hess , (C) 2007 -* Erich Focht , Copyright (c) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include -#include -#include - -#include "mrc.h" -#include "mrc_request.h" -#include "request.h" - -#include "logger.h" -#include "kernel_substitutes.h" - -/** - * Allocate a mrc payload strcture and initialize it. - */ -static struct MRC_payload *MRC_payload_new(MRC_Com_t cmd) -{ - struct MRC_payload *p = NULL; - - p = (struct MRC_payload *) - malloc(sizeof(struct MRC_payload)); - if (p) { - p->command = cmd; - p->uf = NULL; - p->creds = NULL; - } - return p; -} - -/** - * Free a mrc payload structure and its command specific data. - * - * The payload specific data should be freed by the caller of the request! - */ -void MRC_payload_free(void *p) -{ - free(p); -} - -/*--------- Generic functions ---------- */ - -struct req *MRC_Request__addReplica(int *err, struct creds *c, - char *fileid, struct striping_policy *sp, - int num_osds, char **osds, - struct req *parent, int wait) -{ - struct MRC_payload *p; - struct MRC_Req_add_replica_data *data = NULL; - struct req *req = NULL; - - p = MRC_payload_new(COM_ADD_REPLICA); - if (!p) { - *err = -ENOMEM; - goto finish; - } - p->creds = c; - data = &p->data.add_replica; - data->fileid = fileid; - data->sp = sp; - data->num_osds = num_osds; - data->osds = osds; - - req = mrccomm_req_create(err, p, parent, wait); -finish: - return req; -} - -struct req *MRC_Request__createDir(int *err, - char *dirPath, void *xAttrs, void *acl, - int um, struct creds *c, - struct req *parent, int wait) -{ - struct MRC_payload *p; - struct MRC_Req_create_dir_data *data = NULL; - struct req *req = NULL; - - p = MRC_payload_new(COM_CREATE_DIR); - if (!p) { - *err = -ENOMEM; - goto finish; - } - p->creds = c; - data = &p->data.create_dir; - data->dirPath = dirPath; - data->xAttrs = xAttrs; - data->acl = acl; - data->umask = um; - - req = mrccomm_req_create(err, p, parent, wait); - finish: - return req; -} - -struct req *MRC_Request__createFile(int *err, - struct MRC_Req_create_file_resp *resp, - char *filePath, void *xAttrs, - struct striping_policy *sp, - void *acl, int mode, int do_open, - struct creds *c, - struct req *parent, int wait) -{ - struct MRC_payload *p; - struct MRC_Req_create_file_data *data = NULL; - struct req *req = NULL; - - p = MRC_payload_new(COM_CREATE_FILE); - if (!p) { - *err = -ENOMEM; - goto finish; - } - p->creds = c; - data = &p->data.create_file; - - data->path = filePath; - data->xAttrs = xAttrs; - data->sp = sp; - data->acl = acl; - data->mode = mode; - data->open = do_open; - - p->resp.createfile = resp; - - req = mrccomm_req_create(err, p, parent, wait); - finish: - return req; -} - -struct req *MRC_Request__createVolume(int *err, - char *volumeName, - int osdSelectionPolicyId, - struct striping_policy *def_sp, - int acPolicyId, - int partitioningPolicyId, - struct acl_list *acl, struct creds *c, - struct req *parent, int wait) -{ - struct MRC_payload *p; - struct MRC_Req_create_volume_data *data = NULL; - struct req *req = NULL; - - p = MRC_payload_new(COM_CREATE_VOLUME); - if (!p) { - *err = -ENOMEM; - goto finish; - } - p->creds = c; - data = &p->data.create_vol; - - data->volumeName = volumeName; - data->osdSelectionPolicyId = osdSelectionPolicyId; - data->defaultStripingPolicy = def_sp; - data->acPolicyId = acPolicyId; - data->partitioningPolicyId = partitioningPolicyId; - data->acl = acl; - - req = mrccomm_req_create(err, p, parent, wait); - finish: - return req; -} - -struct req *MRC_Request__delete(int *err, char *path, - struct MRC_Req_delete_resp *resp, - struct creds *c, struct req *parent, int wait) -{ - struct req *req = NULL; - struct MRC_payload *p = NULL; - - p = MRC_payload_new(COM_DELETE); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - p->data.data = (void *)path; // will be deleted in xtreemfs_unlink - p->resp.delete = resp; - - req = mrccomm_req_create(err, p, parent, wait); - out: - return req; -} - -struct req *MRC_Request__deleteVolume(int *err, char *volumeName, - struct creds *c, struct req *parent, - int wait) -{ - struct req *req = NULL; - struct MRC_payload *p = NULL; - - p = MRC_payload_new(COM_DELETE_VOLUME); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - p->data.data = (void *)volumeName; - req = mrccomm_req_create(err, p, parent, wait); - out: - return req; -} - -struct req *MRC_Request__getVolumes(int *err, - struct MRC_Req_get_volumes_resp *resp, - struct creds *c, struct req *parent, - int wait) -{ - struct req *req = NULL; - struct MRC_payload *p = NULL; - - p = MRC_payload_new(COM_GET_VOLUMES); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - p->resp.get_volumes = resp; - req = mrccomm_req_create(err, p, parent, wait); - out: - return req; -} - -struct req *MRC_Request__changeAccessMode(int *err, - char *path, int mode, - struct creds *c, struct req *parent, - int wait) -{ - struct req *req = NULL; - struct MRC_payload *p = NULL; - - p = MRC_payload_new(COM_ACCESS_MODE); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - p->data.chg_accmode.path = path; - p->data.chg_accmode.mode = mode; - req = mrccomm_req_create(err, p, parent, wait); -out: - return req; -} - -struct req *MRC_Request__checkAccess(int *err, - struct MRC_Req_check_access_resp *resp, - char *path, char *mode, - struct creds *c, struct req *parent, - int wait) -{ - struct req *req = NULL; - struct MRC_payload *p = NULL; - - p = MRC_payload_new(COM_CHECK_ACCESS); - if (!p) { - *err = -ENOMEM; - goto out; - } - - p->creds = c; - p->data.chk_access.path = path; - p->data.chk_access.mode = mode; - p->resp.chk_access = resp; - - req = mrccomm_req_create(err, p, parent, wait); -out: - return req; -} - - -struct req *MRC_Request__changeOwner(int *err, - char *path, char *userId, char *groupId, - struct creds *c, struct req *parent, - int wait) -{ - struct req *req = NULL; - struct MRC_payload *p = NULL; - - p = MRC_payload_new(COM_CHANGE_OWNER); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - p->data.chg_owner.path = path; - if (userId) - p->data.chg_owner.userId = userId; - else - p->data.chg_owner.userId = NULL; - - if (groupId) - p->data.chg_owner.groupId = groupId; - else - p->data.chg_owner.groupId = NULL; - - req = mrccomm_req_create(err, p, parent, wait); -out: - return req; -} - -struct req *MRC_Request__setACLEntries(int *err, - char *path, void *entries, - struct creds *c, struct req *parent, - int wait) -{ - struct req *req = NULL; - struct MRC_payload *p = NULL; - - p = MRC_payload_new(COM_ACCESS_MODE); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - -out: - return req; -} - -struct req *MRC_Request__removeACLEntries(int *err, - char *path, void *entities, - struct creds *c, struct req *parent, - int wait) -{ - struct req *req = NULL; - struct MRC_payload *p = NULL; - - p = MRC_payload_new(COM_ACCESS_MODE); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - -out: - return req; -} - - -struct req *MRC_Request__getXAttr(int *err, - char *path, char *key, - struct MRC_Req_get_xattr_resp *resp, - struct creds *c, struct req *parent, - int wait) -{ - struct req *req = NULL; - struct MRC_payload *p = NULL; - - p = MRC_payload_new(COM_GET_XATTR); - if (!p) { - *err = -ENOMEM; - goto out; - } - dbg_msg("Creating payload entries '%s' for '%s'\n", key, path); - p->creds = c; - p->data.get_xattr.path = path; - p->data.get_xattr.key = key; - p->resp.get_xattr = resp; - - req = mrccomm_req_create(err, p, parent, wait); -out: - return req; -} - -struct req *MRC_Request__setXAttrs(int *err, - char *path, - struct xattr_list *attrs, - struct creds *c, struct req *parent, - int wait) -{ - struct req *req = NULL; - struct MRC_payload *p = NULL; - - p = MRC_payload_new(COM_SET_XATTRS); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - p->data.set_xattrs.path = path; - p->data.set_xattrs.attrs = attrs; - - req = mrccomm_req_create(err, p, parent, wait); -out: - return req; -} - - -struct req *MRC_Request__removeXAttrs(int *err, - char *path, char *key, - struct creds *c, struct req *parent, - int wait) -{ - struct req *req = NULL; - struct MRC_payload *p = NULL; - - p = MRC_payload_new(COM_REM_XATTRS); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - p->data.rem_xattrs.path = path; - p->data.rem_xattrs.key = key; - - req = mrccomm_req_create(err, p, parent, wait); -out: - return req; -} - - - -struct req *MRC_Request__initFileSystem(int *err, struct creds *c, - struct req *parent, int wait) -{ - struct req *req = NULL; - struct MRC_payload *p = NULL; - - p = MRC_payload_new(COM_INIT_FS); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - req = mrccomm_req_create(err, p, parent, wait); - out: - return req; -} - -struct req *MRC_Request__move(int *err, char *sourcePath, char *targetPath, - struct creds *c, struct req *parent, int wait) -{ - struct req *req = NULL; - struct MRC_payload *p = NULL; - struct MRC_Req_move_data *data; - - p = MRC_payload_new(COM_MOVE); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - data = &p->data.move; - data->from = sourcePath; - data->to = targetPath; - req = mrccomm_req_create(err, p, parent, wait); - out: - return req; -} - -struct req *MRC_Request__open(int *err, struct MRC_Req_open_resp *resp, - char *path, char *accessMode, - struct creds *c, struct req *parent, int wait) -{ - struct MRC_payload *p; - struct MRC_Req_open_data *data = NULL; - struct req *req = NULL; - - p = MRC_payload_new(COM_OPEN); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - p->resp.open = resp; - data = &p->data.open; - data->path = path; - data->access_mode = accessMode; - - req = mrccomm_req_create(err, p, parent, wait); - out: - return req; -} - -struct req *MRC_Request__readDir(int *err, struct MRC_Req_readDir_resp *resp, - char *path, struct creds *c, - struct req *parent, int wait) -{ - struct MRC_payload *p; - struct req *req = NULL; - - p = MRC_payload_new(COM_READ_DIR); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - p->resp.readdir = resp; - p->data.data = path; - req = mrccomm_req_create(err, p, parent, wait); - out: - return req; -} - -struct req *MRC_Request__readDirAndStat(int *err, struct MRC_Req_readDirAndStat_resp *resp, - char *path, struct creds *c, - struct req *parent, int wait) -{ - struct MRC_payload *p; - struct req *req = NULL; - - p = MRC_payload_new(COM_READ_DIR_AND_STAT); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - p->resp.readdirandstat = resp; - p->data.data = path; - req = mrccomm_req_create(err, p, parent, wait); - out: - return req; -} - - -struct req *MRC_Request__updFileSize(int *err, - struct xcap *xc, off_t new_size, int epoch, - struct creds *c, struct req *parent, - int order, int wait) -{ - struct req *req = NULL; - struct MRC_payload *p; - struct MRC_Req_upd_fs_data *nd; - - p = MRC_payload_new(COM_UPD_FILESIZE); - if (!p) { - *err = -ENOMEM; - goto out; - } - - nd = &p->data.upd_fs; - p->creds = c; - p->order = order; - nd->xcap = xc; - nd->new_size = new_size; - nd->epoch = epoch; - req = mrccomm_req_create(err, p, parent, wait); -out: - return req; -} - - -struct req *MRC_Request__renew(int *err, struct MRC_Req_renew_resp *resp, - struct xcap *xc, off_t new_size, int epoch, - struct creds *c, struct req *parent, int order, int wait) -{ - struct req *req = NULL; - struct MRC_payload *p; - struct MRC_Req_renew_data *rd; - - p = MRC_payload_new(COM_RENEW); - if (!p) { - *err = -ENOMEM; - goto out; - } - rd = &p->data.renew; - p->creds = c; - p->resp.renew = resp; - p->order = order; - rd->xcap = xc; - rd->new_size = new_size; - rd->epoch = epoch; - req = mrccomm_req_create(err, p, parent, wait); - out: - return req; -} - -struct req *MRC_Request__stat(int *err, struct xtreemfs_statinfo *si, - char *path, int inclReplicas, int inclXAttrs, - int inclACLs, struct creds *c, - struct req *parent, int wait) -{ - struct req *req = NULL; - struct MRC_payload *p; - struct MRC_Req_stat_data *sd; - - p = MRC_payload_new(COM_STAT); - if (!p) { - *err = -ENOMEM; - goto out; - } - p->creds = c; - p->resp.statinfo = si; - sd = &p->data.stat; - - sd->path = path; - sd->inclReplicas = inclReplicas; - sd->inclXAttrs = inclXAttrs; - sd->inclACLs = inclACLs; - - dbg_msg("Path: %s\n", path); - req = mrccomm_req_create(err, p, parent, wait); - if (*err) { - err_msg("Error while executing request stat (%d)\n", *err); - } - out: - return req; -} - -struct req *MRC_Request__createSymbolicLink(int *err, - char *linkPath, const char *targetPath, - struct creds *c, struct req *parent, - int wait) -{ - struct req *req = NULL; - struct MRC_payload *p; - struct MRC_Req_create_symlink_data *csd; - - p = MRC_payload_new(COM_CREATE_SYMLINK); - if (!p) { - *err = -ENOMEM; - goto out; - } - - p->creds = c; - csd = &p->data.create_symlink; - csd->from = linkPath; - csd->to = (char *)targetPath; - - req = mrccomm_req_create(err, p, parent, wait); -out: - return req; -} - -struct req *MRC_Request__createLink(int *err, - char *linkPath, char *targetPath, - struct creds *c, struct req *parent, - int wait) -{ - struct req *req = NULL; - struct MRC_payload *p; - struct MRC_Req_create_link_data *cld; - - p = MRC_payload_new(COM_CREATE_LINK); - if (!p) { - *err = -ENOMEM; - goto out; - } - - p->creds = c; - cld = &p->data.create_link; - cld->from = linkPath; - cld->to = targetPath; - - req = mrccomm_req_create(err, p, parent, wait); -out: - return req; -} - - -// functione below are not yet implemented. - -#if 0 -int -MRC_Request__addReplica(struct MRC_Request *mr, char *fileId, char *stripingPolicy, void *osd_list) -{ - return 0; -} - -int -MRC_Request__createSymbolicLink(struct MRC_Request *mr, char *linkPath, char *targetPath) -{ - return 0; -} - -int -MRC_Request__getServerConfiguration(struct MRC_Request *mr) -{ - return 0; -} - -int -MRC_Request__query(struct MRC_Request *mr, char *path, char *queryString) -{ - return 0; -} - -int -MRC_Request__removeXAttrs(struct MRC_Request *mr, char *path, void *keys) -{ - return 0; -} - -int -MRC_Request__setXAttrs(struct MRC_Request *mr, char *path, void *attrs) -{ - return 0; -} -#endif diff --git a/client/src/mrc_request.h b/client/src/mrc_request.h deleted file mode 100644 index 8da104539..000000000 --- a/client/src/mrc_request.h +++ /dev/null @@ -1,474 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -C++ Interface: mrc_request - -Description: - - -Author: Matthias Hess , (C) 2007 - -Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef _MRC_REQUEST_H -#define _MRC_REQUEST_H - -#include - -#include - -#include "stripe.h" -#include "request.h" -#include "list.h" -#include "acl.h" -#include "xattr.h" -#include "statinfo.h" -#include "xtreemfs.h" - -/** - * MRC Commands - * The strings are in mrc_request.c and must be in sync with the commands! - */ -typedef enum { - COM_UNDEFINED = 0, - - /* Initial file system */ - COM_INIT_FS, - - /* Volume commands */ - COM_CREATE_VOLUME, - COM_VOLUME_INFO, - COM_DELETE_VOLUME, - COM_GET_VOLUMES, - - /* Replica commands */ - COM_ADD_REPLICA, - - /* General entities command */ - COM_ACCESS_MODE, - COM_CHECK_ACCESS, - COM_CHANGE_OWNER, - COM_SET_ACL_ENTRIES, - COM_REM_ACL_ENTRIES, - - COM_GET_XATTR, - COM_SET_XATTRS, - COM_REM_XATTRS, - COM_STAT, - COM_MOVE, - - /* Directory commands */ - COM_CREATE_DIR, - COM_READ_DIR, - COM_READ_DIR_AND_STAT, - - /* File commands */ - COM_CREATE_FILE, - COM_DELETE, - COM_OPEN, - COM_UPD_FILESIZE, - - /* Links */ - COM_CREATE_SYMLINK, - COM_CREATE_LINK, - COM_RENEW -} MRC_Com_t; - -extern char *mrc_function[]; - -/** - * Data structures describing different payloads of an MRC request. - * The data structures have a generic pattern to make it easy to - * associate the right structure with the right request. This - * minimises chances of introducing errors by using the wrong data - * structure. - * The pattern looks like - * MRC_Req__data - * where is created from the function name by make all - * chars lower case and inserting a '_' between words. - * The answer to a request has the same structure: - * MRC_Req__resp - */ - -struct MRC_Req_add_replica_data { - char *fileid; - struct striping_policy *sp; - int num_osds; - char **osds; -}; - -struct MRC_Req_create_file_data { - char *path; - void *xAttrs; - struct striping_policy *sp; - void *acl; - int mode; - int open; -}; - -struct MRC_Req_create_file_resp { - char *xcap; - char *xloc; -}; - -struct MRC_Req_move_data { - char *from; - char *to; -}; - -struct MRC_Req_open_data { - char *path; - char *access_mode; -}; - -struct MRC_Req_open_resp { - char *xcap; - char *xloc; -}; - -struct MRC_Req_create_symlink_data { - char *from; - char *to; -}; - -struct MRC_Req_create_link_data { - char *from; - char *to; -}; - -struct MRC_Req_upd_fs_data { - struct xcap *xcap; - off_t new_size; - int epoch; -}; - -struct MRC_Req_renew_data { - struct xcap *xcap; - off_t new_size; - int epoch; -}; - -struct MRC_Req_renew_resp { - struct list_head *xlocs_list; - struct xcap *xcap; -}; - -struct MRC_Req_change_accmode_data { - char *path; - int mode; -}; - -struct MRC_Req_check_access_data { - char *path; - char *mode; -}; - -struct MRC_Req_check_access_resp { - int grant; -}; - -struct MRC_Req_change_owner_data { - char *path; - char *userId; - char *groupId; -}; - -struct MRC_Req_set_acl_entries_data { - char *path; -}; - -struct MRC_Req_rem_acl_entries_data { - char *path; - void *entities; -}; - -struct MRC_Req_get_xattr_data { - char *path; - char *key; -}; - -struct MRC_Req_get_xattr_resp { - char *value; -}; - -struct MRC_Req_set_xattrs_data { - char *path; - struct xattr_list *attrs; -}; - -struct MRC_Req_rem_xattrs_data { - char *path; - char *key; -}; - -struct MRC_Req_stat_data { - char *path; - int inclReplicas; - int inclXAttrs; - int inclACLs; -}; - -struct MRC_Req_delete_resp { - struct xcap *xcap; - struct xloc_list *xlocs; -}; - -struct MRC_Req_create_dir_data { - char *dirPath; - void *xAttrs; - void *acl; - int umask; -}; - -/** - * \todo Accomodate more parameters - */ -struct MRC_Req_create_volume_data { - char *volumeName; - int osdSelectionPolicyId; - struct striping_policy *defaultStripingPolicy; - int acPolicyId; - int partitioningPolicyId; - void *acl; -}; - -struct MRC_Req_get_volumes_resp { - int num_vols; - char **ids; - char **names; -}; - -struct MRC_Req_readDir_resp { - int num_entries; - char **dir_entries; -}; - -struct MRC_Req_readDirAndStat_resp { - int num_entries; - char **dir_entries; - struct xtreemfs_statinfo *stat_entries; -}; - -/** - * Payload structure for all MRC requests, used instead of MRC request data - * - */ -struct MRC_payload { - MRC_Com_t command; /*!< Command of this request */ - struct creds *creds; /*!< Credentials for executing request */ - struct user_file *uf; /*!< Some commands carry user_file struct */ - unsigned int order; /*!< Request order (set if uf is not NULL) */ - union { - struct MRC_Req_add_replica_data add_replica; - struct MRC_Req_create_file_data create_file; - struct MRC_Req_create_volume_data create_vol; - struct MRC_Req_change_accmode_data chg_accmode; - struct MRC_Req_check_access_data chk_access; - struct MRC_Req_change_owner_data chg_owner; - struct MRC_Req_set_acl_entries_data set_acl_entries; - struct MRC_Req_rem_acl_entries_data rem_acl_entries; - struct MRC_Req_get_xattr_data get_xattr; - struct MRC_Req_set_xattrs_data set_xattrs; - struct MRC_Req_rem_xattrs_data rem_xattrs; - struct MRC_Req_move_data move; - struct MRC_Req_open_data open; - struct MRC_Req_create_symlink_data create_symlink; - struct MRC_Req_create_link_data create_link; - struct MRC_Req_upd_fs_data upd_fs; - struct MRC_Req_renew_data renew; - struct MRC_Req_stat_data stat; - struct MRC_Req_create_dir_data create_dir; - void *data; - } data; - union { - struct MRC_Req_create_file_resp *createfile; - struct MRC_Req_open_resp *open; - struct MRC_Req_delete_resp *delete; - struct MRC_Req_get_volumes_resp *get_volumes; - struct MRC_Req_readDir_resp *readdir; - struct MRC_Req_readDirAndStat_resp *readdirandstat; - struct MRC_Req_renew_resp *renew; - struct xtreemfs_statinfo *statinfo; - struct MRC_Req_get_xattr_resp *get_xattr; - struct MRC_Req_check_access_resp *chk_access; - } resp; -}; - -void MRC_payload_free(void *p); - -/** - * Functions to build an MRC request. These are the only allowed constructors - * for MRC requests! - * - * Each function has a set of specific arguments, which end up in the - * request's payload, and some common arguments like: - * @param *err pointer to the error return code - * @param *creds pointer to credentials structure - * @param *parent pointer to the parent requests (can be NULL) - * @param wait flag showing whether there will be a waiter for the request - * or not, avoids too early freeing of the request structure. - * @return *req pointer to request structure - */ - -struct req *MRC_Request__initFileSystem(int *err, struct creds *c, - struct req *parent, int wait); - -struct req *MRC_Request__addReplica(int *err, struct creds *c, - char *fileid, struct striping_policy *sp, - int num_osds, char **osds, - struct req *parent, int wait); - -struct req *MRC_Request__createDir(int *err, - char *dirPath, void *xAttrs, void *acl, - int um, struct creds *c, - struct req *parent, int wait); - -struct req *MRC_Request__createFile(int *err, - struct MRC_Req_create_file_resp *resp, - char *filePath, void *xAttrs, - struct striping_policy *sp, - void *acl, int mode, int do_open, - struct creds *c, - struct req *parent, int wait); - -struct req *MRC_Request__delete(int *err, char *path, - struct MRC_Req_delete_resp *resp, - struct creds *c, struct req *parent, int wait); - -struct req *MRC_Request__move(int *err, char *sourcePath, char *targetPath, - struct creds *c, struct req *parent, int wait); - -struct req *MRC_Request__open(int *err, struct MRC_Req_open_resp *resp, - char *path, char *accessMode, - struct creds *c, struct req *parent, int wait); - -struct req *MRC_Request__readDir(int *err, struct MRC_Req_readDir_resp *resp, - char *path, struct creds *c, - struct req *parent, int wait); - -struct req *MRC_Request__readDirAndStat(int *err, struct MRC_Req_readDirAndStat_resp *resp, - char *path, struct creds *c, - struct req *parent, int wait); - -struct req *MRC_Request__updFileSize(int *err, - struct xcap *xc, off_t new_size, int epoch, - struct creds *c, struct req *parent, - int order, int wait); - -struct req *MRC_Request__renew(int *err, struct MRC_Req_renew_resp *resp, - struct xcap *xc, off_t new_size, int epoch, - struct creds *c, struct req *parent, - int order, int wait); - -struct req *MRC_Request__stat(int *err, struct xtreemfs_statinfo *si, - char *path, int inclReplicas, int inclXAttrs, - int inclACLs, struct creds *c, - struct req *parent, int wait); - -struct req *MRC_Request__createVolume(int *err, - char *volumeName, - int osdSelectionPolicyId, - struct striping_policy *def_sp, - int acPolicyId, - int partitioningPolicyId, - struct acl_list *acl, struct creds *c, - struct req *parent, int wait); - -struct req *MRC_Request__deleteVolume(int *err, char *volumeName, - struct creds *c, struct req *parent, - int wait); - -struct req *MRC_Request__getVolumes(int *err, - struct MRC_Req_get_volumes_resp *resp, - struct creds *c, struct req *parent, - int wait); - -struct req *MRC_Request__changeAccessMode(int *err, - char *path, int mode, - struct creds *c, struct req *parent, - int wait); - -struct req *MRC_Request__checkAccess(int *err, - struct MRC_Req_check_access_resp *resp, - char *path, char *mode, - struct creds *c, struct req *parent, - int wait); - -struct req *MRC_Request__changeOwner(int *err, - char *path, char *userId, char *groupId, - struct creds *c, struct req *parent, - int wait); - -struct req *MRC_Request__setACLEntries(int *err, - char *path, void *entries, - struct creds *c, struct req *parent, - int wait); - -struct req *MRC_Request__getXAttr(int *err, - char *path, char *key, - struct MRC_Req_get_xattr_resp *resp, - struct creds *c, struct req *parent, - int wait); - -struct req *MRC_Request__setXAttrs(int *err, - char *path, struct xattr_list *attrs, - struct creds *c, struct req *parent, - int wait); - -struct req *MRC_Request__removeXAttrs(int *err, - char *path, char *key, - struct creds *c, struct req *parent, - int wait); - -struct req *MRC_Request__createLink(int *err, - char *linkPath, char *targetPath, - struct creds *c, struct req *parent, - int wait); - -struct req *MRC_Request__createSymbolicLink(int *err, - char *linkPath, const char *targetPath, - struct creds *c, - struct req *parent, int wait); - -//-------------------------------------------- -// request creators below are not changed, yet -//-------------------------------------------- -#if 0 -extern int MRC_Request__addReplica(struct MRC_Request *mr, char *fileId, char *stripingPolicy, void *osd_list); - -extern int MRC_Request__createSymbolicLink(struct MRC_Request *mr, char *linkPath, char *targetPath); - -extern int MRC_Request__getServerConfiguration(struct MRC_Request *mc); - -extern int MRC_Request__query(struct MRC_Request *mc, char *path, char *queryString); - -extern int MRC_Request__removeXAttrs(struct MRC_Request *mc, char *path, void *keys); - -extern int MRC_Request__setXAttrs(struct MRC_Request *mc, char *path, void *attrs); -#endif - -#endif diff --git a/client/src/obj_set.c b/client/src/obj_set.c deleted file mode 100644 index 6476d00c3..000000000 --- a/client/src/obj_set.c +++ /dev/null @@ -1,159 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess - - Author: Matthias Hess - - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - -/* - C Implementation: obj_set - - Description: - */ - -#include -#include - -#include - -#include "obj_set.h" - -#define OBJ_SET_INCR_SIZE 10 - - -struct obj_set *obj_set_new(int init_num) -{ - struct obj_set *rv = NULL; - - rv = (struct obj_set *)malloc(sizeof(struct obj_set)); - if (rv && obj_set_init(rv, init_num)) { - obj_set_destroy(rv); - rv = NULL; - } - - return rv; -} - -/** - * Create an object set for a single object only - */ -struct obj_set *obj_set_new_num(int obj_num) -{ - struct obj_set *rv = NULL; - - rv = obj_set_new(2); /* Reserve memory for a single entry */ - if (!rv) - goto out; - - rv->entries[0].start_num = obj_num; - rv->entries[0].end_num = obj_num; - rv->entries[0].stride = 1; - -out: - return rv; -} - -int obj_set_init(struct obj_set *os, int init_num) -{ - int err = 0; - - os->max_num_entries = init_num; - os->num_entries = 0; - os->entries = (struct obj_set_entry *) - malloc(sizeof(struct obj_set_entry) * os->max_num_entries); - if (!os->entries) { - err = 1; - goto out; - } - - memset((void *)os->entries, 0, sizeof(struct obj_set_entry) * os->max_num_entries); - -out: - return err; -} - -void obj_set_del_contents(struct obj_set *os) -{ - free(os->entries); - os->entries = NULL; - os->max_num_entries = 0; - os->num_entries = 0; -} - -void obj_set_destroy(struct obj_set *os) -{ - obj_set_del_contents(os); - free(os); -} - -int obj_set_add_entry(struct obj_set *os, - int start_num, int end_num, int stride) -{ - int err = 0; - int n = os->num_entries; - int l; - - if (stride == 0) - stride = 1; - - os->entries[n].start_num = start_num; - os->entries[n].end_num = end_num; - os->entries[n].stride = stride; - /* And alloc data pointer array */ - l = (end_num - start_num) / stride + 1; - os->entries[n].data = (void **)malloc(sizeof(void *) * l); - memset((void *)os->entries[n].data, 0, sizeof(void *) * l); - - if (++os->num_entries >= os->max_num_entries) { - os->max_num_entries += OBJ_SET_INCR_SIZE; - os->entries = (struct obj_set_entries *) - realloc((void *)os->entries, - sizeof(struct obj_set_entry) * os->max_num_entries); - if (!os->entries) { - err = 1; - goto out; - } - l = os->max_num_entries - os->num_entries; - memset((void *)&os->entries[n+1], 0, l * sizeof(struct obj_set_entry)); - } - -out: - return err; -} - -int obj_set_add_num(struct obj_set *os, int num) -{ - return obj_set_add_entry(os, num, num, 1); -} - -int obj_set_add_range(struct obj_set *os, int start, int end) -{ - return obj_set_add_entry(os, start, end, 1); -} - -struct json_object *obj_set_to_json(struct obj_set *os) -{ - struct json_object *rv = NULL; - - - return rv; -} diff --git a/client/src/obj_set.h b/client/src/obj_set.h deleted file mode 100644 index b15861f68..000000000 --- a/client/src/obj_set.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess - - Author: Matthias Hess - - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - -/* - C Interface: obj_set - - Description: -*/ - -#ifndef __XTRFS_OBJ_SET_H__ -#define __XTRFS_OBJ_SET_H__ - -#include "list.h" - -struct obj_set_entry { - int start_num; - int end_num; - int stride; - void **data; /*!< Data associated with the objects, if any */ -}; - -struct obj_set_entry *obj_set_entry_new(); -int obj_set_entry_init(struct obj_set_entry *ose); -void obj_set_entry_destroy(struct obj_set_entry *ose); - - -/** - * Object Set Description - */ -struct obj_set { - int max_num_entries; - int num_entries; - - struct obj_set_entry *entries; -}; - -struct obj_set *obj_set_new(int init_num); -struct obj_set *obj_set_new_num(int obj_num); -int obj_set_init(struct obj_set *os, int init_num); -void obj_set_del_contents(struct obj_set *os); -void obj_set_destroy(struct obj_set *os); - -int obj_set_add_num(struct obj_set *os, int num); -int obj_set_add_range(struct obj_set *os, int start, int end); - -#endif diff --git a/client/src/osd.c b/client/src/osd.c deleted file mode 100644 index 060017d06..000000000 --- a/client/src/osd.c +++ /dev/null @@ -1,86 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#include -#include - -#include "osd.h" - - - -struct OSD_Set * -OSD_Set_new(int num_osds, char **osd_urls) -{ - struct OSD_Set *rv = NULL; - - rv = (struct OSD_Set *)malloc(sizeof(struct OSD_Set)); - if(rv != NULL) if(OSD_Set_init(rv, num_osds, osd_urls) != 0) OSD_Set_delete(&rv); - - return rv; -} - -int -OSD_Set_init(struct OSD_Set *os, int num_osds, char **osd_urls) -{ - int rv = 0; - - return rv; -} - - -void -OSD_Set_delete(struct OSD_Set **os) -{ - if(*os) { - free(*os); - *os = NULL; - } -} - - -struct stripe_set * -OSD_Set_read(struct OSD_Set *os) -{ - struct stripe_set *rv = NULL; - - return rv; -} - - -int -OSD_Set_read_ip(struct OSD_Set *os, struct stripe_set *ss) -{ - int rv = 0; - - return rv; -} - - -int -OSD_Set_write(struct OSD_Set *os, struct stripe_set *ss) -{ - int rv = 0; - - return rv; -} diff --git a/client/src/osd.h b/client/src/osd.h deleted file mode 100644 index e18da8d24..000000000 --- a/client/src/osd.h +++ /dev/null @@ -1,53 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#ifndef _OSD_H -#define _OSD_H - -#include - -#include - -#define OSD_DEFAULT_PORT 32637 - - -/** - * Set to deal with a bunch of OSDs at the same time. - * - * - */ -struct OSD_Set { - int num; - struct OSD_Proxy **proxy; /*!< References to proxies */ -}; - -extern struct OSD_Set *OSD_Set_new(int num_osds, char **osd_urls); -extern int OSD_Set_init(struct OSD_Set *os, int num_osds, char **osd_urls); -extern void OSD_Set_delete(struct OSD_Set **os); - -extern struct stripe_set *OSD_Set_read(struct OSD_Set *os); -extern int OSD_Set_read_ip(struct OSD_Set *os, struct stripe_set *ss); -extern int OSD_Set_write(struct OSD_Set *os, struct stripe_set *ss); - -#endif diff --git a/client/src/osd_channel.c b/client/src/osd_channel.c deleted file mode 100644 index 97ddbd8eb..000000000 --- a/client/src/osd_channel.c +++ /dev/null @@ -1,760 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: osd_channel -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include -#include -#include - -#include -#include - -#include -#include -#include - -#ifdef ITAC -#include -#endif - -#include "xtreemfs_security.h" -#include "xtreemfs_utils.h" - -#include "osd_channel.h" -#include "osd_request.h" -#include "mrc_request.h" - -#include "logger.h" -#include "bench_timer.h" - -struct bench_timings neon_timings; -struct bench_timer neon_timer; - -int -OSD_Channel_resp_init(struct OSD_Channel_resp *ocr) -{ - int rv = 0; - - ocr->location = NULL; - ocr->new_size = -1; - ocr->length = -1; - ocr->req_id = NULL; - ocr->err = 0; - - return rv; -} - -void -OSD_Channel_resp_clear(struct OSD_Channel_resp *ocr) -{ - free(ocr->location); - free(ocr->req_id); -} - -int -OSD_Channel_http_accept(void *userdata, ne_request *req, const ne_status *st) -{ - int acc = 0; - struct OSD_Channel *oc = (struct OSD_Channel *)userdata; - - oc->err = OSC_ERR_NO_ERROR; - - if (st->klass == 2) { - dbg_msg("Accept 200 class\n"); - switch (st->code) { - case 200: - case 201: - case 202: - case 203: - case 204: - case 205: - case 206: - acc = 1; - break; - default: - acc = 0; - break; - } - goto finish; - } - - if (st->klass == 4) { - dbg_msg("400 class.\n"); - switch (st->code) { - case 403: - dbg_msg("Access denied.\n"); - oc->err = OSC_ERR_FORBIDDEN; - break; - case 404: - dbg_msg("Object does not exits on OSD.\n"); - oc->err = OSC_ERR_NOEXIST; - break; - default: - acc = 0; - break; - } - goto finish; - } - - dbg_msg("HTTP code: %d\n", st->code); - if (st->reason_phrase) - dbg_msg("HTTP reason: %s\n", st->reason_phrase); - -finish: - return acc; -} - - -struct OSD_Channel * -OSD_Channel_new(char *osd_id, struct dirservice *ds) -{ - struct OSD_Channel *rv = NULL; - - rv = (struct OSD_Channel *)malloc(sizeof(struct OSD_Channel)); - if(rv && OSD_Channel_init(rv, osd_id, ds)) { - OSD_Channel_delete(rv); - rv = NULL; - } - - return rv; -} - -int -OSD_Channel_init(struct OSD_Channel *oc, char *osd_id, struct dirservice *ds) -{ - int rv = 0; - - memset((void *)oc, 0, sizeof(*oc)); - oc->resp_buf = NULL; - oc->channel_session = NULL; - pthread_cond_init(&oc->wait_cond, NULL); - pthread_mutex_init(&oc->wait_mutex, NULL); - spin_init(&oc->lock, PTHREAD_PROCESS_PRIVATE); - - if (str_to_uri_ds(osd_id, &oc->osd_uri, 0, ds)) { - rv = -1; - goto finish; - } - - if(!oc->osd_uri.host) { - rv = -1; - goto finish; - } - - if(oc->osd_uri.scheme == NULL) - oc->osd_uri.scheme = strdup("http"); - if(oc->osd_uri.port == 0) - oc->osd_uri.port = OSD_DEFAULT_PORT; - if(oc->osd_uri.path == NULL) - oc->osd_uri.path = strdup("/"); - - oc->channel_session = ne_session_create(oc->osd_uri.scheme, oc->osd_uri.host, oc->osd_uri.port); - if(oc->channel_session == NULL) { - rv = -2; - goto finish; - } - - /* Check if we have an https session and a certificate. */ - if (!strcmp(oc->osd_uri.scheme, "https")) { - if (xtreemfs_client_cert) { - dbg_msg("Setting client certificate for OSD channel.\n"); - ne_ssl_set_clicert(oc->channel_session, - xtreemfs_client_cert); -#if 0 - if (!oc->channel_session->client_cert) { - err_msg("Cannot set certificate for OSD channel!\n"); - rv = -3; - goto finish; - } -#endif - // if (xtreemfs_ca_cert) - // ne_ssl_trust_cert(mc->channel_session, xtreemfs_ca_cert); - ne_ssl_trust_default_ca(oc->channel_session); - ne_ssl_set_verify(oc->channel_session, - xtreemfs_verify_cert, - oc->osd_uri.host); - } else { - dbg_msg("https selected but no client certificate!\n"); - } - } - - oc->err = OSC_ERR_NO_ERROR; - - oc->resp_buf = ne_buffer_create(); - oc->prot_vers = -1; - -finish: - return rv; -} - -void -OSD_Channel_close(struct OSD_Channel *oc) -{ - if (oc->channel_session) - ne_session_destroy(oc->channel_session); - oc->channel_session = NULL; -} - - -void -OSD_Channel_delete_contents(struct OSD_Channel *oc) -{ - ne_uri_free(&oc->osd_uri); - if (oc->resp_buf) - ne_buffer_destroy(oc->resp_buf); - if (oc->channel_session) - ne_session_destroy(oc->channel_session); -} - -void -OSD_Channel_delete(struct OSD_Channel *oc) -{ - OSD_Channel_delete_contents(oc); - pthread_cond_destroy(&oc->wait_cond); - spin_destroy(&oc->lock); - pthread_mutex_destroy(&oc->wait_mutex); - free(oc); -} - - -int -OSD_Channel_restart(struct OSD_Channel *oc) -{ - int rv = 0; - - if(oc->channel_session != NULL) { - ne_session_destroy(oc->channel_session); - oc->channel_session = ne_session_create(oc->osd_uri.scheme, - oc->osd_uri.host, - oc->osd_uri.port); - if (!oc->channel_session) - rv = 1; - } - - return rv; -} - - -static int -OSD_Channel_req_resp_reader(void *userdata, const char *buf, size_t len) -{ - struct OSD_Channel *oc = (struct OSD_Channel *)userdata; - char *ubuf = (char *)oc->user_buf; - - dbg_msg("Reading OSD response.\n"); - - if(len > 0) { - if (oc->use_buf == 0) - ne_buffer_append(oc->resp_buf, buf, len); - else { - if (oc->user_buf_len + len <= oc->user_buf_size) { - memcpy(&ubuf[oc->user_buf_len], (void *)buf, len); - oc->user_buf_len += len; - } else { - ne_buffer_append(oc->resp_buf, oc->user_buf, oc->user_buf_len); - ne_buffer_append(oc->resp_buf, buf, len); - oc->use_buf = 0; - } - } - } else { - dbg_msg("Request has finished\n"); - // pthread_cond_broadcast(&oc->wait_cond); - } - - return NE_OK; -} - - -static int -OSD_Channel_analyse_req_response(struct OSD_Channel *oc, ne_request *req, - struct OSD_Channel_resp *resp) -{ - int rv = 0; - void *ne_cursor = NULL; - char *header_name; - char *header_value; - struct json_object *renew_obj, *size_obj, *epoch_obj; - - resp->new_size = -1; - resp->epoch = -1; - - while((ne_cursor = ne_response_header_iterate(req, ne_cursor, - (const char **)&header_name, - (const char **)&header_value))) { - if(!strcasecmp(header_name, "x-new-file-size")) { - dbg_msg("Renew msg size string: '%s'\n", header_value); - // resp->xnewsize = strdup(header_value); - renew_obj = json_tokener_parse(header_value); - if (!renew_obj || is_error(renew_obj)) { - dbg_msg("Invalid new size string.\n"); - resp->err = OSC_ERR_INV_NEWSIZE; - goto finish; - } - size_obj = json_object_array_get_idx(renew_obj, 0); - epoch_obj = json_object_array_get_idx(renew_obj, 1); - - if (!size_obj || !epoch_obj) { - resp->err = OSC_ERR_INV_NEWSIZE; - goto finish; - } - - resp->new_size = (off_t)json_object_get_int(size_obj); - resp->epoch = json_object_get_int(epoch_obj); - json_object_put(renew_obj); - - dbg_msg("New size: %lld\n", resp->new_size); - dbg_msg("Epoch: %d\n", resp->epoch); - } else if(!strcasecmp(header_name, "location")) { - resp->location = strdup(header_value); - } else if(!strcasecmp(header_name, "content-length")) { - char *endpt; - resp->length = strtol(header_value, &endpt, 10); - if(*endpt != '\0') { - resp->length = -1; - resp->err = OSC_ERR_INV_LENGTH; - } - } else if (!strcasecmp(header_name, "x-request-id")) { - resp->req_id = strdup(header_value); - dbg_msg("Request Id: '%s'\n", resp->req_id); - } - dbg_msg("OSD response headers: %s -> %s\n", header_name, header_value); - } - - if (oc->err == OSC_ERR_NOEXIST) - resp->err = oc->err; - - if (oc->err == OSC_ERR_FORBIDDEN) - resp->err = oc->err; - -finish: - return rv; -} - - -static int -OSD_Channel_exec(struct OSD_Channel *oc, int command, char *req_id, - struct user_file *uf, - int obj_num, loff_t firstByte, loff_t lastByte, - void *buf, struct OSD_Channel_resp *resp) -{ - int rv = 0; - char *fileid = uf->file->fileid_s->fileid; - struct xloc_list *xll = uf->xloc_list; - struct xcap *xcap = uf->xcap; - ne_request *req = NULL; - ne_status const *status = NULL; - int ne_err; - char int_num_str[22]; /* Maximum number 2^64 has 20 decimal places */ - char byte_range_str[128]; - char test_xloc[1024]; - -#ifdef ITAC - VT_begin(itac_osd_exec_hdl); -#endif - - dbg_msg("Operation %d for file id '%s'\n", command, fileid); - dbg_msg("First byte %lld and last byte %lld\n", firstByte, lastByte); - - - switch(command) { - case OSD_GET: - req = ne_request_create(oc->channel_session, "GET", fileid); - oc->user_buf = buf; - oc->user_buf_len = 0; - oc->user_buf_size = lastByte - firstByte + 1; - oc->use_buf = 1; - break; - - case OSD_PUT: - req = ne_request_create(oc->channel_session, "PUT", fileid); - if (!req) - break; - /* Set the data, if we have any */ - if(buf != NULL && lastByte - firstByte >= 0) - ne_set_request_body_buffer(req, buf, lastByte - firstByte + 1); - oc->use_buf = 0; - break; - - case OSD_DELETE: - err_msg("Delete is now done in a different place!\n"); - /* req = ne_request_create(oc->channel_session, "DELETE", fileid); */ - /* ne_add_request_header(req, "X-Locations", oc->xlocs); */ - break; - - case OSD_TRUNCATE: - err_msg("Truncate is not handled by '%s'.\n", __FUNCTION__); - break; - - default: - break; - } - - if(req == NULL) { - rv = 1; - goto finish; - } - - /* Set HTTP request headers */ - /* \todo remove snprintf for performance reasons */ - - if(command == OSD_PUT || command == OSD_GET) { - snprintf(int_num_str, 22, "%d", obj_num); - ne_add_request_header(req, "X-Object-Number", int_num_str); - dbg_msg("X-Object-Number: %s\n", int_num_str); - - snprintf(byte_range_str, 128, "bytes %lld-%lld/*", firstByte, lastByte); - ne_add_request_header(req, "Content-Range", byte_range_str); - dbg_msg("Content-Range: %s\n", byte_range_str); - -#if 0 - snprintf(int_num_str, 22, "%ld", firstByte); - ne_add_request_header(req, "firstByte", int_num_str); - dbg_msg("firstByte: %s\n", int_num_str); - - snprintf(int_num_str, 22, "%ld", lastByte); - ne_add_request_header(req, "lastByte", int_num_str); - dbg_msg("lastByte: %s\n", int_num_str); -#endif - - } - - strncpy(test_xloc, xll->repr, 1024); - - ne_add_request_header(req, "X-Locations", test_xloc); - dbg_msg("X-Locations: %s\n", test_xloc); - - ne_add_request_header(req, "X-Capability", xcap->repr); - dbg_msg("X-Capability: %s\n", xcap->repr); - - if (req_id) { - ne_add_request_header(req, "X-Request-Id", req_id); - dbg_msg("X-Request-Id: %s\n", req_id); - } - - /* How to receive the answer */ - ne_add_response_body_reader(req, OSD_Channel_http_accept, - OSD_Channel_req_resp_reader, (void *)oc); - - /* Clear response buffer */ - ne_buffer_clear(oc->resp_buf); - - bench_timer_start(&neon_timer); - - /* Submit request */ - if((ne_err = ne_request_dispatch(req)) != NE_OK) { - err_msg("Error %d while dispatching the request.\n", ne_err); - status = ne_get_status(req); - err_msg("Reason: %s\n", ne_get_error(oc->channel_session)); - rv = OSC_ERR_FAIL; - resp->err = -ENODEV; - if (ne_err == NE_TIMEOUT || ne_err == NE_CONNECT) - rv = OSC_ERR_RETRY; - err_msg("ne_err=%d err=%d resp->err=%d\n", ne_err, rv, resp->err); - goto finish; - } - - bench_timer_stop(&neon_timer); - bench_timings_add_ms(&neon_timings, - (double)(lastByte - firstByte + 1) / bench_timer_ms(&neon_timer)); - - if(OSD_Channel_analyse_req_response(oc, req, resp) != 0) { - if (resp->err == 0) - rv = 1; - else - rv = resp->err; - goto finish; - } - - /* Check if we have to copy response data */ - /*!< \todo give the request the location of the data s.t. they are - written immediately to the right place, without copying! */ - - if(command == OSD_GET) { - if(buf != NULL && oc->use_buf == 0) { - size_t copy_size = lastByte - firstByte + 1; - if (copy_size > resp->length) - copy_size = resp->length; - memcpy((void *)buf, (void *)oc->resp_buf->data, copy_size); - } - } - -finish: - ne_request_destroy(req); -#ifdef ITAC - VT_end(itac_osd_exec_hdl); -#endif - - return rv; -} - -ne_request *OSD_Channel_neon_req(struct OSD_Channel *oc, - OSD_Com_t func, char *fileid, - struct xloc_list *xlocs_list, - struct xcap *xcap) -{ - ne_request *rv = NULL; - struct json_object *jo, *json_xlocs; - - switch(func) { - case OSD_DELETE: - rv = ne_request_create(oc->channel_session, "DELETE", fileid); - break; - case OSD_TRUNCATE: - rv = ne_request_create(oc->channel_session, "POST", "truncate"); - break; - default: - break; - } - - if (!rv) - goto finish; - - /* Set HTTP request headers */ - - json_xlocs = xlocs_list_to_json(xlocs_list); - ne_add_request_header(rv, "X-Locations", - json_object_to_json_string(json_xlocs)); - dbg_msg("X-Locations: %s\n", json_object_to_json_string(json_xlocs)); - json_object_put(json_xlocs); - - jo = xcap_to_json(xcap); - ne_add_request_header(rv, "X-Capability", json_object_get_string(jo)); - dbg_msg("X-Capability: %s\n", json_object_get_string(jo)); - json_object_put(jo); - - /* How to receive the answer: do we need this? */ - ne_add_response_body_reader(rv, ne_accept_2xx, - OSD_Channel_req_resp_reader, (void *)oc); - - /* Clear response buffer */ - ne_buffer_clear(oc->resp_buf); - -finish: - return rv; -} - -int OSD_Channel_submit_req(struct OSD_Channel *oc, - ne_request *req, struct OSD_Channel_resp *resp) -{ - int err = 0; - ne_status const *status; - int ne_err; - - /* Submit request */ - if((ne_err = ne_request_dispatch(req)) != NE_OK) { - err_msg("Error %d while dispatching the request.\n", ne_err); - status = ne_get_status(req); - err_msg("Reason: %s\n", ne_get_error(oc->channel_session)); - err = OSC_ERR_FAIL; - resp->err = -ENODEV; - if (ne_err == NE_TIMEOUT || ne_err == NE_CONNECT) - err = OSC_ERR_RETRY; - err_msg("ne_err=%d err=%d resp->err=%d\n", ne_err, err, resp->err); - goto finish; - } - - if(OSD_Channel_analyse_req_response(oc, req, resp) != 0) { - err = 1; - goto finish; - } - -finish: - ne_request_destroy(req); - return err; -} - -/** - * Delete is special, it doesn't come with a user_file struct! - */ -int -OSD_Channel_del(struct OSD_Channel *oc, - char *fileid, struct xloc_list *xlocs_list, - struct xcap *xcap, struct OSD_Channel_resp *resp) -{ - int rv = 0; - ne_request *req; - /* ne_status *status; */ - /* int ne_err; */ - - dbg_msg("Operation DELETE for file id '%s'\n", fileid); - -#if 0 - req = ne_request_create(oc->channel_session, "DELETE", fileid); - if(req == NULL) { - rv = 1; - goto finish; - } - - /* Set HTTP request headers */ - - json_xlocs = xlocs_list_to_json(xlocs_list); - ne_add_request_header(req, "X-Locations", - json_object_to_json_string(json_xlocs)); - dbg_msg("X-Locations: %s\n", json_object_to_json_string(json_xlocs)); - json_object_put(json_xlocs); - - jo = xcap_to_json(xcap); - ne_add_request_header(req, "X-Capability", json_object_get_string(jo)); - dbg_msg("X-Capability: %s\n", json_object_get_string(jo)); - json_object_put(jo); - - /* How to receive the answer: do we need this? */ - ne_add_response_body_reader(req, ne_accept_2xx, - OSD_Channel_req_resp_reader, (void *)oc); - - /* Clear response buffer */ - ne_buffer_clear(oc->resp_buf); -#else - req = OSD_Channel_neon_req(oc, OSD_DELETE, fileid, xlocs_list, xcap); -#endif - -#if 0 - /* Submit request */ - if((ne_err = ne_request_dispatch(req)) != NE_OK) { - err_msg("Error %d while dispatching the request.\n", ne_err); - status = ne_get_status(req); - err_msg("Reason: %s\n", ne_get_error(oc->channel_session)); - rv = 2; - goto finish; - } - - if(OSD_Channel_analyse_req_response(oc, req, NULL, resp) != 0) { - rv = 1; - goto finish; - } -#endif - - OSD_Channel_submit_req(oc, req, resp); - -#if 0 -finish: - ne_request_destroy(req); -#endif - return rv; -} - - -int -OSD_Channel_get(struct OSD_Channel *oc, char *req_id, struct user_file *uf, - int obj_num, loff_t firstByte, loff_t lastByte, - void *buf, struct OSD_Channel_resp *resp) -{ - int rv = 0; - -#ifdef ITAC - VT_begin(itac_osd_get_hdl); -#endif - rv = OSD_Channel_exec(oc, OSD_GET, req_id, uf, - obj_num, firstByte, lastByte, buf, resp); - -#ifdef ITAC - VT_end(itac_osd_get_hdl); -#endif - return rv; -} - -int -OSD_Channel_put(struct OSD_Channel *oc, char *req_id, struct user_file *uf, - int obj_num, loff_t firstByte, loff_t lastByte, - void *buf, struct OSD_Channel_resp *resp) -{ - int rv = 0; -#ifdef ITAC - VT_begin(itac_osd_put_hdl); -#endif - dbg_msg("Putting data from %lld to %lld\n", firstByte, lastByte); - rv = OSD_Channel_exec(oc, OSD_PUT, req_id, uf, - obj_num, firstByte, lastByte, buf, resp); - -#ifdef ITAC - VT_end(itac_osd_put_hdl); -#endif - return rv; -} - -int -OSD_Channel_trunc(struct OSD_Channel *oc, - char *fileid, off_t new_size, - struct xloc_list *xlocs_list, struct xcap *xcap, - struct OSD_Channel_resp *resp) -{ - int err = 0; - ne_request *req; - struct json_object *jo = NULL; - char *req_params_str = NULL; - - req = OSD_Channel_neon_req(oc, OSD_TRUNCATE, fileid, xlocs_list, xcap); - if (!req) { - err_msg("Cannot create neon request!\n"); - err = -ENOMEM; - goto finish; - } - - /* Add new file size to request */ - jo = json_object_new_array(); - json_object_array_add(jo, json_object_new_string(fileid)); - json_object_array_add(jo, json_object_new_int(new_size)); - - req_params_str = strdup(json_object_to_json_string(jo)); - json_object_put(jo); - dbg_msg("JSON parameter string: %s\n", req_params_str); - ne_set_request_body_buffer(req, req_params_str, - strlen(req_params_str)); - - err = OSD_Channel_submit_req(oc, req, resp); - free(req_params_str); -finish: - return err; -} - - -/** - * Send 'heartbeat' to OSD for a specific to indicate we still want - * to use that file. This prevents the OSD from assuming we have died - * - * @param oc OSD channel to use for heartbeat - * @param uf User file which is still open and needs heartbeat - * - * @return 0 on success, error code otherwise - */ -int -OSD_Channel_heartbeat(struct OSD_Channel *oc, struct user_file *uf) -{ - int rv = 0; - - return rv; -} diff --git a/client/src/osd_channel.h b/client/src/osd_channel.h deleted file mode 100644 index 7d6c20a19..000000000 --- a/client/src/osd_channel.h +++ /dev/null @@ -1,133 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -C Interface: osd_channel - -Description: - - -Author: Matthias Hess , (C) 2007 - -Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_OSD_CHANNEL_H__ -#define __XTRFS_OSD_CHANNEL_H__ - -#include -#include - -#include "file.h" -#include "xloc.h" -#include "xcap.h" - - -#define OSD_DEFAULT_PORT 32637 - -enum OSD_Channel_errs { - OSC_ERR_NO_ERROR = 0, - OSC_ERR_REDIRECT, - OSC_ERR_MALFORMED_REQUEST, - OSC_ERR_CAP_EXPIRED, - OSC_ERR_FORBIDDEN, - OSC_ERR_NOEXIST, - OSC_ERR_INV_RANGE, - OSC_ERR_INTERNAL, - OSC_ERR_OVERLOAD, - OSC_ERR_INV_NEWSIZE, - OSC_ERR_INV_EPOCHE, - OSC_ERR_INV_LENGTH, - OSC_ERR_LOOKUP, /*!< Failed to lookup server */ - OSC_ERR_AUTH, /*!< HTTP/HTTPS authorization failure */ - OSC_ERR_CONNECT, /*!< Could not connect to server */ - OSC_ERR_TIMEOUT, /*!< Connection timed out */ - OSC_ERR_RETRY, /*!< Retry request */ - OSC_ERR_FAIL, /*!< Fatal error, fail and propagate upwards */ - OSC_ERR_GENERAL /*!< Not able to identify error more closely */ -}; - -/** - * Response of channel operation. - */ -struct OSD_Channel_resp { - char *location; - off_t new_size; - long epoch; - size_t length; - char *req_id; - int err; -}; - -extern int OSD_Channel_resp_init(struct OSD_Channel_resp *ocr); -extern void OSD_Channel_resp_clear(struct OSD_Channel_resp *ocr); - - -struct OSD_Channel { - ne_uri osd_uri; - ne_session *channel_session; - - /* Buffer descriptions for this channel and the currently running - operation. - */ - ne_buffer *resp_buf; - char *user_buf; - size_t user_buf_size; /* Max size of user_buf */ - size_t user_buf_len; /* Actual size */ - int use_buf; /* Will be 0 for resp_buf, - 1 for user_buf */ - - pthread_cond_t wait_cond; - mutex_t wait_mutex; - spinlock_t lock; - - int prot_vers; - - enum OSD_Channel_errs err; -}; - -extern struct OSD_Channel *OSD_Channel_new(char *osd_id, struct dirservice *ds); -extern int OSD_Channel_init(struct OSD_Channel *oc, char *osd_id, - struct dirservice *ds); -extern void OSD_Channel_delete_contents(struct OSD_Channel *oc); -extern void OSD_Channel_delete(struct OSD_Channel *oc); - -extern int OSD_Channel_restart(struct OSD_Channel *oc); - -int OSD_Channel_get(struct OSD_Channel *oc, char *req_id, struct user_file *uf, - int obj_num, off_t firstByte, off_t lastByte, - void *buf, struct OSD_Channel_resp *resp); -int OSD_Channel_put(struct OSD_Channel *oc, char *req_id, struct user_file *uf, - int obj_num, off_t firstByte, off_t lastByte, - void *buf, struct OSD_Channel_resp *resp); -int OSD_Channel_del(struct OSD_Channel *oc, char *fileid, - struct xloc_list *xlocs_list, struct xcap *xcap, - struct OSD_Channel_resp *resp); -int OSD_Channel_trunc(struct OSD_Channel *oc, - char *fileid, off_t new_size, - struct xloc_list *xlocs_list, struct xcap *xcap, - struct OSD_Channel_resp *resp); - -#endif diff --git a/client/src/osd_manager.c b/client/src/osd_manager.c deleted file mode 100644 index 3dfb6d7e7..000000000 --- a/client/src/osd_manager.c +++ /dev/null @@ -1,164 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: osd_manager -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include - -#include "osd_manager.h" -#include "osd_proxy.h" -#include "dirservice.h" - - -struct OSD_Manager * -OSD_Manager_new() -{ - struct OSD_Manager *rv = NULL; - - rv = (struct OSD_Manager *)malloc(sizeof(struct OSD_Manager)); - if(rv != NULL && OSD_Manager_init(rv) != 0) { - OSD_Manager_delete(rv); - rv = NULL; - } - - return rv; -} - -int -OSD_Manager_init(struct OSD_Manager *om) -{ - INIT_LIST_HEAD(&om->proxies); - return 0; -} - -void -OSD_Manager_clear(struct OSD_Manager *om) -{ - struct list_head *iter; - struct OSD_Proxy *proxy; - - while(!list_empty(&om->proxies)) { - iter = om->proxies.next; - list_del(iter); - proxy = ((struct OSD_Manager_elem *)iter)->proxy; - OSD_Proxy_delete(proxy); - free(iter); - } -} - -void -OSD_Manager_delete(struct OSD_Manager *om) -{ - OSD_Manager_clear(om); - free(om); -} - - -int -OSD_Manager_add_proxy(struct OSD_Manager *om, struct OSD_Proxy *op) -{ - int rv = 0; - struct OSD_Manager_elem *elem = NULL; - - elem = (struct OSD_Manager_elem *)malloc(sizeof(struct OSD_Manager_elem)); - if(elem == NULL) { - rv = 1; - goto finish; - } - - INIT_LIST_HEAD(&elem->head); - elem->proxy = op; - - list_add_tail(&elem->head, &om->proxies); - -finish: - return rv; -} - - -struct OSD_Proxy * -OSD_Manager_find_proxy(struct OSD_Manager *om, char *osd_id) -{ - struct OSD_Proxy *rv = NULL, *ip; - struct list_head *iter; - ne_uri list_uri; - - /* First check for UUIDs only */ - list_for_each(iter, &om->proxies) { - ip = ((struct OSD_Manager_elem *)iter)->proxy; - dbg_msg("Comparing IDs: %s and %s\n", ip->osd_id, osd_id); - if (!strcmp(ip->osd_id, osd_id)) { - rv = ip; - break; - } - } - - /* And check for old URI based comparison */ - -#if 0 - if (!rv) { - if (!ne_uri_parse(osd_id, &list_uri)) { - list_for_each(iter, &om->proxies) { - ip = ((struct OSD_Manager_elem *)iter)->proxy; - if(ne_uri_cmp(&list_uri, &ip->osd_uri) == 0) { - rv = ip; - break; - } - } - } - ne_uri_free(&list_uri); - } -#endif - return rv; -} - -struct OSD_Proxy * -OSD_Manager_get_proxy(struct OSD_Manager *om, char *osd_id, struct dirservice *ds) -{ - struct OSD_Proxy *rv = NULL; - - rv = OSD_Manager_find_proxy(om, osd_id); - if (!rv) { /* We do not have that proxy */ - dbg_msg("Creating new proxy for '%s'\n", - osd_id); - rv = OSD_Proxy_new(osd_id, NUM_PROXIES_PER_CHANNEL, ds); - if (rv) { - dbg_msg("Adding proxy to manager.\n"); - OSD_Manager_add_proxy(om, rv); - } - } - - return rv; -} diff --git a/client/src/osd_manager.h b/client/src/osd_manager.h deleted file mode 100644 index 3c52df4e4..000000000 --- a/client/src/osd_manager.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -C Interface: osd_manager - -Description: - - -Author: Matthias Hess , (C) 2007 - -Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_OSD_MANAGER_H__ -#define __XTRFS_OSD_MANAGER_H__ - -#include "osd_proxy.h" -#include "list.h" - -#define NUM_PROXIES_PER_CHANNEL 3 - - -struct OSD_Manager_elem { - struct list_head head; - struct OSD_Proxy *proxy; -}; - - -struct OSD_Manager { - struct list_head proxies; -}; - - -extern struct OSD_Manager *OSD_Manager_new(); -extern int OSD_Manager_init(struct OSD_Manager *om); -extern void OSD_Manager_clear(struct OSD_Manager *om); -extern void OSD_Manager_delete(struct OSD_Manager *om); - -extern int OSD_Manager_update_proxies(struct OSD_Manager *om); - -extern int OSD_Manager_add_proxy(struct OSD_Manager *om, struct OSD_Proxy *op); -extern struct OSD_Proxy *OSD_Manager_find_proxy(struct OSD_Manager *om, char *osd_url); -extern struct OSD_Proxy *OSD_Manager_get_proxy(struct OSD_Manager *om, char *osd_url, - struct dirservice *ds); - -#endif diff --git a/client/src/osd_proxy.c b/client/src/osd_proxy.c deleted file mode 100644 index 4c34b051c..000000000 --- a/client/src/osd_proxy.c +++ /dev/null @@ -1,282 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: osd_proxy -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include - -#include - -#include "osd_proxy.h" -#include "dirservice.h" -#include "logger.h" - - -struct bench_data_collection osd_proxy_bandwidth; - - -struct OSD_Proxy * -OSD_Proxy_new(char *osd_url, int num_channels, struct dirservice *ds) -{ - struct OSD_Proxy *rv = NULL; - - rv = (struct OSD_Proxy *)malloc(sizeof(struct OSD_Proxy)); - if(rv && OSD_Proxy_init(rv, osd_url, num_channels, ds)) { - OSD_Proxy_delete(rv); - rv = NULL; - } - - return rv; -} - - -/** - * Initialize osd proxy structure. - * - * This function expects a full uri (ie. including the scheme) - */ -int -OSD_Proxy_init(struct OSD_Proxy *osd, char *osd_id, int num_channels, - struct dirservice *ds) -{ - int rv = 0; - int i; -#if 0 - char *osd_url = NULL; -#endif - osd->num_channels = 0; - osd->channel = NULL; - osd->osd_id = strdup(osd_id); - -#if 0 - if (ds) { - osd_url = dirservice_resolve_uuid(ds, osd_id, OSD_DEFAULT_PORT); - } else { - osd_url = strdup(osd_id); - } - - if(ne_uri_parse(osd_url, &osd->osd_uri) || !osd->osd_uri.host) { - rv = -1; - goto finish; - } -#endif - osd->num_channels = num_channels; - osd->channel = (struct OSD_Channel **)malloc(sizeof(struct OSD_Channel *) * osd->num_channels); - if (!osd->channel) { - rv =-2; - goto finish; - } - memset((void *)osd->channel, 0, sizeof(struct OSD_Channel *) * osd->num_channels); - - for(i=0; inum_channels; i++) { - osd->channel[i] = OSD_Channel_new(osd_id, ds); - if(osd->channel[i] == NULL) { - rv = -2; - goto finish; - } - } - - osd->next_free = 0; - spin_init(&osd->lock, PTHREAD_PROCESS_PRIVATE); - -finish: -#if 0 - free(osd_url); -#endif - return rv; -} - - -void -OSD_Proxy_clear(struct OSD_Proxy *op) -{ - int i; - - if(op->channel) { - for(i=0; inum_channels; i++) - if (op->channel[i]) - OSD_Channel_delete(op->channel[i]); - free(op->channel); - } - free(op->osd_id); -#if 0 - ne_uri_free(&op->osd_uri); -#endif -} - - -void -OSD_Proxy_delete(struct OSD_Proxy *op) -{ - if(op) { - OSD_Proxy_clear(op); - spin_destroy(&op->lock); - free(op); - } -} - -int -OSD_Proxy_get(struct OSD_Proxy *op, char *req_id, - struct user_file *uf, - int obj_num, off_t first_byte, off_t last_byte, - void *buf, struct OSD_Channel_resp *resp) -{ - int rv = 0; - struct OSD_Channel *oc = NULL; - int idx; - struct bench_timer osd_proxy_timer; - - - /* TODO Check if channel is still alive, recreate it otherwise */ - - bench_timer_init(&osd_proxy_timer); - bench_timer_start(&osd_proxy_timer); - - spin_lock(&op->lock); - idx = op->next_free; - if(++(op->next_free) >= op->num_channels) - op->next_free = 0; - spin_unlock(&op->lock); - - oc = op->channel[idx]; - - pthread_mutex_lock(&oc->wait_mutex); - rv = OSD_Channel_get(oc, req_id, uf, obj_num, first_byte, last_byte, buf, resp); - pthread_mutex_unlock(&oc->wait_mutex); - - bench_timer_stop(&osd_proxy_timer); - - bench_data_collection_add(&osd_proxy_bandwidth, - (double)(last_byte - first_byte + 1) - /bench_timer_ms(&osd_proxy_timer)); - - return rv; -} - - -int -OSD_Proxy_put(struct OSD_Proxy *op, char *req_id, - struct user_file *uf, - int obj_num, off_t first_byte, off_t last_byte, - void *buf, struct OSD_Channel_resp *resp) -{ - int rv = 0; - struct OSD_Channel *oc = NULL; - int idx; - struct bench_timer osd_proxy_timer; - - bench_timer_init(&osd_proxy_timer); - bench_timer_start(&osd_proxy_timer); - - /* TODO Check if channel is still alive, recreate it otherwise */ - - dbg_msg("Putting data from %lld to %lld\n", first_byte, last_byte); - if (uf) { - dbg_msg("user file x-location: %s\n", uf->xloc->repr); - } - spin_lock(&op->lock); - idx = op->next_free; - if(++(op->next_free) >= op->num_channels) - op->next_free = 0; - spin_unlock(&op->lock); - oc = op->channel[idx]; - - pthread_mutex_lock(&oc->wait_mutex); - rv = OSD_Channel_put(oc, req_id, uf, obj_num, first_byte, last_byte, buf, resp); -#if 0 - if(rv != 0) { - rv = OSD_Channel_restart(oc); - if (!rv) { - rv = OSD_Channel_put(oc, uf, obj_num, first_byte, last_byte, buf, resp); - } - } -#endif - pthread_mutex_unlock(&oc->wait_mutex); - bench_timer_stop(&osd_proxy_timer); - - bench_data_collection_add(&osd_proxy_bandwidth, - (double)(last_byte - first_byte + 1) - / bench_timer_ms(&osd_proxy_timer)); - - return rv; -} - -int -OSD_Proxy_del(struct OSD_Proxy *op, - char *fileid, struct xloc_list *xlocs_list, - struct xcap *xcap, struct OSD_Channel_resp *resp) -{ - int rv = 0; - int idx; - struct OSD_Channel *oc; - - spin_lock(&op->lock); - idx = op->next_free; - if(++(op->next_free) >= op->num_channels) - op->next_free = 0; - spin_unlock(&op->lock); - oc = op->channel[idx]; - - pthread_mutex_lock(&oc->wait_mutex); - rv = OSD_Channel_del(oc, fileid, xlocs_list, xcap, resp); - pthread_mutex_unlock(&oc->wait_mutex); - - return rv; -} - -int -OSD_Proxy_trunc(struct OSD_Proxy *op, - char *fileid, off_t new_size, - struct xloc_list *xlocs_list, struct xcap *xcap, - struct OSD_Channel_resp *resp) -{ - int err = 0; - int idx; - struct OSD_Channel *oc; - - spin_lock(&op->lock); - idx = op->next_free; - if (++(op->next_free) >= op->num_channels) - op->next_free = 0; - spin_unlock(&op->lock); - oc = op->channel[idx]; - - pthread_mutex_lock(&oc->wait_mutex); - err = OSD_Channel_trunc(oc, fileid, new_size, xlocs_list, xcap, resp); - pthread_mutex_unlock(&oc->wait_mutex); - - return err; -} diff --git a/client/src/osd_proxy.h b/client/src/osd_proxy.h deleted file mode 100644 index 6b9fbbcf2..000000000 --- a/client/src/osd_proxy.h +++ /dev/null @@ -1,81 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -C Interface: osd_proxy - -Description: - - -Author: Matthias Hess , (C) 2007 - -Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_OSD_PROXY_H__ -#define __XTRFS_OSD_PROXY_H__ - -#include - -#include "file.h" -#include "osd_channel.h" -#include "dirservice.h" -#include "bench_timer.h" - - -extern struct bench_data_collection osd_proxy_bandwidth; - -struct OSD_Proxy { - char *osd_id; -#if 0 - ne_uri osd_uri; -#endif - int num_channels; - int next_free; - struct OSD_Channel **channel; - spinlock_t lock; -}; - -extern struct OSD_Proxy *OSD_Proxy_new(char *osd_id, int num_channels, - struct dirservice *ds); -extern int OSD_Proxy_init(struct OSD_Proxy *op, char *osd_id, int num_channels, - struct dirservice *ds); -extern void OSD_Proxy_delete(struct OSD_Proxy *op); - -extern int OSD_Proxy_get(struct OSD_Proxy *op, char *req_id, struct user_file *uf, - int obj_num, off_t first_byte, off_t last_byte, - void *buf, struct OSD_Channel_resp *resp); -extern int OSD_Proxy_put(struct OSD_Proxy *op, char *req_id, struct user_file *uf, - int obj_num, off_t first_byte, off_t last_byte, - void *buf, struct OSD_Channel_resp *resp); -extern int OSD_Proxy_del(struct OSD_Proxy *op, char *fileid, - struct xloc_list *xlocs_list, struct xcap *xcap, - struct OSD_Channel_resp *resp); -extern int OSD_Proxy_trunc(struct OSD_Proxy *op, char *fileid, off_t new_szie, - struct xloc_list *xlocs_list, struct xcap *xcap, - struct OSD_Channel_resp *resp); -extern int OSD_Proxy_heartbeat(struct OSD_Proxy *op, struct user_file); - -#endif diff --git a/client/src/osd_request.c b/client/src/osd_request.c deleted file mode 100644 index 2545670a2..000000000 --- a/client/src/osd_request.c +++ /dev/null @@ -1,100 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: osd_request -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include - -#include -#include - -#include "osd_request.h" - - -struct OSD_Request * -OSD_Request_new() -{ - struct OSD_Request *rv = NULL; - - rv = (struct OSD_Request *)malloc(sizeof(struct OSD_Request)); - if(rv != NULL && OSD_Request_init(rv) != 0) { - OSD_Request_delete(rv); - rv = NULL; - } - - return rv; -} - -int -OSD_Request_init(struct OSD_Request *or) -{ - int rv = 0; - - INIT_LIST_HEAD(&or->head); - or->id = -1; - or->command = UNDEFINED; - or->req_data = NULL; - or->resp_data = NULL; - - if((or->resp_buffer = ne_buffer_create()) == NULL) { - rv = 1; - goto finish; - } - or->error_cb = NULL; - or->finish_cb = NULL; - - pthread_mutex_init(&or->wait_mutex, NULL); - pthread_cond_init(&or->wait_cond, NULL); - -finish: - return rv; -} - -void -OSD_Request_clear(struct OSD_Request *or) -{ - -} - -void -OSD_Request_delete(struct OSD_Request *or) -{ - OSD_Request_clear(or); - pthread_cond_destroy(&or->wait_cond); - pthread_mutex_destroy(&or->wait_mutex); - free(or); -} - diff --git a/client/src/osd_request.h b/client/src/osd_request.h deleted file mode 100644 index 0ae2efdd1..000000000 --- a/client/src/osd_request.h +++ /dev/null @@ -1,84 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -C Interface: osd_request - -Description: - - -Author: Matthias Hess , (C) 2007 - -Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_OSD_REQUEST_H__ -#define __XTRFS_OSD_REQUEST_H__ - -#include - -#include - -#include "lock_utils.h" -#include "list.h" - - -typedef enum { - UNDEFINED = 0, - OSD_GET, - OSD_PUT, - OSD_DELETE, - OSD_TRUNCATE, - OSD_GET_PROT_VERS -} OSD_Com_t; - - -struct OSD_Request { - struct list_head head; - int id; - OSD_Com_t command; - char *fileID; - int epoch; - void *req_data; - void *resp_data; - ne_buffer *resp_buffer; - void *(*error_cb)(void *); - void *(*finish_cb)(void *); - pthread_cond_t wait_cond; - mutex_t wait_mutex; - - void (*free_data)(void *data); -}; - -extern struct OSD_Request *OSD_Request_new(); -extern int OSD_Request_init(struct OSD_Request *or); -extern void OSD_Request_clear(struct OSD_Request *or); -extern void OSD_Request_delete(struct OSD_Request *or); - - -extern int OSD_Request__getFile(struct OSD_Request *or, char *fileId, int objId, int firstBye, int lastByte); -extern int OSD_Request__putFile(struct OSD_Request *or, char *fileId, int objId, int firstByte, int lastBute); - -#endif diff --git a/client/src/platforms.c b/client/src/platforms.c deleted file mode 100644 index ba4a29226..000000000 --- a/client/src/platforms.c +++ /dev/null @@ -1,129 +0,0 @@ -/* Copyright (c) 2008 Felix Hupfeld - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Interface: xtreemfs -* -* Description: -* -* -* Author: Felix Hupfeld , (C) 2008 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include - -#include "platforms.h" - -#ifdef _WIN32 -int -geteuid() -{ - return 0; -} - -int -getegid() -{ - return 0; -} - -static FILE* syslog_file; - -int -openlog(const char* ident, int logopt, int facility) -{ - char logname[50]; - snprintf(logname,50,"%s.syslog",ident); - syslog_file = fopen(logname, "a+"); - if(!syslog_file) { - printf("abort: can not open %s\n", logname); - abort(); - } - return 0; -} - -void -closelog() -{ - fclose(syslog_file); -} - -void -vsyslog(int priority, const char* message, va_list args) -{ - vfprintf(syslog_file, message, args); -} - -void setlinebuf(FILE* f) {} - -void sleep(int time) -{ - _sleep(time); -} - -#define boolean win_boolean -#include - -int usleep(long usec) -{ - struct timeval tv; - fd_set dummy; - SOCKET s = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); - FD_ZERO(&dummy); - FD_SET(s, &dummy); - tv.tv_sec = usec/1000000L; - tv.tv_usec = usec%1000000L; - return select(0, 0, 0, &dummy, &tv); -} -#endif /* WIN32 */ - -#ifdef __APPLE__ - -int pthread_spin_init(pthread_spinlock_t *__lock, int __pshared) { - pthread_mutex_init(__lock,NULL); - return 0; -} - -int pthread_spin_destroy(pthread_spinlock_t *__lock) { - pthread_mutex_destroy(__lock); - return 0; -} - -int pthread_spin_lock(pthread_spinlock_t *__lock) { - return pthread_mutex_lock(__lock); -} - -int pthread_spin_trylock (pthread_spinlock_t *__lock) { - return pthread_mutex_trylock(__lock); -} - -int pthread_spin_unlock (pthread_spinlock_t *__lock) { - return pthread_mutex_unlock(__lock); -} - -#endif diff --git a/client/src/platforms.h b/client/src/platforms.h deleted file mode 100644 index d2cf47a9f..000000000 --- a/client/src/platforms.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (c) 2008 Felix Hupfeld - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Interface: xtreemfs -* -* Description: -* -* -* Author: Felix Hupfeld , (C) 2008 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#ifndef __XTRFS_PLATFORMS_H__ -#define __XTRFS_PLATFORMS_H__ - - -#ifdef _WIN32 -int geteuid(); -int getegid(); - -// simple syslog.h replacement -#include -#include -#define LOG_NOWAIT 0 -#define LOG_INFO 0 -#define LOG_USER 0 -#define LOG_PID 0 -int openlog(const char* ident, int logopt, int facility); -void vsyslog(int priority, const char* message, va_list args); -void closelog(); -void setlinebuf(FILE* ); -#endif - -#ifdef __APPLE__ -#include -#include -#include - -typedef off_t loff_t; - -typedef pthread_mutex_t pthread_spinlock_t; - -int pthread_spin_init(pthread_spinlock_t *__lock, int __pshared); - -int pthread_spin_destroy(pthread_spinlock_t *__lock); - -int pthread_spin_lock(pthread_spinlock_t *__lock); - -int pthread_spin_trylock (pthread_spinlock_t *__lock); - -int pthread_spin_unlock (pthread_spinlock_t *__lock); - -#endif - - -#endif diff --git a/client/src/pseudo_rcu.h b/client/src/pseudo_rcu.h deleted file mode 100644 index 0dc96e28a..000000000 --- a/client/src/pseudo_rcu.h +++ /dev/null @@ -1,64 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - C Interface: pseudo_rcu - - Description: - Pseudo RCU implementation with Linux kernel RCU API. - - Author: Matthias Hess , (C) 2007 - - Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_PSEUDO_RCU__ -#define __XTRFS_PSEDUO_RCU__ - -struct rcu_head { - -}; - -#define rcu_assign_pointer(p, v) ({ \ - smp_wmb(); \ - (p) = (v); \ - }) - -#define rcu_dereference(p) ({ \ - typeof(p) _________p1 = p; \ - smp_read_barrier_depends(); \ - (_________p1); \ - }) - - -extern void rcu_read_lock(void); -extern void rcu_read_unlock(void); - -extern void synchronize_rcu(void); - -extern void call_rcu(struct rcu_head *head, - void (*func)(struct rcu_head *head)); - -#endif diff --git a/client/src/radix-tree.c b/client/src/radix-tree.c deleted file mode 100644 index 5a539dac1..000000000 --- a/client/src/radix-tree.c +++ /dev/null @@ -1,370 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: radix-tree -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include - -#include "logger.h" - -#include "radix-tree.h" -#include "list.h" -#include "kernel_substitutes.h" - -struct radix_tree_path { - struct radix_tree_node *node; - int offset; -}; - -static struct radix_tree_node * -radix_tree_node_alloc(struct radix_tree_root *root) -{ - struct radix_tree_node *ret = NULL; - - ret = (struct radix_tree_node *)malloc(sizeof(*ret)); - if (ret) - memset((void *)ret, 0, sizeof(*ret)); - spin_init(&ret->lock, PTHREAD_PROCESS_PRIVATE); - - return ret; -} - -static inline void -radix_tree_node_free(struct radix_tree_node *node) -{ - spin_destroy(&node->lock); - free(node); -} - -static inline unsigned long radix_tree_maxindex(unsigned int height) -{ - unsigned int tmp = height * RADIX_TREE_MAP_SHIFT; - unsigned long index = (~0UL >> (RADIX_TREE_INDEX_BITS - tmp - 1)) >> 1; - - if (tmp >= RADIX_TREE_INDEX_BITS) - index = ~0UL; - return index; -} - -static inline void tag_set(struct radix_tree_node *node, unsigned int tag, - int offset) -{ -} - -static inline void tag_clear(struct radix_tree_node *node, unsigned int tag, - int offset) -{ -} - -static inline int tag_get(struct radix_tree_node *node, unsigned int tag, - int offset) -{ - return 0; -} - -static inline void root_tag_set(struct radix_tree_root *root, unsigned int tag) -{ -} - -static inline void root_tag_clear(struct radix_tree_root *root, unsigned int tag) -{ -} - -static inline void root_tag_clear_all(struct radix_tree_root *root) -{ -} - - -static inline int root_tag_get(struct radix_tree_root *root, unsigned int tag) -{ - return 0; -} - -static int radix_tree_extend(struct radix_tree_root *root, unsigned long index) -{ - struct radix_tree_node *node; - unsigned int height; - int tag; - - height = root->height + 1; - while (index > radix_tree_maxindex(height)) - height++; - - if (root->rnode == NULL) { - root->height = height; - goto out; - } - - do { - unsigned int newheight; - if (!(node = radix_tree_node_alloc(root))) - return -ENOMEM; - - node->slots[0] = radix_tree_direct_to_ptr(root->rnode); - - for (tag = 0; tag < RADIX_TREE_MAX_TAGS; tag++) { - if (root_tag_get(root, tag)) - tag_set(node, tag, 0); - } - - newheight = root->height+1; - node->height = newheight; - node->count = 1; - root->rnode = node; - root->height = newheight; - } while (height > root->height); -out: - return 0; -} - -static inline void radix_tree_shrink(struct radix_tree_root *root) -{ - /* try to shrink tree height */ - while (root->height > 0 && - root->rnode->count == 1 && - root->rnode->slots[0]) { - struct radix_tree_node *to_free = root->rnode; - void *newptr; - - newptr = to_free->slots[0]; - if (root->height == 1) - newptr = radix_tree_ptr_to_direct(newptr); - root->rnode = newptr; - root->height--; - /* must only free zeroed nodes into the slab */ - tag_clear(to_free, 0, 0); - tag_clear(to_free, 1, 0); - to_free->slots[0] = NULL; - to_free->count = 0; - radix_tree_node_free(to_free); - } -} - -int radix_tree_insert(struct radix_tree_root *root, - unsigned long index, void *item) -{ - struct radix_tree_node *node = NULL, *slot = NULL; - unsigned int height, shift; - int offset; - int error; - - if (radix_tree_is_direct_ptr(item)) { - dbg_msg("Item is a direct pointer.\n"); - return 1; - } - - /* Make sure the tree is high enough */ - if (index > radix_tree_maxindex(root->height)) { - error = radix_tree_extend(root, index); - if (error) { - dbg_msg("Error while extending radix tree."); - return error; - } - } - - slot = root->rnode; - height = root->height; - shift = (height-1) * RADIX_TREE_MAP_SHIFT; - - offset = 0; - while (height > 0) { - if (slot == NULL) { - if (!(slot = radix_tree_node_alloc(root))) { - dbg_msg("Cannot allocate new slot.\n"); - return -ENOMEM; - } - slot->height = height; - if (node) { - spin_lock(&node->lock); - node->slots[offset] = slot; - node->count++; - spin_unlock(&node->lock); - } else - root->rnode = slot; - } - - offset = (index >> shift) & RADIX_TREE_MAP_MASK; - node = slot; - spin_lock(&node->lock); - slot = node->slots[offset]; - spin_unlock(&node->lock); - shift -= RADIX_TREE_MAP_SHIFT; - height--; - } - - if (slot != NULL) { - dbg_msg("Slot already exists.\n"); - return -EEXIST; - } - - if (node) { - spin_lock(&node->lock); - node->count++; - node->slots[offset] = item; - spin_unlock(&node->lock); - } else { - root->rnode = radix_tree_ptr_to_direct(item); - } - - dbg_msg("Inserted item successfully.\n"); - - return 0; -} - -void *radix_tree_delete(struct radix_tree_root *root, unsigned long index) -{ - struct radix_tree_path path[RADIX_TREE_MAX_PATH], *pathp = path; - struct radix_tree_node *slot = NULL; - struct radix_tree_node *to_free; - unsigned int height, shift; - int tag; - int offset; - - height = root->height; - if (index > radix_tree_maxindex(height)) - goto out; - - slot = root->rnode; - if (height == 0 && root->rnode) { - slot = radix_tree_direct_to_ptr(slot); - root_tag_clear_all(root); - root->rnode = NULL; - goto out; - } - - shift = (height - 1) * RADIX_TREE_MAP_SHIFT; - pathp->node = NULL; - - do { - if (slot == NULL) - goto out; - - pathp++; - offset = (index >> shift) & RADIX_TREE_MAP_MASK; - pathp->offset = offset; - pathp->node = slot; - slot = slot->slots[offset]; - shift -= RADIX_TREE_MAP_SHIFT; - height--; - } while (height > 0); - - if (slot == NULL) - goto out; - - for (tag = 0; tag < RADIX_TREE_MAX_TAGS; tag++) { - if (tag_get(pathp->node, tag, pathp->offset)) - radix_tree_tag_clear(root, index, tag); - } - - to_free = NULL; - /* Now free the nodes we do not need anymore */ - while (pathp->node) { - pathp->node->slots[pathp->offset] = NULL; - pathp->node->count--; - /* - * Queue the node for deferred freeing after the - * last reference to it disappears (set NULL, above) - */ - if (to_free) - radix_tree_node_free(to_free); - - if(pathp->node->count) { - if (pathp->node == root->rnode) - radix_tree_shrink(root); - goto out; - } - - /* Node with zero slots in use so free it */ - to_free = pathp->node; - pathp--; - } - root_tag_clear_all(root); - root->height = 0; - root->rnode = NULL; - if (to_free) - radix_tree_node_free(to_free); - -out: - return slot; -} - -void *radix_tree_lookup(struct radix_tree_root *root, unsigned long index) -{ - unsigned int height, shift; - struct radix_tree_node *node, **slot; - - node = root->rnode; - if (node == NULL) - return NULL; - - if (radix_tree_is_direct_ptr(node)) { - if (index > 0) - return NULL; - return radix_tree_direct_to_ptr(node); - } - - height = node->height; - if (index > radix_tree_maxindex(height)) - return NULL; - - shift = (height-1) * RADIX_TREE_MAP_SHIFT; - - do { - spin_lock(&node->lock); - slot = (struct radix_tree_node **) - (node->slots + ((index>>shift) & RADIX_TREE_MAP_MASK)); - spin_unlock(&node->lock); - node = *slot; - if (node == NULL) - return NULL; - - shift -= RADIX_TREE_MAP_SHIFT; - height--; - } while (height > 0); - - return node; -} - -void *radix_tree_tag_clear(struct radix_tree_root *root, - unsigned long index, unsigned int tag) -{ - return NULL; -} - -void radix_tree_print(struct radix_tree_root *root) -{ - -} diff --git a/client/src/radix-tree.h b/client/src/radix-tree.h deleted file mode 100644 index f909c0354..000000000 --- a/client/src/radix-tree.h +++ /dev/null @@ -1,132 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - C Interface: radix-tree - - Description: - - This is the XtreemFS adaption of the Linux kernel radix tree. - Radix trees will be used for file object caching. - - Changes done by Matthias Hess mhess at hpce dot nec dot com - - Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_RADIX_TREE__ -#define __XTRFS_RADIX_TREE__ - -#include -#include - -#include "pseudo_rcu.h" -#include "lock_utils.h" - -#define RADIX_TREE_MAP_SHIFT 6 -#define RADIX_TREE_MAP_SIZE (1UL << RADIX_TREE_MAP_SHIFT) -#define RADIX_TREE_MAP_MASK (RADIX_TREE_MAP_SIZE-1) - -#define RADIX_TREE_TAG_LONGS \ - ((RADIX_TREE_MAP_SIZE + (sizeof(long)<<3) - 1) / (sizeof(long) << 3)) -#define RADIX_TREE_MAX_TAGS 2 - -#define RADIX_TREE_INDEX_BITS (8 * sizeof(unsigned long)) -#define RADIX_TREE_MAX_PATH (RADIX_TREE_INDEX_BITS/RADIX_TREE_MAP_SHIFT + 2) - -/* In order to indicate the different kinds of slots, the linux kernel uses - a bit in an address to indicate the kind of pointer (direct or further node) */ -#define RADIX_TREE_DIRECT_PTR 1 - -static inline void *radix_tree_ptr_to_direct(void *ptr) -{ - return (void *)((uintptr_t)ptr | RADIX_TREE_DIRECT_PTR); -} - -static inline void *radix_tree_direct_to_ptr(void *ptr) -{ - return (void *)((uintptr_t)ptr & ~RADIX_TREE_DIRECT_PTR); -} - -static inline int radix_tree_is_direct_ptr(void *ptr) -{ - return (int)((uintptr_t)ptr & RADIX_TREE_DIRECT_PTR); -} - - -struct radix_tree_node { - unsigned int height; - unsigned int count; - void *slots[RADIX_TREE_MAP_SIZE]; - unsigned long tags[RADIX_TREE_MAX_TAGS][RADIX_TREE_TAG_LONGS]; - - /* Deviation from kernel interface */ - spinlock_t lock; -}; - - -struct radix_tree_root { - unsigned int height; - unsigned int gfp_mask; - struct radix_tree_node *rnode; -}; - -#define RADIX_TREE_INIT(mask) { \ - .height = 0, \ - .gfp_mask = (mask), \ - .rnode = NULL, \ -} - -#define RADIX_TREE(name, mask) \ - struct radix_tree_root name = RADIX_TREE_INIT(mask) - -#define INIT_RADIX_TREE(root, mask) \ -do { \ - (root)->height = 0; \ - (root)->gfp_mask = (mask); \ - (root)->rnode = NULL; \ -} while (0) - - -extern int radix_tree_insert(struct radix_tree_root *root, - unsigned long index, void *item); -extern void *radix_tree_delete(struct radix_tree_root *root, - unsigned long index); - -extern void **radix_tree_lookup_slot(struct radix_tree_root *root, - unsigned long index); -extern void *radix_tree_lookup(struct radix_tree_root *root, - unsigned long index); - -extern void *radix_tree_tag_set(struct radix_tree_root *root, - unsigned long index, unsigned int tag); -extern void *radix_tree_tag_clear(struct radix_tree_root *root, - unsigned long index, unsigned int tag); -extern int radix_tree_tag_get(struct radix_tree_root *root, - unsigned long index, unsigned int tag); - -extern int radix_tree_tagged(struct radix_tree_root *root, unsigned int tag); - -#endif diff --git a/client/src/request.c b/client/src/request.c deleted file mode 100644 index ee49b5392..000000000 --- a/client/src/request.c +++ /dev/null @@ -1,232 +0,0 @@ -/* Copyright (c) 2007, 2008 Erich Focht, Matthias Hess - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/** - * Request related functions. - * - * - * @author: Erich Focht , Matthias Hess - */ - -#include -#include -#include -#include -#include -#include - -#include "request.h" -#include "workqueue.h" -#include "lock_utils.h" -#include "logger.h" - -char *reqstate_name[] = { - "NEW", - "PROCESSING", - "WAIT_CHLD", - "FINISHED", - "CHLD_ERR", - "TIMEOUT", - "ERROR" -}; - -#ifdef _WIN32 -#include -#define ECANCELED WSAECANCELLED -#endif - -/** - * Create a request with payload. - * - * @param data the payload: pointer to a structure describing the request - * work and parameters - * @param result storage for the result of the operation described by - * the request - * @return pointer to a new request structure - */ -struct req *req_create(int type, void *data, void *result, - struct req *parent) -{ - struct req *r; - - r = (struct req *) malloc(sizeof(struct req)); - if (r) { - INIT_LIST_HEAD(&r->q); - INIT_LIST_HEAD(&r->rlist); - r->wq = NULL; - - r->id = NULL; - r->type = type; - r->state = REQ_STATE_NEW; - r->data = data; - r->result = result; - r->error = 0; - - r->parent = parent; - atomic_set(&r->use_count, 1); - atomic_set(&r->active_children, 0); - atomic_set(&r->wait, 0); - - pthread_cond_init(&r->waitc, NULL); - pthread_mutex_init(&r->waitm, NULL); - - r->del_data = NULL; - r->del_result = NULL; - - dbg_msg("created req %p\n",r); - } - - return r; -} - -/** - * Mark a request and its children as ABORTED, i.e. set it to ERROR state - * and set the error value to ECANCELED. - */ -void req_abort(struct req *req) -{ - req->state = REQ_STATE_ERROR; - req->error = ECANCELED; -} - -/** - * Wait until a request finishes. - * - * Put the current task to sleep and wait to be woken up. - * The request use_count is decremented here with req_put(), but could actually - * be taken out and used by the caller of req_wait() and give it the chance to - * use the request and data inside it. - * - * The request must be there when we enter this routine. It means we must - * enqueue the request with nonzero "wait". - * - * @param r the request we want to wait for - * @return 0 if all went well, req->error (non-zero) if error occured. - */ -int req_wait(struct req *r) -{ - int res = 0; - struct req *or = r; - - dbg_msg("going to sleep on request %p\n", r); - atomic_inc(&r->use_count); /* increment use_count for each waiter */ - dbg_msg("Use count: %d\n", atomic_read(&r->use_count)); - - if (pthread_mutex_lock(&r->waitm)) { - err_msg("req_wait pthread_mutex_lock failed, tid %p\n", - pthread_self()); - //pthread_exit(NULL); - return -1; - } - - if (REQ_STATE_DONE(r)) { - dbg_msg("Not going to sleep!\n"); - goto out; - } - - dbg_msg("Really going to sleep on request %p\n", r); - - if (pthread_cond_wait(&r->waitc, &r->waitm)) { - err_msg("something went wrong while waking up waiters\n"); - res = -1; - } - -out: - if (r->error) - res = r->error; - else if (r->state == REQ_STATE_ERROR) - res = -1; - - pthread_mutex_unlock(&r->waitm); - req_put(r); - dbg_msg("returned from sleep on request %p\n", or); - return res; -} - -void req_del(struct req *r) -{ - dbg_msg("Deleting req %p\n", r); - req_state_set(r, REQ_STATE_DELETED); - if (r->del_data && r->data) - r->del_data(r->data); - if (r->del_result && r->result) - r->del_result(r->result); - free(r->id); - free(r); -} - -/** - * Decrement use count of a request, if it reaches zero, free the request. - * Don't free the request if we are in an error condition. (Why actually not?) - * - * @param r request - * @return 0 if no error condition, error code otherwise - */ -void req_put(struct req *r) -{ - dbg_msg("Request use count %d with %d children\n", - atomic_read(&r->use_count), - atomic_read(&r->active_children)); - - if (atomic_dec_return(&r->use_count) == 0) { - dbg_msg("Destroying request (active children: %d)\n", - atomic_read(&r->active_children)); - // dequeue from workqueue, if still enqueued - if (r->wq) - workqueue_deq_req(r->wq, r); - req_del(r); - } else { - dbg_msg("Not destroying request %p (%d)\n", - r, atomic_read(&r->use_count)); - } -} - -/** - * Wake up threads waiting for one request. - * - * @param r request on which threads are waiting. - */ -void wake_req_waiters(struct req *r) -{ - pthread_mutex_lock(&r->waitm); // TODO: is this really needed? - trace_msg("waking up waiters on request %p\n", r); - pthread_cond_broadcast(&r->waitc); - pthread_mutex_unlock(&r->waitm); // TODO: is this really needed? -} - -/** - * Print request info - * - * @param req Request to print - */ -void req_print(struct req *req) -{ - info_msg("Req addr: %p\n", req); - info_msg("Req type: %d\n", req->type); - info_msg("Req state: %d\n", req->state); - info_msg("Req num children: %d\n", atomic_read(&req->active_children)); - info_msg("Req use count: %d\n", atomic_read(&req->use_count)); - info_msg("Req parent: %p\n", req->parent); - info_msg("- - -\n"); -} diff --git a/client/src/request.h b/client/src/request.h deleted file mode 100644 index 77de6c618..000000000 --- a/client/src/request.h +++ /dev/null @@ -1,295 +0,0 @@ -/* Copyright (c) 2007, 2008 Erich Focht, Matthias Hess - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#ifndef __XTRFS_REQUEST_H__ -#define __XTRFS_REQUEST_H__ - -/** - \file request.h - Common request header. - - Rationale: - The general architecture of the client is built as a set of worker components - which receive their work requests in FIFO queues. This architecture is - scalable and extensible. New components can be added in between the old ones - without the need to rewrite or adapt the old components. Each component can - have several worker threads and thus be scaled to provide higher throughput. - - A request's life cycle: - - A work request is added to the tail of the input queue of a particular - component. - - The worker component's thread (or one of its threads) picks a request - from the head of the input queue, chains it into the "wait-for-completion" - queue (the output queue) and processes the request. During processing - children requests can be created. These are linked into the original - request's structure. - - The work to be done by the worker thread is defined in the *data element - of the request. - - When the request is finished, it is dequeued from the output queue. A - request is considered unfinished if it has outstanding child requests. - - A request specific callback is invoked. It's tasks are: - - Unlink the request from the "wait-for-completion" queue. - - Finish up the request's work. - - Unlink the request from the parent's children queue. - - Delete the request. - - If the parent request's state is "WAIT_CHLD" and the children - queue is empty, execute the parent request's callback. - - Callbacks are invoked with the request structure as argument. This allow them - to dequeue themselves and access the request data. The request data is - usually a pointer to a structure containing the parameters/arguments required - for the request work as well as space for the results. - - Deleting a request does not imply deleting the data. Sometimes the request - data is a result that is needed (for example a file object, it will be added - to the file-objects belonging to an open-file). If the data needs to be - deleted, this is the task of the request specific callback. Being request - (type) specific it will have the full information on how to handle the - deletion correctly. - - The linking between request parents and children is needed in order to handle - in simple way the waiting for finishing children as well as propagating - errors and request aborts. - - The described structure allows for asynchronous communication between worker - components, request chains and handles parent-child interrequest - relationships in reasonably simple and generic way. It can handle - - An example for a request chain is: - [file] -> fileop -> file_obj -> stripe_obj -> osd_comm - - - @author: Erich Focht -*/ - -#include -#include - -#include "kernel_substitutes.h" -#include "list.h" -#include "lock_utils.h" - -#define REQ_STATE_DONE(x) \ - (((x)->state != REQ_STATE_NEW) && \ - ((x)->state != REQ_STATE_PROCESSING) && \ - ((x)->state != REQ_STATE_WAIT_CHLD)) - -/* Forward declaration */ -struct work_queue; - -/** - \enum req_state - Request states. - During its processing cycle a request goes through a few states. - - NEW : request is NEW, just queued into the incoming queue - - PROCESSING : request is being processed (and usually in the output queue) - - WAIT_CHLD : waiting for the child requests to be finished - - FINISHED : request has been finished without errors - - CHLD_ERR : children had an error - - ERROR : this request is lost and has produced an error - - TIMEOUT ? Shouldn't this be implicit? - - DEQUEUING ? Is this needed? - - In PROCESSING state the callback can't be executed. Before a worker thread - is finished with a request it needs to check for the existence of children. - If children exist, the request will be switched to the state WAIT_CHLD and - the callback will be executed by the last child who dequeues itself from the - children queue. If no children exist, the request will go to CALLBACK mode - and its callback will be executed by the worker thread. - - Some states could be avoided by dequeueing the request while processing it. - Rethink the states! -*/ -enum req_state { - REQ_STATE_NEW = 0, - REQ_STATE_QUEUED, - REQ_STATE_PROCESSING, - REQ_STATE_WAIT_CHLD, - REQ_STATE_FINISHED, - REQ_STATE_CHLD_ERR, - REQ_STATE_TIMEOUT, - REQ_STATE_ERROR, - REQ_STATE_DELETED /* For debugging purposes only */ -}; - - -extern char *reqstate_name[]; - -/** - * Request types - * - * The work for one request can be splitted in several pieces, - * the splitting being motivated by blocking operations boundaries. - * We are sorting the request types in order to be able to check the - * validity of requests easilly in the stage(s). - */ - -#define REQ_BLOCK_MASK 0x00000100 -#define REQ_IDX_MASK 0x000000ff - -#define REQ_BLOCKING 0x00000100 - -#define REQ_FILERW_READ (REQ_BLOCKING + 0) -#define REQ_FILERW_WRITE (REQ_BLOCKING + 1) -#define REQ_FILERW_FOBJ_DONE (2) - -#define REQ_FOBJ_READ (3) -#define REQ_FOBJ_WRITE (4) -#define REQ_FOBJ_SOBJ_DONE (5) - -#define REQ_TRANSL_READ (0) -#define REQ_TRANSL_WRITE (1) - -#define REQ_SOBJ_READ (0) -#define REQ_SOBJ_WRITE (1) -#define REQ_SOBJ_READ_CACHE (2) -#define REQ_SOBJ_WRITE_CACHE (3) - -#define REQ_HTTP_READ_HEAD (0) -#define REQ_HTTP_READ_FINISH (1) - -#define REQ_MRC_EXEC_FUNC (REQ_BLOCKING + 0) -#define REQ_MRC_EXEC_FUNC_FINISH (1) - - -/** - * Request structure common header. - * - * Common header for every request. The lock needs to be held for changing the - * request state or manipulating the children list. The data pointer contains - * the payload of a request. The work which needs to be done for the request - * is defined by the work-queue in which the request is queued (i.e. the - * handler or stage it is targetted for. Details for the work to be done are - * in the payload. - */ - -struct req { - /* Managing request queues */ - struct list_head q; /*!< list head for queueing a request */ - struct list_head rlist; /*!< list head for setting request aside - while processing */ - struct work_queue *wq; /*!< To which queue does this request - belong? Used to delete a request - properly. */ - - char *id; /*!< For tracing request IDs can be used. - if id == NULL it will be neglectedt. */ - /* Context and state of request */ - int type; /*!< request type */ - enum req_state state; - void *data; /*!< payload of the request, usually input - data and results data for all children */ - void *result; /*!< pointer to result data of THIS request */ - int error; /*!< error info from THIS request */ - struct req *parent; /*!< pointer to parent request */ - - atomic_t active_children; /*!< number of active children */ - atomic_t use_count; /*!< right now only for waiter */ - atomic_t wait; - - /* Make it possible to wait for this request */ - mutex_t waitm; /*!< mutex for waiting threads */ - pthread_cond_t waitc; /*!< condition variable for waiting threads */ - - void (*del_data)(void *data); /*!< If set indicates that the request - owns the data and can delete it - once the request is finished. */ - void (*del_result)(void *result); /*!< If set indicates that the request - outer response structure may be - deleted when the request finishes. */ -}; - -/** - * Create a request with payload. - * - * @param data the payload: pointer to a structure describing the request - * work and parameters - * @param callback callback running when the request finishes - * @param parent parent request (if any) - * @return pointer to a new request structure - */ -extern struct req *req_create(int type, void *data, void *response, - struct req *parent); - -extern void req_put(struct req *req); - -/** - * Set a request's state. - * - */ -static inline void req_state_set(struct req *req, enum req_state state) -{ - req->state = state; -} - -/** - * Get a request's state. - * - */ -static inline enum req_state req_state(struct req *req) -{ - return req->state; -} - -/** - * Mark a request and its children as ABORTED. - * - * This routine is called recursively. The parent's lock is held - * during the recursion, so make sure this doesn't deadlock! - */ -void req_abort(struct req *req); - -/** - * Wait until a request finishes. - * - * Put the current task to sleep and wait to be woken up. - * - * There is a risk that the request is not there when getting into this - * routine. In order to find it we'd need to know the workqueue, take the - * work queue locks and scan the input and output queues for the request. - * Not sure this is ever needed (more than one waiter for the req). - * - * @param r the request we want to wait for - * @return 0 if all went well, req->error (non-zero) if error occured. - */ -extern int req_wait(struct req *r); - -extern void req_del(struct req *r); - -/** - * Wake up threads waiting for one request. - * - * @param r request on which threads are waiting. - */ -extern void wake_req_waiters(struct req *r); - -/** - * Output information contained in a request - * - * @param req Request to print - */ -void req_print(struct req *req); - - -#endif // __XTRFS_REQUEST_H__ diff --git a/client/src/signals.c b/client/src/signals.c deleted file mode 100644 index 23f849efc..000000000 --- a/client/src/signals.c +++ /dev/null @@ -1,144 +0,0 @@ -/* Copyright (c) 2007, 2008 Erich Focht, Matthias Hess - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/** - * Signal handlers. - * - * SIGUSR1: display state information of all workqueues and requests. - * - * @author (c) 2007 Erich Focht - */ - -#include -#include -#include - -#include "xtreemfs.h" -#include "workqueue.h" -#include "filerw.h" -#include "stripe.h" -#include "logger.h" -#include "mrc_comm.h" - -#ifndef _WIN32 -/* static struct sigaction oldsigusr1, oldalrm; */ -static sigset_t newsigset, oldsigset; -static pthread_t usr1_thread; - -static atomic_t sighandler_running; - -/** - * Signal handler for SIGUSR1 - * - * When a signal is received print the workqueue states to the log. - * Multi-threaded signal handling can be quite tricky... especially - * with the simple locking schemes we use in XtreemFS. So we introduce - * a new thread that only awakens on a USR1 signal. - */ -static void *usr1_sighandler_thread(void *data) -{ - sigset_t newset; - int signum; - - /* USR1 Signals delivered during printing will be ignored. */ - - while(atomic_read(&sighandler_running)) { - sigemptyset(&newset); - sigaddset(&newset, SIGUSR1);\ - if (!sigwait(&newset, &signum) && atomic_read(&sighandler_running)) { - if (signum != SIGUSR1) { - err_msg("USR1 handler received a signal that it does not deal with!\n"); - break; - } - info_msg("USR1USR1USR1USR1USR1USR1USR1USR1USR1USR1\n"); - workqueue_print(mrccomm_wq, print_mrccomm_info); - workqueue_print(filerw_wq, print_filerw_info); - workqueue_print(fobj_wq, print_fobj_info); - workqueue_print(sobj_wq, print_sobj_info); - file_inv_print(&file_inv); - xcap_inv_print(&xcap_inv); - info_msg("USR1USR1USR1USR1USR1USR1USR1USR1USR1USR1\n"); - } - } - return NULL; -} -#endif /* _WIN32 */ - -/** - * Install signal handler. - * - */ -int sighandler_install(void) -{ - int err = 0; -#ifndef _WIN32 - /* struct sigaction sa; */ - - /* This is not really part of setting up the usr1 sig handler... - ... maybe it should better go into the init of xtreemfs */ - sigemptyset(&newsigset); - sigaddset(&newsigset, SIGALRM); - sigaddset(&newsigset, SIGUSR1); - pthread_sigmask(SIG_BLOCK, &newsigset, &oldsigset); - - atomic_set(&sighandler_running, 1); - pthread_create(&usr1_thread, NULL, usr1_sighandler_thread, NULL); - - /* Setting up a simple signal handler might lead to deadlocks if the - handler tries to lock a mutex or spin lock that the interrupted - thread already had locked before So we will remove the following - entries. */ - -#if 0 - memset((void *)&sa, 0, sizeof(sa)); - sa.sa_handler = usr1_sighandler; - sigfillset(&sa.sa_mask); - err = sigaction(SIGUSR1, &sa, &oldsigusr1); - if (!err) { - info_msg("Initialized SIGUSR1 signal handler.\n"); - info_msg("Old handler was set to %p\n", oldsigusr1.sa_handler); - } else - err_msg("Failed to initialize SIGUSR1 signal handler.\n"); -#endif - -#if 0 - sa.sa_handler = SIG_IGN; - sigfillset(&sa.sa_mask); - err = sigaction(SIGALRM, &sa, &oldalrm); - if (!err) - info_msg("Initialized SIGALRM handler.\n"); - else - err_msg("Failed to initialize SIGALRM signal handler.\n"); -#endif -#endif - - return err; -} - -void sighandler_stop(void) -{ - atomic_set(&sighandler_running, 0); - pthread_kill(usr1_thread, SIGUSR1); - pthread_join(usr1_thread, NULL); -} diff --git a/client/src/sobj_cache.c b/client/src/sobj_cache.c deleted file mode 100644 index 87a12d23f..000000000 --- a/client/src/sobj_cache.c +++ /dev/null @@ -1,568 +0,0 @@ -/* This file is part of the XtreemFS client. - - XtreemFS client 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. - - The XtreemFS client 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 XtreemFS client. If not, see . - */ - - -/* C Implementation: sobj_cache - - Description: - The stripe object cache is used to accelerate operations on stripe - objects, as they occur in RAID operations, for instance. - As different replica of the same file might have different stripe - layouts having one cache per replica makes handling of stripe - objects easier. Otherwise there must be conversion units that convert - one stripe layout into another. This could be one of the next steps, - though. - The cache is organized in two levels: One level manages different - replica and associated with this top level is a second level that - manages the data within each replica. - - The original idea was to have two very simple functions to access the - cache 'sobj_cache_{write|read}_sobj'. These functions would have been - synchronous and as such they do not fit into the new scheme with single - workqueues. - So an asynchronous interface must be developed... - - Author: Matthias Hess , (C) 2008 - - Copyright: See COPYING file that comes with this distribution - */ - -#include -#include - -#include "kernel_substitutes.h" -#include "sobj_cache.h" -#include "obj_set.h" - -/** - * This is the 'handle' that is used for assembling - * sobj cache operations that need to be done quasi-atomically - * (like gathering several stripe objects at once for RAID calc.) - */ -struct sobj_handle { - struct sobj_cache *cache; /*!< Object cache for an operation - (in cluster mode there might - be several) */ - struct file_replica *repl; /*!< This is an indicator into the - first level of sobj cache */ - int op; /*!< Operation type for handle (read/write) */ - struct obj_set *objects; /*!< Obj set affected by an operation */ - struct request *req; /*!< Request to be pushed into transl - stage */ -}; - -static void sobj_handle_destroy(struct sobj_handle *shandle) -{ - free(shandle); -} - -static int sobj_handle_init(struct sobj_handle *shandle, - struct sobj_cache *sobj_cache, - struct file_replica *repl) -{ - int err = 0; - - shandle->cache = sobj_cache; - shandle->repl = repl; - shandle->op = -1; - - shandle->objects = obj_set_new(5); - if (!shandle) { - err = 1; - goto out; - } - - -out: - return err; -} - - -static struct sobj_handle *sobj_handle_new(struct sobj_cache *sobj_cache, - struct file_replica *repl) -{ - struct sobj_handle *rv = NULL; - - rv = (struct sobj_handle *)malloc(sizeof(struct sobj_handle)); - if (rv && sobj_handle_init(rv, sobj_cache, repl)) { - sobj_handle_destroy(rv); - rv = NULL; - } - - return rv; -} - - - -struct sobj_cache_data_entry * -sobj_cache_data_entry_new(int obj_size) -{ - struct sobj_cache_data_entry *rv = NULL; - - rv = (struct sobj_cache_data_entry *) - malloc(sizeof(struct sobj_cache_data_entry)); - if (rv && sobj_cache_data_entry_init(rv, obj_size)) { - sobj_cache_data_entry_destroy(rv); - rv = NULL; - } - - return rv; -} - -int -sobj_cache_data_entry_init(struct sobj_cache_data_entry *scde, - int obj_size) -{ - int err = 0; - - scde->data = malloc(obj_size); - if (!scde->data) { - err = 1; - goto out; - } - - scde->version = -1; - scde->state = SCE_UNDEFINED; - scde->lease = NULL; - INIT_LIST_HEAD(&scde->head); - -out: - if (err && scde->data) - free(scde->data); - - return err; -} - -void -sobj_cache_data_entry_del_contents(struct sobj_cache_data_entry *scde) -{ - free(scde->data); - scde->data = NULL; -} - -void -sobj_cache_data_entry_destroy(struct sobj_cache_data_entry *scde) -{ - sobj_cache_data_entry_del_contents(scde); - free(scde); -} - - -struct sobj_cache_repl_entry * -sobj_cache_repl_entry_new(struct file_replica *replica) -{ - struct sobj_cache_repl_entry *rv = NULL; - - rv = (struct sobj_cache_repl_entry *) - malloc(sizeof(struct sobj_cache_repl_entry)); - if (rv && sobj_cache_repl_entry_init(rv, replica)) { - sobj_cache_repl_entry_destroy(rv); - rv = NULL; - } - - return rv; -} - -int sobj_cache_repl_entry_init(struct sobj_cache_repl_entry *scre, - struct file_replica *replica) -{ - int err = 0; - - err = hash_table_entry_init(&scre->hentry, replica->id); - - return err; -} - -void sobj_cache_repl_entry_del_contents(struct sobj_cache_repl_entry *scre) -{ - -} - - -void sobj_cache_repl_entry_destroy(struct sobj_cache_repl_entry *scre) -{ - sobj_cache_repl_entry_del_contents(scre); - free(scre); -} - - -/** - * This is the hash function for the stripe object cache. - * It should most likely be replaced by something more - * sophisticated. - */ -static hash_idx_t sobj_cache_hash_func(void *key) -{ - hash_idx_t rv = -1; - unsigned char *str = (unsigned char *)key; - int l = strlen((char *)str); - int i; - - for (i=0, rv=0; ireplica = hash_table_new(100, - sobj_cache_hash_func, - sobj_cache_hash_cmp, - sobj_cache_hash_del); - if (soc->replica) - err = 1; - - return err; -} - -void sobj_cache_del_contents(struct sobj_cache *soc) -{ - -} - -void sobj_cache_destroy(struct sobj_cache *soc) -{ - sobj_cache_del_contents(soc); - free(soc); -} - - -struct sobj_cache_repl_entry * -sobj_cache_add_replica(struct sobj_cache *soc, - struct file_replica *replica, - int lock, - int *err) -{ - struct sobj_cache_repl_entry *rv = NULL; - struct hash_table_entry *hte = NULL; - int ret = 0; - - rv = sobj_cache_repl_entry_new(replica); - ret = hash_table_insert_entry(soc->replica, &rv->hentry, lock); - if (!ret) { - *err = ret; - goto out; - } - -out: - if (err && rv) { - sobj_cache_repl_entry_destroy(rv); - rv = NULL; - } - - return rv; -} - - -struct sobj_cache_repl_entry * -sobj_cache_find_repl_entry(struct sobj_cache *soc, - struct file_replica *replica, - int lock) -{ - struct sobj_cache_repl_entry *rv = NULL; - struct hash_table_entry *hte = NULL; - int err = 0; - - hte = hash_table_find(soc->replica, (void *)replica->id, lock); - if (!hte) /* Entry not found */ - goto out; - - rv = container_of(hte, struct sobj_cache_repl_entry, hentry); - -out: - return rv; -} - - -/** - * Get an entry for a replica from the stripe object cache. - * - * If the entry is not in our cache, we create a new one. - */ -struct sobj_cache_repl_entry * -sobj_cache_get_repl_entry(struct sobj_cache *soc, - struct file_replica *replica, - int locked) -{ - struct sobj_cache_repl_entry *rv = NULL; - int err = 0; - - /* First, try to find the replica in our inventory */ - rv = sobj_cache_find_repl_entry(soc, replica, 0); - if (rv) - goto out; - - /* Nope, we do not have it. Let's create a new one */ - rv = sobj_cache_add_replica(soc, replica, 0, &err); - -out: - return rv; -} - - -/** - * Get a data entry from the cache. - * - * If the entry is already in the cache, it is returned. Otherwise - * a new entry is created in the cache. - */ -struct sobj_cache_data_entry * -sobj_cache_get_data_entry(struct sobj_cache *soc, - struct file_replica *replica, - int obj_num, - int lock) -{ - struct sobj_cache_data_entry *rv = NULL; - struct sobj_cache_repl_entry *scre = NULL; - int err = 0; - - /* Get the replica entry first */ - scre = sobj_cache_get_repl_entry(soc, replica, 0); - if (!scre) { - err = 1; - goto out; - } - - rv = (struct sobj_cache_data_entry *)radix_tree_lookup(&scre->entries, obj_num); - if (rv) - goto out; - - /* We do not have the object cached, yet. */ - rv = sobj_cache_data_entry_new(replica->sp.stripe_size); - if (!rv) { - err = 2; - goto out; - } - -check: - /* Check if the lease associated with the data entry is valid. */ - if (lease_is_valid(rv->lease)) { - - } else { - - } -out: - return rv; -} - -void *sobj_cache_start_op(struct sobj_cache *cache, - struct file_replica *repl) -{ - struct sobj_handle *rv = NULL; - - rv = sobj_handle_new(cache, repl); - if (!rv) - goto out; - -out: - return rv; -} - -int sobj_cache_exec_op(void *shandle) -{ - int err = 0; - struct sobj_handle *handle = (struct sobj_handle *)shandle; - struct obj_set *objs = handle->objects; - struct sobj_cache_data_entry *dentry = NULL; - int i, j, k; - - /* If no operation has been associated with this handle, - we simply skip it. */ - if (handle->op == -1) - goto out; - - /* For now we do not support combined operations on one object set. - So we must resolve the object set into single objects... */ - - /* TODO: Here is definitely room for improvement: Operations on an - object set should be done in parallel! */ - - for (i=0; inum_entries; i++) { - - /* And get objects for each entry */ - for (j=objs->entries[i].start_num, k=0; - j <= objs->entries[i].end_num; - j += objs->entries[i].stride, k++) { - dentry = sobj_cache_get_data_entry(handle->cache, - handle->repl, - j, - 0); - - /* Check if the dentry is valid */ - if (!lease_is_valid(dentry->lease)) { /* Nope, not valid */ - /* Steps to do here: Get lease and object */ - - /* Either create a request for sobj stage or - do it directly. The latter is easier, here */ - } - - /* Now we have an entry and we can read or write to it. - Each object in the object set has a data area - that belong sto it. */ - switch (handle->op) { - case REQ_SOBJ_READ: - memcpy((void *)objs->entries[i].data[k], - dentry->data, - handle->repl->sp.stripe_size); - break; - case REQ_SOBJ_WRITE: - memcpy((void *)dentry->data, - (void *)objs->entries[i].data[k], - handle->repl->sp.stripe_size); - break; - default: - break; - } - } - } - -out: - return err; -} - -/** - * Write a stripe object to the file system - * - * The cache will take care of the procedure to write - * to the file system. It will get the required lease - * if neccessary and write to the OSDs, for instance. - * - * @param shandle Handle for stripe object cache operations - * @param obj_num Stripe object number (might be different - * from file object number) - * @param data Data to write. The size of this data is - * determined by the striping policy. - * @return 0 if successful, error code otherwise - */ -int sobj_cache_write_sobj(void *shandle, - off_t obj_num, - void *data) -{ - int err = 0; - struct sobj_handle *handle = (struct sobj_handle *)shandle; - struct sobj_cache_data_entry *scde = NULL; - - scde = sobj_cache_get_data_entry(handle->cache, - handle->repl, - obj_num, 0); - if (!scde) { /* Error! */ - dbg_msg("Cannot get new cache data entry.\n"); - err = 2; - goto out; - } - - /* Now check if the lease is valid */ - while (!lease_is_valid(scde->lease)) { - - } - - /* We may now write the data into the data object */ - memcpy((void *)scde->data, data, handle->repl->sp.stripe_size); - -out: - return err; -} - - -/** - * Read a stripe object from file system - * - * Reads a stripe object from the file system. If the object - * is stored in the cache and has a valid lease associated - * with it, the data of the stripe object is returned - * immediately. Otherwise it is fetched from the corresponding - * servers. - * - * @param soc Stripe object cache to read from - * @param replica Replica the stripe belongs to - * @param obj_num Stripe object number - * @param data Pointer to the memory where the data should - * be stored. - * @return 0 of successful, error code otherwise - */ -int sobj_cache_read_sobj(void *shandle, - off_t obj_num, - void *data) -{ - int err = 0; - struct sobj_handle *handle = (struct sobj_handle *)shandle; - struct sobj_cache_data_entry *scde = NULL; - - scde = sobj_cache_get_data_entry(handle->cache, - handle->repl, obj_num, 0); - if (!scde) { - err = 1; - goto out; - } - - while (!lease_is_valid(scde->lease)) { - } - - /* And copy the data from the data object into the buffer */ - memcpy((void *)data, scde->data, handle->repl->sp.stripe_size); - -out: - return err; -} - - -/** - * Read an object set from the cache - */ -int sobj_cache_read_obj_set(struct sobj_cache *soc, - struct file_replica *repl, - struct obj_set *oset) -{ - int err = 0; - - return err; -} - - -/** - * Write object set data to the cache - */ -int sobj_cache_write_obj_set(struct sobj_cache *soc, - struct file_replica *repl, - struct obj_set *oset) -{ - int err = 0; - - return err; -} diff --git a/client/src/sobj_cache.h b/client/src/sobj_cache.h deleted file mode 100644 index d0b21fa97..000000000 --- a/client/src/sobj_cache.h +++ /dev/null @@ -1,121 +0,0 @@ -/* This file is part of the XtreemFS client. - - XtreemFS client 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. - - The XtreemFS client 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 XtreemFS client. If not, see . - */ - - -/* - C Interface: sobj_cache - - Description: - - - Author: Matthias Hess , (C) 2008 - - Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_SOBJ_CACHE_H__ -#define __XTRFS_SOBJ_CACHE_H__ - -#include - -#include "radix-tree.h" -#include "file.h" - -enum sobj_cache_entry_state { - SCE_UNDEFINED = 0, - SCE_VALID, -}; - -/** - * Entry for a replica in the stripe object cache - * All stripes belonging to one replica can be accessed - * via this entry. - */ -struct sobj_cache_repl_entry { - struct file_replica *replica; - enum sobj_cache_entry_state state; - - struct radix_tree_root entries; /*!< Cached objects that belong to this replica - referenced by obj id */ - struct hash_table_entry hentry; /*!< Entry in hash table */ -}; - -struct sobj_cache_repl_entry *sob_cache_repl_entry_new(struct file_replica *replica); - -int sobj_cache_repl_entry_init(struct sobj_cache_repl_entry *scre, - struct file_replica *replica); -void sobj_cache_repl_entry_del_contents(struct sobj_cache_repl_entry *scre); -void sobj_cache_repl_entry_destroy(struct sobj_cache_repl_entry *scre); - -/** - * Data entry in the stripe object cache - * This entry contains actual data that is stored in - * the cache. - */ -struct sobj_cache_data_entry { - void *data; - int version; - enum sobj_cache_entry_state state; - struct lease *lease; /*!< Pointer to associated lease (if any) */ - struct list_head head; -}; - -struct sobj_cache_data_entry *sobj_cache_data_entry_new(int obj_size); -int sobj_cache_data_entry_init(struct sobj_cache_data_entry *scde, - int obj_size); -void sobj_cache_data_entry_del_contents(struct sobj_cache_data_entry *scde); -void sobj_cache_data_entry_destroy(struct sobj_cache_data_entry *scde); - - -/** - * Stripe object cache - * - * Objects are organized by replica first and then their object id - * within that replica. - */ -struct sobj_cache { - /* Container for replica specific information */ - struct hash_table *replica; - - /* Object handling. Objects are identified by fileid - and object number. */ -}; - -extern struct sobj_cache *sobj_cache_new(); -extern int sobj_cache_init(struct sobj_cache *soc); -extern void sobj_cache_del_contents(struct sobj_cache *soc); -extern void sobj_cache_destroy(struct sobj_cache *soc); - - -/* Functions callable by modules */ - -/* Functions to be used by 'lower' end entities */ - -extern int sobj_cache_flush(struct sobj_cache *soc); - -extern void *sobj_cache_start_op(struct sobj_cache *soc, - struct file_replica *repl); -extern int sobj_cache_exec_op(void *shandle); - -extern int sobj_cache_write_sobj(void *shandle, - off_t obj_num, - void *data); -extern int sobj_cache_read_sobj(void *shandle, - off_t obj_num, - void *data); - -#endif diff --git a/client/src/statinfo.c b/client/src/statinfo.c deleted file mode 100644 index bafed6d16..000000000 --- a/client/src/statinfo.c +++ /dev/null @@ -1,256 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: statinfo -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include - -#include - -/* If __STRICT_ANSI__ is not set, the JSON headers assume - * C99 conformity which we do not want! - */ -#ifndef __STRICT_ANSI__ -#define __STRICT_ANSI__ -#include -#undef __STRICT_ANSI__ -#else -#include -#endif -#include - -#include "statinfo.h" -#include "xattr.h" -#include "list.h" - - -struct xtreemfs_statinfo * -xtreemfs_statinfo_new() -{ - struct xtreemfs_statinfo *rv = NULL; - - rv = (struct xtreemfs_statinfo *)malloc(sizeof(struct xtreemfs_statinfo)); - if(rv != NULL && xtreemfs_statinfo_init(rv) != 0) { - xtreemfs_statinfo_clear(rv); - free(rv); - rv = NULL; - } - - return rv; -} - -int -xtreemfs_statinfo_init(struct xtreemfs_statinfo *si) -{ - si->fileId = NULL; - si->ownerId = NULL; - si->groupId = NULL; - si->objType = OBJ_UNDEFINED; - si->size = 0; - si->epoch = 0; - si->atime = 0; - si->ctime = 0; - si->mtime = 0; - si->posixAccessMode = 0; - si->linkTarget = NULL; - si->xAttrs = NULL; - INIT_LIST_HEAD(&si->replicas); - INIT_LIST_HEAD(&si->acl); - si->linkCount = 0; - - return 0; -} - -void -xtreemfs_statinfo_clear(struct xtreemfs_statinfo *si) -{ - free(si->fileId); - free(si->ownerId); - free(si->groupId); - free(si->linkTarget); - - if (si->xAttrs) - xattr_list_destroy(si->xAttrs); - - /* And free replica and acl lists */ -} - - -int -xtreemfs_statinfo_copy(struct xtreemfs_statinfo *to, struct xtreemfs_statinfo *from) -{ - *to = *from; - - if(from->fileId) - to->fileId = strdup(from->fileId); - if(from->ownerId) - to->ownerId = strdup(from->ownerId); - if(from->groupId) - to->groupId = strdup(from->groupId); - if(from->linkTarget) - to->linkTarget = strdup(from->linkTarget); - if(from->xAttrs) - to->xAttrs = xattr_list_clone(from->xAttrs); - - INIT_LIST_HEAD(&to->replicas); - INIT_LIST_HEAD(&to->acl); - - return 0; -} - - -int -xtreemfs_statinfo_to_json_ip(struct xtreemfs_statinfo *si, struct json_object *jo) -{ - int rv = 0; - - json_object_object_add(jo, "fileId", json_object_new_string(si->fileId)); - json_object_object_add(jo, "ownerId", json_object_new_string(si->ownerId)); - json_object_object_add(jo, "size", json_object_new_int(si->size)); - json_object_object_add(jo, "epoch", json_object_new_int(si->epoch)); - json_object_object_add(jo, "atime", json_object_new_int(si->atime)); - json_object_object_add(jo, "ctime", json_object_new_int(si->ctime)); - json_object_object_add(jo, "mtime", json_object_new_int(si->mtime)); - json_object_object_add(jo, "posixAccessMode", json_object_new_int(si->posixAccessMode)); - if(si->linkTarget) - json_object_object_add(jo, "linkTarget", json_object_new_string(si->linkTarget)); -#if 0 - if(si->xAttrs) - json_object_object_add(jo, "xAttrs", xattrs_to_json(si->xAttrs)); - if(!list_empty(&si->replicas)) - json_object_object_add(jo, "replicas", xlocs_to_json(&si->replicas)); - if(!list_empty(&si->acl)) - json_object_object_add(jo, "acl", acls_to_json(&si->acl)); -#endif - - if (si->xAttrs) - json_object_object_add(jo, "xAttrs", xattr_list_to_json(si->xAttrs)); - json_object_object_add(jo, "linkCount", json_object_new_int(si->linkCount)); - - return rv; -} - -struct json_object * -xtreemfs_statinfo_to_json(struct xtreemfs_statinfo *si) -{ - struct json_object *rv = NULL; - - rv = json_object_new_object(); - if(rv == NULL) - goto finish; - - if(xtreemfs_statinfo_to_json_ip(si, rv) != 0) { - json_object_put(rv); - rv = NULL; - } - -finish: - return rv; -} - - -int -json_to_xtreemfs_statinfo_ip(struct json_object *jo, struct xtreemfs_statinfo *si) -{ - int rv = 0; - - json_object_object_foreach(jo, key, val) { - if(!strcmp(key, "fileId")) { - si->fileId = strdup(json_object_get_string(val)); - } else if(!strcmp(key, "ownerId")) { - si->ownerId = strdup(json_object_get_string(val)); - } else if(!strcmp(key, "groupId")) { - si->groupId = strdup(json_object_get_string(val)); - } else if(!strcmp(key, "objType")) { - si->objType = json_object_get_int(val); - } else if(!strcmp(key, "size")) { - si->size = json_object_get_int(val); - } else if(!strcmp(key, "epoch")) { - si->epoch = json_object_get_int(val); - } else if(!strcmp(key, "atime")) { - si->atime = json_object_get_int(val); - } else if(!strcmp(key, "ctime")) { - si->ctime = json_object_get_int(val); - } else if(!strcmp(key, "mtime")) { - si->mtime = json_object_get_int(val); - } else if(!strcmp(key, "posixAccessMode")) { - si->posixAccessMode = json_object_get_int(val); - } else if(!strcmp(key, "linkTarget")) { - si->linkTarget = strdup(json_object_get_string(val)); - } else if(!strcmp(key, "xAttrs")) { - si->xAttrs = json_to_xattr_list(val); - } else if(!strcmp(key, "replicas")) { - - } else if(!strcmp(key, "acl")) { - - } else if(!strcmp(key, "linkCount")) { - si->linkCount = json_object_get_int(val); - } - } - - return rv; -} - - -struct xtreemfs_statinfo * -json_to_xtreemfs_statinfo(struct json_object *jo) -{ - struct xtreemfs_statinfo *rv = NULL; - - rv = xtreemfs_statinfo_new(); - if (rv) { - if (json_to_xtreemfs_statinfo_ip(jo, rv)) { - xtreemfs_statinfo_clear(rv); - free(rv); - rv = NULL; - } - } - return rv; -} - -int -xtreemfs_statinfo_print(struct xtreemfs_statinfo *si) -{ - printf("fileId: %s\n", si->fileId); - printf("ownerId: %s\n", si->ownerId); - printf("groupId: %s\n", si->groupId); - printf("objType: %d\n", si->objType); - printf("size: %ld\n", si->size); - printf("epoch: %ld\n", si->epoch); - printf("posixAccessMode %d\n", si->posixAccessMode); - return 0; -} - diff --git a/client/src/statinfo.h b/client/src/statinfo.h deleted file mode 100644 index 880cd39cf..000000000 --- a/client/src/statinfo.h +++ /dev/null @@ -1,92 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -C Interface: statinfo - -Description: - - -Author: Matthias Hess , (C) 2007 - -Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_STATINFO_H__ - -/* If __STRICT_ANSI__ is not set, the JSON headers assume - * C99 conformity which we do not want! - */ -#ifndef __STRICT_ANSI__ -#define __STRICT_ANSI__ -#include -#undef __STRICT_ANSI__ -#else -#include -#endif -#define __XTRFS_STATINFO_H__ - -#include "xattr.h" -#include "list.h" - - -typedef enum { - OBJ_UNDEFINED=0, - OBJ_FILE, - OBJ_DIR, - OBJ_SYMLINK -} xtreemfs_obj_type_t; - -struct xtreemfs_statinfo { - char * fileId; - char * ownerId; - char * groupId; - xtreemfs_obj_type_t objType; - off_t size; - long epoch; - time_t atime; - time_t ctime; - time_t mtime; - int posixAccessMode; - char * linkTarget; - struct xattr_list * xAttrs; - struct list_head replicas; - struct list_head acl; - int linkCount; -}; - -extern int xtreemfs_statinfo_init(struct xtreemfs_statinfo *si); -extern void xtreemfs_statinfo_clear(struct xtreemfs_statinfo *si); -extern int xtreemfs_statinfo_copy(struct xtreemfs_statinfo *to, struct xtreemfs_statinfo* from); - -extern int xtreemfs_statinfo_to_json_ip(struct xtreemfs_statinfo *si, struct json_object *jo); -extern struct json_object *xtreemfs_statinfo_to_json(struct xtreemfs_statinfo *); - -extern int json_to_xtreemfs_statinfo_ip(struct json_object *jo, struct xtreemfs_statinfo *si); -extern struct xtreemfs_statinfo *json_to_xtreemfs_statinfo(struct json_object *); - -extern int xtreemfs_statinfo_print(struct xtreemfs_statinfo *si); - -#endif diff --git a/client/src/stripe.c b/client/src/stripe.c deleted file mode 100644 index 17258e333..000000000 --- a/client/src/stripe.c +++ /dev/null @@ -1,295 +0,0 @@ -/* Copyright (c) 2007, 2008 Erich Focht, Matthias Hess - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/** - * Stripe objects access helper functions. - * - * @author: Erich Focht - */ - -#include -#include -#include -#include - -#include - -#include "xtreemfs.h" -#include "xtreemfs_conf.h" - -#ifdef ITAC -#include -#endif - -#include "stripe.h" -#include "stripingpolicy.h" - -#include "file.h" -#include "filerw.h" -#include "request.h" -#include "workqueue.h" - -#include "osd_manager.h" -#include "osd_proxy.h" -#include "osd_channel.h" - -#include "logger.h" -#include "kernel_substitutes.h" - - -/* - * Stripe object stage related stuff follows - */ - -struct work_queue *sobj_wq; - -static void sobj_handle(struct req *req); - -/** - * Start the stripe object stage. It is multi-threaded! - * - * We use neon for the http communication and neon is not asynchronous, - * therefore each thread in this stage is doing work synchonously. When - * the transfer is finished, the thread finishes. - */ -void sobj_init(int num_threads) -{ - sobj_wq = workqueue_new("sobj", num_threads); - if (!sobj_wq) { - err_msg("Failed to create sobj workqueue!\n"); - exit(-ENOMEM); - } - workqueue_add_func(sobj_wq, REQ_SOBJ_READ, sobj_handle); - workqueue_add_func(sobj_wq, REQ_SOBJ_WRITE, sobj_handle); -} - -void sobj_close(void) -{ - workqueue_del(sobj_wq); -} - -/** - * Delete sobj request payload - */ -static void sobj_req_payload_delete(void *data) -{ - struct sobj_payload *p = (struct sobj_payload *)data; - free(p->osd); - free(p); -} - -/** - * create a sobj request and queue it. - * - */ -struct req *sobj_req_create(int type, int sobj_id, loff_t offset, - size_t size, void *buffer, char *url, - struct user_file *fd, - struct req *parent) -{ - struct req *req = NULL; - struct sobj_payload *p; - void *response = NULL; - char req_id[256]; - - p = (struct sobj_payload *)malloc(sizeof(struct sobj_payload)); - if (!p) { - err_msg("Failed to allocate sobj payload struct\n"); - goto out; - } - p->sobj_id = sobj_id; - p->offset = offset; - p->size = size; - p->rsize = size; - p->buffer = buffer; - p->fd = fd; - p->osd = strdup(url); - p->order = NEW_FILEID_ORDER(fd); - p->epoch = GET_EPOCH(fd); - - req = req_create(type, (void *)p, (void *)response, parent); - req->del_data = sobj_req_payload_delete; - req->del_result = NULL; - - if (conf.req_ids != 0) { - snprintf(req_id, 256, "%s-%d", fd->file->fileid_s->fileid, p->sobj_id); - req->id = strdup(req_id); - } - -out: - return req; -} -/** - * Main stripe obj worker task. - * - * Parent of the request is still the originating filerw - * request. - */ -static void sobj_handle(struct req *req) -{ - struct sobj_payload *p = (struct sobj_payload *)req->data; - struct file_replica *replica = p->fd->file; - struct fileid_struct *fileid = replica->fileid_s; - struct OSD_Proxy *op; - struct OSD_Channel_resp osd_resp = { .new_size = -1, - .epoch = -1, }; - int err = 0; - struct req *answer = NULL; - - int fobj_type; - -#ifdef ITAC - VT_begin(itac_sobj_handle_hdl); -#endif - - OSD_Channel_resp_init(&osd_resp); - - dbg_msg("sobj_handle req %p start: id=%d \n", req, p->sobj_id); - dbg_msg("Connecting to OSD '%s'\n", p->osd); - if (req_state(req) == REQ_STATE_ERROR) { - dbg_msg("aborting sobj_handler\n"); - goto out; - } - - op = OSD_Manager_get_proxy(&osd_manager, p->osd, dirservice); - if (!op) { - dbg_msg("No OSD proxy found for '%s'\n", p->osd); - err = -ENOMEM; - goto out; - } - - switch (req->type) { - case REQ_SOBJ_READ: - dbg_msg("Read request with size %ld for req %p\n", p->size, req); - err = OSD_Proxy_get(op, req->id, p->fd, p->sobj_id, p->offset, - p->offset + p->size - 1, p->buffer, - &osd_resp); - dbg_msg("Read request done for req %p, err=%d\n", req, err); - if (osd_resp.length != p->size) - p->rsize = osd_resp.length; - break; - - case REQ_SOBJ_WRITE: - dbg_msg("Write request with size %ld for req %p\n", p->size, req); - err = OSD_Proxy_put(op, req->id, p->fd, p->sobj_id, p->offset, - p->offset + p->size - 1, p->buffer, - &osd_resp); - dbg_msg("Write request done for req %p, err=%d\n", req, err); - - /* Check for file size change during write operation */ - if (osd_resp.new_size != -1 && - (osd_resp.err == OSC_ERR_NO_ERROR)) { - dbg_msg("new filesize = %lld for %s fileid:%s\n", - osd_resp.new_size, fileid->path, - fileid->fileid); - dbg_msg("new epoch = %d\n", osd_resp.epoch); -#if 0 - spin_lock(&fileid->lock); - /* - * Only update filesize if the order of current - * request is bigger than the order of the - * previous update. This could lead to wrong - * file sizes if one request overtakes another - * one. - * During a truncate epoch the file can only - * grow, because the only way to reduce the - * file size is via truncate call. - */ - if ((p->epoch == osd_resp.epoch && - osd_resp.new_size > fileid->sz.size) || - p->epoch < osd_resp.epoch) { - dbg_msg("Setting new file size: %d\n", osd_resp.new_size); - fileid->sz.size = osd_resp.new_size; - atomic_set(&fileid->sz.order, p->order); - fileid->sz.epoch = osd_resp.epoch; - /* Indicate that we must send it to the MRC... */ - atomic_set(&fileid->sz.needs_updating, 1); - } else { - dbg_msg("ignoring out of order size update\n"); - dbg_msg("Epochs: old: %d new: %d\n", - p->epoch, osd_resp.epoch); - dbg_msg("Sizes: old: %d new: %d\n", - fileid->sz.size, osd_resp.new_size); - } - spin_unlock(&fileid->lock); -#endif - } - break; - - default: - err_msg("Unknown operation %d in sobj_handle\n", p->op); - err = -EINVAL; - break; - } - -out: -#if 0 - if (err == OSC_ERR_RETRY) { - /* Need to delay requeues, no mechanism for that available. - * Means: any error is propagated back through the client, - * even short connection interruptions lead to an I/O error. - * Requeueing immediately blows up because the sockets stay - * around until they timeout. - */ - dbg_msg("Re-queueing req %p\n", req); - submit_request(sobj_wq, req); - } else -#endif - { - dbg_msg("Submitting answer for req %p (from %p)\n", req->parent, req); - answer = fobj_sobj_done_req(p->sobj_id, p->offset, p->size, - osd_resp.length, osd_resp.new_size, osd_resp.epoch, - req->parent); - /* propagate error in answer */ - if (err == OSC_ERR_FAIL) - answer->error = -ENODEV; - submit_request(fobj_wq, answer); - if (atomic_read(&req->active_children)) - dbg_msg("There should not be any children.\n"); - if (atomic_read(&req->use_count) != 1) - dbg_msg("Use count must be 1\n"); - - finish_request(req); - } - -#ifdef ITAC - VT_end(itac_sobj_handle_hdl); -#endif - dbg_msg("sobj_handle end: OSD channel operation done, err=%d\n", err); -} - -/** - * Dump info on one sobj request to log. - * - * @param req pointer to request to be shown - */ -void print_sobj_info(struct req *req) -{ - struct sobj_payload *p = (struct sobj_payload *)req->data; - - info_msg("sobj_id=%d state=%s op=%s osd=%s buffer=%p fileid=%s\n", - p->sobj_id, reqstate_name[req->state], frwop_name[p->op], - p->osd, p->buffer, UFILEID(p->fd)); -} - diff --git a/client/src/stripe.h b/client/src/stripe.h deleted file mode 100644 index 939f0b90f..000000000 --- a/client/src/stripe.h +++ /dev/null @@ -1,100 +0,0 @@ -/* Copyright (c) 2007, 2008 Erich Focht, Matthias Hess - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#ifndef __XTRFS_STRIPE_H__ -#define __XTRFS_STRIPE_H__ - -/** - * Stripe objects and related stuff. - * - * @author: Erich Focht - */ - -#include - -#include "fileops.h" -#include "list.h" - - -/** - * Striping policy types. - * Defined so far: - * RAID0 (just striped) - * RAID5 (one parity stripe block per parity block of "width" stripes) - */ -enum striping_policy_t { - SPOL_UNKNOWN = 0, - SPOL_RAID_0, - SPOL_RAID_5, /* not implemented */ -}; - -/** - * Striping policy info. - * This thing must _always_ exist. It describes the distribution of - * stripes (AKA stripe objects) across the OSDs. - * For RAID5 and alike the parity blocks are just normal addressable - * stripes, the OSD doesn't know about them (except for file size - * calculation). - */ -struct striping_policy { - enum striping_policy_t id; /*!< policy ID */ - size_t stripe_size; /*!< size of stripes in bytes! */ - int width; /*!< number of OSDs to use */ -}; - -struct file_replica; - -void sobj_init(int num_threads); -void sobj_close(void); - -struct user_file; -struct req *sobj_req_create(int type, int sobj_id, loff_t offset, - size_t size, void *buffer, char *url, - struct user_file *fd, - struct req *parent); - -extern struct work_queue *sobj_wq; - -struct sobj_payload { - enum filerw_op op; /*!< Operation (read/write) */ - int sobj_id; /*!< File object ID */ - loff_t offset; /*!< offset in the file object */ - size_t size; /*!< transfer size (bytes) */ - size_t rsize; /*!< real transfer size (bytes) */ - char *osd; /*!< targeted OSD */ - void *buffer; /*!< pointer to buffer for data */ - struct user_file *fd; /*!< file descriptor of open file */ - unsigned int order; /*!< request order */ - long epoch; /*!< epoch in which this request was issued. */ -}; - -/** - * Dump info on one sobj request to log. - * - * @param req pointer to request to be shown - */ -void print_sobj_info(struct req *req); - - -#endif // __XTRFS_STRIPE_H__ diff --git a/client/src/stripingpolicy.c b/client/src/stripingpolicy.c deleted file mode 100644 index c5daadda9..000000000 --- a/client/src/stripingpolicy.c +++ /dev/null @@ -1,188 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: stripingpolicy -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include -#include - -#include "stripe.h" -#include "stripingpolicy.h" - - -static char *striping_policy_names[] = { - "UNKNOWN", - "RAID0", - "RAID5" -}; -#define NUM_STRIPING_POLICIES 3 - -struct striping_policy_mapping striping_policy_mapping[] = { - { "RAID0", SPOL_RAID_0 }, - { "RAID5", SPOL_RAID_5 }, - { NULL, SPOL_UNKNOWN } -}; - -struct striping_policy_mapping striping_policy_name[] = { - [SPOL_UNKNOWN] = { NULL, SPOL_UNKNOWN }, - [SPOL_RAID_0] = { "RAID0", SPOL_RAID_0 }, - [SPOL_RAID_5] = { "RAID5", SPOL_RAID_5 } -}; - - -struct striping_policy * -striping_policy_new() -{ - struct striping_policy *rv = NULL; - - rv = (struct striping_policy *)malloc(sizeof(struct striping_policy)); - if(rv != NULL && striping_policy_init(rv) != 0) { - free(rv); - rv = NULL; - } - - return rv; -} - -int -striping_policy_init(struct striping_policy *sp) -{ - int rv = 0; - - sp->id = SPOL_UNKNOWN; - sp->stripe_size = 0; - sp->width = 0; - - return rv; -} - - -int -striping_policy_cmp(struct striping_policy *s1, struct striping_policy *s2) -{ - int rv = 0; - - rv = (s1->id == s2->id); - rv &= (s1->stripe_size == s2->stripe_size); - rv &= (s1->width == s2->width); - - return rv; -} - -void -striping_policy_copy(struct striping_policy *dest, struct striping_policy *src) -{ - dest->id = src->id; - dest->stripe_size = src->stripe_size; - dest->width = src->width; -} - - -struct json_object * -striping_policy_to_json(struct striping_policy *sp) -{ - struct json_object *rv = NULL; - - rv = json_object_new_object(); - if(rv == NULL) goto finish; - - if(striping_policy_to_json_ip(sp, rv) != 0) { - free(rv); - rv = NULL; - } - -finish: - return rv; -} - -struct striping_policy * -json_to_striping_policy(struct json_object *jo) -{ - struct striping_policy *rv = NULL; - - rv = striping_policy_new(); - if(json_to_striping_policy_ip(jo, rv) != 0) { - free(rv); - rv = NULL; - } - - return rv; -} - - -int -striping_policy_to_json_ip(struct striping_policy *sp, struct json_object *jo) -{ - json_object_object_add(jo, "policy", json_object_new_string(striping_policy_names[sp->id])); - json_object_object_add(jo, "stripe-size", json_object_new_int(sp->stripe_size / 1024)); - json_object_object_add(jo, "width", json_object_new_int(sp->width)); - - return 0; -} - -int -json_to_striping_policy_ip(struct json_object *jo, struct striping_policy *sp) -{ - int rv = 0; - char *policy_name; - int i; - - policy_name = json_object_get_string(json_object_object_get(jo, "policy")); - for(i=0; iid = i; - else sp->id = 0; - - sp->stripe_size = json_object_get_int(json_object_object_get(jo, "stripe-size")) * 1024; - sp->width = json_object_get_int(json_object_object_get(jo, "width")); - - return rv; -} - -int -striping_policy_print(struct striping_policy *sp) -{ - if(sp->id < NUM_STRIPING_POLICIES) printf("Policy: %s\n", striping_policy_names[sp->id]); - else printf("Policy: UNKNOWN\n"); - printf("Stripe size: %ld\n", sp->stripe_size); - printf("Width: %d\n", sp->width); - - return 0; -} diff --git a/client/src/stripingpolicy.h b/client/src/stripingpolicy.h deleted file mode 100644 index 7d452db65..000000000 --- a/client/src/stripingpolicy.h +++ /dev/null @@ -1,69 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -C Interface: stripingpolicy - -Description: - - -Author: Matthias Hess , (C) 2007 - -Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_STRIPINGPOLICY_H__ -#define __XTRFS_STRIPINGPOLICY_H__ - -#include - -#include "stripe.h" - -struct striping_policy_mapping { - char *name; - enum striping_policy_t id; -}; - -extern struct striping_policy_mapping striping_policy_mapping[]; -extern struct striping_policy_mapping striping_policy_name[]; - -extern struct striping_policy *striping_policy_new(); -extern int striping_policy_init(struct striping_policy *sp); - -extern int striping_policy_cmp(struct striping_policy *s1, struct striping_policy *s2); -extern void striping_policy_copy(struct striping_policy *dest, struct striping_policy *src); - -extern struct json_object *striping_policy_to_json(struct striping_policy *sp); -extern struct striping_policy *json_to_striping_policy(struct json_object *jo); - -extern int striping_policy_to_json_ip(struct striping_policy *sp, struct json_object *jo); -extern int json_to_striping_policy_ip(struct json_object *jo, struct striping_policy *sp); - - -/* And for easy debugging */ - -extern int striping_policy_print(struct striping_policy *sp); - -#endif diff --git a/client/src/transl_engine.c b/client/src/transl_engine.c deleted file mode 100644 index ae84a4d2e..000000000 --- a/client/src/transl_engine.c +++ /dev/null @@ -1,103 +0,0 @@ -#include -#include - -#include - -#include - -#include "transl_engine.h" -#include "transl_mod.h" -#include "stripingpolicy.h" - - -int transl_engine_init(struct transl_engine *te, char *mod_dir) -{ - int err = 0; - - INIT_LIST_HEAD(&te->mod_list); - - if (!mod_dir) - goto out; - - err = transl_engine_load_mods(te, mod_dir); - -out: - return err; -} - -void transl_engine_del_contents(struct transl_engine *te) -{ - -} - -/** - * Find a module that corresponds to id - */ -struct transl_mod *transl_engine_find_by_id(struct transl_engine *te, - char *id) -{ - struct transl_mod *rv = NULL; - - return rv; -} - -/** - * Find a translation module that corresponds to striping - * policy 't' - */ -struct transl_mod *transl_engine_find_by_type(struct transl_engine *te, - enum striping_policy_t t) -{ - struct transl_mod *rv = NULL; - - rv = transl_engine_find_by_id(te, striping_policy_name[t].name); - - return rv; -} - - -int transl_engine_load_mods(struct transl_engine *te, char *mod_dir) -{ - int err = 0; - DIR *dir; - struct dirent *dent; - char fullname[1024]; - struct transl_mod *tm = NULL; - - dir = opendir(mod_dir); - if (!dir) { - err = 1; - goto out; - } - - while ((dent = readdir(dir)) != NULL) { - if (dent->d_type != DT_REG) - continue; - snprintf(fullname, 1024, "%s/%s", mod_dir, dent->d_name); - tm = transl_mod_load(fullname); - if (!tm) - continue; - list_add(&tm->head, &te->mod_list); - } - - if (list_empty(&te->mod_list)) - err = 2; - -out: - if (dir) - closedir(dir); - - return err; -} - -void transl_engine_unload_mods(struct transl_engine *te) -{ - struct list_head *lh, *tmp; - struct transl_mod *tm; - - list_for_each_safe(lh, tmp, &te->mod_list) { - tm = container_of(lh, struct transl_mod, head); - list_del(lh); - transl_mod_destroy(tm); - } -} diff --git a/client/src/transl_engine.h b/client/src/transl_engine.h deleted file mode 100644 index caf183f31..000000000 --- a/client/src/transl_engine.h +++ /dev/null @@ -1,26 +0,0 @@ -#ifndef __XTRFS_TRANSL_ENGINE_H__ -#define __XTRFS_TRANSL_ENGINE_H__ - -#include "transl_mod.h" -#include "stripingpolicy.h" - -struct transl_mod; - -struct transl_engine { - struct list_head mod_list; -}; - -int transl_engine_init(struct transl_engine *te, char *mod_dir); -void transl_engine_del_contents(struct transl_engine *te); - -int transl_engine_register(struct transl_engine *te, - struct transl_mod *tem); - -struct transl_mod *transl_engine_find_by_id(struct transl_engine *te, - char *id); -struct transl_mod *transl_engine_find_by_type(struct transl_engine *te, - enum striping_policy_t t); - -int transl_engine_load_mods(struct transl_engine *te, char *mod_dir); - -#endif diff --git a/client/src/transl_mod.c b/client/src/transl_mod.c deleted file mode 100644 index e9f08971d..000000000 --- a/client/src/transl_mod.c +++ /dev/null @@ -1,116 +0,0 @@ -#include -#include -#include - -#include - -#include "transl_mod.h" - -struct transl_mod *transl_mod_new() -{ - struct transl_mod *rv = NULL; - - rv = (struct transl_mod *)malloc(sizeof(struct transl_mod)); - if (rv && transl_mod_init(rv)) { - transl_mod_destroy(rv); - rv = NULL; - } - - return rv; -} - -int transl_mod_init(struct transl_mod *tm) -{ - int err = 0; - - tm->id = NULL; - tm->init = NULL; - tm->finish = NULL; - tm->read_fobj = NULL; - tm->write_fobj = NULL; - - INIT_LIST_HEAD(&tm->head); - tm->dlhandle = NULL; - - return err; -} - -void transl_mod_del_contents(struct transl_mod *tm) -{ - free(tm->id); - if (tm->dlhandle) - dlclose(tm->dlhandle); -} - -void transl_mod_destroy(struct transl_mod *tm) -{ - transl_mod_del_contents(tm); - free(tm); -} - - -/** - * Load a translation module - * - * If the given file contains a translation module, the module structure - * is returned. - * - * @return module pointer if the file contains a module, NULL otherwise - */ -struct transl_mod *transl_mod_load(char *path) -{ - struct transl_mod *rv = NULL; - int err = 0; - char **id; - - dbg_msg("Trying to load '%s'\n", path); - - rv = transl_mod_new(); - if (!rv) - goto out; - - rv->dlhandle = dlopen(path, RTLD_NOW | RTLD_LOCAL); - if (rv->dlhandle == NULL) { - err = 1; - goto out; - } - - /* Now check if we find an 'id' in the module */ - id = (char **)dlsym(rv->dlhandle, "id"); - if (!id) { - err = 2; - goto out; - } - rv->id = strdup(*id); - dbg_msg("Module ID seems to be '%s'\n", rv->id); - - /* ... and try to load the module functions */ - - rv->init = (int (*)(struct transl_mod *))dlsym(rv->dlhandle, "init"); - rv->finish = (int (*)(struct transl_mod *))dlsym(rv->dlhandle, "finish"); - rv->read_fobj = (ssize_t (*)(struct transl_mod *, - struct file_replica *, - int, - void *)) - dlsym(rv->dlhandle, "read_fobj"); - rv->write_fobj = (int (*)(struct transl_mod *, - struct file_replica *, - int, - void *)) - dlsym(rv->dlhandle, "write_fobj"); - - if (!rv->init || !rv->finish || !rv->read_fobj || !rv->write_fobj) { - err = 3; - goto out; - } - - dbg_msg("Found all required symbols\n"); - -out: - if (err) { - transl_mod_destroy(rv); - rv = NULL; - } - - return rv; -} diff --git a/client/src/transl_mod.h b/client/src/transl_mod.h deleted file mode 100644 index aaf8d1a03..000000000 --- a/client/src/transl_mod.h +++ /dev/null @@ -1,39 +0,0 @@ -#ifndef __XTRFS_TRANSL_MOD_H__ -#define __XTRFS_TRANSL_MOD_H__ - -#include "file.h" -#include "list.h" -#include "kernel_substitutes.h" - -struct transl_mod { - char *id; - - int (*init)(struct transl_mod *tm); - int (*finish)(struct transl_mod *tm); - - ssize_t (*read_fobj)(struct transl_mod *tm, - struct file_replica *r, - int fobj_num, - void *data); - int (*write_fobj)(struct transl_mod *tm, - struct file_replica *r, - int fobj_num, - void *data); - - /* Internal book keeping, please do not use! */ - void *dlhandle; - struct list_head head; - atomic_t use_count; -}; - -struct transl_mod *transl_mod_new(); -int transl_mod_init(struct transl_mod *tm); -void transl_mod_del_contents(struct transl_mod *tm); -void transl_mod_destroy(struct transl_mod *tm); - -struct transl_mod *transl_mod_load(char *path); - -/* These are 'static' functions that can be used from any other module */ - - -#endif diff --git a/client/src/workqueue.c b/client/src/workqueue.c deleted file mode 100644 index b81dbabe0..000000000 --- a/client/src/workqueue.c +++ /dev/null @@ -1,548 +0,0 @@ -/* Copyright (c) 2007, 2008 Erich Focht, Matthias Hess - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/** - * Workqueue-related functions. - * - * @author Erich Focht - */ - -#include -#include -#include -#include -#include - -#include "request.h" -#include "workqueue.h" -#include "list.h" -#include "lock_utils.h" -#include "logger.h" - -#ifdef ITAC -#include -#endif - -/** - * Pick first request on a queue, dequeue and return it. - * - * Lock will have already been taken - * - * @param wq the work queue - * @return a pointer to a req structure or NULL - */ -static struct req *get_one_req(struct work_queue *wq) -{ - struct req *req = NULL; - struct list_head *req_head = NULL; - - dbg_msg("Get request from '%s'\n", wq->name); - - if (!list_empty(&wq->input)) { - req_head = wq->input.next; - req = list_entry(req_head, struct req, q); - list_del(req_head); - req->wq = NULL; - req->state = REQ_STATE_PROCESSING; - INIT_LIST_HEAD(&req->q); - list_add_tail(&req->q, &wq->rlist); - req->wq = wq; - } else { - dbg_msg("Queue empty.\n"); - } - - return req; -} - -/** - * Workqueue thread main loop. - * - * This function contains the logic of request processing: - * - pick req from input queue, if empty: sleep - * - set state of req to PROCESSING - * - enqueue req into in-flight queue (actually just a list) - * - execute the request function - * - loop - */ -static void *workqueue_main_loop(void *data) -{ - struct work_queue *wq = (struct work_queue *)data; - struct req *req = NULL; - - dbg_msg("Starting main loop of work queue '%s'.\n", - wq->name); - - while (!wq->stopping) { - - pthread_mutex_lock(&wq->lock); - - /* Before going to sleep eventually check if the queue is not - stopped and if there are requests available. In the latter case - we do not have to sleep at all but can proceed directly to - request handling. */ - - if (wq->stopping) - goto process_req; - - req = get_one_req(wq); - if (req) - goto process_req; - - /* Go to sleep until someone wakes us up. */ - atomic_inc(&wq->signal_ready); - dbg_msg("worker thread of wq '%s' going to sleep\n", wq->name); - pthread_cond_wait(&wq->wake, &wq->lock); - dbg_msg("worker thread of wq '%s' woke up\n", wq->name); - - /* pick one req from the input queue */ - if (!wq->stopping) - req = get_one_req(wq); - else - req = NULL; - - /* Now we are no longer ready to receive signals. */ - atomic_dec(&wq->signal_ready); - - process_req: - pthread_mutex_unlock(&wq->lock); - - if (req) { - int type = req->type; - wq_func_t function; - - /* Find the function that is to be executed for the request */ - if (((function = wq->funcs[type & REQ_IDX_MASK]) == NULL) - || ((type & REQ_IDX_MASK) > wq->maxidx)) { - err_msg("Found illegal req type %d in wq %s\n", - type, wq->name); - abort(); - } - - /* For debugging purposes we could 'set the request aside'. - But if all goes well we would always have a pointer to - the request so we will not lose it. */ - - /* Execute the work associated with the request */ - function(req); - - /* Indicate that we do not own the request any longer. */ - req = NULL; - } - } - dbg_msg("Worker thread finished.\n"); - - return NULL; -} - -/** - * Add a thread as worker to a workqueue. - * - * The thread's task is to execute generic_worker as long as it lives. - * - * @param wq the target work queue - * @return zero if successful, non-zero if failed. - */ -static int -workqueue_add_thread(struct work_queue *wq) -{ - struct work_thread *t; - int err = 0; - - t = (struct work_thread *) malloc(sizeof(struct work_thread)); - if (!t) { - err_msg("no memory for work_thread structure in %s.\n", - wq->name); - return ENOMEM; - } - INIT_LIST_HEAD(&t->tlist); - t->data = NULL; - - pthread_mutex_lock(&wq->lock); /* Prevent the newly created thread from - prematurely getting new requests. */ - err = pthread_create(&t->id, NULL, workqueue_main_loop, (void *)wq); - if (err) { - free(t); - err_msg("pthread create failed in %s\n", wq->name); - return err; - } - list_add_tail(&t->tlist, &wq->threads); - wq->nthreads++; - pthread_mutex_unlock(&wq->lock); - dbg_msg("Added thread %p to wq %s\n", t->id, wq->name); - return err; -} - -/** - * Initialize a work_queue structure. - * - * @param wq work queue to be initialized. - * @return error - */ -int workqueue_init(struct work_queue *wq, char *name, int nthreads) -{ - int err = 0; - int i; - - memset((void *)wq, 0, sizeof(struct work_queue)); - - wq->name = strdup(name); - INIT_LIST_HEAD(&wq->input); - INIT_LIST_HEAD(&wq->rlist); - - /* Before adding functions we must set default values */ - wq->maxidx = 0; - wq->funcs = NULL; - - pthread_mutex_init(&wq->lock, NULL); - pthread_cond_init(&wq->wake, NULL); - INIT_LIST_HEAD(&wq->threads); - atomic_set(&wq->signal_ready, 0); - wq->stopping = 0; - for (i = 0; i < nthreads; i++) { - int rc = workqueue_add_thread(wq); - if (rc) { - err_msg("failed to create %d threads for " - "wq %s\n", nthreads, name); - /* This is a serious failure and can only happen - at initialization time. */ - err = 1; - } - } - return err; -} - -/** - * Create a work queue. - * TODO for client-ng!!! - * - * @param name the workqueue name - * @param function the function to be applied to each request - * @param nthreads number of worker threads for this workqueue - * @return pointer to workqueue, if successfull, NULL otherwise. - */ -struct work_queue *workqueue_new(char *name, int nthreads) -{ - struct work_queue *wq; - - wq = (struct work_queue *) malloc(sizeof(struct work_queue)); - if (wq && workqueue_init(wq, name, nthreads)) { - err_msg("work queue malloc failed: wq %s\n", name); - workqueue_del(wq); - wq = NULL; - } - return wq; -} - -/** - * Delete allocated memory from a work queue. - * - * @param wq Work queue to be deleted. - */ -void workqueue_del_contents(struct work_queue *wq) -{ -#ifdef ITAC - VT_flush(); -#endif - if (!wq) - return; - - workqueue_stop(wq); - free(wq->name); - free(wq->funcs); -} - -/** - * Delete a workqueue structure. - * - * Deleting a wq structure should actually never happen. If it happens it is - * during the init phase and the queues have no members, yet. - * - * @param wq the work queue pointer - */ -void workqueue_del(struct work_queue *wq) -{ - workqueue_del_contents(wq); - free(wq); -} - -/** - * Stop a workqueue - * - * Stop all threads associated with this workqueue. - * - * @param wq workqueue to stop - */ -void workqueue_stop(struct work_queue *wq) -{ - struct list_head *iter; - struct work_thread *wt; - - pthread_mutex_lock(&wq->lock); - wq->stopping = 1; - pthread_cond_broadcast(&wq->wake); - pthread_mutex_unlock(&wq->lock); - - list_for_each(iter, &wq->threads) { - wt = container_of(iter, struct work_thread, tlist); - pthread_join(wt->id, NULL); - - } - wq->stopping = 2; -} - -/** - * Add a function to a workqueue - */ -int workqueue_add_func(struct work_queue *wq, int idx, wq_func_t func) -{ - int midx = idx & REQ_IDX_MASK; - - trace_msg("Adding function for idx %d to wq %s\n", idx, wq->name); - - /* First check if array is big enough. Resize it - eventually. */ - if (!wq->funcs) { - wq->funcs = (wq_func_t *) malloc(sizeof(wq_func_t) * 2); - if (!wq->funcs) - return -ENOMEM; - } - - if ((sizeof(wq->funcs) / sizeof(wq_func_t) < midx)) { - wq->funcs = (wq_func_t *) - realloc((void *)wq->funcs, - sizeof(wq_func_t) * (midx + 4)); - } - wq->funcs[midx] = func; - if (midx > wq->maxidx) - wq->maxidx = midx ; - - return 0; -} - -/** - * Simply dequeue a request, needed for put_req() only. - */ -void workqueue_deq_req(struct work_queue *wq, struct req *req) -{ - mutex_lock(&wq->lock); - list_del(&req->q); - mutex_unlock(&wq->lock); -} - -/** - * queue up a request and wake up the workqueue worker threads - * to come and pick it. - * - * @param wq Workqueue to use - * @param req Pointer to request to put in queue. The type of the - * request must match that one of the queue. - */ -void submit_request(struct work_queue *wq, struct req *req) -{ - trace_msg("queue req %p to wq %s\n", req, wq->name); - - pthread_mutex_lock(&wq->lock); - - list_add_tail(&req->q, &wq->input); - req->wq = wq; - dbg_msg("Added request type: %d\n", req->type); - - req->state = REQ_STATE_QUEUED; - - /* This is a quick hack to ensure that at least one thread is - ready to be signalled. Otherwise the broadcast of the signal - might be lost and the queue waits forever if there is only - one command to be executed (like in the tools). - */ - if (atomic_read(&wq->signal_ready) > 0) { - dbg_msg("Signalling worker(s).\n"); - pthread_cond_signal(&wq->wake); - } - pthread_mutex_unlock(&wq->lock); -} - -/** - * Execute a request, i.e. enqueue it and wait for termination. - * - * The request must be freed outside this routine, by the caller. Careful - * locking for avoiding races or missed signals is needed, we use the - * variable req->use_count for this, that should only be modified while the - * req->waitm mutex is taken. Typically the finishing part of a request - * should take the mutex, decrement the use count and send the signal for - * waking up the waiter(s), then release the mutex. - * - */ -int execute_req(struct work_queue *wq, struct req *req) -{ - int err = 0; - int ret = 0; - struct timespec until; - int num_waits = 0; - - trace_msg("signalling wq %s to wake up workers\n", wq->name); - - /* after req was enqueued, use_count can only be modified with taken - req->waitm. We will have two req_puts: One from 'finish_request' - and the other one from this function. So we must make sure the - request use count is set appropriately. */ - atomic_inc(&req->use_count); - - /* Use count at this point must be 2. One from request creation - and the other one from above inc command. */ - - submit_request(wq, req); - - if (req->type & REQ_BLOCK_MASK) { - pthread_mutex_lock(&req->waitm); - - /* If use count is greater than one, we know someone else - uses the request and we must wait. */ - while (req->state != REQ_STATE_FINISHED) { // work not finished, yet - dbg_msg("Going to sleep on request %p\n", req); - - clock_gettime(CLOCK_REALTIME, &until); - until.tv_sec += 5; - - atomic_inc(&req->wait); - /* Worker thread must acquire req->waitm in order to - decrement use_count and send wakeup signal. */ - ret = pthread_cond_timedwait(&req->waitc, &req->waitm, &until); - num_waits++; - atomic_dec(&req->wait); - - dbg_msg("Current use count: %d\n", atomic_read(&req->use_count)); - dbg_msg("returned from sleep on request %p\n", req); - - if (num_waits > 30) { - req->error = -1; - kill(0, SIGUSR1); /* Print workqueues */ - break; - } - } - pthread_mutex_unlock(&req->waitm); - } - - err = req->error; - dbg_msg("Error code %d\n", err); - dbg_msg("Use count of req %p at exec end: %d\n", req, - atomic_read(&req->use_count)); - - req_put(req); - - return err; -} - -/** - * Finish request. - * - * This is a generic function to finish a request. It eventually wakes - * up all threads that are waiting for the request to be finished. - * - * @param req Request to be finished. - */ -int finish_request(struct req *req) -{ - int err = 0; - - dbg_msg("Finish request %p type %d.\n", req, req->type); - - pthread_mutex_lock(&req->waitm); - req->state = REQ_STATE_FINISHED; - - if (req->type & REQ_BLOCK_MASK) { - dbg_msg("Act. children: %d\n", atomic_read(&req->active_children)); - dbg_msg("Use count: %d\n", atomic_read(&req->use_count)); - if (atomic_read(&req->wait)) { - dbg_msg("Waking up waiting thread on %p.\n", req); - err = req->error; - pthread_cond_signal(&req->waitc); - } else { - dbg_msg("Not waking anyone for req %p.\n"); - } - } - pthread_mutex_unlock(&req->waitm); - req_put(req); - - return err; -} - - -/** - * Print info on queued requests. - * TODO for client-ng - * - * @param wq workqueue to be shown - * @param print_req stage specific req display function - */ -void print_req_info(struct work_queue *wq, void (*print_req)(struct req *)) -{ - struct list_head *lh; - struct req *r; - - pthread_mutex_lock(&wq->lock); - - info_msg("Workqueue %s input queue:\n", wq->name); - if (!list_empty(&wq->input)) { - list_for_each(lh, &wq->input) { - r = list_entry(lh, struct req, q); - print_req(r); - } - } else - info_msg("- no requests\n"); - - pthread_mutex_unlock(&wq->lock); -} - -/** - * Output requests in queue - * - * @param wq Work queue to print - */ -void workqueue_print(struct work_queue *wq) -{ - struct list_head *lh; - struct req *r; - - pthread_mutex_lock(&wq->lock); - - info_msg("Workqueue '%s' input queue:\n", wq->name); - if (!list_empty(&wq->input)) { - list_for_each(lh, &wq->input) { - r = list_entry(lh, struct req, q); - req_print(r); - } - } else - info_msg("- no requests\n"); - - info_msg("Workqueue '%s' in-flight queue:\n", wq->name); - if (!list_empty(&wq->rlist)) { - list_for_each(lh, &wq->rlist) { - r = list_entry(lh, struct req, q); - req_print(r); - } - } else - info_msg("- no requests\n"); - - pthread_mutex_unlock(&wq->lock); -} diff --git a/client/src/workqueue.h b/client/src/workqueue.h deleted file mode 100644 index 3d77a33a7..000000000 --- a/client/src/workqueue.h +++ /dev/null @@ -1,201 +0,0 @@ -/* Copyright (c) 2007, 2008 Erich Focht, Matthias Hess - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -#ifndef __XTRFS_WORKQUEUE_H__ -#define __XTRFS_WORKQUEUE_H__ - -/** - * Workqueue header file. - * - * Default workqueues embed an input req_queue, an output req_queue - * and a set of pthreads waiting for work to be done. - * - * @author Erich Focht - */ - -#include -#include "kernel_substitutes.h" -#include "request.h" - -#include "lock_utils.h" - - -/** - * Work thread structure for keeping track of threads enrolled in a work queue. - */ -struct work_thread { - struct list_head tlist; /*!< list head for threads of a work queue */ - pthread_t id; /*!< thread id */ - void *data; /*!< thread specific data */ -}; - -typedef void (*wq_func_t)(struct req *); - -/** - * Work queue structure with input and output queue and associated worker - * threads. - * - * This defines an asynchronously controlled worker stage. Input requests - * come in the input queue. When processed, they are moved over to the - * output queue, get their state changed to PROCESSING and the function - * associated to this work queue is exectuted. - */ -struct work_queue { - char *name; /*!< work queue name */ - mutex_t lock; /*!< protect queue ops */ - - struct list_head input; /*!< input queue */ - struct list_head rlist; /*!< listhead for setting reqs aside */ - wq_func_t *funcs; - int maxidx; - pthread_cond_t wake; /*!< condition for wakeup or workers */ - struct list_head threads; /*!< list of enrolled threads */ - int nthreads; /*!< number of threads for wq */ - int req_types; /*!< offset for request types processed - by this queue (eg. REQ_CLIENT_TYPE)*/ - volatile atomic_t signal_ready; /*!< ready to signal or broadcast. - Volatile is necessary because the - compiler optimzes away the wait - loop */ - int stopping; -}; - -/** - * Create a work queue. - * - * @param name the workqueue name - * @param nthreads number of worker threads for this workqueue - * @return pointer to workqueue, if successfull, NULL otherwise. - */ -struct work_queue *workqueue_new(char *name, int nthreads); - -/** - * Initialize a work_queue structure. - * - * @param wq work queue to be initialized. - * @return error - */ -int workqueue_init(struct work_queue *wq, char *name, int nthreads); - -/** - * Delete a workqueue structure. - * - * Deleting a wq structure should actually never happen. If it happens it is - * during the init phase and the queues have no members, yet. - * - * @param wq the work queue pointer - */ -void workqueue_del(struct work_queue *wq); - -/** - * Stop a workqueue - * - * Stop all threads associated with this workqueue. - * - * @param wq workqueue to stop - */ -void workqueue_stop(struct work_queue *wq); - -/** - * Add a function to a workqueue - */ -int workqueue_add_func(struct work_queue *wq, int idx, wq_func_t func); - -/** - * Find the thread data structure according to thread id. - */ -static inline -struct work_thread *find_work_thread(struct work_queue *wq, pthread_t id) -{ - struct list_head *lh; - struct work_thread *found = NULL; - - mutex_lock(&wq->lock); - list_for_each(lh, &wq->threads) { - struct work_thread *wt; - - wt = list_entry(lh, struct work_thread, tlist); - if (wt->id == id) { - found = wt; - goto out; - } - } -out: - mutex_unlock(&wq->lock); - return found; -} - -/** - * queue up a request into the input queue of a workqueue and wake up - * at least one worker thread to come and pick it. - * - * @param req the request to be queued - * @param wq the target work queue - */ -void submit_request(struct work_queue *wq, struct req *req); - -/** - * Execute a given request in a workqueue. - * - * This will be a synchronous execution of the request, ie. when - * this function returns the request is finished. - */ -int execute_req(struct work_queue *wq, struct req *req); - -/** - * Simply dequeue a request, needed for put_req() only. - */ -void workqueue_deq_req(struct work_queue *wq, struct req *req); - -/** - * Finish a request. This will wake up any waiters for that - * request. - * - * @param req Request to finish - * @return Error - */ -int finish_request(struct req *req); - - -/** - * Put a request in the 'aside' list of a workqueue. - * - * @param req request to be set aside. - * @param wq workqueue of the request - */ -static inline void req_set_aside(struct req *req, struct work_queue *wq) -{ - dbg_msg("Setting req %p aside in wq %p\n", req, wq); - list_add_tail(&req->rlist, &wq->rlist); -} - -/** - * Print info on queued requests. - * - * @param wq workqueue to be shown - * @param print_req stage specific req display function - */ -void print_req_info(struct work_queue *wq, void (*print_req)(struct req *)); - -#endif // __XTRFS_WORKQUEUE_H__ diff --git a/client/src/xattr.c b/client/src/xattr.c deleted file mode 100644 index 2a8cff2a3..000000000 --- a/client/src/xattr.c +++ /dev/null @@ -1,293 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess - - Author: Matthias Hess - - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - -/* - C Implementation: xattr - - Description: - */ - -#include -#include - -#include - -#ifndef __STRICT_ANSI__ -#define __STRICT_ANSI__ -#endif - -#include - -#include "xattr.h" - -struct xattr *xattr_new(char *key, char *value, size_t size) -{ - struct xattr *rv = NULL; - - rv = (struct xattr *)malloc(sizeof(struct xattr)); - if (rv && xattr_init(rv, key, value, size)) { - xattr_destroy(rv); - rv = NULL; - } - - return rv; -} - -int xattr_init(struct xattr *x, char *key, char *value, size_t size) -{ - int err = 0; - - dbg_msg("New key '%s'\n", key); - dbg_msg("New value '%s'\n", value); - - x->key = strdup(key); - x->value = (char *)malloc(size+1); - memcpy((void *)x->value, value, size); - - /* So far we assume we have only strings! */ - x->value[size] = '\0'; - - if (!x->key || !x->value) { - err = 1; - goto out; - } - INIT_LIST_HEAD(&x->head); -out: - return err; -} - -void xattr_del_contents(struct xattr *x) -{ - free(x->key); - free(x->value); -} - -void xattr_destroy(struct xattr *x) -{ - xattr_del_contents(x); - free(x); -} - - -struct xattr_list *xattr_list_new() -{ - struct xattr_list *rv = NULL; - - rv = (struct xattr_list *)malloc(sizeof(struct xattr_list)); - if (rv && xattr_list_init(rv)) { - xattr_list_destroy(rv); - rv = NULL; - } - - return rv; -} - -int xattr_list_init(struct xattr_list *xl) -{ - int err = 0; - - INIT_LIST_HEAD(&xl->elems); - spin_init(&xl->lock, PTHREAD_PROCESS_SHARED); - xl->key_size = 0; - - return err; -} - -void xattr_list_del_contents(struct xattr_list *xl) -{ - struct list_head *i, *n; - struct xattr *x; - - spin_lock(&xl->lock); - list_for_each_safe(i, n, &xl->elems) { - x = container_of(i, struct xattr, head); - list_del(&x->head); - xattr_destroy(x); - } - spin_unlock(&xl->lock); -} - -void xattr_list_destroy(struct xattr_list *xl) -{ - xattr_list_del_contents(xl); - spin_destroy(&xl->lock); - free(xl); -} - -struct xattr_list *xattr_list_clone(struct xattr_list *xl) -{ - struct list_head *i; - struct xattr_list *target = xattr_list_new(); - - list_for_each(i, &xl->elems) { - struct xattr *element = (struct xattr*)i; - struct xattr *new_attr = xattr_new(element->key, element->value, - strlen(element->value)); - xattr_list_add(target,new_attr); - } - - return target; -} - -int xattr_list_add(struct xattr_list *xl, struct xattr *x) -{ - int err = 0; - - spin_lock(&xl->lock); - list_add(&x->head, &xl->elems); - xl->key_size += strlen(x->key) + 1; - spin_unlock(&xl->lock); - - return err; -} - -int xattr_list_add_values(struct xattr_list *xl, char *key, char *val, size_t size) -{ - int err = 0; - struct xattr *x; - - x = xattr_new(key, val, size); - if (x) - err = xattr_list_add(xl, x); - else - err = 1; - - return err; -} - -struct xattr_list *xattr_list_find(struct xattr_list *xl, char *key) -{ - struct xattr_list *rv = NULL; - struct xattr *new_attr; - struct list_head *i; - struct xattr *x; - - rv = xattr_list_new(); - - spin_lock(&xl->lock); - - list_for_each(i, &xl->elems) { - x = container_of(i, struct xattr, head); - if (!strcmp(x->key, key)) { - new_attr = xattr_new(key, x->value, strlen(x->value)); - if (new_attr) { - xattr_list_add(rv, new_attr); - } - } - } - spin_unlock(&xl->lock); - - return rv; -} - -struct json_object *xattr_list_to_json(struct xattr_list *xl) -{ - struct json_object *rv = NULL; - struct list_head *i; - struct xattr *x; - - rv = json_object_new_object(); - if (!rv) - goto out; - - spin_lock(&xl->lock); - list_for_each(i, &xl->elems) { - x = container_of(i, struct xattr, head); - dbg_msg("Key: %s Value: %s\n", - x->key, x->value); - json_object_object_add(rv, x->key, json_object_new_string(x->value)); - } - spin_unlock(&xl->lock); -out: - return rv; -} - -struct xattr_list *json_to_xattr_list(struct json_object *jo) -{ - struct xattr_list *rv = NULL; - char *val_str = NULL; - - dbg_msg("JSON object: %s\n", json_object_to_json_string(jo)); - - rv = xattr_list_new(); - if (!rv) - goto out; - - json_object_object_foreach(jo, key, val) { - val_str = json_object_to_json_string(val); - dbg_msg("Adding '%s' -> '%s'\n", key, val_str); - if (xattr_list_add_values(rv, key, val_str, strlen(val_str))) { - xattr_list_destroy(rv); - rv = NULL; - break; - } - } - -out: - return rv; -} - -char *xattr_list_key_list(struct xattr_list *xl, size_t *size) -{ - char *rv = NULL; - char *p; - struct list_head *i; - struct xattr *x; - - spin_lock(&xl->lock); - *size = xl->key_size; - rv = (char *)malloc(sizeof(char) * *size); - if (!rv) - goto out; - p = rv; - list_for_each(i, &xl->elems) { - x = container_of(i, struct xattr, head); - strcpy(p, x->key); - dbg_msg("Adding key '%s' to list.\n", x->key); - p += strlen(x->key) + 1; - } - spin_unlock(&xl->lock); - -out: - return rv; -} - - -int -xattr_list_print(struct xattr_list *xl) -{ - struct list_head *i; - struct xattr *x; - - spin_lock(&xl->lock); - list_for_each(i, &xl->elems) { - x = container_of(i, struct xattr, head); - dbg_msg("'%s' -> '%s'\n", x->key, x->value); - } - spin_unlock(&xl->lock); - - return 0; -} diff --git a/client/src/xattr.h b/client/src/xattr.h deleted file mode 100644 index c566da045..000000000 --- a/client/src/xattr.h +++ /dev/null @@ -1,73 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess - - Author: Matthias Hess - - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - -/* - C Interface: xattr - - Description: -*/ - -#ifndef __XTRFS_XATTR_H__ -#define __XTRFS_XATTR_H__ - -#include "lock_utils.h" - -#include "list.h" - -struct xattr { - struct list_head head; - char *key; - char *value; - size_t size; -}; - -extern struct xattr *xattr_new(char *key, char *value, size_t size); -extern int xattr_init(struct xattr *x, char *key, char *name, size_t size); -extern void xattr_destroy(struct xattr *x); - -struct xattr_list { - struct list_head elems; - spinlock_t lock; - size_t key_size; -}; - -extern struct xattr_list *xattr_list_new(); -extern int xattr_list_init(struct xattr_list *xl); -extern void xattr_list_del_contents(struct xattr_list *xl); -extern void xattr_list_destroy(struct xattr_list *xl); -extern struct xattr_list *xattr_list_clone(struct xattr_list *xl); - -extern int xattr_list_add(struct xattr_list *xl, struct xattr *x); -extern int xattr_list_add_values(struct xattr_list *xl, char *key, char *value, size_t size); - -extern struct json_object *xattr_list_to_json(struct xattr_list *xl); -extern struct xattr_list *json_to_xattr_list(struct json_object *jo); - -extern char *xattr_list_key_list(struct xattr_list *xl, size_t *size); - -extern int xattr_list_print(struct xattr_list *xl); - -#endif diff --git a/client/src/xcap.c b/client/src/xcap.c deleted file mode 100644 index 44ff5fd10..000000000 --- a/client/src/xcap.c +++ /dev/null @@ -1,282 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: xcap -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include -#include - -#include -#include -#include - -#include "xcap.h" - -#include "logger.h" - - -struct xcap * xcap_new() -{ - struct xcap *rv = NULL; - - rv = (struct xcap *)malloc(sizeof(struct xcap)); - if(rv != NULL && xcap_init(rv) != 0) { - xcap_delete(rv); - rv = NULL; - } - - return rv; -} - -int -xcap_init(struct xcap *xc) -{ - int rv = 0; - - xc->fileID = NULL; - xc->accessMode = NULL; - xc->expires = 0; - xc->clientIdentity = NULL; - xc->truncateEpoch = 0; - xc->serverSignature = NULL; - xc->repr = NULL; - spin_init(&xc->lock, PTHREAD_PROCESS_PRIVATE); - INIT_LIST_HEAD(&xc->head); - - creds_init(&xc->creds); - - return rv; -} - -void -xcap_clear(struct xcap *xc) -{ - if(xc) { - free(xc->fileID); - free(xc->accessMode); - free(xc->clientIdentity); - free(xc->serverSignature); - free(xc->repr); - - free(xc->creds.guid); - free(xc->creds.ggid); - xc->creds.guid = NULL; - xc->creds.ggid = NULL; - xc->fileID = NULL; - xc->accessMode = NULL; - xc->clientIdentity = NULL; - xc->serverSignature = NULL; - xc->repr = NULL; - } -} - -void -xcap_delete(struct xcap *xc) -{ - xcap_clear(xc); - spin_destroy(&xc->lock); - free(xc); -} - -int xcap_values_from_json(struct xcap *xc, struct json_object *jo) -{ - int err = 0; - struct json_object *array_obj; - - if(json_object_get_type(jo) != json_type_array && json_object_array_length(jo) != 5) { - err = 1; - goto finish; - } - - array_obj = json_object_array_get_idx(jo, 0); - xc->fileID = strdup(json_object_get_string(array_obj)); - - array_obj = json_object_array_get_idx(jo, 1); - xc->accessMode = strdup(json_object_get_string(array_obj)); - - array_obj = json_object_array_get_idx(jo, 2); - xc->expires = json_object_get_int(array_obj); - - array_obj = json_object_array_get_idx(jo, 3); - xc->clientIdentity = strdup(json_object_get_string(array_obj)); - - array_obj = json_object_array_get_idx(jo, 4); - xc->truncateEpoch = json_object_get_int(array_obj); - - array_obj = json_object_array_get_idx(jo, 5); - xc->serverSignature = strdup(json_object_get_string(array_obj)); - - xc->repr = strdup(json_object_to_json_string(jo)); - -finish: - return err; -} - - -/** - * Fill in the values of xcap with the ones corr. to 'val_str'. - */ -int xcap_values_from_str(struct xcap *xc, char *val_str) -{ - int err = 0; - struct json_object *val_obj = NULL; - - val_obj = json_tokener_parse(val_str); - if (!val_obj || is_error(val_obj)) { - err = 1; - err_msg("Cannot parse string '%s'\n", val_str); - val_obj = NULL; - goto finish; - } - - xcap_values_from_json(xc, val_obj); - -finish: - if (val_obj) - json_object_put(val_obj); - - return err; -} - -int xcap_copy_values_from_str(struct xcap *xc, char *val_str) -{ - int err = 0; - - // pthread_spin_lock(&xc->lock); - xcap_clear(xc); - xcap_values_from_str(xc, val_str); - // pthread_spin_unlock(&xc->lock); - - return err; -} - -void xcap_copy(struct xcap *dst, struct xcap *src) -{ - /* Consistency check: xcaps shopuld belong to the same file */ - if (strcmp(dst->fileID, src->fileID)) - return; - - xcap_clear(dst); -} - - -struct json_object * -xcap_to_json(struct xcap *xc) -{ - struct json_object *rv = NULL; - - if (!xc->repr) { - rv = json_object_new_array(); - if(rv == NULL) goto finish; - - json_object_array_add(rv, json_object_new_string(xc->fileID)); - json_object_array_add(rv, json_object_new_string(xc->accessMode)); - json_object_array_add(rv, json_object_new_int((int)(xc->expires))); - json_object_array_add(rv, json_object_new_string(xc->clientIdentity)); - json_object_array_add(rv, json_object_new_int((int)(xc->truncateEpoch))); - json_object_array_add(rv, json_object_new_string(xc->serverSignature)); - xc->repr = strdup(json_object_to_json_string(rv)); - } else { - rv = json_tokener_parse(xc->repr); - } -finish: - return rv; -} - -struct xcap * -json_to_xcap(struct json_object *jo) -{ - struct xcap *rv = NULL; - struct json_object *array_obj; - - if(json_object_get_type(jo) != json_type_array && json_object_array_length(jo) != 6) - goto finish; - - rv = xcap_new(); - array_obj = json_object_array_get_idx(jo, 0); - xcap_values_from_json(rv, jo); -finish: - return rv; -} - - -char * -xcap_to_str(struct xcap *xcap) -{ - char *rv = NULL; - struct json_object *jo; - - jo = xcap_to_json(xcap); - if(jo == NULL) - goto finish; - rv = strdup(json_object_get_string(jo)); - json_object_put(jo); - -finish: - return rv; -} - - -struct xcap * -str_to_xcap(char *str) -{ - struct xcap *rv = NULL; - struct json_object *jo; - - dbg_msg("JSON string is '%s':\n", str); - jo = json_tokener_parse(str); - if(jo == NULL) - goto finish; - rv = json_to_xcap(jo); - dbg_msg("JSON object is '%s':\n", json_object_get_string(jo)); - - json_object_put(jo); - -finish: - return rv; -} - - -void -xcap_print(struct xcap *xc) -{ - info_msg("File ID: %s\n", xc->fileID); - info_msg("Access mode: %s\n", xc->accessMode); - info_msg("Expires: %ld\n", xc->expires); - info_msg("Client ID: %s\n", xc->clientIdentity); - info_msg("Trunc. Epoch: %d\n", xc->truncateEpoch); - info_msg("Server Sign. %s\n", xc->serverSignature); -} diff --git a/client/src/xcap.h b/client/src/xcap.h deleted file mode 100644 index cd3f251ea..000000000 --- a/client/src/xcap.h +++ /dev/null @@ -1,80 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -C Interface: xcap - -Description: - - -Author: Matthias Hess , (C) 2007 - -Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_XCAP_H__ -#define __XTRFS_XCAP_H__ - -#include - -#include "creds.h" -#include "list.h" -#include "lock_utils.h" - -/** - * XCapability structure. - */ -struct xcap { - char *fileID; - char *accessMode; - long expires; - char *clientIdentity; - int truncateEpoch; - char *serverSignature; - char *repr; /*!< String representation of xcap */ - struct creds creds; - spinlock_t lock; - struct list_head head; -}; - -extern struct xcap *xcap_new(); -extern int xcap_init(struct xcap *xc); -extern void xcap_clear(struct xcap *xc); -extern void xcap_delete(struct xcap *xc); -extern int xcap_values_from_str(struct xcap *xc, char *val_str); -extern int xcap_copy_values_from_str(struct xcap *xc, char *val_str); - -extern void xcap_copy(struct xcap *dst, struct xcap *src); - -extern int xcap_check_sign(struct xcap *xc); - -extern struct json_object *xcap_to_json(struct xcap *xc); -extern struct xcap *json_to_xcap(struct json_object *jo); -extern struct xcap *str_to_xcap(char *str); -extern char *xcap_to_str(struct xcap *xc); - -extern void xcap_print(struct xcap *xc); - -#endif diff --git a/client/src/xcap_inv.c b/client/src/xcap_inv.c deleted file mode 100644 index c8274f808..000000000 --- a/client/src/xcap_inv.c +++ /dev/null @@ -1,379 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: xcap_inv -* -* Description: -* -* Rationale: -* Like the file inventory takes care of file related entries -* the xcap inventory takes care of managing x-capabilities, -* especially the automated renewal of such capabilities. -* Renewal can take place automatically (because the client -* gets a signal that a capability is about to time out) or -* manually because an OSD says it must be renewed because of -* file size changes. -* X-capabilities are not on a per user file basis but on a -* per file basis, ie. for all replica and user files of a -* specific file there is only one x-capability, right now. -* Therefore user files should reference the same x-cap and -* not copies of the same one and the xcap inventory is repsonsible -* of keeping track of these x-caps. -* Handling of renewal should be done exclusively in the inventory, -* but every other thread should be allowed to initiate renewals. -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "mrc_request.h" -#include "mrc.h" -#include "xcap_inv.h" -#include "list.h" -#include "lock_utils.h" -#include "logger.h" - -#ifdef _WIN32 -static int renew_interval = 2; -#else -struct itimerval timval, oldtimeval; -struct sigaction newact, oldact; -#endif -pthread_t timer_thread; - -sigset_t newset, oldset; - -int xcap_inv_renew(struct xcap_inv *xr, long duration, int lock); - - -/** - * This thread waits for SIGALRM and renews some capabilities and - * resets the timer. - */ -void *xcap_inv_thread(void *data) -{ - struct xcap_inv *xi = (struct xcap_inv *)data; - sigset_t newset; - int signum; - time_t now; - - while(1) { -#ifdef _WIN32 - if(renew_interval == 0) - break; - sleep(renew_interval); -#else - sigemptyset(&newset); - sigaddset(&newset, SIGALRM);\ - if (sigwait(&newset, &signum)) { - err_msg("Error in sigwait."); - continue; - } - - if(signum != SIGALRM) { - err_msg("Unhandled signal.\n"); - continue; - } -#endif - now = time(NULL); - // dbg_msg("ALARM seen. Starting to work on x-caps.\n"); - // dbg_msg("Diff between last and now: %ld\n", now - xi->last_signal); - spin_lock(&xi->lock); - xcap_inv_renew(xi, 5, 0); - spin_unlock(&xi->lock); - - xi->last_signal = now; - } - return NULL; -} - -void xcap_inv_sighandler(int signum) -{ - dbg_msg("ALARM received. This should not happen!\n"); -} - -void xcap_inv_init(struct xcap_inv *xi) -{ - INIT_LIST_HEAD(&xi->renewals); - spin_init(&xi->lock, PTHREAD_PROCESS_PRIVATE); - - xi->earliest_renewal = 0L; - xi->last_signal = 0L; - xi->last_renewal_duration = 0L; - xi->longest_renewal_duration = 0L; - -#ifndef _WIN32 -#if 1 - memset((void *)&newact, 0, sizeof(newact)); - sigemptyset(&newact.sa_mask); - newact.sa_handler = xcap_inv_sighandler; - sigaction(SIGALRM, &newact, &oldact); -#endif - - /* In the beginning let the timer interrupt occur every twenty seconds. - This will be changed later once we receive the first xcaps. */ - timval.it_interval.tv_sec = 2; - timval.it_interval.tv_usec = 0; - timval.it_value.tv_sec = 2; - timval.it_value.tv_usec = 0; -#endif - - xi->last_signal = time(NULL); - - pthread_create(&timer_thread, NULL, xcap_inv_thread, (void *)xi); -#ifndef _WIN32 - setitimer(ITIMER_REAL, &timval, &oldtimeval); -#endif -} - -void xcap_inv_clear(struct xcap_inv *xi) -{ - struct list_head *iter; - struct xcap *xcap; - - // pthread_join(&timer_thread, NULL); -#ifdef _WIN32 - renew_interval = 0; -#else - timval.it_value.tv_sec = 0; - timval.it_value.tv_usec = 0; - setitimer(ITIMER_REAL, &timval, &oldtimeval); -#endif - - spin_lock(&xi->lock); - if (list_empty(&xi->renewals)) - dbg_msg("Renewal list is empty.\n"); - - while(!list_empty(&xi->renewals)) { - iter = xi->renewals.next; - list_del(iter); - xcap = container_of(iter, struct xcap, head); - dbg_msg("Deleting xcap for file '%s'\n", xcap->fileID); - xcap_delete(xcap); - } - spin_unlock(&xi->lock); -} - -void xcap_inv_destroy(struct xcap_inv *xi) -{ - xcap_inv_clear(xi); - spin_destroy(&xi->lock); - free(xi); -} - - -/** - * Add an xcapability to the queue. - * This function already sorts the queue to have the most urgent - * entries at the front. - * This function is not locking the inventory. */ -int xcap_inv_add(struct xcap_inv *xi, struct xcap *xc, int lock) -{ - int err = 0; - struct list_head *iter = NULL, *iter2; - struct xcap *xcl; - - if (lock) - spin_lock(&xi->lock); - - list_for_each_safe(iter, iter2, &xi->renewals) { - xcl = container_of(iter, struct xcap, head); - if(xcl->expires > xc->expires) { - list_add(&xc->head, iter->prev); - break; - } - } - if (iter == &xi->renewals) { - list_add_tail(&xc->head, &xi->renewals); - dbg_msg("Xcap added to inventory.\n"); - } - - if (lock) - spin_unlock(&xi->lock); - - return err; -} - -int xcap_inv_remove(struct xcap_inv *xi, struct xcap *xc) -{ - int err = 0; - - spin_lock(&xi->lock); - list_del(&xc->head); - spin_unlock(&xi->lock); - - xcap_delete(xc); - - return err; -} - -int xcap_inv_requeue(struct xcap_inv *xi, struct xcap *xc, int lock) -{ - int err = 0; - /* struct list_head *iter; */ - - if (lock) - spin_lock(&xi->lock); - list_del(&xc->head); - INIT_LIST_HEAD(&xc->head); - if (lock) - spin_unlock(&xi->lock); - err = xcap_inv_add(xi, xc, lock); - - return err; -} - -/** - * Find a xcap by the corresponding file id. - */ -struct xcap *xcap_inv_find(struct xcap_inv *xi, char *fileid) -{ - struct xcap *rv = NULL; - struct list_head *iter; - - spin_lock(&xi->lock); - list_for_each(iter, &xi->renewals) { - struct xcap *xc; - xc = container_of(iter, struct xcap, head); - if (!strcmp(xc->fileID, fileid)) { - rv = xc; - break; - } - } - spin_unlock(&xi->lock); - - return rv; -} - - -/** - * Renew a x-capability immediately. - * If 'new_size' is negative, we do not update the file size but only the - * capability. - */ -int xcap_inv_renew_immediate(struct xcap_inv *xi, - char *fileid, struct xcap *xc, - off_t new_size, int epoch, int order, - int lock) -{ - int err = 0; - struct req *req; - struct MRC_Req_renew_resp resp; - struct creds c; - time_t now = time(NULL); - time_t start_renewal, end_renewal; - - start_renewal = time(NULL); - dbg_msg("Renewing with size %ld\n", new_size); - - c.uid = xc->creds.uid; - c.gid = xc->creds.gid; - c.pid = xc->creds.pid; - c.guid = xc->creds.guid; - c.ggid = xc->creds.ggid; - - if (xc->expires - now < 0) { - err_msg("ERROR: Trying to renew an expired x-capability.\n"); - } - - req = MRC_Request__renew(&err, &resp, xc, new_size, epoch, &c, NULL, order, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = ENOMEM; - - if (err) - goto finish; - - xcap_inv_requeue(xi, xc, lock); - end_renewal = time(NULL); - - xi->last_renewal_duration = end_renewal - start_renewal; - if (xi->last_renewal_duration > xi->longest_renewal_duration) - xi->longest_renewal_duration = xi->last_renewal_duration; - -finish: - return err; -} - -/** - * Renew capabilities from the capability list. - * This function renews all capabilities that fall within the - * time period indicated by 'duration' of the current time. - */ -int xcap_inv_renew(struct xcap_inv *xi, long duration, int lock) -{ - int err = 0; - struct list_head *iter, *iter2; - struct xcap *xc; - time_t now = time(NULL), diff; - - list_for_each_safe(iter, iter2, &xi->renewals) { - xc = container_of(iter, struct xcap, head); - spin_lock(&xc->lock); - diff = xc->expires - now; - // dbg_msg("xcap expires: %ld (%ld)\n", diff, xc->expires); - if (diff < 0) { - spin_unlock(&xc->lock); - err_msg("X-Capability expired!\n"); - dbg_msg("xcap expires: %ld (%ld). Now %ld\n", diff, xc->expires, now); - } else { - if (diff < duration) { - dbg_msg("Should renew the capability.\n"); - xcap_inv_renew_immediate(xi, NULL, xc, -1, -1, 0, lock); - spin_unlock(&xc->lock); - } else { - spin_unlock(&xc->lock); - break; - } - } - } - - return err; -} - - -void xcap_inv_print(struct xcap_inv *xi) -{ - struct list_head *iter; - struct xcap *xc; - - list_for_each(iter, &xi->renewals) { - xc = container_of(iter, struct xcap, head); - xcap_print(xc); - } -} diff --git a/client/src/xcap_inv.h b/client/src/xcap_inv.h deleted file mode 100644 index b0372349b..000000000 --- a/client/src/xcap_inv.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - C++ Interface: xcap_inv - - Description: - - - Author: Matthias Hess , (C) 2007 - - Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_XCAP_INV_H__ -#define __XTRFS_XCAP_INV_H__ - -#include - -#include "xcap.h" - -struct xcap_inv { - struct list_head renewals; - spinlock_t lock; - long earliest_renewal; /*!< When must be the earliest next renewal? */ - long last_signal; /*!< When did we get the last signal? */ - long last_renewal_duration; /*!< Keep track of how long the last renewal took */ - long longest_renewal_duration; /*!< What is the longest renewal time that we have seen. */ -}; - -extern struct xcap_inv xcap_inv; - -void xcap_inv_init(struct xcap_inv *xi); -void xcap_inv_clear(struct xcap_inv *xi); -void xcap_inv_destroy(struct xcap_inv *xi); - -void xcap_inv_sighandler(int signum); -int xcap_inv_add(struct xcap_inv *xr, struct xcap *xc, int lock); -int xcap_inv_remove(struct xcap_inv *xi, struct xcap *xc); -struct xcap *xcap_inv_find(struct xcap_inv *xi, char *fileid); -int xcap_inv_renew_immediate(struct xcap_inv *xi, - char *fileid, struct xcap *xc, - off_t new_size, int epoch, int order, int lock); -struct xcap *xcap_inv_exchange(struct xcap_inv *xi, char *fileid, struct xcap *new_xcap); - -void xcap_inv_print(struct xcap_inv *xi); - -#endif diff --git a/client/src/xloc.c b/client/src/xloc.c deleted file mode 100644 index 0f2a836e5..000000000 --- a/client/src/xloc.c +++ /dev/null @@ -1,573 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - C Implementation: xloc - - Description: - - - Copyright: See COPYING file that comes with this distribution - - */ - -#include -#include - -#include -#include - -#include "stripingpolicy.h" -#include "xloc.h" -#include "dirservice.h" - -#include "lock_utils.h" -#include "logger.h" - - -struct xlocs *xlocs_new() -{ - struct xlocs *rv = NULL; - - rv = (struct xlocs *)malloc(sizeof(struct xlocs)); - if(rv != NULL && xlocs_init(rv) != 0) { - xlocs_delete(rv); - rv = NULL; - } - - return rv; -} - -int xlocs_init(struct xlocs *xl) -{ - int rv = 0; - - INIT_LIST_HEAD(&xl->head); - xl->sp = NULL; - xl->osds = NULL; - xl->num_osds = 0; - xl->repr = NULL; - - return rv; -} - -void xlocs_clear(struct xlocs *xl) -{ - int i; - - if(xl->sp) { - for(i=0; isp->width; i++) { - free(xl->osds[i]); - } - free(xl->sp); - } - free(xl->osds); - xl->osds = NULL; - xl->num_osds = 0; - free(xl->repr); -} - -void xlocs_delete(struct xlocs *xl) -{ - xlocs_clear(xl); - free(xl); -} - -void xlocs_new_repr(struct xlocs *xl) -{ - if(xl->repr) free(xl->repr); - xl->repr = xlocs_to_str(xl); -} - -char *xlocs_full_uri(char *uri) -{ - char *rv = NULL; - char *pnt = NULL; - size_t len, real_len; - size_t scheme_size = strlen("http://"); - - pnt = strstr(uri, "://"); - if (!pnt) { /* No scheme given */ - len = strlen(uri); - real_len = len + scheme_size; - rv = (char *)malloc(real_len + 1); - strncpy(rv, "http://", scheme_size + 1); - rv = strncat(rv, uri, len); - dbg_msg("New URI is '%s'\n", rv); - } else { - rv = strdup(uri); - } - - return rv; -} - - -void xlocs_add_osd(struct xlocs *xl, char *osd_id) -{ - if (xl->num_osds == 0) { - - /* In a consistent state, this should not be - necessary, because xl->osds would always be NULL - if xl->num_osds == 0 */ - if (xl->osds) - free(xl->osds); - xl->osds = (char **)malloc(sizeof(char *) * xl->sp->width); - memset((void *)xl->osds, 0, xl->sp->width * sizeof(char *)); - } - - if (xl->num_osds < xl->sp->width) { - xl->osds[xl->num_osds] = /* xlocs_full_uri */strdup(osd_id); - xl->num_osds++; - } - -} - - -/** - * Extract one xlocation from a JSON object. - * - * The JSON object is usually one part of a complete xlocation - * description. - * - * @param - */ -struct xlocs *json_to_xloc(struct json_object *jo) -{ - struct xlocs *rv = NULL; - struct json_object *osds_obj; - int i; - - if (json_object_get_type(jo) == json_type_array && - json_object_array_length(jo) == 2) { - rv = xlocs_new(); - if(rv == NULL) { - err_msg("Cannot create new xlocs structure.\n"); - goto finish; - } - rv->sp = json_to_striping_policy(json_object_array_get_idx(jo, 0)); - if(rv->sp == NULL) { - err_msg("Cannot create striping policy!\n"); - goto err; - } - - /* Now an array with OSD urls must follow */ - osds_obj = json_object_array_get_idx(jo, 1); - if(json_object_get_type(osds_obj) != json_type_array) { - err_msg("Next object is not an array!\n"); - goto err; - } - - /* Check for right size of array */ - if(json_object_array_length(osds_obj) != rv->sp->width) { - err_msg("Wrong number of OSD strings in JSON object.\n"); - goto err; - } - - for(i=0; isp->width; i++) { - xlocs_add_osd(rv, json_object_get_string(json_object_array_get_idx(osds_obj, i))); - } - - rv->repr = strdup(json_object_to_json_string(jo)); - dbg_msg("Representation of x-loc: %s\n", rv->repr); - goto finish; - - } -err: - free(rv->sp); - rv->sp = NULL; - xlocs_delete(rv); - rv = NULL; - -finish: - return rv; -} - -struct json_object *xloc_to_json(struct xlocs *xl) -{ - struct json_object *rv = NULL; - - rv = json_tokener_parse(xl->repr); - - return rv; -} - -struct xlocs *str_to_xlocs(char *str) -{ - struct xlocs *rv = NULL; - struct json_object *jo; - - jo = json_tokener_parse(str); - if(jo == NULL) - goto finish; - - rv = json_to_xloc(jo); - json_object_put(jo); - -finish: - return rv; -} - -char *xlocs_to_str(struct xlocs *xl) -{ - char *rv = NULL; - - rv = strdup(xl->repr); - - dbg_msg("xlocs_to_str is %s\n", rv); - - return rv; -} - - -struct xloc_list *xloc_list_new() -{ - struct xloc_list *rv = NULL; - - rv = (struct xloc_list *)malloc(sizeof(struct xloc_list)); - if (rv) { - INIT_LIST_HEAD(&rv->head); - rv->version = 0; - spin_init(&rv->lock, PTHREAD_PROCESS_PRIVATE); -#if PROT_VERSION > 2 - rv->repUpdatePolicy = NULL; -#endif - rv->repr = NULL; - } - - return rv; -} - -void xloc_list_delete_entries(struct xloc_list *xl) -{ - struct list_head *iter, *in; - struct xlocs *x; - - iter = xl->head.next; - - spin_lock(&xl->lock); - while(iter != &xl->head) { - in = iter->next; - list_del(iter); - x = container_of(iter, struct xlocs, head); - xlocs_delete(x); - iter = in; - } -#if PROT_VERSION > 2 - free(xl->repUpdatePolicy); -#endif - free(xl->repr); - spin_unlock(&xl->lock); -} - -void xloc_list_delete(struct xloc_list *xl) -{ - xloc_list_delete_entries(xl); - spin_destroy(&xl->lock); - free(xl); -} - - -struct xlocs *xloc_list_get_idx_str(char *xloc_list_str, int i) -{ - struct xlocs *rv = NULL; - struct json_object *lo, *jo, *array; - - lo = json_tokener_parse(xloc_list_str); - - if (!lo || is_error(lo)) { - lo = NULL; - goto finish; - } - - array = json_object_array_get_idx(lo, 0); - - if (i < 0 || i >= json_object_array_length(array)) - goto finish; - - jo = json_object_array_get_idx(array, i); - rv = json_to_xloc(jo); - -finish: - if (lo) - json_object_put(lo); - - return rv; -} - -/** - * convert JSON object to xlocation list. - * @param jo the JSON object to convert - * @param lh the resulting list of xlocs - * @returns 0 on success, error code otherwise - */ -int json_to_xlocs_list(struct json_object *jo, struct xloc_list *xll) -{ - int rv = 0; - struct xlocs *xl; - struct json_object *jo2; -#if PROT_VERSION > 2 - struct json_object *rup; -#endif - struct json_object *array_obj; - int i; - - INIT_LIST_HEAD(&xll->head); - if (xll->repr) - free(xll->repr); - - /* Object type must be an array of arrays */ - if(json_object_get_type(jo) != json_type_array) { - rv = 1; - goto finish; - } - -#if PROT_VERSION > 2 - if (json_object_array_length(jo) != 3) { - rv = 3; - goto finish; - } - jo2 = json_object_array_get_idx(jo, 0); -#else - if (json_object_array_length(jo) != 2) { - rv = 3; - goto finish; - } - jo2 = json_object_array_get_idx(jo, 0); -#endif - for(i=0; ihead, &xll->head); - } - - xll->version = json_object_get_int(json_object_array_get_idx(jo, 1)); -#if PROT_VERSION > 2 - rup = json_object_array_get_idx(jo, 2); - xll->repUpdatePolicy = strdup(json_object_get_string(rup)); -#endif - xll->repr = strdup(json_object_to_json_string(jo)); - -finish: - if(rv != 0) { - err_msg("Error %d in converting JSON to xloc_list\n", rv); - xloc_list_delete_entries(xll); - } - - return rv; -} - - -struct json_object * -xlocs_list_to_json(struct xloc_list *xll) -{ - struct json_object *rv = NULL, *array; - struct xlocs *xl; - struct list_head *iter; - - spin_lock(&xll->lock); - - rv = json_object_new_array(); - - array = json_object_new_array(); - - list_for_each(iter, &xll->head) { - xl = container_of(iter, struct xlocs, head); - json_object_array_add(array, xloc_to_json(xl)); - } - - json_object_array_add(rv, array); - json_object_array_add(rv, json_object_new_int(xll->version)); -#if PROT_VERSION > 2 - json_object_array_add(rv, json_object_new_string(xll->repUpdatePolicy)); -#endif - spin_unlock(&xll->lock); - - return rv; -} - -struct xloc_list *str_to_xlocs_list(char *xlocs) -{ - struct xloc_list *xlocs_list; - struct json_object *jo; - - xlocs_list = xloc_list_new(); - if (!xlocs_list) { - err_msg("unable to allocate lh\n"); - return NULL; - } - jo = json_tokener_parse(xlocs); - if (!jo) { - err_msg("Error in parsing the x-locs string.\n"); - goto error; - } - if (json_to_xlocs_list(jo, xlocs_list) != 0) { - err_msg("Cannot extract xlocation list.\n"); - goto error; - } - json_object_put(jo); - return xlocs_list; - error: - free(xlocs_list); - return NULL; -} - -/** - * Extract xlocation instance string from full xlocation header. - * - * @param xloc the full XLocation header JSON string - * @param idx the index of the xloc instance (replica instance) - * @return pointer to newly allocated string with xloc_instance JSON string - */ -char *xloc_inst_extract(char *xloc, int idx) -{ - struct json_object *obj, *sobj, *aobj; - char *inst = NULL; - int nobjs; - - obj = json_tokener_parse(xloc); - - aobj = json_object_array_get_idx(obj, 0); - - nobjs = json_object_array_length(aobj); - if (idx < 0 || idx >= nobjs) { - err_msg("ERROR in %s: idx=%d out of range [0,%d)\n", - __FUNCTION__, idx, nobjs); - goto out; - } - sobj = json_object_array_get_idx(aobj, idx); - inst = strdup(json_object_to_json_string(sobj)); - - /* does sobj need to be freed, too? */ - /* json_object_put(sobj); */ - - out: - json_object_put(obj); - return inst; -} - -/** - * Parse xlocation header instance string. - * - * @param ofile the target open_file structure for parsed results - * @param xloc_instance the xloc instance JSON string - * @return non-zero if any error occured - */ -int xloc_inst_parse(struct file_replica *ofile, char *xloc_instance, - struct dirservice *ds) -{ - struct json_object *obj, *sobj, *osds, *o; - char *policy, **ids; - int owidth, i, nosds, err = ENOENT; - char *id_str = NULL; - - dbg_msg("Parsing x location message: %s\n", xloc_instance); - - obj = json_tokener_parse(xloc_instance); - if (json_object_array_length(obj) != 2) { - err_msg("ERROR in %s: xloc_inst no of elements? %s\n", - __FUNCTION__, json_object_to_json_string(obj)); - goto out; - } - - /* parse striping policy */ - sobj = json_object_array_get_idx(obj, 0); - o = json_object_object_get(sobj, "policy"); - if (!(o = json_object_object_get(sobj, "policy"))) - goto fail; - policy = json_object_get_string(o); - if (!strcmp(policy, "RAID0")) - ofile->sp.id = SPOL_RAID_0; - else if (!strcmp(policy, "RAID5")) - ofile->sp.id = SPOL_RAID_5; - else - ofile->sp.id = SPOL_UNKNOWN; - - if (!(o = json_object_object_get(sobj, "stripe-size"))) - goto fail; - ofile->sp.stripe_size = (size_t)(json_object_get_int(o) * 1024); - - if (!(o = json_object_object_get(sobj, "width"))) - goto fail; - owidth = ofile->sp.width; - ofile->sp.width = json_object_get_int(o); - /* json_object_put(sobj); */ - - /* parse OSD list */ - osds = json_object_array_get_idx(obj, 1); - nosds = json_object_array_length(osds); - ids = ofile->osd_ids; - if (ids) { - /* free old strings */ - for (i = 0; i < owidth; i++) - if (ids[i]) - free(ids[i]); - } - if (nosds > owidth || !ids) { - /* need to realloc pointer array: free elements first */ - ids = (char **)realloc((void *)ids, sizeof(char *) * nosds); - if (!ids) - goto fail_osds; - } - /* now populate pointer array */ - for (i = 0; i < nosds; i++) { - o = json_object_array_get_idx(osds, i); - id_str = json_object_get_string(o); - ids[i] = strdup(id_str); -#if 0 - if (ds) { - ids[i] = dirservice_resolve_uuid(ds, url_str, 0); - } else { - urls[i] = /* xlocs_full_uri */strdup(url_str); - } -#endif - if (!ids[i]) - goto fail_osds; - } - - ofile->osd_ids = ids; - err = 0; - - fail_osds: - // json_object_put(osds); - fail: - // json_object_put(o); - out: - json_object_put(obj); - return err; -} - - -void -xlocs_print(struct xlocs *xl) -{ - int i; - - for(i=0; isp->width; i++) { - printf("osd[%d] = %s\n", i, xl->osds[i]); - } -} diff --git a/client/src/xloc.h b/client/src/xloc.h deleted file mode 100644 index 7dfaeff70..000000000 --- a/client/src/xloc.h +++ /dev/null @@ -1,124 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -C Interface: xloc - -Description: - -Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_XLOC_H__ -#define __XTRFS_XLOC_H__ - -#include - -#include "dirservice.h" -#include "file.h" -#include "list.h" -#include "lock_utils.h" - -struct file_replica; - - -/** - * Xloc list - * - * Contains striping policy and the URLs of the participating OSDs. - */ -struct xlocs { - struct list_head head; - struct striping_policy *sp; /*!< striping policy */ - char **osds; /*!< Array of OSD ids */ - int num_osds; /*!< Number of currently defined OSDs */ - char *repr; /*!< Representation of x-location */ -}; - -extern struct xlocs *xlocs_new(); -extern int xlocs_init(struct xlocs *xl); -extern void xlocs_clear(struct xlocs *xl); -extern void xlocs_delete(struct xlocs *xl); -extern int xlocs_copy(struct xlocs *dst, struct xlocs *src); - -void xlocs_add_osd(struct xlocs *xl, char *osd_url); - -/** - * Xloc list of lists - * Contains an additional version number. - */ -struct xloc_list { - spinlock_t lock; - struct list_head head; - int version; -#if PROT_VERSION > 2 - char *repUpdatePolicy; -#endif - char *repr; -}; - -extern struct xloc_list *xloc_list_new(); -extern void xloc_list_delete(struct xloc_list *xl); - -extern int xlocs_list_add_xloc(struct xloc_list *xll, struct xlocs *xl); - -extern struct xlocs *xloc_list_get_idx_str(char *xloc_list_str, int i); - -extern int json_to_xlocs_list(struct json_object *jo, struct xloc_list *xll); -extern struct json_object *xlocs_list_to_json(struct xloc_list *xll); - -extern struct json_object *xloc_to_json(struct xlocs *xl); -extern struct xlocs *str_to_xlocs(char *str); -extern char *xlocs_to_str(struct xlocs *xl); - -extern struct xloc_list *str_to_xlocs_list(char *xlocs); - -extern void xlocs_list_delete(struct list_head *xlocs_list); - -/* - * Handling of xlocation header components, related to stripe info. - */ - -/** - * Extract xlocation instance string from full xlocation header. - * - * @param xloc the full XLocation header JSON string - * @param indx the index of the xloc instance (replica instance) - * @return pointer to newly allocated string with xlock_instance JSON string - */ -extern char *xloc_inst_extract(char *xloc, int indx); - -/** Parse xlocation header instance string. - * - * @param ofile the target open_file structure for parsed results - * @param xlock_instance the xloc instance JSON string - * @return non-zero if any error occured - */ -extern int xloc_inst_parse(struct file_replica *ofile, - char *xloc_instance, struct dirservice *ds); - -extern void xlocs_print(struct xlocs *xl); - -#endif diff --git a/client/src/xtreemfs.c b/client/src/xtreemfs.c deleted file mode 100644 index 2d14b9e9b..000000000 --- a/client/src/xtreemfs.c +++ /dev/null @@ -1,471 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: xtreemfs -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include - -#ifndef _WIN32 -#include -#include -#else -#include -#define boolean json_boolean -#endif - -#include - -#include -#include - -#include "xtreemfs_utils.h" - -#include "xtreemfs.h" -#include "xtreemfs_conf.h" -#include "xcap_inv.h" -#include "sobj_cache.h" -#include "logger.h" -#include "mrc_request.h" -#include "mrc_comm.h" - -#include "filerw.h" -#include "stripe.h" - -/* Configurations aspects */ -char *volume; -char *mrc_url; -int xtreemos_env = 0; - -struct xtreemfs_conf conf; - -/* Sobj cache */ -struct sobj_cache sobj_cache; - -/* Translation engine */ -struct transl_engine transl_engine; - -/* AMS connection */ -int xtreemos_ams_sock; -mutex_t xtreemos_ams_mutex; - -/* Connection to directory service */ -struct dirservice *dirservice = NULL; - -/* Entry point for managing current OSDs */ -struct OSD_Manager osd_manager; - -struct file_inv file_inv; - -struct xcap_inv xcap_inv; - -/* Timing */ -struct bench_timings read_timings; -struct bench_timings write_timings; -struct bench_timer read_timer; -struct bench_timer write_timer; - -struct work_queue *client_wq = NULL; - - -#ifdef ITAC -int itac_filerw_class; -int itac_fobj_class; -int itac_sobj_class; - -int itac_filerw_handle_hdl; -int itac_fobj_handle_hdl; -int itac_sobj_handle_hdl; -#endif - -ne_ssl_context *ssl_ctx = NULL; -ne_ssl_client_cert *xtreemfs_client_cert = NULL; -ne_ssl_certificate *xtreemfs_ca_cert = NULL; - -pthread_attr_t *xpattr; - - -int -extract_mrc_and_vol(char *vol_url, char **mrc_url, char **vol_name) -{ - int rv = 0; - ne_uri volume_uri; - - dbg_msg("Analysing volume URL: '%s'\n", vol_url); - - ne_uri_parse((const char *)vol_url, &volume_uri); - - if(volume_uri.path != NULL) { - if(volume_uri.path[0] == '/') - *vol_name = strdup(&volume_uri.path[1]); - else - *vol_name = strdup(volume_uri.path); - free(volume_uri.path); - - volume_uri.path = strdup("/"); - *mrc_url = ne_uri_unparse(&volume_uri); - dbg_msg("MRC URL: '%s'\n", *mrc_url); - } - else { - rv = 1; - } - ne_uri_free(&volume_uri); - - return rv; -} - - -int -xtreemfs_parse_mount_options(int argc, char **argv) -{ - return 0; -} - -int -xtreemfs_init(char *vol_url) -{ - int rv = 0; - ne_uri vol_uri; - struct req *req; - struct creds creds; - struct MRC_Req_get_volumes_resp resp; - int err = 0; - int i; - - sighandler_install(); - - creds_init(&creds); - - ne_sock_init(); - if (str_to_uri_ds(vol_url, &vol_uri, MRC_DEFAULT_PORT, dirservice)) { - rv = 1; - goto out; - } - - mrc_url = extract_mrc(&vol_uri); - volume = extract_volume(&vol_uri); - ne_uri_free(&vol_uri); - - if (!volume) { - rv = 4; - goto out; - } - - /* Before we start we need to check if the volume is available on - the MRC. For that we need to start the MRC communication - infrastructure. This will be replaced by a MRC utility - function that avoids starting the whole infrastructure if - it is not needed. - */ - - mrccomm_init(mrc_url, NUM_MRCOMM_THREADS); - - /* Now see if we can get volume information */ - get_local_creds(&creds); - req = MRC_Request__getVolumes(&err, &resp, &creds, NULL, 1); - if (!req) { - rv = 1; - goto out; - } - err = execute_req(mrccomm_wq, req); - - // req_del(req); - if (!err) { - for(i=0; iuid = ctx->uid; - mr->gid = ctx->gid; - mr->pid = ctx->pid; - - dbg_msg("uid: %d\n", ctx->uid); - dbg_msg("gid: %d\n", ctx->gid); - dbg_msg("pid: %d\n", ctx->pid); -} -#endif - -#ifndef _WIN32 -void -xtreemfs_get_unix_creds(char *ownerId, char *groupId, uid_t *uid, gid_t *gid) -{ - char username[256]; - char groupname[256]; - char *p; - int i, j, l; - struct passwd passwd, *pwd_res; - char pwd_str[1024]; - struct group group, *grp_res; - char grp_str[1024]; - - dbg_msg("ownerId: '%s'\n", ownerId); - - l = strlen(ownerId); - j = 0; - while((ownerId[j] == ' ' || ownerId[j] == '\t') && j < l) j++; - - p = username; - i = 0; - while(ownerId[j] != ' ' && ownerId[j] != '\t' && ownerId[j] != '\0' && i<256 && jpw_uid; - - getgrnam_r(groupname, &group, grp_str, 1024, &grp_res); - if (grp_res) - *gid = grp_res->gr_gid; -} - -int xtreemfs_get_unix_ids(char **userId, char **groupId, uid_t uid, gid_t gid) -{ - int err = 0; - struct passwd passwd, *pwd_res; - char pwd_str[1024]; - struct group group, *grp_res; - char grp_str[1024]; - - *userId = NULL; - *groupId = NULL; - - if ((int)gid >= 0) { - getgrgid_r(gid, &group, grp_str, 1024, &grp_res); - if (!grp_res) { - err = 1; - dbg_msg("Group not found.\n"); - goto finish; - } - *groupId = strdup(grp_res->gr_name); - } - - if ((int)uid >= 0) { - getpwuid_r(uid, &passwd, pwd_str, 1024, &pwd_res); - if (!pwd_res) { - err = 1; - dbg_msg("Password entry not found.\n"); - goto finish; - } - *userId = strdup(pwd_res->pw_name); - } - -finish: - return err; -} - -#else /* _WIN32 */ -void -xtreemfs_get_unix_creds(char *ownerId, char *groupId, uid_t *uid, gid_t *gid) -{ - *uid = 0; - *gid = 0; -} - -int xtreemfs_get_unix_ids(char **userId, char **groupId, uid_t uid, gid_t gid) -{ - char buffer[100]; - DWORD len = 100; - GetUserName(buffer, &len); - *userId = strdup(buffer); - *groupId = strdup(""); - return 0; -} - -#endif /* _WIN32 */ - -int xtreemfs_load_mods(struct transl_engine *te, char *mod_dir) -{ - int err = 0; - char check_dir[1024]; - char *xtreemfs_mod_dir = NULL; - char *xtreemfs_start_dir = NULL; - - /* If the user has set the 'mod_dir' options it will override all - other settings. If it is not set we look for the 'XTREEMFS_MODDIR' - environment variable and then we try to find modules by the - base directory of the user space program. */ - - transl_engine_init(&transl_engine, mod_dir); - - /* First let's check if we have a 'mod_dir' argument. */ - if (!mod_dir) { - char *envp = NULL; - - envp = getenv(XTREEMFS_MODDIR); - if (envp) { - dbg_msg("XTREEMFS_MODDIR = '%s'\n", envp); - xtreemfs_mod_dir = strdup(envp); - } else { - char *p = NULL; - - /* We do not have an environment variable at hand. So - we must try to figure out a module directory by - the path of the executable. */ - if (!xtreemfs_start_dir) - xtreemfs_start_dir = current_basedir(); - if (!xtreemfs_start_dir) { - err = 1; - goto out; - } - - /* First check '/mods' */ - snprintf(check_dir, 1024, "%s/mods", xtreemfs_start_dir); - dbg_msg("Trying dir '%s'\n", check_dir); - if (!transl_engine_load_mods(te, check_dir)) { - goto out; - } - - /* The check '/../mods' */ - strncpy(check_dir, xtreemfs_start_dir, 1024); - p = rindex(check_dir, '/'); - if (p) { - *p = '\0'; - p = strncat(check_dir, "/mods", 1024); - if (!p) { - err = 2; - goto out; - } - dbg_msg("Trying dir '%s'\n", check_dir); - if (!transl_engine_load_mods(te, check_dir)) { - goto out; - } - } - } - } -out: - if (xtreemfs_mod_dir) - free(xtreemfs_mod_dir); - if (xtreemfs_start_dir) - free(xtreemfs_start_dir); - return err; -} - -void xtreemfs_unload_mods(struct transl_engine *te) -{ - transl_engine_unload_mods(te); -} diff --git a/client/src/xtreemfs.h b/client/src/xtreemfs.h deleted file mode 100644 index a57db403f..000000000 --- a/client/src/xtreemfs.h +++ /dev/null @@ -1,164 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Interface: xtreemfs -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#ifndef __XTRFS_XTREEMFS_H__ -#define __XTRFS_XTREEMFS_H__ - -#include -#include -#include -#include - -#include "mrc_request.h" -#include "osd_manager.h" -#include "file_inv.h" -#include "file.h" -#include "xcap_inv.h" -#include "sobj_cache.h" -#include "transl_engine.h" -#include "creds.h" - -#include "hashtable.h" - -#include "bench_timer.h" -#include "logger.h" - -#include "platforms.h" - -#ifdef XTREEMOS_ENV -#include -#endif - -/* Define a pseudo block size */ -#define XTREEMFS_PSEUDO_BLOCKSIZE 512 - -/* XTREEMFS_MODDIR environment variable */ -#define XTREEMFS_MODDIR "XTREEMFS_MODDIR" - -/* This should be dynamically configurable */ -#define NUM_MRCOMM_THREADS 4 -#define NUM_SOBJ_THREADS 8 -#define NUM_FILERW_THREADS 4 -#define NUM_FOBJ_THREADS 8 - -extern int xtreemos_env; -extern int xtreemos_ams_sock; -extern mutex_t xtreemos_ams_mutex; - -extern struct sobj_cache sobj_cache; -extern struct transl_engine transl_engine; - -extern struct xtreemfs_conf conf; -extern struct dirservice *dirservice; - -/** - * Get credentials in local context, i.e. from the current process. - */ -static inline void get_local_creds(struct creds *c) -{ -#ifdef XTREEMOS_ENV - AMS_GPASSWD gpwd; - AMS_GGROUPS ggrp; -#endif - - creds_init(c); - - c->uid = geteuid(); - c->gid = getegid(); - c->pid = getpid(); - - // add grid credentials below -#ifdef XTREEMOS_ENV - pthread_mutex_lock(&xtreemos_ams_mutex); - if (amsclient_invmappinginfo_internal(xtreemos_ams_sock, - NULL, c->uid, NULL, c->gid, - &gpwd, &ggrp)) - { - err_msg("Cannot get information for (%d,%d) from AMS.\n", - c->uid, c->gid); - /* Revert to local method. */ - c->guid = NULL; - c->ggid = NULL; - c->subgrp = NULL; - } else { - dbg_msg("Global user name: %s\n", gpwd.g_idtoken.g_dn); - dbg_msg("VO: %s\n", ggrp.g_grptoken.g_vo); - /* dbg_msg("Global group name: %s\n", gpwd.g_idtoken.g_ggid); */ - c->guid = strdup(gpwd.g_idtoken.g_dn); - c->ggid = strdup(ggrp.g_grptoken.g_vo); - c->subgrp = strdup(ggrp.g_grptoken.g_subgroup); - } - pthread_mutex_unlock(&xtreemos_ams_mutex); -#endif -} - -extern struct OSD_Manager osd_manager; - -extern struct file_inv file_inv; -extern struct xcap_inv xcap_inv; - -extern char *mrc_url; -extern char *volume; - -extern ne_ssl_context *ssl_ctx; -extern ne_ssl_client_cert *xtreemfs_client_cert; -extern ne_ssl_certificate *xtreemfs_ca_cert; - -extern int xtreemfs_init(char *mrc_url); -extern void xtreemfs_exit(); - -extern char *xtreemfs_full_path(const char *path); - -extern void xtreemfs_get_unix_creds(char *ownerId, char *groupId, uid_t *uid, gid_t *gid); -extern int xtreemfs_get_unix_ids(char **userId, char **groupId, uid_t uid, gid_t gid); - -extern int xtreemfs_load_mods(struct transl_engine *te, char *mod_dir); -extern void xtreemfs_unload_mods(struct transl_engine *te); - -extern int sighandler_install(void); -extern void sighandler_stop(void); - -extern struct bench_timings read_timings; -extern struct bench_timings write_timings; -extern struct bench_timer read_timer; -extern struct bench_timer write_timer; - -extern struct bench_timings neon_timings; -extern struct bench_timer neon_timer; - -extern struct work_queue *client_wq; - -#endif diff --git a/client/src/xtreemfs_conf.c b/client/src/xtreemfs_conf.c deleted file mode 100644 index cfdce115d..000000000 --- a/client/src/xtreemfs_conf.c +++ /dev/null @@ -1,566 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess - - Author: Matthias Hess - - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - -/* - C Implementation: xtreemfs_conf - - Description: - */ - -#include -#include -#include -#include - -#include - -#include "xtreemfs.h" -#include "xtreemfs_conf.h" -#include "logger.h" - -#define iswhite(x) ((x) == ' ' || (x) == '\t') - -#define XTREEMFS_OPT(t, p, v) { t, offsetof(struct xtreemfs_conf, p), v } - -/* Options that are passed via FUSE arguments */ - -struct fuse_opt xtreemfs_opts[] = { - XTREEMFS_OPT("uuid=%s", uuid, 0), - XTREEMFS_OPT("volume_url=%s", volume_url, 0), - XTREEMFS_OPT("basedir=%s", basedir, 0), - XTREEMFS_OPT("conf=%s", conf_file, 0), - XTREEMFS_OPT("dirservice=%s", dirservice, 0), - - /* Debugging and logging options */ - XTREEMFS_OPT("logfile=%s", logfile, 0), - XTREEMFS_OPT("debug=%d", debugging, 0), - XTREEMFS_OPT("logging=%d", tracing, 0), - XTREEMFS_OPT("mem_trace=%d", mem_trace, 0), - -#ifdef XTREEMOS_ENV - /* XtreemOS integration */ - XTREEMFS_OPT("xtreemos=%d", xtreemos, 0), -#endif - - /* Monitoring */ - XTREEMFS_OPT("monitoring=%d", monitoring, 0), - XTREEMFS_OPT("request_ids=%d", req_ids, 0), - - /* Runtime adjustments */ - XTREEMFS_OPT("num_threads=%d", num_threads, 0), - XTREEMFS_OPT("stack_size=%d", stack_size, 0), - XTREEMFS_OPT("caching=%d", caching, 0), - XTREEMFS_OPT("clustermode", clustermode, 1), - XTREEMFS_OPT("singlequeue", singlequeue, 1), - - /* Security options */ - XTREEMFS_OPT("ssl_cert=%s", ssl_cert, 0), - FUSE_OPT_END -}; - -struct xtreemfs_conf *xtreemfs_conf_new() -{ - struct xtreemfs_conf *rv = NULL; - - rv = (struct xtreemfs_conf *)malloc(sizeof(struct xtreemfs_conf)); - if (rv && xtreemfs_conf_init(rv)) { - xtreemfs_conf_destroy(rv); - rv = NULL; - } - - return rv; -} - -int xtreemfs_conf_init(struct xtreemfs_conf *xc) -{ - int err = 0; - - xc->uuid = NULL; - - return err; -} - -void xtreemfs_conf_del_contents(struct xtreemfs_conf *xc) -{ - fuse_opt_free_args(&xc->fargs); - - free(xc->uuid); -} - -void xtreemfs_conf_destroy(struct xtreemfs_conf *xc) -{ - xtreemfs_conf_del_contents(xc); - free(xc); -} - -static inline char *remove_whitespace(char *lp) -{ - while (iswhite(*lp) && *lp != '\0') - lp++; - - return lp; -} - -/** - * Match a key against a template from fuse opts. - * - * @param templ fuse opt template - * @param key key to match - * @return 0 in case they do not match, 1 otherwise - */ -static int match_template(const char *templ, char *key) -{ - int rv = 0; - char *endp = NULL; - char *d = (char *)templ; - int p=0; - - dbg_msg("Matching '%s' against '%s'\n", - key, templ); - endp = strchr(templ, '='); - if (endp) { - while(d != endp) { - if (*d != key[p]) - break; - p++; - d++; - } - if (d == endp) - rv = 1; - } else { /* No '=' in template */ - rv = !strcmp(templ, key); - } - - dbg_msg("Returning %d\n", rv); - return rv; -} - -/** - * Analye one configuration line. - * - * @return <0 on error, line code otherwise - * 1 comment - * 2 section - * 3 key/value pair - * 255 something else - * negative values indicate error - */ -static int analyze_line(char *line_buf, char **section, char **key, char **value) -{ - int rv = 0; /* Assume error */ - char *lp = line_buf; - char *hp = NULL; - int len; - - /* Remove any trailing white space */ - lp = remove_whitespace(lp); - - if (*lp == '#') { - rv = 1; - goto out; - } - - if (*lp == '\0') { /* Empty line */ - rv = 4; - goto out; - } - - if (*lp == '[') { /* Section start */ - lp++; - lp = remove_whitespace(lp); - hp = lp; - len = 0; - while (!iswhite(*hp) && *hp != ']' && *hp != '\0') { - hp++; - len++; - } - - /* We got a problem if *hp == '\0' */ - if (*hp == '\0') { - rv = -1; - goto out; - } - - /* Yep, we have section name. Let's see if it is correctly - closed */ - hp = remove_whitespace(hp); - if (*hp == ']') { /* Yipiee! All went well. */ - if (*section) - free(*section); - *section = (char *)malloc(len+1); - memcpy((void *)(*section), lp, len); - (*section)[len] = '\0'; - rv = 2; - goto out; - } else { - rv = -1; - goto out; - } - } - - /* The last we got here should be a key/value pair */ - len = 0; - hp = lp; - while (!iswhite(*hp) && *hp != '=' && *hp != '\0') { - hp++; - len++; - } - - /* Remove any additional whitespace, just in case */ - hp = remove_whitespace(hp); - - /* If we have '\0' the line does not contain a value */ - if (*hp == '\0') { - rv = -2; - goto out; - } - - /* We must now have a '=' Otherwise something is wrong */ - if (*hp != '=') { - rv = -2; - goto out; - } - - if (*key) - free(*key); - - *key = (char *)malloc(len+1); - memcpy((void *)(*key), lp, len); - (*key)[len] = '\0'; - - /* Now concentrate on the value */ - lp = hp; - lp++; - lp = remove_whitespace(lp); - - hp = lp; - len = 0; - while (!iswhite(*hp) && *hp != '\0') { - hp++; - len++; - } - - /* We can safely ignore any whitespace after the value. */ - if (*value) - free(*value); - - if (len > 0) { - *value = (char *)malloc(len+1); - memcpy((void *)(*value), lp, len); - (*value)[len] = '\0'; - } else { - *value = NULL; - } - - rv = 3; - -out: - return rv; -} - -/** - * Identify the type of a key according to FUSE opts. - * @param key The key that needs to be identified. It has the - * generic form '[=]' - * @return 0 unidentified type - * 1 string - * 2 integer - */ -int xtreemfs_conf_key_type(const char *key) -{ - int rv = 0; - char *d = NULL; - char *type_id = NULL; - - d = rindex(key, '='); - if (!d) - goto out; - type_id = strstr(d, "%"); - if (!type_id) - goto out; - if (!strcmp(type_id, "%s")) - rv = 1; - else if(!strcmp(type_id, "%d")) - rv = 2; - -out: - return rv; -} - -/** Parse a key - * - * Because we do not want to define a second set of options - * we use the one from FUSE to also define the possible - * arguments in a configuration file. This function parses - * a given key and compares it to the fuse option list above. - * from the option list it can also determine the type and - * position of the value within the 'xtreemfs_conf' structure. - */ -struct fuse_opt *xtreemfs_conf_identify_key(char *key) -{ - struct fuse_opt *rv = NULL; - int i; - int t; - - for (i=0; xtreemfs_opts[i].templ; i++) { - if (match_template(xtreemfs_opts[i].templ, key)) - break; - } - - if (!xtreemfs_opts[i].templ) - goto out; - - rv = &xtreemfs_opts[i]; -out: - return rv; -} - -/** - * Add a key/value pair to an existing configuration - * - * @param xc XtreemFS configuration to add to. - */ -int xtreemfs_conf_add_key_value(struct xtreemfs_conf *xc, - char *key, char *value, - int overwrite) -{ - int err = 0; - int t; - struct fuse_opt *opt; - char *ptr; - char **cptr; - int *iptr; - - if (!(key && value)) { - goto out; - } - - opt = xtreemfs_conf_identify_key(key); - if (!opt) { - dbg_msg("Cannot identify key '%s'\n", key); - goto out; - } - t = xtreemfs_conf_key_type(opt->templ); - if (!t) - goto out; - ptr = (char *)xc + opt->offset; - - switch(t) { - case 1: /* String */ - cptr = (char **)ptr; - if (!(*cptr) || overwrite) { - free(*cptr); - dbg_msg("Adding %s=%s\n", key, value); - *cptr = strdup(value); - } - break; - case 2: /* Integer, we assume that '0' means 'not set'! */ - iptr = (int *)ptr; - if (!(*iptr) || overwrite) - *iptr = atoi(value); - break; - } - -out: - return err; -} - - -/** - * Read configuration of file on a line per line basis - * - * @return 0 on success, error code otherwise - */ -int xtreemfs_conf_read_conf(struct xtreemfs_conf *xc, FILE *file) -{ - int err = 0; - char line_buf[1024]; - int len; - int lt; - char *section = NULL, *key = NULL, *value = NULL; - - while (!feof(file)) { - if (fgets(line_buf, 1024, file)) { - /* See if we have eol */ - len = strlen(line_buf); - if (line_buf[len-1] == '\n') /* Regular line */ - line_buf[len-1] = '\0'; - lt = analyze_line(line_buf, §ion, &key, &value); - if (lt > 0) { - if (lt == 3) { /* Key/value */ - xtreemfs_conf_add_key_value(xc, key, value, 0); - } - } else { - err_msg("Error while parsing config line.\n"); - err = lt; - goto out; - } - } else { - - } - } - -out: - free(key); - free(value); - - return err; -} - -/** - * Read a configuration into an already existing 'xtreemfs_conf' - */ -int xtreemfs_conf_read_ip(struct xtreemfs_conf *xc, char *filename) -{ - int err = 0; - FILE *file = NULL; - - /* See if we can open the file at all */ - file = fopen(filename, "r"); - if (!file) { - err = 1; - goto out; - } - - err = xtreemfs_conf_read_conf(xc, file); - -out: - if (file) - fclose(file); - - return err; -} - -/** - * Read a configuration into a newly created 'xtreemfs_conf' - */ -struct xtreemfs_conf *xtreemfs_conf_read(char *filename) -{ - struct xtreemfs_conf *rv = NULL; - int err = 0; - - rv = xtreemfs_conf_new(); - if (!rv) { - err = 1; - goto out; - } - - err = xtreemfs_conf_read_ip(rv, filename); - -out: - if (err) { - if (rv) - xtreemfs_conf_destroy(rv); - rv = NULL; - } - - return rv; -} - -int xtreemfs_conf_write(struct xtreemfs_conf *xc, char *filename) -{ - int err = 0; - FILE *file = NULL; - - file = fopen(filename, "w"); - if (!file) { - err = 1; - goto out; - } - - /* TODO: Print out complete set of options. */ - - if (xc->uuid) - fprintf(file, "uuid = %s\n", xc->uuid); - if (xc->ssl_cert) - fprintf(file, "certfile = %s\n", xc->ssl_cert); - if (xc->logfile) - fprintf(file, "logfile = %s\n", xc->logfile); - -out: - if (file) - fclose(file); - - return err; -} - -/** - * Get xtreemfs configuration. - * - * This function parses command line arguments (assuming its FUSE like) - * and evaluates them. Eventually additional configuration options are - * read from configuration files, if given or found in default places. - */ -int xtreemfs_conf_get_ip(struct xtreemfs_conf *xc, int argc, char **argv) -{ - int err = 0; - struct fuse_args args = FUSE_ARGS_INIT(argc, argv); - - /* The proceedings might appear a bit tricky... we first go through the - command line arguments. Potentially, there can be an antry for another - configuration file. We would then read that configuration, too. */ - - /* Derived from 'FUSE_ARGS_INIT' */ - xc->fargs.argc = argc; - xc->fargs.argv = argv; - xc->fargs.allocated = 0; - - if (fuse_opt_parse(&xc->fargs, xc, xtreemfs_opts, NULL) == -1) { - err = 1; - dbg_msg("Error while parsing FUSE options.\n"); - goto out; - } - - /* At this point we have parsed fuse options. Let's check if we have - a configuration file to read... */ - - if (xc->conf_file) { - /* This call does not overwrite already set options */ - if (xtreemfs_conf_read_ip(xc, xc->conf_file)) { - dbg_msg("Cannot read configuration file '%s'\n", - xc->conf_file); - err = 1; - } - } - /* xtreemfs_conf_print(xc); */ - -out: - return err; -} - -int xtreemfs_conf_print(struct xtreemfs_conf *xc) -{ - int err = 0; - - if (xc->uuid) - fprintf(stdout, "UUID: %s\n", xc->uuid); - if (xc->dirservice) - fprintf(stdout, "Dirservice: %s\n", xc->dirservice); - if (xc->ssl_cert) - fprintf(stdout, "Cert file: %s\n", xc->ssl_cert); - - return err; -} diff --git a/client/src/xtreemfs_conf.h b/client/src/xtreemfs_conf.h deleted file mode 100644 index 6c5a0e2e3..000000000 --- a/client/src/xtreemfs_conf.h +++ /dev/null @@ -1,101 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess - - Author: Matthias Hess - - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - -/* - C Interface: xtreemfs_conf - - Description: -*/ - -#ifndef __XTRFS_CONF_H__ -#define __XTRFS_CONF_H__ - -#include - -struct xtreemfs_fuse_opts { - -} xtreemfs_fuse_opt; - -extern struct xtreemfs_fuse_opts xtreemfs_fuse_opt; - - -struct xtreemfs_conf { - char *uuid; /*!< UUID of this host */ - - char *basedir; /*!< Where to store and read configs, modules etc */ - char *conf_file; - - char *volume_url; - - /* For development purposes only. The directory service will - be integrated into the volume description when the functionality - works. */ - char *dirservice; - char *logfile; - int debugging; - int tracing; - int num_threads; - int stack_size; - int mem_trace; -#ifdef XTREEMOS_ENV - int xtreemos; -#endif - /* Monitoring */ - int monitoring; /*!< Enable monitoring if != 0 */ - int mon_port; - int req_ids; /*!< Use request ids for debugging */ - - /* Module handling */ - char *mod_dir; /*!< Module directory. If not given explicitly - it will be created as '/mods' */ - - int caching; /*!< Enable caching if != 0 */ - int clustermode; - int singlequeue; - char *ssl_cert; /*!< Client host certificate */ - - struct fuse_args fargs; /*!< Arguments for FUSE. */ -}; -extern struct xtreemfs_conf conf; - -extern struct fuse_opt xtreemfs_opts[]; - -struct xtreemfs_conf *xtreemfs_conf_new(); -int xtreemfs_conf_init(struct xtreemfs_conf *xc); -void xtreemfs_conf_del_contents(struct xtreemfs_conf *xc); -void xtreemfs_conf_destroy(struct xtreemfs_conf *xc); - -struct xtreemfs_conf *xtreemfs_conf_read(char *filename); -int xtreemfs_conf_read_ip(struct xtreemfs_conf *xc, char *filename); -int xtreemfs_conf_write(struct xtreemfs_conf *xc, char *filename); - -int xtreemfs_conf_parse_args_ip(struct xtreemfs_conf *xc, int args, char **argv); - -int xtreemfs_conf_get_ip(struct xtreemfs_conf *xc, int argc, char **argv); - -int xtreemfs_conf_print(struct xtreemfs_conf *xc); - -#endif diff --git a/client/src/xtreemfs_fuse.c b/client/src/xtreemfs_fuse.c deleted file mode 100644 index c3b63f90f..000000000 --- a/client/src/xtreemfs_fuse.c +++ /dev/null @@ -1,2044 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: xtreemfs -* -* Description: -* FUSE interface calls for XtreemFS filesystem. -* -* -* Authors: Matthias Hess , (C) 2006, 2007, 2008 -* Erich Focht -* -* Copyright: See COPYING file that comes with this distribution -* -*/ -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef XTREEMOS_ENV -#include -#endif - -#ifdef ITAC -#include -#endif - -#ifdef _WIN32 -#include -#define ENOTCONN WSAENOTCONN -#define boolean json_boolean -#endif - -#include "kernel_substitutes.h" - -#include "xtreemfs.h" -#include "xtreemfs_conf.h" -#include "xtreemfs_fuse.h" - -#include "osd_manager.h" -#include "mrc_comm.h" -#include "metadata_cache.h" - -#include "filerw.h" -#include "file.h" - -#include "statinfo.h" -#include "stripingpolicy.h" -#include "stripe.h" -#include "xattr.h" -#include "xloc.h" -#include "xcap_inv.h" -#include "xcap.h" - -#include "bench_timer.h" -#include "lock_utils.h" -#include "logger.h" - -/** - * Get credentials in FUSE context, i.e. from the process calling the - * FUSE filesystem function. - */ -static inline void get_fuse_creds(struct creds *c) -{ - struct fuse_context *ctx = fuse_get_context(); -#ifdef XTREEMOS_ENV - AMS_GPASSWD gpwd; - AMS_GGROUPS ggrp; -#endif - - creds_init(c); - - c->uid = ctx->uid; - c->gid = ctx->gid; - c->pid = ctx->pid; - // add grid credentials below - -#ifdef XTREEMOS_ENV - pthread_mutex_lock(&xtreemos_ams_mutex); - if (amsclient_invmappinginfo_internal(xtreemos_ams_sock, - NULL, c->uid, NULL, c->gid, - &gpwd, &ggrp)) - { - dbg_msg("Cannot get information for (%d,%d) from AMS.\n", - c->uid, c->gid); - /* Revert to local method. */ - c->guid = NULL; - c->ggid = NULL; - c->subgrp = NULL; - } else { - dbg_msg("Global user name: %s\n", gpwd.g_idtoken.g_dn); - dbg_msg("VO: %s\n", ggrp.g_grptoken.g_vo); - c->guid = strdup(gpwd.g_idtoken.g_dn); - c->ggid = strdup(ggrp.g_grptoken.g_vo); - c->subgrp = strdup(ggrp.g_grptoken.g_subgroup); - } - pthread_mutex_unlock(&xtreemos_ams_mutex); -#endif - -} - - -struct xtreemfs_fuse_opts xtreemfs_fuse_opt; - -struct fuse_operations xtreemfs_ops = { - .getattr = xtreemfs_getattr, - .readlink = xtreemfs_readlink, - //.getdir = xtreemfs_getdir, - //.mknod = xtreemfs_mknod, - .mkdir = xtreemfs_mkdir, - - .unlink = xtreemfs_unlink, - .rmdir = xtreemfs_rmdir, - .symlink = xtreemfs_symlink, - .rename = xtreemfs_rename, - .link = xtreemfs_link, - .chmod = xtreemfs_chmod, - .chown = xtreemfs_chown, - .truncate = xtreemfs_truncate, - .utime = xtreemfs_utime, // utime is not yet implemented - // but touch uses it, so keep the - // fake for now - .open = xtreemfs_open, - .read = xtreemfs_read, - .write = xtreemfs_write, - //.statfs = xtreemfs_statfs, - .flush = xtreemfs_flush, - .release = xtreemfs_release, - .fsync = xtreemfs_fsync, - .setxattr = xtreemfs_setxattr, - .getxattr = xtreemfs_getxattr, - .listxattr = xtreemfs_listxattr, - .removexattr = xtreemfs_removexattr, - //.opendir = xtreemfs_opendir, - .readdir = xtreemfs_readdir, - //.releasedir = xtreemfs_releasedir, - //.fsyncdir = xtreemfs_fsyncdir, - - .init = xtreemfs_fuse_init, - .destroy = xtreemfs_fuse_destroy, - - .access = xtreemfs_access, - - .create = xtreemfs_create, - .ftruncate = xtreemfs_ftruncate, - //.fgetattr = xtreemfs_fgetattr -}; - - -int -xtreemfs_getattr(const char *path, struct stat *stbuf) -{ - int err = 0; - struct req *req; - struct creds c; - struct xtreemfs_statinfo si; - struct fileid_struct *fileid = NULL; -#ifdef XTREEMOS_ENV - AMS_GPASSWD gpwd; - AMS_GGROUPS pgrp; - /* struct tcp_info tcp_info; */ -#endif - char *fullpath = NULL; - - XTREEMFS_ENTER(); - get_fuse_creds(&c); - trace_msg("Getting attribute for path '%s'\n", path); - - xtreemfs_statinfo_init(&si); - - fullpath = xtreemfs_full_path(path); - - /* Check if we have a local entry in file inventory for it */ - dbg_msg("Checking for fileid in inventory.\n"); - fileid = file_inv_get_by_path(&file_inv, fullpath, 1); - if (fileid) { - dbg_msg("Fileid found in inv. Locking it.\n"); - spin_lock(&fileid->flush); - } - -#if 0 - if (!metadata_cache_get(&md_cache, path, &si)) { - req = MRC_Request__stat(&err, &si, fullpath, 0, 0, 0, &c, - NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - } else { - dbg_msg("Entity found in metadata cache\n"); - } -#else - req = MRC_Request__stat(&err, &si, fullpath, 0, 0, 0, &c, - NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - -#endif - - if (!err) { - dbg_msg("Entity found on MRC!\n"); - dbg_msg("POSIX access mode: %ld\n", si.posixAccessMode); - /* Looks like we already have that entity on the mrc! */ - memset((void *)stbuf, 0, sizeof(struct stat)); - switch(si.objType) { - case OBJ_FILE: - stbuf->st_mode = S_IFREG; - break; - case OBJ_DIR: - stbuf->st_mode = S_IFDIR; - break; -#ifndef _WIN32 - case OBJ_SYMLINK: - stbuf->st_mode = S_IFLNK; - break; -#endif - default: /* Should never happen! */ - break; - } - stbuf->st_mode |= si.posixAccessMode; - stbuf->st_nlink = si.linkCount; - stbuf->st_size = si.size; - xtreemfs_get_unix_creds(si.ownerId, si.groupId, &stbuf->st_uid, &stbuf->st_gid); - -#ifdef XTREEMOS_ENV - pthread_mutex_lock(&xtreemos_ams_mutex); - -#if 0 - /* Let's see if the socket is still open */ - getsockopt(xtreemos_ams_sock, SOL_SOCKET, TCP_INFO, - (void *)&tcp_info, sizeof(tcp_info)); - if (tcp_info.tcpi_state != TCP_ESTABLISHED) { - xtreemos_ams_sock = amsclient_connect_open(); - if (xtreemos_ams_sock < 0) { - fprintf(stderr, "Cannot reopen socket! This is a desaster!\n"); - } - } else { - dbg_msg("Socket is established and all is good!\n"); - } -#endif - if (amsclient_mappinginfo_internal(xtreemos_ams_sock, - si.ownerId, si.groupId, si.groupId, - &gpwd, &pgrp) < 0) { - dbg_msg("Cannot get local user and local group from AMS.\n"); - } else { - stbuf->st_uid = gpwd.l_idtoken.g_mappeduid; - stbuf->st_gid = gpwd.l_idtoken.g_mappedgid; - dbg_msg("Local user: %d\n", stbuf->st_uid); - dbg_msg("Local group: %d\n", stbuf->st_gid); - } - pthread_mutex_unlock(&xtreemos_ams_mutex); -#endif - - // stbuf->st_uid = 0; - // stbuf->st_gid = 0; - stbuf->st_atime = si.atime; - stbuf->st_ctime = si.ctime; - stbuf->st_mtime = si.mtime; - - if (fileid) { - dbg_msg("Found fileid '%s' in cache.\n", fullpath); - dbg_msg("Use count is %d\n", fileid_struct_read_uc(fileid)); - /* Check if we have to update the fileid */ - if (fileid->sz.size != si.size) { - if (atomic_read(&fileid->sz.needs_updating) && - si.epoch <= fileid->sz.epoch) { - /* We believe we have the right size */ - dbg_msg("cached size is good: %lld\n", fileid->sz.size); - stbuf->st_size = fileid->sz.size; - } else { - /* MRC has the real size */ - stbuf->st_size = si.size; - fileid->sz.size = si.size; - fileid->sz.epoch = si.epoch; - // getattr has no order... - // so don't change sz.order - dbg_msg("set: size=%lld\n", fileid->sz.size); - atomic_set(&fileid->sz.needs_updating, 0); - } - } else { - dbg_msg("File size %lld is correct for our file!\n", - fileid->sz.size); - } - dbg_msg("Unlocking fileid for '%s'\n", fullpath); - fileid_struct_dec_uc(fileid); /* From get operation */ - /* spin_unlock(&fileid->lock); */ - } else { - dbg_msg("Not found in inventory.\n"); - } -#ifndef _WIN32 - /* Now that we have the file size, we can set the block - count */ - stbuf->st_blocks = - (stbuf->st_size ? - stbuf->st_size - 1 - / XTREEMFS_PSEUDO_BLOCKSIZE + 1 - : 0 ); -#endif - } else { - err = -abs(err); - dbg_msg("Error in request.\n"); - } - - if (fileid) - spin_unlock(&fileid->flush); - - free(fullpath); - - dbg_msg("Freeing stat info.\n"); - xtreemfs_statinfo_clear(&si); - dbg_msg("Leaving with error code %d\n", err); - - creds_delete_content(&c); - XTREEMFS_LEAVE(); - return -abs(err); -} - -int -xtreemfs_readlink(const char *path, char *linkbuf, size_t size) -{ - int err = 0; - struct req *req; - struct creds c; - struct xtreemfs_statinfo si; - - char *fullpath = NULL; - - XTREEMFS_ENTER(); - get_fuse_creds(&c); - trace_msg("Getting attribute for path '%s'\n", path); - - xtreemfs_statinfo_init(&si); - fullpath = xtreemfs_full_path(path); - - req = MRC_Request__stat(&err, &si, fullpath, 0, 0, 0, &c, - NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - - if (!err) { - dbg_msg("Entity found on MRC!\n"); - - /* Looks like we already have that entity on the mrc! */ - if (si.objType == OBJ_SYMLINK) { - strncpy(linkbuf, si.linkTarget, size); - } - } - - dbg_msg("Path '%s', linkbuf == '%s', size == %d\n", path, linkbuf, size); - dbg_msg("readlink not implemented, yet\n"); - xtreemfs_statinfo_clear(&si); - free(fullpath); - - creds_delete_content(&c); - XTREEMFS_LEAVE(); - - return -abs(err); -} - -int -xtreemfs_getdir(const char *path, fuse_dirh_t h, fuse_dirfil_t filler) -{ - int rv = 0; - - XTREEMFS_ENTER(); - dbg_msg("getdir not implemented, yet\n"); - XTREEMFS_LEAVE(); - - return rv; -} - -int -xtreemfs_mknod(const char *path, mode_t mode, dev_t rdev) -{ - int rv = 0; - - XTREEMFS_ENTER(); - dbg_msg("mknod not implemented, yet\n"); - XTREEMFS_LEAVE(); - - return rv; -} - -int -xtreemfs_mkdir(const char *path, mode_t mode) -{ - int err = 0; - struct req *req; - struct creds c; - char *fullpath; - mode_t um; - - XTREEMFS_ENTER(); - get_fuse_creds(&c); - fullpath = xtreemfs_full_path(path); - - dbg_msg("Mkdir for full path '%s' in mode %d\n", fullpath, mode); - - um = umask(0); - umask(um); - - req = MRC_Request__createDir(&err, fullpath, NULL, NULL, mode /* 0755 */, - &c, NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - - free(fullpath); - creds_delete_content(&c); - XTREEMFS_LEAVE(); - - return -abs(err); -} - -static void notify_osd_del(struct xloc_list *xlocs, struct xcap *xcap) -{ - struct list_head *iter; - struct xlocs *xl; - int i; - struct OSD_Proxy *op; - struct OSD_Channel_resp channel_resp; - - list_for_each(iter, &xlocs->head) { - xl = container_of(iter, struct xlocs, head); - /* We need only the first OSD from each list. */ - i = 0; - /* for (i=0; inum_osds; i++) { */ - op = OSD_Manager_get_proxy(&osd_manager, xl->osds[i], dirservice); - if (!op) { - dbg_msg("Cannot get proxy for OSD '%s'\n", xl->osds[i]); - break; - } - OSD_Proxy_del(op, xcap->fileID, - xlocs, xcap, - &channel_resp); - /* } */ - } -} - -/** - * Delete a file from the file system. - */ -int -xtreemfs_unlink(const char *path) -{ - int err = 0; - struct req *req; - struct creds c; - struct MRC_Req_delete_resp resp = { .xcap = NULL, .xlocs = NULL }; - char *fullpath; - struct fileid_struct *fileid; - - - XTREEMFS_ENTER(); - metadata_cache_flush(&md_cache); - get_fuse_creds(&c); - fullpath = xtreemfs_full_path(path); - - fileid = file_inv_get_by_path(&file_inv, fullpath, 1); - - /* We will mark the fileid to indicate that it is to be - deleted. If there are still processes using that file - (use count > 0) we do nothing. Otherwise the file will - be deleted from the MRC, all the OSDs and from the file - inventory. - The file will also be erased if we do not have it in - our inventory. This means simply passing the command to - the MRC and OSDs. - The test for the '2': We have one because of 'file_inv_get_by_path' - and another one because the fileid struct is given away in - the inventory. - */ - if (fileid) { - atomic_set(&fileid->to_be_erased, 1); - dbg_msg("File use count: %d\n", fileid_struct_read_uc(fileid)); - } - - /* always delete the file from the MRC, even if it is still open. - This is necessary to be POSIX compliant. - */ - req = MRC_Request__delete(&err, fullpath, &resp, &c, NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - - if (!fileid || fileid_struct_read_uc(fileid) <= 2) { - - /* Now notify all relevant OSDs of the delete. */ - if (resp.xlocs) - notify_osd_del(resp.xlocs, resp.xcap); - - /* Remove fileid, replica and user files from inventory */ - if (fileid) { - dbg_msg("Removing file '%s' from inventory.\n", fileid->fileid); - fileid_struct_dec_uc(fileid); /* From get op. */ - /* spin_unlock(&fileid->lock); */ - file_inv_remove(&file_inv, fileid); - } - - if (resp.xlocs) - xloc_list_delete(resp.xlocs); - if (resp.xcap) - xcap_delete(resp.xcap); - } else { - fileid_struct_dec_uc(fileid); /* From get operation */ - err_msg("Cannot delete fileid '%s'", - fileid->fileid); - if (fileid_struct_read_uc(fileid) > 0) - err_msg("File is still in use.\n"); - if (fileid) { - /* spin_unlock(&fileid->lock); */ - } - } - - free(fullpath); - creds_delete_content(&c); - - XTREEMFS_LEAVE(); - return -abs(err); -} - -int -xtreemfs_rmdir(const char *path) -{ - int err = 0; - struct req *req; - struct creds c; - struct MRC_Req_delete_resp resp; - char *fullpath; - - XTREEMFS_ENTER(); - metadata_cache_flush(&md_cache); - get_fuse_creds(&c); - fullpath = xtreemfs_full_path(path); - - req = MRC_Request__delete(&err, fullpath, &resp, &c, NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - - creds_delete_content(&c); - free(fullpath); - XTREEMFS_LEAVE(); - - return -abs(err); -} - -int -xtreemfs_symlink(const char *from, const char *to) -{ - int err = 0; - struct req *req; - struct creds c; - char *fullpath; - - XTREEMFS_ENTER(); - metadata_cache_flush(&md_cache); - get_fuse_creds(&c); - fullpath = xtreemfs_full_path(to); - dbg_msg("From in FUSE '%s' and as a fullname '%s'\n", from, fullpath); - dbg_msg("To in FUSE '%s'\n", to); - req = MRC_Request__createSymbolicLink(&err, fullpath, from, &c, NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - - creds_delete_content(&c); - free(fullpath); - XTREEMFS_LEAVE(); - - return -abs(err); -} - -int -xtreemfs_rename(const char *from, const char *to) -{ - int err = 0; - struct req *req; - struct creds c; - char *fullpath_from, *fullpath_to; - - XTREEMFS_ENTER(); - metadata_cache_flush(&md_cache); - get_fuse_creds(&c); - fullpath_from = xtreemfs_full_path(from); - fullpath_to = xtreemfs_full_path(to); - - dbg_msg("Renaming '%s' to '%s (%s -> %s)'\n", from, to, - fullpath_from, fullpath_to); - - req = MRC_Request__move(&err, fullpath_from, fullpath_to, - &c, NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - - if (err) { - dbg_msg("Error in rename mrc (%d)\n", err); - goto out; - } - - /* Must rename entity in our internal database */ - file_inv_rename(&file_inv, fullpath_from, fullpath_to); - - out: - creds_delete_content(&c); - free(fullpath_to); - free(fullpath_from); - XTREEMFS_LEAVE(); - - return -abs(err); -} - -int -xtreemfs_link(const char *from, const char *to) -{ - int err = 0; - struct req *req; - struct creds c; - char *fullpath_from = NULL; - char *fullpath_to = NULL; - - XTREEMFS_ENTER(); - metadata_cache_flush(&md_cache); - fullpath_from = xtreemfs_full_path(from); - fullpath_to = xtreemfs_full_path(to); - get_fuse_creds(&c); - req = MRC_Request__createLink(&err, fullpath_to, fullpath_from, &c, NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - - creds_delete_content(&c); - free(fullpath_from); - free(fullpath_to); - XTREEMFS_LEAVE(); - - return -abs(err); -} - -int -xtreemfs_chmod(const char *path, mode_t mode) -{ - int err = 0; - struct req *req; - struct creds c; - char *fullpath = NULL; - - XTREEMFS_ENTER(); - metadata_cache_flush(&md_cache); - fullpath = xtreemfs_full_path(path); - get_fuse_creds(&c); - - dbg_msg("Changing mode to %d\n", mode); - req = MRC_Request__changeAccessMode(&err, fullpath, mode, &c, NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - - if (err) { - dbg_msg("Cannot wait for request.\n"); - goto finish; - } - -finish: - creds_delete_content(&c); - free(fullpath); - XTREEMFS_LEAVE(); - return -abs(err); -} - -int -xtreemfs_chown(const char *path, uid_t uid, gid_t gid) -{ - int err = 0; - char *fullpath; - char *userId, *groupId; - struct req *req; - struct creds c; - - XTREEMFS_ENTER(); - metadata_cache_flush(&md_cache); - - dbg_msg("About to change ownership for %s to %d.%d\n", path, uid, gid); - - fullpath = xtreemfs_full_path(path); - get_fuse_creds(&c); - xtreemfs_get_unix_ids(&userId, &groupId, uid, gid); - if (userId || groupId) { - dbg_msg("Found user %s in group %s\n", userId, groupId); - req = MRC_Request__changeOwner(&err, fullpath, - userId, groupId, - &c, NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - - if (err) { - dbg_msg("Cannot wait for request.\n"); - err = -abs(err); - goto finish; - } - } else { - dbg_msg("Could not find user and group name for %d.%d\n", uid, gid); - } - -finish: - creds_delete_content(&c); - free(userId); - free(groupId); - free(fullpath); - - XTREEMFS_LEAVE(); - return -abs(err); -} - -int xtreemfs_do_truncate(struct fileid_struct *fileid, - struct xloc_list *xloc_list, - struct xcap *xcap_s, - off_t size, - struct OSD_Channel_resp *channel_resp) -{ - int err = 0; - struct list_head *iter; - struct xlocs *xl; - - struct OSD_Proxy *op; - /* struct OSD_Channel_resp channel_resp = { - .new_size = -1, - .epoch = -1, - }; */ - - - XTREEMFS_ENTER(); - dbg_msg("Truncating file to new size %d\n", size); - - if (fileid) { - fileid->sz.size = size; - } else { - err_msg("Must have a fileid struct with each user file!\n"); - err = -EIO; - goto finish; - } - - /* Notify first OSD for each list entry */ - list_for_each(iter, &xloc_list->head) { - xl = container_of(iter, struct xlocs, head); - dbg_msg("Getting OSD proxy for '%s'\n", xl->osds[0]); - op = OSD_Manager_get_proxy(&osd_manager, xl->osds[0], dirservice); - if (!op) { - dbg_msg("Cannot get proxy for OSD '%s'\n", xl->osds[0]); - break; - } - OSD_Proxy_trunc(op, fileid->fileid, size, - xloc_list, xcap_s, - channel_resp); - } - -#if 0 - if (channel_resp.new_size != -1) { - dbg_msg("Got a new size from truncate operation.\n"); - new_size = channel_resp.new_size; - new_epoch = channel_resp.epoch; - fileid->sz.size = new_size; - fileid->sz.epoch = new_epoch; - xcap_s->truncateEpoch = new_epoch; - } else { - new_size = size; - new_epoch = fileid->sz.epoch; - } -#endif - -finish: - XTREEMFS_LEAVE(); - - return err; -} - -int -xtreemfs_truncate(const char *path, off_t size) -{ - int err = 0; - char *fullpath = NULL; - char *mode = "t"; - struct MRC_Req_open_resp open_resp = { NULL, NULL }; - struct fileid_struct *fileid; - struct req *req; - struct creds c; - struct xcap *xcap_s = NULL; - struct xloc_list *xloc_list = NULL; - - struct OSD_Channel_resp channel_resp = { - .new_size = -1, - .epoch = -1, - .location = NULL - }; - - off_t new_size; - long new_epoch; - - XTREEMFS_ENTER(); - get_fuse_creds(&c); - - fullpath = xtreemfs_full_path(path); - - req = MRC_Request__open(&err, &open_resp, fullpath, mode, &c, NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - - if (err) - goto finish; - - xcap_s = str_to_xcap(open_resp.xcap); - xcap_s->creds.uid = c.uid; - xcap_s->creds.gid = c.gid; - xcap_s->creds.pid = c.pid; - - xloc_list = str_to_xlocs_list(open_resp.xloc); - - dbg_msg("xloc: '%s'\n", open_resp.xloc); - dbg_msg("xcap: '%s'\n", open_resp.xcap); - - /* See, if we already have an entry for this file in the - inventory */ - fileid = file_inv_get_by_path(&file_inv, fullpath, 1); - if (!fileid) { - dbg_msg("File not found in inventory.\n"); - fileid = fileid_struct_new(xcap_s->fileID, fullpath, 0, NULL, 0); - file_inv_add_fileid(&file_inv, fileid, 1); - fileid->sz.size = size; - fileid->sz.epoch = xcap_s->truncateEpoch; - // Not neccessary as we do that right away! - // atomic_set(&fileid->sz.needs_updating, 1); - } else { /* Set only new size */ - fileid->sz.size = size; - // atomic_set(&fileid->sz.needs_updating, 1); - fileid_struct_dec_uc(fileid); - atomic_inc(&fileid->sz.order); - atomic_set(&fileid->sz.needs_updating, 0); - /* spin_unlock(&fileid->lock); */ - } - - err = xtreemfs_do_truncate(fileid, xloc_list, xcap_s, size, - &channel_resp); - if (err) { - err_msg("Error while doing trunc operation on the OSDs.\n"); - goto finish; - } - - /* Well let's see if we got a new size from another client - during the truncate operations... */ - if (channel_resp.new_size != -1) { - dbg_msg("Adjusting size after truncate op.\n"); - new_size = channel_resp.new_size; - new_epoch = channel_resp.epoch; - fileid->sz.size = new_size; - fileid->sz.epoch = new_epoch; - atomic_inc(&fileid->sz.order); - atomic_set(&fileid->sz.needs_updating, 0); - // xcap_s->truncateEpoch = new_epoch; - } else { - new_size = size; - new_epoch = xcap_s->truncateEpoch; - } - - /* Update file size */ - req = MRC_Request__updFileSize(&err, xcap_s, new_size, new_epoch, - &c, NULL, atomic_read(&fileid->sz.order), 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - - if (err) - goto finish; - - /* If the new epoch in xcap is different from file.epoch: */ - if (new_epoch != xcap_s->truncateEpoch) - fileid->sz.epoch = xcap_s->truncateEpoch; - - // send notification to OSDs (for now: delete the file) - // dbg_msg("Notify OSDs with '%s' and '%s'\n", resp.xcap, resp.xloc); - /* notify_osd_del(xloc_list, xcap_s); */ - -finish: - if (xloc_list) - xloc_list_delete(xloc_list); - if (xcap_s) - xcap_delete(xcap_s); - - creds_delete_content(&c); - - free(open_resp.xloc); - free(open_resp.xcap); - free(channel_resp.location); - free(fullpath); - - dbg_msg("File size after operation: %d\n", fileid->sz.size); - - XTREEMFS_LEAVE(); - - return -abs(err); -} - -int xtreemfs_ftruncate(const char *path, off_t size, - struct fuse_file_info *fi) -{ - int err = 0; - char *fullpath = NULL; - struct creds c; - struct fileid_struct *fileid; - struct user_file *uf; - struct xloc_list *xloc_list; - struct xcap *xcap_s; - struct req *req; - - struct OSD_Channel_resp channel_resp = { - .new_size = -1, - .epoch = -1, - }; - - off_t new_size; - long new_epoch; - - XTREEMFS_ENTER(); - get_fuse_creds(&c); - - fullpath = xtreemfs_full_path(path); - - uf = (struct user_file *)(uintptr_t)fi->fh; - if (!uf) { - dbg_msg("No user file structure!\n"); - err = -ENOENT; - goto finish; - } - - trace_msg("Truncating '%s' to new size %d\n", path, size); - - fileid = uf->file->fileid_s; - if (fileid) { - fileid->sz.size = size; - atomic_inc(&fileid->sz.order); - atomic_set(&fileid->sz.needs_updating, 0); - } else { - err_msg("Must have a fileid struct with each user file!\n"); - err = -EIO; - goto finish; - } - - xloc_list = uf->xloc_list; - xcap_s = uf->xcap; - - err = xtreemfs_do_truncate(fileid, xloc_list, xcap_s, size, - &channel_resp); - if (err) { - err_msg("Error while doing truncate with the OSDs.\n"); - goto finish; - } - - /* Because we have a regular (open) file we need to renew - the capability in the inventory. */ - /* Tell the MRC about the new size */ - if (channel_resp.new_size != -1) { - new_size = channel_resp.new_size; - new_epoch = channel_resp.epoch; - fileid->sz.size = new_size; - fileid->sz.epoch = new_epoch; - atomic_inc(&fileid->sz.order); - atomic_set(&fileid->sz.needs_updating, 0); - // xcap_s->truncateEpoch = new_epoch; - } else { - new_size = size; - new_epoch = fileid->sz.epoch; - } - - /* Update file size */ - req = MRC_Request__updFileSize(&err, xcap_s, new_size, new_epoch, - &c, NULL, atomic_read(&fileid->sz.order), 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - if (err) - goto finish; - -#if 0 - err = xcap_inv_renew_immediate(&xcap_inv, fileid->fileid, xcap_s, - new_size, new_epoch, - atomic_read(&fileid->sz.order)); -#endif - /* Lets see if truncateEpoch was update in the renewal process */ - if (new_epoch != xcap_s->truncateEpoch) - fileid->sz.epoch = xcap_s->truncateEpoch; - -finish: - dbg_msg("File size after operation: %d\n", fileid->sz.size); - - creds_delete_content(&c); - free(fullpath); - - XTREEMFS_LEAVE(); - - return -abs(err); -} - - -int -xtreemfs_utime(const char *path, struct utimbuf *ubuf) -{ - int rv = 0; - - XTREEMFS_ENTER(); - dbg_msg("utime not implemented, yet\n"); - XTREEMFS_LEAVE(); - - return rv; -} - -static struct user_file *xtreemfs_create_user_file(char *fullpath, - int flags, - struct xcap *xcap, - struct xlocs *xloc, - struct xloc_list *xloc_list, - int *err) -{ - struct user_file *uf = NULL; - struct xtreemfs_statinfo si; - struct req *req; - struct creds c; - struct fileid_struct *fileid = NULL; - /* int err; */ - - XTREEMFS_ENTER(); - - get_fuse_creds(&c); - - /* Make sure we block on flush operations! If we find the - fileid in our inventory it will be locked! */ - fileid = file_inv_get_by_path(&file_inv, fullpath, 1); - - /* Do not allow flushing during the stat operation */ - if (fileid) - spin_lock(&fileid->flush); - - /* Before creating a new user file, let's get the file info - from the MRC. This way we can make sure that we have the - right file info (especially the size!) in our inventory. */ - xtreemfs_statinfo_init(&si); - req = MRC_Request__stat(err, &si, fullpath, 0, 0, 0, &c, NULL, 1); - if (req) - *err = execute_req(mrccomm_wq, req); - else - *err = -ENOMEM; - - if (*err) { - dbg_msg("Error while executing request: %d\n", *err); - xtreemfs_statinfo_clear(&si); - *err = -abs(*err); - goto out; - } - - /* Release fileid from get_by_path op */ - if (fileid) { - /* spin_unlock(&fileid->lock); */ - } - - uf = user_file_new(xcap, xloc, xloc_list); - if (!uf) { - *err = -EIO; - err_msg("Cannot create new user file.\n"); - goto out; - } - - /* This inc op indicated that we have the user_file added - to the fh entry of the fuse_file_info structure. - This is used to indicate that the new file will remain - open until we close it. - */ - spin_lock(&uf->lock); - atomic_inc(&uf->use_count); - dbg_msg("Created new user file.\n"); - - file_inv_add_user_file(&file_inv, fullpath, flags, uf, - conf.caching, dirservice); - - dbg_msg("File use count now: %d\n", atomic_read(&uf->use_count)); - - // pthread_spin_lock(&xcap_inv.lock); - trace_msg("Adding xcap to inventory.\n"); - xcap_inv_add(&xcap_inv, xcap, 1); - // pthread_spin_unlock(&xcap_inv.lock); - - if (!*err) { /* Stat request was successful */ - uf->file->fileid_s->sz.size = si.size; - uf->file->fileid_s->sz.epoch = xcap->truncateEpoch; - } - spin_unlock(&uf->lock); - - xtreemfs_statinfo_clear(&si); - - dbg_msg("Address of user file structure: %p\n", uf); - -out: - if (fileid) { - fileid_struct_dec_uc(fileid); /* From get operation */ - spin_unlock(&fileid->flush); - } - - creds_delete_content(&c); - XTREEMFS_LEAVE(); - - return uf; -} - -/** - * FUSE interface to opening a file. - */ -int xtreemfs_open(const char *path, struct fuse_file_info *fi) -{ - int err = 0; - char *fullpath = NULL; - struct MRC_Req_open_resp resp = { .xcap = NULL, .xloc = NULL }; - struct xcap *xcap; - struct xlocs *xloc; - struct xloc_list *xloc_list; - - char *open_mode[] = { "r", "w", "a", "ga", "c", "t", "sr" }; - int open_mode_idx = -1; - struct user_file *uf = NULL; - struct req *req; - struct creds c; - - XTREEMFS_ENTER(); - get_fuse_creds(&c); - fullpath = xtreemfs_full_path(path); - dbg_msg("Opening path '%s' flags=%d\n", fullpath, fi->flags); - - switch(fi->flags & O_ACCMODE) { - case O_RDONLY: - open_mode_idx = 0; - break; - /* XtreemFS does not distinguish between read/write and - * write only... */ - case O_WRONLY: - case O_RDWR: - open_mode_idx = 1; - break; - } - if (fi->flags & O_APPEND) - open_mode_idx = 2; - -#if 0 - if (fi->flags & O_CREAT) { - dbg_msg("Creating file.!\n"); - open_mode_idx = 4; - } -#endif - -#ifdef O_DIRECT - if (fi->flags & O_DIRECT) { - dbg_msg("direct I/O flag set for %s\n",path); - fi->direct_io = 1; - } -#endif - - req = MRC_Request__open(&err, &resp, fullpath, - open_mode[open_mode_idx], &c, NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - - if (err) - goto out; - - uf = (struct user_file *)(uintptr_t)fi->fh; - - if (!uf) { - xcap = str_to_xcap(resp.xcap); - creds_copy(&xcap->creds, &c); - - xloc = xloc_list_get_idx_str(resp.xloc, 0); - xloc_list = str_to_xlocs_list(resp.xloc); - dbg_msg("Xlocation string: %s\n", xloc->repr); - - uf = xtreemfs_create_user_file(fullpath, fi->flags, - xcap, xloc, xloc_list, - &err); - fi->fh = (uint64_t)(uintptr_t)uf; - dbg_msg("Fileid use count after uf creation: %d\n", - fileid_struct_read_uc(uf->file->fileid_s)); - } else { - dbg_msg("Reopening existing user file: %p\n", uf); - - /* Set new xcap and xloc from MRC on the already - existing file. */ - // pthread_spin_lock(&uf->lock); - if (resp.xcap) { - xcap_copy_values_from_str(uf->xcap, resp.xcap); - uf->file->fileid_s->sz.epoch = uf->xcap->truncateEpoch; - } - if (resp.xloc) { - xloc = xloc_list_get_idx_str(resp.xloc, 0); - // free(uf->xloc); - if (uf->xloc) - xlocs_delete(uf->xloc); - uf->xloc = xloc; - dbg_msg("Exchanged x-location string: %s\n", uf->xloc->repr); - } - atomic_inc(&uf->use_count); - // pthread_spin_unlock(&uf->lock); - dbg_msg("File '%s' with uf = %p\n", path, uf); - } - -out: - if (resp.xloc) - free(resp.xloc); - if (resp.xcap) - free(resp.xcap); - - creds_delete_content(&c); - - free(fullpath); - - XTREEMFS_LEAVE(); - return -abs(err); -} - -int -xtreemfs_read(const char *path, char *rbuf, size_t size, off_t offset, - struct fuse_file_info *fi) -{ - int rv = 0, err = 0; - struct user_file *uf = (struct user_file *)(uintptr_t)(fi->fh); - struct fileid_struct *fileid = uf->file->fileid_s; - struct req *req; - size_t rsize; - size_t tsize = 0; - off_t file_size; - - XTREEMFS_ENTER(); -#ifdef ITAC - VT_begin(itac_fuse_read_hdl); -#endif - - dbg_msg("uf=%p\n", uf); - dbg_msg("Reading at %ld with size %d\n", offset, (int)size); - - if (size == 0) { - dbg_msg("Size is 0!\n"); - rv = 0; - goto out; - } - - spin_lock(&uf->lock); - atomic_inc(&uf->use_count); - - // access to size should be "atomic" (i.e. protected by lock) - // pthread_spin_lock(&fileid->lock); - file_size = fileid->sz.size; - // pthread_spin_unlock(&fileid->lock); - - /* See if we can read at all */ - if (offset < file_size) { - if (offset + size > file_size) { - rsize = file_size - offset; - dbg_msg("Corrected read size to %ld\n", rsize); - } else - rsize = size; - } else { - dbg_msg("attempted access outside the known filesize!\n"); - dbg_msg("fileid=%s offset=%ld known filesize=%ld\n", - fileid->fileid, offset, (long)file_size); - rv = 0; // illegal seek ?? - goto finish; - } - - bench_timer_start(&read_timer); - - req = filerw_req_create(REQ_FILERW_READ, offset, rsize, - (void *)rbuf, uf, &tsize, NULL); - if (!req) { - dbg_msg("filerw_req_create returned an error: %d\n",err); - rv = -EIO; - goto finish; - } - err = execute_req(filerw_wq, req); - - dbg_msg("returned from wait (uf=%p) with err=%d\n", uf, err); - - bench_timer_stop(&read_timer); - bench_timings_add_ms(&read_timings, tsize / bench_timer_ms(&read_timer)); - - if (!err) { - rv = tsize; - } else { - err_msg("Error %d after waiting for request.\n", err); - rv = -abs(err); - } - -finish: - atomic_dec(&uf->use_count); - spin_unlock(&uf->lock); -out: - -#ifdef ITAC - VT_end(itac_fuse_read_hdl); -#endif - dbg_msg("Returning %d\n", rv); - XTREEMFS_LEAVE(); - return rv; -} - -int -xtreemfs_write(const char *path, const char *wbuf, size_t size, off_t offset, - struct fuse_file_info *fi) -{ - int rv = 0, err = 0; - struct user_file *uf = (struct user_file *)(uintptr_t)fi->fh; - struct req *req; - size_t num_bytes = 0; - - XTREEMFS_ENTER(); -#ifdef ITAC - VT_begin(itac_fuse_write_hdl); -#endif - - spin_lock(&uf->lock); - atomic_inc(&uf->use_count); - - bench_timer_start(&write_timer); - - req = filerw_req_create(REQ_FILERW_WRITE, offset, size, - (void *)wbuf, uf, - &num_bytes, NULL); - if (req) { - err = execute_req(filerw_wq, req); - dbg_msg("returned from wait (uf=%p) with err=%d\n", uf, err); - } else { - err_msg("Could not create request for filerw.\n"); - rv = -ENOMEM; - goto finish; - } - - dbg_msg("FileRW request %p created for uf=%p.\n",req,uf); - - // block and wait for the request to finish - dbg_msg("Waiting for fileRW req %p (uf=%p).\n", req, uf); - - /** Write data to an open file - * - * Write should return exactly the number of bytes requested - * except on error. An exception to this is when the 'direct_io' - * mount option is specified (see read operation). - */ - - bench_timer_stop(&write_timer); - bench_timings_add_ms(&write_timings, - size / bench_timer_ms(&write_timer)); - if (err) { - err_msg("Error %d in 'req_wait'\n", err); - rv = -abs(err); - } else - rv = (int)size; - - dbg_msg("done.\n"); - dbg_msg("File size after write op: %lld\n", uf->file->fileid_s->sz.size); - -finish: - atomic_dec(&uf->use_count); - spin_unlock(&uf->lock); -#ifdef ITAC - VT_end(itac_fuse_write_hdl); -#endif - XTREEMFS_LEAVE(); - return rv; -} - -int -xtreemfs_statfs(const char *path, struct statvfs *sbuf) -{ - int rv = 0; - - XTREEMFS_ENTER(); - dbg_msg("statfs not implemented, yet\n"); - XTREEMFS_LEAVE(); - - return rv; -} - -int -xtreemfs_flush(const char *path, struct fuse_file_info *fi) -{ - int err = 0; - struct user_file *uf; - struct fileid_struct *fileid; - struct creds c; - -#ifdef ITAC - VT_begin(itac_fuse_flush_hdl); -#endif - - XTREEMFS_ENTER(); - get_fuse_creds(&c); - dbg_msg("Flushing '%s'\n", path); - - uf = (struct user_file *)(uintptr_t)fi->fh; - if (!uf || !uf->file) - goto finish; - atomic_inc(&uf->use_count); - - fileid = uf->file->fileid_s; - - /* Indicate that we are flushing the file */ - spin_lock(&fileid->flush); - - dbg_msg("File size in flush: %ld\n", (int)fileid->sz.size); - - /* Do not allow any changes during flush operation. The size - affects all user files. */ - spin_lock(&fileid->lock); - if (atomic_read(&fileid->sz.needs_updating)) { - dbg_msg("File %s needs updating, size=%ld\n", - fileid->path, fileid->sz.size); - - // pthread_spin_lock(&xcap_inv.lock); - err = xcap_inv_renew_immediate(&xcap_inv, - fileid->fileid, uf->xcap, - fileid->sz.size, fileid->sz.epoch, - NEW_FILEID_ORDER(uf), 1); - atomic_set(&fileid->sz.needs_updating, 0); - // pthread_spin_unlock(&xcap_inv.lock); - } - - spin_unlock(&fileid->lock); - spin_unlock(&fileid->flush); -finish: - creds_delete_content(&c); - - if (uf && uf->file) - atomic_dec(&uf->use_count); -#ifdef ITAC - VT_end(itac_fuse_flush_hdl); -#endif - XTREEMFS_LEAVE(); - - return -abs(err); -} - -int -xtreemfs_release(const char *path, struct fuse_file_info *fi) -{ - int err = 0; - struct user_file *uf = (struct user_file *)(uintptr_t)fi->fh; - struct fileid_struct *fileid; - -#ifdef ITAC - VT_begin(itac_fuse_release_hdl); -#endif - XTREEMFS_ENTER(); - dbg_msg("Releasing path '%s'\n", path); - - if (uf) { - fileid = uf->file->fileid_s; - if (atomic_read(&fileid->sz.needs_updating)) { - dbg_msg("updating filesize first... = %lld\n", - fileid->sz.size); - err = xtreemfs_flush(path, fi); - } - if (file_inv_release_user_file(&file_inv, uf) == 1) - fi->fh = (uintptr_t)NULL; - - } else - dbg_msg("No file handle in release operation!\n"); - - XTREEMFS_LEAVE(); -#ifdef ITAC - VT_end(itac_fuse_release_hdl); -#endif - return -abs(err); -} - -int -xtreemfs_fsync(const char *path, int isdatasync, struct fuse_file_info *fi) -{ - int rv = 0; - struct user_file *uf = (struct user_file *)(uintptr_t)fi->fh; - struct fileid_struct *fileid; - - XTREEMFS_ENTER(); - if (uf) { - fileid = uf->file->fileid_s; - if (atomic_read(&fileid->sz.needs_updating)) { - dbg_msg("updating filesize first... = %ld\n", - fileid->sz.size); - rv = xtreemfs_flush(path, fi); - } - } - XTREEMFS_LEAVE(); - - return rv; -} - -int -xtreemfs_setxattr(const char *path, const char *name, const char *value, size_t size, int flags) -{ - int err = 0; - struct req *req; - char *fullpath = NULL; - struct creds c; - struct xattr_list xattr_list; - - XTREEMFS_ENTER(); - - get_fuse_creds(&c); - fullpath = xtreemfs_full_path(path); - - dbg_msg("Set new value '%s' for key '%s' (size is %d)\n", value, name, size); - - xattr_list_init(&xattr_list); - - /* TODO: This requires more care for binary data! The solution below - can only be accepted for text values! */ - xattr_list_add_values(&xattr_list, (char *)name, (char *)value, size); - - req = MRC_Request__setXAttrs(&err, fullpath, &xattr_list, &c, NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - -out: - xattr_list_del_contents(&xattr_list); - creds_delete_content(&c); - free(fullpath); - XTREEMFS_LEAVE(); - - return err; -} - -int -xtreemfs_getxattr(const char *path, const char *name, char *value, size_t size) -{ - int rv = 0; - struct req *req; - struct MRC_Req_get_xattr_resp resp = { .value = NULL }; - int err = 0; - char *fullpath = NULL; - struct creds c; - - XTREEMFS_ENTER(); - - get_fuse_creds(&c); - fullpath = xtreemfs_full_path(path); - - dbg_msg("Getting value for key '%s' and file '%s'\n", name, fullpath); - - req = MRC_Request__getXAttr(&err, fullpath, (char *)name, &resp, &c, NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - - if (err) { - rv = err; - goto out; - } - - if (!err) { - if (resp.value) { - dbg_msg("Return value: %s\n", resp.value); - if (strlen(resp.value) < size && size > 0) { - strcpy(value, resp.value); - rv = strlen(resp.value); - } else if (size == 0) { - rv = strlen(resp.value); - } else { - err = -ERANGE; - rv = err; - } - } - } else { - rv = err; - goto out; - } - -out: - free(resp.value); - free(fullpath); - creds_delete_content(&c); - XTREEMFS_LEAVE(); - - return rv; -} - -int -xtreemfs_listxattr(const char *path, char *list, size_t size) -{ - int rv = 0; - int err = 0; - struct req *req; - char *fullpath = NULL; - struct creds c; - struct xtreemfs_statinfo si; - char *key_list = NULL; - size_t key_list_size; - - XTREEMFS_ENTER(); - get_fuse_creds(&c); - fullpath = xtreemfs_full_path(path); - - dbg_msg("Getting attribute list for '%s' in buffer of length %d\n", - fullpath, size); - - xtreemfs_statinfo_init(&si); - - req = MRC_Request__stat(&err, &si, fullpath, 0, 1, 0, &c, - NULL, 1); - if (!req) { - err = -ENOMEM; - goto out; - } - - err = execute_req(mrccomm_wq, req); - - if (!err) { - if (si.xAttrs) { - key_list = xattr_list_key_list(si.xAttrs, &key_list_size); - if (key_list) { - dbg_msg("Got a key list of size %d!\n", key_list_size); - dbg_msg("First key: '%s'\n", key_list); - if (key_list_size < size && size > 0) { - memcpy((void *)list, (void *)key_list, key_list_size); - rv = key_list_size; - } else if (size == 0) { - rv = key_list_size; - } else - rv = -ERANGE; - } else { - rv = -1; - } - } - } else { - rv = -abs(err); - } - -out: - free(fullpath); - xtreemfs_statinfo_clear(&si); - creds_delete_content(&c); - free(key_list); - dbg_msg("Returning %d\n", rv); - - XTREEMFS_LEAVE(); - - return rv; -} - -int -xtreemfs_removexattr(const char *path, const char *name) -{ - int rv = 0; - int err = 0; - struct req *req; - char *fullpath = NULL; - struct creds c; - - XTREEMFS_ENTER(); - get_fuse_creds(&c); - fullpath = xtreemfs_full_path(path); - - dbg_msg("remove xattr '%s' for '%s'\n", name, fullpath); - - req = MRC_Request__removeXAttrs(&err, fullpath, (char *)name, &c, NULL, 1); - if (!req) { - rv = err; - goto out; - } - err = execute_req(mrccomm_wq, req); - -out: - free(fullpath); - creds_delete_content(&c); - XTREEMFS_LEAVE(); - - return rv; -} - -int -xtreemfs_opendir(const char *path, struct fuse_file_info *fi) -{ - int rv = 0; - - XTREEMFS_ENTER(); - dbg_msg("opendir not implemented, yet\n"); - XTREEMFS_LEAVE(); - - return rv; -} - -int -xtreemfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler, - off_t offset, struct fuse_file_info *fi) -{ - int err = 0; - struct req *req; - struct creds c; - char *fullpath = NULL; - struct MRC_Req_readDirAndStat_resp resp; - int i; - - XTREEMFS_ENTER(); - get_fuse_creds(&c); - fullpath = xtreemfs_full_path(path); - - req = MRC_Request__readDir(&err, &resp, fullpath, &c, NULL, 1); - if (req) - err = execute_req(mrccomm_wq, req); - else - err = -ENOMEM; - if (err) - goto out; - -#if 0 - /* We use for now a very conservative metadata caching policy, in which - the cache is only used for the entries of the latest readDirAndStat. - First the entries in the cache, because the data is used as soon as it - is handed over to the filler. - */ - metadata_cache_flush(&md_cache); - metadata_cache_insert_entries(&md_cache, path, - resp.num_entries, resp.dir_entries, resp.stat_entries); -#endif - for (i = 0; i < resp.num_entries; i++) - filler(buf, resp.dir_entries[i], NULL, 0); - filler(buf, ".", NULL, 0); - filler(buf, "..", NULL, 0); - - - for (i = 0; i < resp.num_entries; i++) { - free(resp.dir_entries[i]); -#if 0 - xtreemfs_statinfo_clear(&(resp.stat_entries[i])); -#endif - } -#if 0 - free(resp.stat_entries); -#endif - free(resp.dir_entries); - - out: - creds_delete_content(&c); - free(fullpath); - XTREEMFS_LEAVE(); - - return -abs(err); -} - -int -xtreemfs_releasedir(const char *path, struct fuse_file_info *fi) -{ - int rv = 0; - - XTREEMFS_ENTER(); - dbg_msg("releasedir not implemented, yet\n"); - XTREEMFS_LEAVE(); - - return rv; -} - -int -xtreemfs_fsyncdir(const char *path, int isdatasync, struct fuse_file_info *fi) -{ - int rv = 0; - - XTREEMFS_ENTER(); - dbg_msg("fsyncdir not implemented, yet\n"); - XTREEMFS_LEAVE(); - - return rv; -} - -int -xtreemfs_create(const char *path, mode_t mode, struct fuse_file_info *fi) -{ - int err = 0; - struct req *req; - struct creds c; - char *fullpath = NULL; - struct user_file *uf = NULL; - int do_open = 0; - struct MRC_Req_create_file_resp resp = { - .xcap = NULL, - .xloc = NULL - }; - - XTREEMFS_ENTER(); - - uf = (struct user_file *)(uintptr_t)fi->fh; - - get_fuse_creds(&c); - fullpath = xtreemfs_full_path(path); - - dbg_msg("Create path '%s' in mode %d", fullpath, mode); - dbg_msg("Flags: %d", fi->flags); - - if (!uf) { - dbg_msg("Open after create.\n"); - do_open = 1; - } - - req = MRC_Request__createFile(&err, &resp, - fullpath, NULL, NULL, NULL, - mode, do_open, &c, NULL, 1); - if (!req) { - err_msg("Error during file creation.\n"); - err = -ENOENT; - goto out; - } - - err = execute_req(mrccomm_wq, req); - - if(!err) { - if (do_open) { - struct xcap *xcap; - struct xlocs *xloc; - struct xloc_list *xloc_list; - - dbg_msg("Xcap string: '%s'\n", resp.xcap); - xcap = str_to_xcap(resp.xcap); - creds_copy(&xcap->creds, &c); - - xloc = xloc_list_get_idx_str(resp.xloc, 0); - xloc_list = str_to_xlocs_list(resp.xloc); - dbg_msg("Xlocation string: %s\n", xloc->repr); - - uf = xtreemfs_create_user_file(fullpath, fi->flags, - xcap, xloc, xloc_list, - &err); - fi->fh = (uint64_t)(uintptr_t)uf; - dbg_msg("File '%s' created with uf = %p\n", path, fi->fh); - dbg_msg("Use count after uf creation: %d\n", - fileid_struct_read_uc(uf->file->fileid_s)); - } else { - err_msg("Whoops! Trying to create an already existing file.\n"); - } - } else { - if (err == 13) - err = -abs(err); - } - out: - creds_delete_content(&c); - if (resp.xloc) - free(resp.xloc); - if (resp.xcap) - free(resp.xcap); - - free(fullpath); - XTREEMFS_LEAVE(); - - return -abs(err); -} - -int -xtreemfs_fgetattr(const char *path, struct stat *stbuf, struct fuse_file_info *fi) -{ - int rv = 0; - - XTREEMFS_ENTER(); - dbg_msg("fgetattr not implemented, yet\n"); - XTREEMFS_LEAVE(); - - return rv; -} - -void * -xtreemfs_fuse_init(struct fuse_conn_info *conn) -{ - void *rv = NULL; - - XTREEMFS_ENTER(); - - dbg_msg("Volume is '%s'\n", volume); - dbg_msg("MRC is '%s'\n", mrc_url); - -#ifdef XTREEMOS_ENV - pthread_mutex_init(&xtreemos_ams_mutex, NULL); - xtreemos_ams_sock = amsclient_connect_open(); - if (xtreemos_ams_sock < 0) { - dbg_msg("Cannot open connection to AMS.\n"); - } -#endif - - xtreemfs_load_mods(&transl_engine, conf.mod_dir); - metadata_cache_init(&md_cache); - -#if 0 - raid_engine_init(&raid_engine); - xtreemfs_load_mods(&raid_engine); -#endif - - OSD_Manager_init(&osd_manager); - - file_inv_init(&file_inv); - sobj_init(NUM_SOBJ_THREADS); - - dbg_msg("Starting multiple queues\n"); - fobj_init(); - filerw_init(); - mrccomm_init(mrc_url, NUM_MRCOMM_THREADS); - xcap_inv_init(&xcap_inv); - - if (conf.monitoring) { - dbg_msg("Start monitoring interface.\n"); - } - - XTREEMFS_LEAVE(); - - return rv; -} - -void -xtreemfs_fuse_destroy(void *handle) -{ - - XTREEMFS_ENTER(); - -#ifdef XTREEMOS_ENV - amsclient_connect_close(xtreemos_ams_sock); - pthread_mutex_destroy(&xtreemos_ams_mutex); -#endif - timing_msg("Avg. write bandwidth in stripe stage: %g kB/s\n", - bench_timings_avg_ms(&write_timings)); - timing_msg("Avg. write bandwidth in osd proxy: %g kB/s\n", - bench_data_collection_avg(&osd_proxy_bandwidth)); - timing_msg("Avg. write bandwidth in neon statge: %g kB/s\n", - bench_timings_avg_ms(&neon_timings)); - - metadata_cache_clear(&md_cache); - xtreemfs_unload_mods(&transl_engine); - - OSD_Manager_clear(&osd_manager); - file_inv_clear(&file_inv); - xcap_inv_clear(&xcap_inv); - - mrccomm_destroy(); - ne_sock_exit(); - - XTREEMFS_LEAVE(); - -} - -int -xtreemfs_access(const char *path, int mode) -{ - struct req *req; - struct creds c; - struct MRC_Req_check_access_resp resp; - char *fullpath; - char mode_str[12]; - int i; - int err = 0; - - XTREEMFS_ENTER(); - - get_fuse_creds(&c); - fullpath = xtreemfs_full_path(path); - - /* Convert mode to string */ - i = 0; - if (mode & R_OK) - mode_str[i++] = 'r'; - if (mode & W_OK) - mode_str[i++] = 'w'; - if (mode & X_OK) - mode_str[i++] = 'x'; - if (mode & F_OK) - mode_str[i++] = 'f'; - - mode_str[i] = '\0'; - - req = MRC_Request__checkAccess(&err, &resp, fullpath, mode_str, &c, NULL, 1); - if (!req) { - dbg_msg("Error while checking file access.\n"); - err = -EIO; - goto out; - } - err = execute_req(mrccomm_wq, req); - if(!err) { - if (!resp.grant) { - dbg_msg("Access denied.\n"); - err = -EACCES; - } - } - -out: - creds_delete_content(&c); - free(fullpath); - XTREEMFS_LEAVE(); - return -abs(err); -} diff --git a/client/src/xtreemfs_fuse.h b/client/src/xtreemfs_fuse.h deleted file mode 100644 index abbf24dd4..000000000 --- a/client/src/xtreemfs_fuse.h +++ /dev/null @@ -1,83 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -C Interface: xtreemfs - -Description: - - -Author: Matthias Hess , (C) 2006 - -Copyright: See COPYING file that comes with this distribution - -*/ - -#include -#include - -#define XTREEMFS_ENTER() trace_msg("Entering.\n") -#define XTREEMFS_LEAVE() trace_msg("Leaving.\n") - -extern struct fuse_operations xtreemfs_ops; - -extern int xtreemfs_getattr(const char *, struct stat *); -extern int xtreemfs_readlink(const char *, char *, size_t); -extern int xtreemfs_getdir(const char *, fuse_dirh_t, fuse_dirfil_t); -extern int xtreemfs_mknod(const char *, mode_t, dev_t); -extern int xtreemfs_mkdir(const char *, mode_t); - -extern int xtreemfs_unlink(const char *); -extern int xtreemfs_rmdir(const char *); -extern int xtreemfs_symlink(const char *, const char *); -extern int xtreemfs_rename(const char *, const char *); -extern int xtreemfs_link(const char *, const char *); -extern int xtreemfs_chmod(const char *, mode_t); -extern int xtreemfs_chown(const char *, uid_t, gid_t); -extern int xtreemfs_truncate(const char *, off_t); -extern int xtreemfs_utime(const char *, struct utimbuf *); -extern int xtreemfs_open(const char *, struct fuse_file_info *); -extern int xtreemfs_read(const char *, char *, size_t, off_t, struct fuse_file_info *); -extern int xtreemfs_write(const char *, const char *, size_t, off_t, struct fuse_file_info *); -extern int xtreemfs_statfs(const char *, struct statvfs *); -extern int xtreemfs_flush(const char *, struct fuse_file_info *); -extern int xtreemfs_release(const char *, struct fuse_file_info *); -extern int xtreemfs_fsync(const char *, int, struct fuse_file_info *); -extern int xtreemfs_setxattr(const char *, const char *, const char *, size_t, int); -extern int xtreemfs_getxattr(const char *, const char *, char *, size_t); -extern int xtreemfs_listxattr(const char *, char *, size_t); -extern int xtreemfs_removexattr(const char *, const char *); -extern int xtreemfs_opendir(const char *, struct fuse_file_info *); -extern int xtreemfs_readdir(const char *, void *, fuse_fill_dir_t, off_t, struct fuse_file_info *); -extern int xtreemfs_releasedir(const char *, struct fuse_file_info *); -extern int xtreemfs_fsyncdir(const char *, int, struct fuse_file_info *); - -extern void *xtreemfs_fuse_init(struct fuse_conn_info *); -extern void xtreemfs_fuse_destroy(void *); - -extern int xtreemfs_access(const char *, int); - -extern int xtreemfs_create(const char *, mode_t, struct fuse_file_info *); -extern int xtreemfs_ftruncate(const char *, off_t, struct fuse_file_info *); -extern int xtreemfs_fgetattr(const char *, struct stat *, struct fuse_file_info *); diff --git a/client/src/xtreemfs_itac.c b/client/src/xtreemfs_itac.c deleted file mode 100644 index 4cba48a34..000000000 --- a/client/src/xtreemfs_itac.c +++ /dev/null @@ -1,57 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: xtreemfs_itac -* -* Description: -* -* -* Author: Matthias Hess , (C) 2008 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -int itac_fuse_class; -int itac_osd_class; -int itac_filerw_class; -int itac_fobj_class; -int itac_sobj_class; - -int itac_fuse_read_hdl; -int itac_fuse_write_hdl; -int itac_fuse_flush_hdl; -int itac_fuse_release_hdl; - -int itac_osd_exec_hdl; -int itac_osd_put_hdl; -int itac_osd_get_hdl; - -int itac_filerw_handle_hdl; -int itac_fobj_handle_hdl; -int itac_sobj_handle_hdl; - -int itac_spin_class; - diff --git a/client/src/xtreemfs_prot.c b/client/src/xtreemfs_prot.c deleted file mode 100644 index f88cb64bc..000000000 --- a/client/src/xtreemfs_prot.c +++ /dev/null @@ -1,535 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess - - Author: Matthias Hess - - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - -/* - C Implementation: xtreemfs_prot - - Description: - */ - -#include -#include -#include -#include - -#include "ne_request.h" - -#include "xtreemfs_prot.h" -#include "xtreemfs.h" -#include "creds.h" -#include "logger.h" - -/* Array that contains the supported protocol version identifiers. - This array is sorted in such a way that preferred protocols - are stored towards the end. (This should make it easier to maintain - the protocol list) */ -int client_prot_vers[] = { - 39 -}; -int client_num_prot_vers = sizeof(client_prot_vers) / sizeof(int); - -struct prot_list *client_vers = NULL; - - -/** - * Generate client protocol version list - */ -struct prot_list *prot_list_create_client_list() -{ - struct prot_list *rv = NULL; - int err = 0; - int i; - - rv = prot_list_new(client_num_prot_vers); - if (!rv) { - err = -ENOMEM; - goto out; - } - - dbg_msg("Number of client versions: %d\n", client_num_prot_vers); - - for (i=0; imax_num_vers = init_num; - pl->num_vers = 0; - pl->vers = (int *)malloc(sizeof(int) * pl->max_num_vers); - if (!pl->vers) { - err = 1; - goto out; - } - - for (i=0; imax_num_vers; i++) { - pl->vers[i] = -1; - } -out: - return err; -} - -/** - * Delete contents of a protocol list - */ -void prot_list_del_contents(struct prot_list *pl) -{ - free(pl->vers); - pl->vers = NULL; -} - -/** - * Destroy a protocol version - */ -void prot_list_destroy(struct prot_list *pl) -{ - prot_list_del_contents(pl); - free(pl); -} - - -int prot_list_add_vers(struct prot_list *pl, int vers) -{ - int err = 0; - int i, j; - - for (i=0; inum_vers && pl->vers[i] != -1 && pl->vers[i] > vers; i++); - - /* We must add the version only, if we do not have it already */ - if (pl->vers[i] == vers) - goto out; - - for (j=pl->num_vers; j>i; j--) - pl->vers[j] = pl->vers[j-1]; - - pl->vers[i] = vers; - - /* Resize version array, eventually */ - if (++pl->num_vers >= pl->max_num_vers) { - pl->max_num_vers += 10; - pl->vers = realloc((void *)pl->vers, sizeof(int) * pl->max_num_vers); - if (!pl->vers) { - err = 1; - goto out; - } - - for(i=pl->num_vers; imax_num_vers; i++) - pl->vers[i] = -1; - } - -out: - return err; -} - -/** - * Retrieve the greatest common version from two lists - */ -int prot_list_cmp(struct prot_list *pl1, struct prot_list *pl2) -{ - int rv = -1; - int l1; - int l2; - int *v1, *v2, *dv; - int i, j, di; - - /* Do the lists exist? */ - if (!pl1 || !pl2) { - dbg_msg("One of the lists does not exist.\n"); - goto out; - } - - l1 = pl1->num_vers; - l2 = pl2->num_vers; - - /* Is one of the lists empty? */ - if (l1==0 || l2==0) { - dbg_msg("one of the lists does not exist.\n"); - goto out; - } - - i = 0; - v1 = pl1->vers; - j = 0; - v2 = pl2->vers; - - while (i v2[j] */ - if (v1[i] < v2[j]) { - di = i; - i = j; - j = di; - di = l1; - l1 = l2; - l2 = di; - dv = v1; - v1 = v2; - v2 = dv; - } - - while (i<=l1 && v1[i]>v2[j]) { - dbg_msg("Comparing %d with %d\n", v1[i], v2[j]); - i++; - } - } - - if (v1[i] == v2[j]) - rv = v1[i]; - -out: - return rv; -} - - -/* Specifics for JSON channel */ - -/** - * Check for an JSON error - * - * This function will go into a general 'json channel' that can be - * shared among OSD and MRC channels... - */ -int json_channel_check_error(ne_session *sess, ne_request *req) -{ - int err = 0; - - return err; -} - - -/** - * Convert JSON object to protocol list - */ -struct prot_list *json_to_prot_list(struct json_object *jo) -{ - struct prot_list *rv = NULL; - int len = 0; - - if (json_object_get_type(jo) != json_type_int) { - dbg_msg("JSON object does not have the right type.\n"); - goto out; - } - - len = 1; - rv = prot_list_new(len); - - if (json_to_prot_list_ip(rv, jo)) { - prot_list_destroy(rv); - rv = NULL; - } - -out: - return rv; -} - -/** - * Convert a JSON object to protocol list in-place - */ -int json_to_prot_list_ip(struct prot_list *pl, struct json_object *jo) -{ - int err = 0; - struct json_object *idx = NULL; - int len; - int i; - - if (json_object_get_type(jo) != json_type_int) { - dbg_msg("JSON object does not have the right type.\n"); - err = 1; - goto out; - } - - err |= prot_list_add_vers(pl, json_object_get_int(jo)); - -out: - return err; -} - -/** - * Convert a protocol list into JSON object - */ -struct json_object *prot_list_to_json(struct prot_list *pl) -{ - struct json_object *rv = NULL; - int i; - - rv = json_object_new_array(); - if (!rv || !pl) - goto out; - - for (i=0; inum_vers; i++) { - json_object_array_add(rv, json_object_new_int(pl->vers[i])); - } - -out: - return rv; -} - - -/** - * Protocol response reader - * - * This function simply reads the response of a HTTP request - * into the given buffer. - */ -int prot_read_resp(void *userdata, const char *buf, size_t len) -{ - ne_buffer *ne_buf = (ne_buffer *)userdata; - - dbg_msg("Reading response.\n"); - - if (len > 0) { - ne_buffer_append(ne_buf, buf, len); - } - - return NE_OK; -} - -/** - * Accept HTTP request for protcol - */ -static int prot_http_accept(void *userdata, ne_request *req, const ne_status *st) -{ - int acc = 0; - - if (st->klass == 2) { - acc = 1; - dbg_msg("Accept 200 class\n"); - goto out; - } - - if (st->klass == 4) { - if (st->code == 420) { - acc = 1; - dbg_msg("Accept 420 code.\n"); - goto out; - } - } - - if (st->klass == 5 && st->code == 500) { - acc = 1; - goto out; - } - - dbg_msg("HTTP code: %d\n", st->code); - if (st->reason_phrase) - dbg_msg("HTTP reason: %s\n", st->reason_phrase); - -out: - return acc; -} - -/** - * Create a 'getProtocolVersion' request - * - * This function creates are neon request to get supported protocol - * versions from a server. It will send the given versions that - * the client claims to support. - * This function does not dispatch the request. That and retrieving - * the answer must be done somewhere else. - */ -ne_request *prot_getProtocolVersion_req(ne_session *sess, - struct creds *creds, - struct json_object *req_params) -{ - ne_request *rv = NULL; - int err = 0; - char *req_params_str = NULL; - char auth_str[1024]; - int i; - - /* If there is no own list, skip it. */ - if (!req_params) { - dbg_msg("No JSON parameter object.\n"); - goto out; - } - - rv = ne_request_create(sess, "POST", "getProtocolVersion"); - if (!rv) { - dbg_msg("Cannot create neon request.\n"); - goto out; - } - - /* It would be great if we could create the body buffer ourselves - (and not rely on the JSON object supplying that buffer). BUT - there is no way to delete the buffer once the request has been - created. So we have to use this hack here. */ - - req_params_str = json_object_to_json_string(req_params); - if (!req_params_str) { - dbg_msg("Cannot convert JSON object to string.\n"); - goto out; - } - - ne_set_request_body_buffer(rv, req_params_str, - strlen(req_params_str)); - - dbg_msg("Params: %s\n", req_params_str); - - if (creds_to_str_ip(creds, auth_str, 1024)) { - err = 1; - goto out; - } - - ne_add_request_header(rv, "Authorization", auth_str); - -out: - - return rv; -} - -struct prot_list *prot_get_versions(ne_session *sess, struct prot_list *pl) -{ - struct prot_list *rv = NULL; - int err = 0; - ne_buffer *buf = NULL; - ne_request *req = NULL; - struct creds creds; - struct json_object *req_params = NULL; - struct json_object *resp = NULL; - struct prot_list *me = NULL; - - get_local_creds(&creds); - - if (!pl) { - dbg_msg("No list to send. Going to create one.\n"); - me = prot_list_create_client_list(); - if (!me) { - dbg_msg("Cannot create new list.\n"); - goto out; - } - } else { - dbg_msg("Using supplied protocol list.\n"); - me = pl; - } - - buf = ne_buffer_create(); - if (!buf) { - dbg_msg("Cannot create neon buffer.\n"); - err = 1; - goto out; - } - - req_params = json_object_new_array(); - if (!req_params) { - dbg_msg("Cannot create JSON parameter array.\n"); - goto out; - } - json_object_array_add(req_params, prot_list_to_json(me)); - - req = prot_getProtocolVersion_req(sess, &creds, req_params); - if (!req) { - dbg_msg("Cannot get protocol version request.\n"); - err = 2; - goto out; - } - - ne_buffer_clear(buf); - - /* How to receive the answer */ - ne_add_response_body_reader(req, prot_http_accept, - prot_read_resp, - (void *)buf); - - if ((err = ne_request_dispatch(req)) != NE_OK) { - err_msg("Error while dispatching request %p (%d)\n", - req, err); - err_msg("Error was: %s\n", ne_get_error(sess)); - goto out; - } - - print_neon_buffer(buf); - - /* And analyse output */ - if ((err = json_channel_check_error(sess, req))) { - goto out; - } - - resp = json_tokener_parse(buf->data); - if (!resp || is_error(resp)) { - err = 3; - goto out; - } - - if (!(rv = json_to_prot_list(resp))) { - err = 4; - goto out; - } - -out: - creds_delete_content(&creds); - - if (buf) - ne_buffer_destroy(buf); - if (req) { - ne_request_destroy(req); - } - - if (err && rv) { - prot_list_destroy(rv); - rv = NULL; - } - - if (resp) - json_object_put(resp); - - if (req_params) - json_object_put(req_params); - - if (me && !pl) - prot_list_destroy(me); - - return rv; -} diff --git a/client/src/xtreemfs_prot.h b/client/src/xtreemfs_prot.h deleted file mode 100644 index 9d3bc291a..000000000 --- a/client/src/xtreemfs_prot.h +++ /dev/null @@ -1,72 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess - - Author: Matthias Hess - - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - -/* - C Interface: xtreemfs_prot - - Description: -*/ - -#ifndef __XTRFS_PROT_H__ -#define __XTRFS_PROT_H__ - -#include - -#include "creds.h" - -struct prot_list { - int max_num_vers; - int num_vers; - int *vers; -}; - -extern struct prot_list *prot_list_new(int init_num); -extern int prot_list_init(struct prot_list *pl, int init_num); -extern void prot_list_del_contents(struct prot_list *pl); -extern void prot_list_destroy(struct prot_list *pl); - -extern int prot_list_add_vers(struct prot_list *pl, int vers); - -extern int prot_list_cmp(struct prot_list *pl1, struct prot_list *pl2); - -extern int prot_list_info(struct prot_list *pl); - -extern struct prot_list *json_to_prot_list(struct json_object *jo); -extern int json_to_prot_list_ip(struct prot_list *pl, struct json_object *jo); -extern struct json_object *prot_list_to_json(struct prot_list *pl); - -/* These are related to the global protocol list of this client. */ -extern struct prot_list *client_vers; -extern struct prot_list *prot_list_create_client_list(); -extern struct prot_list *prot_get_versions(ne_session *sess, struct prot_list *pl); - -/* The following is for JSON over HTTP channels only */ - -extern ne_request *prot_getProtocolVersion_req(ne_session *sess, - struct creds *creds, - struct json_object *req_params); - -#endif diff --git a/client/src/xtreemfs_security.c b/client/src/xtreemfs_security.c deleted file mode 100644 index e6138a81c..000000000 --- a/client/src/xtreemfs_security.c +++ /dev/null @@ -1,65 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: xtreemfs_security -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include - -#include "xtreemfs_security.h" -#include "logger.h" - -int xtreemfs_verify_cert(void *userdata, int failures, const ne_ssl_certificate *cert) -{ - const char *hostname = userdata; - - dbg_msg("Entering.\n"); - dbg_msg("Failures: %x\n", failures); - - if (failures & NE_SSL_IDMISMATCH) { - const char *id = ne_ssl_cert_identity(cert); - if (id) - dbg_msg("Server certificate was issued to '%s' not '%s'.\n", - id, hostname); - else - dbg_msg("The certificate was not issued for '%s'\n", hostname); - } - - if (failures & NE_SSL_UNTRUSTED) - dbg_msg("The certificate is not signed by a trusted Certificate Authority."); - - dbg_msg("Leaving.\n"); - - return 0 ; -} diff --git a/client/src/xtreemfs_security.h b/client/src/xtreemfs_security.h deleted file mode 100644 index 94cdcc9ba..000000000 --- a/client/src/xtreemfs_security.h +++ /dev/null @@ -1,44 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -C++ Interface: xtreemfs_security - -Description: - - -Author: Matthias Hess , (C) 2007 - -Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_SECURITY_H__ -#define __XTRFS_SECURITY_H__ - -#include - -extern int xtreemfs_verify_cert(void *userdata, int failures, const ne_ssl_certificate *cert); - -#endif diff --git a/client/src/xtreemfs_utils.c b/client/src/xtreemfs_utils.c deleted file mode 100644 index c5e3f0069..000000000 --- a/client/src/xtreemfs_utils.c +++ /dev/null @@ -1,543 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* -* C Implementation: xtreemfs_utils -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include - -#include - -#include - -#include -#include - -#include "xtreemfs_utils.h" - - -enum error_causes { - ERR_NO_ERROR=0, - ERR_ONLY_POLICY, - ERR_NO_STRIPE_WIDTH, - ERR_STRIPE_SIZE_NOT_A_NUMBER, - ERR_STRIPE_WIDTH_NOT_A_NUMBER, - ERR_TOO_MANY_ARGUMENTS, - ERR_NO_VOLUME_URL, - ERR_NO_MEM, - ERR_UNKNOWN_POLICY, - ERR_UNSUPPORTED_SCHEME, - ERR_PARSE_ERROR -}; - -char *supported_schemes[] = { - "http", - "https", - NULL -}; - -/** - * Extract the host id part of a volume specifier. - * - * This can be either a uuid, a pseudo uuid or an URL. - * The host id and the volume name are seperated by '/' - */ -char *extract_hostid(char *path) -{ - char *rv = NULL; - char *beg = path; - char *loc = NULL; - char *scheme = NULL; - int len; - char *d; - - /* Check if we have a scheme at the beginning */ - if ((scheme = strstr(path, "://"))) { - beg = scheme + strlen("://"); - } - - loc = strrchr(beg, '/'); - if (!loc) { - rv = strdup(path); - goto out; - } - - for(d=path, len=0; d != loc; d++, len++); - - rv = (char *)malloc(len+1); - if (!rv) - goto out; - - memcpy((void *)rv, (void *)path, len); - rv[len] = '\0'; - -out: - return rv; -} - -char *extract_volumeid(char *path) -{ - char *rv = NULL; - char *beg = path; - char *loc = NULL; - char *scheme = NULL; - - /* Check if we have a scheme at the beginning */ - if ((scheme = strstr(path, "://"))) { - beg = scheme + strlen("://"); - } - - loc = strrchr(beg, '/'); - if (!loc) - goto out; - - rv = strdup(loc+1); -out: - return rv; -} - -/** - * Take a given string a try to construct a URI out of it. - * - * This function uses a directory service to resolve UUIDs eventually. - */ -int -str_to_uri_ds(char *str, ne_uri *uri, int def_port, struct dirservice *ds) -{ - int rv = 0; - char *real_url = NULL; - int real_url_len; - char *real_scheme = NULL; - char *host_id = NULL; - char *host_url = NULL; - char *vol_id = NULL; - int i; - - memset((void *)uri, 0, sizeof(*uri)); - - if(str == NULL || uri == NULL) { - rv = -1; - goto finish; - } - - dbg_msg("Analysing string: %s\n", str); - - /* Before we start we separate the host_id part from the vol_id */ - host_id = extract_hostid(str); - vol_id = extract_volumeid(str); - - dbg_msg("Host id: '%s'\n", host_id); - dbg_msg("Vol id: '%s'\n", vol_id); - - if (host_id == NULL) { - rv = -2; - goto finish; - } - - /* If the string starts with one of the supported schemes, it cannot - be a UUID. */ - - if(strstr(host_id, "://") == NULL) { - /* No sign of scheme in string... */ - if (ds) { - host_url = dirservice_get_hostaddress(ds, host_id); - /* replace the initial host id with the newly found - host address */ - if (host_url) { - free(host_id); - host_id = host_url; - } - } - if (!host_url) { /* No resolving possible. */ - host_url = - (char *)malloc( strlen(host_id) - + strlen("http://") - + 1); - host_url = strcpy(host_url, "http://"); - host_url = strcat(host_url, host_id); - dbg_msg("New host id '%s'\n", host_url); - free(host_id); - host_id = host_url; - } -#if 0 - real_url = (char *)malloc(strlen(str) + strlen("http://") + 1); - real_url = strcpy(real_url, "http://"); - real_url = strcat(real_url, str); -#endif - } - - dbg_msg("host id = '%s'\n", host_id); - - /* Now we can put together our real url. */ - real_url_len = strlen(host_id); - if (vol_id) { - real_url_len += strlen(vol_id); - real_url_len++; - } - real_url_len++; /* For concluding '\0' */ - - real_url = (char *)malloc(real_url_len); - real_url = strcpy(real_url, host_id); - if (vol_id) { - real_url = strcat(real_url, "/"); - real_url = strcat(real_url, vol_id); - } - - dbg_msg("Real URL: '%s'\n", real_url); - - if(ne_uri_parse((const char *)real_url, uri) != 0) { - err_msg("Cannot parse the given url '%s'\n", - str); - rv = ERR_PARSE_ERROR; - goto finish; - } - - /* Scheme supported? */ - for(i=0; supported_schemes[i] != NULL; i++) { - if(!strcmp(uri->scheme, supported_schemes[i])) break; - } - if(supported_schemes[i] == NULL) { - err_msg("Scheme '%s' is not supported.\n", uri->scheme); - rv = ERR_UNSUPPORTED_SCHEME; - goto finish; - } - - /* Port given? */ - if(uri->port == 0) - uri->port = def_port; - -finish: - free(host_id); - free(vol_id); - free(real_url); - return rv; -} - -int str_to_uri(char *str, ne_uri *uri, int def_port) -{ - return str_to_uri_ds(str, uri, def_port, NULL); -} - - -char * -extract_mrc(ne_uri *uri) -{ - char *rv = NULL; - char *oldPath = NULL; - - /* Exploit a trick to get MRC url. */ - - oldPath = uri->path; - uri->path = strdup("/"); - rv = ne_uri_unparse(uri); - free(uri->path); - uri->path = oldPath; - - return rv; -} - -char * -extract_volpath(ne_uri *uri) -{ - char *rv = NULL; - - if (!uri->path || !strcmp(uri->path, "/")) - goto finish; - - if (uri->path[0] == '/') { - rv = strdup(&uri->path[1]); - } else { - rv = strdup(uri->path); - } - -finish: - return rv; -} - -char * -extract_volume(ne_uri *uri) -{ - char *rv = NULL; - char *volpath_str; - size_t len; - - volpath_str = extract_volpath(uri); - if(volpath_str == NULL) - goto finish; - - for(len=0; len 0) { - rv = strndup(&volpath_str[len], vplen - len); - } - free(volpath_str); - -finish: - return rv; -} - -char *extract_pseudo_uuid(char *name) -{ - char *rv = NULL; - char *s = NULL; - char *e = NULL; - int len; - int i; - - s = name; - e = &name[strlen(name)-1]; - len = strlen(name); - - /* Check if we have a scheme in 'name' */ - for (i=0; supported_schemes[i] != NULL; i++) { - if (strstr(name, supported_schemes[i])) - break; - } - - /* Eventually remove the scheme */ - if (supported_schemes[i]) { - s = &name[strlen(supported_schemes[i]) + 3]; - len -= (strlen(supported_schemes[i]) + 3); - } - - /* And check for a trailing '/' */ - if (name[strlen(name)-1] == '/') - len--; - - rv = (char *)malloc(sizeof(char) * (len + 1)); - memcpy((void *)rv, (void *)s, len); - rv[len] = '\0'; - - return rv; -} - -/** - * Create a full XtreemFS name out of a path - * - * This functions simply appends the volume name to 'path'. - */ -char * -create_fullname(const char *volname, const char *path) -{ - char *rv = NULL; - - rv = (char *)malloc(sizeof(char) * (strlen(volname) + strlen(path) + 1)); - if(rv != NULL) { - strcpy(rv, volname); - rv = strcat(rv, path); - } - - return rv; -} - -/** - * Create a URL out of / - * - * This function takes a uuid and a volume name and creates - * a proper URL out of it. It uses the specified directory - * service as a translation aid. - */ -char *create_vol_url(struct dirservice *ds, char *vol_path) -{ - char *rv = NULL; - - return rv; -} - -/** - * Find out the current base dir. - * - * This is used to determine for instance module directories - * relative to this base dir. - */ -char *current_basedir() -{ - char *rv = NULL; - pid_t pid; - char exe_name[1024]; - char buf[1024] = "...uninitialized..."; - char *p = NULL; - - pid = getpid(); - snprintf(exe_name, 1024, "/proc/%d/exe", pid); - if (readlink(exe_name, buf, 1024) == -1) { - goto out; - } - if (p = strrchr(buf, '/')) { - *p = '\0'; - rv = strdup(buf); - } - -out: - return rv; -} - -/** Create or retrieve a UUID for this host - */ -char * -host_uuid() -{ - char *rv = NULL; - char hostname[1024]; -#if 0 - char buf[512]; - struct hostent hent, *hent_res=NULL; - struct addrinfo *ainfo, ahint, *ai; - int err; -#endif - SHA_CTX ctx; - unsigned char sha1sum[SHA_DIGEST_LENGTH]; - - if (gethostname(hostname, 1024)) - goto out; - - SHA1_Init(&ctx); - SHA1_Update(&ctx, (const void *)hostname, strlen(hostname)); - SHA1_Final(sha1sum, &ctx); - - rv = sha1_digest_to_str(sha1sum); - -#if 0 - gethostent_r(&hent, buf, 512, &hent_res, &err); - - memset((void *)&ahint, 0, sizeof(ahint)); - ahint.ai_family = AF_UNSPEC; - ahint.ai_socktype = SOCK_STREAM; - - if (getaddrinfo(hostname, NULL, &ahint, &ainfo)) { - err_msg("Cannot get addrinfo.\n"); - goto out; - } - for (ai=ainfo; - ai != NULL && ai->ai_socktype != SOCK_STREAM; - ai = ai->ai_next); - switch(ai->ai_family) { - case AF_INET: { - struct sockaddr_in *si = - (struct sockaddr_in *)ai->ai_addr; - } - break; - case AF_INET6: { - struct sockaddr_in6 *si = - (struct sockaddr_in6 *)ai->ai_addr; - } - break; - default: - break; - } - freeaddrinfo(ainfo); -#endif - -out: - return rv; -} - -/** - * Convert SHA1 digest to hex string. - */ -char *sha1_digest_to_str(unsigned char *digest) -{ - char *rv = NULL; - static char hex_array[] = { - '0', '1', '2', '3', '4', '5', '6', '7', - '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' - }; - int i, j, len; - - len = sizeof(char) * (2 * SHA_DIGEST_LENGTH + 3); - rv = (char *)malloc(len); - if (!rv) - goto out; - - for(i=0, j=0; i> 4]; - rv[j+1] = hex_array[(digest[i] & 0x0f)]; - } - rv[j] = '\0'; - -out: - return rv; -} - - -/** - * Print (ASCII) buffer - */ -int -print_neon_buffer(ne_buffer *buf) -{ - int err = 0; - int len = buf->used; - char *bytes = (char *)buf->data; - char line_buf[1024]; - int lp, bp; - - bp = 0; - lp = 0; - while (bp < len) { - if (bytes[bp] != '\n' && bytes[bp] != '\0' && lp < 1024) { - line_buf[lp] = bytes[bp]; - lp++; - } else { - line_buf[lp] = '\0'; - dbg_msg("%s\n", line_buf); - lp = 0; - } - bp++; - } - return err; -} diff --git a/client/src/xtreemfs_utils.h b/client/src/xtreemfs_utils.h deleted file mode 100644 index 5102c1cc4..000000000 --- a/client/src/xtreemfs_utils.h +++ /dev/null @@ -1,70 +0,0 @@ -/* Copyright (c) 2007, 2008 Matthias Hess, Erich Focht - This file is part of XtreemFS. - - XtreemFS is part of XtreemOS, a Linux-based Grid Operating - System, see for more details. The - XtreemOS project has been developed with the financial support - of the European Commission's IST program under contract - #FP6-033576. - - XtreemFS 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. - - XtreemFS 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 XtreemFS. If not, see . - */ - - -/* - C Interface: xtreemfs_utils - - Description: - - - Author: Matthias Hess , (C) 2007 - - Copyright: See COPYING file that comes with this distribution - -*/ - -#ifndef __XTRFS_UTILS_H__ -#define __XTRFS_UTILS_H__ - -#include - -#include -#include - -extern char *supported_schemes[]; - -extern int str_to_uri(char *str, ne_uri *uri, int def_port); -extern int str_to_uri_ds(char *str, ne_uri *uri, int def_port, struct dirservice *ds); - -extern char *extract_hostid(char *path); -extern char *extract_volumeid(char *path); - -extern char *extract_mrc(ne_uri *uri); -extern char *extract_volpath(ne_uri *uri); -extern char *extract_volume(ne_uri *uri); -extern char *extract_path(ne_uri *uri); -extern char *extract_pseudo_uuid(char *name); - -extern char *create_fullname(const char *volname, const char *path); - -extern char *create_vol_url(struct dirservice *ds, char *vol_path); -extern char *resolve_uuid(struct dirservice *ds, char *uuid); - -extern char *current_basedir(); - -extern char *sha1_digest_to_str(unsigned char *digest); - -extern int print_neon_buffer(ne_buffer *buf); - -#endif diff --git a/client/tests/Makefile b/client/tests/Makefile deleted file mode 100644 index 5858da541..000000000 --- a/client/tests/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -SUBDIRS = client-ng - -all clean distclean: - @for i in $(SUBDIRS); do \ - $(MAKE) -C $$i $@ || exit 1; \ - done - - diff --git a/client/tests/acl/Makefile b/client/tests/acl/Makefile deleted file mode 100644 index ea8c8aa8c..000000000 --- a/client/tests/acl/Makefile +++ /dev/null @@ -1,29 +0,0 @@ --include $(TOPDIR)/make.config - -TGT = acl_test - -CC_INCS = $(CURRENT_CC_INCS) $(JSON_CC_INCS) -CC_COMMON_OBJS = acl.o logger.o -CC_LOCAL_OBJS = main.o -CC_OBJS = $(CC_LOCAL_OBJS) $(CC_COMMON_OBJS) -CC_LIBS = $(JSON_CC_STATIC_LIBS) -lpthread - -all: $(TGT) - -$(TGT): $(CC_OBJS) - $(CC_LD) $(CC_LDFLAGS) -o $(TGT) $^ $(CC_LIBS) - -.SECONDEXPANSION: -$(CC_COMMON_OBJS): $$(patsubst %.o,../../src/%.c,$$@) - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -clean: - $(RM) $(CC_OBJS) - -distclean: clean - $(RM) $(TGT) - $(RM) *~ - diff --git a/client/tests/acl/main.c b/client/tests/acl/main.c deleted file mode 100644 index 33c11a97f..000000000 --- a/client/tests/acl/main.c +++ /dev/null @@ -1,60 +0,0 @@ -/* -* C Implementation: main -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include -#include -#include -#include -#include - -#include - -#include "acl.h" -#include "logger.h" - -int -main(int argc, char **argv) -{ - /* struct acl_entry *ae; */ - struct acl_list al; - int fd; - struct stat statbuf; - char *filename = "/tmp/test.dat"; - struct json_object *jo; - - acl_list_init(&al); - - fd = open(filename, O_CREAT, S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH); - if (fd < 0) { - fprintf(stderr, "Cannot create temporary file '%s'", filename); - exit(1); - } - close(fd); - stat(filename, &statbuf); - - mode_to_acl_list(statbuf.st_mode, &al); - acl_list_print(&al); - - jo = acl_list_to_json(&al); - if(jo) { - printf("JSON string: '%s'\n", json_object_to_json_string(jo)); - json_object_put(jo); - } - - acl_list_clean(&al); - - unlink(filename); - - return 0; -} diff --git a/client/tests/bench_timer/Makefile b/client/tests/bench_timer/Makefile deleted file mode 100644 index edf4750a7..000000000 --- a/client/tests/bench_timer/Makefile +++ /dev/null @@ -1,31 +0,0 @@ --include $(TOPDIR)/make.config - -TGT = timer_test - -CC_INCS = $(CURRENT_CC_INCS) -CC_COMMON_OBJS = bench_timer.o -CC_LOCAL_OBJS = main.o -CC_OBJS = $(CC_LOCAL_OBJS) $(CC_COMMON_OBJS) -CC_LIBS = -lpthread - -CC_FLAGS += -DTIMINGS - -all: $(TGT) - -$(TGT): $(CC_OBJS) - $(CC_LD) $(CC_LDFLAGS) -o $(TGT) $^ $(CC_LIBS) - -.SECONDEXPANSION: -$(CC_COMMON_OBJS): $$(patsubst %.o,../../src/%.c,$$@) - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -clean: - $(RM) $(CC_OBJS) - -distclean: clean - $(RM) $(TGT) - $(RM) *~ - diff --git a/client/tests/bench_timer/main.c b/client/tests/bench_timer/main.c deleted file mode 100644 index 24dd6a512..000000000 --- a/client/tests/bench_timer/main.c +++ /dev/null @@ -1,37 +0,0 @@ -/* -* C Implementation: main -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include - -#include "bench_timer.h" - - -int -main(int argc, char **argv) -{ - struct bench_timer test_timer; - int to_sleep = 20; - - bench_timer_init(&test_timer); - - printf("Precision: %g ms\n", test_timer.precision); - - bench_timer_start(&test_timer); - while((to_sleep = sleep(to_sleep)) > 0); - bench_timer_stop(&test_timer); - - printf("Waited %g s\n", bench_timer_s(&test_timer)); - - return 0; -} diff --git a/client/tests/client-ng/Makefile b/client/tests/client-ng/Makefile deleted file mode 100644 index 1888951a7..000000000 --- a/client/tests/client-ng/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -SUBDIRS = simple multi-stage - -all clean distclean: - @for i in $(SUBDIRS); do \ - $(MAKE) -C $$i $@ || exit 1; \ - done - - diff --git a/client/tests/client-ng/multi-stage/Makefile b/client/tests/client-ng/multi-stage/Makefile deleted file mode 100644 index e80ba1ef7..000000000 --- a/client/tests/client-ng/multi-stage/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -TOPDIR ?= ../../.. --include $(TOPDIR)/make.config - -TGT = wqtest - -CC_INCS += $(JSON_CC_INCS) $(NEON_CC_INCS) $(CURRENT_CC_INCS) -CC_COMMON_OBJS = workqueue.o request.o logger.o -CC_LOCAL_OBJS = main.o stage1.o stage2.o -CC_OBJS = $(CC_LOCAL_OBJS) $(CC_COMMON_OBJS) -CC_STATIC_LIBS += $(JSON_CC_STATIC_LIBS) $(NEON_CC_STATIC_LIBS) -CC_LIBS += $(JSON_CC_PARTSH_LIBS) $(NEON_CC_PARTSH_LIBS) - -CC_FLAGS += -D_FILE_OFFSET_BITS=64 -g -O0 -CC_LDFLAGS += -g -O0 - -all: - -$(TGT): $(CC_OBJS) - $(call PARTST_LD,$@,$^,$(CC_STATIC_LIBS),$(CC_LIBS)) - -.SECONDEXPANSION: -$(CC_COMMON_OBJS): $$(patsubst %.o,../../../src/%.c,$$@) - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -clean: - $(RM) $(CC_OBJS) - -distclean: clean - $(RM) $(TGT) - $(RM) *~ - diff --git a/client/tests/client-ng/multi-stage/main.c b/client/tests/client-ng/multi-stage/main.c deleted file mode 100644 index d94248895..000000000 --- a/client/tests/client-ng/multi-stage/main.c +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Test program for multiple stages. - * - * This program calculates the sum of an array of double values using - * two stages. The second stage has several threads s.t. the calculation - * can proceed concurrently. - * - * This program is used to mimic some properties of reading from a file. - * The value array is split into different chunks that correspond to - * file objects. For each chunk (fobj) the sum is caclulated in a - * different thread, mimicing the read access to a file. The sum of - * each chunk corresponds to the return value of file read operation - * (for instance for prematurely getting an EOF). - */ - -#include -#include - -#include "stage1.h" -#include "stage2.h" -#include "workqueue.h" -#include "logger.h" - -#define NUM_DATA 1024 -#define NUM_REQS 32 - -int -main(int argc, char **argv) -{ - double *data; - double sum = 0.0; - int i; - - /*** Initialization part. The logger and the workqueues are setup ***/ - - log_init(&logit, stdout_log, LOGLEV_DEBUG, NULL); - logit.func_align = 28; - - /* For now we ignore the work queue type */ - workqueue_init(&stage1, "stage1", 0, stage1_funcs, 1); - workqueue_init(&stage2, "stage2", 0, stage2_funcs, 8); - - /*** Prepare the compute data ***/ - - data = (double *)malloc(sizeof(double) * NUM_DATA); - if (!data) - goto out; - for (i=0; i -#include -#include - -#include "workqueue.h" -#include "stage1.h" -#include "stage2.h" - -/** - * Function table for stage 1 - * This table has only two entries. The end of the table is - * indicated by a NULL pointer. - */ -wq_func_t stage1_funcs[] = { - FUNC_TABLE_ENTRY (STAGE1_STEP1, stage1_step1), - FUNC_TABLE_ENTRY (STAGE1_FINISH, stage1_finish), - NULL -}; - -struct work_queue stage1; - - -/** - * Allocate and init data structure for step1 of stage1 - */ -static struct stage1_step1_data * -stage1_step1_data_new(double *values, int num_values, int num_reqs) -{ - struct stage1_step1_data *rv = NULL; - - rv = (struct stage1_step1_data *)malloc(sizeof(struct stage1_step1_data)); - if (rv) { - rv->num_values = num_values; - rv->values = values; - rv->num_reqs = num_reqs; - } - - return rv; -} - - -/** - * Work to be done for stage 1, step 1 - * - * This basically creates a number of sub-requests for stage2 that - * calculate the sum of the values passed in the data section of - * the request. - * In order to store the intermediate results an array with result - * data is allocated. - */ -void stage1_step1(struct req *req) -{ - struct stage1_step1_data *data = (struct stage1_step1_data *)req->data; - double *result = (double *)req->result; - int num_reqs = data->num_reqs; - int chunk_size; - int off; - double *sub_res; - int *sub_which; - struct req *sub_req = NULL; - - int i; - - dbg_msg("Num values: %d Num reqs: %d\n", - data->num_values, data->num_reqs); - - chunk_size = (data->num_values + num_reqs - 1) / num_reqs; - - dbg_msg("Doing stage1 / step1 with %d reqs and chunk size %d\n", - num_reqs, chunk_size); - - sub_res = (double *)malloc(sizeof(double) * num_reqs); - memset((void *)sub_res, 0, sizeof(double) * num_reqs); - - sub_which = (int *)malloc(sizeof(int) * num_reqs); - memset((void *)sub_which, 0, sizeof(int) * num_reqs); - - off = 0; - for (i=0; ivalues[off], chunk_size, i, - &sub_res[i], &sub_which[i], - req); - submit_request(&stage2, sub_req); - off += chunk_size; - } - - /* The last chunk might be smaller than the full chunk size */ - if (off + chunk_size >= data->num_values) - chunk_size = data->num_values - off; - dbg_msg("Create sub request with %d %d\n", chunk_size, off); - sub_req = stage2_work_req(&data->values[off], chunk_size, i, - &sub_res[i], &sub_which[i], - req); - submit_request(&stage2, sub_req); -} - -/** - * Create a request for step1 of stage1 - * - * A data structure for the request will be allocated in the following - * format: - * values double array of values - * num_values int indicating the number of values - * num_reqs int Number of sub request to generate - * The result will be stored in the location indicated by 'res' - */ -struct req *stage1_step1_req(double *values, int num_values, int num_reqs, double *res) -{ - struct req *req = NULL; - struct stage1_step1_data *data = NULL; - - data = stage1_step1_data_new(values, num_values, num_reqs); - - req = req_create(STAGE1_STEP1, (void *)data, (void *)res, NULL); - - return req; -} - -/** - * Executed when stage2 has finished its work. - */ -void stage1_finish(struct req *req) -{ - /* We will get the result of a sub calculation as our data */ - struct stage2_step1_resp *data = (struct stage2_step1_resp *)req->data; - double *pres = NULL; - double *loc_res = NULL; /*!< Pointer to beginning of array. */ - int *loc_chunk = NULL; - - struct req *parent = req->parent; - - /* We need a parent request, otherwise calculations do not make sense */ - if (!parent) - goto out; - - pres = (double *)parent->result; - /* dbg_msg("Parent result: %p\n", pres); */ - - /* Sum the partial results in the parent */ - *pres += *(data->res); - dbg_msg("Partial result: %g\n", *pres); - - dbg_msg("Number of children: %d\n", atomic_read(&parent->active_children)); - - atomic_dec(&parent->active_children); - if (atomic_read(&parent->active_children) != 0) { - dbg_msg("I am not the last child.\n"); - goto out; - } - - dbg_msg("Going to finish request.\n"); - - /* This section is only executed by the last child */ - finish_request(parent); - - if (req->del_data) - req->del_data(req->data); - -out: - return; -} - - -/** - * Calculate the sum of an array of doubles - * - * This function is used to hide the complexities of - * stages from the user. The user may simply call - * 'stage1_work' in order to obtain the result. - */ -double stage1_work(double *values, int num_values, int num_reqs) -{ - double rv = 0.0; - struct req *req = NULL; - - dbg_msg("Result pointer: %p\n", &rv); - - req = stage1_step1_req(values, num_values, num_reqs, &rv); - - execute_req(&stage1, req); - - return rv; -} diff --git a/client/tests/client-ng/multi-stage/stage1.h b/client/tests/client-ng/multi-stage/stage1.h deleted file mode 100644 index 58ff7bf5b..000000000 --- a/client/tests/client-ng/multi-stage/stage1.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _STAGE1_H -#define _STAGE1_H - -#include "workqueue.h" - -#define STAGE1_WORK 0x0000 -#define STAGE1_STEP1 0x0000 -#define STAGE1_FINISH 0x0001 - -struct stage1_step1_data { - int num_values; - double *values; - int num_reqs; -}; - -struct stage1_step1_resp { - int num_reqs; - double *sums; -}; - -extern struct work_queue stage1; -extern wq_func_t stage1_funcs[]; - -extern void stage1_step1(struct req *req); -extern void stage1_step2(struct req *req); -extern void stage1_finish(struct req *req); - -extern double stage1_work(double *values, int num_values, int num_reqs); - -#endif diff --git a/client/tests/client-ng/multi-stage/stage2.c b/client/tests/client-ng/multi-stage/stage2.c deleted file mode 100644 index 51bdb5cca..000000000 --- a/client/tests/client-ng/multi-stage/stage2.c +++ /dev/null @@ -1,149 +0,0 @@ -#include -#include - -#include "stage2.h" -#include "stage1.h" - -wq_func_t stage2_funcs[] = { - FUNC_TABLE_ENTRY(STAGE2_STEP1, stage2_step1), - NULL -}; - -struct work_queue stage2; - - -/** - * Allocate and init new data structure for step1 - */ -struct stage2_step1_data * -stage2_step1_data_new(double *values, int num_values, int chunk) -{ - struct stage2_step1_data *rv = NULL; - - rv = (struct stage2_step1_data *)malloc(sizeof(struct stage2_step1_data)); - if (rv) { - rv->num_values = num_values; - rv->values = values; - rv->chunk = chunk; - } - - return rv; -} - -/** - * Destroy the outer data structure for data in step1 - * - * The values are allocated outside this function so they must - * not be freed. - */ -static void stage2_step1_data_del(void *data) -{ - free(data); -} - -/** - * Allocate and init response structure - * - * @param which Pointer where to store req number - * @param res Pointer where to store local result - */ -struct stage2_step1_resp * -stage2_step1_resp_new(double *res, int *which) -{ - struct stage2_step1_resp *rv = NULL; - - rv = (struct stage2_step1_resp *)malloc(sizeof(struct stage2_step1_resp)); - if (rv) { - rv->res = res; - rv->which = which; - } - - return rv; -} - -/** - * Destroy a response structure for step1 - * - */ -void stage2_step1_resp_del(void *resp) -{ - free(resp); -} - - -/** - * Handle a request in step1 of stage2 - * - * @param req Request for step1 of stage2 - */ -void stage2_step1(struct req *req) -{ - struct stage2_step1_data *data = (struct stage2_step1_data *)req->data; - struct stage2_step1_resp *resp = (struct stage2_step1_resp *)req->result; - int i; - double *res = resp->res; - int *which = resp->which; - - - /*** Work part of the request ***/ - - dbg_msg("Calculating sum with %d values\n", data->num_values); - - /* Calculate sum of given values */ - *res = 0.0; - for (i=0; inum_values; i++) - (*res) += data->values[i]; - dbg_msg("Intermediate result: %g\n", *res); - *which = data->chunk; - - - /* Create an answer request. As there is one answer request - per work request and we do not need the work request any - longer, we can simply change the type of request instead - of creating a new request. */ - - /* We may now erase the outer data structure of the initial - work request. */ - if (req->del_data) - req->del_data(req->data); - - /* As an answer we will change the type of the current - request and re-queue it into stage1. This requests is - finished anyway and this procedures saves an additional - request allocation */ - INIT_LIST_HEAD(&req->q); - req->type = STAGE1_FINISH; - req->data = req->result; - req->result = NULL; - req->del_data = stage2_step1_resp_del; - req->del_result = NULL; - - dbg_msg("Queueing answer request.\n"); - submit_request(&stage1, req); - - /* If we had not have reused the request it should have - been destroyed here... */ -} - - -/** - * Create a request representing work associated with stage2 - */ -struct req *stage2_work_req(double *values, int num_values, int chunk, - double *res, int *which, - struct req *parent) -{ - struct req *rv = NULL; - struct stage2_step1_data *data = NULL; - struct stage2_step1_resp *resp = NULL; - - dbg_msg("Num values: %d Chunk: %d\n", - num_values, chunk); - - data = stage2_step1_data_new(values, num_values, chunk); - resp = stage2_step1_resp_new(res, which); - - rv = req_create(STAGE2_STEP1, (void *)data, (void *)resp, parent); - - return rv; -} diff --git a/client/tests/client-ng/multi-stage/stage2.h b/client/tests/client-ng/multi-stage/stage2.h deleted file mode 100644 index 90aa8dcde..000000000 --- a/client/tests/client-ng/multi-stage/stage2.h +++ /dev/null @@ -1,30 +0,0 @@ -#ifndef _STAGE2_H -#define _STAGE2_H - -#include "workqueue.h" - -#define STAGE2_WORK 0x0000 -#define STAGE2_STEP1 0x0000 -#define STAGE2_STEP2 0x0001 - -struct stage2_step1_data { - int num_values; - double *values; - int chunk; -}; - -struct stage2_step1_resp { - int *which; - double *res; -}; - -extern struct work_queue stage2; -extern wq_func_t stage2_funcs[]; - -extern void stage2_step1(struct req *req); - -extern struct req *stage2_work_req(double *values, int num_values, int chunk, - double *res, int *which, - struct req *parent); - -#endif diff --git a/client/tests/client-ng/simple/Makefile b/client/tests/client-ng/simple/Makefile deleted file mode 100644 index 2a40ea070..000000000 --- a/client/tests/client-ng/simple/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -TOPDIR ?= ../../.. --include $(TOPDIR)/make.config - -TGT = wqtest - -CC_INCS += $(JSON_CC_INCS) $(NEON_CC_INCS) $(CURRENT_CC_INCS) -CC_COMMON_OBJS = workqueue.o request.o logger.o -CC_LOCAL_OBJS = main.o work.o -CC_OBJS = $(CC_LOCAL_OBJS) $(CC_COMMON_OBJS) -CC_STATIC_LIBS += $(JSON_CC_STATIC_LIBS) $(NEON_CC_STATIC_LIBS) -CC_LIBS += $(JSON_CC_PARTSH_LIBS) $(NEON_CC_PARTSH_LIBS) - -CC_FLAGS += -D_FILE_OFFSET_BITS=64 -g -O0 -CC_LDFLAGS += -g -O0 - -all: $(TGT) - -$(TGT): $(CC_OBJS) - $(call PARTST_LD,$@,$^,$(CC_STATIC_LIBS),$(CC_LIBS)) - -.SECONDEXPANSION: -$(CC_COMMON_OBJS): $$(patsubst %.o,../../../src/%.c,$$@) - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -clean: - $(RM) $(CC_OBJS) - -distclean: clean - $(RM) $(TGT) - $(RM) *~ - diff --git a/client/tests/client-ng/simple/main.c b/client/tests/client-ng/simple/main.c deleted file mode 100644 index 4755a1aff..000000000 --- a/client/tests/client-ng/simple/main.c +++ /dev/null @@ -1,33 +0,0 @@ -#include - -#include "work.h" -#include "workqueue.h" -#include "request.h" -#include "logger.h" - -struct work_queue stage; - -int -main(int argc, char **argv) -{ - int res; - int i; - - dbg_msg("Init queue for test stage.\n"); - workqueue_init(&stage, "test", 1); - workqueue_add_func(&stage, TEST_STEP1, step1); - workqueue_add_func(&stage, TEST_STEP2, step2); - - dbg_msg("Doing actual work.\n"); - for (i=0; i<10000; i++) { - res = do_work(i); - printf("Do work returned: %d\n", res); - } - - dbg_msg("Stopping queue for stage.\n"); - workqueue_stop(&stage); - workqueue_del_contents(&stage); - - return 0; -} - diff --git a/client/tests/client-ng/simple/work.c b/client/tests/client-ng/simple/work.c deleted file mode 100644 index 2c1cf2dcd..000000000 --- a/client/tests/client-ng/simple/work.c +++ /dev/null @@ -1,62 +0,0 @@ -#include "work.h" -#include "request.h" -#include "logger.h" - - -extern struct work_queue stage; - -void step1(struct req *req) -{ - int *a = (int *)req->data; - - dbg_msg("Stage1\n"); - - /* Increment data by 10 */ - (*a)++; - - /* And go to stage 2 */ - req->type = TEST_STEP2; - submit_request(&stage, req); -} - -void step2(struct req *req) -{ - int *a = (int *)req->data; - - dbg_msg("Stage2\n"); - - (*a) *=2 ; - - finish_request(req); -} - - -struct request *create_test_request(int *a, int *b) -{ - return req_create(TEST_STEP1, (void *)a, (void *)b, NULL); -} - -int do_work(int a) -{ - int rv = 0; - struct request *req; - - req = create_test_request(&a, &rv); - if (!req) { - dbg_msg("Cannot create new request.\n"); - rv = -1; - goto out; - } - - execute_req(&step1, req); - - /* Analyze results */ - info_msg("Work result: %d\n", a); - rv = a; - -out: - if (req) - req_del(req); - - return rv; -} diff --git a/client/tests/client-ng/simple/work.h b/client/tests/client-ng/simple/work.h deleted file mode 100644 index 579cceb9b..000000000 --- a/client/tests/client-ng/simple/work.h +++ /dev/null @@ -1,13 +0,0 @@ -#ifndef _WORK_H -#define _WORK_H - -#include "request.h" - -#define TEST_WORK 0x0000 -#define TEST_STEP1 0x0000 -#define TEST_STEP2 0x0001 - -extern void step1(struct req *req); -extern void step2(struct req *req); - -#endif diff --git a/client/tests/file/Makefile b/client/tests/file/Makefile deleted file mode 100644 index b85996d25..000000000 --- a/client/tests/file/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -SUBDIRS = inv - -all clean distclean: - @for i in $(SUBDIRS); do \ - $(MAKE) -C $$i $@ || exit 1; \ - done - - diff --git a/client/tests/file/cache/Makefile b/client/tests/file/cache/Makefile deleted file mode 100644 index c5687984f..000000000 --- a/client/tests/file/cache/Makefile +++ /dev/null @@ -1,33 +0,0 @@ -TOPDIR ?= ../../.. --include $(TOPDIR)/make.config - -TGT = file_inv_test - -CC_INCS += $(JSON_CC_INCS) $(NEON_CC_INCS) $(CURRENT_CC_INCS) -CC_COMMON_OBJS = file_inv.o file.o request.o stripingpolicy.o xloc.o xcap.o hashtable.o logger.o -CC_LOCAL_OBJS = main.o -CC_OBJS = $(CC_LOCAL_OBJS) $(CC_COMMON_OBJS) -CC_STATIC_LIBS += $(JSON_CC_STATIC_LIBS) $(NEON_CC_STATIC_LIBS) -CC_LIBS += $(JSON_CC_PARTSH_LIBS) $(NEON_CC_PARTSH_LIBS) - - - -all: $(TGT) - -$(TGT): $(CC_OBJS) - $(call PARTST_LD,$@,$^,$(CC_STATIC_LIBS),$(CC_LIBS)) - -.SECONDEXPANSION: -$(CC_COMMON_OBJS): $$(patsubst %.o,../../../src/%.c,$$@) - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -clean: - $(RM) $(CC_OBJS) - -distclean: clean - $(RM) $(TGT) - $(RM) *~ - diff --git a/client/tests/file/cache/main.c b/client/tests/file/cache/main.c deleted file mode 100644 index b2e705107..000000000 --- a/client/tests/file/cache/main.c +++ /dev/null @@ -1,63 +0,0 @@ -/* -* C Implementation: main -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include - -#include "file.h" -#include "file_inv.h" -#include "logger.h" - -#define NUM_FILES 1024 - - -int -main(int argc, char **argv) -{ - struct file_inv *fc; - struct hash_table_entry *hte; - struct fileid_struct *fs; - int i; - char filename[256]; - - fc = file_inv_new(); - - for(i=0; ipath = strdup(filename); - file_inv_add(fc, fs); - } - - for(i=0; ivalue; - fileid_struct_delete(fs); - free(hte->key); - list_del((struct list_head *)hte); - hash_table_entry_delete(&hte); - } - - - file_inv_destroy(fc); - - return 0; -} - diff --git a/client/tests/file/inv/Makefile b/client/tests/file/inv/Makefile deleted file mode 100644 index 7f0e0b470..000000000 --- a/client/tests/file/inv/Makefile +++ /dev/null @@ -1,36 +0,0 @@ -TOPDIR ?= ../../.. --include $(TOPDIR)/make.config - -TGT = file_inv_test - -CC_INCS += $(JSON_CC_INCS) $(NEON_CC_INCS) $(CURRENT_CC_INCS) -CC_COMMON_OBJS = file_inv.o file.o fileobj.o fobj_cache.o \ - request.o stripingpolicy.o xloc.o xcap_inv.o xcap.o \ - hashtable.o logger.o -CC_LOCAL_OBJS = main.o -CC_OBJS = $(CC_LOCAL_OBJS) $(CC_COMMON_OBJS) -CC_STATIC_LIBS += -L../../../src -lxtreemfs $(JSON_CC_STATIC_LIBS) $(NEON_CC_STATIC_LIBS) -CC_LIBS += $(JSON_CC_PARTSH_LIBS) $(NEON_CC_PARTSH_LIBS) - -CC_FLAGS += -D_FILE_OFFSET_BITS=64 - - -all: $(TGT) - -$(TGT): $(CC_OBJS) - $(call PARTST_LD,$@,$^,$(CC_STATIC_LIBS),$(CC_LIBS)) - -.SECONDEXPANSION: -$(CC_COMMON_OBJS): $$(patsubst %.o,../../../src/%.c,$$@) - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -clean: - $(RM) $(CC_OBJS) - -distclean: clean - $(RM) $(TGT) - $(RM) *~ - diff --git a/client/tests/file/inv/main.c b/client/tests/file/inv/main.c deleted file mode 100644 index 7307be3ff..000000000 --- a/client/tests/file/inv/main.c +++ /dev/null @@ -1,21 +0,0 @@ -/* -* C Implementation: main -* -* Description: -* -* -* Author: Matthias Hess , (C) 2008 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include - -int -main(int argc, char **argv) -{ - - return 0; -} diff --git a/client/tests/hashtable/Makefile b/client/tests/hashtable/Makefile deleted file mode 100644 index ad91b5486..000000000 --- a/client/tests/hashtable/Makefile +++ /dev/null @@ -1,31 +0,0 @@ --include $(TOPDIR)/make.config - -TGT = hashtabletest - -CC_INCS = $(CURRENT_CC_INCS) -CC_COMMON_OBJS = hashtable.o -CC_LOCAL_OBJS = main.o -CC_OBJS = $(CC_LOCAL_OBJS) $(CC_COMMON_OBJS) -CC_LIBS = -lpthread - - - -all: $(TGT) - -$(TGT): $(CC_OBJS) - $(CC_LD) $(CC_LDFLAGS) -o $(TGT) $^ $(CC_LIBS) - -.SECONDEXPANSION: -$(CC_COMMON_OBJS): $$(patsubst %.o,../../src/%.c,$$@) - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -clean: - $(RM) $(CC_OBJS) - -distclean: clean - $(RM) $(TGT) - $(RM) *~ - diff --git a/client/tests/hashtable/main.c b/client/tests/hashtable/main.c deleted file mode 100644 index 3ac61126e..000000000 --- a/client/tests/hashtable/main.c +++ /dev/null @@ -1,109 +0,0 @@ -/* -* C Implementation: main -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include -#include - -#include - -#define MAX_STR_LEN 20 -#define NUM_CHARS (('z'-'a') + ('Z'-'A') + ('9'-'0') + 3) -#define NUM_RANDOM_STRINGS 1024 - -char chars[NUM_CHARS]; - - -hash_idx_t -hfunc(void *data) -{ - char *str = (char *)data; - hash_idx_t rv = 0; - int i; - - for(i=0; isize; i++) { - list_for_each(iter, &ht->entries[i]) { - entry = (struct hash_table_entry *)iter; - printf("%s -> %d\n", (char *)entry->key, (int)entry->value); - } - } -} - -int -main(int argc, char **argv) -{ - struct hash_table *ht; - int i, p; - char *new_str; - - for(i=0, p=0; i<=('z'-'a'); i++, p++) chars[p] = 'a' + (char)i; - for(i=0; i<=('Z'-'A'); i++, p++) chars[p] = 'A' + (char)i; - for(i=0; i<=('9'-'0'); i++, p++) chars[p] = '0' + (char)i; - - printf("Number of characters: %d, %d\n", NUM_CHARS, (int)('9'-'0')); - - ht = hash_table_new(20, hfunc, hcmp); - - for(i=0; i, (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include - -#include - -#include - - -int -main(int argc, char **argv) -{ - struct striping_policy sp, *reconstructed; - struct json_object *jo; - - striping_policy_init(&sp); - sp.id = SPOL_RAID_5; - sp.stripe_size = 16384; - sp.width = 6; - - printf("Original striping policy:\n"); - striping_policy_print(&sp); - - jo = striping_policy_to_json(&sp); - printf("JSON string: %s\n", json_object_to_json_string(jo)); - - reconstructed = json_to_striping_policy(jo); - if(reconstructed != NULL) { - striping_policy_print(reconstructed); - free(reconstructed); - } - - json_object_put(jo); - - return 0; -} diff --git a/client/tests/json/xlocs/Makefile b/client/tests/json/xlocs/Makefile deleted file mode 100644 index 395c71aee..000000000 --- a/client/tests/json/xlocs/Makefile +++ /dev/null @@ -1,32 +0,0 @@ --include $(TOPDIR)/make.config - -TGT = xlocs_test - -CC_INCS += $(JSON_CC_INCS) $(NEON_CC_INCS) $(CURRENT_CC_INCS) -CC_COMMON_OBJS = stripingpolicy.o xloc.o logger.o -CC_LOCAL_OBJS = main.o -CC_OBJS = $(CC_LOCAL_OBJS) $(CC_COMMON_OBJS) -CC_STATIC_LIBS += $(JSON_CC_STATIC_LIBS) $(NEON_CC_STATIC_LIBS) -CC_LIBS += $(NEON_CC_PARTSH_LIBS) -lpthread - - - -all: $(TGT) - -$(TGT): $(CC_OBJS) - $(call PARTST_LD,$@,$^,$(CC_STATIC_LIBS),$(CC_LIBS)) - -.SECONDEXPANSION: -$(CC_COMMON_OBJS): $$(patsubst %.o,../../../src/%.c,$$@) - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -clean: - $(RM) $(CC_OBJS) - -distclean: clean - $(RM) $(TGT) - $(RM) *~ - diff --git a/client/tests/json/xlocs/main.c b/client/tests/json/xlocs/main.c deleted file mode 100644 index f17ada172..000000000 --- a/client/tests/json/xlocs/main.c +++ /dev/null @@ -1,56 +0,0 @@ -#include -#include -#include - -#include - -#include -#include -#include - -#include "list.h" - - -int -main(int argc, char **argv) -{ - struct list_head xlocs_list, *iter; - struct xlocs *xl; - struct json_object *jo = NULL; - int err_code; - - struct list_head xlocations; - char *xlocs_strs[] = { - "[ [ { \"policy\": \"RAID0\", \"stripe-size\": 4, \"width\": 1 }, [ \"localhost\" ] ], [ { \"policy\": \"RAID5\", \"stripe-size\": 4, \"width\": 5 }, [ \"host1\", \"host2\", \"host3\", \"host4\", \"host5\" ] ] ]" - }; - - jo = json_tokener_parse(xlocs_strs[0]); - if(jo == NULL) { - fprintf(stderr, "Cannot parse string '%s'\n", xlocs_strs[0]); - exit(1); - } - - INIT_LIST_HEAD(&xlocs_list); - - if((err_code = json_to_xlocs_list(jo, &xlocs_list)) != 0) { - fprintf(stderr, "Cannot convert JSON object to xlocation list. Error code %d\n", err_code); - } - - if(!list_empty(&xlocs_list)) { - list_for_each(iter, &xlocs_list) { - striping_policy_print(((struct xlocs *)iter)->sp); - printf("\n"); - } - } - - iter = xlocs_list.next; - while(iter != &xlocs_list) { - list_del(iter); - xlocs_delete((struct xlocs *)iter); - iter = xlocs_list.next; - } - - json_object_put(jo); - - return 0; -} diff --git a/client/tests/logger/Makefile b/client/tests/logger/Makefile deleted file mode 100644 index a8acae2b4..000000000 --- a/client/tests/logger/Makefile +++ /dev/null @@ -1,31 +0,0 @@ --include $(TOPDIR)/make.config - -TGT = logger_test - -CC_INCS = $(CURRENT_CC_INCS) -CC_COMMON_OBJS = logger.o -CC_LOCAL_OBJS = main.o -CC_OBJS = $(CC_LOCAL_OBJS) $(CC_COMMON_OBJS) -CC_LIBS = -lpthread - - - -all: $(TGT) - -$(TGT): $(CC_OBJS) - $(CC_LD) $(CC_LDFLAGS) -o $(TGT) $^ $(CC_LIBS) - -.SECONDEXPANSION: -$(CC_COMMON_OBJS): $$(patsubst %.o,../../src/%.c,$$@) - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -clean: - $(RM) $(CC_OBJS) - -distclean: clean - $(RM) $(TGT) - $(RM) *~ - diff --git a/client/tests/logger/main.c b/client/tests/logger/main.c deleted file mode 100644 index 92e41363f..000000000 --- a/client/tests/logger/main.c +++ /dev/null @@ -1,19 +0,0 @@ -#include -#include -#include - -#include "logger.h" - - -int -main(int argc, char **argv) -{ - // log_init(&logit, syslog_log, LOGLEV_DEBUG); - - dbg_msg("Doing info!\n"); - trace_msg("Here I am %s.\nAnd there we go!\n", "hallo"); - - log_end(&logit); - - return 0; -} diff --git a/client/tests/mrc/Makefile b/client/tests/mrc/Makefile deleted file mode 100644 index 61976f8a3..000000000 --- a/client/tests/mrc/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -SUBDIRS = channel proxy - -all clean distclean: - @for i in $(SUBDIRS); do \ - $(MAKE) -C $$i $@ || exit 1; \ - done - - diff --git a/client/tests/mrc/channel/Makefile b/client/tests/mrc/channel/Makefile deleted file mode 100644 index 9b0abd9c4..000000000 --- a/client/tests/mrc/channel/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -TOPDIR ?= ../../.. --include $(TOPDIR)/make.config - -TGT = channeltest - -CC_INCS += $(JSON_CC_INCS) $(NEON_CC_INCS) $(CURRENT_CC_INCS) -CC_COMMON_OBJS = mrc_channel.o mrc_request.o stripingpolicy.o statinfo.o xloc.o xcap.o request.o logger.o -CC_LOCAL_OBJS = main.o -CC_OBJS = $(CC_LOCAL_OBJS) $(CC_COMMON_OBJS) -CC_STATIC_LIBS += $(JSON_CC_STATIC_LIBS) $(NEON_CC_STATIC_LIBS) -CC_LIBS += $(NEON_CC_PARTSH_LIBS) - - - -all: $(TGT) - -$(TGT): $(CC_OBJS) - $(call PARTST_LD,$@,$^,$(CC_STATIC_LIBS),$(CC_LIBS)) - - -.SECONDEXPANSION: -$(CC_COMMON_OBJS): $$(patsubst %.o,../../../src/%.c,$$@) - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -clean: - $(RM) $(CC_OBJS) - -distclean: clean - $(RM) $(TGT) - $(RM) *~ - diff --git a/client/tests/mrc/channel/main.c b/client/tests/mrc/channel/main.c deleted file mode 100644 index 864acf5d8..000000000 --- a/client/tests/mrc/channel/main.c +++ /dev/null @@ -1,47 +0,0 @@ -#include -#include - -#include - - -void * -finish_callback(void *arg) -{ - - return NULL; -} - - -int -main(int argc, char **argv) -{ - struct MRC_Channel *mrc_channel; - struct MRC_Request *mrc_req; - - mrc_channel = MRC_Channel_new("http://localhost:32636"); - if(mrc_channel == NULL) { - fprintf(stderr, "Cannot open channel to MRC '%s'\n", "localhost"); - exit(1); - } - - mrc_req = MRC_Request_new(); - if(mrc_req == NULL) { - MRC_Channel_delete(&mrc_channel); - fprintf(stderr, "Cannot create new MRC request.\n"); - exit(1); - } - mrc_req->finish_cb = finish_callback; - - MRC_Request__createVolume(mrc_req, "TEST", 0, NULL, 0, 0, NULL); - MRC_Channel_exec_req(mrc_channel, mrc_req); - - MRC_Request__open(mrc_req, "/TEST/test", "w"); - MRC_Channel_exec_req(mrc_channel, mrc_req); - - - MRC_Request_delete(mrc_req); - mrc_req = NULL; - MRC_Channel_delete(&mrc_channel); - - return 0; -} diff --git a/client/tests/mrc/proxy/Makefile b/client/tests/mrc/proxy/Makefile deleted file mode 100644 index fa2c9136b..000000000 --- a/client/tests/mrc/proxy/Makefile +++ /dev/null @@ -1,34 +0,0 @@ -TOPDIR ?= ../../.. --include $(TOPDIR)/make.config - -TGT = proxytest - -CC_INCS += $(JSON_CC_INCS) $(NEON_CC_INCS) $(CURRENT_CC_INCS) -CC_COMMON_OBJS = mrc_proxy.o mrc_proxy_intern.o mrc_channel.o mrc_request.o mrc_req_queue.o\ - stripingpolicy.o statinfo.o xloc.o xcap.o thread_pool.o logger.o -CC_LOCAL_OBJS = main.o -CC_OBJS = $(CC_LOCAL_OBJS) $(CC_COMMON_OBJS) -CC_STATIC_LIBS += $(JSON_CC_STATIC_LIBS) $(NEON_CC_STATIC_LIBS) -CC_LIBS += $(NEON_CC_PARTSH_LIBS) - - - -all: $(TGT) - -$(TGT): $(CC_OBJS) - $(call PARTST_LD,$@,$^,$(CC_STATIC_LIBS),$(CC_LIBS)) - -.SECONDEXPANSION: -$(CC_COMMON_OBJS): $$(patsubst %.o,../../../src/%.c,$$@) - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -clean: - $(RM) $(CC_OBJS) - -distclean: clean - $(RM) $(TGT) - $(RM) *~ - diff --git a/client/tests/mrc/proxy/main.c b/client/tests/mrc/proxy/main.c deleted file mode 100644 index f56a2fd7f..000000000 --- a/client/tests/mrc/proxy/main.c +++ /dev/null @@ -1,93 +0,0 @@ -#include -#include -#include - -#include -#include -#include -#include - -pthread_attr_t *xpattr; - -int -main(int argc, char **argv) -{ - struct MRC_Proxy *mrc_proxy; - struct MRC_Request *mrc_req; - struct MRC_Req_readDir_resp readdir_resp; - - struct striping_policy *defPolicy; - struct xtreemfs_statinfo si; - - mrc_req_handle_t req_handle; - - ne_sock_init(); - - mrc_proxy = MRC_Proxy_new("http://localhost:32636", 2); - if(mrc_proxy == NULL) { - fprintf(stderr, "Cannot create proxy for 'localhost'\n"); - exit(1); - } - MRC_Proxy_start(mrc_proxy); - sleep(2); - - defPolicy = striping_policy_new(); - defPolicy->id = SPOL_RAID_0; - defPolicy->stripe_size = 4096; - defPolicy->width = 1; - - mrc_req = MRC_Request_new(); - MRC_Request__initFileSystem(mrc_req); - req_handle = MRC_Proxy_add_and_wait(mrc_proxy, mrc_req); - MRC_Request_clear(mrc_req); - - MRC_Request_init(mrc_req); - MRC_Request__createVolume(mrc_req, "TEST", 1, defPolicy, 1, 1, NULL); - req_handle = MRC_Proxy_add_and_wait(mrc_proxy, mrc_req); - MRC_Request_clear(mrc_req); - - MRC_Request_init(mrc_req); - MRC_Request__createFile(mrc_req, "TEST/testfile", NULL, NULL, NULL, 0755); - req_handle = MRC_Proxy_add_and_wait(mrc_proxy, mrc_req); - MRC_Request_clear(mrc_req); - - printf("Testing file...\n"); - - MRC_Request_init(mrc_req); - MRC_Request__stat(mrc_req, "TEST/testfile", 0, 0, 0); - mrc_req->resp_data = (void *)&si; - req_handle = MRC_Proxy_add_and_wait(mrc_proxy, mrc_req); - MRC_Request_clear(mrc_req); - - xtreemfs_statinfo_print(&si); - - MRC_Request_init(mrc_req); - MRC_Request__readDir(mrc_req, "TEST/"); - mrc_req->resp_data = (void *)&readdir_resp; - req_handle = MRC_Proxy_add_and_wait(mrc_proxy, mrc_req); - MRC_Request_clear(mrc_req); - - - printf("Opening the file....\n"); - - MRC_Request_init(mrc_req); - MRC_Request__open(mrc_req, "TEST/testfile", "w"); - req_handle = MRC_Proxy_add_and_wait(mrc_proxy, mrc_req); - MRC_Request_clear(mrc_req); - - printf("Wait for request finished.\n"); - - - /* Cleaning up all used resources */ - - MRC_Proxy_stop(mrc_proxy); - printf("MRC proxy stopped now.\n"); - - MRC_Request_delete(mrc_req); - - MRC_Proxy_delete(mrc_proxy); - - ne_sock_exit(); - - return 0; -} diff --git a/client/tests/osd/Makefile b/client/tests/osd/Makefile deleted file mode 100644 index 9b561608a..000000000 --- a/client/tests/osd/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -SUBDIRS = channel - -all clean distclean: - @for i in $(SUBDIRS); do \ - $(MAKE) -C $$i $@ || exit 1; \ - done - - diff --git a/client/tests/osd/channel/Makefile b/client/tests/osd/channel/Makefile deleted file mode 100644 index 897ce953d..000000000 --- a/client/tests/osd/channel/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -TOPDIR ?= ../../.. --include $(TOPDIR)/make.config - -TGT = channeltest - -CC_INCS += $(JSON_CC_INCS) $(NEON_CC_INCS) $(CURRENT_CC_INCS) -CC_COMMON_OBJS = mrc_proxy.o mrc_proxy_intern.o mrc_request.o mrc_channel.o mrc_req_queue.o \ - osd_channel.o stripingpolicy.o xloc.o xcap.o statinfo.o \ - thread_pool.o bench_timer.o logger.o -CC_LOCAL_OBJS = main.o -CC_OBJS = $(CC_LOCAL_OBJS) $(CC_COMMON_OBJS) -CC_STATIC_LIBS += $(JSON_CC_STATIC_LIBS) $(NEON_CC_STATIC_LIBS) -CC_LIBS += $(NEON_CC_PARTSH_LIBS) - - - -all: $(TGT) - -$(TGT): $(CC_OBJS) - $(call PARTST_LD,$@,$^,$(CC_STATIC_LIBS),$(CC_LIBS)) - -.SECONDEXPANSION: -$(CC_COMMON_OBJS): $$(patsubst %.o,../../../src/%.c,$$@) - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -clean: - $(RM) $(CC_OBJS) - -distclean: clean - $(RM) $(TGT) - $(RM) *~ - diff --git a/client/tests/osd/channel/main.c b/client/tests/osd/channel/main.c deleted file mode 100644 index 95a274277..000000000 --- a/client/tests/osd/channel/main.c +++ /dev/null @@ -1,167 +0,0 @@ -/* -* C Implementation: main -* -* Description: -* -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include -#include - -#include - -#include "file.h" -#include "mrc_proxy.h" -#include "mrc_request.h" -#include "osd_channel.h" -#include "xloc.h" -#include "xcap.h" -#include "logger.h" - -#define BUF_SIZE 4096 - -pthread_attr_t *xpattr; - -int -do_osd_ops(struct user_file *uf, char *filename, char *fileid_str) -{ - struct OSD_Channel *channel; - struct OSD_Channel_resp channel_resp; - unsigned char *write_buf, *read_buf; - struct fileid_struct fileid; - struct file_replica replica; - struct list_head xlocs_list, *iter; - struct xlocs *xlocs; - - struct json_object *jo; - - int i; - - - fileid.path = filename; - fileid.fileid = fileid_str; - - replica.fileid_s = &fileid; - - uf->file = &replica; - - jo = json_tokener_parse(uf->xloc); - json_to_xlocs_list(jo, &xlocs_list); - json_object_put(jo); - - list_for_each(iter, &xlocs_list) { - xlocs = (struct xlocs *)iter; - xlocs_print(xlocs); - } - xlocs_list_clear(&xlocs_list); - - channel = OSD_Channel_new("http://localhost:32637"); - - if(channel == NULL) { - err_msg("Cannot create new channel.\n"); - } - - write_buf = (char *)malloc(BUF_SIZE); - read_buf = (char *)malloc(BUF_SIZE); - - jo = json_tokener_parse(uf->xcap); - json_object_put(jo); - - for(i=0; iaccess_mode); - free(req_data->path); - free(mrc_req.req_data); - - if(resp_data.xcap != NULL) xcap_delete(resp_data.xcap); - if(resp_data.xlocs != NULL) xlocs_list_delete(resp_data.xlocs); - - MRC_Request_clear(&mrc_req); - MRC_Proxy_stop(&mrc_proxy); - MRC_Proxy_clear(&mrc_proxy); - - return 0; -} diff --git a/client/tests/pseudocomm/Makefile b/client/tests/pseudocomm/Makefile deleted file mode 100644 index 4ec6c28d1..000000000 --- a/client/tests/pseudocomm/Makefile +++ /dev/null @@ -1,32 +0,0 @@ -TOPDIR ?= ../.. --include $(TOPDIR)/make.config - -TGT = pseudocomm-test - -CC_INCS = $(CURRENT_CC_INCS) -CC_COMMON_OBJS = pseudocomm.o request.o workqueue.o -CC_LOCAL_OBJS = main.o -CC_OBJS = $(CC_LOCAL_OBJS) $(CC_COMMON_OBJS) -CC_LIBS = -lpthread - - - -all: $(TGT) - -$(TGT): $(CC_OBJS) - $(CC_LD) $(CC_LDFLAGS) -o $(TGT) $^ $(CC_LIBS) - -.SECONDEXPANSION: -$(CC_COMMON_OBJS): $$(patsubst %.o,../../src/%.c,$$@) - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -clean: - $(RM) $(CC_OBJS) $(TGT) - -distclean: clean - $(RM) $(TGT) - $(RM) *~ - diff --git a/client/tests/pseudocomm/main.c b/client/tests/pseudocomm/main.c deleted file mode 100644 index e4e83bf91..000000000 --- a/client/tests/pseudocomm/main.c +++ /dev/null @@ -1,72 +0,0 @@ -#include -#include -#include -#include -#include -#include "pseudocomm.h" -#include "file.h" -#include "filerw.h" -#include "request.h" - -#define OBJSIZE 256 -#define NOBJS 10 - -int main(int argc, char **argv) -{ - char *buffer[NOBJS]; - enum filerw_op op; - char url[] = "testurl"; - int o; - loff_t offset = 0; - size_t size; - struct user_file *fd = NULL; - - printf("Starting pseudocomm workqueue & sleeping for 5s\n"); - pseudocomm_init(); - sleep(5); - - printf("First loop\n"); - op = OP_FILERW_WRITE; - for (o = 0; o < NOBJS; o++) { - int err; - struct req *req; - - printf("\titeration %d\n",o); - buffer[o] = (char *) malloc(OBJSIZE); - if (!buffer[o]) { - perror("Could not allocate buffer\n"); - exit(1); - } - memset(buffer[o], 0, OBJSIZE); - sprintf(buffer[o], "Buffer %d data\n", o); - size = strlen(buffer[o]) + 10; - req = pseudocomm_req_create(op, url, o, offset, - size, buffer[o], fd, 1); - - err = (int) req_wait(req, 1); - if (err) - fprintf(stderr,"Error %d return from waiting\n", err); - else - fprintf(stderr,"wait returned, request %d done\n", o); - } - printf("Second loop\n"); - // and now read the objects - op = OP_FILERW_READ; - for (o = 0; o < NOBJS; o++) { - int err; - struct req *req; - - printf("\titeration %d\n",o); - memset(buffer[o], 0, OBJSIZE); - req = pseudocomm_req_create(op, url, o, offset, - OBJSIZE, buffer[o], fd, 1); - - err = (int)req_wait(req, 1); - if (err) - fprintf(stderr,"Error %d return from waiting\n", err); - else - fprintf(stderr,"wait returned, request %d done\n", o); - printf("Object %d\n%s\n-------------\n", o, buffer[o]); - } - exit(0); -} diff --git a/client/tests/radix-tree/Makefile b/client/tests/radix-tree/Makefile deleted file mode 100644 index 602cde2fe..000000000 --- a/client/tests/radix-tree/Makefile +++ /dev/null @@ -1,8 +0,0 @@ -SUBDIRS = simple - -all clean distclean: - @for i in $(SUBDIRS); do \ - $(MAKE) -C $$i $@ || exit 1; \ - done - - diff --git a/client/tests/radix-tree/simple/Makefile b/client/tests/radix-tree/simple/Makefile deleted file mode 100644 index d5ef4dd92..000000000 --- a/client/tests/radix-tree/simple/Makefile +++ /dev/null @@ -1,31 +0,0 @@ --include $(TOPDIR)/make.config - -TGT = radixtreetest - -CC_INCS = $(CURRENT_CC_INCS) -CC_COMMON_OBJS = radix-tree.o logger.o -CC_LOCAL_OBJS = main.o -CC_OBJS = $(CC_LOCAL_OBJS) $(CC_COMMON_OBJS) -CC_LIBS = -lpthread - - - -all: $(TGT) - -$(TGT): $(CC_OBJS) - $(CC_LD) $(CC_LDFLAGS) -o $(TGT) $^ $(CC_LIBS) - -.SECONDEXPANSION: -$(CC_COMMON_OBJS): $$(patsubst %.o,../../../src/%.c,$$@) - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -%.o: %.c - $(CC) $(CC_FLAGS) $(CC_INCS) -c -o $@ $< - -clean: - $(RM) $(CC_OBJS) - -distclean: clean - $(RM) $(TGT) - $(RM) *~ - diff --git a/client/tests/radix-tree/simple/main.c b/client/tests/radix-tree/simple/main.c deleted file mode 100644 index d1d46cc2e..000000000 --- a/client/tests/radix-tree/simple/main.c +++ /dev/null @@ -1,59 +0,0 @@ -/* -* C Implementation: main -* -* Description: -* Test program for radix trees. -* -* Author: Matthias Hess , (C) 2007 -* -* Copyright: See COPYING file that comes with this distribution -* -*/ - -#include -#include - -#include - -#define NUM_ELEMS 1000000 - -int -main(int argc, char **argv) -{ - struct radix_tree_root root; - unsigned long idx[NUM_ELEMS]; - int i, j, r; - double d[NUM_ELEMS], z; - - /* Do a random permutation of the index array */ - for(i=0; i -# -# $Id: createFiles.sh 3546 2008-08-08 18:51:37Z jmalo $ - -export FILE=$1 -export NFILES=$2 -export OPER=$3 -NONEMPTY= -RENAME= - -if [ -z "$FILE" -o -z "$NFILES" ]; then - echo "Usage: $0 [-w|-r]" - exit 1 -fi - -if [ "$OPER" = "-w" ]; then - NONEMPTY=1 -elif [ "$OPER" = "-r" ]; then - RENAME=1 -fi - -cleanup() { - for f in $TFILES; do - [ -f $f ] && rm -rf $f - done -} - -do_touch() { - /usr/bin/time -f "elapsed %e" -o $TEMP -- \ - bash -c "for (( i=0; i<$NFILES; i++ )); do \ - touch ${FILE}_\$i; \ - done" -} - -do_byte() { - local TEMP=$1 - /usr/bin/time -f "elapsed %e" -o $TEMP -- \ - bash -c "for (( i=0; i<$NFILES; i++ )); do \ - echo 1 >${FILE}_\$i ; \ - done" -} - -do_rename() { - local TEMP=$1 - /usr/bin/time -f "elapsed %e" -o $TEMP -- \ - bash -c "for (( i=0; i<$NFILES; i++ )); do \ - mv ${FILE}_\$i ${FILE}_new_\$i ; \ - done" -} - -do_rm_renamed() { - local TEMP=$1 - /usr/bin/time -f "elapsed %e" -o $TEMP -- \ - bash -c "for (( i=0; i<$NFILES; i++ )); do \ - rm -f ${FILE}_new_\$i ; \ - done" -} - -do_remove() { - local TEMP=$1 - /usr/bin/time -f "elapsed %e" -o $TEMP -- \ - bash -c "for (( i=0; i<$NFILES; i++ )); do \ - rm -f ${FILE}_\$i ; \ - done" -} - - -TFILES="" - -TEMP=`mktemp /tmp/tmp.XXXXXXXXXX` -TFILES="$TFILES $TEMP" - -if [ -z "$NONEMPTY" ]; then - echo "touching $NFILES files ..." - do_touch $TEMP - cat $TEMP - if [ -n "$RENAME" ]; then - echo "renaming $NFILES files ..." - do_rename $TEMP - cat $TEMP - ls `dirname $FILE` - echo "deleting $NFILES renamed files ..." - do_rm_renamed $TEMP - cat $TEMP - ls `dirname $FILE` - else - echo "deleting $NFILES files ..." - do_remove $TEMP - cat $TEMP - fi -else - echo "writing 1 byte to $NFILES files ..." - do_byte $TEMP - cat $TEMP - echo "deleting $NFILES files ..." - do_remove $TEMP - cat $TEMP -fi - -cleanup diff --git a/client/tests/suite/ddwrite.sh b/client/tests/suite/ddwrite.sh deleted file mode 100755 index bf277d536..000000000 --- a/client/tests/suite/ddwrite.sh +++ /dev/null @@ -1,88 +0,0 @@ -#!/bin/bash -# -# Issue a set of dd commands in the background to write in parallel into -# different files. The sum of the bandwidth should be a reasonable estimate -# of the peak bandwidth for writing to a filesystem in a very simple -# pattern. -# -# Copyright (c) Erich Focht -# -# $Id$ - -export MEGABYTES=$1 -FILE=$2 -NPROC=$3 - -if [ -z "$FILE" -o -z "$MEGABYTES" -o -z "$NPROC" ]; then - echo "Usage: $0 " - exit 1 -fi - -cleanup() { - for f in $TFILES; do - [ -f $f ] && rm -rf $f - done -} - -check_length() { - local file=$1 - local real target - target=`expr $MEGABYTES \* 1000000` - real=`stat -c "%s" $file` - if [ -z "$real" ]; then - echo "stat $file : execution failed!" - return 1 - fi - if [ $real -ne $target ]; then - echo "WARNING: length of file is $real (should be $target)" - return 1 - fi - return 0 -} - -do_one () { - local ID=$1 - local TEMP=$2 - #sync - [ -e ${FILE}_$ID ] && rm -f ${FILE}_$ID - /usr/bin/time -f "elapsed %e" -o $TEMP -- \ - dd if=/dev/zero of=${FILE}_$ID bs=1MB count=$MEGABYTES >/dev/null 2>&1 - /usr/bin/time -f "elapsed %e" -o $TEMP -a -- sync - check_length ${FILE}_$ID || rm -f $TEMP -} - -trap cleanup SIGINT -trap cleanup SIGHUP -trap cleanup SIGKILL - -TFILES="" -PIDS="" -sync -for ((i=0; i<$NPROC; i++)) { - TEMP=`mktemp /tmp/tmp.XXXXXXXXXX` - TFILES="$TFILES $TEMP" - { do_one $i $TEMP = 0 : error at character count - * < 0 : no error - ***********************************************************************/ - -int dataasciichk(char *, char *, int, int, char**); - -#endif diff --git a/client/tests/suite/ltp_fs/include/databin.h b/client/tests/suite/ltp_fs/include/databin.h deleted file mode 100644 index b71fbc0c1..000000000 --- a/client/tests/suite/ltp_fs/include/databin.h +++ /dev/null @@ -1,44 +0,0 @@ -#ifndef _DATABIN_H_ -#define _DATABIN_H_ - -/******************************************************************************* -* NAME -* databingen - fill a buffer with a data pattern -* -* SYNOPSIS -* (void) databingen(mode, buffer, bsize, offset) -* int mode; -* char *buffer; -* int bsize; -* int offset; -* -* DESCRIPTION -* datagen fills the buffer pointed to by 'buffer' with 'bsize' bytes -* of data of the form indicated by 'mode'. -* All modes (expect r -random) are file offset based. -* This allows more than process to do writing to the file without -* corrupting it if the same modes were used. -* They data modes to choose from, these are: -* -* 'a' - writes an alternating bit pattern (i.e. 0x5555555...) -* -* 'c' - writes a checkerboard pattern (i.e. 0xff00ff00ff00...) -* -* 'C' - writes counting pattern (i.e. 0 - 07, 0 - 07, ...); -* -* 'o' - writes all bits set (i.e. 0xffffffffffffff...) -* -* 'z' - writes all bits cleared (i.e. 0x000000000...); -* -* 'r' - writes random integers -* -* RETURN VALUE -* None -* -*******************************************************************************/ - -void databingen( int mode, unsigned char *buffer, int bsize, int offset ); - -void databinchedk( int mode, unsigned char *buffer, int bsize, int offset, char **errmsg); - -#endif diff --git a/client/tests/suite/ltp_fs/include/file_lock.h b/client/tests/suite/ltp_fs/include/file_lock.h deleted file mode 100644 index 50affc557..000000000 --- a/client/tests/suite/ltp_fs/include/file_lock.h +++ /dev/null @@ -1,46 +0,0 @@ -/* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ - */ -#ifndef _FILE_LOCK_H_ -#define _FILE_LOCK_H_ - -extern char Fl_syscall_str[128]; - -int file_lock( int , int, char ** ); -int record_lock( int , int , int , int , char ** ); - -#if defined(__sun) || defined(__hpux) -#define LOCK_NB 0x0001 -#define LOCK_UN 0x0002 -#define LOCK_EX 0x0004 -#define LOCK_SH 0x0008 -#endif -#endif /* _FILE_LOCK_H_ */ diff --git a/client/tests/suite/ltp_fs/include/forker.h b/client/tests/suite/ltp_fs/include/forker.h deleted file mode 100644 index effd5d66e..000000000 --- a/client/tests/suite/ltp_fs/include/forker.h +++ /dev/null @@ -1,63 +0,0 @@ -/* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ - */ -#ifndef _FORKER_H_ -#define _FORKER_H_ - -#define FORKER_MAX_PIDS 4098 - -extern int Forker_pids[FORKER_MAX_PIDS]; /* holds pids of forked processes */ -extern int Forker_npids; /* number of entries in Forker_pids */ - -/* - * This function will fork and the parent will exit zero and - * the child will return. This will orphan the returning process - * putting it in the background. - */ -int background( char * ); - -/* - * Forker will fork ncopies-1 copies of self. - * - * arg 1: Number of copies of the process to be running after return. - * This value minus one is the number of forks performed. - * arg 2: mode: 0 - all children are first generation descendents. - * 1 - each subsequent child is a descendent of another - * descendent, resulting in only one direct descendent of the - * parent and each other child is a child of another child in - * relation to the parent. - * arg 3: prefix: string to preceed any error messages. A value of NULL - * results in no error messages on failure. - * returns: returns to parent the number of children forked. - */ -int forker( int , int , char * ); - -#endif /* _FORKER_H_ */ diff --git a/client/tests/suite/ltp_fs/include/open_flags.h b/client/tests/suite/ltp_fs/include/open_flags.h deleted file mode 100644 index 87fe6ff1d..000000000 --- a/client/tests/suite/ltp_fs/include/open_flags.h +++ /dev/null @@ -1,73 +0,0 @@ -/* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ - */ -#ifndef _OPEN_FLAGS_H_ -#define _OPEN_FLAGS_H_ - -/*********************************************************************** - * This function attempts to convert open flag bits into human readable - * symbols (i.e. O_TRUNC). If there are more than one symbol, - * the string will be placed as a separator between symbols. - * Commonly used separators would be a comma "," or pipe "|". - * If is one and not all bits can be converted to - * symbols, the "UNKNOWN" symbol will be added to return string. - * - * Return Value - * openflags2symbols will return the indentified symbols. - * If no symbols are recognized the return value will be a empty - * string or the "UNKNOWN" symbol. - * - * Limitations - * Currently (05/96) all known symbols are coded into openflags2symbols. - * If new open flags are added this code will have to updated - * to know about them or they will not be recognized. - * - * The Open_symbols must be large enough to hold all possible symbols - * for a given system. - * - ***********************************************************************/ -char *openflags2symbols( int, char *, int ); - -/*********************************************************************** - * This function will take a string of comma separated open flags symbols - * and translate them into an open flag bitmask. - * If any symbol is not valid, -1 is returned. On this error condition - * the badname pointer is updated if not NULL. badname will point - * to the beginning location of where the invalid symbol was found. - * string will be returned unchanged. - * - * A signal received while parsing string could cause the string to - * contain a NULL character in the middle of it. - * - ***********************************************************************/ -int parse_open_flags( char *, char ** ); - -#endif diff --git a/client/tests/suite/ltp_fs/include/pattern.h b/client/tests/suite/ltp_fs/include/pattern.h deleted file mode 100644 index 74f841cae..000000000 --- a/client/tests/suite/ltp_fs/include/pattern.h +++ /dev/null @@ -1,90 +0,0 @@ -/* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ - */ -#ifndef _PATTERN_H_ -#define _PATTERN_H_ - -/* - * pattern_check(buf, buflen, pat, patlen, patshift) - * - * Check a buffer of length buflen against repeated occurrances of - * a pattern whose length is patlen. Patshift can be used to rotate - * the pattern by patshift bytes to the left. - * - * Patshift may be greater than patlen, the pattern will be rotated by - * (patshift % patshift) bytes. - * - * pattern_check returns -1 if the buffer does not contain repeated - * occurrances of the indicated pattern (shifted by patshift). - * - * The algorithm used to check the buffer relies on the fact that buf is - * supposed to be repeated copies of pattern. The basic algorithm is - * to validate the first patlen bytes of buf against the pat argument - * passed in - then validate the next patlen bytes against the 1st patlen - * bytes - the next (2*patlen) bytes against the 1st (2*pathen) bytes, and - * so on. This algorithm only works when the assumption of a buffer full - * of repeated copies of a pattern holds, and gives MUCH better results - * then walking the buffer byte by byte. - * - * Performance wise, It appears to be about 5% slower than doing a straight - * memcmp of 2 buffers, but the big win is that it does not require a - * 2nd comparison buffer, only the pattern. - */ -int pattern_check( char * , int , char * , int , int ); - -/* - * pattern_fill(buf, buflen, pat, patlen, patshift) - * - * Fill a buffer of length buflen with repeated occurrances of - * a pattern whose length is patlen. Patshift can be used to rotate - * the pattern by patshift bytes to the left. - * - * Patshift may be greater than patlen, the pattern will be rotated by - * (patshift % patlen) bytes. - * - * If buflen is not a multiple of patlen, a partial pattern will be written - * in the last part of the buffer. This implies that a buffer which is - * shorter than the pattern length will receive only a partial pattern ... - * - * pattern_fill always returns 0 - no validation of arguments is done. - * - * The algorithm used to fill the buffer relies on the fact that buf is - * supposed to be repeated copies of pattern. The basic algorithm is - * to fill the first patlen bytes of buf with the pat argument - * passed in - then copy the next patlen bytes with the 1st patlen - * bytes - the next (2*patlen) bytes with the 1st (2*pathen) bytes, and - * so on. This algorithm only works when the assumption of a buffer full - * of repeated copies of a pattern holds, and gives MUCH better results - * then filling the buffer 1 byte at a time. - */ -int pattern_fill( char * , int , char * , int , int ); - -#endif diff --git a/client/tests/suite/ltp_fs/include/random_range.h b/client/tests/suite/ltp_fs/include/random_range.h deleted file mode 100644 index d3e1cceb8..000000000 --- a/client/tests/suite/ltp_fs/include/random_range.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ - */ -#ifndef _RANDOM_RANGE_H_ -#define _RANDOM_RANGE_H_ - -int parse_ranges ( char *, int, int, int, int (*)(), char **, char ** ); -int range_min ( char *, int ); -int range_max ( char *, int ); -int range_mult ( char *, int ); -long random_range ( int, int, int, char ** ); -long random_rangel ( long, long, long, char ** ); -long long random_rangell ( long long, long long, long long, char ** ); -void random_range_seed( long ); -long random_bit ( long ); - -#endif diff --git a/client/tests/suite/ltp_fs/include/rmobj.h b/client/tests/suite/ltp_fs/include/rmobj.h deleted file mode 100644 index 4808ca258..000000000 --- a/client/tests/suite/ltp_fs/include/rmobj.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef _RMOBJ_H_ -#define _RMOBJ_H_ - -/* - * rmobj() - Remove the specified object. If the specified object is a - * directory, recursively remove everything inside of it. If - * there are any problems, set errmsg (if it is not NULL) and - * return -1. Otherwise return 0. - */ -int rmobj( char *object , char **errmesg ); - -#endif diff --git a/client/tests/suite/ltp_fs/include/search_path.h b/client/tests/suite/ltp_fs/include/search_path.h deleted file mode 100644 index 909ab26cf..000000000 --- a/client/tests/suite/ltp_fs/include/search_path.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ - */ - -/* $Id: search_path.h,v 1.1 2000/08/30 18:43:38 nstraz Exp $ */ - - -int search_path(char *cmd, char *res_path, int access_mode, int fullpath); diff --git a/client/tests/suite/ltp_fs/include/str_to_bytes.h b/client/tests/suite/ltp_fs/include/str_to_bytes.h deleted file mode 100644 index 100d37df5..000000000 --- a/client/tests/suite/ltp_fs/include/str_to_bytes.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ - */ -#ifndef _STR_TO_BYTES_ -#define _STR_TO_BYTES_ - -int str_to_bytes ( char * ); -long str_to_lbytes ( char * ); -long long str_to_llbytes( char * ); - -#endif diff --git a/client/tests/suite/ltp_fs/include/string_to_tokens.h b/client/tests/suite/ltp_fs/include/string_to_tokens.h deleted file mode 100644 index 9c0935ec5..000000000 --- a/client/tests/suite/ltp_fs/include/string_to_tokens.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ - */ -#ifndef _STRING_TO_TOKENS_H_ -#define _STRING_TO_TOKENS_H_ - -/* - * string_to_tokens() - * - * This function parses the string 'arg_string', placing pointers to - * the 'separator' separated tokens into the elements of 'arg_array'. - * The array is terminated with a null pointer. - * - * NOTE: This function uses strtok() to parse 'arg_string', and thus - * physically alters 'arg_string' by placing null characters where the - * separators originally were. - */ -int string_to_tokens(char *, char **, int, char *); - -#endif diff --git a/client/tests/suite/ltp_fs/include/test.h b/client/tests/suite/ltp_fs/include/test.h deleted file mode 100644 index d1ed3d242..000000000 --- a/client/tests/suite/ltp_fs/include/test.h +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ - */ - -/* $Id: test.h,v 1.10 2006/05/26 06:17:53 vapier Exp $ */ - -#ifndef __TEST_H__ -#define __TEST_H__ - -#include -#include -#include -#include -#include - -#define TPASS 0 /* Test passed flag */ -#define TFAIL 1 /* Test failed flag */ -#define TBROK 2 /* Test broken flag */ -#define TWARN 4 /* Test warning flag */ -#define TRETR 8 /* Test retire flag */ -#define TINFO 16 /* Test information flag */ -#define TCONF 32 /* Test not appropriate for configuration flag */ - -/* - * To determine if you are on a Umk or Unicos system, - * use sysconf(_SC_CRAY_SYSTEM). But since _SC_CRAY_SYSTEM - * is not defined until 90, it will be define here if not already - * defined. - * if ( sysconf(_SC_CRAY_SYSTEM) == 1 ) - * on UMK - * else # returned 0 or -1 - * on Unicos - * This is only being done on CRAY systems. - */ -#ifdef CRAY -#ifndef _SC_CRAY_SYSTEM -#define _SC_CRAY_SYSTEM 140 -#endif /* ! _SC_CRAY_SYSTEM */ -#endif /* CRAY */ - -/* - * Ensure that NUMSIGS is defined. - * It should be defined in signal.h or sys/signal.h on - * UNICOS/mk and IRIX systems. On UNICOS systems, - * it is not defined, thus it is being set to UNICOS's NSIG. - * Note: IRIX's NSIG (signals are 1-(NSIG-1)) - * is not same meaning as UNICOS/UMK's NSIG (signals 1-NSIG) - */ -#ifndef NUMSIGS -#define NUMSIGS NSIG -#endif - - -/* defines for unexpected signal setup routine (set_usig.c) */ -#define FORK 1 /* SIGCLD is to be ignored */ -#define NOFORK 0 /* SIGCLD is to be caught */ -#define DEF_HANDLER 0 /* tells set_usig() to use default signal handler */ - -/* - * The following defines are used to control tst_res and t_result reporting. - */ - -#define TOUTPUT "TOUTPUT" /* The name of the environment variable */ - /* that can be set to one of the following */ - /* strings to control tst_res output */ - /* If not set, TOUT_VERBOSE_S is assumed */ - -#define TOUT_VERBOSE_S "VERBOSE" /* All test cases reported */ -#define TOUT_CONDENSE_S "CONDENSE" /* ranges are used where identical messages*/ - /* occur for sequential test cases */ -#define TOUT_NOPASS_S "NOPASS" /* No pass test cases are reported */ -#define TOUT_DISCARD_S "DISCARD" /* No output is reported */ - -#define TST_NOBUF "TST_NOBUF" /* The name of the environment variable */ - /* that can be set to control whether or not */ - /* tst_res will buffer output into 4096 byte */ - /* blocks of output */ - /* If not set, buffer is done. If set, no */ - /* internal buffering will be done in tst_res */ - /* t_result does not have internal buffering */ - -/* - * The following defines are used to control tst_tmpdir, tst_wildcard and t_mkchdir - */ - -#define TDIRECTORY "TDIRECTORY" /* The name of the environment variable */ - /* that if is set, the value (directory) */ - /* is used by all tests as their working */ - /* directory. tst_rmdir and t_rmdir will */ - /* not attempt to clean up. */ - /* This environment variable should only */ - /* be set when doing system testing since */ - /* tests will collide and break and fail */ - /* because of setting it. */ - -#define TEMPDIR "/tmp" /* This is the default temporary directory. */ - /* The environment variable TMPDIR is */ - /* used prior to this valid by tempnam(3). */ - /* To control the base location of the */ - /* temporary directory, set the TMPDIR */ - /* environment variable to desired path */ - -/* - * The following contains support for error message passing. - * See test_error.c for details. - */ -#define TST_ERR_MESG_SIZE 1023 /* max size of error message */ -#define TST_ERR_FILE_SIZE 511 /* max size of module name used by compiler */ -#define TST_ERR_FUNC_SIZE 127 /* max size of func name */ - -typedef struct { - int te_line; /* line where last error was reported. Use */ - /* "__LINE__" and let compiler do the rest */ - int te_level; /* If set, will prevent current stored */ - /* error to not be overwritten */ - char te_func[TST_ERR_FUNC_SIZE+1]; /* name of function of last error */ - /* Name of function or NULL */ - char te_file[TST_ERR_FILE_SIZE+1]; /* module of last error. Use */ - /* "__FILE__" and let compiler do the rest */ - char te_mesg[TST_ERR_MESG_SIZE+1]; /* string of last error */ - -} _TST_ERROR; - -extern _TST_ERROR Tst_error; /* defined in test_error.c */ -#if __STDC__ -extern void tst_set_error(char *file, int line, char *func, char *fmt, ...); -#else -extern void tst_set_error(); -#endif -extern void tst_clear_error(); - - -/* - * The following define contains the name of an environmental variable - * that can be used to specify the number of iterations. - * It is supported in parse_opts.c and USC_setup.c. - */ -#define USC_ITERATION_ENV "USC_ITERATIONS" - -/* - * The following define contains the name of an environmental variable - * that can be used to specify to iteration until desired time - * in floating point seconds has gone by. - * Supported in USC_setup.c. - */ -#define USC_LOOP_WALLTIME "USC_LOOP_WALLTIME" - -/* - * The following define contains the name of an environmental variable - * that can be used to specify that no functional checks are wanted. - * It is supported in parse_opts.c and USC_setup.c. - */ -#define USC_NO_FUNC_CHECK "USC_NO_FUNC_CHECK" - -/* - * The following define contains the name of an environmental variable - * that can be used to specify the delay between each loop iteration. - * The value is in seconds (fractional numbers are allowed). - * It is supported in parse_opts.c. - */ -#define USC_LOOP_DELAY "USC_LOOP_DELAY" - -/* - * fork() can't be used on uClinux systems, so use FORK_OR_VFORK instead, - * which will run vfork() on uClinux. - * mmap() doesn't support MAP_PRIVATE on uClinux systems, so use - * MAP_PRIVATE_EXCEPT_UCLINUX instead, which will skip the option on uClinux. - * If MAP_PRIVATE really is required, the test can not be run on uClinux. - */ -#ifdef UCLINUX -#define FORK_OR_VFORK vfork -#define MAP_PRIVATE_EXCEPT_UCLINUX 0 -#else -#define FORK_OR_VFORK fork -#define MAP_PRIVATE_EXCEPT_UCLINUX MAP_PRIVATE -#endif - -/* - * The following prototypes are needed to remove compile errors - * on IRIX systems when compiled with -n32 and -64. - */ -extern void tst_res(int ttype, char *fname, char *arg_fmt, ...); -extern void tst_resm(int ttype, char *arg_fmt, ...); -extern void tst_brk(int ttype, char *fname, void (*func)(), - char *arg_fmt, ...); -extern void tst_brkloop(int ttype, char *fname, void (*func)(), - char *arg_fmt, ...); -extern void tst_brkm(int ttype, void (*func)(), char *arg_fmt, ...); -extern void tst_brkloopm(int ttype, void (*func)(), char *arg_fmt, ...); - -extern int tst_environ(); -extern void tst_exit(); -extern void tst_flush(); - -/* prototypes for the t_res.c functions */ -extern void t_result(char *tcid, int tnum, int ttype, char *tmesg); -extern void tt_exit(); -extern int t_environ(); -extern void t_breakum(char *tcid, int total, int typ, char *msg, void (*fnc)()); - -extern void tst_sig(int fork_flag, void (*handler)(), void (*cleanup)()); -extern void tst_tmpdir(); -extern void tst_rmdir(); - -extern char * get_high_address(void); - -extern void get_kver(int*, int*, int*); -extern int tst_kvercmp(int, int, int); - -extern int tst_is_cwd_tmpfs(); -extern int tst_cwd_has_free(int required_kib); - -extern int Tst_count; - -/* self_exec.c functions */ -void maybe_run_child(void (*child)(), char *fmt, ...); -int self_exec(char *argv0, char *fmt, ...); - -#endif /* end of __TEST_H__ */ diff --git a/client/tests/suite/ltp_fs/include/tlibio.h b/client/tests/suite/ltp_fs/include/tlibio.h deleted file mode 100644 index 59333e75a..000000000 --- a/client/tests/suite/ltp_fs/include/tlibio.h +++ /dev/null @@ -1,148 +0,0 @@ -/* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ - */ - -#define LIO_IO_SYNC 00001 /* read/write */ -#define LIO_IO_ASYNC 00002 /* reada/writea/aio_write/aio_read */ -#define LIO_IO_SLISTIO 00004 /* single stride sync listio */ -#define LIO_IO_ALISTIO 00010 /* single stride async listio */ -#define LIO_IO_SYNCV 00020 /* single-buffer readv/writev */ -#define LIO_IO_SYNCP 00040 /* pread/pwrite */ - -#ifdef sgi -#define LIO_IO_ATYPES 00077 /* all io types */ -#define LIO_IO_TYPES 00061 /* all io types, non-async */ -#endif /* sgi */ -#if defined(__linux__) || defined(__sun) || defined(__hpux) || defined(_AIX) -#define LIO_IO_TYPES 00021 /* all io types */ -#endif /* linux */ -#ifdef CRAY -#define LIO_IO_TYPES 00017 /* all io types */ -#endif /* CRAY */ - -#define LIO_WAIT_NONE 00010000 /* return asap -- use with care */ -#define LIO_WAIT_ACTIVE 00020000 /* spin looking at iosw fields, or EINPROGRESS */ -#define LIO_WAIT_RECALL 00040000 /* call recall(2)/aio_suspend(3) */ -#define LIO_WAIT_SIGPAUSE 00100000 /* call pause */ -#define LIO_WAIT_SIGACTIVE 00200000 /* spin waiting for signal */ -#ifdef sgi -#define LIO_WAIT_CBSUSPEND 00400000 /* aio_suspend waiting for callback */ -#define LIO_WAIT_SIGSUSPEND 01000000 /* aio_suspend waiting for signal */ -#define LIO_WAIT_ATYPES 01760000 /* all async wait types, except nowait */ -#define LIO_WAIT_TYPES 00020000 /* all sync wait types (sorta) */ -#endif /* sgi */ -#if defined(__linux__) || defined(__sun) || defined(__hpux) || defined(_AIX) -#define LIO_WAIT_TYPES 00300000 /* all wait types, except nowait */ -#endif /* linux */ -#ifdef CRAY -#define LIO_WAIT_TYPES 00360000 /* all wait types, except nowait */ -#endif /* CRAY */ - -/* meta wait io */ -/* 00 000 0000 */ - -#ifdef sgi -/* all callback wait types */ -#define LIO_WAIT_CBTYPES (LIO_WAIT_CBSUSPEND) -/* all signal wait types */ -#define LIO_WAIT_SIGTYPES (LIO_WAIT_SIGPAUSE|LIO_WAIT_SIGACTIVE|LIO_WAIT_SIGSUSPEND) -/* all aio_{read,write} or lio_listio */ -#define LIO_IO_ASYNC_TYPES (LIO_IO_ASYNC|LIO_IO_SLISTIO|LIO_IO_ALISTIO) -#endif /* sgi */ -#if defined(__linux__) || defined(__sun) || defined(__hpux) || defined(_AIX) -/* all signal wait types */ -#define LIO_WAIT_SIGTYPES (LIO_WAIT_SIGPAUSE) -#endif /* linux */ -#ifdef CRAY -/* all signal wait types */ -#define LIO_WAIT_SIGTYPES (LIO_WAIT_SIGPAUSE|LIO_WAIT_SIGACTIVE) -#endif /* CRAY */ - -/* - * This bit provides a way to randomly pick an io type and wait method. - * lio_read_buffer() and lio_write_buffer() functions will call - * lio_random_methods() with the given method. - */ -#define LIO_RANDOM 010000000 - -/* - * This bit provides a way for the programmer to use async i/o with - * signals and to use their own signal handler. By default, - * the signal will only be given to the system call if the wait - * method is LIO_WAIT_SIGPAUSE or LIO_WAIT_SIGACTIVE. - * Whenever these wait methods are used, libio signal handler - * will be used. - */ -#define LIO_USE_SIGNAL 020000000 - -/* - * prototypes/structures for functions in the libio.c module. See comments - * in that module, or man page entries for information on the individual - * functions. - */ - -int stride_bounds(int offset, int stride, int nstrides, - int bytes_per_stride, int *min_byte, int *max_byte); - -int lio_set_debug(int level); -int lio_parse_io_arg1(char *string); -void lio_help1(char *prefex); -int lio_parse_io_arg2(char *string, char **badtoken); -void lio_help2(char *prefex); -int lio_write_buffer(int fd, int method, char *buffer, int size, - int sig, char **errmsg, long wrd); - -int lio_read_buffer(int fd, int method, char *buffer, int size, - int sig, char **errmsg, long wrd); -int lio_random_methods(long mask); - -#if CRAY -#include -int lio_wait4asyncio(int method, int fd, struct iosw **statptr); -int lio_check_asyncio(char *io_type, int size, struct iosw *status); -#endif /* CRAY */ -#ifdef sgi -#include -int lio_wait4asyncio(int method, int fd, aiocb_t *aiocbp); -int lio_check_asyncio(char *io_type, int size, aiocb_t *aiocbp, int method); -#endif /* sgi */ - -/* - * Define the structure that contains the infomation that is used - * by the parsing and help functions. - */ -struct lio_info_type { - char *token; - int bits; - char *desc; -}; - - diff --git a/client/tests/suite/ltp_fs/include/usctest.h b/client/tests/suite/ltp_fs/include/usctest.h deleted file mode 100644 index 6c9326660..000000000 --- a/client/tests/suite/ltp_fs/include/usctest.h +++ /dev/null @@ -1,326 +0,0 @@ -/* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ - */ - -/* $Id: usctest.h,v 1.10 2006/05/26 06:06:06 vapier Exp $ */ - -/********************************************************** - * - * IRIX/Linux Feature Test and Evaluation - Silicon Graphics, Inc. - * - * FUNCTION NAME : usctest.h - * - * FUNCTION TITLE : System Call Test Macros - * - * SYNOPSIS: - * See DESCRIPTION below. - * - * AUTHOR : William Roske - * - * INITIAL RELEASE : UNICOS 7.0 - * - * DESCRIPTION - * TEST(SCALL) - calls a system call - * TEST_VOID(SCALL) - same as TEST() but for syscalls with no return value. - * TEST_CLEANUP - print the log of errno return counts if STD_ERRNO_LOG - * is set. - * TEST_PAUSEF(HAND) - Pause for SIGUSR1 if the pause flag is set. - * Use "hand" as the interrupt handling function - * TEST_PAUSE - Pause for SIGUSR1 if the pause flag is set. - * Use internal function to do nothing on signal and go on. - * TEST_LOOPING(COUNTER) - Conditional to check if test should - * loop. Evaluates to TRUE (1) or FALSE (0). - * TEST_ERROR_LOG(eno) - log that this errno was received, - * if STD_ERRNO_LOG is set. - * TEST_EXP_ENOS(array) - set the bits in TEST_VALID_ENO array at - * positions specified in integer "array" - * - * RETURN VALUE - * TEST(SCALL) - Global Variables set: - * int TEST_RETURN=return code from SCALL - * int TEST_ERRNO=value of errno at return from SCALL - * TEST_VOID(SCALL) - Global Variables set: - * int TEST_ERRNO=value of errno at return from SCALL - * TEST_CLEANUP - None. - * TEST_PAUSEF(HAND) - None. - * TEST_PAUSE - None. - * TEST_LOOPING(COUNTER) - True if COUNTER < STD_LOOP_COUNT or - * STD_INFINITE is set. - * TEST_ERROR_LOG(eno) - None - * TEST_EXP_ENOS(array) - None - * - * KNOWN BUGS - * If you use the TEST_PAUSE or TEST_LOOPING macros, you must - * link in parse_opts.o, which contains the code for those functions. - * - *#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#*#**/ - -#ifndef __USCTEST_H__ -#define __USCTEST_H__ 1 - -#ifndef _SC_CLK_TCK -#include -#endif - -#include - -/* - * Ensure that PATH_MAX is defined - */ -#ifndef PATH_MAX -#ifdef MAXPATHLEN -#define PATH_MAX MAXPATHLEN -#else -#define PATH_MAX 1024 -#endif -#endif - -#ifndef CRAY -#ifndef BSIZE -#define BSIZE BBSIZE -#endif -#endif - -/*********************************************************************** - * Define option_t structure type. - * Entries in this struct are used by the parse_opts routine - * to indicate valid options and return option arguments - ***********************************************************************/ -typedef struct { - char *option; /* Valid option string (one option only) like "a:" */ - int *flag; /* pointer to location to set true if option given */ - char **arg; /* pointer to location to place argument, if needed */ -} option_t; - -/*********************************************************************** - * The following globals are defined in parse_opts.c but must be - * externed here because they are used in the macros defined below. - ***********************************************************************/ -extern int STD_FUNCTIONAL_TEST, /* turned off by -f to not do functional test */ - STD_TIMING_ON, /* turned on by -t to print timing stats */ - STD_PAUSE, /* turned on by -p to pause before loop */ - STD_INFINITE, /* turned on by -i0 to loop forever */ - STD_LOOP_COUNT, /* changed by -in to set loop count to n */ - STD_ERRNO_LOG, /* turned on by -e to log errnos returned */ - STD_ERRNO_LIST[], /* counts of errnos returned. indexed by errno */ - STD_COPIES, - STD_argind; - -extern float STD_LOOP_DURATION, /* wall clock time to iterate */ - STD_LOOP_DELAY; /* delay time after each iteration */ - -#define USC_MAX_ERRNO 2000 - -/********************************************************************** - * Prototype for parse_opts routine - **********************************************************************/ -extern char *parse_opts(int ac, char **av, option_t *user_optarr, void (*uhf)()); - - -/* - * define a structure - */ -struct usc_errno_t { - int flag; -}; - -/*********************************************************************** - **** - **** - **** - **********************************************************************/ -#ifdef _USC_LIB_ - -extern long TEST_RETURN; -extern long TEST_ERRNO; -extern struct usc_errno_t TEST_VALID_ENO[USC_MAX_ERRNO]; -extern long btime, etime, tmptime; - -#else -/*********************************************************************** - * Global array of bit masks to indicate errnos that are expected. - * Bits set by TEST_EXP_ENOS() macro and used by TEST_CLEANUP() macro. - ***********************************************************************/ -struct usc_errno_t TEST_VALID_ENO[USC_MAX_ERRNO]; - -/*********************************************************************** - * Globals for returning the return code and errno from the system call - * test macros. - ***********************************************************************/ -long TEST_RETURN; -long TEST_ERRNO; - -/*********************************************************************** - * temporary variables for determining max and min times in TEST macro - ***********************************************************************/ -long btime, etime, tmptime; - -#endif /* _USC_LIB_ */ - -/*********************************************************************** - * structure for timing accumulator and counters - ***********************************************************************/ -struct tblock { - long tb_max; - long tb_min; - long tb_total; - long tb_count; -}; - -/*********************************************************************** - * The following globals are externed here so that they are accessable - * in the macros that follow. - ***********************************************************************/ -extern struct tblock tblock; -extern void STD_go(); -extern int (*_TMP_FUNC)(void); -extern void STD_opts_help(); - - -/*********************************************************************** - * TEST: calls a system call - * - * parameters: - * SCALL = system call and parameters to execute - * - ***********************************************************************/ -#define TEST(SCALL) \ - do { \ - errno = 0; \ - TEST_RETURN = SCALL; \ - TEST_ERRNO = errno; \ - } while (0) - -/*********************************************************************** - * TEST_VOID: calls a system call - * - * parameters: - * SCALL = system call and parameters to execute - * - * Note: This is IDENTICAL to the TEST() macro except that it is intended - * for use with syscalls returning no values (void syscall()). The - * Typecasting nothing (void) into an unsigned integer causes compilation - * errors. - * - ***********************************************************************/ -#define TEST_VOID(SCALL) errno=0; SCALL; TEST_ERRNO=errno; - -/*********************************************************************** - * TEST_CLEANUP: print system call timing stats and errno log entries - * to stdout if STD_TIMING_ON and STD_ERRNO_LOG are set, respectively. - * Do NOT print ANY information if no system calls logged. - * - * parameters: - * none - * - ***********************************************************************/ -#define TEST_CLEANUP \ -if ( STD_ERRNO_LOG ) { \ - for (tmptime=0; tmptime--> - * --> - * - * The maximum length of this record is defined by the WLOG_REC_MAX_SIZE - * record. Note that the 2-byte record length forces this to be - * <= 64k bytes. - * - * Note that there is lots of bit-masking done here. The w_pathlen, - * w_hostlen, and w_patternlen fields MUST have enough bits to hold - * WLOG_MAX_PATH, WLOG_MAX_HOST, and WLOG_MAX_PATTERN bytes respectivly. - */ - -struct wlog_rec_disk { -#ifdef CRAY - uint w_offset : 44; /* file offset */ - uint w_extra0 : 20; /* EXTRA BITS IN WORD 0 */ -#else - /* NB: sgi is pissy about fields > 32 bit, even cc -mips3 */ - uint w_offset : 32; /* file offset */ - uint w_extra0 : 32; /* EXTRA BITS IN WORD 0 */ -#endif - - uint w_nbytes : 32; /* # bytes written */ - uint w_oflags : 32; /* low-order open() flags */ - - uint w_pid : 17; /* pid doing the write */ - uint w_pathlen : 7; /* length of file path */ - uint w_patternlen: 6; /* length of pattern */ - uint w_hostlen : 4; /* length of host */ - uint w_done : 1; /* 1 if io confirmed done */ - uint w_async : 1; /* 1 if async write (writea) */ - uint w_extra2 : 28; /* EXTRA BITS IN WORD 2 */ -}; - -/* - * write log file datatype. wlog_open() initializes this structure - * which is then passed around to the various wlog_xxx routines. - */ - -struct wlog_file { - int w_afd; /* append fd */ - int w_rfd; /* random-access fd */ - char w_file[1024]; /* name of the write_log */ -}; - -/* - * return value defines for the user-supplied function to - * wlog_scan_backward(). - */ - -#define WLOG_STOP_SCAN 0 -#define WLOG_CONTINUE_SCAN 1 - -/* - * wlog prototypes - */ - -#if __STDC__ -extern int wlog_open(struct wlog_file *wfile, int trunc, int mode); -extern int wlog_close(struct wlog_file *wfile); -extern int wlog_record_write(struct wlog_file *wfile, - struct wlog_rec *wrec, long offset); -extern int wlog_scan_backward(struct wlog_file *wfile, int nrecs, - int (*func)(struct wlog_rec *rec), - long data); -#else -int wlog_open(); -int wlog_close(); -int wlog_record_write(); -int wlog_scan_backward(); -#endif - -extern char Wlog_Error_String[]; - -#endif /* _WRITE_LOG_H_ */ - diff --git a/client/tests/suite/ltp_fs/kernel_fs/Makefile b/client/tests/suite/ltp_fs/kernel_fs/Makefile deleted file mode 100644 index 3eb52cba6..000000000 --- a/client/tests/suite/ltp_fs/kernel_fs/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -SUBDIRS = acls doio fs_inod fsstress fs_perms ftest inode lftest linktest openfile stream fs_di - -all: - @set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i ; done - -install: - @set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i install ; done - -clean: - @set -e; for i in $(SUBDIRS); do $(MAKE) -C $$i clean ; done - - diff --git a/client/tests/suite/ltp_fs/kernel_fs/acl/tacl_xattr.sh b/client/tests/suite/ltp_fs/kernel_fs/acl/tacl_xattr.sh deleted file mode 100755 index 4d26d1b14..000000000 --- a/client/tests/suite/ltp_fs/kernel_fs/acl/tacl_xattr.sh +++ /dev/null @@ -1,875 +0,0 @@ -#!/bin/bash -############################################################## -# -# Copyright (c) International Business Machines Corp., 2003 -# -# 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, -# -# FILE : tacl_xattr.sh -# USAGE : ./tacl_xattr.sh -# -# DESCRIPTION : A script that will test ACL and Extend Attribute on Linux system. -# REQUIREMENTS: -# 1) Kernel with loop device support -# 2) A spare (scratch) disk partition of 100MB or larger. -# 3) Kernel with ACL and Extend Attribute function support -# -# HISTORY : -# 10/23/2003 Kai Zhao (ltcd3@cn.ibm.com) -# 07/06/2004 Jacky Malcles enable ext3 & clean users home dir. -# -# CODE COVERAGE: -# 76.3% - fs/posix_acl.c -# 80.9% - xattr_acl.c -# 73.0% - xattr.c -# -############################################################## - -CUR_PATH="" -CONTENT="" -RES="" -USER_PERMISSION="" -GROUP_PERMISSION="" -OTHER_PERMISSION="" -ITEM_OWNER="" -ITEM_GROUP="" - -################################################################ -# -# Make sure that uid=root is running this script. -# Make sure that loop device is built into the kernel -# Make sure that ACL(Access Control List) and Extended Attribute are -# built into the kernel -# -################################################################ - -if [ $UID != 0 ] -then - echo "FAILED: Must have root access to execute this script" - exit 1 -fi - -################################################################# -# -# Prepare Ext2 file system for ACL and Extended Attribute test -# Make some directory , file and symlink for the test -# Add three users for the test -# -################################################################# - -if [ ! -e tacl ] -then - mkdir -m 777 tacl -else - echo "FAILED: Directory tacl are exist" - exit 1 -fi - -dd if=/dev/zero of=tacl/blkext2 bs=1k count=10240 -chmod 777 tacl/blkext2 - -losetup /dev/loop0 tacl/blkext2 2>&1 > /dev/null -if [ $? != 0 ] -then - echo "" - echo "FAILED: [ losetup ] Must have loop device support by kernel" - echo -e "\t to execute this script" - exit 1 -fi - -mount | grep ext2 -if [ $? != 0 ] -then - mkfs -t ext3 /dev/loop0 - mkdir -m 777 tacl/mount-ext2 - mount -t ext3 -o defaults,acl,user_xattr /dev/loop0 tacl/mount-ext2 - if [ $? != 0 ] - then - echo "" - echo "FAILED: [ mount ] Make sure that ACL (Access Control List)" - echo -e "\t and Extended Attribute are built into the kernel" - echo -e "\t Can not mount ext2 file system with acl and user_xattr options" - exit 1 - fi - -else - mkfs -t ext2 /dev/loop0 - mkdir -m 777 tacl/mount-ext2 - mount -t ext2 -o defaults,acl,user_xattr /dev/loop0 tacl/mount-ext2 - if [ $? != 0 ] - then - echo "" - echo "FAILED: [ mount ] Make sure that ACL (Access Control List)" - echo -e "\t and Extended Attribute are built into the kernel" - echo -e "\t Can not mount ext2 file system with acl and user_xattr options" - exit 1 - fi -fi - -chmod 777 tacl/mount-ext2 - -adduser -d `pwd`/tacl/tacluser1 tacluser1 -adduser -d `pwd`/tacl/tacluser2 tacluser2 -adduser -d `pwd`/tacl/tacluser3 tacluser3 -adduser -d `pwd`/tacl/tacluser4 tacluser4 - -if [ ! -e tacl/mount-ext2/shared ] -then - mkdir -p -m 777 tacl/mount-ext2/shared -fi - -CUR_PATH=`pwd` - -su - tacluser1 << TACL_USER1 - - mkdir $CUR_PATH/tacl/mount-ext2/shared/team1 - touch $CUR_PATH/tacl/mount-ext2/shared/team1/file1 - - cd $CUR_PATH/tacl/mount-ext2/shared/team1 - ln -sf file1 symlinkfile1 - cd $CUR_PATH - - cd $CUR_PATH/tacl/mount-ext2/shared - ln -sf team1 symlinkdir1 - cd $CUR_PATH - -TACL_USER1 - -su - tacluser2 << TACL_USER2 - - mkdir $CUR_PATH/tacl/mount-ext2/shared/team2 - touch $CUR_PATH/tacl/mount-ext2/shared/team2/file1 - - cd $CUR_PATH/tacl/mount-ext2/shared/team2 - ln -sf file1 symlinkfile1 - cd $CUR_PATH - - cd $CUR_PATH/tacl/mount-ext2/shared - ln -sf team2 symlinkdir2 - cd $CUR_PATH - -TACL_USER2 - -############################################################################################# -# -# The permissions bit limit user's act -# lrwxrwxrwx 1 tacluser1 tacluser1 5 Jun 23 13:39 symlinkdir1 -> team1 -# lrwxrwxrwx 1 tacluser2 tacluser2 5 Jun 23 13:39 symlinkdir2 -> team2 -# dr-x------ 2 tacluser1 tacluser1 1024 Jun 23 13:39 team1 -# drwxrwxr-x 2 tacluser2 tacluser2 1024 Jun 23 13:39 team2 -# -############################################################################################# - -chmod 500 tacl/mount-ext2/shared/team1 - -su - tacluser1 << TACL_USER1 - - touch $CUR_PATH/tacl/mount-ext2/shared/team1/newfil1 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/team1/newfile1 ] - then - echo "" - echo "FAILED: [ touch ] Create file must be denied by file permission bits" - echo -e "\t [ Physical Directory ]" - else - echo "" - echo "SUCCESS: Create file denied by file permission bits [ Physical directory ]" - fi - - touch $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfil2 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/team1/newfile1 ] - then - echo "" - echo "FAILED: [ touch ] Create file must be denied by file permission bits" - echo -e "\t [ Symlink Directory ]" - else - echo "" - echo "SUCCESS: Create file denied by file permission bits [ Symlink directory ]" - fi - -TACL_USER1 - -################################################################# -# -# ACL_USER_OBJ are a superset of the permissions specified -# by the file permission bits. -# The effective user ID of the process matches the user ID of -# the file object owner. -# Owner's act are based ACL_USER_OBJ -# -################################################################# - -setfacl -m u::rx tacl/mount-ext2/shared/team1 -su - tacluser1 << TACL_USER1 - - cd $CUR_PATH/tacl/mount-ext2/shared/team1/ 2> /dev/null - if [ $? != 0 ] - then - echo "" - echo "FAILED: [ touch ] ACL_USER_OBJ entry already contains the owner execute" - echo -e "\t permissions, but operation failed [ Physical Directory ]" - else - echo "" - echo "SUCCESS: ACL_USER_OBJ entry contains the owner execute permissions, " - echo -e "\t operation success [ Physical Directory ]" - fi - - cd $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/ 2> /dev/null - if [ $? != 0 ] - then - echo "" - echo "FAILED: [ touch ] ACL_USER_OBJ entry already contains the owner execute" - echo -e "\t permissions, but operation failed [ Symlink Directory ]" - else - echo "" - echo "SUCCESS: ACL_USER_OBJ entry contains the owner execute permissions," - echo -e "\t operation success [ Symlink Directory ]" - fi - -TACL_USER1 - -setfacl -m u::rwx tacl/mount-ext2/shared/team1 - -su - tacluser1 << TACL_USER1 - - touch $CUR_PATH/tacl/mount-ext2/shared/team1/newfil1 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/team1/newfile1 ] - then - echo "" - echo "FAILED: [ touch ] ACL_USER_OBJ entry already contains the owner write " - echo -e "\t permissions, but operation failed [ Physical Directory ]" - else - echo "" - echo "SUCCESS: ACL_USER_OBJ entry contains the owner write permissions," - echo -e "\t operation success [ Physical Directory ]" - fi - - touch $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfil2 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/team1/newfile2 ] - then - echo "" - echo "FAILED: [ touch ] ACL_USER_OBJ entry already contains the owner write " - echo -e "\t permissions, but operation failed [ Symlink Directory ]" - else - echo "" - echo "SUCCESS: ACL_USER_OBJ entry contains the owner write permissions," - echo -e "\t operation success [ Symlink Directory ]" - fi - -TACL_USER1 - -################################################################# -# -# The effective user ID of the process matches the qualifier of -# any entry of type ACL_USER -# IF the matching ACL_USER entry and the ACL_MASK -# entry contain the requested permissions,# access is granted, -# ELSE access is denied. -# -################################################################# - -setfacl -m u:tacluser3:rwx tacl/mount-ext2/shared/team1 - -su - tacluser3 << TACL_USER3 - - touch $CUR_PATH/tacl/mount-ext2/shared/team1/newfile3 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/team1/newfile3 ] - then - echo "" - echo "SUCCESS: ACL_USER entry contains the user permissions, " - echo -e "\t operation success [ Physical Directory ]" - else - echo "" - echo "FAILED: ACL_USER entry contains the user permissions," - echo -e "\t but operation denied [ Physical Directory ]" - fi - - touch $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile4 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile4 ] - then - echo "" - echo "SUCCESS: ACL_USER entry contains the user permissions, " - echo -e "\t operation success [ Symlink Directory ]" - else - echo "" - echo "FAILED: ACL_USER entry contains the user permissions," - echo -e "\t but operation denied [ Symlink Directory ]" - fi - -TACL_USER3 - -setfacl -m mask:--- tacl/mount-ext2/shared/team1 - -su - tacluser3 << TACL_USER3 - - touch $CUR_PATH/tacl/mount-ext2/shared/team1/newfile5 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/team1/newfile5 ] - then - echo "" - echo "FAILED: [ touch ] ACL_USER entry contains the user permissions" - echo -e "\t but ACL_MASK are set --- , " - echo -e "\t operation must be denied [ Physical Directory ]" - else - echo "" - echo "SUCCESS: ACL_USER entry contains the user permissions," - echo -e "\t but ACL_MASK are set ___ ," - echo -e "\t operation success [ Physical Directory ]" - fi - - touch $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile6 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile6 ] - then - echo "" - echo "FAILED: [ touch ] ACL_USER entry contains the user permissions" - echo -e "\t but ACL_MASK are set --- ," - echo -e "\t operation must be denied [ Symlink Directory ]" - else - echo "" - echo "SUCCESS: ACL_USER entry contains the user permissions," - echo -e "\t but ACL_MASK are set ___ ," - echo -e "\t operation success [ Symlink Directory ]" - fi - -TACL_USER3 - -########################################################################################### -# -# The effective group ID or any of the supplementary group IDs of the process match the -# qualifier of the entry of type ACL_GROUP_OBJ, or the qualifier of any entry of type -# ACL_GROUP -# -# IF the ACL contains an ACL_MASK entry, THEN -# if the ACL_MASK entry and any of the matching ACL_GROUP_OBJ -# or ACL_GROUP entries contain the requested permissions, -# access is granted, -# -# else access is denied. -# -# ELSE (note that there can be no ACL_GROUP entries without an ACL_MASK entry) -# if the ACL_GROUP_OBJ entry contains the requested permis- -# sions, access is granted, -# -# else access is denied. -# -########################################################################################### - -setfacl -m g:tacluser2:rwx tacl/mount-ext2/shared/team1 - -su - tacluser2 << TACL_USER2 - touch $CUR_PATH/tacl/mount-ext2/shared/team1/newfile7 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/team1/newfile7 ] - then - echo "" - echo "SUCCESS: ACL_GROUP entry contains the group permissions," - echo -e "\t option success [ Physical Directory ]" - else - echo "" - echo "FAILED: [ touch ] ACL_GROUP entry already contains the group permissions," - echo -e "\t but option success [ Physical Directory ]" - fi - - touch $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile8 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile8 ] - then - echo "" - echo "SUCCESS: ACL_GROUP entry contains the group permissions," - echo -e "\t option success [ Symlink Directory ]" - else - echo "" - echo "FAILED: [ touch ] ACL_GROUP entry already contains the group permissions," - echo -e "\t but option success [ Symlink Directory ]" - fi - -TACL_USER2 - -setfacl -m mask:--- tacl/mount-ext2/shared/team1 - -su - tacluser2 << TACL_USER2 - touch $CUR_PATH/tacl/mount-ext2/shared/team1/newfile9 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/team1/newfile9 ] - then - echo "" - echo "FAILED: [ touch ] ACL_GROUP entry contains the group permissions" - echo -e "\t and ACL_MASK entry are set ---," - echo -e "\t option must no be success [ Physical Directory ]" - else - echo "" - echo "SUCCESS: ACL_GROUP entry already contains the group permissions" - echo -e "\t and ACL_MASK entry are set ---," - echo -e "\t option success [ Physical Directory ]" - fi - - touch $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile10 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile10 ] - then - echo "" - echo "FAILED: [ touch ] ACL_GROUP entry contains the group permissions" - echo -e "\t and ACL_MASK entry are set ---, " - echo -e "\t option must no be success [ Symlink Directory ]" - else - echo "" - echo "SUCCESS: ACL_GROUP entry already contains the group permissions" - echo -e "\t and ACL_MASK entry are set ---," - echo -e "\t option success [ Symlink Directory ]" - fi - -TACL_USER2 - -setfacl -m g::rwx tacl/mount-ext2/shared/team1 -usermod -g tacluser1 tacluser2 - -su - tacluser2 << TACL_USER2 - - touch $CUR_PATH/tacl/mount-ext2/shared/team1/newfile11 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/team1/newfile11 ] - then - echo "" - echo "SUCCESS: ACL_GROUP_OBJ entry contains the group owner permissions," - echo -e "\t option success [ Physical Directory ]" - else - echo "" - echo "FAILED: [ touch ] ACL_GROUP_OBJ entry already contains the group owner," - echo -e "\t but option denied [ Physical Directory ]" - fi - - touch $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile12 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile12 ] - then - echo "" - echo "SUCCESS: ACL_GROUP_OBJ entry contains the group owner permissions," - echo -e "\t option success [ Symlink Directory ]" - else - echo "" - echo "FAILED: [ touch ] ACL_GROUP_OBJ entry already contains the group owner," - echo -e "\t but option denied [ Symlink Directory ]" - fi - -TACL_USER2 - -setfacl -m mask:--- tacl/mount-ext2/shared/team1 - -su - tacluser2 << TACL_USER2 - touch $CUR_PATH/tacl/mount-ext2/shared/team1/newfile13 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/team1/newfile13 ] - then - echo "" - echo "FAILED: [ touch ] ACL_GROUP_OBJ entry contains the group owner permissions" - echo -e "\t and ACL_MASK entry are set ---," - echo -e "\t option must no be success [ Physical Directory ]" - else - echo "" - echo "SUCCESS: ACL_GROUP_OBJ entry already contains the group owner permissions" - echo -e "\t and ACL_MASK entry are set ---," - echo -e "\t option success [ Physical Directory ]" - fi - - touch $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile14 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile14 ] - then - echo "" - echo "FAILED: [ touch ] ACL_GROUP_OBJ entry contains the group owner permissions" - echo -e "\t and ACL_MASK entry are set ---," - echo -e "\t option must no be success [ Symlink Directory ]" - else - echo "" - echo "SUCCESS: ACL_GROUP_OBJ entry already contains the group owner permissions" - echo -e "\t and ACL_MASK entry are set ---, " - echo -e "\t option success [ Symlink Directory ]" - fi - -TACL_USER2 - -usermod -g tacluser2 tacluser2 - -################################################################################### -# -# IF the ACL_OTHER entry contains the requested permissions, access is granted -# -################################################################################### - -setfacl -m o::rwx tacl/mount-ext2/shared/team1 - -su - tacluser4 << TACL_USER4 - - touch $CUR_PATH/tacl/mount-ext2/shared/team1/newfile15 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/team1/newfile15 ] - then - echo "" - echo "SUCCESS: ACL_OTHER entry contains the user permissions," - echo -e "\t operation success [ Physical Directory ]" - else - echo "" - echo "FAILED: ACL_OTHER entry contains the user permissions," - echo -e "\t but operation denied [ Physical Directory ]" - fi - - touch $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile16 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile16 ] - then - echo "" - echo "SUCCESS: ACL_OTHER entry contains the user permissions," - echo -e "\t operation success [ Symlink Directory ]" - else - echo "" - echo "FAILED: ACL_OTHER entry contains the user permissions," - echo -e "\t but operation denied [ Symlink Directory ]" - fi - -TACL_USER4 - -setfacl -m mask:--- tacl/mount-ext2/shared/team1 - -su - tacluser4 << TACL_USER4 - - touch $CUR_PATH/tacl/mount-ext2/shared/team1/newfile17 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/team1/newfile17 ] - then - echo "" - echo "SUCCESS: [ touch ] ACL_OTHER do not strick by ACL_MASK [ Physical Directory ]" - else - echo "" - echo "FAILED: ACL_OTHER do not strick by ACL_MASK [ Physical Directory ]" - fi - - touch $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile18 2> /dev/null - if [ -e $CUR_PATH/tacl/mount-ext2/shared/symlinkdir1/newfile18 ] - then - echo "" - echo "SUCCESS: [ touch ] ACL_OTHER do not strick by ACL_MASK [ Symlink Directory ]" - else - echo "" - echo "FAILED: ACL_OTHER do not strick by ACL_MASK [ Symlink Directory ]" - fi - -TACL_USER4 - -############################################################################ -# -# OBJECT CREATION AND DEFAULT ACLs -# The new object inherits the default ACL of the containing directory as its access ACL. -# -############################################################################ - -rm -f tacl/mount-ext2/shared/team1/newfil* - -# -# Test ACL_USER_OBJ default ACLs -# -setfacl -m d:u::r -m d:g::r -m d:o::r tacl/mount-ext2/shared/team1 - -su - tacluser1 << TACL_USER1 - - MASK=`umask` - umask 0 - touch $CUR_PATH/tacl/mount-ext2/shared/team1/newfile1 - umask $MASK > /dev/null - -TACL_USER1 - -CONTENT="" -CONTENT=`ls -l tacl/mount-ext2/shared/team1/newfile1` -RES=`echo $CONTENT | grep ".r--r--r--" | awk '{print $1}'` - -if [ $RES != "" ] -then - echo "" - echo "SUCCESS: With default ACLs set , new file permission set correct." -else - echo "" - echo "FAILED: With default ACLs set , new file permission set not correct" -fi - - - -# -# Test ACL_USER and ACL_GROUP defaults ACLs -# -setfacl -m d:u:tacluser3:rw -m d:g:tacluser3:rw tacl/mount-ext2/shared/team1 -su - tacluser3 << TACL_USER3 - - MASK=`umask` - umask 0 - touch $CUR_PATH/tacl/mount-ext2/shared/team1/newfile2 - umask $MASK > /dev/null - -TACL_USER3 - -CONTENT="" -CONTENT=`ls -l tacl/mount-ext2/shared/team1/newfile2` -RES=`echo $CONTENT | grep ".r--rw-r--" | awk '{print $1}'` - -if [ $RES != "" ] -then - echo "" - echo "SUCCESS: With default ACLs set , new file permission set correct." -else - echo "" - echo "FAILED: With default ACLs set , new file permission set not correct" -fi - -# -# Test ACL_GROUP default ACLs -# - -setfacl -m d:u::rwx -m d:g::rwx -m d:o::rwx tacl/mount-ext2/shared/team1 -su - tacluser3 << TACL_USER3 - - MASK=`umask` - umask 0 - touch $CUR_PATH/tacl/mount-ext2/shared/team1/newfile3 - umask $MASK > /dev/null - -TACL_USER3 - -CONTENT="" -CONTENT=`ls -l tacl/mount-ext2/shared/team1/newfile3` -RES=`echo $CONTENT | grep ".rw-rw-rw-" | awk '{print \$1}'` - -if [ $RES != "" ] -then - echo "" - echo "SUCCESS: With default ACLs set , new file permission set correct." -else - echo "" - echo "FAILED: With default ACLs set , new file permission set not correct" -fi - - -################################################################################# -# -# Chmod also change ACL_USER_OBJ ACL_GROUP_OBJ and ACL_OTHER permissions -# -################################################################################# -su - tacluser3 << TACL_USER3 - MASK=`umask` - umask 0 - - chmod 777 $CUR_PATH/tacl/mount-ext2/shared/team1/newfile3 - umask $MASK > /dev/null -TACL_USER3 - -CONTENT="" -CONTENT=`getfacl tacl/mount-ext2/shared/team1/newfile3` - -USER_PERMISSION=`echo $CONTENT | awk '{print \$10}'` - -GROUP_PERMISSION=`echo $CONTENT | awk '{print \$12}'` -OTHER_PERMISSION=`echo $CONTENT | awk '{print \$15}'` - -if [ $USER_PERMISSION == "user::rwx" ] -then - if [ $GROUP_PERMISSION == "group::rwx" ] - then - if [ $OTHER_PERMISSION == "other::rwx" ] - then - echo "" - echo "SUCCESS: Chmod with ACL_USER_OBJ ACL_GROUP_OBJ and ACL_OTHER are correct" - else - echo "" - echo "FAILED: Chmod with ACL_USER_OBJ ACL_GROUP_OBJ and ACL_OTHER are not correct" - fi - else - echo "" - echo "FAILED: Chmod with ACL_USER_OBJ ACL_GROUP_OBJ and ACL_OTHER are not correct" - fi -else - echo "" - echo "FAILED: Chmod with ACL_USER_OBJ ACL_GROUP_OBJ and ACL_OTHER are not correct" -fi - - -##################################################################################### -# -# Chown only change object owner and group -# -##################################################################################### - -chown tacluser2.tacluser2 tacl/mount-ext2/shared/team1/newfile2 -CONTENT="" -CONTENT=`getfacl tacl/mount-ext2/shared/team1/newfile2` - -ITEM_OWNER=`echo $CONTENT | awk '{print \$6}'` -ITEM_GROUP=`echo $CONTENT | awk '{print \$9}'` - -if [ $ITEM_OWNER == "tacluser2" ] -then - if [ $ITEM_GROUP == "tacluser2" ] - then - echo "" - echo "SUCCESS: Chown correct" - else - echo "" - echo "FAILED: Chown are not correct" - fi -else - echo "FAILED: Chown are not correct" -fi - -##################################################### -# -# Test ACLs backup and restore -# -##################################################### - -getfacl -RL tacl/mount-ext2/ > tacl/tmp1 -setfacl -m u::--- -m g::--- -m o::--- tacl/mount-ext2/shared/team1 -setfacl --restore tacl/tmp1 -getfacl -RL tacl/mount-ext2/ > tacl/tmp2 - -if [ `diff tacl/tmp1 tacl/tmp2` ] -then - echo "" - echo "FAILED: ACLs backup and restore are not correct" -else - echo "" - echo "SUCCESS: ACLs backup and restore are correct" -fi - -echo "" -echo -e "\tEnd ACLs Test" - -##################################################### -# -# Now begin Extend Attribute test -# -##################################################### - -echo -echo "Now begin Extend Attribute Test" - -# dir -echo -echo "Attach name:value pair to object dir " -echo "" -attr -s attrname1 -V attrvalue1 tacl/mount-ext2/shared/team2 -if [ $? != 0 ] -then - echo "FAILED: Attach name:value pair to object dir" -fi - -#file -echo -echo "Attach name:value pair to object file " -echo "" -attr -s attrname2 -V attrvalue2 tacl/mount-ext2/shared/team2/file1 -if [ $? != 0 ] -then - echo "FAILED: Attach name:value pair to object file" -fi - -#symlink file -echo -echo "Attach name:value pair to object symlink file" -echo "" -attr -s attrname3 -V attrvalue3 tacl/mount-ext2/shared/team2/symlinkfile1 -if [ $? != 0 ] -then - echo "INFO: Can't attach name:value pair to object symlink file" -fi - -echo "" -ls -lRt tacl/mount-ext2/shared/team2 - -echo -echo "get extended attributes of filesystem objects" -echo "" - -echo "Dump the values" -getfattr -d tacl/mount-ext2/shared/team2 -if [ $? != 0 ] -then - echo "FAILED: getfattr: Dump the values" -fi - -echo "Recursively dump the values" -getfattr -dR tacl/mount-ext2/* -if [ $? != 0 ] -then - echo "FAILED: getfattr: Recursively Dump the values" -fi - -echo "Do not follow symlinks." -echo "but extended user attributes are disallowed for symbolic links" -getfattr -h --no-dereference tacl/mount-ext2/shared/team2/symlinkfile1 -if [ $? != 0 ] -then - echo "FAILED: getfattr: Do not follow symlinks." -fi -echo - -echo "Logical walk, follow symbolic links" -getfattr -L tacl/mount-ext2/shared/team2/* -if [ $? != 0 ] -then - echo "FAILED: getfattr: Logical walk" -fi - -echo "Physical walk, skip all symbolic links" -getfattr -P tacl/mount-ext2/shared/team2/* -if [ $? != 0 ] -then - echo "FAILED: getfattr: Physical walk" -fi - -echo "attr -g to search the named object" -attr -g attrname1 tacl/mount-ext2/shared/team2 -if [ $? != 0 ] -then - echo "FAILED: attr: to search the named object" -fi -echo - -echo "attr -r to remove the named object" -attr -r attrname2 tacl/mount-ext2/shared/team2/file1 -if [ $? != 0 ] -then - echo "FAILED: attr: to remove the named object" -fi - - -################################# -# -# Backup and Restore -# -################################# -getfattr -dhR -m- -e hex tacl/mount-ext2 > tacl/backup.ea -setfattr -h --restore=tacl/backup.ea - -getfattr -dhR -m- -e hex tacl/mount-ext2 > tacl/backup.ea1 -if [ `diff tacl/backup.ea1 tacl/backup.ea` ] -then - echo "" - echo "FAILED: EAs backup and restore are not correct" -else - echo "" - echo "SUCCESS: EAs backup and restore are correct" -fi - -echo "" -echo -e "\tEnd EAs Test" - - - -##################################################### -# -# Clean up -# -##################################################### - -userdel tacluser1 -userdel tacluser2 -userdel tacluser3 -userdel tacluser4 -umount -d tacl/mount-ext2 -rm -rf tacl diff --git a/client/tests/suite/ltp_fs/kernel_fs/acls/Makefile b/client/tests/suite/ltp_fs/kernel_fs/acls/Makefile deleted file mode 100644 index 91d9cd674..000000000 --- a/client/tests/suite/ltp_fs/kernel_fs/acls/Makefile +++ /dev/null @@ -1,23 +0,0 @@ -check_header = $(shell \ - if echo "\#include <$(1)>" | $(CC) -E - > /dev/null 2>&1 ; \ - then echo yes ; \ - else echo no ; fi) - -ifeq ($(call check_header,sys/xattr.h),yes) -TARGETS := acl_file_test acl_link_test -else -TARGETS := -endif - -all: $(TARGETS) - -acl_file_test: acl_file_test.c - $(CC) $(CFLAGS) $(LDFLAGS) -o acl_file_test acl_file_test.c -acl_link_test: acl_link_test.c - $(CC) $(CFLAGS) $(LDFLAGS) -o acl_link_test acl_link_test.c - -install: - @set -e; for i in $(TARGETS) ; do ln -f $$i ../../bin/ ; done - -clean: - rm -f acl_file_test acl_link_test diff --git a/client/tests/suite/ltp_fs/kernel_fs/acls/acl_file_test.c b/client/tests/suite/ltp_fs/kernel_fs/acls/acl_file_test.c deleted file mode 100644 index 73687cc0c..000000000 --- a/client/tests/suite/ltp_fs/kernel_fs/acls/acl_file_test.c +++ /dev/null @@ -1,69 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -int main(int argc, char *argv[]){ - ssize_t s; - char * tok; - char value[1024]; - char list[1024]; - int rc = 0; - char * file; - int fd; - - if ( argc < 2) { - printf ("Please enter a file name as argument.\n"); - return -1; - } - - file = argv[1]; - - fd = open(file, O_RDONLY); - if (fd < 0) { - printf ("Unable to open file %s !", file); - return -1; - } - - if(-1 == (s = flistxattr(fd, list, 1024)) ) { - perror("flistxattr"); - return 1; - } - if(s == 0) { - printf("No xattrs defined for %s, further testcase useless\n",file); - return 1; - } - tok = strtok(list, "\0"); - s = fgetxattr(fd, tok, (void*)value, 1024); - if(s == -1) { - perror("fgetxattr"); - return 1; - } - s = fsetxattr(fd, tok, (void*)value, s, 0); - - if (s == -1) { - printf ("User unable to change extended attributes on file %s !\n", argv[1]); - printf("errno = %i\n", errno); - rc = 1; - } - - //s = syscall(237, fd,tok); //fremovexattr -#ifdef __NR_fremovexattr - s = syscall(__NR_fremovexattr, fd,tok); //fremovexattr -#else - s = -1; - errno = ENOSYS; -#endif - if (s == -1) { - printf ("User unable to remove extended attributes file %s !\n", argv[1]); - printf("errno = %i\n", errno); - rc = 1; - } - - close (fd); - return rc; -} diff --git a/client/tests/suite/ltp_fs/kernel_fs/acls/acl_link_test.c b/client/tests/suite/ltp_fs/kernel_fs/acls/acl_link_test.c deleted file mode 100644 index 25f38740a..000000000 --- a/client/tests/suite/ltp_fs/kernel_fs/acls/acl_link_test.c +++ /dev/null @@ -1,52 +0,0 @@ -#include -#include -#include -#include -#include -#include -#include - -int main(int argc, char *argv[]){ - ssize_t s; - char * tok; - char value[1024]; - char list[1024]; - int rc = 0; - - if ( argc < 2) { - printf ("Please enter a file name as argument.\n"); - return -1; - } - - if(-1 == (s = listxattr(argv[1], list, 1024)) ) { - perror("listxattr"); - return 1; - } - if(s == 0) { - printf("No xattrs defined for %s, further testcase useless\n",argv[1]); - return 1; - } - tok = strtok(list, "\0"); - s = getxattr(argv[1], tok, (void*)value, 1024); - if(-1 == s) { - perror("getxattr"); - return -1; - } - - s = lsetxattr(argv[1], tok, (void*)value, s, 0); - - if (s == -1) { - printf ("User unable to change extended attributes %s !\n", argv[1]); - printf("errno = %i\n", errno); - rc = 1; - } - - s = lremovexattr(argv[1],tok); - if (s == -1) { - printf ("User unable to remove extended attributes %s !\n", argv[1]); - printf("errno = %i\n", errno); - rc = 1; - } - - return rc; -} diff --git a/client/tests/suite/ltp_fs/kernel_fs/acls/acl_test01 b/client/tests/suite/ltp_fs/kernel_fs/acls/acl_test01 deleted file mode 100755 index 4643f5fad..000000000 --- a/client/tests/suite/ltp_fs/kernel_fs/acls/acl_test01 +++ /dev/null @@ -1,161 +0,0 @@ -#********************************************************************* -# Copyright (c) International Business Machines Corp., 2003 -# -# 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 pronram; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -# -# -# -# FILE : acls -# -# PURPOSE: Tests extended acls -# -# HISTORY: -# 03/03 Jerone Young (jyoung5@us.ibm.com) -#********************************************************************* -TEST_USER1="acltest1" -TEST_USER1_GROUP="users" -TEST_USER1_PASSWD="ltp_test_pass1" -#ensure the test partition is ACL aware -TEST_USER1_HOMEDIR="`pwd`/$TEST_USER1" - -FILE_ACL="`pwd`/test_file" -FILE_ACL_LINK="`pwd`/test_file_link" - -#----------------------------------------------------------------------- -# FUNCTION: do_setup -#----------------------------------------------------------------------- - -do_setup(){ - - rm -f $FILE_ACL - rm -f $FILE_ACL_LINK - - if [ "$TEST_USER1_HOMEDIR" = "" ] - then { - echo "Could not find user $TEST_USER1's home directory." - exit 1 - } - fi - - rm -rf $TEST_USER1_HOMEDIR - userdel $TEST_USER1 &> /dev/null - sleep 1 - useradd -d $TEST_USER1_HOMEDIR -m -g $TEST_USER1_GROUP $TEST_USER1 -s /bin/sh - - if [ $? != 0 ] - then { - echo "Could not add test user $TEST_USER1." - exit 1 - } - fi - -} - -#----------------------------------------------------------------------- -# FUNCTION: do_cleanup -#----------------------------------------------------------------------- - -do_cleanup() { - if [ "$TEST_USER1_HOMEDIR" = "" ] - then { - echo "Could not remove home directory of the user $TEST_USER1." - exit 1 - } - fi - rm -rf $TEST_USER1_HOMEDIR - userdel $TEST_USER1 - rm -f $FILE_ACL &> /dev/null - rm -f $FILE_ACL_LINK &> /dev/null -} - -#----------------------------------------------------------------------- -# FUNCTION: MAIN -#----------------------------------------------------------------------- - -iam=`whoami` -EXIT_CODE=0 -if [ "z$iam" = "z$TEST_USER1" ] -then - echo "TESTING ACLS FOR 2ND USER $iam" - - #setup files for extended attributes - setfacl -m u:$TEST_USER1:r $FILE_ACL_LINK - setfacl -m u:$TEST_USER1:r $FILE_ACL - - echo "Trying extended acls for files" - ${TCbin}/acl_file_test $FILE_ACL - if [ $? != 0 ] - then - EXIT_CODE=1 - echo "Extended acls for files (FAILED)" - else - echo "Extended acls for files (PASSED)" - fi - - echo "Trying extended acls for file links" - ${TCbin}/acl_link_test $FILE_ACL_LINK - if [ $? != 0 ] - then - EXIT_CODE=1 - echo "Extended acls for links (FAILED)" - else - echo "Extended acls for links (PASSED)" - fi -else - do_setup - echo "TESTING ACLS FOR USER $iam" - - touch $FILE_ACL - touch $FILE_ACL_LINK - - #setup files for extended attributes - setfacl -mu:root:r $FILE_ACL_LINK - setfacl -mu:root:r $FILE_ACL - - echo "Trying extended acls for files" - acl_file_test $FILE_ACL - if [ $? != 0 ] - then - EXIT_CODE=1 - echo "Extended acls for files (FAILED)" - else - echo "Extended acls for files (PASSED)" - fi - - echo "Trying extended acls for file links" - acl_link_test $FILE_ACL_LINK - if [ $? != 0 ] - then - EXIT_CODE=1 - echo "Extended acls for links (FAILED)" - else - echo "Extended acls for links (PASSED)" - fi - - chown $TEST_USER1 $FILE_ACL - chown $TEST_USER1 $FILE_ACL_LINK - - if [ -z ${TCbin} ] - then - export TCbin=$PWD - fi - - su $TEST_USER1 -c "$0" - EXIT_CODE=$? - - do_cleanup -fi - -exit $EXIT_CODE diff --git a/client/tests/suite/ltp_fs/kernel_fs/doio/Makefile b/client/tests/suite/ltp_fs/kernel_fs/doio/Makefile deleted file mode 100644 index 50f2e05a8..000000000 --- a/client/tests/suite/ltp_fs/kernel_fs/doio/Makefile +++ /dev/null @@ -1,28 +0,0 @@ - -CFLAGS+= -Wall -I../../include -D_LARGEFILE64_SOURCE -LDLIBS+= -L../../lib -lltp - -TARGETS=doio growfiles rwtest iogen -SRCS=$(wildcard *.c) -OBJS=$(patsubst %.c,%.o,$(SRCS)) - -all: $(TARGETS) - -doio: doio.o - $(CC) -o $@ $^ -I. $(CFLAGS) $(LDFLAGS) $(LDLIBS) - -growfiles: growfiles.o - $(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) $(LDLIBS) - -iogen: iogen.o - $(CC) -o $@ $^ $(CFLAGS) $(LDFLAGS) $(LDLIBS) - -rwtest: rwtest.sh doio iogen - cp rwtest.sh rwtest - chmod a+rx rwtest - -install: - @set -e; for i in $(TARGETS) ; do ln -f $$i ../../bin/$$i ; done ; - -clean: - rm -f $(OBJS) $(TARGETS) diff --git a/client/tests/suite/ltp_fs/kernel_fs/doio/README b/client/tests/suite/ltp_fs/kernel_fs/doio/README deleted file mode 100644 index 504637d39..000000000 --- a/client/tests/suite/ltp_fs/kernel_fs/doio/README +++ /dev/null @@ -1,79 +0,0 @@ - -$Id: README,v 1.1 2001/08/27 22:15:12 plars Exp $ - -This file contains some very basic information on: - iogen/doio and rwtest - growfiles - -All tools use the -h flag for printing some form of help (sometimes voluminous). -They are extremely configurable; the examples below are some common uses. -Read the help and experiment! This testing tools were originally written -to test UNICOS's NC1 and IRIX XFS filesystems. - - -IOGEN & DOIO -============= - -This is a pair of programs that does basic I/O operations on a set of files. -The file offset, I/O length, I/O operation, and what open(2) flags are -selected randomly from a pre-defined or commandline given set. All data -written can be verified (this is the usual method). - -rwtest is a shell script that is a wrapper of iogen and doio. - -Examples: ---------- -# run forever: 8 process - using record locks -iogen -i 0 100000b:doio_1 | doio -av -n 8 -m 1000 - -# run forever: 8 process - using record locks -iogen -i 0 100000b:doio_2 | doio -akv -n 8 -m 1000 - -# run forever: max i/o 64b, to /tmp/rwtest01%f, which 500b in size -rwtest -c -i 0 -T 64b 500b:/tmp/rwtest01%f - - - -GROWFILES -============= - -Growfiles will create and truncate files in gradual steps using write, and -lseek. All system calls are checked for proper returns. The writes or the -whole file content can be verified. It can cause disk fragmentation. - - -Examples: ---------- -growfiles -E output: -# run forever: writes of 4090 bytes then on every 100 iterval -# truncate file by 408990 bytes. Done to 200 files in dir1. -growfiles -i 0 -g 4090 -T 100 -t 408990 -l -C 10 -c 1000 -d dir1 -S 200 - -# same as above with writes of 5000 bytes and truncs of 499990 -growfiles -i 0 -g 5000 -T 100 -t 499990 -l -C 10 -c 1000 -d dir2 -S 200 - -# runs forever: beats on opens and closes of file ocfile - no io -growfiles -i 0 -g 0 -c 0 -C 0 ocfile - -# writes 4096 to files until 50 blocks are written -growfiles -i 0 -g 4096 -B 50b file1 file2 - -# write one byte to 750 files in gdir then unlinks them -growfiles -g 1 -C 0 -d gdir -u -S 750 - -# run 30 secs: random iosize, random lseek up to eof -# Only valid for one growfile process per file. -growfiles -r 1-5000 -R 0--1 -i 0 -L 30 -C 1 g_rand1 g_rand2 - -# run 30 secs: grow by lseek then write single byte, trunc every 10 itervals -growfiles -g 5000 -wlu -i 0 -L 30 -C 1 -T 10 g_sleek1 g_lseek2 - -# run forever: 5 copies of random iosize, random lseek to beyond eof, -# rand io types doing a trunc every 5 iterations, with unlinks. -growfiles -i0 -r 1-50000 -R 0--2 -I r -C1 -l -n5 -u -U 100-200 gf_rana gf_ranb - -# run forever: 5 copies of random iosize, random lseek to beyond eof, -# random open flags, rand io types doing a trunc every 10 iterations. -growfiles -i0 -r 1-50000 -R 0--2 -o random -I r -C0 -l -T 20 -uU100-200 -n 5 gf_rand1 gf_rand2 - - diff --git a/client/tests/suite/ltp_fs/kernel_fs/doio/doio.c b/client/tests/suite/ltp_fs/kernel_fs/doio/doio.c deleted file mode 100644 index 1d58e63d7..000000000 --- a/client/tests/suite/ltp_fs/kernel_fs/doio/doio.c +++ /dev/null @@ -1,5454 +0,0 @@ -/* - * Copyright (c) 2000 Silicon Graphics, Inc. All Rights Reserved. - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of version 2 of the GNU General Public License as - * published by the Free Software Foundation. - * - * This program is distributed in the hope that it would be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. - * - * Further, this software is distributed without any warranty that it is - * free of the rightful claim of any third person regarding infringement - * or the like. Any license provided herein, whether implied or - * otherwise, applies only to this software file. Patent licenses, if - * any, provided herein do not apply to combinations of this program with - * other software, or any other product whatsoever. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write the Free Software Foundation, Inc., 59 - * Temple Place - Suite 330, Boston MA 02111-1307, USA. - * - * Contact information: Silicon Graphics, Inc., 1600 Amphitheatre Pkwy, - * Mountain View, CA 94043, or: - * - * http://www.sgi.com - * - * For further information regarding this notice, see: - * - * http://oss.sgi.com/projects/GenInfo/NoticeExplan/ - */ -/* - * doio - a general purpose io initiator with system call and - * write logging. See doio.h for the structure which defines - * what doio requests should look like. - * - * Currently doio can handle read,write,reada,writea,ssread, - * sswrite, and many varieties of listio requests. - * For disk io, if the O_SSD flag is set doio will allocate - * the appropriate amount of ssd and do the transfer - thus, doio - * can handle all of the primitive types of file io. - * - * programming - * notes: - * ----------- - * messages should generally be printed using doio_fprintf(). - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#ifdef CRAY -#include -#endif -#ifdef sgi -#include /* for aio_read,write */ -#include /* for uint64_t type */ -#include /* signal handlers & SA_SIGINFO */ -#endif -#ifndef CRAY -#include /* for struct iovec (readv)*/ -#include /* for mmap(2) */ -#include /* for i/o buffer in shared memory */ -#include /* for i/o buffer in shared memory */ -#endif -#include -#ifdef CRAY -#include -#include -#endif -#include /* for delays */ - -#include "doio.h" -#include "write_log.h" -#include "random_range.h" -#include "string_to_tokens.h" - -#ifndef O_SSD -#define O_SSD 0 /* so code compiles on a CRAY2 */ -#endif - -#ifdef sgi -#define UINT64_T uint64_t -#else -#define UINT64_T unsigned long -#endif - -#ifndef O_PARALLEL -#define O_PARALLEL 0 /* so O_PARALLEL may be used in expressions */ -#endif - -#define PPID_CHECK_INTERVAL 5 /* check ppid every <-- iterations */ -#define MAX_AIO 256 /* maximum number of async I/O ops */ -#ifdef _CRAYMPP -#define MPP_BUMP 16 /* page un-alignment for MPP */ -#else -#define MPP_BUMP 0 -#endif - - -#define SYSERR strerror(errno) - -/* - * getopt() string of supported cmdline arguments. - */ - -#define OPTS "aC:d:ehm:n:kr:w:vU:V:M:N:" - -#define DEF_RELEASE_INTERVAL 0 - -/* - * Flags set in parse_cmdline() to indicate which options were selected - * on the cmdline. - */ - -int a_opt = 0; /* abort on data compare errors */ -int e_opt = 0; /* exec() after fork()'ing */ -int C_opt = 0; /* Data Check Type */ -int d_opt = 0; /* delay between operations */ -int k_opt = 0; /* lock file regions during writes */ -int m_opt = 0; /* generate periodic messages */ -int n_opt = 0; /* nprocs */ -int r_opt = 0; /* resource release interval */ -int w_opt = 0; /* file write log file */ -int v_opt = 0; /* verify writes if set */ -int U_opt = 0; /* upanic() on varios conditions */ -int V_opt = 0; /* over-ride default validation fd type */ -int M_opt = 0; /* data buffer allocation types */ -char TagName[40]; /* name of this doio (see Monster) */ - - -/* - * Misc globals initialized in parse_cmdline() - */ - -char *Prog = NULL; /* set up in parse_cmdline() */ -int Upanic_Conditions; /* set by args to -U */ -int Release_Interval; /* arg to -r */ -int Nprocs; /* arg to -n */ -char *Write_Log; /* arg to -w */ -char *Infile; /* input file (defaults to stdin) */ -int *Children; /* pids of child procs */ -int Nchildren = 0; -int Nsiblings = 0; /* tfork'ed siblings */ -int Execd = 0; -int Message_Interval = 0; -int Npes = 0; /* non-zero if built as an mpp multi-pe app */ -int Vpe = -1; /* Virtual pe number if Npes >= 0 */ -int Reqno = 1; /* request # - used in some error messages */ -int Reqskipcnt = 0; /* count of I/O requests that are skipped */ -int Validation_Flags; -char *(*Data_Check)(); /* function to call for data checking */ -int (*Data_Fill)(); /* function to call for data filling */ -int Nmemalloc = 0; /* number of memory allocation strategies */ -int delayop = 0; /* delay between operations - type of delay */ -int delaytime = 0; /* delay between operations - how long */ - -struct wlog_file Wlog; - -int active_mmap_rw = 0; /* Indicates that mmapped I/O is occurring. */ - /* Used by sigbus_action() in the child doio. */ -int havesigint = 0; - -#define SKIP_REQ -2 /* skip I/O request */ - -#define NMEMALLOC 32 -#define MEM_DATA 1 /* data space */ -#define MEM_SHMEM 2 /* System V shared memory */ -#define MEM_T3ESHMEM 3 /* T3E Shared Memory */ -#define MEM_MMAP 4 /* mmap(2) */ - -#define MEMF_PRIVATE 0001 -#define MEMF_AUTORESRV 0002 -#define MEMF_LOCAL 0004 -#define MEMF_SHARED 0010 - -#define MEMF_FIXADDR 0100 -#define MEMF_ADDR 0200 -#define MEMF_AUTOGROW 0400 -#define MEMF_FILE 01000 /* regular file -- unlink on close */ -#define MEMF_MPIN 010000 /* use mpin(2) to lock pages in memory */ - -struct memalloc { - int memtype; - int flags; - int nblks; - char *name; - void *space; /* memory address of allocated space */ - int fd; /* FD open for mmaping */ - int size; -} Memalloc[NMEMALLOC]; - -/* - * Global file descriptors - */ - -int Wfd_Append; /* for appending to the write-log */ -int Wfd_Random; /* for overlaying write-log entries */ - -/* - * Structure for maintaining open file test descriptors. Used by - * alloc_fd(). - */ - -struct fd_cache { - char c_file[MAX_FNAME_LENGTH+1]; - int c_oflags; - int c_fd; - long c_rtc; -#ifdef sgi - int c_memalign; /* from F_DIOINFO */ - int c_miniosz; - int c_maxiosz; -#endif -#ifndef CRAY - void *c_memaddr; /* mmapped address */ - int c_memlen; /* length of above region */ -#endif -}; - -#define FD_ALLOC_INCR 32 /* allocate this many fd_map structs */ - /* at a time */ - -/* - * Globals for tracking Sds and Core usage - */ - -char *Memptr; /* ptr to core buffer space */ -int Memsize; /* # bytes pointed to by Memptr */ - /* maintained by alloc_mem() */ - -int Sdsptr; /* sds offset (always 0) */ -int Sdssize; /* # bytes of allocated sds space */ - /* Maintained by alloc_sds() */ -char Host[16]; -char Pattern[128]; -int Pattern_Length; - -/* - * Signal handlers, and related globals - */ - -void sigint_handler(); /* Catch SIGINT in parent doio, propagate - * to children, does not die. */ - -void die_handler(); /* Bad sig in child doios, exit 1. */ -void cleanup_handler(); /* Normal kill, exit 0. */ - -#ifndef CRAY -void sigbus_handler(); /* Handle sigbus--check active_mmap_rw to - decide if this should be a normal exit. */ -#endif - -void cb_handler(); /* Posix aio callback handler. */ -void noop_handler(); /* Delayop alarm, does nothing. */ -char *hms(); -char *format_rw(); -char *format_sds(); -char *format_listio(); -char *check_file(); -int doio_fprintf(FILE *stream, char *format, ...); -void doio_upanic(); -void doio(); -void help(); -void doio_delay(); -int alloc_fd( char *, int ); -int alloc_mem( int ); -int do_read( struct io_req * ); -int do_write( struct io_req * ); -int do_rw( struct io_req * ); -int do_sync( struct io_req * ); -int usage( FILE * ); -int aio_unregister( int ); -int pattern_check(char *buf, int buflen, char *pat, int patlen, int patshift); -int pattern_fill(char *buf, int buflen, char *pat, int patlen, int patshift); -int parse_cmdline( int, char **, char * ); -int lock_file_region( char *, int, int, int, int ); -struct fd_cache *alloc_fdcache(char *, int); - -/* - * Upanic conditions, and a map from symbolics to values - */ - -#define U_CORRUPTION 0001 /* upanic on data corruption */ -#define U_IOSW 0002 /* upanic on bad iosw */ -#define U_RVAL 0004 /* upanic on bad rval */ - -#define U_ALL (U_CORRUPTION | U_IOSW | U_RVAL) - -/* - * Name-To-Value map - * Used to map cmdline arguments to values - */ -struct smap { - char *string; - int value; -}; - -struct smap Upanic_Args[] = { - { "corruption", U_CORRUPTION }, - { "iosw", U_IOSW }, - { "rval", U_RVAL }, - { "all", U_ALL }, - { NULL, 0 } -}; - -struct aio_info { - int busy; - int id; - int fd; - int strategy; - volatile int done; -#ifdef CRAY - struct iosw iosw; -#endif -#ifdef sgi - aiocb_t aiocb; - int aio_ret; /* from aio_return */ - int aio_errno; /* from aio_error */ -#endif - int sig; - int signalled; - struct sigaction osa; -}; - -struct aio_info Aio_Info[MAX_AIO]; - -struct aio_info *aio_slot(); -int aio_done( struct aio_info * ); - -/* -C data-fill/check type */ -#define C_DEFAULT 1 -struct smap checkmap[] = { - { "default", C_DEFAULT }, - { NULL, 0 }, -}; - -/* -d option delay types */ -#define DELAY_SELECT 1 -#define DELAY_SLEEP 2 -#define DELAY_SGINAP 3 -#define DELAY_ALARM 4 -#define DELAY_ITIMER 5 /* POSIX timer */ - -struct smap delaymap[] = { - { "select", DELAY_SELECT }, - { "sleep", DELAY_SLEEP }, -#ifdef sgi - { "sginap", DELAY_SGINAP }, -#endif - { "alarm", DELAY_ALARM }, - { NULL, 0 }, -}; - -/****** -* -* strerror() does similar actions. - -char * -syserrno(int err) -{ - static char sys_errno[10]; - sprintf(sys_errno, "%d", errno); - return(sys_errno); -} - -******/ - -int -main(argc, argv) -int argc; -char **argv; -{ - int i, pid, stat, ex_stat; -#ifdef CRAY - sigset_t omask; -#else - int omask; -#endif - struct sigaction sa; - - umask(0); /* force new file modes to known values */ -#if _CRAYMPP - Npes = sysconf(_SC_CRAY_NPES); /* must do this before parse_cmdline */ - Vpe = sysconf(_SC_CRAY_VPE); -#endif - - TagName[0] = '\0'; - parse_cmdline(argc, argv, OPTS); - - random_range_seed(getpid()); /* initialize random number generator */ - - /* - * If this is a re-exec of doio, jump directly into the doio function. - */ - - if (Execd) { - doio(); - exit(E_SETUP); - } - - /* - * Stop on all but a few signals... - */ - sigemptyset(&sa.sa_mask); - sa.sa_handler = sigint_handler; - sa.sa_flags = SA_RESETHAND; /* sigint is ignored after the */ - /* first time */ - for (i = 1; i <= NSIG; i++) { - switch(i) { -#ifdef SIGRECOVERY - case SIGRECOVERY: - break; -#endif -#ifdef SIGCKPT - case SIGCKPT: -#endif -#ifdef SIGRESTART - case SIGRESTART: -#endif - case SIGTSTP: - case SIGSTOP: - case SIGCONT: - case SIGCLD: - case SIGBUS: - case SIGSEGV: - case SIGQUIT: - break; - default: - sigaction(i, &sa, NULL); - } - } - - /* - * If we're logging write operations, make a dummy call to wlog_open - * to initialize the write history file. This call must be done in - * the parent, to ensure that the history file exists and/or has - * been truncated before any children attempt to open it, as the doio - * children are not allowed to truncate the file. - */ - - if (w_opt) { - strcpy(Wlog.w_file, Write_Log); - - if (wlog_open(&Wlog, 1, 0666) < 0) { - doio_fprintf(stderr, - "Could not create/truncate write log %s\n", - Write_Log); - exit(2); - } - - wlog_close(&Wlog); - } - - /* - * Malloc space for the children pid array. Initialize all entries - * to -1. - */ - - Children = (int *)malloc(sizeof(int) * Nprocs); - for (i = 0; i < Nprocs; i++) { - Children[i] = -1; - } - - omask = sigblock(sigmask(SIGCLD)); - - /* - * Fork Nprocs. This [parent] process is a watchdog, to notify the - * invoker of procs which exit abnormally, and to make sure that all - * child procs get cleaned up. If the -e option was used, we will also - * re-exec. This is mostly for unicos/mk on mpp's, to ensure that not - * all of the doio's don't end up in the same pe. - * - * Note - if Nprocs is 1, or this doio is a multi-pe app (Npes > 1), - * jump directly to doio(). multi-pe apps can't fork(), and there is - * no reason to fork() for 1 proc. - */ - - if (Nprocs == 1 || Npes > 1) { - doio(); - exit(0); - } else { - for (i = 0; i < Nprocs; i++) { - if ((pid = fork()) == -1) { - doio_fprintf(stderr, - "(parent) Could not fork %d children: %s (%d)\n", - i+1, SYSERR, errno); - exit(E_SETUP); - } - - Children[Nchildren] = pid; - Nchildren++; - - if (pid == 0) { - if (e_opt) { - char *exec_path; - - exec_path = argv[0]; - argv[0] = (char *)malloc(strlen(exec_path + 1)); - sprintf(argv[0], "-%s", exec_path); - - execvp(exec_path, argv); - doio_fprintf(stderr, - "(parent) Could not execvp %s: %s (%d)\n", - exec_path, SYSERR, errno); - exit(E_SETUP); - } else { - doio(); - exit(E_SETUP); - } - } - } - - /* - * Parent spins on wait(), until all children exit. - */ - - ex_stat = E_NORMAL; - - while (Nprocs) { - if ((pid = wait(&stat)) == -1) { - if (errno == EINTR) - continue; - } - - for (i = 0; i < Nchildren; i++) - if (Children[i] == pid) - Children[i] = -1; - - Nprocs--; - - if (WIFEXITED(stat)) { - switch (WEXITSTATUS(stat)) { - case E_NORMAL: - /* noop */ - break; - - case E_INTERNAL: - doio_fprintf(stderr, - "(parent) pid %d exited because of an internal error\n", - pid); - ex_stat |= E_INTERNAL; - break; - - case E_SETUP: - doio_fprintf(stderr, - "(parent) pid %d exited because of a setup error\n", - pid); - ex_stat |= E_SETUP; - break; - - case E_COMPARE: - doio_fprintf(stderr, - "(parent) pid %d exited because of data compare errors\n", - pid); - - ex_stat |= E_COMPARE; - - if (a_opt) - kill(0, SIGINT); - - break; - - case E_USAGE: - doio_fprintf(stderr, - "(parent) pid %d exited because of a usage error\n", - pid); - - ex_stat |= E_USAGE; - break; - - default: - doio_fprintf(stderr, - "(parent) pid %d exited with unknown status %d\n", - pid, WEXITSTATUS(stat)); - ex_stat |= E_INTERNAL; - break; - } - } else if (WIFSIGNALED(stat) && WTERMSIG(stat) != SIGINT) { - doio_fprintf(stderr, - "(parent) pid %d terminated by signal %d\n", - pid, WTERMSIG(stat)); - - ex_stat |= E_SIGNAL; - } - - fflush(NULL); - } - } - - exit(ex_stat); - -} /* main */ - -/* - * main doio function. Each doio child starts here, and never returns. - */ - -void -doio() -{ - int rval, i, infd, nbytes; - char *cp; - struct io_req ioreq; - struct sigaction sa, def_action, ignore_action, exit_action; -#ifndef CRAY - struct sigaction sigbus_action; -#endif - - Memsize = Sdssize = 0; - - /* - * Initialize the Pattern - write-type syscalls will replace Pattern[1] - * with the pattern passed in the request. Make sure that - * strlen(Pattern) is not mod 16 so that out of order words will be - * detected. - */ - - gethostname(Host, sizeof(Host)); - if ((cp = strchr(Host, '.')) != NULL) - *cp = '\0'; - - Pattern_Length = sprintf(Pattern, "-:%d:%s:%s*", getpid(), Host, Prog); - - if (!(Pattern_Length % 16)) { - Pattern_Length = sprintf(Pattern, "-:%d:%s:%s**", - getpid(), Host, Prog); - } - - /* - * Open a couple of descriptors for the write-log file. One descriptor - * is for appending, one for random access. Write logging is done for - * file corruption detection. The program doio_check is capable of - * doing corruption detection based on a doio write-log. - */ - - if (w_opt) { - - strcpy(Wlog.w_file, Write_Log); - - if (wlog_open(&Wlog, 0, 0666) == -1) { - doio_fprintf(stderr, - "Could not open write log file (%s): wlog_open() failed\n", - Write_Log); - exit(E_SETUP); - } - } - - /* - * Open the input stream - either a file or stdin - */ - - if (Infile == NULL) { - infd = 0; - } else { - if ((infd = open(Infile, O_RDWR)) == -1) { - doio_fprintf(stderr, - "Could not open input file (%s): %s (%d)\n", - Infile, SYSERR, errno); - exit(E_SETUP); - } - } - - /* - * Define a set of signals that should never be masked. Receipt of - * these signals generally indicates a programming error, and we want - * a corefile at the point of error. We put SIGQUIT in this list so - * that ^\ will force a user core dump. - * - * Note: the handler for these should be SIG_DFL, all of them - * produce a corefile as the default action. - */ - - ignore_action.sa_handler = SIG_IGN; - ignore_action.sa_flags = 0; - sigemptyset(&ignore_action.sa_mask); - - def_action.sa_handler = SIG_DFL; - def_action.sa_flags = 0; - sigemptyset(&def_action.sa_mask); - -#ifdef sgi - exit_action.sa_sigaction = cleanup_handler; - exit_action.sa_flags = SA_SIGINFO; - sigemptyset(&exit_action.sa_mask); - - sa.sa_sigaction = die_handler; - sa.sa_flags = SA_SIGINFO; - sigemptyset(&sa.sa_mask); - - sigbus_action.sa_sigaction = sigbus_handler; - sigbus_action.sa_flags = SA_SIGINFO; - sigemptyset(&sigbus_action.sa_mask); -#else - exit_action.sa_handler = cleanup_handler; - exit_action.sa_flags = 0; - sigemptyset(&exit_action.sa_mask); - - sa.sa_handler = die_handler; - sa.sa_flags = 0; - sigemptyset(&sa.sa_mask); - -#ifndef CRAY - sigbus_action.sa_handler = sigbus_handler; - sigbus_action.sa_flags = 0; - sigemptyset(&sigbus_action.sa_mask); -#endif -#endif - - for (i = 1; i <= NSIG; i++) { - switch(i) { - /* Signals to terminate program on */ - case SIGINT: - sigaction(i, &exit_action, NULL); - break; - -#ifndef CRAY - /* This depends on active_mmap_rw */ - case SIGBUS: - sigaction(i, &sigbus_action, NULL); - break; -#endif - - /* Signals to Ignore... */ - case SIGSTOP: - case SIGCONT: -#ifdef SIGRECOVERY - case SIGRECOVERY: -#endif - sigaction(i, &ignore_action, NULL); - break; - - /* Signals to trap & report & die */ - /*case SIGTRAP:*/ - /*case SIGABRT:*/ -#ifdef SIGERR /* cray only signals */ - case SIGERR: - case SIGBUFIO: - case SIGINFO: -#endif - /*case SIGFPE:*/ - case SIGURG: - case SIGHUP: - case SIGTERM: - case SIGPIPE: - case SIGIO: - case SIGUSR1: - case SIGUSR2: - sigaction(i, &sa, NULL); - break; - - - /* Default Action for all other signals */ - default: - sigaction(i, &def_action, NULL); - break; - } - } - - /* - * Main loop - each doio proc does this until the read returns eof (0). - * Call the appropriate io function based on the request type. - */ - - while ((nbytes = read(infd, (char *)&ioreq, sizeof(ioreq)))) { - - /* - * Periodically check our ppid. If it is 1, the child exits to - * help clean up in the case that the main doio process was - * killed. - */ - - if (Reqno && ((Reqno % PPID_CHECK_INTERVAL) == 0)) { - if (getppid() == 1) { - doio_fprintf(stderr, - "Parent doio process has exited\n"); - alloc_mem(-1); - exit(E_SETUP); - } - } - - if (nbytes == -1) { - doio_fprintf(stderr, - "read of %d bytes from input failed: %s (%d)\n", - sizeof(ioreq), SYSERR, errno); - alloc_mem(-1); - exit(E_SETUP); - } - - if (nbytes != sizeof(ioreq)) { - doio_fprintf(stderr, - "read wrong # bytes from input stream, expected %d, got %d\n", - sizeof(ioreq), nbytes); - alloc_mem(-1); - exit(E_SETUP); - } - - if (ioreq.r_magic != DOIO_MAGIC) { - doio_fprintf(stderr, - "got a bad magic # from input stream. Expected 0%o, got 0%o\n", - DOIO_MAGIC, ioreq.r_magic); - alloc_mem(-1); - exit(E_SETUP); - } - - /* - * If we're on a Release_Interval multiple, relase all ssd and - * core space, and close all fd's in Fd_Map[]. - */ - - if (Reqno && Release_Interval && ! (Reqno%Release_Interval)) { - if (Memsize) { -#ifdef NOTDEF - sbrk(-1 * Memsize); -#else - alloc_mem(-1); -#endif - } - -#ifdef _CRAY1 - if (Sdssize) { - ssbreak(-1 * btoc(Sdssize)); - Sdsptr = 0; - Sdssize = 0; - } -#endif /* _CRAY1 */ - - alloc_fd(NULL, 0); - } - - switch (ioreq.r_type) { - case READ: - case READA: - rval = do_read(&ioreq); - break; - - case WRITE: - case WRITEA: - rval = do_write(&ioreq); - break; - - case READV: - case AREAD: - case PREAD: - case LREAD: - case LREADA: - case LSREAD: - case LSREADA: - case WRITEV: - case AWRITE: - case PWRITE: - case MMAPR: - case MMAPW: - case LWRITE: - case LWRITEA: - case LSWRITE: - case LSWRITEA: - case LEREAD: - case LEREADA: - case LEWRITE: - case LEWRITEA: - rval = do_rw(&ioreq); - break; - -#ifdef CRAY - case SSREAD: - case SSWRITE: - rval = do_ssdio(&ioreq); - break; - - case LISTIO: - rval = do_listio(&ioreq); - break; -#endif - -#ifdef sgi - case RESVSP: - case UNRESVSP: -#ifdef F_FSYNC - case DFFSYNC: -#endif - rval = do_fcntl(&ioreq); - break; -#endif /* sgi */ - -#ifndef CRAY - case FSYNC2: - case FDATASYNC: - rval = do_sync(&ioreq); - break; -#endif - default: - doio_fprintf(stderr, - "Don't know how to handle io request type %d\n", - ioreq.r_type); - alloc_mem(-1); - exit(E_SETUP); - } - - if (rval == SKIP_REQ){ - Reqskipcnt++; - } - else if (rval != 0) { - alloc_mem(-1); - doio_fprintf(stderr, - "doio(): operation %d returned != 0\n", - ioreq.r_type); - exit(E_SETUP); - } - - if (Message_Interval && Reqno % Message_Interval == 0) { - doio_fprintf(stderr, "Info: %d requests done (%d skipped) by this process\n", Reqno, Reqskipcnt); - } - - Reqno++; - - if(delayop != 0) - doio_delay(); - } - - /* - * Child exits normally - */ - alloc_mem(-1); - exit(E_NORMAL); - -} /* doio */ - -void -doio_delay() -{ - struct timeval tv_delay; - struct sigaction sa_al, sa_old; - sigset_t al_mask; - - switch(delayop) { - case DELAY_SELECT: - tv_delay.tv_sec = delaytime / 1000000; - tv_delay.tv_usec = delaytime % 1000000; - /*doio_fprintf(stdout, "delay_select: %d %d\n", - tv_delay.tv_sec, tv_delay.tv_usec);*/ - select(0, NULL, NULL, NULL, &tv_delay); - break; - - case DELAY_SLEEP: - sleep(delaytime); - break; - -#ifdef sgi - case DELAY_SGINAP: - sginap(delaytime); - break; -#endif - - case DELAY_ALARM: - sa_al.sa_flags = 0; - sa_al.sa_handler = noop_handler; - sigemptyset(&sa_al.sa_mask); - sigaction(SIGALRM, &sa_al, &sa_old); - sigemptyset(&al_mask); - alarm(delaytime); - sigsuspend(&al_mask); - sigaction(SIGALRM, &sa_old, 0); - break; - } -} - - -/* - * Format IO requests, returning a pointer to the formatted text. - * - * format_strat - formats the async i/o completion strategy - * format_rw - formats a read[a]/write[a] request - * format_sds - formats a ssread/sswrite request - * format_listio- formats a listio request - * - * ioreq is the doio io request structure. - */ - -struct smap sysnames[] = { - { "READ", READ }, - { "WRITE", WRITE }, - { "READA", READA }, - { "WRITEA", WRITEA }, - { "SSREAD", SSREAD }, - { "SSWRITE", SSWRITE }, - { "LISTIO", LISTIO }, - { "LREAD", LREAD }, - { "LREADA", LREADA }, - { "LWRITE", LWRITE }, - { "LWRITEA", LWRITEA }, - { "LSREAD", LSREAD }, - { "LSREADA", LSREADA }, - { "LSWRITE", LSWRITE }, - { "LSWRITEA", LSWRITEA }, - - /* Irix System Calls */ - { "PREAD", PREAD }, - { "PWRITE", PWRITE }, - { "AREAD", AREAD }, - { "AWRITE", AWRITE }, - { "LLREAD", LLREAD }, - { "LLAREAD", LLAREAD }, - { "LLWRITE", LLWRITE }, - { "LLAWRITE", LLAWRITE }, - { "RESVSP", RESVSP }, - { "UNRESVSP", UNRESVSP }, - { "DFFSYNC", DFFSYNC }, - - /* Irix and Linux System Calls */ - { "READV", READV }, - { "WRITEV", WRITEV }, - { "MMAPR", MMAPR }, - { "MMAPW", MMAPW }, - { "FSYNC2", FSYNC2 }, - { "FDATASYNC", FDATASYNC }, - - { "unknown", -1 }, -}; - -struct smap aionames[] = { - { "poll", A_POLL }, - { "signal", A_SIGNAL }, - { "recall", A_RECALL }, - { "recalla", A_RECALLA }, - { "recalls", A_RECALLS }, - { "suspend", A_SUSPEND }, - { "callback", A_CALLBACK }, - { "synch", 0 }, - { "unknown", -1 }, -}; - -char * -format_oflags(int oflags) -{ - char flags[255]; - - - flags[0]='\0'; - switch(oflags & 03) { - case O_RDONLY: strcat(flags,"O_RDONLY,"); break; - case O_WRONLY: strcat(flags,"O_WRONLY,"); break; - case O_RDWR: strcat(flags,"O_RDWR,"); break; - default: strcat(flags,"O_weird"); break; - } - - if(oflags & O_EXCL) - strcat(flags,"O_EXCL,"); - - if(oflags & O_SYNC) - strcat(flags,"O_SYNC,"); -#ifdef CRAY - if(oflags & O_RAW) - strcat(flags,"O_RAW,"); - if(oflags & O_WELLFORMED) - strcat(flags,"O_WELLFORMED,"); -#ifdef O_SSD - if(oflags & O_SSD) - strcat(flags,"O_SSD,"); -#endif - if(oflags & O_LDRAW) - strcat(flags,"O_LDRAW,"); - if(oflags & O_PARALLEL) - strcat(flags,"O_PARALLEL,"); - if(oflags & O_BIG) - strcat(flags,"O_BIG,"); - if(oflags & O_PLACE) - strcat(flags,"O_PLACE,"); - if(oflags & O_ASYNC) - strcat(flags,"O_ASYNC,"); -#endif - -#ifdef sgi - if(oflags & O_DIRECT) - strcat(flags,"O_DIRECT,"); - if(oflags & O_DSYNC) - strcat(flags,"O_DSYNC,"); - if(oflags & O_RSYNC) - strcat(flags,"O_RSYNC,"); -#endif - - return(strdup(flags)); -} - -char * -format_strat(int strategy) -{ - char msg[64]; - char *aio_strat; - - switch (strategy) { - case A_POLL: aio_strat = "POLL"; break; - case A_SIGNAL: aio_strat = "SIGNAL"; break; - case A_RECALL: aio_strat = "RECALL"; break; - case A_RECALLA: aio_strat = "RECALLA"; break; - case A_RECALLS: aio_strat = "RECALLS"; break; - case A_SUSPEND: aio_strat = "SUSPEND"; break; - case A_CALLBACK: aio_strat = "CALLBACK"; break; - case 0: aio_strat = ""; break; - default: - sprintf(msg, "", strategy); - aio_strat = strdup(msg); - break; - } - - return(aio_strat); -} - -char * -format_rw( - struct io_req *ioreq, - int fd, - void *buffer, - int signo, - char *pattern, -#ifdef CRAY - struct iosw *iosw -#else - void *iosw -#endif - ) -{ - static char *errbuf=NULL; - char *aio_strat, *cp; - struct read_req *readp = &ioreq->r_data.read; - struct write_req *writep = &ioreq->r_data.write; - struct read_req *readap = &ioreq->r_data.read; - struct write_req *writeap = &ioreq->r_data.write; - - if(errbuf == NULL) - errbuf = (char *)malloc(32768); - - cp = errbuf; - cp += sprintf(cp, "Request number %d\n", Reqno); - - switch (ioreq->r_type) { - case READ: - cp += sprintf(cp, "syscall: read(%d, %#lo, %d)\n", - fd, (unsigned long) buffer, readp->r_nbytes); - cp += sprintf(cp, " fd %d is file %s - open flags are %#o\n", - fd, readp->r_file, readp->r_oflags); - cp += sprintf(cp, " read done at file offset %d\n", - readp->r_offset); - break; - - case WRITE: - cp += sprintf(cp, "syscall: write(%d, %#lo, %d)\n", - fd, (unsigned long) buffer, writep->r_nbytes); - cp += sprintf(cp, " fd %d is file %s - open flags are %#o\n", - fd, writep->r_file, writep->r_oflags); - cp += sprintf(cp, " write done at file offset %d - pattern is %s\n", - writep->r_offset, pattern); - break; - - case READA: - aio_strat = format_strat(readap->r_aio_strat); - - cp += sprintf(cp, "syscall: reada(%d, %#lo, %d, %#lo, %d)\n", - fd, (unsigned long) buffer, readap->r_nbytes, - (unsigned long) iosw, signo); - cp += sprintf(cp, " fd %d is file %s - open flags are %#o\n", - fd, readap->r_file, readp->r_oflags); - cp += sprintf(cp, " reada done at file offset %d\n", - readap->r_offset); - cp += sprintf(cp, " async io completion strategy is %s\n", - aio_strat); - break; - - case WRITEA: - aio_strat = format_strat(writeap->r_aio_strat); - - cp += sprintf(cp, "syscall: writea(%d, %#lo, %d, %#lo, %d)\n", - fd, (unsigned long) buffer, writeap->r_nbytes, - (unsigned long) iosw, signo); - cp += sprintf(cp, " fd %d is file %s - open flags are %#o\n", - fd, writeap->r_file, writeap->r_oflags); - cp += sprintf(cp, " writea done at file offset %d - pattern is %s\n", - writeap->r_offset, pattern); - cp += sprintf(cp, " async io completion strategy is %s\n", - aio_strat); - break; - - } - - return errbuf; -} - -#ifdef CRAY -char * -format_sds( - struct io_req *ioreq, - void *buffer, - int sds, - char *pattern - ) -{ - int i; - static char *errbuf=NULL; - char *cp; - - struct ssread_req *ssreadp = &ioreq->r_data.ssread; - struct sswrite_req *sswritep = &ioreq->r_data.sswrite; - - if(errbuf == NULL) - errbuf = (char *)malloc(32768); - - cp = errbuf; - cp += sprintf(cp, "Request number %d\n", Reqno); - - - switch (ioreq->r_type) { - case SSREAD: - cp += sprintf(cp, "syscall: ssread(%#o, %#o, %d)\n", - buffer, sds, ssreadp->r_nbytes); - break; - - case SSWRITE: - cp += sprintf(cp, "syscall: sswrite(%#o, %#o, %d) - pattern was %s\n", - buffer, sds, sswritep->r_nbytes, pattern); - break; - } - return errbuf; -} -#endif /* CRAY */ - -/* - * Perform the various sorts of disk reads - */ - -int -do_read(req) -struct io_req *req; -{ - int fd, offset, nbytes, oflags, rval; - char *addr, *file; -#ifdef CRAY - struct aio_info *aiop; - int aio_id, aio_strat, signo; -#endif -#ifdef sgi - struct fd_cache *fdc; -#endif - - /* - * Initialize common fields - assumes r_oflags, r_file, r_offset, and - * r_nbytes are at the same offset in the read_req and reada_req - * structures. - */ - - file = req->r_data.read.r_file; - oflags = req->r_data.read.r_oflags; - offset = req->r_data.read.r_offset; - nbytes = req->r_data.read.r_nbytes; - - /*printf("read: %s, %#o, %d %d\n", file, oflags, offset, nbytes);*/ - - /* - * Grab an open file descriptor - * Note: must be done before memory allocation so that the direct i/o - * information is available in mem. allocate - */ - - if ((fd = alloc_fd(file, oflags)) == -1) - return -1; - - /* - * Allocate core or sds - based on the O_SSD flag - */ - -#ifndef wtob -#define wtob(x) (x * sizeof(UINT64_T)) -#endif - -#ifdef CRAY - if (oflags & O_SSD) { - if (alloc_sds(nbytes) == -1) - return -1; - - addr = (char *)Sdsptr; - } else { - if ((rval = alloc_mem(nbytes + wtob(1) * 2 + MPP_BUMP * sizeof(UINT64_T))) < 0) { - return rval; - } - - addr = Memptr; - - /* - * if io is not raw, bump the offset by a random amount - * to generate non-word-aligned io. - */ - if (! (req->r_data.read.r_uflags & F_WORD_ALIGNED)) { - addr += random_range(0, wtob(1) - 1, 1, NULL); - } - } -#else -#ifdef sgi - /* get memory alignment for using DIRECT I/O */ - fdc = alloc_fdcache(file, oflags); - - if ((rval = alloc_mem(nbytes + wtob(1) * 2 + fdc->c_memalign)) < 0) { - return rval; - } - - addr = Memptr; - - - if( (req->r_data.read.r_uflags & F_WORD_ALIGNED) ) { - /* - * Force memory alignment for Direct I/O - */ - if( (oflags & O_DIRECT) && ((long)addr % fdc->c_memalign != 0) ) { - addr += fdc->c_memalign - ((long)addr % fdc->c_memalign); - } - } else { - addr += random_range(0, wtob(1) - 1, 1, NULL); - } -#else - /* what is !CRAY && !sgi ? */ - if ((rval = alloc_mem(nbytes + wtob(1) * 2)) < 0) { - return rval; - } - - addr = Memptr; -#endif /* !CRAY && sgi */ -#endif /* CRAY */ - - - switch (req->r_type) { - case READ: - /* move to the desired file position. */ - if (lseek(fd, offset, SEEK_SET) == -1) { - doio_fprintf(stderr, - "lseek(%d, %d, SEEK_SET) failed: %s (%d)\n", - fd, offset, SYSERR, errno); - return -1; - } - - if ((rval = read(fd, addr, nbytes)) == -1) { - doio_fprintf(stderr, - "read() request failed: %s (%d)\n%s\n", - SYSERR, errno, - format_rw(req, fd, addr, -1, NULL, NULL)); - doio_upanic(U_RVAL); - return -1; - } else if (rval != nbytes) { - doio_fprintf(stderr, - "read() request returned wrong # of bytes - expected %d, got %d\n%s\n", - nbytes, rval, - format_rw(req, fd, addr, -1, NULL, NULL)); - doio_upanic(U_RVAL); - return -1; - } - break; - -#ifdef CRAY - case READA: - /* - * Async read - */ - - /* move to the desired file position. */ - if (lseek(fd, offset, SEEK_SET) == -1) { - doio_fprintf(stderr, - "lseek(%d, %d, SEEK_SET) failed: %s (%d)\n", - fd, offset, SYSERR, errno); - return -1; - } - - aio_strat = req->r_data.read.r_aio_strat; - signo = (aio_strat == A_SIGNAL) ? SIGUSR1 : 0; - - aio_id = aio_register(fd, aio_strat, signo); - aiop = aio_slot(aio_id); - - if (reada(fd, addr, nbytes, &aiop->iosw, signo) == -1) { - doio_fprintf(stderr, "reada() failed: %s (%d)\n%s\n", - SYSERR, errno, - format_rw(req, fd, addr, signo, NULL, &aiop->iosw)); - aio_unregister(aio_id); - doio_upanic(U_RVAL); - rval = -1; - } else { - /* - * Wait for io to complete - */ - - aio_wait(aio_id); - - /* - * make sure the io completed without error - */ - - if (aiop->iosw.sw_count != nbytes) { - doio_fprintf(stderr, - "Bad iosw from reada()\nExpected (%d,%d,%d), got (%d,%d,%d)\n%s\n", - 1, 0, nbytes, - aiop->iosw.sw_flag, - aiop->iosw.sw_error, - aiop->iosw.sw_count, - format_rw(req, fd, addr, signo, NULL, &aiop->iosw)); - aio_unregister(aio_id); - doio_upanic(U_IOSW); - rval = -1; - } else { - aio_unregister(aio_id); - rval = 0; - } - } - - if (rval == -1) - return rval; - break; -#endif /* CRAY */ - } - - return 0; /* if we get here, everything went ok */ -} - -/* - * Perform the verious types of disk writes. - */ - -int -do_write(req) -struct io_req *req; -{ - static int pid = -1; - int fd, nbytes, oflags, signo; - int logged_write, rval, got_lock; - long offset, woffset; - char *addr, pattern, *file, *msg; - struct wlog_rec wrec; -#ifdef CRAY - int aio_strat, aio_id; - struct aio_info *aiop; -#endif -#ifdef sgi - struct fd_cache *fdc; -#endif - - /* - * Misc variable setup - */ - - signo = 0; - nbytes = req->r_data.write.r_nbytes; - offset = req->r_data.write.r_offset; - pattern = req->r_data.write.r_pattern; - file = req->r_data.write.r_file; - oflags = req->r_data.write.r_oflags; - - /*printf("pwrite: %s, %#o, %d %d\n", file, oflags, offset, nbytes);*/ - - /* - * Allocate core memory and possibly sds space. Initialize the data - * to be written. - */ - - Pattern[0] = pattern; - - - /* - * Get a descriptor to do the io on - */ - - if ((fd = alloc_fd(file, oflags)) == -1) - return -1; - - /*printf("write: %d, %s, %#o, %d %d\n", - fd, file, oflags, offset, nbytes);*/ - - /* - * Allocate SDS space for backdoor write if desired - */ - -#ifdef CRAY - if (oflags & O_SSD) { -#ifndef _CRAYMPP - if ((rval = alloc_mem(nbytes + wtob(1))) < 0) { - return rval; - } - - (*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0); - /*pattern_fill(Memptr, nbytes, Pattern, Pattern_Length, 0);*/ - - if (alloc_sds(nbytes) == -1) - return -1; - - if (sswrite((long)Memptr, Sdsptr, btoc(nbytes)) == -1) { - doio_fprintf(stderr, "sswrite(%d, %d, %d) failed: %s (%d)\n", - (long)Memptr, Sdsptr, btoc(nbytes), - SYSERR, errno); - fflush(stderr); - return -1; - } - - addr = (char *)Sdsptr; -#else - doio_fprintf(stderr, "Invalid O_SSD flag was generated for MPP system\n"); - fflush(stderr); - return -1; -#endif /* !CRAYMPP */ - } else { - if ((rval = alloc_mem(nbytes + wtob(1)) < 0)) { - return rval; - } - - addr = Memptr; - - /* - * if io is not raw, bump the offset by a random amount - * to generate non-word-aligned io. - */ - - if (! (req->r_data.write.r_uflags & F_WORD_ALIGNED)) { - addr += random_range(0, wtob(1) - 1, 1, NULL); - } - - (*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0); - if( addr != Memptr ) - memmove( addr, Memptr, nbytes); - } -#else /* CRAY */ -#ifdef sgi - /* get memory alignment for using DIRECT I/O */ - fdc = alloc_fdcache(file, oflags); - - if ((rval = alloc_mem(nbytes + wtob(1) * 2 + fdc->c_memalign)) < 0) { - return rval; - } - - addr = Memptr; - - if( (req->r_data.write.r_uflags & F_WORD_ALIGNED) ) { - /* - * Force memory alignment for Direct I/O - */ - if( (oflags & O_DIRECT) && ((long)addr % fdc->c_memalign != 0) ) { - addr += fdc->c_memalign - ((long)addr % fdc->c_memalign); - } - } else { - addr += random_range(0, wtob(1) - 1, 1, NULL); - } - - (*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0); - if( addr != Memptr ) - memmove( addr, Memptr, nbytes); - -#else /* sgi */ - if ((rval = alloc_mem(nbytes + wtob(1) * 2)) < 0) { - return rval; - } - - addr = Memptr; - - (*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0); - if( addr != Memptr ) - memmove( addr, Memptr, nbytes); -#endif /* sgi */ -#endif /* CRAY */ - - rval = -1; - got_lock = 0; - logged_write = 0; - - if (k_opt) { - if (lock_file_region(file, fd, F_WRLCK, offset, nbytes) < 0) { - alloc_mem(-1); - exit(E_INTERNAL); - } - - got_lock = 1; - } - - /* - * Write a preliminary write-log entry. This is done so that - * doio_check can do corruption detection across an interrupt/crash. - * Note that w_done is set to 0. If doio_check sees this, it - * re-creates the file extents as if the write completed, but does not - * do any checking - see comments in doio_check for more details. - */ - - if (w_opt) { - if (pid == -1) { - pid = getpid(); - } - wrec.w_async = (req->r_type == WRITEA) ? 1 : 0; - wrec.w_oflags = oflags; - wrec.w_pid = pid; - wrec.w_offset = offset; - wrec.w_nbytes = nbytes; - - wrec.w_pathlen = strlen(file); - memcpy(wrec.w_path, file, wrec.w_pathlen); - wrec.w_hostlen = strlen(Host); - memcpy(wrec.w_host, Host, wrec.w_hostlen); - wrec.w_patternlen = Pattern_Length; - memcpy(wrec.w_pattern, Pattern, wrec.w_patternlen); - - wrec.w_done = 0; - - if ((woffset = wlog_record_write(&Wlog, &wrec, -1)) == -1) { - doio_fprintf(stderr, - "Could not append to write-log: %s (%d)\n", - SYSERR, errno); - } else { - logged_write = 1; - } - } - - switch (req->r_type ) { - case WRITE: - /* - * sync write - */ - - if (lseek(fd, offset, SEEK_SET) == -1) { - doio_fprintf(stderr, - "lseek(%d, %d, SEEK_SET) failed: %s (%d)\n", - fd, offset, SYSERR, errno); - return -1; - } - - rval = write(fd, addr, nbytes); - - if (rval == -1) { - doio_fprintf(stderr, - "write() failed: %s (%d)\n%s\n", - SYSERR, errno, - format_rw(req, fd, addr, -1, Pattern, NULL)); -#ifdef sgi - doio_fprintf(stderr, - "write() failed: %s\n\twrite(%d, %#o, %d)\n\toffset %d, nbytes%%miniou(%d)=%d, oflags=%#o memalign=%d, addr%%memalign=%d\n", - strerror(errno), - fd, addr, nbytes, - offset, - fdc->c_miniosz, nbytes%fdc->c_miniosz, - oflags, fdc->c_memalign, (long)addr%fdc->c_memalign); -#else - doio_fprintf(stderr, - "write() failed: %s\n\twrite(%d, %#o, %d)\n\toffset %d, nbytes%%1B=%d, oflags=%#o\n", - strerror(errno), - fd, addr, nbytes, - offset, nbytes%4096, oflags); -#endif - doio_upanic(U_RVAL); - } else if (rval != nbytes) { - doio_fprintf(stderr, - "write() returned wrong # bytes - expected %d, got %d\n%s\n", - nbytes, rval, - format_rw(req, fd, addr, -1, Pattern, NULL)); - doio_upanic(U_RVAL); - rval = -1; - } - - break; - -#ifdef CRAY - case WRITEA: - /* - * async write - */ - if (lseek(fd, offset, SEEK_SET) == -1) { - doio_fprintf(stderr, - "lseek(%d, %d, SEEK_SET) failed: %s (%d)\n", - fd, offset, SYSERR, errno); - return -1; - } - - aio_strat = req->r_data.write.r_aio_strat; - signo = (aio_strat == A_SIGNAL) ? SIGUSR1 : 0; - - aio_id = aio_register(fd, aio_strat, signo); - aiop = aio_slot(aio_id); - - /* - * init iosw and do the async write - */ - - if (writea(fd, addr, nbytes, &aiop->iosw, signo) == -1) { - doio_fprintf(stderr, - "writea() failed: %s (%d)\n%s\n", - SYSERR, errno, - format_rw(req, fd, addr, -1, Pattern, NULL)); - doio_upanic(U_RVAL); - aio_unregister(aio_id); - rval = -1; - } else { - - /* - * Wait for io to complete - */ - - aio_wait(aio_id); - - /* - * check that iosw is ok - */ - - if (aiop->iosw.sw_count != nbytes) { - doio_fprintf(stderr, - "Bad iosw from writea()\nExpected (%d,%d,%d), got (%d,%d,%d)\n%s\n", - 1, 0, nbytes, - aiop->iosw.sw_flag, - aiop->iosw.sw_error, - aiop->iosw.sw_count, - format_rw(req, fd, addr, -1, Pattern, &aiop->iosw)); - aio_unregister(aio_id); - doio_upanic(U_IOSW); - rval = -1; - } else { - aio_unregister(aio_id); - rval = 0; - } - } - break; - -#endif /* CRAY */ - } - - /* - * Verify that the data was written correctly - check_file() returns - * a non-null pointer which contains an error message if there are - * problems. - */ - - if (v_opt) { - msg = check_file(file, offset, nbytes, Pattern, Pattern_Length, - 0, oflags & O_PARALLEL); - if (msg != NULL) { - doio_fprintf(stderr, "%s%s\n", - msg, -#ifdef CRAY - format_rw(req, fd, addr, -1, Pattern, &aiop->iosw) -#else - format_rw(req, fd, addr, -1, Pattern, NULL) -#endif - ); - doio_upanic(U_CORRUPTION); - exit(E_COMPARE); - - } - } - - /* - * General cleanup ... - * - * Write extent information to the write-log, so that doio_check can do - * corruption detection. Note that w_done is set to 1, indicating that - * the write has been verified as complete. We don't need to write the - * filename on the second logging. - */ - - if (w_opt && logged_write) { - wrec.w_done = 1; - wlog_record_write(&Wlog, &wrec, woffset); - } - - /* - * Unlock file region if necessary - */ - - if (got_lock) { - if (lock_file_region(file, fd, F_UNLCK, offset, nbytes) < 0) { - alloc_mem(-1); - exit(E_INTERNAL); - } - } - - return( (rval == -1) ? -1 : 0); -} - - -/* - * Simple routine to lock/unlock a file using fcntl() - */ - -int -lock_file_region(fname, fd, type, start, nbytes) -char *fname; -int fd; -int type; -int start; -int nbytes; -{ - struct flock flk; - - flk.l_type = type; - flk.l_whence = 0; - flk.l_start = start; - flk.l_len = nbytes; - - if (fcntl(fd, F_SETLKW, &flk) < 0) { - doio_fprintf(stderr, - "fcntl(%d, %d, %#o) failed for file %s, lock type %d, offset %d, length %d: %s (%d), open flags: %#o\n", - fd, F_SETLKW, &flk, fname, type, - start, nbytes, SYSERR, errno, - fcntl(fd, F_GETFL, 0)); - return -1; - } - - return 0; -} - -/* - * Perform a listio request. - */ - -#ifdef CRAY -char * -format_listio( - struct io_req *ioreq, - int lcmd, - struct listreq *list, - int nent, - int fd, - char *pattern - ) -{ - static char *errbuf=NULL; - struct listio_req *liop = &ioreq->r_data.listio; - struct listreq *listreq; - char *cp, *cmd, *opcode, *aio_strat; - int i; - - switch (lcmd) { - case LC_START: cmd = "LC_START"; break; - case LC_WAIT: cmd = "LC_WAIT"; break; - default: cmd = "???"; break; - } - - if(errbuf == NULL) - errbuf = (char *)malloc(32768); - - cp = errbuf; - cp += sprintf(cp, "Request number %d\n", Reqno); - - cp += sprintf(cp, "syscall: listio(%s, %#o, %d)\n\n", - cmd, list, nent); - - aio_strat = format_strat(liop->r_aio_strat); - - for (i = 0; i < nent; i++) { - cp += sprintf(cp, "struct lioreq for request element %d\n", i); - cp += sprintf(cp, "----------------------------------------\n"); - - listreq = list + i; - - switch (listreq->li_opcode) { - case LO_READ: opcode = "LO_READ"; break; - case LO_WRITE: opcode = "LO_WRITE"; break; - default: opcode = "???"; break; - } - - cp += sprintf(cp, " li_opcode = %s\n", opcode); - cp += sprintf(cp, " li_drvr = %#o\n", listreq->li_drvr); - cp += sprintf(cp, " li_flags = %#o\n", listreq->li_flags); - cp += sprintf(cp, " li_offset = %d\n", listreq->li_offset); - cp += sprintf(cp, " li_fildes = %d\n", listreq->li_fildes); - cp += sprintf(cp, " li_buf = %#o\n", listreq->li_buf); - cp += sprintf(cp, " li_nbyte = %d\n", listreq->li_nbyte); - cp += sprintf(cp, " li_status = %#o (%d, %d, %d)\n", listreq->li_status, listreq->li_status->sw_flag, listreq->li_status->sw_error, listreq->li_status->sw_count); - cp += sprintf(cp, " li_signo = %d\n", listreq->li_signo); - cp += sprintf(cp, " li_nstride = %d\n", listreq->li_nstride); - cp += sprintf(cp, " li_filstride = %d\n", listreq->li_filstride); - cp += sprintf(cp, " li_memstride = %d\n", listreq->li_memstride); - cp += sprintf(cp, " io completion strategy is %s\n", aio_strat); - } - return errbuf; -} -#endif /* CRAY */ - -int -do_listio(req) -struct io_req *req; -{ -#ifdef CRAY - struct listio_req *lio; - int fd, oflags, signo, nb, i; - int logged_write, rval, got_lock; - int aio_strat, aio_id; - int min_byte, max_byte; - int mem_needed; - int foffset, fstride, mstride, nstrides; - char *moffset; - long offset, woffset; - char *addr, *msg; - sigset_t block_mask, omask; - struct wlog_rec wrec; - struct aio_info *aiop; - struct listreq lio_req; - - lio = &req->r_data.listio; - - /* - * If bytes per stride is less than the stride size, drop the request - * since it will cause overlapping strides, and we cannot predict - * the order they will complete in. - */ - - if (lio->r_filestride && abs(lio->r_filestride) < lio->r_nbytes) { - doio_fprintf(stderr, "do_listio(): Bogus listio request - abs(filestride) [%d] < nbytes [%d]\n", - abs(lio->r_filestride), lio->r_nbytes); - return -1; - } - - /* - * Allocate core memory. Initialize the data to be written. Make - * sure we get enough, based on the memstride. - */ - - mem_needed = - stride_bounds(0, lio->r_memstride, lio->r_nstrides, - lio->r_nbytes, NULL, NULL); - - if ((rval = alloc_mem(mem_needed + wtob(1))) < 0) { - return rval; - } - - /* - * Set the memory address pointer. If the io is not raw, adjust - * addr by a random amount, so that non-raw io is not necessarily - * word aligned. - */ - - addr = Memptr; - - if (! (lio->r_uflags & F_WORD_ALIGNED)) { - addr += random_range(0, wtob(1) - 1, 1, NULL); - } - - if (lio->r_opcode == LO_WRITE) { - Pattern[0] = lio->r_pattern; - (*Data_Fill)(Memptr, mem_needed, Pattern, Pattern_Length, 0); - if( addr != Memptr ) - memmove( addr, Memptr, mem_needed); - } - - /* - * Get a descriptor to do the io on. No need to do an lseek, as this - * is encoded in the listio request. - */ - - if ((fd = alloc_fd(lio->r_file, lio->r_oflags)) == -1) { - return -1; - } - - rval = -1; - got_lock = 0; - logged_write = 0; - - /* - * If the opcode is LO_WRITE, lock all regions of the file that - * are touched by this listio request. Currently, we use - * stride_bounds() to figure out the min and max bytes affected, and - * lock the entire region, regardless of the file stride. - */ - - if (lio->r_opcode == LO_WRITE && k_opt) { - stride_bounds(lio->r_offset, - lio->r_filestride, lio->r_nstrides, - lio->r_nbytes, &min_byte, &max_byte); - - if (lock_file_region(lio->r_file, fd, F_WRLCK, - min_byte, (max_byte-min_byte+1)) < 0) { - doio_fprintf(stderr, "stride_bounds(%d, %d, %d, %d, ..., ...) set min_byte to %d, max_byte to %d\n", - lio->r_offset, lio->r_filestride, - lio->r_nstrides, lio->r_nbytes, min_byte, - max_byte); - return -1; - } else { - got_lock = 1; - } - } - - /* - * async write - */ - - aio_strat = lio->r_aio_strat; - signo = (aio_strat == A_SIGNAL) ? SIGUSR1 : 0; - - aio_id = aio_register(fd, aio_strat, signo); - aiop = aio_slot(aio_id); - - /* - * Form the listio request, and make the call. - */ - - lio_req.li_opcode = lio->r_opcode; - lio_req.li_drvr = 0; - lio_req.li_flags = LF_LSEEK; - lio_req.li_offset = lio->r_offset; - lio_req.li_fildes = fd; - - if (lio->r_memstride >= 0 || lio->r_nstrides <= 1) { - lio_req.li_buf = addr; - } else { - lio_req.li_buf = addr + mem_needed - lio->r_nbytes; - } - - lio_req.li_nbyte = lio->r_nbytes; - lio_req.li_status = &aiop->iosw; - lio_req.li_signo = signo; - lio_req.li_nstride = lio->r_nstrides; - lio_req.li_filstride = lio->r_filestride; - lio_req.li_memstride = lio->r_memstride; - - /* - * If signo != 0, block signo while we're in the system call, so that - * we don't get interrupted syscall failures. - */ - - if (signo) { - sigemptyset(&block_mask); - sigaddset(&block_mask, signo); - sigprocmask(SIG_BLOCK, &block_mask, &omask); - } - - if (listio(lio->r_cmd, &lio_req, 1) < 0) { - doio_fprintf(stderr, - "listio() failed: %s (%d)\n%s\n", - SYSERR, errno, - format_listio(req, lio->r_cmd, &lio_req, 1, fd, Pattern)); - aio_unregister(aio_id); - doio_upanic(U_RVAL); - goto lio_done; - } - - if (signo) { - sigprocmask(SIG_SETMASK, &omask, NULL); - } - - /* - * Wait for io to complete - */ - - aio_wait(aio_id); - - nstrides = lio->r_nstrides ? lio->r_nstrides : 1; - if (aiop->iosw.sw_count != lio->r_nbytes * nstrides) { - doio_fprintf(stderr, - "Bad iosw from listio()\nExpected (%d,%d,%d), got (%d,%d,%d)\n%s\n", - 1, 0, lio->r_nbytes * lio->r_nstrides, - aiop->iosw.sw_flag, - aiop->iosw.sw_error, aiop->iosw.sw_count, - format_listio(req, lio->r_cmd, &lio_req, 1, fd, Pattern)); - aio_unregister(aio_id); - doio_upanic(U_IOSW); - goto lio_done; - } - - aio_unregister(aio_id); - - /* - * Verify that the data was written correctly - check_file() returns - * a non-null pointer which contains an error message if there are - * problems. - * - * For listio, we basically have to make 1 call to check_file for each - * stride. - */ - - if (v_opt && lio_req.li_opcode == LO_WRITE) { - fstride = lio->r_filestride ? lio->r_filestride : lio->r_nbytes; - mstride = lio->r_memstride ? lio->r_memstride : lio->r_nbytes; - foffset = lio->r_offset; - - if (mstride> 0 || lio->r_nstrides <= 1) { - moffset = addr; - } else { - moffset = addr + mem_needed - lio->r_nbytes; - } - - for (i = 0; i < lio_req.li_nstride; i++) { - msg = check_file(lio->r_file, - foffset, lio->r_nbytes, - Pattern, Pattern_Length, - moffset - addr, - lio->r_oflags & O_PARALLEL); - - if (msg != NULL) { - doio_fprintf(stderr, "%s\n%s\n", - msg, - format_listio(req, lio->r_cmd, &lio_req, 1, fd, Pattern)); - doio_upanic(U_CORRUPTION); - exit(E_COMPARE); - } - - moffset += mstride; - foffset += fstride; - } - - } - - rval = 0; - - lio_done: - - /* - * General cleanup ... - * - */ - - /* - * Release file locks if necessary - */ - - if (got_lock) { - if (lock_file_region(lio->r_file, fd, F_UNLCK, - min_byte, (max_byte-min_byte+1)) < 0) { - return -1; - } - } - - return rval; -#else - return -1; -#endif -} - -/* - * perform ssread/sswrite operations - */ - -#ifdef _CRAY1 - -int -do_ssdio(req) -struct io_req *req; -{ - int nbytes, nb; - char errbuf[BSIZE]; - - nbytes = req->r_data.ssread.r_nbytes; - - /* - * Grab core and sds space - */ - - if ((nb = alloc_mem(nbytes)) < 0) - return nb; - - if (alloc_sds(nbytes) == -1) - return -1; - - if (req->r_type == SSWRITE) { - - /* - * Init data and ship it to the ssd - */ - - Pattern[0] = req->r_data.sswrite.r_pattern; - /*pattern_fill(Memptr, nbytes, Pattern, Pattern_Length, 0);*/ - (*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0); - - if (sswrite((long)Memptr, (long)Sdsptr, btoc(nbytes)) == -1) { - doio_fprintf(stderr, "sswrite() failed: %s (%d)\n%s\n", - SYSERR, errno, - format_sds(req, Memptr, Sdsptr, Pattern)); - doio_upanic(U_RVAL); - return -1; - } - } else { - /* - * read from sds - */ - - if (ssread((long)Memptr, (long)Sdsptr, btoc(nbytes)) == -1) { - doio_fprintf(stderr, "ssread() failed: %s (%d)\n%s\n", - SYSERR, errno, - format_sds(req, Memptr, Sdsptr, Pattern)); - - doio_upanic(U_RVAL); - return -1; - } - } - - /* - * Verify data if SSWRITE and v_opt - */ - - if (v_opt && req->r_type == SSWRITE) { - ssread((long)Memptr, (long)Sdsptr, btoc(nbytes)); - - if (pattern_check(Memptr, nbytes, Pattern, Pattern_Length, 0) == -1) { - doio_fprintf(stderr, - "sds DATA COMPARE ERROR - ABORTING\n%s\n", - format_sds(req, Memptr, Sdsptr, Pattern)); - - doio_upanic(U_CORRUPTION); - exit(E_COMPARE); - } - } -} - -#else - -#ifdef CRAY - -int -do_ssdio(req) -struct io_req *req; -{ - doio_fprintf(stderr, - "Internal Error - do_ssdio() called on a non-cray1 system\n"); - alloc_mem(-1); - exit(E_INTERNAL); -} - -#endif - -#endif /* _CRAY1 */ - - -/* --------------------------------------------------------------------------- - * - * A new paradigm of doing the r/w system call where there is a "stub" - * function that builds the info for the system call, then does the system - * call; this is called by code that is common to all system calls and does - * the syscall return checking, async I/O wait, iosw check, etc. - * - * Flags: - * WRITE, ASYNC, SSD/SDS, - * FILE_LOCK, WRITE_LOG, VERIFY_DATA, - */ - -struct status { - int rval; /* syscall return */ - int err; /* errno */ - int *aioid; /* list of async I/O structures */ -}; - -struct syscall_info { - char *sy_name; - int sy_type; - struct status *(*sy_syscall)(); - int (*sy_buffer)(); - char *(*sy_format)(); - int sy_flags; - int sy_bits; -}; - -#define SY_WRITE 00001 -#define SY_ASYNC 00010 -#define SY_IOSW 00020 -#define SY_SDS 00100 - -char * -fmt_ioreq(struct io_req *ioreq, struct syscall_info *sy, int fd) -{ - static char *errbuf=NULL; - char *cp; - struct rw_req *io; - struct smap *aname; -#ifdef CRAY - struct stat sbuf; -#endif -#ifdef sgi - struct dioattr finfo; -#endif - - if(errbuf == NULL) - errbuf = (char *)malloc(32768); - - io = &ioreq->r_data.io; - - /* - * Look up async I/O completion strategy - */ - for(aname=aionames; - aname->value != -1 && aname->value != io->r_aio_strat; - aname++) - ; - - cp = errbuf; - cp += sprintf(cp, "Request number %d\n", Reqno); - - cp += sprintf(cp, " fd %d is file %s - open flags are %#o %s\n", - fd, io->r_file, io->r_oflags, format_oflags(io->r_oflags)); - - if(sy->sy_flags & SY_WRITE) { - cp += sprintf(cp, " write done at file offset %d - pattern is %c (%#o)\n", - io->r_offset, - (io->r_pattern == '\0') ? '?' : io->r_pattern, - io->r_pattern); - } else { - cp += sprintf(cp, " read done at file offset %d\n", - io->r_offset); - } - - if(sy->sy_flags & SY_ASYNC) { - cp += sprintf(cp, " async io completion strategy is %s\n", - aname->string); - } - - cp += sprintf(cp, " number of requests is %d, strides per request is %d\n", - io->r_nent, io->r_nstrides); - - cp += sprintf(cp, " i/o byte count = %d\n", - io->r_nbytes); - - cp += sprintf(cp, " memory alignment is %s\n", - (io->r_uflags & F_WORD_ALIGNED) ? "aligned" : "unaligned"); - -#ifdef CRAY - if(io->r_oflags & O_RAW) { - cp += sprintf(cp, " RAW I/O: offset %% 4096 = %d length %% 4096 = %d\n", - io->r_offset % 4096, io->r_nbytes % 4096); - fstat(fd, &sbuf); - cp += sprintf(cp, " optimal file xfer size: small: %d large: %d\n", - sbuf.st_blksize, sbuf.st_oblksize); - cp += sprintf(cp, " cblks %d cbits %#o\n", - sbuf.st_cblks, sbuf.st_cbits); - } -#endif -#ifdef sgi - if(io->r_oflags & O_DIRECT) { - - if(fcntl(fd, F_DIOINFO, &finfo) == -1) { - cp += sprintf(cp, " Error %s (%d) getting direct I/O info\n", - strerror(errno), errno); - finfo.d_mem = 1; - finfo.d_miniosz = 1; - finfo.d_maxiosz = 1; - } - - cp += sprintf(cp, " DIRECT I/O: offset %% %d = %d length %% %d = %d\n", - finfo.d_miniosz, - io->r_offset % finfo.d_miniosz, - io->r_nbytes, - io->r_nbytes % finfo.d_miniosz); - cp += sprintf(cp, " mem alignment 0x%x xfer size: small: %d large: %d\n", - finfo.d_mem, finfo.d_miniosz, finfo.d_maxiosz); - } -#endif - - return(errbuf); -} - -/* - * Issue listio requests - */ -#ifdef CRAY -struct status * -sy_listio(req, sysc, fd, addr) -struct io_req *req; -struct syscall_info *sysc; -int fd; -char *addr; -{ - int offset, nbytes, nstrides, nents, aio_strat; - int aio_id, signo, o, i, lc; - char *a; - struct listreq *lio_req, *l; - struct aio_info *aiop; - struct status *status; - - /* - * Initialize common fields - assumes r_oflags, r_file, r_offset, and - * r_nbytes are at the same offset in the read_req and reada_req - * structures. - */ - offset = req->r_data.io.r_offset; - nbytes = req->r_data.io.r_nbytes; - nstrides = req->r_data.io.r_nstrides; - nents = req->r_data.io.r_nent; - aio_strat = req->r_data.io.r_aio_strat; - - lc = (sysc->sy_flags & SY_ASYNC) ? LC_START : LC_WAIT; - - status = (struct status *)malloc(sizeof(struct status)); - if( status == NULL ){ - doio_fprintf(stderr, "malloc failed, %s/%d\n", - __FILE__, __LINE__); - return NULL; - } - status->aioid = (int *)malloc( (nents+1) * sizeof(int) ); - if( status->aioid == NULL ){ - doio_fprintf(stderr, "malloc failed, %s/%d\n", - __FILE__, __LINE__); - return NULL; - } - - signo = (aio_strat == A_SIGNAL) ? SIGUSR1 : 0; - - lio_req = (struct listreq *)malloc(nents * sizeof(struct listreq)); - if( lio_req == NULL ){ - doio_fprintf(stderr, "malloc failed, %s/%d\n", - __FILE__, __LINE__); - return NULL; - } - for(l=lio_req,a=addr,o=offset,i=0; - i < nents; - l++, a+=nbytes, o+=nbytes, i++) { - - aio_id = aio_register(fd, aio_strat, signo); - aiop = aio_slot(aio_id); - status->aioid[i] = aio_id; - - l->li_opcode = (sysc->sy_flags & SY_WRITE) ? LO_WRITE : LO_READ; - l->li_offset = o; - l->li_fildes = fd; - l->li_buf = a; - l->li_nbyte = nbytes; - l->li_status = &aiop->iosw; - l->li_signo = signo; - l->li_nstride = nstrides; - l->li_filstride = 0; - l->li_memstride = 0; - l->li_drvr = 0; - l->li_flags = LF_LSEEK; - } - - status->aioid[nents] = -1; /* end sentinel */ - - if( (status->rval = listio(lc, lio_req, nents)) == -1) { - status->err = errno; - } - - free(lio_req); - return(status); -} - -/* - * Calculate the size of a request in bytes and min/max boundaries - * - * This assumes filestride & memstride = 0. - */ -int -listio_mem(struct io_req *req, int offset, int fmstride, - int *min, int *max) -{ - int i, size; - - size = stride_bounds(offset, fmstride, - req->r_data.io.r_nstrides*req->r_data.io.r_nent, - req->r_data.io.r_nbytes, min, max); - return(size); -} - -char * -fmt_listio(struct io_req *req, struct syscall_info *sy, int fd, char *addr) -{ - static char *errbuf = NULL; - char *cp; - char *c, *opcode; - int i; - - if(errbuf == NULL){ - errbuf = (char *)malloc(32768); - if( errbuf == NULL ){ - doio_fprintf(stderr, "malloc failed, %s/%d\n", - __FILE__, __LINE__); - return NULL; - } - } - - c = (sy->sy_flags & SY_ASYNC) ? "lc_wait" : "lc_start"; - - cp = errbuf; - cp += sprintf(cp, "syscall: listio(%s, (?), %d)\n", - c, req->r_data.io.r_nent); - - cp += sprintf(cp, " data buffer at %#o\n", addr); - - return(errbuf); -} -#endif /* CRAY */ - -#ifdef sgi -struct status * -sy_pread(req, sysc, fd, addr) -struct io_req *req; -struct syscall_info *sysc; -int fd; -char *addr; -{ - int rc; - struct status *status; - - rc = pread(fd, addr, req->r_data.io.r_nbytes, - req->r_data.io.r_offset); - - status = (struct status *)malloc(sizeof(struct status)); - if( status == NULL ){ - doio_fprintf(stderr, "malloc failed, %s/%d\n", - __FILE__, __LINE__); - return NULL; - } - status->aioid = NULL; - status->rval = rc; - status->err = errno; - - return(status); -} - -struct status * -sy_pwrite(req, sysc, fd, addr) -struct io_req *req; -struct syscall_info *sysc; -int fd; -char *addr; -{ - int rc; - struct status *status; - - rc = pwrite(fd, addr, req->r_data.io.r_nbytes, - req->r_data.io.r_offset); - - status = (struct status *)malloc(sizeof(struct status)); - if( status == NULL ){ - doio_fprintf(stderr, "malloc failed, %s/%d\n", - __FILE__, __LINE__); - return NULL; - } - status->aioid = NULL; - status->rval = rc; - status->err = errno; - - return(status); -} - -char * -fmt_pread(struct io_req *req, struct syscall_info *sy, int fd, char *addr) -{ - static char *errbuf = NULL; - char *cp; - - if(errbuf == NULL){ - errbuf = (char *)malloc(32768); - if( errbuf == NULL ){ - doio_fprintf(stderr, "malloc failed, %s/%d\n", - __FILE__, __LINE__); - return NULL; - } - } - - cp = errbuf; - cp += sprintf(cp, "syscall: %s(%d, 0x%lx, %d)\n", - sy->sy_name, fd, addr, req->r_data.io.r_nbytes); - return(errbuf); -} -#endif /* sgi */ - -#ifndef CRAY -struct status * -sy_readv(req, sysc, fd, addr) -struct io_req *req; -struct syscall_info *sysc; -int fd; -char *addr; -{ - struct status *sy_rwv(); - return sy_rwv(req, sysc, fd, addr, 0); -} - -struct status * -sy_writev(req, sysc, fd, addr) -struct io_req *req; -struct syscall_info *sysc; -int fd; -char *addr; -{ - struct status *sy_rwv(); - return sy_rwv(req, sysc, fd, addr, 1); -} - -struct status * -sy_rwv(req, sysc, fd, addr, rw) -struct io_req *req; -struct syscall_info *sysc; -int fd; -char *addr; -int rw; -{ - int rc; - struct status *status; - struct iovec iov[2]; - - status = (struct status *)malloc(sizeof(struct status)); - if( status == NULL ){ - doio_fprintf(stderr, "malloc failed, %s/%d\n", - __FILE__, __LINE__); - return NULL; - } - status->aioid = NULL; - - /* move to the desired file position. */ - if ((rc=lseek(fd, req->r_data.io.r_offset, SEEK_SET)) == -1) { - status->rval = rc; - status->err = errno; - return(status); - } - - iov[0].iov_base = addr; - iov[0].iov_len = req->r_data.io.r_nbytes; - - if(rw) - rc = writev(fd, iov, 1); - else - rc = readv(fd, iov, 1); - status->aioid = NULL; - status->rval = rc; - status->err = errno; - return(status); -} - -char * -fmt_readv(struct io_req *req, struct syscall_info *sy, int fd, char *addr) -{ - static char errbuf[32768]; - char *cp; - - cp = errbuf; - cp += sprintf(cp, "syscall: %s(%d, (iov on stack), 1)\n", - sy->sy_name, fd); - return(errbuf); -} -#endif /* !CRAY */ - -#ifdef sgi -struct status * -sy_aread(req, sysc, fd, addr) -struct io_req *req; -struct syscall_info *sysc; -int fd; -char *addr; -{ - struct status *sy_arw(); - return sy_arw(req, sysc, fd, addr, 0); -} - -struct status * -sy_awrite(req, sysc, fd, addr) -struct io_req *req; -struct syscall_info *sysc; -int fd; -char *addr; -{ - struct status *sy_arw(); - return sy_arw(req, sysc, fd, addr, 1); -} - -/* - #define sy_aread(A, B, C, D) sy_arw(A, B, C, D, 0) - #define sy_awrite(A, B, C, D) sy_arw(A, B, C, D, 1) - */ - -struct status * -sy_arw(req, sysc, fd, addr, rw) -struct io_req *req; -struct syscall_info *sysc; -int fd; -char *addr; -int rw; -{ - /* POSIX 1003.1b-1993 Async read */ - struct status *status; - int rc; - int aio_id, aio_strat, signo; - struct aio_info *aiop; - - status = (struct status *)malloc(sizeof(struct status)); - if( status == NULL ){ - doio_fprintf(stderr, "malloc failed, %s/%d\n", - __FILE__, __LINE__); - return NULL; - } - aio_strat = req->r_data.io.r_aio_strat; - signo = (aio_strat == A_SIGNAL) ? SIGUSR1 : 0; - - aio_id = aio_register(fd, aio_strat, signo); - aiop = aio_slot(aio_id); - - memset( (void *)&aiop->aiocb, 0, sizeof(aiocb_t)); - - aiop->aiocb.aio_fildes = fd; - aiop->aiocb.aio_nbytes = req->r_data.io.r_nbytes; - aiop->aiocb.aio_offset = req->r_data.io.r_offset; - aiop->aiocb.aio_buf = addr; - aiop->aiocb.aio_reqprio = 0; /* must be 0 */ - aiop->aiocb.aio_lio_opcode = 0; - - if(aio_strat == A_SIGNAL) { /* siginfo(2) stuff */ - aiop->aiocb.aio_sigevent.sigev_notify = SIGEV_SIGNAL; - aiop->aiocb.aio_sigevent.sigev_signo = signo; - } else if(aio_strat == A_CALLBACK) { - aiop->aiocb.aio_sigevent.sigev_signo = 0; - aiop->aiocb.aio_sigevent.sigev_notify = SIGEV_CALLBACK; - aiop->aiocb.aio_sigevent.sigev_func = cb_handler; - aiop->aiocb.aio_sigevent.sigev_value.sival_int = aio_id; - } else { - aiop->aiocb.aio_sigevent.sigev_notify = SIGEV_NONE; - aiop->aiocb.aio_sigevent.sigev_signo = 0; - } - - if(rw) - rc = aio_write(&aiop->aiocb); - else - rc = aio_read(&aiop->aiocb); - - status->aioid = (int *)malloc( 2 * sizeof(int) ); - if( status->aioid == NULL ){ - doio_fprintf(stderr, "malloc failed, %s/%d\n", - __FILE__, __LINE__); - return NULL; - } - status->aioid[0] = aio_id; - status->aioid[1] = -1; - status->rval = rc; - status->err = errno; - return(status); -} - -char * -fmt_aread(struct io_req *req, struct syscall_info *sy, int fd, char *addr) -{ - static char errbuf[32768]; - char *cp; - - cp = errbuf; - cp += sprintf(cp, "syscall: %s(&aiop->aiocb)\n", - sy->sy_name); - return(errbuf); -} -#endif /* sgi */ - -#ifndef CRAY - -struct status * -sy_mmread(req, sysc, fd, addr) -struct io_req *req; -struct syscall_info *sysc; -int fd; -char *addr; -{ - struct status *sy_mmrw(); - return sy_mmrw(req, sysc, fd, addr, 0); -} - -struct status * -sy_mmwrite(req, sysc, fd, addr) -struct io_req *req; -struct syscall_info *sysc; -int fd; -char *addr; -{ - struct status *sy_mmrw(); - return sy_mmrw(req, sysc, fd, addr, 1); -} - -struct status * -sy_mmrw(req, sysc, fd, addr, rw) -struct io_req *req; -struct syscall_info *sysc; -int fd; -char *addr; -int rw; -{ - /* - * mmap read/write - * This version is oriented towards mmaping the file to memory - * ONCE and keeping it mapped. - */ - struct status *status; - void *mrc, *memaddr; - struct fd_cache *fdc; - struct stat sbuf; - int rc; - - status = (struct status *)malloc(sizeof(struct status)); - if( status == NULL ){ - doio_fprintf(stderr, "malloc failed, %s/%d\n", - __FILE__, __LINE__); - return NULL; - } - status->aioid = NULL; - status->rval = -1; - - fdc = alloc_fdcache(req->r_data.io.r_file, req->r_data.io.r_oflags); - - if( v_opt || fdc->c_memaddr == NULL ) { - if( fstat(fd, &sbuf) < 0 ){ - doio_fprintf(stderr, "fstat failed, errno=%d\n", - errno); - status->err = errno; - return(status); - } - - fdc->c_memlen = (int)sbuf.st_size; - mrc = mmap(NULL, (int)sbuf.st_size, - rw ? PROT_WRITE|PROT_READ : PROT_READ, - MAP_SHARED, fd, 0); - - if( mrc == MAP_FAILED ) { - doio_fprintf(stderr, "mmap() failed - 0x%lx %d\n", - mrc, errno); - status->err = errno; - return(status); - } - - fdc->c_memaddr = mrc; - } - - memaddr = (void *)((char *)fdc->c_memaddr + req->r_data.io.r_offset); - - active_mmap_rw = 1; - if(rw) - memcpy(memaddr, addr, req->r_data.io.r_nbytes); - else - memcpy(addr, memaddr, req->r_data.io.r_nbytes); - if (v_opt) - msync(fdc->c_memaddr, (int)sbuf.st_size, MS_SYNC); - active_mmap_rw = 0; - - status->rval = req->r_data.io.r_nbytes; - status->err = 0; - - if (v_opt) { - rc = munmap(mrc, (int)sbuf.st_size); - } - - return(status); -} - -char * -fmt_mmrw(struct io_req *req, struct syscall_info *sy, int fd, char *addr) -{ - static char errbuf[32768]; - char *cp; - struct fd_cache *fdc; - void *memaddr; - - fdc = alloc_fdcache(req->r_data.io.r_file, req->r_data.io.r_oflags); - - cp = errbuf; - cp += sprintf(cp, "syscall: %s(NULL, %d, %s, MAP_SHARED, %d, 0)\n", - sy->sy_name, - fdc->c_memlen, - (sy->sy_flags & SY_WRITE) ? "PROT_WRITE" : "PROT_READ", - fd); - - cp += sprintf(cp, "\tfile is mmaped to: 0x%lx\n", - (unsigned long) fdc->c_memaddr); - - memaddr = (void *)((char *)fdc->c_memaddr + req->r_data.io.r_offset); - - cp += sprintf(cp, "\tfile-mem=0x%lx, length=%d, buffer=0x%lx\n", - (unsigned long) memaddr, req->r_data.io.r_nbytes, - (unsigned long) addr); - - return(errbuf); -} -#endif /* !CRAY */ - -struct syscall_info syscalls[] = { -#ifdef CRAY - { "listio-read-sync", LREAD, - sy_listio, NULL, fmt_listio, - SY_IOSW - }, - { "listio-read-strides-sync", LSREAD, - sy_listio, listio_mem, fmt_listio, - SY_IOSW - }, - { "listio-read-reqs-sync", LEREAD, - sy_listio, listio_mem, fmt_listio, - SY_IOSW - }, - { "listio-read-async", LREADA, - sy_listio, NULL, fmt_listio, - SY_IOSW | SY_ASYNC - }, - { "listio-read-strides-async", LSREADA, - sy_listio, listio_mem, fmt_listio, - SY_IOSW | SY_ASYNC - }, - { "listio-read-reqs-async", LEREADA, - sy_listio, listio_mem, fmt_listio, - SY_IOSW | SY_ASYNC - }, - { "listio-write-sync", LWRITE, - sy_listio, listio_mem, fmt_listio, - SY_IOSW | SY_WRITE - }, - { "listio-write-strides-sync", LSWRITE, - sy_listio, listio_mem, fmt_listio, - SY_IOSW | SY_WRITE - }, - { "listio-write-reqs-sync", LEWRITE, - sy_listio, listio_mem, fmt_listio, - SY_IOSW | SY_WRITE - }, - { "listio-write-async", LWRITEA, - sy_listio, listio_mem, fmt_listio, - SY_IOSW | SY_WRITE | SY_ASYNC - }, - { "listio-write-strides-async", LSWRITEA, - sy_listio, listio_mem, fmt_listio, - SY_IOSW | SY_WRITE | SY_ASYNC - }, - { "listio-write-reqs-async", LEWRITEA, - sy_listio, listio_mem, fmt_listio, - SY_IOSW | SY_WRITE | SY_ASYNC - }, -#endif - -#ifdef sgi - { "aread", AREAD, - sy_aread, NULL, fmt_aread, - SY_IOSW | SY_ASYNC - }, - { "awrite", AWRITE, - sy_awrite, NULL, fmt_aread, - SY_IOSW | SY_WRITE | SY_ASYNC - }, - { "pread", PREAD, - sy_pread, NULL, fmt_pread, - 0 - }, - { "pwrite", PWRITE, - sy_pwrite, NULL, fmt_pread, - SY_WRITE - }, -#endif - -#ifndef CRAY - { "readv", READV, - sy_readv, NULL, fmt_readv, - 0 - }, - { "writev", WRITEV, - sy_writev, NULL, fmt_readv, - SY_WRITE - }, - { "mmap-read", MMAPR, - sy_mmread, NULL, fmt_mmrw, - 0 - }, - { "mmap-write", MMAPW, - sy_mmwrite, NULL, fmt_mmrw, - SY_WRITE - }, -#endif - - { NULL, 0, - 0, 0, 0, - 0 - }, -}; - -int -do_rw(req) - struct io_req *req; -{ - static int pid = -1; - int fd, offset, nbytes, nstrides, nents, oflags; - int rval, mem_needed, i; - int logged_write, got_lock, woffset, pattern; - int min_byte, max_byte; - char *addr, *file, *msg; - struct status *s; - struct wlog_rec wrec; - struct syscall_info *sy; -#if defined(CRAY) || defined(sgi) - struct aio_info *aiop; - struct iosw *iosw; -#endif -#ifdef sgi - struct fd_cache *fdc; -#endif - - /* - * Initialize common fields - assumes r_oflags, r_file, r_offset, and - * r_nbytes are at the same offset in the read_req and reada_req - * structures. - */ - file = req->r_data.io.r_file; - oflags = req->r_data.io.r_oflags; - offset = req->r_data.io.r_offset; - nbytes = req->r_data.io.r_nbytes; - nstrides= req->r_data.io.r_nstrides; - nents = req->r_data.io.r_nent; - pattern = req->r_data.io.r_pattern; - - if( nents >= MAX_AIO ) { - doio_fprintf(stderr, "do_rw: too many list requests, %d. Maximum is %d\n", - nents, MAX_AIO); - return(-1); - } - - /* - * look up system call info - */ - for(sy=syscalls; sy->sy_name != NULL && sy->sy_type != req->r_type; sy++) - ; - - if(sy->sy_name == NULL) { - doio_fprintf(stderr, "do_rw: unknown r_type %d.\n", - req->r_type); - return(-1); - } - - /* - * Get an open file descriptor - * Note: must be done before memory allocation so that the direct i/o - * information is available in mem. allocate - */ - - if ((fd = alloc_fd(file, oflags)) == -1) - return -1; - - /* - * Allocate core memory and possibly sds space. Initialize the - * data to be written. Make sure we get enough, based on the - * memstride. - * - * need: - * 1 extra word for possible partial-word address "bump" - * 1 extra word for dynamic pattern overrun - * MPP_BUMP extra words for T3E non-hw-aligned memory address. - */ - - if( sy->sy_buffer != NULL ) { - mem_needed = (*sy->sy_buffer)(req, 0, 0, NULL, NULL); - } else { - mem_needed = nbytes; - } - -#ifdef CRAY - if ((rval = alloc_mem(mem_needed + wtob(1) * 2 + MPP_BUMP * sizeof(UINT64_T))) < 0) { - return rval; - } -#else -#ifdef sgi - /* get memory alignment for using DIRECT I/O */ - fdc = alloc_fdcache(file, oflags); - - if ((rval = alloc_mem(mem_needed + wtob(1) * 2 + fdc->c_memalign)) < 0) { - return rval; - } -#else - /* what is !CRAY && !sgi ? */ - if ((rval = alloc_mem(mem_needed + wtob(1) * 2)) < 0) { - return rval; - } -#endif /* sgi */ -#endif /* CRAY */ - - Pattern[0] = pattern; - - /* - * Allocate SDS space for backdoor write if desired - */ - - if (oflags & O_SSD) { -#ifdef CRAY -#ifndef _CRAYMPP - if (alloc_sds(nbytes) == -1) - return -1; - - if( sy->sy_flags & SY_WRITE ) { - /*pattern_fill(Memptr, mem_needed, Pattern, Pattern_Length, 0);*/ - (*Data_Fill)(Memptr, nbytes, Pattern, Pattern_Length, 0); - - if (sswrite((long)Memptr, Sdsptr, btoc(mem_needed)) == -1) { - doio_fprintf(stderr, "sswrite(%d, %d, %d) failed: %s (%d)\n", - (long)Memptr, Sdsptr, - btoc(mem_needed), SYSERR, errno); - fflush(stderr); - return -1; - } - } - - addr = (char *)Sdsptr; -#else - doio_fprintf(stderr, "Invalid O_SSD flag was generated for MPP system\n"); - fflush(stderr); - return -1; -#endif /* _CRAYMPP */ -#else /* CRAY */ - doio_fprintf(stderr, "Invalid O_SSD flag was generated for non-Cray system\n"); - fflush(stderr); - return -1; -#endif /* CRAY */ - } else { - addr = Memptr; - - /* - * if io is not raw, bump the offset by a random amount - * to generate non-word-aligned io. - * - * On MPP systems, raw I/O must start on an 0x80 byte boundary. - * For non-aligned I/O, bump the address from 1 to 8 words. - */ - - if (! (req->r_data.io.r_uflags & F_WORD_ALIGNED)) { -#ifdef _CRAYMPP - addr += random_range(0, MPP_BUMP, 1, NULL) * sizeof(int); -#endif - addr += random_range(0, wtob(1) - 1, 1, NULL); - } - -#ifdef sgi - /* - * Force memory alignment for Direct I/O - */ - if( (oflags & O_DIRECT) && ((long)addr % fdc->c_memalign != 0) ) { - addr += fdc->c_memalign - ((long)addr % fdc->c_memalign); - } -#endif - - /* - * FILL must be done on a word-aligned buffer. - * Call the fill function with Memptr which is aligned, - * then memmove it to the right place. - */ - if (sy->sy_flags & SY_WRITE) { - (*Data_Fill)(Memptr, mem_needed, Pattern, Pattern_Length, 0); - if( addr != Memptr ) - memmove( addr, Memptr, mem_needed); - } - } - - rval = 0; - got_lock = 0; - logged_write = 0; - - /* - * Lock data if this is a write and locking option is set - */ - if (sy->sy_flags & SY_WRITE && k_opt) { - if( sy->sy_buffer != NULL ) { - (*sy->sy_buffer)(req, offset, 0, &min_byte, &max_byte); - } else { - min_byte = offset; - max_byte = offset + (nbytes * nstrides * nents); - } - - if (lock_file_region(file, fd, F_WRLCK, - min_byte, (max_byte-min_byte+1)) < 0) { - doio_fprintf(stderr, - "file lock failed:\n%s\n", - fmt_ioreq(req, sy, fd)); - doio_fprintf(stderr, - " buffer(req, %d, 0, 0x%x, 0x%x)\n", - offset, min_byte, max_byte); - alloc_mem(-1); - exit(E_INTERNAL); - } - - got_lock = 1; - } - - /* - * Write a preliminary write-log entry. This is done so that - * doio_check can do corruption detection across an interrupt/crash. - * Note that w_done is set to 0. If doio_check sees this, it - * re-creates the file extents as if the write completed, but does not - * do any checking - see comments in doio_check for more details. - */ - - if (sy->sy_flags & SY_WRITE && w_opt) { - if (pid == -1) { - pid = getpid(); - } - - wrec.w_async = (sy->sy_flags & SY_ASYNC) ? 1 : 0; - wrec.w_oflags = oflags; - wrec.w_pid = pid; - wrec.w_offset = offset; - wrec.w_nbytes = nbytes; /* mem_needed -- total length */ - - wrec.w_pathlen = strlen(file); - memcpy(wrec.w_path, file, wrec.w_pathlen); - wrec.w_hostlen = strlen(Host); - memcpy(wrec.w_host, Host, wrec.w_hostlen); - wrec.w_patternlen = Pattern_Length; - memcpy(wrec.w_pattern, Pattern, wrec.w_patternlen); - - wrec.w_done = 0; - - if ((woffset = wlog_record_write(&Wlog, &wrec, -1)) == -1) { - doio_fprintf(stderr, - "Could not append to write-log: %s (%d)\n", - SYSERR, errno); - } else { - logged_write = 1; - } - } - - s = (*sy->sy_syscall)(req, sy, fd, addr); - - if( s->rval == -1 ) { - doio_fprintf(stderr, - "%s() request failed: %s (%d)\n%s\n%s\n", - sy->sy_name, SYSERR, errno, - fmt_ioreq(req, sy, fd), - (*sy->sy_format)(req, sy, fd, addr)); - - doio_upanic(U_RVAL); - - for(i=0; i < nents; i++) { - if(s->aioid == NULL) - break; - aio_unregister(s->aioid[i]); - } - rval = -1; - } else { - /* - * If the syscall was async, wait for I/O to complete - */ -#ifndef __linux__ - if(sy->sy_flags & SY_ASYNC) { - for(i=0; i < nents; i++) { - aio_wait(s->aioid[i]); - } - } -#endif - - /* - * Check the syscall how-much-data-written return. Look - * for this in either the return value or the 'iosw' - * structure. - */ - - if( sy->sy_flags & SY_IOSW ) { -#ifdef CRAY - for( i=0; i < nents; i++ ) { - if(s->aioid == NULL) - break; /* >>> error condition? */ - aiop = aio_slot(s->aioid[i]); - iosw = &aiop->iosw; - if(iosw->sw_error != 0) { - doio_fprintf(stderr, - "%s() iosw error set: %s\n%s\n%s\n", - sy->sy_name, - strerror(iosw->sw_error), - fmt_ioreq(req, sy, fd), - (*sy->sy_format)(req, sy, fd, addr)); - doio_upanic(U_IOSW); - rval = -1; - } else if(iosw->sw_count != nbytes*nstrides) { - doio_fprintf(stderr, - "Bad iosw from %s() #%d\nExpected (%d,%d,%d), got (%d,%d,%d)\n%s\n%s\n", - sy->sy_name, i, - 1, 0, nbytes*nstrides, - iosw->sw_flag, - iosw->sw_error, - iosw->sw_count, - fmt_ioreq(req, sy, fd), - (*sy->sy_format)(req, sy, fd, addr)); - doio_upanic(U_IOSW); - rval = -1; - } - - aio_unregister(s->aioid[i]); - } -#endif /* CRAY */ -#ifdef sgi - for( i=0; s->aioid[i] != -1; i++ ) { - if(s->aioid == NULL) { - doio_fprintf(stderr, - "aioid == NULL!\n"); - break; - } - aiop = aio_slot(s->aioid[i]); - - /* - * make sure the io completed without error - */ - if (aiop->aio_errno != 0) { - doio_fprintf(stderr, - "%s() aio error set: %s (%d)\n%s\n%s\n", - sy->sy_name, - strerror(aiop->aio_errno), - aiop->aio_errno, - fmt_ioreq(req, sy, fd), - (*sy->sy_format)(req, sy, fd, addr)); - doio_upanic(U_IOSW); - rval = -1; - } else if (aiop->aio_ret != nbytes) { - doio_fprintf(stderr, - "Bad aio return from %s() #%d\nExpected (%d,%d), got (%d,%d)\n%s\n%s\n", - sy->sy_name, i, - 0, nbytes, - aiop->aio_errno, - aiop->aio_ret, - fmt_ioreq(req, sy, fd), - (*sy->sy_format)(req, sy, fd, addr)); - aio_unregister(s->aioid[i]); - doio_upanic(U_IOSW); - return -1; - } else { - aio_unregister(s->aioid[i]); - rval = 0; - } - } -#endif /* sgi */ - } else { - - if(s->rval != mem_needed) { - doio_fprintf(stderr, - "%s() request returned wrong # of bytes - expected %d, got %d\n%s\n%s\n", - sy->sy_name, nbytes, s->rval, - fmt_ioreq(req, sy, fd), - (*sy->sy_format)(req, sy, fd, addr)); - rval = -1; - doio_upanic(U_RVAL); - } - } - } - - - /* - * Verify that the data was written correctly - check_file() returns - * a non-null pointer which contains an error message if there are - * problems. - */ - - if ( rval == 0 && sy->sy_flags & SY_WRITE && v_opt) { - msg = check_file(file, offset, nbytes*nstrides*nents, - Pattern, Pattern_Length, 0, - oflags & O_PARALLEL); - if (msg != NULL) { - doio_fprintf(stderr, "%s\n%s\n%s\n", - msg, - fmt_ioreq(req, sy, fd), - (*sy->sy_format)(req, sy, fd, addr)); - doio_upanic(U_CORRUPTION); - exit(E_COMPARE); - } - } - - /* - * General cleanup ... - * - * Write extent information to the write-log, so that doio_check can do - * corruption detection. Note that w_done is set to 1, indicating that - * the write has been verified as complete. We don't need to write the - * filename on the second logging. - */ - - if (w_opt && logged_write) { - wrec.w_done = 1; - wlog_record_write(&Wlog, &wrec, woffset); - } - - /* - * Unlock file region if necessary - */ - - if (got_lock) { - if (lock_file_region(file, fd, F_UNLCK, - min_byte, (max_byte-min_byte+1)) < 0) { - alloc_mem(-1); - exit(E_INTERNAL); - } - } - - if(s->aioid != NULL) - free(s->aioid); - free(s); - return (rval == -1) ? -1 : 0; -} - - -/* - * fcntl-based requests - * - F_FRESVSP - * - F_UNRESVSP - * - F_FSYNC - */ -#ifdef sgi -int -do_fcntl(req) - struct io_req *req; -{ - int fd, oflags, offset, nbytes; - int rval, op; - int got_lock; - int min_byte, max_byte; - char *file, *msg; - struct flock flk; - - /* - * Initialize common fields - assumes r_oflags, r_file, r_offset, and - * r_nbytes are at the same offset in the read_req and reada_req - * structures. - */ - file = req->r_data.io.r_file; - oflags = req->r_data.io.r_oflags; - offset = req->r_data.io.r_offset; - nbytes = req->r_data.io.r_nbytes; - - flk.l_type=0; - flk.l_whence=SEEK_SET; - flk.l_start=offset; - flk.l_len=nbytes; - - /* - * Get an open file descriptor - */ - - if ((fd = alloc_fd(file, oflags)) == -1) - return -1; - - rval = 0; - got_lock = 0; - - /* - * Lock data if this is locking option is set - */ - if (k_opt) { - min_byte = offset; - max_byte = offset + nbytes; - - if (lock_file_region(file, fd, F_WRLCK, - min_byte, (nbytes+1)) < 0) { - doio_fprintf(stderr, - "file lock failed:\n"); - doio_fprintf(stderr, - " buffer(req, %d, 0, 0x%x, 0x%x)\n", - offset, min_byte, max_byte); - alloc_mem(-1); - exit(E_INTERNAL); - } - - got_lock = 1; - } - - switch (req->r_type) { - case RESVSP: op=F_RESVSP; msg="f_resvsp"; break; - case UNRESVSP: op=F_UNRESVSP; msg="f_unresvsp"; break; -#ifdef F_FSYNC - case DFFSYNC: op=F_FSYNC; msg="f_fsync"; break; -#endif - } - - rval = fcntl(fd, op, &flk); - - if( rval == -1 ) { - doio_fprintf(stderr, - "fcntl %s request failed: %s (%d)\n\tfcntl(%d, %s %d, {%d %lld ==> %lld}\n", - msg, SYSERR, errno, - fd, msg, op, flk.l_whence, - (long long)flk.l_start, - (long long)flk.l_len); - - doio_upanic(U_RVAL); - rval = -1; - } - - /* - * Unlock file region if necessary - */ - - if (got_lock) { - if (lock_file_region(file, fd, F_UNLCK, - min_byte, (max_byte-min_byte+1)) < 0) { - alloc_mem(-1); - exit(E_INTERNAL); - } - } - - return (rval == -1) ? -1 : 0; -} -#endif - -/* - * fsync(2) and fdatasync(2) - */ -#ifndef CRAY -int -do_sync(req) - struct io_req *req; -{ - int fd, oflags; - int rval; - char *file; - - /* - * Initialize common fields - assumes r_oflags, r_file, r_offset, and - * r_nbytes are at the same offset in the read_req and reada_req - * structures. - */ - file = req->r_data.io.r_file; - oflags = req->r_data.io.r_oflags; - - /* - * Get an open file descriptor - */ - - if ((fd = alloc_fd(file, oflags)) == -1) - return -1; - - rval = 0; - switch(req->r_type) { - case FSYNC2: - rval = fsync(fd); - break; - case FDATASYNC: - rval = fdatasync(fd); - break; - default: - rval = -1; - } - return (rval == -1) ? -1 : 0; -} -#endif - - -int -doio_pat_fill(char *addr, int mem_needed, char *Pattern, int Pattern_Length, - int shift) -{ - return pattern_fill(addr, mem_needed, Pattern, Pattern_Length, 0); -} - -char * -doio_pat_check(buf, offset, length, pattern, pattern_length, patshift) -char *buf; -int offset; -int length; -char *pattern; -int pattern_length; -int patshift; -{ - static char errbuf[4096]; - int nb, i, pattern_index; - char *cp, *bufend, *ep; - char actual[33], expected[33]; - - if (pattern_check(buf, length, pattern, pattern_length, patshift) != 0) { - ep = errbuf; - ep += sprintf(ep, "Corrupt regions follow - unprintable chars are represented as '.'\n"); - ep += sprintf(ep, "-----------------------------------------------------------------\n"); - - pattern_index = patshift % pattern_length;; - cp = buf; - bufend = buf + length; - - while (cp < bufend) { - if (*cp != pattern[pattern_index]) { - nb = bufend - cp; - if ((unsigned int)nb > sizeof(expected)-1) { - nb = sizeof(expected)-1; - } - - ep += sprintf(ep, "corrupt bytes starting at file offset %d\n", offset + (int)(cp-buf)); - - /* - * Fill in the expected and actual patterns - */ - memset(expected, 0x00, sizeof(expected)); - memset(actual, 0x00, sizeof(actual)); - - for (i = 0; i < nb; i++) { - expected[i] = pattern[(pattern_index + i) % pattern_length]; - if (! isprint(expected[i])) { - expected[i] = '.'; - } - - actual[i] = cp[i]; - if (! isprint(actual[i])) { - actual[i] = '.'; - } - } - - ep += sprintf(ep, " 1st %2d expected bytes: %s\n", nb, expected); - ep += sprintf(ep, " 1st %2d actual bytes: %s\n", nb, actual); - fflush(stderr); - return errbuf; - } else { - cp++; - pattern_index++; - - if (pattern_index == pattern_length) { - pattern_index = 0; - } - } - } - return errbuf; - } - - return(NULL); -} - - -/* - * Check the contents of a file beginning at offset, for length bytes. It - * is assumed that there is a string of pattern bytes in this area of the - * file. Use normal buffered reads to do the verification. - * - * If there is a data mismatch, write a detailed message into a static buffer - * suitable for the caller to print. Otherwise print NULL. - * - * The fsa flag is set to non-zero if the buffer should be read back through - * the FSA (unicos/mk). This implies the file will be opened - * O_PARALLEL|O_RAW|O_WELLFORMED to do the validation. We must do this because - * FSA will not allow the file to be opened for buffered io if it was - * previously opened for O_PARALLEL io. - */ - -char * -check_file(file, offset, length, pattern, pattern_length, patshift, fsa) -char *file; -int offset; -int length; -char *pattern; -int pattern_length; -int patshift; -int fsa; -{ - static char errbuf[4096]; - int fd, nb, flags; - char *buf, *em, *ep; -#ifdef sgi - struct fd_cache *fdc; -#endif - - buf = Memptr; - - if (V_opt) { - flags = Validation_Flags | O_RDONLY; - } else { - flags = O_RDONLY; - if (fsa) { -#ifdef CRAY - flags |= O_PARALLEL | O_RAW | O_WELLFORMED; -#endif - } - } - - if ((fd = alloc_fd(file, flags)) == -1) { - sprintf(errbuf, - "Could not open file %s with flags %#o (%s) for data comparison: %s (%d)\n", - file, flags, format_oflags(flags), - SYSERR, errno); - return errbuf; - } - - if (lseek(fd, offset, SEEK_SET) == -1) { - sprintf(errbuf, - "Could not lseek to offset %d in %s for verification: %s (%d)\n", - offset, file, SYSERR, errno); - return errbuf; - } - -#ifdef sgi - /* Irix: Guarantee a properly aligned address on Direct I/O */ - fdc = alloc_fdcache(file, flags); - if( (flags & O_DIRECT) && ((long)buf % fdc->c_memalign != 0) ) { - buf += fdc->c_memalign - ((long)buf % fdc->c_memalign); - } -#endif - - if ((nb = read(fd, buf, length)) == -1) { -#ifdef sgi - sprintf(errbuf, - "Could not read %d bytes from %s for verification: %s (%d)\n\tread(%d, 0x%lx, %d)\n\tbuf %% alignment(%d) = %ld\n", - length, file, SYSERR, errno, - fd, buf, length, - fdc->c_memalign, (long)buf % fdc->c_memalign); -#else - sprintf(errbuf, - "Could not read %d bytes from %s for verification: %s (%d)\n", - length, file, SYSERR, errno); - -#endif - return errbuf; - } - - if (nb != length) { - sprintf(errbuf, - "Read wrong # bytes from %s. Expected %d, got %d\n", - file, length, nb); - return errbuf; - } - - if( (em = (*Data_Check)(buf, offset, length, pattern, pattern_length, patshift)) != NULL ) { - ep = errbuf; - ep += sprintf(ep, "*** DATA COMPARISON ERROR ***\n"); - ep += sprintf(ep, "check_file(%s, %d, %d, %s, %d, %d) failed\n\n", - file, offset, length, pattern, pattern_length, patshift); - ep += sprintf(ep, "Comparison fd is %d, with open flags %#o\n", - fd, flags); - strcpy(ep, em); - return(errbuf); - } - return NULL; -} - -/* - * Function to single-thread stdio output. - */ - -int -doio_fprintf(FILE *stream, char *format, ...) -{ - static int pid = -1; - char *date; - int rval; - struct flock flk; - va_list arglist; - - date = hms(time(0)); - - if (pid == -1) { - pid = getpid(); - } - - flk.l_whence = flk.l_start = flk.l_len = 0; - flk.l_type = F_WRLCK; - fcntl(fileno(stream), F_SETLKW, &flk); - - va_start(arglist, format); - rval = fprintf(stream, "\n%s%s (%5d) %s\n", Prog, TagName, pid, date); - rval += fprintf(stream, "---------------------\n"); - vfprintf(stream, format, arglist); - va_end(arglist); - - fflush(stream); - - flk.l_type = F_UNLCK; - fcntl(fileno(stream), F_SETLKW, &flk); - - return rval; -} - -/* - * Simple function for allocating core memory. Uses Memsize and Memptr to - * keep track of the current amount allocated. - */ -#ifndef CRAY -int -alloc_mem(nbytes) -int nbytes; -{ - char *cp; - void *addr; - int me, flags, key, shmid; - static int mturn = 0; /* which memory type to use */ - struct memalloc *M; - char filename[255]; -#ifdef __linux__ - struct shmid_ds shm_ds; -#endif - -#ifdef __linux__ - memset( &shm_ds, 0x00, sizeof(struct shmid_ds) ); -#endif - - /* nbytes = -1 means "free all allocated memory" */ - if( nbytes == -1 ) { - - for(me=0; me < Nmemalloc; me++) { - if(Memalloc[me].space == NULL) - continue; - - switch(Memalloc[me].memtype) { - case MEM_DATA: -#ifdef sgi - if(Memalloc[me].flags & MEMF_MPIN) - munpin(Memalloc[me].space, - Memalloc[me].size); -#endif - free(Memalloc[me].space); - Memalloc[me].space = NULL; - Memptr = NULL; - Memsize = 0; - break; - case MEM_SHMEM: -#ifdef sgi - if(Memalloc[me].flags & MEMF_MPIN) - munpin(Memalloc[me].space, - Memalloc[me].size); -#endif - shmdt(Memalloc[me].space); - Memalloc[me].space = NULL; -#ifdef sgi - shmctl(Memalloc[me].fd, IPC_RMID); -#else - shmctl(Memalloc[me].fd, IPC_RMID, &shm_ds); -#endif - break; - case MEM_MMAP: -#ifdef sgi - if(Memalloc[me].flags & MEMF_MPIN) - munpin(Memalloc[me].space, - Memalloc[me].size); -#endif - munmap(Memalloc[me].space, - Memalloc[me].size); - close(Memalloc[me].fd); - if(Memalloc[me].flags & MEMF_FILE) { - unlink(Memalloc[me].name); - } - Memalloc[me].space = NULL; - break; - default: - doio_fprintf(stderr, "alloc_mem: HELP! Unknown memory space type %d index %d\n", - Memalloc[me].memtype, me); - break; - } - } - return 0; - } - - /* - * Select a memory area (currently round-robbin) - */ - - if(mturn >= Nmemalloc) - mturn=0; - - M = &Memalloc[mturn]; - - switch(M->memtype) { - case MEM_DATA: - if( nbytes > M->size ) { - if( M->space != NULL ){ -#ifdef sgi - if( M->flags & MEMF_MPIN ) - munpin( M->space, M->size ); -#endif - free(M->space); - } - M->space = NULL; - M->size = 0; - } - - if( M->space == NULL ) { - if( (cp = malloc( nbytes )) == NULL ) { - doio_fprintf(stderr, "malloc(%d) failed: %s (%d)\n", - nbytes, SYSERR, errno); - return -1; - } -#ifdef sgi - if(M->flags & MEMF_MPIN) { - if( mpin(cp, nbytes) == -1 ) { - doio_fprintf(stderr, "mpin(0x%lx, %d) failed: %s (%d)\n", - cp, nbytes, SYSERR, errno); - } - } -#endif - M->space = (void *)cp; - M->size = nbytes; - } - break; - - case MEM_MMAP: - if( nbytes > M->size ) { - if( M->space != NULL ) { -#ifdef sgi - if( M->flags & MEMF_MPIN ) - munpin(M->space, M->size); -#endif - munmap(M->space, M->size); - close(M->fd); - if( M->flags & MEMF_FILE ) - unlink( M->name ); - } - M->space = NULL; - M->size = 0; - } - - if( M->space == NULL ) { - if(strchr(M->name, '%')) { - sprintf(filename, M->name, getpid()); - M->name = strdup(filename); - } - - if( (M->fd = open(M->name, O_CREAT|O_RDWR, 0666)) == -1) { - doio_fprintf(stderr, "alloc_mmap: error %d (%s) opening '%s'\n", - errno, SYSERR, - M->name); - return(-1); - } - - addr = NULL; - flags = 0; - M->size = nbytes * 4; - - /* bias addr if MEMF_ADDR | MEMF_FIXADDR */ - /* >>> how to pick a memory address? */ - - /* bias flags on MEMF_PRIVATE etc */ - if(M->flags & MEMF_PRIVATE) - flags |= MAP_PRIVATE; -#ifdef sgi - if(M->flags & MEMF_LOCAL) - flags |= MAP_LOCAL; - if(M->flags & MEMF_AUTORESRV) - flags |= MAP_AUTORESRV; - if(M->flags & MEMF_AUTOGROW) - flags |= MAP_AUTOGROW; -#endif - if(M->flags & MEMF_SHARED) - flags |= MAP_SHARED; - -/*printf("alloc_mem, about to mmap, fd=%d, name=(%s)\n", M->fd, M->name);*/ - if( (M->space = mmap(addr, M->size, - PROT_READ|PROT_WRITE, - flags, M->fd, 0)) - == MAP_FAILED) { - doio_fprintf(stderr, "alloc_mem: mmap error. errno %d (%s)\n\tmmap(addr 0x%x, size %d, read|write 0x%x, mmap flags 0x%x [%#o], fd %d, 0)\n\tfile %s\n", - errno, SYSERR, - addr, M->size, - PROT_READ|PROT_WRITE, - flags, M->flags, M->fd, - M->name); - doio_fprintf(stderr, "\t%s%s%s%s%s", - (flags & MAP_PRIVATE) ? "private " : "", -#ifdef sgi - (flags & MAP_LOCAL) ? "local " : "", - (flags & MAP_AUTORESRV) ? "autoresrv " : "", - (flags & MAP_AUTOGROW) ? "autogrow " : "", -#endif - (flags & MAP_SHARED) ? "shared" : ""); - return(-1); - } - } - break; - - case MEM_SHMEM: - if( nbytes > M->size ) { - if( M->space != NULL ) { -#ifdef sgi - if( M->flags & MEMF_MPIN ) - munpin(M->space, M->size); -#endif - shmdt( M->space ); -#ifdef sgi - shmctl( M->fd, IPC_RMID ); -#else - shmctl( M->fd, IPC_RMID, &shm_ds ); -#endif - } - M->space = NULL; - M->size = 0; - } - - if(M->space == NULL) { - if(!strcmp(M->name, "private")) { - key = IPC_PRIVATE; - } else { - sscanf(M->name, "%i", &key); - } - - M->size = M->nblks ? M->nblks * 512 : nbytes; - - if( nbytes > M->size ){ -#ifdef DEBUG - doio_fprintf(stderr, "MEM_SHMEM: nblks(%d) too small: nbytes=%d Msize=%d, skipping this req.\n", - M->nblks, nbytes, M->size ); -#endif - return SKIP_REQ; - } - - shmid = shmget(key, M->size, IPC_CREAT|0666); - if( shmid == -1 ) { - doio_fprintf(stderr, "shmget(0x%x, %d, CREAT) failed: %s (%d)\n", - key, M->size, SYSERR, errno); - return(-1); - } - M->fd = shmid; - M->space = shmat(shmid, NULL, SHM_RND); - if( M->space == (void *)-1 ) { - doio_fprintf(stderr, "shmat(0x%x, NULL, SHM_RND) failed: %s (%d)\n", - shmid, SYSERR, errno); - return(-1); - } -#ifdef sgi - if(M->flags & MEMF_MPIN) { - if( mpin(M->space, M->size) == -1 ) { - doio_fprintf(stderr, "mpin(0x%lx, %d) failed: %s (%d)\n", - M->space, M->size, SYSERR, errno); - } - } -#endif - } - break; - - default: - doio_fprintf(stderr, "alloc_mem: HELP! Unknown memory space type %d index %d\n", - Memalloc[me].memtype, mturn); - break; - } - - Memptr = M->space; - Memsize = M->size; - - mturn++; - return 0; -} -#endif /* !CRAY */ - -#ifdef CRAY -int -alloc_mem(nbytes) -int nbytes; -{ - char *cp; - int ip; - static char *malloc_space; - - /* - * The "unicos" version of this did some stuff with sbrk; - * this caused problems with async I/O on irix, and now appears - * to be causing problems with FSA I/O on unicos/mk. - */ -#ifdef NOTDEF - if (nbytes > Memsize) { - if ((cp = (char *)sbrk(nbytes - Memsize)) == (char *)-1) { - doio_fprintf(stderr, "sbrk(%d) failed: %s (%d)\n", - nbytes - Memsize, SYSERR, errno); - return -1; - } - - if (Memsize == 0) - Memptr = cp; - Memsize += nbytes - Memsize; - } -#else - - /* nbytes = -1 means "free all allocated memory" */ - if( nbytes == -1 ) { - free( malloc_space ); - Memptr = NULL; - Memsize = 0; - return 0; - } - - if( nbytes > Memsize ) { - if( Memsize != 0 ) - free( malloc_space ); - - if( (cp = malloc_space = malloc( nbytes )) == NULL ) { - doio_fprintf(stderr, "malloc(%d) failed: %s (%d)\n", - nbytes, SYSERR, errno); - return -1; - } - -#ifdef _CRAYT3E - /* T3E requires memory to be aligned on 0x40 word boundaries */ - ip = (int)cp; - if( ip & 0x3F != 0 ) { - doio_fprintf(stderr, "malloc(%d) = 0x%x(0x%x) not aligned by 0x%x\n", - nbytes, cp, ip, ip & 0x3f); - - free(cp); - if( (cp = malloc_space = malloc( nbytes + 0x40 )) == NULL ) { - doio_fprintf(stderr, "malloc(%d) failed: %s (%d)\n", - nbytes, SYSERR, errno); - return -1; - } - ip = (int)cp; - cp += (0x40 - (ip & 0x3F)); - } -#endif /* _CRAYT3E */ - Memptr = cp; - Memsize = nbytes; - } -#endif /* NOTDEF */ - return 0; -} -#endif /* CRAY */ - -/* - * Simple function for allocating sds space. Uses Sdssize and Sdsptr to - * keep track of location and size of currently allocated chunk. - */ - -#ifdef _CRAY1 - -int -alloc_sds(nbytes) -int nbytes; -{ - int nblks; - - if (nbytes > Sdssize) { - if ((nblks = ssbreak(btoc(nbytes - Sdssize))) == -1) { - doio_fprintf(stderr, "ssbreak(%d) failed: %s (%d)\n", - btoc(nbytes - Sdssize), SYSERR, errno); - return -1; - } - - Sdssize = ctob(nblks); - Sdsptr = 0; - } - - return 0; -} - -#else - -#ifdef CRAY - -int -alloc_sds(nbytes) -int nbytes; -{ - doio_fprintf(stderr, - "Internal Error - alloc_sds() called on a CRAY2 system\n"); - alloc_mem(-1); - exit(E_INTERNAL); -} - -#endif - -#endif /* _CRAY1 */ - -/* - * Function to maintain a file descriptor cache, so that doio does not have - * to do so many open() and close() calls. Descriptors are stored in the - * cache by file name, and open flags. Each entry also has a _rtc value - * associated with it which is used in aging. If doio cannot open a file - * because it already has too many open (ie. system limit hit) it will close - * the one in the cache that has the oldest _rtc value. - * - * If alloc_fd() is called with a file of NULL, it will close all descriptors - * in the cache, and free the memory in the cache. - */ - -int -alloc_fd(file, oflags) -char *file; -int oflags; -{ - struct fd_cache *fdc; - struct fd_cache *alloc_fdcache(char *file, int oflags); - - fdc = alloc_fdcache(file, oflags); - if(fdc != NULL) - return(fdc->c_fd); - else - return(-1); -} - -struct fd_cache * -alloc_fdcache(file, oflags) -char *file; -int oflags; -{ - int fd; - struct fd_cache *free_slot, *oldest_slot, *cp; - static int cache_size = 0; - static struct fd_cache *cache = NULL; -#ifdef sgi - struct dioattr finfo; -#endif - - /* - * If file is NULL, it means to free up the fd cache. - */ - - if (file == NULL && cache != NULL) { - for (cp = cache; cp < &cache[cache_size]; cp++) { - if (cp->c_fd != -1) { - close(cp->c_fd); - } -#ifndef CRAY - if (cp->c_memaddr != NULL) { - munmap(cp->c_memaddr, cp->c_memlen); - } -#endif - } - - free(cache); - cache = NULL; - cache_size = 0; - return 0; - } - - free_slot = NULL; - oldest_slot = NULL; - - /* - * Look for a fd in the cache. If one is found, return it directly. - * Otherwise, when this loop exits, oldest_slot will point to the - * oldest fd slot in the cache, and free_slot will point to an - * unoccupied slot if there are any. - */ - - for (cp = cache; cp != NULL && cp < &cache[cache_size]; cp++) { - if (cp->c_fd != -1 && - cp->c_oflags == oflags && - strcmp(cp->c_file, file) == 0) { -#ifdef CRAY - cp->c_rtc = _rtc(); -#else - cp->c_rtc = Reqno; -#endif - return cp; - } - - if (cp->c_fd == -1) { - if (free_slot == NULL) { - free_slot = cp; - } - } else { - if (oldest_slot == NULL || - cp->c_rtc < oldest_slot->c_rtc) { - oldest_slot = cp; - } - } - } - - /* - * No matching file/oflags pair was found in the cache. Attempt to - * open a new fd. - */ - - if ((fd = open(file, oflags, 0666)) < 0) { - if (errno != EMFILE) { - doio_fprintf(stderr, - "Could not open file %s with flags %#o (%s): %s (%d)\n", - file, oflags, format_oflags(oflags), - SYSERR, errno); - alloc_mem(-1); - exit(E_SETUP); - } - - /* - * If we get here, we have as many open fd's as we can have. - * Close the oldest one in the cache (pointed to by - * oldest_slot), and attempt to re-open. - */ - - close(oldest_slot->c_fd); - oldest_slot->c_fd = -1; - free_slot = oldest_slot; - - if ((fd = open(file, oflags, 0666)) < 0) { - doio_fprintf(stderr, - "Could not open file %s with flags %#o (%s): %s (%d)\n", - file, oflags, format_oflags(oflags), - SYSERR, errno); - alloc_mem(-1); - exit(E_SETUP); - } - } - -/*printf("alloc_fd: new file %s flags %#o fd %d\n", file, oflags, fd);*/ - - /* - * If we get here, fd is our open descriptor. If free_slot is NULL, - * we need to grow the cache, otherwise free_slot is the slot that - * should hold the fd info. - */ - - if (free_slot == NULL) { - cache = (struct fd_cache *)realloc(cache, sizeof(struct fd_cache) * (FD_ALLOC_INCR + cache_size)); - if (cache == NULL) { - doio_fprintf(stderr, "Could not malloc() space for fd chace"); - alloc_mem(-1); - exit(E_SETUP); - } - - cache_size += FD_ALLOC_INCR; - - for (cp = &cache[cache_size-FD_ALLOC_INCR]; - cp < &cache[cache_size]; cp++) { - cp->c_fd = -1; - } - - free_slot = &cache[cache_size - FD_ALLOC_INCR]; - } - - /* - * finally, fill in the cache slot info - */ - - free_slot->c_fd = fd; - free_slot->c_oflags = oflags; - strcpy(free_slot->c_file, file); -#ifdef CRAY - free_slot->c_rtc = _rtc(); -#else - free_slot->c_rtc = Reqno; -#endif - -#ifdef sgi - if(oflags & O_DIRECT) { - if(fcntl(fd, F_DIOINFO, &finfo) == -1) { - finfo.d_mem = 1; - finfo.d_miniosz = 1; - finfo.d_maxiosz = 1; - } - } else { - finfo.d_mem = 1; - finfo.d_miniosz = 1; - finfo.d_maxiosz = 1; - } - - free_slot->c_memalign = finfo.d_mem; - free_slot->c_miniosz = finfo.d_miniosz; - free_slot->c_maxiosz = finfo.d_maxiosz; -#endif /* sgi */ -#ifndef CRAY - free_slot->c_memaddr = NULL; - free_slot->c_memlen = 0; -#endif - - return free_slot; -} - -/* - * - * Signal Handling Section - * - * - */ - -#ifdef sgi -/* - * "caller-id" for signals - */ -void -signal_info(int sig, siginfo_t *info, void *v) -{ - int haveit = 0; - - if(info != NULL) { - switch(info->si_code) { - case SI_USER: - doio_fprintf(stderr, - "signal_info: si_signo %d si_errno %d si_code SI_USER pid %d uid %d\n", - info->si_signo, info->si_errno, - info->si_pid, info->si_uid); - haveit = 1; - break; - - case SI_QUEUE: - doio_fprintf(stderr, "signal_info si_signo %d si_code = SI_QUEUE\n", - info->si_signo); - haveit = 1; - break; - } - - if( ! haveit ){ - if( (info->si_signo == SIGSEGV) || - (info->si_signo == SIGBUS) ){ - doio_fprintf(stderr, "signal_info si_signo %d si_errno %d si_code = %d si_addr=%p active_mmap_rw=%d havesigint=%d\n", - info->si_signo, info->si_errno, - info->si_code, info->si_addr, - active_mmap_rw, - havesigint); - haveit = 1; - } - } - - if( !haveit ){ - doio_fprintf(stderr, "signal_info: si_signo %d si_errno %d unknown code %d\n", - info->si_signo, info->si_errno, - info->si_code); - } - } else { - doio_fprintf(stderr, "signal_info: sig %d\n", sig); - } -} -#endif - -#ifdef sgi -void -cleanup_handler(int sig, siginfo_t *info, void *v) -{ - havesigint=1; /* in case there's a followup signal */ - /*signal_info(sig, info, v);*/ /* be quiet on "normal" kill */ - alloc_mem(-1); - exit(0); -} - - -void -die_handler(int sig, siginfo_t *info, void *v) -{ - doio_fprintf(stderr, "terminating on signal %d\n", sig); - signal_info(sig, info, v); - alloc_mem(-1); - exit(1); -} - -void -sigbus_handler(int sig, siginfo_t *info, void *v) -{ - /* While we are doing a memcpy to/from an mmapped region we can - get a SIGBUS for a variety of reasons--and not all of them - should be considered failures. - - Under normal conditions if we get a SIGINT it means we've been - told to shutdown. However, if we're currently doing the above- - mentioned memcopy then the kernel will follow that SIGINT with - a SIGBUS. We can guess that we're in this situation by seeing - that the si_errno field in the siginfo structure has EINTR as - an errno. (We might make the guess stronger by looking at the - si_addr field to see that it's not faulting off the end of the - mmapped region, but it seems that in such a case havesigint - would not have been set so maybe that doesn't make the guess - stronger.) - */ - - - if( active_mmap_rw && havesigint && (info->si_errno == EINTR) ){ - cleanup_handler( sig, info, v ); - } - else{ - die_handler( sig, info, v ); - } -} -#else - -void -cleanup_handler() -{ - havesigint=1; /* in case there's a followup signal */ - alloc_mem(-1); - exit(0); -} - -void -die_handler(sig) -int sig; -{ - doio_fprintf(stderr, "terminating on signal %d\n", sig); - alloc_mem(-1); - exit(1); -} - -#ifndef CRAY -void -sigbus_handler(sig) -int sig; -{ - /* See sigbus_handler() in the 'ifdef sgi' case for details. Here, - we don't have the siginfo stuff so the guess is weaker but we'll - do it anyway. - */ - - if( active_mmap_rw && havesigint ) - cleanup_handler(); - else - die_handler(sig); -} -#endif /* !CRAY */ -#endif /* sgi */ - - -void -noop_handler(sig) -int sig; -{ - return; -} - - -/* - * SIGINT handler for the parent (original doio) process. It simply sends - * a SIGINT to all of the doio children. Since they're all in the same - * pgrp, this can be done with a single kill(). - */ - -void -sigint_handler() -{ - int i; - - for (i = 0; i < Nchildren; i++) { - if (Children[i] != -1) { - kill(Children[i], SIGINT); - } - } -} - -/* - * Signal handler used to inform a process when async io completes. Referenced - * in do_read() and do_write(). Note that the signal handler is not - * re-registered. - */ - -void -aio_handler(sig) -int sig; -{ - unsigned int i; - struct aio_info *aiop; - - for (i = 0; i < sizeof(Aio_Info) / sizeof(Aio_Info[0]); i++) { - aiop = &Aio_Info[i]; - - if (aiop->strategy == A_SIGNAL && aiop->sig == sig) { - aiop->signalled++; - - if (aio_done(aiop)) { - aiop->done++; - } - } - } -} - -/* - * dump info on all open aio slots - */ -void -dump_aio() -{ - unsigned int i, count; - - count=0; - for (i = 0; i < sizeof(Aio_Info) / sizeof(Aio_Info[0]); i++) { - if (Aio_Info[i].busy) { - count++; - fprintf(stderr, - "Aio_Info[%03d] id=%d fd=%d signal=%d signaled=%d\n", - i, Aio_Info[i].id, - Aio_Info[i].fd, - Aio_Info[i].sig, - Aio_Info[i].signalled); - fprintf(stderr, "\tstrategy=%s\n", - format_strat(Aio_Info[i].strategy)); - } - } - fprintf(stderr, "%d active async i/os\n", count); -} - - -#ifdef sgi -/* - * Signal handler called as a callback, not as a signal. - * 'val' is the value from sigev_value and is assumed to be the - * Aio_Info[] index. - */ -void -cb_handler(val) -sigval_t val; -{ - struct aio_info *aiop; - -/*printf("cb_handler requesting slot %d\n", val.sival_int);*/ - aiop = aio_slot( val.sival_int ); -/*printf("cb_handler, aiop=%p\n", aiop);*/ - -/*printf("%d in cb_handler\n", getpid() );*/ - if (aiop->strategy == A_CALLBACK) { - aiop->signalled++; - - if (aio_done(aiop)) { - aiop->done++; - } - } -} -#endif - -struct aio_info * -aio_slot(aio_id) -int aio_id; -{ - unsigned int i; - static int id = 1; - struct aio_info *aiop; - - aiop = NULL; - - for (i = 0; i < sizeof(Aio_Info) / sizeof(Aio_Info[0]); i++) { - if (aio_id == -1) { - if (! Aio_Info[i].busy) { - aiop = &Aio_Info[i]; - aiop->busy = 1; - aiop->id = id++; - break; - } - } else { - if (Aio_Info[i].busy && Aio_Info[i].id == aio_id) { - aiop = &Aio_Info[i]; - break; - } - } - } - - if( aiop == NULL ){ - doio_fprintf(stderr,"aio_slot(%d) not found. Request %d\n", - aio_id, Reqno); - dump_aio(); - alloc_mem(-1); - exit(E_INTERNAL); - } - - return aiop; -} - -int -aio_register(fd, strategy, sig) -int fd; -int strategy; -int sig; -{ - struct aio_info *aiop; - void aio_handler(); - struct sigaction sa; - - aiop = aio_slot(-1); - - aiop->fd = fd; - aiop->strategy = strategy; - aiop->done = 0; -#ifdef CRAY - memset((char *)&aiop->iosw, 0x00, sizeof(aiop->iosw)); -#endif - - if (strategy == A_SIGNAL) { - aiop->sig = sig; - aiop->signalled = 0; - - sa.sa_handler = aio_handler; - sa.sa_flags = 0; - sigemptyset(&sa.sa_mask); - - sigaction(sig, &sa, &aiop->osa); - } else { - aiop->sig = -1; - aiop->signalled = 0; - } - - return aiop->id; -} - -int -aio_unregister(aio_id) -int aio_id; -{ - struct aio_info *aiop; - - aiop = aio_slot(aio_id); - - if (aiop->strategy == A_SIGNAL) { - sigaction(aiop->sig, &aiop->osa, NULL); - } - - aiop->busy = 0; - return 0; -} - -#ifndef __linux__ -int -aio_wait(aio_id) -int aio_id; -{ -#ifdef RECALL_SIZEOF - long mask[RECALL_SIZEOF]; -#endif - sigset_t sigset; - struct aio_info *aiop; -#ifdef CRAY - struct iosw *ioswlist[1]; -#endif -#ifdef sgi - const aiocb_t *aioary[1]; -#endif - int r, cnt; - - - aiop = aio_slot(aio_id); -/*printf("%d aiop B =%p\n", getpid(), aiop);*/ - - switch (aiop->strategy) { - case A_POLL: - while (! aio_done(aiop)) - ; - break; - - case A_SIGNAL: - sigemptyset(&sigset); - sighold( aiop->sig ); - - while ( !aiop->signalled || !aiop->done ) { - sigsuspend(&sigset); - sighold( aiop->sig ); - } - break; - -#ifdef CRAY - case A_RECALL: - ioswlist[0] = &aiop->iosw; - if (recall(aiop->fd, 1, ioswlist) < 0) { - doio_fprintf(stderr, "recall() failed: %s (%d)\n", - SYSERR, errno); - exit(E_SETUP); - } - break; - -#ifdef RECALL_SIZEOF - - case A_RECALLA: - RECALL_INIT(mask); - RECALL_SET(mask, aiop->fd); - if (recalla(mask) < 0) { - doio_fprintf(stderr, "recalla() failed: %s (%d)\n", - SYSERR, errno); - exit(E_SETUP); - } - - RECALL_CLR(mask, aiop->fd); - break; -#endif - - case A_RECALLS: - ioswlist[0] = &aiop->iosw; - if (recalls(1, ioswlist) < 0) { - doio_fprintf(stderr, "recalls failed: %s (%d)\n", - SYSERR, errno); - exit(E_SETUP); - } - break; -#endif /* CRAY */ - -#ifdef sgi - case A_CALLBACK: - aioary[0] = &aiop->aiocb; - cnt=0; - do { - r = aio_suspend(aioary, 1, NULL); - if( r == -1 ){ - doio_fprintf(stderr, "aio_suspend failed: %s (%d)\n", - SYSERR, errno ); - exit(E_SETUP); - } - cnt++; - } while(aiop->done == 0); - -#if 0 - /* - * after having this set for a while, I've decided that - * it's too noisy - */ - if(cnt > 1) - doio_fprintf(stderr, "aio_wait: callback wait took %d tries\n", cnt); -#endif - - /* - * Note: cb_handler already calls aio_done - */ - break; - - - case A_SUSPEND: - aioary[0] = &aiop->aiocb; - r = aio_suspend(aioary, 1, NULL); - if( r == -1 ){ - doio_fprintf(stderr, "aio_suspend failed: %s (%d)\n", - SYSERR, errno ); - exit(E_SETUP); - } - - aio_done(aiop); - break; -#endif - } - -/*printf("aio_wait: errno %d return %d\n", aiop->aio_errno, aiop->aio_ret);*/ - - return 0; -} -#endif /* !linux */ - -/* - * Format specified time into HH:MM:SS format. t is the time to format - * in seconds (as returned from time(2)). - */ - -char * -hms(t) -time_t t; -{ - static char ascii_time[9]; - struct tm *ltime; - - ltime = localtime(&t); - strftime(ascii_time, sizeof(ascii_time), "%H:%M:%S", ltime); - - return ascii_time; -} - -/* - * Simple routine to check if an async io request has completed. - */ - -int -aio_done(struct aio_info *ainfo) -{ -#ifdef CRAY - return ainfo->iosw.sw_flag; -#endif - -#ifdef sgi - if( (ainfo->aio_errno = aio_error(&ainfo->aiocb)) == -1 ){ - doio_fprintf(stderr, "aio_done: aio_error failed: %s (%d)\n", - SYSERR, errno ); - exit(E_SETUP); - } - /*printf("%d aio_done aio_errno=%d\n", getpid(), ainfo->aio_errno);*/ - if( ainfo->aio_errno != EINPROGRESS ){ - if( (ainfo->aio_ret = aio_return(&ainfo->aiocb)) == -1 ){ - doio_fprintf(stderr, "aio_done: aio_return failed: %s (%d)\n", - SYSERR, errno ); - exit(E_SETUP); - } - } - - return (ainfo->aio_errno != EINPROGRESS); -#else - return -1; /* invalid */ -#endif -} - -/* - * Routine to handle upanic() - it first attempts to set the panic flag. If - * the flag cannot be set, an error message is issued. A call to upanic - * with PA_PANIC is then done unconditionally, in case the panic flag was set - * from outside the program (as with the panic(8) program). - * - * Note - we only execute the upanic code if -U was used, and the passed in - * mask is set in the Upanic_Conditions bitmask. - */ - -void -doio_upanic(mask) -int mask; -{ - if (U_opt == 0 || (mask & Upanic_Conditions) == 0) { - return; - } - -#ifdef CRAY - if (upanic(PA_SET) < 0) { - doio_fprintf(stderr, "WARNING - Could not set the panic flag - upanic(PA_SET) failed: %s (%d)\n", - SYSERR, errno); - } - - upanic(PA_PANIC); -#endif -#ifdef sgi - syssgi(1005); /* syssgi test panic - DEBUG kernels only */ -#endif - doio_fprintf(stderr, "WARNING - upanic() failed\n"); -} - -/* - * Parse cmdline options/arguments and set appropriate global variables. - * If the cmdline is valid, return 0 to caller. Otherwise exit with a status - * of 1. - */ - -int -parse_cmdline(argc, argv, opts) -int argc; -char **argv; -char *opts; -{ - int c; - char cc, *cp, *tok; - extern int opterr; - extern int optind; - extern char *optarg; - struct smap *s; - char *memargs[NMEMALLOC]; - int nmemargs, ma; - void parse_memalloc(char *arg); - void parse_delay(char *arg); - void dump_memalloc(); - - if (*argv[0] == '-') { - argv[0]++; - Execd = 1; - } - - if ((Prog = strrchr(argv[0], '/')) == NULL) { - Prog = argv[0]; - } else { - Prog++; - } - - opterr = 0; - while ((c = getopt(argc, argv, opts)) != EOF) { - switch ((char)c) { - case 'a': - a_opt++; - break; - - case 'C': - C_opt++; - for(s=checkmap; s->string != NULL; s++) - if(!strcmp(s->string, optarg)) - break; - if (s->string == NULL) { - fprintf(stderr, - "%s%s: Illegal -C arg (%s). Must be one of: ", - Prog, TagName, tok); - - for (s = checkmap; s->string != NULL; s++) - fprintf(stderr, "%s ", s->string); - fprintf(stderr, "\n"); - exit(1); - } - - switch(s->value) { - case C_DEFAULT: - Data_Fill = doio_pat_fill; - Data_Check = doio_pat_check; - break; - default: - fprintf(stderr, - "%s%s: Unrecognised -C arg '%s' %d", - Prog, TagName, s->string, s->value); - exit(1); - } - break; - - case 'd': /* delay between i/o ops */ - parse_delay(optarg); - break; - - case 'e': - if (Npes > 1 && Nprocs > 1) { - fprintf(stderr, "%s%s: Warning - Program is a multi-pe application - exec option is ignored.\n", Prog, TagName); - } - e_opt++; - break; - - case 'h': - help(stdout); - exit(0); - break; - - case 'k': - k_opt++; - break; - - case 'm': - Message_Interval = strtol(optarg, &cp, 10); - if (*cp != '\0' || Message_Interval < 0) { - fprintf(stderr, "%s%s: Illegal -m arg (%s): Must be an integer >= 0\n", Prog, TagName, optarg); - exit(1); - } - m_opt++; - break; - - case 'M': /* memory allocation types */ -#ifndef CRAY - nmemargs = string_to_tokens(optarg, memargs, 32, ","); - for(ma=0; ma < nmemargs; ma++) { - parse_memalloc(memargs[ma]); - } - /*dump_memalloc();*/ -#else - fprintf(stderr, "%s%s: Error: -M isn't supported on this platform\n", Prog, TagName); - exit(1); -#endif - M_opt++; - break; - - case 'N': - sprintf( TagName, "(%.39s)", optarg ); - break; - - case 'n': - Nprocs = strtol(optarg, &cp, 10); - if (*cp != '\0' || Nprocs < 1) { - fprintf(stderr, - "%s%s: Illegal -n arg (%s): Must be integer > 0\n", - Prog, TagName, optarg); - exit(E_USAGE); - } - - if (Npes > 1 && Nprocs > 1) { - fprintf(stderr, "%s%s: Program has been built as a multi-pe app. -n1 is the only nprocs value allowed\n", Prog, TagName); - exit(E_SETUP); - } - n_opt++; - break; - - case 'r': - Release_Interval = strtol(optarg, &cp, 10); - if (*cp != '\0' || Release_Interval < 0) { - fprintf(stderr, - "%s%s: Illegal -r arg (%s): Must be integer >= 0\n", - Prog, TagName, optarg); - exit(E_USAGE); - } - - r_opt++; - break; - - case 'w': - Write_Log = optarg; - w_opt++; - break; - - case 'v': - v_opt++; - break; - - case 'V': - if (strcasecmp(optarg, "sync") == 0) { - Validation_Flags = O_SYNC; - } else if (strcasecmp(optarg, "buffered") == 0) { - Validation_Flags = 0; -#ifdef CRAY - } else if (strcasecmp(optarg, "parallel") == 0) { - Validation_Flags = O_PARALLEL; - } else if (strcasecmp(optarg, "ldraw") == 0) { - Validation_Flags = O_LDRAW; - } else if (strcasecmp(optarg, "raw") == 0) { - Validation_Flags = O_RAW; -#endif -#ifdef sgi - } else if (strcasecmp(optarg, "direct") == 0) { - Validation_Flags = O_DIRECT; -#endif - } else { - if (sscanf(optarg, "%i%c", &Validation_Flags, &cc) != 1) { - fprintf(stderr, "%s: Invalid -V argument (%s) - must be a decimal, hex, or octal\n", Prog, optarg); - fprintf(stderr, " number, or one of the following strings: 'sync',\n"); - fprintf(stderr, " 'buffered', 'parallel', 'ldraw', or 'raw'\n"); - exit(E_USAGE); - } - } - V_opt++; - break; - case 'U': - tok = strtok(optarg, ","); - while (tok != NULL) { - for (s = Upanic_Args; s->string != NULL; s++) - if (strcmp(s->string, tok) == 0) - break; - - if (s->string == NULL) { - fprintf(stderr, - "%s%s: Illegal -U arg (%s). Must be one of: ", - Prog, TagName, tok); - - for (s = Upanic_Args; s->string != NULL; s++) - fprintf(stderr, "%s ", s->string); - - fprintf(stderr, "\n"); - - exit(1); - } - - Upanic_Conditions |= s->value; - tok = strtok(NULL, ","); - } - - U_opt++; - break; - - case '?': - usage(stderr); - exit(E_USAGE); - break; - } - } - - /* - * Supply defaults - */ - - if (! C_opt) { - Data_Fill = doio_pat_fill; - Data_Check = doio_pat_check; - } - - if (! U_opt) - Upanic_Conditions = 0; - - if (! n_opt) - Nprocs = 1; - - if (! r_opt) - Release_Interval = DEF_RELEASE_INTERVAL; - - if (! M_opt) { - Memalloc[Nmemalloc].memtype = MEM_DATA; - Memalloc[Nmemalloc].flags = 0; - Memalloc[Nmemalloc].name = NULL; - Memalloc[Nmemalloc].space = NULL; - Nmemalloc++; - } - - /* - * Initialize input stream - */ - - if (argc == optind) { - Infile = NULL; - } else { - Infile = argv[optind++]; - } - - if (argc != optind) { - usage(stderr); - exit(E_USAGE); - } - - return 0; -} - - - -/* - * Parse memory allocation types - * - * Types are: - * Data - * T3E-shmem:blksize[:nblks] - * SysV-shmem:shmid:blksize:nblks - * if shmid is "private", use IPC_PRIVATE - * and nblks is not required - * - * mmap:flags:filename:blksize[:nblks] - * flags are one of: - * p - private (MAP_PRIVATE) - * a - private, MAP_AUTORESRV - * l - local (MAP_LOCAL) - * s - shared (nblks required) - * - * plus any of: - * f - fixed address (MAP_FIXED) - * A - use an address without MAP_FIXED - * a - autogrow (map once at startup) - * - * mmap:flags:devzero - * mmap /dev/zero (shared not allowd) - * maps the first 4096 bytes of /dev/zero - * - * - put a directory at the beginning of the shared - * regions saying what pid has what region. - * DIRMAGIC - * BLKSIZE - * NBLKS - * nblks worth of directories - 1 int pids - */ -#ifndef CRAY -void -parse_memalloc(char *arg) -{ - char *allocargs[NMEMALLOC]; - int nalloc; - struct memalloc *M; - - if(Nmemalloc >= NMEMALLOC) { - doio_fprintf(stderr, "Error - too many memory types (%d).\n", - Nmemalloc); - return; - } - - M = &Memalloc[Nmemalloc]; - - nalloc = string_to_tokens(arg, allocargs, 32, ":"); - if(!strcmp(allocargs[0], "data")) { - M->memtype = MEM_DATA; - M->flags = 0; - M->name = NULL; - M->space = NULL; - Nmemalloc++; - if(nalloc >= 2) { - if(strchr(allocargs[1], 'p')) - M->flags |= MEMF_MPIN; - } - } else if(!strcmp(allocargs[0], "mmap")) { - /* mmap:flags:filename[:size] */ - M->memtype = MEM_MMAP; - M->flags = 0; - M->space = NULL; - if(nalloc >= 1) { - if(strchr(allocargs[1], 'p')) - M->flags |= MEMF_PRIVATE; - if(strchr(allocargs[1], 'a')) - M->flags |= MEMF_AUTORESRV; - if(strchr(allocargs[1], 'l')) - M->flags |= MEMF_LOCAL; - if(strchr(allocargs[1], 's')) - M->flags |= MEMF_SHARED; - - if(strchr(allocargs[1], 'f')) - M->flags |= MEMF_FIXADDR; - if(strchr(allocargs[1], 'A')) - M->flags |= MEMF_ADDR; - if(strchr(allocargs[1], 'G')) - M->flags |= MEMF_AUTOGROW; - - if(strchr(allocargs[1], 'U')) - M->flags |= MEMF_FILE; - } else { - M->flags |= MEMF_PRIVATE; - } - - if(nalloc > 2) { - if(!strcmp(allocargs[2], "devzero")) { - M->name = "/dev/zero"; - if(M->flags & - ((MEMF_PRIVATE|MEMF_LOCAL) == 0)) - M->flags |= MEMF_PRIVATE; - } else { - M->name = allocargs[2]; - } - } else { - M->name = "/dev/zero"; - if(M->flags & - ((MEMF_PRIVATE|MEMF_LOCAL) == 0)) - M->flags |= MEMF_PRIVATE; - } - Nmemalloc++; - - } else if(!strcmp(allocargs[0], "shmem")) { - /* shmem:shmid:size */ - M->memtype = MEM_SHMEM; - M->flags = 0; - M->space = NULL; - if(nalloc >= 2) { - M->name = allocargs[1]; - } else { - M->name = NULL; - } - if(nalloc >= 3) { - sscanf(allocargs[2], "%i", &M->nblks); - } else { - M->nblks = 0; - } - if(nalloc >= 4) { - if(strchr(allocargs[3], 'p')) - M->flags |= MEMF_MPIN; - } - - Nmemalloc++; - } else { - doio_fprintf(stderr, "Error - unknown memory type '%s'.\n", - allocargs[0]); - exit(1); - } -} - -void -dump_memalloc() -{ - int ma; - char *mt; - - if(Nmemalloc == 0) { - printf("No memory allocation strategies devined\n"); - return; - } - - for(ma=0; ma < Nmemalloc; ma++) { - switch(Memalloc[ma].memtype) { - case MEM_DATA: mt = "data"; break; - case MEM_SHMEM: mt = "shmem"; break; - case MEM_MMAP: mt = "mmap"; break; - default: mt = "unknown"; break; - } - printf("mstrat[%d] = %d %s\n", ma, Memalloc[ma].memtype, mt); - printf("\tflags=%#o name='%s' nblks=%d\n", - Memalloc[ma].flags, - Memalloc[ma].name, - Memalloc[ma].nblks); - } -} - -#endif /* !CRAY */ - -/* - * -d :