Upgrade from popt 1.2 to a cut-down 1.5
authorMartin Pool <mbp@samba.org>
Sat, 24 Feb 2001 01:32:22 +0000 (01:32 +0000)
committerMartin Pool <mbp@samba.org>
Sat, 24 Feb 2001 01:32:22 +0000 (01:32 +0000)
40 files changed:
popt-1.2/.cvsignore [deleted file]
popt-1.2/CHANGES [deleted file]
popt-1.2/Makefile.am [deleted file]
popt-1.2/Makefile.in [deleted file]
popt-1.2/acconfig.h [deleted file]
popt-1.2/aclocal.m4 [deleted file]
popt-1.2/autogen.sh [deleted file]
popt-1.2/config.h.in [deleted file]
popt-1.2/configure [deleted file]
popt-1.2/configure.in [deleted file]
popt-1.2/install-sh [deleted file]
popt-1.2/missing [deleted file]
popt-1.2/mkinstalldirs [deleted file]
popt-1.2/po/.cvsignore [deleted file]
popt-1.2/po/Makefile.in [deleted file]
popt-1.2/po/Makefile.in.in [deleted file]
popt-1.2/po/POTFILES [deleted file]
popt-1.2/po/POTFILES.in [deleted file]
popt-1.2/po/ro.po [deleted file]
popt-1.2/popt.3 [deleted file]
popt-1.2/popt.spec [deleted file]
popt-1.2/poptint.h [deleted file]
popt-1.2/stamp-h.in [deleted file]
popt-1.2/test-poptrc [deleted file]
popt-1.2/test1.c [deleted file]
popt-1.2/testit.sh [deleted file]
popt/.cvsignore [new file with mode: 0644]
popt/CHANGES [new file with mode: 0644]
popt/COPYING [moved from popt-1.2/COPYING with 100% similarity]
popt/README [moved from popt-1.2/README with 100% similarity]
popt/config.log [new file with mode: 0644]
popt/findme.c [moved from popt-1.2/findme.c with 68% similarity]
popt/findme.h [moved from popt-1.2/findme.h with 81% similarity]
popt/popt.c [moved from popt-1.2/popt.c with 53% similarity]
popt/popt.h [moved from popt-1.2/popt.h with 61% similarity]
popt/poptconfig.c [moved from popt-1.2/poptconfig.c with 83% similarity]
popt/popthelp.c [moved from popt-1.2/popthelp.c with 61% similarity]
popt/poptint.h [new file with mode: 0644]
popt/poptparse.c [moved from popt-1.2/poptparse.c with 52% similarity]
popt/system.h [new file with mode: 0644]

