# HG changeset patch # User Jordi GutiƩrrez Hermoso # Date 1348150443 14400 # Node ID a42d69d5a36dc86a46d139c76351414825b30baa # Parent 8ae34ffe5c1b14f4cde7b21fb089a82404292d20# Parent cabe2fa4566ce9770a5afdf1c1103ec70ae6041f Merge in Daniel's changes diff -r 8ae34ffe5c1b -r a42d69d5a36d .hgignore --- a/.hgignore Thu Sep 20 04:08:53 2012 -0500 +++ b/.hgignore Thu Sep 20 10:14:03 2012 -0400 @@ -4,7 +4,7 @@ # project's top-level directory". # gnulib makes these silly backup files -^.*~ +.~$ # This directory gets created by gnulib during the build. # It contains no Octave files. @@ -13,7 +13,7 @@ # These directories mostly contain cruft during build time, but they # do contain some Octave code, so we gotta be a bit more careful about # what we ignore here -^libgnu/.*\.([hc]$|sin$|valgrind$|charset$) +^libgnu/.*\.([hc]$|sin$|valgrind$|charset$|mk$) ^m4/(?!ax_).+\.m4$ # Emacs tools create these diff -r 8ae34ffe5c1b -r a42d69d5a36d Makefile.am --- a/Makefile.am Thu Sep 20 04:08:53 2012 -0500 +++ b/Makefile.am Thu Sep 20 10:14:03 2012 -0400 @@ -37,8 +37,8 @@ INSTALL.OCTAVE \ NEWS \ README \ - autogen.sh \ - build-aux/bootstrap \ + bootstrap \ + build-aux/bootstrap_gnulib \ build-aux/bootstrap.conf \ build-aux/mk-opts.pl \ build-aux/mkinstalldirs \ diff -r 8ae34ffe5c1b -r a42d69d5a36d autogen.sh --- a/autogen.sh Thu Sep 20 04:08:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,53 +0,0 @@ -#! /bin/sh -# autogen.sh -# Run this to generate all the initial makefiles, etc. - -set -e - -## Use --foreign since we auto-generate the AUTHORS file and the default -## --gnu strictness level doesn't like it if the AUTHORS file is missing. - -AUTOMAKE="automake --foreign --warnings=no-portability" -export AUTOMAKE - -## Check for files that automake --gnu would normally look for, except -## AUTHORS, which we autogenerate from the documentation files along with -## building the rest of Octave, and INSTALL, which is linked from -## gnulib/doc/INSTALL by the bootstrap script. - -for f in NEWS README COPYING; do - if ! test -f $f; then - echo "required file $f is missing" 2>&1 - exit 1 - fi -done - -echo "generating source lists for liboctave/operators/module.mk..." - -(cd liboctave/operators; ./config-ops.sh) - -echo "generating doc/interpreter/images.mk..." - -(cd doc/interpreter; ./config-images.sh) - -echo "generating libinterp/dldfcn/module.mk..." - -(cd libinterp/dldfcn; ./config-module.sh) - -echo "bootstrapping..." - -build-aux/bootstrap "$@" - -## G77 is obsolete, but it is still the first option in the autoconf Fortran -## macros. We should avoid it, because mixing old versions of g77 with modern -## gcc and g++ causes trouble. The following will make it harder (but not -## impossible) for users to make this mistake. -## -## FIXME -- we should really work to fix autoconf so that it prefers gfortran -## over g77 even when searching for a Fortran 77 compiler. - -echo "replacing all occurrences of g77 with gfortran in configure script..." - -sed 's/g77/gfortran/g' configure > configure.t -mv configure.t configure -chmod 755 configure diff -r 8ae34ffe5c1b -r a42d69d5a36d bootstrap --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/bootstrap Thu Sep 20 10:14:03 2012 -0400 @@ -0,0 +1,53 @@ +#! /bin/sh +# bootstrap +# Run this to generate all the initial makefiles, etc. + +set -e + +## Use --foreign since we auto-generate the AUTHORS file and the default +## --gnu strictness level doesn't like it if the AUTHORS file is missing. + +AUTOMAKE="automake --foreign --warnings=no-portability" +export AUTOMAKE + +## Check for files that automake --gnu would normally look for, except +## AUTHORS, which we autogenerate from the documentation files along with +## building the rest of Octave, and INSTALL, which is linked from +## gnulib/doc/INSTALL by the bootstrap script. + +for f in NEWS README COPYING; do + if ! test -f $f; then + echo "required file $f is missing" 2>&1 + exit 1 + fi +done + +echo "generating source lists for liboctave/operators/module.mk..." + +(cd liboctave/operators; ./config-ops.sh) + +echo "generating doc/interpreter/images.mk..." + +(cd doc/interpreter; ./config-images.sh) + +echo "generating libinterp/dldfcn/module.mk..." + +(cd libinterp/dldfcn; ./config-module.sh) + +echo "bootstrapping..." + +build-aux/bootstrap_gnulib "$@" + +## G77 is obsolete, but it is still the first option in the autoconf Fortran +## macros. We should avoid it, because mixing old versions of g77 with modern +## gcc and g++ causes trouble. The following will make it harder (but not +## impossible) for users to make this mistake. +## +## FIXME -- we should really work to fix autoconf so that it prefers gfortran +## over g77 even when searching for a Fortran 77 compiler. + +echo "replacing all occurrences of g77 with gfortran in configure script..." + +sed 's/g77/gfortran/g' configure > configure.t +mv configure.t configure +chmod 755 configure diff -r 8ae34ffe5c1b -r a42d69d5a36d build-aux/bootstrap --- a/build-aux/bootstrap Thu Sep 20 04:08:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,976 +0,0 @@ -#! /bin/sh -# Print a version string. -scriptversion=2012-07-19.14; # UTC - -# Bootstrap this package from checked-out sources. - -# Copyright (C) 2003-2012 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 3 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, see . - -# Originally written by Paul Eggert. The canonical version of this -# script is maintained as build-aux/bootstrap in gnulib, however, to -# be useful to your project, you should place a copy of it under -# version control in the top-level directory of your project. The -# intent is that all customization can be done with a bootstrap.conf -# file also maintained in your version control; gnulib comes with a -# template build-aux/bootstrap.conf to get you started. - -# Please report bugs or propose patches to bug-gnulib@gnu.org. - -nl=' -' - -# Ensure file names are sorted consistently across platforms. -LC_ALL=C -export LC_ALL - -# Ensure that CDPATH is not set. Otherwise, the output from cd -# would cause trouble in at least one use below. -(unset CDPATH) >/dev/null 2>&1 && unset CDPATH - -local_gl_dir=gl - -me=$0 - -usage() { - cat <&2 -} - -# warn_ WORD1... -warn_ () -{ - # If IFS does not start with ' ', set it and emit the warning in a subshell. - case $IFS in - ' '*) warnf_ '%s\n' "$*";; - *) (IFS=' '; warn_ "$@");; - esac -} - -# die WORD1... -die() { warn_ "$@"; exit 1; } - -# Configuration. - -# Name of the Makefile.am -gnulib_mk=gnulib.mk - -# List of gnulib modules needed. -gnulib_modules= - -# Any gnulib files needed that are not in modules. -gnulib_files= - -: ${AUTOPOINT=autopoint} -: ${AUTORECONF=autoreconf} - -# A function to be called right after gnulib-tool is run. -# Override it via your own definition in bootstrap.conf. -bootstrap_post_import_hook() { :; } - -# A function to be called after everything else in this script. -# Override it via your own definition in bootstrap.conf. -bootstrap_epilogue() { :; } - -# The command to download all .po files for a specified domain into -# a specified directory. Fill in the first %s is the domain name, and -# the second with the destination directory. Use rsync's -L and -r -# options because the latest/%s directory and the .po files within are -# all symlinks. -po_download_command_format=\ -"rsync --delete --exclude '*.s1' -Lrtvz \ - 'translationproject.org::tp/latest/%s/' '%s'" - -# Fallback for downloading .po files (if rsync fails). -po_download_command_format2=\ -"wget --mirror -nd -q -np -A.po -P '%s' \ - http://translationproject.org/latest/%s/" - -extract_package_name=' - /^AC_INIT(/{ - /.*,.*,.*, */{ - s/// - s/[][]//g - s/)$// - p - q - } - s/AC_INIT(\[*// - s/]*,.*// - s/^GNU // - y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ - s/[^A-Za-z0-9_]/-/g - p - } -' -package=$(sed -n "$extract_package_name" configure.ac) \ - || die 'cannot find package name in configure.ac' -gnulib_name=lib$package - -build_aux=build-aux -source_base=lib -m4_base=m4 -doc_base=doc -tests_base=tests -gnulib_extra_files='' - -# Additional gnulib-tool options to use. Use "\newline" to break lines. -gnulib_tool_option_extras= - -# Other locale categories that need message catalogs. -EXTRA_LOCALE_CATEGORIES= - -# Additional xgettext options to use. Use "\\\newline" to break lines. -XGETTEXT_OPTIONS='\\\ - --flag=_:1:pass-c-format\\\ - --flag=N_:1:pass-c-format\\\ - --flag=error:3:c-format --flag=error_at_line:5:c-format\\\ -' - -# Package bug report address and copyright holder for gettext files -COPYRIGHT_HOLDER='Free Software Foundation, Inc.' -MSGID_BUGS_ADDRESS=bug-$package@gnu.org - -# Files we don't want to import. -excluded_files= - -# File that should exist in the top directory of a checked out hierarchy, -# but not in a distribution tarball. -checkout_only_file=README-hacking - -# Whether to use copies instead of symlinks. -copy=false - -# Set this to '.cvsignore .gitignore' in bootstrap.conf if you want -# those files to be generated in directories like lib/, m4/, and po/. -# Or set it to 'auto' to make this script select which to use based -# on which version control system (if any) is used in the source directory. -vc_ignore=auto - -# Set this to true in bootstrap.conf to enable --bootstrap-sync by -# default. -bootstrap_sync=false - -# Use git to update gnulib sources -use_git=true - -# find_tool ENVVAR NAMES... -# ------------------------- -# Search for a required program. Use the value of ENVVAR, if set, -# otherwise find the first of the NAMES that can be run (i.e., -# supports --version). If found, set ENVVAR to the program name, -# die otherwise. -# -# FIXME: code duplication, see also gnu-web-doc-update. -find_tool () -{ - find_tool_envvar=$1 - shift - find_tool_names=$@ - eval "find_tool_res=\$$find_tool_envvar" - if test x"$find_tool_res" = x; then - for i - do - if ($i --version /dev/null 2>&1; then - find_tool_res=$i - break - fi - done - else - find_tool_error_prefix="\$$find_tool_envvar: " - fi - test x"$find_tool_res" != x \ - || die "one of these is required: $find_tool_names" - ($find_tool_res --version /dev/null 2>&1 \ - || die "${find_tool_error_prefix}cannot run $find_tool_res --version" - eval "$find_tool_envvar=\$find_tool_res" - eval "export $find_tool_envvar" -} - -# Find sha1sum, named gsha1sum on MacPorts, and shasum on Mac OS X 10.6. -find_tool SHA1SUM sha1sum gsha1sum shasum - -# Override the default configuration, if necessary. -# Make sure that bootstrap.conf is sourced from the current directory -# if we were invoked as "sh bootstrap". -case "$0" in - */*) test -r "$0.conf" && . "$0.conf" ;; - *) test -r "$0.conf" && . ./"$0.conf" ;; -esac - -# Extra files from gnulib, which override files from other sources. -test -z "${gnulib_extra_files}" && \ - gnulib_extra_files=" - $build_aux/install-sh - $build_aux/mdate-sh - $build_aux/texinfo.tex - $build_aux/depcomp - $build_aux/config.guess - $build_aux/config.sub - doc/INSTALL -" - -if test "$vc_ignore" = auto; then - vc_ignore= - test -d .git && vc_ignore=.gitignore - test -d CVS && vc_ignore="$vc_ignore .cvsignore" -fi - -# Translate configuration into internal form. - -# Parse options. - -for option -do - case $option in - --help) - usage - exit;; - --gnulib-srcdir=*) - GNULIB_SRCDIR=${option#--gnulib-srcdir=};; - --skip-po) - SKIP_PO=t;; - --force) - checkout_only_file=;; - --copy) - copy=true;; - --bootstrap-sync) - bootstrap_sync=true;; - --no-bootstrap-sync) - bootstrap_sync=false;; - --no-git) - use_git=false;; - *) - die "$option: unknown option";; - esac -done - -$use_git || test -d "$GNULIB_SRCDIR" \ - || die "Error: --no-git requires --gnulib-srcdir" - -if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then - die "Bootstrapping from a non-checked-out distribution is risky." -fi - -# Ensure that lines starting with ! sort last, per gitignore conventions -# for whitelisting exceptions after a more generic blacklist pattern. -sort_patterns() { - sort -u "$@" | sed '/^!/ { - H - d - } - $ { - P - x - s/^\n// - }' | sed '/^$/d' -} - -# If $STR is not already on a line by itself in $FILE, insert it, -# sorting the new contents of the file and replacing $FILE with the result. -insert_sorted_if_absent() { - file=$1 - str=$2 - test -f $file || touch $file - echo "$str" | sort_patterns - $file | cmp -s - $file > /dev/null \ - || { echo "$str" | sort_patterns - $file > $file.bak \ - && mv $file.bak $file; } \ - || die "insert_sorted_if_absent $file $str: failed" -} - -# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with -# insert_sorted_if_absent. -insert_vc_ignore() { - vc_ignore_file="$1" - pattern="$2" - case $vc_ignore_file in - *.gitignore) - # A .gitignore entry that does not start with '/' applies - # recursively to subdirectories, so prepend '/' to every - # .gitignore entry. - pattern=$(echo "$pattern" | sed s,^,/,);; - esac - insert_sorted_if_absent "$vc_ignore_file" "$pattern" -} - -# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac. -found_aux_dir=no -grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \ - >/dev/null && found_aux_dir=yes -grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \ - >/dev/null && found_aux_dir=yes -test $found_aux_dir = yes \ - || die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it" - -# If $build_aux doesn't exist, create it now, otherwise some bits -# below will malfunction. If creating it, also mark it as ignored. -if test ! -d $build_aux; then - mkdir $build_aux - for dot_ig in x $vc_ignore; do - test $dot_ig = x && continue - insert_vc_ignore $dot_ig $build_aux - done -fi - -# Note this deviates from the version comparison in automake -# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a -# but this should suffice as we won't be specifying old -# version formats or redundant trailing .0 in bootstrap.conf. -# If we did want full compatibility then we should probably -# use m4_version_compare from autoconf. -sort_ver() { # sort -V is not generally available - ver1="$1" - ver2="$2" - - # split on '.' and compare each component - i=1 - while : ; do - p1=$(echo "$ver1" | cut -d. -f$i) - p2=$(echo "$ver2" | cut -d. -f$i) - if [ ! "$p1" ]; then - echo "$1 $2" - break - elif [ ! "$p2" ]; then - echo "$2 $1" - break - elif [ ! "$p1" = "$p2" ]; then - if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison - echo "$2 $1" - elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison - echo "$1 $2" - else # numeric, then lexicographic comparison - lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1) - if [ "$lp" = "$p2" ]; then - echo "$1 $2" - else - echo "$2 $1" - fi - fi - break - fi - i=$(($i+1)) - done -} - -get_version() { - app=$1 - - $app --version >/dev/null 2>&1 || return 1 - - $app --version 2>&1 | - sed -n '# Move version to start of line. - s/.*[v ]\([0-9]\)/\1/ - - # Skip lines that do not start with version. - /^[0-9]/!d - - # Remove characters after the version. - s/[^.a-z0-9-].*// - - # The first component must be digits only. - s/^\([0-9]*\)[a-z-].*/\1/ - - #the following essentially does s/5.005/5.5/ - s/\.0*\([1-9]\)/.\1/g - p - q' -} - -check_versions() { - ret=0 - - while read app req_ver; do - # We only need libtoolize from the libtool package. - if test "$app" = libtool; then - app=libtoolize - fi - # Exempt git if --no-git is in effect. - if test "$app" = git; then - $use_git || continue - fi - # Honor $APP variables ($TAR, $AUTOCONF, etc.) - appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_') - test "$appvar" = TAR && appvar=AMTAR - case $appvar in - GZIP) ;; # Do not use $GZIP: it contains gzip options. - *) eval "app=\${$appvar-$app}" ;; - esac - - # Handle the still-experimental Automake-NG programs specially. - # They remain named as the mainstream Automake programs ("automake", - # and "aclocal") to avoid gratuitous incompatibilities with - # pre-existing usages (by, say, autoreconf, or custom autogen.sh - # scripts), but correctly identify themselves (as being part of - # "GNU automake-ng") when asked their version. - case $app in - automake-ng|aclocal-ng) - app=${app%-ng} - ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || { - warn_ "Error: '$app' not found or not from Automake-NG" - ret=1 - continue - } ;; - esac - if [ "$req_ver" = "-" ]; then - # Merely require app to exist; not all prereq apps are well-behaved - # so we have to rely on $? rather than get_version. - $app --version >/dev/null 2>&1 - if [ 126 -le $? ]; then - warn_ "Error: '$app' not found" - ret=1 - fi - else - # Require app to produce a new enough version string. - inst_ver=$(get_version $app) - if [ ! "$inst_ver" ]; then - warn_ "Error: '$app' not found" - ret=1 - else - latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2) - if [ ! "$latest_ver" = "$inst_ver" ]; then - warnf_ '%s\n' \ - "Error: '$app' version == $inst_ver is too old" \ - " '$app' version >= $req_ver is required" - ret=1 - fi - fi - fi - done - - return $ret -} - -print_versions() { - echo "Program Min_version" - echo "----------------------" - printf %s "$buildreq" - echo "----------------------" - # can't depend on column -t -} - -use_libtool=0 -# We'd like to use grep -E, to see if any of LT_INIT, -# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac, -# but that's not portable enough (e.g., for Solaris). -grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \ - && use_libtool=1 -grep '^[ ]*LT_INIT' configure.ac >/dev/null \ - && use_libtool=1 -if test $use_libtool = 1; then - find_tool LIBTOOLIZE glibtoolize libtoolize -fi - -# gnulib-tool requires at least automake and autoconf. -# If either is not listed, add it (with minimum version) as a prerequisite. -case $buildreq in - *automake*) ;; - *) buildreq="automake 1.9 -$buildreq" ;; -esac -case $buildreq in - *autoconf*) ;; - *) buildreq="autoconf 2.59 -$buildreq" ;; -esac - -# When we can deduce that gnulib-tool will require patch, -# and when patch is not already listed as a prerequisite, add it, too. -if test -d "$local_gl_dir" \ - && ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then - case $buildreq in - *patch*) ;; - *) buildreq="patch - -$buildreq" ;; - esac -fi - -if ! printf "$buildreq" | check_versions; then - echo >&2 - if test -f README-prereq; then - die "See README-prereq for how to get the prerequisite programs" - else - die "Please install the prerequisite programs" - fi -fi - -echo "$0: Bootstrapping from checked-out $package sources..." - -# See if we can use gnulib's git-merge-changelog merge driver. -if test -d .git && (git --version) >/dev/null 2>/dev/null ; then - if git config merge.merge-changelog.driver >/dev/null ; then - : - elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then - echo "$0: initializing git-merge-changelog driver" - git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver' - git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B' - else - echo "$0: consider installing git-merge-changelog from gnulib" - fi -fi - - -cleanup_gnulib() { - status=$? - rm -fr "$gnulib_path" - exit $status -} - -git_modules_config () { - test -f .gitmodules && git config --file .gitmodules "$@" -} - -gnulib_path=$(git_modules_config submodule.gnulib.path) -test -z "$gnulib_path" && gnulib_path=gnulib - -# Get gnulib files. - -case ${GNULIB_SRCDIR--} in --) - if git_modules_config submodule.gnulib.url >/dev/null; then - echo "$0: getting gnulib files..." - git submodule init || exit $? - git submodule update || exit $? - - elif [ ! -d "$gnulib_path" ]; then - echo "$0: getting gnulib files..." - - trap cleanup_gnulib 1 2 13 15 - - shallow= - git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2' - git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" || - cleanup_gnulib - - trap - 1 2 13 15 - fi - GNULIB_SRCDIR=$gnulib_path - ;; -*) - # Use GNULIB_SRCDIR as a reference. - if test -d "$GNULIB_SRCDIR"/.git && \ - git_modules_config submodule.gnulib.url >/dev/null; then - echo "$0: getting gnulib files..." - if git submodule -h|grep -- --reference > /dev/null; then - # Prefer the one-liner available in git 1.6.4 or newer. - git submodule update --init --reference "$GNULIB_SRCDIR" \ - "$gnulib_path" || exit $? - else - # This fallback allows at least git 1.5.5. - if test -f "$gnulib_path"/gnulib-tool; then - # Since file already exists, assume submodule init already complete. - git submodule update || exit $? - else - # Older git can't clone into an empty directory. - rmdir "$gnulib_path" 2>/dev/null - git clone --reference "$GNULIB_SRCDIR" \ - "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \ - && git submodule init && git submodule update \ - || exit $? - fi - fi - GNULIB_SRCDIR=$gnulib_path - fi - ;; -esac - -if $bootstrap_sync; then - cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || { - echo "$0: updating bootstrap and restarting..." - exec sh -c \ - 'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \ - -- "$GNULIB_SRCDIR/build-aux/bootstrap" \ - "$0" "$@" --no-bootstrap-sync - } -fi - -gnulib_tool=$GNULIB_SRCDIR/gnulib-tool -<$gnulib_tool || exit $? - -# Get translations. - -download_po_files() { - subdir=$1 - domain=$2 - echo "$me: getting translations into $subdir for $domain..." - cmd=$(printf "$po_download_command_format" "$domain" "$subdir") - eval "$cmd" && return - # Fallback to HTTP. - cmd=$(printf "$po_download_command_format2" "$subdir" "$domain") - eval "$cmd" -} - -# Mirror .po files to $po_dir/.reference and copy only the new -# or modified ones into $po_dir. Also update $po_dir/LINGUAS. -# Note po files that exist locally only are left in $po_dir but will -# not be included in LINGUAS and hence will not be distributed. -update_po_files() { - # Directory containing primary .po files. - # Overwrite them only when we're sure a .po file is new. - po_dir=$1 - domain=$2 - - # Mirror *.po files into this dir. - # Usually contains *.s1 checksum files. - ref_po_dir="$po_dir/.reference" - - test -d $ref_po_dir || mkdir $ref_po_dir || return - download_po_files $ref_po_dir $domain \ - && ls "$ref_po_dir"/*.po 2>/dev/null | - sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return - - langs=$(cd $ref_po_dir && echo *.po | sed 's/\.po//g') - test "$langs" = '*' && langs=x - for po in $langs; do - case $po in x) continue;; esac - new_po="$ref_po_dir/$po.po" - cksum_file="$ref_po_dir/$po.s1" - if ! test -f "$cksum_file" || - ! test -f "$po_dir/$po.po" || - ! $SHA1SUM -c --status "$cksum_file" \ - < "$new_po" > /dev/null; then - echo "$me: updated $po_dir/$po.po..." - cp "$new_po" "$po_dir/$po.po" \ - && $SHA1SUM < "$new_po" > "$cksum_file" - fi - done -} - -case $SKIP_PO in -'') - if test -d po; then - update_po_files po $package || exit - fi - - if test -d runtime-po; then - update_po_files runtime-po $package-runtime || exit - fi;; -esac - -symlink_to_dir() -{ - src=$1/$2 - dst=${3-$2} - - test -f "$src" && { - - # If the destination directory doesn't exist, create it. - # This is required at least for "lib/uniwidth/cjk.h". - dst_dir=$(dirname "$dst") - if ! test -d "$dst_dir"; then - mkdir -p "$dst_dir" - - # If we've just created a directory like lib/uniwidth, - # tell version control system(s) it's ignorable. - # FIXME: for now, this does only one level - parent=$(dirname "$dst_dir") - for dot_ig in x $vc_ignore; do - test $dot_ig = x && continue - ig=$parent/$dot_ig - insert_vc_ignore $ig "${dst_dir##*/}" - done - fi - - if $copy; then - { - test ! -h "$dst" || { - echo "$me: rm -f $dst" && - rm -f "$dst" - } - } && - test -f "$dst" && - cmp -s "$src" "$dst" || { - echo "$me: cp -fp $src $dst" && - cp -fp "$src" "$dst" - } - else - # Leave any existing symlink alone, if it already points to the source, - # so that broken build tools that care about symlink times - # aren't confused into doing unnecessary builds. Conversely, if the - # existing symlink's time stamp is older than the source, make it afresh, - # so that broken tools aren't confused into skipping needed builds. See - # . - test -h "$dst" && - src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 && - dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 && - test "$src_i" = "$dst_i" && - both_ls=$(ls -dt "$src" "$dst") && - test "X$both_ls" = "X$dst$nl$src" || { - dot_dots= - case $src in - /*) ;; - *) - case /$dst/ in - *//* | */../* | */./* | /*/*/*/*/*/) - die "invalid symlink calculation: $src -> $dst";; - /*/*/*/*/) dot_dots=../../../;; - /*/*/*/) dot_dots=../../;; - /*/*/) dot_dots=../;; - esac;; - esac - - echo "$me: ln -fs $dot_dots$src $dst" && - ln -fs "$dot_dots$src" "$dst" - } - fi - } -} - -version_controlled_file() { - parent=$1 - file=$2 - if test -d .git; then - git rm -n "$file" > /dev/null 2>&1 - elif test -d .svn; then - svn log -r HEAD "$file" > /dev/null 2>&1 - elif test -d CVS; then - grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null | - grep '^/[^/]*/[0-9]' > /dev/null - else - warn_ "no version control for $file?" - false - fi -} - -# NOTE: we have to be careful to run both autopoint and libtoolize -# before gnulib-tool, since gnulib-tool is likely to provide newer -# versions of files "installed" by these two programs. -# Then, *after* gnulib-tool (see below), we have to be careful to -# run autoreconf in such a way that it does not run either of these -# two just-pre-run programs. - -# Import from gettext. -with_gettext=yes -grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \ - with_gettext=no - -if test $with_gettext = yes || test $use_libtool = 1; then - - tempbase=.bootstrap$$ - trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15 - - > $tempbase.0 > $tempbase.1 && - find . ! -type d -print | sort > $tempbase.0 || exit - - if test $with_gettext = yes; then - # Released autopoint has the tendency to install macros that have been - # obsoleted in current gnulib, so run this before gnulib-tool. - echo "$0: $AUTOPOINT --force" - $AUTOPOINT --force || exit - fi - - # Autoreconf runs aclocal before libtoolize, which causes spurious - # warnings if the initial aclocal is confused by the libtoolized - # (or worse out-of-date) macro directory. - # libtoolize 1.9b added the --install option; but we support back - # to libtoolize 1.5.22, where the install action was default. - if test $use_libtool = 1; then - install= - case $($LIBTOOLIZE --help) in - *--install*) install=--install ;; - esac - echo "running: $LIBTOOLIZE $install --copy" - $LIBTOOLIZE $install --copy - fi - - find . ! -type d -print | sort >$tempbase.1 - old_IFS=$IFS - IFS=$nl - for file in $(comm -13 $tempbase.0 $tempbase.1); do - IFS=$old_IFS - parent=${file%/*} - version_controlled_file "$parent" "$file" || { - for dot_ig in x $vc_ignore; do - test $dot_ig = x && continue - ig=$parent/$dot_ig - insert_vc_ignore "$ig" "${file##*/}" - done - } - done - IFS=$old_IFS - - rm -f $tempbase.0 $tempbase.1 - trap - 1 2 13 15 -fi - -# Import from gnulib. - -gnulib_tool_options="\ - --import\ - --no-changelog\ - --aux-dir $build_aux\ - --doc-base $doc_base\ - --lib $gnulib_name\ - --m4-base $m4_base/\ - --source-base $source_base/\ - --tests-base $tests_base\ - --local-dir $local_gl_dir\ - $gnulib_tool_option_extras\ -" -if test $use_libtool = 1; then - case "$gnulib_tool_options " in - *' --libtool '*) ;; - *) gnulib_tool_options="$gnulib_tool_options --libtool" ;; - esac -fi -echo "$0: $gnulib_tool $gnulib_tool_options --import ..." -$gnulib_tool $gnulib_tool_options --import $gnulib_modules && - -for file in $gnulib_files; do - symlink_to_dir "$GNULIB_SRCDIR" $file \ - || die "failed to symlink $file" -done - -bootstrap_post_import_hook \ - || die "bootstrap_post_import_hook failed" - -# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some -# gnulib-populated directories. Such .m4 files would cause aclocal to fail. -# The following requires GNU find 4.2.3 or newer. Considering the usual -# portability constraints of this script, that may seem a very demanding -# requirement, but it should be ok. Ignore any failure, which is fine, -# since this is only a convenience to help developers avoid the relatively -# unusual case in which a symlinked-to .m4 file is git-removed from gnulib -# between successive runs of this script. -find "$m4_base" "$source_base" \ - -depth \( -name '*.m4' -o -name '*.[ch]' \) \ - -type l -xtype l -delete > /dev/null 2>&1 - -# Some systems (RHEL 5) are using ancient autotools, for which the -# --no-recursive option had not been invented. Detect that lack and -# omit the option when it's not supported. FIXME in 2017: remove this -# hack when RHEL 5 autotools are updated, or when they become irrelevant. -no_recursive= -case $($AUTORECONF --help) in - *--no-recursive*) no_recursive=--no-recursive;; -esac - -# Tell autoreconf not to invoke autopoint or libtoolize; they were run above. -echo "running: AUTOPOINT=true LIBTOOLIZE=true " \ - "$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS" -AUTOPOINT=true LIBTOOLIZE=true \ - $AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \ - || die "autoreconf failed" - -# Get some extra files from gnulib, overriding existing files. -for file in $gnulib_extra_files; do - case $file in - */INSTALL) dst=INSTALL;; - build-aux/*) dst=$build_aux/${file#build-aux/};; - *) dst=$file;; - esac - symlink_to_dir "$GNULIB_SRCDIR" $file $dst \ - || die "failed to symlink $file" -done - -if test $with_gettext = yes; then - # Create gettext configuration. - echo "$0: Creating po/Makevars from po/Makevars.template ..." - rm -f po/Makevars - sed ' - /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/ - /^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/ - /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'| - /^XGETTEXT_OPTIONS *=/{ - s/$/ \\/ - a\ - '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} - } - ' po/Makevars.template >po/Makevars \ - || die 'cannot generate po/Makevars' - - # If the 'gettext' module is in use, grab the latest Makefile.in.in. - # If only the 'gettext-h' module is in use, assume autopoint already - # put the correct version of this file into place. - case $gnulib_modules in - *gettext-h*) ;; - *gettext*) - cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \ - || die "cannot create po/Makefile.in.in" - ;; - esac - - if test -d runtime-po; then - # Similarly for runtime-po/Makevars, but not quite the same. - rm -f runtime-po/Makevars - sed ' - /^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/ - /^subdir *=.*/s/=.*/= runtime-po/ - /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/ - /^XGETTEXT_OPTIONS *=/{ - s/$/ \\/ - a\ - '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+} - } - ' po/Makevars.template >runtime-po/Makevars \ - || die 'cannot generate runtime-po/Makevars' - - # Copy identical files from po to runtime-po. - (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) - fi -fi - -bootstrap_epilogue - -echo "$0: done. Now you can run './configure'." - -# Local variables: -# eval: (add-hook 'write-file-hooks 'time-stamp) -# time-stamp-start: "scriptversion=" -# time-stamp-format: "%:y-%02m-%02d.%02H" -# time-stamp-time-zone: "UTC" -# time-stamp-end: "; # UTC" -# End: diff -r 8ae34ffe5c1b -r a42d69d5a36d build-aux/bootstrap.conf --- a/build-aux/bootstrap.conf Thu Sep 20 04:08:53 2012 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,131 +0,0 @@ -# Bootstrap configuration. - -# Copyright (C) 2006-2007, 2009-2012 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 3 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, see . - - -# gnulib modules used by this package. -gnulib_modules=" - base64 - c-strcase - copysign - copysignf - closedir - crypto/md5 - fclose - fcntl - filemode - fnmatch - fopen - fflush - fseek - ftell - getcwd - gethostname - getopt-gnu - gettimeofday - glob - isatty - link - lstat - mkdir - mkfifo - mkostemp - mkstemp - mktime - nanosleep - nproc - opendir - pathmax - progname - readdir - readlink - rename - rewinddir - rmdir - round - roundf - sigaction - signal - sigprocmask - sleep - stat - stdint - stdio - strftime - strptime - symlink - sys_stat - sys_time - sys_times - time - times - tmpfile - trunc - truncf - unistd - unlink - vasprintf -" - -# Additional xgettext options to use. Use "\\\newline" to break lines. -XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\ - --from-code=UTF-8\\\ - --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\ - --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\ - --flag=wrapf:1:c-format\\\ -' - -# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]" -# appears in configure.ac, exclude some unnecessary files. -# Without grep's -E option (not portable enough, pre-configure), -# the following test is ugly. Also, this depends on the existence -# of configure.ac, not the obsolescent-named configure.in. But if -# you're using this infrastructure, you should care about such things. - -gettext_external=0 -grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null && - gettext_external=1 -grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null && - gettext_external=1 - -if test $gettext_external = 1; then - # Gettext supplies these files, but we don't need them since - # we don't have an intl subdirectory. - excluded_files=' - m4/glibc2.m4 - m4/intdiv0.m4 - m4/lcmessage.m4 - m4/lock.m4 - m4/printf-posix.m4 - m4/size_max.m4 - m4/uintmax_t.m4 - m4/ulonglong.m4 - m4/visibility.m4 - m4/xsize.m4 - ' -fi - -# Build prerequisites -buildreq="\ -autoconf 2.59 -automake 1.9.6 -git 1.5.5 -tar - -" -checkout_only_file=etc/HACKING -gnulib_tool_option_extras="--libtool" -gnulib_name="libgnu" -source_base="libgnu" diff -r 8ae34ffe5c1b -r a42d69d5a36d build-aux/bootstrap_gnulib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build-aux/bootstrap_gnulib Thu Sep 20 10:14:03 2012 -0400 @@ -0,0 +1,976 @@ +#! /bin/sh +# Print a version string. +scriptversion=2012-07-19.14; # UTC + +# Bootstrap this package from checked-out sources. + +# Copyright (C) 2003-2012 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 3 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, see . + +# Originally written by Paul Eggert. The canonical version of this +# script is maintained as build-aux/bootstrap in gnulib, however, to +# be useful to your project, you should place a copy of it under +# version control in the top-level directory of your project. The +# intent is that all customization can be done with a bootstrap.conf +# file also maintained in your version control; gnulib comes with a +# template build-aux/bootstrap.conf to get you started. + +# Please report bugs or propose patches to bug-gnulib@gnu.org. + +nl=' +' + +# Ensure file names are sorted consistently across platforms. +LC_ALL=C +export LC_ALL + +# Ensure that CDPATH is not set. Otherwise, the output from cd +# would cause trouble in at least one use below. +(unset CDPATH) >/dev/null 2>&1 && unset CDPATH + +local_gl_dir=gl + +me=$0 + +usage() { + cat <&2 +} + +# warn_ WORD1... +warn_ () +{ + # If IFS does not start with ' ', set it and emit the warning in a subshell. + case $IFS in + ' '*) warnf_ '%s\n' "$*";; + *) (IFS=' '; warn_ "$@");; + esac +} + +# die WORD1... +die() { warn_ "$@"; exit 1; } + +# Configuration. + +# Name of the Makefile.am +gnulib_mk=gnulib.mk + +# List of gnulib modules needed. +gnulib_modules= + +# Any gnulib files needed that are not in modules. +gnulib_files= + +: ${AUTOPOINT=autopoint} +: ${AUTORECONF=autoreconf} + +# A function to be called right after gnulib-tool is run. +# Override it via your own definition in bootstrap.conf. +bootstrap_post_import_hook() { :; } + +# A function to be called after everything else in this script. +# Override it via your own definition in bootstrap.conf. +bootstrap_epilogue() { :; } + +# The command to download all .po files for a specified domain into +# a specified directory. Fill in the first %s is the domain name, and +# the second with the destination directory. Use rsync's -L and -r +# options because the latest/%s directory and the .po files within are +# all symlinks. +po_download_command_format=\ +"rsync --delete --exclude '*.s1' -Lrtvz \ + 'translationproject.org::tp/latest/%s/' '%s'" + +# Fallback for downloading .po files (if rsync fails). +po_download_command_format2=\ +"wget --mirror -nd -q -np -A.po -P '%s' \ + http://translationproject.org/latest/%s/" + +extract_package_name=' + /^AC_INIT(/{ + /.*,.*,.*, */{ + s/// + s/[][]//g + s/)$// + p + q + } + s/AC_INIT(\[*// + s/]*,.*// + s/^GNU // + y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ + s/[^A-Za-z0-9_]/-/g + p + } +' +package=$(sed -n "$extract_package_name" configure.ac) \ + || die 'cannot find package name in configure.ac' +gnulib_name=lib$package + +build_aux=build-aux +source_base=lib +m4_base=m4 +doc_base=doc +tests_base=tests +gnulib_extra_files='' + +# Additional gnulib-tool options to use. Use "\newline" to break lines. +gnulib_tool_option_extras= + +# Other locale categories that need message catalogs. +EXTRA_LOCALE_CATEGORIES= + +# Additional xgettext options to use. Use "\\\newline" to break lines. +XGETTEXT_OPTIONS='\\\ + --flag=_:1:pass-c-format\\\ + --flag=N_:1:pass-c-format\\\ + --flag=error:3:c-format --flag=error_at_line:5:c-format\\\ +' + +# Package bug report address and copyright holder for gettext files +COPYRIGHT_HOLDER='Free Software Foundation, Inc.' +MSGID_BUGS_ADDRESS=bug-$package@gnu.org + +# Files we don't want to import. +excluded_files= + +# File that should exist in the top directory of a checked out hierarchy, +# but not in a distribution tarball. +checkout_only_file=README-hacking + +# Whether to use copies instead of symlinks. +copy=false + +# Set this to '.cvsignore .gitignore' in bootstrap.conf if you want +# those files to be generated in directories like lib/, m4/, and po/. +# Or set it to 'auto' to make this script select which to use based +# on which version control system (if any) is used in the source directory. +vc_ignore=auto + +# Set this to true in bootstrap.conf to enable --bootstrap-sync by +# default. +bootstrap_sync=false + +# Use git to update gnulib sources +use_git=true + +# find_tool ENVVAR NAMES... +# ------------------------- +# Search for a required program. Use the value of ENVVAR, if set, +# otherwise find the first of the NAMES that can be run (i.e., +# supports --version). If found, set ENVVAR to the program name, +# die otherwise. +# +# FIXME: code duplication, see also gnu-web-doc-update. +find_tool () +{ + find_tool_envvar=$1 + shift + find_tool_names=$@ + eval "find_tool_res=\$$find_tool_envvar" + if test x"$find_tool_res" = x; then + for i + do + if ($i --version /dev/null 2>&1; then + find_tool_res=$i + break + fi + done + else + find_tool_error_prefix="\$$find_tool_envvar: " + fi + test x"$find_tool_res" != x \ + || die "one of these is required: $find_tool_names" + ($find_tool_res --version /dev/null 2>&1 \ + || die "${find_tool_error_prefix}cannot run $find_tool_res --version" + eval "$find_tool_envvar=\$find_tool_res" + eval "export $find_tool_envvar" +} + +# Find sha1sum, named gsha1sum on MacPorts, and shasum on Mac OS X 10.6. +find_tool SHA1SUM sha1sum gsha1sum shasum + +# Override the default configuration, if necessary. +# Make sure that bootstrap.conf is sourced from the current directory +# if we were invoked as "sh bootstrap". +case "$0" in + */*) test -r "$0.conf" && . "$0.conf" ;; + *) test -r "$0.conf" && . ./"$0.conf" ;; +esac + +# Extra files from gnulib, which override files from other sources. +test -z "${gnulib_extra_files}" && \ + gnulib_extra_files=" + $build_aux/install-sh + $build_aux/mdate-sh + $build_aux/texinfo.tex + $build_aux/depcomp + $build_aux/config.guess + $build_aux/config.sub + doc/INSTALL +" + +if test "$vc_ignore" = auto; then + vc_ignore= + test -d .git && vc_ignore=.gitignore + test -d CVS && vc_ignore="$vc_ignore .cvsignore" +fi + +# Translate configuration into internal form. + +# Parse options. + +for option +do + case $option in + --help) + usage + exit;; + --gnulib-srcdir=*) + GNULIB_SRCDIR=${option#--gnulib-srcdir=};; + --skip-po) + SKIP_PO=t;; + --force) + checkout_only_file=;; + --copy) + copy=true;; + --bootstrap-sync) + bootstrap_sync=true;; + --no-bootstrap-sync) + bootstrap_sync=false;; + --no-git) + use_git=false;; + *) + die "$option: unknown option";; + esac +done + +$use_git || test -d "$GNULIB_SRCDIR" \ + || die "Error: --no-git requires --gnulib-srcdir" + +if test -n "$checkout_only_file" && test ! -r "$checkout_only_file"; then + die "Bootstrapping from a non-checked-out distribution is risky." +fi + +# Ensure that lines starting with ! sort last, per gitignore conventions +# for whitelisting exceptions after a more generic blacklist pattern. +sort_patterns() { + sort -u "$@" | sed '/^!/ { + H + d + } + $ { + P + x + s/^\n// + }' | sed '/^$/d' +} + +# If $STR is not already on a line by itself in $FILE, insert it, +# sorting the new contents of the file and replacing $FILE with the result. +insert_sorted_if_absent() { + file=$1 + str=$2 + test -f $file || touch $file + echo "$str" | sort_patterns - $file | cmp -s - $file > /dev/null \ + || { echo "$str" | sort_patterns - $file > $file.bak \ + && mv $file.bak $file; } \ + || die "insert_sorted_if_absent $file $str: failed" +} + +# Adjust $PATTERN for $VC_IGNORE_FILE and insert it with +# insert_sorted_if_absent. +insert_vc_ignore() { + vc_ignore_file="$1" + pattern="$2" + case $vc_ignore_file in + *.gitignore) + # A .gitignore entry that does not start with '/' applies + # recursively to subdirectories, so prepend '/' to every + # .gitignore entry. + pattern=$(echo "$pattern" | sed s,^,/,);; + esac + insert_sorted_if_absent "$vc_ignore_file" "$pattern" +} + +# Die if there is no AC_CONFIG_AUX_DIR($build_aux) line in configure.ac. +found_aux_dir=no +grep '^[ ]*AC_CONFIG_AUX_DIR(\['"$build_aux"'\])' configure.ac \ + >/dev/null && found_aux_dir=yes +grep '^[ ]*AC_CONFIG_AUX_DIR('"$build_aux"')' configure.ac \ + >/dev/null && found_aux_dir=yes +test $found_aux_dir = yes \ + || die "configure.ac lacks 'AC_CONFIG_AUX_DIR([$build_aux])'; add it" + +# If $build_aux doesn't exist, create it now, otherwise some bits +# below will malfunction. If creating it, also mark it as ignored. +if test ! -d $build_aux; then + mkdir $build_aux + for dot_ig in x $vc_ignore; do + test $dot_ig = x && continue + insert_vc_ignore $dot_ig $build_aux + done +fi + +# Note this deviates from the version comparison in automake +# in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a +# but this should suffice as we won't be specifying old +# version formats or redundant trailing .0 in bootstrap.conf. +# If we did want full compatibility then we should probably +# use m4_version_compare from autoconf. +sort_ver() { # sort -V is not generally available + ver1="$1" + ver2="$2" + + # split on '.' and compare each component + i=1 + while : ; do + p1=$(echo "$ver1" | cut -d. -f$i) + p2=$(echo "$ver2" | cut -d. -f$i) + if [ ! "$p1" ]; then + echo "$1 $2" + break + elif [ ! "$p2" ]; then + echo "$2 $1" + break + elif [ ! "$p1" = "$p2" ]; then + if [ "$p1" -gt "$p2" ] 2>/dev/null; then # numeric comparison + echo "$2 $1" + elif [ "$p2" -gt "$p1" ] 2>/dev/null; then # numeric comparison + echo "$1 $2" + else # numeric, then lexicographic comparison + lp=$(printf "$p1\n$p2\n" | LANG=C sort -n | tail -n1) + if [ "$lp" = "$p2" ]; then + echo "$1 $2" + else + echo "$2 $1" + fi + fi + break + fi + i=$(($i+1)) + done +} + +get_version() { + app=$1 + + $app --version >/dev/null 2>&1 || return 1 + + $app --version 2>&1 | + sed -n '# Move version to start of line. + s/.*[v ]\([0-9]\)/\1/ + + # Skip lines that do not start with version. + /^[0-9]/!d + + # Remove characters after the version. + s/[^.a-z0-9-].*// + + # The first component must be digits only. + s/^\([0-9]*\)[a-z-].*/\1/ + + #the following essentially does s/5.005/5.5/ + s/\.0*\([1-9]\)/.\1/g + p + q' +} + +check_versions() { + ret=0 + + while read app req_ver; do + # We only need libtoolize from the libtool package. + if test "$app" = libtool; then + app=libtoolize + fi + # Exempt git if --no-git is in effect. + if test "$app" = git; then + $use_git || continue + fi + # Honor $APP variables ($TAR, $AUTOCONF, etc.) + appvar=$(echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_') + test "$appvar" = TAR && appvar=AMTAR + case $appvar in + GZIP) ;; # Do not use $GZIP: it contains gzip options. + *) eval "app=\${$appvar-$app}" ;; + esac + + # Handle the still-experimental Automake-NG programs specially. + # They remain named as the mainstream Automake programs ("automake", + # and "aclocal") to avoid gratuitous incompatibilities with + # pre-existing usages (by, say, autoreconf, or custom autogen.sh + # scripts), but correctly identify themselves (as being part of + # "GNU automake-ng") when asked their version. + case $app in + automake-ng|aclocal-ng) + app=${app%-ng} + ($app --version | grep '(GNU automake-ng)') >/dev/null 2>&1 || { + warn_ "Error: '$app' not found or not from Automake-NG" + ret=1 + continue + } ;; + esac + if [ "$req_ver" = "-" ]; then + # Merely require app to exist; not all prereq apps are well-behaved + # so we have to rely on $? rather than get_version. + $app --version >/dev/null 2>&1 + if [ 126 -le $? ]; then + warn_ "Error: '$app' not found" + ret=1 + fi + else + # Require app to produce a new enough version string. + inst_ver=$(get_version $app) + if [ ! "$inst_ver" ]; then + warn_ "Error: '$app' not found" + ret=1 + else + latest_ver=$(sort_ver $req_ver $inst_ver | cut -d' ' -f2) + if [ ! "$latest_ver" = "$inst_ver" ]; then + warnf_ '%s\n' \ + "Error: '$app' version == $inst_ver is too old" \ + " '$app' version >= $req_ver is required" + ret=1 + fi + fi + fi + done + + return $ret +} + +print_versions() { + echo "Program Min_version" + echo "----------------------" + printf %s "$buildreq" + echo "----------------------" + # can't depend on column -t +} + +use_libtool=0 +# We'd like to use grep -E, to see if any of LT_INIT, +# AC_PROG_LIBTOOL, AM_PROG_LIBTOOL is used in configure.ac, +# but that's not portable enough (e.g., for Solaris). +grep '^[ ]*A[CM]_PROG_LIBTOOL' configure.ac >/dev/null \ + && use_libtool=1 +grep '^[ ]*LT_INIT' configure.ac >/dev/null \ + && use_libtool=1 +if test $use_libtool = 1; then + find_tool LIBTOOLIZE glibtoolize libtoolize +fi + +# gnulib-tool requires at least automake and autoconf. +# If either is not listed, add it (with minimum version) as a prerequisite. +case $buildreq in + *automake*) ;; + *) buildreq="automake 1.9 +$buildreq" ;; +esac +case $buildreq in + *autoconf*) ;; + *) buildreq="autoconf 2.59 +$buildreq" ;; +esac + +# When we can deduce that gnulib-tool will require patch, +# and when patch is not already listed as a prerequisite, add it, too. +if test -d "$local_gl_dir" \ + && ! find "$local_gl_dir" -name '*.diff' -exec false {} +; then + case $buildreq in + *patch*) ;; + *) buildreq="patch - +$buildreq" ;; + esac +fi + +if ! printf "$buildreq" | check_versions; then + echo >&2 + if test -f README-prereq; then + die "See README-prereq for how to get the prerequisite programs" + else + die "Please install the prerequisite programs" + fi +fi + +echo "$0: Bootstrapping from checked-out $package sources..." + +# See if we can use gnulib's git-merge-changelog merge driver. +if test -d .git && (git --version) >/dev/null 2>/dev/null ; then + if git config merge.merge-changelog.driver >/dev/null ; then + : + elif (git-merge-changelog --version) >/dev/null 2>/dev/null ; then + echo "$0: initializing git-merge-changelog driver" + git config merge.merge-changelog.name 'GNU-style ChangeLog merge driver' + git config merge.merge-changelog.driver 'git-merge-changelog %O %A %B' + else + echo "$0: consider installing git-merge-changelog from gnulib" + fi +fi + + +cleanup_gnulib() { + status=$? + rm -fr "$gnulib_path" + exit $status +} + +git_modules_config () { + test -f .gitmodules && git config --file .gitmodules "$@" +} + +gnulib_path=$(git_modules_config submodule.gnulib.path) +test -z "$gnulib_path" && gnulib_path=gnulib + +# Get gnulib files. + +case ${GNULIB_SRCDIR--} in +-) + if git_modules_config submodule.gnulib.url >/dev/null; then + echo "$0: getting gnulib files..." + git submodule init || exit $? + git submodule update || exit $? + + elif [ ! -d "$gnulib_path" ]; then + echo "$0: getting gnulib files..." + + trap cleanup_gnulib 1 2 13 15 + + shallow= + git clone -h 2>&1 | grep -- --depth > /dev/null && shallow='--depth 2' + git clone $shallow git://git.sv.gnu.org/gnulib "$gnulib_path" || + cleanup_gnulib + + trap - 1 2 13 15 + fi + GNULIB_SRCDIR=$gnulib_path + ;; +*) + # Use GNULIB_SRCDIR as a reference. + if test -d "$GNULIB_SRCDIR"/.git && \ + git_modules_config submodule.gnulib.url >/dev/null; then + echo "$0: getting gnulib files..." + if git submodule -h|grep -- --reference > /dev/null; then + # Prefer the one-liner available in git 1.6.4 or newer. + git submodule update --init --reference "$GNULIB_SRCDIR" \ + "$gnulib_path" || exit $? + else + # This fallback allows at least git 1.5.5. + if test -f "$gnulib_path"/gnulib-tool; then + # Since file already exists, assume submodule init already complete. + git submodule update || exit $? + else + # Older git can't clone into an empty directory. + rmdir "$gnulib_path" 2>/dev/null + git clone --reference "$GNULIB_SRCDIR" \ + "$(git_modules_config submodule.gnulib.url)" "$gnulib_path" \ + && git submodule init && git submodule update \ + || exit $? + fi + fi + GNULIB_SRCDIR=$gnulib_path + fi + ;; +esac + +if $bootstrap_sync; then + cmp -s "$0" "$GNULIB_SRCDIR/build-aux/bootstrap" || { + echo "$0: updating bootstrap and restarting..." + exec sh -c \ + 'cp "$1" "$2" && shift && exec "${CONFIG_SHELL-/bin/sh}" "$@"' \ + -- "$GNULIB_SRCDIR/build-aux/bootstrap" \ + "$0" "$@" --no-bootstrap-sync + } +fi + +gnulib_tool=$GNULIB_SRCDIR/gnulib-tool +<$gnulib_tool || exit $? + +# Get translations. + +download_po_files() { + subdir=$1 + domain=$2 + echo "$me: getting translations into $subdir for $domain..." + cmd=$(printf "$po_download_command_format" "$domain" "$subdir") + eval "$cmd" && return + # Fallback to HTTP. + cmd=$(printf "$po_download_command_format2" "$subdir" "$domain") + eval "$cmd" +} + +# Mirror .po files to $po_dir/.reference and copy only the new +# or modified ones into $po_dir. Also update $po_dir/LINGUAS. +# Note po files that exist locally only are left in $po_dir but will +# not be included in LINGUAS and hence will not be distributed. +update_po_files() { + # Directory containing primary .po files. + # Overwrite them only when we're sure a .po file is new. + po_dir=$1 + domain=$2 + + # Mirror *.po files into this dir. + # Usually contains *.s1 checksum files. + ref_po_dir="$po_dir/.reference" + + test -d $ref_po_dir || mkdir $ref_po_dir || return + download_po_files $ref_po_dir $domain \ + && ls "$ref_po_dir"/*.po 2>/dev/null | + sed 's|.*/||; s|\.po$||' > "$po_dir/LINGUAS" || return + + langs=$(cd $ref_po_dir && echo *.po | sed 's/\.po//g') + test "$langs" = '*' && langs=x + for po in $langs; do + case $po in x) continue;; esac + new_po="$ref_po_dir/$po.po" + cksum_file="$ref_po_dir/$po.s1" + if ! test -f "$cksum_file" || + ! test -f "$po_dir/$po.po" || + ! $SHA1SUM -c --status "$cksum_file" \ + < "$new_po" > /dev/null; then + echo "$me: updated $po_dir/$po.po..." + cp "$new_po" "$po_dir/$po.po" \ + && $SHA1SUM < "$new_po" > "$cksum_file" + fi + done +} + +case $SKIP_PO in +'') + if test -d po; then + update_po_files po $package || exit + fi + + if test -d runtime-po; then + update_po_files runtime-po $package-runtime || exit + fi;; +esac + +symlink_to_dir() +{ + src=$1/$2 + dst=${3-$2} + + test -f "$src" && { + + # If the destination directory doesn't exist, create it. + # This is required at least for "lib/uniwidth/cjk.h". + dst_dir=$(dirname "$dst") + if ! test -d "$dst_dir"; then + mkdir -p "$dst_dir" + + # If we've just created a directory like lib/uniwidth, + # tell version control system(s) it's ignorable. + # FIXME: for now, this does only one level + parent=$(dirname "$dst_dir") + for dot_ig in x $vc_ignore; do + test $dot_ig = x && continue + ig=$parent/$dot_ig + insert_vc_ignore $ig "${dst_dir##*/}" + done + fi + + if $copy; then + { + test ! -h "$dst" || { + echo "$me: rm -f $dst" && + rm -f "$dst" + } + } && + test -f "$dst" && + cmp -s "$src" "$dst" || { + echo "$me: cp -fp $src $dst" && + cp -fp "$src" "$dst" + } + else + # Leave any existing symlink alone, if it already points to the source, + # so that broken build tools that care about symlink times + # aren't confused into doing unnecessary builds. Conversely, if the + # existing symlink's time stamp is older than the source, make it afresh, + # so that broken tools aren't confused into skipping needed builds. See + # . + test -h "$dst" && + src_ls=$(ls -diL "$src" 2>/dev/null) && set $src_ls && src_i=$1 && + dst_ls=$(ls -diL "$dst" 2>/dev/null) && set $dst_ls && dst_i=$1 && + test "$src_i" = "$dst_i" && + both_ls=$(ls -dt "$src" "$dst") && + test "X$both_ls" = "X$dst$nl$src" || { + dot_dots= + case $src in + /*) ;; + *) + case /$dst/ in + *//* | */../* | */./* | /*/*/*/*/*/) + die "invalid symlink calculation: $src -> $dst";; + /*/*/*/*/) dot_dots=../../../;; + /*/*/*/) dot_dots=../../;; + /*/*/) dot_dots=../;; + esac;; + esac + + echo "$me: ln -fs $dot_dots$src $dst" && + ln -fs "$dot_dots$src" "$dst" + } + fi + } +} + +version_controlled_file() { + parent=$1 + file=$2 + if test -d .git; then + git rm -n "$file" > /dev/null 2>&1 + elif test -d .svn; then + svn log -r HEAD "$file" > /dev/null 2>&1 + elif test -d CVS; then + grep -F "/${file##*/}/" "$parent/CVS/Entries" 2>/dev/null | + grep '^/[^/]*/[0-9]' > /dev/null + else + warn_ "no version control for $file?" + false + fi +} + +# NOTE: we have to be careful to run both autopoint and libtoolize +# before gnulib-tool, since gnulib-tool is likely to provide newer +# versions of files "installed" by these two programs. +# Then, *after* gnulib-tool (see below), we have to be careful to +# run autoreconf in such a way that it does not run either of these +# two just-pre-run programs. + +# Import from gettext. +with_gettext=yes +grep '^[ ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \ + with_gettext=no + +if test $with_gettext = yes || test $use_libtool = 1; then + + tempbase=.bootstrap$$ + trap "rm -f $tempbase.0 $tempbase.1" 1 2 13 15 + + > $tempbase.0 > $tempbase.1 && + find . ! -type d -print | sort > $tempbase.0 || exit + + if test $with_gettext = yes; then + # Released autopoint has the tendency to install macros that have been + # obsoleted in current gnulib, so run this before gnulib-tool. + echo "$0: $AUTOPOINT --force" + $AUTOPOINT --force || exit + fi + + # Autoreconf runs aclocal before libtoolize, which causes spurious + # warnings if the initial aclocal is confused by the libtoolized + # (or worse out-of-date) macro directory. + # libtoolize 1.9b added the --install option; but we support back + # to libtoolize 1.5.22, where the install action was default. + if test $use_libtool = 1; then + install= + case $($LIBTOOLIZE --help) in + *--install*) install=--install ;; + esac + echo "running: $LIBTOOLIZE $install --copy" + $LIBTOOLIZE $install --copy + fi + + find . ! -type d -print | sort >$tempbase.1 + old_IFS=$IFS + IFS=$nl + for file in $(comm -13 $tempbase.0 $tempbase.1); do + IFS=$old_IFS + parent=${file%/*} + version_controlled_file "$parent" "$file" || { + for dot_ig in x $vc_ignore; do + test $dot_ig = x && continue + ig=$parent/$dot_ig + insert_vc_ignore "$ig" "${file##*/}" + done + } + done + IFS=$old_IFS + + rm -f $tempbase.0 $tempbase.1 + trap - 1 2 13 15 +fi + +# Import from gnulib. + +gnulib_tool_options="\ + --import\ + --no-changelog\ + --aux-dir $build_aux\ + --doc-base $doc_base\ + --lib $gnulib_name\ + --m4-base $m4_base/\ + --source-base $source_base/\ + --tests-base $tests_base\ + --local-dir $local_gl_dir\ + $gnulib_tool_option_extras\ +" +if test $use_libtool = 1; then + case "$gnulib_tool_options " in + *' --libtool '*) ;; + *) gnulib_tool_options="$gnulib_tool_options --libtool" ;; + esac +fi +echo "$0: $gnulib_tool $gnulib_tool_options --import ..." +$gnulib_tool $gnulib_tool_options --import $gnulib_modules && + +for file in $gnulib_files; do + symlink_to_dir "$GNULIB_SRCDIR" $file \ + || die "failed to symlink $file" +done + +bootstrap_post_import_hook \ + || die "bootstrap_post_import_hook failed" + +# Remove any dangling symlink matching "*.m4" or "*.[ch]" in some +# gnulib-populated directories. Such .m4 files would cause aclocal to fail. +# The following requires GNU find 4.2.3 or newer. Considering the usual +# portability constraints of this script, that may seem a very demanding +# requirement, but it should be ok. Ignore any failure, which is fine, +# since this is only a convenience to help developers avoid the relatively +# unusual case in which a symlinked-to .m4 file is git-removed from gnulib +# between successive runs of this script. +find "$m4_base" "$source_base" \ + -depth \( -name '*.m4' -o -name '*.[ch]' \) \ + -type l -xtype l -delete > /dev/null 2>&1 + +# Some systems (RHEL 5) are using ancient autotools, for which the +# --no-recursive option had not been invented. Detect that lack and +# omit the option when it's not supported. FIXME in 2017: remove this +# hack when RHEL 5 autotools are updated, or when they become irrelevant. +no_recursive= +case $($AUTORECONF --help) in + *--no-recursive*) no_recursive=--no-recursive;; +esac + +# Tell autoreconf not to invoke autopoint or libtoolize; they were run above. +echo "running: AUTOPOINT=true LIBTOOLIZE=true " \ + "$AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS" +AUTOPOINT=true LIBTOOLIZE=true \ + $AUTORECONF --verbose --install $no_recursive -I $m4_base $ACLOCAL_FLAGS \ + || die "autoreconf failed" + +# Get some extra files from gnulib, overriding existing files. +for file in $gnulib_extra_files; do + case $file in + */INSTALL) dst=INSTALL;; + build-aux/*) dst=$build_aux/${file#build-aux/};; + *) dst=$file;; + esac + symlink_to_dir "$GNULIB_SRCDIR" $file $dst \ + || die "failed to symlink $file" +done + +if test $with_gettext = yes; then + # Create gettext configuration. + echo "$0: Creating po/Makevars from po/Makevars.template ..." + rm -f po/Makevars + sed ' + /^EXTRA_LOCALE_CATEGORIES *=/s/=.*/= '"$EXTRA_LOCALE_CATEGORIES"'/ + /^COPYRIGHT_HOLDER *=/s/=.*/= '"$COPYRIGHT_HOLDER"'/ + /^MSGID_BUGS_ADDRESS *=/s|=.*|= '"$MSGID_BUGS_ADDRESS"'| + /^XGETTEXT_OPTIONS *=/{ + s/$/ \\/ + a\ + '"$XGETTEXT_OPTIONS"' $${end_of_xgettext_options+} + } + ' po/Makevars.template >po/Makevars \ + || die 'cannot generate po/Makevars' + + # If the 'gettext' module is in use, grab the latest Makefile.in.in. + # If only the 'gettext-h' module is in use, assume autopoint already + # put the correct version of this file into place. + case $gnulib_modules in + *gettext-h*) ;; + *gettext*) + cp $GNULIB_SRCDIR/build-aux/po/Makefile.in.in po/Makefile.in.in \ + || die "cannot create po/Makefile.in.in" + ;; + esac + + if test -d runtime-po; then + # Similarly for runtime-po/Makevars, but not quite the same. + rm -f runtime-po/Makevars + sed ' + /^DOMAIN *=.*/s/=.*/= '"$package"'-runtime/ + /^subdir *=.*/s/=.*/= runtime-po/ + /^MSGID_BUGS_ADDRESS *=/s/=.*/= bug-'"$package"'@gnu.org/ + /^XGETTEXT_OPTIONS *=/{ + s/$/ \\/ + a\ + '"$XGETTEXT_OPTIONS_RUNTIME"' $${end_of_xgettext_options+} + } + ' po/Makevars.template >runtime-po/Makevars \ + || die 'cannot generate runtime-po/Makevars' + + # Copy identical files from po to runtime-po. + (cd po && cp -p Makefile.in.in *-quot *.header *.sed *.sin ../runtime-po) + fi +fi + +bootstrap_epilogue + +echo "$0: done. Now you can run './configure'." + +# Local variables: +# eval: (add-hook 'write-file-hooks 'time-stamp) +# time-stamp-start: "scriptversion=" +# time-stamp-format: "%:y-%02m-%02d.%02H" +# time-stamp-time-zone: "UTC" +# time-stamp-end: "; # UTC" +# End: diff -r 8ae34ffe5c1b -r a42d69d5a36d build-aux/bootstrap_gnulib.conf --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/build-aux/bootstrap_gnulib.conf Thu Sep 20 10:14:03 2012 -0400 @@ -0,0 +1,139 @@ +# Bootstrap configuration. + +# Copyright (C) 2006-2007, 2009-2012 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 3 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, see . + + +# gnulib modules used by this package. +gnulib_modules=" + base64 + canonicalize + chdir + close + closedir + copysign + copysignf + crypto/md5 + dup2 + fclose + fcntl + fflush + filemode + floor + floorf + fnmatch + fopen + fseek + ftell + getcwd + gethostname + getopt-gnu + gettimeofday + glob + isatty + link + lstat + malloc + mkdir + mkfifo + mkostemp + mktime + nanosleep + nproc + open + opendir + pathmax + progname + readdir + readlink + realloc + rename + rmdir + round + roundf + select + sigaction + signal + sigprocmask + sleep + stat + stdint + stdio + strerror + strftime + strptime + symlink + sys_stat + sys_time + sys_times + time + times + tmpfile + trunc + truncf + unistd + unlink + vasprintf +" + +# Additional xgettext options to use. Use "\\\newline" to break lines. +XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\ + --from-code=UTF-8\\\ + --flag=asprintf:2:c-format --flag=vasprintf:2:c-format\\\ + --flag=asnprintf:3:c-format --flag=vasnprintf:3:c-format\\\ + --flag=wrapf:1:c-format\\\ +' + +# If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]" +# appears in configure.ac, exclude some unnecessary files. +# Without grep's -E option (not portable enough, pre-configure), +# the following test is ugly. Also, this depends on the existence +# of configure.ac, not the obsolescent-named configure.in. But if +# you're using this infrastructure, you should care about such things. + +gettext_external=0 +grep '^[ ]*AM_GNU_GETTEXT(external\>' configure.ac > /dev/null && + gettext_external=1 +grep '^[ ]*AM_GNU_GETTEXT(\[external\]' configure.ac > /dev/null && + gettext_external=1 + +if test $gettext_external = 1; then + # Gettext supplies these files, but we don't need them since + # we don't have an intl subdirectory. + excluded_files=' + m4/glibc2.m4 + m4/intdiv0.m4 + m4/lcmessage.m4 + m4/lock.m4 + m4/printf-posix.m4 + m4/size_max.m4 + m4/uintmax_t.m4 + m4/ulonglong.m4 + m4/visibility.m4 + m4/xsize.m4 + ' +fi + +# Build prerequisites +buildreq="\ +autoconf 2.59 +automake 1.9.6 +git 1.5.5 +tar - +" +checkout_only_file=etc/HACKING +gnulib_tool_option_extras="--libtool" +gnulib_name="libgnu" +source_base="libgnu" diff -r 8ae34ffe5c1b -r a42d69d5a36d build-aux/common.mk --- a/build-aux/common.mk Thu Sep 20 04:08:53 2012 -0500 +++ b/build-aux/common.mk Thu Sep 20 10:14:03 2012 -0400 @@ -82,9 +82,9 @@ F77 = @F77@ AM_FFLAGS = @FFLAGS@ FPICFLAG = @FPICFLAG@ -ALL_FFLAGS = $(FFLAGS) F77_FLOAT_STORE_FLAG = @F77_FLOAT_STORE_FLAG@ F77_INTEGER_8_FLAG = @F77_INTEGER_8_FLAG@ +ALL_FFLAGS = $(FFLAGS) F77_TOLOWER=@F77_TOLOWER@ F77_APPEND_UNDERSCORE=@F77_TOLOWER@ @@ -92,23 +92,7 @@ F77_ISNAN_MACRO=@F77_ISNAN_MACRO@ -X11_INCFLAGS = @X11_INCFLAGS@ -X11_LIBS = @X11_LIBS@ - -CARBON_LIBS = @CARBON_LIBS@ - -MAGICK_CPPFLAGS = @MAGICK_CPPFLAGS@ -MAGICK_LDFLAGS = @MAGICK_LDFLAGS@ -MAGICK_LIBS = @MAGICK_LIBS@ - -PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ -PTHREAD_LIBS = @PTHREAD_LIBS@ - -LIBFLAGS = -L$(top_builddir) - -DEFS = @DEFS@ - -UGLY_DEFS = @UGLY_DEFS@ +# C compiler flags. CC = @CC@ ## FIXME: CC_VERSION is deprecated and should be removed in version 3.12 @@ -118,6 +102,7 @@ XTRA_CFLAGS = @XTRA_CFLAGS@ WARN_CFLAGS = @WARN_CFLAGS@ AM_CFLAGS = $(XTRA_CFLAGS) +ALL_CPPFLAGS = $(CPPFLAGS) $(HDF5_CPPFLAGS) $(Z_CPPFLAGS) $(LLVM_CPPFLAGS) BUILD_CC = @BUILD_CC@ BUILD_CFLAGS = @BUILD_CFLAGS@ @@ -129,7 +114,10 @@ # omit_deps = true; # endif -GRAPHICS_CFLAGS = @GRAPHICS_CFLAGS@ +DEFS = @DEFS@ +UGLY_DEFS = @UGLY_DEFS@ + +# C++ compiler flags. CXX = @CXX@ ## FIXME: CXX_VERSION is deprecated and should be removed in version 3.12 @@ -144,10 +132,11 @@ BUILD_CXX = @BUILD_CXX@ BUILD_CXXFLAGS = @BUILD_CXXFLAGS@ -NO_UNDEFINED_LDFLAG = @NO_UNDEFINED_LDFLAG@ +# Linker and library flags LD_CXX = @LD_CXX@ LD_STATIC_FLAG = @LD_STATIC_FLAG@ +LIBFLAGS = -L$(top_builddir) #ALL_LDFLAGS = $(LIBFLAGS) $(LD_STATIC_FLAG) $(CPICFLAG) $(LDFLAGS) BUILD_LDFLAGS = @BUILD_LDFLAGS@ @@ -162,61 +151,33 @@ RDYNAMIC_FLAG = @RDYNAMIC_FLAG@ -FLIBS = @FLIBS@ +NO_UNDEFINED_LDFLAG = @NO_UNDEFINED_LDFLAG@ + +# List of libraries and their special compilation flags LIBOCTINTERP = @LIBOCTINTERP@ LIBOCTAVE = @LIBOCTAVE@ -FT2_CFLAGS = @FT2_CFLAGS@ -FT2_LIBS = @FT2_LIBS@ - -HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ -HDF5_LDFLAGS = @HDF5_LDFLAGS@ -HDF5_LIBS = @HDF5_LIBS@ - -Z_CPPFLAGS = @Z_CPPFLAGS@ -Z_LDFLAGS = @Z_LDFLAGS@ -Z_LIBS = @Z_LIBS@ - -LLVM_CPPFLAGS = @LLVM_CPPFLAGS@ -LLVM_LDFLAGS = @LLVM_LDFLAGS@ -LLVM_LIBS = @LLVM_LIBS@ - -GRAPHICS_LIBS = @GRAPHICS_LIBS@ - -QHULL_CPPFLAGS = @QHULL_CPPFLAGS@ -QHULL_LDFLAGS = @QHULL_LDFLAGS@ -QHULL_LIBS = @QHULL_LIBS@ - -REGEX_LIBS = @REGEX_LIBS@ - -LAPACK_LIBS = @LAPACK_LIBS@ -BLAS_LIBS = @BLAS_LIBS@ - -FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ -FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ -FFTW3_LIBS = @FFTW3_LIBS@ - -FFTW3F_CPPFLAGS = @FFTW3F_CPPFLAGS@ -FFTW3F_LDFLAGS = @FFTW3F_LDFLAGS@ -FFTW3F_LIBS = @FFTW3F_LIBS@ - -GLPK_CPPFLAGS = @GLPK_CPPFLAGS@ -GLPK_LDFLAGS = @GLPK_LDFLAGS@ -GLPK_LIBS = @GLPK_LIBS@ - -CURL_CPPFLAGS = @CURL_CPPFLAGS@ -CURL_LDFLAGS = @CURL_LDFLAGS@ -CURL_LIBS = @CURL_LIBS@ +DL_LIBS = @DL_LIBS@ +FLIBS = @FLIBS@ +LIBS = @LIBS@ AMD_CPPFLAGS = @AMD_CPPFLAGS@ AMD_LDFLAGS = @AMD_LDFLAGS@ AMD_LIBS = @AMD_LIBS@ +ARPACK_CPPFLAGS = @ARPACK_CPPFLAGS@ +ARPACK_LDFLAGS = @ARPACK_LDFLAGS@ +ARPACK_LIBS = @ARPACK_LIBS@ + +BLAS_LIBS = @BLAS_LIBS@ + CAMD_CPPFLAGS = @CAMD_CPPFLAGS@ CAMD_LDFLAGS = @CAMD_LDFLAGS@ CAMD_LIBS = @CAMD_LIBS@ +CARBON_LIBS = @CARBON_LIBS@ + COLAMD_CPPFLAGS = @COLAMD_CPPFLAGS@ COLAMD_LDFLAGS = @COLAMD_LDFLAGS@ COLAMD_LIBS = @COLAMD_LIBS@ @@ -229,31 +190,66 @@ CHOLMOD_LDFLAGS = @CHOLMOD_LDFLAGS@ CHOLMOD_LIBS = @CHOLMOD_LIBS@ +CURL_CPPFLAGS = @CURL_CPPFLAGS@ +CURL_LDFLAGS = @CURL_LDFLAGS@ +CURL_LIBS = @CURL_LIBS@ + CXSPARSE_CPPFLAGS = @CXSPARSE_CPPFLAGS@ CXSPARSE_LDFLAGS = @CXSPARSE_LDFLAGS@ CXSPARSE_LIBS = @CXSPARSE_LIBS@ -UMFPACK_CPPFLAGS = @UMFPACK_CPPFLAGS@ -UMFPACK_LDFLAGS = @UMFPACK_LDFLAGS@ -UMFPACK_LIBS = @UMFPACK_LIBS@ +FFTW3_CPPFLAGS = @FFTW3_CPPFLAGS@ +FFTW3_LDFLAGS = @FFTW3_LDFLAGS@ +FFTW3_LIBS = @FFTW3_LIBS@ + +FFTW3F_CPPFLAGS = @FFTW3F_CPPFLAGS@ +FFTW3F_LDFLAGS = @FFTW3F_LDFLAGS@ +FFTW3F_LIBS = @FFTW3F_LIBS@ + +FFTW_XCPPFLAGS = $(FFTW3_CPPFLAGS) $(FFTW3F_CPPFLAGS) +FFTW_XLDFLAGS = $(FFTW3_LDFLAGS) $(FFTW3F_LDFLAGS) +FFTW_XLIBS = $(FFTW3_LIBS) $(FFTW3F_LIBS) + +FT2_CFLAGS = @FT2_CFLAGS@ +FT2_LIBS = @FT2_LIBS@ + +GLPK_CPPFLAGS = @GLPK_CPPFLAGS@ +GLPK_LDFLAGS = @GLPK_LDFLAGS@ +GLPK_LIBS = @GLPK_LIBS@ + +GRAPHICS_CFLAGS = @GRAPHICS_CFLAGS@ +GRAPHICS_LIBS = @GRAPHICS_LIBS@ + +HDF5_CPPFLAGS = @HDF5_CPPFLAGS@ +HDF5_LDFLAGS = @HDF5_LDFLAGS@ +HDF5_LIBS = @HDF5_LIBS@ + +LAPACK_LIBS = @LAPACK_LIBS@ + +LLVM_CPPFLAGS = @LLVM_CPPFLAGS@ +LLVM_LDFLAGS = @LLVM_LDFLAGS@ +LLVM_LIBS = @LLVM_LIBS@ + +MAGICK_CPPFLAGS = @MAGICK_CPPFLAGS@ +MAGICK_LDFLAGS = @MAGICK_LDFLAGS@ +MAGICK_LIBS = @MAGICK_LIBS@ OPENGL_LIBS = @OPENGL_LIBS@ +PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ +PTHREAD_LIBS = @PTHREAD_LIBS@ + +QHULL_CPPFLAGS = @QHULL_CPPFLAGS@ +QHULL_LDFLAGS = @QHULL_LDFLAGS@ +QHULL_LIBS = @QHULL_LIBS@ + QRUPDATE_CPPFLAGS = @QRUPDATE_CPPFLAGS@ QRUPDATE_LDFLAGS = @QRUPDATE_LDFLAGS@ QRUPDATE_LIBS = @QRUPDATE_LIBS@ -READLINE_LIBS = @READLINE_LIBS@ -TERM_LIBS = @TERM_LIBS@ +REGEX_LIBS = @REGEX_LIBS@ -ARPACK_CPPFLAGS = @ARPACK_CPPFLAGS@ -ARPACK_LDFLAGS = @ARPACK_LDFLAGS@ -ARPACK_LIBS = @ARPACK_LIBS@ - -DL_LIBS = @DL_LIBS@ -LIBS = @LIBS@ - -ALL_CPPFLAGS = $(CPPFLAGS) $(HDF5_CPPFLAGS) $(Z_CPPFLAGS) $(LLVM_CPPFLAGS) +READLINE_LIBS = @READLINE_LIBS@ SPARSE_XCPPFLAGS = \ $(CHOLMOD_CPPFLAGS) $(UMFPACK_CPPFLAGS) \ @@ -271,11 +267,20 @@ $(AMD_LIBS) $(CAMD_LIBS) $(COLAMD_LIBS) \ $(CCOLAMD_LIBS) $(CXSPARSE_LIBS) -FFTW_XCPPFLAGS = $(FFTW3_CPPFLAGS) $(FFTW3F_CPPFLAGS) +TERM_LIBS = @TERM_LIBS@ + +UMFPACK_CPPFLAGS = @UMFPACK_CPPFLAGS@ +UMFPACK_LDFLAGS = @UMFPACK_LDFLAGS@ +UMFPACK_LIBS = @UMFPACK_LIBS@ -FFTW_XLDFLAGS = $(FFTW3_LDFLAGS) $(FFTW3F_LDFLAGS) +X11_INCFLAGS = @X11_INCFLAGS@ +X11_LIBS = @X11_LIBS@ -FFTW_XLIBS = $(FFTW3_LIBS) $(FFTW3F_LIBS) +Z_CPPFLAGS = @Z_CPPFLAGS@ +Z_LDFLAGS = @Z_LDFLAGS@ +Z_LIBS = @Z_LIBS@ + +# Miscellaneous USE_64_BIT_IDX_T = @USE_64_BIT_IDX_T@ OCTAVE_IDX_TYPE = @OCTAVE_IDX_TYPE@ @@ -424,6 +429,8 @@ NO_OCT_FILE_STRIP = @NO_OCT_FILE_STRIP@ +# ==================== Octave-specific Makefile rules ==================== + # The following pattern rules and the substitution functions require # GNU make. If you don't have it, get it! @@ -503,9 +510,10 @@ -e "s|%OCTAVE_CONF_DL_LD%|\"${DL_LD}\"|" \ -e "s|%OCTAVE_CONF_DL_LDFLAGS%|\"${DL_LDFLAGS}\"|" \ -e "s|%OCTAVE_CONF_DL_LIBS%|\"${DL_LIBS}\"|" \ + -e "s|%OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%|\"${ENABLE_DYNAMIC_LINKING}\"|" \ + -e "s|%OCTAVE_CONF_EXEEXT%|\"${EXEEXT}\"|" \ -e "s|%OCTAVE_CONF_GCC_VERSION%|\"${GCC_VERSION}\"|" \ -e "s|%OCTAVE_CONF_GXX_VERSION%|\"${GXX_VERSION}\"|" \ - -e "s|%OCTAVE_CONF_EXEEXT%|\"${EXEEXT}\"|" \ -e "s|%OCTAVE_CONF_F77%|\"${F77}\"|" \ -e "s|%OCTAVE_CONF_F77_FLOAT_STORE_FLAG%|\"${F77_FLOAT_STORE_FLAG}\"|" \ -e "s|%OCTAVE_CONF_F77_INTEGER_8_FLAG%|\"${F77_INTEGER_8_FLAG}\"|" \ @@ -519,11 +527,13 @@ -e "s|%OCTAVE_CONF_FFTW3F_LIBS%|\"${FFTW3F_LIBS}\"|" \ -e "s|%OCTAVE_CONF_FLIBS%|\"${FLIBS}\"|" \ -e "s|%OCTAVE_CONF_FPICFLAG%|\"${FPICFLAG}\"|" \ + -e "s|%OCTAVE_CONF_FT2_CFLAGS%|\"${FT2_CFLAGS}\"|" \ -e "s|%OCTAVE_CONF_FT2_LIBS%|\"${FT2_LIBS}\"|" \ -e "s|%OCTAVE_CONF_GLPK_CPPFLAGS%|\"${GLPK_CPPFLAGS}\"|" \ -e "s|%OCTAVE_CONF_GLPK_LDFLAGS%|\"${GLPK_LDFLAGS}\"|" \ -e "s|%OCTAVE_CONF_GLPK_LIBS%|\"${GLPK_LIBS}\"|" \ -e "s|%OCTAVE_CONF_GNUPLOT%|\"${GNUPLOT}\"|" \ + -e "s|%OCTAVE_CONF_GRAPHICS_CFLAGS%|\"${GRAPHICS_CFLAGS}\"|" \ -e "s|%OCTAVE_CONF_GRAPHICS_LIBS%|\"${GRAPHICS_LIBS}\"|" \ -e "s|%OCTAVE_CONF_HDF5_CPPFLAGS%|\"${HDF5_CPPFLAGS}\"|" \ -e "s|%OCTAVE_CONF_HDF5_LDFLAGS%|\"${HDF5_LDFLAGS}\"|" \ @@ -542,13 +552,13 @@ -e "s|%OCTAVE_CONF_LIBOCTAVE%|\"${LIBOCTAVE}\"|" \ -e "s|%OCTAVE_CONF_LIBOCTINTERP%|\"${LIBOCTINTERP}\"|" \ -e "s|%OCTAVE_CONF_LIBS%|\"${LIBS}\"|" \ + -e "s|%OCTAVE_CONF_LLVM_CPPFLAGS%|\"${LLVM_CPPFLAGS}\"|" \ + -e "s|%OCTAVE_CONF_LLVM_LDFLAGS%|\"${LLVM_LDFLAGS}\"|" \ + -e "s|%OCTAVE_CONF_LLVM_LIBS%|\"${LLVM_LIBS}\"|" \ -e "s|%OCTAVE_CONF_LN_S%|\"${LN_S}\"|" \ -e "s|%OCTAVE_CONF_MAGICK_CPPFLAGS%|\"${MAGICK_CPPFLAGS}\"|" \ -e "s|%OCTAVE_CONF_MAGICK_LDFLAGS%|\"${MAGICK_LDFLAGS}\"|" \ -e "s|%OCTAVE_CONF_MAGICK_LIBS%|\"${MAGICK_LIBS}\"|" \ - -e "s|%OCTAVE_CONF_LLVM_CPPFLAGS%|\"${LLVM_CPPFLAGS}\"|" \ - -e "s|%OCTAVE_CONF_LLVM_LDFLAGS%|\"${LLVM_LDFLAGS}\"|" \ - -e "s|%OCTAVE_CONF_LLVM_LIBS%|\"${LLVM_LIBS}\"|" \ -e 's|%OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS%|\"@MKOCTFILE_DL_LDFLAGS@\"|' \ -e "s|%OCTAVE_CONF_OCTAVE_LINK_DEPS%|\"${OCTAVE_LINK_DEPS}\"|" \ -e "s|%OCTAVE_CONF_OCTAVE_LINK_OPTS%|\"${OCTAVE_LINK_OPTS}\"|" \ @@ -588,7 +598,8 @@ -e "s|%OCTAVE_CONF_UMFPACK_LIBS%|\"${UMFPACK_LIBS}\"|" \ -e "s|%OCTAVE_CONF_USE_64_BIT_IDX_T%|\"${USE_64_BIT_IDX_T}\"|" \ -e "s|%OCTAVE_CONF_VERSION%|\"${version}\"|" \ - -e "s|%OCTAVE_CONF_ENABLE_DYNAMIC_LINKING%|\"${ENABLE_DYNAMIC_LINKING}\"|" \ + -e "s|%OCTAVE_CONF_WARN_CFLAGS%|\"${WARN_CFLAGS}\"|" \ + -e "s|%OCTAVE_CONF_WARN_CXXFLAGS%|\"${WARN_CXXFLAGS}\"|" \ -e "s|%OCTAVE_CONF_X11_INCFLAGS%|\"${X11_INCFLAGS}\"|" \ -e "s|%OCTAVE_CONF_X11_LIBS%|\"${X11_LIBS}\"|" \ -e "s|%OCTAVE_CONF_XTRA_CFLAGS%|\"${XTRA_CFLAGS}\"|" \ diff -r 8ae34ffe5c1b -r a42d69d5a36d configure.ac --- a/configure.ac Thu Sep 20 04:08:53 2012 -0500 +++ b/configure.ac Thu Sep 20 10:14:03 2012 -0400 @@ -1798,22 +1798,6 @@ AC_HEADER_DIRENT AC_HEADER_SYS_WAIT -dnl FIXME: We should probably only generate this file if it is missing. -### Produce unistd.h for MSVC target, this simplifies changes in -### Octave source tree and avoid problems with lex-generated code. -case $canonical_host_type in - *-*-msdosmsvc) - AC_MSG_NOTICE([Generating replacement for for MSVC]) - cat << \EOF > unistd.h -/* File generated by configure script. */ -#include -#include -#include -EOF - CPPFLAGS="-I. $CPPFLAGS" - ;; -esac - ## C headers dnl Use multiple AC_CHECKs to avoid line continuations '\' in list @@ -2578,12 +2562,16 @@ QHULL CPPFLAGS: $QHULL_CPPFLAGS QHULL LDFLAGS: $QHULL_LDFLAGS QHULL libraries: $QHULL_LIBS + QRUPDATE CPPFLAGS: $QRUPDATE_CPPFLAGS + QRUPDATE LDFLAGS: $QRUPDATE_LDFLAGS QRUPDATE libraries: $QRUPDATE_LIBS Qt headers: $QT_INCDIR Qt libraries: $QT_LIBDIR READLINE libraries: $READLINE_LIBS REGEX libraries: $REGEX_LIBS TERM libraries: $TERM_LIBS + UMFPACK CPPFLAGS: $UMFPACK_CPPFLAGS + UMFPACK LDFLAGS: $UMFPACK_LDFLAGS UMFPACK libraries: $UMFPACK_LIBS X11 include flags: $X11_INCFLAGS X11 libraries: $X11_LIBS diff -r 8ae34ffe5c1b -r a42d69d5a36d doc/interpreter/contrib.txi --- a/doc/interpreter/contrib.txi Thu Sep 20 04:08:53 2012 -0500 +++ b/doc/interpreter/contrib.txi Thu Sep 20 10:14:03 2012 -0400 @@ -82,7 +82,7 @@ Generate the necessary configuration files: @example -./autogen.sh +./bootstrap @end example @item diff -r 8ae34ffe5c1b -r a42d69d5a36d etc/HACKING --- a/etc/HACKING Thu Sep 20 04:08:53 2012 -0500 +++ b/etc/HACKING Thu Sep 20 10:14:03 2012 -0400 @@ -43,9 +43,9 @@ http://www.gnu.org/software/octave/download.html -After cloning Octave, you will need to run the autogen.sh script: +After cloning Octave, you will need to run the bootstrap script: - $ ./autogen.sh + $ ./bootstrap This script will examine the source tree and generate some Makefile fragments and then runs the bootstrap script. The bootstrap script comes @@ -70,10 +70,10 @@ corresponding Mercurial revision if you update the working directory to a past revision not too far in the past. -Additional options besides --gnulib-srcdir can be passed to autogen.sh and -they will be forwarded without modification to the bootstrap script. +Additional options besides --gnulib-srcdir can be passed to bootstrap and +they will be forwarded without modification to the gnulib bootstrap script. -Once the autogen.sh and bootstrap scripts complete successfully, you may +Once the bootstrap and bootstrap_gnulib scripts complete successfully, you may run $ ./configure @@ -115,8 +115,8 @@ libgnu -- gnulib sources that we use. The files here are copied here from the gnulib directory by the - build-aux/bootstrap script that is run by the - autogen.sh script. + build-aux/bootstrap_gnulib script that is run by the + bootstrap script. liboctave -- C++ interfaces to the numerical libraries, Fortran diff -r 8ae34ffe5c1b -r a42d69d5a36d etc/README.MacOS --- a/etc/README.MacOS Thu Sep 20 04:08:53 2012 -0500 +++ b/etc/README.MacOS Thu Sep 20 10:14:03 2012 -0400 @@ -270,8 +270,8 @@ After installing each of the dependencies, the sources are compiled by setting the proper environment variables and then following the standard build sequence. The following is an example set of variables for a 32-bit build -using gcc-4.2. When building from the sources obtained from the mercurial -archive, ./autogen.sh must be run prior to ./configure. +using gcc-4.2. When building from the sources obtained from the Mercurial +archive, ./bootstrap must be run prior to ./configure. export FINK_PREFIX="/sw" export PREFIX="/usr/local/bin" @@ -385,7 +385,7 @@ Octave may now be built from a local mercurial archive by typing the commands below (these assume gcc-4.4 is installed by macports). - ./autogen.sh + ./bootstrap export PREFIX=/opt/local export CC=/opt/local/bin/gcc-mp-4.4 export CXX=/opt/local/bin/g++-mp-4.4 diff -r 8ae34ffe5c1b -r a42d69d5a36d etc/README.MinGW --- a/etc/README.MinGW Thu Sep 20 04:08:53 2012 -0500 +++ b/etc/README.MinGW Thu Sep 20 10:14:03 2012 -0400 @@ -94,7 +94,7 @@ http://thread.gmane.org/gmane.comp.gnu.octave.bugs/12361/focus=12404 To build development sources from the Mercurial repository you must run - 'autogen.sh' (bootstrap) before running configure and make. This requires + bootstrap before running configure and make. This requires that automake and autoconf tools be installed. diff -r 8ae34ffe5c1b -r a42d69d5a36d libgnu/Makefile.am --- a/libgnu/Makefile.am Thu Sep 20 04:08:53 2012 -0500 +++ b/libgnu/Makefile.am Thu Sep 20 10:14:03 2012 -0400 @@ -21,7 +21,7 @@ # the same distribution terms as the rest of that program. # # Generated by gnulib-tool. -# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=libgnu --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl base64 c-strcase closedir copysign copysignf crypto/md5 fclose fcntl fflush filemode fnmatch fopen fseek ftell getcwd gethostname getopt-gnu gettimeofday glob isatty link lstat mkdir mkfifo mkostemp mkstemp mktime nanosleep nproc opendir pathmax progname readdir readlink rename rewinddir rmdir round roundf sigaction signal sigprocmask sleep stat stdint stdio strftime strptime symlink sys_stat sys_time sys_times time times tmpfile trunc truncf unistd unlink vasprintf +# Reproduce by: gnulib-tool --import --dir=. --local-dir=gl --lib=libgnu --source-base=libgnu --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --no-conditional-dependencies --libtool --macro-prefix=gl base64 canonicalize chdir close closedir copysign copysignf crypto/md5 dup2 fclose fcntl fflush filemode floor floorf fnmatch fopen fseek ftell getcwd gethostname getopt-gnu gettimeofday glob isatty link lstat malloc mkdir mkfifo mkostemp mktime nanosleep nproc open opendir pathmax progname readdir readlink realloc rename rmdir round roundf select sigaction signal sigprocmask sleep stat stdint stdio strerror strftime strptime symlink sys_stat sys_time sys_times time times tmpfile trunc truncf unistd unlink vasprintf AUTOMAKE_OPTIONS = 1.5 gnits @@ -51,6 +51,7 @@ libgnu_la_LDFLAGS += -no-undefined libgnu_la_LDFLAGS += $(COPYSIGNF_LIBM) libgnu_la_LDFLAGS += $(COPYSIGN_LIBM) +libgnu_la_LDFLAGS += $(FLOORF_LIBM) libgnu_la_LDFLAGS += $(FLOOR_LIBM) libgnu_la_LDFLAGS += $(GETHOSTNAME_LIB) libgnu_la_LDFLAGS += $(LIBSOCKET) @@ -96,6 +97,14 @@ ## end gnulib module alloca-opt +## begin gnulib module areadlink-with-size + +libgnu_la_SOURCES += areadlink-with-size.c + +EXTRA_DIST += areadlink.h + +## end gnulib module areadlink-with-size + ## begin gnulib module at-internal @@ -111,17 +120,25 @@ ## end gnulib module base64 +## begin gnulib module bitrotate + +libgnu_la_SOURCES += bitrotate.h + +## end gnulib module bitrotate + ## begin gnulib module c-ctype libgnu_la_SOURCES += c-ctype.h c-ctype.c ## end gnulib module c-ctype -## begin gnulib module c-strcase - -libgnu_la_SOURCES += c-strcase.h c-strcasecmp.c c-strncasecmp.c - -## end gnulib module c-strcase +## begin gnulib module canonicalize + +libgnu_la_SOURCES += canonicalize.c + +EXTRA_DIST += canonicalize.h + +## end gnulib module canonicalize ## begin gnulib module canonicalize-lgpl @@ -294,6 +311,16 @@ ## end gnulib module dirfd +## begin gnulib module dirname + +libgnu_la_SOURCES += dirname.c basename.c + +EXTRA_DIST += stripslash.c + +EXTRA_libgnu_la_SOURCES += stripslash.c + +## end gnulib module dirname + ## begin gnulib module dirname-lgpl libgnu_la_SOURCES += dirname-lgpl.c basename-lgpl.c stripslash.c @@ -466,6 +493,14 @@ ## end gnulib module fflush +## begin gnulib module file-set + +libgnu_la_SOURCES += file-set.c + +EXTRA_DIST += file-set.h + +## end gnulib module file-set + ## begin gnulib module filemode libgnu_la_SOURCES += filemode.c @@ -529,6 +564,15 @@ ## end gnulib module floor +## begin gnulib module floorf + + +EXTRA_DIST += floor.c floorf.c + +EXTRA_libgnu_la_SOURCES += floor.c floorf.c + +## end gnulib module floorf + ## begin gnulib module fnmatch BUILT_SOURCES += $(FNMATCH_H) @@ -751,6 +795,28 @@ ## end gnulib module glob +## begin gnulib module hash + +libgnu_la_SOURCES += hash.c + +EXTRA_DIST += hash.h + +## end gnulib module hash + +## begin gnulib module hash-pjw + +libgnu_la_SOURCES += hash-pjw.h hash-pjw.c + +## end gnulib module hash-pjw + +## begin gnulib module hash-triple + +libgnu_la_SOURCES += hash-triple.c + +EXTRA_DIST += hash-triple.h + +## end gnulib module hash-triple + ## begin gnulib module intprops @@ -895,6 +961,15 @@ ## end gnulib module lstat +## begin gnulib module malloc-gnu + + +EXTRA_DIST += malloc.c + +EXTRA_libgnu_la_SOURCES += malloc.c + +## end gnulib module malloc-gnu + ## begin gnulib module malloc-posix @@ -1276,15 +1351,6 @@ ## end gnulib module mkostemp -## begin gnulib module mkstemp - - -EXTRA_DIST += mkstemp.c - -EXTRA_libgnu_la_SOURCES += mkstemp.c - -## end gnulib module mkstemp - ## begin gnulib module mktime @@ -1409,6 +1475,15 @@ ## end gnulib module readlink +## begin gnulib module realloc-gnu + + +EXTRA_DIST += realloc.c + +EXTRA_libgnu_la_SOURCES += realloc.c + +## end gnulib module realloc-gnu + ## begin gnulib module realloc-posix @@ -1463,6 +1538,14 @@ ## end gnulib module roundf +## begin gnulib module same + +libgnu_la_SOURCES += same.c + +EXTRA_DIST += same.h + +## end gnulib module same + ## begin gnulib module same-inode @@ -2230,6 +2313,24 @@ ## end gnulib module strings +## begin gnulib module strndup + + +EXTRA_DIST += strndup.c + +EXTRA_libgnu_la_SOURCES += strndup.c + +## end gnulib module strndup + +## begin gnulib module strnlen + + +EXTRA_DIST += strnlen.c + +EXTRA_libgnu_la_SOURCES += strnlen.c + +## end gnulib module strnlen + ## begin gnulib module strnlen1 libgnu_la_SOURCES += strnlen1.h strnlen1.c @@ -2970,12 +3071,47 @@ ## end gnulib module wctype-h +## begin gnulib module xalloc + +libgnu_la_SOURCES += xmalloc.c + +EXTRA_DIST += xalloc.h + +## end gnulib module xalloc + +## begin gnulib module xalloc-die + +libgnu_la_SOURCES += xalloc-die.c + +## end gnulib module xalloc-die + +## begin gnulib module xalloc-oversized + + +EXTRA_DIST += xalloc-oversized.h + +## end gnulib module xalloc-oversized + +## begin gnulib module xgetcwd + +libgnu_la_SOURCES += xgetcwd.c + +EXTRA_DIST += xgetcwd.h + +## end gnulib module xgetcwd + ## begin gnulib module xsize libgnu_la_SOURCES += xsize.h ## end gnulib module xsize +## begin gnulib module xstrndup + +libgnu_la_SOURCES += xstrndup.h xstrndup.c + +## end gnulib module xstrndup + mostlyclean-local: mostlyclean-generic @for dir in '' $(MOSTLYCLEANDIRS); do \ diff -r 8ae34ffe5c1b -r a42d69d5a36d libgui/src/main-window.cc --- a/libgui/src/main-window.cc Thu Sep 20 04:08:53 2012 -0500 +++ b/libgui/src/main-window.cc Thu Sep 20 10:14:03 2012 -0400 @@ -42,10 +42,11 @@ #include "octave-link.h" #include "settings-dialog.h" -#include "debug.h" +#include "builtins.h" +#include "defaults.h" #include "load-save.h" #include "toplev.h" -#include "variables.h" +#include "version.h" #include "cmd-hist.h" #include "oct-env.h" @@ -376,22 +377,7 @@ void main_window::show_about_octave () { - QString message = - "GNU Octave\n" - "Copyright (C) 2009 John W. Eaton and others.\n" - "This is free software; see the source code for copying conditions." - "There is ABSOLUTELY NO WARRANTY; not even for MERCHANTABILITY or" - "FITNESS FOR A PARTICULAR PURPOSE. For details, type `warranty'.\n" - "\n" - "Additional information about Octave is available at http://www.octave.org.\n" - "\n" - "Please contribute if you find this software useful." - "For more information, visit http://www.octave.org/help-wanted.html\n" - "\n" - "Report bugs to (but first, please read" - "http://www.octave.org/bugs.html to learn how to write a helpful report).\n" - "\n" - "For information about changes from previous versions, type `news'.\n"; + QString message = OCTAVE_STARTUP_MESSAGE; QMessageBox::about (this, tr ("About Octave"), message); } @@ -883,19 +869,19 @@ void main_window::save_workspace_callback (const std::string& file) { - save_workspace (file); + Fsave (ovl (file)); } void main_window::load_workspace_callback (const std::string& file) { - load_workspace (file); + Fload (ovl (file)); } void main_window::clear_workspace_callback (void) { - clear_current_scope (); + Fclear (); } void @@ -909,41 +895,41 @@ void main_window::change_directory_callback (const std::string& directory) { - octave_env::chdir (directory); + Fcd (ovl (directory)); } void main_window::debug_continue_callback (void) { - debug_continue (); + Fdbcont (); } void main_window::debug_step_into_callback (void) { - debug_step ("in"); + Fdbstep (ovl ("in")); } void main_window::debug_step_over_callback (void) { - debug_step (); + Fdbstep (); } void main_window::debug_step_out_callback (void) { - debug_step ("out"); + Fdbstep (ovl ("out")); } void main_window::debug_quit_callback (void) { - debug_quit (); + Fdbquit (); } void main_window::exit_callback (void) { - clean_up_and_exit (0); + Fquit (); } diff -r 8ae34ffe5c1b -r a42d69d5a36d libgui/src/module.mk --- a/libgui/src/module.mk Thu Sep 20 04:08:53 2012 -0500 +++ b/libgui/src/module.mk Thu Sep 20 10:14:03 2012 -0400 @@ -141,7 +141,7 @@ -I$(top_builddir)/liboctave/operators -I$(top_srcdir)/liboctave/operators \ -I$(top_srcdir)/liboctave/system \ -I$(top_srcdir)/liboctave/util \ - -I$(top_srcdir)/libinterp \ + -I$(top_builddir)/libinterp -I$(top_srcdir)/libinterp \ -I$(top_builddir)/libinterp/parse-tree -I$(top_srcdir)/libinterp/parse-tree \ -I$(top_builddir)/libinterp/interp-core -I$(top_srcdir)/libinterp/interp-core \ -I$(top_builddir)/libinterp/interpfcn -I$(top_srcdir)/libinterp/interpfcn \ diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/Makefile.am --- a/libinterp/Makefile.am Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/Makefile.am Thu Sep 20 10:14:03 2012 -0400 @@ -53,6 +53,7 @@ interpfcn/defaults.h \ interpfcn/graphics-props.cc \ interpfcn/graphics.h \ + builtin-defun-decls.h \ operators/ops.cc \ parse-tree/lex.cc \ parse-tree/oct-gperf.h \ @@ -73,6 +74,7 @@ interp-core/oct-errno.cc \ interpfcn/defaults.h \ interpfcn/graphics.h \ + builtin-defun-decls.h \ operators/ops.cc \ oct-conf.h \ version.h \ @@ -100,6 +102,7 @@ interpfcn/graphics-props.cc \ parse-tree/oct-gperf.h \ builtins.h \ + builtin-defun-decls.h \ octave.h \ $(OCTAVE_VALUE_INC) \ $(PARSE_TREE_INC) \ @@ -157,6 +160,7 @@ interpfcn/defaults.h \ interpfcn/graphics.h \ operators/ops.cc \ + builtin-defun-decls.h \ builtins.cc \ oct-conf.h \ version.h \ @@ -188,9 +192,6 @@ -bindir $(bindir) \ $(LIBOCTINTERP_LINK_OPTS) -## FIXME: Does this rule need to be uncommented? -#fft.df fft.lo fft2.df fft2.lo fftn.df fftn.lo: CPPFLAGS += $(FFTW_XCPPFLAGS) - ## Section for defining and creating DEF_FILES SRC_DEF_FILES := $(shell $(srcdir)/find-defun-files.sh "$(srcdir)" $(DIST_SRC)) @@ -210,6 +211,8 @@ $(DEF_FILES): $(OPT_HANDLERS) $(OPT_INC) +## FIXME: The following two variables are deprecated and should be removed +## in Octave version 3.12. DLL_CDEFS = @OCTINTERP_DLL_DEFS@ DLL_CXXDEFS = @OCTINTERP_DLL_DEFS@ @@ -247,7 +250,11 @@ mv $@-t $@ builtins.cc: $(DEF_FILES) mkbuiltins - $(srcdir)/mkbuiltins $(DEF_FILES) > $@-t + $(srcdir)/mkbuiltins --source $(DEF_FILES) > $@-t + mv $@-t $@ + +builtin-defun-decls.h: $(SRC_DEF_FILES) mkbuiltins + $(srcdir)/mkbuiltins --header $(SRC_DEF_FILES) > $@-t mv $@-t $@ if AMCOND_ENABLE_DYNAMIC_LINKING diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/builtins.h --- a/libinterp/builtins.h Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/builtins.h Thu Sep 20 10:14:03 2012 -0400 @@ -23,6 +23,10 @@ #if !defined (octave_builtins_h) #define octave_builtins_h 1 +#if !defined (MAKE_BUILTINS) +#include "builtin-defun-decls.h" +#endif + extern OCTINTERP_API void install_builtins (void); #endif diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/corefcn/mgorth.cc --- a/libinterp/corefcn/mgorth.cc Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/corefcn/mgorth.cc Thu Sep 20 10:14:03 2012 -0400 @@ -51,15 +51,16 @@ DEFUN (mgorth, args, nargout, "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {[@var{y}, @var{h}] =} mgorth (@var{x}, @var{v})\n\ -Orthogonalize a given column vector @var{x} with respect to a given\n\ -orthonormal basis @var{v} using a modified Gram-Schmidt orthogonalization. \n\ +Orthogonalize a given column vector @var{x} with respect to a set of\n\ +orthonormal vectors comprising the columns of @var{v}\n\ +using the modified Gram-Schmidt method.\n\ On exit, @var{y} is a unit vector such that:\n\ \n\ @example\n\ @group\n\ norm (@var{y}) = 1\n\ @var{v}' * @var{y} = 0\n\ - @var{x} = @var{h}*[@var{v}, @var{y}]\n\ + @var{x} = [@var{v}, @var{y}]*@var{h}'\n\ @end group\n\ @end example\n\ \n\ @@ -81,7 +82,7 @@ if (arg_v.ndims () != 2 || arg_x.ndims () != 2 || arg_x.columns () != 1 || arg_v.rows () != arg_x.rows ()) { - error ("mgorth: V should me a matrix, and X a column vector with" + error ("mgorth: V should be a matrix, and X a column vector with" " the same number of rows as V."); return retval; } diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/corefcn/module.mk --- a/libinterp/corefcn/module.mk Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/corefcn/module.mk Thu Sep 20 10:14:03 2012 -0400 @@ -95,5 +95,5 @@ noinst_LTLIBRARIES += corefcn/libcorefcn.la corefcn_libcorefcn_la_SOURCES = $(COREFCN_SRC) -corefcn_libcorefcn_la_CPPFLAGS = $(liboctinterp_la_CPPFLAGS) +corefcn_libcorefcn_la_CPPFLAGS = $(liboctinterp_la_CPPFLAGS) $(FFTW_XCPPFLAGS) diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/dldfcn/__init_gnuplot__.cc --- a/libinterp/dldfcn/__init_gnuplot__.cc Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/dldfcn/__init_gnuplot__.cc Thu Sep 20 10:14:03 2012 -0400 @@ -33,6 +33,7 @@ #include #endif +#include "builtins.h" #include "defun-dld.h" #include "error.h" #include "graphics.h" @@ -148,24 +149,17 @@ if (! error_state) { - args(1) = "\nquit;\n"; - args(0) = fids(0); - feval ("fputs", args); + Ffputs (ovl (fids(0), "\nquit;\n")); - args.resize (1); - feval ("fflush", args); - feval ("pclose", args); + Ffflush (ovl (fids(0))); + Fpclose (ovl (fids(0))); if (fids.numel () > 1) { - args(0) = fids(1); - feval ("pclose", args); + Fpclose (ovl (fids(1))); if (fids.numel () > 2) - { - args(0) = fids(2); - feval ("waitpid", args); - } + Fwaitpid (ovl (fids(2))); } } } diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/interp-core/defun-dld.h --- a/libinterp/interp-core/defun-dld.h Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/interp-core/defun-dld.h Thu Sep 20 10:14:03 2012 -0400 @@ -57,14 +57,14 @@ #else #define DEFUN_DLD(name, args_name, nargout_name, doc) \ - DECLARE_FUN_NO_DEFAULTS (name, args_name, nargout_name); \ + DECLARE_FUN (name, args_name, nargout_name); \ DEFINE_FUN_INSTALLER_FUN (name, doc) \ - DECLARE_FUN_NO_DEFAULTS (name, args_name, nargout_name) + DECLARE_FUN (name, args_name, nargout_name) #define DEFUNX_DLD(name, fname, gname, args_name, nargout_name, doc) \ - DECLARE_FUNX_NO_DEFAULTS (fname, args_name, nargout_name); \ + DECLARE_FUNX (fname, args_name, nargout_name); \ DEFINE_FUNX_INSTALLER_FUN (name, fname, gname, doc) \ - DECLARE_FUNX_NO_DEFAULTS (fname, args_name, nargout_name) + DECLARE_FUNX (fname, args_name, nargout_name) #endif diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/interp-core/defun-int.h --- a/libinterp/interp-core/defun-int.h Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/interp-core/defun-int.h Thu Sep 20 10:14:03 2012 -0400 @@ -77,23 +77,13 @@ extern OCTINTERP_API void defun_isargout (int, int, bool *); -#define DECLARE_FUNXX(name, args_decl, nargout_decl) \ - OCTAVE_EXPORT octave_value_list name (args_decl, nargout_decl) - #define DECLARE_FUNX(name, args_name, nargout_name) \ - DECLARE_FUNXX (name, \ - const octave_value_list& args_name = octave_value_list (), \ - int nargout_name = 0) - -#define DECLARE_FUNX_NO_DEFAULTS(name, args_name, nargout_name) \ - DECLARE_FUNXX (name, const octave_value_list& args_name, int nargout_name) + OCTAVE_EXPORT octave_value_list \ + name (const octave_value_list& args_name, int nargout_name) #define DECLARE_FUN(name, args_name, nargout_name) \ DECLARE_FUNX (F ## name, args_name, nargout_name) -#define DECLARE_FUN_NO_DEFAULTS(name, args_name, nargout_name) \ - DECLARE_FUNX_NO_DEFAULTS (F ## name, args_name, nargout_name) - // Define the code that will be used to insert the new function into // the symbol table. We look for this name instead of the actual // function so that we can easily install the doc std::string too. diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/interp-core/module.mk --- a/libinterp/interp-core/module.mk Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/interp-core/module.mk Thu Sep 20 10:14:03 2012 -0400 @@ -111,8 +111,11 @@ $(JIT_SRC) \ $(C_INTERP_CORE_SRC) -## FIXME: I don't believe this rule actually fires -display.df display.lo: CPPFLAGS += $(X11_FLAGS) +## FIXME: Automake does not support per-object rules. +## These rules could be emulated by creating a new convenience +## library and using per-library rules. Or we can just live +## without the rule since there haven't been any problems. (09/18/2012) +#display.df display.lo: CPPFLAGS += $(X11_FLAGS) ## Special rules for sources which must be built before rest of compilation. interp-core/oct-errno.cc: interp-core/oct-errno.in.cc Makefile diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/interp-core/oct-obj.h --- a/libinterp/interp-core/oct-obj.h Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/interp-core/oct-obj.h Thu Sep 20 10:14:03 2012 -0400 @@ -166,4 +166,152 @@ DECLARE_OCTAVE_ALLOCATOR }; +// Make it easy to build argument lists for built-in functions or for +// returning values. + +inline octave_value_list +ovl (const octave_value& a0) +{ + octave_value_list retval; + retval(0) = a0; + return retval; +} + +inline octave_value_list +ovl (const octave_value& a0, const octave_value& a1) +{ + octave_value_list retval; + retval(1) = a1; + retval(0) = a0; + return retval; +} + +inline octave_value_list +ovl (const octave_value& a0, const octave_value& a1, + const octave_value& a2) +{ + octave_value_list retval; + retval(2) = a2; + retval(1) = a1; + retval(0) = a0; + return retval; +} + +inline octave_value_list +ovl (const octave_value& a0, const octave_value& a1, + const octave_value& a2, const octave_value& a3) +{ + octave_value_list retval; + retval(3) = a3; + retval(2) = a2; + retval(1) = a1; + retval(0) = a0; + return retval; +} + +inline octave_value_list +ovl (const octave_value& a0, const octave_value& a1, + const octave_value& a2, const octave_value& a3, + const octave_value& a4) +{ + octave_value_list retval; + retval(4) = a4; + retval(3) = a3; + retval(2) = a2; + retval(1) = a1; + retval(0) = a0; + return retval; +} + +inline octave_value_list +ovl (const octave_value& a0, const octave_value& a1, + const octave_value& a2, const octave_value& a3, + const octave_value& a4, const octave_value& a5) +{ + octave_value_list retval; + retval(5) = a5; + retval(4) = a4; + retval(3) = a3; + retval(2) = a2; + retval(1) = a1; + retval(0) = a0; + return retval; +} + +inline octave_value_list +ovl (const octave_value& a0, const octave_value& a1, + const octave_value& a2, const octave_value& a3, + const octave_value& a4, const octave_value& a5, + const octave_value& a6) +{ + octave_value_list retval; + retval(6) = a6; + retval(5) = a5; + retval(4) = a4; + retval(3) = a3; + retval(2) = a2; + retval(1) = a1; + retval(0) = a0; + return retval; +} + +inline octave_value_list +ovl (const octave_value& a0, const octave_value& a1, + const octave_value& a2, const octave_value& a3, + const octave_value& a4, const octave_value& a5, + const octave_value& a6, const octave_value& a7) +{ + octave_value_list retval; + retval(7) = a7; + retval(6) = a6; + retval(5) = a5; + retval(4) = a4; + retval(3) = a3; + retval(2) = a2; + retval(1) = a1; + retval(0) = a0; + return retval; +} + +inline octave_value_list +ovl (const octave_value& a0, const octave_value& a1, + const octave_value& a2, const octave_value& a3, + const octave_value& a4, const octave_value& a5, + const octave_value& a6, const octave_value& a7, + const octave_value& a8) +{ + octave_value_list retval; + retval(8) = a8; + retval(7) = a7; + retval(6) = a6; + retval(5) = a5; + retval(4) = a4; + retval(3) = a3; + retval(2) = a2; + retval(1) = a1; + retval(0) = a0; + return retval; +} + +inline octave_value_list +ovl (const octave_value& a0, const octave_value& a1, + const octave_value& a2, const octave_value& a3, + const octave_value& a4, const octave_value& a5, + const octave_value& a6, const octave_value& a7, + const octave_value& a8, const octave_value& a9) +{ + octave_value_list retval; + retval(9) = a9; + retval(8) = a8; + retval(7) = a7; + retval(6) = a6; + retval(5) = a5; + retval(4) = a4; + retval(3) = a3; + retval(2) = a2; + retval(1) = a1; + retval(0) = a0; + return retval; +} + #endif diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/interpfcn/debug.cc --- a/libinterp/interpfcn/debug.cc Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/interpfcn/debug.cc Thu Sep 20 10:14:03 2012 -0400 @@ -1201,17 +1201,6 @@ DEFALIAS (dbnext, dbstep); -void -debug_step (const std::string& what) -{ - octave_value_list args; - - if (! what.empty ()) - args(0) = what; - - Fdbstep (args); -} - DEFUN (dbcont, args, , "-*- texinfo -*-\n\ @deftypefn {Command} {} dbcont\n\ @@ -1236,12 +1225,6 @@ return octave_value_list (); } -void -debug_continue (void) -{ - Fdbcont (); -} - DEFUN (dbquit, args, , "-*- texinfo -*-\n\ @deftypefn {Command} {} dbquit\n\ @@ -1269,12 +1252,6 @@ return octave_value_list (); } -void -debug_quit (void) -{ - Fdbquit (); -} - DEFUN (isdebugmode, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} isdebugmode ()\n\ diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/interpfcn/debug.h --- a/libinterp/interpfcn/debug.h Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/interpfcn/debug.h Thu Sep 20 10:14:03 2012 -0400 @@ -131,10 +131,4 @@ extern std::string get_file_line (const std::string& fname, size_t line); -extern void OCTINTERP_API debug_continue (void); - -extern void OCTINTERP_API debug_step (const std::string& what = std::string ()); - -extern void OCTINTERP_API debug_quit (void); - #endif diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/interpfcn/graphics.cc --- a/libinterp/interpfcn/graphics.cc Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/interpfcn/graphics.cc Thu Sep 20 10:14:03 2012 -0400 @@ -42,6 +42,7 @@ #include "oct-locbuf.h" #include "singleton-cleanup.h" +#include "builtins.h" #include "cutils.h" #include "defun.h" #include "display.h" @@ -8202,7 +8203,7 @@ if (Vdrawnow_requested && ! old_Vdrawnow_requested) { - feval ("drawnow"); + Fdrawnow (); Vdrawnow_requested = false; } diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/interpfcn/load-save.cc --- a/libinterp/interpfcn/load-save.cc Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/interpfcn/load-save.cc Thu Sep 20 10:14:03 2012 -0400 @@ -1443,17 +1443,6 @@ } } -void -load_workspace (const std::string& file) -{ - octave_value_list args; - - if (! file.empty ()) - args(0) = file; - - Fload (args); -} - DEFUN (save, args, , "-*- texinfo -*-\n\ @deftypefn {Command} {} save file\n\ @@ -1755,17 +1744,6 @@ return retval; } -void -save_workspace (const std::string& file) -{ - octave_value_list args; - - if (! file.empty ()) - args(0) = file; - - Fsave (args); -} - DEFUN (crash_dumps_octave_core, args, nargout, "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} crash_dumps_octave_core ()\n\ diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/interpfcn/load-save.h --- a/libinterp/interpfcn/load-save.h Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/interpfcn/load-save.h Thu Sep 20 10:14:03 2012 -0400 @@ -87,7 +87,4 @@ extern void write_header (std::ostream& os, load_save_format format); -extern OCTINTERP_API void load_workspace (const std::string& file); -extern OCTINTERP_API void save_workspace (const std::string& file); - #endif diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/interpfcn/module.mk --- a/libinterp/interpfcn/module.mk Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/interpfcn/module.mk Thu Sep 20 10:14:03 2012 -0400 @@ -65,13 +65,6 @@ $(AWK) -v emit_graphics_props=1 -f $(srcdir)/genprops.awk $< > $@-t mv $@-t $@ -## FIXME: Do these rules work correctly after transplant to interpfcn/ dir? -__fltk_uigetfile__.lo __fltk_uigetfile__.o: \ - AM_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(AM_CXXFLAGS) $(GRAPHICS_CFLAGS)) - -__init_fltk__.lo __init_fltk__.o: \ - AM_CXXFLAGS := $(filter-out $(DLL_CXXDEFS), $(AM_CXXFLAGS) $(GRAPHICS_CFLAGS)) - noinst_LTLIBRARIES += interpfcn/libinterpfcn.la interpfcn_libinterpfcn_la_SOURCES = $(INTERPFCN_SRC) diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/interpfcn/sysdep.cc --- a/libinterp/interpfcn/sysdep.cc Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/interpfcn/sysdep.cc Thu Sep 20 10:14:03 2012 -0400 @@ -69,6 +69,7 @@ #include "quit.h" #include "Cell.h" +#include "builtins.h" #include "defun.h" #include "error.h" #include "input.h" @@ -645,7 +646,7 @@ if (interactive || forced_interactive) { - feval ("drawnow"); + Fdrawnow (); int c = octave_kbhit (args.length () == 0); @@ -697,7 +698,7 @@ { if (! xisnan (dval)) { - feval ("drawnow"); + Fdrawnow (); if (xisinf (dval)) { @@ -713,7 +714,7 @@ } else { - feval ("drawnow"); + Fdrawnow (); flush_octave_stdout (); octave_kbhit (); } @@ -746,7 +747,7 @@ warning ("sleep: NaN is an invalid delay"); else { - feval ("drawnow"); + Fdrawnow (); octave_sleep (dval); } } @@ -786,7 +787,7 @@ warning ("usleep: NaN is an invalid delay"); else { - feval ("drawnow"); + Fdrawnow (); int delay = NINT (dval); diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/interpfcn/toplev.cc --- a/libinterp/interpfcn/toplev.cc Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/interpfcn/toplev.cc Thu Sep 20 10:14:03 2012 -0400 @@ -1249,10 +1249,10 @@ { false, "ARPACK_LDFLAGS", OCTAVE_CONF_ARPACK_LDFLAGS }, { false, "ARPACK_LIBS", OCTAVE_CONF_ARPACK_LIBS }, { false, "BLAS_LIBS", OCTAVE_CONF_BLAS_LIBS }, - { false, "CARBON_LIBS", OCTAVE_CONF_CARBON_LIBS }, { false, "CAMD_CPPFLAGS", OCTAVE_CONF_CAMD_CPPFLAGS }, { false, "CAMD_LDFLAGS", OCTAVE_CONF_CAMD_LDFLAGS }, { false, "CAMD_LIBS", OCTAVE_CONF_CAMD_LIBS }, + { false, "CARBON_LIBS", OCTAVE_CONF_CARBON_LIBS }, { false, "CC", OCTAVE_CONF_CC }, // FIXME: CC_VERSION is deprecated. Remove in version 3.12 { false, "CC_VERSION", OCTAVE_CONF_CC_VERSION }, @@ -1302,11 +1302,13 @@ { false, "FFTW3F_LIBS", OCTAVE_CONF_FFTW3F_LIBS }, { false, "FLIBS", OCTAVE_CONF_FLIBS }, { false, "FPICFLAG", OCTAVE_CONF_FPICFLAG }, + { false, "FT2_CFLAGS", OCTAVE_CONF_FT2_CFLAGS }, { false, "FT2_LIBS", OCTAVE_CONF_FT2_LIBS }, { false, "GLPK_CPPFLAGS", OCTAVE_CONF_GLPK_CPPFLAGS }, { false, "GLPK_LDFLAGS", OCTAVE_CONF_GLPK_LDFLAGS }, { false, "GLPK_LIBS", OCTAVE_CONF_GLPK_LIBS }, { false, "GNUPLOT", OCTAVE_CONF_GNUPLOT }, + { false, "GRAPHICS_CFLAGS", OCTAVE_CONF_GRAPHICS_CFLAGS }, { false, "GRAPHICS_LIBS", OCTAVE_CONF_GRAPHICS_LIBS }, { false, "HDF5_CPPFLAGS", OCTAVE_CONF_HDF5_CPPFLAGS }, { false, "HDF5_LDFLAGS", OCTAVE_CONF_HDF5_LDFLAGS }, @@ -1323,13 +1325,13 @@ { false, "LIBOCTAVE", OCTAVE_CONF_LIBOCTAVE }, { false, "LIBOCTINTERP", OCTAVE_CONF_LIBOCTINTERP }, { false, "LIBS", OCTAVE_CONF_LIBS }, + { false, "LLVM_CPPFLAGS", OCTAVE_CONF_LLVM_CPPFLAGS }, + { false, "LLVM_LDFLAGS", OCTAVE_CONF_LLVM_LDFLAGS }, + { false, "LLVM_LIBS", OCTAVE_CONF_LLVM_LIBS }, { false, "LN_S", OCTAVE_CONF_LN_S }, { false, "MAGICK_CPPFLAGS", OCTAVE_CONF_MAGICK_CPPFLAGS }, { false, "MAGICK_LDFLAGS", OCTAVE_CONF_MAGICK_LDFLAGS }, { false, "MAGICK_LIBS", OCTAVE_CONF_MAGICK_LIBS }, - { false, "LLVM_CPPFLAGS", OCTAVE_CONF_LLVM_CPPFLAGS }, - { false, "LLVM_LDFLAGS", OCTAVE_CONF_LLVM_LDFLAGS }, - { false, "LLVM_LIBS", OCTAVE_CONF_LLVM_LIBS }, { false, "MKOCTFILE_DL_LDFLAGS", OCTAVE_CONF_MKOCTFILE_DL_LDFLAGS }, { false, "OCTAVE_LINK_DEPS", OCTAVE_CONF_OCTAVE_LINK_DEPS }, { false, "OCTAVE_LINK_OPTS", OCTAVE_CONF_OCTAVE_LINK_OPTS }, @@ -1364,6 +1366,8 @@ { false, "UMFPACK_LDFLAGS", OCTAVE_CONF_UMFPACK_LDFLAGS }, { false, "UMFPACK_LIBS", OCTAVE_CONF_UMFPACK_LIBS }, { false, "USE_64_BIT_IDX_T", OCTAVE_CONF_USE_64_BIT_IDX_T }, + { false, "WARN_CFLAGS", OCTAVE_CONF_WARN_CFLAGS }, + { false, "WARN_CXXFLAGS", OCTAVE_CONF_WARN_CXXFLAGS }, { false, "X11_INCFLAGS", OCTAVE_CONF_X11_INCFLAGS }, { false, "X11_LIBS", OCTAVE_CONF_X11_LIBS }, { false, "XTRA_CFLAGS", OCTAVE_CONF_XTRA_CFLAGS }, diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/interpfcn/variables.cc --- a/libinterp/interpfcn/variables.cc Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/interpfcn/variables.cc Thu Sep 20 10:14:03 2012 -0400 @@ -2460,12 +2460,6 @@ return retval; } -void -clear_current_scope (void) -{ - Fclear (); -} - DEFUN (whos_line_format, args, nargout, "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {@var{val} =} whos_line_format ()\n\ diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/interpfcn/variables.h --- a/libinterp/interpfcn/variables.h Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/interpfcn/variables.h Thu Sep 20 10:14:03 2012 -0400 @@ -148,7 +148,4 @@ extern OCTINTERP_API void maybe_missing_function_hook (const std::string& name); -// Equivalent to Fclear without any arguments. -extern OCTINTERP_API void clear_current_scope (void); - #endif diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/mkbuiltins --- a/libinterp/mkbuiltins Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/mkbuiltins Thu Sep 20 10:14:03 2012 -0400 @@ -18,14 +18,59 @@ # along with Octave; see the file COPYING. If not, see # . -if test $# -eq 0; then - echo "usage: mkbuiltins f1 f2 ..." 1>&2 +if test $# -lt 2; then + echo "usage: mkbuiltins --header|--source f1 f2 ..." 1>&2 exit 1 fi SED=${SED:-'sed'} -cat << \EOF +make_header=false +make_source=false +case "$1" in + --header) + make_header=true + shift + ;; + --source) + make_source=true + shift + ;; + *) + echo "mkbuiltins: unrecognized option: $1" 1>&2 + exit 1 + ;; +esac + +if $make_header; then + + cat << \EOF +// DO NOT EDIT! Generated automatically by mkbuiltins. + +#if !defined (octave_builtin_defun_decls_h) +#define octave_builtin_defun_decls_h 1 + +#include "oct-obj.h" + +#define DEFUN_DECL(name) \ + extern OCTINTERP_API octave_value_list \ + name (const octave_value_list& = octave_value_list (), int = 0); + +EOF + + $SED -n -e 's/ *\(XDEFUN\|XDEFCONSTFUN\)_INTERNAL *( *\([_A-Za-z][_A-Za-z0-9]*\) *,.*$/DEFUN_DECL (F\2);/p; s/^ *XDEFUNX_INTERNAL *( *"\([_A-Za-z][_A-Za-z0-9]*\)" *,.*$/DEFUN_DECL (F\1);/p' "$@" + + cat << \EOF + +#undef DEFUN_DECL + +#endif + +EOF + +else + + cat << \EOF // DO NOT EDIT! Generated automatically by mkbuiltins. #ifdef HAVE_CONFIG_H @@ -79,33 +124,35 @@ EOF -for arg -do - fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'` - echo "static void" - echo "install_${fcn}_fcns (void)" - echo "{" - cat "$arg" - echo "}" - echo "" -done + for arg + do + fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'` + echo "static void" + echo "install_${fcn}_fcns (void)" + echo "{" + cat "$arg" + echo "}" + echo "" + done -cat << \EOF + cat << \EOF void install_builtins (void) { EOF -for arg -do - fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'` - echo " install_${fcn}_fcns ();" -done + for arg + do + fcn=`echo "$arg" | $SED 's,.*/,,; s/\.df//; s/-/_/g;'` + echo " install_${fcn}_fcns ();" + done -cat << \EOF + cat << \EOF } EOF +fi + exit 0 diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/oct-conf.in.h --- a/libinterp/oct-conf.in.h Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/oct-conf.in.h Thu Sep 20 10:14:03 2012 -0400 @@ -214,6 +214,14 @@ #define OCTAVE_CONF_DL_LIBS %OCTAVE_CONF_DL_LIBS% #endif +#ifndef OCTAVE_CONF_ENABLE_DYNAMIC_LINKING +#define OCTAVE_CONF_ENABLE_DYNAMIC_LINKING %OCTAVE_CONF_ENABLE_DYNAMIC_LINKING% +#endif + +#ifndef OCTAVE_CONF_EXEEXT +#define OCTAVE_CONF_EXEEXT %OCTAVE_CONF_EXEEXT% +#endif + #ifndef OCTAVE_CONF_GCC_VERSION #define OCTAVE_CONF_GCC_VERSION %OCTAVE_CONF_GCC_VERSION% #endif @@ -222,10 +230,6 @@ #define OCTAVE_CONF_GXX_VERSION %OCTAVE_CONF_GXX_VERSION% #endif -#ifndef OCTAVE_CONF_EXEEXT -#define OCTAVE_CONF_EXEEXT %OCTAVE_CONF_EXEEXT% -#endif - #ifndef OCTAVE_CONF_F77 #define OCTAVE_CONF_F77 %OCTAVE_CONF_F77% #endif @@ -278,6 +282,10 @@ #define OCTAVE_CONF_FPICFLAG %OCTAVE_CONF_FPICFLAG% #endif +#ifndef OCTAVE_CONF_FT2_CFLAGS +#define OCTAVE_CONF_FT2_CFLAGS %OCTAVE_CONF_FT2_CFLAGS% +#endif + #ifndef OCTAVE_CONF_FT2_LIBS #define OCTAVE_CONF_FT2_LIBS %OCTAVE_CONF_FT2_LIBS% #endif @@ -298,6 +306,10 @@ #define OCTAVE_CONF_GNUPLOT %OCTAVE_CONF_GNUPLOT% #endif +#ifndef OCTAVE_CONF_GRAPHICS_CFLAGS +#define OCTAVE_CONF_GRAPHICS_CFLAGS %OCTAVE_CONF_GRAPHICS_CFLAGS% +#endif + #ifndef OCTAVE_CONF_GRAPHICS_LIBS #define OCTAVE_CONF_GRAPHICS_LIBS %OCTAVE_CONF_GRAPHICS_LIBS% #endif @@ -550,8 +562,12 @@ #define OCTAVE_CONF_USE_64_BIT_IDX_T %OCTAVE_CONF_USE_64_BIT_IDX_T% #endif -#ifndef OCTAVE_CONF_ENABLE_DYNAMIC_LINKING -#define OCTAVE_CONF_ENABLE_DYNAMIC_LINKING %OCTAVE_CONF_ENABLE_DYNAMIC_LINKING% +#ifndef OCTAVE_CONF_WARN_CFLAGS +#define OCTAVE_CONF_WARN_CFLAGS %OCTAVE_CONF_WARN_CFLAGS% +#endif + +#ifndef OCTAVE_CONF_WARN_CXXFLAGS +#define OCTAVE_CONF_WARN_CXXFLAGS %OCTAVE_CONF_WARN_CXXFLAGS% #endif #ifndef OCTAVE_CONF_X11_INCFLAGS diff -r 8ae34ffe5c1b -r a42d69d5a36d libinterp/parse-tree/module.mk --- a/libinterp/parse-tree/module.mk Thu Sep 20 04:08:53 2012 -0500 +++ b/libinterp/parse-tree/module.mk Thu Sep 20 10:14:03 2012 -0400 @@ -11,8 +11,12 @@ parse-tree/lex.ll \ parse-tree/oct-parse.yy -lex.lo lex.o oct-parse.lo oct-parse.o: \ - AM_CXXFLAGS := $(filter-out -Wold-style-cast, $(AM_CXXFLAGS)) +## FIXME: Automake does not support per-object rules. +## These rules could be emulated by creating a new convenience +## library and using per-library rules. Or we can just live +## with the extra warnings about old-sytle-casts. (09/18/2012) +#lex.lo lex.o oct-parse.lo oct-parse.o: \ +# AM_CXXFLAGS := $(filter-out -Wold-style-cast, $(AM_CXXFLAGS)) PARSE_TREE_INC = \ parse-tree/pt-all.h \ diff -r 8ae34ffe5c1b -r a42d69d5a36d liboctave/Makefile.am --- a/liboctave/Makefile.am Thu Sep 20 04:08:53 2012 -0500 +++ b/liboctave/Makefile.am Thu Sep 20 10:14:03 2012 -0400 @@ -85,18 +85,11 @@ ## It has no source code itself. liboctave_la_SOURCES = -## FIXME: SPARSE, FFTW, and ARPACK flags should probably only be in the -## particular convenience library that needs them. -liboctave_la_CPPFLAGS = \ - @OCTAVE_DLL_DEFS@ \ - $(SPARSE_XCPPFLAGS) \ - $(FFTW_XCPPFLAGS) \ - $(ARPACK_CPPFLAGS) \ - $(AM_CPPFLAGS) +liboctave_la_CPPFLAGS = @OCTAVE_DLL_DEFS@ $(AM_CPPFLAGS) include link-deps.mk -# Dummy C++ source to cause C++ linking. +# Dummy C++ source to force C++ linking. nodist_EXTRA_liboctave_la_SOURCES = dummy.cc liboctave_la_LIBADD = \ diff -r 8ae34ffe5c1b -r a42d69d5a36d liboctave/array/module.mk --- a/liboctave/array/module.mk Thu Sep 20 04:08:53 2012 -0500 +++ b/liboctave/array/module.mk Thu Sep 20 10:14:03 2012 -0400 @@ -137,5 +137,7 @@ noinst_LTLIBRARIES += array/libarray.la array_libarray_la_SOURCES = $(ARRAY_SRC) -array_libarray_la_CPPFLAGS = $(liboctave_la_CPPFLAGS) +array_libarray_la_CPPFLAGS = \ + $(liboctave_la_CPPFLAGS) \ + $(SPARSE_XCPPFLAGS) diff -r 8ae34ffe5c1b -r a42d69d5a36d liboctave/cruft/Makefile.am --- a/liboctave/cruft/Makefile.am Thu Sep 20 04:08:53 2012 -0500 +++ b/liboctave/cruft/Makefile.am Thu Sep 20 10:14:03 2012 -0400 @@ -36,9 +36,7 @@ libcruft_la_FFLAGS = $(F77_INTEGER_8_FLAG) -libcruft_la_CPPFLAGS = \ - @CRUFT_DLL_DEFS@ \ - $(AM_CPPFLAGS) +libcruft_la_CPPFLAGS = @CRUFT_DLL_DEFS@ $(AM_CPPFLAGS) libcruft_la_DEPENDENCIES = cruft.def diff -r 8ae34ffe5c1b -r a42d69d5a36d liboctave/link-deps.mk --- a/liboctave/link-deps.mk Thu Sep 20 04:08:53 2012 -0500 +++ b/liboctave/link-deps.mk Thu Sep 20 10:14:03 2012 -0400 @@ -1,6 +1,7 @@ GNULIB_LINK_DEPS = \ $(COPYSIGNF_LIBM)\ $(COPYSIGN_LIBM)\ + $(FLOORF_LIBM)\ $(FLOOR_LIBM)\ $(GETHOSTNAME_LIB)\ $(LIBSOCKET)\ diff -r 8ae34ffe5c1b -r a42d69d5a36d liboctave/numeric/lo-mappers.cc --- a/liboctave/numeric/lo-mappers.cc Thu Sep 20 04:08:53 2012 -0500 +++ b/liboctave/numeric/lo-mappers.cc Thu Sep 20 10:14:03 2012 -0400 @@ -279,10 +279,15 @@ return gnulib::copysignf (x, y); } +float xfloor (float x) +{ + return gnulib::floorf (x); +} + float xround (float x) { - return gnulib::round (x); + return gnulib::roundf (x); } float diff -r 8ae34ffe5c1b -r a42d69d5a36d liboctave/numeric/lo-mappers.h --- a/liboctave/numeric/lo-mappers.h Thu Sep 20 04:08:53 2012 -0500 +++ b/liboctave/numeric/lo-mappers.h Thu Sep 20 10:14:03 2012 -0400 @@ -119,7 +119,7 @@ extern OCTAVE_API float xtrunc (float x); extern OCTAVE_API float xcopysign (float x, float y); inline float xceil (float x) { return ceilf (x); } -inline float xfloor (float x) { return floorf (x); } +extern OCTAVE_API float xfloor (float x); inline float arg (float x) { return atan2f (0.0f, x); } inline float conj (float x) { return x; } inline float fix (float x) { return xtrunc (x); } diff -r 8ae34ffe5c1b -r a42d69d5a36d liboctave/numeric/module.mk --- a/liboctave/numeric/module.mk Thu Sep 20 04:08:53 2012 -0500 +++ b/liboctave/numeric/module.mk Thu Sep 20 10:14:03 2012 -0400 @@ -1,5 +1,5 @@ EXTRA_DIST += \ - numeric/module.mk \ + numeric/module.mk \ $(OPT_IN) OPT_INC = \ @@ -156,7 +156,7 @@ numeric/SparsedbleCHOL.cc \ numeric/SparsedbleLU.cc \ numeric/SparseQR.cc \ - $(NUMERIC_C_SRC) + $(NUMERIC_C_SRC) TEMPLATE_SRC += \ numeric/base-lu.cc \ @@ -176,5 +176,9 @@ noinst_LTLIBRARIES += numeric/libnumeric.la numeric_libnumeric_la_SOURCES = $(NUMERIC_SRC) -numeric_libnumeric_la_CPPFLAGS = $(liboctave_la_CPPFLAGS) +numeric_libnumeric_la_CPPFLAGS = \ + $(liboctave_la_CPPFLAGS) \ + $(ARPACK_CPPFLAGS) \ + $(FFTW_XCPPFLAGS) \ + $(SPARSE_XCPPFLAGS) diff -r 8ae34ffe5c1b -r a42d69d5a36d liboctave/numeric/randmtzig.c --- a/liboctave/numeric/randmtzig.c Thu Sep 20 04:08:53 2012 -0500 +++ b/liboctave/numeric/randmtzig.c Thu Sep 20 10:14:03 2012 -0400 @@ -260,7 +260,7 @@ int n = 0; /* Look for entropy in /dev/urandom */ - FILE* urandom =fopen ("/dev/urandom", "rb"); + FILE* urandom = fopen ("/dev/urandom", "rb"); if (urandom) { while (n < MT_N) @@ -400,8 +400,8 @@ static double randu53 (void) { - const uint32_t a=randi32 ()>>5; - const uint32_t b=randi32 ()>>6; + const uint32_t a = randi32 ()>>5; + const uint32_t b = randi32 ()>>6; return (a*67108864.0+b+0.4) * (1.0/9007199254740992.0); } @@ -593,7 +593,7 @@ # else /* !HAVE_X86_32 */ /* arbitrary mantissa (selected by NRANDI, with 1 bit for sign) */ const uint64_t r = NRANDI; - const int64_t rabs=r>>1; + const int64_t rabs = r>>1; const int idx = (int)(rabs&0xFF); const double x = ( r&1 ? -rabs : rabs) * wi[idx]; # endif /* !HAVE_X86_32 */ diff -r 8ae34ffe5c1b -r a42d69d5a36d liboctave/operators/mx-ops --- a/liboctave/operators/mx-ops Thu Sep 20 04:08:53 2012 -0500 +++ b/liboctave/operators/mx-ops Thu Sep 20 10:14:03 2012 -0400 @@ -16,7 +16,7 @@ # along with Octave; see the file COPYING. If not, see # . -# NOTE: if this file changes, you must run autogen.sh and configure to +# NOTE: if this file changes, you must run bootstrap and configure to # rebuild the source file lists for Make. # types diff -r 8ae34ffe5c1b -r a42d69d5a36d liboctave/operators/sparse-mx-ops --- a/liboctave/operators/sparse-mx-ops Thu Sep 20 04:08:53 2012 -0500 +++ b/liboctave/operators/sparse-mx-ops Thu Sep 20 10:14:03 2012 -0400 @@ -16,7 +16,7 @@ # along with Octave; see the file COPYING. If not, see # . -# NOTE: if this file changes, you must run autogen.sh and configure to +# NOTE: if this file changes, you must run bootstrap and configure to # rebuild the source file lists for Make. # types diff -r 8ae34ffe5c1b -r a42d69d5a36d liboctave/operators/vx-ops --- a/liboctave/operators/vx-ops Thu Sep 20 04:08:53 2012 -0500 +++ b/liboctave/operators/vx-ops Thu Sep 20 10:14:03 2012 -0400 @@ -16,7 +16,7 @@ # along with Octave; see the file COPYING. If not, see # . -# NOTE: if this file changes, you must run autogen.sh and configure to +# NOTE: if this file changes, you must run bootstrap and configure to # rebuild the source file lists for Make. # types diff -r 8ae34ffe5c1b -r a42d69d5a36d liboctave/system/file-ops.cc --- a/liboctave/system/file-ops.cc Thu Sep 20 04:08:53 2012 -0500 +++ b/liboctave/system/file-ops.cc Thu Sep 20 10:14:03 2012 -0400 @@ -37,6 +37,7 @@ #include #include "pathmax.h" +#include "canonicalize.h" #include "dir-ops.h" #include "file-ops.h" diff -r 8ae34ffe5c1b -r a42d69d5a36d liboctave/util/module.mk --- a/liboctave/util/module.mk Thu Sep 20 04:08:53 2012 -0500 +++ b/liboctave/util/module.mk Thu Sep 20 10:14:03 2012 -0400 @@ -82,5 +82,7 @@ noinst_LTLIBRARIES += util/libutil.la util_libutil_la_SOURCES = $(UTIL_SRC) -util_libutil_la_CPPFLAGS = $(liboctave_la_CPPFLAGS) +util_libutil_la_CPPFLAGS = \ + $(liboctave_la_CPPFLAGS) \ + $(SPARSE_XCPPFLAGS) diff -r 8ae34ffe5c1b -r a42d69d5a36d scripts/plot/saveas.m --- a/scripts/plot/saveas.m Thu Sep 20 04:08:53 2012 -0500 +++ b/scripts/plot/saveas.m Thu Sep 20 10:14:03 2012 -0400 @@ -102,6 +102,6 @@ prt_opt = strcat ("-d", tolower (fmt)); - print (filename, prt_opt); + print (fig, filename, prt_opt); endfunction