From 48e8eda3ed7d890e58f3e1554d58af88363f0233 Mon Sep 17 00:00:00 2001 From: puzl Date: Thu, 10 Mar 2005 13:16:40 +0000 Subject: [PATCH] More eol cleanups git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@6 67975925-1194-0748-b3d5-c16f83f1a3a1 --- main/source/curl/Makefile | 720 +++++++- main/source/curl/config.sub | 2931 +++++++++++++++---------------- main/source/curl/depcomp | 822 ++++----- main/source/curl/missing | 567 +++--- main/source/curl/src/hugehelp.c | 2032 +++++++++++---------- main/source/linux/build-curl.sh | 14 +- main/source/stlport/src/gcc.mak | 120 +- 7 files changed, 3893 insertions(+), 3313 deletions(-) diff --git a/main/source/curl/Makefile b/main/source/curl/Makefile index aece595..dbe8bcb 100644 --- a/main/source/curl/Makefile +++ b/main/source/curl/Makefile @@ -1,76 +1,664 @@ -############################################################################# -# _ _ ____ _ -# Project ___| | | | _ \| | -# / __| | | | |_) | | -# | (__| |_| | _ <| |___ -# \___|\___/|_| \_\_____| +# Makefile.in generated by automake 1.7.2 from Makefile.am. +# Makefile. Generated from Makefile.in by configure. + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002 +# 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. + + + # -# Copyright (C) 2002, Daniel Stenberg, , et al. +# $Id: Makefile.am,v 1.41 2003/03/31 11:37:47 bagder Exp $ # -# In order to be useful for every potential user, curl and libcurl are -# dual-licensed under the MPL and the MIT/X-derivate licenses. + +srcdir = . +top_srcdir = . + +pkgdatadir = $(datadir)/curl +pkglibdir = $(libdir)/curl +pkgincludedir = $(includedir)/curl +top_builddir = . + +am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd +INSTALL = /usr/bin/install -c +install_sh_DATA = $(install_sh) -c -m 644 +install_sh_PROGRAM = $(install_sh) -c +install_sh_SCRIPT = $(install_sh) -c +INSTALL_HEADER = $(INSTALL_DATA) +transform = $(program_transform_name) +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +host_triplet = i686-pc-linux-gnu +ACLOCAL = ${SHELL} /home/hjw/ns/source/curl/missing --run aclocal-1.7 +AMDEP_FALSE = # +AMDEP_TRUE = +AMTAR = ${SHELL} /home/hjw/ns/source/curl/missing --run tar +AR = ar +AS = as +AUTOCONF = ${SHELL} /home/hjw/ns/source/curl/missing --run autoconf +AUTOHEADER = ${SHELL} /home/hjw/ns/source/curl/missing --run autoheader +AUTOMAKE = ${SHELL} /home/hjw/ns/source/curl/missing --run automake-1.7 +AWK = gawk +CC = gcc +CCDEPMODE = depmode=gcc3 +CFLAGS = -g -O2 +CPP = gcc -E +CPPFLAGS = +CURL_CA_BUNDLE = +CURL_DISABLE_DICT = +CURL_DISABLE_FILE = +CURL_DISABLE_FTP = +CURL_DISABLE_GOPHER = +CURL_DISABLE_HTTP = +CURL_DISABLE_LDAP = +CURL_DISABLE_TELNET = +CXX = g++ +CXXCPP = g++ -E +CXXDEPMODE = depmode=gcc3 +CXXFLAGS = -g -O2 +CYGPATH_W = echo +DEFS = -DHAVE_CONFIG_H +DEPDIR = .deps +DLLTOOL = dlltool +ECHO = echo +ECHO_C = +ECHO_N = -n +ECHO_T = +EGREP = grep -E +EXEEXT = +F77 = g77 +FFLAGS = -g -O2 +HAVE_LIBZ = +INSTALL_DATA = ${INSTALL} -m 644 +INSTALL_PROGRAM = ${INSTALL} +INSTALL_SCRIPT = ${INSTALL} +INSTALL_STRIP_PROGRAM = ${SHELL} $(install_sh) -c -s +IPV6_ENABLED = +KRB4_ENABLED = +LDFLAGS = +LIBOBJS = +LIBS = -ldl +LIBTOOL = $(SHELL) $(top_builddir)/libtool +LN_S = ln -s +LTLIBOBJS = +MAINT = # +MAINTAINER_MODE_FALSE = +MAINTAINER_MODE_TRUE = # +MAKEINFO = ${SHELL} /home/hjw/ns/source/curl/missing --run makeinfo +NO_UNDEFINED_FALSE = +NO_UNDEFINED_TRUE = # +NROFF = /usr/bin/gnroff +OBJDUMP = objdump +OBJEXT = o +OPENSSL_ENABLED = +PACKAGE = curl +PACKAGE_BUGREPORT = curl-bug@haxx.se +PACKAGE_NAME = curl +PACKAGE_STRING = curl - +PACKAGE_TARNAME = curl +PACKAGE_VERSION = - +PATH_SEPARATOR = : +PERL = /usr/bin/perl +PKGADD_NAME = cURL - a client that groks URLs +PKGADD_PKG = HAXXcurl +PKGADD_VENDOR = curl.haxx.se +PKGCONFIG = /usr/bin/pkg-config +RANDOM_FILE = /dev/urandom +RANLIB = ranlib +SED = /bin/sed +SET_MAKE = +SHELL = /bin/sh +STRIP = strip +VERSION = 7.10.5 +VERSIONNUM = 070a05 +YACC = bison -y +ac_ct_AR = ar +ac_ct_AS = +ac_ct_CC = gcc +ac_ct_CXX = g++ +ac_ct_DLLTOOL = +ac_ct_F77 = g77 +ac_ct_OBJDUMP = +ac_ct_RANLIB = ranlib +ac_ct_STRIP = strip +am__fastdepCC_FALSE = # +am__fastdepCC_TRUE = +am__fastdepCXX_FALSE = # +am__fastdepCXX_TRUE = +am__include = include +am__quote = +bindir = ${exec_prefix}/bin +build = i686-pc-linux-gnu +build_alias = i686-linux +build_cpu = i686 +build_os = linux-gnu +build_vendor = pc +datadir = ${prefix}/share +exec_prefix = ${prefix} +host = i686-pc-linux-gnu +host_alias = +host_cpu = i686 +host_os = linux-gnu +host_vendor = pc +includedir = ${prefix}/include +infodir = ${prefix}/info +install_sh = /home/hjw/ns/source/curl/install-sh +libdir = ${exec_prefix}/lib +libexecdir = ${exec_prefix}/libexec +localstatedir = ${prefix}/var +mandir = ${prefix}/man +oldincludedir = /usr/include +prefix = /usr/local +program_transform_name = s,x,x, +sbindir = ${exec_prefix}/sbin +sharedstatedir = ${prefix}/com +sysconfdir = ${prefix}/etc +target_alias = + +AUTOMAKE_OPTIONS = foreign + +EXTRA_DIST = CHANGES COPYING maketgz SSLCERTS reconf Makefile.dist \ + curl-config.in build_vms.com curl-style.el sample.emacs testcurl.sh + + +bin_SCRIPTS = curl-config + +SUBDIRS = docs lib src include tests packages +subdir = . +ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 +mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/lib/config.h \ + $(top_builddir)/src/config.h \ + $(top_builddir)/tests/server/config.h \ + $(top_builddir)/lib/ca-bundle.h +CONFIG_CLEAN_FILES = curl-config +SCRIPTS = $(bin_SCRIPTS) + +DIST_SOURCES = + +RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ + ps-recursive install-info-recursive uninstall-info-recursive \ + all-recursive install-data-recursive install-exec-recursive \ + installdirs-recursive install-recursive uninstall-recursive \ + check-recursive installcheck-recursive +DIST_COMMON = README COPYING Makefile.am Makefile.in acinclude.m4 \ + aclocal.m4 config.guess config.sub configure configure.ac \ + curl-config.in depcomp install-sh ltmain.sh missing \ + mkinstalldirs +DIST_SUBDIRS = $(SUBDIRS) +all: all-recursive + +.SUFFIXES: + +am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ + configure.lineno +$(srcdir)/Makefile.in: # Makefile.am $(top_srcdir)/configure.ac $(ACLOCAL_M4) + cd $(top_srcdir) && \ + $(AUTOMAKE) --foreign Makefile +Makefile: # $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) + +$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) + $(SHELL) ./config.status --recheck +$(srcdir)/configure: # $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) + cd $(srcdir) && $(AUTOCONF) + +$(ACLOCAL_M4): # configure.ac acinclude.m4 + cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) +curl-config: $(top_builddir)/config.status curl-config.in + cd $(top_builddir) && $(SHELL) ./config.status $@ +binSCRIPT_INSTALL = $(INSTALL_SCRIPT) +install-binSCRIPTS: $(bin_SCRIPTS) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(bindir) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + if test -f $$d$$p; then \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \ + $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \ + else :; fi; \ + done + +uninstall-binSCRIPTS: + @$(NORMAL_UNINSTALL) + @list='$(bin_SCRIPTS)'; for p in $$list; do \ + f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \ + echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ + rm -f $(DESTDIR)$(bindir)/$$f; \ + done + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +uninstall-info-am: + +# This directory's subdirectories are mostly independent; you can cd +# into them and run `make' without going through this Makefile. +# To change the values of `make' variables: instead of editing Makefiles, +# (1) if the variable is set in `config.status', edit `config.status' +# (which will cause the Makefiles to be regenerated when you run `make'); +# (2) otherwise, pass the desired values on the `make' command line. +$(RECURSIVE_TARGETS): + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + target=`echo $@ | sed s/-recursive//`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + dot_seen=yes; \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done; \ + if test "$$dot_seen" = "no"; then \ + $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ + fi; test -z "$$fail" + +mostlyclean-recursive clean-recursive distclean-recursive \ +maintainer-clean-recursive: + @set fnord $$MAKEFLAGS; amf=$$2; \ + dot_seen=no; \ + case "$@" in \ + distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ + *) list='$(SUBDIRS)' ;; \ + esac; \ + rev=''; for subdir in $$list; do \ + if test "$$subdir" = "."; then :; else \ + rev="$$subdir $$rev"; \ + fi; \ + done; \ + rev="$$rev ."; \ + target=`echo $@ | sed s/-recursive//`; \ + for subdir in $$rev; do \ + echo "Making $$target in $$subdir"; \ + if test "$$subdir" = "."; then \ + local_target="$$target-am"; \ + else \ + local_target="$$target"; \ + fi; \ + (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ + || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ + done && test -z "$$fail" +tags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ + done +ctags-recursive: + list='$(SUBDIRS)'; for subdir in $$list; do \ + test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ + done + +ETAGS = etags +ETAGSFLAGS = + +CTAGS = ctags +CTAGSFLAGS = + +tags: TAGS + +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-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ + fi; \ + done; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(ETAGS_ARGS)$$tags$$unique" \ + || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ + $$tags $$unique + +ctags: CTAGS +CTAGS: ctags-recursive $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ + $(TAGS_FILES) $(LISP) + tags=; \ + here=`pwd`; \ + list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ + unique=`for i in $$list; do \ + if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ + done | \ + $(AWK) ' { files[$$0] = 1; } \ + END { for (i in files) print i; }'`; \ + test -z "$(CTAGS_ARGS)$$tags$$unique" \ + || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ + $$tags $$unique + +GTAGS: + here=`$(am__cd) $(top_builddir) && pwd` \ + && cd $(top_srcdir) \ + && gtags -i $(GTAGS_ARGS) $$here + +distclean-tags: + -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags +DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) + +top_distdir = . +distdir = $(PACKAGE)-$(VERSION) + +am__remove_distdir = \ + { test ! -d $(distdir) \ + || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ + && rm -fr $(distdir); }; } + +GZIP_ENV = --best +distuninstallcheck_listfiles = find . -type f -print +distcleancheck_listfiles = find . -type f -print + +distdir: $(DISTFILES) + $(am__remove_distdir) + mkdir $(distdir) + $(mkinstalldirs) $(distdir)/. $(distdir)/packages/EPM $(distdir)/packages/Linux/RPM + @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ + topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ + list='$(DISTFILES)'; for file in $$list; do \ + case $$file in \ + $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ + $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ + esac; \ + if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + dir="/$$dir"; \ + $(mkinstalldirs) "$(distdir)$$dir"; \ + else \ + dir=''; \ + fi; \ + if test -d $$d/$$file; then \ + if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ + cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ + fi; \ + cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test "$$subdir" = .; then :; else \ + test -d $(distdir)/$$subdir \ + || mkdir $(distdir)/$$subdir \ + || exit 1; \ + (cd $$subdir && \ + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" \ + distdir=../$(distdir)/$$subdir \ + distdir) \ + || exit 1; \ + fi; \ + done + $(MAKE) $(AM_MAKEFLAGS) \ + top_distdir="$(top_distdir)" distdir="$(distdir)" \ + dist-hook + -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ + ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ + ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ + || chmod -R a+r $(distdir) +dist-gzip: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +dist dist-all: distdir + $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz + $(am__remove_distdir) + +# This target untars the dist file and tries a VPATH configuration. Then +# it guarantees that the distribution is self-contained by making another +# tarfile. +distcheck: dist + $(am__remove_distdir) + GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - + 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` \ + && 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 ../.. && $(mkinstalldirs) "$$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-gzip \ + && rm -f $(distdir).tar.gz \ + && $(MAKE) $(AM_MAKEFLAGS) distcleancheck + $(am__remove_distdir) + @echo "$(distdir).tar.gz is ready for distribution" | \ + sed 'h;s/./=/g;p;x;p;x' +distuninstallcheck: + cd $(distuninstallcheck_dir) \ + && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ + || { echo "ERROR: files left after uninstall:" ; \ + if test -n "$(DESTDIR)"; then \ + echo " (check DESTDIR support)"; \ + fi ; \ + $(distuninstallcheck_listfiles) ; \ + exit 1; } >&2 +distcleancheck: distclean + if test '$(srcdir)' = . ; then \ + echo "ERROR: distcleancheck can only run from a VPATH build" ; \ + exit 1 ; \ + fi + test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ + || { echo "ERROR: files left in build directory after distclean:" ; \ + $(distcleancheck_listfiles) ; \ + exit 1; } >&2 +check-am: all-am +check: check-recursive +all-am: Makefile $(SCRIPTS) +installdirs: installdirs-recursive +installdirs-am: + $(mkinstalldirs) $(DESTDIR)$(bindir) + +install: install-recursive +install-exec: install-exec-recursive +install-data: install-data-recursive +uninstall: uninstall-recursive + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-recursive +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + INSTALL_STRIP_FLAG=-s \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +clean: clean-recursive + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) +distclean-am: clean-am distclean-generic distclean-libtool \ + distclean-tags + +dvi: dvi-recursive + +dvi-am: + +info: info-recursive + +info-am: + +install-data-am: + +install-exec-am: install-binSCRIPTS + +install-info: install-info-recursive + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-recursive + -rm -f $(am__CONFIG_DISTCLEAN_FILES) + -rm -rf autom4te.cache +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-recursive + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +pdf: pdf-recursive + +pdf-am: + +ps: ps-recursive + +ps-am: + +uninstall-am: uninstall-binSCRIPTS uninstall-info-am + +uninstall-info: uninstall-info-recursive + +.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ + clean-generic clean-libtool clean-recursive ctags \ + ctags-recursive dist dist-all dist-gzip distcheck distclean \ + distclean-generic distclean-libtool distclean-recursive \ + distclean-tags distcleancheck distdir distuninstallcheck dvi \ + dvi-am dvi-recursive info info-am info-recursive install \ + install-am install-binSCRIPTS install-data install-data-am \ + install-data-recursive install-exec install-exec-am \ + install-exec-recursive install-info install-info-am \ + install-info-recursive install-man install-recursive \ + install-strip installcheck installcheck-am installdirs \ + installdirs-am installdirs-recursive maintainer-clean \ + maintainer-clean-generic maintainer-clean-recursive mostlyclean \ + mostlyclean-generic mostlyclean-libtool mostlyclean-recursive \ + pdf pdf-am pdf-recursive ps ps-am ps-recursive tags \ + tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \ + uninstall-info-am uninstall-info-recursive uninstall-recursive + + +# create a root makefile in the distribution: +dist-hook: + rm -rf $(top_builddir)/tests/log + cp $(srcdir)/Makefile.dist $(distdir)/Makefile + +html: + cd docs; make html + +pdf: + cd docs; make pdf + +check: test + +test: + @(cd tests; $(MAKE) quiet-test) + +test-full: + @(cd tests; $(MAKE) full-test) + # -# You may opt to use, copy, modify, merge, publish, distribute and/or sell -# copies of the Software, and permit persons to whom the Software is -# furnished to do so, under the terms of the MPL or the MIT/X-derivate -# licenses. You may pick one of these licenses. +# Build source and binary rpms. For rpm-3.0 and above, the ~/.rpmmacros +# must contain the following line: +# %_topdir /home/loic/local/rpm +# and that /home/loic/local/rpm contains the directory SOURCES, BUILD etc. # -# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY -# KIND, either express or implied. +# cd /home/loic/local/rpm ; mkdir -p SOURCES BUILD RPMS/i386 SPECS SRPMS +# +# If additional configure flags are needed to build the package, add the +# following in ~/.rpmmacros +# %configure CFLAGS="%{optflags}" ./configure %{_target_platform} --prefix=%{_prefix} ${AM_CONFIGFLAGS} +# and run make rpm in the following way: +# AM_CONFIGFLAGS='--with-uri=/home/users/loic/local/RedHat-6.2' make rpm # -# $Id: Makefile.dist,v 1.12 2002/09/07 21:44:02 hartroth Exp $ -############################################################################# -all: - ./configure - make +rpms: + $(MAKE) RPMDIST=curl rpm + $(MAKE) RPMDIST=curl-ssl rpm -ssl: - ./configure --with-ssl - make +rpm: + RPM_TOPDIR=`rpm --showrc | $(PERL) -n -e 'print if(s/.*_topdir\s+(.*)/$$1/)'` ; \ + cp $(srcdir)/packages/Linux/RPM/$(RPMDIST).spec $$RPM_TOPDIR/SPECS ; \ + cp $(PACKAGE)-$(VERSION).tar.gz $$RPM_TOPDIR/SOURCES ; \ + rpm -ba --clean --rmsource $$RPM_TOPDIR/SPECS/$(RPMDIST).spec ; \ + mv $$RPM_TOPDIR/RPMS/i386/$(RPMDIST)-*.rpm . ; \ + mv $$RPM_TOPDIR/SRPMS/$(RPMDIST)-*.src.rpm . -borland: - cd lib & make -f Makefile.b32 - cd src & make -f Makefile.b32 +# +# Build a Solaris pkkgadd format file +# run 'make pkgadd' once you've done './configure' and 'make' to make a Solaris pkgadd format +# file (which ends up back in this directory). +# The pkgadd file is in 'pkgtrans' format, so to install on Solaris, do +# pkgadd -d ./HAXXcurl-* +# -mingw32: - cd lib & make -f Makefile.m32 ZLIB=1 - cd src & make -f Makefile.m32 ZLIB=1 +# gak - libtool requires an absoulte directory, hence the pwd below... +pkgadd: + umask 022 ; \ + make install DESTDIR=`/bin/pwd`/packages/Solaris/root ; \ + cat COPYING > $(srcdir)/packages/Solaris/copyright ; \ + cd $(srcdir)/packages/Solaris && $(MAKE) package -mingw32-ssl: - cd lib & make -f Makefile.m32 SSL=1 ZLIB=1 - cd src & make -f Makefile.m32 SSL=1 ZLIB=1 - -vc: - cd lib - nmake -f Makefile.vc6 cfg=release - cd ..\src - nmake -f Makefile.vc6 - -vc-ssl: - cd lib - nmake -f Makefile.vc6 cfg=release-ssl - cd ..\src - nmake -f Makefile.vc6 cfg=release-ssl - -vc-ssl-dll: - cd lib - nmake -f Makefile.vc6 cfg=release-ssl-dll - cd ..\src - nmake -f Makefile.vc6 - -cygwin: - ./configure - make - -cygwin-ssl: - ./configure --with-ssl - make - -unix: all - -unix-ssl: ssl - -linux: all - -linux-ssl: ssl +# +# Build a cygwin binary tarball installation file +# resulting .tar.bz2 file will end up at packages/Win32/cygwin +cygwinbin: + $(MAKE) -C packages/Win32/cygwin cygwinbin +# 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/main/source/curl/config.sub b/main/source/curl/config.sub index df03fce..a9e64fc 100644 --- a/main/source/curl/config.sub +++ b/main/source/curl/config.sub @@ -1,1469 +1,1462 @@ -#! /bin/sh -# Configuration validation subroutine script. -# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, -# 2000, 2001, 2002 Free Software Foundation, Inc. - -timestamp='2002-11-30' - -# 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 \ - | 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 \ - | mipsisa64 | mipsisa64el \ - | mipsisa64sb1 | mipsisa64sb1el \ - | mipsisa64sr71k | mipsisa64sr71kel \ - | mipstx39 | mipstx39el \ - | mn10200 | mn10300 \ - | ns16k | ns32k \ - | openrisc | or32 \ - | pdp10 | pdp11 | pj | pjl \ - | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ - | pyramid \ - | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ - | sh64 | sh64le \ - | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ - | strongarm \ - | tahoe | thumb | 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-* \ - | 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-* \ - | mipsisa64-* | mipsisa64el-* \ - | mipsisa64sb1-* | mipsisa64sb1el-* \ - | mipsisa64sr71k-* | mipsisa64sr71kel-* \ - | mipstx39 | mipstx39el \ - | none-* | np1-* | ns16k-* | ns32k-* \ - | orion-* \ - | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ - | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ - | pyramid-* \ - | romp-* | rs6000-* \ - | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ - | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ - | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ - | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ - | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | 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 - ;; - 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 - ;; - 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) - basic_machine=i686-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-*) - basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - pn) - basic_machine=pn-gould - ;; - power) basic_machine=power-ibm - ;; - ppc) basic_machine=powerpc-unknown - ;; - ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppcle | powerpclittle | ppc-le | powerpc-little) - basic_machine=powerpcle-unknown - ;; - ppcle-* | powerpclittle-*) - basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64) basic_machine=powerpc64-unknown - ;; - ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ppc64le | powerpc64little | ppc64-le | powerpc64-little) - basic_machine=powerpc64le-unknown - ;; - ppc64le-* | powerpc64little-*) - basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` - ;; - ps2) - basic_machine=i386-ibm - ;; - pw32) - basic_machine=i586-unknown - os=-pw32 - ;; - rom68k) - basic_machine=m68k-rom68k - os=-coff - ;; - rm[46]00) - basic_machine=mips-siemens - ;; - rtpc | rtpc-*) - basic_machine=romp-ibm - ;; - s390 | s390-*) - basic_machine=s390-ibm - ;; - s390x | s390x-*) - basic_machine=s390x-ibm - ;; - sa29200) - basic_machine=a29k-amd - os=-udi - ;; - sb1) - basic_machine=mipsisa64sb1-unknown - ;; - sb1el) - basic_machine=mipsisa64sb1el-unknown - ;; - sequent) - basic_machine=i386-sequent - ;; - sh) - basic_machine=sh-hitachi - os=-hms - ;; - 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 - ;; - t3d) - basic_machine=alpha-cray - os=-unicos - ;; - t3e) - basic_machine=alphaev5-cray - os=-unicos - ;; - t90) - basic_machine=t90-cray - os=-unicos - ;; - tic4x | c4x*) - basic_machine=tic4x-unknown - os=-coff - ;; - tic54x | c54x*) - basic_machine=tic54x-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 | sh3eb | sh4eb | sh[1234]le | sh3ele) - basic_machine=sh-unknown - ;; - sh64) - basic_machine=sh64-unknown - ;; - sparc | sparcv9 | sparcv9b) - basic_machine=sparc-sun - ;; - cydra) - basic_machine=cydra-cydrome - ;; - orion) - basic_machine=orion-highlevel - ;; - orion105) - basic_machine=clipper-highlevel - ;; - mac | mpw | mac-mpw) - basic_machine=m68k-apple - ;; - pmac | pmac-mpw) - basic_machine=powerpc-apple - ;; - *-unknown) - # Make sure to match an already-canonicalized machine name. - ;; - *) - echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 - exit 1 - ;; -esac - -# Here we canonicalize certain aliases for manufacturers. -case $basic_machine in - *-digital*) - basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` - ;; - *-commodore*) - basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` - ;; - *) - ;; -esac - -# Decode manufacturer-specific aliases for certain operating systems. - -if [ x"$os" != x"" ] -then -case $os in - # First match some system type aliases - # that might get confused with valid system types. - # -solaris* is a basic system type, with this one exception. - -solaris1 | -solaris1.*) - os=`echo $os | sed -e 's|solaris1|sunos4|'` - ;; - -solaris) - os=-solaris2 - ;; - -svr4*) - os=-sysv4 - ;; - -unixware*) - os=-sysv4.2uw - ;; - -gnu/linux*) - os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` - ;; - # First accept the basic system types. - # The portable systems comes first. - # Each alternative MUST END IN A *, to match a version number. - # -sysv* is not here because it comes later, after sysvr4. - -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ - | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ - | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ - | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ - | -aos* \ - | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ - | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ - | -hiux* | -386bsd* | -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*) - # 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 - ;; - -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 - ;; - # 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: +#! /bin/sh +# Configuration validation subroutine script. +# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, +# 2000, 2001, 2002 Free Software Foundation, Inc. +timestamp='2002-11-30' +# 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 \ + | 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 \ + | mipsisa64 | mipsisa64el \ + | mipsisa64sb1 | mipsisa64sb1el \ + | mipsisa64sr71k | mipsisa64sr71kel \ + | mipstx39 | mipstx39el \ + | mn10200 | mn10300 \ + | ns16k | ns32k \ + | openrisc | or32 \ + | pdp10 | pdp11 | pj | pjl \ + | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ + | pyramid \ + | sh | sh[1234] | sh3e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \ + | sh64 | sh64le \ + | sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \ + | strongarm \ + | tahoe | thumb | 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-* \ + | 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-* \ + | mipsisa64-* | mipsisa64el-* \ + | mipsisa64sb1-* | mipsisa64sb1el-* \ + | mipsisa64sr71k-* | mipsisa64sr71kel-* \ + | mipstx39 | mipstx39el \ + | none-* | np1-* | ns16k-* | ns32k-* \ + | orion-* \ + | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ + | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ + | pyramid-* \ + | romp-* | rs6000-* \ + | sh-* | sh[1234]-* | sh3e-* | sh[34]eb-* | shbe-* \ + | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ + | sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \ + | sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \ + | tahoe-* | thumb-* | tic30-* | tic4x-* | tic54x-* | 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 + ;; + 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 + ;; + 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) + basic_machine=i686-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-*) + basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + pn) + basic_machine=pn-gould + ;; + power) basic_machine=power-ibm + ;; + ppc) basic_machine=powerpc-unknown + ;; + ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppcle | powerpclittle | ppc-le | powerpc-little) + basic_machine=powerpcle-unknown + ;; + ppcle-* | powerpclittle-*) + basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64) basic_machine=powerpc64-unknown + ;; + ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ppc64le | powerpc64little | ppc64-le | powerpc64-little) + basic_machine=powerpc64le-unknown + ;; + ppc64le-* | powerpc64little-*) + basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` + ;; + ps2) + basic_machine=i386-ibm + ;; + pw32) + basic_machine=i586-unknown + os=-pw32 + ;; + rom68k) + basic_machine=m68k-rom68k + os=-coff + ;; + rm[46]00) + basic_machine=mips-siemens + ;; + rtpc | rtpc-*) + basic_machine=romp-ibm + ;; + s390 | s390-*) + basic_machine=s390-ibm + ;; + s390x | s390x-*) + basic_machine=s390x-ibm + ;; + sa29200) + basic_machine=a29k-amd + os=-udi + ;; + sb1) + basic_machine=mipsisa64sb1-unknown + ;; + sb1el) + basic_machine=mipsisa64sb1el-unknown + ;; + sequent) + basic_machine=i386-sequent + ;; + sh) + basic_machine=sh-hitachi + os=-hms + ;; + 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 + ;; + t3d) + basic_machine=alpha-cray + os=-unicos + ;; + t3e) + basic_machine=alphaev5-cray + os=-unicos + ;; + t90) + basic_machine=t90-cray + os=-unicos + ;; + tic4x | c4x*) + basic_machine=tic4x-unknown + os=-coff + ;; + tic54x | c54x*) + basic_machine=tic54x-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 | sh3eb | sh4eb | sh[1234]le | sh3ele) + basic_machine=sh-unknown + ;; + sh64) + basic_machine=sh64-unknown + ;; + sparc | sparcv9 | sparcv9b) + basic_machine=sparc-sun + ;; + cydra) + basic_machine=cydra-cydrome + ;; + orion) + basic_machine=orion-highlevel + ;; + orion105) + basic_machine=clipper-highlevel + ;; + mac | mpw | mac-mpw) + basic_machine=m68k-apple + ;; + pmac | pmac-mpw) + basic_machine=powerpc-apple + ;; + *-unknown) + # Make sure to match an already-canonicalized machine name. + ;; + *) + echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 + exit 1 + ;; +esac + +# Here we canonicalize certain aliases for manufacturers. +case $basic_machine in + *-digital*) + basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` + ;; + *-commodore*) + basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` + ;; + *) + ;; +esac + +# Decode manufacturer-specific aliases for certain operating systems. + +if [ x"$os" != x"" ] +then +case $os in + # First match some system type aliases + # that might get confused with valid system types. + # -solaris* is a basic system type, with this one exception. + -solaris1 | -solaris1.*) + os=`echo $os | sed -e 's|solaris1|sunos4|'` + ;; + -solaris) + os=-solaris2 + ;; + -svr4*) + os=-sysv4 + ;; + -unixware*) + os=-sysv4.2uw + ;; + -gnu/linux*) + os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` + ;; + # First accept the basic system types. + # The portable systems comes first. + # Each alternative MUST END IN A *, to match a version number. + # -sysv* is not here because it comes later, after sysvr4. + -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ + | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\ + | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ + | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ + | -aos* \ + | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ + | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ + | -hiux* | -386bsd* | -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*) + # 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 + ;; + -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 + ;; + # 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/main/source/curl/depcomp b/main/source/curl/depcomp index 0a488c7..6589965 100644 --- a/main/source/curl/depcomp +++ b/main/source/curl/depcomp @@ -1,411 +1,411 @@ -#! /bin/sh - -# depcomp - compile a program generating dependencies as side-effects -# Copyright 1999, 2000 Free Software Foundation, Inc. - -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; either version 2, or (at your option) -# any later version. - -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. - -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA -# 02111-1307, USA. - -# 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 . - -if test -z "$depmode" || test -z "$source" || test -z "$object"; then - echo "depcomp: Variables source, object and depmode must be set" 1>&2 - exit 1 -fi -# `libtool' can also be set to `yes' or `no'. - -depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`} -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. 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. - stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` - tmpdepfile="$stripped.u" - outname="$stripped.o" - if test "$libtool" = yes; then - "$@" -Wc,-M - else - "$@" -M - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile" - exit $stat - fi - - if test -f "$tmpdepfile"; then - # 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" - ;; - -tru64) - # The Tru64 AIX 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. - - tmpdepfile1="$object.d" - tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'` - if test "$libtool" = yes; then - "$@" -Wc,-MD - else - "$@" -MD - fi - - stat=$? - if test $stat -eq 0; then : - else - rm -f "$tmpdepfile1" "$tmpdepfile2" - exit $stat - fi - - if test -f "$tmpdepfile1"; then - tmpdepfile="$tmpdepfile1" - else - tmpdepfile="$tmpdepfile2" - fi - if test -f "$tmpdepfile"; then - sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" - # That's a space and a tab 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 proprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - test -z "$dashmflag" && dashmflag=-M - ( IFS=" " - case " $* " in - *" --mode=compile "*) # this is libtool, let us make it quiet - for arg - do # cycle over the arguments - case "$arg" in - "--mode=compile") - # insert --quiet before "--mode=compile" - set fnord "$@" --quiet - shift # fnord - ;; - esac - set fnord "$@" "$arg" - shift # fnord - shift # "$arg" - done - ;; - esac - "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" - ) & - proc=$! - "$@" - stat=$? - wait "$proc" - if test "$stat" != 0; then exit $stat; fi - 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) - # 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;; - -*) - ;; - *) - set fnord "$@" "$arg"; shift;; - esac - done - obj_suffix="`echo $object | sed 's/^.*\././'`" - touch "$tmpdepfile" - ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" - ) & - proc=$! - "$@" - stat=$? - wait "$proc" - if test "$stat" != 0; then exit $stat; fi - rm -f "$depfile" - cat < "$tmpdepfile" > "$depfile" - tail +3 "$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 proprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - ( IFS=" " - case " $* " in - *" --mode=compile "*) - for arg - do # cycle over the arguments - case $arg in - "--mode=compile") - # insert --quiet before "--mode=compile" - set fnord "$@" --quiet - shift # fnord - ;; - esac - set fnord "$@" "$arg" - shift # fnord - shift # "$arg" - done - ;; - esac - "$@" -E | - sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | - sed '$ s: \\$::' > "$tmpdepfile" - ) & - proc=$! - "$@" - stat=$? - wait "$proc" - if test "$stat" != 0; then exit $stat; fi - 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 proprocessed file to stdout, regardless of -o, - # because we must use -o when running libtool. - ( IFS=" " - case " $* " in - *" --mode=compile "*) - for arg - do # cycle over the arguments - case $arg in - "--mode=compile") - # insert --quiet before "--mode=compile" - set fnord "$@" --quiet - shift # fnord - ;; - esac - set fnord "$@" "$arg" - shift # fnord - shift # "$arg" - done - ;; - esac - "$@" -E | - sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" - ) & - proc=$! - "$@" - stat=$? - wait "$proc" - if test "$stat" != 0; then exit $stat; fi - 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 +#! /bin/sh + +# depcomp - compile a program generating dependencies as side-effects +# Copyright 1999, 2000 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. + +# 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 . + +if test -z "$depmode" || test -z "$source" || test -z "$object"; then + echo "depcomp: Variables source, object and depmode must be set" 1>&2 + exit 1 +fi +# `libtool' can also be set to `yes' or `no'. + +depfile=${depfile-`echo "$object" | sed 's,\([^/]*\)$,.deps/\1,;s/\.\([^.]*\)$/.P\1/'`} +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. 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. + stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` + tmpdepfile="$stripped.u" + outname="$stripped.o" + if test "$libtool" = yes; then + "$@" -Wc,-M + else + "$@" -M + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile" + exit $stat + fi + + if test -f "$tmpdepfile"; then + # 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" + ;; + +tru64) + # The Tru64 AIX 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. + + tmpdepfile1="$object.d" + tmpdepfile2=`echo "$object" | sed -e 's/.o$/.d/'` + if test "$libtool" = yes; then + "$@" -Wc,-MD + else + "$@" -MD + fi + + stat=$? + if test $stat -eq 0; then : + else + rm -f "$tmpdepfile1" "$tmpdepfile2" + exit $stat + fi + + if test -f "$tmpdepfile1"; then + tmpdepfile="$tmpdepfile1" + else + tmpdepfile="$tmpdepfile2" + fi + if test -f "$tmpdepfile"; then + sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" + # That's a space and a tab 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 proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + test -z "$dashmflag" && dashmflag=-M + ( IFS=" " + case " $* " in + *" --mode=compile "*) # this is libtool, let us make it quiet + for arg + do # cycle over the arguments + case "$arg" in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + 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) + # 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;; + -*) + ;; + *) + set fnord "$@" "$arg"; shift;; + esac + done + obj_suffix="`echo $object | sed 's/^.*\././'`" + touch "$tmpdepfile" + ${MAKEDEPEND-makedepend} 2>/dev/null -o"$obj_suffix" -f"$tmpdepfile" "$@" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + cat < "$tmpdepfile" > "$depfile" + tail +3 "$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 proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " + case " $* " in + *" --mode=compile "*) + for arg + do # cycle over the arguments + case $arg in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" -E | + sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | + sed '$ s: \\$::' > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + 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 proprocessed file to stdout, regardless of -o, + # because we must use -o when running libtool. + ( IFS=" " + case " $* " in + *" --mode=compile "*) + for arg + do # cycle over the arguments + case $arg in + "--mode=compile") + # insert --quiet before "--mode=compile" + set fnord "$@" --quiet + shift # fnord + ;; + esac + set fnord "$@" "$arg" + shift # fnord + shift # "$arg" + done + ;; + esac + "$@" -E | + sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" + ) & + proc=$! + "$@" + stat=$? + wait "$proc" + if test "$stat" != 0; then exit $stat; fi + rm -f "$depfile" + echo "$object : \\" > "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" + echo " " >> "$depfile" + . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" + rm -f "$tmpdepfile" + ;; + +none) + exec "$@" + ;; + +*) + echo "Unknown depmode $depmode" 1>&2 + exit 1 + ;; +esac + +exit 0 diff --git a/main/source/curl/missing b/main/source/curl/missing index fc66672..6a24913 100644 --- a/main/source/curl/missing +++ b/main/source/curl/missing @@ -1,283 +1,284 @@ -#! /bin/sh -# Common stub for a few missing GNU programs while installing. -# Copyright 1996, 1997, 1999, 2000 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., 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. - -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 - -case "$1" in ---run) - # Try to run requested program, and just exit if it succeeds. - run= - shift - "$@" && exit 0 - ;; -esac - -# If it does not exist, or fails to run (possibly an outdated version), -# try to emulate it. -case "$1" in - - -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]" - ;; - - -v|--v|--ve|--ver|--vers|--versi|--versio|--version) - echo "missing 0.3 - GNU automake" - ;; - - -*) - echo 1>&2 "$0: Unknown \`$1' option" - echo 1>&2 "Try \`$0 --help' for more information" - exit 1 - ;; - - aclocal) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. 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 missing on your system. 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 missing on your system. 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 missing on your system. 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 - ;; - - bison|yacc) - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. 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 missing on your system. 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 missing on your system. 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) - if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then - # We have makeinfo, but it failed. - exit 1 - fi - - echo 1>&2 "\ -WARNING: \`$1' is missing on your system. 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." - file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` - if test -z "$file"; then - file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` - file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` - fi - touch $file - ;; - - tar) - shift - if test -n "$run"; then - echo 1>&2 "ERROR: \`tar' requires --run" - exit 1 - fi - - # 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 ${1+"$@"} && exit 0 - fi - if (gtar --version > /dev/null 2>&1); then - gtar ${1+"$@"} && exit 0 - fi - firstarg="$1" - if shift; then - case "$firstarg" in - *o*) - firstarg=`echo "$firstarg" | sed s/o//` - tar "$firstarg" ${1+"$@"} && exit 0 - ;; - esac - case "$firstarg" in - *h*) - firstarg=`echo "$firstarg" | sed s/h//` - tar "$firstarg" ${1+"$@"} && 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 you do not seem to have it handy on your - system. 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 prerequirements 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 +#!/bin/bash +echo 1 +# Common stub for a few missing GNU programs while installing. +# Copyright 1996, 1997, 1999, 2000 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., 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. + +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 + +case "$1" in +--run) + # Try to run requested program, and just exit if it succeeds. + run= + shift + "$@" && exit 0 + ;; +esac + +# If it does not exist, or fails to run (possibly an outdated version), +# try to emulate it. +case "$1" in + + -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]" + ;; + + -v|--v|--ve|--ver|--vers|--versi|--versio|--version) + echo "missing 0.3 - GNU automake" + ;; + + -*) + echo 1>&2 "$0: Unknown \`$1' option" + echo 1>&2 "Try \`$0 --help' for more information" + exit 1 + ;; + + aclocal) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. 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 missing on your system. 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 missing on your system. 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 missing on your system. 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 + ;; + + bison|yacc) + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. 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 missing on your system. 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 missing on your system. 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) + if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then + # We have makeinfo, but it failed. + exit 1 + fi + + echo 1>&2 "\ +WARNING: \`$1' is missing on your system. 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." + file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` + if test -z "$file"; then + file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` + file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` + fi + touch $file + ;; + + tar) + shift + if test -n "$run"; then + echo 1>&2 "ERROR: \`tar' requires --run" + exit 1 + fi + + # 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 ${1+"$@"} && exit 0 + fi + if (gtar --version > /dev/null 2>&1); then + gtar ${1+"$@"} && exit 0 + fi + firstarg="$1" + if shift; then + case "$firstarg" in + *o*) + firstarg=`echo "$firstarg" | sed s/o//` + tar "$firstarg" ${1+"$@"} && exit 0 + ;; + esac + case "$firstarg" in + *h*) + firstarg=`echo "$firstarg" | sed s/h//` + tar "$firstarg" ${1+"$@"} && 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 you do not seem to have it handy on your + system. 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 prerequirements 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 diff --git a/main/source/curl/src/hugehelp.c b/main/source/curl/src/hugehelp.c index 54ddf62..743204e 100644 --- a/main/source/curl/src/hugehelp.c +++ b/main/source/curl/src/hugehelp.c @@ -1319,1022 +1319,1020 @@ puts ( "SEE ALSO\n" " ftp(1), wget(1), snarf(1)\n" "\n" -"LATEST VERSION \n" -" \n" -" You always find news about what's going on as well as the latest versions \n" -" from the curl web pages, located at: \n" -" \n" -" http://curl.haxx.se \n" -" \n" -"SIMPLE USAGE \n" -" \n" -); - puts( -" Get the main page from netscape's web-server: \n" -" \n" -" curl http://www.netscape.com/ \n" -" \n" -" Get the root README file from funet's ftp-server: \n" -" \n" -" curl ftp://ftp.funet.fi/README \n" -" \n" -" Get a web page from a server using port 8000: \n" -" \n" -" curl http://www.weirdserver.com:8000/ \n" -" \n" -" Get a list of the root directory of an FTP site: \n" -" \n" -" curl ftp://cool.haxx.se/ \n" -" \n" -" Get a gopher document from funet's gopher server: \n" -" \n" -" curl gopher://gopher.funet.fi \n" -" \n" -); - puts( -" Get the definition of curl from a dictionary: \n" -" \n" -" curl dict://dict.org/m:curl \n" -" \n" -" Fetch two documents at once: \n" -" \n" -" curl ftp://cool.haxx.se/ http://www.weirdserver.com:8000/ \n" -" \n" -"DOWNLOAD TO A FILE \n" -" \n" -" Get a web page and store in a local file: \n" -" \n" -" curl -o thatpage.html http://www.netscape.com/ \n" -" \n" -" Get a web page and store in a local file, make the local file get the name \n" -" of the remote document (if no file name part is specified in the URL, this \n" -" will fail): \n" -" \n" -); - puts( -" curl -O http://www.netscape.com/index.html \n" -" \n" -" Fetch two files and store them with their remote names: \n" -" \n" -" curl -O www.haxx.se/index.html -O curl.haxx.se/download.html \n" -" \n" -"USING PASSWORDS \n" -" \n" -" FTP \n" -" \n" -" To ftp files using name+passwd, include them in the URL like: \n" -" \n" -" curl ftp://name:passwd@machine.domain:port/full/path/to/file \n" -" \n" -" or specify them with the -u flag like \n" -" \n" -" curl -u name:passwd ftp://machine.domain:port/full/path/to/file \n" -" \n" -" HTTP \n" -" \n" -); - puts( -" The HTTP URL doesn't support user and password in the URL string. Curl \n" -" does support that anyway to provide a ftp-style interface and thus you can \n" -" pick a file like: \n" -" \n" -" curl http://name:passwd@machine.domain/full/path/to/file \n" -" \n" -" or specify user and password separately like in \n" -" \n" -" curl -u name:passwd http://machine.domain/full/path/to/file \n" -" \n" -" NOTE! Since HTTP URLs don't support user and password, you can't use that \n" -); - puts( -" style when using Curl via a proxy. You _must_ use the -u style fetch \n" -" during such circumstances. \n" -" \n" -" HTTPS \n" -" \n" -" Probably most commonly used with private certificates, as explained below. \n" -" \n" -" GOPHER \n" -" \n" -" Curl features no password support for gopher. \n" -" \n" -"PROXY \n" -" \n" -" Get an ftp file using a proxy named my-proxy that uses port 888: \n" -" \n" -" curl -x my-proxy:888 ftp://ftp.leachsite.com/README \n" -" \n" -" Get a file from a HTTP server that requires user and password, using the \n" -" same proxy as above: \n" -); - puts( -" \n" -" curl -u user:passwd -x my-proxy:888 http://www.get.this/ \n" -" \n" -" Some proxies require special authentication. Specify by using -U as above: \n" -" \n" -" curl -U user:passwd -x my-proxy:888 http://www.get.this/ \n" -" \n" -" See also the environment variables Curl support that offer further proxy \n" -" control. \n" -" \n" -"RANGES \n" -" \n" -" With HTTP 1.1 byte-ranges were introduced. Using this, a client can request \n" -" to get only one or more subparts of a specified document. Curl supports \n" -" this with the -r flag. \n" -" \n" -); - puts( -" Get the first 100 bytes of a document: \n" -" \n" -" curl -r 0-99 http://www.get.this/ \n" -" \n" -" Get the last 500 bytes of a document: \n" -" \n" -" curl -r -500 http://www.get.this/ \n" -" \n" -" Curl also supports simple ranges for FTP files as well. Then you can only \n" -" specify start and stop position. \n" -" \n" -" Get the first 100 bytes of a document using FTP: \n" -" \n" -" curl -r 0-99 ftp://www.get.this/README \n" -" \n" -"UPLOADING \n" -" \n" -" FTP \n" -" \n" -" Upload all data on stdin to a specified ftp site: \n" -" \n" -); - puts( -" curl -T - ftp://ftp.upload.com/myfile \n" -" \n" -" Upload data from a specified file, login with user and password: \n" -" \n" -" curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile \n" -" \n" -" Upload a local file to the remote site, and use the local file name remote \n" -" too: \n" -" \n" -" curl -T uploadfile -u user:passwd ftp://ftp.upload.com/ \n" -" \n" -" Upload a local file to get appended to the remote file using ftp: \n" -" \n" -" curl -T localfile -a ftp://ftp.upload.com/remotefile \n" -" \n" -); - puts( -" Curl also supports ftp upload through a proxy, but only if the proxy is \n" -" configured to allow that kind of tunneling. If it does, you can run curl in \n" -" a fashion similar to: \n" -" \n" -" curl --proxytunnel -x proxy:port -T localfile ftp.upload.com \n" -" \n" -" HTTP \n" -" \n" -" Upload all data on stdin to a specified http site: \n" -" \n" -" curl -T - http://www.upload.com/myfile \n" -" \n" -" Note that the http server must've been configured to accept PUT before this \n" -" can be done successfully. \n" -" \n" -); - puts( -" For other ways to do http data upload, see the POST section below. \n" -" \n" -"VERBOSE / DEBUG \n" -" \n" -" If curl fails where it isn't supposed to, if the servers don't let you in, \n" -" if you can't understand the responses: use the -v flag to get verbose \n" -" fetching. Curl will output lots of info and what it sends and receives in \n" -" order to let the user see all client-server interaction (but it won't show \n" -" you the actual data). \n" -" \n" -" curl -v ftp://ftp.upload.com/ \n" -" \n" -); - puts( -" To get even more details and information on what curl does, try using the \n" -" --trace or --trace-ascii options with a given file name to log to, like \n" -" this: \n" -" \n" -" curl --trace trace.txt www.haxx.se \n" -" \n" -" \n" -"DETAILED INFORMATION \n" -" \n" -" Different protocols provide different ways of getting detailed information \n" -" about specific files/documents. To get curl to show detailed information \n" -" about a single file, you should use -I/--head option. It displays all \n" -); - puts( -" available info on a single file for HTTP and FTP. The HTTP information is a \n" -" lot more extensive. \n" -" \n" -" For HTTP, you can get the header information (the same as -I would show) \n" -" shown before the data by using -i/--include. Curl understands the \n" -" -D/--dump-header option when getting files from both FTP and HTTP, and it \n" -" will then store the headers in the specified file. \n" -" \n" -" Store the HTTP headers in a separate file (headers.txt in the example): \n" -" \n" -); - puts( -" curl --dump-header headers.txt curl.haxx.se \n" -" \n" -" Note that headers stored in a separate file can be very useful at a later \n" -" time if you want curl to use cookies sent by the server. More about that in \n" -" the cookies section. \n" -" \n" -"POST (HTTP) \n" -" \n" -" It's easy to post data using curl. This is done using the -d \n" -" option. The post data must be urlencoded. \n" -" \n" -" Post a simple \"name\" and \"phone\" guestbook. \n" -" \n" -" curl -d \"name=Rafael%20Sagula&phone=3320780\" \\ \n" -); - puts( -" http://www.where.com/guest.cgi \n" -" \n" -" How to post a form with curl, lesson #1: \n" -" \n" -" Dig out all the tags in the form that you want to fill in. (There's \n" -" a perl program called formfind.pl on the curl site that helps with this). \n" -" \n" -" If there's a \"normal\" post, you use -d to post. -d takes a full \"post \n" -" string\", which is in the format \n" -" \n" -" =&=&... \n" -" \n" -" The 'variable' names are the names set with \"name=\" in the tags, and \n" -); - puts( -" the data is the contents you want to fill in for the inputs. The data *must* \n" -" be properly URL encoded. That means you replace space with + and that you \n" -" write weird letters with %XX where XX is the hexadecimal representation of \n" -" the letter's ASCII code. \n" -" \n" -" Example: \n" -" \n" -" (page located at http://www.formpost.com/getthis/ \n" -" \n" -"
\n" -" \n" -" \n" -); - puts( -" \n" -" \n" -"
\n" -" \n" -" We want to enter user 'foobar' with password '12345'. \n" -" \n" -" To post to this, you enter a curl command line like: \n" -" \n" -" curl -d \"user=foobar&pass=12345&id=blablabla&dig=submit\" (continues) \n" -" http://www.formpost.com/getthis/post.cgi \n" -" \n" -" \n" -" While -d uses the application/x-www-form-urlencoded mime-type, generally \n" -); - puts( -" understood by CGI's and similar, curl also supports the more capable \n" -" multipart/form-data type. This latter type supports things like file upload. \n" -" \n" -" -F accepts parameters like -F \"name=contents\". If you want the contents to \n" -" be read from a file, use <@filename> as contents. When specifying a file, \n" -" you can also specify the file content type by appending ';type=' \n" -" to the file name. You can also post the contents of several files in one \n" -); - puts( -" field. For example, the field name 'coolfiles' is used to send three files, \n" -" with different content types using the following syntax: \n" -" \n" -" curl -F \"coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html\" \\ \n" -" http://www.post.com/postit.cgi \n" -" \n" -" If the content-type is not specified, curl will try to guess from the file \n" -" extension (it only knows a few), or use the previously specified type (from \n" -" an earlier file if several files are specified in a list) or else it will \n" -); - puts( -" using the default type 'text/plain'. \n" -" \n" -" Emulate a fill-in form with -F. Let's say you fill in three fields in a \n" -" form. One field is a file name which to post, one field is your name and one \n" -" field is a file description. We want to post the file we have written named \n" -" \"cooltext.txt\". To let curl do the posting of this data instead of your \n" -" favourite browser, you have to read the HTML source of the form page and \n" -); - puts( -" find the names of the input fields. In our example, the input field names \n" -" are 'file', 'yourname' and 'filedescription'. \n" -" \n" -" curl -F \"file=@cooltext.txt\" -F \"yourname=Daniel\" \\ \n" -" -F \"filedescription=Cool text file with cool text inside\" \\ \n" -" http://www.post.com/postit.cgi \n" -" \n" -" To send two files in one post you can do it in two ways: \n" -" \n" -" 1. Send multiple files in a single \"field\" with a single field name: \n" -" \n" -" curl -F \"pictures=@dog.gif,cat.gif\" \n" -" \n" -); - puts( -" 2. Send two fields with two field names: \n" -" \n" -" curl -F \"docpicture=@dog.gif\" -F \"catpicture=@cat.gif\" \n" -" \n" -"REFERRER \n" -" \n" -" A HTTP request has the option to include information about which address \n" -" that referred to actual page. Curl allows you to specify the \n" -" referrer to be used on the command line. It is especially useful to \n" -" fool or trick stupid servers or CGI scripts that rely on that information \n" -" being available or contain certain data. \n" -" \n" -); - puts( -" curl -e www.coolsite.com http://www.showme.com/ \n" -" \n" -" NOTE: The referer field is defined in the HTTP spec to be a full URL. \n" -" \n" -"USER AGENT \n" -" \n" -" A HTTP request has the option to include information about the browser \n" -" that generated the request. Curl allows it to be specified on the command \n" -" line. It is especially useful to fool or trick stupid servers or CGI \n" -" scripts that only accept certain browsers. \n" -" \n" -" Example: \n" -" \n" -" curl -A 'Mozilla/3.0 (Win95; I)' http://www.nationsbank.com/ \n" -" \n" -); - puts( -" Other common strings: \n" -" 'Mozilla/3.0 (Win95; I)' Netscape Version 3 for Windows 95 \n" -" 'Mozilla/3.04 (Win95; U)' Netscape Version 3 for Windows 95 \n" -" 'Mozilla/2.02 (OS/2; U)' Netscape Version 2 for OS/2 \n" -" 'Mozilla/4.04 [en] (X11; U; AIX 4.2; Nav)' NS for AIX \n" -" 'Mozilla/4.05 [en] (X11; U; Linux 2.0.32 i586)' NS for Linux \n" -" \n" -" Note that Internet Explorer tries hard to be compatible in every way: \n" -); - puts( -" 'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)' MSIE for W95 \n" -" \n" -" Mozilla is not the only possible User-Agent name: \n" -" 'Konqueror/1.0' KDE File Manager desktop client \n" -" 'Lynx/2.7.1 libwww-FM/2.14' Lynx command line browser \n" -" \n" -"COOKIES \n" -" \n" -" Cookies are generally used by web servers to keep state information at the \n" -" client's side. The server sets cookies by sending a response line in the \n" -" headers that looks like 'Set-Cookie: ' where the data part then \n" -); - puts( -" typically contains a set of NAME=VALUE pairs (separated by semicolons ';' \n" -" like \"NAME1=VALUE1; NAME2=VALUE2;\"). The server can also specify for what \n" -" path the \"cookie\" should be used for (by specifying \"path=value\"), when the \n" -" cookie should expire (\"expire=DATE\"), for what domain to use it \n" -" (\"domain=NAME\") and if it should be used on secure connections only \n" -" (\"secure\"). \n" -" \n" -" If you've received a page from a server that contains a header like: \n" -); - puts( -" Set-Cookie: sessionid=boo123; path=\"/foo\"; \n" -" \n" -" it means the server wants that first pair passed on when we get anything in \n" -" a path beginning with \"/foo\". \n" -" \n" -" Example, get a page that wants my name passed in a cookie: \n" -" \n" -" curl -b \"name=Daniel\" www.sillypage.com \n" -" \n" -" Curl also has the ability to use previously received cookies in following \n" -" sessions. If you get cookies from a server and store them in a file in a \n" -" manner similar to: \n" -" \n" -); - puts( -" curl --dump-header headers www.example.com \n" -" \n" -" ... you can then in a second connect to that (or another) site, use the \n" -" cookies from the 'headers' file like: \n" -" \n" -" curl -b headers www.example.com \n" -" \n" -" While saving headers to a file is a working way to store cookies, it is \n" -" however error-prone and not the prefered way to do this. Instead, make curl \n" -" save the incoming cookies using the well-known netscape cookie format like \n" -" this: \n" -" \n" -); - puts( -" curl -c cookies.txt www.example.com \n" -" \n" -" Note that by specifying -b you enable the \"cookie awareness\" and with -L \n" -" you can make curl follow a location: (which often is used in combination \n" -" with cookies). So that if a site sends cookies and a location, you can \n" -" use a non-existing file to trigger the cookie awareness like: \n" -" \n" -" curl -L -b empty.txt www.example.com \n" -" \n" -" The file to read cookies from must be formatted using plain HTTP headers OR \n" -); - puts( -" as netscape's cookie file. Curl will determine what kind it is based on the \n" -" file contents. In the above command, curl will parse the header and store \n" -" the cookies received from www.example.com. curl will send to the server the \n" -" stored cookies which match the request as it follows the location. The \n" -" file \"empty.txt\" may be a non-existant file. \n" -" \n" -" Alas, to both read and write cookies from a netscape cookie file, you can \n" -" set both -b and -c to use the same file: \n" -" \n" -); - puts( -" curl -b cookies.txt -c cookies.txt www.example.com \n" -" \n" -"PROGRESS METER \n" -" \n" -" The progress meter exists to show a user that something actually is \n" -" happening. The different fields in the output have the following meaning: \n" -" \n" -" % Total % Received % Xferd Average Speed Time Curr. \n" -" Dload Upload Total Current Left Speed \n" -" 0 151M 0 38608 0 0 9406 0 4:41:43 0:00:04 4:41:39 9287 \n" -" \n" -" From left-to-right: \n" -); - puts( -" % - percentage completed of the whole transfer \n" -" Total - total size of the whole expected transfer \n" -" % - percentage completed of the download \n" -" Received - currently downloaded amount of bytes \n" -" % - percentage completed of the upload \n" -" Xferd - currently uploaded amount of bytes \n" -" Average Speed \n" -" Dload - the average transfer speed of the download \n" -" Average Speed \n" -); - puts( -" Upload - the average transfer speed of the upload \n" -" Time Total - expected time to complete the operation \n" -" Time Current - time passed since the invoke \n" -" Time Left - expected time left to completetion \n" -" Curr.Speed - the average transfer speed the last 5 seconds (the first \n" -" 5 seconds of a transfer is based on less time of course.) \n" -" \n" -" The -# option will display a totally different progress bar that doesn't \n" -" need much explanation! \n" -" \n" -"SPEED LIMIT \n" -); - puts( -" \n" -" Curl allows the user to set the transfer speed conditions that must be met \n" -" to let the transfer keep going. By using the switch -y and -Y you \n" -" can make curl abort transfers if the transfer speed is below the specified \n" -" lowest limit for a specified time. \n" -" \n" -" To have curl abort the download if the speed is slower than 3000 bytes per \n" -" second for 1 minute, run: \n" -" \n" -" curl -Y 3000 -y 60 www.far-away-site.com \n" -" \n" -); - puts( -" This can very well be used in combination with the overall time limit, so \n" -" that the above operatioin must be completed in whole within 30 minutes: \n" -" \n" -" curl -m 1800 -Y 3000 -y 60 www.far-away-site.com \n" -" \n" -" Forcing curl not to transfer data faster than a given rate is also possible, \n" -" which might be useful if you're using a limited bandwidth connection and you \n" -" don't want your transfer to use all of it (sometimes referred to as \n" -" \"bandwith throttle\"). \n" -" \n" -); - puts( -" Make curl transfer data no faster than 10 kilobytes per second: \n" -" \n" -" curl --limit-rate 10K www.far-away-site.com \n" -" \n" -" or \n" -" \n" -" curl --limit-rate 10240 www.far-away-site.com \n" -" \n" -" Or prevent curl from uploading data faster than 1 megabyte per second: \n" -" \n" -" curl -T upload --limit-rate 1M ftp://uploadshereplease.com \n" -" \n" -" When using the --limit-rate option, the transfer rate is regulated on a \n" -" per-second basis, which will cause the total transfer speed to become lower \n" -); - puts( -" than the given number. Sometimes of course substantially lower, if your \n" -" transfer stalls during periods. \n" -" \n" -"CONFIG FILE \n" -" \n" -" Curl automatically tries to read the .curlrc file (or _curlrc file on win32 \n" -" systems) from the user's home dir on startup. \n" -" \n" -" The config file could be made up with normal command line switches, but you \n" -" can also specify the long options without the dashes to make it more \n" -" readable. You can separate the options and the parameter with spaces, or \n" -); - puts( -" with = or :. Comments can be used within the file. If the first letter on a \n" -" line is a '#'-letter the rest of the line is treated as a comment. \n" -" \n" -" If you want the parameter to contain spaces, you must inclose the entire \n" -" parameter within double quotes (\"). Within those quotes, you specify a \n" -" quote as \\\". \n" -" \n" -" NOTE: You must specify options and their arguments on the same line. \n" -" \n" -" Example, set default time out and proxy in a config file: \n" -" \n" -" # We want a 30 minute timeout: \n" -); - puts( -" -m 1800 \n" -" # ... and we use a proxy for all accesses: \n" -" proxy = proxy.our.domain.com:8080 \n" -" \n" -" White spaces ARE significant at the end of lines, but all white spaces \n" -" leading up to the first characters of each line are ignored. \n" -" \n" -" Prevent curl from reading the default file by using -q as the first command \n" -" line parameter, like: \n" -" \n" -" curl -q www.thatsite.com \n" -" \n" -" Force curl to get and display a local help page in case it is invoked \n" -); - puts( -" without URL by making a config file similar to: \n" -" \n" -" # default url to get \n" -" url = \"http://help.with.curl.com/curlhelp.html\" \n" -" \n" -" You can specify another config file to be read by using the -K/--config \n" -" flag. If you set config file name to \"-\" it'll read the config from stdin, \n" -" which can be handy if you want to hide options from being visible in process \n" -" tables etc: \n" -" \n" -" echo \"user = user:passwd\" | curl -K - http://that.secret.site.com \n" -" \n" -"EXTRA HEADERS \n" -" \n" -); - puts( -" When using curl in your own very special programs, you may end up needing \n" -" to pass on your own custom headers when getting a web page. You can do \n" -" this by using the -H flag. \n" -" \n" -" Example, send the header \"X-you-and-me: yes\" to the server when getting a \n" -" page: \n" -" \n" -" curl -H \"X-you-and-me: yes\" www.love.com \n" -" \n" -" This can also be useful in case you want curl to send a different text in a \n" -" header than it normally does. The -H header you specify then replaces the \n" -); - puts( -" header curl would normally send. If you replace an internal header with an \n" -" empty one, you prevent that header from being sent. To prevent the Host: \n" -" header from being used: \n" -" \n" -" curl -H \"Host:\" www.server.com \n" -" \n" -"FTP and PATH NAMES \n" -" \n" -" Do note that when getting files with the ftp:// URL, the given path is \n" -" relative the directory you enter. To get the file 'README' from your home \n" -" directory at your ftp site, do: \n" -" \n" -" curl ftp://user:passwd@my.site.com/README \n" -" \n" -); - puts( -" But if you want the README file from the root directory of that very same \n" -" site, you need to specify the absolute file name: \n" -" \n" -" curl ftp://user:passwd@my.site.com//README \n" -" \n" -" (I.e with an extra slash in front of the file name.) \n" -" \n" -"FTP and firewalls \n" -" \n" -" The FTP protocol requires one of the involved parties to open a second \n" -" connction as soon as data is about to get transfered. There are two ways to \n" -" do this. \n" -" \n" -); - puts( -" The default way for curl is to issue the PASV command which causes the \n" -" server to open another port and await another connection performed by the \n" -" client. This is good if the client is behind a firewall that don't allow \n" -" incoming connections. \n" -" \n" -" curl ftp.download.com \n" -" \n" -" If the server for example, is behind a firewall that don't allow connections \n" -" on other ports than 21 (or if it just doesn't support the PASV command), the \n" -); - puts( -" other way to do it is to use the PORT command and instruct the server to \n" -" connect to the client on the given (as parameters to the PORT command) IP \n" -" number and port. \n" -" \n" -" The -P flag to curl supports a few different options. Your machine may have \n" -" several IP-addresses and/or network interfaces and curl allows you to select \n" -" which of them to use. Default address can also be used: \n" -" \n" -" curl -P - ftp.download.com \n" -" \n" -); - puts( -" Download with PORT but use the IP address of our 'le0' interface (this does \n" -" not work on windows): \n" -" \n" -" curl -P le0 ftp.download.com \n" -" \n" -" Download with PORT but use 192.168.0.10 as our IP address to use: \n" -" \n" -" curl -P 192.168.0.10 ftp.download.com \n" -" \n" -"NETWORK INTERFACE \n" -" \n" -" Get a web page from a server using a specified port for the interface: \n" -" \n" -" curl --interface eth0:1 http://www.netscape.com/ \n" -" \n" -" or \n" -" \n" -" curl --interface 192.168.1.10 http://www.netscape.com/ \n" -" \n" -"HTTPS \n" -" \n" -); - puts( -" Secure HTTP requires SSL libraries to be installed and used when curl is \n" -" built. If that is done, curl is capable of retrieving and posting documents \n" -" using the HTTPS procotol. \n" -" \n" -" Example: \n" -" \n" -" curl https://www.secure-site.com \n" -" \n" -" Curl is also capable of using your personal certificates to get/post files \n" -" from sites that require valid certificates. The only drawback is that the \n" -" certificate needs to be in PEM-format. PEM is a standard and open format to \n" -); - puts( -" store certificates with, but it is not used by the most commonly used \n" -" browsers (Netscape and MSIE both use the so called PKCS#12 format). If you \n" -" want curl to use the certificates you use with your (favourite) browser, you \n" -" may need to download/compile a converter that can convert your browser's \n" -" formatted certificates to PEM formatted ones. This kind of converter is \n" -" included in recent versions of OpenSSL, and for older versions Dr Stephen \n" -); - puts( -" N. Henson has written a patch for SSLeay that adds this functionality. You \n" -" can get his patch (that requires an SSLeay installation) from his site at: \n" -" http://www.drh-consultancy.demon.co.uk/ \n" -" \n" -" Example on how to automatically retrieve a document using a certificate with \n" -" a personal password: \n" -" \n" -" curl -E /path/to/cert.pem:password https://secure.site.com/ \n" -" \n" -" If you neglect to specify the password on the command line, you will be \n" -); - puts( -" prompted for the correct password before any data can be received. \n" -" \n" -" Many older SSL-servers have problems with SSLv3 or TLS, that newer versions \n" -" of OpenSSL etc is using, therefore it is sometimes useful to specify what \n" -" SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL \n" -" version to use (for SSLv3, SSLv2 or TLSv1 respectively): \n" -" \n" -" curl -2 https://secure.site.com/ \n" -" \n" -" Otherwise, curl will first attempt to use v3 and then v2. \n" -" \n" -); - puts( -" To use OpenSSL to convert your favourite browser's certificate into a PEM \n" -" formatted one that curl can use, do something like this (assuming netscape, \n" -" but IE is likely to work similarly): \n" -" \n" -" You start with hitting the 'security' menu button in netscape. \n" -" \n" -" Select 'certificates->yours' and then pick a certificate in the list \n" -" \n" -" Press the 'export' button \n" -" \n" -" enter your PIN code for the certs \n" -" \n" -" select a proper place to save it \n" -" \n" -); - puts( -" Run the 'openssl' application to convert the certificate. If you cd to the \n" -" openssl installation, you can do it like: \n" -" \n" -" # ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile] \n" -" \n" -" \n" -"RESUMING FILE TRANSFERS \n" -" \n" -" To continue a file transfer where it was previously aborted, curl supports \n" -" resume on http(s) downloads as well as ftp uploads and downloads. \n" -" \n" -" Continue downloading a document: \n" -" \n" -" curl -C - -o file ftp://ftp.server.com/path/file \n" -" \n" -); - puts( -" Continue uploading a document(*1): \n" -" \n" -" curl -C - -T file ftp://ftp.server.com/path/file \n" -" \n" -" Continue downloading a document from a web server(*2): \n" -" \n" -" curl -C - -o file http://www.server.com/ \n" -" \n" -" (*1) = This requires that the ftp server supports the non-standard command \n" -" SIZE. If it doesn't, curl will say so. \n" -" \n" -" (*2) = This requires that the web server supports at least HTTP/1.1. If it \n" -" doesn't, curl will say so. \n" -" \n" -"TIME CONDITIONS \n" -" \n" -); - puts( -" HTTP allows a client to specify a time condition for the document it \n" -" requests. It is If-Modified-Since or If-Unmodified-Since. Curl allow you to \n" -" specify them with the -z/--time-cond flag. \n" -" \n" -" For example, you can easily make a download that only gets performed if the \n" -" remote file is newer than a local copy. It would be made like: \n" -" \n" -" curl -z local.html http://remote.server.com/remote.html \n" -" \n" -" Or you can download a file only if the local file is newer than the remote \n" -); - puts( -" one. Do this by prepending the date string with a '-', as in: \n" -" \n" -" curl -z -local.html http://remote.server.com/remote.html \n" -" \n" -" You can specify a \"free text\" date as condition. Tell curl to only download \n" -" the file if it was updated since yesterday: \n" -" \n" -" curl -z yesterday http://remote.server.com/remote.html \n" -" \n" -" Curl will then accept a wide range of date formats. You always make the date \n" -" check the other way around by prepending it with a dash '-'. \n" -" \n" -"DICT \n" -" \n" -" For fun try \n" -" \n" -); - puts( -" curl dict://dict.org/m:curl \n" -" curl dict://dict.org/d:heisenbug:jargon \n" -" curl dict://dict.org/d:daniel:web1913 \n" -" \n" -" Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define' \n" -" and 'lookup'. For example, \n" -" \n" -" curl dict://dict.org/find:curl \n" -" \n" -" Commands that break the URL description of the RFC (but not the DICT \n" -" protocol) are \n" -" \n" -" curl dict://dict.org/show:db \n" -" curl dict://dict.org/show:strat \n" -" \n" -); - puts( -" Authentication is still missing (but this is not required by the RFC) \n" -" \n" -"LDAP \n" -" \n" -" If you have installed the OpenLDAP library, curl can take advantage of it \n" -" and offer ldap:// support. \n" -" \n" -" LDAP is a complex thing and writing an LDAP query is not an easy task. I do \n" -" advice you to dig up the syntax description for that elsewhere. Two places \n" -" that might suit you are: \n" -" \n" -" Netscape's \"Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10: \n" -" Working with LDAP URLs\": \n" -); - puts( -" http://developer.netscape.com/docs/manuals/dirsdk/csdk30/url.htm \n" -" \n" -" RFC 2255, \"The LDAP URL Format\" http://www.rfc-editor.org/rfc/rfc2255.txt \n" -" \n" -" To show you an example, this is now I can get all people from my local LDAP \n" -" server that has a certain sub-domain in their email address: \n" -" \n" -" curl -B \"ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se\" \n" -" \n" -" If I want the same info in HTML format, I can get it by not using the -B \n" -" (enforce ASCII) flag. \n" -" \n" -"ENVIRONMENT VARIABLES \n" -); - puts( -" \n" -" Curl reads and understands the following environment variables: \n" -" \n" -" http_proxy, HTTPS_PROXY, FTP_PROXY, GOPHER_PROXY \n" -" \n" -" They should be set for protocol-specific proxies. General proxy should be \n" -" set with \n" -" \n" -" ALL_PROXY \n" -" \n" -" A comma-separated list of host names that shouldn't go through any proxy is \n" -" set in (only an asterisk, '*' matches all hosts) \n" -" \n" -" NO_PROXY \n" -" \n" -" If a tail substring of the domain-path for a host matches one of these \n" -); - puts( -" strings, transactions with that node will not be proxied. \n" -" \n" -" \n" -" The usage of the -x/--proxy flag overrides the environment variables. \n" -" \n" -"NETRC \n" -" \n" -" Unix introduced the .netrc concept a long time ago. It is a way for a user \n" -" to specify name and password for commonly visited ftp sites in a file so \n" -" that you don't have to type them in each time you visit those sites. You \n" -" realize this is a big security risk if someone else gets hold of your \n" -); - puts( -" passwords, so therefor most unix programs won't read this file unless it is \n" -" only readable by yourself (curl doesn't care though). \n" -" \n" -" Curl supports .netrc files if told so (using the -n/--netrc and \n" -" --netrc-optional options). This is not restricted to only ftp, \n" -" but curl can use it for all protocols where authentication is used. \n" -" \n" -" A very simple .netrc file could look something like: \n" -" \n" -" machine curl.haxx.se login iamdaniel password mysecret \n" -" \n" -"CUSTOM OUTPUT \n" -" \n" -); - puts( -" To better allow script programmers to get to know about the progress of \n" -" curl, the -w/--write-out option was introduced. Using this, you can specify \n" -" what information from the previous transfer you want to extract. \n" -" \n" -" To display the amount of bytes downloaded together with some text and an \n" -" ending newline: \n" -" \n" -" curl -w 'We downloaded %{size_download} bytes\\n' www.download.com \n" -" \n" -"KERBEROS4 FTP TRANSFER \n" -" \n" -" Curl supports kerberos4 for FTP transfers. You need the kerberos package \n" -); - puts( -" installed and used at curl build time for it to be used. \n" -" \n" -" First, get the krb-ticket the normal way, like with the kauth tool. Then use \n" -" curl in way similar to: \n" -" \n" -" curl --krb4 private ftp://krb4site.com -u username:fakepwd \n" -" \n" -" There's no use for a password on the -u switch, but a blank one will make \n" -" curl ask for one and you already entered the real password to kauth. \n" -" \n" -"TELNET \n" -" \n" -" The curl telnet support is basic and very easy to use. Curl passes all data \n" -); - puts( -" passed to it on stdin to the remote server. Connect to a remote telnet \n" -" server using a command line similar to: \n" -" \n" -" curl telnet://remote.server.com \n" -" \n" -" And enter the data to pass to the server on stdin. The result will be sent \n" -" to stdout or to the file you specify with -o. \n" -" \n" -" You might want the -N/--no-buffer option to switch off the buffered output \n" -" for slow connections or similar. \n" -" \n" -" Pass options to the telnet protocol negotiation, by using the -t option. To \n" -); - puts( -" tell the server we use a vt100 terminal, try something like: \n" -" \n" -" curl -tTTYPE=vt100 telnet://remote.server.com \n" -" \n" -" Other interesting options for it -t include: \n" -" \n" -" - XDISPLOC= Sets the X display location. \n" -" \n" -" - NEW_ENV= Sets an environment variable. \n" -" \n" -" NOTE: the telnet protocol does not specify any way to login with a specified \n" -" user and password so curl can't do that automatically. To do that, you need \n" -); - puts( -" to track when the login prompt is received and send the username and \n" -" password accordingly. \n" -" \n" -"PERSISTANT CONNECTIONS \n" -" \n" -" Specifying multiple files on a single command line will make curl transfer \n" -" all of them, one after the other in the specified order. \n" -" \n" -" libcurl will attempt to use persistant connections for the transfers so that \n" -" the second transfer to the same host can use the same connection that was \n" -" already initiated and was left open in the previous transfer. This greatly \n" -); - puts( -" decreases connection time for all but the first transfer and it makes a far \n" -" better use of the network. \n" -" \n" -" Note that curl cannot use persistant connections for transfers that are used \n" -" in subsequence curl invokes. Try to stuff as many URLs as possible on the \n" -" same command line if they are using the same host, as that'll make the \n" -" transfers faster. If you use a http proxy for file transfers, practicly \n" -" all transfers will be persistant. \n" -" \n" -); - puts( -" Persistant connections were introduced in curl 7.7. \n" -" \n" -"MAILING LISTS \n" -" \n" -" For your convenience, we have several open mailing lists to discuss curl, \n" -" its development and things relevant to this. Get all info at \n" -" http://curl.haxx.se/mail/. The lists available are: \n" -" \n" -" curl-users \n" -" \n" -" Users of the command line tool. How to use it, what doesn't work, new \n" -" features, related tools, questions, news, installations, compilations, \n" -" running, porting etc. \n" -" \n" -" curl-library \n" -" \n" -); - puts( -" Developers using or developing libcurl. Bugs, extensions, improvements. \n" -" \n" -" curl-announce \n" -" \n" -" Low-traffic. Only announcements of new public versions. \n" -" \n" -" curl-and-PHP \n" -" \n" -" Using the curl functions in PHP. Everything curl with a PHP angle. Or PHP \n" -" with a curl angle. \n" -" \n" -" curl-commits \n" -" \n" -" Receives notifications on all CVS commits done to the curl source module. \n" -" This can become quite a large amount of mails during intense development, \n" -); - puts( -" be aware. This is for us who like email... \n" -" \n" -" curl-www-commits \n" -" \n" -" Receives notifications on all CVS commits done to the curl www module \n" -" (basicly the web site). This can become quite a large amount of mails \n" -" during intense changing, be aware. This is for us who like email... \n" -" \n" -" Please direct curl questions, feature requests and trouble reports to one of \n" -" these mailing lists instead of mailing any individual. \n" +"LATEST VERSION\n" +"\n" +" You always find news about what's going on as well as the latest versions\n" +" from the curl web pages, located at:\n" +"\n" +" http://curl.haxx.se\n" +"\n" +"SIMPLE USAGE\n" +"\n" +); + puts( +" Get the main page from netscape's web-server:\n" +"\n" +" curl http://www.netscape.com/\n" +"\n" +" Get the root README file from funet's ftp-server:\n" +"\n" +" curl ftp://ftp.funet.fi/README\n" +"\n" +" Get a web page from a server using port 8000:\n" +"\n" +" curl http://www.weirdserver.com:8000/\n" +"\n" +" Get a list of the root directory of an FTP site:\n" +"\n" +" curl ftp://cool.haxx.se/\n" +"\n" +" Get a gopher document from funet's gopher server:\n" +"\n" +" curl gopher://gopher.funet.fi\n" +"\n" +); + puts( +" Get the definition of curl from a dictionary:\n" +"\n" +" curl dict://dict.org/m:curl\n" +"\n" +" Fetch two documents at once:\n" +"\n" +" curl ftp://cool.haxx.se/ http://www.weirdserver.com:8000/\n" +"\n" +"DOWNLOAD TO A FILE\n" +"\n" +" Get a web page and store in a local file:\n" +"\n" +" curl -o thatpage.html http://www.netscape.com/\n" +"\n" +" Get a web page and store in a local file, make the local file get the name\n" +" of the remote document (if no file name part is specified in the URL, this\n" +" will fail):\n" +"\n" +); + puts( +" curl -O http://www.netscape.com/index.html\n" +"\n" +" Fetch two files and store them with their remote names:\n" +"\n" +" curl -O www.haxx.se/index.html -O curl.haxx.se/download.html\n" +"\n" +"USING PASSWORDS\n" +"\n" +" FTP\n" +"\n" +" To ftp files using name+passwd, include them in the URL like:\n" +"\n" +" curl ftp://name:passwd@machine.domain:port/full/path/to/file\n" +"\n" +" or specify them with the -u flag like\n" +"\n" +" curl -u name:passwd ftp://machine.domain:port/full/path/to/file\n" +"\n" +" HTTP\n" +"\n" +); + puts( +" The HTTP URL doesn't support user and password in the URL string. Curl\n" +" does support that anyway to provide a ftp-style interface and thus you can\n" +" pick a file like:\n" +"\n" +" curl http://name:passwd@machine.domain/full/path/to/file\n" +"\n" +" or specify user and password separately like in\n" +"\n" +" curl -u name:passwd http://machine.domain/full/path/to/file\n" +"\n" +" NOTE! Since HTTP URLs don't support user and password, you can't use that\n" +); + puts( +" style when using Curl via a proxy. You _must_ use the -u style fetch\n" +" during such circumstances.\n" +"\n" +" HTTPS\n" +"\n" +" Probably most commonly used with private certificates, as explained below.\n" +"\n" +" GOPHER\n" +"\n" +" Curl features no password support for gopher.\n" +"\n" +"PROXY\n" +"\n" +" Get an ftp file using a proxy named my-proxy that uses port 888:\n" +"\n" +" curl -x my-proxy:888 ftp://ftp.leachsite.com/README\n" +"\n" +" Get a file from a HTTP server that requires user and password, using the\n" +" same proxy as above:\n" +"\n" +); + puts( +" curl -u user:passwd -x my-proxy:888 http://www.get.this/\n" +"\n" +" Some proxies require special authentication. Specify by using -U as above:\n" +"\n" +" curl -U user:passwd -x my-proxy:888 http://www.get.this/\n" +"\n" +" See also the environment variables Curl support that offer further proxy\n" +" control.\n" +"\n" +"RANGES\n" +"\n" +" With HTTP 1.1 byte-ranges were introduced. Using this, a client can request\n" +" to get only one or more subparts of a specified document. Curl supports\n" +" this with the -r flag.\n" +"\n" +); + puts( +" Get the first 100 bytes of a document:\n" +"\n" +" curl -r 0-99 http://www.get.this/\n" +"\n" +" Get the last 500 bytes of a document:\n" +"\n" +" curl -r -500 http://www.get.this/\n" +"\n" +" Curl also supports simple ranges for FTP files as well. Then you can only\n" +" specify start and stop position.\n" +"\n" +" Get the first 100 bytes of a document using FTP:\n" +"\n" +" curl -r 0-99 ftp://www.get.this/README \n" +"\n" +"UPLOADING\n" +"\n" +" FTP\n" +"\n" +" Upload all data on stdin to a specified ftp site:\n" +"\n" +" curl -T - ftp://ftp.upload.com/myfile\n" +"\n" +); + puts( +" Upload data from a specified file, login with user and password:\n" +"\n" +" curl -T uploadfile -u user:passwd ftp://ftp.upload.com/myfile\n" +"\n" +" Upload a local file to the remote site, and use the local file name remote\n" +" too:\n" +" \n" +" curl -T uploadfile -u user:passwd ftp://ftp.upload.com/\n" +"\n" +" Upload a local file to get appended to the remote file using ftp:\n" +"\n" +" curl -T localfile -a ftp://ftp.upload.com/remotefile\n" +"\n" +" Curl also supports ftp upload through a proxy, but only if the proxy is\n" +); + puts( +" configured to allow that kind of tunneling. If it does, you can run curl in\n" +" a fashion similar to:\n" +"\n" +" curl --proxytunnel -x proxy:port -T localfile ftp.upload.com\n" +"\n" +" HTTP\n" +"\n" +" Upload all data on stdin to a specified http site:\n" +"\n" +" curl -T - http://www.upload.com/myfile\n" +"\n" +" Note that the http server must've been configured to accept PUT before this\n" +" can be done successfully.\n" +"\n" +" For other ways to do http data upload, see the POST section below.\n" +"\n" +"VERBOSE / DEBUG\n" +"\n" +); + puts( +" If curl fails where it isn't supposed to, if the servers don't let you in,\n" +" if you can't understand the responses: use the -v flag to get verbose\n" +" fetching. Curl will output lots of info and what it sends and receives in\n" +" order to let the user see all client-server interaction (but it won't show\n" +" you the actual data).\n" +"\n" +" curl -v ftp://ftp.upload.com/\n" +"\n" +" To get even more details and information on what curl does, try using the\n" +); + puts( +" --trace or --trace-ascii options with a given file name to log to, like\n" +" this:\n" +"\n" +" curl --trace trace.txt www.haxx.se\n" +" \n" +"\n" +"DETAILED INFORMATION\n" +"\n" +" Different protocols provide different ways of getting detailed information\n" +" about specific files/documents. To get curl to show detailed information\n" +" about a single file, you should use -I/--head option. It displays all\n" +" available info on a single file for HTTP and FTP. The HTTP information is a\n" +" lot more extensive.\n" +"\n" +); + puts( +" For HTTP, you can get the header information (the same as -I would show)\n" +" shown before the data by using -i/--include. Curl understands the\n" +" -D/--dump-header option when getting files from both FTP and HTTP, and it\n" +" will then store the headers in the specified file.\n" +"\n" +" Store the HTTP headers in a separate file (headers.txt in the example):\n" +"\n" +" curl --dump-header headers.txt curl.haxx.se\n" +"\n" +" Note that headers stored in a separate file can be very useful at a later\n" +); + puts( +" time if you want curl to use cookies sent by the server. More about that in\n" +" the cookies section.\n" +"\n" +"POST (HTTP)\n" +"\n" +" It's easy to post data using curl. This is done using the -d \n" +" option. The post data must be urlencoded.\n" +"\n" +" Post a simple \"name\" and \"phone\" guestbook.\n" +"\n" +" curl -d \"name=Rafael%20Sagula&phone=3320780\" \\\n" +" http://www.where.com/guest.cgi\n" +"\n" +" How to post a form with curl, lesson #1:\n" +"\n" +); + puts( +" Dig out all the tags in the form that you want to fill in. (There's\n" +" a perl program called formfind.pl on the curl site that helps with this).\n" +"\n" +" If there's a \"normal\" post, you use -d to post. -d takes a full \"post\n" +" string\", which is in the format\n" +"\n" +" =&=&...\n" +"\n" +" The 'variable' names are the names set with \"name=\" in the tags, and\n" +" the data is the contents you want to fill in for the inputs. The data *must*\n" +); + puts( +" be properly URL encoded. That means you replace space with + and that you\n" +" write weird letters with %XX where XX is the hexadecimal representation of\n" +" the letter's ASCII code.\n" +"\n" +" Example:\n" +"\n" +" (page located at http://www.formpost.com/getthis/\n" +"\n" +"
\n" +" \n" +" \n" +" \n" +" \n" +"
\n" +"\n" +); + puts( +" We want to enter user 'foobar' with password '12345'.\n" +"\n" +" To post to this, you enter a curl command line like:\n" +"\n" +" curl -d \"user=foobar&pass=12345&id=blablabla&dig=submit\" (continues)\n" +" http://www.formpost.com/getthis/post.cgi\n" +"\n" +"\n" +" While -d uses the application/x-www-form-urlencoded mime-type, generally\n" +" understood by CGI's and similar, curl also supports the more capable\n" +" multipart/form-data type. This latter type supports things like file upload.\n" +"\n" +); + puts( +" -F accepts parameters like -F \"name=contents\". If you want the contents to\n" +" be read from a file, use <@filename> as contents. When specifying a file,\n" +" you can also specify the file content type by appending ';type='\n" +" to the file name. You can also post the contents of several files in one\n" +" field. For example, the field name 'coolfiles' is used to send three files,\n" +" with different content types using the following syntax:\n" +"\n" +); + puts( +" curl -F \"coolfiles=@fil1.gif;type=image/gif,fil2.txt,fil3.html\" \\\n" +" http://www.post.com/postit.cgi\n" +"\n" +" If the content-type is not specified, curl will try to guess from the file\n" +" extension (it only knows a few), or use the previously specified type (from\n" +" an earlier file if several files are specified in a list) or else it will\n" +" using the default type 'text/plain'.\n" +"\n" +" Emulate a fill-in form with -F. Let's say you fill in three fields in a\n" +); + puts( +" form. One field is a file name which to post, one field is your name and one\n" +" field is a file description. We want to post the file we have written named\n" +" \"cooltext.txt\". To let curl do the posting of this data instead of your\n" +" favourite browser, you have to read the HTML source of the form page and\n" +" find the names of the input fields. In our example, the input field names\n" +" are 'file', 'yourname' and 'filedescription'.\n" +"\n" +" curl -F \"file=@cooltext.txt\" -F \"yourname=Daniel\" \\\n" +); + puts( +" -F \"filedescription=Cool text file with cool text inside\" \\\n" +" http://www.post.com/postit.cgi\n" +"\n" +" To send two files in one post you can do it in two ways:\n" +"\n" +" 1. Send multiple files in a single \"field\" with a single field name:\n" +" \n" +" curl -F \"pictures=@dog.gif,cat.gif\" \n" +" \n" +" 2. Send two fields with two field names: \n" +"\n" +" curl -F \"docpicture=@dog.gif\" -F \"catpicture=@cat.gif\" \n" +"\n" +"REFERRER\n" +"\n" +" A HTTP request has the option to include information about which address\n" +); + puts( +" that referred to actual page. Curl allows you to specify the\n" +" referrer to be used on the command line. It is especially useful to\n" +" fool or trick stupid servers or CGI scripts that rely on that information\n" +" being available or contain certain data.\n" +"\n" +" curl -e www.coolsite.com http://www.showme.com/\n" +"\n" +" NOTE: The referer field is defined in the HTTP spec to be a full URL.\n" +"\n" +"USER AGENT\n" +"\n" +" A HTTP request has the option to include information about the browser\n" +); + puts( +" that generated the request. Curl allows it to be specified on the command\n" +" line. It is especially useful to fool or trick stupid servers or CGI\n" +" scripts that only accept certain browsers.\n" +"\n" +" Example:\n" +"\n" +" curl -A 'Mozilla/3.0 (Win95; I)' http://www.nationsbank.com/\n" +"\n" +" Other common strings:\n" +" 'Mozilla/3.0 (Win95; I)' Netscape Version 3 for Windows 95\n" +" 'Mozilla/3.04 (Win95; U)' Netscape Version 3 for Windows 95\n" +" 'Mozilla/2.02 (OS/2; U)' Netscape Version 2 for OS/2\n" +); + puts( +" 'Mozilla/4.04 [en] (X11; U; AIX 4.2; Nav)' NS for AIX\n" +" 'Mozilla/4.05 [en] (X11; U; Linux 2.0.32 i586)' NS for Linux\n" +"\n" +" Note that Internet Explorer tries hard to be compatible in every way:\n" +" 'Mozilla/4.0 (compatible; MSIE 4.01; Windows 95)' MSIE for W95\n" +"\n" +" Mozilla is not the only possible User-Agent name:\n" +" 'Konqueror/1.0' KDE File Manager desktop client\n" +" 'Lynx/2.7.1 libwww-FM/2.14' Lynx command line browser\n" +"\n" +"COOKIES\n" +"\n" +); + puts( +" Cookies are generally used by web servers to keep state information at the\n" +" client's side. The server sets cookies by sending a response line in the\n" +" headers that looks like 'Set-Cookie: ' where the data part then\n" +" typically contains a set of NAME=VALUE pairs (separated by semicolons ';'\n" +" like \"NAME1=VALUE1; NAME2=VALUE2;\"). The server can also specify for what\n" +" path the \"cookie\" should be used for (by specifying \"path=value\"), when the\n" +); + puts( +" cookie should expire (\"expire=DATE\"), for what domain to use it\n" +" (\"domain=NAME\") and if it should be used on secure connections only\n" +" (\"secure\").\n" +"\n" +" If you've received a page from a server that contains a header like:\n" +" Set-Cookie: sessionid=boo123; path=\"/foo\";\n" +"\n" +" it means the server wants that first pair passed on when we get anything in\n" +" a path beginning with \"/foo\".\n" +"\n" +" Example, get a page that wants my name passed in a cookie:\n" +"\n" +" curl -b \"name=Daniel\" www.sillypage.com\n" +"\n" +); + puts( +" Curl also has the ability to use previously received cookies in following\n" +" sessions. If you get cookies from a server and store them in a file in a\n" +" manner similar to:\n" +"\n" +" curl --dump-header headers www.example.com\n" +"\n" +" ... you can then in a second connect to that (or another) site, use the\n" +" cookies from the 'headers' file like:\n" +"\n" +" curl -b headers www.example.com\n" +"\n" +" While saving headers to a file is a working way to store cookies, it is\n" +); + puts( +" however error-prone and not the prefered way to do this. Instead, make curl\n" +" save the incoming cookies using the well-known netscape cookie format like\n" +" this:\n" +"\n" +" curl -c cookies.txt www.example.com\n" +"\n" +" Note that by specifying -b you enable the \"cookie awareness\" and with -L\n" +" you can make curl follow a location: (which often is used in combination\n" +" with cookies). So that if a site sends cookies and a location, you can\n" +" use a non-existing file to trigger the cookie awareness like:\n" +"\n" +); + puts( +" curl -L -b empty.txt www.example.com\n" +"\n" +" The file to read cookies from must be formatted using plain HTTP headers OR\n" +" as netscape's cookie file. Curl will determine what kind it is based on the\n" +" file contents. In the above command, curl will parse the header and store\n" +" the cookies received from www.example.com. curl will send to the server the\n" +" stored cookies which match the request as it follows the location. The\n" +" file \"empty.txt\" may be a non-existant file.\n" +"\n" +); + puts( +" Alas, to both read and write cookies from a netscape cookie file, you can\n" +" set both -b and -c to use the same file:\n" +"\n" +" curl -b cookies.txt -c cookies.txt www.example.com\n" +"\n" +"PROGRESS METER\n" +"\n" +" The progress meter exists to show a user that something actually is\n" +" happening. The different fields in the output have the following meaning:\n" +"\n" +" % Total % Received % Xferd Average Speed Time Curr.\n" +); + puts( +" Dload Upload Total Current Left Speed\n" +" 0 151M 0 38608 0 0 9406 0 4:41:43 0:00:04 4:41:39 9287\n" +"\n" +" From left-to-right:\n" +" % - percentage completed of the whole transfer\n" +" Total - total size of the whole expected transfer\n" +" % - percentage completed of the download\n" +" Received - currently downloaded amount of bytes\n" +" % - percentage completed of the upload\n" +); + puts( +" Xferd - currently uploaded amount of bytes\n" +" Average Speed\n" +" Dload - the average transfer speed of the download\n" +" Average Speed\n" +" Upload - the average transfer speed of the upload\n" +" Time Total - expected time to complete the operation\n" +" Time Current - time passed since the invoke\n" +" Time Left - expected time left to completetion\n" +" Curr.Speed - the average transfer speed the last 5 seconds (the first\n" +); + puts( +" 5 seconds of a transfer is based on less time of course.)\n" +"\n" +" The -# option will display a totally different progress bar that doesn't\n" +" need much explanation!\n" +"\n" +"SPEED LIMIT\n" +"\n" +" Curl allows the user to set the transfer speed conditions that must be met\n" +" to let the transfer keep going. By using the switch -y and -Y you\n" +" can make curl abort transfers if the transfer speed is below the specified\n" +" lowest limit for a specified time.\n" +"\n" +); + puts( +" To have curl abort the download if the speed is slower than 3000 bytes per\n" +" second for 1 minute, run:\n" +"\n" +" curl -Y 3000 -y 60 www.far-away-site.com\n" +"\n" +" This can very well be used in combination with the overall time limit, so\n" +" that the above operatioin must be completed in whole within 30 minutes:\n" +"\n" +" curl -m 1800 -Y 3000 -y 60 www.far-away-site.com\n" +"\n" +" Forcing curl not to transfer data faster than a given rate is also possible,\n" +); + puts( +" which might be useful if you're using a limited bandwidth connection and you\n" +" don't want your transfer to use all of it (sometimes referred to as\n" +" \"bandwith throttle\").\n" +"\n" +" Make curl transfer data no faster than 10 kilobytes per second:\n" +"\n" +" curl --limit-rate 10K www.far-away-site.com\n" +"\n" +" or\n" +"\n" +" curl --limit-rate 10240 www.far-away-site.com\n" +"\n" +" Or prevent curl from uploading data faster than 1 megabyte per second:\n" +"\n" +" curl -T upload --limit-rate 1M ftp://uploadshereplease.com\n" +"\n" +); + puts( +" When using the --limit-rate option, the transfer rate is regulated on a\n" +" per-second basis, which will cause the total transfer speed to become lower\n" +" than the given number. Sometimes of course substantially lower, if your\n" +" transfer stalls during periods.\n" +"\n" +"CONFIG FILE\n" +"\n" +" Curl automatically tries to read the .curlrc file (or _curlrc file on win32\n" +" systems) from the user's home dir on startup.\n" +"\n" +" The config file could be made up with normal command line switches, but you\n" +); + puts( +" can also specify the long options without the dashes to make it more\n" +" readable. You can separate the options and the parameter with spaces, or\n" +" with = or :. Comments can be used within the file. If the first letter on a\n" +" line is a '#'-letter the rest of the line is treated as a comment.\n" +"\n" +" If you want the parameter to contain spaces, you must inclose the entire\n" +" parameter within double quotes (\"). Within those quotes, you specify a\n" +" quote as \\\".\n" +"\n" +); + puts( +" NOTE: You must specify options and their arguments on the same line.\n" +"\n" +" Example, set default time out and proxy in a config file:\n" +"\n" +" # We want a 30 minute timeout:\n" +" -m 1800\n" +" # ... and we use a proxy for all accesses:\n" +" proxy = proxy.our.domain.com:8080\n" +"\n" +" White spaces ARE significant at the end of lines, but all white spaces\n" +" leading up to the first characters of each line are ignored.\n" +"\n" +" Prevent curl from reading the default file by using -q as the first command\n" +); + puts( +" line parameter, like:\n" +"\n" +" curl -q www.thatsite.com\n" +"\n" +" Force curl to get and display a local help page in case it is invoked\n" +" without URL by making a config file similar to:\n" +"\n" +" # default url to get\n" +" url = \"http://help.with.curl.com/curlhelp.html\"\n" +"\n" +" You can specify another config file to be read by using the -K/--config\n" +" flag. If you set config file name to \"-\" it'll read the config from stdin,\n" +" which can be handy if you want to hide options from being visible in process\n" +); + puts( +" tables etc:\n" +"\n" +" echo \"user = user:passwd\" | curl -K - http://that.secret.site.com\n" +"\n" +"EXTRA HEADERS\n" +"\n" +" When using curl in your own very special programs, you may end up needing\n" +" to pass on your own custom headers when getting a web page. You can do\n" +" this by using the -H flag.\n" +"\n" +" Example, send the header \"X-you-and-me: yes\" to the server when getting a\n" +" page:\n" +"\n" +" curl -H \"X-you-and-me: yes\" www.love.com\n" +"\n" +" This can also be useful in case you want curl to send a different text in a\n" +); + puts( +" header than it normally does. The -H header you specify then replaces the\n" +" header curl would normally send. If you replace an internal header with an\n" +" empty one, you prevent that header from being sent. To prevent the Host:\n" +" header from being used:\n" +"\n" +" curl -H \"Host:\" www.server.com\n" +"\n" +"FTP and PATH NAMES\n" +"\n" +" Do note that when getting files with the ftp:// URL, the given path is\n" +" relative the directory you enter. To get the file 'README' from your home\n" +" directory at your ftp site, do:\n" +"\n" +); + puts( +" curl ftp://user:passwd@my.site.com/README\n" +"\n" +" But if you want the README file from the root directory of that very same\n" +" site, you need to specify the absolute file name:\n" +"\n" +" curl ftp://user:passwd@my.site.com//README\n" +"\n" +" (I.e with an extra slash in front of the file name.)\n" +"\n" +"FTP and firewalls\n" +"\n" +" The FTP protocol requires one of the involved parties to open a second\n" +" connction as soon as data is about to get transfered. There are two ways to\n" +" do this.\n" +"\n" +); + puts( +" The default way for curl is to issue the PASV command which causes the\n" +" server to open another port and await another connection performed by the\n" +" client. This is good if the client is behind a firewall that don't allow\n" +" incoming connections.\n" +"\n" +" curl ftp.download.com\n" +"\n" +" If the server for example, is behind a firewall that don't allow connections\n" +" on other ports than 21 (or if it just doesn't support the PASV command), the\n" +); + puts( +" other way to do it is to use the PORT command and instruct the server to\n" +" connect to the client on the given (as parameters to the PORT command) IP\n" +" number and port.\n" +"\n" +" The -P flag to curl supports a few different options. Your machine may have\n" +" several IP-addresses and/or network interfaces and curl allows you to select\n" +" which of them to use. Default address can also be used:\n" +"\n" +" curl -P - ftp.download.com\n" +"\n" +); + puts( +" Download with PORT but use the IP address of our 'le0' interface (this does\n" +" not work on windows):\n" +"\n" +" curl -P le0 ftp.download.com\n" +"\n" +" Download with PORT but use 192.168.0.10 as our IP address to use:\n" +"\n" +" curl -P 192.168.0.10 ftp.download.com\n" +"\n" +"NETWORK INTERFACE\n" +"\n" +" Get a web page from a server using a specified port for the interface:\n" +"\n" +" curl --interface eth0:1 http://www.netscape.com/\n" +"\n" +" or\n" +"\n" +" curl --interface 192.168.1.10 http://www.netscape.com/\n" +"\n" +"HTTPS\n" +"\n" +); + puts( +" Secure HTTP requires SSL libraries to be installed and used when curl is\n" +" built. If that is done, curl is capable of retrieving and posting documents\n" +" using the HTTPS procotol.\n" +"\n" +" Example:\n" +"\n" +" curl https://www.secure-site.com\n" +"\n" +" Curl is also capable of using your personal certificates to get/post files\n" +" from sites that require valid certificates. The only drawback is that the\n" +" certificate needs to be in PEM-format. PEM is a standard and open format to\n" +); + puts( +" store certificates with, but it is not used by the most commonly used\n" +" browsers (Netscape and MSIE both use the so called PKCS#12 format). If you\n" +" want curl to use the certificates you use with your (favourite) browser, you\n" +" may need to download/compile a converter that can convert your browser's\n" +" formatted certificates to PEM formatted ones. This kind of converter is\n" +" included in recent versions of OpenSSL, and for older versions Dr Stephen\n" +); + puts( +" N. Henson has written a patch for SSLeay that adds this functionality. You\n" +" can get his patch (that requires an SSLeay installation) from his site at:\n" +" http://www.drh-consultancy.demon.co.uk/\n" +"\n" +" Example on how to automatically retrieve a document using a certificate with\n" +" a personal password:\n" +"\n" +" curl -E /path/to/cert.pem:password https://secure.site.com/\n" +"\n" +" If you neglect to specify the password on the command line, you will be\n" +); + puts( +" prompted for the correct password before any data can be received.\n" +"\n" +" Many older SSL-servers have problems with SSLv3 or TLS, that newer versions\n" +" of OpenSSL etc is using, therefore it is sometimes useful to specify what\n" +" SSL-version curl should use. Use -3, -2 or -1 to specify that exact SSL\n" +" version to use (for SSLv3, SSLv2 or TLSv1 respectively):\n" +"\n" +" curl -2 https://secure.site.com/\n" +"\n" +" Otherwise, curl will first attempt to use v3 and then v2.\n" +"\n" +); + puts( +" To use OpenSSL to convert your favourite browser's certificate into a PEM\n" +" formatted one that curl can use, do something like this (assuming netscape,\n" +" but IE is likely to work similarly):\n" +"\n" +" You start with hitting the 'security' menu button in netscape. \n" +"\n" +" Select 'certificates->yours' and then pick a certificate in the list \n" +"\n" +" Press the 'export' button \n" +"\n" +" enter your PIN code for the certs \n" +"\n" +" select a proper place to save it \n" +"\n" +); + puts( +" Run the 'openssl' application to convert the certificate. If you cd to the\n" +" openssl installation, you can do it like:\n" +"\n" +" # ./apps/openssl pkcs12 -in [file you saved] -clcerts -out [PEMfile]\n" +"\n" +"\n" +"RESUMING FILE TRANSFERS\n" +"\n" +" To continue a file transfer where it was previously aborted, curl supports\n" +" resume on http(s) downloads as well as ftp uploads and downloads.\n" +"\n" +" Continue downloading a document:\n" +"\n" +" curl -C - -o file ftp://ftp.server.com/path/file\n" +"\n" +" Continue uploading a document(*1):\n" +); + puts( +"\n" +" curl -C - -T file ftp://ftp.server.com/path/file\n" +"\n" +" Continue downloading a document from a web server(*2):\n" +"\n" +" curl -C - -o file http://www.server.com/\n" +"\n" +" (*1) = This requires that the ftp server supports the non-standard command\n" +" SIZE. If it doesn't, curl will say so.\n" +"\n" +" (*2) = This requires that the web server supports at least HTTP/1.1. If it\n" +" doesn't, curl will say so.\n" +"\n" +"TIME CONDITIONS\n" +"\n" +" HTTP allows a client to specify a time condition for the document it\n" +); + puts( +" requests. It is If-Modified-Since or If-Unmodified-Since. Curl allow you to\n" +" specify them with the -z/--time-cond flag.\n" +"\n" +" For example, you can easily make a download that only gets performed if the\n" +" remote file is newer than a local copy. It would be made like:\n" +"\n" +" curl -z local.html http://remote.server.com/remote.html\n" +"\n" +" Or you can download a file only if the local file is newer than the remote\n" +" one. Do this by prepending the date string with a '-', as in:\n" +"\n" +); + puts( +" curl -z -local.html http://remote.server.com/remote.html\n" +"\n" +" You can specify a \"free text\" date as condition. Tell curl to only download\n" +" the file if it was updated since yesterday:\n" +"\n" +" curl -z yesterday http://remote.server.com/remote.html\n" +"\n" +" Curl will then accept a wide range of date formats. You always make the date\n" +" check the other way around by prepending it with a dash '-'.\n" +"\n" +"DICT\n" +"\n" +" For fun try\n" +"\n" +" curl dict://dict.org/m:curl\n" +" curl dict://dict.org/d:heisenbug:jargon\n" +); + puts( +" curl dict://dict.org/d:daniel:web1913\n" +"\n" +" Aliases for 'm' are 'match' and 'find', and aliases for 'd' are 'define'\n" +" and 'lookup'. For example,\n" +"\n" +" curl dict://dict.org/find:curl\n" +"\n" +" Commands that break the URL description of the RFC (but not the DICT\n" +" protocol) are\n" +"\n" +" curl dict://dict.org/show:db\n" +" curl dict://dict.org/show:strat\n" +"\n" +" Authentication is still missing (but this is not required by the RFC)\n" +"\n" +"LDAP\n" +"\n" +); + puts( +" If you have installed the OpenLDAP library, curl can take advantage of it\n" +" and offer ldap:// support.\n" +"\n" +" LDAP is a complex thing and writing an LDAP query is not an easy task. I do\n" +" advice you to dig up the syntax description for that elsewhere. Two places\n" +" that might suit you are:\n" +"\n" +" Netscape's \"Netscape Directory SDK 3.0 for C Programmer's Guide Chapter 10:\n" +" Working with LDAP URLs\":\n" +" http://developer.netscape.com/docs/manuals/dirsdk/csdk30/url.htm\n" +"\n" +); + puts( +" RFC 2255, \"The LDAP URL Format\" http://www.rfc-editor.org/rfc/rfc2255.txt\n" +"\n" +" To show you an example, this is now I can get all people from my local LDAP\n" +" server that has a certain sub-domain in their email address:\n" +"\n" +" curl -B \"ldap://ldap.frontec.se/o=frontec??sub?mail=*sth.frontec.se\"\n" +"\n" +" If I want the same info in HTML format, I can get it by not using the -B\n" +" (enforce ASCII) flag.\n" +"\n" +"ENVIRONMENT VARIABLES\n" +"\n" +" Curl reads and understands the following environment variables:\n" +"\n" +); + puts( +" http_proxy, HTTPS_PROXY, FTP_PROXY, GOPHER_PROXY\n" +"\n" +" They should be set for protocol-specific proxies. General proxy should be\n" +" set with\n" +" \n" +" ALL_PROXY\n" +"\n" +" A comma-separated list of host names that shouldn't go through any proxy is\n" +" set in (only an asterisk, '*' matches all hosts)\n" +"\n" +" NO_PROXY\n" +"\n" +" If a tail substring of the domain-path for a host matches one of these\n" +" strings, transactions with that node will not be proxied.\n" +"\n" +"\n" +); + puts( +" The usage of the -x/--proxy flag overrides the environment variables.\n" +"\n" +"NETRC\n" +"\n" +" Unix introduced the .netrc concept a long time ago. It is a way for a user\n" +" to specify name and password for commonly visited ftp sites in a file so\n" +" that you don't have to type them in each time you visit those sites. You\n" +" realize this is a big security risk if someone else gets hold of your\n" +" passwords, so therefor most unix programs won't read this file unless it is\n" +); + puts( +" only readable by yourself (curl doesn't care though).\n" +"\n" +" Curl supports .netrc files if told so (using the -n/--netrc and\n" +" --netrc-optional options). This is not restricted to only ftp,\n" +" but curl can use it for all protocols where authentication is used.\n" +"\n" +" A very simple .netrc file could look something like:\n" +"\n" +" machine curl.haxx.se login iamdaniel password mysecret\n" +"\n" +"CUSTOM OUTPUT\n" +"\n" +" To better allow script programmers to get to know about the progress of\n" +); + puts( +" curl, the -w/--write-out option was introduced. Using this, you can specify\n" +" what information from the previous transfer you want to extract.\n" +"\n" +" To display the amount of bytes downloaded together with some text and an\n" +" ending newline:\n" +"\n" +" curl -w 'We downloaded %{size_download} bytes\\n' www.download.com\n" +"\n" +"KERBEROS4 FTP TRANSFER\n" +"\n" +" Curl supports kerberos4 for FTP transfers. You need the kerberos package\n" +" installed and used at curl build time for it to be used.\n" +"\n" +); + puts( +" First, get the krb-ticket the normal way, like with the kauth tool. Then use\n" +" curl in way similar to:\n" +"\n" +" curl --krb4 private ftp://krb4site.com -u username:fakepwd\n" +"\n" +" There's no use for a password on the -u switch, but a blank one will make\n" +" curl ask for one and you already entered the real password to kauth.\n" +"\n" +"TELNET\n" +"\n" +" The curl telnet support is basic and very easy to use. Curl passes all data\n" +" passed to it on stdin to the remote server. Connect to a remote telnet\n" +); + puts( +" server using a command line similar to:\n" +"\n" +" curl telnet://remote.server.com\n" +"\n" +" And enter the data to pass to the server on stdin. The result will be sent\n" +" to stdout or to the file you specify with -o.\n" +"\n" +" You might want the -N/--no-buffer option to switch off the buffered output\n" +" for slow connections or similar.\n" +"\n" +" Pass options to the telnet protocol negotiation, by using the -t option. To\n" +" tell the server we use a vt100 terminal, try something like:\n" +"\n" +); + puts( +" curl -tTTYPE=vt100 telnet://remote.server.com\n" +"\n" +" Other interesting options for it -t include:\n" +"\n" +" - XDISPLOC= Sets the X display location.\n" +"\n" +" - NEW_ENV= Sets an environment variable.\n" +"\n" +" NOTE: the telnet protocol does not specify any way to login with a specified\n" +" user and password so curl can't do that automatically. To do that, you need\n" +" to track when the login prompt is received and send the username and\n" +" password accordingly.\n" +"\n" +"PERSISTANT CONNECTIONS\n" +"\n" +); + puts( +" Specifying multiple files on a single command line will make curl transfer\n" +" all of them, one after the other in the specified order.\n" +"\n" +" libcurl will attempt to use persistant connections for the transfers so that\n" +" the second transfer to the same host can use the same connection that was\n" +" already initiated and was left open in the previous transfer. This greatly\n" +" decreases connection time for all but the first transfer and it makes a far\n" +" better use of the network.\n" +"\n" +); + puts( +" Note that curl cannot use persistant connections for transfers that are used\n" +" in subsequence curl invokes. Try to stuff as many URLs as possible on the\n" +" same command line if they are using the same host, as that'll make the\n" +" transfers faster. If you use a http proxy for file transfers, practicly\n" +" all transfers will be persistant.\n" +"\n" +" Persistant connections were introduced in curl 7.7.\n" +"\n" +"MAILING LISTS\n" +"\n" +" For your convenience, we have several open mailing lists to discuss curl,\n" +); + puts( +" its development and things relevant to this. Get all info at\n" +" http://curl.haxx.se/mail/. The lists available are:\n" +"\n" +" curl-users\n" +"\n" +" Users of the command line tool. How to use it, what doesn't work, new\n" +" features, related tools, questions, news, installations, compilations,\n" +" running, porting etc.\n" +"\n" +" curl-library\n" +"\n" +" Developers using or developing libcurl. Bugs, extensions, improvements.\n" +"\n" +" curl-announce\n" +"\n" +" Low-traffic. Only announcements of new public versions.\n" +"\n" +" curl-and-PHP\n" +"\n" +); + puts( +" Using the curl functions in PHP. Everything curl with a PHP angle. Or PHP\n" +" with a curl angle.\n" +"\n" +" curl-commits\n" +"\n" +" Receives notifications on all CVS commits done to the curl source module.\n" +" This can become quite a large amount of mails during intense development,\n" +" be aware. This is for us who like email...\n" +"\n" +" curl-www-commits\n" +"\n" +" Receives notifications on all CVS commits done to the curl www module\n" +" (basicly the web site). This can become quite a large amount of mails\n" +); + puts( +" during intense changing, be aware. This is for us who like email...\n" +"\n" +" Please direct curl questions, feature requests and trouble reports to one of\n" +" these mailing lists instead of mailing any individual.\n" ) ; } diff --git a/main/source/linux/build-curl.sh b/main/source/linux/build-curl.sh index 2c88a35..43eb93f 100644 --- a/main/source/linux/build-curl.sh +++ b/main/source/linux/build-curl.sh @@ -1,7 +1,7 @@ -#!/bin/sh -cd ../curl -#recode ibmpc:lat1 * -chmod u+rwx * -./configure --build=i686-linux --without-ssl --without-zlib --without-ca-bundle --with-gnu-ld --with-pic --disable-thread --disable-ftp --disable-file --disable-dict --disable-gopher --disable-telnet --disable-ipv6 -make clean -make +#!/bin/sh +cd ../curl +#recode ibmpc:lat1 * +chmod u+rwx * +./configure --build=i686-linux --without-ssl --without-zlib --without-ca-bundle --with-gnu-ld --with-pic --disable-thread --disable-ftp --disable-file --disable-dict --disable-gopher --disable-telnet --disable-ipv6 +make clean +make diff --git a/main/source/stlport/src/gcc.mak b/main/source/stlport/src/gcc.mak index e65024b..0915baa 100644 --- a/main/source/stlport/src/gcc.mak +++ b/main/source/stlport/src/gcc.mak @@ -1,60 +1,60 @@ -# -# Note : this makefile is for gcc-2.95 and later ! -# - -# -# compiler -# -CC = gcc -CXX = c++ -pthread -fexceptions - -# -# Basename for libraries -# -LIB_BASENAME = libstlport_gcc - -# -# guts for common stuff -# -# -LINK=ar cr -# 2.95 flag -DYN_LINK=c++ -pthread -fexceptions -shared -o - -OBJEXT=o -DYNEXT=so -STEXT=a -RM=rm -rf -PATH_SEP=/ -MKDIR=mkdir -p -COMP=GCC$(ARCH) -INSTALL_STEP = install_unix - -all: all_dynamic all_static symbolic_links - -include common_macros.mak - -WARNING_FLAGS= -Wall -W -Wno-sign-compare -Wno-unused -Wno-uninitialized -ftemplate-depth-32 -frtti - -CXXFLAGS_COMMON = -I${STLPORT_DIR} ${WARNING_FLAGS} -D_STLP_USE_GLIBC - -CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -O2 -CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -O2 -fPIC - -CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -O -g -CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -O -g -fPIC - -CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_DEBUG_static) -D_STLP_DEBUG -CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_DEBUG_dynamic) -D_STLP_DEBUG - -include common_percent_rules.mak -include common_rules.mak - - -#install: all -# cp -p $(LIB_TARGET) ${D_LIB_TARGET} ../lib - -#%.s: %.cpp -# $(CXX) $(CXXFLAGS) -O4 -S -pto $< -o $@ - - +# +# Note : this makefile is for gcc-2.95 and later ! +# + +# +# compiler +# +CC = gcc +CXX = c++ -pthread -fexceptions + +# +# Basename for libraries +# +LIB_BASENAME = libstlport_gcc + +# +# guts for common stuff +# +# +LINK=ar cr +# 2.95 flag +DYN_LINK=c++ -pthread -fexceptions -shared -o + +OBJEXT=o +DYNEXT=so +STEXT=a +RM=rm -rf +PATH_SEP=/ +MKDIR=mkdir -p +COMP=GCC$(ARCH) +INSTALL_STEP = install_unix + +all: all_dynamic all_static symbolic_links + +include common_macros.mak + +WARNING_FLAGS= -Wall -W -Wno-sign-compare -Wno-unused -Wno-uninitialized -ftemplate-depth-32 -frtti + +CXXFLAGS_COMMON = -I${STLPORT_DIR} ${WARNING_FLAGS} -D_STLP_USE_GLIBC + +CXXFLAGS_RELEASE_static = $(CXXFLAGS_COMMON) -O2 +CXXFLAGS_RELEASE_dynamic = $(CXXFLAGS_COMMON) -O2 -fPIC + +CXXFLAGS_DEBUG_static = $(CXXFLAGS_COMMON) -O -g +CXXFLAGS_DEBUG_dynamic = $(CXXFLAGS_COMMON) -O -g -fPIC + +CXXFLAGS_STLDEBUG_static = $(CXXFLAGS_DEBUG_static) -D_STLP_DEBUG +CXXFLAGS_STLDEBUG_dynamic = $(CXXFLAGS_DEBUG_dynamic) -D_STLP_DEBUG + +include common_percent_rules.mak +include common_rules.mak + + +#install: all +# cp -p $(LIB_TARGET) ${D_LIB_TARGET} ../lib + +#%.s: %.cpp +# $(CXX) $(CXXFLAGS) -O4 -S -pto $< -o $@ + +