diff --git a/popt-1.2/.cvsignore b/popt-1.2/.cvsignore
deleted file mode 100644 (file)
index 8f1ef3c..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-.deps
-.depend
-Makefile
-mappcinames
-pci-ids-temp.h
-Makefile
-configure
-config.h
-config.log
-config.cache
-config.satus
-config.status
-stamp-h
-stamp-h.in
-test1
diff --git a/popt-1.2/CHANGES b/popt-1.2/CHANGES
deleted file mode 100644 (file)
index 627f921..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-1.1 -> 1.2
-       - added popt.3 man page (Robert Lynch)
-       - don't use mmap anymore (its lack of portability isn't worth the
-         trouble)
-       - added test script
-       - added support for exec
-       - removed support for *_POPT_ALIASES env variable -- it was a bad
-         idea
-       - reorganized into multiple source files
-       - added automatic help generation, POPT_AUTOHELP
-       - added table callbacks
-       - added table inclusion
-       - updated man page for new features
-       - added test scripts
-
-1.0 -> 1.1
-       - moved to autoconf (Fred Fish)
-       - added STRERROR replacement (Norbert Warmuth)
-       - added const keywords (Bruce Perens)
diff --git a/popt-1.2/Makefile.am b/popt-1.2/Makefile.am
deleted file mode 100644 (file)
index 4284910..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-# Makefile for popt library.
-
-AUTOMAKE_OPTIONS = 1.3 foreign
-
-SUBDIRS = po
-
-LDFLAGS = -L$(top_builddir)
-INCLUDES = -I$(top_srcdir)
-
-noinst_PROGRAMS = test1
-test1_SOURCES = test1.c
-test1_LDADD = -lpopt
-
-include_HEADERS = popt.h
-lib_LIBRARIES = libpopt.a
-libpopt_a_SOURCES = popt.c findme.c poptparse.c poptconfig.c popthelp.c
-
-CVSTAG = $(PACKAGE)-$(subst .,_,$(VERSION))
-
-.PHONY: archive
-archive: 
-       @echo "This is $(PACKAGE)-$(VERSION)."
-       @sleep 5
-       @cvs -Q tag -F $(CVSTAG) .
-       @rm -rf /tmp/$(PACKAGE)-$(VERSION) /tmp/$(PACKAGE)
-       @cd /tmp; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) $(PACKAGE) || :
-       @mv /tmp/$(PACKAGE) /tmp/$(PACKAGE)-$(VERSION)
-       @cd /tmp/$(PACKAGE)-$(VERSION); ./autogen.sh ; make depend; make distclean
-       @cd /tmp/$(PACKAGE)-$(VERSION); ./autogen.sh --noconfigure
-       @cd /tmp; tar czSpf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
-       @rm -rf /tmp/$(PACKAGE)-$(VERSION)
-       @cp /tmp/$(PACKAGE)-$(VERSION).tar.gz .
-       @rm -f /tmp/$(PACKAGE)-$(VERSION).tar.gz 
-       @echo " "
-       @echo "The final archive is ./$(PACKAGE)-$(VERSION).tar.gz."
diff --git a/popt-1.2/Makefile.in b/popt-1.2/Makefile.in
deleted file mode 100644 (file)
index 9fe78ed..0000000
+++ /dev/null
@@ -1,507 +0,0 @@
-# Makefile.in generated automatically by automake 1.3 from Makefile.am
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998 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.
-
-# Makefile for popt library.
-
-
-SHELL = /bin/sh
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-prefix = @prefix@
-exec_prefix = @exec_prefix@
-
-bindir = @bindir@
-sbindir = @sbindir@
-libexecdir = @libexecdir@
-datadir = @datadir@
-sysconfdir = @sysconfdir@
-sharedstatedir = @sharedstatedir@
-localstatedir = @localstatedir@
-libdir = @libdir@
-infodir = @infodir@
-mandir = @mandir@
-includedir = @includedir@
-oldincludedir = /usr/include
-
-DISTDIR =
-
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-
-top_builddir = .
-
-ACLOCAL = @ACLOCAL@
-AUTOCONF = @AUTOCONF@
-AUTOMAKE = @AUTOMAKE@
-AUTOHEADER = @AUTOHEADER@
-
-INSTALL = @INSTALL@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-transform = @program_transform_name@
-
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-CC = @CC@
-CPP = @CPP@
-MAKEINFO = @MAKEINFO@
-PACKAGE = @PACKAGE@
-RANLIB = @RANLIB@
-TARGET = @TARGET@
-U = @U@
-VERSION = @VERSION@
-
-AUTOMAKE_OPTIONS = 1.3 foreign
-
-SUBDIRS = po
-
-LDFLAGS = -L$(top_builddir)
-INCLUDES = -I$(top_srcdir)
-
-noinst_PROGRAMS = test1
-test1_SOURCES = test1.c
-test1_LDADD = -lpopt
-
-include_HEADERS = popt.h
-lib_LIBRARIES = libpopt.a
-libpopt_a_SOURCES = popt.c findme.c poptparse.c poptconfig.c popthelp.c
-
-CVSTAG = $(PACKAGE)-$(subst .,_,$(VERSION))
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
-CONFIG_HEADER = config.h
-CONFIG_CLEAN_FILES = 
-LIBRARIES =  $(lib_LIBRARIES)
-
-
-DEFS = @DEFS@ -I. -I$(srcdir) -I.
-CPPFLAGS = @CPPFLAGS@
-LIBS = @LIBS@
-libpopt_a_LIBADD = 
-libpopt_a_OBJECTS =  popt.o findme.o poptparse.o poptconfig.o popthelp.o
-AR = ar
-PROGRAMS =  $(noinst_PROGRAMS)
-
-test1_OBJECTS =  test1.o
-test1_DEPENDENCIES = 
-test1_LDFLAGS = 
-CFLAGS = @CFLAGS@
-COMPILE = $(CC) $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
-LINK = $(CC) $(CFLAGS) $(LDFLAGS) -o $@
-HEADERS =  $(include_HEADERS)
-
-DIST_COMMON =  README COPYING Makefile.am Makefile.in acconfig.h \
-aclocal.m4 config.h.in configure configure.in install-sh missing \
-mkinstalldirs stamp-h.in
-
-
-DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
-
-TAR = tar
-GZIP = --best
-DEP_FILES =  .deps/findme.P .deps/popt.P .deps/poptconfig.P \
-.deps/popthelp.P .deps/poptparse.P .deps/test1.P
-SOURCES = $(libpopt_a_SOURCES) $(test1_SOURCES)
-OBJECTS = $(libpopt_a_OBJECTS) $(test1_OBJECTS)
-
-all: all-recursive-am all-am
-
-.SUFFIXES:
-.SUFFIXES: .S .c .o .s
-$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4)
-       cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile
-
-Makefile: $(srcdir)/Makefile.in  $(top_builddir)/config.status $(BUILT_SOURCES)
-       cd $(top_builddir) \
-         && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
-
-$(ACLOCAL_M4):  configure.in 
-       cd $(srcdir) && $(ACLOCAL)
-
-config.status: $(srcdir)/configure
-       $(SHELL) ./config.status --recheck
-$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
-       cd $(srcdir) && $(AUTOCONF)
-
-config.h: stamp-h
-       @:
-stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status
-       cd $(top_builddir) \
-         && CONFIG_FILES= CONFIG_HEADERS=config.h \
-            $(SHELL) ./config.status
-       @echo timestamp > stamp-h
-$(srcdir)/config.h.in: $(srcdir)/stamp-h.in
-$(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) acconfig.h
-       cd $(top_srcdir) && $(AUTOHEADER)
-       @echo timestamp > $(srcdir)/stamp-h.in
-
-mostlyclean-hdr:
-
-clean-hdr:
-
-distclean-hdr:
-       -rm -f config.h
-
-maintainer-clean-hdr:
-
-mostlyclean-libLIBRARIES:
-
-clean-libLIBRARIES:
-       -test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
-
-distclean-libLIBRARIES:
-
-maintainer-clean-libLIBRARIES:
-
-install-libLIBRARIES: $(lib_LIBRARIES)
-       @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(libdir)
-       list='$(lib_LIBRARIES)'; for p in $$list; do \
-         if test -f $$p; then \
-           echo " $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p"; \
-           $(INSTALL_DATA) $$p $(DESTDIR)$(libdir)/$$p; \
-         else :; fi; \
-       done
-       @$(POST_INSTALL)
-       @list='$(lib_LIBRARIES)'; for p in $$list; do \
-         if test -f $$p; then \
-           echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
-           $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
-         else :; fi; \
-       done
-
-uninstall-libLIBRARIES:
-       @$(NORMAL_UNINSTALL)
-       list='$(lib_LIBRARIES)'; for p in $$list; do \
-         rm -f $(DESTDIR)$(libdir)/$$p; \
-       done
-
-.s.o:
-       $(COMPILE) -c $<
-
-.S.o:
-       $(COMPILE) -c $<
-
-mostlyclean-compile:
-       -rm -f *.o core *.core
-
-clean-compile:
-
-distclean-compile:
-       -rm -f *.tab.c
-
-maintainer-clean-compile:
-
-libpopt.a: $(libpopt_a_OBJECTS) $(libpopt_a_DEPENDENCIES)
-       -rm -f libpopt.a
-       $(AR) cru libpopt.a $(libpopt_a_OBJECTS) $(libpopt_a_LIBADD)
-       $(RANLIB) libpopt.a
-
-mostlyclean-noinstPROGRAMS:
-
-clean-noinstPROGRAMS:
-       -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-
-distclean-noinstPROGRAMS:
-
-maintainer-clean-noinstPROGRAMS:
-
-test1: $(test1_OBJECTS) $(test1_DEPENDENCIES)
-       @rm -f test1
-       $(LINK) $(test1_LDFLAGS) $(test1_OBJECTS) $(test1_LDADD) $(LIBS)
-
-install-includeHEADERS: $(include_HEADERS)
-       @$(NORMAL_INSTALL)
-       $(mkinstalldirs) $(DESTDIR)$(includedir)
-       @list='$(include_HEADERS)'; for p in $$list; do \
-         if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \
-         echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p"; \
-         $(INSTALL_DATA) $$d$$p $(DESTDIR)$(includedir)/$$p; \
-       done
-
-uninstall-includeHEADERS:
-       @$(NORMAL_UNINSTALL)
-       list='$(include_HEADERS)'; for p in $$list; do \
-         rm -f $(DESTDIR)$(includedir)/$$p; \
-       done
-
-# This directory's subdirectories are mostly independent; you can cd
-# into them and run `make' without going through this Makefile.
-# To change the values of `make' variables: instead of editing Makefiles,
-# (1) if the variable is set in `config.status', edit `config.status'
-#     (which will cause the Makefiles to be regenerated when you run `make');
-# (2) otherwise, pass the desired values on the `make' command line.
-
-@SET_MAKE@
-
-all-recursive install-data-recursive install-exec-recursive \
-installdirs-recursive install-recursive uninstall-recursive  \
-check-recursive installcheck-recursive info-recursive dvi-recursive:
-       @set fnord $(MAKEFLAGS); amf=$$2; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         target=`echo $@ | sed s/-recursive//`; \
-         echo "Making $$target in $$subdir"; \
-         (cd $$subdir && $(MAKE) $$target) \
-          || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
-       done && test -z "$$fail"
-
-mostlyclean-recursive clean-recursive distclean-recursive \
-maintainer-clean-recursive:
-       @set fnord $(MAKEFLAGS); amf=$$2; \
-       rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \
-         rev="$$subdir $$rev"; \
-       done; \
-       for subdir in $$rev; do \
-         target=`echo $@ | sed s/-recursive//`; \
-         echo "Making $$target in $$subdir"; \
-         (cd $$subdir && $(MAKE) $$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 \
-         (cd $$subdir && $(MAKE) tags); \
-       done
-
-tags: TAGS
-
-ID: $(HEADERS) $(SOURCES) $(LISP)
-       here=`pwd` && cd $(srcdir) \
-         && mkid -f$$here/ID $(SOURCES) $(HEADERS) $(LISP)
-
-TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP)
-       tags=; \
-       here=`pwd`; \
-       list='$(SUBDIRS)'; for subdir in $$list; do \
-         test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \
-       done; \
-       list='$(SOURCES) $(HEADERS)'; \
-       unique=`for i in $$list; do echo $$i; done | \
-         awk '    { files[$$0] = 1; } \
-              END { for (i in files) print i; }'`; \
-       test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \
-         || (cd $(srcdir) && etags $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP) -o $$here/TAGS)
-
-mostlyclean-tags:
-
-clean-tags:
-
-distclean-tags:
-       -rm -f TAGS ID
-
-maintainer-clean-tags:
-
-distdir = $(PACKAGE)-$(VERSION)
-top_distdir = $(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
-       -rm -rf $(distdir)
-       GZIP=$(GZIP) $(TAR) zxf $(distdir).tar.gz
-       mkdir $(distdir)/=build
-       mkdir $(distdir)/=inst
-       dc_install_base=`cd $(distdir)/=inst && pwd`; \
-       cd $(distdir)/=build \
-         && ../configure --srcdir=.. --prefix=$$dc_install_base \
-         && $(MAKE) \
-         && $(MAKE) dvi \
-         && $(MAKE) check \
-         && $(MAKE) install \
-         && $(MAKE) installcheck \
-         && $(MAKE) dist
-       -rm -rf $(distdir)
-       @echo "========================"; \
-       echo "$(distdir).tar.gz is ready for distribution"; \
-       echo "========================"
-dist: distdir
-       -chmod -R a+r $(distdir)
-       GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
-       -rm -rf $(distdir)
-dist-all: distdir
-       -chmod -R a+r $(distdir)
-       GZIP=$(GZIP) $(TAR) chozf $(distdir).tar.gz $(distdir)
-       -rm -rf $(distdir)
-distdir: $(DISTFILES)
-       -rm -rf $(distdir)
-       mkdir $(distdir)
-       -chmod 777 $(distdir)
-       here=`cd $(top_builddir) && pwd`; \
-       top_distdir=`cd $(distdir) && pwd`; \
-       distdir=`cd $(distdir) && pwd`; \
-       cd $(top_srcdir) \
-         && $(AUTOMAKE) --include-deps --build-dir=$$here --srcdir-name=$(top_srcdir) --output-dir=$$top_distdir --foreign Makefile
-       @for file in $(DISTFILES); do \
-         d=$(srcdir); \
-         test -f $(distdir)/$$file \
-         || ln $$d/$$file $(distdir)/$$file 2> /dev/null \
-         || cp -p $$d/$$file $(distdir)/$$file; \
-       done
-       for subdir in $(SUBDIRS); do \
-         test -d $(distdir)/$$subdir \
-         || mkdir $(distdir)/$$subdir \
-         || exit 1; \
-         chmod 777 $(distdir)/$$subdir; \
-         (cd $$subdir && $(MAKE) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \
-           || exit 1; \
-       done
-
-DEPS_MAGIC := $(shell mkdir .deps > /dev/null 2>&1 || :)
-
--include $(DEP_FILES)
-
-mostlyclean-depend:
-
-clean-depend:
-
-distclean-depend:
-
-maintainer-clean-depend:
-       -rm -rf .deps
-
-%.o: %.c
-       @echo '$(COMPILE) -c $<'; \
-       $(COMPILE) -Wp,-MD,.deps/$(*F).P -c $<
-
-%.lo: %.c
-       @echo '$(LTCOMPILE) -c $<'; \
-       $(LTCOMPILE) -Wp,-MD,.deps/$(*F).p -c $<
-       @-sed -e 's/^\([^:]*\)\.o:/\1.lo \1.o:/' \
-         < .deps/$(*F).p > .deps/$(*F).P
-       @-rm -f .deps/$(*F).p
-info: info-recursive
-dvi: dvi-recursive
-check: all-am
-       $(MAKE) check-recursive
-installcheck: installcheck-recursive
-all-recursive-am: config.h
-       $(MAKE) all-recursive
-
-all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS) config.h
-
-install-exec-am: install-libLIBRARIES
-
-install-data-am: install-includeHEADERS
-
-uninstall-am: uninstall-libLIBRARIES uninstall-includeHEADERS
-
-install-exec: install-exec-recursive install-exec-am
-       @$(NORMAL_INSTALL)
-
-install-data: install-data-recursive install-data-am
-       @$(NORMAL_INSTALL)
-
-install: install-recursive install-exec-am install-data-am
-       @:
-
-uninstall: uninstall-recursive uninstall-am
-
-install-strip:
-       $(MAKE) INSTALL_PROGRAM='$(INSTALL_PROGRAM) -s' INSTALL_SCRIPT='$(INSTALL_PROGRAM)' install
-installdirs: installdirs-recursive
-       $(mkinstalldirs)  $(DATADIR)$(libdir) $(DATADIR)$(includedir)
-
-
-mostlyclean-generic:
-       -test -z "$(MOSTLYCLEANFILES)" || rm -f $(MOSTLYCLEANFILES)
-
-clean-generic:
-       -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES)
-
-distclean-generic:
-       -rm -f Makefile $(DISTCLEANFILES)
-       -rm -f config.cache config.log stamp-h stamp-h[0-9]*
-       -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
-       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
-       -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES)
-mostlyclean-am:  mostlyclean-hdr mostlyclean-libLIBRARIES \
-               mostlyclean-compile mostlyclean-noinstPROGRAMS \
-               mostlyclean-tags mostlyclean-depend mostlyclean-generic
-
-clean-am:  clean-hdr clean-libLIBRARIES clean-compile \
-               clean-noinstPROGRAMS clean-tags clean-depend \
-               clean-generic mostlyclean-am
-
-distclean-am:  distclean-hdr distclean-libLIBRARIES distclean-compile \
-               distclean-noinstPROGRAMS distclean-tags \
-               distclean-depend distclean-generic clean-am
-
-maintainer-clean-am:  maintainer-clean-hdr maintainer-clean-libLIBRARIES \
-               maintainer-clean-compile \
-               maintainer-clean-noinstPROGRAMS maintainer-clean-tags \
-               maintainer-clean-depend maintainer-clean-generic \
-               distclean-am
-
-mostlyclean:  mostlyclean-recursive mostlyclean-am
-
-clean:  clean-recursive clean-am
-
-distclean:  distclean-recursive distclean-am
-       -rm -f config.status
-
-maintainer-clean:  maintainer-clean-recursive maintainer-clean-am
-       @echo "This command is intended for maintainers to use;"
-       @echo "it deletes files that may require special tools to rebuild."
-       -rm -f config.status
-
-.PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \
-mostlyclean-libLIBRARIES distclean-libLIBRARIES clean-libLIBRARIES \
-maintainer-clean-libLIBRARIES uninstall-libLIBRARIES \
-install-libLIBRARIES mostlyclean-compile distclean-compile \
-clean-compile maintainer-clean-compile mostlyclean-noinstPROGRAMS \
-distclean-noinstPROGRAMS clean-noinstPROGRAMS \
-maintainer-clean-noinstPROGRAMS uninstall-includeHEADERS \
-install-includeHEADERS install-data-recursive uninstall-data-recursive \
-install-exec-recursive uninstall-exec-recursive installdirs-recursive \
-uninstalldirs-recursive all-recursive check-recursive \
-installcheck-recursive info-recursive dvi-recursive \
-mostlyclean-recursive distclean-recursive clean-recursive \
-maintainer-clean-recursive tags tags-recursive mostlyclean-tags \
-distclean-tags clean-tags maintainer-clean-tags distdir \
-mostlyclean-depend distclean-depend clean-depend \
-maintainer-clean-depend info dvi installcheck all-recursive-am all-am \
-install-exec-am install-data-am uninstall-am install-exec install-data \
-install uninstall all installdirs mostlyclean-generic distclean-generic \
-clean-generic maintainer-clean-generic clean mostlyclean distclean \
-maintainer-clean
-
-
-.PHONY: archive
-archive: 
-       @echo "This is $(PACKAGE)-$(VERSION)."
-       @sleep 5
-       @cvs -Q tag -F $(CVSTAG) .
-       @rm -rf /tmp/$(PACKAGE)-$(VERSION) /tmp/$(PACKAGE)
-       @cd /tmp; cvs -Q -d $(CVSROOT) export -r$(CVSTAG) $(PACKAGE) || :
-       @mv /tmp/$(PACKAGE) /tmp/$(PACKAGE)-$(VERSION)
-       @cd /tmp/$(PACKAGE)-$(VERSION); ./autogen.sh ; make depend; make distclean
-       @cd /tmp/$(PACKAGE)-$(VERSION); ./autogen.sh --noconfigure
-       @cd /tmp; tar czSpf $(PACKAGE)-$(VERSION).tar.gz $(PACKAGE)-$(VERSION)
-       @rm -rf /tmp/$(PACKAGE)-$(VERSION)
-       @cp /tmp/$(PACKAGE)-$(VERSION).tar.gz .
-       @rm -f /tmp/$(PACKAGE)-$(VERSION).tar.gz 
-       @echo " "
-       @echo "The final archive is ./$(PACKAGE)-$(VERSION).tar.gz."
-
-# 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/popt-1.2/acconfig.h b/popt-1.2/acconfig.h
deleted file mode 100644 (file)
index 3e2b29f..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING
-   file accompanying popt source distributions, available from 
-   ftp://ftp.redhat.com/pub/code/popt */
-
-/* acconfig.h
-   This file is in the public domain.
-
-   Descriptive text for the C preprocessor macros that
-   the distributed Autoconf macros can define.
-   No software package will use all of them; autoheader copies the ones
-   your configure.in uses into your configuration header file templates.
-
-   The entries are in sort -df order: alphabetical, case insensitive,
-   ignoring punctuation (such as underscores).  Although this order
-   can split up related entries, it makes it easier to check whether
-   a given entry is in the file.
-
-   Leave the following blank line there!!  Autoheader needs it.  */
-^L
-
-/* Define to the name of the distribution.  */
-#undef PACKAGE
-
-/* Define to the version of the distribution.  */
-#undef VERSION
-
-/* Define to 1 if ANSI function prototypes are usable.  */
-#undef PROTOTYPES
-
-^L
-/* Leave that blank line there!!  Autoheader needs it.
-   If you're adding to this file, keep in mind:
-   The entries are in sort -df order: alphabetical, case insensitive,
-   ignoring punctuation (such as underscores).  */
-
diff --git a/popt-1.2/aclocal.m4 b/popt-1.2/aclocal.m4
deleted file mode 100644 (file)
index d234055..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-dnl aclocal.m4 generated automatically by aclocal 1.3
-
-dnl Copyright (C) 1994, 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
-dnl This Makefile.in is free software; the Free Software Foundation
-dnl gives unlimited permission to copy and/or distribute it,
-dnl with or without modifications, as long as this notice is preserved.
-
-dnl This program is distributed in the hope that it will be useful,
-dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-dnl PARTICULAR PURPOSE.
-
-# Do all the work for Automake.  This macro actually does too much --
-# some checks are only needed if your package does certain things.
-# But this isn't really a big deal.
-
-# serial 1
-
-dnl Usage:
-dnl AM_INIT_AUTOMAKE(package,version, [no-define])
-
-AC_DEFUN(AM_INIT_AUTOMAKE,
-[AC_REQUIRE([AM_PROG_INSTALL])
-PACKAGE=[$1]
-AC_SUBST(PACKAGE)
-VERSION=[$2]
-AC_SUBST(VERSION)
-dnl test to see if srcdir already configured
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
-  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
-fi
-ifelse([$3],,
-AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE")
-AC_DEFINE_UNQUOTED(VERSION, "$VERSION"))
-AC_REQUIRE([AM_SANITY_CHECK])
-AC_REQUIRE([AC_ARG_PROGRAM])
-dnl FIXME This is truly gross.
-missing_dir=`cd $ac_aux_dir && pwd`
-AM_MISSING_PROG(ACLOCAL, aclocal, $missing_dir)
-AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir)
-AM_MISSING_PROG(AUTOMAKE, automake, $missing_dir)
-AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir)
-AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir)
-AC_REQUIRE([AC_PROG_MAKE_SET])])
-
-
-# serial 1
-
-AC_DEFUN(AM_PROG_INSTALL,
-[AC_REQUIRE([AC_PROG_INSTALL])
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-AC_SUBST(INSTALL_SCRIPT)dnl
-])
-
-#
-# Check to make sure that the build environment is sane.
-#
-
-AC_DEFUN(AM_SANITY_CHECK,
-[AC_MSG_CHECKING([whether build environment is sane])
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
-   if test "[$]*" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftestfile`
-   fi
-   if test "[$]*" != "X $srcdir/configure conftestfile" \
-      && test "[$]*" != "X conftestfile $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
-alias in your environment])
-   fi
-
-   test "[$]2" = conftestfile
-   )
-then
-   # Ok.
-   :
-else
-   AC_MSG_ERROR([newly created file is older than distributed files!
-Check your system clock])
-fi
-rm -f conftest*
-AC_MSG_RESULT(yes)])
-
-dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY)
-dnl The program must properly implement --version.
-AC_DEFUN(AM_MISSING_PROG,
-[AC_MSG_CHECKING(for working $2)
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if ($2 --version) < /dev/null > /dev/null 2>&1; then
-   $1=$2
-   AC_MSG_RESULT(found)
-else
-   $1="$3/missing $2"
-   AC_MSG_RESULT(missing)
-fi
-AC_SUBST($1)])
-
-# Like AC_CONFIG_HEADER, but automatically create stamp file.
-
-AC_DEFUN(AM_CONFIG_HEADER,
-[AC_PREREQ([2.12])
-AC_CONFIG_HEADER([$1])
-dnl When config.status generates a header, we must update the stamp-h file.
-dnl This file resides in the same directory as the config header
-dnl that is generated.  We must strip everything past the first ":",
-dnl and everything past the last "/".
-AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl
-ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>,
-<<test -z "<<$>>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>,
-<<am_indx=1
-for am_file in <<$1>>; do
-  case " <<$>>CONFIG_HEADERS " in
-  *" <<$>>am_file "*<<)>>
-    echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx
-    ;;
-  esac
-  am_indx=`expr "<<$>>am_indx" + 1`
-done<<>>dnl>>)
-changequote([,]))])
-
-
-# serial 1
-
-AC_DEFUN(AM_C_PROTOTYPES,
-[AC_REQUIRE([AM_PROG_CC_STDC])
-AC_REQUIRE([AC_PROG_CPP])
-AC_MSG_CHECKING([for function prototypes])
-if test "$am_cv_prog_cc_stdc" != no; then
-  AC_MSG_RESULT(yes)
-  AC_DEFINE(PROTOTYPES)
-  U= ANSI2KNR=
-else
-  AC_MSG_RESULT(no)
-  U=_ ANSI2KNR=./ansi2knr
-  # Ensure some checks needed by ansi2knr itself.
-  AC_HEADER_STDC
-  AC_CHECK_HEADERS(string.h)
-fi
-AC_SUBST(U)dnl
-AC_SUBST(ANSI2KNR)dnl
-])
-
-
-# serial 1
-
-# @defmac AC_PROG_CC_STDC
-# @maindex PROG_CC_STDC
-# @ovindex CC
-# If the C compiler in not in ANSI C mode by default, try to add an option
-# to output variable @code{CC} to make it so.  This macro tries various
-# options that select ANSI C on some system or another.  It considers the
-# compiler to be in ANSI C mode if it handles function prototypes correctly.
-#
-# If you use this macro, you should check after calling it whether the C
-# compiler has been set to accept ANSI C; if not, the shell variable
-# @code{am_cv_prog_cc_stdc} is set to @samp{no}.  If you wrote your source
-# code in ANSI C, you can make an un-ANSIfied copy of it by using the
-# program @code{ansi2knr}, which comes with Ghostscript.
-# @end defmac
-
-AC_DEFUN(AM_PROG_CC_STDC,
-[AC_REQUIRE([AC_PROG_CC])
-AC_BEFORE([$0], [AC_C_INLINE])
-AC_BEFORE([$0], [AC_C_CONST])
-dnl Force this before AC_PROG_CPP.  Some cpp's, eg on HPUX, require
-dnl a magic option to avoid problems with ANSI preprocessor commands
-dnl like #elif.
-dnl FIXME: can't do this because then AC_AIX won't work due to a
-dnl circular dependency.
-dnl AC_BEFORE([$0], [AC_PROG_CPP])
-AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C)
-AC_CACHE_VAL(am_cv_prog_cc_stdc,
-[am_cv_prog_cc_stdc=no
-ac_save_CC="$CC"
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX                  -qlanglvl=ansi
-# Ultrix and OSF/1     -std1
-# HP-UX                        -Aa -D_HPUX_SOURCE
-# SVR4                 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  AC_TRY_COMPILE(
-[#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-], [
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-],
-[am_cv_prog_cc_stdc="$ac_arg"; break])
-done
-CC="$ac_save_CC"
-])
-if test -z "$am_cv_prog_cc_stdc"; then
-  AC_MSG_RESULT([none needed])
-else
-  AC_MSG_RESULT($am_cv_prog_cc_stdc)
-fi
-case "x$am_cv_prog_cc_stdc" in
-  x|xno) ;;
-  *) CC="$CC $am_cv_prog_cc_stdc" ;;
-esac
-])
-
diff --git a/popt-1.2/autogen.sh b/popt-1.2/autogen.sh
deleted file mode 100755 (executable)
index fd0c14d..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-#!/bin/sh
-
-autoheader
-autoconf
-
-if [ "$1" = "--noconfigure" ]; then 
-    exit 0;
-fi
-
-./configure "$@"
diff --git a/popt-1.2/config.h.in b/popt-1.2/config.h.in
deleted file mode 100644 (file)
index ffa5449..0000000
+++ /dev/null
@@ -1,34 +0,0 @@
-/* config.h.in.  Generated automatically from configure.in by autoheader.  */
-
-/* Define if you have the ANSI C header files.  */
-#undef STDC_HEADERS
-
-/* Define to the name of the distribution.  */
-#undef PACKAGE
-
-/* Define to the version of the distribution.  */
-#undef VERSION
-
-/* Define to 1 if ANSI function prototypes are usable.  */
-#undef PROTOTYPES
-
-/* Define if you have the dgettext function.  */
-#undef HAVE_DGETTEXT
-
-/* Define if you have the gettext function.  */
-#undef HAVE_GETTEXT
-
-/* Define if you have the strerror function.  */
-#undef HAVE_STRERROR
-
-/* Define if you have the <alloca.h> header file.  */
-#undef HAVE_ALLOCA_H
-
-/* Define if you have the <libintl.h> header file.  */
-#undef HAVE_LIBINTL_H
-
-/* Define if you have the <string.h> header file.  */
-#undef HAVE_STRING_H
-
-/* Define if you have the <unistd.h> header file.  */
-#undef HAVE_UNISTD_H
diff --git a/popt-1.2/configure b/popt-1.2/configure
deleted file mode 100755 (executable)
index 5de8258..0000000
+++ /dev/null
@@ -1,2088 +0,0 @@
-#! /bin/sh
-
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.12 
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
-#
-# This configure script is free software; the Free Software Foundation
-# gives unlimited permission to copy, distribute and modify it.
-
-# Defaults:
-ac_help=
-ac_default_prefix=/usr/local
-# Any additions from configure.in:
-
-# Initialize some variables set by options.
-# The variables have the same names as the options, with
-# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
-exec_prefix=NONE
-host=NONE
-no_create=
-nonopt=NONE
-no_recursion=
-prefix=NONE
-program_prefix=NONE
-program_suffix=NONE
-program_transform_name=s,x,x,
-silent=
-site=
-srcdir=
-target=NONE
-verbose=
-x_includes=NONE
-x_libraries=NONE
-bindir='${exec_prefix}/bin'
-sbindir='${exec_prefix}/sbin'
-libexecdir='${exec_prefix}/libexec'
-datadir='${prefix}/share'
-sysconfdir='${prefix}/etc'
-sharedstatedir='${prefix}/com'
-localstatedir='${prefix}/var'
-libdir='${exec_prefix}/lib'
-includedir='${prefix}/include'
-oldincludedir='/usr/include'
-infodir='${prefix}/info'
-mandir='${prefix}/man'
-
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
-ac_prev=
-for ac_option
-do
-
-  # If the previous option needs an argument, assign it.
-  if test -n "$ac_prev"; then
-    eval "$ac_prev=\$ac_option"
-    ac_prev=
-    continue
-  fi
-
-  case "$ac_option" in
-  -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
-  *) ac_optarg= ;;
-  esac
-
-  # Accept the important Cygnus configure options, so we can diagnose typos.
-
-  case "$ac_option" in
-
-  -bindir | --bindir | --bindi | --bind | --bin | --bi)
-    ac_prev=bindir ;;
-  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
-    bindir="$ac_optarg" ;;
-
-  -build | --build | --buil | --bui | --bu)
-    ac_prev=build ;;
-  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
-    build="$ac_optarg" ;;
-
-  -cache-file | --cache-file | --cache-fil | --cache-fi \
-  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
-    ac_prev=cache_file ;;
-  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
-  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
-    cache_file="$ac_optarg" ;;
-
-  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
-    ac_prev=datadir ;;
-  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
-  | --da=*)
-    datadir="$ac_optarg" ;;
-
-  -disable-* | --disable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    eval "enable_${ac_feature}=no" ;;
-
-  -enable-* | --enable-*)
-    ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
-    fi
-    ac_feature=`echo $ac_feature| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "enable_${ac_feature}='$ac_optarg'" ;;
-
-  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
-  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
-  | --exec | --exe | --ex)
-    ac_prev=exec_prefix ;;
-  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
-  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
-  | --exec=* | --exe=* | --ex=*)
-    exec_prefix="$ac_optarg" ;;
-
-  -gas | --gas | --ga | --g)
-    # Obsolete; use --with-gas.
-    with_gas=yes ;;
-
-  -help | --help | --hel | --he)
-    # Omit some internal or obsolete options to make the list less imposing.
-    # This message is too long to be a string in the A/UX 3.1 sh.
-    cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
-  --cache-file=FILE       cache test results in FILE
-  --help                  print this message
-  --no-create             do not create output files
-  --quiet, --silent       do not print \`checking...' messages
-  --version               print the version of autoconf that created configure
-Directory and file names:
-  --prefix=PREFIX         install architecture-independent files in PREFIX
-                          [$ac_default_prefix]
-  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
-                          [same as prefix]
-  --bindir=DIR            user executables in DIR [EPREFIX/bin]
-  --sbindir=DIR           system admin executables in DIR [EPREFIX/sbin]
-  --libexecdir=DIR        program executables in DIR [EPREFIX/libexec]
-  --datadir=DIR           read-only architecture-independent data in DIR
-                          [PREFIX/share]
-  --sysconfdir=DIR        read-only single-machine data in DIR [PREFIX/etc]
-  --sharedstatedir=DIR    modifiable architecture-independent data in DIR
-                          [PREFIX/com]
-  --localstatedir=DIR     modifiable single-machine data in DIR [PREFIX/var]
-  --libdir=DIR            object code libraries in DIR [EPREFIX/lib]
-  --includedir=DIR        C header files in DIR [PREFIX/include]
-  --oldincludedir=DIR     C header files for non-gcc in DIR [/usr/include]
-  --infodir=DIR           info documentation in DIR [PREFIX/info]
-  --mandir=DIR            man documentation in DIR [PREFIX/man]
-  --srcdir=DIR            find the sources in DIR [configure dir or ..]
-  --program-prefix=PREFIX prepend PREFIX to installed program names
-  --program-suffix=SUFFIX append SUFFIX to installed program names
-  --program-transform-name=PROGRAM
-                          run sed PROGRAM on installed program names
-EOF
-    cat << EOF
-Host type:
-  --build=BUILD           configure for building on BUILD [BUILD=HOST]
-  --host=HOST             configure for HOST [guessed]
-  --target=TARGET         configure for TARGET [TARGET=HOST]
-Features and packages:
-  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
-  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
-  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
-  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
-  --x-includes=DIR        X include files are in DIR
-  --x-libraries=DIR       X library files are in DIR
-EOF
-    if test -n "$ac_help"; then
-      echo "--enable and --with options recognized:$ac_help"
-    fi
-    exit 0 ;;
-
-  -host | --host | --hos | --ho)
-    ac_prev=host ;;
-  -host=* | --host=* | --hos=* | --ho=*)
-    host="$ac_optarg" ;;
-
-  -includedir | --includedir | --includedi | --included | --include \
-  | --includ | --inclu | --incl | --inc)
-    ac_prev=includedir ;;
-  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
-  | --includ=* | --inclu=* | --incl=* | --inc=*)
-    includedir="$ac_optarg" ;;
-
-  -infodir | --infodir | --infodi | --infod | --info | --inf)
-    ac_prev=infodir ;;
-  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
-    infodir="$ac_optarg" ;;
-
-  -libdir | --libdir | --libdi | --libd)
-    ac_prev=libdir ;;
-  -libdir=* | --libdir=* | --libdi=* | --libd=*)
-    libdir="$ac_optarg" ;;
-
-  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
-  | --libexe | --libex | --libe)
-    ac_prev=libexecdir ;;
-  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
-  | --libexe=* | --libex=* | --libe=*)
-    libexecdir="$ac_optarg" ;;
-
-  -localstatedir | --localstatedir | --localstatedi | --localstated \
-  | --localstate | --localstat | --localsta | --localst \
-  | --locals | --local | --loca | --loc | --lo)
-    ac_prev=localstatedir ;;
-  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
-  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
-  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
-    localstatedir="$ac_optarg" ;;
-
-  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
-    ac_prev=mandir ;;
-  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
-    mandir="$ac_optarg" ;;
-
-  -nfp | --nfp | --nf)
-    # Obsolete; use --without-fp.
-    with_fp=no ;;
-
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c)
-    no_create=yes ;;
-
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
-    no_recursion=yes ;;
-
-  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
-  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
-  | --oldin | --oldi | --old | --ol | --o)
-    ac_prev=oldincludedir ;;
-  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
-  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
-  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
-    oldincludedir="$ac_optarg" ;;
-
-  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-    ac_prev=prefix ;;
-  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-    prefix="$ac_optarg" ;;
-
-  -program-prefix | --program-prefix | --program-prefi | --program-pref \
-  | --program-pre | --program-pr | --program-p)
-    ac_prev=program_prefix ;;
-  -program-prefix=* | --program-prefix=* | --program-prefi=* \
-  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
-    program_prefix="$ac_optarg" ;;
-
-  -program-suffix | --program-suffix | --program-suffi | --program-suff \
-  | --program-suf | --program-su | --program-s)
-    ac_prev=program_suffix ;;
-  -program-suffix=* | --program-suffix=* | --program-suffi=* \
-  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
-    program_suffix="$ac_optarg" ;;
-
-  -program-transform-name | --program-transform-name \
-  | --program-transform-nam | --program-transform-na \
-  | --program-transform-n | --program-transform- \
-  | --program-transform | --program-transfor \
-  | --program-transfo | --program-transf \
-  | --program-trans | --program-tran \
-  | --progr-tra | --program-tr | --program-t)
-    ac_prev=program_transform_name ;;
-  -program-transform-name=* | --program-transform-name=* \
-  | --program-transform-nam=* | --program-transform-na=* \
-  | --program-transform-n=* | --program-transform-=* \
-  | --program-transform=* | --program-transfor=* \
-  | --program-transfo=* | --program-transf=* \
-  | --program-trans=* | --program-tran=* \
-  | --progr-tra=* | --program-tr=* | --program-t=*)
-    program_transform_name="$ac_optarg" ;;
-
-  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
-  | -silent | --silent | --silen | --sile | --sil)
-    silent=yes ;;
-
-  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
-    ac_prev=sbindir ;;
-  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
-  | --sbi=* | --sb=*)
-    sbindir="$ac_optarg" ;;
-
-  -sharedstatedir | --sharedstatedir | --sharedstatedi \
-  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
-  | --sharedst | --shareds | --shared | --share | --shar \
-  | --sha | --sh)
-    ac_prev=sharedstatedir ;;
-  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
-  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
-  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
-  | --sha=* | --sh=*)
-    sharedstatedir="$ac_optarg" ;;
-
-  -site | --site | --sit)
-    ac_prev=site ;;
-  -site=* | --site=* | --sit=*)
-    site="$ac_optarg" ;;
-
-  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
-    ac_prev=srcdir ;;
-  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
-    srcdir="$ac_optarg" ;;
-
-  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
-  | --syscon | --sysco | --sysc | --sys | --sy)
-    ac_prev=sysconfdir ;;
-  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
-  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
-    sysconfdir="$ac_optarg" ;;
-
-  -target | --target | --targe | --targ | --tar | --ta | --t)
-    ac_prev=target ;;
-  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
-    target="$ac_optarg" ;;
-
-  -v | -verbose | --verbose | --verbos | --verbo | --verb)
-    verbose=yes ;;
-
-  -version | --version | --versio | --versi | --vers)
-    echo "configure generated by autoconf version 2.12"
-    exit 0 ;;
-
-  -with-* | --with-*)
-    ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    case "$ac_option" in
-      *=*) ;;
-      *) ac_optarg=yes ;;
-    esac
-    eval "with_${ac_package}='$ac_optarg'" ;;
-
-  -without-* | --without-*)
-    ac_package=`echo $ac_option|sed -e 's/-*without-//'`
-    # Reject names that are not valid shell variable names.
-    if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
-      { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
-    fi
-    ac_package=`echo $ac_package| sed 's/-/_/g'`
-    eval "with_${ac_package}=no" ;;
-
-  --x)
-    # Obsolete; use --with-x.
-    with_x=yes ;;
-
-  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
-  | --x-incl | --x-inc | --x-in | --x-i)
-    ac_prev=x_includes ;;
-  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
-  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
-    x_includes="$ac_optarg" ;;
-
-  -x-libraries | --x-libraries | --x-librarie | --x-librari \
-  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
-    ac_prev=x_libraries ;;
-  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
-  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
-    x_libraries="$ac_optarg" ;;
-
-  -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
-    ;;
-
-  *)
-    if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
-      echo "configure: warning: $ac_option: invalid host type" 1>&2
-    fi
-    if test "x$nonopt" != xNONE; then
-      { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
-    fi
-    nonopt="$ac_option"
-    ;;
-
-  esac
-done
-
-if test -n "$ac_prev"; then
-  { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
-fi
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
-  exec 6>/dev/null
-else
-  exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
-
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
-do
-  case "$ac_arg" in
-  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
-  | --no-cr | --no-c) ;;
-  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
-  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
-  *" "*|*"     "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
-  ac_configure_args="$ac_configure_args '$ac_arg'" ;;
-  *) ac_configure_args="$ac_configure_args $ac_arg" ;;
-  esac
-done
-
-# NLS nuisances.
-# Only set these to C if already set.  These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}"   = set; then LANG=C;   export LANG;   fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}"    = set; then LC_CTYPE=C;    export LC_CTYPE;    fi
-
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=popt.h
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  ac_srcdir_defaulted=yes
-  # Try the directory containing this script, then its parent.
-  ac_prog=$0
-  ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
-  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
-  srcdir=$ac_confdir
-  if test ! -r $srcdir/$ac_unique_file; then
-    srcdir=..
-  fi
-else
-  ac_srcdir_defaulted=no
-fi
-if test ! -r $srcdir/$ac_unique_file; then
-  if test "$ac_srcdir_defaulted" = yes; then
-    { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
-  else
-    { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
-  fi
-fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
-
-# Prefer explicitly selected file to automatically selected ones.
-if test -z "$CONFIG_SITE"; then
-  if test "x$prefix" != xNONE; then
-    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
-  else
-    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
-  fi
-fi
-for ac_site_file in $CONFIG_SITE; do
-  if test -r "$ac_site_file"; then
-    echo "loading site script $ac_site_file"
-    . "$ac_site_file"
-  fi
-done
-
-if test -r "$cache_file"; then
-  echo "loading cache $cache_file"
-  . $cache_file
-else
-  echo "creating cache $cache_file"
-  > $cache_file
-fi
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
-  # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
-  if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
-    ac_n= ac_c='
-' ac_t='       '
-  else
-    ac_n=-n ac_c= ac_t=
-  fi
-else
-  ac_n= ac_c='\c' ac_t=
-fi
-
-
-ac_aux_dir=
-for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
-  if test -f $ac_dir/install-sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install-sh -c"
-    break
-  elif test -f $ac_dir/install.sh; then
-    ac_aux_dir=$ac_dir
-    ac_install_sh="$ac_aux_dir/install.sh -c"
-    break
-  fi
-done
-if test -z "$ac_aux_dir"; then
-  { echo "configure: error: can not find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." 1>&2; exit 1; }
-fi
-ac_config_guess=$ac_aux_dir/config.guess
-ac_config_sub=$ac_aux_dir/config.sub
-ac_configure=$ac_aux_dir/configure # This should be Cygnus configure.
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:552: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS=        }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      for ac_prog in ginstall installbsd scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-         if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-           # AIX install.  It has an incompatible calling convention.
-           # OSF/1 installbsd also uses dspmsg, but is usable.
-           :
-         else
-           ac_cv_path_install="$ac_dir/$ac_prog -c"
-           break 2
-         fi
-       fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL_PROGRAM}'
-
-echo $ac_n "checking whether build environment is sane""... $ac_c" 1>&6
-echo "configure:605: checking whether build environment is sane" >&5
-# Just in case
-sleep 1
-echo timestamp > conftestfile
-# Do `set' in a subshell so we don't clobber the current shell's
-# arguments.  Must try -L first in case configure is actually a
-# symlink; some systems play weird games with the mod time of symlinks
-# (eg FreeBSD returns the mod time of the symlink's containing
-# directory).
-if (
-   set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null`
-   if test "$*" = "X"; then
-      # -L didn't work.
-      set X `ls -t $srcdir/configure conftestfile`
-   fi
-   if test "$*" != "X $srcdir/configure conftestfile" \
-      && test "$*" != "X conftestfile $srcdir/configure"; then
-
-      # If neither matched, then we have a broken ls.  This can happen
-      # if, for instance, CONFIG_SHELL is bash and it inherits a
-      # broken ls alias from the environment.  This has actually
-      # happened.  Such a system could not be considered "sane".
-      { echo "configure: error: ls -t appears to fail.  Make sure there is not a broken
-alias in your environment" 1>&2; exit 1; }
-   fi
-
-   test "$2" = conftestfile
-   )
-then
-   # Ok.
-   :
-else
-   { echo "configure: error: newly created file is older than distributed files!
-Check your system clock" 1>&2; exit 1; }
-fi
-rm -f conftest*
-echo "$ac_t""yes" 1>&6
-if test "$program_transform_name" = s,x,x,; then
-  program_transform_name=
-else
-  # Double any \ or $.  echo might interpret backslashes.
-  cat <<\EOF_SED > conftestsed
-s,\\,\\\\,g; s,\$,$$,g
-EOF_SED
-  program_transform_name="`echo $program_transform_name|sed -f conftestsed`"
-  rm -f conftestsed
-fi
-test "$program_prefix" != NONE &&
-  program_transform_name="s,^,${program_prefix},; $program_transform_name"
-# Use a double $ so make ignores it.
-test "$program_suffix" != NONE &&
-  program_transform_name="s,\$\$,${program_suffix},; $program_transform_name"
-
-# sed with no file args requires a program.
-test "$program_transform_name" = "" && program_transform_name="s,x,x,"
-
-echo $ac_n "checking whether ${MAKE-make} sets \${MAKE}""... $ac_c" 1>&6
-echo "configure:662: checking whether ${MAKE-make} sets \${MAKE}" >&5
-set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_prog_make_${ac_make}_set'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftestmake <<\EOF
-all:
-       @echo 'ac_maketemp="${MAKE}"'
-EOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
-eval `${MAKE-make} -f conftestmake 2>/dev/null | grep temp=`
-if test -n "$ac_maketemp"; then
-  eval ac_cv_prog_make_${ac_make}_set=yes
-else
-  eval ac_cv_prog_make_${ac_make}_set=no
-fi
-rm -f conftestmake
-fi
-if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  SET_MAKE=
-else
-  echo "$ac_t""no" 1>&6
-  SET_MAKE="MAKE=${MAKE-make}"
-fi
-
-
-PACKAGE=popt
-
-VERSION=1.2
-
-if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then
-  { echo "configure: error: source directory already configured; run "make distclean" there first" 1>&2; exit 1; }
-fi
-cat >> confdefs.h <<EOF
-#define PACKAGE "$PACKAGE"
-EOF
-
-cat >> confdefs.h <<EOF
-#define VERSION "$VERSION"
-EOF
-
-
-
-missing_dir=`cd $ac_aux_dir && pwd`
-echo $ac_n "checking for working aclocal""... $ac_c" 1>&6
-echo "configure:708: checking for working aclocal" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (aclocal --version) < /dev/null > /dev/null 2>&1; then
-   ACLOCAL=aclocal
-   echo "$ac_t""found" 1>&6
-else
-   ACLOCAL="$missing_dir/missing aclocal"
-   echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoconf""... $ac_c" 1>&6
-echo "configure:721: checking for working autoconf" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (autoconf --version) < /dev/null > /dev/null 2>&1; then
-   AUTOCONF=autoconf
-   echo "$ac_t""found" 1>&6
-else
-   AUTOCONF="$missing_dir/missing autoconf"
-   echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working automake""... $ac_c" 1>&6
-echo "configure:734: checking for working automake" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (automake --version) < /dev/null > /dev/null 2>&1; then
-   AUTOMAKE=automake
-   echo "$ac_t""found" 1>&6
-else
-   AUTOMAKE="$missing_dir/missing automake"
-   echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working autoheader""... $ac_c" 1>&6
-echo "configure:747: checking for working autoheader" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (autoheader --version) < /dev/null > /dev/null 2>&1; then
-   AUTOHEADER=autoheader
-   echo "$ac_t""found" 1>&6
-else
-   AUTOHEADER="$missing_dir/missing autoheader"
-   echo "$ac_t""missing" 1>&6
-fi
-
-echo $ac_n "checking for working makeinfo""... $ac_c" 1>&6
-echo "configure:760: checking for working makeinfo" >&5
-# Run test in a subshell; some versions of sh will print an error if
-# an executable is not found, even if stderr is redirected.
-# Redirect stdin to placate older versions of autoconf.  Sigh.
-if (makeinfo --version) < /dev/null > /dev/null 2>&1; then
-   MAKEINFO=makeinfo
-   echo "$ac_t""found" 1>&6
-else
-   MAKEINFO="$missing_dir/missing makeinfo"
-   echo "$ac_t""missing" 1>&6
-fi
-
-
-
-
-
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:780: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_CC="gcc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-if test -z "$CC"; then
-  # Extract the first word of "cc", so it can be a program name with args.
-set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:809: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$CC"; then
-  ac_cv_prog_CC="$CC" # Let the user override the test.
-else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  ac_prog_rejected=no
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
-        ac_prog_rejected=yes
-       continue
-      fi
-      ac_cv_prog_CC="cc"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-if test $ac_prog_rejected = yes; then
-  # We found a bogon in the path, so make sure we never use it.
-  set dummy $ac_cv_prog_CC
-  shift
-  if test $# -gt 0; then
-    # We chose a different compiler from the bogus one.
-    # However, it has the same basename, so the bogon will be chosen
-    # first if we set CC to just the basename; use the full file name.
-    shift
-    set dummy "$ac_dir/$ac_word" "$@"
-    shift
-    ac_cv_prog_CC="$@"
-  fi
-fi
-fi
-fi
-CC="$ac_cv_prog_CC"
-if test -n "$CC"; then
-  echo "$ac_t""$CC" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-  test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
-fi
-
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:857: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
-
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-cat > conftest.$ac_ext <<EOF
-#line 867 "configure"
-#include "confdefs.h"
-main(){return(0);}
-EOF
-if { (eval echo configure:871: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  ac_cv_prog_cc_works=yes
-  # If we can't run a trivial program, we are probably using a cross compiler.
-  if (./conftest; exit) 2>/dev/null; then
-    ac_cv_prog_cc_cross=no
-  else
-    ac_cv_prog_cc_cross=yes
-  fi
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  ac_cv_prog_cc_works=no
-fi
-rm -fr conftest*
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
-  { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:891: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:896: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.c <<EOF
-#ifdef __GNUC__
-  yes;
-#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:905: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
-  ac_cv_prog_gcc=yes
-else
-  ac_cv_prog_gcc=no
-fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-  GCC=yes
-  ac_test_CFLAGS="${CFLAGS+set}"
-  ac_save_CFLAGS="$CFLAGS"
-  CFLAGS=
-  echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:920: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
-  ac_cv_prog_cc_g=yes
-else
-  ac_cv_prog_cc_g=no
-fi
-rm -f conftest*
-
-fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
-  if test "$ac_test_CFLAGS" = set; then
-    CFLAGS="$ac_save_CFLAGS"
-  elif test $ac_cv_prog_cc_g = yes; then
-    CFLAGS="-g -O2"
-  else
-    CFLAGS="-O2"
-  fi
-else
-  GCC=
-  test "${CFLAGS+set}" = set || CFLAGS="-g"
-fi
-
-echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
-echo "configure:948: checking how to run the C preprocessor" >&5
-# On Suns, sometimes $CPP names a directory.
-if test -n "$CPP" && test -d "$CPP"; then
-  CPP=
-fi
-if test -z "$CPP"; then
-if eval "test \"`echo '$''{'ac_cv_prog_CPP'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    # This must be in double quotes, not single quotes, because CPP may get
-  # substituted into the Makefile and "${CC-cc}" will confuse make.
-  CPP="${CC-cc} -E"
-  # On the NeXT, cc -E runs the code through the compiler's parser,
-  # not just through cpp.
-  cat > conftest.$ac_ext <<EOF
-#line 963 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:969: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP="${CC-cc} -E -traditional-cpp"
-  cat > conftest.$ac_ext <<EOF
-#line 980 "configure"
-#include "confdefs.h"
-#include <assert.h>
-Syntax Error
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:986: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  :
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-rm -f conftest*
-  ac_cv_prog_CPP="$CPP"
-fi
-  CPP="$ac_cv_prog_CPP"
-else
-  ac_cv_prog_CPP="$CPP"
-fi
-echo "$ac_t""$CPP" 1>&6
-
-if test $ac_cv_prog_gcc = yes; then
-    echo $ac_n "checking whether ${CC-cc} needs -traditional""... $ac_c" 1>&6
-echo "configure:1010: checking whether ${CC-cc} needs -traditional" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc_traditional'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    ac_pattern="Autoconf.*'x'"
-  cat > conftest.$ac_ext <<EOF
-#line 1016 "configure"
-#include "confdefs.h"
-#include <sgtty.h>
-Autoconf TIOCGETP
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "$ac_pattern" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_prog_gcc_traditional=yes
-else
-  rm -rf conftest*
-  ac_cv_prog_gcc_traditional=no
-fi
-rm -f conftest*
-
-
-  if test $ac_cv_prog_gcc_traditional = no; then
-    cat > conftest.$ac_ext <<EOF
-#line 1034 "configure"
-#include "confdefs.h"
-#include <termio.h>
-Autoconf TCGETA
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "$ac_pattern" >/dev/null 2>&1; then
-  rm -rf conftest*
-  ac_cv_prog_gcc_traditional=yes
-fi
-rm -f conftest*
-
-  fi
-fi
-
-echo "$ac_t""$ac_cv_prog_gcc_traditional" 1>&6
-  if test $ac_cv_prog_gcc_traditional = yes; then
-    CC="$CC -traditional"
-  fi
-fi
-
-
-
-
-echo $ac_n "checking for ${CC-cc} option to accept ANSI C""... $ac_c" 1>&6
-echo "configure:1059: checking for ${CC-cc} option to accept ANSI C" >&5
-if eval "test \"`echo '$''{'am_cv_prog_cc_stdc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  am_cv_prog_cc_stdc=no
-ac_save_CC="$CC"
-# Don't try gcc -ansi; that turns off useful extensions and
-# breaks some systems' header files.
-# AIX                  -qlanglvl=ansi
-# Ultrix and OSF/1     -std1
-# HP-UX                        -Aa -D_HPUX_SOURCE
-# SVR4                 -Xc -D__EXTENSIONS__
-for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
-do
-  CC="$ac_save_CC $ac_arg"
-  cat > conftest.$ac_ext <<EOF
-#line 1075 "configure"
-#include "confdefs.h"
-#include <stdarg.h>
-#include <stdio.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
-struct buf { int x; };
-FILE * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
-     char **p;
-     int i;
-{
-  return p[i];
-}
-static char *f (char * (*g) (char **, int), char **p, ...)
-{
-  char *s;
-  va_list v;
-  va_start (v,p);
-  s = g (p, va_arg (v,int));
-  va_end (v);
-  return s;
-}
-int test (int i, double x);
-struct s1 {int (*f) (int a);};
-struct s2 {int (*f) (double a);};
-int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
-int argc;
-char **argv;
-
-int main() {
-
-return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
-
-; return 0; }
-EOF
-if { (eval echo configure:1112: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
-  rm -rf conftest*
-  am_cv_prog_cc_stdc="$ac_arg"; break
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-fi
-rm -f conftest*
-done
-CC="$ac_save_CC"
-
-fi
-
-if test -z "$am_cv_prog_cc_stdc"; then
-  echo "$ac_t""none needed" 1>&6
-else
-  echo "$ac_t""$am_cv_prog_cc_stdc" 1>&6
-fi
-case "x$am_cv_prog_cc_stdc" in
-  x|xno) ;;
-  *) CC="$CC $am_cv_prog_cc_stdc" ;;
-esac
-
-
-
-echo $ac_n "checking for function prototypes""... $ac_c" 1>&6
-echo "configure:1138: checking for function prototypes" >&5
-if test "$am_cv_prog_cc_stdc" != no; then
-  echo "$ac_t""yes" 1>&6
-  cat >> confdefs.h <<\EOF
-#define PROTOTYPES 1
-EOF
-
-  U= ANSI2KNR=
-else
-  echo "$ac_t""no" 1>&6
-  U=_ ANSI2KNR=./ansi2knr
-  # Ensure some checks needed by ansi2knr itself.
-  echo $ac_n "checking for ANSI C header files""... $ac_c" 1>&6
-echo "configure:1151: checking for ANSI C header files" >&5
-if eval "test \"`echo '$''{'ac_cv_header_stdc'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1156 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-#include <stdarg.h>
-#include <string.h>
-#include <float.h>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1164: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  ac_cv_header_stdc=yes
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-if test $ac_cv_header_stdc = yes; then
-  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1181 "configure"
-#include "confdefs.h"
-#include <string.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "memchr" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
-cat > conftest.$ac_ext <<EOF
-#line 1199 "configure"
-#include "confdefs.h"
-#include <stdlib.h>
-EOF
-if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
-  egrep "free" >/dev/null 2>&1; then
-  :
-else
-  rm -rf conftest*
-  ac_cv_header_stdc=no
-fi
-rm -f conftest*
-
-fi
-
-if test $ac_cv_header_stdc = yes; then
-  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
-if test "$cross_compiling" = yes; then
-  :
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1220 "configure"
-#include "confdefs.h"
-#include <ctype.h>
-#define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
-#define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
-#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
-int main () { int i; for (i = 0; i < 256; i++)
-if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2);
-exit (0); }
-
-EOF
-if { (eval echo configure:1231: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest && (./conftest; exit) 2>/dev/null
-then
-  :
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -fr conftest*
-  ac_cv_header_stdc=no
-fi
-rm -fr conftest*
-fi
-
-fi
-fi
-
-echo "$ac_t""$ac_cv_header_stdc" 1>&6
-if test $ac_cv_header_stdc = yes; then
-  cat >> confdefs.h <<\EOF
-#define STDC_HEADERS 1
-EOF
-
-fi
-
-  for ac_hdr in string.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1258: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1263 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1268: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-fi
-
-
-# Extract the first word of "ranlib", so it can be a program name with args.
-set dummy ranlib; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:1300: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_RANLIB'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  if test -n "$RANLIB"; then
-  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
-else
-  IFS="${IFS=  }"; ac_save_ifs="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    test -z "$ac_dir" && ac_dir=.
-    if test -f $ac_dir/$ac_word; then
-      ac_cv_prog_RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$ac_save_ifs"
-  test -z "$ac_cv_prog_RANLIB" && ac_cv_prog_RANLIB=":"
-fi
-fi
-RANLIB="$ac_cv_prog_RANLIB"
-if test -n "$RANLIB"; then
-  echo "$ac_t""$RANLIB" 1>&6
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-# Find a good install program.  We prefer a C program (faster),
-# so one script is as good as another.  But avoid the broken or
-# incompatible versions:
-# SysV /etc/install, /usr/sbin/install
-# SunOS /usr/etc/install
-# IRIX /sbin/install
-# AIX /bin/install
-# AFS /usr/afsws/bin/install, which mishandles nonexistent args
-# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
-# ./install, which can be erroneously created by make from ./install.sh.
-echo $ac_n "checking for a BSD compatible install""... $ac_c" 1>&6
-echo "configure:1337: checking for a BSD compatible install" >&5
-if test -z "$INSTALL"; then
-if eval "test \"`echo '$''{'ac_cv_path_install'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-    IFS="${IFS=        }"; ac_save_IFS="$IFS"; IFS="${IFS}:"
-  for ac_dir in $PATH; do
-    # Account for people who put trailing slashes in PATH elements.
-    case "$ac_dir/" in
-    /|./|.//|/etc/*|/usr/sbin/*|/usr/etc/*|/sbin/*|/usr/afsws/bin/*|/usr/ucb/*) ;;
-    *)
-      # OSF1 and SCO ODT 3.0 have their own names for install.
-      for ac_prog in ginstall installbsd scoinst install; do
-        if test -f $ac_dir/$ac_prog; then
-         if test $ac_prog = install &&
-            grep dspmsg $ac_dir/$ac_prog >/dev/null 2>&1; then
-           # AIX install.  It has an incompatible calling convention.
-           # OSF/1 installbsd also uses dspmsg, but is usable.
-           :
-         else
-           ac_cv_path_install="$ac_dir/$ac_prog -c"
-           break 2
-         fi
-       fi
-      done
-      ;;
-    esac
-  done
-  IFS="$ac_save_IFS"
-
-fi
-  if test "${ac_cv_path_install+set}" = set; then
-    INSTALL="$ac_cv_path_install"
-  else
-    # As a last resort, use the slow shell script.  We don't cache a
-    # path for INSTALL within a source directory, because that will
-    # break other packages using the cache if that directory is
-    # removed, or if the path is relative.
-    INSTALL="$ac_install_sh"
-  fi
-fi
-echo "$ac_t""$INSTALL" 1>&6
-
-# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
-# It thinks the first close brace ends the variable substitution.
-test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
-
-test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
-
-
-if test $CC = gcc; then
-    CFLAGS="-Wall $CFLAGS"
-fi
-addlib() {
-  l=$1
-  shift
-  case "$target" in 
-    *-*-solaris*)      LIBS="$LIBS -L$l -R $l $*";;
-    *)         LIBS="$LIBS -L$l $*";;
-  esac
-}
-
-if test X"$GCC" = Xyes ; then
-    TARGET="depend allprogs"
-else
-    TARGET="everything"
-    #
-    # let the Makefile know that we're done with `depend', since we don't
-    # have gcc we're not going to rebuild our dependencies at all.
-    #
-    echo > .depend-done
-fi
-
-
-for ac_hdr in unistd.h alloca.h libintl.h
-do
-ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
-echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
-echo "configure:1415: checking for $ac_hdr" >&5
-if eval "test \"`echo '$''{'ac_cv_header_$ac_safe'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1420 "configure"
-#include "confdefs.h"
-#include <$ac_hdr>
-EOF
-ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
-{ (eval echo configure:1425: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
-ac_err=`grep -v '^ *+' conftest.out`
-if test -z "$ac_err"; then
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=yes"
-else
-  echo "$ac_err" >&5
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_header_$ac_safe=no"
-fi
-rm -f conftest*
-fi
-if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_hdr=HAVE_`echo $ac_hdr | sed 'y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_hdr 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-echo $ac_n "checking for /usr/ucblib in LIBS""... $ac_c" 1>&6
-echo "configure:1452: checking for /usr/ucblib in LIBS" >&5
-if test -d /usr/ucblib ; then
-       if test "$build" = "mips-sni-sysv4" ; then
-               addlib /usr/ccs/lib -lc
-       fi
-
-       addlib /usr/ucblib
-       
-       echo "$ac_t""yes" 1>&6
-else
-       echo "$ac_t""no" 1>&6
-fi
-
-for ac_func in strerror
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1468: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1473 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1496: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in gettext
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1523: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1528 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1551: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-for ac_func in dgettext
-do
-echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
-echo "configure:1578: checking for $ac_func" >&5
-if eval "test \"`echo '$''{'ac_cv_func_$ac_func'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1583 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char $ac_func(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char $ac_func();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
-choke me
-#else
-$ac_func();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1606: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_$ac_func=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'$ac_func`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-    ac_tr_func=HAVE_`echo $ac_func | tr 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
-  cat >> confdefs.h <<EOF
-#define $ac_tr_func 1
-EOF
-else
-  echo "$ac_t""no" 1>&6
-fi
-done
-
-echo $ac_n "checking for setreuid""... $ac_c" 1>&6
-echo "configure:1631: checking for setreuid" >&5
-if eval "test \"`echo '$''{'ac_cv_func_setreuid'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  cat > conftest.$ac_ext <<EOF
-#line 1636 "configure"
-#include "confdefs.h"
-/* System header to define __stub macros and hopefully few prototypes,
-    which can conflict with char setreuid(); below.  */
-#include <assert.h>
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char setreuid();
-
-int main() {
-
-/* The GNU C library defines this for functions which it implements
-    to always fail with ENOSYS.  Some functions are actually named
-    something starting with __ and the normal name is an alias.  */
-#if defined (__stub_setreuid) || defined (__stub___setreuid)
-choke me
-#else
-setreuid();
-#endif
-
-; return 0; }
-EOF
-if { (eval echo configure:1659: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_func_setreuid=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_func_setreuid=no"
-fi
-rm -f conftest*
-fi
-
-if eval "test \"`echo '$ac_cv_func_'setreuid`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  :
-else
-  echo "$ac_t""no" 1>&6
-
-    echo $ac_n "checking for setreuid in -lucb""... $ac_c" 1>&6
-echo "configure:1678: checking for setreuid in -lucb" >&5
-ac_lib_var=`echo ucb'_'setreuid | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
-  echo $ac_n "(cached) $ac_c" 1>&6
-else
-  ac_save_LIBS="$LIBS"
-LIBS="-lucb  $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 1686 "configure"
-#include "confdefs.h"
-/* Override any gcc2 internal prototype to avoid an error.  */
-/* We use char because int might match the return type of a gcc2
-    builtin and then its argument prototype would still apply.  */
-char setreuid();
-
-int main() {
-setreuid()
-; return 0; }
-EOF
-if { (eval echo configure:1697: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=yes"
-else
-  echo "configure: failed program was:" >&5
-  cat conftest.$ac_ext >&5
-  rm -rf conftest*
-  eval "ac_cv_lib_$ac_lib_var=no"
-fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
-fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
-  echo "$ac_t""yes" 1>&6
-  if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi
-else
-  echo "$ac_t""no" 1>&6
-fi
-
-
-fi
-
-
-trap '' 1 2 15
-cat > confcache <<\EOF
-# This file is a shell script that caches the results of configure
-# tests run on this system so they can be shared between configure
-# scripts and configure runs.  It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
-#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already.  You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
-#
-EOF
-# The following way of writing the cache mishandles newlines in values,
-# but we know of no workaround that is simple, portable, and efficient.
-# So, don't put newlines in cache variables' values.
-# Ultrix sh set writes to stderr and can't be redirected directly,
-# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
-  case `(ac_space=' '; set) 2>&1` in
-  *ac_space=\ *)
-    # `set' does not quote correctly, so add quotes (double-quote substitution
-    # turns \\\\ into \\, and sed turns \\ into \).
-    sed -n \
-      -e "s/'/'\\\\''/g" \
-      -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
-    ;;
-  *)
-    # `set' quotes correctly as required by POSIX, so do not add quotes.
-    sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
-    ;;
-  esac >> confcache
-if cmp -s $cache_file confcache; then
-  :
-else
-  if test -w $cache_file; then
-    echo "updating cache $cache_file"
-    cat confcache > $cache_file
-  else
-    echo "not updating unwritable cache $cache_file"
-  fi
-fi
-rm -f confcache
-
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-test "x$prefix" = xNONE && prefix=$ac_default_prefix
-# Let make expand exec_prefix.
-test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
-if test "x$srcdir" = x.; then
-  ac_vpsub='/^[        ]*VPATH[        ]*=[^:]*$/d'
-fi
-
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
-DEFS=-DHAVE_CONFIG_H
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
-
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
-# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
-
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
-  case "\$ac_option" in
-  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
-    exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
-  -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
-    echo "$CONFIG_STATUS generated by autoconf version 2.12"
-    exit 0 ;;
-  -help | --help | --hel | --he | --h)
-    echo "\$ac_cs_usage"; exit 0 ;;
-  *) echo "\$ac_cs_usage"; exit 1 ;;
-  esac
-done
-
-ac_given_srcdir=$srcdir
-ac_given_INSTALL="$INSTALL"
-
-trap 'rm -fr `echo "Makefile  po/Makefile.in config.h" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@INSTALL_SCRIPT@%$INSTALL_SCRIPT%g
-s%@PACKAGE@%$PACKAGE%g
-s%@VERSION@%$VERSION%g
-s%@ACLOCAL@%$ACLOCAL%g
-s%@AUTOCONF@%$AUTOCONF%g
-s%@AUTOMAKE@%$AUTOMAKE%g
-s%@AUTOHEADER@%$AUTOHEADER%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SET_MAKE@%$SET_MAKE%g
-s%@CC@%$CC%g
-s%@CPP@%$CPP%g
-s%@U@%$U%g
-s%@ANSI2KNR@%$ANSI2KNR%g
-s%@RANLIB@%$RANLIB%g
-s%@TARGET@%$TARGET%g
-
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
-  if test $ac_beg -gt 1; then
-    sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
-  else
-    sed "${ac_end}q" conftest.subs > conftest.s$ac_file
-  fi
-  if test ! -s conftest.s$ac_file; then
-    ac_more_lines=false
-    rm -f conftest.s$ac_file
-  else
-    if test -z "$ac_sed_cmds"; then
-      ac_sed_cmds="sed -f conftest.s$ac_file"
-    else
-      ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
-    fi
-    ac_file=`expr $ac_file + 1`
-    ac_beg=$ac_end
-    ac_end=`expr $ac_end + $ac_max_sed_cmds`
-  fi
-done
-if test -z "$ac_sed_cmds"; then
-  ac_sed_cmds=cat
-fi
-EOF
-
-cat >> $CONFIG_STATUS <<EOF
-
-CONFIG_FILES=\${CONFIG_FILES-"Makefile  po/Makefile.in"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
-
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-    # The file is in a subdirectory.
-    test ! -d "$ac_dir" && mkdir "$ac_dir"
-    ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
-    # A "../" for each directory in $ac_dir_suffix.
-    ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
-  else
-    ac_dir_suffix= ac_dots=
-  fi
-
-  case "$ac_given_srcdir" in
-  .)  srcdir=.
-      if test -z "$ac_dots"; then top_srcdir=.
-      else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
-  /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
-  *) # Relative path.
-    srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
-    top_srcdir="$ac_dots$ac_given_srcdir" ;;
-  esac
-
-  case "$ac_given_INSTALL" in
-  [/$]*) INSTALL="$ac_given_INSTALL" ;;
-  *) INSTALL="$ac_dots$ac_given_INSTALL" ;;
-  esac
-
-  echo creating "$ac_file"
-  rm -f "$ac_file"
-  configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
-  case "$ac_file" in
-  *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
-  *) ac_comsub= ;;
-  esac
-
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-s%@INSTALL@%$INSTALL%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-
-# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
-# NAME is the cpp macro being defined and VALUE is the value it is being given.
-#
-# ac_d sets the value in "#define NAME VALUE" lines.
-ac_dA='s%^\([  ]*\)#\([        ]*define[       ][      ]*\)'
-ac_dB='\([     ][      ]*\)[^  ]*%\1#\2'
-ac_dC='\3'
-ac_dD='%g'
-# ac_u turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
-ac_uA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
-ac_uB='\([     ]\)%\1#\2define\3'
-ac_uC=' '
-ac_uD='\4%g'
-# ac_e turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
-ac_eA='s%^\([  ]*\)#\([        ]*\)undef\([    ][      ]*\)'
-ac_eB='$%\1#\2define\3'
-ac_eC=' '
-ac_eD='%g'
-
-if test "${CONFIG_HEADERS+set}" != set; then
-EOF
-cat >> $CONFIG_STATUS <<EOF
-  CONFIG_HEADERS="config.h"
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-fi
-for ac_file in .. $CONFIG_HEADERS; do if test "x$ac_file" != x..; then
-  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
-  case "$ac_file" in
-  *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
-       ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
-  *) ac_file_in="${ac_file}.in" ;;
-  esac
-
-  echo creating $ac_file
-
-  rm -f conftest.frag conftest.in conftest.out
-  ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
-  cat $ac_file_inputs > conftest.in
-
-EOF
-
-# Transform confdefs.h into a sed script conftest.vals that substitutes
-# the proper values into config.h.in to produce config.h.  And first:
-# Protect against being on the right side of a sed subst in config.status.
-# Protect against being in an unquoted here document in config.status.
-rm -f conftest.vals
-cat > conftest.hdr <<\EOF
-s/[\\&%]/\\&/g
-s%[\\$`]%\\&%g
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD}%gp
-s%ac_d%ac_u%gp
-s%ac_u%ac_e%gp
-EOF
-sed -n -f conftest.hdr confdefs.h > conftest.vals
-rm -f conftest.hdr
-
-# This sed command replaces #undef with comments.  This is necessary, for
-# example, in the case of _POSIX_SOURCE, which is predefined and required
-# on some systems where configure will not decide to define it.
-cat >> conftest.vals <<\EOF
-s%^[   ]*#[    ]*undef[        ][      ]*[a-zA-Z_][a-zA-Z_0-9]*%/* & */%
-EOF
-
-# Break up conftest.vals because some shells have a limit on
-# the size of here documents, and old seds have small limits too.
-
-rm -f conftest.tail
-while :
-do
-  ac_lines=`grep -c . conftest.vals`
-  # grep -c gives empty output for an empty file on some AIX systems.
-  if test -z "$ac_lines" || test "$ac_lines" -eq 0; then break; fi
-  # Write a limited-size here document to conftest.frag.
-  echo '  cat > conftest.frag <<CEOF' >> $CONFIG_STATUS
-  sed ${ac_max_here_lines}q conftest.vals >> $CONFIG_STATUS
-  echo 'CEOF
-  sed -f conftest.frag conftest.in > conftest.out
-  rm -f conftest.in
-  mv conftest.out conftest.in
-' >> $CONFIG_STATUS
-  sed 1,${ac_max_here_lines}d conftest.vals > conftest.tail
-  rm -f conftest.vals
-  mv conftest.tail conftest.vals
-done
-rm -f conftest.vals
-
-cat >> $CONFIG_STATUS <<\EOF
-  rm -f conftest.frag conftest.h
-  echo "/* $ac_file.  Generated automatically by configure.  */" > conftest.h
-  cat conftest.in >> conftest.h
-  rm -f conftest.in
-  if cmp -s $ac_file conftest.h 2>/dev/null; then
-    echo "$ac_file is unchanged"
-    rm -f conftest.h
-  else
-    # Remove last slash and all that follows it.  Not all systems have dirname.
-      ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
-      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
-      # The file is in a subdirectory.
-      test ! -d "$ac_dir" && mkdir "$ac_dir"
-    fi
-    rm -f $ac_file
-    mv conftest.h $ac_file
-  fi
-fi; done
-
-EOF
-cat >> $CONFIG_STATUS <<EOF
-
-
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h
-sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
-exit 0
-EOF
-chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
-
diff --git a/popt-1.2/configure.in b/popt-1.2/configure.in
deleted file mode 100755 (executable)
index 0b0d0a8..0000000
+++ /dev/null
@@ -1,63 +0,0 @@
-AC_INIT(popt.h)
-AM_INIT_AUTOMAKE(popt, 1.2)
-AM_CONFIG_HEADER(config.h)
-
-AC_PROG_CC
-AC_GCC_TRADITIONAL
-AM_C_PROTOTYPES
-
-AC_PROG_RANLIB
-AC_PROG_INSTALL
-
-if test $CC = gcc; then
-    CFLAGS="-Wall $CFLAGS"
-fi
-addlib() {
-  l=$1
-  shift
-  case "$target" in 
-    *-*-solaris*)      LIBS="$LIBS -L$l -R $l $*";;
-    *)         LIBS="$LIBS -L$l $*";;
-  esac
-}
-
-dnl
-dnl if CC is gcc, we can rebuild the dependencies (since the depend rule
-dnl requires gcc).  If it's not, don't rebuild dependencies -- use what was
-dnl shipped with RPM.
-dnl
-if test X"$GCC" = Xyes ; then
-    TARGET="depend allprogs"
-else
-    TARGET="everything"
-    #
-    # let the Makefile know that we're done with `depend', since we don't
-    # have gcc we're not going to rebuild our dependencies at all.
-    #
-    echo > .depend-done
-fi
-AC_SUBST(TARGET)
-
-AC_CHECK_HEADERS(unistd.h alloca.h libintl.h)
-AC_MSG_CHECKING(for /usr/ucblib in LIBS)
-if test -d /usr/ucblib ; then
-       if test "$build" = "mips-sni-sysv4" ; then
-               addlib /usr/ccs/lib -lc
-       fi
-
-       addlib /usr/ucblib
-       
-       AC_MSG_RESULT(yes)
-else
-       AC_MSG_RESULT(no)
-fi
-
-AC_CHECK_FUNCS(strerror)
-AC_CHECK_FUNCS(gettext)
-AC_CHECK_FUNCS(dgettext)
-AC_CHECK_FUNC(setreuid, [], [
-    AC_CHECK_LIB(ucb, setreuid, [if echo $LIBS | grep -- -lucb >/dev/null ;then :; else LIBS="$LIBS -lc -lucb" USEUCB=y;fi])
-])
-
-AC_OUTPUT([Makefile  po/Makefile.in],
-       [sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile])
diff --git a/popt-1.2/install-sh b/popt-1.2/install-sh
deleted file mode 100755 (executable)
index 5871924..0000000
+++ /dev/null
@@ -1,238 +0,0 @@
-#! /bin/sh
-#
-# install - install a program, script, or datafile
-# This comes from X11R5.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-transformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-while [ x"$1" != x ]; do
-    case $1 in
-       -c) instcmd="$cpprog"
-           shift
-           continue;;
-
-       -d) dir_arg=true
-           shift
-           continue;;
-
-       -m) chmodcmd="$chmodprog $2"
-           shift
-           shift
-           continue;;
-
-       -o) chowncmd="$chownprog $2"
-           shift
-           shift
-           continue;;
-
-       -g) chgrpcmd="$chgrpprog $2"
-           shift
-           shift
-           continue;;
-
-       -s) stripcmd="$stripprog"
-           shift
-           continue;;
-
-       -t=*) transformarg=`echo $1 | sed 's/-t=//'`
-           shift
-           continue;;
-
-       -b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-           shift
-           continue;;
-
-       *)  if [ x"$src" = x ]
-           then
-               src=$1
-           else
-               # this colon is to work around a 386BSD /bin/sh bug
-               :
-               dst=$1
-           fi
-           shift
-           continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-       echo "install:  no input file specified"
-       exit 1
-else
-       true
-fi
-
-if [ x"$dir_arg" != x ]; then
-       dst=$src
-       src=""
-       
-       if [ -d $dst ]; then
-               instcmd=:
-       else
-               instcmd=mkdir
-       fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-       if [ -f $src -o -d $src ]
-       then
-               true
-       else
-               echo "install:  $src does not exist"
-               exit 1
-       fi
-       
-       if [ x"$dst" = x ]
-       then
-               echo "install:  no destination specified"
-               exit 1
-       else
-               true
-       fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-       if [ -d $dst ]
-       then
-               dst="$dst"/`basename $src`
-       else
-               true
-       fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='   
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-       pathcomp="${pathcomp}${1}"
-       shift
-
-       if [ ! -d "${pathcomp}" ] ;
-        then
-               $mkdirprog "${pathcomp}"
-       else
-               true
-       fi
-
-       pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-       $doit $instcmd $dst &&
-
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-       if [ x"$transformarg" = x ] 
-       then
-               dstfile=`basename $dst`
-       else
-               dstfile=`basename $dst $transformbasename | 
-                       sed $transformarg`$transformbasename
-       fi
-
-# don't allow the sed command to completely eliminate the filename
-
-       if [ x"$dstfile" = x ] 
-       then
-               dstfile=`basename $dst`
-       else
-               true
-       fi
-
-# Make a temp file name in the proper directory.
-
-       dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-       $doit $instcmd $src $dsttmp &&
-
-       trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-       if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-       if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-       if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-       if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
-       $doit $rmcmd -f $dstdir/$dstfile &&
-       $doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
-
-exit 0
diff --git a/popt-1.2/missing b/popt-1.2/missing
deleted file mode 100755 (executable)
index cbe2b0e..0000000
+++ /dev/null
@@ -1,188 +0,0 @@
-#! /bin/sh
-# Common stub for a few missing GNU programs while installing.
-# Copyright (C) 1996, 1997 Free Software Foundation, Inc.
-# Franc,ois Pinard <pinard@iro.umontreal.ca>, 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.
-
-if test $# -eq 0; then
-  echo 1>&2 "Try \`$0 --help' for more information"
-  exit 1
-fi
-
-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
-
-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
-  lex          create \`lex.yy.c', if possible, from existing .c
-  makeinfo     touch the output file
-  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
-    ;;
-
-  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
-    echo "missing - GNU libit 0.0"
-    ;;
-
-  -*)
-    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.in'.  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.in'.  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.in'.  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.in`
-    if test -z "$files"; then
-      files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^):]*\)).*/\1/p' configure.in`
-      test -z "$files" || files="$files.in"
-    else
-      files=`echo "$files" | sed -e 's/:/ /g'`
-    fi
-    test -z "$files" && files="config.h.in"
-    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.in'.
-         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$/touch \1.in/' \
-      | sh
-    ;;
-
-  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
-    ;;
-
-  makeinfo)
-    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
-    ;;
-
-  *)
-    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/popt-1.2/mkinstalldirs b/popt-1.2/mkinstalldirs
deleted file mode 100755 (executable)
index d0fd194..0000000
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
-# Created: 1993-05-16
-# Public domain
-
-# $Id$
-
-errstatus=0
-
-for file
-do
-   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-   shift
-
-   pathcomp=
-   for d
-   do
-     pathcomp="$pathcomp$d"
-     case "$pathcomp" in
-       -* ) pathcomp=./$pathcomp ;;
-     esac
-
-     if test ! -d "$pathcomp"; then
-        echo "mkdir $pathcomp" 1>&2
-
-        mkdir "$pathcomp" || lasterr=$?
-
-        if test ! -d "$pathcomp"; then
-         errstatus=$lasterr
-        fi
-     fi
-
-     pathcomp="$pathcomp/"
-   done
-done
-
-exit $errstatus
-
-# mkinstalldirs ends here
diff --git a/popt-1.2/po/.cvsignore b/popt-1.2/po/.cvsignore
deleted file mode 100644 (file)
index 8f58e9b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-Makefile
-Makefile.in
-POTFILES
-*.mo
diff --git a/popt-1.2/po/Makefile.in b/popt-1.2/po/Makefile.in
deleted file mode 100644 (file)
index 2f041d3..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-# Generated automatically from Makefile.in.in by configure.
-srcdir = .
-top_srcdir = ..
-
-INSTALL= /usr/bin/install -c
-INSTALL_PROGRAM= ${INSTALL}
-INSTALL_DATA= ${INSTALL} -m 644
-CC = gcc
-
-installprefix = $(DESTDIR)
-
-MSGMERGE = msgmerge
-
-NLSPACKAGE = popt
-
-LINGUAS = ro
-CATALOGS = $(addsuffix .mo, $(LINGUAS))
-
-POTFILES = \
-
-all: $(NLSPACKAGE).pot $(CATALOGS)
-
-$(NLSPACKAGE).pot: $(POTFILES)
-       xgettext --default-domain=$(NLSPACKAGE) \
-           --add-comments --keyword=_ --keyword=N_ $(POTFILES)
-       if cmp -s $(NLSPACKAGE).po $(NLSPACKAGE).pot; then \
-           rm -f $(NLSPACKAGE).po; \
-       else \
-           mv $(NLSPACKAGE).po $(NLSPACKAGE).pot; \
-       fi
-
-update-po: Makefile
-       @$(MAKE) $(NLSPACKAGE).pot
-       @catalogs='$(CATALOGS)'; \
-       for cat in $$catalogs; do \
-               lang=`echo $$cat | sed 's/.mo//'`; \
-               if $(MSGMERGE) $$lang.po $(NLSPACKAGE).pot > $$lang.pox ; then \
-                       echo "$(MSGMERGE) of $$lang succeeded" ; \
-                       mv $$lang.pox $$lang.po ; \
-               else \
-                       echo "$(MSGMERGE) of $$lang failed" ; \
-                       rm -f $$lang.pox ; \
-               fi \
-       done
-
-clean:
-       rm -f *mo $(NLSPACKAGE).pot
-
-distclean: clean
-       rm -f .depend Makefile
-
-depend:
-
-install:
-       for n in $(CATALOGS); do \
-           l=`basename $$n .mo`; \
-           $(INSTALL) -m 755 -d $(installprefix)/$(LOCALEDIR)/$$l; \
-           $(INSTALL) -m 755 -d $(installprefix)/$(LOCALEDIR)/$$l/LC_MESSAGES; \
-           $(INSTALL) -m 644 $$n $(installprefix)/$(LOCALEDIR)/$$l/LC_MESSAGES/rpm.mo; \
-       done
-
-check:
-
-POTFILES: POTFILES.in
-       ( if test 'x$(srcdir)' != 'x.'; then \
-           posrcprefix='$(top_srcdir)/'; \
-         else \
-           posrcprefix="../"; \
-         fi; \
-         sed -e '/^#/d' -e '/^[        ]*$$/d' \
-             -e "s@.*@ $$posrcprefix& \\\\@" \
-             -e '$$s/\(.*\) \\/\1/' < $(srcdir)/POTFILES.in > POTFILES )
-
-Makefile: Makefile.in.in ../config.status POTFILES
-       cd .. \
-         && CONFIG_FILES=po/$@.in CONFIG_HEADERS= \
-              $(SHELL) ./config.status
-
-%.mo: %.po
-       msgfmt -o $@ $<
diff --git a/popt-1.2/po/Makefile.in.in b/popt-1.2/po/Makefile.in.in
deleted file mode 100644 (file)
index 81bd73d..0000000
+++ /dev/null
@@ -1,80 +0,0 @@
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = $(srcdir)
-
-INSTALL= @INSTALL@
-INSTALL_PROGRAM= @INSTALL_PROGRAM@
-INSTALL_DATA= @INSTALL_DATA@
-CC = @CC@
-
-installprefix = $(DESTDIR)
-
-MSGMERGE = msgmerge
-
-NLSPACKAGE = @PACKAGE@
-
-LINGUAS = ro
-CATALOGS = $(addsuffix .mo, $(LINGUAS))
-
-POTFILES = \
-
-all: $(NLSPACKAGE).pot $(CATALOGS)
-
-$(NLSPACKAGE).pot: $(POTFILES)
-       xgettext --default-domain=$(NLSPACKAGE) \
-           --add-comments --keyword=_ --keyword=N_ $(POTFILES)
-       if cmp -s $(NLSPACKAGE).po $(NLSPACKAGE).pot; then \
-           rm -f $(NLSPACKAGE).po; \
-       else \
-           mv $(NLSPACKAGE).po $(NLSPACKAGE).pot; \
-       fi
-
-update-po: Makefile
-       @$(MAKE) $(NLSPACKAGE).pot
-       @catalogs='$(CATALOGS)'; \
-       for cat in $$catalogs; do \
-               lang=`echo $$cat | sed 's/.mo//'`; \
-               if $(MSGMERGE) $$lang.po $(NLSPACKAGE).pot > $$lang.pox ; then \
-                       echo "$(MSGMERGE) of $$lang succeeded" ; \
-                       mv $$lang.pox $$lang.po ; \
-               else \
-                       echo "$(MSGMERGE) of $$lang failed" ; \
-                       rm -f $$lang.pox ; \
-               fi \
-       done
-
-clean:
-       rm -f *mo $(NLSPACKAGE).pot
-
-distclean: clean
-       rm -f .depend Makefile
-
-depend:
-
-install:
-       for n in $(CATALOGS); do \
-           l=`basename $$n .mo`; \
-           $(INSTALL) -m 755 -d $(installprefix)/$(LOCALEDIR)/$$l; \
-           $(INSTALL) -m 755 -d $(installprefix)/$(LOCALEDIR)/$$l/LC_MESSAGES; \
-           $(INSTALL) -m 644 $$n $(installprefix)/$(LOCALEDIR)/$$l/LC_MESSAGES/rpm.mo; \
-       done
-
-check:
-
-POTFILES: POTFILES.in
-       ( if test 'x$(srcdir)' != 'x.'; then \
-           posrcprefix='$(top_srcdir)/'; \
-         else \
-           posrcprefix="../"; \
-         fi; \
-         sed -e '/^#/d' -e '/^[        ]*$$/d' \
-             -e "s@.*@ $$posrcprefix& \\\\@" \
-             -e '$$s/\(.*\) \\/\1/' < $(srcdir)/POTFILES.in > POTFILES )
-
-Makefile: Makefile.in.in ../config.status POTFILES
-       cd .. \
-         && CONFIG_FILES=po/$@.in CONFIG_HEADERS= \
-              $(SHELL) ./config.status
-
-%.mo: %.po
-       msgfmt -o $@ $<
diff --git a/popt-1.2/po/POTFILES b/popt-1.2/po/POTFILES
deleted file mode 100644 (file)
index 688bdcb..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-       ../findme.c \
-       ../popt.c \
-       ../poptconfig.c \
-       ../popthelp.c \
-       ../poptparse.c \
-       ../test1.c \
diff --git a/popt-1.2/po/POTFILES.in b/popt-1.2/po/POTFILES.in
deleted file mode 100644 (file)
index 4817ca1..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-# List of files which contain translatable strings.
-
-# Package source files
-
-findme.c
-popt.c
-poptconfig.c
-popthelp.c
-poptparse.c
-test1.c
-
diff --git a/popt-1.2/po/ro.po b/popt-1.2/po/ro.po
deleted file mode 100644 (file)
index 90c4e02..0000000
+++ /dev/null
@@ -1,72 +0,0 @@
-# SOME DESCRIPTIVE TITLE.
-# Copyright (C) YEAR Free Software Foundation, Inc.
-# Cristian Gafton <gafton@redhat.com>, 1998.
-#
-#, fuzzy
-msgid ""
-msgstr ""
-"Project-Id-Version: POPT\n"
-"POT-Creation-Date: 1998-10-22 14:44-0400\n"
-"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
-"Last-Translator: Cristian Gafton <gafton@redhat.com>\n"
-"Language-Team: LANGUAGE <LL@li.org>\n"
-"MIME-Version: 1.0\n"
-"Content-Type: text/plain; charset=ISO-8859-2\n"
-"Content-Transfer-Encoding: 8bit\n"
-
-#: ../popt.c:34
-msgid "unknown errno"
-msgstr "eroare necunoscuta"
-
-#: ../popt.c:407
-#, c-format
-msgid "option type (%d) not implemented in popt\n"
-msgstr "optiunea de tipul (%d) nu este implementata in popt\n"
-
-#: ../popt.c:531
-msgid "missing argument"
-msgstr "argument lipsa"
-
-#: ../popt.c:533
-msgid "unknown option"
-msgstr "optiune necunoscuta"
-
-#: ../popt.c:535
-msgid "aliases nested too deeply"
-msgstr "recursivitate infinita la optiunile sinonime"
-
-#: ../popt.c:537
-msgid "error in paramter quoting"
-msgstr "eroare la insertie parametru"
-
-#: ../popt.c:539
-msgid "invalid numeric value"
-msgstr "valoare numarica invalida"
-
-#: ../popt.c:541
-msgid "number too large or too small"
-msgstr "numar prea mare sau prea mic"
-
-#: ../popt.c:545
-msgid "unknown error"
-msgstr "eroare necuinoscuta"
-
-#: ../popthelp.c:29
-msgid "Show this help message"
-msgstr "Afisare mesaj de help"
-
-#: ../popthelp.c:30
-msgid "Display brief usage message"
-msgstr "Afisare mesaj sintaxa sumar"
-
-#: ../popthelp.c:41
-msgid "ARG"
-msgstr ""
-
-#: ../popthelp.c:148
-msgid "Usage:"
-msgstr "Sintaxa:"
-
-#: ../popthelp.c:166
-msgid "[OPTION...]"
-msgstr "[OPTIUNE...]"
diff --git a/popt-1.2/popt.3 b/popt-1.2/popt.3
deleted file mode 100644 (file)
index eaf6c40..0000000
+++ /dev/null
@@ -1,715 +0,0 @@
-.TH POPT 3  "June 30, 1998" "" "Linux Programmer's Manual"
-.SH NAME
-popt \- Parse command line options
-.SH SYNOPSIS
-.nf
-.B #include <popt.h>
-.sp
-.BI "poptContext poptGetContext(char * " name ", int " argc ,
-.BI "                           char ** "argv ,
-.BI "                           struct poptOption * " options ,
-.BI "                           int " flags );
-.sp
-.BI "void poptFreeContext(poptContext " con );
-.sp
-.BI "void poptResetContext(poptContext " con );
-.sp
-.BI "int poptGetNextOpt(poptContext " con );
-.sp
-.BI "char * poptGetOptArg(poptContext " con );
-.sp
-.BI "char * poptGetArg(poptContext " con );
-.sp
-.BI "char * poptPeekArg(poptContext " con );
-.sp
-.BI "char ** poptGetArgs(poptContext " con );
-.sp
-.BI "const char * poptStrerror(const int " error );
-.sp
-.BI "char * poptBadOption(poptContext " con ", int " flags );
-.sp
-.BI "int poptReadDefaultConfig(poptContext " con ", int " flags );
-.sp
-.BI "int poptReadConfigFile(poptContext " con ", char * " fn );
-.sp
-.BI "int poptAddAlias(poptContext " con ", struct poptAlias " alias , 
-.BI "                 int " flags );
-.sp
-.BI "int poptParseArgvString(char * " s ", int *  " argcPtr , 
-.BI "                        char *** " argvPtr );
-.sp
-.BI "int poptStuffArgs(poptContext " con ", char ** " argv );
-.sp
-.fi
-.SH DESCRIPTION
-The popt library exists essentially for parsing command-line 
-options. It is found superior in many ways when compared to 
-parsing the argv array by hand or using the getopt functions 
-.B getopt()
-and 
-.B getopt_long()
-[see 
-.BR getopt "(3)]."  
-Some specific advantages of popt are: it does not utilize global 
-.RI "variables, thus enabling multiple passes in parsing " argv
-.RI "; it can parse an arbitrary array of " argv "-style elements, "
-allowing parsing of command-line-strings from any source; 
-it provides a standard method of option aliasing (to be 
-discussed at length below.); it can exec external option filters; and,
-finally, it can automatically generate help and usage messages for
-the application.
-.sp
-Like
-.BR getopt_long() ,
-the popt library supports short and long style options.  Recall 
-that a 
-.B short option
-consists of a - character followed by a single alphanumeric character.
-A 
-.BR "long option" ,
-common in GNU utilities, consists of two - characters followed by a
-string made up of letters, numbers and hyphens.  Long options are
-optionally allowed to begin with a single -, primarily to allow command-line
-compatibility between popt applications and X toolkit applications.
-Either type of option may be followed by an argument.  A space separates a 
-short option from its arguments; either a space or an = separates a long 
-option from an argument. 
-.sp
-The popt library is highly portable and should work on any POSIX 
-platform.  The latest version is always available from: 
-ftp://ftp.redhat.com/pub/redhat/code/popt.
-.sp
-It may be redistributed under either the GNU General Public License 
-or the GNU Library General Public License, at the distributor's discretion.
-.SH "BASIC POPT USAGE"
-.SS "1. THE OPTION TABLE"
-Applications provide popt with information on their command-line 
-options by means of an "option table," i.e., an array of 
-.B struct poptOption 
-structures:
-.sp
-#include <popt.h>
-.sp
-.nf
-struct poptOption {
-    const char * longName; /* may be NULL */
-    char shortName;        /* may be '\\0' */
-    int argInfo;
-    void * arg;            /* depends on argInfo */
-    int val;               /* 0 means don't return, just update flag */
-    char * descrip;        /* description for autohelp -- may be NULL */
-    char * argDescrip;     /* argument description for autohelp */
-};
-.fi
-.sp
-Each member of the table defines a single option that may be 
-passed to the program.  Long and short options are considered 
-a single option that may occur in two different forms.  The 
-first two members, 
-.IR longName " and " shortName ", define the names of the option;"
-the first is a long name, while the latter is a single character.
-.sp
-The 
-.IR argInfo " member tell popt what type of argument is expected" 
-after the argument.  If no option is expected,
-.BR POPT_ARG_NONE " should be used.  (Connoisseurs of " getopt() 
-.RI "will note that " argInfo " is the only required field of "
-.BR "struct poptOption" " that is not directly analogous to a field in "
-.RB "the " getopt_long() " argument table.  The similarity between the "
-.RB "two allows for easy transitions from " getopt_long " to popt.) " 
-The rest of the valid values are shown in the following table:
-.sp
-.nf
-.B  "   Value            Description                arg Type"
-.BR POPT_ARG_NONE "   No argument expected             int"
-.BR POPT_ARG_STRING " No type checking to be performed char *"
-.BR POPT_ARG_INT "    An integer argument is expected  int"
-.BR POPT_ARG_LONG "   A long integer is expected       long"
-.sp
-.fi
-If \fIargInfo\fR value is logically or'd with \fBPOPT_ARGFLAG_ONEDASH\fR,
-the long argument may be given with a single - instead of two. For example,
-if \fB--longopt\fR is an option with \fBPOPT_ARGFLAG_ONEDASH\fR, is
-specified, \fB-longopt\fR is accepted as well.
-.sp
-.RI "The next element, " arg ", allows popt to automatically update "
-.RI "program variables when the option is used. If " arg " is " 
-.BR NULL ", it is ignored and popt takes no special action. " 
-Otherwise it should point to a variable of the type indicated in the 
-right-most column of the table above.
-.sp
-.RI "If the option takes no argument (" argInfo " is " 
-.BR POPT_ARG_NONE "), the variable pointed to by " 
-.IR arg " is set to 1 when the option is used.  (Incidentally, it "
-will perhaps not escape the attention of hunt-and-peck typists that 
-.RB "the value of " POPT_ARG_NONE " is 0.)  If the option does take "
-an argument, the variable that 
-.IR arg " points to is updated to reflect the value of the argument." 
-.RB "Any string is acceptable for " POPT_ARG_STRING " arguments, but "
-.BR POPT_ARG_INT " and " POPT_ARG_LONG " are converted to the 
-appropriate type, and an error returned if the conversion fails.
-.sp
-.RI "The next option, " val ", is the value popt's parsing function 
-should return when the option is encountered.  If it is 0, the parsing
-function does not return a value, instead parsing the next 
-command-line argument.
-.sp
-.RI "The last two options, " descrip " and " argDescrip " are only required
-if automatic help messages are desired (automatic usage messages can
-.RI "be generated without them). " descrip " is a text description of the
-.RI "argument and " argdescrip " is a short summary of the type of arguments
-.RI "the option expects, or NULL if the option doesn't require any 
-arguments.
-.sp
-.RB "If popt should automatically provide " --usage " and " --help " (" -? ")
-.RB "options, one line in the table should be the macro " POPT_AUTOHELP ".
-.RB "This macro includes another option table (via " POPT_ARG_INCLUDE_TABLE;
-see below) in the main one which provides the table entries for these
-.RB "arguments. When " --usage " or " --help " are passed to programs which
-use popt's automatical help, popt displays the appropriate message on 
-stderr as soon as it finds the option, and exits the program with a
-return code of 0. If you want to use popt's automatic help generation in
-a different way, you need to explicitly add the option entries to your programs 
-.RB "option table instead of using " POPT_AUTOHELP ".
-.sp
-The final structure in the table should have all the pointer values set
-.RB "to " NULL " and all the arithmetic values set to 0, marking the "
-end of the table.
-.sp
-There are two types of option table entries which do not specify command
-line options. When either of these types of entries are used, the
-\fIlongName\fR element must be \fBNULL\fR and the \fBshortName\fR element
-must be \fB'\\0'\fR.
-.sp
-The first of these special entry types allows the application to nest
-another option table in the current one; such nesting may extend quite
-deeply (the actual depth is limited by the program's stack). Including
-other option tables allows a library to provide a standard set of
-command-line options to every program which uses it (this is often done
-in graphical programming toolkits, for example). To do this, set
-the \fIargInfo\fR field to \fBPOPT_ARG_INCLUDE_TABLE\fR and the
-\fRarg\fR field to point to the table which is being included. If
-automatic help generation is being used, the \fIdescrip\fR field should
-contain a overall description of the option table being included.
-.sp
-The other special option table entry type tells popt to call a function (a
-callback) when any option in that table is found. This is especially usefull
-when included option tables are being used, as the program which provides
-the top-level option table doesn't need to be aware of the other options
-which are provided by the included table. When a callback is set for
-a table, the parsing function never returns information on an option in
-the table. Instead, options information must be retained via the callback
-or by having popt set a variable through the option's \fIarg\fR field.
-Option callbacks should match the following prototype:
-.sp
-.nf
-.BI "void poptCallbackType(poptContext con, 
-.BI "                      const struct poptOption * opt, 
-.BI "                      const char * arg, void * data);
-.fi
-.sp
-The first parameter is the context which is being parsed (see the next
-section for information on contexts), \fIopt\fR points to the option
-which triggered this callback, and \fIarg\fR is the option's argument.
-If the option does not take an argument, \fIarg\fR is \fBNULL\fR.  The
-final parameter, \fIdata\fR is taken from the \fIdescrip\fR field
-of the option table entry which defined the callback. As \fIdescrip\fR
-is a pointer, this allows callback functions to be passed an arbitrary
-set of data (though a typecast will have to be used).
-.sp
-The option table entry which defines a callback has an \fIargInfo\fR of
-\fBPOPT_ARG_CALLBACK\fR, an \fIarg\fR which points to the callback
-function, and a \fIdescrip\fR field which specifies an arbitrary pointer
-to be passed to the callback.
-.SS "2. CREATING A CONTEXT"
-popt can interleave the parsing of multiple command-line sets. It allows
-this by keeping all the state information for a particular set of
-command-line arguments in a 
-.BR poptContext " data structure, an opaque type that should not be "
-modified outside the popt library.
-.sp
-.RB "New popt contexts are created by " poptGetContext() ":"
-.sp
-.nf
-.BI "poptContext poptGetContext(char * " name ", int "argc ",
-.BI "                           char ** "argv ",
-.BI "                           struct poptOption * "options ",
-.BI "                           int "flags ");"
-.fi
-.sp
-The first parameter, 
-.IR name ", is used only for alias handling (discussed later). It "
-should be the name of the application whose options are being parsed,
-.RB "or should be " NULL " if no option aliasing is desired. The next "
-two arguments specify the command-line arguments to parse. These are 
-.RB "generally passed to " poptGetContext() " exactly as they were "
-.RB "passed to the program's " main() " function. The " 
-.IR options " parameter points to the table of command-line options, "
-which was described in the previous section. The final parameter, 
-.IR flags ",is not currently used but should always be specified as 
-0 for compatibility with future versions of the popt library.
-.sp
-.RB "A " poptContext " keeps track of which options have already been "
-parsed and which remain, among other things. If a program wishes to 
-restart option processing of a set of arguments, it can reset the 
-.BR poptContext " by passing the context as the sole argument to "
-.BR poptResetContext() .
-.sp
-When argument processing is complete, the process should free the 
-.BR poptContext " as it contains dynamically allocated components. The "
-.BR poptFreeContext() " function takes a " 
-.BR poptContext " as its sole argument and frees the resources the "
-context is using.
-.sp
-.RB "Here are the prototypes of both " poptResetContext() " and "
-.BR poptFreeContext() :
-.sp
-.nf
-.B #include <popt.h>
-.BI "void poptFreeContext(poptContext " con ");"
-.BI "void poptResetContext(poptContext " con ");"
-.fi
-.sp
-.SS "3. PARSING THE COMMAND LINE"
-.RB "After an application has created a " poptContext ", it may begin "
-.RB "parsing arguments. " poptGetNextOpt() " performs the actual "
-argument parsing.
-.sp
-.nf
-.B #include <popt.h>
-.BI "int poptGetNextOpt(poptContext " con ");"
-.fi
-.sp
-Taking the context as its sole argument, this function parses the next
-command-line argument found. After finding the next argument in the
-option table, the function fills in the object pointed to by the option 
-.RI "table entry's " arg 
-.RB "pointer if it is not " NULL ". If the val entry for the option is "
-non-0, the function then returns that value. Otherwise, 
-.BR poptGetNextOpt() " continues on to the next argument."
-.sp
-.BR poptGetNextOpt() " returns -1 when the final argument has been "
-parsed, and other negative values when errors occur. This makes it a 
-good idea to 
-.RI "keep the " val " elements in the options table greater than 0."
-.sp
-.RI "If all of the command-line options are handled through " arg 
-pointers, command-line parsing is reduced to the following line of code:
-.sp
-.nf
-rc = poptGetNextOpt(poptcon);
-.fi
-.sp
-Many applications require more complex command-line parsing than this,
-however, and use the following structure:
-.sp
-.nf
-while ((rc = poptGetNextOpt(poptcon)) > 0) {
-     switch (rc) {
-          /* specific arguments are handled here */
-     }
-}
-.fi
-.sp
-When returned options are handled, the application needs to know the
-value of any arguments that were specified after the option. There are two
-ways to discover them. One is to ask popt to fill in a variable with the 
-.RI "value of the option through the option table's " arg " elements. The "
-.RB "other is to use " poptGetOptArg() ":"
-.sp
-.nf
-.B #include <popt.h>
-.BI "char * poptGetOptArg(poptContext " con ");"
-.fi
-.sp
-This function returns the argument given for the final option returned by
-.BR poptGetNextOpt() ", or it returns " NULL " if no argument was specified."
-.sp
-.SS "4. LEFTOVER ARGUMENTS"
-Many applications take an arbitrary number of command-line arguments,
-such as a list of file names. When popt encounters an argument that does
-not begin with a -, it assumes it is such an argument and adds it to a list
-of leftover arguments. Three functions allow applications to access such
-arguments:
-.nf
-.HP
-.BI "char * poptGetArg(poptContext " con ");"
-.fi
-This function returns the next leftover argument and marks it as
-processed.
-.PP
-.nf
-.HP
-.BI "char * poptPeekArg(poptContext " con ");"
-.fi
-The next leftover argument is returned but not marked as processed.
-This allows an application to look ahead into the argument list,
-without modifying the list.
-.PP
-.nf
-.HP
-.BI "char ** poptGetArgs(poptContext " con ");"
-.fi
-All the leftover arguments are returned in a manner identical to 
-.IR argv ".  The final element in the returned array points to "
-.BR NULL ", indicating the end of the arguments.
-.sp
-.SS "5. AUTOMATIC HELP MESSAGES"
-The \fBpopt\fR library can automatically generate help messages which
-describe the options a program accepts. There are two types of help
-messages which can be generated. Usage messages are a short messages
-which lists valid options, but does not describe them. Help messages
-describe each option on one (or more) lines, resulting in a longer, but
-more useful, message. Whenever automatic help messages are used, the
-\fBdescrip\fR and \fBargDescrip\fR fields \fBstruct poptOption\fR members
-should be filled in for each option.
-.sp
-The \fBPOPT_AUTOHELP\fR macro makes it easy to add \fB--usage\fR and
-\fB--help\fR messages to your program, and is described in part 1
-of this man page. If more control is needed over your help messages,
-the following two functions are available:
-.sp
-.nf
-.B #include <popt.h>
-.BI "void poptPrintHelp(poptContext " con ", FILE * " f ", int " flags ");
-.BI "void poptPrintUsage(poptContext " con ", FILE * " f ", int " flags ");
-.fi
-.sp
-\fBpoptPrintHelp()\fR displays the standard help message to the stdio file
-descriptor f, while \fBpoptPrintUsage()\fR displays the shorter usage
-message. Both functions currently ignore the \fBflags\fR argument; it is
-there to allow future changes.
-.sp
-.SH "ERROR HANDLING"
-All of the popt functions that can return errors return integers. 
-When an error occurs, a negative error code is returned. The 
-following table summarizes the error codes that occur:
-.sp
-.nf
-.B "     Error                      Description"
-.BR "POPT_ERROR_NOARG       " "Argument missing for an option."
-.BR "POPT_ERROR_BADOPT      " "Option's argument couldn't be parsed."
-.BR "POPT_ERROR_OPTSTOODEEP " "Option aliasing nested too deeply."
-.BR "POPT_ERROR_BADQUOTE    " "Quotations do not match."
-.BR "POPT_ERROR_BADNUMBER   " "Option couldn't be converted to number."
-.BR "POPT_ERROR_OVERFLOW    " "A given number was too big or small."
-.fi
-.sp
-Here is a more detailed discussion of each error:
-.sp
-.TP
-.B POPT_ERROR_NOARG
-An option that requires an argument was specified on the command
-line, but no argument was given. This can be returned only by
-.BR poptGetNextOpt() .
-.sp
-.TP
-.B POPT_ERROR_BADOPT
-.RI "An option was specified in " argv " but is not in the option 
-.RB "table. This error can be returned only from " poptGetNextOpt() .
-.sp
-.TP
-.B POPT_ERROR_OPTSTOODEEP
-A set of option aliases is nested too deeply. Currently, popt 
-follows options only 10 levels to prevent infinite recursion. Only 
-.BR poptGetNextOpt() " can return this error."
-.sp
-.TP
-.B POPT_ERROR_BADQUOTE
-A parsed string has a quotation mismatch (such as a single quotation
-.RB "mark). " poptParseArgvString() ", " poptReadConfigFile() ", or "
-.BR poptReadDefaultConfig() " can return this error."
-.sp
-.TP
-.B POPT_ERROR_BADNUMBER
-A conversion from a string to a number (int or long) failed due
-to the string containing nonnumeric characters. This occurs when
-.BR poptGetNextOpt() " is processing an argument of type " 
-.BR POPT_ARG_INT " or " POPT_ARG_LONG .
-.sp
-.TP
-.B POPT_ERROR_OVERFLOW
-A string-to-number conversion failed because the number was too
-.RB "large or too small. Like " POPT_ERROR_BADNUMBER ", this error 
-.RB "can occur only when " poptGetNextOpt() " is processing an "
-.RB "argument of type " POPT_ARG_INT " or " POPT_ARG_LONG .  
-.sp
-.TP
-.B POPT_ERROR_ERRNO
-.RI "A system call returned with an error, and " errno " still 
-contains the error from the system call. Both 
-.BR poptReadConfigFile() " and " poptReadDefaultConfig() " can "
-return this error.
-.sp
-.PP
-Two functions are available to make it easy for applications to provide
-good error messages.
-.HP
-.nf
-.BI "const char * poptStrerror(const int " error ");"
-.fi
-This function takes a popt error code and returns a string describing
-.RB "the error, just as with the standard " strerror() " function."
-.PP
-.HP
-.nf
-.BI "char * poptBadOption(poptContext " con ", int " flags ");"
-.fi
-.RB "If an error occurred during " poptGetNextOpt() ", this function "
-.RI "returns the option that caused the error. If the " flags " argument"
-.RB "is set to " POPT_BADOPTION_NOALIAS ", the outermost option is "
-.RI "returned. Otherwise, " flags " should be 0, and the option that is "
-returned may have been specified through an alias.
-.PP
-These two functions make popt error handling trivial for most 
-applications. When an error is detected from most of the functions, 
-an error message is printed along with the error string from 
-.BR poptStrerror() ". When an error occurs during argument parsing, "
-code similiar to the following displays a useful error message:
-.sp
-.nf
-fprintf(stderr, "%s: %s\\n",
-        poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
-        poptStrerror(rc));
-.fi
-.sp
-.SH "OPTION ALIASING"
-.RB "One of the primary benefits of using popt over " getopt() " is the "
-ability to use option aliasing. This lets the user specify options that 
-popt expands into other options when they are specified. If the standard 
-.RB "grep program made use of popt, users could add a " --text " option "
-.RB "that expanded to " "-i -n -E -2" " to let them more easily find "
-information in text files.
-.sp
-.SS "1. SPECIFYING ALIASES"
-.RI "Aliases are normally specified in two places: " /etc/popt 
-.RB "and the " .popt " file in the user's home directory (found through "
-.RB "the " HOME " environment variable). Both files have the same format, "
-an arbitrary number of lines formatted like this:
-.sp
-.IB appname " alias " newoption "" " expansion"
-.sp
-.RI "The " appname " is the name of the application, which must be the "
-.RI "same as the " name " parameter passed to "
-.BR poptGetContext() ". This allows each file to specify aliases for "
-.RB "multiple programs. The " alias " keyword specifies that an alias is "
-being defined; currently popt configuration files support only aliases, but
-other abilities may be added in the future. The next option is the option
-that should be aliased, and it may be either a short or a long option. The
-rest of the line specifies the expansion for the alias. It is parsed 
-similarly to a shell command, which allows \\, ", and ' to be used for 
-quoting. If a backslash is the final character on a line, the next line 
-in the file is assumed to be a logical continuation of the line containing 
-the backslash, just as in shell.
-.sp
-.RB "The following entry would add a " --text " option to the grep command, "
-as suggested at the beginning of this section.
-.sp
-.B "grep alias --text -i -n -E -2"
-.SS "2. ENABLING ALIASES"
-.RB "An application must enable alias expansion for a " poptContext 
-.RB "before calling " poptGetNextArg() " for the first time. There are "
-three functions that define aliases for a context:
-.HP
-.nf
-.BI "int poptReadDefaultConfig(poptContext " con ", int " flags ");"
-.fi
-.RI "This function reads aliases from " /etc/popt " and the "
-.BR .popt " file in the user's home directory. Currently, "
-.IR flags " should be "
-.BR NULL ", as it is provided only for future expansion."
-.PP
-.HP
-.nf
-.BI "int poptReadConfigFile(poptContext " con ", char * " fn ");"
-.fi
-.RI "The file specified by " fn " is opened and parsed as a popt "
-configuration file. This allows programs to use program-specific 
-configuration files.
-.PP
-.HP
-.nf
-.BI "int poptAddAlias(poptContext " con ", struct poptAlias " alias ",
-.BI "                 int " flags ");"
-.fi
-Occasionally, processes want to specify aliases without having to
-read them from a configuration file. This function adds a new alias
-.RI "to a context. The " flags " argument should be 0, as it is "
-currently reserved for future expansion. The new alias is specified 
-.RB "as a " "struct poptAlias" ", which is defined as:"
-.sp
-.nf
-struct poptAlias {
-     char * longName; /* may be NULL */
-     char shortName; /* may be '\\0' */
-     int argc;
-     char ** argv; /* must be free()able */
-};
-.fi
-.sp
-.RI "The first two elements, " longName " and " shortName ", specify "
-.RI "the option that is aliased. The final two, " argc " and " argv ","
-define the expansion to use when the aliases option is encountered.
-.PP
-.SH "PARSING ARGUMENT STRINGS"
-Although popt is usually used for parsing arguments already divided into
-.RI "an " argv "-style array, some programs need to parse strings that "
-are formatted identically to command lines. To facilitate this, popt 
-provides a function that parses a string into an array of strings, 
-using rules similiar to normal shell parsing.
-.sp
-.nf
-.B "#include <popt.h>"
-.BI "int poptParseArgvString(char * " s ", int *  "argcPtr ",
-.BI "                        char *** " argvPtr ");"
-.fi
-.sp
-.RI "The string s is parsed into an " argv "-style array. The integer "
-.RI "pointed to by the second parameter, " argcPtr ", contains the number "
-of elements parsed, and the pointer pointed to by the final parameter is 
-set to point to the newly created array. The array is dynamically 
-.RB "allocated and should be " free() "ed when the application is finished "
-with it.
-.sp
-.RI "The " argvPtr 
-.RB "created by " poptParseArgvString() " is suitable to pass directly "
-.RB "to " poptGetContext() .
-.SH "HANDLING EXTRA ARGUMENTS"
-Some applications implement the equivalent of option aliasing but need
-.RB "to do so through special logic. The " poptStuffArgs() " function "
-allows an application to insert new arguments into the current 
-.BR poptContext .
-.sp
-.nf
-.B "#include <popt.h>"
-.BI "int poptStuffArgs(poptContext "con ", char ** " argv ");"
-.fi
-.sp
-.RI "The passed " argv 
-.RB "must have a " NULL " pointer as its final element. When "
-.BR poptGetNextOpt() " is next called, the "
-"stuffed" arguments are the first to be parsed. popt returns to the 
-normal arguments once all the stuffed arguments have been exhausted.
-.SH "EXAMPLE"
-The following example is a simplified version of the program "robin" 
-which appears in Chapter 15 of the text cited below.  Robin has 
-been stripped of everything but its argument-parsing logic, slightly 
-reworked, and renamed "parse." It may prove useful in illustrating 
-at least some of the features of the extremely rich popt library.
-.sp
-.nf
-#include <popt.h>
-#include <stdio.h>
-
-void usage(poptContext optCon, int exitcode, char *error, char *addl) {
-    poptPrintUsage(optCon, stderr, 0);
-    if (error) fprintf(stderr, "%s: %s\n", error, addl);
-    exit(exitcode);
-}
-
-int main(int argc, char *argv[]) {
-   char    c;            /* used for argument parsing */
-   int     i = 0;        /* used for tracking options */
-   char    *portname;
-   int     speed = 0;    /* used in argument parsing to set speed */
-   int     raw = 0;      /* raw mode? */ 
-   int     j;
-   char    buf[BUFSIZ+1];
-   poptContext optCon;   /* context for parsing command-line options */
-
-   struct poptOption optionsTable[] = {
-           { "bps", 'b', POPT_ARG_INT, &speed, 0,
-               "signaling rate in bits-per-second", "BPS" },
-           { "crnl", 'c', 0, 0, 'c',
-               "expand cr characters to cr/lf sequences" },
-           { "hwflow", 'h', 0, 0, 'h',
-               "use hardware (RTS/CTS) flow control" },
-           { "noflow", 'n', 0, 0, 'n',
-               "use no flow control" },
-           { "raw", 'r', 0, &raw, 0,
-               "don't perform any character conversions" },
-           { "swflow", 's', 0, 0, 's',
-               "use software (XON/XOF) flow control" } ,
-           POPT_AUTOHELP
-           { NULL, 0, 0, NULL, 0 }
-   };
-
-   optCon = poptGetContext(NULL, argc, argv, optionsTable, 0);
-   poptSetOtherOptionHelp(optCon, "[OPTIONS]* <port>");
-
-   if (argc < 2) {
-       poptPrintUsage(optCon, stderr, 0);
-       exit(1);
-   }
-
-   /* Now do options processing, get portname */
-   while ((c = poptGetNextOpt(optCon)) >= 0) {
-      switch (c) {
-         case 'c': 
-            buf[i++] = 'c';         
-            break;
-         case 'h': 
-            buf[i++] = 'h';
-            break;
-         case 's':
-            buf[i++] = 's';
-            break;
-         case 'n':
-            buf[i++] = 'n';
-            break;
-      }
-   }
-   portname = poptGetArg(optCon);
-   if((portname == NULL) || !(poptPeekArg(optCon) == NULL))
-      usage(optCon, 1, "Specify a single port", ".e.g., /dev/cua0");
-
-   if (c < -1) {
-      /* an error occurred during option processing */
-      fprintf(stderr, "%s: %s\\n", 
-              poptBadOption(optCon, POPT_BADOPTION_NOALIAS),
-              poptStrerror(c));
-      return 1;
-   }
-
-   /* Print out options, portname chosen */
-   printf("Options  chosen: ");
-   for(j = 0; j < i ; j++)
-      printf("-%c ", buf[j]);
-   if(raw) printf("-r ");
-   if(speed) printf("-b %d ", speed);
-   printf("\\nPortname chosen: %s\\n", portname);
-
-   poptFreeContext(optCon);
-   exit(0);
-}
-.fi
-.sp
-RPM, a popular Linux package management program, makes heavy use
-of popt's features. Many of its command-line arguments are implemented
-through popt aliases, which makes RPM an excellent example of how to
-take advantage of the popt library. For more information on RPM, see
-http://www.rpm.org. The popt source code distribution includes test
-program(s) which use all of the features of the popt libraries in
-various ways. If a feature isn't working for you, the popt test code
-is the first place to look.
-.SH BUGS
-None presently known.
-.SH AUTHOR
-Erik W. Troan <ewt@redhat.com>
-.PP
-This man page is derived in part from
-.IR "Linux Application Development"
-by Michael K. Johnson and Erik W. Troan, Copyright (c) 1998 by Addison
-Wesley Longman, Inc., and included in the popt documentation with the
-permission of the Publisher and the appreciation of the Authors.
-.PP
-Thanks to Robert Lynch for his extensive work on this man page.
-.SH "SEE ALSO"
-.BR getopt (3)
-.sp
-.IR "Linux Application Development" ", by Michael K. Johnson and "
-Erik W. Troan (Addison-Wesley, 1998; ISBN 0-201-30821-5), Chapter 24.
-.sp
-.BR popt.ps " is a Postscript version of the above cited book "
-chapter. It can be found in the source archive for popt available at: 
-ftp://ftp.redhat.com/pub/redhat/code/popt
diff --git a/popt-1.2/popt.spec b/popt-1.2/popt.spec
deleted file mode 100644 (file)
index adfea95..0000000
+++ /dev/null
@@ -1,41 +0,0 @@
-Summary: C library for parsing command line parameters
-Name: popt
-Version: 1.2
-Release: 1
-Copyright: LGPL
-Group: Libraries
-Source: ftp://ftp.redhat.com/pub/redhat/code/popt/popt-%{version}.tar.gz
-BuildRoot: /var/tmp/popt.root
-
-%description
-Popt is a C library for pasing command line parameters. It was heavily
-influenced by the getopt() and getopt_long() functions, but it allows
-more powerfull argument expansion. It can parse arbitrary argv[] style
-arrays and automatically set variables based on command line arguments.
-It also allows command line arguments to be aliased via configuration
-files and includes utility functions for parsing arbitrary strings into
-argv[] arrays using shell-like rules. 
-
-%prep
-%setup -q
-CFLAGS="$RPM_OPT_FLAGS" ./autogen.sh --prefix=/usr
-
-%build
-make
-
-%install
-make DESTDIR=$RPM_BUILD_ROOT install
-
-%clean
-rm -rf $RPM_BUILD_ROOT
-
-%files
-%attr(0644, root, root) /usr/lib/libpopt.a
-%attr(0644, root, root) /usr/include/popt.h
-
-%changelog
-* Thu Oct 22 1998 Erik Troan <ewt@redhat.com>
-- see CHANGES file for 1.2
-
-* Thu Apr 09 1998 Erik Troan <ewt@redhat.com>
-- added ./configure step to spec file
diff --git a/popt-1.2/poptint.h b/popt-1.2/poptint.h
deleted file mode 100644 (file)
index 5d99be5..0000000
+++ /dev/null
@@ -1,64 +0,0 @@
-/* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING
-   file accompanying popt source distributions, available from 
-   ftp://ftp.redhat.com/pub/code/popt */
-
-#ifndef H_POPTINT
-#define H_POPTINT
-
-struct optionStackEntry {
-    int argc;
-    char ** argv;
-    int next;
-    char * nextArg;
-    char * nextCharArg;
-    struct poptAlias * currAlias;
-    int stuffed;
-};
-
-struct execEntry {
-    char * longName;
-    char shortName;
-    char * script;
-};
-
-struct poptContext_s {
-    struct optionStackEntry optionStack[POPT_OPTION_DEPTH], * os;
-    char ** leftovers;
-    int numLeftovers;
-    int nextLeftover;
-    const struct poptOption * options;
-    int restLeftover;
-    char * appName;
-    struct poptAlias * aliases;
-    int numAliases;
-    int flags;
-    struct execEntry * execs;
-    int numExecs;
-    char ** finalArgv;
-    int finalArgvCount;
-    int finalArgvAlloced;
-    struct execEntry * doExec;
-    char * execPath;
-    int execAbsolute;
-    char * otherHelp;
-};
-
-#ifdef HAVE_LIBINTL_H
-#include <libintl.h>
-#endif
-
-#ifdef HAVE_GETTEXT
-#define _(foo) gettext(foo)
-#else
-#define _(foo) (foo)
-#endif
-
-#ifdef HAVE_DGETTEXT
-#define POPT_(foo) dgettext("popt", foo)
-#else
-#define POPT_(foo) (foo)
-#endif
-
-#define N_(foo) (foo)
-
-#endif
diff --git a/popt-1.2/stamp-h.in b/popt-1.2/stamp-h.in
deleted file mode 100644 (file)
index e69de29..0000000
diff --git a/popt-1.2/test-poptrc b/popt-1.2/test-poptrc
deleted file mode 100644 (file)
index 8a6d86c..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-test1 alias --simple --arg2
-test1 alias --two --arg1 --arg2 alias
-test1 alias --takerest --
-test1 alias -T --arg2
-test1 alias -O --arg1
-
-test1 exec --echo-args echo
-test1 alias -e --echo-args
-test1 exec -a /bin/echo
diff --git a/popt-1.2/test1.c b/popt-1.2/test1.c
deleted file mode 100644 (file)
index 28ee269..0000000
+++ /dev/null
@@ -1,101 +0,0 @@
-/* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING
-   file accompanying popt source distributions, available from 
-   ftp://ftp.redhat.com/pub/code/popt */
-
-#include <stdio.h>
-#include <stdlib.h>
-
-#include "popt.h"
-
-void option_callback(poptContext con, enum poptCallbackReason reason,
-                    const struct poptOption * opt, 
-                    char * arg, void * data) {
-    fprintf(stdout, "callback: %c %s %s ", opt->val, (char *) data, arg);    
-}
-
-int main(int argc, char ** argv) {
-    int rc;
-    int arg1 = 0;
-    char * arg2 = "(none)";
-    poptContext optCon;
-    char ** rest;
-    int arg3 = 0;
-    int inc = 0;
-    int help = 0;
-    int usage = 0;
-    int shortopt = 0;
-    struct poptOption moreCallbackArgs[] = {
-       { NULL, '\0', POPT_ARG_CALLBACK | POPT_CBFLAG_INC_DATA, 
-               option_callback, 0, NULL },
-       { "cb2", 'c', POPT_ARG_STRING, NULL, 'c', "Test argument callbacks" },
-       { NULL, '\0', 0, NULL, 0 } 
-    };
-    struct poptOption callbackArgs[] = {
-       { NULL, '\0', POPT_ARG_CALLBACK, option_callback, 0, "sampledata" },
-       { "cb", 'c', POPT_ARG_STRING, NULL, 'c', "Test argument callbacks" },
-       { "long", '\0', 0, NULL, 'l', "Unused option for help testing" },
-       { NULL, '\0', 0, NULL, 0 } 
-    };
-    struct poptOption moreArgs[] = {
-       { "inc", 'i', 0, &inc, 0, "An included argument" },
-       { NULL, '\0', 0, NULL, 0 } 
-    };
-    struct poptOption options[] = {
-       { NULL, '\0', POPT_ARG_INCLUDE_TABLE, &moreCallbackArgs, 0, "arg for cb2" },
-       { "arg1", '\0', 0, &arg1, 0, "First argument with a really long" 
-           " description. After all, we have to test argument help"
-           " wrapping somehow, right?", NULL },
-       { "arg2", '2', POPT_ARG_STRING, &arg2, 0, "Another argument", "ARG" },
-       { "arg3", '3', POPT_ARG_INT, &arg3, 0, "A third argument", "ANARG" },
-       { "shortoption", '\0', POPT_ARGFLAG_ONEDASH, &shortopt, 0,
-               "Needs a single -", NULL },
-       { "hidden", '\0', POPT_ARG_STRING | POPT_ARGFLAG_DOC_HIDDEN, NULL, 0, 
-               "This shouldn't show up", NULL },
-       { "unused", '\0', POPT_ARG_STRING, NULL, 0, 
-           "Unused option for help testing", "UNUSED" },
-       { NULL, '\0', POPT_ARG_INCLUDE_TABLE, &moreArgs, 0, NULL },
-       { NULL, '\0', POPT_ARG_INCLUDE_TABLE, &callbackArgs, 0, "Callback arguments" },
-       POPT_AUTOHELP
-       { NULL, '\0', 0, NULL, 0 } 
-    };
-
-    optCon = poptGetContext("test1", argc, argv, options, 0);
-    poptReadConfigFile(optCon, "./test-poptrc");
-
-    if ((rc = poptGetNextOpt(optCon)) < -1) {
-       fprintf(stderr, "test1: bad argument %s: %s\n", 
-               poptBadOption(optCon, POPT_BADOPTION_NOALIAS), 
-               poptStrerror(rc));
-       return 2;
-    }
-
-    if (help) {
-       poptPrintHelp(optCon, stdout, 0);
-       return 0;
-    } if (usage) {
-       poptPrintUsage(optCon, stdout, 0);
-       return 0;
-    }
-
-    fprintf(stdout, "arg1: %d arg2: %s", arg1, arg2);
-
-    if (arg3)
-       fprintf(stdout, " arg3: %d", arg3);
-    if (inc)
-       fprintf(stdout, " inc: %d", inc);
-    if (shortopt)
-       fprintf(stdout, " short: %d", shortopt);
-
-    rest = poptGetArgs(optCon);
-    if (rest) {
-       fprintf(stdout, " rest:");
-       while (*rest) {
-           fprintf(stdout, " %s", *rest);
-           rest++;
-       }
-    }
-
-    fprintf(stdout, "\n");
-
-    return 0;
-}
diff --git a/popt-1.2/testit.sh b/popt-1.2/testit.sh
deleted file mode 100755 (executable)
index bdb78ab..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/sh
-
-run() {
-    prog=$1; shift
-    name=$1; shift
-    answer=$1; shift
-
-    echo Running test $name.
-
-    result=`./$prog $*`
-    if [ "$answer" != "$result" ]; then
-       echo "Test \"$*\" failed with: $result"
-       exit 2
-    fi
-}
-
-make -q testcases
-
-run test1 "test1 - 1" "arg1: 1 arg2: (none)" --arg1
-run test1 "test1 - 2" "arg1: 0 arg2: foo" --arg2 foo
-run test1 "test1 - 3" "arg1: 1 arg2: something" --arg1 --arg2 something
-run test1 "test1 - 4" "arg1: 0 arg2: another" --simple another
-run test1 "test1 - 5" "arg1: 1 arg2: alias" --two
-run test1 "test1 - 6" "arg1: 1 arg2: (none) rest: --arg2" --arg1 -- --arg2 
-run test1 "test1 - 7" "arg1: 0 arg2: abcd rest: --arg1" --simple abcd -- --arg1 
-run test1 "test1 - 8" "arg1: 1 arg2: (none) rest: --arg2" --arg1 --takerest --arg2 
-run test1 "test1 - 9" "arg1: 0 arg2: foo" -2 foo
-run test1 "test1 - 10" "arg1: 0 arg2: (none) arg3: 50" -3 50
-run test1 "test1 - 11" "arg1: 0 arg2: bar" -T bar
-run test1 "test1 - 12" "arg1: 1 arg2: (none)" -O 
-run test1 "test1 - 13" "arg1: 1 arg2: foo" -OT foo
-run test1 "test1 - 14" "arg1: 0 arg2: (none) inc: 1" --inc
-run test1 "test1 - 15" "arg1: 0 arg2: foo inc: 1" -i --arg2 foo
-POSIX_ME_HARDER=1 run test1 "test1 - 16" "arg1: 1 arg2: (none) rest: foo --arg2 something" --arg1 foo --arg2 something
-POSIXLY_CORRECT=1 run test1 "test1 - 17" "arg1: 1 arg2: (none) rest: foo --arg2 something" --arg1 foo --arg2 something
-run test1 "test1 - 18" "callback: c sampledata bar arg1: 1 arg2: (none)" --arg1 --cb bar
-run test1 "test1 - 19" "./test1 ;" --echo-args
-run test1 "test1 - 20" "./test1 ; --arg1" --echo-args --arg1
-run test1 "test1 - 21" "./test1 ; --arg2 something" -T something -e
-run test1 "test1 - 22" "./test1 ; --arg2 something -- more args" -T something -a more args
-run test1 "test1 - 23" "./test1 ; --echo-args -a" --echo-args -e -a
-run test1 "test1 - 24" "arg1: 0 arg2: (none) short: 1" -shortoption
-run test1 "test1 - 25" "arg1: 0 arg2: (none) short: 1" --shortoption
-run test1 "test1 - 26" "callback: c arg for cb2 foo arg1: 0 arg2: (none)" --cb2 foo
-
-echo ""
-echo "Passed."
diff --git a/popt/.cvsignore b/popt/.cvsignore
new file mode 100644 (file)
index 0000000..86b08b5
--- /dev/null
@@ -0,0 +1,8 @@
+ID
+Makefile
+config.cache
+config.h
+config.log
+config.status
+rsync
+zlib/dummy
diff --git a/popt/CHANGES b/popt/CHANGES
new file mode 100644 (file)
index 0000000..b6ab2aa
--- /dev/null
@@ -0,0 +1,43 @@
+1.3 ->
+       - heavy dose of const's
+       - poptParseArgvString() now NULL terminates the list
+
+1.2.3 -> 1.3
+       - added support for single -
+       - misc bug fixes
+       - portability improvements
+
+1.2.2 -> 1.2.3
+       - fixed memset() in help message generation (Dale Hawkins)
+       - added extern "C" stuff to popt.h for C++ compilers (Dale Hawkins)
+       - const'ified poptParseArgvString (Jeff Garzik)
+
+1.2.1 -> 1.2.2
+       - fixed bug in chaind alias happens which seems to have only
+         affected --triggers in rpm
+       - added POPT_ARG_VAL
+       - popt.3 installed by default
+
+1.2 -> 1.2.1
+       - added POPT_ARG_INTL_DOMAIN (Elliot Lee)
+       - updated Makefile's to be more GNUish (Elliot Lee)
+
+1.1 -> 1.2
+       - added popt.3 man page (Robert Lynch)
+       - don't use mmap anymore (its lack of portability isn't worth the
+         trouble)
+       - added test script
+       - added support for exec
+       - removed support for *_POPT_ALIASES env variable -- it was a bad
+         idea
+       - reorganized into multiple source files
+       - added automatic help generation, POPT_AUTOHELP
+       - added table callbacks
+       - added table inclusion
+       - updated man page for new features
+       - added test scripts
+
+1.0 -> 1.1
+       - moved to autoconf (Fred Fish)
+       - added STRERROR replacement (Norbert Warmuth)
+       - added const keywords (Bruce Perens)
similarity index 100%
rename from popt-1.2/COPYING
rename to popt/COPYING
similarity index 100%
rename from popt-1.2/README
rename to popt/README
diff --git a/popt/config.log b/popt/config.log
new file mode 100644 (file)
index 0000000..043423f
--- /dev/null
@@ -0,0 +1,104 @@
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+configure:592: checking host system type
+configure:613: checking target system type
+configure:631: checking build system type
+configure:665: checking for a BSD compatible install
+configure:718: checking whether build environment is sane
+configure:775: checking whether make sets ${MAKE}
+configure:821: checking for working aclocal
+configure:834: checking for working autoconf
+configure:847: checking for working automake
+configure:860: checking for working autoheader
+configure:873: checking for working makeinfo
+configure:891: checking for gcc
+configure:1004: checking whether the C compiler (gcc  ) works
+configure:1020: gcc -o conftest    conftest.c  1>&5
+configure:1046: checking whether the C compiler (gcc  ) is a cross-compiler
+configure:1051: checking whether we are using GNU C
+configure:1079: checking whether gcc accepts -g
+configure:1111: checking for POSIXized ISC
+configure:1135: checking for gcc
+configure:1248: checking whether the C compiler (gcc -g -O2 ) works
+configure:1264: gcc -o conftest -g -O2   conftest.c  1>&5
+configure:1290: checking whether the C compiler (gcc -g -O2 ) is a cross-compiler
+configure:1295: checking whether we are using GNU C
+configure:1323: checking whether gcc accepts -g
+configure:1355: checking how to run the C preprocessor
+configure:1436: checking whether gcc needs -traditional
+configure:1485: checking for gcc option to accept ANSI C
+configure:1564: checking for function prototypes
+configure:1795: checking for ranlib
+configure:1834: checking for ld used by GCC
+configure:1896: checking if the linker (/usr/bin/ld) is GNU ld
+configure:1912: checking for BSD-compatible nm
+configure:1948: checking whether ln -s works
+ltconfig:603: checking for object suffix
+ltconfig:604: gcc -c -g -O2  conftest.c 1>&5
+ltconfig:629: checking for executable suffix
+ltconfig:630: gcc -o conftest -g -O2   conftest.c  1>&5
+ltconfig:776: checking if gcc PIC flag -fPIC works
+ltconfig:777: gcc -c -g -O2 -fPIC -DPIC  conftest.c 1>&5
+ltconfig:829: checking if gcc supports -c -o file.o
+ltconfig:830: gcc -c -g -O2 -o out/conftest2.o  conftest.c 1>&5
+ltconfig:862: checking if gcc supports -c -o file.lo
+ltconfig:863: gcc -c -g -O2 -c -o conftest.lo  conftest.c 1>&5
+ltconfig:914: checking if gcc supports -fno-rtti -fno-exceptions
+ltconfig:915: gcc -c -g -O2 -fno-rtti -fno-exceptions -c conftest.c  conftest.c 1>&5
+ltconfig:958: checking if gcc static flag -static works
+ltconfig:959: gcc -o conftest -g -O2   -static conftest.c  1>&5
+GNU ld version 2.10.91 (with BFD 2.10.91.0.2)
+ltconfig:1635: checking if global_symbol_pipe works
+ltconfig:1636: gcc -c -g -O2  conftest.c 1>&5
+ltconfig:1639: eval "/usr/bin/nm -B conftest.o | sed -n -e 's/^.*[     ]\([ABCDGISTW]\)[       ][      ]*\(\)\([_A-Za-z][_A-Za-z0-9]*\)$/\1 \2\3 \3/p' > conftest.nm"
+ltconfig:1691: gcc -o conftest -g -O2 -fno-builtin -fno-rtti -fno-exceptions   conftest.c conftstm.o 1>&5
+configure:2150: checking for a BSD compatible install
+configure:2231: checking for alloca.h
+configure:2231: checking for libintl.h
+configure:2231: checking for mcheck.h
+configure:2231: checking for unistd.h
+configure:2268: checking for /usr/ucblib in LIBS
+configure:2284: checking for GNU xgettext
+configure:2294: checking for strerror
+configure:2294: checking for mtrace
+configure:2347: checking for setreuid
+configure:2438: checking for working const
+configure:2513: checking for inline
+configure:2553: checking for off_t
+configure:2586: checking for size_t
+configure:2621: checking for working alloca.h
+configure:2654: checking for alloca
+configure:2856: checking for unistd.h
+configure:2895: checking for getpagesize
+configure:2948: checking for working mmap
+configure:3124: checking for argz.h
+configure:3124: checking for limits.h
+configure:3124: checking for locale.h
+configure:3124: checking for nl_types.h
+configure:3124: checking for malloc.h
+configure:3124: checking for string.h
+configure:3124: checking for unistd.h
+configure:3124: checking for sys/param.h
+configure:3164: checking for getcwd
+configure:3164: checking for munmap
+configure:3164: checking for putenv
+configure:3164: checking for setenv
+configure:3164: checking for setlocale
+configure:3164: checking for strchr
+configure:3164: checking for strcasecmp
+configure:3164: checking for strdup
+configure:3164: checking for __argz_count
+configure:3164: checking for __argz_stringify
+configure:3164: checking for __argz_next
+configure:3283: checking for LC_MESSAGES
+configure:3316: checking whether NLS is requested
+configure:3336: checking whether included gettext is requested
+configure:3355: checking for libintl.h
+configure:3382: checking for gettext in libc
+configure:3508: checking for msgfmt
+configure:3542: checking for dcgettext
+configure:3597: checking for gmsgfmt
+configure:3633: checking for xgettext
+configure:3673: gcc -o conftest -Wall -g -O2   conftest.c  1>&5
+configure:4131: checking for catalogs to be installed
similarity index 68%
rename from popt-1.2/findme.c
rename to popt/findme.c
index 1cda62c..6d1b41c 100644 (file)
@@ -2,27 +2,10 @@
    file accompanying popt source distributions, available from 
    ftp://ftp.redhat.com/pub/code/popt */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#ifdef __NeXT
-/* access macros are not declared in non posix mode in unistd.h -
- don't try to use posix on NeXTstep 3.3 ! */ 
-#include <libc.h>
-#endif
-
-#if HAVE_ALLOCA_H
-# include <alloca.h>
-#endif
-
+#include "system.h"
 #include "findme.h"
 
-char * findProgramPath(char * argv0) {
+const char * findProgramPath(const char * argv0) {
     char * path = getenv("PATH");
     char * pathbuf;
     char * start, * chptr;
@@ -31,7 +14,7 @@ char * findProgramPath(char * argv0) {
     /* If there is a / in the argv[0], it has to be an absolute
        path */
     if (strchr(argv0, '/'))
-       return strdup(argv0);
+       return xstrdup(argv0);
 
     if (!path) return NULL;
 
similarity index 81%
rename from popt-1.2/findme.h
rename to popt/findme.h
index fdd01d5..5e93963 100644 (file)
@@ -5,6 +5,6 @@
 #ifndef H_FINDME
 #define H_FINDME
 
-char * findProgramPath(char * argv0);
+const char * findProgramPath(const char * argv0);
 
 #endif
similarity index 53%
rename from popt-1.2/popt.c
rename to popt/popt.c
index 9ebc81b..ae608f1 100644 (file)
@@ -1,26 +1,9 @@
 /* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING
-   file accompanying popt source distributions, available from 
+   file accompanying popt source distributions, available from
    ftp://ftp.redhat.com/pub/code/popt */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <errno.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <limits.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#if HAVE_ALLOCA_H
-# include <alloca.h>
-#endif
-
+#include "system.h"
 #include "findme.h"
-#include "popt.h"
 #include "poptint.h"
 
 #ifndef HAVE_STRERROR
@@ -36,8 +19,8 @@ static char * strerror(int errno) {
 #endif
 
 void poptSetExecPath(poptContext con, const char * path, int allowAbsolute) {
-    if (con->execPath) free(con->execPath);
-    con->execPath = strdup(path);
+    if (con->execPath) xfree(con->execPath);
+    con->execPath = xstrdup(path);
     con->execAbsolute = allowAbsolute;
 }
 
@@ -45,14 +28,14 @@ static void invokeCallbacks(poptContext con, const struct poptOption * table,
                            int post) {
     const struct poptOption * opt = table;
     poptCallbackType cb;
-    
+
     while (opt->longName || opt->shortName || opt->arg) {
        if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
            invokeCallbacks(con, opt->arg, post);
        } else if (((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_CALLBACK) &&
                   ((!post && (opt->argInfo & POPT_CBFLAG_PRE)) ||
                    ( post && (opt->argInfo & POPT_CBFLAG_POST)))) {
-           cb = opt->arg;
+           cb = (poptCallbackType)opt->arg;
            cb(con, post ? POPT_CALLBACK_REASON_POST : POPT_CALLBACK_REASON_PRE,
               NULL, NULL, opt->descrip);
        }
@@ -60,7 +43,7 @@ static void invokeCallbacks(poptContext con, const struct poptOption * table,
     }
 }
 
-poptContext poptGetContext(char * name, int argc, char ** argv, 
+poptContext poptGetContext(const char * name, int argc, const char ** argv,
                           const struct poptOption * options, int flags) {
     poptContext con = malloc(sizeof(*con));
 
@@ -69,20 +52,26 @@ poptContext poptGetContext(char * name, int argc, char ** argv,
     con->os = con->optionStack;
     con->os->argc = argc;
     con->os->argv = argv;
+    con->os->argb = NULL;
 
     if (!(flags & POPT_CONTEXT_KEEP_FIRST))
        con->os->next = 1;                      /* skip argv[0] */
 
-    con->leftovers = malloc(sizeof(char *) * (argc + 1));
+    con->leftovers = calloc( (argc + 1), sizeof(char *) );
     con->options = options;
-    con->finalArgv = malloc(sizeof(*con->finalArgv) * (argc * 2));
-    con->finalArgvAlloced = argc * 2;
+    con->aliases = NULL;
+    con->numAliases = 0;
     con->flags = flags;
+    con->execs = NULL;
+    con->numExecs = 0;
+    con->finalArgvAlloced = argc * 2;
+    con->finalArgv = calloc( con->finalArgvAlloced, sizeof(*con->finalArgv) );
     con->execAbsolute = 1;
+    con->arg_strip = NULL;
 
     if (getenv("POSIXLY_CORRECT") || getenv("POSIX_ME_HARDER"))
        con->flags |= POPT_CONTEXT_POSIXMEHARDER;
-    
+
     if (name)
        con->appName = strcpy(malloc(strlen(name) + 1), name);
 
@@ -91,8 +80,32 @@ poptContext poptGetContext(char * name, int argc, char ** argv,
     return con;
 }
 
+static void cleanOSE(struct optionStackEntry *os)
+{
+    if (os->nextArg) {
+       xfree(os->nextArg);
+       os->nextArg = NULL;
+    }
+    if (os->argv) {
+       xfree(os->argv);
+       os->argv = NULL;
+    }
+    if (os->argb) {
+       PBM_FREE(os->argb);
+       os->argb = NULL;
+    }
+}
+
 void poptResetContext(poptContext con) {
-    con->os = con->optionStack;
+    int i;
+
+    while (con->os > con->optionStack) {
+       cleanOSE(con->os--);
+    }
+    if (con->os->argb) {
+       PBM_FREE(con->os->argb);
+       con->os->argb = NULL;
+    }
     con->os->currAlias = NULL;
     con->os->nextCharArg = NULL;
     con->os->nextArg = NULL;
@@ -102,7 +115,20 @@ void poptResetContext(poptContext con) {
     con->nextLeftover = 0;
     con->restLeftover = 0;
     con->doExec = NULL;
+
+    for (i = 0; i < con->finalArgvCount; i++) {
+       if (con->finalArgv[i]) {
+           xfree(con->finalArgv[i]);
+           con->finalArgv[i] = NULL;
+       }
+    }
+
     con->finalArgvCount = 0;
+
+    if (con->arg_strip) {
+       PBM_FREE(con->arg_strip);
+       con->arg_strip = NULL;
+    }
 }
 
 /* Only one of longName, shortName may be set at a time */
@@ -123,7 +149,7 @@ static int handleExec(poptContext con, char * longName, char shortName) {
     if (con->flags & POPT_CONTEXT_NO_EXEC)
        return 1;
 
-    if (!con->doExec) {
+    if (con->doExec == NULL) {
        con->doExec = con->execs + i;
        return 1;
     }
@@ -137,24 +163,27 @@ static int handleExec(poptContext con, char * longName, char shortName) {
     }
 
     i = con->finalArgvCount++;
-    con->finalArgv[i] = malloc((longName ? strlen(longName) : 0) + 3);
-    if (longName)
-       sprintf(con->finalArgv[i], "--%s", longName);
-    else 
-       sprintf(con->finalArgv[i], "-%c", shortName);
+    {  char *s  = malloc((longName ? strlen(longName) : 0) + 3);
+       if (longName)
+           sprintf(s, "--%s", longName);
+       else
+           sprintf(s, "-%c", shortName);
+       con->finalArgv[i] = s;
+    }
 
     return 1;
 }
 
 /* Only one of longName, shortName may be set at a time */
-static int handleAlias(poptContext con, char * longName, char shortName,
-                      char * nextCharArg) {
+static int handleAlias(poptContext con, const char * longName, char shortName,
+                      /*@keep@*/ const char * nextCharArg) {
     int i;
 
     if (con->os->currAlias && con->os->currAlias->longName && longName &&
-       !strcmp(con->os->currAlias->longName, longName)) 
+       !strcmp(con->os->currAlias->longName, longName))
        return 0;
-    if (con->os->currAlias && shortName == con->os->currAlias->shortName)
+    if (con->os->currAlias && shortName &&
+           shortName == con->os->currAlias->shortName)
        return 0;
 
     i = con->numAliases - 1;
@@ -168,8 +197,7 @@ static int handleAlias(poptContext con, char * longName, char shortName,
 
     if (i < 0) return 0;
 
-    if ((con->os - con->optionStack + 1) 
-           == POPT_OPTION_DEPTH)
+    if ((con->os - con->optionStack + 1) == POPT_OPTION_DEPTH)
        return POPT_ERROR_OPTSTOODEEP;
 
     if (nextCharArg && *nextCharArg)
@@ -178,27 +206,30 @@ static int handleAlias(poptContext con, char * longName, char shortName,
     con->os++;
     con->os->next = 0;
     con->os->stuffed = 0;
-    con->os->nextArg = con->os->nextCharArg = NULL;
+    con->os->nextArg = NULL;
+    con->os->nextCharArg = NULL;
     con->os->currAlias = con->aliases + i;
-    con->os->argc = con->os->currAlias->argc;
-    con->os->argv = con->os->currAlias->argv;
+    poptDupArgv(con->os->currAlias->argc, con->os->currAlias->argv,
+               &con->os->argc, &con->os->argv);
+    con->os->argb = NULL;
 
     return 1;
 }
 
 static void execCommand(poptContext con) {
-    char ** argv;
+    const char ** argv;
     int pos = 0;
-    char * script = con->doExec->script;
+    const char * script = con->doExec->script;
 
-    argv = malloc(sizeof(*argv) * 
+    argv = malloc(sizeof(*argv) *
                        (6 + con->numLeftovers + con->finalArgvCount));
 
     if (!con->execAbsolute && strchr(script, '/')) return;
 
     if (!strchr(script, '/') && con->execPath) {
-       argv[pos] = alloca(strlen(con->execPath) + strlen(script) + 2);
-       sprintf(argv[pos], "%s/%s", con->execPath, script);
+       char *s = alloca(strlen(con->execPath) + strlen(script) + 2);
+       sprintf(s, "%s/%s", con->execPath, script);
+       argv[pos] = s;
     } else {
        argv[pos] = script;
     }
@@ -222,25 +253,40 @@ static void execCommand(poptContext con) {
 #ifdef __hpux
     setresuid(getuid(), getuid(),-1);
 #else
+/*
+ * XXX " ... on BSD systems setuid() should be preferred over setreuid()"
+ * XXX         sez' Timur Bakeyev <mc@bat.ru>
+ * XXX from Norbert Warmuth <nwarmuth@privat.circular.de>
+ */
+#if defined(HAVE_SETUID)
+    setuid(getuid());
+#elif defined (HAVE_SETREUID)
     setreuid(getuid(), getuid()); /*hlauer: not portable to hpux9.01 */
+#else
+    ; /* Can't drop privileges */
+#endif
 #endif
 
-    execvp(argv[0], argv);
+    execvp(argv[0], (char *const *)argv);
 }
 
-static const struct poptOption * findOption(const struct poptOption * table,
-                                           const char * longName,
-                                           const char shortName,
-                                           poptCallbackType * callback,
-                                           void ** callbackData,
-                                           int singleDash) {
+/*@observer@*/ static const struct poptOption *
+findOption(const struct poptOption * table, const char * longName,
+    char shortName,
+    /*@out@*/ poptCallbackType * callback, /*@out@*/ const void ** callbackData,
+    int singleDash)
+{
     const struct poptOption * opt = table;
     const struct poptOption * opt2;
     const struct poptOption * cb = NULL;
 
+    /* This happens when a single - is given */
+    if (singleDash && !shortName && !*longName)
+       shortName = '-';
+
     while (opt->longName || opt->shortName || opt->arg) {
        if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
-           opt2 = findOption(opt->arg, longName, shortName, callback, 
+           opt2 = findOption(opt->arg, longName, shortName, callback,
                              callbackData, singleDash);
            if (opt2) {
                if (*callback && !*callbackData)
@@ -249,7 +295,7 @@ static const struct poptOption * findOption(const struct poptOption * table,
            }
        } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_CALLBACK) {
            cb = opt;
-       } else if (longName && opt->longName && 
+       } else if (longName && opt->longName &&
                   (!singleDash || (opt->argInfo & POPT_ARGFLAG_ONEDASH)) &&
                   !strcmp(longName, opt->longName)) {
            break;
@@ -263,7 +309,7 @@ static const struct poptOption * findOption(const struct poptOption * table,
     *callbackData = NULL;
     *callback = NULL;
     if (cb) {
-       *callback = cb->arg;
+       *callback = (poptCallbackType)cb->arg;
        if (!(cb->argInfo & POPT_CBFLAG_INC_DATA))
            *callbackData = cb->descrip;
     }
@@ -271,32 +317,114 @@ static const struct poptOption * findOption(const struct poptOption * table,
     return opt;
 }
 
+static const char *findNextArg(poptContext con, unsigned argx, int delete)
+{
+    struct optionStackEntry * os = con->os;
+    const char * arg;
+
+    do {
+       int i;
+       arg = NULL;
+       while (os->next == os->argc && os > con->optionStack) os--;
+       if (os->next == os->argc && os == con->optionStack) break;
+       for (i = os->next; i < os->argc; i++) {
+           if (os->argb && PBM_ISSET(i, os->argb)) continue;
+           if (*os->argv[i] == '-') continue;
+           if (--argx > 0) continue;
+           arg = os->argv[i];
+           if (delete) {
+               if (os->argb == NULL) os->argb = PBM_ALLOC(os->argc);
+               PBM_SET(i, os->argb);
+           }
+           break;
+       }
+       if (os > con->optionStack) os--;
+    } while (arg == NULL);
+    return arg;
+}
+
+static /*@only@*/ const char * expandNextArg(poptContext con, const char * s)
+{
+    const char *a;
+    size_t alen;
+    char *t, *te;
+    size_t tn = strlen(s) + 1;
+    char c;
+
+    te = t = malloc(tn);;
+    while ((c = *s++) != '\0') {
+       switch (c) {
+#if 0  /* XXX can't do this */
+       case '\\':      /* escape */
+           c = *s++;
+           break;
+#endif
+       case '!':
+           if (!(s[0] == '#' && s[1] == ':' && s[2] == '+'))
+               break;
+           if ((a = findNextArg(con, 1, 1)) == NULL)
+               break;
+           s += 3;
+
+           alen = strlen(a);
+           tn += alen;
+           *te = '\0';
+           t = realloc(t, tn);
+           te = t + strlen(t);
+           strncpy(te, a, alen); te += alen;
+           continue;
+           /*@notreached@*/ break;
+       default:
+           break;
+       }
+       *te++ = c;
+    }
+    *te = '\0';
+    t = realloc(t, strlen(t)+1);       /* XXX memory leak, hard to plug */
+    return t;
+}
+
+static void poptStripArg(poptContext con, int which)
+{
+    if(con->arg_strip == NULL) {
+       con->arg_strip = PBM_ALLOC(con->optionStack[0].argc);
+    }
+    PBM_SET(which, con->arg_strip);
+}
+
 /* returns 'val' element, -1 on last item, POPT_ERROR_* on error */
-int poptGetNextOpt(poptContext con) {
-    char * optString, * chptr, * localOptString;
-    char * longArg = NULL;
-    char * origOptString;
-    long aLong;
-    char * end;
+int poptGetNextOpt(poptContext con)
+{
     const struct poptOption * opt = NULL;
     int done = 0;
-    int i;
-    poptCallbackType cb;
-    void * cbData;
-    int singleDash;
 
     while (!done) {
-       while (!con->os->nextCharArg && con->os->next == con->os->argc 
-               && con->os > con->optionStack)
-           con->os--;
+       const char * origOptString = NULL;
+       poptCallbackType cb = NULL;
+       const void * cbData = NULL;
+       const char * longArg = NULL;
+       int canstrip = 0;
+
+       while (!con->os->nextCharArg && con->os->next == con->os->argc
+               && con->os > con->optionStack) {
+           cleanOSE(con->os--);
+       }
        if (!con->os->nextCharArg && con->os->next == con->os->argc) {
            invokeCallbacks(con, con->options, 1);
            if (con->doExec) execCommand(con);
            return -1;
        }
 
+       /* Process next long option */
        if (!con->os->nextCharArg) {
-               
+           char * localOptString, * optString;
+           int thisopt;
+
+           if (con->os->argb && PBM_ISSET(con->os->next, con->os->argb)) {
+               con->os->next++;
+               continue;
+           }
+           thisopt=con->os->next;
            origOptString = con->os->argv[con->os->next++];
 
            if (con->restLeftover || *origOptString != '-') {
@@ -307,8 +435,8 @@ int poptGetNextOpt(poptContext con) {
            }
 
            /* Make a copy we can hack at */
-           localOptString = optString = 
-                       strcpy(alloca(strlen(origOptString) + 1), 
+           localOptString = optString =
+                       strcpy(alloca(strlen(origOptString) + 1),
                        origOptString);
 
            if (!optString[0])
@@ -318,33 +446,48 @@ int poptGetNextOpt(poptContext con) {
                con->restLeftover = 1;
                continue;
            } else {
+               char *oe;
+               int singleDash;
+
                optString++;
                if (*optString == '-')
                    singleDash = 0, optString++;
                else
                    singleDash = 1;
 
+               /* XXX aliases with arg substitution need "--alias=arg" */
                if (handleAlias(con, optString, '\0', NULL))
                    continue;
                if (handleExec(con, optString, '\0'))
                    continue;
 
-               chptr = optString;
-               while (*chptr && *chptr != '=') chptr++;
-               if (*chptr == '=') {
-                   longArg = origOptString + (chptr - localOptString) + 1;
-                   *chptr = '\0';
+               /* Check for "--long=arg" option. */
+               for (oe = optString; *oe && *oe != '='; oe++)
+                   ;
+               if (*oe == '=') {
+                   *oe++ = '\0';
+                   /* XXX longArg is mapped back to persistent storage. */
+                   longArg = origOptString + (oe - localOptString);
                }
 
                opt = findOption(con->options, optString, '\0', &cb, &cbData,
                                 singleDash);
-               if (!opt && !singleDash) return POPT_ERROR_BADOPT;
+               if (!opt && !singleDash)
+                   return POPT_ERROR_BADOPT;
            }
 
-           if (!opt)
+           if (!opt) {
                con->os->nextCharArg = origOptString + 1;
+           } else {
+               if(con->os == con->optionStack &&
+                  opt->argInfo & POPT_ARGFLAG_STRIP) {
+                   canstrip = 1;
+                   poptStripArg(con, thisopt);
+               }
+           }
        }
 
+       /* Process next short option */
        if (con->os->nextCharArg) {
            origOptString = con->os->nextCharArg;
 
@@ -358,43 +501,64 @@ int poptGetNextOpt(poptContext con) {
            if (handleExec(con, NULL, *origOptString))
                continue;
 
-           opt = findOption(con->options, NULL, *origOptString, &cb, 
+           opt = findOption(con->options, NULL, *origOptString, &cb,
                             &cbData, 0);
-           if (!opt) return POPT_ERROR_BADOPT;
+           if (!opt)
+               return POPT_ERROR_BADOPT;
 
            origOptString++;
            if (*origOptString)
                con->os->nextCharArg = origOptString;
        }
 
-       if (opt->arg && (opt->argInfo & POPT_ARG_MASK) == POPT_ARG_NONE) 
+       if (opt->arg && (opt->argInfo & POPT_ARG_MASK) == POPT_ARG_NONE) {
            *((int *)opt->arg) = 1;
-       else if ((opt->argInfo & POPT_ARG_MASK) != POPT_ARG_NONE) {
+       } else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_VAL) {
+           if (opt->arg)
+               *((int *) opt->arg) = opt->val;
+       } else if ((opt->argInfo & POPT_ARG_MASK) != POPT_ARG_NONE) {
+           if (con->os->nextArg) {
+               xfree(con->os->nextArg);
+               con->os->nextArg = NULL;
+           }
            if (longArg) {
-               con->os->nextArg = longArg;
+               con->os->nextArg = expandNextArg(con, longArg);
            } else if (con->os->nextCharArg) {
-               con->os->nextArg = con->os->nextCharArg;
+               con->os->nextArg = expandNextArg(con, con->os->nextCharArg);
                con->os->nextCharArg = NULL;
-           } else { 
-               while (con->os->next == con->os->argc && 
-                      con->os > con->optionStack)
-                   con->os--;
+           } else {
+               while (con->os->next == con->os->argc &&
+                      con->os > con->optionStack) {
+                   cleanOSE(con->os--);
+               }
                if (con->os->next == con->os->argc)
                    return POPT_ERROR_NOARG;
 
-               con->os->nextArg = con->os->argv[con->os->next++];
+               /* make sure this isn't part of a short arg or the
+                   result of an alias expansion */
+               if(con->os == con->optionStack &&
+                  opt->argInfo & POPT_ARGFLAG_STRIP &&
+                  canstrip) {
+                   poptStripArg(con, con->os->next);
+               }
+               
+               con->os->nextArg = expandNextArg(con, con->os->argv[con->os->next++]);
            }
 
            if (opt->arg) {
+               long aLong;
+               char *end;
+
                switch (opt->argInfo & POPT_ARG_MASK) {
                  case POPT_ARG_STRING:
-                   *((char **) opt->arg) = con->os->nextArg;
+                   /* XXX memory leak, hard to plug */
+                   *((const char **) opt->arg) = xstrdup(con->os->nextArg);
                    break;
 
                  case POPT_ARG_INT:
                  case POPT_ARG_LONG:
                    aLong = strtol(con->os->nextArg, &end, 0);
-                   if (*end) 
+                   if (!(end && *end == '\0'))
                        return POPT_ERROR_BADNUMBER;
 
                    if (aLong == LONG_MIN || aLong == LONG_MAX)
@@ -404,21 +568,21 @@ int poptGetNextOpt(poptContext con) {
                    } else {
                        if (aLong > INT_MAX || aLong < INT_MIN)
                            return POPT_ERROR_OVERFLOW;
-                       *((int *) opt->arg) =aLong;
+                       *((int *) opt->arg) = aLong;
                    }
                    break;
 
                  default:
                    fprintf(stdout, POPT_("option type (%d) not implemented in popt\n"),
                      opt->argInfo & POPT_ARG_MASK);
-                   exit(1);
+                   exit(EXIT_FAILURE);
                }
            }
        }
 
        if (cb)
            cb(con, POPT_CALLBACK_REASON_OPTION, opt, con->os->nextArg, cbData);
-       else if (opt->val
+       else if (opt->val && ((opt->argInfo & POPT_ARG_MASK) != POPT_ARG_VAL))
            done = 1;
 
        if ((con->finalArgvCount + 2) >= (con->finalArgvAlloced)) {
@@ -427,38 +591,40 @@ int poptGetNextOpt(poptContext con) {
                            sizeof(*con->finalArgv) * con->finalArgvAlloced);
        }
 
-       i = con->finalArgvCount++;
-       con->finalArgv[i] = 
-               malloc((opt->longName ? strlen(opt->longName) : 0) + 3);
-       if (opt->longName)
-           sprintf(con->finalArgv[i], "--%s", opt->longName);
-       else 
-           sprintf(con->finalArgv[i], "-%c", opt->shortName);
+       {    char *s = malloc((opt->longName ? strlen(opt->longName) : 0) + 3);
+           if (opt->longName)
+               sprintf(s, "--%s", opt->longName);
+           else
+               sprintf(s, "-%c", opt->shortName);
+           con->finalArgv[con->finalArgvCount++] = s;
+       }
 
-       if (opt->arg && (opt->argInfo & POPT_ARG_MASK) != POPT_ARG_NONE) 
-           con->finalArgv[con->finalArgvCount++] = strdup(con->os->nextArg);
+       if (opt->arg && (opt->argInfo & POPT_ARG_MASK) != POPT_ARG_NONE
+                    && (opt->argInfo & POPT_ARG_MASK) != POPT_ARG_VAL) {
+           con->finalArgv[con->finalArgvCount++] = xstrdup(con->os->nextArg);
+       }
     }
 
     return opt->val;
 }
 
-char * poptGetOptArg(poptContext con) {
-    char * ret = con->os->nextArg;
+const char * poptGetOptArg(poptContext con) {
+    const char * ret = con->os->nextArg;
     con->os->nextArg = NULL;
     return ret;
 }
 
-char * poptGetArg(poptContext con) {
+const char * poptGetArg(poptContext con) {
     if (con->numLeftovers == con->nextLeftover) return NULL;
-    return (con->leftovers[con->nextLeftover++]);
+    return con->leftovers[con->nextLeftover++];
 }
 
-char * poptPeekArg(poptContext con) {
+const char * poptPeekArg(poptContext con) {
     if (con->numLeftovers == con->nextLeftover) return NULL;
-    return (con->leftovers[con->nextLeftover]);
+    return con->leftovers[con->nextLeftover];
 }
 
-char ** poptGetArgs(poptContext con) {
+const char ** poptGetArgs(poptContext con) {
     if (con->numLeftovers == con->nextLeftover) return NULL;
 
     /* some apps like [like RPM ;-) ] need this NULL terminated */
@@ -470,28 +636,34 @@ char ** poptGetArgs(poptContext con) {
 void poptFreeContext(poptContext con) {
     int i;
 
+    poptResetContext(con);
+    if (con->os->argb) free(con->os->argb);
+
     for (i = 0; i < con->numAliases; i++) {
-       if (con->aliases[i].longName) free(con->aliases[i].longName);
+       if (con->aliases[i].longName) xfree(con->aliases[i].longName);
        free(con->aliases[i].argv);
     }
 
     for (i = 0; i < con->numExecs; i++) {
-       if (con->execs[i].longName) free(con->execs[i].longName);
-       free(con->execs[i].script);
+       if (con->execs[i].longName) xfree(con->execs[i].longName);
+       xfree(con->execs[i].script);
     }
-
-    for (i = 0; i < con->finalArgvCount; i++)
-       free(con->finalArgv[i]);
+    if (con->execs) xfree(con->execs);
 
     free(con->leftovers);
     free(con->finalArgv);
-    if (con->appName) free(con->appName);
+    if (con->appName) xfree(con->appName);
     if (con->aliases) free(con->aliases);
-    if (con->otherHelp) free(con->otherHelp);
+    if (con->otherHelp) xfree(con->otherHelp);
+    if (con->execPath) xfree(con->execPath);
+    if (con->arg_strip) PBM_FREE(con->arg_strip);
+    
     free(con);
 }
 
-int poptAddAlias(poptContext con, struct poptAlias newAlias, int flags) {
+int poptAddAlias(poptContext con, struct poptAlias newAlias,
+               /*@unused@*/ int flags)
+{
     int aliasNum = con->numAliases++;
     struct poptAlias * alias;
 
@@ -499,21 +671,21 @@ int poptAddAlias(poptContext con, struct poptAlias newAlias, int flags) {
     if (!con->aliases)
        con->aliases = malloc(sizeof(newAlias) * con->numAliases);
     else
-       con->aliases = realloc(con->aliases, 
+       con->aliases = realloc(con->aliases,
                               sizeof(newAlias) * con->numAliases);
     alias = con->aliases + aliasNum;
-    
-    *alias = newAlias;
-    if (alias->longName)
-       alias->longName = strcpy(malloc(strlen(alias->longName) + 1), 
-                                   alias->longName);
-    else
-       alias->longName = NULL;
+
+    alias->longName = (newAlias.longName)
+       ? strcpy(malloc(strlen(newAlias.longName) + 1), newAlias.longName)
+       : NULL;
+    alias->shortName = newAlias.shortName;
+    alias->argc = newAlias.argc;
+    alias->argv = newAlias.argv;
 
     return 0;
 }
 
-char * poptBadOption(poptContext con, int flags) {
+const char * poptBadOption(poptContext con, int flags) {
     struct optionStackEntry * os;
 
     if (flags & POPT_BADOPTION_NOALIAS)
@@ -530,7 +702,7 @@ char * poptBadOption(poptContext con, int flags) {
 #define POPT_ERROR_BADQUOTE    -15     /* only from poptParseArgString() */
 #define POPT_ERROR_ERRNO       -16     /* only from poptParseArgString() */
 
-const char * poptStrerror(const int error) {
+const char *const poptStrerror(const int error) {
     switch (error) {
       case POPT_ERROR_NOARG:
        return POPT_("missing argument");
@@ -551,20 +723,22 @@ const char * poptStrerror(const int error) {
     }
 }
 
-int poptStuffArgs(poptContext con, char ** argv) {
-    int i;
+int poptStuffArgs(poptContext con, const char ** argv) {
+    int argc;
 
     if ((con->os - con->optionStack) == POPT_OPTION_DEPTH)
        return POPT_ERROR_OPTSTOODEEP;
 
-    for (i = 0; argv[i]; i++);
+    for (argc = 0; argv[argc]; argc++)
+       ;
 
     con->os++;
     con->os->next = 0;
-    con->os->nextArg = con->os->nextCharArg = NULL;
+    con->os->nextArg = NULL;
+    con->os->nextCharArg = NULL;
     con->os->currAlias = NULL;
-    con->os->argc = i;
-    con->os->argv = argv;
+    poptDupArgv(argc, argv, &con->os->argc, &con->os->argv);
+    con->os->argb = NULL;
     con->os->stuffed = 1;
 
     return 0;
@@ -573,3 +747,28 @@ int poptStuffArgs(poptContext con, char ** argv) {
 const char * poptGetInvocationName(poptContext con) {
     return con->os->argv[0];
 }
+
+int poptStrippedArgv(poptContext con, int argc, char **argv)
+{
+    int i,j=1, numargs=argc;
+    
+    for(i=1; i<argc; i++) {
+       if(PBM_ISSET(i, con->arg_strip)) {
+           numargs--;
+       }
+    }
+    
+    for(i=1; i<argc; i++) {
+       if(PBM_ISSET(i, con->arg_strip)) {
+           continue;
+       } else {
+           if(j<numargs) {
+               argv[j++]=argv[i];
+           } else {
+               argv[j++]='\0';
+           }
+       }
+    }
+    
+    return(numargs);
+}
similarity index 61%
rename from popt-1.2/popt.h
rename to popt/popt.h
index 9bac797..e6fa8bd 100644 (file)
@@ -5,6 +5,10 @@
 #ifndef H_POPT
 #define H_POPT
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #include <stdio.h>                     /* for FILE * */
 
 #define POPT_OPTION_DEPTH      10
                                           set first in table; arg points 
                                           to callback, descrip points to 
                                           callback data to pass */
+#define POPT_ARG_INTL_DOMAIN    6       /* set the translation domain
+                                          for this table and any
+                                          included tables; arg points
+                                          to the domain string */
+#define POPT_ARG_VAL           7       /* arg should take value val */
 #define POPT_ARG_MASK          0x0000FFFF
 #define POPT_ARGFLAG_ONEDASH   0x80000000  /* allow -longoption */
 #define POPT_ARGFLAG_DOC_HIDDEN 0x40000000  /* don't show in help/usage */
+#define POPT_ARGFLAG_STRIP     0x20000000  /* strip this arg from argv (only applies to long args) */
 #define POPT_CBFLAG_PRE                0x80000000  /* call the callback before parse */
 #define POPT_CBFLAG_POST       0x40000000  /* call the callback after parse */
 #define POPT_CBFLAG_INC_DATA   0x20000000  /* use data from the include line,
 #define POPT_CONTEXT_POSIXMEHARDER (1 << 2) /* options can't follow args */
 
 struct poptOption {
-    const char * longName;     /* may be NULL */
+    /*@observer@*/ /*@null@*/ const char * longName;   /* may be NULL */
     char shortName;            /* may be '\0' */
     int argInfo;
-    void * arg;                        /* depends on argInfo */
+    /*@shared@*/ /*@null@*/ void * arg;                /* depends on argInfo */
     int val;                   /* 0 means don't return, just update flag */
-    char * descrip;            /* description for autohelp -- may be NULL */
-    char * argDescrip;         /* argument description for autohelp */
+    /*@shared@*/ /*@null@*/ const char * descrip;      /* description for autohelp -- may be NULL */
+    /*@shared@*/ /*@null@*/ const char * argDescrip;   /* argument description for autohelp */
 };
 
 struct poptAlias {
-    char * longName;           /* may be NULL */
+    /*@owned@*/ /*@null@*/ const char * longName;      /* may be NULL */
     char shortName;            /* may be '\0' */
     int argc;
-    char ** argv;              /* must be free()able */
+    /*@owned@*/ const char ** argv;            /* must be free()able */
 };
 
 extern struct poptOption poptHelpOptions[];
@@ -74,37 +84,47 @@ enum poptCallbackReason { POPT_CALLBACK_REASON_PRE,
 typedef void (*poptCallbackType)(poptContext con, 
                                 enum poptCallbackReason reason,
                                 const struct poptOption * opt,
-                                const char * arg, void * data);
+                                const char * arg, const void * data);
 
-poptContext poptGetContext(char * name, int argc, char ** argv, 
-                          const struct poptOption * options, int flags);
+/*@only@*/ poptContext poptGetContext(/*@keep@*/ const char * name,
+               int argc, /*@keep@*/ const char ** argv,
+               /*@keep@*/ const struct poptOption * options, int flags);
 void poptResetContext(poptContext con);
 
 /* returns 'val' element, -1 on last item, POPT_ERROR_* on error */
 int poptGetNextOpt(poptContext con);
 /* returns NULL if no argument is available */
-char * poptGetOptArg(poptContext con);
+/*@observer@*/ /*@null@*/ const char * poptGetOptArg(poptContext con);
 /* returns NULL if no more options are available */
-char * poptGetArg(poptContext con);
-char * poptPeekArg(poptContext con);
-char ** poptGetArgs(poptContext con);
+/*@observer@*/ /*@null@*/ const char * poptGetArg(poptContext con);
+/*@observer@*/ /*@null@*/ const char * poptPeekArg(poptContext con);
+/*@observer@*/ /*@null@*/ const char ** poptGetArgs(poptContext con);
 /* returns the option which caused the most recent error */
-char * poptBadOption(poptContext con, int flags);
-void poptFreeContext(poptContext con);
-int poptStuffArgs(poptContext con, char ** argv);
+/*@observer@*/ const char * poptBadOption(poptContext con, int flags);
+void poptFreeContext( /*@only@*/ poptContext con);
+int poptStuffArgs(poptContext con, /*@keep@*/ const char ** argv);
 int poptAddAlias(poptContext con, struct poptAlias alias, int flags);
-int poptReadConfigFile(poptContext con, char * fn);
+int poptReadConfigFile(poptContext con, const char * fn);
 /* like above, but reads /etc/popt and $HOME/.popt along with environment 
    vars */
 int poptReadDefaultConfig(poptContext con, int useEnv);
 /* argv should be freed -- this allows ', ", and \ quoting, but ' is treated
    the same as " and both may include \ quotes */
-int poptParseArgvString(char * s, int * argcPtr, char *** argvPtr);
-const char * poptStrerror(const int error);
+int poptDupArgv(int argc, const char **argv,
+               /*@out@*/ int * argcPtr, /*@out@*/ const char *** argvPtr);
+int poptParseArgvString(const char * s,
+               /*@out@*/ int * argcPtr, /*@out@*/ const char *** argvPtr);
+/*@observer@*/ const char *const poptStrerror(const int error);
 void poptSetExecPath(poptContext con, const char * path, int allowAbsolute);
 void poptPrintHelp(poptContext con, FILE * f, int flags);
 void poptPrintUsage(poptContext con, FILE * f, int flags);
 void poptSetOtherOptionHelp(poptContext con, const char * text);
-const char * poptGetInvocationName(poptContext con);
+/*@observer@*/ const char * poptGetInvocationName(poptContext con);
+/* shuffles argv pointers to remove stripped args, returns new argc */
+int poptStrippedArgv(poptContext con, int argc, char **argv);
+
+#ifdef  __cplusplus
+}
+#endif
 
 #endif
similarity index 83%
rename from popt-1.2/poptconfig.c
rename to popt/poptconfig.c
index 8f2656d..7a1a4c2 100644 (file)
@@ -2,22 +2,7 @@
    file accompanying popt source distributions, available from 
    ftp://ftp.redhat.com/pub/code/popt */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <ctype.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-
-#if HAVE_ALLOCA_H
-# include <alloca.h>
-#endif
-
-#include "popt.h"
+#include "system.h"
 #include "poptint.h"
 
 static void configLine(poptContext con, char * line) {
@@ -55,21 +40,21 @@ static void configLine(poptContext con, char * line) {
        alias.longName = longName, alias.shortName = shortName;
        poptAddAlias(con, alias, 0);
     } else if (!strcmp(entryType, "exec")) {
-       con->execs = realloc(con->execs, 
+       con->execs = realloc(con->execs,
                                sizeof(*con->execs) * (con->numExecs + 1));
        if (longName)
-           con->execs[con->numExecs].longName = strdup(longName);
+           con->execs[con->numExecs].longName = xstrdup(longName);
        else
            con->execs[con->numExecs].longName = NULL;
 
        con->execs[con->numExecs].shortName = shortName;
-       con->execs[con->numExecs].script = strdup(line);
+       con->execs[con->numExecs].script = xstrdup(line);
        
        con->numExecs++;
     }
 }
 
-int poptReadConfigFile(poptContext con, char * fn) {
+int poptReadConfigFile(poptContext con, const char * fn) {
     char * file, * chptr, * end;
     char * buf, * dst;
     int fd, rc;
@@ -84,10 +69,10 @@ int poptReadConfigFile(poptContext con, char * fn) {
     }
 
     fileLength = lseek(fd, 0, SEEK_END);
-    lseek(fd, 0, 0);
+    (void) lseek(fd, 0, 0);
 
     file = alloca(fileLength + 1);
-    if ((fd = read(fd, file, fileLength)) != fileLength) {
+    if (read(fd, file, fileLength) != fileLength) {
        rc = errno;
        close(fd);
        errno = rc;
@@ -122,13 +107,14 @@ int poptReadConfigFile(poptContext con, char * fn) {
            break;
          default:
            *dst++ = *chptr++;
+           break;
        }
     }
 
     return 0;
 }
 
-int poptReadDefaultConfig(poptContext con, int useEnv) {
+int poptReadDefaultConfig(poptContext con, /*@unused@*/ int useEnv) {
     char * fn, * home;
     int rc;
 
similarity index 61%
rename from popt-1.2/popthelp.c
rename to popt/popthelp.c
index 021e044..c36ecea 100644 (file)
@@ -1,58 +1,73 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 4 -*- */
+
 /* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING
    file accompanying popt source distributions, available from 
    ftp://ftp.redhat.com/pub/code/popt */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-
-#include <ctype.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "popt.h"
+#include "system.h"
 #include "poptint.h"
 
-static void displayArgs(poptContext con, enum poptCallbackReason foo, 
-                       struct poptOption * key, 
-                       const char * arg, void * data) {
+static void displayArgs(poptContext con,
+               /*@unused@*/ enum poptCallbackReason foo,
+               struct poptOption * key, 
+               /*@unused@*/ const char * arg, /*@unused@*/ void * data) {
     if (key->shortName== '?')
-       poptPrintHelp(con, stderr, 0);
+       poptPrintHelp(con, stdout, 0);
     else
-       poptPrintUsage(con, stderr, 0);
+       poptPrintUsage(con, stdout, 0);
     exit(0);
 }
 
 struct poptOption poptHelpOptions[] = {
-    { NULL, '\0', POPT_ARG_CALLBACK, &displayArgs, '\0', NULL },
-    { "help", '?', 0, NULL, '?', N_("Show this help message") },
-    { "usage", '\0', 0, NULL, 'u', N_("Display brief usage message") },
-    { NULL, '\0', 0, NULL, 0 }
+    { NULL, '\0', POPT_ARG_CALLBACK, (void *)&displayArgs, '\0', NULL, NULL },
+    { "help", '?', 0, NULL, '?', N_("Show this help message"), NULL },
+    { "usage", '\0', 0, NULL, 'u', N_("Display brief usage message"), NULL },
+    { NULL, '\0', 0, NULL, 0, NULL, NULL }
 } ;
 
-static const char * getArgDescrip(const struct poptOption * opt) {
+
+/*@observer@*/ /*@null@*/ static const char *const
+getTableTranslationDomain(const struct poptOption *table)
+{
+  const struct poptOption *opt;
+
+  for(opt = table;
+      opt->longName || opt->shortName || opt->arg;
+      opt++) {
+    if(opt->argInfo == POPT_ARG_INTL_DOMAIN)
+      return opt->arg;
+  }
+
+  return NULL;
+}
+
+/*@observer@*/ /*@null@*/ static const char *const
+getArgDescrip(const struct poptOption * opt, const char *translation_domain)
+{
     if (!(opt->argInfo & POPT_ARG_MASK)) return NULL;
 
     if (opt == (poptHelpOptions + 1) || opt == (poptHelpOptions + 2))
        if (opt->argDescrip) return POPT_(opt->argDescrip);
 
-    if (opt->argDescrip) return _(opt->argDescrip);
+    if (opt->argDescrip) return D_(translation_domain, opt->argDescrip);
     return POPT_("ARG");
 }
 
 static void singleOptionHelp(FILE * f, int maxLeftCol, 
-                            const struct poptOption * opt) {
+                            const struct poptOption * opt,
+                            const char *translation_domain) {
     int indentLength = maxLeftCol + 5;
     int lineLength = 79 - indentLength;
-    const char * help = _(opt->descrip);
+    const char * help = D_(translation_domain, opt->descrip);
     int helpLength;
     const char * ch;
     char format[10];
-    char * left = alloca(maxLeftCol + 1);
-    const char * argDescrip = getArgDescrip(opt);
+    char * left;
+    const char * argDescrip = getArgDescrip(opt, translation_domain);
 
+    left = malloc(maxLeftCol + 1);
     *left = '\0';
+
     if (opt->longName && opt->shortName)
        sprintf(left, "-%c, --%s", opt->shortName, opt->longName);
     else if (opt->shortName) 
@@ -69,7 +84,7 @@ static void singleOptionHelp(FILE * f, int maxLeftCol,
        fprintf(f,"  %-*s   ", maxLeftCol, left);
     else {
        fprintf(f,"  %s\n", left); 
-       return;
+       goto out;
     }
 
     helpLength = strlen(help);
@@ -88,16 +103,20 @@ static void singleOptionHelp(FILE * f, int maxLeftCol,
     }
 
     if (helpLength) fprintf(f, "%s\n", help);
+
+out:
+    free(left);
 }
 
-static int maxArgWidth(const struct poptOption * opt) {
+static int maxArgWidth(const struct poptOption * opt,
+                      const char * translation_domain) {
     int max = 0;
     int this;
     const char * s;
     
     while (opt->longName || opt->shortName || opt->arg) {
        if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
-           this = maxArgWidth(opt->arg);
+           this = maxArgWidth(opt->arg, translation_domain);
            if (this > max) max = this;
        } else if (!(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN)) {
            this = opt->shortName ? 2 : 0;
@@ -106,7 +125,7 @@ static int maxArgWidth(const struct poptOption * opt) {
                this += strlen(opt->longName) + 2;
            }
 
-           s = getArgDescrip(opt);
+           s = getArgDescrip(opt, translation_domain);
            if (s)
                this += strlen(s) + 1;
            if (this > max) max = this;
@@ -119,23 +138,30 @@ static int maxArgWidth(const struct poptOption * opt) {
 }
 
 static void singleTableHelp(FILE * f, const struct poptOption * table, 
-                           int left) {
+                           int left,
+                           const char *translation_domain) {
     const struct poptOption * opt;
+    const char *sub_transdom;
 
     opt = table;
     while (opt->longName || opt->shortName || opt->arg) {
        if ((opt->longName || opt->shortName) && 
            !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN))
-           singleOptionHelp(f, left, opt);
+           singleOptionHelp(f, left, opt, translation_domain);
        opt++;
     }
 
     opt = table;
     while (opt->longName || opt->shortName || opt->arg) {
        if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) {
+           sub_transdom = getTableTranslationDomain(opt->arg);
+           if(!sub_transdom)
+               sub_transdom = translation_domain;
+           
            if (opt->descrip)
-               fprintf(f, "\n%s\n", _(opt->descrip));
-           singleTableHelp(f, opt->arg, left);
+               fprintf(f, "\n%s\n", D_(sub_transdom, opt->descrip));
+
+           singleTableHelp(f, opt->arg, left, sub_transdom);
        }
        opt++;
     }
@@ -143,7 +169,7 @@ static void singleTableHelp(FILE * f, const struct poptOption * table,
 
 static int showHelpIntro(poptContext con, FILE * f) {
     int len = 6;
-    char * fn;
+    const char * fn;
 
     fprintf(f, POPT_("Usage:"));
     if (!(con->flags & POPT_CONTEXT_KEEP_FIRST)) {
@@ -156,7 +182,7 @@ static int showHelpIntro(poptContext con, FILE * f) {
     return len;
 }
 
-void poptPrintHelp(poptContext con, FILE * f, int flags) {
+void poptPrintHelp(poptContext con, FILE * f, /*@unused@*/ int flags) {
     int leftColWidth;
 
     showHelpIntro(con, f);
@@ -165,16 +191,17 @@ void poptPrintHelp(poptContext con, FILE * f, int flags) {
     else
        fprintf(f, " %s\n", POPT_("[OPTION...]"));
 
-    leftColWidth = maxArgWidth(con->options);
-    singleTableHelp(f, con->options, leftColWidth);
+    leftColWidth = maxArgWidth(con->options, NULL);
+    singleTableHelp(f, con->options, leftColWidth, NULL);
 }
 
 static int singleOptionUsage(FILE * f, int cursor, 
-                             const struct poptOption * opt) {
+                            const struct poptOption * opt,
+                            const char *translation_domain) {
     int len = 3;
-    char shortStr[2];
+    char shortStr[2] = { '\0', '\0' };
     const char * item = shortStr;
-    const char * argDescrip = getArgDescrip(opt);
+    const char * argDescrip = getArgDescrip(opt, translation_domain);
 
     if (opt->shortName) {
        if (!(opt->argInfo & POPT_ARG_MASK)) 
@@ -204,16 +231,21 @@ static int singleOptionUsage(FILE * f, int cursor,
     return cursor + len + 1;
 }
 
-int singleTableUsage(FILE * f, int cursor, const struct poptOption * table) {
+static int singleTableUsage(FILE * f, int cursor, const struct poptOption * table,
+                    const char *translation_domain) {
     const struct poptOption * opt;
     
     opt = table;
     while (opt->longName || opt->shortName || opt->arg) {
-       if ((opt->longName || opt->shortName) && 
-           !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN))
-           cursor = singleOptionUsage(f, cursor, opt);
+        if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INTL_DOMAIN)
+           translation_domain = (const char *)opt->arg;
        else if ((opt->argInfo & POPT_ARG_MASK) == POPT_ARG_INCLUDE_TABLE) 
-           cursor = singleTableUsage(f, cursor, opt->arg);
+           cursor = singleTableUsage(f, cursor, opt->arg,
+                                     translation_domain);
+       else if ((opt->longName || opt->shortName) && 
+                !(opt->argInfo & POPT_ARGFLAG_DOC_HIDDEN))
+         cursor = singleOptionUsage(f, cursor, opt, translation_domain);
+
        opt++;
     }
 
@@ -225,9 +257,10 @@ static int showShortOptions(const struct poptOption * opt, FILE * f,
     char s[300];               /* this is larger then the ascii set, so
                                   it should do just fine */
 
-    if (!str) {
+    s[0] = '\0';
+    if (str == NULL) {
+       memset(s, 0, sizeof(s));
        str = s;
-       memset(str, 0, sizeof(str));
     }
 
     while (opt->longName || opt->shortName || opt->arg) {
@@ -246,12 +279,12 @@ static int showShortOptions(const struct poptOption * opt, FILE * f,
     return strlen(s) + 4;
 }
 
-void poptPrintUsage(poptContext con, FILE * f, int flags) {
+void poptPrintUsage(poptContext con, FILE * f, /*@unused@*/ int flags) {
     int cursor;
 
     cursor = showHelpIntro(con, f);
     cursor += showShortOptions(con->options, f, NULL);
-    singleTableUsage(f, cursor, con->options);
+    singleTableUsage(f, cursor, con->options, NULL);
 
     if (con->otherHelp) {
        cursor += strlen(con->otherHelp) + 1;
@@ -263,6 +296,6 @@ void poptPrintUsage(poptContext con, FILE * f, int flags) {
 }
 
 void poptSetOtherOptionHelp(poptContext con, const char * text) {
-    if (con->otherHelp) free(con->otherHelp);
-    con->otherHelp = strdup(text);
+    if (con->otherHelp) xfree(con->otherHelp);
+    con->otherHelp = xstrdup(text);
 }
diff --git a/popt/poptint.h b/popt/poptint.h
new file mode 100644 (file)
index 0000000..a1edb97
--- /dev/null
@@ -0,0 +1,87 @@
+/* (C) 1998 Red Hat Software, Inc. -- Licensing details are in the COPYING
+   file accompanying popt source distributions, available from 
+   ftp://ftp.redhat.com/pub/code/popt */
+
+#ifndef H_POPTINT
+#define H_POPTINT
+
+/* Bit mask macros. */
+typedef        unsigned int __pbm_bits;
+#define        __PBM_NBITS             (8 * sizeof (__pbm_bits))
+#define        __PBM_IX(d)             ((d) / __PBM_NBITS)
+#define __PBM_MASK(d)          ((__pbm_bits) 1 << ((d) % __PBM_NBITS))
+typedef struct {
+    __pbm_bits bits[1];
+} pbm_set;
+#define        __PBM_BITS(set) ((set)->bits)
+
+#define        PBM_ALLOC(d)    calloc(__PBM_IX (d) + 1, sizeof(__pbm_bits))
+#define        PBM_FREE(s)     free(s);
+#define PBM_SET(d, s)   (__PBM_BITS (s)[__PBM_IX (d)] |= __PBM_MASK (d))
+#define PBM_CLR(d, s)   (__PBM_BITS (s)[__PBM_IX (d)] &= ~__PBM_MASK (d))
+#define PBM_ISSET(d, s) ((__PBM_BITS (s)[__PBM_IX (d)] & __PBM_MASK (d)) != 0)
+
+struct optionStackEntry {
+    int argc;
+    /*@only@*/ const char ** argv;
+    /*@only@*/ pbm_set * argb;
+    int next;
+    /*@only@*/ const char * nextArg;
+    /*@keep@*/ const char * nextCharArg;
+    /*@dependent@*/ struct poptAlias * currAlias;
+    int stuffed;
+};
+
+struct execEntry {
+    const char * longName;
+    char shortName;
+    const char * script;
+};
+
+struct poptContext_s {
+    struct optionStackEntry optionStack[POPT_OPTION_DEPTH];
+    /*@dependent@*/ struct optionStackEntry * os;
+    /*@owned@*/ const char ** leftovers;
+    int numLeftovers;
+    int nextLeftover;
+    /*@keep@*/ const struct poptOption * options;
+    int restLeftover;
+    /*@only@*/ const char * appName;
+    /*@only@*/ struct poptAlias * aliases;
+    int numAliases;
+    int flags;
+    struct execEntry * execs;
+    int numExecs;
+    /*@only@*/ const char ** finalArgv;
+    int finalArgvCount;
+    int finalArgvAlloced;
+    /*@dependent@*/ struct execEntry * doExec;
+    /*@only@*/ const char * execPath;
+    int execAbsolute;
+    /*@only@*/ const char * otherHelp;
+    pbm_set * arg_strip;
+};
+
+#define        xfree(_a)       free((void *)_a)
+
+#ifdef HAVE_LIBINTL_H
+#include <libintl.h>
+#endif
+
+#if defined(HAVE_GETTEXT) && !defined(__LCLINT__)
+#define _(foo) gettext(foo)
+#else
+#define _(foo) (foo)
+#endif
+
+#if defined(HAVE_DGETTEXT) && !defined(__LCLINT__)
+#define D_(dom, str) dgettext(dom, str)
+#define POPT_(foo) D_("popt", foo)
+#else
+#define POPT_(foo) (foo)
+#define D_(dom, str) (str)
+#endif
+
+#define N_(foo) (foo)
+
+#endif
similarity index 52%
rename from popt-1.2/poptparse.c
rename to popt/poptparse.c
index cd97ec6..7c9f06b 100644 (file)
@@ -2,34 +2,52 @@
    file accompanying popt source distributions, available from 
    ftp://ftp.redhat.com/pub/code/popt */
 
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
+#include "system.h"
 
-#include <ctype.h>
-#include <stdlib.h>
-#include <string.h>
+#define POPT_ARGV_ARRAY_GROW_DELTA 5
 
-#include "popt.h"
+int poptDupArgv(int argc, const char **argv,
+               int * argcPtr, const char *** argvPtr)
+{
+    size_t nb = (argc + 1) * sizeof(*argv);
+    const char ** argv2;
+    char * dst;
+    int i;
+
+    for (i = 0; i < argc; i++) {
+       if (argv[i] == NULL)
+           return POPT_ERROR_NOARG;
+       nb += strlen(argv[i]) + 1;
+    }
+       
+    dst = malloc(nb);
+    argv2 = (void *) dst;
+    dst += (argc + 1) * sizeof(*argv);
+
+    for (i = 0; i < argc; i++) {
+       argv2[i] = dst;
+       dst += strlen(strcpy(dst, argv[i])) + 1;
+    }
+    argv2[argc] = NULL;
+
+    *argvPtr = argv2;
+    *argcPtr = argc;
+    return 0;
+}
 
-int poptParseArgvString(char * s, int * argcPtr, char *** argvPtr) {
-    char * buf = strcpy(alloca(strlen(s) + 1), s);
-    char * bufStart = buf;
-    char * src, * dst;
+int poptParseArgvString(const char * s, int * argcPtr, const char *** argvPtr)
+{
+    const char * src;
     char quote = '\0';
-    int argvAlloced = 5;
-    char ** argv = malloc(sizeof(*argv) * argvAlloced);
-    char ** argv2;
+    int argvAlloced = POPT_ARGV_ARRAY_GROW_DELTA;
+    const char ** argv = malloc(sizeof(*argv) * argvAlloced);
     int argc = 0;
-    int i;
+    int buflen = strlen(s) + 1;
+    char * buf = memset(alloca(buflen), 0, buflen);
 
-    src = s;
-    dst = buf;
     argv[argc] = buf;
 
-    memset(buf, '\0', strlen(s) + 1);
-
-    while (*src) {
+    for (src = s; *src; src++) {
        if (quote == *src) {
            quote = '\0';
        } else if (quote) {
@@ -46,7 +64,7 @@ int poptParseArgvString(char * s, int * argcPtr, char *** argvPtr) {
            if (*argv[argc]) {
                buf++, argc++;
                if (argc == argvAlloced) {
-                   argvAlloced += 5;
+                   argvAlloced += POPT_ARGV_ARRAY_GROW_DELTA;
                    argv = realloc(argv, sizeof(*argv) * argvAlloced);
                }
                argv[argc] = buf;
@@ -62,32 +80,20 @@ int poptParseArgvString(char * s, int * argcPtr, char *** argvPtr) {
                free(argv);
                return POPT_ERROR_BADQUOTE;
            }
-           /* fallthrough */
+           /*@fallthrough@*/
          default:
            *buf++ = *src;
+           break;
        }
-
-       src++;
     }
 
     if (strlen(argv[argc])) {
        argc++, buf++;
     }
 
-    dst = malloc(argc * sizeof(*argv) + (buf - bufStart));
-    argv2 = (void *) dst;
-    dst += argc * sizeof(*argv);
-    memcpy(argv2, argv, argc * sizeof(*argv));
-    memcpy(dst, bufStart, buf - bufStart);
-
-    for (i = 0; i < argc; i++) {
-       argv2[i] = dst + (argv[i] - bufStart);
-    }
+    (void) poptDupArgv(argc, argv, argcPtr, argvPtr);
 
     free(argv);
 
-    *argvPtr = argv2;
-    *argcPtr = argc;
-
     return 0;
 }
diff --git a/popt/system.h b/popt/system.h
new file mode 100644 (file)
index 0000000..43ad70f
--- /dev/null
@@ -0,0 +1,55 @@
+#ifdef HAVE_CONFIG_H
+#include "config.h"
+#endif
+
+#include <ctype.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <limits.h>
+
+#if HAVE_MCHECK_H 
+#include <mcheck.h>
+#endif
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#ifdef __NeXT
+/* access macros are not declared in non posix mode in unistd.h -
+ don't try to use posix on NeXTstep 3.3 ! */
+#include <libc.h>
+#endif
+
+/* AIX requires this to be the first thing in the file.  */ 
+#ifndef __GNUC__
+# if HAVE_ALLOCA_H
+#  include <alloca.h>
+# else
+#  ifdef _AIX
+#pragma alloca
+#  else
+#   ifndef alloca /* predefined by HP cc +Olibcalls */
+char *alloca ();
+#   endif
+#  endif
+# endif
+#elif defined(__GNUC__) && defined(__STRICT_ANSI__)
+#define alloca __builtin_alloca
+#endif
+
+/*@only@*/ char * xstrdup (const char *str);
+
+#if HAVE_MCHECK_H && defined(__GNUC__)
+#define        vmefail()       (fprintf(stderr, "virtual memory exhausted.\n"), exit(EXIT_FAILURE), NULL)
+#define xstrdup(_str)   (strcpy((malloc(strlen(_str)+1) ? : vmefail()), (_str)))
+#else
+#define        xstrdup(_str)   strdup(_str)
+#endif  /* HAVE_MCHECK_H && defined(__GNUC__) */
+
+
+#include "popt.h"