xvid4conf-1.12/0000777000175400017540000000000010004227754007117 5xvid4conf-1.12/README0000644000175400017540000000160510004224107007702 =========== Description =========== This tool creates XviD[1] configuration files. The generated configuration file is meant to be read by transcodes[2] xvid4 export module. This module (and so the configuration file) is intended to be used with XviD 1.0 (dev-api-4) Current releases are at http://zebra.fh-weingarten.de/~transcode/xvid4conf/ Or fetch from CVS cvs -z3 -d :pserver:cvs@cvs.exit1.org:/cvstc login cvs -z3 -d :pserver:cvs@cvs.exit1.org:/cvstc checkout xvid4conf ======== Features ======== - Can read an existing config file - Very helpful and verbose tooltips - Simple matrix editor - automatic reading/saving if requested - Native GTK2 application ===== NOTES ===== - Use config files created with version 1.9 only with transcode > 0.6.11 - Version 0.11 is for xvidcore-beta3. ===== Links ===== [1] http://www.xvid.org [2] http://zebra.fh-weingarten.de/~transcode/ xvid4conf-1.12/Makefile.in0000644000175400017540000004152110004227750011077 # Makefile.in generated by automake 1.7.7 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ SUBDIRS = src EXTRA_DIST = \ autogen.sh \ xvid4conf2.glade \ xvid4conf2.gladep subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = DIST_SOURCES = RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \ ps-recursive install-info-recursive uninstall-info-recursive \ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure AUTHORS \ COPYING ChangeLog INSTALL Makefile.am NEWS acconfig.h \ aclocal.m4 config.h.in configure configure.in depcomp \ install-sh missing mkinstalldirs DIST_SUBDIRS = $(SUBDIRS) all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe) $(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.in $(ACLOCAL_M4) $(top_srcdir)/acconfig.h cd $(top_srcdir) && $(AUTOHEADER) touch $(srcdir)/config.h.in distclean-hdr: -rm -f config.h stamp-h1 uninstall-info-am: # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $$MAKEFLAGS; amf=$$2; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ if (etags --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ else \ include_option=--include; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && \ tags="$$tags $$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = . distdir = $(PACKAGE)-$(VERSION) am__remove_distdir = \ { test ! -d $(distdir) \ || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr $(distdir); }; } GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print distdir: $(DISTFILES) $(am__remove_distdir) mkdir $(distdir) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ (cd $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" \ distdir=../$(distdir)/$$subdir \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -find $(distdir) -type d ! -perm -777 -exec chmod a+rwx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(SHELL) $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r $(distdir) dist-gzip: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist dist-all: distdir $(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist $(am__remove_distdir) GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf - chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && cd $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && $(mkinstalldirs) "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist-gzip \ && rm -f $(distdir).tar.gz \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck $(am__remove_distdir) @echo "$(distdir).tar.gz is ready for distribution" | \ sed 'h;s/./=/g;p;x;p;x' distuninstallcheck: @cd $(distuninstallcheck_dir) \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: info: info-recursive info-am: install-data-am: install-data-local install-exec-am: install-info: install-info-recursive install-man: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-info-am uninstall-info: uninstall-info-recursive .PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \ clean-generic clean-recursive ctags ctags-recursive dist \ dist-all dist-gzip distcheck distclean distclean-generic \ distclean-hdr distclean-recursive distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am dvi-recursive info \ info-am info-recursive install install-am install-data \ install-data-am install-data-local install-data-recursive \ install-exec install-exec-am install-exec-recursive \ install-info install-info-am install-info-recursive install-man \ install-recursive install-strip installcheck installcheck-am \ installdirs installdirs-am installdirs-recursive \ maintainer-clean maintainer-clean-generic \ maintainer-clean-recursive mostlyclean mostlyclean-generic \ mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \ ps-recursive tags tags-recursive uninstall uninstall-am \ uninstall-info-am uninstall-info-recursive uninstall-recursive install-data-local: @$(NORMAL_INSTALL) if test -d $(srcdir)/pixmaps; then \ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \ for pixmap in $(srcdir)/pixmaps/*; do \ if test -f $$pixmap; then \ $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \ fi \ done \ fi dist-hook: if test -d pixmaps; then \ mkdir $(distdir)/pixmaps; \ for pixmap in pixmaps/*; do \ if test -f $$pixmap; then \ cp -p $$pixmap $(distdir)/pixmaps; \ fi \ done \ fi # 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: xvid4conf-1.12/configure0000755000175400017540000050343610004227751010752 #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.57. # # Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2 { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` exec 6>&1 # # Initializations. # ac_default_prefix=/usr/local ac_config_libobj_dir=. cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Maximum number of lines to put in a shell here document. # This variable seems obsolete. It should probably be removed, and # only ac_max_sed_lines should be used. : ${ac_max_here_lines=38} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="configure.in" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP EGREP PKG_CONFIG PACKAGE_CFLAGS PACKAGE_LIBS LIBOBJS LTLIBOBJS' ac_subst_files='' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datadir='${prefix}/share' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' libdir='${exec_prefix}/lib' includedir='${prefix}/include' oldincludedir='/usr/include' infodir='${prefix}/info' mandir='${prefix}/man' ac_prev= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval "$ac_prev=\$ac_option" ac_prev= continue fi ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'` # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_option in -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad | --data | --dat | --da) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \ | --da=*) datadir=$ac_optarg ;; -disable-* | --disable-*) ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` eval "enable_$ac_feature=no" ;; -enable-* | --enable-*) ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "enable_$ac_feature='$ac_optarg'" ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst \ | --locals | --local | --loca | --loc | --lo) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* \ | --locals=* | --local=* | --loca=* | --loc=* | --lo=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package| sed 's/-/_/g'` case $ac_option in *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;; *) ac_optarg=yes ;; esac eval "with_$ac_package='$ac_optarg'" ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/-/_/g'` eval "with_$ac_package=no" ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` eval "$ac_envvar='$ac_optarg'" export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option} ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute paths. for ac_var in exec_prefix prefix do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* | NONE | '' ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # Be sure to have absolute paths. for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \ localstatedir libdir includedir oldincludedir infodir mandir do eval ac_val=$`echo $ac_var` case $ac_val in [\\/$]* | ?:[\\/]* ) ;; *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; };; esac done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then its parent. ac_confdir=`(dirname "$0") 2>/dev/null || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$0" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` srcdir=$ac_confdir if test ! -r $srcdir/$ac_unique_file; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r $srcdir/$ac_unique_file; then if test "$ac_srcdir_defaulted" = yes; then { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2 { (exit 1); exit 1; }; } else { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi fi (cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null || { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2 { (exit 1); exit 1; }; } srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'` ac_env_build_alias_set=${build_alias+set} ac_env_build_alias_value=$build_alias ac_cv_env_build_alias_set=${build_alias+set} ac_cv_env_build_alias_value=$build_alias ac_env_host_alias_set=${host_alias+set} ac_env_host_alias_value=$host_alias ac_cv_env_host_alias_set=${host_alias+set} ac_cv_env_host_alias_value=$host_alias ac_env_target_alias_set=${target_alias+set} ac_env_target_alias_value=$target_alias ac_cv_env_target_alias_set=${target_alias+set} ac_cv_env_target_alias_value=$target_alias ac_env_CC_set=${CC+set} ac_env_CC_value=$CC ac_cv_env_CC_set=${CC+set} ac_cv_env_CC_value=$CC ac_env_CFLAGS_set=${CFLAGS+set} ac_env_CFLAGS_value=$CFLAGS ac_cv_env_CFLAGS_set=${CFLAGS+set} ac_cv_env_CFLAGS_value=$CFLAGS ac_env_LDFLAGS_set=${LDFLAGS+set} ac_env_LDFLAGS_value=$LDFLAGS ac_cv_env_LDFLAGS_set=${LDFLAGS+set} ac_cv_env_LDFLAGS_value=$LDFLAGS ac_env_CPPFLAGS_set=${CPPFLAGS+set} ac_env_CPPFLAGS_value=$CPPFLAGS ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set} ac_cv_env_CPPFLAGS_value=$CPPFLAGS ac_env_CPP_set=${CPP+set} ac_env_CPP_value=$CPP ac_cv_env_CPP_set=${CPP+set} ac_cv_env_CPP_value=$CPP # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] _ACEOF cat <<_ACEOF Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --datadir=DIR read-only architecture-independent data [PREFIX/share] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --infodir=DIR info documentation [PREFIX/info] --mandir=DIR man documentation [PREFIX/man] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory CPPFLAGS C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _ACEOF fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. ac_popdir=`pwd` for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d $ac_dir || continue ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` cd $ac_dir # Check for guested configure; otherwise get Cygnus style configure. if test -f $ac_srcdir/configure.gnu; then echo $SHELL $ac_srcdir/configure.gnu --help=recursive elif test -f $ac_srcdir/configure; then echo $SHELL $ac_srcdir/configure --help=recursive elif test -f $ac_srcdir/configure.ac || test -f $ac_srcdir/configure.in; then echo $ac_configure --help else echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi cd $ac_popdir done fi test -n "$ac_init_help" && exit 0 if $ac_init_version; then cat <<\_ACEOF Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit 0 fi exec 5>config.log cat >&5 <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.57. Invocation command line was $ $0 $@ _ACEOF { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` hostinfo = `(hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. echo "PATH: $as_dir" done } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_sep= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$ac_configure_args1 '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'" # Get rid of the leading space. ac_sep=" " ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Be sure not to use single quotes in there, as some shells, # such as our DU 5.0 friend, will then `close' the trap. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, { (set) 2>&1 | case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in *ac_space=\ *) sed -n \ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p" ;; *) sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------- ## ## Output files. ## ## ------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=$`echo $ac_var` echo "$ac_var='"'"'$ac_val'"'"'" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo sed "/^$/d" confdefs.h | sort echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" echo "$as_me: exit $exit_status" } >&5 rm -f core core.* *.core && rm -rf conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -rf conftest* confdefs.h # AIX cpp loses on an empty file, so make sure it contains at least a newline. echo >confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -z "$CONFIG_SITE"; then if test "x$prefix" != xNONE; then CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site" else CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi fi for ac_site_file in $CONFIG_SITE; do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . $cache_file;; *) . ./$cache_file;; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in `(set) 2>&1 | sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val="\$ac_cv_env_${ac_var}_value" eval ac_new_val="\$ac_env_${ac_var}_value" case $ac_old_set,$ac_new_set in set,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*) ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu am__api_version="1.7" ac_aux_dir= for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do if test -f $ac_dir/install-sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f $ac_dir/install.sh; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f $ac_dir/shtool; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5 echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;} { (exit 1); exit 1; }; } fi ac_config_guess="$SHELL $ac_aux_dir/config.guess" ac_config_sub="$SHELL $ac_aux_dir/config.sub" ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # ./install, which can be erroneously created by make from ./install.sh. echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6 if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. We don't cache a # path for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the path is relative. INSTALL=$ac_install_sh fi fi echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$INSTALL" >&6 # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6 # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftest.file ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 test "$program_prefix" != NONE && program_transform_name="s,^,$program_prefix,;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s,\$,$program_suffix,;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm conftest.sed # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5 echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_AWK+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then echo "$as_me:$LINENO: result: $AWK" >&5 echo "${ECHO_T}$AWK" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$AWK" && break done echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6 set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'` if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.make <<\_ACEOF all: @echo 'ac_maketemp="$(MAKE)"' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=` if test -n "$ac_maketemp"; then eval ac_cv_prog_make_${ac_make}_set=yes else eval ac_cv_prog_make_${ac_make}_set=no fi rm -f conftest.make fi if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 SET_MAKE= else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE=xvid4conf VERSION=1.12 cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} AMTAR=${AMTAR-"${am_missing_run}tar"} install_sh=${install_sh-"$am_aux_dir/install-sh"} # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":" fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi STRIP=$ac_ct_STRIP else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" # We need awk for the "check" target. The system "awk" is bad on # some platforms. ac_config_headers="$ac_config_headers config.h" echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6 # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval="$enable_maintainer_mode" USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi; echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6 if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5 echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6 am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi echo "$as_me:$LINENO: result: $_am_result" >&5 echo "${ECHO_T}$_am_result" >&6 rm -f confinc confmf # Check whether --enable-dependency-tracking or --disable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then enableval="$enable_dependency_tracking" fi; if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. echo "$as_me:$LINENO: checking for C compiler default output" >&5 echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6 ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5 (eval $ac_link_default) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Find the output, starting from the most likely. This scheme is # not robust to junk in `.', hence go to wildcards (a.*) only as a last # resort. # Be careful to initialize this variable, since it used to be cached. # Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile. ac_cv_exeext= # b.out is created by i960 compilers. for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; conftest.$ac_ext ) # This is the source file. ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` # FIXME: I believe we export ac_cv_exeext for Libtool, # but it would be cool to find out if it's true. Does anybody # maintain Libtool? --akim. export ac_cv_exeext break;; * ) break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6 # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6 # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6 echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6 echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6 if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` export ac_cv_exeext break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6 rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6 if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6 OBJEXT=$ac_cv_objext ac_objext=$OBJEXT echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c : > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi echo "$as_me:$LINENO: checking for library containing strerror" >&5 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6 if test "${ac_cv_search_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS ac_cv_search_strerror=no cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror (); int main () { strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_strerror="none required" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext if test "$ac_cv_search_strerror" = no; then for ac_lib in cposix; do LIBS="-l$ac_lib $ac_func_search_save_LIBS" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any gcc2 internal prototype to avoid an error. */ #ifdef __cplusplus extern "C" #endif /* We use char because int might match the return type of a gcc2 builtin and then its argument prototype would still apply. */ char strerror (); int main () { strerror (); ; return 0; } _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_search_strerror="-l$ac_lib" break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext done fi LIBS=$ac_func_search_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 echo "${ECHO_T}$ac_cv_search_strerror" >&6 if test "$ac_cv_search_strerror" != no; then test "$ac_cv_search_strerror" = "none required" || LIBS="$ac_cv_search_strerror $LIBS" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi CC=$ac_ct_CC else CC="$ac_cv_prog_CC" fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi test -n "$ac_ct_CC" && break done CC=$ac_ct_CC fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO:" \ "checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (eval echo "$as_me:$LINENO: \"$ac_compiler --version &5\"") >&5 (eval $ac_compiler --version &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -v &5\"") >&5 (eval $ac_compiler -v &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (eval echo "$as_me:$LINENO: \"$ac_compiler -V &5\"") >&5 (eval $ac_compiler -V &5) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6 if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6 GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS CFLAGS="-g" echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6 if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_cc_g=no fi rm -f conftest.$ac_objext conftest.$ac_ext fi echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$ac_cv_prog_cc_g" >&6 if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5 echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6 if test "${ac_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_stdc=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_prog_cc_stdc=$ac_arg break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext done rm -f conftest.$ac_ext conftest.$ac_objext CC=$ac_save_CC fi case "x$ac_cv_prog_cc_stdc" in x|xno) echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 ;; *) echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6 CC="$CC $ac_cv_prog_cc_stdc" ;; esac # Some people use a C++ compiler to compile C. Since we use `exit', # in C++ we need to declare it. In case someone uses the same compiler # for both compiling C and C++ we need to have the C++ compiler decide # the declaration of exit, since it's the most demanding environment. cat >conftest.$ac_ext <<_ACEOF #ifndef __cplusplus choke me #endif _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then for ac_declaration in \ ''\ '#include ' \ 'extern "C" void std::exit (int) throw (); using std::exit;' \ 'extern "C" void std::exit (int); using std::exit;' \ 'extern "C" void exit (int) throw ();' \ 'extern "C" void exit (int);' \ 'void exit (int);' do cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 continue fi rm -f conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_declaration int main () { exit (42); ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done rm -f conftest* if test -n "$ac_declaration"; then echo '#ifdef __cplusplus' >>confdefs.h echo $ac_declaration >>confdefs.h echo '#endif' >>confdefs.h fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CC" am_compiler_list= echo "$as_me:$LINENO: checking dependency style of $depcc" >&5 echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6 if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c : > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5 echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6 if test "${am_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then am_cv_prog_cc_stdc="$ac_arg"; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f conftest.$ac_objext conftest.$ac_ext done CC="$ac_save_CC" fi if test -z "$am_cv_prog_cc_stdc"; then echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6 else echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6 fi case "x$am_cv_prog_cc_stdc" in x|xno) ;; *) CC="$CC $am_cv_prog_cc_stdc" ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6 # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$CPP" >&6 ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether non-existent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5 (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null; then if test -s conftest.err; then ac_cpp_err=$ac_c_preproc_warn_flag else ac_cpp_err= fi else ac_cpp_err=yes fi if test -z "$ac_cpp_err"; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6 if test "${ac_cv_prog_egrep+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi fi echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5 echo "${ECHO_T}$ac_cv_prog_egrep" >&6 EGREP=$ac_cv_prog_egrep echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6 if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF rm -f conftest.$ac_objext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='test -s conftest.$ac_objext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_stdc=no fi rm -f conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : else cat >conftest.$ac_ext <<_ACEOF #line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) exit(2); exit (0); } _ACEOF rm -f conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6 if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi pkg_modules="gtk+-2.0 >= 2.0.0" succeeded=no if test -z "$PKG_CONFIG"; then # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done test -z "$ac_cv_path_PKG_CONFIG" && ac_cv_path_PKG_CONFIG="no" ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6 else echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6 fi fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then echo "$as_me:$LINENO: checking for $pkg_modules" >&5 echo $ECHO_N "checking for $pkg_modules... $ECHO_C" >&6 if $PKG_CONFIG --exists "$pkg_modules" ; then echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6 succeeded=yes echo "$as_me:$LINENO: checking PACKAGE_CFLAGS" >&5 echo $ECHO_N "checking PACKAGE_CFLAGS... $ECHO_C" >&6 PACKAGE_CFLAGS=`$PKG_CONFIG --cflags "$pkg_modules"` echo "$as_me:$LINENO: result: $PACKAGE_CFLAGS" >&5 echo "${ECHO_T}$PACKAGE_CFLAGS" >&6 echo "$as_me:$LINENO: checking PACKAGE_LIBS" >&5 echo $ECHO_N "checking PACKAGE_LIBS... $ECHO_C" >&6 PACKAGE_LIBS=`$PKG_CONFIG --libs "$pkg_modules"` echo "$as_me:$LINENO: result: $PACKAGE_LIBS" >&5 echo "${ECHO_T}$PACKAGE_LIBS" >&6 else PACKAGE_CFLAGS="" PACKAGE_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. PACKAGE_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$pkg_modules"` echo $PACKAGE_PKG_ERRORS fi else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then : else { { echo "$as_me:$LINENO: error: Library requirements ($pkg_modules) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&5 echo "$as_me: error: Library requirements ($pkg_modules) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them." >&2;} { (exit 1); exit 1; }; } fi ac_config_files="$ac_config_files Makefile src/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, don't put newlines in cache variables' values. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. { (set) 2>&1 | case `(ac_space=' '; set | grep ac_space) 2>&1` in *ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n \ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p" ;; esac; } | sed ' t clear : clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ : end' >>confcache if diff $cache_file confcache >/dev/null 2>&1; then :; else if test -w $cache_file; then test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file" cat confcache >$cache_file else echo "not updating unwritable cache $cache_file" fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/; s/:*\${srcdir}:*/:/; s/:*@srcdir@:*/:/; s/^\([^=]*=[ ]*\):*/\1/; s/:*$//; s/^[^=]*=[ ]*$//; }' fi DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_i=`echo "$ac_i" | sed 's/\$U\././;s/\.o$//;s/\.obj$//'` # 2. Add them. ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&5 echo "$as_me: error: conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." >&2;} { (exit 1); exit 1; }; } fi : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## M4sh Initialization. ## ## --------------------- ## # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then set -o posix fi # Support unset when possible. if (FOO=FOO; unset FOO) >/dev/null 2>&1; then as_unset=unset else as_unset=false fi # Work around bugs in pre-3.0 UWIN ksh. $as_unset ENV MAIL MAILPATH PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -n "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else $as_unset $as_var fi done # Required to use basename. if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi # Name of the executable. as_me=`$as_basename "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)$' \| \ . : '\(.\)' 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; } /^X\/\(\/\/\)$/{ s//\1/; q; } /^X\/\(\/\).*/{ s//\1/; q; } s/.*/./; q'` # PATH needs CR, and LINENO needs CR and PATH. # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" || { # Find who we are. Look in the path if we contain no path at all # relative or not. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5 echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;} { (exit 1); exit 1; }; } fi case $CONFIG_SHELL in '') as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for as_base in sh bash ksh sh5; do case $as_dir in /*) if ("$as_dir/$as_base" -c ' as_lineno_1=$LINENO as_lineno_2=$LINENO as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null` test "x$as_lineno_1" != "x$as_lineno_2" && test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; } $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; } CONFIG_SHELL=$as_dir/$as_base export CONFIG_SHELL exec "$CONFIG_SHELL" "$0" ${1+"$@"} fi;; esac done done ;; esac # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line before each line; the second 'sed' does the real # work. The second script uses 'N' to pair each line-number line # with the numbered line, and appends trailing '-' during # substitution so that $LINENO is not a special case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-) sed '=' <$as_myself | sed ' N s,$,-, : loop s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3, t loop s,-$,, s,^['$as_cr_digits']*\n,, ' >$as_me.lineno && chmod +x $as_me.lineno || { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5 echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;} { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensible to this). . ./$as_me.lineno # Exit status is that of the last command. exit } case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in *c*,-n*) ECHO_N= ECHO_C=' ' ECHO_T=' ' ;; *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;; *) ECHO_N= ECHO_C='\c' ECHO_T= ;; esac if expr a : '\(a\)' >/dev/null 2>&1; then as_expr=expr else as_expr=false fi rm -f conf$$ conf$$.exe conf$$.file echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then # We could just check for DJGPP; but this test a) works b) is more generic # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04). if test -f conf$$.exe; then # Don't use ln at all; we don't have any links as_ln_s='cp -p' else as_ln_s='ln -s' fi elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi rm -f conf$$ conf$$.exe conf$$.file if mkdir -p . 2>/dev/null; then as_mkdir_p=: else as_mkdir_p=false fi as_executable_p="test -f" # Sed expression to map a string onto a valid CPP name. as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" # Sed expression to map a string onto a valid variable name. as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g" # IFS # We need space, tab and new line, in precisely that order. as_nl=' ' IFS=" $as_nl" # CDPATH. $as_unset CDPATH exec 6>&1 # Open the log real soon, to keep \$[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. Logging --version etc. is OK. exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX } >&5 cat >&5 <<_CSEOF This file was extended by $as_me, which was generated by GNU Autoconf 2.57. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ _CSEOF echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5 echo >&5 _ACEOF # Files that config.status was made for. if test -n "$ac_config_files"; then echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS fi if test -n "$ac_config_headers"; then echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS fi if test -n "$ac_config_links"; then echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS fi if test -n "$ac_config_commands"; then echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS fi cat >>$CONFIG_STATUS <<\_ACEOF ac_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.57, with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\" Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." srcdir=$srcdir INSTALL="$INSTALL" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "x$1" : 'x\([^=]*\)='` ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'` ac_shift=: ;; -*) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; *) # This is not an option, so the user has probably given explicit # arguments. ac_option=$1 ac_need_defaults=false;; esac case $ac_option in # Handling of the options. _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --vers* | -V ) echo "$ac_cs_version"; exit 0 ;; --he | --h) # Conflict between --help and --header { { echo "$as_me:$LINENO: error: ambiguous option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; };; --help | --hel | -h ) echo "$ac_cs_usage"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1 Try \`$0 --help' for more information." >&5 echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2;} { (exit 1); exit 1; }; } ;; *) ac_config_targets="$ac_config_targets $1" ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF if \$ac_cs_recheck; then echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS section. # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_config_target in $ac_config_targets do case "$ac_config_target" in # Handling of arguments. "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason to put it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Create a temporary directory, and hook for its removal unless debugging. $debug || { trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./confstat$$-$RANDOM (umask 077 && mkdir $tmp) } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "\$CONFIG_FILES"; then # Protect against being on the right side of a sed subst in config.status. sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g; s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF s,@SHELL@,$SHELL,;t t s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t s,@exec_prefix@,$exec_prefix,;t t s,@prefix@,$prefix,;t t s,@program_transform_name@,$program_transform_name,;t t s,@bindir@,$bindir,;t t s,@sbindir@,$sbindir,;t t s,@libexecdir@,$libexecdir,;t t s,@datadir@,$datadir,;t t s,@sysconfdir@,$sysconfdir,;t t s,@sharedstatedir@,$sharedstatedir,;t t s,@localstatedir@,$localstatedir,;t t s,@libdir@,$libdir,;t t s,@includedir@,$includedir,;t t s,@oldincludedir@,$oldincludedir,;t t s,@infodir@,$infodir,;t t s,@mandir@,$mandir,;t t s,@build_alias@,$build_alias,;t t s,@host_alias@,$host_alias,;t t s,@target_alias@,$target_alias,;t t s,@DEFS@,$DEFS,;t t s,@ECHO_C@,$ECHO_C,;t t s,@ECHO_N@,$ECHO_N,;t t s,@ECHO_T@,$ECHO_T,;t t s,@LIBS@,$LIBS,;t t s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t s,@INSTALL_DATA@,$INSTALL_DATA,;t t s,@CYGPATH_W@,$CYGPATH_W,;t t s,@PACKAGE@,$PACKAGE,;t t s,@VERSION@,$VERSION,;t t s,@ACLOCAL@,$ACLOCAL,;t t s,@AUTOCONF@,$AUTOCONF,;t t s,@AUTOMAKE@,$AUTOMAKE,;t t s,@AUTOHEADER@,$AUTOHEADER,;t t s,@MAKEINFO@,$MAKEINFO,;t t s,@AMTAR@,$AMTAR,;t t s,@install_sh@,$install_sh,;t t s,@STRIP@,$STRIP,;t t s,@ac_ct_STRIP@,$ac_ct_STRIP,;t t s,@INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t s,@AWK@,$AWK,;t t s,@SET_MAKE@,$SET_MAKE,;t t s,@am__leading_dot@,$am__leading_dot,;t t s,@MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t s,@MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t s,@MAINT@,$MAINT,;t t s,@CC@,$CC,;t t s,@CFLAGS@,$CFLAGS,;t t s,@LDFLAGS@,$LDFLAGS,;t t s,@CPPFLAGS@,$CPPFLAGS,;t t s,@ac_ct_CC@,$ac_ct_CC,;t t s,@EXEEXT@,$EXEEXT,;t t s,@OBJEXT@,$OBJEXT,;t t s,@DEPDIR@,$DEPDIR,;t t s,@am__include@,$am__include,;t t s,@am__quote@,$am__quote,;t t s,@AMDEP_TRUE@,$AMDEP_TRUE,;t t s,@AMDEP_FALSE@,$AMDEP_FALSE,;t t s,@AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t s,@CCDEPMODE@,$CCDEPMODE,;t t s,@am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t s,@am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t s,@CPP@,$CPP,;t t s,@EGREP@,$EGREP,;t t s,@PKG_CONFIG@,$PKG_CONFIG,;t t s,@PACKAGE_CFLAGS@,$PACKAGE_CFLAGS,;t t s,@PACKAGE_LIBS@,$PACKAGE_LIBS,;t t s,@LIBOBJS@,$LIBOBJS,;t t s,@LTLIBOBJS@,$LTLIBOBJS,;t t CEOF _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # Split the substitutions into bite-sized pieces for seds with # small command number limits, like on Digital OSF/1 and HP-UX. ac_max_sed_lines=48 ac_sed_frag=1 # Number of current file. ac_beg=1 # First line for current file. ac_end=$ac_max_sed_lines # Line after last line for current file. ac_more_lines=: ac_sed_cmds= while $ac_more_lines; do if test $ac_beg -gt 1; then sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag else sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag fi if test ! -s $tmp/subs.frag; then ac_more_lines=false else # The purpose of the label and of the branching condition is to # speed up the sed processing (if there are no `@' at all, there # is no need to browse any of the substitutions). # These are the two extra sed commands mentioned above. (echo ':t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed if test -z "$ac_sed_cmds"; then ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed" else ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed" fi ac_sed_frag=`expr $ac_sed_frag + 1` ac_beg=$ac_end ac_end=`expr $ac_end + $ac_max_sed_lines` fi done if test -z "$ac_sed_cmds"; then ac_sed_cmds=cat fi fi # test -n "$CONFIG_FILES" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories. ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_builddir$INSTALL ;; esac if test x"$ac_file" != x-; then { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} rm -f "$ac_file" fi # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then configure_input= else configure_input="$ac_file. " fi configure_input=$configure_input"Generated from `echo $ac_file_in | sed 's,.*/,,'` by configure." # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } _ACEOF cat >>$CONFIG_STATUS <<_ACEOF sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s,@configure_input@,$configure_input,;t t s,@srcdir@,$ac_srcdir,;t t s,@abs_srcdir@,$ac_abs_srcdir,;t t s,@top_srcdir@,$ac_top_srcdir,;t t s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t s,@builddir@,$ac_builddir,;t t s,@abs_builddir@,$ac_abs_builddir,;t t s,@top_builddir@,$ac_top_builddir,;t t s,@abs_top_builddir@,$ac_abs_top_builddir,;t t s,@INSTALL@,$ac_INSTALL,;t t " $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out rm -f $tmp/stdin if test x"$ac_file" != x-; then mv $tmp/out $ac_file else cat $tmp/out rm -f $tmp/out fi done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_HEADER section. # # These sed commands are passed to sed as "A NAME B NAME C VALUE D", where # NAME is the cpp macro being defined and VALUE is the value it is being given. # # ac_d sets the value in "#define NAME VALUE" lines. ac_dA='s,^\([ ]*\)#\([ ]*define[ ][ ]*\)' ac_dB='[ ].*$,\1#\2' ac_dC=' ' ac_dD=',;t' # ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE". ac_uA='s,^\([ ]*\)#\([ ]*\)undef\([ ][ ]*\)' ac_uB='$,\1#\2define\3' ac_uC=' ' ac_uD=',;t' for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in". case $ac_file in - | *:- | *:-:* ) # input from stdin cat >$tmp/stdin ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;; * ) ac_file_in=$ac_file.in ;; esac test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} # First look for the input files in the build tree, otherwise in the # src tree. ac_file_inputs=`IFS=: for f in $ac_file_in; do case $f in -) echo $tmp/stdin ;; [\\/$]*) # Absolute (can't be DOS-style, as IFS=:) test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } echo $f;; *) # Relative if test -f "$f"; then # Build tree echo $f elif test -f "$srcdir/$f"; then # Source tree echo $srcdir/$f else # /dev/null tree { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5 echo "$as_me: error: cannot find input file: $f" >&2;} { (exit 1); exit 1; }; } fi;; esac done` || { (exit 1); exit 1; } # Remove the trailing spaces. sed 's/[ ]*$//' $ac_file_inputs >$tmp/in _ACEOF # Transform confdefs.h into two sed scripts, `conftest.defines' and # `conftest.undefs', that substitutes the proper values into # config.h.in to produce config.h. The first handles `#define' # templates, and the second `#undef' templates. # And first: Protect against being on the right side of a sed subst in # config.status. Protect against being in an unquoted here document # in config.status. rm -f conftest.defines conftest.undefs # Using a here document instead of a string reduces the quoting nightmare. # Putting comments in sed scripts is not portable. # # `end' is used to avoid that the second main sed command (meant for # 0-ary CPP macros) applies to n-ary macro definitions. # See the Autoconf documentation for `clear'. cat >confdef2sed.sed <<\_ACEOF s/[\\&,]/\\&/g s,[\\$`],\\&,g t clear : clear s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*\)\(([^)]*)\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp t end s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp : end _ACEOF # If some macros were called several times there might be several times # the same #defines, which is useless. Nevertheless, we may not want to # sort them, since we want the *last* AC-DEFINE to be honored. uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs rm -f confdef2sed.sed # This sed command replaces #undef with comments. This is necessary, for # example, in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. cat >>conftest.undefs <<\_ACEOF s,^[ ]*#[ ]*undef[ ][ ]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */, _ACEOF # Break up conftest.defines because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS echo ' if grep "^[ ]*#[ ]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS echo ' # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS echo ' :' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.defines >/dev/null do # Write a limited-size here document to $tmp/defines.sed. echo ' cat >$tmp/defines.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#define' lines. echo '/^[ ]*#[ ]*define/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/defines.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines echo ' fi # grep' >>$CONFIG_STATUS echo >>$CONFIG_STATUS # Break up conftest.undefs because some shells have a limit on the size # of here documents, and old seds have small limits too (100 cmds). echo ' # Handle all the #undef templates' >>$CONFIG_STATUS rm -f conftest.tail while grep . conftest.undefs >/dev/null do # Write a limited-size here document to $tmp/undefs.sed. echo ' cat >$tmp/undefs.sed <>$CONFIG_STATUS # Speed up: don't consider the non `#undef' echo '/^[ ]*#[ ]*undef/!b' >>$CONFIG_STATUS # Work around the forget-to-reset-the-flag bug. echo 't clr' >>$CONFIG_STATUS echo ': clr' >>$CONFIG_STATUS sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS echo 'CEOF sed -f $tmp/undefs.sed $tmp/in >$tmp/out rm -f $tmp/in mv $tmp/out $tmp/in ' >>$CONFIG_STATUS sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail rm -f conftest.undefs mv conftest.tail conftest.undefs done rm -f conftest.undefs cat >>$CONFIG_STATUS <<\_ACEOF # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ if test x"$ac_file" = x-; then echo "/* Generated by configure. */" >$tmp/config.h else echo "/* $ac_file. Generated by configure. */" >$tmp/config.h fi cat $tmp/in >>$tmp/config.h rm -f $tmp/in if test x"$ac_file" != x-; then if diff $ac_file $tmp/config.h >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else ac_dir=`(dirname "$ac_file") 2>/dev/null || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p "$ac_dir" else as_dir="$ac_dir" as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5 echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;} { (exit 1); exit 1; }; }; } rm -f $ac_file mv $tmp/config.h $ac_file fi else cat $tmp/config.h rm -f $tmp/config.h fi # Compute $ac_file's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $ac_file | $ac_file:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null || $as_expr X$ac_file : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X$ac_file : 'X\(//\)[^/]' \| \ X$ac_file : 'X\(//\)$' \| \ X$ac_file : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X$ac_file | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'`/stamp-h$_am_stamp_count done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # # CONFIG_COMMANDS section. # for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue ac_dest=`echo "$ac_file" | sed 's,:.*,,'` ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'` ac_dir=`(dirname "$ac_dest") 2>/dev/null || $as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_dest" : 'X\(//\)[^/]' \| \ X"$ac_dest" : 'X\(//\)$' \| \ X"$ac_dest" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$ac_dest" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` ac_builddir=. if test "$ac_dir" != .; then ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A "../" for each directory in $ac_dir_suffix. ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'` else ac_dir_suffix= ac_top_builddir= fi case $srcdir in .) # No --srcdir option. We are building in place. ac_srcdir=. if test -z "$ac_top_builddir"; then ac_top_srcdir=. else ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'` fi ;; [\\/]* | ?:[\\/]* ) # Absolute path. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ;; *) # Relative path. ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_builddir$srcdir ;; esac # Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be # absolute. ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd` ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd` ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd` ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd` { echo "$as_me:$LINENO: executing $ac_dest commands" >&5 echo "$as_me: executing $ac_dest commands" >&6;} case $ac_dest in depfiles ) test x"$AMDEP_TRUE" != x"" || for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`(dirname "$mf") 2>/dev/null || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` else continue fi grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`(dirname "$file") 2>/dev/null || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` { if $as_mkdir_p; then mkdir -p $dirpart/$fdir else as_dir=$dirpart/$fdir as_dirs= while test ! -d "$as_dir"; do as_dirs="$as_dir $as_dirs" as_dir=`(dirname "$as_dir") 2>/dev/null || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| \ . : '\(.\)' 2>/dev/null || echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; } /^X\(\/\/\)[^/].*/{ s//\1/; q; } /^X\(\/\/\)$/{ s//\1/; q; } /^X\(\/\).*/{ s//\1/; q; } s/.*/./; q'` done test ! -n "$as_dirs" || mkdir $as_dirs fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5 echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;} { (exit 1); exit 1; }; }; } # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ;; esac done _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || { (exit 1); exit 1; } fi xvid4conf-1.12/AUTHORS0000644000175400017540000000065007721646441010116 xvid4conf was written by Tilmann Bitterberg The comments for the tooltips are from Edouard Gomez' sample configuration file. Quite some code was taken from Edouard Gomez' export_xvid4 module which is part of transcode. And yet again, Edouard Gomez polished the GUI The config file parser lib (configs.c configs.h) was written by Chris C. Hoover for transcode. Sun Aug 10 13:56:23 CEST 2003 xvid4conf-1.12/COPYING0000644000175400017540000004311007721646441010077 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. xvid4conf-1.12/ChangeLog0000644000175400017540000000307010004227541010577 xvid4conf 1.12 - make some textfields a spinbox because this is more appropriate - added hints to About Box. xvid4conf 1.11 - sync to xvidcore-1.0-beta3 (add turbo mode, change some defaults) xvid4conf 1.10 - allow the ~ to be specified in the save filename field as well. Pointed out by pouet - upgrade to xvid4 beta2 xvid4conf 1.9 - Update to the xvid4 API. Some options are gone and tooltip fixes. Use config files generated with 1.9 only with transcode > 0.6.11. xvid4conf 1.8 - the gcc-2 patch broke loading and saving. Should be fixed now. Thanks go to LethalWP. xvid4conf 1.7 - Patch by Heiner Markert to make xvid4conf compile with gcc-2. xvid4conf 1.6 - Patch by Joern Reder. When called with -v, xvid4conf prints its version. xvid4conf 1.5 - added the greyscale option - fixed the quit button (did not quit) - corrected the sentence "Save and load a file name" which was just plain stupid (although technically correct). xvid4conf 1.4 - added commandline options first arg is the output file, second arg is the inputfile, so its: xvid4conf [ outfile [ infile ] ] You can ommit ifile - if ofile is specified, the configuration will be saved automatically at exit time. - if ifile is specified, the configuration will be read automatically at init time. xvid4conf 1.3 - Added the "About" panel - Fixed dependencies - Modified a bit the Quantizer panel - Changed some options names xvid4conf 1.2 - better simple dependency checks xvid4conf 1.1 - simple dependency checks xvid4conf 1.0 - first public release xvid4conf-1.12/INSTALL0000644000175400017540000002225707721646442010107 This is a native GTK-2 application so to compile it yourself, you'll need all GTK-2 relevant libs and devel packages. Generic intstructions follow. Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' will install the package's files in `/usr/local/bin', `/usr/local/man', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PATH'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you give `configure' the option `--exec-prefix=PATH', the package will use PATH as the prefix for installing programs and libraries. Documentation and other data files will still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=PATH' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the `--target=TYPE' option to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc will cause the specified gcc to be used as the C compiler (unless it is overridden in the site shell script). `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. xvid4conf-1.12/Makefile.am0000644000175400017540000000121107721646442011075 ## Process this file with automake to produce Makefile.in SUBDIRS = src EXTRA_DIST = \ autogen.sh \ xvid4conf2.glade \ xvid4conf2.gladep install-data-local: @$(NORMAL_INSTALL) if test -d $(srcdir)/pixmaps; then \ $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)/pixmaps; \ for pixmap in $(srcdir)/pixmaps/*; do \ if test -f $$pixmap; then \ $(INSTALL_DATA) $$pixmap $(DESTDIR)$(pkgdatadir)/pixmaps; \ fi \ done \ fi dist-hook: if test -d pixmaps; then \ mkdir $(distdir)/pixmaps; \ for pixmap in pixmaps/*; do \ if test -f $$pixmap; then \ cp -p $$pixmap $(distdir)/pixmaps; \ fi \ done \ fi xvid4conf-1.12/NEWS0000644000175400017540000000000007721647373007537 xvid4conf-1.12/acconfig.h0000644000175400017540000000021607721646442010767 #undef ENABLE_NLS #undef HAVE_CATGETS #undef HAVE_GETTEXT #undef GETTEXT_PACKAGE #undef HAVE_LC_MESSAGES #undef HAVE_STPCPY #undef HAVE_LIBSM xvid4conf-1.12/aclocal.m40000644000175400017540000011401210004227747010674 # generated automatically by aclocal 1.7.7 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 10 AC_PREREQ([2.54]) # Autoconf 2.50 wants to disallow AM_ names. We explicitly allow # the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # Copyright 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.7.7])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # # Check to make sure that the build environment is sane. # # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # -*- Autoconf -*- # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_AUX_DIR_EXPAND # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. # Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50]) AC_DEFUN([AM_AUX_DIR_EXPAND], [ # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # AM_PROG_INSTALL_STRIP # Copyright 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # -*- Autoconf -*- # Copyright (C) 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # serial 5 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c : > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking Speeds up one-time builds --enable-dependency-tracking Do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 5 AC_PREREQ(2.52) # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]) fi])]) # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_PREREQ([2.52]) # serial 6 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Add --enable-maintainer-mode option to configure. # From Jim Meyering # Copyright 1996, 1998, 2000, 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT([$USE_MAINTAINER_MODE]) AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes]) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE]) # Copyright 1996, 1997, 1999, 2000, 2001, 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # @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 10.20 and later -Ae # HP-UX older versions -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" AC_TRY_COMPILE( [#include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } 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 ]) AU_DEFUN([fp_PROG_CC_STDC], [AM_PROG_CC_STDC]) dnl PKG_CHECK_MODULES(GSTUFF, gtk+-2.0 >= 1.3 glib = 1.3.4, action-if, action-not) dnl defines GSTUFF_LIBS, GSTUFF_CFLAGS, see pkg-config man page dnl also defines GSTUFF_PKG_ERRORS on error AC_DEFUN(PKG_CHECK_MODULES, [ succeeded=no if test -z "$PKG_CONFIG"; then AC_PATH_PROG(PKG_CONFIG, pkg-config, no) fi if test "$PKG_CONFIG" = "no" ; then echo "*** The pkg-config script could not be found. Make sure it is" echo "*** in your path, or set the PKG_CONFIG environment variable" echo "*** to the full path to pkg-config." echo "*** Or see http://www.freedesktop.org/software/pkgconfig to get pkg-config." else PKG_CONFIG_MIN_VERSION=0.9.0 if $PKG_CONFIG --atleast-pkgconfig-version $PKG_CONFIG_MIN_VERSION; then AC_MSG_CHECKING(for $2) if $PKG_CONFIG --exists "$2" ; then AC_MSG_RESULT(yes) succeeded=yes AC_MSG_CHECKING($1_CFLAGS) $1_CFLAGS=`$PKG_CONFIG --cflags "$2"` AC_MSG_RESULT($$1_CFLAGS) AC_MSG_CHECKING($1_LIBS) $1_LIBS=`$PKG_CONFIG --libs "$2"` AC_MSG_RESULT($$1_LIBS) else $1_CFLAGS="" $1_LIBS="" ## If we have a custom action on failure, don't print errors, but ## do set a variable so people can do so. $1_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` ifelse([$4], ,echo $$1_PKG_ERRORS,) fi AC_SUBST($1_CFLAGS) AC_SUBST($1_LIBS) else echo "*** Your version of pkg-config is too old. You need version $PKG_CONFIG_MIN_VERSION or newer." echo "*** See http://www.freedesktop.org/software/pkgconfig" fi fi if test $succeeded = yes; then ifelse([$3], , :, [$3]) else ifelse([$4], , AC_MSG_ERROR([Library requirements ($2) not met; consider adjusting the PKG_CONFIG_PATH environment variable if your libraries are in a nonstandard prefix so pkg-config can find them.]), [$4]) fi ]) xvid4conf-1.12/config.h.in0000644000175400017540000000140710004227754011060 /* config.h.in. Generated from configure.in by autoheader. */ #undef ENABLE_NLS #undef HAVE_CATGETS #undef HAVE_GETTEXT #undef GETTEXT_PACKAGE #undef HAVE_LC_MESSAGES #undef HAVE_STPCPY #undef HAVE_LIBSM /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION xvid4conf-1.12/configure.in0000644000175400017540000000060610004224110011325 dnl Process this file with autoconf to produce a configure script. AC_INIT(configure.in) AM_INIT_AUTOMAKE(xvid4conf, 1.12) AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE AC_ISC_POSIX AC_PROG_CC AM_PROG_CC_STDC AC_HEADER_STDC pkg_modules="gtk+-2.0 >= 2.0.0" PKG_CHECK_MODULES(PACKAGE, [$pkg_modules]) AC_SUBST(PACKAGE_CFLAGS) AC_SUBST(PACKAGE_LIBS) AC_OUTPUT([ Makefile src/Makefile ]) xvid4conf-1.12/depcomp0000755000175400017540000002753307721647316010436 #! /bin/sh # depcomp - compile a program generating dependencies as side-effects # Copyright 1999, 2000 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # `libtool' can also be set to `yes' or `no'. if test -z "$depfile"; then base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'` dir=`echo "$object" | sed 's,/.*$,/,'` if test "$dir" = "$object"; then dir= fi # FIXME: should be _deps on DOS. depfile="$dir.deps/$base" fi tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ## The second -e expression handles DOS-style file names with drive letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the `deleted header file' problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. tr ' ' ' ' < "$tmpdepfile" | ## Some versions of gcc put a space before the `:'. On the theory ## that the space means something, we add a space to the output as ## well. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like `#:fec' to the end of the # dependency line. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \ tr ' ' ' ' >> $depfile echo >> $depfile # The second pass generates a dummy entry for each header file. tr ' ' ' ' < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> $depfile else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. This file always lives in the current directory. # Also, the AIX compiler puts `$object:' at the start of each line; # $object doesn't have directory information. stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'` tmpdepfile="$stripped.u" outname="$stripped.o" if test "$libtool" = yes; then "$@" -Wc,-M else "$@" -M fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile" exit $stat fi if test -f "$tmpdepfile"; then # Each line is of the form `foo.o: dependent.h'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile" sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile" else # The sourcefile does not contain any dependencies, so just # store a dummy comment line, to avoid errors with the Makefile # "include basename.Plo" scheme. echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in `foo.d' instead, so we check for that too. # Subdirectories are respected. dir=`echo "$object" | sed -e 's|/[^/]*$|/|'` test "x$dir" = "x$object" && dir= base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'` if test "$libtool" = yes; then tmpdepfile1="$dir.libs/$base.lo.d" tmpdepfile2="$dir.libs/$base.d" "$@" -Wc,-MD else tmpdepfile1="$dir$base.o.d" tmpdepfile2="$dir$base.d" "$@" -MD fi stat=$? if test $stat -eq 0; then : else rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi if test -f "$tmpdepfile1"; then tmpdepfile="$tmpdepfile1" else tmpdepfile="$tmpdepfile2" fi if test -f "$tmpdepfile"; then sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile" # That's a space and a tab in the []. sed -e 's,^.*\.[a-z]*:[ ]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile" else echo "#dummy" > "$depfile" fi rm -f "$tmpdepfile" ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. We will use -o /dev/null later, # however we can't do the remplacement now because # `-o $object' might simply not be used IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M "$@" -o /dev/null $dashmflag | sed 's:^[^:]*\:[ ]*:'"$object"'\: :' > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" tr ' ' ' ' < "$tmpdepfile" | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # X makedepend shift cleared=no for arg in "$@"; do case $cleared in no) set ""; shift cleared=yes ;; esac case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; -*) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix="`echo $object | sed 's/^.*\././'`" touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" sed '1,2d' "$tmpdepfile" | tr ' ' ' ' | \ ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test $1 != '--mode=compile'; do shift done shift fi # Remove `-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E | sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the proprocessed file to stdout, regardless of -o, # because we must use -o when running libtool. "$@" || exit $? IFS=" " for arg do case "$arg" in "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s:: \1 \\:p' >> "$depfile" echo " " >> "$depfile" . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 xvid4conf-1.12/install-sh0000755000175400017540000001425307721646445011062 #!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # Calling this script install-sh is preferred over install.sh, to prevent # `make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd=$cpprog shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd=$stripprog shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "$0: no input file specified" >&2 exit 1 else : fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d "$dst" ]; then instcmd=: chmodcmd="" else instcmd=$mkdirprog 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" ] || [ -d "$src" ] then : else echo "$0: $src does not exist" >&2 exit 1 fi if [ x"$dst" = x ] then echo "$0: no destination specified" >&2 exit 1 else : 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 : 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 : fi pathcomp=$pathcomp/ done fi if [ x"$dir_arg" != x ] then $doit $instcmd "$dst" && if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; 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 : fi # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/#inst.$$# rmtmp=$dstdir/#rm.$$# # Trap to clean up temp files at exit. trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0 trap '(exit $?); exit' 1 2 13 15 # Move or copy the file name to the temp name $doit $instcmd "$src" "$dsttmp" && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi && # Now remove or move aside any old file at destination location. We try this # two ways since rm can't unlink itself on some systems and the destination # file might be busy for other reasons. In this case, the final cleanup # might fail but the new file should still install successfully. { if [ -f "$dstdir/$dstfile" ] then $doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null || $doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null || { echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2 (exit 1); exit } else : fi } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dstdir/$dstfile" fi && # The final little trick to "correctly" pass the exit status to the exit trap. { (exit 0); exit } xvid4conf-1.12/missing0000755000175400017540000002403607721646445010455 #! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc. # Originally by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi run=: # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.ac; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in --run) # Try to run requested program, and just exit if it succeeds. run= shift "$@" && exit 0 ;; esac # If it does not exist, or fails to run (possibly an outdated version), # try to emulate it. case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit --run try to run the given command, and emulate it if it fails Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c help2man touch the output file lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file tar try tar, gnutar, gtar, then tar without non-portable flags yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing 0.4 - GNU automake" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`${configure_ac}'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; autom4te) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi 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. You can get \`$1Help2man' as part of \`Autoconf' from any GNU archive site." file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'` test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'` if test -f "$file"; then touch $file else test -z "$file" || exec >$file echo "#! /bin/sh" echo "# Created by GNU Automake missing as a replacement of" echo "# $ $@" echo "exit 0" chmod +x $file exit 1 fi ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; help2man) if test -z "$run" && ($1 --version) > /dev/null 2>&1; then # We have it, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a dependency of a manual page. You may need the \`Help2man' package in order for those modifications to take effect. You can get \`Help2man' from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'` fi if [ -f "$file" ]; then touch $file else test -z "$file" || exec >$file echo ".ab help2man is required to generate this page" exit 1 fi ;; makeinfo) if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then # We have makeinfo, but it failed. exit 1 fi echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; tar) shift if test -n "$run"; then echo 1>&2 "ERROR: \`tar' requires --run" exit 1 fi # We have already tried tar in the generic part. # Look for gnutar/gtar before invocation to avoid ugly error # messages. if (gnutar --version > /dev/null 2>&1); then gnutar "$@" && exit 0 fi if (gtar --version > /dev/null 2>&1); then gtar "$@" && exit 0 fi firstarg="$1" if shift; then case "$firstarg" in *o*) firstarg=`echo "$firstarg" | sed s/o//` tar "$firstarg" "$@" && exit 0 ;; esac case "$firstarg" in *h*) firstarg=`echo "$firstarg" | sed s/h//` tar "$firstarg" "$@" && exit 0 ;; esac fi echo 1>&2 "\ WARNING: I can't seem to be able to run \`tar' with the given arguments. You may want to install GNU tar or Free paxutils, or check the command line arguments." exit 1 ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and 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 xvid4conf-1.12/mkinstalldirs0000755000175400017540000000370407721646445011663 #! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here xvid4conf-1.12/autogen.sh0000755000175400017540000001063007721647113011043 #!/bin/sh # Run this to generate all the initial makefiles, etc. srcdir=`dirname $0` test -z "$srcdir" && srcdir=. DIE=0 if [ -n "$GNOME2_DIR" ]; then ACLOCAL_FLAGS="-I $GNOME2_DIR/share/aclocal $ACLOCAL_FLAGS" LD_LIBRARY_PATH="$GNOME2_DIR/lib:$LD_LIBRARY_PATH" PATH="$GNOME2_DIR/bin:$PATH" export PATH export LD_LIBRARY_PATH fi (test -f $srcdir/configure.in) || { echo -n "**Error**: Directory "\`$srcdir\'" does not look like the" echo " top-level package directory" exit 1 } (autoconf --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`autoconf' installed." echo "Download the appropriate package for your distribution," echo "or get the source tarball at ftp://ftp.gnu.org/pub/gnu/" DIE=1 } (grep "^AC_PROG_INTLTOOL" $srcdir/configure.in >/dev/null) && { (intltoolize --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`intltool' installed." echo "You can get it from:" echo " ftp://ftp.gnome.org/pub/GNOME/" DIE=1 } } (grep "^AM_PROG_XML_I18N_TOOLS" $srcdir/configure.in >/dev/null) && { (xml-i18n-toolize --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`xml-i18n-toolize' installed." echo "You can get it from:" echo " ftp://ftp.gnome.org/pub/GNOME/" DIE=1 } } (grep "^AM_PROG_LIBTOOL" $srcdir/configure.in >/dev/null) && { (libtool --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`libtool' installed." echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" DIE=1 } } (grep "^AM_GLIB_GNU_GETTEXT" $srcdir/configure.in >/dev/null) && { (grep "sed.*POTFILES" $srcdir/configure.in) > /dev/null || \ (glib-gettextize --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`glib' installed." echo "You can get it from: ftp://ftp.gtk.org/pub/gtk" DIE=1 } } (automake --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: You must have \`automake' installed." echo "You can get it from: ftp://ftp.gnu.org/pub/gnu/" DIE=1 NO_AUTOMAKE=yes } # if no automake, don't bother testing for aclocal test -n "$NO_AUTOMAKE" || (aclocal --version) < /dev/null > /dev/null 2>&1 || { echo echo "**Error**: Missing \`aclocal'. The version of \`automake'" echo "installed doesn't appear recent enough." echo "You can get automake from ftp://ftp.gnu.org/pub/gnu/" DIE=1 } if test "$DIE" -eq 1; then exit 1 fi if test -z "$*"; then echo "**Warning**: I am going to run \`configure' with no arguments." echo "If you wish to pass any to it, please specify them on the" echo \`$0\'" command line." echo fi case $CC in xlc ) am_opt=--include-deps;; esac for coin in `find $srcdir -path $srcdir/CVS -prune -o -name configure.in -print` do dr=`dirname $coin` if test -f $dr/NO-AUTO-GEN; then echo skipping $dr -- flagged as no auto-gen else echo processing $dr ( cd $dr aclocalinclude="$ACLOCAL_FLAGS" if grep "^AM_GLIB_GNU_GETTEXT" configure.in >/dev/null; then echo "Creating $dr/aclocal.m4 ..." test -r $dr/aclocal.m4 || touch $dr/aclocal.m4 echo "Running glib-gettextize... Ignore non-fatal messages." echo "no" | glib-gettextize --force --copy echo "Making $dr/aclocal.m4 writable ..." test -r $dr/aclocal.m4 && chmod u+w $dr/aclocal.m4 fi if grep "^AC_PROG_INTLTOOL" configure.in >/dev/null; then echo "Running intltoolize..." intltoolize --copy --force --automake fi if grep "^AM_PROG_XML_I18N_TOOLS" configure.in >/dev/null; then echo "Running xml-i18n-toolize..." xml-i18n-toolize --copy --force --automake fi if grep "^AM_PROG_LIBTOOL" configure.in >/dev/null; then if test -z "$NO_LIBTOOLIZE" ; then echo "Running libtoolize..." libtoolize --force --copy fi fi echo "Running aclocal $aclocalinclude ..." aclocal $aclocalinclude if grep "^AM_CONFIG_HEADER" configure.in >/dev/null; then echo "Running autoheader..." autoheader fi echo "Running automake --gnu $am_opt ..." automake --add-missing --gnu $am_opt echo "Running autoconf ..." autoconf ) fi done conf_flags="--enable-maintainer-mode" if test x$NOCONFIGURE = x; then echo Running $srcdir/configure $conf_flags "$@" ... $srcdir/configure $conf_flags "$@" \ && echo Now type \`make\' to compile. || exit 1 else echo Skipping configure process. fi xvid4conf-1.12/xvid4conf2.glade0000644000175400017540000066204710004227541012030 True xvid4conf GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False 3 True True True True GTK_POS_TOP False False True False 0 2 True 0 0.5 GTK_SHADOW_ETCHED_IN True 5 2 False 0 2 True Quant Type False False GTK_JUSTIFY_LEFT False False 0 0.5 2 6 0 1 0 1 fill True Motion False False GTK_JUSTIFY_LEFT False False 0 0.5 2 6 0 1 1 2 fill True VHQ False False GTK_JUSTIFY_LEFT False False 0 0.5 2 6 0 1 2 3 fill True 0 2 3 4 fill 2 True MPEG4 allows two methods two compress the image, the first one is derived from h263, the other one is inspired by the MPEG2 matrix quantization. When using custom matrices, mpeg must be used. True 0 True h263 True True mpeg True 1 2 0 1 2 True This option controls the motion estimation subsystem. The higher the value, the more precise the estimation should be. The more precise the motion estimation is, the more bits can be saved. Precision is gained at the expense of CPU time so decrease this setting if you need realtime encoding. True 0 True 0 - None True True 1 - Very Low True True 2 - Low True True 3 - Medium True True 4 - High True True 5 - Very High True True 6 - Ultra High True 1 2 1 2 2 True The motion search algorithm is based on a search in the usual color domain and tries to find a motion vector that minimizes the difference between the reference frame and the encoded frame. Activating this setting, XviD will also use the frequency domain (DCT) to search a motion vector that minimizes not only the spatial difference but also the encoding length of the block. The higher, the more precise and more CPU intensive True 0 True 0 - Disabled True True 1 - Mode Selection True True 2 - Limited Search True True 3 - Medium Search True True 4 - Wide Search True 1 2 2 3 True 3 3 False 0 0 3 True The usual motion estimation algorithm uses only the luminance information to find the best motion vector. However for some video material, using the chromatic planes can help find better vectors. This setting turns on/off the use of chroma planes for Motion Estimation True Chroma ME True GTK_RELIEF_NORMAL True False True 0 1 0 1 fill 3 True Activates High Quality AC coefficient prediction from neighboor blocks. True HighQ AC True GTK_RELIEF_NORMAL True False True 1 2 0 1 fill 3 True Trellis Quantization is a kind of adaptive quantization method that saves bits modifying quantized coefficients to make them more compressable by the entropy encoder. Its impact on quality is good, and if VHQ uses too much CPU for you, this setting can be a good alternative to save a few bits (and gain quality at fixed bitrate) at a minimum expense. than VHQ True Trellis Quantizer True GTK_RELIEF_NORMAL False False True 2 3 0 1 fill 3 True Activate this if your encoded sequence is an Anime/Cartoon. It modifies some XviD internal thresholds so XviD takes better decisions on frame types and motion vectors for flat looking cartoons. True Cartoon Mode True GTK_RELIEF_NORMAL False False True 0 1 1 2 fill 3 True For interlaced video material, turn this option to on. NB this option does not deinterlace video, it encodes it field-based True Interlaced True GTK_RELIEF_NORMAL False False True 2 3 1 2 fill 3 True XviD discard chroma planes bitstream so the encoded video is greyscale only. Note that this does not speed up encoding, that just prevent chroma data from being written in the last stage of encoding. This setting enable Chroma color discarding. True Greyscale True GTK_RELIEF_NORMAL False False True 1 2 1 2 fill 3 True Motion estimation involves lot of refinement steps. Usually these steps help reaching better quality, but not by much, and they use a fair amount of CPU. So if you want to speedup Motion Estimation by skipping some refinement steps and using simplified ME functions, you can activate the turbo mode. True Turbo Mode True GTK_RELIEF_NORMAL False False True 1 2 2 3 fill 0 2 4 5 fill True <b>General Settings</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 4 label_item 0 True True 2 True 0 0.5 GTK_SHADOW_ETCHED_IN True 4 3 False 0 0 True Max B-Frames False False GTK_JUSTIFY_LEFT False False 0 0.5 2 6 0 1 0 1 fill True B-Quant Ratio False False GTK_JUSTIFY_LEFT False False 0 0.5 2 6 0 1 1 2 fill True B-Quant Offset False False GTK_JUSTIFY_LEFT False False 0 0.5 2 6 0 1 2 3 fill True B-Frame Threshold False False GTK_JUSTIFY_LEFT False False 0 0.5 2 6 0 1 3 4 fill True Sometimes BFrames do not look good, and introduce artefacts when most of the frame is static and some small zones have high motion (a static scene with a man talking, his mouth will probably look bad if what is surrounding the man and his mouth is completly static) This setting allow you to favorize or not, the use of bframes. The higher the value, the more a bframe has chance to be used. True 1 0 False GTK_UPDATE_ALWAYS False False 0 -255 255 1 10 10 1 2 3 4 2 True As explained before, BFrames are highly correlated to its reference frames Thus XviD computes their quantizer to its reference's quantizers. This two settings allow you to tune the formula: True 1 0 False GTK_UPDATE_ALWAYS False False 100 0 200 1 10 10 1 2 2 3 2 True As explained before, BFrames are highly correlated to its reference frames Thus XviD computes their quantizer to its reference's quantizers. This two settings allow you to tune the formula: True 1 0 False GTK_UPDATE_ALWAYS False False 150 0 200 1 10 10 1 2 1 2 2 True BFrames are the third type of frames available in MPEG4, they are predicted thanks to 2 reference frames. Thus, bframes help usually in two cases: 1/ saving bitrate w/o loss of quality 2/ increasing the quality for a same bitrate This setting controls how many bframes the xvid encoder can output in a row. You must be aware that the higher max_bframes is, the more distant reference frames are from each other. Thus prediction of reference frames become hard and results in poor quality. If the reference frames have poor quality, so the bframes will have. So as a rule of thumb, this setting has to be tuned according to your exact needs. Common values are [0..2] for "natural movies and a bit higher values for anime/cartoons with great amounts of constant color areas. True 1 0 False GTK_UPDATE_ALWAYS False False 2 0 10 1 10 10 1 2 0 1 2 2 True Depending on the container and frontend API, sometimes it is good to ask XviD to group the first bframe of a group with its forward reference frame, that prevents A/V desync This setting would be useful if it was used with VFW 1.1 encoders (Windows) because this API does not allow audio contention when no video frames are output. But transcode does not suffer from that API problem and the xvid4 module informs transcode to delay frames when needed, so this option is mostly not needed with transcode. True Packed True GTK_RELIEF_NORMAL True False True 2 3 0 1 fill 2 True A GOP is a Group Of Pictures. Its bounded by two Intra Frames. This option controls if XviD must close a GOP, which means that a GOP is independent from the next GOP. This implies just that the last frame of the GOP is eiter a PFrame or a SFrame but not a BFrame. This is usually a good idea to turn on the option True Closed Gop True GTK_RELIEF_NORMAL True False True 2 3 1 2 fill 2 True MPEG4 uses a half pixel precision for its motion search by default. The standard proposes a mode where encoders are allowed to use quarter pixel precision. This option usually results in sharper image. But it has great impact on bitrate and sometimes the higher use of bitrate will prevent it from giving a better image quality at a fixed bitrate. The better is to test w and w/o it and choose after this test, if it's worth activting it. True Quarterpel True GTK_RELIEF_NORMAL False False True 2 3 2 3 fill 2 True Makes XviD generates Sprite Frame which describe best Pan/Zoom/Rotating images. Deciding wether or not you must activate it depends highly on the video material True GMC True GTK_RELIEF_NORMAL False False True 2 3 3 4 fill True <b>Advanced Simple Profile Specific Settings</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 4 label_item 0 True True 2 True 0 0.5 GTK_SHADOW_ETCHED_IN True 2 2 False 0 0 True Frame Drop Tolerance False False GTK_JUSTIFY_LEFT False False 0 0.5 2 6 0 1 0 1 fill True Debug False False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 0 1 1 2 fill True XviD keeps track of block coding type (skipped, predicted, intra). The skipped block counter can be used to choose wether a frame is so close to its reference that it can be _completly_ skipped. This setting allows you to choose the (100 - value) threshold for skipping a frame. True 1 0 False GTK_UPDATE_ALWAYS False False 0 0 100 1 10 10 1 2 0 1 2 2 True For testing purposes, or quality measurement, XviD can return some stats about the encoded frames. This option activates PSNR measurement, the average PSNR is displayed at the end of the encoding session. This option is probably something a Joe user does not really care. This option makes the encoding a bit slower. True Output average PSNR True GTK_RELIEF_NORMAL False False True 1 2 1 2 2 fill True <b>Other Settings</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 label_item 0 True True False True True _Features True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 tab True False 0 True False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 0 False False True 0 0.5 GTK_SHADOW_ETCHED_IN 3 True 4 3 False 0 0 True I-Frame Quantizer False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 1 2 fill True P-Frame Quantizer False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 2 3 fill True B-Frame Quantizer False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 3 4 fill True Minimum I-Frame Quantizer True 1 0 False GTK_UPDATE_ALWAYS False False 2 1 31 1 10 10 1 2 1 2 2 2 True Minimum P-Frame Quantizer True 1 0 False GTK_UPDATE_ALWAYS False False 2 1 31 1 10 10 1 2 2 3 2 2 True Minimum B-Frame Quantizer True 1 0 False GTK_UPDATE_ALWAYS False False 2 1 31 1 10 10 1 2 3 4 2 2 True Maximum I-Frame Quantizer True 1 0 False GTK_UPDATE_ALWAYS False False 31 1 31 1 10 10 2 3 1 2 2 2 True Maximum I-Frame Quantizer True 1 0 False GTK_UPDATE_ALWAYS False False 31 1 31 1 10 10 2 3 2 3 2 2 True Maximum I-Frame Quantizer True 1 0 True GTK_UPDATE_ALWAYS False False 31 1 31 1 10 10 2 3 3 4 2 2 True Minimum False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 1 2 0 1 True Maximum False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 2 3 0 1 True <b>Quantizer ranges</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 label_item 0 False True True 0 0.5 GTK_SHADOW_ETCHED_IN 3 True 3 4 False 0 0 True Intra Matrix File False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 0 1 fill True Inter Matrix File False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 1 2 fill True Read Inter Matrix from this file True True True 0 True * False 1 3 1 2 2 5 True Read Intra Matrix from this file True True True 0 True * False 1 3 0 1 2 5 2 True Launch File selection Dialog True ... True GTK_RELIEF_NORMAL 3 4 0 1 fill 2 True Launch File selection Dialog True ... True GTK_RELIEF_NORMAL 3 4 1 2 fill 2 True Launch the Matrix Editor True GTK_RELIEF_NORMAL True 0.5 0.5 0 0 True False 2 True gtk-justify-fill 4 0.5 0.5 0 0 0 False False True Matrix Editor True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 0 False False 1 3 2 3 fill True <b>MPEG Quantization Matrices</b> False True GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 label_item 0 True False False True True _Quantizers True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 tab 3 True 3 2 False 0 0 True This parameter controls the delay in frames before the CBR rate controller will react to bitrate changes and will try to compensate the change to obtain a constant bitrate over an averaging range of frames (see below). Value = >=0 Default = 16 0 has a special meaning, it lets XviD uses its own default values True True True 0 16 True * False 1 2 0 1 2 5 True Real CBR is hard to achieve. Depending on the video material, bitrate can be variable, and hard to predict. That's why XviD uses an averaging period for which it guarantees a given amount of bits (minus a small variation). This settings express the "number of frames" for which XviD averages bitrate and tries to achieve CBR. Value = >=0 Default = 100 0 has a special meaning, it lets XviD uses its own default values True True True 0 100 True * False 1 2 1 2 2 5 True 0 has a special meaning, it lets XviD uses its own default values True True True 0 100 True * False 1 2 2 3 2 5 True Reaction Delay Factor False False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 0 1 0 1 2 5 fill True Averaging Period False False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 0 1 1 2 2 5 fill True Buffer False False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 0 1 2 3 2 5 fill False True True _Single Pass True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 tab 2 True 10 2 False 0 0 True Keyframe Boost False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 0 1 fill True Overflow Control Strength False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 1 2 fill True Curve Compression High False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 2 3 fill True Curve Compression Low False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 3 4 fill True Max Overflow Improvement False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 4 5 fill True Max Overflow Degradation False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 5 6 fill True Key Frame Reduction False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 6 7 fill True Key Frame Threshold False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 7 8 fill True Container Overhead per Frame False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 8 9 fill True This settigs control how much the upper part of the curve has to get closer to the average bitrate value. The upper part of the curve is the set of values that are higher than the curve average. It is expressed in %. Think of that setting like a shrinking factor for the upper part of the curve. True 1 0 False GTK_UPDATE_ALWAYS False False 0 0 100 1 10 10 1 2 2 3 True This settigs control how much the lower part of the curve has to get closer to the average bitrate value. The lower part of the curve is the set of values that are lower than the curve average. It is expressed in %. Think of that setting like a growing factor for the lower part of the curve. True 1 0 False GTK_UPDATE_ALWAYS False False 0 0 100 1 10 10 1 2 3 4 True This reduction factor is the maximum allowed keyframe penalty applied to a frame in a ivop sequence. The more the frame is distant from the last ivop in the consecutive ivop sequence, the more penalty it is applied. This ensures a maximum bitrate allocation to the last ivop, thus favorizing a good reference frame for following p/s/b vops. True True True 0 20 True * False 1 2 6 7 True Distance between two ivops so that it is not decresed its bit allocation by the ivop reduction mechanism. True True True 0 1 True * False 1 2 7 8 True Most of the time users express their target bitrate for video w/o taking care of the video container overhead. This small but (mostly) constant overhead can make the target file size is not respected (oversized result). We decided to allow users to set the amount of overhead per frame the container generates (give only an average per frame) Value = >=0 Default = 24 (AVI frame average overhead per frame in bytes) 0 has a special meaning, it lets XviD uses its own default values True True True 0 24 True * False 1 2 8 9 True This setting tells how many additional amount of bits, Intra Frames are supposed to be given (this "bossting" amount of bits is compensated by subtracting the same amount of bits from other frame types pool) Value = [0..100] True 1 0 False GTK_UPDATE_ALWAYS False False 0 0 100 1 10 10 1 2 0 1 True During two pass, a scaled bitrate curve is computed. The difference between that expected curve and the result obtained during encoding is called overflow. Obviously, the two pass Rate Controller tries to compensate that overflow distributing it over next frames to be encoded. This setting controls how much overflow is distributed at each new frame. Low values allow lazy overflow control, big rate bursts are compensated more slowly (could lead to lack of precision for small clips). High values make RC compensate very hard the overflow, this can have a very bad impact on quality during rate bursts. NB: This setting impacts quality a lot, play with it carefully! True 1 0 False GTK_UPDATE_ALWAYS False False 5 0 100 1 10 10 1 2 1 2 True During the frame bit allocation, overflow control may increase the frame size. This parameter controls how much the overflow control is allowed to increase the frame size in percent compared to the ideal curve allocation True 1 0 False GTK_UPDATE_ALWAYS False False 5 0 100 1 10 10 1 2 4 5 True During the frame bit allocation, overflow control may decrease the frame size. This parameter controls how much the overflow control is allowed to decrease the frame size in percent compared to the ideal curve allocation True 1 0 False GTK_UPDATE_ALWAYS False False 5 0 100 1 10 10 1 2 5 6 False True True _Two Pass True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 tab True False 0 True Save and Load a configuration file False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 25 0 False False 3 True 2 4 False 0 0 True Load From False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 0 1 fill True Save To False False GTK_JUSTIFY_LEFT False False 0 0.5 0 0 0 1 1 2 fill True Filename to save settings to True True True 0 ./xvid4.cfg True * False 1 3 1 2 2 5 True Filename to load settings from True True True 0 ~/.transcode/xvid4.cfg True * False 1 3 0 1 2 5 2 True True ... True GTK_RELIEF_NORMAL 3 4 0 1 fill 2 True True ... True GTK_RELIEF_NORMAL 3 4 1 2 fill 0 True True True 5 5 False 0 0 4 True Close this programm True gtk-quit True GTK_RELIEF_NORMAL 4 5 4 5 fill 2 True Set default settings for this session True GTK_RELIEF_NORMAL True 0.5 0.5 0 0 True False 2 True gtk-go-down 4 0.5 0.5 0 0 0 False False True Set Defaults True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 0 False False 4 5 0 1 fill True 0 5 1 2 2 True Restore default settings for this session True GTK_RELIEF_NORMAL True 0.5 0.5 0 0 True False 2 True gtk-go-up 4 0.5 0.5 0 0 0 False False True Restore Defaults True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 0 False False 0 1 0 1 fill 4 True Load Settings from file True GTK_RELIEF_NORMAL True 0.5 0.5 0 0 True False 2 True gtk-open 4 0.5 0.5 0 0 0 False False True Load Settings True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 0 False False 0 1 2 3 fill True 0 5 3 4 fill 4 True Save Settings to file True GTK_RELIEF_NORMAL True 0.5 0.5 0 0 True False 2 True gtk-save 4 0.5 0.5 0 0 0 False False True Save Settings True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 0 False False 4 5 2 3 fill 0 True True False True True Save/_Load True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 tab True 0 0.5 GTK_SHADOW_ETCHED_IN True <b>XviD Configuration Panel</b> for transcode Copyright(C) 2003, 2004 Tilmann Bitterberg Hints: o To get the version on the commandline do <tt>$ xvid4conf -v </tt> o To automatically save settings at exit time <tt> $ xvid4conf save.cfg</tt> o To automatically load settings at startup and safe at exit <tt>$ xvid4conf save.cfg load.cfg</tt> False True GTK_JUSTIFY_CENTER False False 0.5 0.5 0 0 True False False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 label_item False True True _About True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 tab True Matrix Editor GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False 2 True False 0 2 True 9 9 False 0 0 True X1 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 2 3 0 1 fill True X2 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 3 4 0 1 fill True X3 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 4 5 0 1 fill True X4 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 5 6 0 1 fill True X5 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 6 7 0 1 fill True X6 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 7 8 0 1 fill True X7 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 8 9 0 1 fill True X0 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 1 2 0 1 fill True Y0 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 1 2 fill True Y1 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 2 3 fill True Y2 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 3 4 fill True Y3 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 4 5 fill True Y4 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 5 6 fill True Y5 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 6 7 fill True Y6 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 5 0 1 7 8 fill True Y7 False False GTK_JUSTIFY_LEFT False False 0 0.5 2 2 0 1 8 9 fill True True True True 0 True * False 4 1 2 1 2 True True True True 0 True * False 4 2 3 1 2 True True True True 0 True * False 4 3 4 1 2 True True True True 0 True * False 4 4 5 1 2 True True True True 0 True * False 4 5 6 1 2 True True True True 0 True * False 4 6 7 1 2 True True True True 0 True * False 4 7 8 1 2 True True True True 0 True * False 4 8 9 1 2 True True True True 0 True * False 4 1 2 2 3 True True True True 0 True * False 4 2 3 2 3 True True True True 0 True * False 4 3 4 2 3 True True True True 0 True * False 4 4 5 2 3 True True True True 0 True * False 4 5 6 2 3 True True True True 0 True * False 4 6 7 2 3 True True True True 0 True * False 4 7 8 2 3 True True True True 0 True * False 4 8 9 2 3 True True True True 0 True * False 4 1 2 3 4 True True True True 0 True * False 4 2 3 3 4 True True True True 0 True * False 4 3 4 3 4 True True True True 0 True * False 4 4 5 3 4 True True True True 0 True * False 4 5 6 3 4 True True True True 0 True * False 4 6 7 3 4 True True True True 0 True * False 4 7 8 3 4 True True True True 0 True * False 4 8 9 3 4 True True True True 0 True * False 4 1 2 4 5 True True True True 0 True * False 4 2 3 4 5 True True True True 0 True * False 4 3 4 4 5 True True True True 0 True * False 4 4 5 4 5 True True True True 0 True * False 4 5 6 4 5 True True True True 0 True * False 4 6 7 4 5 True True True True 0 True * False 4 7 8 4 5 True True True True 0 True * False 4 8 9 4 5 True True True True 0 True * False 4 1 2 5 6 True True True True 0 True * False 4 2 3 5 6 True True True True 0 True * False 4 3 4 5 6 True True True True 0 True * False 4 4 5 5 6 True True True True 0 True * False 4 5 6 5 6 True True True True 0 True * False 4 6 7 5 6 True True True True 0 True * False 4 7 8 5 6 True True True True 0 True * False 4 8 9 5 6 True True True True 0 True * False 4 1 2 6 7 True True True True 0 True * False 4 2 3 6 7 True True True True 0 True * False 4 3 4 6 7 True True True True 0 True * False 4 4 5 6 7 True True True True 0 True * False 4 5 6 6 7 True True True True 0 True * False 4 6 7 6 7 True True True True 0 True * False 4 7 8 6 7 True True True True 0 True * False 4 8 9 6 7 True True True True 0 True * False 4 1 2 7 8 True True True True 0 True * False 4 2 3 7 8 True True True True 0 True * False 4 3 4 7 8 True True True True 0 True * False 4 4 5 7 8 True True True True 0 True * False 4 5 6 7 8 True True True True 0 True * False 4 6 7 7 8 True True True True 0 True * False 4 7 8 7 8 True True True True 0 True * False 4 8 9 7 8 True True True True 0 True * False 4 1 2 8 9 True True True True 0 True * False 4 2 3 8 9 True True True True 0 True * False 4 3 4 8 9 True True True True 0 True * False 4 4 5 8 9 True True True True 0 True * False 4 5 6 8 9 True True True True 0 True * False 4 6 7 8 9 True True True True 0 True * False 4 7 8 8 9 True True True True 0 True * False 4 8 9 8 9 0 True True True 3 6 False 0 0 True Filename False False GTK_JUSTIFY_LEFT False False 0 0.5 4 5 0 1 0 1 fill 2 True Close this window True GTK_RELIEF_NORMAL True 0.5 0.5 0 0 True False 2 True gtk-close 4 0.5 0.5 0 0 0 False False True Dismiss True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 0 False False 4 5 2 3 fill 2 True Open the file selection dialog True ... True GTK_RELIEF_NORMAL 5 6 0 1 fill True True True True 0 True * False 1 5 0 1 True 0 6 1 2 fill 2 True Clear all fields True GTK_RELIEF_NORMAL True 0.5 0.5 0 0 True False 2 True gtk-new 4 0.5 0.5 0 0 0 False False True Clear True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 0 False False 1 2 2 3 fill 2 True Save Matrix to filename True GTK_RELIEF_NORMAL True 0.5 0.5 0 0 True False 2 True gtk-save 4 0.5 0.5 0 0 0 False False True Save True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 0 False False 3 4 2 3 fill 2 True Load Matrix from filename True GTK_RELIEF_NORMAL True 0.5 0.5 0 0 True False 2 True gtk-open 4 0.5 0.5 0 0 0 False False True Load True False GTK_JUSTIFY_LEFT False False 0.5 0.5 0 0 0 False False 2 3 2 3 fill 0 True True 10 True Select File to load settings from GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True True True True GTK_RELIEF_NORMAL True True True GTK_RELIEF_NORMAL 10 True Select File to Save settings to GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True True True True GTK_RELIEF_NORMAL True True True GTK_RELIEF_NORMAL 10 True Select Matrix File GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True True True True GTK_RELIEF_NORMAL True True True GTK_RELIEF_NORMAL 10 True Select File for the INTRA matrix GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True True True True GTK_RELIEF_NORMAL True True True GTK_RELIEF_NORMAL 10 True Select File to read INTER matrix from GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True True True True GTK_RELIEF_NORMAL True True True GTK_RELIEF_NORMAL True xvid4conf Help GTK_WINDOW_TOPLEVEL GTK_WIN_POS_NONE False True False True False 0 True True GTK_POLICY_ALWAYS GTK_POLICY_ALWAYS GTK_SHADOW_NONE GTK_CORNER_TOP_LEFT 2 True True False GTK_JUSTIFY_LEFT GTK_WRAP_NONE False 0 0 0 0 0 2 Hello, Welcome to <B>XVID4CONF</B> Thanks 0 True True True True 0 False False xvid4conf-1.12/xvid4conf2.gladep0000644000175400017540000000056507721646447012225 Project4 xvid4conf2 FALSE FALSE FALSE xvid4conf-1.12/src/0000777000175400017540000000000010004227755007707 5xvid4conf-1.12/src/Makefile.in0000644000175400017540000003046710004227755011702 # Makefile.in generated by automake 1.7.7 from Makefile.am. # @configure_input@ # Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd INSTALL = @INSTALL@ install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : ACLOCAL = @ACLOCAL@ AMDEP_FALSE = @AMDEP_FALSE@ AMDEP_TRUE = @AMDEP_TRUE@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAINT = @MAINT@ MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@ MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@ MAKEINFO = @MAKEINFO@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_CFLAGS = @PACKAGE_CFLAGS@ PACKAGE_LIBS = @PACKAGE_LIBS@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ ac_ct_CC = @ac_ct_CC@ ac_ct_STRIP = @ac_ct_STRIP@ am__fastdepCC_FALSE = @am__fastdepCC_FALSE@ am__fastdepCC_TRUE = @am__fastdepCC_TRUE@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ bindir = @bindir@ build_alias = @build_alias@ datadir = @datadir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localstatedir = @localstatedir@ mandir = @mandir@ oldincludedir = @oldincludedir@ prefix = @prefix@ program_transform_name = @program_transform_name@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ bin_PROGRAMS = xvid4conf xvid4conf_SOURCES = \ main.c main.h \ support.c support.h \ interface.c interface.h \ configs.c configs.h \ callbacks.c callbacks.h \ xvid4.h xvid4conf_LDADD = @PACKAGE_LIBS@ subdir = src ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = bin_PROGRAMS = xvid4conf$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) am_xvid4conf_OBJECTS = main.$(OBJEXT) support.$(OBJEXT) \ interface.$(OBJEXT) configs.$(OBJEXT) callbacks.$(OBJEXT) xvid4conf_OBJECTS = $(am_xvid4conf_OBJECTS) xvid4conf_DEPENDENCIES = xvid4conf_LDFLAGS = DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles @AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/callbacks.Po ./$(DEPDIR)/configs.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/interface.Po ./$(DEPDIR)/main.Po \ @AMDEP_TRUE@ ./$(DEPDIR)/support.Po COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ DIST_SOURCES = $(xvid4conf_SOURCES) DIST_COMMON = $(srcdir)/Makefile.in Makefile.am SOURCES = $(xvid4conf_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe) binPROGRAMS_INSTALL = $(INSTALL_PROGRAM) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(bindir) @list='$(bin_PROGRAMS)'; for p in $$list; do \ p1=`echo $$p|sed 's/$(EXEEXT)$$//'`; \ if test -f $$p \ ; then \ f=`echo "$$p1" | sed 's,^.*/,,;$(transform);s/$$/$(EXEEXT)/'`; \ echo " $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f"; \ $(INSTALL_PROGRAM_ENV) $(binPROGRAMS_INSTALL) $$p $(DESTDIR)$(bindir)/$$f || exit 1; \ else :; fi; \ done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; for p in $$list; do \ f=`echo "$$p" | sed 's,^.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/'`; \ echo " rm -f $(DESTDIR)$(bindir)/$$f"; \ rm -f $(DESTDIR)$(bindir)/$$f; \ done clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) xvid4conf$(EXEEXT): $(xvid4conf_OBJECTS) $(xvid4conf_DEPENDENCIES) @rm -f xvid4conf$(EXEEXT) $(LINK) $(xvid4conf_LDFLAGS) $(xvid4conf_OBJECTS) $(xvid4conf_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) core *.core distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/callbacks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/configs.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/interface.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/support.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$< .c.obj: @am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ @am__fastdepCC_TRUE@ -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \ @am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ @am__fastdepCC_TRUE@ else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \ @am__fastdepCC_TRUE@ fi @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi` uninstall-info-am: ETAGS = etags ETAGSFLAGS = CTAGS = ctags CTAGSFLAGS = tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ mkid -fID $$unique TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$tags$$unique" \ || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$tags $$unique ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(CTAGS_ARGS)$$tags$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$tags $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && cd $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) $$here distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) top_distdir = .. distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \ list='$(DISTFILES)'; for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \ esac; \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ if test "$$dir" != "$$file" && test "$$dir" != "."; then \ dir="/$$dir"; \ $(mkinstalldirs) "$(distdir)$$dir"; \ else \ dir=''; \ fi; \ if test -d $$d/$$file; then \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \ fi; \ cp -pR $$d/$$file $(distdir)$$dir || exit 1; \ else \ test -f $(distdir)/$$file \ || cp -p $$d/$$file $(distdir)/$$file \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: $(mkinstalldirs) $(DESTDIR)$(bindir) install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -rm -f $(CONFIG_CLEAN_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: info: info-am info-am: install-data-am: install-exec-am: install-binPROGRAMS install-info: install-info-am install-man: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-info-am .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am info \ info-am install install-am install-binPROGRAMS install-data \ install-data-am install-exec install-exec-am install-info \ install-info-am install-man install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS uninstall-info-am # 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: xvid4conf-1.12/src/Makefile.am0000644000175400017540000000062107721646447011675 ## Process this file with automake to produce Makefile.in INCLUDES = \ -DPACKAGE_DATA_DIR=\""$(datadir)"\" \ -DPACKAGE_LOCALE_DIR=\""$(prefix)/$(DATADIRNAME)/locale"\" \ @PACKAGE_CFLAGS@ bin_PROGRAMS = xvid4conf xvid4conf_SOURCES = \ main.c main.h \ support.c support.h \ interface.c interface.h \ configs.c configs.h \ callbacks.c callbacks.h \ xvid4.h xvid4conf_LDADD = @PACKAGE_LIBS@ xvid4conf-1.12/src/main.c0000644000175400017540000005252610004224112010705 /* * Initial main.c file generated by Glade. Edit as required. * Glade will not overwrite this file. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include "interface.h" #include "support.h" #include "configs.h" #include "xvid4.h" #include "main.h" #define MOD_NAME PACKAGE int read_config_file(xvid_transcode_module_t *mod, char *file, int read) { int ret = 0; xvid_plugin_single_t *onepass = &mod->cfg_onepass; xvid_plugin_2pass2_t *pass2 = &mod->cfg_pass2; xvid_enc_create_t *create = &mod->cfg_create; xvid_enc_frame_t *frame = &mod->cfg_frame; struct config complete_config[] = { /* Section [features] */ {"features", "Feature settings", CONF_TYPE_SECTION, 0, 0, 0, NULL}, {"quant_type", &mod->cfg_quant_method, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"motion", &mod->cfg_motion, CONF_TYPE_INT, CONF_RANGE, 0, 6, NULL}, {"chromame", &mod->cfg_chromame, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"vhq", &mod->cfg_vhq, CONF_TYPE_INT, CONF_RANGE, 0, 4, NULL}, {"max_bframes", &create->max_bframes, CONF_TYPE_INT, CONF_RANGE, 0, 20, NULL}, {"bquant_ratio", &create->bquant_ratio, CONF_TYPE_INT, CONF_RANGE, 0, 200, NULL}, {"bquant_offset", &create->bquant_offset, CONF_TYPE_INT, CONF_RANGE, 0, 200, NULL}, {"bframe_threshold", &frame->bframe_threshold, CONF_TYPE_INT, CONF_RANGE, -255, 255, NULL}, {"quarterpel", &mod->cfg_quarterpel, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"gmc", &mod->cfg_gmc, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"trellis", &mod->cfg_trellis, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"packed", &mod->cfg_packed, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"closed_gop", &mod->cfg_closed_gop, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"interlaced", &mod->cfg_interlaced, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"cartoon", &mod->cfg_cartoon, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"hqacpred", &mod->cfg_hqacpred, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"frame_drop_ratio", &create->frame_drop_ratio, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, {"stats", &mod->cfg_stats, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"greyscale", &mod->cfg_greyscale, CONF_TYPE_FLAG, 0, 0, 1, NULL}, {"turbo", &mod->cfg_turbo, CONF_TYPE_FLAG, 0, 0, 1, NULL}, /* section [quantizer] */ {"quantizer", "Quantizer settings", CONF_TYPE_SECTION, 0, 0, 0, NULL}, {"min_iquant", &create->min_quant[0], CONF_TYPE_INT, CONF_RANGE, 1, 31, NULL}, {"max_iquant", &create->max_quant[0], CONF_TYPE_INT, CONF_RANGE, 1, 31, NULL}, {"min_pquant", &create->min_quant[1], CONF_TYPE_INT, CONF_RANGE, 1, 31, NULL}, {"max_pquant", &create->max_quant[1], CONF_TYPE_INT, CONF_RANGE, 1, 31, NULL}, {"min_bquant", &create->min_quant[2], CONF_TYPE_INT, CONF_RANGE, 1, 31, NULL}, {"max_bquant", &create->max_quant[2], CONF_TYPE_INT, CONF_RANGE, 1, 31, NULL}, {"quant_intra_matrix", &mod->cfg_intra_matrix_file, CONF_TYPE_STRING, 0, 0, 100, NULL}, {"quant_inter_matrix", &mod->cfg_inter_matrix_file, CONF_TYPE_STRING, 0, 0, 100, NULL}, /* section [cbr] */ {"cbr", "CBR settings", CONF_TYPE_SECTION, 0, 0, 0, NULL}, {"reaction_delay_factor", &onepass->reaction_delay_factor, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, {"averaging_period", &onepass->averaging_period, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, {"buffer", &onepass->buffer, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, /* section [cbr] */ {"vbr", "VBR settings", CONF_TYPE_SECTION, 0, 0, 0, NULL}, {"keyframe_boost", &pass2->keyframe_boost, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, {"overflow_control_strength", &pass2->overflow_control_strength, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, {"curve_compression_high", &pass2->curve_compression_high, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, {"curve_compression_low", &pass2->curve_compression_low, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, {"max_overflow_improvement", &pass2->max_overflow_improvement, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, {"max_overflow_degradation", &pass2->max_overflow_degradation, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, {"kfreduction", &pass2->kfreduction, CONF_TYPE_INT, CONF_RANGE, 0, 100, NULL}, {"kfthreshold", &pass2->kfthreshold, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, {"container_frame_overhead", &pass2->container_frame_overhead, CONF_TYPE_INT, CONF_MIN, 0, 0, NULL}, /* End of the config file */ {NULL, 0, 0, 0, 0, 0, NULL} }; /* Read the values */ if (read) ret = module_read_config(NULL, MOD_NAME, file, complete_config); if (!read) ret = module_print_config_core((file)?file:"stderr", complete_config); /* Print the values */ //if (ret) module_print_config("["MOD_NAME"] ", complete_config); return ret; } /////////// // Globals /////////// // main window GtkWidget *window1; // Matrix window GtkWidget *window2; GtkWidget *matrix_edit_filsel_dlg; // help window GtkWidget *helpwin; // dlgs GtkWidget *quant_intra_matrix_dlg; GtkWidget *quant_inter_matrix_dlg; GtkWidget *load_settings_dlg; GtkWidget *save_settings_dlg; // xvid config struct xvid_transcode_module_t xcfg; xvid_transcode_module_t xcfg_sav; int xvidcfg2window(void) { int index=0; char buf[128], *s; GtkWidget *c; if (!strncmp(xcfg.cfg_quant_method,"h263",4)) index=0; if (!strncmp(xcfg.cfg_quant_method,"mpeg",4)) index=1; c = lookup_widget(GTK_WIDGET(window1), "quant_type"); gtk_option_menu_set_history(GTK_OPTION_MENU(c),index); c = lookup_widget(GTK_WIDGET(window1), "motion"); gtk_option_menu_set_history(GTK_OPTION_MENU(c),xcfg.cfg_motion); c = lookup_widget(GTK_WIDGET(window1), "chromame"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(c), xcfg.cfg_chromame); c = lookup_widget(GTK_WIDGET(window1), "vhq"); gtk_option_menu_set_history(GTK_OPTION_MENU(c),xcfg.cfg_vhq); c = lookup_widget(GTK_WIDGET(window1), "max_bframes"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_create.max_bframes); c = lookup_widget(GTK_WIDGET(window1), "bquant_ratio"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_create.bquant_ratio); c = lookup_widget(GTK_WIDGET(window1), "bquant_offset"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_create.bquant_offset); c = lookup_widget(GTK_WIDGET(window1), "bframe_threshold"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_frame.bframe_threshold); c = lookup_widget(GTK_WIDGET(window1), "frame_drop_ratio"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_create.frame_drop_ratio); c = lookup_widget(GTK_WIDGET(window1), "quarterpel"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(c), xcfg.cfg_quarterpel); c = lookup_widget(GTK_WIDGET(window1), "gmc"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(c), xcfg.cfg_gmc); c = lookup_widget(GTK_WIDGET(window1), "trellis"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(c), xcfg.cfg_trellis); c = lookup_widget(GTK_WIDGET(window1), "packed"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(c), xcfg.cfg_packed); c = lookup_widget(GTK_WIDGET(window1), "closed_gop"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(c), xcfg.cfg_closed_gop); c = lookup_widget(GTK_WIDGET(window1), "interlaced"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(c), xcfg.cfg_interlaced); c = lookup_widget(GTK_WIDGET(window1), "cartoon"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(c), xcfg.cfg_cartoon); c = lookup_widget(GTK_WIDGET(window1), "hqacpred"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(c), xcfg.cfg_hqacpred); c = lookup_widget(GTK_WIDGET(window1), "greyscale"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(c), xcfg.cfg_greyscale); c = lookup_widget(GTK_WIDGET(window1), "turbo"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(c), xcfg.cfg_turbo); c = lookup_widget(GTK_WIDGET(window1), "stats"); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(c), xcfg.cfg_stats); c = lookup_widget(GTK_WIDGET(window1), "min_iquant"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_create.min_quant[0]); c = lookup_widget(GTK_WIDGET(window1), "min_pquant"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_create.min_quant[1]); c = lookup_widget(GTK_WIDGET(window1), "min_bquant"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_create.min_quant[2]); c = lookup_widget(GTK_WIDGET(window1), "max_iquant"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_create.max_quant[0]); c = lookup_widget(GTK_WIDGET(window1), "max_pquant"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_create.max_quant[1]); c = lookup_widget(GTK_WIDGET(window1), "max_bquant"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_create.max_quant[2]); /// Do the matrix loading c = lookup_widget(GTK_WIDGET(window1), "quant_intra_matrix"); s = xcfg.cfg_intra_matrix_file; gtk_entry_set_text(GTK_ENTRY(c), (s && *s)?s:""); c = lookup_widget(GTK_WIDGET(window1), "quant_inter_matrix"); s = xcfg.cfg_inter_matrix_file; gtk_entry_set_text(GTK_ENTRY(c), (s && *s)?s:""); c = lookup_widget(GTK_WIDGET(window1), "reaction_delay_factor"); snprintf(buf, 128, "%d", xcfg.cfg_onepass.reaction_delay_factor); gtk_entry_set_text(GTK_ENTRY(c), buf); c = lookup_widget(GTK_WIDGET(window1), "averaging_period"); snprintf(buf, 128, "%d", xcfg.cfg_onepass.averaging_period); gtk_entry_set_text(GTK_ENTRY(c), buf); c = lookup_widget(GTK_WIDGET(window1), "buffer"); snprintf(buf, 128, "%d", xcfg.cfg_onepass.buffer); gtk_entry_set_text(GTK_ENTRY(c), buf); c = lookup_widget(GTK_WIDGET(window1), "keyframe_boost"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_pass2.keyframe_boost); c = lookup_widget(GTK_WIDGET(window1), "curve_compression_low"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_pass2.curve_compression_low); c = lookup_widget(GTK_WIDGET(window1), "curve_compression_high"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_pass2.curve_compression_high); c = lookup_widget(GTK_WIDGET(window1), "bitrate_payback_delay"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_pass2.overflow_control_strength); c = lookup_widget(GTK_WIDGET(window1), "max_overflow_improvement"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_pass2.max_overflow_improvement); c = lookup_widget(GTK_WIDGET(window1), "max_overflow_degradation"); gtk_spin_button_set_value(GTK_SPIN_BUTTON(c), (float)xcfg.cfg_pass2.max_overflow_degradation); c = lookup_widget(GTK_WIDGET(window1), "kfreduction"); snprintf(buf, 128, "%d", xcfg.cfg_pass2.kfreduction); gtk_entry_set_text(GTK_ENTRY(c), buf); c = lookup_widget(GTK_WIDGET(window1), "kfthreshold"); snprintf(buf, 128, "%d", xcfg.cfg_pass2.kfthreshold); gtk_entry_set_text(GTK_ENTRY(c), buf); c = lookup_widget(GTK_WIDGET(window1), "container_frame_overhead"); snprintf(buf, 128, "%d", xcfg.cfg_pass2.container_frame_overhead); gtk_entry_set_text(GTK_ENTRY(c), buf); return 0; } int window2xvidcfg(void) { int index; const char *s; GtkWidget *c, *menu, *active; c = lookup_widget(GTK_WIDGET(window1), "quant_type"); menu = GTK_OPTION_MENU(c)->menu; active = gtk_menu_get_active(GTK_MENU(menu)); index = g_list_index(GTK_MENU_SHELL(menu)->children, active); switch(index) { case 0: xcfg.cfg_quant_method = "h263"; break; case 1: xcfg.cfg_quant_method = "mpeg"; break; } //printf ("motion (%d) vhq (%d) chromame (%d)\n", xcfg.cfg_motion, xcfg.cfg_vhq, xcfg.cfg_chromame); c = lookup_widget(GTK_WIDGET(window1), "packed"); xcfg.cfg_packed = GTK_TOGGLE_BUTTON (c)->active; c = lookup_widget(GTK_WIDGET(window1), "closed_gop"); xcfg.cfg_closed_gop = GTK_TOGGLE_BUTTON (c)->active; c = lookup_widget(GTK_WIDGET(window1), "interlaced"); xcfg.cfg_interlaced = GTK_TOGGLE_BUTTON (c)->active; c = lookup_widget(GTK_WIDGET(window1), "quarterpel"); xcfg.cfg_quarterpel = GTK_TOGGLE_BUTTON (c)->active; c = lookup_widget(GTK_WIDGET(window1), "gmc"); xcfg.cfg_gmc = GTK_TOGGLE_BUTTON (c)->active; c = lookup_widget(GTK_WIDGET(window1), "trellis"); xcfg.cfg_trellis = GTK_TOGGLE_BUTTON (c)->active; c = lookup_widget(GTK_WIDGET(window1), "cartoon"); xcfg.cfg_cartoon = GTK_TOGGLE_BUTTON (c)->active; c = lookup_widget(GTK_WIDGET(window1), "hqacpred"); xcfg.cfg_hqacpred = GTK_TOGGLE_BUTTON (c)->active; c = lookup_widget(GTK_WIDGET(window1), "greyscale"); xcfg.cfg_greyscale = GTK_TOGGLE_BUTTON (c)->active; c = lookup_widget(GTK_WIDGET(window1), "turbo"); xcfg.cfg_turbo = GTK_TOGGLE_BUTTON (c)->active; c = lookup_widget(GTK_WIDGET(window1), "chromame"); xcfg.cfg_chromame = GTK_TOGGLE_BUTTON (c)->active; c = lookup_widget(GTK_WIDGET(window1), "vhq"); menu = GTK_OPTION_MENU(c)->menu; active = gtk_menu_get_active(GTK_MENU(menu)); xcfg.cfg_vhq = g_list_index(GTK_MENU_SHELL(menu)->children, active); c = lookup_widget(GTK_WIDGET(window1), "motion"); menu = GTK_OPTION_MENU(c)->menu; active = gtk_menu_get_active(GTK_MENU(menu)); xcfg.cfg_motion = g_list_index(GTK_MENU_SHELL(menu)->children, active); c = lookup_widget(GTK_WIDGET(window1), "stats"); xcfg.cfg_stats = GTK_TOGGLE_BUTTON (c)->active; c = lookup_widget(GTK_WIDGET(window1), "max_bframes"); xcfg.cfg_create.max_bframes = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); //printf("%d\n", xcfg.cfg_create.max_bframes); c = lookup_widget(GTK_WIDGET(window1), "max_bframes"); xcfg.cfg_create.max_bframes = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "bquant_ratio"); xcfg.cfg_create.bquant_ratio = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "bquant_offset"); xcfg.cfg_create.bquant_offset = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "frame_drop_ratio"); xcfg.cfg_create.frame_drop_ratio = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "bframe_threshold"); xcfg.cfg_frame.bframe_threshold = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "min_iquant"); xcfg.cfg_create.min_quant[0] = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "max_iquant"); xcfg.cfg_create.max_quant[0] = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "min_pquant"); xcfg.cfg_create.min_quant[1] = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "max_pquant"); xcfg.cfg_create.max_quant[1] = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "min_bquant"); xcfg.cfg_create.min_quant[2] = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "max_bquant"); xcfg.cfg_create.max_quant[2] = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "reaction_delay_factor"); xcfg.cfg_onepass.reaction_delay_factor = atoi (gtk_entry_get_text(GTK_ENTRY(c))); c = lookup_widget(GTK_WIDGET(window1), "averaging_period"); xcfg.cfg_onepass.averaging_period = atoi (gtk_entry_get_text(GTK_ENTRY(c))); c = lookup_widget(GTK_WIDGET(window1), "buffer"); xcfg.cfg_onepass.buffer = atoi (gtk_entry_get_text(GTK_ENTRY(c))); c = lookup_widget(GTK_WIDGET(window1), "keyframe_boost"); xcfg.cfg_pass2.keyframe_boost = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "curve_compression_high"); xcfg.cfg_pass2.curve_compression_high = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "bitrate_payback_delay"); xcfg.cfg_pass2.overflow_control_strength = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "curve_compression_low"); xcfg.cfg_pass2.curve_compression_low = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "max_overflow_improvement"); xcfg.cfg_pass2.max_overflow_improvement = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "max_overflow_degradation"); xcfg.cfg_pass2.max_overflow_degradation = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); c = lookup_widget(GTK_WIDGET(window1), "kfreduction"); xcfg.cfg_pass2.kfreduction = atoi (gtk_entry_get_text(GTK_ENTRY(c))); c = lookup_widget(GTK_WIDGET(window1), "kfthreshold"); xcfg.cfg_pass2.kfthreshold = atoi (gtk_entry_get_text(GTK_ENTRY(c))); c = lookup_widget(GTK_WIDGET(window1), "container_frame_overhead"); xcfg.cfg_pass2.container_frame_overhead = atoi (gtk_entry_get_text(GTK_ENTRY(c))); // matrix; memleak! c = lookup_widget(GTK_WIDGET(window1), "quant_intra_matrix"); s = gtk_entry_get_text(GTK_ENTRY(c)); if (s && *s) { if (xcfg.cfg_intra_matrix_file) free(xcfg.cfg_intra_matrix_file); xcfg.cfg_intra_matrix_file = strdup(s); } else { if (xcfg.cfg_intra_matrix_file) free(xcfg.cfg_intra_matrix_file); xcfg.cfg_intra_matrix_file = NULL; } c = lookup_widget(GTK_WIDGET(window1), "quant_inter_matrix"); s = gtk_entry_get_text(GTK_ENTRY(c)); if (s && *s) { if (xcfg.cfg_inter_matrix_file) free(xcfg.cfg_inter_matrix_file); xcfg.cfg_inter_matrix_file = strdup(s); } else { if (xcfg.cfg_inter_matrix_file) free(xcfg.cfg_inter_matrix_file); xcfg.cfg_inter_matrix_file = NULL; } return 0; } int matrix2window(int *matrix) { GtkWidget *c; char buf[128]; char field[128]; int i, j, x; x = 0; for (j = 0; j<8; j++) { for (i = 0; i<8; i++) { sprintf(field, "a%d%d", i, j); c = lookup_widget(GTK_WIDGET(window2), field); sprintf(buf, "%d", matrix [x]); gtk_entry_set_text(GTK_ENTRY(c), buf); ++x; } } return 0; } int window2matrix(int *matrix) { GtkWidget *c; char field[128]; int i, j, x; x = 0; for (j = 0; j<8; j++) { for (i = 0; i<8; i++) { sprintf(field, "a%d%d", i, j); c = lookup_widget(GTK_WIDGET(window2), field); matrix [x] = atoi (gtk_entry_get_text(GTK_ENTRY(c))); ++x; } } return 0; } int read_matrix(int *matrix, const char *filename) { int i; FILE *input; /* Open the matrix file */ if((input = fopen(filename, "rb")) == NULL) { return(1); } /* Read the matrix */ for(i=0; i<64; i++) { int value; /* If fscanf fails then get out of the loop */ if(fscanf(input, "%d", &value) != 1) { fclose(input); return(2); } /* Clamp the value to safe range */ value = (value< 1)?1 :value; value = (value>255)?255:value; matrix[i] = value; } /* Fills the rest with 1 */ while(i<64) matrix[i++] = 1; /* We're done */ fclose(input); return(0); } char *ifile; char *ofile; int main (int argc, char *argv[]) { int i=0; GtkWidget *c; gtk_set_locale (); gtk_init (&argc, &argv); for(i=1; i #endif #include #include #include #include #include #include #include "support.h" GtkWidget* lookup_widget (GtkWidget *widget, const gchar *widget_name) { GtkWidget *parent, *found_widget; for (;;) { if (GTK_IS_MENU (widget)) parent = gtk_menu_get_attach_widget (GTK_MENU (widget)); else parent = widget->parent; if (!parent) parent = (GtkWidget*) g_object_get_data (G_OBJECT (widget), "GladeParentKey"); if (parent == NULL) break; widget = parent; } found_widget = (GtkWidget*) g_object_get_data (G_OBJECT (widget), widget_name); if (!found_widget) g_warning ("Widget not found: %s", widget_name); return found_widget; } static GList *pixmaps_directories = NULL; /* Use this function to set the directory containing installed pixmaps. */ void add_pixmap_directory (const gchar *directory) { pixmaps_directories = g_list_prepend (pixmaps_directories, g_strdup (directory)); } /* This is an internally used function to find pixmap files. */ static gchar* find_pixmap_file (const gchar *filename) { GList *elem; /* We step through each of the pixmaps directory to find it. */ elem = pixmaps_directories; while (elem) { gchar *pathname = g_strdup_printf ("%s%s%s", (gchar*)elem->data, G_DIR_SEPARATOR_S, filename); if (g_file_test (pathname, G_FILE_TEST_EXISTS)) return pathname; g_free (pathname); elem = elem->next; } return NULL; } /* This is an internally used function to create pixmaps. */ GtkWidget* create_pixmap (GtkWidget *widget, const gchar *filename) { gchar *pathname = NULL; GtkWidget *pixmap; if (!filename || !filename[0]) return gtk_image_new (); pathname = find_pixmap_file (filename); if (!pathname) { g_warning ("Couldn't find pixmap file: %s", filename); return gtk_image_new (); } pixmap = gtk_image_new_from_file (pathname); g_free (pathname); return pixmap; } /* This is an internally used function to create pixmaps. */ GdkPixbuf* create_pixbuf (const gchar *filename) { gchar *pathname = NULL; GdkPixbuf *pixbuf; GError *error = NULL; if (!filename || !filename[0]) return NULL; pathname = find_pixmap_file (filename); if (!pathname) { g_warning ("Couldn't find pixmap file: %s", filename); return NULL; } pixbuf = gdk_pixbuf_new_from_file (pathname, &error); if (!pixbuf) { fprintf (stderr, "Failed to load pixbuf file: %s: %s\n", pathname, error->message); g_error_free (error); } g_free (pathname); return pixbuf; } /* This is used to set ATK action descriptions. */ void glade_set_atk_action_description (AtkAction *action, const gchar *action_name, const gchar *description) { gint n_actions, i; n_actions = atk_action_get_n_actions (action); for (i = 0; i < n_actions; i++) { if (!strcmp (atk_action_get_name (action, i), action_name)) atk_action_set_description (action, i, description); } } xvid4conf-1.12/src/support.h0000644000175400017540000000246507721646447011536 /* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include #endif #include /* * Public Functions. */ /* * This function returns a widget in a component created by Glade. * Call it with the toplevel widget in the component (i.e. a window/dialog), * or alternatively any widget in the component, and the name of the widget * you want returned. */ GtkWidget* lookup_widget (GtkWidget *widget, const gchar *widget_name); /* Use this function to set the directory containing installed pixmaps. */ void add_pixmap_directory (const gchar *directory); /* * Private Functions. */ /* This is used to create the pixmaps used in the interface. */ GtkWidget* create_pixmap (GtkWidget *widget, const gchar *filename); /* This is used to create the pixbufs used in the interface. */ GdkPixbuf* create_pixbuf (const gchar *filename); /* This is used to set ATK action descriptions. */ void glade_set_atk_action_description (AtkAction *action, const gchar *action_name, const gchar *description); xvid4conf-1.12/src/interface.c0000644000175400017540000036052310004227541011731 /* * DO NOT EDIT THIS FILE - it is generated by Glade. */ #ifdef HAVE_CONFIG_H # include #endif #include #include #include #include #include #include #include #include "callbacks.h" #include "interface.h" #include "support.h" #define GLADE_HOOKUP_OBJECT(component,widget,name) \ g_object_set_data_full (G_OBJECT (component), name, \ gtk_widget_ref (widget), (GDestroyNotify) gtk_widget_unref) #define GLADE_HOOKUP_OBJECT_NO_REF(component,widget,name) \ g_object_set_data (G_OBJECT (component), name, widget) GtkWidget* create_window1 (void) { GtkWidget *window1; GtkWidget *notebook1; GtkWidget *vbox1; GtkWidget *frame3; GtkWidget *table1; GtkWidget *label12; GtkWidget *label13; GtkWidget *label14; GtkWidget *hseparator1; GtkWidget *quant_type; GtkWidget *menu1; GtkWidget *h2631; GtkWidget *mpeg1; GtkWidget *motion; GtkWidget *menu2; GtkWidget *_0_none1; GtkWidget *_1_very_low1; GtkWidget *_2_low1; GtkWidget *_3_medium1; GtkWidget *_4_high1; GtkWidget *_5_very_high1; GtkWidget *_6_ultra_high1; GtkWidget *vhq; GtkWidget *menu3; GtkWidget *_0_disabled1; GtkWidget *_1_mode_selection1; GtkWidget *_2_limited_search1; GtkWidget *_3_medium_search1; GtkWidget *_4_wide_search1; GtkWidget *table13; GtkWidget *chromame; GtkWidget *hqacpred; GtkWidget *trellis; GtkWidget *cartoon; GtkWidget *interlaced; GtkWidget *greyscale; GtkWidget *turbo; GtkWidget *label9; GtkWidget *frame4; GtkWidget *table2; GtkWidget *label15; GtkWidget *bquant_ratio_label; GtkWidget *bquant_offset_label; GtkWidget *bframe_threshold_label; GtkObject *bframe_threshold_adj; GtkWidget *bframe_threshold; GtkObject *bquant_offset_adj; GtkWidget *bquant_offset; GtkObject *bquant_ratio_adj; GtkWidget *bquant_ratio; GtkObject *max_bframes_adj; GtkWidget *max_bframes; GtkWidget *packed; GtkWidget *closed_gop; GtkWidget *quarterpel; GtkWidget *gmc; GtkWidget *label10; GtkWidget *frame5; GtkWidget *table12; GtkWidget *label19; GtkWidget *label80; GtkObject *frame_drop_ratio_adj; GtkWidget *frame_drop_ratio; GtkWidget *stats; GtkWidget *label79; GtkWidget *label3; GtkWidget *vbox2; GtkWidget *label81; GtkWidget *frame6; GtkWidget *table4; GtkWidget *label20; GtkWidget *label21; GtkWidget *bquant_min_max_label; GtkObject *min_iquant_adj; GtkWidget *min_iquant; GtkObject *min_pquant_adj; GtkWidget *min_pquant; GtkObject *min_bquant_adj; GtkWidget *min_bquant; GtkObject *max_iquant_adj; GtkWidget *max_iquant; GtkObject *max_pquant_adj; GtkWidget *max_pquant; GtkObject *max_bquant_adj; GtkWidget *max_bquant; GtkWidget *label29; GtkWidget *label30; GtkWidget *label87; GtkWidget *frame7; GtkWidget *table5; GtkWidget *label26; GtkWidget *label27; GtkWidget *quant_inter_matrix; GtkWidget *quant_intra_matrix; GtkWidget *load_intra_matrix_file_but; GtkWidget *load_inter_matrix_file_but; GtkWidget *matrix_editor; GtkWidget *alignment10; GtkWidget *hbox10; GtkWidget *image10; GtkWidget *label78; GtkWidget *label88; GtkWidget *label4; GtkWidget *table8; GtkWidget *reaction_delay_factor; GtkWidget *averaging_period; GtkWidget *buffer; GtkWidget *label50; GtkWidget *label51; GtkWidget *label52; GtkWidget *label5; GtkWidget *table9; GtkWidget *label55; GtkWidget *label56; GtkWidget *label57; GtkWidget *label58; GtkWidget *label59; GtkWidget *label60; GtkWidget *label62; GtkWidget *label63; GtkWidget *label64; GtkObject *curve_compression_high_adj; GtkWidget *curve_compression_high; GtkObject *curve_compression_low_adj; GtkWidget *curve_compression_low; GtkWidget *kfreduction; GtkWidget *kfthreshold; GtkWidget *container_frame_overhead; GtkObject *keyframe_boost_adj; GtkWidget *keyframe_boost; GtkObject *bitrate_payback_delay_adj; GtkWidget *bitrate_payback_delay; GtkObject *max_overflow_improvement_adj; GtkWidget *max_overflow_improvement; GtkObject *max_overflow_degradation_adj; GtkWidget *max_overflow_degradation; GtkWidget *label65; GtkWidget *vbox4; GtkWidget *label68; GtkWidget *table10; GtkWidget *label66; GtkWidget *label67; GtkWidget *save_file_name_text; GtkWidget *load_file_name_text; GtkWidget *load_settings_filesel_but; GtkWidget *save_settings_filesel_but; GtkWidget *table11; GtkWidget *quit; GtkWidget *save_defaults; GtkWidget *alignment8; GtkWidget *hbox8; GtkWidget *image8; GtkWidget *label76; GtkWidget *fixed1; GtkWidget *restore_defaults; GtkWidget *alignment9; GtkWidget *hbox9; GtkWidget *image9; GtkWidget *label77; GtkWidget *load_settings; GtkWidget *alignment6; GtkWidget *hbox6; GtkWidget *image6; GtkWidget *label74; GtkWidget *fixed2; GtkWidget *save_settings; GtkWidget *alignment5; GtkWidget *hbox5; GtkWidget *image5; GtkWidget *label73; GtkWidget *label7; GtkWidget *frame8; GtkWidget *label91; GtkWidget *label90; GtkWidget *label89; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); window1 = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (window1), "xvid4conf"); notebook1 = gtk_notebook_new (); gtk_widget_show (notebook1); gtk_container_add (GTK_CONTAINER (window1), notebook1); gtk_container_set_border_width (GTK_CONTAINER (notebook1), 3); vbox1 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox1); gtk_container_add (GTK_CONTAINER (notebook1), vbox1); frame3 = gtk_frame_new (NULL); gtk_widget_show (frame3); gtk_box_pack_start (GTK_BOX (vbox1), frame3, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame3), 2); table1 = gtk_table_new (5, 2, FALSE); gtk_widget_show (table1); gtk_container_add (GTK_CONTAINER (frame3), table1); gtk_table_set_col_spacings (GTK_TABLE (table1), 2); label12 = gtk_label_new ("Quant Type"); gtk_widget_show (label12); gtk_table_attach (GTK_TABLE (table1), label12, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label12), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label12), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label12), 2, 6); label13 = gtk_label_new ("Motion"); gtk_widget_show (label13); gtk_table_attach (GTK_TABLE (table1), label13, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label13), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label13), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label13), 2, 6); label14 = gtk_label_new ("VHQ"); gtk_widget_show (label14); gtk_table_attach (GTK_TABLE (table1), label14, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label14), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label14), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label14), 2, 6); hseparator1 = gtk_hseparator_new (); gtk_widget_show (hseparator1); gtk_table_attach (GTK_TABLE (table1), hseparator1, 0, 2, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); quant_type = gtk_option_menu_new (); gtk_widget_show (quant_type); gtk_table_attach (GTK_TABLE (table1), quant_type, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (quant_type), 2); gtk_tooltips_set_tip (tooltips, quant_type, "MPEG4 allows two methods two compress the image, the first one is derived from h263, the other one is inspired by the MPEG2 matrix quantization. When using custom matrices, mpeg must be used.", NULL); menu1 = gtk_menu_new (); h2631 = gtk_menu_item_new_with_mnemonic ("h263"); gtk_widget_show (h2631); gtk_container_add (GTK_CONTAINER (menu1), h2631); mpeg1 = gtk_menu_item_new_with_mnemonic ("mpeg"); gtk_widget_show (mpeg1); gtk_container_add (GTK_CONTAINER (menu1), mpeg1); gtk_option_menu_set_menu (GTK_OPTION_MENU (quant_type), menu1); motion = gtk_option_menu_new (); gtk_widget_show (motion); gtk_table_attach (GTK_TABLE (table1), motion, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (motion), 2); gtk_tooltips_set_tip (tooltips, motion, "This option controls the motion estimation subsystem. The higher the value, the more precise the estimation should be. The more precise the motion estimation is, the more bits can be saved. Precision is gained at the expense of CPU time so decrease this setting if you need realtime encoding.", NULL); menu2 = gtk_menu_new (); _0_none1 = gtk_menu_item_new_with_mnemonic ("0 - None"); gtk_widget_show (_0_none1); gtk_container_add (GTK_CONTAINER (menu2), _0_none1); _1_very_low1 = gtk_menu_item_new_with_mnemonic ("1 - Very Low"); gtk_widget_show (_1_very_low1); gtk_container_add (GTK_CONTAINER (menu2), _1_very_low1); _2_low1 = gtk_menu_item_new_with_mnemonic ("2 - Low"); gtk_widget_show (_2_low1); gtk_container_add (GTK_CONTAINER (menu2), _2_low1); _3_medium1 = gtk_menu_item_new_with_mnemonic ("3 - Medium"); gtk_widget_show (_3_medium1); gtk_container_add (GTK_CONTAINER (menu2), _3_medium1); _4_high1 = gtk_menu_item_new_with_mnemonic ("4 - High"); gtk_widget_show (_4_high1); gtk_container_add (GTK_CONTAINER (menu2), _4_high1); _5_very_high1 = gtk_menu_item_new_with_mnemonic ("5 - Very High"); gtk_widget_show (_5_very_high1); gtk_container_add (GTK_CONTAINER (menu2), _5_very_high1); _6_ultra_high1 = gtk_menu_item_new_with_mnemonic ("6 - Ultra High"); gtk_widget_show (_6_ultra_high1); gtk_container_add (GTK_CONTAINER (menu2), _6_ultra_high1); gtk_option_menu_set_menu (GTK_OPTION_MENU (motion), menu2); vhq = gtk_option_menu_new (); gtk_widget_show (vhq); gtk_table_attach (GTK_TABLE (table1), vhq, 1, 2, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (vhq), 2); gtk_tooltips_set_tip (tooltips, vhq, "The motion search algorithm is based on a search in the usual color domain and tries to find a motion vector that minimizes the difference between the reference frame and the encoded frame.\n\nActivating this setting, XviD will also use the frequency domain (DCT) to search a motion vector that minimizes not only the spatial difference but also the encoding length of the block. The higher, the more precise and more CPU intensive", NULL); menu3 = gtk_menu_new (); _0_disabled1 = gtk_menu_item_new_with_mnemonic ("0 - Disabled"); gtk_widget_show (_0_disabled1); gtk_container_add (GTK_CONTAINER (menu3), _0_disabled1); _1_mode_selection1 = gtk_menu_item_new_with_mnemonic ("1 - Mode Selection"); gtk_widget_show (_1_mode_selection1); gtk_container_add (GTK_CONTAINER (menu3), _1_mode_selection1); _2_limited_search1 = gtk_menu_item_new_with_mnemonic ("2 - Limited Search"); gtk_widget_show (_2_limited_search1); gtk_container_add (GTK_CONTAINER (menu3), _2_limited_search1); _3_medium_search1 = gtk_menu_item_new_with_mnemonic ("3 - Medium Search"); gtk_widget_show (_3_medium_search1); gtk_container_add (GTK_CONTAINER (menu3), _3_medium_search1); _4_wide_search1 = gtk_menu_item_new_with_mnemonic ("4 - Wide Search"); gtk_widget_show (_4_wide_search1); gtk_container_add (GTK_CONTAINER (menu3), _4_wide_search1); gtk_option_menu_set_menu (GTK_OPTION_MENU (vhq), menu3); table13 = gtk_table_new (3, 3, FALSE); gtk_widget_show (table13); gtk_table_attach (GTK_TABLE (table1), table13, 0, 2, 4, 5, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); chromame = gtk_check_button_new_with_mnemonic ("Chroma ME"); gtk_widget_show (chromame); gtk_table_attach (GTK_TABLE (table13), chromame, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (chromame), 3); gtk_tooltips_set_tip (tooltips, chromame, "The usual motion estimation algorithm uses only the luminance information to find the best motion vector. However for some video material, using the chromatic planes can help find better vectors. \n\nThis setting turns on/off the use of chroma planes for Motion Estimation", NULL); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (chromame), TRUE); hqacpred = gtk_check_button_new_with_mnemonic ("HighQ AC"); gtk_widget_show (hqacpred); gtk_table_attach (GTK_TABLE (table13), hqacpred, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (hqacpred), 3); gtk_tooltips_set_tip (tooltips, hqacpred, "Activates High Quality AC coefficient prediction from neighboor blocks.", NULL); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (hqacpred), TRUE); trellis = gtk_check_button_new_with_mnemonic ("Trellis Quantizer"); gtk_widget_show (trellis); gtk_table_attach (GTK_TABLE (table13), trellis, 2, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (trellis), 3); gtk_tooltips_set_tip (tooltips, trellis, "Trellis Quantization is a kind of adaptive quantization method that saves bits modifying quantized coefficients to make them more compressable by the entropy encoder.\n\nIts impact on quality is good, and if VHQ uses too much CPU for you, this setting can be a good alternative to save a few bits (and gain quality at fixed bitrate) at a minimum expense. than VHQ", NULL); cartoon = gtk_check_button_new_with_mnemonic ("Cartoon Mode"); gtk_widget_show (cartoon); gtk_table_attach (GTK_TABLE (table13), cartoon, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (cartoon), 3); gtk_tooltips_set_tip (tooltips, cartoon, "Activate this if your encoded sequence is an Anime/Cartoon. It modifies some XviD internal thresholds so XviD takes better decisions on frame types and motion vectors for flat looking cartoons.", NULL); interlaced = gtk_check_button_new_with_mnemonic ("Interlaced"); gtk_widget_show (interlaced); gtk_table_attach (GTK_TABLE (table13), interlaced, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (interlaced), 3); gtk_tooltips_set_tip (tooltips, interlaced, "For interlaced video material, turn this option to on. NB this option does not deinterlace video, it encodes it field-based", NULL); greyscale = gtk_check_button_new_with_mnemonic ("Greyscale"); gtk_widget_show (greyscale); gtk_table_attach (GTK_TABLE (table13), greyscale, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (greyscale), 3); gtk_tooltips_set_tip (tooltips, greyscale, "XviD discard chroma planes bitstream so the encoded video is greyscale only. Note that this does not speed up encoding, that just prevent chroma data from being written in the last stage of encoding.\nThis setting enable Chroma color discarding.", NULL); turbo = gtk_check_button_new_with_mnemonic ("Turbo Mode"); gtk_widget_show (turbo); gtk_table_attach (GTK_TABLE (table13), turbo, 1, 2, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (turbo), 3); gtk_tooltips_set_tip (tooltips, turbo, "Motion estimation involves lot of refinement steps. Usually these steps help reaching better quality, but not by much, and they use a fair amount of CPU. So if you want to speedup Motion Estimation by skipping some refinement steps and using simplified ME functions, you can activate the turbo mode.", NULL); label9 = gtk_label_new ("General Settings"); gtk_widget_show (label9); gtk_frame_set_label_widget (GTK_FRAME (frame3), label9); gtk_label_set_use_markup (GTK_LABEL (label9), TRUE); gtk_label_set_justify (GTK_LABEL (label9), GTK_JUSTIFY_LEFT); gtk_misc_set_padding (GTK_MISC (label9), 0, 4); frame4 = gtk_frame_new (NULL); gtk_widget_show (frame4); gtk_box_pack_start (GTK_BOX (vbox1), frame4, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame4), 2); table2 = gtk_table_new (4, 3, FALSE); gtk_widget_show (table2); gtk_container_add (GTK_CONTAINER (frame4), table2); label15 = gtk_label_new ("Max B-Frames"); gtk_widget_show (label15); gtk_table_attach (GTK_TABLE (table2), label15, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label15), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label15), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label15), 2, 6); bquant_ratio_label = gtk_label_new ("B-Quant Ratio"); gtk_widget_show (bquant_ratio_label); gtk_table_attach (GTK_TABLE (table2), bquant_ratio_label, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (bquant_ratio_label), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (bquant_ratio_label), 0, 0.5); gtk_misc_set_padding (GTK_MISC (bquant_ratio_label), 2, 6); bquant_offset_label = gtk_label_new ("B-Quant Offset"); gtk_widget_show (bquant_offset_label); gtk_table_attach (GTK_TABLE (table2), bquant_offset_label, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (bquant_offset_label), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (bquant_offset_label), 0, 0.5); gtk_misc_set_padding (GTK_MISC (bquant_offset_label), 2, 6); bframe_threshold_label = gtk_label_new ("B-Frame Threshold"); gtk_widget_show (bframe_threshold_label); gtk_table_attach (GTK_TABLE (table2), bframe_threshold_label, 0, 1, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (bframe_threshold_label), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (bframe_threshold_label), 0, 0.5); gtk_misc_set_padding (GTK_MISC (bframe_threshold_label), 2, 6); bframe_threshold_adj = gtk_adjustment_new (0, -255, 255, 1, 10, 10); bframe_threshold = gtk_spin_button_new (GTK_ADJUSTMENT (bframe_threshold_adj), 1, 0); gtk_widget_show (bframe_threshold); gtk_table_attach (GTK_TABLE (table2), bframe_threshold, 1, 2, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 0); gtk_tooltips_set_tip (tooltips, bframe_threshold, "Sometimes BFrames do not look good, and introduce artefacts when most of the frame is static and some small zones have high motion (a static scene with a man talking, his mouth will probably look bad if what is surrounding the man and his mouth is completly static)\n\nThis setting allow you to favorize or not, the use of bframes. The higher the value, the more a bframe has chance to be used.", NULL); bquant_offset_adj = gtk_adjustment_new (100, 0, 200, 1, 10, 10); bquant_offset = gtk_spin_button_new (GTK_ADJUSTMENT (bquant_offset_adj), 1, 0); gtk_widget_show (bquant_offset); gtk_table_attach (GTK_TABLE (table2), bquant_offset, 1, 2, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 0); gtk_tooltips_set_tip (tooltips, bquant_offset, "As explained before, BFrames are highly correlated to its reference frames Thus XviD computes their quantizer to its reference's quantizers.\nThis two settings allow you to tune the formula:", NULL); bquant_ratio_adj = gtk_adjustment_new (150, 0, 200, 1, 10, 10); bquant_ratio = gtk_spin_button_new (GTK_ADJUSTMENT (bquant_ratio_adj), 1, 0); gtk_widget_show (bquant_ratio); gtk_table_attach (GTK_TABLE (table2), bquant_ratio, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 0); gtk_tooltips_set_tip (tooltips, bquant_ratio, "As explained before, BFrames are highly correlated to its reference frames Thus XviD computes their quantizer to its reference's quantizers.\nThis two settings allow you to tune the formula:", NULL); max_bframes_adj = gtk_adjustment_new (2, 0, 10, 1, 10, 10); max_bframes = gtk_spin_button_new (GTK_ADJUSTMENT (max_bframes_adj), 1, 0); gtk_widget_show (max_bframes); gtk_table_attach (GTK_TABLE (table2), max_bframes, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 0); gtk_tooltips_set_tip (tooltips, max_bframes, "BFrames are the third type of frames available in MPEG4, they are predicted thanks to 2 reference frames. Thus, bframes help usually in two cases:\n1/ saving bitrate w/o loss of quality\n2/ increasing the quality for a same bitrate\n\nThis setting controls how many bframes the xvid encoder can output in a row.\n\nYou must be aware that the higher max_bframes is, the more distant reference frames are from each other. Thus prediction of reference frames become hard and results in poor quality. If the reference frames have poor quality, so the bframes will have. So as a rule of thumb, this setting has to be tuned according to your exact needs. Common values are [0..2] for \"natural movies and a bit higher values for anime/cartoons with great amounts of constant color areas.", NULL); packed = gtk_check_button_new_with_mnemonic ("Packed"); gtk_widget_show (packed); gtk_table_attach (GTK_TABLE (table2), packed, 2, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (packed), 2); gtk_tooltips_set_tip (tooltips, packed, "Depending on the container and frontend API, sometimes it is good to ask XviD to group the first bframe of a group with its forward reference frame, that prevents A/V desync\n\nThis setting would be useful if it was used with VFW 1.1 encoders (Windows) because this API does not allow audio contention when no video frames are output.\n\nBut transcode does not suffer from that API problem and the xvid4 module informs transcode to delay frames when needed, so this option is mostly not needed with transcode.", NULL); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (packed), TRUE); closed_gop = gtk_check_button_new_with_mnemonic ("Closed Gop"); gtk_widget_show (closed_gop); gtk_table_attach (GTK_TABLE (table2), closed_gop, 2, 3, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (closed_gop), 2); gtk_tooltips_set_tip (tooltips, closed_gop, "A GOP is a Group Of Pictures. Its bounded by two Intra Frames.\n\nThis option controls if XviD must close a GOP, which means that a GOP is independent from the next GOP. This implies just that the last frame of the GOP is eiter a PFrame or a SFrame but not a BFrame. This is usually a good idea to turn on the option", NULL); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (closed_gop), TRUE); quarterpel = gtk_check_button_new_with_mnemonic ("Quarterpel"); gtk_widget_show (quarterpel); gtk_table_attach (GTK_TABLE (table2), quarterpel, 2, 3, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (quarterpel), 2); gtk_tooltips_set_tip (tooltips, quarterpel, "MPEG4 uses a half pixel precision for its motion search by default. The standard proposes a mode where encoders are allowed to use quarter pixel precision.\n\nThis option usually results in sharper image. But it has great impact on bitrate and sometimes the higher use of bitrate will prevent it from giving a better image quality at a fixed bitrate. The better is to test w and w/o it and choose after this test, if it's worth activting it.", NULL); gmc = gtk_check_button_new_with_mnemonic ("GMC"); gtk_widget_show (gmc); gtk_table_attach (GTK_TABLE (table2), gmc, 2, 3, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (gmc), 2); gtk_tooltips_set_tip (tooltips, gmc, "Makes XviD generates Sprite Frame which describe best Pan/Zoom/Rotating images. Deciding wether or not you must activate it depends highly on the video material", NULL); label10 = gtk_label_new ("Advanced Simple Profile Specific Settings"); gtk_widget_show (label10); gtk_frame_set_label_widget (GTK_FRAME (frame4), label10); gtk_label_set_use_markup (GTK_LABEL (label10), TRUE); gtk_label_set_justify (GTK_LABEL (label10), GTK_JUSTIFY_LEFT); gtk_misc_set_padding (GTK_MISC (label10), 0, 4); frame5 = gtk_frame_new (NULL); gtk_widget_show (frame5); gtk_box_pack_start (GTK_BOX (vbox1), frame5, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (frame5), 2); table12 = gtk_table_new (2, 2, FALSE); gtk_widget_show (table12); gtk_container_add (GTK_CONTAINER (frame5), table12); label19 = gtk_label_new ("Frame Drop Tolerance"); gtk_widget_show (label19); gtk_table_attach (GTK_TABLE (table12), label19, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label19), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label19), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label19), 2, 6); label80 = gtk_label_new ("Debug"); gtk_widget_show (label80); gtk_table_attach (GTK_TABLE (table12), label80, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label80), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label80), 0, 0.5); frame_drop_ratio_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10); frame_drop_ratio = gtk_spin_button_new (GTK_ADJUSTMENT (frame_drop_ratio_adj), 1, 0); gtk_widget_show (frame_drop_ratio); gtk_table_attach (GTK_TABLE (table12), frame_drop_ratio, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 0); gtk_tooltips_set_tip (tooltips, frame_drop_ratio, "XviD keeps track of block coding type (skipped, predicted, intra). The skipped block counter can be used to choose wether a frame is so close to its reference that it can be _completly_ skipped.\n\nThis setting allows you to choose the (100 - value) threshold for skipping a frame.", NULL); stats = gtk_check_button_new_with_mnemonic ("Output average PSNR"); gtk_widget_show (stats); gtk_table_attach (GTK_TABLE (table12), stats, 1, 2, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 2, 0); gtk_container_set_border_width (GTK_CONTAINER (stats), 2); gtk_tooltips_set_tip (tooltips, stats, "For testing purposes, or quality measurement, XviD can return some stats about the encoded frames.\n\nThis option activates PSNR measurement, the average PSNR is displayed at the end of the encoding session. This option is probably something a Joe user does not really care. This option makes the encoding a bit slower.", NULL); label79 = gtk_label_new ("Other Settings"); gtk_widget_show (label79); gtk_frame_set_label_widget (GTK_FRAME (frame5), label79); gtk_label_set_use_markup (GTK_LABEL (label79), TRUE); gtk_label_set_justify (GTK_LABEL (label79), GTK_JUSTIFY_LEFT); label3 = gtk_label_new_with_mnemonic ("_Features"); gtk_widget_show (label3); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 0), label3); gtk_label_set_justify (GTK_LABEL (label3), GTK_JUSTIFY_LEFT); vbox2 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox2); gtk_container_add (GTK_CONTAINER (notebook1), vbox2); label81 = gtk_label_new (""); gtk_widget_show (label81); gtk_box_pack_start (GTK_BOX (vbox2), label81, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label81), GTK_JUSTIFY_LEFT); frame6 = gtk_frame_new (NULL); gtk_widget_show (frame6); gtk_box_pack_start (GTK_BOX (vbox2), frame6, FALSE, TRUE, 0); table4 = gtk_table_new (4, 3, FALSE); gtk_widget_show (table4); gtk_container_add (GTK_CONTAINER (frame6), table4); gtk_container_set_border_width (GTK_CONTAINER (table4), 3); label20 = gtk_label_new ("I-Frame Quantizer"); gtk_widget_show (label20); gtk_table_attach (GTK_TABLE (table4), label20, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label20), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label20), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label20), 2, 5); label21 = gtk_label_new ("P-Frame Quantizer"); gtk_widget_show (label21); gtk_table_attach (GTK_TABLE (table4), label21, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label21), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label21), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label21), 2, 5); bquant_min_max_label = gtk_label_new ("B-Frame Quantizer"); gtk_widget_show (bquant_min_max_label); gtk_table_attach (GTK_TABLE (table4), bquant_min_max_label, 0, 1, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (bquant_min_max_label), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (bquant_min_max_label), 0, 0.5); gtk_misc_set_padding (GTK_MISC (bquant_min_max_label), 2, 5); min_iquant_adj = gtk_adjustment_new (2, 1, 31, 1, 10, 10); min_iquant = gtk_spin_button_new (GTK_ADJUSTMENT (min_iquant_adj), 1, 0); gtk_widget_show (min_iquant); gtk_table_attach (GTK_TABLE (table4), min_iquant, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 2); gtk_tooltips_set_tip (tooltips, min_iquant, "Minimum I-Frame Quantizer", NULL); min_pquant_adj = gtk_adjustment_new (2, 1, 31, 1, 10, 10); min_pquant = gtk_spin_button_new (GTK_ADJUSTMENT (min_pquant_adj), 1, 0); gtk_widget_show (min_pquant); gtk_table_attach (GTK_TABLE (table4), min_pquant, 1, 2, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 2); gtk_tooltips_set_tip (tooltips, min_pquant, "Minimum P-Frame Quantizer", NULL); min_bquant_adj = gtk_adjustment_new (2, 1, 31, 1, 10, 10); min_bquant = gtk_spin_button_new (GTK_ADJUSTMENT (min_bquant_adj), 1, 0); gtk_widget_show (min_bquant); gtk_table_attach (GTK_TABLE (table4), min_bquant, 1, 2, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 2); gtk_tooltips_set_tip (tooltips, min_bquant, "Minimum B-Frame Quantizer", NULL); max_iquant_adj = gtk_adjustment_new (31, 1, 31, 1, 10, 10); max_iquant = gtk_spin_button_new (GTK_ADJUSTMENT (max_iquant_adj), 1, 0); gtk_widget_show (max_iquant); gtk_table_attach (GTK_TABLE (table4), max_iquant, 2, 3, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 2); gtk_tooltips_set_tip (tooltips, max_iquant, "Maximum I-Frame Quantizer", NULL); max_pquant_adj = gtk_adjustment_new (31, 1, 31, 1, 10, 10); max_pquant = gtk_spin_button_new (GTK_ADJUSTMENT (max_pquant_adj), 1, 0); gtk_widget_show (max_pquant); gtk_table_attach (GTK_TABLE (table4), max_pquant, 2, 3, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 2); gtk_tooltips_set_tip (tooltips, max_pquant, "Maximum I-Frame Quantizer", NULL); max_bquant_adj = gtk_adjustment_new (31, 1, 31, 1, 10, 10); max_bquant = gtk_spin_button_new (GTK_ADJUSTMENT (max_bquant_adj), 1, 0); gtk_widget_show (max_bquant); gtk_table_attach (GTK_TABLE (table4), max_bquant, 2, 3, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 2); gtk_tooltips_set_tip (tooltips, max_bquant, "Maximum I-Frame Quantizer", NULL); gtk_spin_button_set_numeric (GTK_SPIN_BUTTON (max_bquant), TRUE); label29 = gtk_label_new ("Minimum"); gtk_widget_show (label29); gtk_table_attach (GTK_TABLE (table4), label29, 1, 2, 0, 1, (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label29), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label29), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label29), 2, 5); label30 = gtk_label_new ("Maximum"); gtk_widget_show (label30); gtk_table_attach (GTK_TABLE (table4), label30, 2, 3, 0, 1, (GtkAttachOptions) (0), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label30), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label30), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label30), 2, 5); label87 = gtk_label_new ("Quantizer ranges"); gtk_widget_show (label87); gtk_frame_set_label_widget (GTK_FRAME (frame6), label87); gtk_label_set_use_markup (GTK_LABEL (label87), TRUE); gtk_label_set_justify (GTK_LABEL (label87), GTK_JUSTIFY_LEFT); frame7 = gtk_frame_new (NULL); gtk_widget_show (frame7); gtk_box_pack_start (GTK_BOX (vbox2), frame7, TRUE, FALSE, 0); table5 = gtk_table_new (3, 4, FALSE); gtk_widget_show (table5); gtk_container_add (GTK_CONTAINER (frame7), table5); gtk_container_set_border_width (GTK_CONTAINER (table5), 3); label26 = gtk_label_new ("Intra Matrix File"); gtk_widget_show (label26); gtk_table_attach (GTK_TABLE (table5), label26, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label26), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label26), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label26), 2, 5); label27 = gtk_label_new ("Inter Matrix File"); gtk_widget_show (label27); gtk_table_attach (GTK_TABLE (table5), label27, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label27), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label27), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label27), 2, 5); quant_inter_matrix = gtk_entry_new (); gtk_widget_show (quant_inter_matrix); gtk_table_attach (GTK_TABLE (table5), quant_inter_matrix, 1, 3, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 5); gtk_tooltips_set_tip (tooltips, quant_inter_matrix, "Read Inter Matrix from this file", NULL); quant_intra_matrix = gtk_entry_new (); gtk_widget_show (quant_intra_matrix); gtk_table_attach (GTK_TABLE (table5), quant_intra_matrix, 1, 3, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 5); gtk_tooltips_set_tip (tooltips, quant_intra_matrix, "Read Intra Matrix from this file", NULL); load_intra_matrix_file_but = gtk_button_new_with_mnemonic ("..."); gtk_widget_show (load_intra_matrix_file_but); gtk_table_attach (GTK_TABLE (table5), load_intra_matrix_file_but, 3, 4, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (load_intra_matrix_file_but), 2); gtk_tooltips_set_tip (tooltips, load_intra_matrix_file_but, "Launch File selection Dialog", NULL); load_inter_matrix_file_but = gtk_button_new_with_mnemonic ("..."); gtk_widget_show (load_inter_matrix_file_but); gtk_table_attach (GTK_TABLE (table5), load_inter_matrix_file_but, 3, 4, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (load_inter_matrix_file_but), 2); gtk_tooltips_set_tip (tooltips, load_inter_matrix_file_but, "Launch File selection Dialog", NULL); matrix_editor = gtk_button_new (); gtk_widget_show (matrix_editor); gtk_table_attach (GTK_TABLE (table5), matrix_editor, 1, 3, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (matrix_editor), 2); gtk_tooltips_set_tip (tooltips, matrix_editor, "Launch the Matrix Editor", NULL); alignment10 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment10); gtk_container_add (GTK_CONTAINER (matrix_editor), alignment10); hbox10 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox10); gtk_container_add (GTK_CONTAINER (alignment10), hbox10); image10 = gtk_image_new_from_stock ("gtk-justify-fill", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image10); gtk_box_pack_start (GTK_BOX (hbox10), image10, FALSE, FALSE, 0); label78 = gtk_label_new_with_mnemonic ("Matrix Editor"); gtk_widget_show (label78); gtk_box_pack_start (GTK_BOX (hbox10), label78, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label78), GTK_JUSTIFY_LEFT); label88 = gtk_label_new ("MPEG Quantization Matrices"); gtk_widget_show (label88); gtk_frame_set_label_widget (GTK_FRAME (frame7), label88); gtk_label_set_use_markup (GTK_LABEL (label88), TRUE); gtk_label_set_justify (GTK_LABEL (label88), GTK_JUSTIFY_LEFT); label4 = gtk_label_new_with_mnemonic ("_Quantizers"); gtk_widget_show (label4); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 1), label4); gtk_label_set_justify (GTK_LABEL (label4), GTK_JUSTIFY_LEFT); table8 = gtk_table_new (3, 2, FALSE); gtk_widget_show (table8); gtk_container_add (GTK_CONTAINER (notebook1), table8); gtk_container_set_border_width (GTK_CONTAINER (table8), 3); reaction_delay_factor = gtk_entry_new (); gtk_widget_show (reaction_delay_factor); gtk_table_attach (GTK_TABLE (table8), reaction_delay_factor, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 5); gtk_tooltips_set_tip (tooltips, reaction_delay_factor, "This parameter controls the delay in frames before the CBR rate controller will react to bitrate changes and will try to compensate the change to obtain a constant bitrate over an averaging range of frames (see below). \n\nValue = >=0\nDefault = 16\n0 has a special meaning, it lets XviD uses its own default values", NULL); gtk_entry_set_text (GTK_ENTRY (reaction_delay_factor), "16"); averaging_period = gtk_entry_new (); gtk_widget_show (averaging_period); gtk_table_attach (GTK_TABLE (table8), averaging_period, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 5); gtk_tooltips_set_tip (tooltips, averaging_period, "Real CBR is hard to achieve. Depending on the video material, bitrate can be variable, and hard to predict. That's why XviD uses an averaging period for which it guarantees a given amount of bits (minus a small variation).\n\nThis settings express the \"number of frames\" for which XviD averages bitrate and tries to achieve CBR.\n\nValue = >=0\nDefault = 100\n0 has a special meaning, it lets XviD uses its own default values", NULL); gtk_entry_set_text (GTK_ENTRY (averaging_period), "100"); buffer = gtk_entry_new (); gtk_widget_show (buffer); gtk_table_attach (GTK_TABLE (table8), buffer, 1, 2, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 5); gtk_tooltips_set_tip (tooltips, buffer, "0 has a special meaning, it lets XviD uses its own default values", NULL); gtk_entry_set_text (GTK_ENTRY (buffer), "100"); label50 = gtk_label_new ("Reaction Delay Factor"); gtk_widget_show (label50); gtk_table_attach (GTK_TABLE (table8), label50, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 2, 5); gtk_label_set_justify (GTK_LABEL (label50), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label50), 0, 0.5); label51 = gtk_label_new ("Averaging Period"); gtk_widget_show (label51); gtk_table_attach (GTK_TABLE (table8), label51, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 2, 5); gtk_label_set_justify (GTK_LABEL (label51), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label51), 0, 0.5); label52 = gtk_label_new ("Buffer"); gtk_widget_show (label52); gtk_table_attach (GTK_TABLE (table8), label52, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 2, 5); gtk_label_set_justify (GTK_LABEL (label52), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label52), 0, 0.5); label5 = gtk_label_new_with_mnemonic ("_Single Pass"); gtk_widget_show (label5); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 2), label5); gtk_label_set_justify (GTK_LABEL (label5), GTK_JUSTIFY_LEFT); table9 = gtk_table_new (10, 2, FALSE); gtk_widget_show (table9); gtk_container_add (GTK_CONTAINER (notebook1), table9); gtk_container_set_border_width (GTK_CONTAINER (table9), 2); label55 = gtk_label_new ("Keyframe Boost"); gtk_widget_show (label55); gtk_table_attach (GTK_TABLE (table9), label55, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label55), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label55), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label55), 2, 5); label56 = gtk_label_new ("Overflow Control Strength"); gtk_widget_show (label56); gtk_table_attach (GTK_TABLE (table9), label56, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label56), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label56), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label56), 2, 5); label57 = gtk_label_new ("Curve Compression High"); gtk_widget_show (label57); gtk_table_attach (GTK_TABLE (table9), label57, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label57), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label57), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label57), 2, 5); label58 = gtk_label_new ("Curve Compression Low"); gtk_widget_show (label58); gtk_table_attach (GTK_TABLE (table9), label58, 0, 1, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label58), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label58), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label58), 2, 5); label59 = gtk_label_new ("Max Overflow Improvement"); gtk_widget_show (label59); gtk_table_attach (GTK_TABLE (table9), label59, 0, 1, 4, 5, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label59), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label59), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label59), 2, 5); label60 = gtk_label_new ("Max Overflow Degradation"); gtk_widget_show (label60); gtk_table_attach (GTK_TABLE (table9), label60, 0, 1, 5, 6, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label60), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label60), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label60), 2, 5); label62 = gtk_label_new ("Key Frame Reduction"); gtk_widget_show (label62); gtk_table_attach (GTK_TABLE (table9), label62, 0, 1, 6, 7, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label62), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label62), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label62), 2, 5); label63 = gtk_label_new ("Key Frame Threshold"); gtk_widget_show (label63); gtk_table_attach (GTK_TABLE (table9), label63, 0, 1, 7, 8, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label63), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label63), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label63), 2, 5); label64 = gtk_label_new ("Container Overhead per Frame"); gtk_widget_show (label64); gtk_table_attach (GTK_TABLE (table9), label64, 0, 1, 8, 9, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label64), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label64), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label64), 2, 5); curve_compression_high_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10); curve_compression_high = gtk_spin_button_new (GTK_ADJUSTMENT (curve_compression_high_adj), 1, 0); gtk_widget_show (curve_compression_high); gtk_table_attach (GTK_TABLE (table9), curve_compression_high, 1, 2, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, curve_compression_high, "This settigs control how much the upper part of the curve has to get closer to the average bitrate value. The upper part of the curve is the set of values that are higher than the curve average. It is expressed in %.\n\nThink of that setting like a shrinking factor for the upper part of the curve.", NULL); curve_compression_low_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10); curve_compression_low = gtk_spin_button_new (GTK_ADJUSTMENT (curve_compression_low_adj), 1, 0); gtk_widget_show (curve_compression_low); gtk_table_attach (GTK_TABLE (table9), curve_compression_low, 1, 2, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, curve_compression_low, "This settigs control how much the lower part of the curve has to get closer to the average bitrate value. The lower part of the curve is the set of values that are lower than the curve average. It is expressed in %.\n\nThink of that setting like a growing factor for the lower part of the curve.", NULL); kfreduction = gtk_entry_new (); gtk_widget_show (kfreduction); gtk_table_attach (GTK_TABLE (table9), kfreduction, 1, 2, 6, 7, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, kfreduction, "This reduction factor is the maximum allowed keyframe penalty applied to a frame in a ivop sequence. The more the frame is distant from the last ivop in the consecutive ivop sequence, the more penalty it is applied. This ensures a maximum bitrate allocation to the last ivop, thus favorizing a good reference frame for following p/s/b vops.", NULL); gtk_entry_set_text (GTK_ENTRY (kfreduction), "20"); kfthreshold = gtk_entry_new (); gtk_widget_show (kfthreshold); gtk_table_attach (GTK_TABLE (table9), kfthreshold, 1, 2, 7, 8, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, kfthreshold, "Distance between two ivops so that it is not decresed its bit allocation by the ivop reduction mechanism.", NULL); gtk_entry_set_text (GTK_ENTRY (kfthreshold), "1"); container_frame_overhead = gtk_entry_new (); gtk_widget_show (container_frame_overhead); gtk_table_attach (GTK_TABLE (table9), container_frame_overhead, 1, 2, 8, 9, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, container_frame_overhead, "Most of the time users express their target bitrate for video w/o taking care of the video container overhead. This small but (mostly) constant overhead can make the target file size is not respected (oversized result). We decided to allow users to set the amount of overhead per frame the container generates (give only an average per frame)\n\nValue = >=0\nDefault = 24 (AVI frame average overhead per frame in bytes)\n0 has a special meaning, it lets XviD uses its own default values", NULL); gtk_entry_set_text (GTK_ENTRY (container_frame_overhead), "24"); keyframe_boost_adj = gtk_adjustment_new (0, 0, 100, 1, 10, 10); keyframe_boost = gtk_spin_button_new (GTK_ADJUSTMENT (keyframe_boost_adj), 1, 0); gtk_widget_show (keyframe_boost); gtk_table_attach (GTK_TABLE (table9), keyframe_boost, 1, 2, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, keyframe_boost, "This setting tells how many additional amount of bits, Intra Frames are supposed to be given (this \"bossting\" amount of bits is compensated by subtracting the same amount of bits from other frame types pool) \n\nValue = [0..100]", NULL); bitrate_payback_delay_adj = gtk_adjustment_new (5, 0, 100, 1, 10, 10); bitrate_payback_delay = gtk_spin_button_new (GTK_ADJUSTMENT (bitrate_payback_delay_adj), 1, 0); gtk_widget_show (bitrate_payback_delay); gtk_table_attach (GTK_TABLE (table9), bitrate_payback_delay, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, bitrate_payback_delay, "During two pass, a scaled bitrate curve is computed. The difference between that expected curve and the result obtained during encoding is called overflow. Obviously, the two pass Rate Controller tries to compensate that overflow distributing it over next frames to be encoded. \nThis setting controls how much overflow is distributed at each new frame. Low values allow lazy overflow control, big rate bursts are compensated more slowly (could lead to lack of precision for small clips). High values make RC compensate very hard the overflow, this can have a very bad impact on quality during rate bursts. \nNB: This setting impacts quality a lot, play with it carefully!", NULL); max_overflow_improvement_adj = gtk_adjustment_new (5, 0, 100, 1, 10, 10); max_overflow_improvement = gtk_spin_button_new (GTK_ADJUSTMENT (max_overflow_improvement_adj), 1, 0); gtk_widget_show (max_overflow_improvement); gtk_table_attach (GTK_TABLE (table9), max_overflow_improvement, 1, 2, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, max_overflow_improvement, "During the frame bit allocation, overflow control may increase the frame size. This parameter controls how much the overflow control is allowed to increase the frame size in percent compared to the ideal curve allocation", NULL); max_overflow_degradation_adj = gtk_adjustment_new (5, 0, 100, 1, 10, 10); max_overflow_degradation = gtk_spin_button_new (GTK_ADJUSTMENT (max_overflow_degradation_adj), 1, 0); gtk_widget_show (max_overflow_degradation); gtk_table_attach (GTK_TABLE (table9), max_overflow_degradation, 1, 2, 5, 6, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_tooltips_set_tip (tooltips, max_overflow_degradation, "During the frame bit allocation, overflow control may decrease the frame size. This parameter controls how much the overflow control is allowed to decrease the frame size in percent compared to the ideal curve allocation", NULL); label65 = gtk_label_new_with_mnemonic ("_Two Pass"); gtk_widget_show (label65); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 3), label65); gtk_label_set_justify (GTK_LABEL (label65), GTK_JUSTIFY_LEFT); vbox4 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox4); gtk_container_add (GTK_CONTAINER (notebook1), vbox4); label68 = gtk_label_new ("Save and Load a configuration file"); gtk_widget_show (label68); gtk_box_pack_start (GTK_BOX (vbox4), label68, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label68), GTK_JUSTIFY_LEFT); gtk_misc_set_padding (GTK_MISC (label68), 0, 25); table10 = gtk_table_new (2, 4, FALSE); gtk_widget_show (table10); gtk_box_pack_start (GTK_BOX (vbox4), table10, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (table10), 3); label66 = gtk_label_new ("Load From"); gtk_widget_show (label66); gtk_table_attach (GTK_TABLE (table10), label66, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label66), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label66), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label66), 2, 5); label67 = gtk_label_new ("Save To"); gtk_widget_show (label67); gtk_table_attach (GTK_TABLE (table10), label67, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label67), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label67), 0, 0.5); save_file_name_text = gtk_entry_new (); gtk_widget_show (save_file_name_text); gtk_table_attach (GTK_TABLE (table10), save_file_name_text, 1, 3, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 5); gtk_tooltips_set_tip (tooltips, save_file_name_text, "Filename to save settings to", NULL); gtk_entry_set_text (GTK_ENTRY (save_file_name_text), "./xvid4.cfg"); load_file_name_text = gtk_entry_new (); gtk_widget_show (load_file_name_text); gtk_table_attach (GTK_TABLE (table10), load_file_name_text, 1, 3, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 2, 5); gtk_tooltips_set_tip (tooltips, load_file_name_text, "Filename to load settings from", NULL); gtk_entry_set_text (GTK_ENTRY (load_file_name_text), "~/.transcode/xvid4.cfg"); load_settings_filesel_but = gtk_button_new_with_mnemonic ("..."); gtk_widget_show (load_settings_filesel_but); gtk_table_attach (GTK_TABLE (table10), load_settings_filesel_but, 3, 4, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (load_settings_filesel_but), 2); save_settings_filesel_but = gtk_button_new_with_mnemonic ("..."); gtk_widget_show (save_settings_filesel_but); gtk_table_attach (GTK_TABLE (table10), save_settings_filesel_but, 3, 4, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (save_settings_filesel_but), 2); table11 = gtk_table_new (5, 5, FALSE); gtk_widget_show (table11); gtk_box_pack_start (GTK_BOX (vbox4), table11, TRUE, TRUE, 0); quit = gtk_button_new_from_stock ("gtk-quit"); gtk_widget_show (quit); gtk_table_attach (GTK_TABLE (table11), quit, 4, 5, 4, 5, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (quit), 4); gtk_tooltips_set_tip (tooltips, quit, "Close this programm", NULL); save_defaults = gtk_button_new (); gtk_widget_show (save_defaults); gtk_table_attach (GTK_TABLE (table11), save_defaults, 4, 5, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (save_defaults), 2); gtk_tooltips_set_tip (tooltips, save_defaults, "Set default settings for this session", NULL); alignment8 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment8); gtk_container_add (GTK_CONTAINER (save_defaults), alignment8); hbox8 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox8); gtk_container_add (GTK_CONTAINER (alignment8), hbox8); image8 = gtk_image_new_from_stock ("gtk-go-down", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image8); gtk_box_pack_start (GTK_BOX (hbox8), image8, FALSE, FALSE, 0); label76 = gtk_label_new_with_mnemonic ("Set Defaults"); gtk_widget_show (label76); gtk_box_pack_start (GTK_BOX (hbox8), label76, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label76), GTK_JUSTIFY_LEFT); fixed1 = gtk_fixed_new (); gtk_widget_show (fixed1); gtk_table_attach (GTK_TABLE (table11), fixed1, 0, 5, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); restore_defaults = gtk_button_new (); gtk_widget_show (restore_defaults); gtk_table_attach (GTK_TABLE (table11), restore_defaults, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (restore_defaults), 2); gtk_tooltips_set_tip (tooltips, restore_defaults, "Restore default settings for this session", NULL); alignment9 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment9); gtk_container_add (GTK_CONTAINER (restore_defaults), alignment9); hbox9 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox9); gtk_container_add (GTK_CONTAINER (alignment9), hbox9); image9 = gtk_image_new_from_stock ("gtk-go-up", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image9); gtk_box_pack_start (GTK_BOX (hbox9), image9, FALSE, FALSE, 0); label77 = gtk_label_new_with_mnemonic ("Restore Defaults"); gtk_widget_show (label77); gtk_box_pack_start (GTK_BOX (hbox9), label77, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label77), GTK_JUSTIFY_LEFT); load_settings = gtk_button_new (); gtk_widget_show (load_settings); gtk_table_attach (GTK_TABLE (table11), load_settings, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (load_settings), 4); gtk_tooltips_set_tip (tooltips, load_settings, "Load Settings from file", NULL); alignment6 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment6); gtk_container_add (GTK_CONTAINER (load_settings), alignment6); hbox6 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox6); gtk_container_add (GTK_CONTAINER (alignment6), hbox6); image6 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image6); gtk_box_pack_start (GTK_BOX (hbox6), image6, FALSE, FALSE, 0); label74 = gtk_label_new_with_mnemonic ("Load Settings"); gtk_widget_show (label74); gtk_box_pack_start (GTK_BOX (hbox6), label74, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label74), GTK_JUSTIFY_LEFT); fixed2 = gtk_fixed_new (); gtk_widget_show (fixed2); gtk_table_attach (GTK_TABLE (table11), fixed2, 0, 5, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); save_settings = gtk_button_new (); gtk_widget_show (save_settings); gtk_table_attach (GTK_TABLE (table11), save_settings, 4, 5, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (save_settings), 4); gtk_tooltips_set_tip (tooltips, save_settings, "Save Settings to file", NULL); alignment5 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment5); gtk_container_add (GTK_CONTAINER (save_settings), alignment5); hbox5 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox5); gtk_container_add (GTK_CONTAINER (alignment5), hbox5); image5 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image5); gtk_box_pack_start (GTK_BOX (hbox5), image5, FALSE, FALSE, 0); label73 = gtk_label_new_with_mnemonic ("Save Settings"); gtk_widget_show (label73); gtk_box_pack_start (GTK_BOX (hbox5), label73, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label73), GTK_JUSTIFY_LEFT); label7 = gtk_label_new_with_mnemonic ("Save/_Load"); gtk_widget_show (label7); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 4), label7); gtk_label_set_justify (GTK_LABEL (label7), GTK_JUSTIFY_LEFT); frame8 = gtk_frame_new (NULL); gtk_widget_show (frame8); gtk_container_add (GTK_CONTAINER (notebook1), frame8); label91 = gtk_label_new ("XviD Configuration Panel (v"VERSION")\nfor transcode\nCopyright(C) 2003, 2004 Tilmann Bitterberg\n\nHints:\no To get the version on the commandline do\n$ xvid4conf -v \n\no To automatically save settings at exit time\n $ xvid4conf save.cfg\n\no To automatically load settings at startup and safe at exit\n$ xvid4conf save.cfg load.cfg"); gtk_widget_show (label91); gtk_label_set_justify (GTK_LABEL (label91), GTK_JUSTIFY_CENTER); gtk_container_add (GTK_CONTAINER (frame8), label91); gtk_label_set_use_markup (GTK_LABEL (label91), TRUE); label90 = gtk_label_new (""); gtk_widget_show (label90); gtk_frame_set_label_widget (GTK_FRAME (frame8), label90); gtk_label_set_justify (GTK_LABEL (label90), GTK_JUSTIFY_LEFT); label89 = gtk_label_new_with_mnemonic ("_About"); gtk_widget_show (label89); gtk_notebook_set_tab_label (GTK_NOTEBOOK (notebook1), gtk_notebook_get_nth_page (GTK_NOTEBOOK (notebook1), 5), label89); gtk_label_set_justify (GTK_LABEL (label89), GTK_JUSTIFY_LEFT); g_signal_connect ((gpointer) window1, "delete_event", G_CALLBACK (on_window1_delete_event), NULL); g_signal_connect ((gpointer) max_bframes, "value_changed", G_CALLBACK (on_max_bframes_value_changed), NULL); g_signal_connect ((gpointer) max_bframes, "changed", G_CALLBACK (on_max_bframes_value_changed), NULL); g_signal_connect ((gpointer) load_intra_matrix_file_but, "clicked", G_CALLBACK (on_load_intra_matrix_file_but_clicked), NULL); g_signal_connect ((gpointer) load_inter_matrix_file_but, "clicked", G_CALLBACK (on_load_inter_matrix_file_but_clicked), NULL); g_signal_connect ((gpointer) matrix_editor, "clicked", G_CALLBACK (on_matrix_editor_clicked), NULL); g_signal_connect ((gpointer) load_settings_filesel_but, "clicked", G_CALLBACK (on_load_settings_filesel_but_clicked), NULL); g_signal_connect ((gpointer) save_settings_filesel_but, "clicked", G_CALLBACK (on_save_settings_filesel_but_clicked), NULL); g_signal_connect ((gpointer) quit, "clicked", G_CALLBACK (on_quit_delete_event), NULL); g_signal_connect ((gpointer) save_defaults, "clicked", G_CALLBACK (on_save_defaults_clicked), NULL); g_signal_connect ((gpointer) restore_defaults, "clicked", G_CALLBACK (on_restore_defaults_clicked), NULL); g_signal_connect ((gpointer) load_settings, "clicked", G_CALLBACK (on_load_settings_clicked), NULL); g_signal_connect ((gpointer) save_settings, "clicked", G_CALLBACK (on_save_settings_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (window1, window1, "window1"); GLADE_HOOKUP_OBJECT (window1, notebook1, "notebook1"); GLADE_HOOKUP_OBJECT (window1, vbox1, "vbox1"); GLADE_HOOKUP_OBJECT (window1, frame3, "frame3"); GLADE_HOOKUP_OBJECT (window1, table1, "table1"); GLADE_HOOKUP_OBJECT (window1, label12, "label12"); GLADE_HOOKUP_OBJECT (window1, label13, "label13"); GLADE_HOOKUP_OBJECT (window1, label14, "label14"); GLADE_HOOKUP_OBJECT (window1, hseparator1, "hseparator1"); GLADE_HOOKUP_OBJECT (window1, quant_type, "quant_type"); GLADE_HOOKUP_OBJECT (window1, menu1, "menu1"); GLADE_HOOKUP_OBJECT (window1, h2631, "h2631"); GLADE_HOOKUP_OBJECT (window1, mpeg1, "mpeg1"); GLADE_HOOKUP_OBJECT (window1, motion, "motion"); GLADE_HOOKUP_OBJECT (window1, menu2, "menu2"); GLADE_HOOKUP_OBJECT (window1, _0_none1, "_0_none1"); GLADE_HOOKUP_OBJECT (window1, _1_very_low1, "_1_very_low1"); GLADE_HOOKUP_OBJECT (window1, _2_low1, "_2_low1"); GLADE_HOOKUP_OBJECT (window1, _3_medium1, "_3_medium1"); GLADE_HOOKUP_OBJECT (window1, _4_high1, "_4_high1"); GLADE_HOOKUP_OBJECT (window1, _5_very_high1, "_5_very_high1"); GLADE_HOOKUP_OBJECT (window1, _6_ultra_high1, "_6_ultra_high1"); GLADE_HOOKUP_OBJECT (window1, vhq, "vhq"); GLADE_HOOKUP_OBJECT (window1, menu3, "menu3"); GLADE_HOOKUP_OBJECT (window1, _0_disabled1, "_0_disabled1"); GLADE_HOOKUP_OBJECT (window1, _1_mode_selection1, "_1_mode_selection1"); GLADE_HOOKUP_OBJECT (window1, _2_limited_search1, "_2_limited_search1"); GLADE_HOOKUP_OBJECT (window1, _3_medium_search1, "_3_medium_search1"); GLADE_HOOKUP_OBJECT (window1, _4_wide_search1, "_4_wide_search1"); GLADE_HOOKUP_OBJECT (window1, table13, "table13"); GLADE_HOOKUP_OBJECT (window1, chromame, "chromame"); GLADE_HOOKUP_OBJECT (window1, hqacpred, "hqacpred"); GLADE_HOOKUP_OBJECT (window1, trellis, "trellis"); GLADE_HOOKUP_OBJECT (window1, cartoon, "cartoon"); GLADE_HOOKUP_OBJECT (window1, interlaced, "interlaced"); GLADE_HOOKUP_OBJECT (window1, greyscale, "greyscale"); GLADE_HOOKUP_OBJECT (window1, turbo, "turbo"); GLADE_HOOKUP_OBJECT (window1, label9, "label9"); GLADE_HOOKUP_OBJECT (window1, frame4, "frame4"); GLADE_HOOKUP_OBJECT (window1, table2, "table2"); GLADE_HOOKUP_OBJECT (window1, label15, "label15"); GLADE_HOOKUP_OBJECT (window1, bquant_ratio_label, "bquant_ratio_label"); GLADE_HOOKUP_OBJECT (window1, bquant_offset_label, "bquant_offset_label"); GLADE_HOOKUP_OBJECT (window1, bframe_threshold_label, "bframe_threshold_label"); GLADE_HOOKUP_OBJECT (window1, bframe_threshold, "bframe_threshold"); GLADE_HOOKUP_OBJECT (window1, bquant_offset, "bquant_offset"); GLADE_HOOKUP_OBJECT (window1, bquant_ratio, "bquant_ratio"); GLADE_HOOKUP_OBJECT (window1, max_bframes, "max_bframes"); GLADE_HOOKUP_OBJECT (window1, packed, "packed"); GLADE_HOOKUP_OBJECT (window1, closed_gop, "closed_gop"); GLADE_HOOKUP_OBJECT (window1, quarterpel, "quarterpel"); GLADE_HOOKUP_OBJECT (window1, gmc, "gmc"); GLADE_HOOKUP_OBJECT (window1, label10, "label10"); GLADE_HOOKUP_OBJECT (window1, frame5, "frame5"); GLADE_HOOKUP_OBJECT (window1, table12, "table12"); GLADE_HOOKUP_OBJECT (window1, label19, "label19"); GLADE_HOOKUP_OBJECT (window1, label80, "label80"); GLADE_HOOKUP_OBJECT (window1, frame_drop_ratio, "frame_drop_ratio"); GLADE_HOOKUP_OBJECT (window1, stats, "stats"); GLADE_HOOKUP_OBJECT (window1, label79, "label79"); GLADE_HOOKUP_OBJECT (window1, label3, "label3"); GLADE_HOOKUP_OBJECT (window1, vbox2, "vbox2"); GLADE_HOOKUP_OBJECT (window1, label81, "label81"); GLADE_HOOKUP_OBJECT (window1, frame6, "frame6"); GLADE_HOOKUP_OBJECT (window1, table4, "table4"); GLADE_HOOKUP_OBJECT (window1, label20, "label20"); GLADE_HOOKUP_OBJECT (window1, label21, "label21"); GLADE_HOOKUP_OBJECT (window1, bquant_min_max_label, "bquant_min_max_label"); GLADE_HOOKUP_OBJECT (window1, min_iquant, "min_iquant"); GLADE_HOOKUP_OBJECT (window1, min_pquant, "min_pquant"); GLADE_HOOKUP_OBJECT (window1, min_bquant, "min_bquant"); GLADE_HOOKUP_OBJECT (window1, max_iquant, "max_iquant"); GLADE_HOOKUP_OBJECT (window1, max_pquant, "max_pquant"); GLADE_HOOKUP_OBJECT (window1, max_bquant, "max_bquant"); GLADE_HOOKUP_OBJECT (window1, label29, "label29"); GLADE_HOOKUP_OBJECT (window1, label30, "label30"); GLADE_HOOKUP_OBJECT (window1, label87, "label87"); GLADE_HOOKUP_OBJECT (window1, frame7, "frame7"); GLADE_HOOKUP_OBJECT (window1, table5, "table5"); GLADE_HOOKUP_OBJECT (window1, label26, "label26"); GLADE_HOOKUP_OBJECT (window1, label27, "label27"); GLADE_HOOKUP_OBJECT (window1, quant_inter_matrix, "quant_inter_matrix"); GLADE_HOOKUP_OBJECT (window1, quant_intra_matrix, "quant_intra_matrix"); GLADE_HOOKUP_OBJECT (window1, load_intra_matrix_file_but, "load_intra_matrix_file_but"); GLADE_HOOKUP_OBJECT (window1, load_inter_matrix_file_but, "load_inter_matrix_file_but"); GLADE_HOOKUP_OBJECT (window1, matrix_editor, "matrix_editor"); GLADE_HOOKUP_OBJECT (window1, alignment10, "alignment10"); GLADE_HOOKUP_OBJECT (window1, hbox10, "hbox10"); GLADE_HOOKUP_OBJECT (window1, image10, "image10"); GLADE_HOOKUP_OBJECT (window1, label78, "label78"); GLADE_HOOKUP_OBJECT (window1, label88, "label88"); GLADE_HOOKUP_OBJECT (window1, label4, "label4"); GLADE_HOOKUP_OBJECT (window1, table8, "table8"); GLADE_HOOKUP_OBJECT (window1, reaction_delay_factor, "reaction_delay_factor"); GLADE_HOOKUP_OBJECT (window1, averaging_period, "averaging_period"); GLADE_HOOKUP_OBJECT (window1, buffer, "buffer"); GLADE_HOOKUP_OBJECT (window1, label50, "label50"); GLADE_HOOKUP_OBJECT (window1, label51, "label51"); GLADE_HOOKUP_OBJECT (window1, label52, "label52"); GLADE_HOOKUP_OBJECT (window1, label5, "label5"); GLADE_HOOKUP_OBJECT (window1, table9, "table9"); GLADE_HOOKUP_OBJECT (window1, label55, "label55"); GLADE_HOOKUP_OBJECT (window1, label56, "label56"); GLADE_HOOKUP_OBJECT (window1, label57, "label57"); GLADE_HOOKUP_OBJECT (window1, label58, "label58"); GLADE_HOOKUP_OBJECT (window1, label59, "label59"); GLADE_HOOKUP_OBJECT (window1, label60, "label60"); GLADE_HOOKUP_OBJECT (window1, label62, "label62"); GLADE_HOOKUP_OBJECT (window1, label63, "label63"); GLADE_HOOKUP_OBJECT (window1, label64, "label64"); GLADE_HOOKUP_OBJECT (window1, curve_compression_high, "curve_compression_high"); GLADE_HOOKUP_OBJECT (window1, curve_compression_low, "curve_compression_low"); GLADE_HOOKUP_OBJECT (window1, kfreduction, "kfreduction"); GLADE_HOOKUP_OBJECT (window1, kfthreshold, "kfthreshold"); GLADE_HOOKUP_OBJECT (window1, container_frame_overhead, "container_frame_overhead"); GLADE_HOOKUP_OBJECT (window1, keyframe_boost, "keyframe_boost"); GLADE_HOOKUP_OBJECT (window1, bitrate_payback_delay, "bitrate_payback_delay"); GLADE_HOOKUP_OBJECT (window1, max_overflow_improvement, "max_overflow_improvement"); GLADE_HOOKUP_OBJECT (window1, max_overflow_degradation, "max_overflow_degradation"); GLADE_HOOKUP_OBJECT (window1, label65, "label65"); GLADE_HOOKUP_OBJECT (window1, vbox4, "vbox4"); GLADE_HOOKUP_OBJECT (window1, label68, "label68"); GLADE_HOOKUP_OBJECT (window1, table10, "table10"); GLADE_HOOKUP_OBJECT (window1, label66, "label66"); GLADE_HOOKUP_OBJECT (window1, label67, "label67"); GLADE_HOOKUP_OBJECT (window1, save_file_name_text, "save_file_name_text"); GLADE_HOOKUP_OBJECT (window1, load_file_name_text, "load_file_name_text"); GLADE_HOOKUP_OBJECT (window1, load_settings_filesel_but, "load_settings_filesel_but"); GLADE_HOOKUP_OBJECT (window1, save_settings_filesel_but, "save_settings_filesel_but"); GLADE_HOOKUP_OBJECT (window1, table11, "table11"); GLADE_HOOKUP_OBJECT (window1, quit, "quit"); GLADE_HOOKUP_OBJECT (window1, save_defaults, "save_defaults"); GLADE_HOOKUP_OBJECT (window1, alignment8, "alignment8"); GLADE_HOOKUP_OBJECT (window1, hbox8, "hbox8"); GLADE_HOOKUP_OBJECT (window1, image8, "image8"); GLADE_HOOKUP_OBJECT (window1, label76, "label76"); GLADE_HOOKUP_OBJECT (window1, fixed1, "fixed1"); GLADE_HOOKUP_OBJECT (window1, restore_defaults, "restore_defaults"); GLADE_HOOKUP_OBJECT (window1, alignment9, "alignment9"); GLADE_HOOKUP_OBJECT (window1, hbox9, "hbox9"); GLADE_HOOKUP_OBJECT (window1, image9, "image9"); GLADE_HOOKUP_OBJECT (window1, label77, "label77"); GLADE_HOOKUP_OBJECT (window1, load_settings, "load_settings"); GLADE_HOOKUP_OBJECT (window1, alignment6, "alignment6"); GLADE_HOOKUP_OBJECT (window1, hbox6, "hbox6"); GLADE_HOOKUP_OBJECT (window1, image6, "image6"); GLADE_HOOKUP_OBJECT (window1, label74, "label74"); GLADE_HOOKUP_OBJECT (window1, fixed2, "fixed2"); GLADE_HOOKUP_OBJECT (window1, save_settings, "save_settings"); GLADE_HOOKUP_OBJECT (window1, alignment5, "alignment5"); GLADE_HOOKUP_OBJECT (window1, hbox5, "hbox5"); GLADE_HOOKUP_OBJECT (window1, image5, "image5"); GLADE_HOOKUP_OBJECT (window1, label73, "label73"); GLADE_HOOKUP_OBJECT (window1, label7, "label7"); GLADE_HOOKUP_OBJECT (window1, frame8, "frame8"); GLADE_HOOKUP_OBJECT (window1, label91, "label91"); GLADE_HOOKUP_OBJECT (window1, label90, "label90"); GLADE_HOOKUP_OBJECT (window1, label89, "label89"); GLADE_HOOKUP_OBJECT_NO_REF (window1, tooltips, "tooltips"); return window1; } GtkWidget* create_matrix_edit_dlg (void) { GtkWidget *matrix_edit_dlg; GtkWidget *vbox3; GtkWidget *table6; GtkWidget *label32; GtkWidget *label33; GtkWidget *label34; GtkWidget *label35; GtkWidget *label36; GtkWidget *label37; GtkWidget *label38; GtkWidget *label40; GtkWidget *label41; GtkWidget *label42; GtkWidget *label43; GtkWidget *label44; GtkWidget *label45; GtkWidget *label46; GtkWidget *label47; GtkWidget *label48; GtkWidget *a00; GtkWidget *a10; GtkWidget *a20; GtkWidget *a30; GtkWidget *a40; GtkWidget *a50; GtkWidget *a60; GtkWidget *a70; GtkWidget *a01; GtkWidget *a11; GtkWidget *a21; GtkWidget *a31; GtkWidget *a41; GtkWidget *a51; GtkWidget *a61; GtkWidget *a71; GtkWidget *a02; GtkWidget *a12; GtkWidget *a22; GtkWidget *a32; GtkWidget *a42; GtkWidget *a52; GtkWidget *a62; GtkWidget *a72; GtkWidget *a03; GtkWidget *a13; GtkWidget *a23; GtkWidget *a33; GtkWidget *a43; GtkWidget *a53; GtkWidget *a63; GtkWidget *a73; GtkWidget *a04; GtkWidget *a14; GtkWidget *a24; GtkWidget *a34; GtkWidget *a44; GtkWidget *a54; GtkWidget *a64; GtkWidget *a74; GtkWidget *a05; GtkWidget *a15; GtkWidget *a25; GtkWidget *a35; GtkWidget *a45; GtkWidget *a55; GtkWidget *a65; GtkWidget *a75; GtkWidget *a06; GtkWidget *a16; GtkWidget *a26; GtkWidget *a36; GtkWidget *a46; GtkWidget *a56; GtkWidget *a66; GtkWidget *a76; GtkWidget *a07; GtkWidget *a17; GtkWidget *a27; GtkWidget *a37; GtkWidget *a47; GtkWidget *a57; GtkWidget *a67; GtkWidget *a77; GtkWidget *table7; GtkWidget *label31; GtkWidget *close_matrix_edit_but; GtkWidget *alignment1; GtkWidget *hbox1; GtkWidget *image1; GtkWidget *label69; GtkWidget *open_matrix_file_dlg; GtkWidget *matrix_edit_file; GtkWidget *hseparator2; GtkWidget *clear_matrix_but; GtkWidget *alignment4; GtkWidget *hbox4; GtkWidget *image4; GtkWidget *label72; GtkWidget *save_matrix_edit_but; GtkWidget *alignment2; GtkWidget *hbox2; GtkWidget *image2; GtkWidget *label70; GtkWidget *load_matrix_edit_but; GtkWidget *alignment3; GtkWidget *hbox3; GtkWidget *image3; GtkWidget *label71; GtkTooltips *tooltips; tooltips = gtk_tooltips_new (); matrix_edit_dlg = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (matrix_edit_dlg), "Matrix Editor"); vbox3 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox3); gtk_container_add (GTK_CONTAINER (matrix_edit_dlg), vbox3); gtk_container_set_border_width (GTK_CONTAINER (vbox3), 2); table6 = gtk_table_new (9, 9, FALSE); gtk_widget_show (table6); gtk_box_pack_start (GTK_BOX (vbox3), table6, TRUE, TRUE, 0); gtk_container_set_border_width (GTK_CONTAINER (table6), 2); label32 = gtk_label_new ("X1"); gtk_widget_show (label32); gtk_table_attach (GTK_TABLE (table6), label32, 2, 3, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label32), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label32), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label32), 2, 5); label33 = gtk_label_new ("X2"); gtk_widget_show (label33); gtk_table_attach (GTK_TABLE (table6), label33, 3, 4, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label33), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label33), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label33), 2, 5); label34 = gtk_label_new ("X3"); gtk_widget_show (label34); gtk_table_attach (GTK_TABLE (table6), label34, 4, 5, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label34), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label34), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label34), 2, 5); label35 = gtk_label_new ("X4"); gtk_widget_show (label35); gtk_table_attach (GTK_TABLE (table6), label35, 5, 6, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label35), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label35), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label35), 2, 5); label36 = gtk_label_new ("X5"); gtk_widget_show (label36); gtk_table_attach (GTK_TABLE (table6), label36, 6, 7, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label36), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label36), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label36), 2, 5); label37 = gtk_label_new ("X6"); gtk_widget_show (label37); gtk_table_attach (GTK_TABLE (table6), label37, 7, 8, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label37), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label37), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label37), 2, 5); label38 = gtk_label_new ("X7"); gtk_widget_show (label38); gtk_table_attach (GTK_TABLE (table6), label38, 8, 9, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label38), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label38), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label38), 2, 5); label40 = gtk_label_new ("X0"); gtk_widget_show (label40); gtk_table_attach (GTK_TABLE (table6), label40, 1, 2, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label40), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label40), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label40), 2, 5); label41 = gtk_label_new ("Y0"); gtk_widget_show (label41); gtk_table_attach (GTK_TABLE (table6), label41, 0, 1, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label41), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label41), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label41), 2, 5); label42 = gtk_label_new ("Y1"); gtk_widget_show (label42); gtk_table_attach (GTK_TABLE (table6), label42, 0, 1, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label42), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label42), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label42), 2, 5); label43 = gtk_label_new ("Y2"); gtk_widget_show (label43); gtk_table_attach (GTK_TABLE (table6), label43, 0, 1, 3, 4, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label43), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label43), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label43), 2, 5); label44 = gtk_label_new ("Y3"); gtk_widget_show (label44); gtk_table_attach (GTK_TABLE (table6), label44, 0, 1, 4, 5, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label44), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label44), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label44), 2, 5); label45 = gtk_label_new ("Y4"); gtk_widget_show (label45); gtk_table_attach (GTK_TABLE (table6), label45, 0, 1, 5, 6, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label45), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label45), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label45), 2, 5); label46 = gtk_label_new ("Y5"); gtk_widget_show (label46); gtk_table_attach (GTK_TABLE (table6), label46, 0, 1, 6, 7, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label46), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label46), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label46), 2, 5); label47 = gtk_label_new ("Y6"); gtk_widget_show (label47); gtk_table_attach (GTK_TABLE (table6), label47, 0, 1, 7, 8, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label47), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label47), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label47), 2, 5); label48 = gtk_label_new ("Y7"); gtk_widget_show (label48); gtk_table_attach (GTK_TABLE (table6), label48, 0, 1, 8, 9, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label48), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label48), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label48), 2, 2); a00 = gtk_entry_new (); gtk_widget_show (a00); gtk_table_attach (GTK_TABLE (table6), a00, 1, 2, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a00), 4); a10 = gtk_entry_new (); gtk_widget_show (a10); gtk_table_attach (GTK_TABLE (table6), a10, 2, 3, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a10), 4); a20 = gtk_entry_new (); gtk_widget_show (a20); gtk_table_attach (GTK_TABLE (table6), a20, 3, 4, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a20), 4); a30 = gtk_entry_new (); gtk_widget_show (a30); gtk_table_attach (GTK_TABLE (table6), a30, 4, 5, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a30), 4); a40 = gtk_entry_new (); gtk_widget_show (a40); gtk_table_attach (GTK_TABLE (table6), a40, 5, 6, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a40), 4); a50 = gtk_entry_new (); gtk_widget_show (a50); gtk_table_attach (GTK_TABLE (table6), a50, 6, 7, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a50), 4); a60 = gtk_entry_new (); gtk_widget_show (a60); gtk_table_attach (GTK_TABLE (table6), a60, 7, 8, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a60), 4); a70 = gtk_entry_new (); gtk_widget_show (a70); gtk_table_attach (GTK_TABLE (table6), a70, 8, 9, 1, 2, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a70), 4); a01 = gtk_entry_new (); gtk_widget_show (a01); gtk_table_attach (GTK_TABLE (table6), a01, 1, 2, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a01), 4); a11 = gtk_entry_new (); gtk_widget_show (a11); gtk_table_attach (GTK_TABLE (table6), a11, 2, 3, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a11), 4); a21 = gtk_entry_new (); gtk_widget_show (a21); gtk_table_attach (GTK_TABLE (table6), a21, 3, 4, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a21), 4); a31 = gtk_entry_new (); gtk_widget_show (a31); gtk_table_attach (GTK_TABLE (table6), a31, 4, 5, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a31), 4); a41 = gtk_entry_new (); gtk_widget_show (a41); gtk_table_attach (GTK_TABLE (table6), a41, 5, 6, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a41), 4); a51 = gtk_entry_new (); gtk_widget_show (a51); gtk_table_attach (GTK_TABLE (table6), a51, 6, 7, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a51), 4); a61 = gtk_entry_new (); gtk_widget_show (a61); gtk_table_attach (GTK_TABLE (table6), a61, 7, 8, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a61), 4); a71 = gtk_entry_new (); gtk_widget_show (a71); gtk_table_attach (GTK_TABLE (table6), a71, 8, 9, 2, 3, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a71), 4); a02 = gtk_entry_new (); gtk_widget_show (a02); gtk_table_attach (GTK_TABLE (table6), a02, 1, 2, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a02), 4); a12 = gtk_entry_new (); gtk_widget_show (a12); gtk_table_attach (GTK_TABLE (table6), a12, 2, 3, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a12), 4); a22 = gtk_entry_new (); gtk_widget_show (a22); gtk_table_attach (GTK_TABLE (table6), a22, 3, 4, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a22), 4); a32 = gtk_entry_new (); gtk_widget_show (a32); gtk_table_attach (GTK_TABLE (table6), a32, 4, 5, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a32), 4); a42 = gtk_entry_new (); gtk_widget_show (a42); gtk_table_attach (GTK_TABLE (table6), a42, 5, 6, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a42), 4); a52 = gtk_entry_new (); gtk_widget_show (a52); gtk_table_attach (GTK_TABLE (table6), a52, 6, 7, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a52), 4); a62 = gtk_entry_new (); gtk_widget_show (a62); gtk_table_attach (GTK_TABLE (table6), a62, 7, 8, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a62), 4); a72 = gtk_entry_new (); gtk_widget_show (a72); gtk_table_attach (GTK_TABLE (table6), a72, 8, 9, 3, 4, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a72), 4); a03 = gtk_entry_new (); gtk_widget_show (a03); gtk_table_attach (GTK_TABLE (table6), a03, 1, 2, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a03), 4); a13 = gtk_entry_new (); gtk_widget_show (a13); gtk_table_attach (GTK_TABLE (table6), a13, 2, 3, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a13), 4); a23 = gtk_entry_new (); gtk_widget_show (a23); gtk_table_attach (GTK_TABLE (table6), a23, 3, 4, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a23), 4); a33 = gtk_entry_new (); gtk_widget_show (a33); gtk_table_attach (GTK_TABLE (table6), a33, 4, 5, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a33), 4); a43 = gtk_entry_new (); gtk_widget_show (a43); gtk_table_attach (GTK_TABLE (table6), a43, 5, 6, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a43), 4); a53 = gtk_entry_new (); gtk_widget_show (a53); gtk_table_attach (GTK_TABLE (table6), a53, 6, 7, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a53), 4); a63 = gtk_entry_new (); gtk_widget_show (a63); gtk_table_attach (GTK_TABLE (table6), a63, 7, 8, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a63), 4); a73 = gtk_entry_new (); gtk_widget_show (a73); gtk_table_attach (GTK_TABLE (table6), a73, 8, 9, 4, 5, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a73), 4); a04 = gtk_entry_new (); gtk_widget_show (a04); gtk_table_attach (GTK_TABLE (table6), a04, 1, 2, 5, 6, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a04), 4); a14 = gtk_entry_new (); gtk_widget_show (a14); gtk_table_attach (GTK_TABLE (table6), a14, 2, 3, 5, 6, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a14), 4); a24 = gtk_entry_new (); gtk_widget_show (a24); gtk_table_attach (GTK_TABLE (table6), a24, 3, 4, 5, 6, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a24), 4); a34 = gtk_entry_new (); gtk_widget_show (a34); gtk_table_attach (GTK_TABLE (table6), a34, 4, 5, 5, 6, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a34), 4); a44 = gtk_entry_new (); gtk_widget_show (a44); gtk_table_attach (GTK_TABLE (table6), a44, 5, 6, 5, 6, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a44), 4); a54 = gtk_entry_new (); gtk_widget_show (a54); gtk_table_attach (GTK_TABLE (table6), a54, 6, 7, 5, 6, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a54), 4); a64 = gtk_entry_new (); gtk_widget_show (a64); gtk_table_attach (GTK_TABLE (table6), a64, 7, 8, 5, 6, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a64), 4); a74 = gtk_entry_new (); gtk_widget_show (a74); gtk_table_attach (GTK_TABLE (table6), a74, 8, 9, 5, 6, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a74), 4); a05 = gtk_entry_new (); gtk_widget_show (a05); gtk_table_attach (GTK_TABLE (table6), a05, 1, 2, 6, 7, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a05), 4); a15 = gtk_entry_new (); gtk_widget_show (a15); gtk_table_attach (GTK_TABLE (table6), a15, 2, 3, 6, 7, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a15), 4); a25 = gtk_entry_new (); gtk_widget_show (a25); gtk_table_attach (GTK_TABLE (table6), a25, 3, 4, 6, 7, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a25), 4); a35 = gtk_entry_new (); gtk_widget_show (a35); gtk_table_attach (GTK_TABLE (table6), a35, 4, 5, 6, 7, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a35), 4); a45 = gtk_entry_new (); gtk_widget_show (a45); gtk_table_attach (GTK_TABLE (table6), a45, 5, 6, 6, 7, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a45), 4); a55 = gtk_entry_new (); gtk_widget_show (a55); gtk_table_attach (GTK_TABLE (table6), a55, 6, 7, 6, 7, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a55), 4); a65 = gtk_entry_new (); gtk_widget_show (a65); gtk_table_attach (GTK_TABLE (table6), a65, 7, 8, 6, 7, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a65), 4); a75 = gtk_entry_new (); gtk_widget_show (a75); gtk_table_attach (GTK_TABLE (table6), a75, 8, 9, 6, 7, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a75), 4); a06 = gtk_entry_new (); gtk_widget_show (a06); gtk_table_attach (GTK_TABLE (table6), a06, 1, 2, 7, 8, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a06), 4); a16 = gtk_entry_new (); gtk_widget_show (a16); gtk_table_attach (GTK_TABLE (table6), a16, 2, 3, 7, 8, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a16), 4); a26 = gtk_entry_new (); gtk_widget_show (a26); gtk_table_attach (GTK_TABLE (table6), a26, 3, 4, 7, 8, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a26), 4); a36 = gtk_entry_new (); gtk_widget_show (a36); gtk_table_attach (GTK_TABLE (table6), a36, 4, 5, 7, 8, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a36), 4); a46 = gtk_entry_new (); gtk_widget_show (a46); gtk_table_attach (GTK_TABLE (table6), a46, 5, 6, 7, 8, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a46), 4); a56 = gtk_entry_new (); gtk_widget_show (a56); gtk_table_attach (GTK_TABLE (table6), a56, 6, 7, 7, 8, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a56), 4); a66 = gtk_entry_new (); gtk_widget_show (a66); gtk_table_attach (GTK_TABLE (table6), a66, 7, 8, 7, 8, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a66), 4); a76 = gtk_entry_new (); gtk_widget_show (a76); gtk_table_attach (GTK_TABLE (table6), a76, 8, 9, 7, 8, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a76), 4); a07 = gtk_entry_new (); gtk_widget_show (a07); gtk_table_attach (GTK_TABLE (table6), a07, 1, 2, 8, 9, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a07), 4); a17 = gtk_entry_new (); gtk_widget_show (a17); gtk_table_attach (GTK_TABLE (table6), a17, 2, 3, 8, 9, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a17), 4); a27 = gtk_entry_new (); gtk_widget_show (a27); gtk_table_attach (GTK_TABLE (table6), a27, 3, 4, 8, 9, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a27), 4); a37 = gtk_entry_new (); gtk_widget_show (a37); gtk_table_attach (GTK_TABLE (table6), a37, 4, 5, 8, 9, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a37), 4); a47 = gtk_entry_new (); gtk_widget_show (a47); gtk_table_attach (GTK_TABLE (table6), a47, 5, 6, 8, 9, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a47), 4); a57 = gtk_entry_new (); gtk_widget_show (a57); gtk_table_attach (GTK_TABLE (table6), a57, 6, 7, 8, 9, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a57), 4); a67 = gtk_entry_new (); gtk_widget_show (a67); gtk_table_attach (GTK_TABLE (table6), a67, 7, 8, 8, 9, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a67), 4); a77 = gtk_entry_new (); gtk_widget_show (a77); gtk_table_attach (GTK_TABLE (table6), a77, 8, 9, 8, 9, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_entry_set_width_chars (GTK_ENTRY (a77), 4); table7 = gtk_table_new (3, 6, FALSE); gtk_widget_show (table7); gtk_box_pack_start (GTK_BOX (vbox3), table7, TRUE, TRUE, 0); label31 = gtk_label_new ("Filename"); gtk_widget_show (label31); gtk_table_attach (GTK_TABLE (table7), label31, 0, 1, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_label_set_justify (GTK_LABEL (label31), GTK_JUSTIFY_LEFT); gtk_misc_set_alignment (GTK_MISC (label31), 0, 0.5); gtk_misc_set_padding (GTK_MISC (label31), 4, 5); close_matrix_edit_but = gtk_button_new (); gtk_widget_show (close_matrix_edit_but); gtk_table_attach (GTK_TABLE (table7), close_matrix_edit_but, 4, 5, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (close_matrix_edit_but), 2); gtk_tooltips_set_tip (tooltips, close_matrix_edit_but, "Close this window", NULL); alignment1 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment1); gtk_container_add (GTK_CONTAINER (close_matrix_edit_but), alignment1); hbox1 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox1); gtk_container_add (GTK_CONTAINER (alignment1), hbox1); image1 = gtk_image_new_from_stock ("gtk-close", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image1); gtk_box_pack_start (GTK_BOX (hbox1), image1, FALSE, FALSE, 0); label69 = gtk_label_new_with_mnemonic ("Dismiss"); gtk_widget_show (label69); gtk_box_pack_start (GTK_BOX (hbox1), label69, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label69), GTK_JUSTIFY_LEFT); open_matrix_file_dlg = gtk_button_new_with_mnemonic ("..."); gtk_widget_show (open_matrix_file_dlg); gtk_table_attach (GTK_TABLE (table7), open_matrix_file_dlg, 5, 6, 0, 1, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (open_matrix_file_dlg), 2); gtk_tooltips_set_tip (tooltips, open_matrix_file_dlg, "Open the file selection dialog", NULL); matrix_edit_file = gtk_entry_new (); gtk_widget_show (matrix_edit_file); gtk_table_attach (GTK_TABLE (table7), matrix_edit_file, 1, 5, 0, 1, (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), (GtkAttachOptions) (0), 0, 0); hseparator2 = gtk_hseparator_new (); gtk_widget_show (hseparator2); gtk_table_attach (GTK_TABLE (table7), hseparator2, 0, 6, 1, 2, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (GTK_EXPAND | GTK_FILL), 0, 0); clear_matrix_but = gtk_button_new (); gtk_widget_show (clear_matrix_but); gtk_table_attach (GTK_TABLE (table7), clear_matrix_but, 1, 2, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (clear_matrix_but), 2); gtk_tooltips_set_tip (tooltips, clear_matrix_but, "Clear all fields", NULL); alignment4 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment4); gtk_container_add (GTK_CONTAINER (clear_matrix_but), alignment4); hbox4 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox4); gtk_container_add (GTK_CONTAINER (alignment4), hbox4); image4 = gtk_image_new_from_stock ("gtk-new", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image4); gtk_box_pack_start (GTK_BOX (hbox4), image4, FALSE, FALSE, 0); label72 = gtk_label_new_with_mnemonic ("Clear"); gtk_widget_show (label72); gtk_box_pack_start (GTK_BOX (hbox4), label72, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label72), GTK_JUSTIFY_LEFT); save_matrix_edit_but = gtk_button_new (); gtk_widget_show (save_matrix_edit_but); gtk_table_attach (GTK_TABLE (table7), save_matrix_edit_but, 3, 4, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (save_matrix_edit_but), 2); gtk_tooltips_set_tip (tooltips, save_matrix_edit_but, "Save Matrix to filename", NULL); alignment2 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment2); gtk_container_add (GTK_CONTAINER (save_matrix_edit_but), alignment2); hbox2 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox2); gtk_container_add (GTK_CONTAINER (alignment2), hbox2); image2 = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image2); gtk_box_pack_start (GTK_BOX (hbox2), image2, FALSE, FALSE, 0); label70 = gtk_label_new_with_mnemonic ("Save"); gtk_widget_show (label70); gtk_box_pack_start (GTK_BOX (hbox2), label70, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label70), GTK_JUSTIFY_LEFT); load_matrix_edit_but = gtk_button_new (); gtk_widget_show (load_matrix_edit_but); gtk_table_attach (GTK_TABLE (table7), load_matrix_edit_but, 2, 3, 2, 3, (GtkAttachOptions) (GTK_FILL), (GtkAttachOptions) (0), 0, 0); gtk_container_set_border_width (GTK_CONTAINER (load_matrix_edit_but), 2); gtk_tooltips_set_tip (tooltips, load_matrix_edit_but, "Load Matrix from filename", NULL); alignment3 = gtk_alignment_new (0.5, 0.5, 0, 0); gtk_widget_show (alignment3); gtk_container_add (GTK_CONTAINER (load_matrix_edit_but), alignment3); hbox3 = gtk_hbox_new (FALSE, 2); gtk_widget_show (hbox3); gtk_container_add (GTK_CONTAINER (alignment3), hbox3); image3 = gtk_image_new_from_stock ("gtk-open", GTK_ICON_SIZE_BUTTON); gtk_widget_show (image3); gtk_box_pack_start (GTK_BOX (hbox3), image3, FALSE, FALSE, 0); label71 = gtk_label_new_with_mnemonic ("Load"); gtk_widget_show (label71); gtk_box_pack_start (GTK_BOX (hbox3), label71, FALSE, FALSE, 0); gtk_label_set_justify (GTK_LABEL (label71), GTK_JUSTIFY_LEFT); g_signal_connect_swapped ((gpointer) close_matrix_edit_but, "clicked", G_CALLBACK (gtk_widget_destroy), GTK_OBJECT (matrix_edit_dlg)); g_signal_connect ((gpointer) open_matrix_file_dlg, "clicked", G_CALLBACK (on_open_matrix_file_dlg_clicked), NULL); g_signal_connect ((gpointer) clear_matrix_but, "clicked", G_CALLBACK (on_clear_matrix_but_clicked), NULL); g_signal_connect ((gpointer) save_matrix_edit_but, "clicked", G_CALLBACK (on_save_matrix_edit_but_clicked), NULL); g_signal_connect ((gpointer) load_matrix_edit_but, "clicked", G_CALLBACK (on_load_matrix_edit_but_clicked), NULL); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (matrix_edit_dlg, matrix_edit_dlg, "matrix_edit_dlg"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, vbox3, "vbox3"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, table6, "table6"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label32, "label32"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label33, "label33"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label34, "label34"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label35, "label35"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label36, "label36"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label37, "label37"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label38, "label38"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label40, "label40"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label41, "label41"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label42, "label42"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label43, "label43"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label44, "label44"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label45, "label45"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label46, "label46"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label47, "label47"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label48, "label48"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a00, "a00"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a10, "a10"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a20, "a20"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a30, "a30"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a40, "a40"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a50, "a50"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a60, "a60"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a70, "a70"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a01, "a01"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a11, "a11"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a21, "a21"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a31, "a31"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a41, "a41"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a51, "a51"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a61, "a61"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a71, "a71"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a02, "a02"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a12, "a12"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a22, "a22"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a32, "a32"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a42, "a42"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a52, "a52"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a62, "a62"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a72, "a72"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a03, "a03"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a13, "a13"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a23, "a23"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a33, "a33"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a43, "a43"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a53, "a53"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a63, "a63"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a73, "a73"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a04, "a04"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a14, "a14"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a24, "a24"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a34, "a34"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a44, "a44"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a54, "a54"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a64, "a64"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a74, "a74"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a05, "a05"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a15, "a15"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a25, "a25"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a35, "a35"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a45, "a45"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a55, "a55"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a65, "a65"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a75, "a75"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a06, "a06"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a16, "a16"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a26, "a26"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a36, "a36"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a46, "a46"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a56, "a56"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a66, "a66"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a76, "a76"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a07, "a07"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a17, "a17"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a27, "a27"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a37, "a37"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a47, "a47"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a57, "a57"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a67, "a67"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, a77, "a77"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, table7, "table7"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label31, "label31"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, close_matrix_edit_but, "close_matrix_edit_but"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, alignment1, "alignment1"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, hbox1, "hbox1"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, image1, "image1"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label69, "label69"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, open_matrix_file_dlg, "open_matrix_file_dlg"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, matrix_edit_file, "matrix_edit_file"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, hseparator2, "hseparator2"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, clear_matrix_but, "clear_matrix_but"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, alignment4, "alignment4"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, hbox4, "hbox4"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, image4, "image4"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label72, "label72"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, save_matrix_edit_but, "save_matrix_edit_but"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, alignment2, "alignment2"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, hbox2, "hbox2"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, image2, "image2"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label70, "label70"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, load_matrix_edit_but, "load_matrix_edit_but"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, alignment3, "alignment3"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, hbox3, "hbox3"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, image3, "image3"); GLADE_HOOKUP_OBJECT (matrix_edit_dlg, label71, "label71"); GLADE_HOOKUP_OBJECT_NO_REF (matrix_edit_dlg, tooltips, "tooltips"); return matrix_edit_dlg; } GtkWidget* create_load_settings_dlg (void) { GtkWidget *load_settings_dlg; GtkWidget *load_settings_ok_but; GtkWidget *load_settings_cancel_but; load_settings_dlg = gtk_file_selection_new ("Select File to load settings from"); gtk_container_set_border_width (GTK_CONTAINER (load_settings_dlg), 10); load_settings_ok_but = GTK_FILE_SELECTION (load_settings_dlg)->ok_button; gtk_widget_show (load_settings_ok_but); GTK_WIDGET_SET_FLAGS (load_settings_ok_but, GTK_CAN_DEFAULT); load_settings_cancel_but = GTK_FILE_SELECTION (load_settings_dlg)->cancel_button; gtk_widget_show (load_settings_cancel_but); GTK_WIDGET_SET_FLAGS (load_settings_cancel_but, GTK_CAN_DEFAULT); g_signal_connect ((gpointer) load_settings_ok_but, "clicked", G_CALLBACK (on_load_settings_ok_but_clicked), NULL); g_signal_connect_swapped ((gpointer) load_settings_cancel_but, "clicked", G_CALLBACK (gtk_widget_destroy), GTK_OBJECT (load_settings_dlg)); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (load_settings_dlg, load_settings_dlg, "load_settings_dlg"); GLADE_HOOKUP_OBJECT_NO_REF (load_settings_dlg, load_settings_ok_but, "load_settings_ok_but"); GLADE_HOOKUP_OBJECT_NO_REF (load_settings_dlg, load_settings_cancel_but, "load_settings_cancel_but"); return load_settings_dlg; } GtkWidget* create_save_settings_dlg (void) { GtkWidget *save_settings_dlg; GtkWidget *save_settings_dlg_ok; GtkWidget *save_settings_dlg_cancel; save_settings_dlg = gtk_file_selection_new ("Select File to Save settings to"); gtk_container_set_border_width (GTK_CONTAINER (save_settings_dlg), 10); save_settings_dlg_ok = GTK_FILE_SELECTION (save_settings_dlg)->ok_button; gtk_widget_show (save_settings_dlg_ok); GTK_WIDGET_SET_FLAGS (save_settings_dlg_ok, GTK_CAN_DEFAULT); save_settings_dlg_cancel = GTK_FILE_SELECTION (save_settings_dlg)->cancel_button; gtk_widget_show (save_settings_dlg_cancel); GTK_WIDGET_SET_FLAGS (save_settings_dlg_cancel, GTK_CAN_DEFAULT); g_signal_connect ((gpointer) save_settings_dlg_ok, "clicked", G_CALLBACK (on_save_settings_dlg_ok_clicked), NULL); g_signal_connect_swapped ((gpointer) save_settings_dlg_cancel, "clicked", G_CALLBACK (gtk_widget_destroy), GTK_OBJECT (save_settings_dlg)); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (save_settings_dlg, save_settings_dlg, "save_settings_dlg"); GLADE_HOOKUP_OBJECT_NO_REF (save_settings_dlg, save_settings_dlg_ok, "save_settings_dlg_ok"); GLADE_HOOKUP_OBJECT_NO_REF (save_settings_dlg, save_settings_dlg_cancel, "save_settings_dlg_cancel"); return save_settings_dlg; } GtkWidget* create_matrix_edit_filsel_dlg (void) { GtkWidget *matrix_edit_filsel_dlg; GtkWidget *matrix_edit_ok_but; GtkWidget *matrix_edit_cancel_but; matrix_edit_filsel_dlg = gtk_file_selection_new ("Select Matrix File"); gtk_container_set_border_width (GTK_CONTAINER (matrix_edit_filsel_dlg), 10); matrix_edit_ok_but = GTK_FILE_SELECTION (matrix_edit_filsel_dlg)->ok_button; gtk_widget_show (matrix_edit_ok_but); GTK_WIDGET_SET_FLAGS (matrix_edit_ok_but, GTK_CAN_DEFAULT); matrix_edit_cancel_but = GTK_FILE_SELECTION (matrix_edit_filsel_dlg)->cancel_button; gtk_widget_show (matrix_edit_cancel_but); GTK_WIDGET_SET_FLAGS (matrix_edit_cancel_but, GTK_CAN_DEFAULT); g_signal_connect ((gpointer) matrix_edit_ok_but, "clicked", G_CALLBACK (on_matrix_edit_ok_but_clicked), NULL); g_signal_connect_swapped ((gpointer) matrix_edit_cancel_but, "clicked", G_CALLBACK (gtk_widget_destroy), GTK_OBJECT (matrix_edit_filsel_dlg)); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (matrix_edit_filsel_dlg, matrix_edit_filsel_dlg, "matrix_edit_filsel_dlg"); GLADE_HOOKUP_OBJECT_NO_REF (matrix_edit_filsel_dlg, matrix_edit_ok_but, "matrix_edit_ok_but"); GLADE_HOOKUP_OBJECT_NO_REF (matrix_edit_filsel_dlg, matrix_edit_cancel_but, "matrix_edit_cancel_but"); return matrix_edit_filsel_dlg; } GtkWidget* create_quant_intra_matrix_dlg (void) { GtkWidget *quant_intra_matrix_dlg; GtkWidget *quant_intra_matrix_ok; GtkWidget *quant_intra_matrix_cancel; quant_intra_matrix_dlg = gtk_file_selection_new ("Select File for the INTRA matrix"); gtk_container_set_border_width (GTK_CONTAINER (quant_intra_matrix_dlg), 10); quant_intra_matrix_ok = GTK_FILE_SELECTION (quant_intra_matrix_dlg)->ok_button; gtk_widget_show (quant_intra_matrix_ok); GTK_WIDGET_SET_FLAGS (quant_intra_matrix_ok, GTK_CAN_DEFAULT); quant_intra_matrix_cancel = GTK_FILE_SELECTION (quant_intra_matrix_dlg)->cancel_button; gtk_widget_show (quant_intra_matrix_cancel); GTK_WIDGET_SET_FLAGS (quant_intra_matrix_cancel, GTK_CAN_DEFAULT); g_signal_connect ((gpointer) quant_intra_matrix_ok, "clicked", G_CALLBACK (on_quant_intra_matrix_ok_clicked), NULL); g_signal_connect_swapped ((gpointer) quant_intra_matrix_cancel, "clicked", G_CALLBACK (gtk_widget_destroy), GTK_OBJECT (quant_intra_matrix_dlg)); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (quant_intra_matrix_dlg, quant_intra_matrix_dlg, "quant_intra_matrix_dlg"); GLADE_HOOKUP_OBJECT_NO_REF (quant_intra_matrix_dlg, quant_intra_matrix_ok, "quant_intra_matrix_ok"); GLADE_HOOKUP_OBJECT_NO_REF (quant_intra_matrix_dlg, quant_intra_matrix_cancel, "quant_intra_matrix_cancel"); return quant_intra_matrix_dlg; } GtkWidget* create_quant_inter_matrix_dlg (void) { GtkWidget *quant_inter_matrix_dlg; GtkWidget *quant_inter_matrix_ok; GtkWidget *quant_inter_matrix_cancel; quant_inter_matrix_dlg = gtk_file_selection_new ("Select File to read INTER matrix from"); gtk_container_set_border_width (GTK_CONTAINER (quant_inter_matrix_dlg), 10); quant_inter_matrix_ok = GTK_FILE_SELECTION (quant_inter_matrix_dlg)->ok_button; gtk_widget_show (quant_inter_matrix_ok); GTK_WIDGET_SET_FLAGS (quant_inter_matrix_ok, GTK_CAN_DEFAULT); quant_inter_matrix_cancel = GTK_FILE_SELECTION (quant_inter_matrix_dlg)->cancel_button; gtk_widget_show (quant_inter_matrix_cancel); GTK_WIDGET_SET_FLAGS (quant_inter_matrix_cancel, GTK_CAN_DEFAULT); g_signal_connect ((gpointer) quant_inter_matrix_ok, "clicked", G_CALLBACK (on_quant_inter_matrix_ok_clicked), NULL); g_signal_connect_swapped ((gpointer) quant_inter_matrix_cancel, "clicked", G_CALLBACK (gtk_widget_destroy), GTK_OBJECT (quant_inter_matrix_dlg)); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (quant_inter_matrix_dlg, quant_inter_matrix_dlg, "quant_inter_matrix_dlg"); GLADE_HOOKUP_OBJECT_NO_REF (quant_inter_matrix_dlg, quant_inter_matrix_ok, "quant_inter_matrix_ok"); GLADE_HOOKUP_OBJECT_NO_REF (quant_inter_matrix_dlg, quant_inter_matrix_cancel, "quant_inter_matrix_cancel"); return quant_inter_matrix_dlg; } GtkWidget* create_help_window (void) { GtkWidget *help_window; GtkWidget *vbox5; GtkWidget *scrolledwindow1; GtkWidget *textview1; GtkWidget *statusbar1; help_window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_title (GTK_WINDOW (help_window), "xvid4conf Help"); vbox5 = gtk_vbox_new (FALSE, 0); gtk_widget_show (vbox5); gtk_container_add (GTK_CONTAINER (help_window), vbox5); scrolledwindow1 = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (scrolledwindow1); gtk_box_pack_start (GTK_BOX (vbox5), scrolledwindow1, TRUE, TRUE, 0); textview1 = gtk_text_view_new (); gtk_widget_show (textview1); gtk_container_add (GTK_CONTAINER (scrolledwindow1), textview1); gtk_container_set_border_width (GTK_CONTAINER (textview1), 2); gtk_text_view_set_editable (GTK_TEXT_VIEW (textview1), FALSE); gtk_text_view_set_cursor_visible (GTK_TEXT_VIEW (textview1), FALSE); gtk_text_view_set_indent (GTK_TEXT_VIEW (textview1), 2); gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview1)), "Hello, Welcome to XVID4CONF\nThanks", -1); statusbar1 = gtk_statusbar_new (); gtk_widget_show (statusbar1); gtk_box_pack_start (GTK_BOX (vbox5), statusbar1, FALSE, FALSE, 0); /* Store pointers to all widgets, for use by lookup_widget(). */ GLADE_HOOKUP_OBJECT_NO_REF (help_window, help_window, "help_window"); GLADE_HOOKUP_OBJECT (help_window, vbox5, "vbox5"); GLADE_HOOKUP_OBJECT (help_window, scrolledwindow1, "scrolledwindow1"); GLADE_HOOKUP_OBJECT (help_window, textview1, "textview1"); GLADE_HOOKUP_OBJECT (help_window, statusbar1, "statusbar1"); return help_window; } xvid4conf-1.12/src/interface.h0000644000175400017540000000063207722147021011735 /* * DO NOT EDIT THIS FILE - it is generated by Glade. */ GtkWidget* create_window1 (void); GtkWidget* create_matrix_edit_dlg (void); GtkWidget* create_load_settings_dlg (void); GtkWidget* create_save_settings_dlg (void); GtkWidget* create_matrix_edit_filsel_dlg (void); GtkWidget* create_quant_intra_matrix_dlg (void); GtkWidget* create_quant_inter_matrix_dlg (void); GtkWidget* create_help_window (void); xvid4conf-1.12/src/configs.c0000644000175400017540000016173407721646452011446 /* * configs.c * a more generic approach to config files. * Copyright 12/10/01 Chris C. Hoover */ /* 1 2 3 4 5 6 7 8 9 10 11 12 12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678 */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include #include #include #include #include #include #include #include #include #include "configs.h" #ifdef DEBUG #include "memtrack.h" #endif /* * get the section from the root. */ CF_SECTION_TYPE * cf_get_section( CF_ROOT_TYPE * pRoot ) { /* * root must exist. */ if( pRoot == NULL ) return NULL; /* * return the section. * if pRoot->section is NULL then * who cares? return NULL. */ return pRoot->section; } /* * get the next section. */ CF_SECTION_TYPE * cf_get_next_section( CF_ROOT_TYPE * pRoot, CF_SECTION_TYPE * pSection ) { CF_SECTION_TYPE * next; /* * root must exist. */ if( pRoot == NULL ) return NULL; /* * get a pointer to the section. */ next = pRoot->section; while( next != NULL ) { /* * this the section? */ if( next == pSection ) return next->next; /* * no? then get the next section. */ next = next->next; } /* * no can find. */ return NULL; } /* * get the named section. */ CF_SECTION_TYPE * cf_get_named_section( CF_ROOT_TYPE * pRoot, char * pName ) { CF_SECTION_TYPE * next; /* * root and name must exist. */ if( pRoot == NULL || pName == NULL ) return NULL; /* * get a pointer to the section. */ next = pRoot->section; while( next != NULL ) { /* * section name must exist. */ if( next->name != NULL ) /* * this the named section? */ if( strcmp( next->name, pName ) == 0 ) return next; /* * no? then get the next section. */ next = next->next; } /* * no can find. */ return NULL; } /* * get the key-value pair of the named section. * this routine only returns the first key-value * pair in the named section. */ CF_KEYVALUE_TYPE * cf_get_named_section_keyvalue( CF_ROOT_TYPE * pRoot, char * pName ) { CF_SECTION_TYPE * pSection; /* * root and name must exist. */ if( pRoot == NULL || pName == NULL ) return NULL; /* * find the named section. */ if( ( pSection = cf_get_named_section( pRoot, pName ) ) != NULL ) /* * return its' key-value pair. */ return pSection->keyvalue; /* * no can find. */ return NULL; } /* * get the next key-value pair of the named section, * given the previous key-value pair. */ CF_KEYVALUE_TYPE * cf_get_named_section_next_keyvalue( CF_ROOT_TYPE * pRoot, char * pName, CF_KEYVALUE_TYPE * pKeyvalue ) { CF_KEYVALUE_TYPE * pNext; /* * root and name must exist. */ if( pRoot == NULL || pName == NULL ) return NULL; /* * find the named sections first key-value pair. */ if( ( pNext = cf_get_named_section_keyvalue( pRoot, pName ) ) != NULL ) { /* * find the specific key-value pair in the section. */ while( pNext != NULL && pNext != pKeyvalue ) pNext = pNext->next; if( pNext != NULL ) /* * return its' next pointer. */ return pNext->next; } /* * no can find. */ return NULL; } /* * get the key of the named section. * this routine only returns the first key in the named section. * this is what you want if you only use keyless values or only * one key-value pair per section. */ char * cf_get_named_section_key( CF_ROOT_TYPE * pRoot, char * pName ) { CF_KEYVALUE_TYPE * pKeyvalue; /* * root and name must exist. */ if( pRoot == NULL || pName == NULL ) return NULL; /* * find the named section. */ if( ( pKeyvalue = cf_get_named_section_keyvalue( pRoot, pName ) ) != NULL ) /* * return its' key. */ return cf_skip_frontwhite( cf_skip_backwhite( pKeyvalue->key ) ); /* * no can find. */ return NULL; } /* * get the value of the named section. * this routine only returns the first value in the named section. * this is what you want if you only use keyless values or only * one key-value pair per section. */ char * cf_get_named_section_value( CF_ROOT_TYPE * pRoot, char * pName ) { CF_KEYVALUE_TYPE * pKeyvalue; /* * root and name must exist. */ if( pRoot == NULL || pName == NULL ) return NULL; /* * find the named section. */ if( ( pKeyvalue = cf_get_named_section_keyvalue( pRoot, pName ) ) != NULL ) /* * return its' value. */ return cf_skip_frontwhite( cf_skip_backwhite( pKeyvalue->value ) ); /* * no can find. */ return NULL; } /* * get the value of the named key from the named section. */ char * cf_get_named_section_value_of_key( CF_ROOT_TYPE * pRoot, char * pName, char * pKey ) { CF_KEYVALUE_TYPE * pKeyvalue; /* * root and name must exist. */ if( pRoot == NULL || pName == NULL ) return NULL; /* * find the named section * and key-value pair. */ if( ( pKeyvalue = cf_get_named_section_keyvalue( pRoot, pName ) ) != NULL ) { while( pKeyvalue != NULL && strcmp( pKeyvalue->key, pKey ) != 0 ) pKeyvalue = pKeyvalue->next; if( pKeyvalue != NULL ) return cf_skip_frontwhite( cf_skip_backwhite( pKeyvalue->value ) ); } /* * no can find. */ return NULL; } /* * put the value of the named key * into the named section. * * an optimization here might be to * just replace the old value with * the new one if it will fit. this * would prevent fragging memory to * some extent but it looks an awfull * lot like work to me so maybe later. */ int cf_put_named_section_value_of_key( CF_ROOT_TYPE * pRoot, char * pName, char * pKey, char * pVal, CF_VALUE_TYPE vtype, char * pComment ) { CF_KEYVALUE_TYPE * pKeyvalue, * pNew; CF_SECTION_TYPE * pSection; /* * root and name must exist. */ if( pRoot == NULL || pName == NULL ) return -1; /* * make sure we can instantiate a * new key-value pair. */ if( ( pNew = CF_NEW_KEYVALUE( pKey, pVal, vtype, pComment ) ) == NULL ) return -1; /* * find the named section. */ if( ( pSection = cf_get_named_section( pRoot, pName ) ) == NULL ) return -1; /* * find the named key-value pair. */ if( ( pKeyvalue = cf_get_named_section_keyvalue( pRoot, pName ) ) != NULL ) { while( pKeyvalue != NULL && strcmp( pKeyvalue->key, pKey ) != 0 ) pKeyvalue = pKeyvalue->next; if( pKeyvalue != NULL ) { /* * remove the old key-value pair from the section. */ if( CF_REMSEC_KEYVALUE( pKeyvalue, pSection ) < 0 ) return -1; /* * add the new key-value pair to the section. */ if( CF_ADDSEC_KEYVALUE( pNew, pSection ) < 0 ) return -1; /* * move the comments from the old * key-value pair to the new one. */ pNew->comment = pKeyvalue->comment; pKeyvalue->comment = NULL; /* * make sure we only free the old key-value pair. */ pKeyvalue->next = NULL; /* * free the old key-value pair. */ CF_FREE_KEYVALUE( pKeyvalue ); return 0; } } /* * no can find. */ return -1; } /* * get the named subsection. */ CF_SUBSECTION_TYPE * cf_get_named_subsection( CF_ROOT_TYPE * pRoot, char * pName ) { CF_SUBSECTION_TYPE * pSsection; CF_SECTION_TYPE * pNextSection; /* * root and name must exist. */ if( pRoot == NULL || pName == NULL ) return NULL; /* * get a pointer to the section. */ pNextSection = pRoot->section; while( pNextSection != NULL ) { /* * get a pointer to the subsection. */ pSsection = pNextSection->subsection; while( pSsection != NULL ) { /* * subsection name must exist. */ if( pSsection->name != NULL ) /* * this the named section? */ if( strcmp( pSsection->name, pName ) == 0 ) return pSsection; /* * no? then get the next subsection. */ pSsection = pSsection->next; } /* * no? then get the next section. */ pNextSection = pNextSection->next; } /* * no can find. */ return NULL; } /* * get the key-value pair of the named subsection. * this routine only returns the first key-value * pair in the named subsection. */ CF_KEYVALUE_TYPE * cf_get_named_subsection_keyvalue( CF_ROOT_TYPE * pRoot, char * pName ) { CF_SUBSECTION_TYPE * pSubsection; /* * root and name must exist. */ if( pRoot == NULL || pName == NULL ) return NULL; /* * find the named subsection. */ if( ( pSubsection = cf_get_named_subsection( pRoot, pName ) ) != NULL ) /* * return its' key-value pair. */ return pSubsection->keyvalue; /* * no can find. */ return NULL; } /* * get the next key-value pair of the named subsection, * given the previous keyvalue. */ CF_KEYVALUE_TYPE * cf_get_named_subsection_next_keyvalue( CF_ROOT_TYPE * pRoot, char * pName, CF_KEYVALUE_TYPE * pKeyvalue ) { CF_KEYVALUE_TYPE * pNext; /* * root and name must exist. */ if( pRoot == NULL || pName == NULL ) return NULL; /* * find the named subsections first key-value pair. */ if( ( pNext = cf_get_named_subsection_keyvalue( pRoot, pName ) ) != NULL ) { /* * find the specific key-value pair in the subsection. */ while( pNext != NULL && pNext != pKeyvalue ) pNext = pNext->next; if( pNext != NULL ) /* * return its' next pointer. */ return pNext->next; } /* * no can find. */ return NULL; } /* * write root to file. */ int cf_write( CF_ROOT_TYPE * pRoot, char * filename ) { FILE * fp; /* * root must exist. */ if( pRoot == NULL ) return -1; /* * check for a NULL filename. */ if( filename == NULL ) fp = stdout; else { /* * open the file for writing. */ if( ( fp = cf_wopen( filename ) ) == NULL ) return -1; } /* * send the root to fp. */ if( CF_PRINT_ROOT( fp, pRoot ) < 0 ) { fclose( fp ); return -1; } /* * and remember to close the output file * but don't close the standard output. */ if( fp != stdout ) fclose( fp ); return 0; } /* * read the root. */ CF_ROOT_TYPE * cf_read( char * filename ) { FILE * fp; char * pString = NULL, * pKey, * pVal, * pCmt; CF_ROOT_TYPE * pRoot = NULL; CF_SECTION_TYPE * pSection = NULL; CF_SUBSECTION_TYPE * pSsection = NULL; CF_KEYVALUE_TYPE * pKeyvalue = NULL; CF_KEYVALUE_TYPE * pParentKeyvalue = NULL; CF_COMMENT_TYPE * pComment = NULL; CF_COMMENT_TYPE * pParentComment = NULL; CF_VALUE_TYPE vtype = CF_CHR; CF_STATE_TYPE stype = CF_EMPTY; /* * why must i do this?? */ pRoot = NULL; /* * check for a NULL filename. */ if( filename == NULL ) fp = stdin; else { /* * open the file for reading. */ if( ( fp = cf_ropen( filename ) ) == NULL ) return NULL; } /* * allocate a ROOT struct. */ if( ( pRoot = CF_NEW_ROOT( cf_skip_backwhite( filename ), NULL, NULL) ) == NULL ) { fclose( fp ); FREE( pString ); return NULL; } /* * set the state to ROOT. */ stype = CF_ROOT; /* * read the file, one line at a time. * cf_readline skips whitespace at the beginning of the line * and zaps the newline at the end. */ while( ( pString = cf_readline( fp ) ) != NULL ) { /* * the first charater on the line tells us * what type of line we've got. */ switch( * pString ) { /* * it's a comment. */ case '\0': case '#': /* * this may be needed if we get two or more comments in a row. */ if( pComment != NULL ) pParentComment = pComment; /* * allocate a COMMENT struct. */ if( ( pComment = CF_NEW_COMMENT( cf_skip_backwhite( pString ) ) ) == NULL ) { fclose( fp ); CF_FREE_ROOT( pRoot ); return NULL; } /* * store the comment depending on the current state. * only the CF_ROOT, the CF_SECTIONS, the CF_SUBSECTIONS * and the CF_KEYVALUE pairs can have comments. */ switch( stype ) { /* * ROOT state. */ case CF_ROOT: /* * root must exist. */ if( pRoot == NULL ) { fclose( fp ); CF_FREE_ROOT( pRoot ); return NULL; } /* * first comment in the ROOT? */ if( pRoot->comment == NULL ) pRoot->comment = pComment; /* * no? then add a new comment to the list. */ else CF_ADDROOT_COMMENT( pComment, pRoot ); break; /* * CF_SECTION state. */ case CF_SECTION: /* * section must exist. */ if( pSection == NULL ) { fclose( fp ); CF_FREE_ROOT( pRoot ); return NULL; } /* * first comment in the SECTION? */ if( pSection->comment == NULL ) pSection->comment = pComment; /* * no? then add a new comment to the list. */ else CF_ADDSEC_COMMENT( pComment, pSection ); break; /* * SUBSECTION state. */ case CF_SUBSECTION: /* * subsection must exist. */ if( pSsection == NULL ) { fclose( fp ); CF_FREE_ROOT( pRoot ); return NULL; } /* * first comment in the SUBSECTION? */ if( pSsection->comment == NULL ) pSsection->comment = pComment; /* * no? then add a new comment to the list. */ else CF_ADDSUB_COMMENT( pComment, pSsection ); break; /* * KEYVALUE state. */ case CF_KEYVALUE: /* * key-value pair must exist. */ if( pKeyvalue == NULL ) { fclose( fp ); CF_FREE_ROOT( pRoot ); return NULL; } /* * first comment in the KEYVALUE? */ if( pKeyvalue->comment == NULL ) pKeyvalue->comment = pComment; /* * no? then add a new comment to the list. */ else CF_ADDKV_COMMENT( pComment, pKeyvalue ); break; /* * it's not the ROOT, a SECTION, a SUBSECTION or a KEYVALUE * so what is it? better bail out. */ default: fclose( fp ); CF_FREE_COMMENT( pComment ); CF_FREE_ROOT( pRoot ); return NULL; } break; /* * it's a section. */ case '[': /* * change state to SECTION. */ stype = CF_SECTION; /* * extract the section name from the line. */ pCmt = NULL; pString = cf_isolate( stype, pString, &pCmt ); /* * create a new section with the given name. */ if( ( pSection = CF_NEW_SECTION( cf_skip_backwhite( pString ), NULL, NULL, cf_skip_backwhite( pCmt ) ) ) == NULL ) { fclose( fp ); CF_FREE_ROOT( pRoot ); return NULL; } /* * sections live in the root so it must exist. */ if( pRoot == NULL ) { fclose( fp ); CF_FREE_ROOT( pRoot ); return NULL; } /* * first section in the root? */ if( pRoot->section == NULL ) pRoot->section = pSection; /* * no? then add a section to the list. */ else CF_ADD_SECTION( pSection, pRoot ); break; /* * it's a subsection. */ case '(': /* * change state to SUBSECTION. */ stype = CF_SUBSECTION; /* * extract the subsection name from the line. */ pCmt = NULL; pString = cf_isolate( stype, pString, &pCmt ); /* * create a new subsection with the given name. */ if( ( pSsection = CF_NEW_SUBSECTION( cf_skip_backwhite( pString ), NULL, cf_skip_backwhite( pCmt ) ) ) == NULL ) { fclose( fp ); CF_FREE_ROOT( pRoot ); return NULL; } /* * subsections live in sections so a section must exist. */ if( pSection == NULL ) { fclose( fp ); CF_FREE_ROOT( pRoot ); return NULL; } /* * first subsection in the section? */ if( pSection->subsection == NULL ) pSection->subsection = pSsection; /* * no? then add a subsection to the list. */ else CF_ADD_SUBSECTION( pSsection, pSection ); break; /* * must be a key-value pair. */ default: /* * this may be needed if we get two or more key-value pairs in a row. */ if( pKeyvalue != NULL ) pParentKeyvalue = pKeyvalue; /* * extract the key and value from the line. */ pKey = pVal = pCmt = NULL; vtype = CF_NONE; if( ( pString = cf_split( pString, &pKey, &pVal, &vtype, &pCmt ) ) == NULL ) { fclose( fp ); CF_FREE_ROOT( pRoot ); return NULL; } /* * create a new key-value pair with the given key and value. */ if( ( pKeyvalue = CF_NEW_KEYVALUE( cf_skip_backwhite( pKey ), cf_skip_backwhite( pVal ), vtype, cf_skip_backwhite( pCmt ) ) ) == NULL ) { fclose( fp ); CF_FREE_ROOT( pRoot ); return NULL; } /* * add the key-value pair to the section or subsection or key-value pair. */ switch( stype ) { /* * no key-value pairs for root. */ case CF_ROOT: fclose( fp ); CF_FREE_KEYVALUE( pKeyvalue ); CF_FREE_ROOT( pRoot ); return NULL; /* * add a key-value pair to the section. */ case CF_SECTION: /* * the section must exist. */ if( pSection == NULL ) { fclose( fp ); CF_FREE_ROOT( pRoot ); return NULL; } /* * first key-value pair in the section? */ if( pSection->keyvalue == NULL ) pSection->keyvalue = pKeyvalue; /* * no? then add the key-value pair to the list. */ else CF_ADDSEC_KEYVALUE( pKeyvalue, pSection ); break; /* * add a key-value pair to the subsection. */ case CF_SUBSECTION: /* * the subsection must exist. */ if( pSsection == NULL ) { fclose( fp ); CF_FREE_ROOT( pRoot ); return NULL; } /* * first key-value pair in the subsection? */ if( pSsection->keyvalue == NULL ) pSsection->keyvalue = pKeyvalue; /* * no? then add the key-value pair to the list. */ else CF_ADDSUB_KEYVALUE( pKeyvalue, pSsection ); break; /* * add a key-value pair to the list of key-value pairs. */ case CF_KEYVALUE: /* * the parent key-value pair must exist. */ if( pParentKeyvalue == NULL ) { fclose( fp ); CF_FREE_ROOT( pRoot ); return NULL; } /* * just add the key-value pair to the existing list. */ CF_ADDKV_KEYVALUE( pKeyvalue, pParentKeyvalue ); break; /* * don't know what to do so bail out. */ default: fclose( fp ); CF_FREE_KEYVALUE( pKeyvalue ); CF_FREE_ROOT( pRoot ); return NULL; } /* * set the state to KEYVALUE. this is a special case * because the KEYVALUE must be attached to a SECTION * or SUBSECTION before the state can change. once * that is done then key-value pairs can just be * added to the list if there are more of them. */ stype = CF_KEYVALUE; break; } } /* * remember to close the file but * don't close the standard input. */ if( fp != stdin ) fclose( fp ); /* * brand new root. */ return pRoot; } /* * new root. */ CF_ROOT_TYPE * CF_NEW_ROOT( char * name, CF_SECTION_TYPE * pSection, CF_COMMENT_TYPE * pComment ) { CF_ROOT_TYPE * pCfr; if( ( pCfr = MALLOC( sizeof( CF_ROOT_TYPE ) ) ) != NULL ) { pCfr->name = NULL; pCfr->section = NULL; pCfr->comment = NULL; if( name != NULL ) { if( ( pCfr->name = MALLOC( strlen( name ) + 1 ) ) == NULL ) { CF_FREE_ROOT( pCfr ); return NULL; } if( strncpy( pCfr->name, name, strlen( name ) + 1 ) != pCfr->name ) { CF_FREE_ROOT( pCfr ); return NULL; } } if( pSection != NULL ) { if( pCfr->section == NULL ) pCfr->section = pSection; else CF_ADD_SECTION( pSection, pCfr ); } if( pComment != NULL ) { if( pCfr->comment == NULL ) pCfr->comment = pComment; else CF_ADDROOT_COMMENT( pComment, pCfr ); } } return pCfr; } /* * free root. */ void CF_FREE_ROOT( CF_ROOT_TYPE * pCfr ) { if( pCfr != NULL ) { if( pCfr->name != NULL ) FREE( pCfr->name ); if( pCfr->section != NULL ) CF_FREE_SECTION( pCfr->section ); if( pCfr->comment != NULL ) CF_FREE_COMMENT( pCfr->comment ); FREE( pCfr ); } } /* * print the root. */ int CF_PRINT_ROOT( FILE * fp, CF_ROOT_TYPE * pRoot ) { if( pRoot == NULL ) return -1; if( fp == NULL ) fp = stdout; if( pRoot->comment != NULL ) CF_PRINT_COMMENT( fp, pRoot->comment ); if( pRoot->section != NULL ) CF_PRINT_SECTION( fp, pRoot->section ); return 0; } /* * new section. */ CF_SECTION_TYPE * CF_NEW_SECTION( char * name, CF_KEYVALUE_TYPE * pKeyvalue, CF_SUBSECTION_TYPE * pSsection, char * pComment ) { CF_SECTION_TYPE * pCfs; if( ( pCfs = MALLOC( sizeof( CF_SECTION_TYPE ) ) ) != NULL ) { pCfs->name = NULL; pCfs->keyvalue = NULL; pCfs->subsection = NULL; pCfs->comment = NULL; pCfs->next = NULL; if( name != NULL ) { if( ( pCfs->name = MALLOC( strlen( name ) + 1 ) ) == NULL ) { CF_FREE_SECTION( pCfs ); return NULL; } if( strncpy( pCfs->name, name, strlen( name ) + 1 ) != pCfs->name ) { CF_FREE_SECTION( pCfs ); return NULL; } } if( pKeyvalue != NULL ) pCfs->keyvalue = pKeyvalue; if( pSsection != NULL ) pCfs->subsection = pSsection; if( pComment == NULL ) pCfs->comment = NULL; /* * stuff the comment. */ else { /* * get a new comment struct. */ if( ( pCfs->comment = CF_NEW_COMMENT( cf_skip_backwhite( pComment ) ) ) == NULL ) return NULL; } } return pCfs; } /* * free section. */ void CF_FREE_SECTION( CF_SECTION_TYPE * pCfs ) { CF_SECTION_TYPE * temp = NULL; while( pCfs != NULL ) { temp = pCfs; if( pCfs->name != NULL ) FREE( pCfs->name ); if( pCfs->keyvalue != NULL ) CF_FREE_KEYVALUE( pCfs->keyvalue ); if( pCfs->subsection != NULL ) CF_FREE_SUBSECTION( pCfs->subsection ); if( pCfs->comment != NULL ) CF_FREE_COMMENT( pCfs->comment ); pCfs = pCfs->next; FREE( temp ); } } /* * add section. */ int CF_ADD_SECTION( CF_SECTION_TYPE * from, CF_ROOT_TYPE * to ) { CF_SECTION_TYPE * pSection; if( from == NULL || to == NULL ) return -1; if( ( pSection = to->section ) == NULL ) to->section = from; else { while( pSection->next != NULL ) pSection = pSection->next; pSection->next = from; } return 0; } /* * remove section. */ int CF_REM_SECTION( CF_SECTION_TYPE * rem, CF_ROOT_TYPE * from ) { CF_SECTION_TYPE * pSection; if( rem == NULL || from == NULL ) return -1; if( ( pSection = from->section ) == NULL ) return -1; if( pSection == rem ) from->section = rem->next; else { while( pSection->next != NULL && pSection->next != rem ) pSection = pSection->next; if( pSection->next == NULL ) return -1; pSection->next = rem->next; } return 0; } /* * print the section. */ int CF_PRINT_SECTION( FILE * fp, CF_SECTION_TYPE * pSection ) { if( pSection == NULL ) return -1; if( fp == NULL ) fp = stdout; if( pSection->name != NULL ) fprintf( fp, "[%s]", pSection->name ); if( pSection->comment != NULL ) { /* * inline comment. */ if( * pSection->comment->comment == '#' ) fprintf( fp, " " ); else fprintf( fp, "\n" ); CF_PRINT_COMMENT( fp, pSection->comment ); } else fprintf( fp, "\n" ); if( pSection->keyvalue != NULL ) CF_PRINT_KEYVALUE( fp, pSection->keyvalue ); if( pSection->subsection != NULL ) CF_PRINT_SUBSECTION( fp, pSection->subsection ); while( ( pSection = pSection->next ) != NULL ) { if( pSection->name != NULL ) fprintf( fp, "[%s]", pSection->name ); if( pSection->comment != NULL ) { /* * inline comment. */ if( * pSection->comment->comment == '#' ) fprintf( fp, " " ); else fprintf( fp, "\n" ); CF_PRINT_COMMENT( fp, pSection->comment ); } else fprintf( fp, "\n" ); if( pSection->keyvalue != NULL ) CF_PRINT_KEYVALUE( fp, pSection->keyvalue ); if( pSection->subsection != NULL ) CF_PRINT_SUBSECTION( fp, pSection->subsection ); } return 0; } /* * new subsection. */ CF_SUBSECTION_TYPE * CF_NEW_SUBSECTION( char * name, CF_KEYVALUE_TYPE * pKeyvalue, char * pComment ) { CF_SUBSECTION_TYPE * pCfu; if( ( pCfu = MALLOC( sizeof( CF_SUBSECTION_TYPE ) ) ) != NULL ) { pCfu->name = NULL; pCfu->keyvalue = NULL; pCfu->comment = NULL; pCfu->next = NULL; if( name != NULL ) { if( ( pCfu->name = MALLOC( strlen( name ) + 1 ) ) == NULL ) { CF_FREE_SUBSECTION( pCfu ); return NULL; } if( strncpy( pCfu->name, name, strlen( name ) + 1 ) != pCfu->name ) { CF_FREE_SUBSECTION( pCfu ); return NULL; } } if( pKeyvalue != NULL ) pCfu->keyvalue = pKeyvalue; if( pComment == NULL ) pCfu->comment = NULL; /* * stuff the comment. */ else { /* * get a new comment struct. */ if( ( pCfu->comment = CF_NEW_COMMENT( cf_skip_backwhite( pComment ) ) ) == NULL ) return NULL; } } return pCfu; } /* * free subsection. */ void CF_FREE_SUBSECTION( CF_SUBSECTION_TYPE * pCfu ) { CF_SUBSECTION_TYPE * temp = NULL; while( pCfu != NULL ) { temp = pCfu; if( pCfu->name != NULL ) FREE( pCfu->name ); if( pCfu->keyvalue != NULL ) CF_FREE_KEYVALUE( pCfu->keyvalue ); if( pCfu->comment != NULL ) CF_FREE_COMMENT( pCfu->comment ); pCfu = pCfu->next; FREE( temp ); } } /* * add subsection. */ int CF_ADD_SUBSECTION( CF_SUBSECTION_TYPE * from, CF_SECTION_TYPE * to ) { CF_SUBSECTION_TYPE * pSsection; if( from == NULL || to == NULL ) return -1; if( ( pSsection = to->subsection ) == NULL ) to->subsection = from; else { while( pSsection->next != NULL ) pSsection = pSsection->next; pSsection->next = from; } return 0; } /* * remove subsection. */ int CF_REM_SUBSECTION( CF_SUBSECTION_TYPE * rem, CF_SECTION_TYPE * from ) { CF_SUBSECTION_TYPE * pSsection; if( rem == NULL || from == NULL ) return -1; if( ( pSsection = from->subsection ) == NULL ) return -1; if( pSsection == rem ) from->subsection = rem->next; else { while( pSsection->next != NULL && pSsection->next != rem ) pSsection = pSsection->next; if( pSsection->next == NULL ) return -1; pSsection->next = rem->next; } return 0; } /* * print the subsection. */ int CF_PRINT_SUBSECTION( FILE * fp, CF_SUBSECTION_TYPE * pSsection ) { if( pSsection == NULL ) return -1; if( fp == NULL ) fp = stdout; if( pSsection->name != NULL ) fprintf( fp, "(%s)", pSsection->name ); if( pSsection->comment != NULL ) { /* * inline comment. */ if( * pSsection->comment->comment == '#' ) fprintf( fp, " " ); else fprintf( fp, "\n" ); CF_PRINT_COMMENT( fp, pSsection->comment ); } else fprintf( fp, "\n" ); if( pSsection->keyvalue != NULL ) CF_PRINT_KEYVALUE( fp, pSsection->keyvalue ); while( ( pSsection = pSsection->next ) != NULL ) { if( pSsection->name != NULL ) fprintf( fp, "(%s)", pSsection->name ); if( pSsection->comment != NULL ) { /* * inline comment. */ if( * pSsection->comment->comment == '#' ) fprintf( fp, " " ); else fprintf( fp, "\n" ); CF_PRINT_COMMENT( fp, pSsection->comment ); } else fprintf( fp, "\n" ); if( pSsection->keyvalue != NULL ) CF_PRINT_KEYVALUE( fp, pSsection->keyvalue ); } return 0; } /* * new key-value pair. */ CF_KEYVALUE_TYPE * CF_NEW_KEYVALUE( char * pKey, char * pVal, CF_VALUE_TYPE vtype, char * pComment ) { CF_KEYVALUE_TYPE * pCfk = NULL; char * pK = NULL, * pV = NULL; /* * allocate a new key-value pair struct. */ if( ( pCfk = MALLOC( sizeof( CF_KEYVALUE_TYPE ) ) ) != NULL ) { /* * caller doesn't have a key to insert. */ if( pKey == NULL ) pCfk->key = NULL; /* * stuff the key. */ else { /* * allocate the key string. */ if( ( pK = MALLOC( strlen( pKey ) + 1 ) ) == NULL ) return NULL; /* * stuff the string. */ if( strncpy( pK, pKey, strlen( pKey ) + 1 ) != pK ) return NULL; /* * fill in the key part. */ pCfk->key = pK; } /* * caller doesn't have a value to insert. */ if( pVal == NULL ) pCfk->value = NULL; /* * stuff the value. */ else { /* * allocate the value string. */ if( ( pV = MALLOC( strlen( pVal ) + 1 ) ) == NULL ) return NULL; /* * stuff the string. */ if( strncpy( pV, pVal, strlen( pVal ) + 1 ) != pV ) return NULL; /* * fill in the value part. */ pCfk->value = pV; } /* * caller doesn't have a type to insert. */ if( vtype == CF_NONE ) pCfk->vtype = CF_CHR; /* * stuff the type. */ else pCfk->vtype = vtype; /* * caller doesn't have a comment to insert. */ if( pComment == NULL ) pCfk->comment = NULL; /* * stuff the comment. */ else { /* * get a new comment struct. */ if( ( pCfk->comment = CF_NEW_COMMENT( cf_skip_backwhite( pComment ) ) ) == NULL ) return NULL; } /* * this has been done but let's make sure. */ pCfk->next = NULL; } return pCfk; } /* * free key-value pair. */ void CF_FREE_KEYVALUE( CF_KEYVALUE_TYPE * pCfk ) { CF_KEYVALUE_TYPE * temp = NULL; while( pCfk != NULL ) { temp = pCfk; if( pCfk->key != NULL ) FREE( pCfk->key ); if( pCfk->value != NULL ) FREE( pCfk->value ); if( pCfk->comment != NULL ) CF_FREE_COMMENT( pCfk->comment ); pCfk = pCfk->next; FREE( temp ); } } /* * add key-value pair * to the section. */ int CF_ADDSEC_KEYVALUE( CF_KEYVALUE_TYPE * from, CF_SECTION_TYPE * to ) { CF_KEYVALUE_TYPE * pKeyvalue; if( from == NULL || to == NULL ) return -1; if( ( pKeyvalue = to->keyvalue ) == NULL ) to->keyvalue = from; else { while( pKeyvalue->next != NULL ) pKeyvalue = pKeyvalue->next; pKeyvalue->next = from; } return 0; } /* * add key-value pair * to the subsection. */ int CF_ADDSUB_KEYVALUE( CF_KEYVALUE_TYPE * from, CF_SUBSECTION_TYPE * to ) { CF_KEYVALUE_TYPE * pKeyvalue; if( from == NULL || to == NULL ) return -1; if( ( pKeyvalue = to->keyvalue ) == NULL ) to->keyvalue = from; else { while( pKeyvalue->next != NULL ) pKeyvalue = pKeyvalue->next; pKeyvalue->next = from; } return 0; } /* * add key-value pair to the * previous key-value pair. */ int CF_ADDKV_KEYVALUE( CF_KEYVALUE_TYPE * from, CF_KEYVALUE_TYPE * to ) { if( from == NULL || to == NULL || from == to ) return -1; if( to->next == NULL ) to->next = from; else { while( to->next != NULL ) to = to->next; to->next = from; } return 0; } /* * remove key-value pair * from the section. */ int CF_REMSEC_KEYVALUE( CF_KEYVALUE_TYPE * rem, CF_SECTION_TYPE * from ) { CF_KEYVALUE_TYPE * pKeyvalue; if( rem == NULL || from == NULL ) return -1; if( ( pKeyvalue = from->keyvalue ) == NULL ) return -1; if( pKeyvalue == rem ) from->keyvalue = rem->next; else { while( pKeyvalue->next != NULL && pKeyvalue->next != rem ) pKeyvalue = pKeyvalue->next; if( pKeyvalue->next == NULL ) return -1; pKeyvalue->next = rem->next; } return 0; } /* * remove key-value pair * from the subsection. */ int CF_REMSUB_KEYVALUE( CF_KEYVALUE_TYPE * rem, CF_SUBSECTION_TYPE * from ) { CF_KEYVALUE_TYPE * pKeyvalue; if( rem == NULL || from == NULL ) return -1; if( ( pKeyvalue = from->keyvalue ) == NULL ) return -1; if( pKeyvalue == rem ) from->keyvalue = rem->next; else { while( pKeyvalue->next != NULL && pKeyvalue->next != rem ) pKeyvalue = pKeyvalue->next; if( pKeyvalue->next == NULL ) return -1; pKeyvalue->next = rem->next; } return 0; } /* * print key-value pairs. */ int CF_PRINT_KEYVALUE( FILE * fp, CF_KEYVALUE_TYPE * pKeyvalue ) { if( pKeyvalue == NULL ) return -1; if( fp == NULL ) fp = stdout; if( pKeyvalue->key != NULL && pKeyvalue->value != NULL ) { if( strlen( pKeyvalue->value ) == strlen( pKeyvalue->key ) && strcmp( pKeyvalue->value, pKeyvalue->key ) == 0 ) fprintf( fp, "%s", pKeyvalue->value ); else fprintf( fp, "%s=%s", pKeyvalue->key, pKeyvalue->value ); if( pKeyvalue->vtype == CF_INT ) fprintf( fp, "~INT" ); else fprintf( fp, "~CHR" ); if( pKeyvalue->comment != NULL ) { /* * inline comment. */ if( * pKeyvalue->comment->comment == '#' ) fprintf( fp, " " ); else fprintf( fp, "\n" ); CF_PRINT_COMMENT( fp, pKeyvalue->comment ); } else fprintf( fp, "\n" ); while( ( pKeyvalue = pKeyvalue->next ) != NULL ) { if( strlen( pKeyvalue->value ) == strlen( pKeyvalue->key ) && strcmp( pKeyvalue->value, pKeyvalue->key ) == 0 ) fprintf( fp, "%s", pKeyvalue->value ); else fprintf( fp, "%s=%s", pKeyvalue->key, pKeyvalue->value ); if( pKeyvalue->vtype == CF_INT ) fprintf( fp, "~INT" ); else fprintf( fp, "~CHR" ); if( pKeyvalue->comment != NULL ) { /* * inline comment. */ if( * pKeyvalue->comment->comment == '#' ) fprintf( fp, " " ); else fprintf( fp, "\n" ); CF_PRINT_COMMENT( fp, pKeyvalue->comment ); } else fprintf( fp, "\n" ); } } return 0; } /* * new comment. */ CF_COMMENT_TYPE * CF_NEW_COMMENT( char * pComment ) { CF_COMMENT_TYPE * pCfc; if( ( pCfc = MALLOC( sizeof( CF_COMMENT_TYPE ) ) ) != NULL ) { pCfc->comment = NULL; pCfc->next = NULL; if( pComment != NULL ) { if( ( pCfc->comment = MALLOC( strlen( pComment ) + 1 ) ) == NULL ) { CF_FREE_COMMENT( pCfc ); pCfc = NULL; } if( strncpy( pCfc->comment, pComment, strlen( pComment ) + 1 ) != pCfc->comment ) { CF_FREE_COMMENT( pCfc ); pCfc = NULL; } } } return pCfc; } /* * free comment. */ void CF_FREE_COMMENT( CF_COMMENT_TYPE * pCfc ) { CF_COMMENT_TYPE * temp = NULL; while( pCfc != NULL ) { temp = pCfc; if( pCfc->comment != NULL ) FREE( pCfc->comment ); pCfc = pCfc->next; FREE( temp ); } } /* * add comment to the root. */ int CF_ADDROOT_COMMENT( CF_COMMENT_TYPE * from, CF_ROOT_TYPE * to ) { CF_COMMENT_TYPE * pComment; if( from == NULL || to == NULL ) return -1; if( ( pComment = to->comment ) == NULL ) to->comment = from; else { while( pComment->next != NULL ) pComment = pComment->next; pComment->next = from; } return 0; } /* * add comment to the section. */ int CF_ADDSEC_COMMENT( CF_COMMENT_TYPE * from, CF_SECTION_TYPE * to ) { CF_COMMENT_TYPE * pComment; if( from == NULL || to == NULL ) return -1; if( ( pComment = to->comment ) == NULL ) to->comment = from; else { while( pComment->next != NULL ) pComment = pComment->next; pComment->next = from; } return 0; } /* * add comment to the subsection. */ int CF_ADDSUB_COMMENT( CF_COMMENT_TYPE * from, CF_SUBSECTION_TYPE * to ) { CF_COMMENT_TYPE * pComment; if( from == NULL || to == NULL ) return -1; if( ( pComment = to->comment ) == NULL ) to->comment = from; else { while( pComment->next != NULL ) pComment = pComment->next; pComment->next = from; } return 0; } /* * add comment to the keyvalue. */ int CF_ADDKV_COMMENT( CF_COMMENT_TYPE * from, CF_KEYVALUE_TYPE * to ) { CF_COMMENT_TYPE * pComment; if( from == NULL || to == NULL ) return -1; if( ( pComment = to->comment ) == NULL ) to->comment = from; else { while( pComment->next != NULL ) pComment = pComment->next; pComment->next = from; } return 0; } /* * remove comment from * the root. */ int CF_REMROOT_COMMENT( CF_COMMENT_TYPE * rem, CF_ROOT_TYPE * from ) { CF_COMMENT_TYPE * pComment; if( rem == NULL || from == NULL ) return -1; if( ( pComment = from->comment ) == NULL ) return -1; if( pComment == rem ) from->comment = rem->next; else { while( pComment->next != NULL && pComment->next != rem ) pComment = pComment->next; if( pComment->next == NULL ) return -1; pComment->next = rem->next; } return 0; } /* * remove comment from * the section. */ int CF_REMSEC_COMMENT( CF_COMMENT_TYPE * rem, CF_SECTION_TYPE * from ) { CF_COMMENT_TYPE * pComment; if( rem == NULL || from == NULL ) return -1; if( ( pComment = from->comment ) == NULL ) return -1; if( pComment == rem ) from->comment = rem->next; else { while( pComment->next != NULL && pComment->next != rem ) pComment = pComment->next; if( pComment->next == NULL ) return -1; pComment->next = rem->next; } return 0; } /* * remove comment from * the subsection. */ int CF_REMSUB_COMMENT( CF_COMMENT_TYPE * rem, CF_SUBSECTION_TYPE * from ) { CF_COMMENT_TYPE * pComment; if( rem == NULL || from == NULL ) return -1; if( ( pComment = from->comment ) == NULL ) return -1; if( pComment == rem ) from->comment = rem->next; else { while( pComment->next != NULL && pComment->next != rem ) pComment = pComment->next; if( pComment->next == NULL ) return -1; pComment->next = rem->next; } return 0; } /* * print comments. */ int CF_PRINT_COMMENT( FILE * fp, CF_COMMENT_TYPE * pComment ) { if( pComment == NULL ) return -1; if( fp == NULL ) fp = stdout; if( pComment->comment != NULL ) { fprintf( fp, "%s\n", pComment->comment ); while( ( pComment = pComment->next ) != NULL ) { if( pComment->comment != NULL ) fprintf( fp, "%s\n", pComment->comment ); } } return 0; } /* * read a line from the configfile. */ char * cf_readline( FILE * fp ) { static char inbuf[ CF_BUFSIZE ]; char * pString; /* * no file pointer, no read. */ if( fp == NULL ) return NULL; /* * get the line into the buffer. */ if( ( pString = fgets( inbuf, CF_BUFSIZE, fp ) ) != inbuf ) return NULL; /* * the line must have a newline character at the end. */ if( cf_zap_newline( pString ) < 0 ) return NULL; /* * return the first non whitespace character as * the beginning of the line. */ return cf_skip_frontwhite( pString ); } /* * open the named configfile for reading. */ FILE * cf_ropen( char * filename ) { static FILE * fp; /* * no filename, no open. */ if( filename == NULL ) return NULL; /* * open the file for reading. */ if( ( fp = fopen( filename, "r" ) ) == NULL ) return NULL; return fp; } /* * open the named configfile for reading. */ FILE * cf_wopen( char * filename ) { static FILE * fp; /* * no filename, no open. */ if( filename == NULL ) return NULL; /* * open the file for writing. */ if( ( fp = fopen( filename, "w" ) ) == NULL ) return NULL; return fp; } /* * step over white space at the * beginning of the line. */ char * cf_skip_frontwhite( char * pWhite ) { if( pWhite == NULL ) return NULL; while( * pWhite =='\t' || * pWhite == ' ' ) pWhite++; return pWhite; } /* * step over white space at the * beginning of the line. */ char * cf_skip_backwhite( char * pWhite ) { char * pTail = NULL, * pTemp = NULL; if( pWhite == NULL ) return NULL; pTail = pWhite + strlen( pWhite ) - 1; pTemp = pTail; while( * pTail == '\t' || * pTail == ' ' ) { pTemp = pTail; pTail--; } if( * pTemp == '\t' || * pTemp == ' ' ) * pTemp = '\0'; return pWhite; } /* * zap newline in string. */ int cf_zap_newline( char * pString ) { if( pString == NULL ) return -1; while( * pString != '\0' && * pString != '\n' ) pString++; if( * pString == '\n' ) * pString = '\0'; return 0; } /* * split the key-value pair. */ char * cf_split( char * pString, char ** pKeyP, char ** pValP, cf_t * pType, char ** pCmtP ) { char * pSplit; static char newString [ CF_BUFSIZE ]; static char newKey [ CF_BUFSIZE ]; static char newVal [ CF_BUFSIZE ]; static char newComment[ CF_BUFSIZE ]; /* * the string to split must exist. */ if( pString == NULL ) return NULL; /* * the key and value strings, the type and the comment string must also exist. */ if( pKeyP == NULL || pValP == NULL || pType == NULL || pCmtP == NULL ) return NULL; /* * first copy the String to newString. */ if( strncpy( newString, pString, CF_BUFSIZE ) != newString ) return NULL; /* * next find the '=' in newString that marks a key-value pair. * if found, copy the key and value to newKey and newValue. */ if( ( pSplit = strchr( newString, '=' ) ) != NULL ) { if( strncpy( newVal, pSplit + 1, CF_BUFSIZE ) != newVal ) return NULL; * pSplit = '\0'; if( strncpy( newKey, newString, CF_BUFSIZE ) != newKey ) return NULL; } /* * if not then copy newString to newKey and newVal. */ else { if( strncpy( newKey, newString, CF_BUFSIZE ) != newKey ) return NULL; if( strncpy( newVal, newString, CF_BUFSIZE ) != newVal ) return NULL; if( strncpy( newComment, newString + 1, CF_BUFSIZE ) != newComment ) return NULL; } /* * now search newVal for the '~' that marks the type. * if found, set the type parameter. * the string following the '~' is coppied to newComment * for later use and the end of newVal at the '~' character. * then search the newKey for the '~' and end that string there. * if not found in newKey or newValue then move on to * the comment. */ if( ( pSplit = strchr( newVal, '~' ) ) != NULL ) { if( strncpy( newComment, pSplit + 1, CF_BUFSIZE ) != newComment ) return NULL; /* * this key-value pair has a type. */ if( strcmp( cf_sntoupper( pSplit + 1, 3 ), "INT") == 0 ) { * pType = CF_INT; } else { * pType = CF_CHR; } * pSplit = '\0'; if( ( pSplit = strchr( newKey, '~' ) ) != NULL ) * pSplit = '\0'; } else { /* * this key-value pair has no type. * default to CHR. */ * pType = CF_CHR; /* * the string could still have a comment even though it * has no type. */ if( strncpy( newComment, pString + 1, CF_BUFSIZE ) != newComment ) return NULL; } /* * lastly, search newComment for the '#' that marks the comment. * if found then move the '#' to the head of the comment string. */ if( ( pSplit = strchr( newComment, '#' ) ) != NULL ) { /* * this key-value pair has a comment. */ if( strncpy( newComment, pSplit, CF_BUFSIZE ) != newComment ) return NULL; * pCmtP = newComment; } else { /* * this key-value pair has no comment. */ * pCmtP = NULL; } if( ( pSplit = strchr( newKey, '#' ) ) != NULL ) * pSplit = '\0'; * pKeyP = newKey; if( ( pSplit = strchr( newVal, '#' ) ) != NULL ) * pSplit = '\0'; * pValP = newVal; if( ( pSplit = strchr( newString, '#' ) ) != NULL ) * pSplit = '\0'; return newString; } /* * isolate the desired name string. */ char * cf_isolate( CF_STATE_TYPE state, char * pString, char ** pCmtP ) { char * pSplit, front = '?', back = '?'; static char newString[ CF_BUFSIZE ]; static char newComment[ CF_BUFSIZE ]; /* * the string pointer must exist. */ if( pString == NULL ) return NULL; /* * prepare front and back characters * based on the state variable. */ switch( state ) { /* * section state. */ case CF_SECTION: front = '['; back = ']'; break; /* * subsection state. */ case CF_SUBSECTION: front = '('; back = ')'; break; /* * only section and subsection names * can be isolated in this way. */ default: return NULL; } /* * the first character must be front. */ if( * pString != front ) return NULL; /* * step over the front character. */ if( strncpy( newString, pString + 1, CF_BUFSIZE ) != newString ) return NULL; /* * now find and kill the back character. */ if( ( pSplit = strchr( newString, back ) ) == NULL ) /* * format failure. no back character. */ return NULL; /* * kill the back character. */ * pSplit = '\0'; /* * deal with the comment. */ if( pCmtP != NULL ) { /* * look for the telltail '#' that marks a comment type. */ if( ( pSplit = strchr( pString, '#' ) ) != NULL ) { /* * this section or subsection has a comment. */ if( strncpy( newComment, pSplit, CF_BUFSIZE ) != newComment ) return NULL; * pCmtP = newComment; } else { /* * this section or subsection has no comment. */ * pCmtP = NULL; } } return newString; } /* * convert the string to upper case characters. * * this routine is destructive of the string * passed in as the parameter so be careful. */ char * cf_sntoupper( char * pString, int num ) { static char upper[ CF_BUFSIZE ]; if( pString == NULL || num <= 0 || num > CF_BUFSIZE ) return NULL; if( strncpy( upper, pString, CF_BUFSIZE ) != upper ) return NULL; if( num < CF_BUFSIZE ) upper[ num-- ] = '\0'; while( num >= 0 && upper[ num ] != '\0' ) { upper[ num ] = toupper( upper[ num ] ); num--; } return upper; } // ------------------------------------------------ // Example to use module_read_config with sections. // ------------------------------------------------ // From: Edouard Gomez // To: Transcode-devel ML // Date: Sat, 2 Aug 2003 23:56:23 +0200 // // I added a CONF_TYPE_SECTION element type to be able to modelize sections // directly in struct config arrays. // // Let's have a look at a code snippet that shows how to use this change. // // You want to parse something like // // [section1] // value1 = 5 // value2 = 3 // // [section2] // // value3 = 8 // value4 = 9 // value5 = -2 // // // Then instead of reading the config file twice to get a section at each // module_read_config call, you can define an array with CONF_TYPE_SECTION // elements. // // A CONF_TYPE_SECTION element uses the config fields as follow: // {"section1", "God damn i'm good", CONF_TYPE_SECTION, 0, 0, 0, NULL}, // ^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^ // |section name | Section description | type .... not used // // The section name is used while loading the settings, the section // description is used (when given) as a description for the // module_print_config function (else it uses the section name). // // Let's see a program that would read the test.cfg file. // // // #include // #include "configs.h" // // int main(int argc, char **argv) // { // // int plop[5]; // // struct config conf[] = // { // {"section1", "Damn i'm good", CONF_TYPE_SECTION, 0, 0, 0, NULL}, // {"value1", &plop[0], CONF_TYPE_INT, CONF_RANGE, -127, 127,NULL}, // {"value2", &plop[1], CONF_TYPE_INT, CONF_RANGE, -127, 127,NULL}, // {"section2", "Damn i'm really too good", CONF_TYPE_SECTION, 0, 0, 0, NULL}, // {"value3", &plop[2], CONF_TYPE_INT, CONF_RANGE, -127, 127,NULL}, // {"value4", &plop[3], CONF_TYPE_INT, CONF_RANGE, -127, 127,NULL}, // {"value5", &plop[4], CONF_TYPE_INT, CONF_RANGE, -127, 127,NULL}, // {NULL, NULL, 0, 0, 0, 0, NULL} // }; // // memset(plop, 0, sizeof(plop)); // module_read_config(NULL, "test", "test", conf); // module_print_config("print test: ", conf); // } // // // As you see, the only difference is in the way we define the array // (contains sections) and the missing first argument in module_read_config // replaced by a NULL pointer. // // So here are the new rules: // - a section name is passed in argument, and a CONF_TYPE_SECTION // element is detected in the config array, the function will declare the // array as being inconsistent. This is simply not allowed. // - a NULL pointer is passed as the section name pointer, and no // CONF_TYPE_SECTION element is found as the config[0] element, same // behavior as before, this is simply inconstsent and is not allowed. // // So allowed cases are: // - a section name a config array w/o CONF_TYPE_SECTION elemnts. // - no section name and array with at least a module_print_config element // (the first one). // // My changes are backward compatible. But i would like some more testing // from people that use the ffmpeg module. // // For curious people, the output of the above program is: // [test] Reading configuration from './test.cfg' // [test] Reading config section 'section1' from './test.cfg' // [test] Reading config section 'section2' from './test.cfg' // print test: // print test: Damn i'm good // print test: ---------------------------------------- // print test: value1 = 5 // print test: value2 = 3 // print test: // print test: Damn i'm really too good // print test: ---------------------------------------- // print test: value3 = 8 // print test: value4 = 9 // print test: value5 = -2 // int module_read_config(char *section, char *prefix, char *conffile, struct config *conf) { CF_ROOT_TYPE *p_root; CF_SECTION_TYPE *p_section; struct stat statfile; char buffer[1024]; char *module = conffile; /* Search for the config file called module.cfg */ if (stat(conffile, &statfile) == 0) { strcpy(buffer, conffile); } //fprintf(stderr, "[%s] Reading configuration from '%s'\n", prefix, buffer); /* Avoid reading non regular files (pipes and so on) */ if (!S_ISREG(statfile.st_mode)) { // fprintf(stderr, "[%s] '%s' is not a regular file\n", prefix, buffer); return 0; } /* Read the file and build the config tree */ p_root = cf_read(buffer); if (p_root == NULL) { /* * fprintf(stderr, "[%s] Error reading configuration file '%s'. Falling back " "to hardcoded defaults.\n", prefix, buffer); */ return 0; } /* We can receive multi section configs, in this case section is NULL and the * first element of the config array MUST be a CONF_TYPE_SECTION element */ if (section == NULL) { if (conf->type != CONF_TYPE_SECTION) { fprintf(stderr, "[%s] The config array is inconsistent -- fill a bug " "report to the maintainer of the '%s' module or " "\n", prefix, module); return 0; } /* The section name is in the config array */ section = conf->name; /* Increment the config pointer */ conf++; } else { struct config *c = conf; /* Make sure the config array does not have CONF_TYPE_SECTION elements */ while(c->name!=NULL) { if (c->type == CONF_TYPE_SECTION) { fprintf(stderr, "[%s] The config array is inconsistent -- fill a bug " "report to the maintainer of the '%s' module or " "\n", prefix, module); return 0; } c++; } } /* Loop until the end of the config array */ while (conf->name != NULL) { /* Fetch the first section node */ p_section = cf_get_section(p_root); /* Find the node that matches the requested section name */ while (p_section != NULL && strcmp(p_section->name, section)) p_section = cf_get_next_section(p_root, p_section); if (p_section == NULL) { fprintf(stderr, "[%s] Config section '%s' not found in '%s'\n", prefix, section, buffer); } else { /* fprintf(stderr, "[%s] Reading config section '%s' from '%s'\n", prefix, section, buffer); */ module_read_values(p_root, p_section, prefix, conf); } /* Find the next CONF_TYPE_SECTION element or the end of the array */ while (conf->type != CONF_TYPE_SECTION && conf->name != NULL) conf++; /* We found a new CONF_TYPE_SECTION -- setup the section name for the next * loop */ if (conf->type == CONF_TYPE_SECTION) { section = conf->name; conf++; } } CF_FREE_ROOT(p_root); return 1; } int module_read_values(CF_ROOT_TYPE *p_root, CF_SECTION_TYPE *p_section, char *prefix, struct config *conf) { CF_KEYVALUE_TYPE *kv; struct config *cur_config; char *value, *error; int i; float f; cur_config = conf; /* Loop until the end of the section or the last NULL element */ while (cur_config->name != NULL && cur_config->type != CONF_TYPE_SECTION) { value = cf_get_named_section_value_of_key(p_root, p_section->name, cur_config->name); if (value != NULL) { errno = 0; switch (cur_config->type) { case CONF_TYPE_INT: i = strtol(value, &error, 10); if ((errno != 0) || (i == LONG_MIN) || (i == LONG_MAX) || ((error != NULL) && (*error != 0))) fprintf(stderr, "[%s] Option '%s' must be an integer.\n", prefix, cur_config->name); else if ((cur_config->flags & CONF_MIN) && (i < cur_config->min)) fprintf(stderr, "[%s] Option '%s' has a value that is too low " "(%d < %d).\n", prefix, cur_config->name, i, (int)cur_config->min); else if ((cur_config->flags & CONF_MAX) && (i > cur_config->max)) fprintf(stderr, "[%s] Option '%s' has a value that is too high " "(%d > %d).\n", prefix, cur_config->name, i, (int)cur_config->max); else *((int *)cur_config->p) = i; break; case CONF_TYPE_FLAG: i = atoi(value); if (errno != 0) fprintf(stderr, "[%s] Option '%s' is a flag. The only values " "allowed for it are '0' and '1'.\n", prefix, cur_config->name); else if ((i != 1) && (i != 0)) fprintf(stderr, "[%s] Option '%s' is a flag. The only values " "allowed for it are '0' and '1'.\n", prefix, cur_config->name); else *((int *)cur_config->p) = (i?(int)cur_config->max:0); break; case CONF_TYPE_FLOAT: f = strtod(value, NULL); if (errno != 0) fprintf(stderr, "[%s] Option '%s' must be a float.\n", prefix, cur_config->name); else if ((cur_config->flags & CONF_MIN) && (f < cur_config->min)) fprintf(stderr, "[%s] Option '%s' has a value that is too low " "(%f < %f).\n", prefix, cur_config->name, f, cur_config->min); else if ((cur_config->flags & CONF_MAX) && (f > cur_config->max)) fprintf(stderr, "[%s] Option '%s' has a value that is too high " "(%f > %f).\n", prefix, cur_config->name, f, cur_config->max); else *((float *)cur_config->p) = f; break; case CONF_TYPE_STRING: *((char **)cur_config->p) = strdup(value); break; default: fprintf(stderr, "[%s] Unsupported config type '%d' for '%s'.\n", prefix, cur_config->type, cur_config->name); } } cur_config++; } kv = cf_get_named_section_keyvalue(p_root, p_section->name); while (kv != NULL) { cur_config = conf; i = 0; while (cur_config->name != NULL) { if (!strcmp(kv->key, cur_config->name)) { i = 1; break; } cur_config++; } if (!i) fprintf(stderr, "[%s] Key '%s' is not a valid option.\n", prefix, kv->key); kv = cf_get_named_section_next_keyvalue(p_root, p_section->name, kv); } return 0; } int module_print_config_core(char *file, struct config *conf) { struct config *cur_config; char *s; FILE *f = NULL; if (!strcmp(file, "stderr")) f = stderr; else f = fopen(file, "w"); if (!f) { //fprintf(stderr, "Can't open \"%s\"\n", file); return 0; } fprintf(f, "##############################################\n"); fprintf(f, "# #\n"); fprintf(f, "# Configuration file for XviD 1.0.0 (API-4) #\n"); fprintf(f, "# #\n"); fprintf(f, "# Generated by xvid4conf v%s #\n", VERSION); fprintf(f, "# #\n"); fprintf(f, "##############################################\n\n"); cur_config = conf; while (cur_config->name != NULL) { switch (cur_config->type) { case CONF_TYPE_INT: fprintf(f, "%s = %d\n", cur_config->name, *((int *)cur_config->p)); break; case CONF_TYPE_FLAG: fprintf(f, "%s = %d\n", cur_config->name, *((int *)cur_config->p) ? 1 : 0); break; case CONF_TYPE_FLOAT: fprintf(f, "%s = %f\n", cur_config->name, *((float *)cur_config->p)); break; case CONF_TYPE_STRING: s = *((char **)cur_config->p); fprintf(f, "%s%s = %s\n", s == NULL ? "#" : (*s == 0 ? "#" : ""), cur_config->name, s == NULL ? "" : s); break; case CONF_TYPE_SECTION: s = cur_config->p; if (s) fprintf(f, "\n\n#\n# %s\n#\n\n", s); else (fprintf(f, "\n")); fprintf(f, "[%s]\n", cur_config->name); break; default: fprintf(f, "#%s = \n", cur_config->name); } cur_config++; } if (strcmp(file, "stderr") != 0) fclose(f); return 1; } int module_print_config(char *prefix, struct config *conf) { struct config *cur_config; char *s; cur_config = conf; while (cur_config->name != NULL) { switch (cur_config->type) { case CONF_TYPE_INT: fprintf(stderr, "%s%s = %d\n", prefix, cur_config->name, *((int *)cur_config->p)); break; case CONF_TYPE_FLAG: fprintf(stderr, "%s%s = %d\n", prefix, cur_config->name, *((int *)cur_config->p) ? 1 : 0); break; case CONF_TYPE_FLOAT: fprintf(stderr, "%s%s = %f\n", prefix, cur_config->name, *((float *)cur_config->p)); break; case CONF_TYPE_STRING: s = *((char **)cur_config->p); fprintf(stderr, "%s%s%s = %s\n", prefix, s == NULL ? "#" : (*s == 0 ? "#" : ""), cur_config->name, s == NULL ? "" : s); break; case CONF_TYPE_SECTION: s = cur_config->p; fprintf(stderr, "%s\n%s%s\n%s----------------------------------------\n", prefix, prefix, s == NULL ? cur_config->name : (s[0] == '\0' ? cur_config->name : s), prefix); break; default: fprintf(stderr, "%s#%s = \n", prefix, cur_config->name); } cur_config++; } return 0; } xvid4conf-1.12/src/configs.h0000644000175400017540000002055707721646452011450 /* * configs.h * a more generic approach to config files. * Copyright 12/10/01 Chris C. Hoover */ #ifndef _CONFIGFILES_H_ #define _CONFIGFILES_H_ //#define DEBUG #define MALLOC(a) malloc(a) #define FREE(a) free(a) /* * configfiles have the following format. * only the first 256 characters of the line are significant. * * # comment lines are ignored. * [section name] # this is a comment at the end of the line. * key=value~type # sections can have * key=value~type # key value pairs. * value~type # key value pairs without '=' are just * # values and are legal. * * (subsection name) # sections can also have subsections. * key=value~type # subsections can only have key value pairs. * key=value # type is optional and can be CHR or INT. * # type defaults to CHR. * (subsection name) * key=value * key=value~type * * # whitespace ('\t',' ',^'\n') is ignored. * [section name] * key=value~type * * (subsection name) * key=value~type */ #define CF_BUFSIZE 256 /* * these defines are for convenience only * since all these struct names look so * much alike. */ #define CF_ROOT_TYPE cfr_t #define CF_SECTION_TYPE cfs_t #define CF_SUBSECTION_TYPE cfu_t #define CF_KEYVALUE_TYPE cfk_t #define CF_VALUE_TYPE cf_t #define CF_COMMENT_TYPE cfc_t #define CF_NEW_ROOT new_cfr #define CF_FREE_ROOT free_cfr #define CF_PRINT_ROOT fprint_cfr #define CF_NEW_SECTION new_cfs #define CF_FREE_SECTION free_cfs #define CF_ADD_SECTION add_cfs #define CF_REM_SECTION rem_cfs #define CF_PRINT_SECTION fprint_cfs #define CF_NEW_SUBSECTION new_cfu #define CF_FREE_SUBSECTION free_cfu #define CF_ADD_SUBSECTION add_cfu #define CF_REM_SUBSECTION rem_cfu #define CF_PRINT_SUBSECTION fprint_cfu #define CF_NEW_KEYVALUE new_cfk #define CF_FREE_KEYVALUE free_cfk #define CF_ADDSEC_KEYVALUE adds_cfk #define CF_ADDSUB_KEYVALUE addu_cfk #define CF_ADDKV_KEYVALUE addk_cfk #define CF_REMSEC_KEYVALUE rems_cfk #define CF_REMSUB_KEYVALUE remu_cfk #define CF_PRINT_KEYVALUE fprint_cfk #define CF_NEW_COMMENT new_cfc #define CF_FREE_COMMENT free_cfc #define CF_ADDROOT_COMMENT addr_cfc #define CF_ADDSEC_COMMENT adds_cfc #define CF_ADDSUB_COMMENT addu_cfc #define CF_ADDKV_COMMENT addk_cfc #define CF_REMROOT_COMMENT remr_cfc #define CF_REMSEC_COMMENT rems_cfc #define CF_REMSUB_COMMENT remu_cfc #define CF_PRINT_COMMENT fprint_cfc #define CF_STATE_TYPE cft_t //#define CF_VALUE_TYPE cfv_t /* * api lighteners. */ #define CF_NGETS cf_get_named_section #define CF_NGETSK cf_get_named_section_key #define CF_NGETSV cf_get_named_section_value #define CF_NGETSKV cf_get_named_section_keyvalue #define CF_NGETSNKV cf_get_named_section_next_keyvalue #define CF_NGETSVOK cf_get_named_section_value_of_key #define CF_NPUTSVOK cf_put_named_section_value_of_key /* * the states enum. */ enum cf_state { CF_EMPTY, CF_ROOT, CF_SECTION, CF_SUBSECTION, CF_KEYVALUE, CF_COMMENT }; typedef enum cf_state cft_t; /* * the types enum. */ enum cf_type { CF_NONE, CF_CHR, CF_INT }; typedef enum cf_type cf_t; /* * the comment type. */ struct cf_comment { char * comment; struct cf_comment * next; }; typedef struct cf_comment cfc_t; /* * the keyvalue type. */ struct cf_keyvaluepair { char * key; char * value; cf_t vtype; cfc_t * comment; struct cf_keyvaluepair * next; }; typedef struct cf_keyvaluepair cfk_t; /* * the subsection type. */ struct cf_subsection { char * name; cfk_t * keyvalue; cfc_t * comment; struct cf_subsection * next; }; typedef struct cf_subsection cfu_t; /* * the section type. */ struct cf_section { char * name; cfk_t * keyvalue; cfu_t * subsection; cfc_t * comment; struct cf_section * next; }; typedef struct cf_section cfs_t; /* * the root type. */ struct cf_root { char * name; cfs_t * section; cfc_t * comment; }; typedef struct cf_root cfr_t; /* * the value_type type. */ /* union cf_value { char * val_chr; int val_int; }; typedef union cf_value cfv_t; */ /* * the top top level api ;) * merged in from export_ffmpeg */ #define CONF_TYPE_FLAG 0 #define CONF_TYPE_INT 1 #define CONF_TYPE_FLOAT 2 #define CONF_TYPE_STRING 3 #define CONF_TYPE_SECTION 4 #define CONF_MIN (1<<0) #define CONF_MAX (1<<1) #define CONF_RANGE (CONF_MIN|CONF_MAX) struct config { char *name; void *p; unsigned int type, flags; float min, max; void *dummy; }; int module_read_config(char *section, char *prefix, char *module, struct config *conf); int module_read_values(CF_ROOT_TYPE *p_root, CF_SECTION_TYPE *p_section, char *prefix, struct config *conf); int module_print_config(char *prefix, struct config *conf); int module_print_config_core(char *file, struct config *conf); /* * fill the config structure in this way: struct config module_conf[] = { {"vcodec", &lavc_param_vcodec, CONF_TYPE_STRING, 0, 0, 0, NULL}, {"vbitrate", &lavc_param_vbitrate, CONF_TYPE_INT, CONF_RANGE, 4, 24000000, NULL}, {NULL, NULL, 0, 0, 0, 0, NULL} }; */ /* * the top level api. */ cfr_t * cf_read( char * filename ); int cf_write( cfr_t * pRoot, char * filename ); cfs_t * cf_get_section( cfr_t * pRoot ); cfs_t * cf_get_next_section( cfr_t * pRoot, cfs_t * pSection ); /* * the user has intimate knowledge of the section, subsection * and key names in the config file so all the following * functions rely on that knowledge. */ cfs_t * cf_get_named_section( cfr_t * pRoot, char * pName ); char * cf_get_named_section_key( cfr_t * pRoot, char * pName ); char * cf_get_named_section_value( cfr_t * pRoot, char * pName ); cfk_t * cf_get_named_section_keyvalue( cfr_t * pRoot, char * pName ); cfk_t * cf_get_named_section_next_keyvalue( cfr_t * pRoot, char * pName, cfk_t * pKeyvalue ); char * cf_get_named_section_value_of_key( CF_ROOT_TYPE * pRoot, char * pName, char * pKey ); cfu_t * cf_get_named_subsection( cfr_t * pRoot, char * pName ); cfk_t * cf_get_named_subsection_keyvalue( cfr_t * pRoot, char * pName ); cfk_t * cf_get_named_subsection_next_keyvalue( cfr_t * pRoot, char * pName, cfk_t * pKeyvalue ); int cf_put_named_section_value_of_key( cfr_t * pRoot, char * pName, char * pKey, char * pVal, cf_t vtype, char * pComment ); /* * the root creation, destruction and maintenance functions. */ cfr_t * new_cfr( char * name, cfs_t * pSection, cfc_t * pComment ); void free_cfr( cfr_t * pCfr ); int fprint_cfr( FILE * fp, cfr_t * pRoot ); /* * the section creation, destruction and maintenance functions. */ cfs_t * new_cfs( char * name, cfk_t * pKeyvalue, cfu_t * pSsection, char * pComment ); void free_cfs( cfs_t * pCfs ); int add_cfs( cfs_t * from, cfr_t * to ); int rem_cfs( cfs_t * rem, cfr_t * from ); int fprint_cfs( FILE * fp, cfs_t * pSection ); /* * the subsection creation, destruction and maintenance functions. */ cfu_t * new_cfu( char * name, cfk_t * pKeyvalue, char * pComment ); void free_cfu( cfu_t * pCfu ); int add_cfu( cfu_t * from, cfs_t * to ); int rem_cfu( cfu_t * rem, cfs_t * from ); int fprint_cfu( FILE * fp, cfu_t * pSsection ); /* * the key-value creation, destruction and maintenance functions. */ cfk_t * new_cfk( char * pKey, char * pVal, cf_t vtype, char * pComment ); void free_cfk( cfk_t * pCfk ); int adds_cfk( cfk_t * from, cfs_t * to ); int addu_cfk( cfk_t * from, cfu_t * to ); int addk_cfk( cfk_t * from, cfk_t * to ); int rems_cfk( cfk_t * rem, cfs_t * from ); int remu_cfk( cfk_t * rem, cfu_t * from ); int fprint_cfk( FILE * fp, cfk_t * pKeyvalue ); /* * the comment creation, destruction and maintenance functions. */ cfc_t * new_cfc( char * pComment ); void free_cfc( cfc_t * pCfc ); int addr_cfc( cfc_t * from, cfr_t * to ); int adds_cfc( cfc_t * from, cfs_t * to ); int addu_cfc( cfc_t * from, cfu_t * to ); int addk_cfc( cfc_t * from, cfk_t * to ); int remr_cfc( cfc_t * rem, cfr_t * from ); int rems_cfc( cfc_t * rem, cfs_t * from ); int remu_cfc( cfc_t * rem, cfu_t * from ); int fprint_cfc( FILE * fp, cfc_t * pComment ); /* * the utilities. */ FILE * cf_ropen( char * filename ); FILE * cf_wopen( char * filename ); char * cf_readline( FILE * fp ); char * cf_split( char * pString, char ** pKeyP, char ** pValP, cf_t * pType, char ** pCmtP ); char * cf_isolate( cft_t state, char * pString, char ** pCmtP ); char * cf_skip_frontwhite( char * pWhite ); char * cf_skip_backwhite( char * pWhite ); int cf_zap_newline( char * pString ); char * cf_sntoupper( char * pString, int num ); /* * _CONFIGFILES_H_ */ #endif xvid4conf-1.12/src/callbacks.c0000644000175400017540000003345407756433136011733 #ifdef HAVE_CONFIG_H # include #endif #include #include "callbacks.h" #include "interface.h" #include "support.h" #include #include #include #include #include "main.h" void on_load_settings_ok_but_clicked (GtkButton *button, gpointer user_data) { GtkEntry *text = GTK_ENTRY(lookup_widget (GTK_WIDGET (window1), "load_file_name_text")); gtk_entry_set_text(text, gtk_file_selection_get_filename (GTK_FILE_SELECTION (load_settings_dlg))); // closes the file selection dialog gtk_widget_destroy(load_settings_dlg); } void on_load_settings_filesel_but_clicked (GtkButton *button, gpointer user_data) { GtkEntry *text; load_settings_dlg = create_load_settings_dlg(); text = GTK_ENTRY(lookup_widget(GTK_WIDGET(window1), "load_file_name_text")); gtk_file_selection_set_filename(GTK_FILE_SELECTION(load_settings_dlg), gtk_entry_get_text(text)); gtk_widget_show(load_settings_dlg); } void on_save_settings_filesel_but_clicked (GtkButton *button, gpointer user_data) { GtkEntry *text; save_settings_dlg = create_save_settings_dlg(); text = GTK_ENTRY(lookup_widget(GTK_WIDGET(window1), "save_file_name_text")); gtk_file_selection_set_filename(GTK_FILE_SELECTION(save_settings_dlg), gtk_entry_get_text(text)); gtk_widget_show(save_settings_dlg); } void on_load_settings_clicked (GtkButton *button, gpointer user_data) { int ret=0; const char *s; GtkEntry *text = GTK_ENTRY(lookup_widget (GTK_WIDGET (window1), "load_file_name_text")); char *b; s = gtk_entry_get_text(text); b = malloc (strlen(s)+strlen(getenv("HOME"))+2); if (s && *s) { if (s[0] == '~') { sprintf(b, "%s%s", getenv("HOME"), s+1); ret = read_config_file(&xcfg, b, 1); } else { ret = read_config_file(&xcfg, (char *)s, 1); } } if (!ret) { GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(window1), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Cannot read config from '%s': %s", s, "Syntax error"); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } else { xvidcfg2window(); } free(b); } void on_save_settings_clicked (GtkButton *button, gpointer user_data) { int ret; GtkEntry *text = GTK_ENTRY(lookup_widget (GTK_WIDGET (window1), "save_file_name_text")); char *b; const char *s = gtk_entry_get_text(text); b = malloc (strlen(s)+strlen(getenv("HOME"))+2); window2xvidcfg(); if (s && *s) { if (s[0] == '~') { sprintf(b, "%s%s", getenv("HOME"), s+1); ret = read_config_file(&xcfg, b, 0); } else { ret = read_config_file(&xcfg, (char *)s, 0); } } if (!ret) { GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(window1), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Cannot save config to '%s'", s); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } } void on_restore_defaults_clicked (GtkButton *button, gpointer user_data) { memcpy (&xcfg, &xcfg_sav, sizeof xcfg ); xvidcfg2window(); } void on_save_defaults_clicked (GtkButton *button, gpointer user_data) { window2xvidcfg(); memcpy (&xcfg_sav, &xcfg, sizeof xcfg ); } void on_save_settings_dlg_ok_clicked (GtkButton *button, gpointer user_data) { GtkEntry *text = GTK_ENTRY(lookup_widget (GTK_WIDGET (window1), "save_file_name_text")); gtk_entry_set_text(text, gtk_file_selection_get_filename (GTK_FILE_SELECTION (save_settings_dlg))); // closes the file selection dialog gtk_widget_destroy(save_settings_dlg); } void on_matrix_editor_clicked (GtkButton *button, gpointer user_data) { window2 = create_matrix_edit_dlg(); gtk_widget_show (window2); } void on_save_matrix_edit_but_clicked (GtkButton *button, gpointer user_data) { int matrix[64]; int i; const char *s; FILE *f; GtkEntry *text = GTK_ENTRY(lookup_widget (GTK_WIDGET (window2), "matrix_edit_file")); s = gtk_entry_get_text(text); window2matrix(matrix); if (s && *s) { if ((f = fopen (s, "w")) == NULL) { GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(window2), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Cannot write to '%s': %s", s, g_strerror (errno)); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } else { for (i=1; i<65; i++) { fprintf (f, "%3d ", matrix[i-1]); if ((i%8) == 0) fprintf(f, "\n"); } } if (f) fclose(f); } else { GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(window2), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "You must enter a filename to save to"); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } } void on_load_matrix_edit_but_clicked (GtkButton *button, gpointer user_data) { int matrix[64]; int ret=1; const char *s; GtkEntry *text = GTK_ENTRY(lookup_widget (GTK_WIDGET (window2), "matrix_edit_file")); s = gtk_entry_get_text(text); if (s && *s) ret = read_matrix(matrix, s); if (ret == 1) { GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(window2), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Cannot read '%s': %s", s, "No such file"); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } else if (ret == 2) { GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(window2), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Error while reading matrix file '%s': Syntax error", s); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } else matrix2window(matrix); } void on_matrix_edit_ok_but_clicked (GtkButton *button, gpointer user_data) { GtkEntry *text = GTK_ENTRY(lookup_widget (GTK_WIDGET (window2), "matrix_edit_file")); gtk_entry_set_text(text, gtk_file_selection_get_filename (GTK_FILE_SELECTION (matrix_edit_filsel_dlg))); // closes the file selection dialog gtk_widget_destroy(matrix_edit_filsel_dlg); } void on_open_matrix_file_dlg_clicked (GtkButton *button, gpointer user_data) { const char *s; GtkEntry *text = GTK_ENTRY(lookup_widget (GTK_WIDGET (window2), "matrix_edit_file")); s = gtk_entry_get_text(text); matrix_edit_filsel_dlg = create_matrix_edit_filsel_dlg(); if (s && *s) gtk_file_selection_set_filename(GTK_FILE_SELECTION(matrix_edit_filsel_dlg), gtk_entry_get_text(text)); gtk_widget_show(matrix_edit_filsel_dlg); } void on_clear_matrix_but_clicked (GtkButton *button, gpointer user_data) { GtkWidget *c; char field[128]; int i, j, x; x = 0; for (j = 0; j<8; j++) { for (i = 0; i<8; i++) { sprintf(field, "a%d%d", i, j); c = lookup_widget(GTK_WIDGET(window2), field); gtk_entry_set_text(GTK_ENTRY(c), ""); } } } void on_load_intra_matrix_file_but_clicked (GtkButton *button, gpointer user_data) { GtkEntry *text; const char *s; quant_intra_matrix_dlg = create_quant_intra_matrix_dlg(); text = GTK_ENTRY(lookup_widget (GTK_WIDGET (window1), "quant_intra_matrix")); s = gtk_entry_get_text(text); if (s && *s) { gtk_file_selection_set_filename(GTK_FILE_SELECTION(quant_intra_matrix_dlg), gtk_entry_get_text(text)); } gtk_widget_show(quant_intra_matrix_dlg); } void on_load_inter_matrix_file_but_clicked (GtkButton *button, gpointer user_data) { GtkEntry *text; const char *s; quant_inter_matrix_dlg = create_quant_inter_matrix_dlg(); text = GTK_ENTRY(lookup_widget (GTK_WIDGET (window1), "quant_inter_matrix")); s = gtk_entry_get_text(text); if (s && *s) { gtk_file_selection_set_filename(GTK_FILE_SELECTION(quant_inter_matrix_dlg), gtk_entry_get_text(text)); } gtk_widget_show(quant_inter_matrix_dlg); } void on_quant_intra_matrix_ok_clicked (GtkButton *button, gpointer user_data) { GtkEntry *text = GTK_ENTRY(lookup_widget (GTK_WIDGET (window1), "quant_intra_matrix")); gtk_entry_set_text(text, gtk_file_selection_get_filename (GTK_FILE_SELECTION (quant_intra_matrix_dlg))); gtk_widget_destroy(quant_intra_matrix_dlg); } void on_quant_inter_matrix_ok_clicked (GtkButton *button, gpointer user_data) { GtkEntry *text = GTK_ENTRY(lookup_widget (GTK_WIDGET (window1), "quant_inter_matrix")); gtk_entry_set_text(text, gtk_file_selection_get_filename (GTK_FILE_SELECTION (quant_inter_matrix_dlg))); gtk_widget_destroy(quant_inter_matrix_dlg); } void on_max_bframes_value_changed (GtkSpinButton *spinbutton, gpointer user_data) { static int is_enabled = 0; GtkWidget *c; int val; c = lookup_widget(GTK_WIDGET(window1), "max_bframes"); val = gtk_spin_button_get_value_as_int(GTK_SPIN_BUTTON(c)); if (val>0 && !is_enabled) { is_enabled = 1; c = lookup_widget(GTK_WIDGET(window1), "bquant_ratio_label"); gtk_widget_set_sensitive (c, TRUE); c = lookup_widget(GTK_WIDGET(window1), "bquant_offset_label"); gtk_widget_set_sensitive (c, TRUE); c = lookup_widget(GTK_WIDGET(window1), "bframe_threshold_label"); gtk_widget_set_sensitive (c, TRUE); c = lookup_widget(GTK_WIDGET(window1), "bquant_ratio"); gtk_widget_set_sensitive (c, TRUE); c = lookup_widget(GTK_WIDGET(window1), "bquant_offset"); gtk_widget_set_sensitive (c, TRUE); c = lookup_widget(GTK_WIDGET(window1), "bframe_threshold"); gtk_widget_set_sensitive (c, TRUE); c = lookup_widget(GTK_WIDGET(window1), "closed_gop"); gtk_widget_set_sensitive (c, TRUE); c = lookup_widget(GTK_WIDGET(window1), "packed"); gtk_widget_set_sensitive (c, TRUE); c = lookup_widget(GTK_WIDGET(window1), "bquant_min_max_label"); gtk_widget_set_sensitive (c, TRUE); c = lookup_widget(GTK_WIDGET(window1), "min_bquant"); gtk_widget_set_sensitive (c, TRUE); c = lookup_widget(GTK_WIDGET(window1), "max_bquant"); gtk_widget_set_sensitive (c, TRUE); /* c = lookup_widget(GTK_WIDGET(window1), "quarterpel"); gtk_widget_set_sensitive (c, TRUE); c = lookup_widget(GTK_WIDGET(window1), "gmc"); gtk_widget_set_sensitive (c, TRUE); */ } else if (val == 0) { is_enabled = 0; c = lookup_widget(GTK_WIDGET(window1), "bquant_ratio_label"); gtk_widget_set_sensitive (c, FALSE); c = lookup_widget(GTK_WIDGET(window1), "bquant_offset_label"); gtk_widget_set_sensitive (c, FALSE); c = lookup_widget(GTK_WIDGET(window1), "bframe_threshold_label"); gtk_widget_set_sensitive (c, FALSE); c = lookup_widget(GTK_WIDGET(window1), "bquant_ratio"); gtk_widget_set_sensitive (c, FALSE); c = lookup_widget(GTK_WIDGET(window1), "bquant_offset"); gtk_widget_set_sensitive (c, FALSE); c = lookup_widget(GTK_WIDGET(window1), "bframe_threshold"); gtk_widget_set_sensitive (c, FALSE); c = lookup_widget(GTK_WIDGET(window1), "packed"); gtk_widget_set_sensitive (c, FALSE); c = lookup_widget(GTK_WIDGET(window1), "closed_gop"); gtk_widget_set_sensitive (c, FALSE); c = lookup_widget(GTK_WIDGET(window1), "bquant_min_max_label"); gtk_widget_set_sensitive (c, FALSE); c = lookup_widget(GTK_WIDGET(window1), "min_bquant"); gtk_widget_set_sensitive (c, FALSE); c = lookup_widget(GTK_WIDGET(window1), "max_bquant"); gtk_widget_set_sensitive (c, FALSE); /* c = lookup_widget(GTK_WIDGET(window1), "quarterpel"); gtk_widget_set_sensitive (c, FALSE); c = lookup_widget(GTK_WIDGET(window1), "gmc"); gtk_widget_set_sensitive (c, FALSE); */ } } gboolean on_window1_delete_event (GtkWidget *widget, GdkEvent *event, gpointer user_data) { if (ofile) { int ret; GtkEntry *text = GTK_ENTRY(lookup_widget (GTK_WIDGET (window1), "save_file_name_text")); const char *s = gtk_entry_get_text(text); window2xvidcfg(); //read_config_file(&xcfg, NULL, 0); ret = read_config_file(&xcfg, (char *)s, 0); if (!ret) { GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(window1), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Cannot save config to '%s'", s); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } } gtk_main_quit(); return FALSE; } void on_quit_delete_event (GtkButton *button, gpointer user_data) { if (ofile) { int ret; GtkEntry *text = GTK_ENTRY(lookup_widget (GTK_WIDGET (window1), "save_file_name_text")); const char *s = gtk_entry_get_text(text); window2xvidcfg(); //read_config_file(&xcfg, NULL, 0); ret = read_config_file(&xcfg, (char *)s, 0); if (!ret) { GtkWidget *dialog = gtk_message_dialog_new(GTK_WINDOW(window1), GTK_DIALOG_DESTROY_WITH_PARENT, GTK_MESSAGE_ERROR, GTK_BUTTONS_CLOSE, "Cannot save config to '%s'", s); gtk_dialog_run (GTK_DIALOG (dialog)); gtk_widget_destroy (dialog); } } gtk_main_quit(); } xvid4conf-1.12/src/callbacks.h0000644000175400017540000000722507721770225011730 #include void on_load_settings_ok_but_clicked (GtkButton *button, gpointer user_data); void on_close_matrix_edit_but_clicked (GtkButton *button, gpointer user_data); void on_load_settings_filesel_but_clicked (GtkButton *button, gpointer user_data); void on_save_settings_filesel_but_clicked (GtkButton *button, gpointer user_data); void on_load_settings_clicked (GtkButton *button, gpointer user_data); void on_save_settings_clicked (GtkButton *button, gpointer user_data); void on_restore_defaults_clicked (GtkButton *button, gpointer user_data); void on_save_defaults_clicked (GtkButton *button, gpointer user_data); void on_save_settings_dlg_ok_clicked (GtkButton *button, gpointer user_data); void on_load_intra_matrix_file_but_clicked (GtkButton *button, gpointer user_data); void on_load_inter_matrix_file_but_clicked (GtkButton *button, gpointer user_data); void on_matrix_editor_clicked (GtkButton *button, gpointer user_data); void on_load_intra_matrix_file_but_clicked (GtkButton *button, gpointer user_data); void on_load_inter_matrix_file_but_clicked (GtkButton *button, gpointer user_data); void on_matrix_editor_clicked (GtkButton *button, gpointer user_data); void on_save_matrix_edit_but_clicked (GtkButton *button, gpointer user_data); void on_load_matrix_edit_but_clicked (GtkButton *button, gpointer user_data); void on_matrix_edit_ok_but_clicked (GtkButton *button, gpointer user_data); void on_matrix_edit_cancel_but_clicked (GtkButton *button, gpointer user_data); void on_open_matrix_file_dlg_clicked (GtkButton *button, gpointer user_data); void on_clear_matrix_but_clicked (GtkButton *button, gpointer user_data); void on_quant_intra_matrix_ok_clicked (GtkButton *button, gpointer user_data); void on_quant_inter_matrix_ok_clicked (GtkButton *button, gpointer user_data); void on_max_bframes_value_changed (GtkSpinButton *spinbutton, gpointer user_data); gboolean on_window1_delete_event (GtkWidget *widget, GdkEvent *event, gpointer user_data); void on_quit_delete_event (GtkButton *button, gpointer user_data); xvid4conf-1.12/src/xvid4.h0000644000175400017540000007467010004224112011030 /***************************************************************************** * * XVID MPEG-4 VIDEO CODEC * - XviD Main header file - * * Copyright(C) 2001-2003 Peter Ross * * This program is free software ; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation ; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY ; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program ; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * $Id: xvid4.h,v 1.4 2004/01/03 16:51:45 tibit Exp $ * ****************************************************************************/ #ifndef _XVID_H_ #define _XVID_H_ #ifdef __cplusplus extern "C" { #endif /***************************************************************************** * versioning ****************************************************************************/ /* versioning version takes the form "$major.$minor.$patch" $patch is incremented when there is no api change $minor is incremented when the api is changed, but remains backwards compatible $major is incremented when the api is changed significantly when initialising an xvid structure, you must always zero it, and set the version field. memset(&struct,0,sizeof(struct)); struct.version = XVID_VERSION; XVID_UNSTABLE is defined only during development. */ #define XVID_MAKE_VERSION(a,b,c) ((((a)&0xff)<<16) | (((b)&0xff)<<8) | ((c)&0xff)) #define XVID_VERSION_MAJOR(a) ((char)(((a)>>16) & 0xff)) #define XVID_VERSION_MINOR(a) ((char)(((a)>> 8) & 0xff)) #define XVID_VERSION_PATCH(a) ((char)(((a)>> 0) & 0xff)) #define XVID_MAKE_API(a,b) ((((a)&0xff)<<16) | (((b)&0xff)<<0)) #define XVID_API_MAJOR(a) (((a)>>16) & 0xff) #define XVID_API_MINOR(a) (((a)>> 0) & 0xff) #define XVID_VERSION XVID_MAKE_VERSION(1,0,-126) #define XVID_API XVID_MAKE_API(4, 0) #define XVID_UNSTABLE /* Bitstream Version * this will be writen into the bitstream to allow easy detection of xvid * encoder bugs in the decoder, without this it might not possible to * automatically distinquish between a file which has been encoded with an * old & buggy XVID from a file which has been encoded with a bugfree version * see the infamous interlacing bug ... * * this MUST be increased if an encoder bug is fixed, increasing it too often * doesnt hurt but not increasing it could cause difficulty for decoders in the * future */ #define XVID_BS_VERSION "0025" /***************************************************************************** * error codes ****************************************************************************/ /* all functions return values <0 indicate error */ #define XVID_ERR_FAIL -1 /* general fault */ #define XVID_ERR_MEMORY -2 /* memory allocation error */ #define XVID_ERR_FORMAT -3 /* file format error */ #define XVID_ERR_VERSION -4 /* structure version not supported */ #define XVID_ERR_END -5 /* encoder only; end of stream reached */ /***************************************************************************** * xvid_image_t ****************************************************************************/ /* colorspace values */ #define XVID_CSP_USER (1<< 0) /* 4:2:0 planar (==I420, except for pointers/strides) */ #define XVID_CSP_I420 (1<< 1) /* 4:2:0 planar */ #define XVID_CSP_YV12 (1<< 2) /* 4:2:0 planar */ #define XVID_CSP_YUY2 (1<< 3) /* 4:2:2 packed */ #define XVID_CSP_UYVY (1<< 4) /* 4:2:2 packed */ #define XVID_CSP_YVYU (1<< 5) /* 4:2:2 packed */ #define XVID_CSP_BGRA (1<< 6) /* 32-bit bgra packed */ #define XVID_CSP_ABGR (1<< 7) /* 32-bit abgr packed */ #define XVID_CSP_RGBA (1<< 8) /* 32-bit rgba packed */ #define XVID_CSP_ARGB (1<<15) /* 32-bit argb packed */ #define XVID_CSP_BGR (1<< 9) /* 24-bit bgr packed */ #define XVID_CSP_RGB555 (1<<10) /* 16-bit rgb555 packed */ #define XVID_CSP_RGB565 (1<<11) /* 16-bit rgb565 packed */ #define XVID_CSP_SLICE (1<<12) /* decoder only: 4:2:0 planar, per slice rendering */ #define XVID_CSP_INTERNAL (1<<13) /* decoder only: 4:2:0 planar, returns ptrs to internal buffers */ #define XVID_CSP_NULL (1<<14) /* decoder only: dont output anything */ #define XVID_CSP_VFLIP (1<<31) /* vertical flip mask */ /* xvid_image_t for non-planar colorspaces use only plane[0] and stride[0] four plane reserved for alpha*/ typedef struct { int csp; /* [in] colorspace; or with XVID_CSP_VFLIP to perform vertical flip */ void * plane[4]; /* [in] image plane ptrs */ int stride[4]; /* [in] image stride; "bytes per row"*/ } xvid_image_t; /* video-object-sequence profiles */ #define XVID_PROFILE_S_L0 0x08 /* simple */ #define XVID_PROFILE_S_L1 0x01 #define XVID_PROFILE_S_L2 0x02 #define XVID_PROFILE_S_L3 0x03 #define XVID_PROFILE_ARTS_L1 0x91 /* advanced realtime simple */ #define XVID_PROFILE_ARTS_L2 0x92 #define XVID_PROFILE_ARTS_L3 0x93 #define XVID_PROFILE_ARTS_L4 0x94 #define XVID_PROFILE_AS_L0 0xf0 /* advanced simple */ #define XVID_PROFILE_AS_L1 0xf1 #define XVID_PROFILE_AS_L2 0xf2 #define XVID_PROFILE_AS_L3 0xf3 #define XVID_PROFILE_AS_L4 0xf4 /* aspect ratios */ #define XVID_PAR_11_VGA 1 /* 1:1 vga (square), default if supplied PAR is not a valid value */ #define XVID_PAR_43_PAL 2 /* 4:3 pal (12:11 625-line) */ #define XVID_PAR_43_NTSC 3 /* 4:3 ntsc (10:11 525-line) */ #define XVID_PAR_169_PAL 4 /* 16:9 pal (16:11 625-line) */ #define XVID_PAR_169_NTSC 5 /* 16:9 ntsc (40:33 525-line) */ #define XVID_PAR_EXT 15 /* extended par; use par_width, par_height */ /* frame type flags */ #define XVID_TYPE_VOL -1 /* decoder only: vol was decoded */ #define XVID_TYPE_NOTHING 0 /* decoder only (encoder stats): nothing was decoded/encoded */ #define XVID_TYPE_AUTO 0 /* encoder: automatically determine coding type */ #define XVID_TYPE_IVOP 1 /* intra frame */ #define XVID_TYPE_PVOP 2 /* predicted frame */ #define XVID_TYPE_BVOP 3 /* bidirectionally encoded */ #define XVID_TYPE_SVOP 4 /* predicted+sprite frame */ /***************************************************************************** * xvid_global() ****************************************************************************/ /* cpu_flags definitions (make sure to sync this with cpuid.asm for ia32) */ #define XVID_CPU_FORCE (1<<31) /* force passed cpu flags */ #define XVID_CPU_ASM (1<< 7) /* native assembly */ /* ARCH_IS_IA32 */ #define XVID_CPU_MMX (1<< 0) /* mmx : pentiumMMX,k6 */ #define XVID_CPU_MMXEXT (1<< 1) /* mmx-ext : pentium2, athlon */ #define XVID_CPU_SSE (1<< 2) /* sse : pentium3, athlonXP */ #define XVID_CPU_SSE2 (1<< 3) /* sse2 : pentium4, athlon64 */ #define XVID_CPU_3DNOW (1<< 4) /* 3dnow : k6-2 */ #define XVID_CPU_3DNOWEXT (1<< 5) /* 3dnow-ext : athlon */ #define XVID_CPU_TSC (1<< 6) /* tsc : Pentium */ /* ARCH_IS_PPC */ #define XVID_CPU_ALTIVEC (1<< 0) /* altivec */ #define XVID_DEBUG_ERROR (1<< 0) #define XVID_DEBUG_STARTCODE (1<< 1) #define XVID_DEBUG_HEADER (1<< 2) #define XVID_DEBUG_TIMECODE (1<< 3) #define XVID_DEBUG_MB (1<< 4) #define XVID_DEBUG_COEFF (1<< 5) #define XVID_DEBUG_MV (1<< 6) #define XVID_DEBUG_RC (1<< 7) #define XVID_DEBUG_DEBUG (1<<31) /* XVID_GBL_INIT param1 */ typedef struct { int version; unsigned int cpu_flags; /* [in:opt] zero = autodetect cpu; XVID_CPU_FORCE|{cpu features} = force cpu features */ int debug; /* [in:opt] debug level */ } xvid_gbl_init_t; /* XVID_GBL_INFO param1 */ typedef struct { int version; int actual_version; /* [out] returns the actual xvidcore version */ const char * build; /* [out] if !null, points to description of this xvid core build */ unsigned int cpu_flags; /* [out] detected cpu features */ int num_threads; /* [out] detected number of cpus/threads */ } xvid_gbl_info_t; /* XVID_GBL_CONVERT param1 */ typedef struct { int version; xvid_image_t input; /* [in] input image & colorspace */ xvid_image_t output; /* [in] output image & colorspace */ int width; /* [in] width */ int height; /* [in] height */ int interlacing; /* [in] interlacing */ } xvid_gbl_convert_t; #define XVID_GBL_INIT 0 /* initialize xvidcore; must be called before using xvid_decore, or xvid_encore) */ #define XVID_GBL_INFO 1 /* return some info about xvidcore, and the host computer */ #define XVID_GBL_CONVERT 2 /* colorspace conversion utility */ extern int xvid_global(void *handle, int opt, void *param1, void *param2); /***************************************************************************** * xvid_decore() ****************************************************************************/ #define XVID_DEC_CREATE 0 /* create decore instance; return 0 on success */ #define XVID_DEC_DESTROY 1 /* destroy decore instance: return 0 on success */ #define XVID_DEC_DECODE 2 /* decode a frame: returns number of bytes consumed >= 0 */ extern int xvid_decore(void *handle, int opt, void *param1, void *param2); /* XVID_DEC_CREATE param 1 image width & height may be specified here when the dimensions are known in advance. */ typedef struct { int version; int width; /* [in:opt] image width */ int height; /* [in:opt] image width */ void * handle; /* [out] decore context handle */ } xvid_dec_create_t; /* XVID_DEC_DECODE param1 */ /* general flags */ #define XVID_LOWDELAY (1<<0) /* lowdelay mode */ #define XVID_DISCONTINUITY (1<<1) /* indicates break in stream */ #define XVID_DEBLOCKY (1<<2) /* perform luma deblocking */ #define XVID_DEBLOCKUV (1<<3) /* perform chroma deblocking */ #define XVID_FILMEFFECT (1<<4) /* adds film grain */ typedef struct { int version; int general; /* [in:opt] general flags */ void *bitstream; /* [in] bitstream (read from)*/ int length; /* [in] bitstream length */ xvid_image_t output; /* [in] output image (written to) */ } xvid_dec_frame_t; /* XVID_DEC_DECODE param2 :: optional */ typedef struct { int version; int type; /* [out] output data type */ union { struct { /* type>0 {XVID_TYPE_IVOP,XVID_TYPE_PVOP,XVID_TYPE_BVOP,XVID_TYPE_SVOP} */ int general; /* [out] flags */ int time_base; /* [out] time base */ int time_increment; /* [out] time increment */ /* XXX: external deblocking stuff */ int * qscale; /* [out] pointer to quantizer table */ int qscale_stride; /* [out] quantizer scale stride */ } vop; struct { /* XVID_TYPE_VOL */ int general; /* [out] flags */ int width; /* [out] width */ int height; /* [out] height */ int par; /* [out] pixel aspect ratio (refer to XVID_PAR_xxx above) */ int par_width; /* [out] aspect ratio width [1..255] */ int par_height; /* [out] aspect ratio height [1..255] */ } vol; } data; } xvid_dec_stats_t; #define XVID_ZONE_QUANT (1<<0) #define XVID_ZONE_WEIGHT (1<<1) typedef struct { int frame; int mode; int increment; int base; } xvid_enc_zone_t; /*---------------------------------------------------------------------------- * xvid_enc_stats_t structure * * Used in: * - xvid_plg_data_t structure * - optional parameter in xvid_encore() function * * .coding_type = XVID_TYPE_NOTHING if the stats are not given *--------------------------------------------------------------------------*/ typedef struct { int version; /* encoding parameters */ int type; /* [out] coding type */ int quant; /* [out] frame quantizer */ int vol_flags; /* [out] vol flags (see above) */ int vop_flags; /* [out] vop flags (see above) */ /* bitrate */ int length; /* [out] frame length */ int hlength; /* [out] header length (bytes) */ int kblks; /* [out] number of blocks compressed as Intra */ int mblks; /* [out] number of blocks compressed as Inter */ int ublks; /* [out] number of blocks marked as not_coded */ int sse_y; /* [out] Y plane's sse */ int sse_u; /* [out] U plane's sse */ int sse_v; /* [out] V plane's sse */ } xvid_enc_stats_t; /***************************************************************************** xvid plugin system -- internals xvidcore will call XVID_PLG_INFO and XVID_PLG_CREATE during XVID_ENC_CREATE before encoding each frame xvidcore will call XVID_PLG_BEFORE after encoding each frame xvidcore will call XVID_PLG_AFTER xvidcore will call XVID_PLG_DESTROY during XVID_ENC_DESTROY ****************************************************************************/ #define XVID_PLG_CREATE (1<<0) #define XVID_PLG_DESTROY (1<<1) #define XVID_PLG_INFO (1<<2) #define XVID_PLG_BEFORE (1<<3) #define XVID_PLG_FRAME (1<<4) #define XVID_PLG_AFTER (1<<5) /* xvid_plg_info_t.flags */ #define XVID_REQORIGINAL (1<<0) /* plugin requires a copy of the original (uncompressed) image */ #define XVID_REQPSNR (1<<1) /* plugin requires psnr between the uncompressed and compressed image*/ #define XVID_REQDQUANTS (1<<2) /* plugin requires access to the dquant table */ typedef struct { int version; int flags; /* [in:opt] plugin flags */ } xvid_plg_info_t; typedef struct { int version; int num_zones; /* [out] */ xvid_enc_zone_t * zones; /* [out] */ int width; /* [out] */ int height; /* [out] */ int mb_width; /* [out] */ int mb_height; /* [out] */ int fincr; /* [out] */ int fbase; /* [out] */ void * param; /* [out] */ } xvid_plg_create_t; typedef struct { int version; int num_frames; /* [out] total frame encoded */ } xvid_plg_destroy_t; typedef struct { int version; xvid_enc_zone_t * zone; /* [out] current zone */ int width; /* [out] */ int height; /* [out] */ int mb_width; /* [out] */ int mb_height; /* [out] */ int fincr; /* [out] */ int fbase; /* [out] */ int min_quant[3]; /* [out] */ int max_quant[3]; /* [out] */ xvid_image_t reference; /* [out] -> [out] */ xvid_image_t current; /* [out] -> [in,out] */ xvid_image_t original; /* [out] after: points the original (uncompressed) copy of the current frame */ int frame_num; /* [out] frame number */ int type; /* [in,out] */ int quant; /* [in,out] */ int * dquant; /* [in,out] pointer to diff quantizer table */ int dquant_stride; /* [in,out] diff quantizer stride */ int vop_flags; /* [in,out] */ int vol_flags; /* [in,out] */ int motion_flags; /* [in,out] */ /* Deprecated, use the stats field instead. * Will disapear before 1.0 */ int length; /* [out] after: length of encoded frame */ int kblks; /* [out] number of blocks compressed as Intra */ int mblks; /* [out] number of blocks compressed as Inter */ int ublks; /* [out] number of blocks marked not_coded */ int sse_y; /* [out] Y plane's sse */ int sse_u; /* [out] U plane's sse */ int sse_v; /* [out] V plane's sse */ /* End of duplicated data, kept only for binary compatibility */ int bquant_ratio; /* [in] */ int bquant_offset; /* [in] */ xvid_enc_stats_t stats; /* [out] frame statistics */ } xvid_plg_data_t; /***************************************************************************** xvid plugin system -- external the application passes xvid an array of "xvid_plugin_t" at XVID_ENC_CREATE. the array indicates the plugin function pointer and plugin-specific data. xvidcore handles the rest. example: xvid_enc_create_t create; xvid_enc_plugin_t plugins[2]; plugins[0].func = xvid_psnr_func; plugins[0].param = NULL; plugins[1].func = xvid_cbr_func; plugins[1].param = &cbr_data; create.num_plugins = 2; create.plugins = plugins; ****************************************************************************/ typedef int (xvid_plugin_func)(void * handle, int opt, void * param1, void * param2); typedef struct { xvid_plugin_func * func; void * param; } xvid_enc_plugin_t; extern xvid_plugin_func xvid_plugin_single; /* single-pass rate control */ extern xvid_plugin_func xvid_plugin_2pass1; /* two-pass rate control: first pass */ extern xvid_plugin_func xvid_plugin_2pass2; /* two-pass rate control: second pass */ extern xvid_plugin_func xvid_plugin_lumimasking; /* lumimasking */ extern xvid_plugin_func xvid_plugin_psnr; /* write psnr values to stdout */ extern xvid_plugin_func xvid_plugin_dump; /* dump before and after yuvpgms */ /* single pass rate control * CBR and Constant quantizer modes */ typedef struct { int version; int bitrate; /* [in] bits per second */ int reaction_delay_factor; /* [in] */ int averaging_period; /* [in] */ int buffer; /* [in] */ } xvid_plugin_single_t; typedef struct { int version; char * filename; } xvid_plugin_2pass1_t; #define XVID_PAYBACK_BIAS 0 /* payback with bias */ #define XVID_PAYBACK_PROP 1 /* payback proportionally */ typedef struct { int version; int bitrate; /* [in] bits per second */ char * filename; /* [in] first pass stats filename */ int keyframe_boost; /* [in] keyframe boost percentage: [0..100] */ int curve_compression_high; /* [in] percentage of compression performed on the high part of the curve (above average) */ int curve_compression_low; /* [in] percentage of compression performed on the low part of the curve (below average) */ int overflow_control_strength;/* [in] Payback delay expressed in number of frames */ int max_overflow_improvement; /* [in] percentage of allowed range for a frame that gets bigger because of overflow bonus */ int max_overflow_degradation; /* [in] percentage of allowed range for a frame that gets smaller because of overflow penalty */ int kfreduction; /* [in] maximum bitrate reduction applied to an iframe under the kfthreshold distance limit */ int kfthreshold; /* [in] if an iframe is closer to the next iframe than this distance, a quantity of bits * is substracted from its bit allocation. The reduction is computed as multiples of * kfreduction/kthreshold. It reaches kfreduction when the distance == kfthreshold, * 0 for 1global field during instance * creation (operation XVID_ENC_CREATE) *--------------------------------------------------------------------------*/ #define XVID_GLOBAL_PACKED (1<<0) /* packed bitstream */ #define XVID_GLOBAL_CLOSED_GOP (1<<1) /* closed_gop: was DX50BVOP dx50 bvop compatibility */ #define XVID_GLOBAL_EXTRASTATS_ENABLE (1<<2) #if 0 #define XVID_GLOBAL_VOL_AT_IVOP (1<<3) /* write vol at every ivop: WIN32/divx compatibility */ #define XVID_GLOBAL_FORCE_VOL (1<<4) /* when vol-based parameters are changed, insert an ivop NOT recommended */ #endif /*---------------------------------------------------------------------------- * "VOL" flags * * These flags are used for xvid_enc_frame_t->vol_flags field during frame * encoding (operation XVID_ENC_ENCODE) *--------------------------------------------------------------------------*/ #define XVID_VOL_MPEGQUANT (1<<0) /* enable MPEG type quantization */ #define XVID_VOL_EXTRASTATS (1<<1) /* enable plane sse stats */ #define XVID_VOL_QUARTERPEL (1<<2) /* enable quarterpel: frames will encoded as quarterpel */ #define XVID_VOL_GMC (1<<3) /* enable GMC; frames will be checked for gmc suitability */ #define XVID_VOL_REDUCED_ENABLE (1<<4) /* enable reduced resolution vops: frames will be checked for rrv suitability */ #define XVID_VOL_INTERLACING (1<<5) /* enable interlaced encoding */ /*---------------------------------------------------------------------------- * "VOP" flags * * These flags are used for xvid_enc_frame_t->vop_flags field during frame * encoding (operation XVID_ENC_ENCODE) *--------------------------------------------------------------------------*/ /* Always valid */ #define XVID_VOP_DEBUG (1<< 0) /* print debug messages in frames */ #define XVID_VOP_HALFPEL (1<< 1) /* use halfpel interpolation */ #define XVID_VOP_INTER4V (1<< 2) /* use 4 motion vectors per MB */ #define XVID_VOP_TRELLISQUANT (1<< 3) /* use trellis based R-D "optimal" quantization */ #define XVID_VOP_CHROMAOPT (1<< 4) /* enable chroma optimization pre-filter */ #define XVID_VOP_CARTOON (1<< 5) /* use 'cartoon mode' */ #define XVID_VOP_GREYSCALE (1<< 6) /* enable greyscale only mode (even for color input material chroma is ignored) */ #define XVID_VOP_HQACPRED (1<< 7) /* high quality ac prediction */ #define XVID_VOP_MODEDECISION_RD (1<< 8) /* enable DCT-ME and use it for mode decision */ #define XVID_VOP_FAST_MODEDECISION_RD (1<<12) /* use simplified R-D mode decision */ /* Only valid for vol_flags|=XVID_VOL_INTERLACING */ #define XVID_VOP_TOPFIELDFIRST (1<< 9) /* set top-field-first flag */ #define XVID_VOP_ALTERNATESCAN (1<<10) /* set alternate vertical scan flag */ /* only valid for vol_flags|=XVID_VOL_REDUCED_ENABLED */ #define XVID_VOP_REDUCED (1<<11) /* reduced resolution vop */ /*---------------------------------------------------------------------------- * "Motion" flags * * These flags are used for xvid_enc_frame_t->motion field during frame * encoding (operation XVID_ENC_ENCODE) *--------------------------------------------------------------------------*/ /* Motion Estimation Search Patterns */ #define XVID_ME_ADVANCEDDIAMOND16 (1<< 0) /* use advdiamonds instead of diamonds as search pattern */ #define XVID_ME_ADVANCEDDIAMOND8 (1<< 1) /* use advdiamond for XVID_ME_EXTSEARCH8 */ #define XVID_ME_USESQUARES16 (1<< 2) /* use squares instead of diamonds as search pattern */ #define XVID_ME_USESQUARES8 (1<< 3) /* use square for XVID_ME_EXTSEARCH8 */ /* SAD operator based flags */ #define XVID_ME_HALFPELREFINE16 (1<< 4) #define XVID_ME_HALFPELREFINE8 (1<< 6) #define XVID_ME_QUARTERPELREFINE16 (1<< 7) #define XVID_ME_QUARTERPELREFINE8 (1<< 8) #define XVID_ME_GME_REFINE (1<< 9) #define XVID_ME_EXTSEARCH16 (1<<10) /* extend PMV by more searches */ #define XVID_ME_EXTSEARCH8 (1<<11) /* use diamond/square for extended 8x8 search */ #define XVID_ME_CHROMA_PVOP (1<<12) /* also use chroma for P_VOP/S_VOP ME */ #define XVID_ME_CHROMA_BVOP (1<<13) /* also use chroma for B_VOP ME */ #define XVID_ME_FASTREFINE16 (1<<25) /* use low-complexity refinement functions */ #define XVID_ME_FASTREFINE8 (1<<29) /* low-complexity 8x8 sub-block refinement */ /* Rate Distortion based flags * Valid when XVID_VOP_MODEDECISION_RD is enabled */ #define XVID_ME_HALFPELREFINE16_RD (1<<14) /* perform RD-based halfpel refinement */ #define XVID_ME_HALFPELREFINE8_RD (1<<15) /* perform RD-based halfpel refinement for 8x8 mode */ #define XVID_ME_QUARTERPELREFINE16_RD (1<<16) /* perform RD-based qpel refinement */ #define XVID_ME_QUARTERPELREFINE8_RD (1<<17) /* perform RD-based qpel refinement for 8x8 mode */ #define XVID_ME_EXTSEARCH_RD (1<<18) /* perform RD-based search using square pattern enable XVID_ME_EXTSEARCH8 to do this in 8x8 search as well */ #define XVID_ME_CHECKPREDICTION_RD (1<<19) /* always check vector equal to prediction */ /* Other */ #define XVID_ME_DETECT_STATIC_MOTION (1<<24) /* speed-up ME by detecting stationary scenes */ #define XVID_ME_SKIP_DELTASEARCH (1<<26) /* speed-up by skipping b-frame delta search */ #define XVID_ME_FAST_MODEINTERPOLATE (1<<27) /* speed-up by partly skipping interpolate mode */ #define XVID_ME_BFRAME_EARLYSTOP (1<<28) /* speed-up by early exiting b-search */ /* Unused */ #define XVID_ME_UNRESTRICTED16 (1<<20) /* unrestricted ME, not implemented */ #define XVID_ME_OVERLAPPING16 (1<<21) /* overlapping ME, not implemented */ #define XVID_ME_UNRESTRICTED8 (1<<22) /* unrestricted ME, not implemented */ #define XVID_ME_OVERLAPPING8 (1<<23) /* overlapping ME, not implemented */ /*---------------------------------------------------------------------------- * xvid_enc_create_t structure definition * * This structure is passed as param1 during an instance creation (operation * XVID_ENC_CREATE) *--------------------------------------------------------------------------*/ typedef struct { int version; int profile; /* [in] profile@level; refer to XVID_PROFILE_xxx */ int width; /* [in] frame dimensions; width, pixel units */ int height; /* [in] frame dimensions; height, pixel units */ int num_zones; /* [in:opt] number of bitrate zones */ xvid_enc_zone_t * zones; /* ^^ zone array */ int num_plugins; /* [in:opt] number of plugins */ xvid_enc_plugin_t * plugins; /* ^^ plugin array */ int num_threads; /* [in:opt] number of threads */ int max_bframes; /* [in:opt] max sequential bframes (0=disable bframes) */ int global; /* [in:opt] global flags; controls encoding behavior */ /* --- vol-based stuff; included here for convenience */ int fincr; /* [in:opt] framerate increment; set to zero for variable framerate */ int fbase; /* [in] framerate base frame_duration = fincr/fbase seconds*/ /* ---------------------------------------------- */ /* --- vop-based; included here for convenience */ int max_key_interval; /* [in:opt] the maximum interval between key frames */ int frame_drop_ratio; /* [in:opt] frame dropping: 0=drop none... 100=drop all */ int bquant_ratio; /* [in:opt] bframe quantizer multipier/offeset; used to decide bframes quant when bquant==-1 */ int bquant_offset; /* bquant = (avg(past_ref_quant,future_ref_quant)*bquant_ratio + bquant_offset) / 100 */ int min_quant[3]; /* [in:opt] */ int max_quant[3]; /* [in:opt] */ /* ---------------------------------------------- */ void *handle; /* [out] encoder instance handle */ } xvid_enc_create_t; /*---------------------------------------------------------------------------- * xvid_enc_frame_t structure definition * * This structure is passed as param1 during a frame encoding (operation * XVID_ENC_ENCODE) *--------------------------------------------------------------------------*/ /* out value for the frame structure->type field * unlike stats output in param2, this field is not asynchronous and tells * the client app, if the frame written into the stream buffer is an ivop * usually used for indexing purpose in the container */ #define XVID_KEYFRAME (1<<1) /* The structure */ typedef struct { int version; /* VOL related stuff * unless XVID_FORCEVOL is set, the encoder will not react to any changes * here until the next VOL (keyframe). */ int vol_flags; /* [in] vol flags */ unsigned char *quant_intra_matrix; /* [in:opt] custom intra qmatrix */ unsigned char *quant_inter_matrix; /* [in:opt] custom inter qmatrix */ int par; /* [in:opt] pixel aspect ratio (refer to XVID_PAR_xxx above) */ int par_width; /* [in:opt] aspect ratio width */ int par_height; /* [in:opt] aspect ratio height */ /* Other fields that can change on a frame base */ int fincr; /* [in:opt] framerate increment, for variable framerate only */ int vop_flags; /* [in] (general)vop-based flags */ int motion; /* [in] ME options */ xvid_image_t input; /* [in] input image (read from) */ int type; /* [in:opt] coding type */ int quant; /* [in] frame quantizer; if <=0, automatic (ratecontrol) */ int bframe_threshold; void *bitstream; /* [in:opt] bitstream ptr (written to)*/ int length; /* [in:opt] bitstream length (bytes) */ int out_flags; /* [out] bitstream output flags */ } xvid_enc_frame_t; #ifdef __cplusplus } #endif #endif /* * Please do not modify the tag line. * * arch-tag: 86e02da0-ea04-4fff-993e-011fe7ce0682 xvid header */