[pktools] 67/375: re-implemented reclassification in pkclassify_svm.cc. still todo for pkclassify_nn.cc
Bas Couwenberg
sebastic at xs4all.nl
Wed Dec 3 21:53:59 UTC 2014
This is an automated email from the git hooks/post-receive script.
sebastic-guest pushed a commit to branch upstream-master
in repository pktools.
commit 0c71d6d902582b612f4ca4fcf9290206fb8ac713
Author: user <user at osgeolive.(none)>
Date: Sat Feb 23 23:43:20 2013 +0100
re-implemented reclassification in pkclassify_svm.cc. still todo for pkclassify_nn.cc
---
Makefile.in | 83 +++++++-----
aclocal.m4 | 82 +++++++-----
configure | 270 ++++++++++++++++++++++-----------------
src/algorithms/ConfusionMatrix.h | 6 +-
src/algorithms/Makefile.am | 6 +-
src/algorithms/Makefile.in | 98 +++++++-------
src/apps/Makefile.am | 3 +-
src/apps/Makefile.in | 81 ++++++------
src/apps/pkclassify_svm.cc | 80 ++++++++----
src/apps/pkopt_svm.cc | 103 ++++++++++-----
src/base/Makefile.in | 33 +++--
src/fileclasses/Makefile.in | 31 +++--
src/imageclasses/Makefile.in | 31 +++--
13 files changed, 541 insertions(+), 366 deletions(-)
diff --git a/Makefile.in b/Makefile.in
index 7146fbd..79e3881 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -68,9 +68,11 @@ DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
distdir = $(PACKAGE)-$(VERSION)
top_distdir = $(distdir)
am__remove_distdir = \
- { test ! -d "$(distdir)" \
- || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
- && rm -fr "$(distdir)"; }; }
+ if test -d "$(distdir)"; then \
+ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
+ && rm -rf "$(distdir)" \
+ || { sleep 5 && rm -rf "$(distdir)"; }; \
+ else :; fi
am__relativize = \
dir0=`pwd`; \
sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -99,6 +101,8 @@ am__relativize = \
DIST_ARCHIVES = $(distdir).tar.gz
GZIP_ENV = --best
distuninstallcheck_listfiles = find . -type f -print
+am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \
+ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$'
distcleancheck_listfiles = find . -type f -print
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
@@ -225,7 +229,7 @@ all: config.h
$(MAKE) $(AM_MAKEFLAGS) all-recursive
.SUFFIXES:
-am--refresh:
+am--refresh: Makefile
@:
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
@for dep in $?; do \
@@ -261,10 +265,8 @@ $(ACLOCAL_M4): $(am__aclocal_m4_deps)
$(am__aclocal_m4_deps):
config.h: stamp-h1
- @if test ! -f $@; then \
- rm -f stamp-h1; \
- $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \
- else :; fi
+ @if test ! -f $@; then rm -f stamp-h1; else :; fi
+ @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) stamp-h1; else :; fi
stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status
@rm -f stamp-h1
@@ -484,7 +486,11 @@ dist-gzip: distdir
$(am__remove_distdir)
dist-bzip2: distdir
- tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(am__remove_distdir)
+
+dist-lzip: distdir
+ tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz
$(am__remove_distdir)
dist-lzma: distdir
@@ -492,7 +498,7 @@ dist-lzma: distdir
$(am__remove_distdir)
dist-xz: distdir
- tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz
$(am__remove_distdir)
dist-tarZ: distdir
@@ -523,6 +529,8 @@ distcheck: dist
bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
*.tar.lzma*) \
lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+ *.tar.lz*) \
+ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
*.tar.xz*) \
xz -dc $(distdir).tar.xz | $(am__untar) ;;\
*.tar.Z*) \
@@ -542,6 +550,7 @@ distcheck: dist
&& am__cwd=`pwd` \
&& $(am__cd) $(distdir)/_build \
&& ../configure --srcdir=.. --prefix="$$dc_install_base" \
+ $(AM_DISTCHECK_CONFIGURE_FLAGS) \
$(DISTCHECK_CONFIGURE_FLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) \
&& $(MAKE) $(AM_MAKEFLAGS) dvi \
@@ -570,8 +579,16 @@ distcheck: dist
list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
distuninstallcheck:
- @$(am__cd) '$(distuninstallcheck_dir)' \
- && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \
+ @test -n '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: trying to run $@ with an empty' \
+ '$$(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ $(am__cd) '$(distuninstallcheck_dir)' || { \
+ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \
+ exit 1; \
+ }; \
+ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \
|| { echo "ERROR: files left after uninstall:" ; \
if test -n "$(DESTDIR)"; then \
echo " (check DESTDIR support)"; \
@@ -602,10 +619,15 @@ install-am: all-am
installcheck: installcheck-recursive
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
@@ -692,17 +714,18 @@ uninstall-am:
.PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
all all-am am--refresh check check-am clean clean-generic \
ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
- dist-lzma dist-shar dist-tarZ dist-xz dist-zip distcheck \
- distclean distclean-generic distclean-hdr distclean-tags \
- distcleancheck distdir distuninstallcheck dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-dvi install-dvi-am install-exec \
- install-exec-am install-html install-html-am install-info \
- install-info-am install-man install-pdf install-pdf-am \
- install-ps install-ps-am install-strip installcheck \
- installcheck-am installdirs installdirs-am maintainer-clean \
- maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
- pdf-am ps ps-am tags tags-recursive uninstall uninstall-am
+ dist-lzip dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
+ distcheck distclean distclean-generic distclean-hdr \
+ distclean-tags distcleancheck distdir distuninstallcheck dvi \
+ dvi-am html html-am info info-am install install-am \
+ install-data install-data-am install-dvi install-dvi-am \
+ install-exec install-exec-am install-html install-html-am \
+ install-info install-info-am install-man install-pdf \
+ install-pdf-am install-ps install-ps-am install-strip \
+ installcheck installcheck-am installdirs installdirs-am \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
+ uninstall uninstall-am
# Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/aclocal.m4 b/aclocal.m4
index 1f01ab1..1785447 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,8 @@
-# generated automatically by aclocal 1.11.1 -*- Autoconf -*-
+# generated automatically by aclocal 1.11.3 -*- Autoconf -*-
# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -13,8 +14,8 @@
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
-[m4_warning([this file was generated for autoconf 2.67.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.68],,
+[m4_warning([this file was generated for autoconf 2.68.
You have another version of autoconf. It may work, but is not guaranteed to.
If you have problems, you may need to regenerate the build system entirely.
To do so, use the procedure documented by the package, typically `autoreconf'.])])
@@ -47,7 +48,8 @@ To do so, use the procedure documented by the package, typically `autoreconf'.])
# ----------------------------------
AC_DEFUN([PKG_PROG_PKG_CONFIG],
[m4_pattern_forbid([^_?PKG_[A-Z_]+$])
-m4_pattern_allow([^PKG_CONFIG(_PATH)?$])
+m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$])
+m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$])
AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])
AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path])
AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path])
@@ -93,7 +95,8 @@ m4_define([_PKG_CONFIG],
pkg_cv_[]$1="$$1"
elif test -n "$PKG_CONFIG"; then
PKG_CHECK_EXISTS([$3],
- [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`],
+ [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes ],
[pkg_failed=yes])
else
pkg_failed=untried
@@ -141,9 +144,9 @@ if test $pkg_failed = yes; then
AC_MSG_RESULT([no])
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
- $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1`
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
- $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1`
+ $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD
@@ -177,12 +180,15 @@ else
fi[]dnl
])# PKG_CHECK_MODULES
-# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008, 2011 Free Software
+# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# AM_AUTOMAKE_VERSION(VERSION)
# ----------------------------
# Automake X.Y traces this macro to ensure aclocal.m4 has been
@@ -192,7 +198,7 @@ AC_DEFUN([AM_AUTOMAKE_VERSION],
[am__api_version='1.11'
dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
dnl require some minimum version. Point them to the right macro.
-m4_if([$1], [1.11.1], [],
+m4_if([$1], [1.11.3], [],
[AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
])
@@ -208,19 +214,21 @@ m4_define([_AM_AUTOCONF_VERSION], [])
# Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11.1])dnl
+[AM_AUTOMAKE_VERSION([1.11.3])dnl
m4_ifndef([AC_AUTOCONF_VERSION],
[m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
_AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
# AM_AUX_DIR_EXPAND -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
# $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to
# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
@@ -302,14 +310,14 @@ AC_CONFIG_COMMANDS_PRE(
Usually this means the macro was only invoked conditionally.]])
fi])])
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
-# Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009,
+# 2010, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 10
+# serial 12
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
@@ -349,6 +357,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
+ rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -413,7 +422,7 @@ AC_CACHE_CHECK([dependency style of $depcc],
break
fi
;;
- msvisualcpp | msvcmsys)
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
@@ -478,10 +487,13 @@ AC_DEFUN([AM_DEP_TRACK],
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
+ am__nodep='_no'
fi
AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
AC_SUBST([AMDEPBACKSLASH])dnl
_AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl
+AC_SUBST([am__nodep])dnl
+_AM_SUBST_NOTMAKE([am__nodep])dnl
])
# Generate code to set up dependency tracking. -*- Autoconf -*-
@@ -703,12 +715,15 @@ for _am_header in $config_headers :; do
done
echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count])
-# Copyright (C) 2001, 2003, 2005, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008, 2011 Free Software Foundation,
+# Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# AM_PROG_INSTALL_SH
# ------------------
# Define $install_sh.
@@ -840,12 +855,15 @@ else
fi
])
-# Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 2011 Free Software Foundation,
+# Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# AM_PROG_MKDIR_P
# ---------------
# Check for `mkdir -p'.
@@ -868,13 +886,14 @@ esac
# Helper functions for option handling. -*- Autoconf -*-
-# Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2005, 2008, 2010 Free Software
+# Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
+# serial 5
# _AM_MANGLE_OPTION(NAME)
# -----------------------
@@ -882,13 +901,13 @@ AC_DEFUN([_AM_MANGLE_OPTION],
[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
# _AM_SET_OPTION(NAME)
-# ------------------------------
+# --------------------
# Set option NAME. Presently that only means defining a flag for this option.
AC_DEFUN([_AM_SET_OPTION],
[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
# _AM_SET_OPTIONS(OPTIONS)
-# ----------------------------------
+# ------------------------
# OPTIONS is a space-separated list of Automake options.
AC_DEFUN([_AM_SET_OPTIONS],
[m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
@@ -964,12 +983,14 @@ Check your system clock])
fi
AC_MSG_RESULT(yes)])
-# Copyright (C) 2001, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2011 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
+# serial 1
+
# AM_PROG_INSTALL_STRIP
# ---------------------
# One issue with vendor `install' (even GNU) is that you can't
@@ -992,13 +1013,13 @@ fi
INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
AC_SUBST([INSTALL_STRIP_PROGRAM])])
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008, 2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 2
+# serial 3
# _AM_SUBST_NOTMAKE(VARIABLE)
# ---------------------------
@@ -1007,13 +1028,13 @@ AC_SUBST([INSTALL_STRIP_PROGRAM])])
AC_DEFUN([_AM_SUBST_NOTMAKE])
# AM_SUBST_NOTMAKE(VARIABLE)
-# ---------------------------
+# --------------------------
# Public sister of _AM_SUBST_NOTMAKE.
AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# Check how to create a tarball. -*- Autoconf -*-
-# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2005, 2012 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
@@ -1035,10 +1056,11 @@ AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
# a tarball read from stdin.
# $(am__untar) < result.tar
AC_DEFUN([_AM_PROG_TAR],
-[# Always define AMTAR for backward compatibility.
-AM_MISSING_PROG([AMTAR], [tar])
+[# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AC_SUBST([AMTAR], ['$${TAR-tar}'])
m4_if([$1], [v7],
- [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
+ [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'],
[m4_case([$1], [ustar],, [pax],,
[m4_fatal([Unknown tar format])])
AC_MSG_CHECKING([how to create a $1 tar archive])
diff --git a/configure b/configure
index 5ea37c6..f111ad9 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.67 for pktools 2.4.
+# Generated by GNU Autoconf 2.68 for pktools 2.4.
#
# Report bugs to <kempenep at gmail.com>.
#
@@ -91,6 +91,7 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -216,11 +217,18 @@ IFS=$as_save_IFS
# We cannot yet assume a decent shell, so we have to provide a
# neutralization value for shells without unset; and this also
# works around shells that cannot unset nonexistent variables.
+ # Preserve -v and -x to the replacement shell.
BASH_ENV=/dev/null
ENV=/dev/null
(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"}
+ case $- in # ((((
+ *v*x* | *x*v* ) as_opts=-vx ;;
+ *v* ) as_opts=-v ;;
+ *x* ) as_opts=-x ;;
+ * ) as_opts= ;;
+ esac
+ exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
fi
if test x$as_have_required = xno; then :
@@ -632,6 +640,7 @@ RANLIB
am__fastdepCXX_FALSE
am__fastdepCXX_TRUE
CXXDEPMODE
+am__nodep
AMDEPBACKSLASH
AMDEP_FALSE
AMDEP_TRUE
@@ -1147,7 +1156,7 @@ Try \`$0 --help' for more information"
$as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
$as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
- : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+ : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
;;
esac
@@ -1462,7 +1471,7 @@ test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
pktools configure 2.4
-generated by GNU Autoconf 2.67
+generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
This configure script is free software; the Free Software Foundation
@@ -1508,7 +1517,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_compile
@@ -1546,7 +1555,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_compile
@@ -1583,7 +1592,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_cpp
@@ -1596,10 +1605,10 @@ fi
ac_fn_c_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval "test \"\${$3+set}\"" = set; then :
+ if eval \${$3+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -1666,7 +1675,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -1675,7 +1684,7 @@ eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_mongrel
@@ -1716,7 +1725,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_c_try_run
@@ -1730,7 +1739,7 @@ ac_fn_c_check_header_compile ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -1748,7 +1757,7 @@ fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_c_check_header_compile
@@ -1784,7 +1793,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=1
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_cpp
@@ -1826,7 +1835,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
ac_retval=$ac_status
fi
rm -rf conftest.dSYM conftest_ipa8_conftest.oo
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
as_fn_set_status $ac_retval
} # ac_fn_cxx_try_run
@@ -1839,10 +1848,10 @@ fi
ac_fn_cxx_check_header_mongrel ()
{
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
- if eval "test \"\${$3+set}\"" = set; then :
+ if eval \${$3+:} false; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
fi
eval ac_res=\$$3
@@ -1909,7 +1918,7 @@ $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
esac
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=\$ac_header_compiler"
@@ -1918,7 +1927,7 @@ eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
fi
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_cxx_check_header_mongrel
@@ -1931,7 +1940,7 @@ ac_fn_cxx_check_type ()
as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
$as_echo_n "checking for $2... " >&6; }
-if eval "test \"\${$3+set}\"" = set; then :
+if eval \${$3+:} false; then :
$as_echo_n "(cached) " >&6
else
eval "$3=no"
@@ -1972,7 +1981,7 @@ fi
eval ac_res=\$$3
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
$as_echo "$ac_res" >&6; }
- eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;}
+ eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
} # ac_fn_cxx_check_type
cat >config.log <<_ACEOF
@@ -1980,7 +1989,7 @@ This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by pktools $as_me 2.4, which was
-generated by GNU Autoconf 2.67. Invocation command line was
+generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
@@ -2238,7 +2247,7 @@ $as_echo "$as_me: loading site script $ac_site_file" >&6;}
|| { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "failed to load site script $ac_site_file
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
done
@@ -2375,7 +2384,7 @@ ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
$as_echo_n "checking for a BSD-compatible install... " >&6; }
if test -z "$INSTALL"; then
-if test "${ac_cv_path_install+set}" = set; then :
+if ${ac_cv_path_install+:} false; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2462,11 +2471,11 @@ am_lf='
'
case `pwd` in
*[\\\"\#\$\&\'\`$am_lf]*)
- as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5 ;;
+ as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
esac
case $srcdir in
*[\\\"\#\$\&\'\`$am_lf\ \ ]*)
- as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5 ;;
+ as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
esac
# Do `set' in a subshell so we don't clobber the current shell's
@@ -2552,7 +2561,7 @@ if test "$cross_compiling" != no; then
set dummy ${ac_tool_prefix}strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then :
+if ${ac_cv_prog_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$STRIP"; then
@@ -2592,7 +2601,7 @@ if test -z "$ac_cv_prog_STRIP"; then
set dummy strip; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then :
+if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_STRIP"; then
@@ -2645,7 +2654,7 @@ INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
$as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
if test -z "$MKDIR_P"; then
- if test "${ac_cv_path_mkdir+set}" = set; then :
+ if ${ac_cv_path_mkdir+:} false; then :
$as_echo_n "(cached) " >&6
else
as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -2696,7 +2705,7 @@ do
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_AWK+set}" = set; then :
+if ${ac_cv_prog_AWK+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$AWK"; then
@@ -2736,7 +2745,7 @@ done
$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
set x ${MAKE-make}
ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
+if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
$as_echo_n "(cached) " >&6
else
cat >conftest.make <<\_ACEOF
@@ -2824,11 +2833,11 @@ MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
# We need awk for the "check" target. The system "awk" is bad on
# some platforms.
-# Always define AMTAR for backward compatibility.
-
-AMTAR=${AMTAR-"${am_missing_run}tar"}
+# Always define AMTAR for backward compatibility. Yes, it's still used
+# in the wild :-( We should find a proper way to deprecate it ...
+AMTAR='$${TAR-tar}'
-am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'
+am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
@@ -2850,7 +2859,7 @@ fi
set dummy gdal-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GDAL_CONFIG+set}" = set; then :
+if ${ac_cv_path_GDAL_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $GDAL_CONFIG in
@@ -2891,7 +2900,7 @@ else
set dummy gdal-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GDAL_CONFIG+set}" = set; then :
+if ${ac_cv_path_GDAL_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $GDAL_CONFIG in
@@ -3057,7 +3066,7 @@ if test -z "$CXX"; then
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CXX+set}" = set; then :
+if ${ac_cv_prog_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CXX"; then
@@ -3101,7 +3110,7 @@ do
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CXX+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CXX"; then
@@ -3265,7 +3274,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error 77 "C++ compiler cannot create executables
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
@@ -3308,7 +3317,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of executables: cannot compile and link
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest conftest$ac_cv_exeext
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
@@ -3367,7 +3376,7 @@ $as_echo "$ac_try_echo"; } >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot run C++ compiled programs.
If you meant to cross compile, use \`--host'.
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
fi
fi
@@ -3378,7 +3387,7 @@ rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
ac_clean_files=$ac_clean_files_save
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
$as_echo_n "checking for suffix of object files... " >&6; }
-if test "${ac_cv_objext+set}" = set; then :
+if ${ac_cv_objext+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3419,7 +3428,7 @@ sed 's/^/| /' conftest.$ac_ext >&5
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "cannot compute suffix of object files: cannot compile
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
@@ -3429,7 +3438,7 @@ OBJEXT=$ac_cv_objext
ac_objext=$OBJEXT
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
-if test "${ac_cv_cxx_compiler_gnu+set}" = set; then :
+if ${ac_cv_cxx_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -3466,7 +3475,7 @@ ac_test_CXXFLAGS=${CXXFLAGS+set}
ac_save_CXXFLAGS=$CXXFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
$as_echo_n "checking whether $CXX accepts -g... " >&6; }
-if test "${ac_cv_prog_cxx_g+set}" = set; then :
+if ${ac_cv_prog_cxx_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_cxx_werror_flag=$ac_cxx_werror_flag
@@ -3599,6 +3608,7 @@ fi
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
+ am__nodep='_no'
fi
if test "x$enable_dependency_tracking" != xno; then
AMDEP_TRUE=
@@ -3614,7 +3624,7 @@ depcc="$CXX" am_compiler_list=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CXX_dependencies_compiler_type+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -3623,6 +3633,7 @@ else
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
+ rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -3682,7 +3693,7 @@ else
break
fi
;;
- msvisualcpp | msvcmsys)
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
@@ -3742,7 +3753,7 @@ if test -n "$ac_tool_prefix"; then
set dummy ${ac_tool_prefix}ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_RANLIB+set}" = set; then :
+if ${ac_cv_prog_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$RANLIB"; then
@@ -3782,7 +3793,7 @@ if test -z "$ac_cv_prog_RANLIB"; then
set dummy ranlib; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then :
+if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_RANLIB"; then
@@ -3847,7 +3858,7 @@ fi
set dummy gdal-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GDAL_CONFIG+set}" = set; then :
+if ${ac_cv_path_GDAL_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $GDAL_CONFIG in
@@ -3888,7 +3899,7 @@ else
set dummy gdal-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_GDAL_CONFIG+set}" = set; then :
+if ${ac_cv_path_GDAL_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $GDAL_CONFIG in
@@ -4032,7 +4043,7 @@ if test -n "$ac_tool_prefix"; then
set dummy ${ac_tool_prefix}gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -4072,7 +4083,7 @@ if test -z "$ac_cv_prog_CC"; then
set dummy gcc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -4125,7 +4136,7 @@ if test -z "$CC"; then
set dummy ${ac_tool_prefix}cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -4165,7 +4176,7 @@ if test -z "$CC"; then
set dummy cc; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -4224,7 +4235,7 @@ if test -z "$CC"; then
set dummy $ac_tool_prefix$ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_CC+set}" = set; then :
+if ${ac_cv_prog_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$CC"; then
@@ -4268,7 +4279,7 @@ do
set dummy $ac_prog; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_CC+set}" = set; then :
+if ${ac_cv_prog_ac_ct_CC+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -n "$ac_ct_CC"; then
@@ -4323,7 +4334,7 @@ fi
test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "no acceptable C compiler found in \$PATH
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
# Provide some information about the compiler.
$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
@@ -4352,7 +4363,7 @@ done
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
-if test "${ac_cv_c_compiler_gnu+set}" = set; then :
+if ${ac_cv_c_compiler_gnu+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -4389,7 +4400,7 @@ ac_test_CFLAGS=${CFLAGS+set}
ac_save_CFLAGS=$CFLAGS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
$as_echo_n "checking whether $CC accepts -g... " >&6; }
-if test "${ac_cv_prog_cc_g+set}" = set; then :
+if ${ac_cv_prog_cc_g+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_save_c_werror_flag=$ac_c_werror_flag
@@ -4467,7 +4478,7 @@ else
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
-if test "${ac_cv_prog_cc_c89+set}" = set; then :
+if ${ac_cv_prog_cc_c89+:} false; then :
$as_echo_n "(cached) " >&6
else
ac_cv_prog_cc_c89=no
@@ -4566,7 +4577,7 @@ depcc="$CC" am_compiler_list=
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
$as_echo_n "checking dependency style of $depcc... " >&6; }
-if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then :
+if ${am_cv_CC_dependencies_compiler_type+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
@@ -4575,6 +4586,7 @@ else
# instance it was reported that on HP-UX the gcc test will end up
# making a dummy file named `D' -- because `-MD' means `put the output
# in D'.
+ rm -rf conftest.dir
mkdir conftest.dir
# Copy depcomp to subdir because otherwise we won't find it if we're
# using a relative directory.
@@ -4634,7 +4646,7 @@ else
break
fi
;;
- msvisualcpp | msvcmsys)
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
@@ -4702,7 +4714,7 @@ if test -n "$CPP" && test -d "$CPP"; then
CPP=
fi
if test -z "$CPP"; then
- if test "${ac_cv_prog_CPP+set}" = set; then :
+ if ${ac_cv_prog_CPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CPP needs to be expanded
@@ -4818,7 +4830,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=c
@@ -4830,7 +4842,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
-if test "${ac_cv_path_GREP+set}" = set; then :
+if ${ac_cv_path_GREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if test -z "$GREP"; then
@@ -4893,7 +4905,7 @@ $as_echo "$ac_cv_path_GREP" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
$as_echo_n "checking for egrep... " >&6; }
-if test "${ac_cv_path_EGREP+set}" = set; then :
+if ${ac_cv_path_EGREP+:} false; then :
$as_echo_n "(cached) " >&6
else
if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
@@ -4960,7 +4972,7 @@ $as_echo "$ac_cv_path_EGREP" >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5090,7 +5102,7 @@ done
for ac_header in gdal.h
do :
ac_fn_c_check_header_mongrel "$LINENO" "gdal.h" "ac_cv_header_gdal_h" "$ac_includes_default"
-if test "x$ac_cv_header_gdal_h" = x""yes; then :
+if test "x$ac_cv_header_gdal_h" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_GDAL_H 1
_ACEOF
@@ -5112,13 +5124,14 @@ fi
+
if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
if test -n "$ac_tool_prefix"; then
# Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $PKG_CONFIG in
@@ -5161,7 +5174,7 @@ if test -z "$ac_cv_path_PKG_CONFIG"; then
set dummy pkg-config; ac_word=$2
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then :
+if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
$as_echo_n "(cached) " >&6
else
case $ac_pt_PKG_CONFIG in
@@ -5242,6 +5255,7 @@ if test -n "$FANN_CFLAGS"; then
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_FANN_CFLAGS=`$PKG_CONFIG --cflags "fann >= 2.1.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
@@ -5258,6 +5272,7 @@ if test -n "$FANN_LIBS"; then
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_FANN_LIBS=`$PKG_CONFIG --libs "fann >= 2.1.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
@@ -5277,9 +5292,9 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- FANN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "fann >= 2.1.0" 2>&1`
+ FANN_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "fann >= 2.1.0" 2>&1`
else
- FANN_PKG_ERRORS=`$PKG_CONFIG --print-errors "fann >= 2.1.0" 2>&1`
+ FANN_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "fann >= 2.1.0" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$FANN_PKG_ERRORS" >&5
@@ -5383,6 +5398,7 @@ if test -n "$NLOPT_CFLAGS"; then
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_NLOPT_CFLAGS=`$PKG_CONFIG --cflags "nlopt >= 2.1.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
@@ -5399,6 +5415,7 @@ if test -n "$NLOPT_LIBS"; then
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_NLOPT_LIBS=`$PKG_CONFIG --libs "nlopt >= 2.1.0" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
@@ -5418,9 +5435,9 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- NLOPT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "nlopt >= 2.1.0" 2>&1`
+ NLOPT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "nlopt >= 2.1.0" 2>&1`
else
- NLOPT_PKG_ERRORS=`$PKG_CONFIG --print-errors "nlopt >= 2.1.0" 2>&1`
+ NLOPT_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "nlopt >= 2.1.0" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$NLOPT_PKG_ERRORS" >&5
@@ -5479,6 +5496,7 @@ if test -n "$GSL_CFLAGS"; then
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GSL_CFLAGS=`$PKG_CONFIG --cflags "gsl >= 1.14" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
@@ -5495,6 +5513,7 @@ if test -n "$GSL_LIBS"; then
$as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
test $ac_status = 0; }; then
pkg_cv_GSL_LIBS=`$PKG_CONFIG --libs "gsl >= 1.14" 2>/dev/null`
+ test "x$?" != "x0" && pkg_failed=yes
else
pkg_failed=yes
fi
@@ -5514,9 +5533,9 @@ else
_pkg_short_errors_supported=no
fi
if test $_pkg_short_errors_supported = yes; then
- GSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "gsl >= 1.14" 2>&1`
+ GSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gsl >= 1.14" 2>&1`
else
- GSL_PKG_ERRORS=`$PKG_CONFIG --print-errors "gsl >= 1.14" 2>&1`
+ GSL_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gsl >= 1.14" 2>&1`
fi
# Put the nasty error message in config.log where it belongs
echo "$GSL_PKG_ERRORS" >&5
@@ -5560,7 +5579,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
if test -z "$CXXCPP"; then
- if test "${ac_cv_prog_CXXCPP+set}" = set; then :
+ if ${ac_cv_prog_CXXCPP+:} false; then :
$as_echo_n "(cached) " >&6
else
# Double quotes because CXXCPP needs to be expanded
@@ -5676,7 +5695,7 @@ else
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
-See \`config.log' for more details" "$LINENO" 5 ; }
+See \`config.log' for more details" "$LINENO" 5; }
fi
ac_ext=cpp
@@ -5688,7 +5707,7 @@ ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
$as_echo_n "checking for ANSI C header files... " >&6; }
-if test "${ac_cv_header_stdc+set}" = set; then :
+if ${ac_cv_header_stdc+:} false; then :
$as_echo_n "(cached) " >&6
else
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
@@ -5801,7 +5820,7 @@ fi
for ac_header in string
do :
ac_fn_cxx_check_header_mongrel "$LINENO" "string" "ac_cv_header_string" "$ac_includes_default"
-if test "x$ac_cv_header_string" = x""yes; then :
+if test "x$ac_cv_header_string" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_STRING 1
_ACEOF
@@ -5813,7 +5832,7 @@ done
for ac_header in iostream
do :
ac_fn_cxx_check_header_mongrel "$LINENO" "iostream" "ac_cv_header_iostream" "$ac_includes_default"
-if test "x$ac_cv_header_iostream" = x""yes; then :
+if test "x$ac_cv_header_iostream" = xyes; then :
cat >>confdefs.h <<_ACEOF
#define HAVE_IOSTREAM 1
_ACEOF
@@ -5825,7 +5844,7 @@ done
# Checks for typedefs, structures, and compiler characteristics.
ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
-if test "x$ac_cv_type_size_t" = x""yes; then :
+if test "x$ac_cv_type_size_t" = xyes; then :
else
@@ -5913,10 +5932,21 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
:end' >>confcache
if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
if test -w "$cache_file"; then
- test "x$cache_file" != "x/dev/null" &&
+ if test "x$cache_file" != "x/dev/null"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
$as_echo "$as_me: updating cache $cache_file" >&6;}
- cat confcache >$cache_file
+ if test ! -f "$cache_file" || test -h "$cache_file"; then
+ cat confcache >"$cache_file"
+ else
+ case $cache_file in #(
+ */* | ?:*)
+ mv -f confcache "$cache_file"$$ &&
+ mv -f "$cache_file"$$ "$cache_file" ;; #(
+ *)
+ mv -f confcache "$cache_file" ;;
+ esac
+ fi
+ fi
else
{ $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
@@ -5996,7 +6026,7 @@ if test -z "${USE_GSL_TRUE}" && test -z "${USE_GSL_FALSE}"; then
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
ac_write_fail=0
ac_clean_files_save=$ac_clean_files
ac_clean_files="$ac_clean_files $CONFIG_STATUS"
@@ -6097,6 +6127,7 @@ fi
IFS=" "" $as_nl"
# Find who we are. Look in the path if we contain no directory separator.
+as_myself=
case $0 in #((
*[\\/]* ) as_myself=$0 ;;
*) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
@@ -6404,7 +6435,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# values after options handling.
ac_log="
This file was extended by pktools $as_me 2.4, which was
-generated by GNU Autoconf 2.67. Invocation command line was
+generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
CONFIG_HEADERS = $CONFIG_HEADERS
@@ -6470,7 +6501,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
pktools config.status 2.4
-configured by $0, generated by GNU Autoconf 2.67,
+configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
Copyright (C) 2010 Free Software Foundation, Inc.
@@ -6607,7 +6638,7 @@ do
"src/fileclasses/Makefile") CONFIG_FILES="$CONFIG_FILES src/fileclasses/Makefile" ;;
"src/apps/Makefile") CONFIG_FILES="$CONFIG_FILES src/apps/Makefile" ;;
- *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5 ;;
+ *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
done
@@ -6630,9 +6661,10 @@ fi
# after its creation but before its name has been assigned to `$tmp'.
$debug ||
{
- tmp=
+ tmp= ac_tmp=
trap 'exit_status=$?
- { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status
+ : "${ac_tmp:=$tmp}"
+ { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
' 0
trap 'as_fn_exit 1' 1 2 13 15
}
@@ -6640,12 +6672,13 @@ $debug ||
{
tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
+ test -d "$tmp"
} ||
{
tmp=./conf$$-$RANDOM
(umask 077 && mkdir "$tmp")
} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
+ac_tmp=$tmp
# Set up the scripts for CONFIG_FILES section.
# No need to generate them if there are no CONFIG_FILES.
@@ -6667,7 +6700,7 @@ else
ac_cs_awk_cr=$ac_cr
fi
-echo 'BEGIN {' >"$tmp/subs1.awk" &&
+echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
_ACEOF
@@ -6695,7 +6728,7 @@ done
rm -f conf$$subs.sh
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
-cat >>"\$tmp/subs1.awk" <<\\_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
_ACEOF
sed -n '
h
@@ -6743,7 +6776,7 @@ t delim
rm -f conf$$subs.awk
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
_ACAWK
-cat >>"\$tmp/subs1.awk" <<_ACAWK &&
+cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
for (key in S) S_is_set[key] = 1
FS = ""
@@ -6775,7 +6808,7 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
else
cat
-fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
+fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
|| as_fn_error $? "could not setup config files machinery" "$LINENO" 5
_ACEOF
@@ -6809,7 +6842,7 @@ fi # test -n "$CONFIG_FILES"
# No need to generate them if there are no CONFIG_HEADERS.
# This happens for instance with `./config.status Makefile'.
if test -n "$CONFIG_HEADERS"; then
-cat >"$tmp/defines.awk" <<\_ACAWK ||
+cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
BEGIN {
_ACEOF
@@ -6821,8 +6854,8 @@ _ACEOF
# handling of long lines.
ac_delim='%!_!# '
for ac_last_try in false false :; do
- ac_t=`sed -n "/$ac_delim/p" confdefs.h`
- if test -z "$ac_t"; then
+ ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
+ if test -z "$ac_tt"; then
break
elif $ac_last_try; then
as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
@@ -6923,7 +6956,7 @@ do
esac
case $ac_mode$ac_tag in
:[FHL]*:*);;
- :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5 ;;
+ :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
:[FH]-) ac_tag=-:-;;
:[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
esac
@@ -6942,7 +6975,7 @@ do
for ac_f
do
case $ac_f in
- -) ac_f="$tmp/stdin";;
+ -) ac_f="$ac_tmp/stdin";;
*) # Look for the file first in the build tree, then in the source tree
# (if the path is not absolute). The absolute path cannot be DOS-style,
# because $ac_f cannot contain `:'.
@@ -6951,7 +6984,7 @@ do
[\\/$]*) false;;
*) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
esac ||
- as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5 ;;
+ as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
esac
case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
as_fn_append ac_file_inputs " '$ac_f'"
@@ -6977,8 +7010,8 @@ $as_echo "$as_me: creating $ac_file" >&6;}
esac
case $ac_tag in
- *:-:* | *:-) cat >"$tmp/stdin" \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
+ *:-:* | *:-) cat >"$ac_tmp/stdin" \
+ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
esac
;;
esac
@@ -7114,21 +7147,22 @@ s&@INSTALL@&$ac_INSTALL&;t t
s&@MKDIR_P@&$ac_MKDIR_P&;t t
$ac_datarootdir_hack
"
-eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
- || as_fn_error $? "could not create $ac_file" "$LINENO" 5
+eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
+ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
- { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
- { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
+ { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
+ { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
+ "$ac_tmp/out"`; test -z "$ac_out"; } &&
{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&5
$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
which seems to be undefined. Please make sure it is defined" >&2;}
- rm -f "$tmp/stdin"
+ rm -f "$ac_tmp/stdin"
case $ac_file in
- -) cat "$tmp/out" && rm -f "$tmp/out";;
- *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
+ -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
+ *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
esac \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
@@ -7139,20 +7173,20 @@ which seems to be undefined. Please make sure it is defined" >&2;}
if test x"$ac_file" != x-; then
{
$as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs"
- } >"$tmp/config.h" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
+ } >"$ac_tmp/config.h" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
- if diff "$ac_file" "$tmp/config.h" >/dev/null 2>&1; then
+ if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
$as_echo "$as_me: $ac_file is unchanged" >&6;}
else
rm -f "$ac_file"
- mv "$tmp/config.h" "$ac_file" \
+ mv "$ac_tmp/config.h" "$ac_file" \
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
fi
else
$as_echo "/* $configure_input */" \
- && eval '$AWK -f "$tmp/defines.awk"' "$ac_file_inputs" \
+ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
|| as_fn_error $? "could not create -" "$LINENO" 5
fi
# Compute "$ac_file"'s index in $config_headers.
diff --git a/src/algorithms/ConfusionMatrix.h b/src/algorithms/ConfusionMatrix.h
index b232b05..7d0b5a8 100644
--- a/src/algorithms/ConfusionMatrix.h
+++ b/src/algorithms/ConfusionMatrix.h
@@ -49,8 +49,10 @@ public:
int getClassIndex(string className) const {
int index=distance(m_classes.begin(),find(m_classes.begin(),m_classes.end(),className));
assert(index>=0);
- assert(index<m_results.size());
- return(index);
+ if(index<m_results.size())
+ return(index);
+ else
+ return(-1);
}
vector<string> getClassNames() const {return m_classes;};
~ConfusionMatrix();
diff --git a/src/algorithms/Makefile.am b/src/algorithms/Makefile.am
index be84cb4..ba0c1cc 100644
--- a/src/algorithms/Makefile.am
+++ b/src/algorithms/Makefile.am
@@ -7,7 +7,7 @@ AM_CXXFLAGS = -I$(top_srcdir)/src $(GDAL_CFLAGS) @AM_CXXFLAGS@
# the program to build (the names of the final binaries)
#do not want to install pktestoption
-noinst_PROGRAMS = pktestStat
+#noinst_PROGRAMS = pktestStat
###############################################################################
# THE LIBRARIES TO BUILD
@@ -35,5 +35,5 @@ libalgorithms_a_SOURCES = $(libalgorithms_a_HEADERS) Egcs.cc Filter2d.cc Filter.
###############################################################################
# list of sources for the binaries
-pktestStat_SOURCES = pktestStat.cc
-pktestStat_LDADD = $(GSL_LIBS) -lgslwrap $(top_builddir)/src/algorithms/libalgorithms.a $(top_builddir)/src/imageclasses/libimageClasses.a -lgslwrap
+#pktestStat_SOURCES = pktestStat.cc
+#pktestStat_LDADD = $(GSL_LIBS) -lgslwrap $(top_builddir)/src/algorithms/libalgorithms.a $(top_builddir)/src/imageclasses/libimageClasses.a -lgslwrap
diff --git a/src/algorithms/Makefile.in b/src/algorithms/Makefile.in
index a0dda50..063b4bc 100644
--- a/src/algorithms/Makefile.in
+++ b/src/algorithms/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -16,7 +16,6 @@
@SET_MAKE@
-
VPATH = @srcdir@
pkgdatadir = $(datadir)/@PACKAGE@
pkgincludedir = $(includedir)/@PACKAGE@
@@ -34,7 +33,6 @@ POST_INSTALL = :
NORMAL_UNINSTALL = :
PRE_UNINSTALL = :
POST_UNINSTALL = :
-noinst_PROGRAMS = pktestStat$(EXEEXT)
@USE_FANN_TRUE at am__append_1 = myfann_cpp.h
@USE_NLOPT_TRUE at am__append_2 = SensorModel.h OptFactory.h
subdir = src/algorithms
@@ -64,13 +62,6 @@ am_libalgorithms_a_OBJECTS = $(am__objects_2) Egcs.$(OBJEXT) \
Filter2d.$(OBJEXT) Filter.$(OBJEXT) ConfusionMatrix.$(OBJEXT) \
svm.$(OBJEXT)
libalgorithms_a_OBJECTS = $(am_libalgorithms_a_OBJECTS)
-PROGRAMS = $(noinst_PROGRAMS)
-am_pktestStat_OBJECTS = pktestStat.$(OBJEXT)
-pktestStat_OBJECTS = $(am_pktestStat_OBJECTS)
-am__DEPENDENCIES_1 =
-pktestStat_DEPENDENCIES = $(am__DEPENDENCIES_1) \
- $(top_builddir)/src/algorithms/libalgorithms.a \
- $(top_builddir)/src/imageclasses/libimageClasses.a
DEFAULT_INCLUDES = -I. at am__isrc@ -I$(top_builddir)
depcomp = $(SHELL) $(top_srcdir)/depcomp
am__depfiles_maybe = depfiles
@@ -84,9 +75,8 @@ COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
CCLD = $(CC)
LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libalgorithms_a_SOURCES) $(pktestStat_SOURCES)
-DIST_SOURCES = $(am__libalgorithms_a_SOURCES_DIST) \
- $(pktestStat_SOURCES)
+SOURCES = $(libalgorithms_a_SOURCES)
+DIST_SOURCES = $(am__libalgorithms_a_SOURCES_DIST)
am__libalgorithms_a_HEADERS_DIST = Egcs.h Filter2d.h Filter.h \
StatFactory.h ConfusionMatrix.h svm.h FeatureSelector.h \
myfann_cpp.h SensorModel.h OptFactory.h
@@ -111,6 +101,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(libalgorithms_adir)"
HEADERS = $(libalgorithms_a_HEADERS)
ETAGS = etags
@@ -228,6 +224,14 @@ top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
###############################################################################
+# THE PROGRAMS TO BUILD
+###############################################################################
+
+# the program to build (the names of the final binaries)
+#do not want to install pktestoption
+#noinst_PROGRAMS = pktestStat
+
+###############################################################################
# THE LIBRARIES TO BUILD
###############################################################################
@@ -244,11 +248,6 @@ libalgorithms_a_HEADERS = Egcs.h Filter2d.h Filter.h StatFactory.h \
# the sources to add to the library and to add to the source distribution
libalgorithms_a_SOURCES = $(libalgorithms_a_HEADERS) Egcs.cc Filter2d.cc Filter.cc ConfusionMatrix.cc svm.cpp
-###############################################################################
-
-# list of sources for the binaries
-pktestStat_SOURCES = pktestStat.cc
-pktestStat_LDADD = $(GSL_LIBS) -lgslwrap $(top_builddir)/src/algorithms/libalgorithms.a $(top_builddir)/src/imageclasses/libimageClasses.a -lgslwrap
all: all-am
.SUFFIXES:
@@ -286,17 +285,11 @@ $(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libalgorithms.a: $(libalgorithms_a_OBJECTS) $(libalgorithms_a_DEPENDENCIES)
+libalgorithms.a: $(libalgorithms_a_OBJECTS) $(libalgorithms_a_DEPENDENCIES) $(EXTRA_libalgorithms_a_DEPENDENCIES)
-rm -f libalgorithms.a
$(libalgorithms_a_AR) libalgorithms.a $(libalgorithms_a_OBJECTS) $(libalgorithms_a_LIBADD)
$(RANLIB) libalgorithms.a
-clean-noinstPROGRAMS:
- -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-pktestStat$(EXEEXT): $(pktestStat_OBJECTS) $(pktestStat_DEPENDENCIES)
- @rm -f pktestStat$(EXEEXT)
- $(CXXLINK) $(pktestStat_OBJECTS) $(pktestStat_LDADD) $(LIBS)
-
mostlyclean-compile:
-rm -f *.$(OBJEXT)
@@ -307,7 +300,6 @@ distclean-compile:
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Egcs.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Filter.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/Filter2d.Po at am__quote@
- at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/pktestStat.Po at am__quote@
@AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/svm.Po at am__quote@
.cc.o:
@@ -354,9 +346,7 @@ uninstall-libalgorithms_aHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(libalgorithms_a_HEADERS)'; test -n "$(libalgorithms_adir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(libalgorithms_adir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(libalgorithms_adir)" && rm -f $$files
+ dir='$(DESTDIR)$(libalgorithms_adir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -442,7 +432,7 @@ distdir: $(DISTFILES)
done
check-am: all-am
check: check-am
-all-am: Makefile $(LIBRARIES) $(PROGRAMS) $(HEADERS)
+all-am: Makefile $(LIBRARIES) $(HEADERS)
installdirs:
for dir in "$(DESTDIR)$(libalgorithms_adir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
@@ -457,10 +447,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
@@ -474,8 +469,7 @@ maintainer-clean-generic:
@echo "it deletes files that may require special tools to rebuild."
clean: clean-am
-clean-am: clean-generic clean-noinstLIBRARIES clean-noinstPROGRAMS \
- mostlyclean-am
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
distclean: distclean-am
-rm -rf ./$(DEPDIR)
@@ -545,19 +539,23 @@ uninstall-am: uninstall-libalgorithms_aHEADERS
.MAKE: install-am install-strip
.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-noinstLIBRARIES clean-noinstPROGRAMS ctags distclean \
- distclean-compile distclean-generic distclean-tags distdir dvi \
- dvi-am html html-am info info-am install install-am \
- install-data install-data-am install-dvi install-dvi-am \
- install-exec install-exec-am install-html install-html-am \
- install-info install-info-am install-libalgorithms_aHEADERS \
- install-man install-pdf install-pdf-am install-ps \
- install-ps-am install-strip installcheck installcheck-am \
- installdirs maintainer-clean maintainer-clean-generic \
- mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \
- ps ps-am tags uninstall uninstall-am \
- uninstall-libalgorithms_aHEADERS
+ clean-noinstLIBRARIES ctags distclean distclean-compile \
+ distclean-generic distclean-tags distdir dvi dvi-am html \
+ html-am info info-am install install-am install-data \
+ install-data-am install-dvi install-dvi-am install-exec \
+ install-exec-am install-html install-html-am install-info \
+ install-info-am install-libalgorithms_aHEADERS install-man \
+ install-pdf install-pdf-am install-ps install-ps-am \
+ install-strip installcheck installcheck-am installdirs \
+ maintainer-clean maintainer-clean-generic mostlyclean \
+ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \
+ tags uninstall uninstall-am uninstall-libalgorithms_aHEADERS
+###############################################################################
+
+# list of sources for the binaries
+#pktestStat_SOURCES = pktestStat.cc
+#pktestStat_LDADD = $(GSL_LIBS) -lgslwrap $(top_builddir)/src/algorithms/libalgorithms.a $(top_builddir)/src/imageclasses/libimageClasses.a -lgslwrap
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/src/apps/Makefile.am b/src/apps/Makefile.am
index c68e2a3..983129d 100644
--- a/src/apps/Makefile.am
+++ b/src/apps/Makefile.am
@@ -51,8 +51,7 @@ pkegcs_LDADD = -lgdal $(AM_LDFLAGS) -lgdal
pkextract_SOURCES = pkextract.cc
pkfillnodata_SOURCES = pkfillnodata.cc
pkfilter_SOURCES = pkfilter.cc
-pkfilter_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lgslwrap -lgdal
-
+pkfilter_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lgsl -lgslwrap -lgdal
pkdsm2shadow_SOURCES = pkdsm2shadow.cc
pkmosaic_SOURCES = pkmosaic.cc
pkndvi_SOURCES = pkndvi.cc
diff --git a/src/apps/Makefile.in b/src/apps/Makefile.in
index 039a633..c127469 100644
--- a/src/apps/Makefile.in
+++ b/src/apps/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -426,7 +426,7 @@ pkegcs_LDADD = -lgdal $(AM_LDFLAGS) -lgdal
pkextract_SOURCES = pkextract.cc
pkfillnodata_SOURCES = pkfillnodata.cc
pkfilter_SOURCES = pkfilter.cc
-pkfilter_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lgslwrap -lgdal
+pkfilter_LDADD = $(GSL_LIBS) $(AM_LDFLAGS) -lgsl -lgslwrap -lgdal
pkdsm2shadow_SOURCES = pkdsm2shadow.cc
pkmosaic_SOURCES = pkmosaic.cc
pkndvi_SOURCES = pkndvi.cc
@@ -509,94 +509,94 @@ uninstall-binPROGRAMS:
clean-binPROGRAMS:
-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
-pkascii2img$(EXEEXT): $(pkascii2img_OBJECTS) $(pkascii2img_DEPENDENCIES)
+pkascii2img$(EXEEXT): $(pkascii2img_OBJECTS) $(pkascii2img_DEPENDENCIES) $(EXTRA_pkascii2img_DEPENDENCIES)
@rm -f pkascii2img$(EXEEXT)
$(CXXLINK) $(pkascii2img_OBJECTS) $(pkascii2img_LDADD) $(LIBS)
-pkascii2ogr$(EXEEXT): $(pkascii2ogr_OBJECTS) $(pkascii2ogr_DEPENDENCIES)
+pkascii2ogr$(EXEEXT): $(pkascii2ogr_OBJECTS) $(pkascii2ogr_DEPENDENCIES) $(EXTRA_pkascii2ogr_DEPENDENCIES)
@rm -f pkascii2ogr$(EXEEXT)
$(CXXLINK) $(pkascii2ogr_OBJECTS) $(pkascii2ogr_LDADD) $(LIBS)
-pkclassify_nn$(EXEEXT): $(pkclassify_nn_OBJECTS) $(pkclassify_nn_DEPENDENCIES)
+pkclassify_nn$(EXEEXT): $(pkclassify_nn_OBJECTS) $(pkclassify_nn_DEPENDENCIES) $(EXTRA_pkclassify_nn_DEPENDENCIES)
@rm -f pkclassify_nn$(EXEEXT)
$(pkclassify_nn_LINK) $(pkclassify_nn_OBJECTS) $(pkclassify_nn_LDADD) $(LIBS)
-pkclassify_svm$(EXEEXT): $(pkclassify_svm_OBJECTS) $(pkclassify_svm_DEPENDENCIES)
+pkclassify_svm$(EXEEXT): $(pkclassify_svm_OBJECTS) $(pkclassify_svm_DEPENDENCIES) $(EXTRA_pkclassify_svm_DEPENDENCIES)
@rm -f pkclassify_svm$(EXEEXT)
$(CXXLINK) $(pkclassify_svm_OBJECTS) $(pkclassify_svm_LDADD) $(LIBS)
-pkcreatect$(EXEEXT): $(pkcreatect_OBJECTS) $(pkcreatect_DEPENDENCIES)
+pkcreatect$(EXEEXT): $(pkcreatect_OBJECTS) $(pkcreatect_DEPENDENCIES) $(EXTRA_pkcreatect_DEPENDENCIES)
@rm -f pkcreatect$(EXEEXT)
$(CXXLINK) $(pkcreatect_OBJECTS) $(pkcreatect_LDADD) $(LIBS)
-pkcrop$(EXEEXT): $(pkcrop_OBJECTS) $(pkcrop_DEPENDENCIES)
+pkcrop$(EXEEXT): $(pkcrop_OBJECTS) $(pkcrop_DEPENDENCIES) $(EXTRA_pkcrop_DEPENDENCIES)
@rm -f pkcrop$(EXEEXT)
$(CXXLINK) $(pkcrop_OBJECTS) $(pkcrop_LDADD) $(LIBS)
-pkdiff$(EXEEXT): $(pkdiff_OBJECTS) $(pkdiff_DEPENDENCIES)
+pkdiff$(EXEEXT): $(pkdiff_OBJECTS) $(pkdiff_DEPENDENCIES) $(EXTRA_pkdiff_DEPENDENCIES)
@rm -f pkdiff$(EXEEXT)
$(CXXLINK) $(pkdiff_OBJECTS) $(pkdiff_LDADD) $(LIBS)
-pkdsm2shadow$(EXEEXT): $(pkdsm2shadow_OBJECTS) $(pkdsm2shadow_DEPENDENCIES)
+pkdsm2shadow$(EXEEXT): $(pkdsm2shadow_OBJECTS) $(pkdsm2shadow_DEPENDENCIES) $(EXTRA_pkdsm2shadow_DEPENDENCIES)
@rm -f pkdsm2shadow$(EXEEXT)
$(CXXLINK) $(pkdsm2shadow_OBJECTS) $(pkdsm2shadow_LDADD) $(LIBS)
-pkdumpimg$(EXEEXT): $(pkdumpimg_OBJECTS) $(pkdumpimg_DEPENDENCIES)
+pkdumpimg$(EXEEXT): $(pkdumpimg_OBJECTS) $(pkdumpimg_DEPENDENCIES) $(EXTRA_pkdumpimg_DEPENDENCIES)
@rm -f pkdumpimg$(EXEEXT)
$(CXXLINK) $(pkdumpimg_OBJECTS) $(pkdumpimg_LDADD) $(LIBS)
-pkdumpogr$(EXEEXT): $(pkdumpogr_OBJECTS) $(pkdumpogr_DEPENDENCIES)
+pkdumpogr$(EXEEXT): $(pkdumpogr_OBJECTS) $(pkdumpogr_DEPENDENCIES) $(EXTRA_pkdumpogr_DEPENDENCIES)
@rm -f pkdumpogr$(EXEEXT)
$(CXXLINK) $(pkdumpogr_OBJECTS) $(pkdumpogr_LDADD) $(LIBS)
-pkeditogr$(EXEEXT): $(pkeditogr_OBJECTS) $(pkeditogr_DEPENDENCIES)
+pkeditogr$(EXEEXT): $(pkeditogr_OBJECTS) $(pkeditogr_DEPENDENCIES) $(EXTRA_pkeditogr_DEPENDENCIES)
@rm -f pkeditogr$(EXEEXT)
$(CXXLINK) $(pkeditogr_OBJECTS) $(pkeditogr_LDADD) $(LIBS)
-pkegcs$(EXEEXT): $(pkegcs_OBJECTS) $(pkegcs_DEPENDENCIES)
+pkegcs$(EXEEXT): $(pkegcs_OBJECTS) $(pkegcs_DEPENDENCIES) $(EXTRA_pkegcs_DEPENDENCIES)
@rm -f pkegcs$(EXEEXT)
$(CXXLINK) $(pkegcs_OBJECTS) $(pkegcs_LDADD) $(LIBS)
-pkextract$(EXEEXT): $(pkextract_OBJECTS) $(pkextract_DEPENDENCIES)
+pkextract$(EXEEXT): $(pkextract_OBJECTS) $(pkextract_DEPENDENCIES) $(EXTRA_pkextract_DEPENDENCIES)
@rm -f pkextract$(EXEEXT)
$(CXXLINK) $(pkextract_OBJECTS) $(pkextract_LDADD) $(LIBS)
-pkfillnodata$(EXEEXT): $(pkfillnodata_OBJECTS) $(pkfillnodata_DEPENDENCIES)
+pkfillnodata$(EXEEXT): $(pkfillnodata_OBJECTS) $(pkfillnodata_DEPENDENCIES) $(EXTRA_pkfillnodata_DEPENDENCIES)
@rm -f pkfillnodata$(EXEEXT)
$(CXXLINK) $(pkfillnodata_OBJECTS) $(pkfillnodata_LDADD) $(LIBS)
-pkfilter$(EXEEXT): $(pkfilter_OBJECTS) $(pkfilter_DEPENDENCIES)
+pkfilter$(EXEEXT): $(pkfilter_OBJECTS) $(pkfilter_DEPENDENCIES) $(EXTRA_pkfilter_DEPENDENCIES)
@rm -f pkfilter$(EXEEXT)
$(CXXLINK) $(pkfilter_OBJECTS) $(pkfilter_LDADD) $(LIBS)
-pkfs_nn$(EXEEXT): $(pkfs_nn_OBJECTS) $(pkfs_nn_DEPENDENCIES)
+pkfs_nn$(EXEEXT): $(pkfs_nn_OBJECTS) $(pkfs_nn_DEPENDENCIES) $(EXTRA_pkfs_nn_DEPENDENCIES)
@rm -f pkfs_nn$(EXEEXT)
$(pkfs_nn_LINK) $(pkfs_nn_OBJECTS) $(pkfs_nn_LDADD) $(LIBS)
-pkfs_svm$(EXEEXT): $(pkfs_svm_OBJECTS) $(pkfs_svm_DEPENDENCIES)
+pkfs_svm$(EXEEXT): $(pkfs_svm_OBJECTS) $(pkfs_svm_DEPENDENCIES) $(EXTRA_pkfs_svm_DEPENDENCIES)
@rm -f pkfs_svm$(EXEEXT)
$(CXXLINK) $(pkfs_svm_OBJECTS) $(pkfs_svm_LDADD) $(LIBS)
-pkgetmask$(EXEEXT): $(pkgetmask_OBJECTS) $(pkgetmask_DEPENDENCIES)
+pkgetmask$(EXEEXT): $(pkgetmask_OBJECTS) $(pkgetmask_DEPENDENCIES) $(EXTRA_pkgetmask_DEPENDENCIES)
@rm -f pkgetmask$(EXEEXT)
$(CXXLINK) $(pkgetmask_OBJECTS) $(pkgetmask_LDADD) $(LIBS)
-pkinfo$(EXEEXT): $(pkinfo_OBJECTS) $(pkinfo_DEPENDENCIES)
+pkinfo$(EXEEXT): $(pkinfo_OBJECTS) $(pkinfo_DEPENDENCIES) $(EXTRA_pkinfo_DEPENDENCIES)
@rm -f pkinfo$(EXEEXT)
$(CXXLINK) $(pkinfo_OBJECTS) $(pkinfo_LDADD) $(LIBS)
-pklas2img$(EXEEXT): $(pklas2img_OBJECTS) $(pklas2img_DEPENDENCIES)
+pklas2img$(EXEEXT): $(pklas2img_OBJECTS) $(pklas2img_DEPENDENCIES) $(EXTRA_pklas2img_DEPENDENCIES)
@rm -f pklas2img$(EXEEXT)
$(CXXLINK) $(pklas2img_OBJECTS) $(pklas2img_LDADD) $(LIBS)
-pkmosaic$(EXEEXT): $(pkmosaic_OBJECTS) $(pkmosaic_DEPENDENCIES)
+pkmosaic$(EXEEXT): $(pkmosaic_OBJECTS) $(pkmosaic_DEPENDENCIES) $(EXTRA_pkmosaic_DEPENDENCIES)
@rm -f pkmosaic$(EXEEXT)
$(CXXLINK) $(pkmosaic_OBJECTS) $(pkmosaic_LDADD) $(LIBS)
-pkndvi$(EXEEXT): $(pkndvi_OBJECTS) $(pkndvi_DEPENDENCIES)
+pkndvi$(EXEEXT): $(pkndvi_OBJECTS) $(pkndvi_DEPENDENCIES) $(EXTRA_pkndvi_DEPENDENCIES)
@rm -f pkndvi$(EXEEXT)
$(CXXLINK) $(pkndvi_OBJECTS) $(pkndvi_LDADD) $(LIBS)
-pkopt_svm$(EXEEXT): $(pkopt_svm_OBJECTS) $(pkopt_svm_DEPENDENCIES)
+pkopt_svm$(EXEEXT): $(pkopt_svm_OBJECTS) $(pkopt_svm_DEPENDENCIES) $(EXTRA_pkopt_svm_DEPENDENCIES)
@rm -f pkopt_svm$(EXEEXT)
$(CXXLINK) $(pkopt_svm_OBJECTS) $(pkopt_svm_LDADD) $(LIBS)
-pkpolygonize$(EXEEXT): $(pkpolygonize_OBJECTS) $(pkpolygonize_DEPENDENCIES)
+pkpolygonize$(EXEEXT): $(pkpolygonize_OBJECTS) $(pkpolygonize_DEPENDENCIES) $(EXTRA_pkpolygonize_DEPENDENCIES)
@rm -f pkpolygonize$(EXEEXT)
$(CXXLINK) $(pkpolygonize_OBJECTS) $(pkpolygonize_LDADD) $(LIBS)
-pkreclass$(EXEEXT): $(pkreclass_OBJECTS) $(pkreclass_DEPENDENCIES)
+pkreclass$(EXEEXT): $(pkreclass_OBJECTS) $(pkreclass_DEPENDENCIES) $(EXTRA_pkreclass_DEPENDENCIES)
@rm -f pkreclass$(EXEEXT)
$(CXXLINK) $(pkreclass_OBJECTS) $(pkreclass_LDADD) $(LIBS)
-pksensormodel$(EXEEXT): $(pksensormodel_OBJECTS) $(pksensormodel_DEPENDENCIES)
+pksensormodel$(EXEEXT): $(pksensormodel_OBJECTS) $(pksensormodel_DEPENDENCIES) $(EXTRA_pksensormodel_DEPENDENCIES)
@rm -f pksensormodel$(EXEEXT)
$(CXXLINK) $(pksensormodel_OBJECTS) $(pksensormodel_LDADD) $(LIBS)
-pksetmask$(EXEEXT): $(pksetmask_OBJECTS) $(pksetmask_DEPENDENCIES)
+pksetmask$(EXEEXT): $(pksetmask_OBJECTS) $(pksetmask_DEPENDENCIES) $(EXTRA_pksetmask_DEPENDENCIES)
@rm -f pksetmask$(EXEEXT)
$(CXXLINK) $(pksetmask_OBJECTS) $(pksetmask_LDADD) $(LIBS)
-pksieve$(EXEEXT): $(pksieve_OBJECTS) $(pksieve_DEPENDENCIES)
+pksieve$(EXEEXT): $(pksieve_OBJECTS) $(pksieve_DEPENDENCIES) $(EXTRA_pksieve_DEPENDENCIES)
@rm -f pksieve$(EXEEXT)
$(CXXLINK) $(pksieve_OBJECTS) $(pksieve_LDADD) $(LIBS)
-pkstat$(EXEEXT): $(pkstat_OBJECTS) $(pkstat_DEPENDENCIES)
+pkstat$(EXEEXT): $(pkstat_OBJECTS) $(pkstat_DEPENDENCIES) $(EXTRA_pkstat_DEPENDENCIES)
@rm -f pkstat$(EXEEXT)
$(CXXLINK) $(pkstat_OBJECTS) $(pkstat_LDADD) $(LIBS)
-pkstatogr$(EXEEXT): $(pkstatogr_OBJECTS) $(pkstatogr_DEPENDENCIES)
+pkstatogr$(EXEEXT): $(pkstatogr_OBJECTS) $(pkstatogr_DEPENDENCIES) $(EXTRA_pkstatogr_DEPENDENCIES)
@rm -f pkstatogr$(EXEEXT)
$(CXXLINK) $(pkstatogr_OBJECTS) $(pkstatogr_LDADD) $(LIBS)
@@ -807,10 +807,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/src/apps/pkclassify_svm.cc b/src/apps/pkclassify_svm.cc
index ca7200d..6f3e986 100644
--- a/src/apps/pkclassify_svm.cc
+++ b/src/apps/pkclassify_svm.cc
@@ -242,8 +242,16 @@ int main(int argc, char *argv[])
if(band_opt.size())
std::sort(band_opt.begin(),band_opt.end());
+ map<string,short>classValueMap;
+ if(classname_opt.size()){
+ assert(classname_opt.size()==classvalue_opt.size());
+ for(int iclass=0;iclass<classname_opt.size();++iclass)
+ classValueMap[classname_opt[iclass]]=classvalue_opt[iclass];
+ }
+
//----------------------------------- Training -------------------------------
ConfusionMatrix cm;
+ vector<std::string> nameVector;
vector< vector<double> > offset(nbag);
vector< vector<double> > scale(nbag);
map<string,Vector2d<float> > trainingMap;
@@ -308,6 +316,8 @@ int main(int argc, char *argv[])
}
if(!ibag){
nclass=trainingPixels.size();
+ if(classname_opt.size())
+ assert(nclass==classname_opt.size());
nband=trainingPixels[0][0].size()-2;//X and Y//trainingPixels[0][0].size();
}
else{
@@ -407,10 +417,14 @@ int main(int argc, char *argv[])
}
map<string,Vector2d<float> >::iterator mapit=trainingMap.begin();
while(mapit!=trainingMap.end()){
- cm.pushBackClassName(mapit->first);
+ nameVector.push_back(mapit->first);
+ if(classValueMap.empty())
+ cm.pushBackClassName(mapit->first);
+ else if(cm.getClassIndex(type2string<short>(classValueMap[mapit->first]))<0)
+ cm.pushBackClassName(type2string<short>(classValueMap[mapit->first]));
++mapit;
}
- assert(cm.size()==nclass);
+ // assert(cm.size()==nclass);
}//if(!ibag)
//Calculate features of trainig set
@@ -495,10 +509,16 @@ int main(int argc, char *argv[])
svm_cross_validation(&prob[ibag],¶m[ibag],cv_opt[0],target);
assert(param[ibag].svm_type != EPSILON_SVR&¶m[ibag].svm_type != NU_SVR);//only for regression
- for(int i=0;i<prob[ibag].l;i++)
- cm.incrementResult(cm.getClass(prob[ibag].y[i]),cm.getClass(target[i]),1.0/nbag);
+ for(int i=0;i<prob[ibag].l;i++){
+ string refClassName=nameVector[prob[ibag].y[i]];
+ string className=nameVector[target[i]];
+ if(classValueMap.size())
+ cm.incrementResult(type2string<short>(classValueMap[refClassName]),type2string<short>(classValueMap[className]),1.0/nbag);
+ else
+ cm.incrementResult(cm.getClass(prob[ibag].y[i]),cm.getClass(target[i]),1.0/nbag);
+ }
free(target);
- }
+ }
if(verbose_opt[0]>1)
std::cout << "SVM is now trained" << std::endl;
// *NOTE* Because svm_model contains pointers to svm_problem, you can
@@ -537,19 +557,9 @@ int main(int argc, char *argv[])
pfnProgress(progress,pszMessage,pProgressArg);
//-------------------------------- open image file ------------------------------------
if(input_opt[0].find(".shp")==string::npos){
- //test
- if(classname_opt.size()!=classvalue_opt.size())
- std::cout << classname_opt.size() << "!=" << classvalue_opt.size() << std::endl;
- assert(classname_opt.size()==classvalue_opt.size());
- if(classname_opt.size())
- assert(classname_opt.size()==nclass);
- map<string,short>classValueMap;
- if(classname_opt.empty())
+ if(classname_opt.empty()){
std::cerr << "Warning: no class name and value pair provided for all " << nclass << " classes, using string2type<int> instead!" << std::endl;
- for(int iclass=0;iclass<nclass;++iclass){
- if(classname_opt.size()==nclass)
- classValueMap[classname_opt[iclass]]=classvalue_opt[iclass];
- else
+ for(int iclass=0;iclass<nclass;++iclass)
classValueMap[type2string<short>(iclass)]=string2type<short>(cm.getClass(iclass));
}
@@ -857,7 +867,9 @@ int main(int argc, char *argv[])
for(short iclass=0;iclass<nclass;++iclass){
if(prOut[iclass][icol]>maxBag1){
maxBag1=prOut[iclass][icol];
- classOut[icol]=classValueMap[cm.getClass(iclass)];
+ // classOut[icol]=classValueMap[type2string<short>(iclass)];
+ classOut[icol]=classValueMap[nameVector[iclass]];
+ // classOut[icol]=classValueMap[cm.getClass(iclass)];
}
else if(prOut[iclass][icol]>maxBag2)
maxBag2=prOut[iclass][icol];
@@ -964,7 +976,10 @@ int main(int argc, char *argv[])
imgWriterOgr.open(output_opt[ivalidation],imgReaderOgr);
if(verbose_opt[0])
std::cout << "creating field class" << std::endl;
- imgWriterOgr.createField("class",OFTString);
+ if(classValueMap.size())
+ imgWriterOgr.createField("class",OFTInteger);
+ else
+ imgWriterOgr.createField("class",OFTString);
}
OGRFeature *poFeature;
unsigned int ifeature=0;
@@ -1065,15 +1080,20 @@ int main(int argc, char *argv[])
std::cout << prOut[iclass] << " ";
if(prOut[iclass]>maxBag){
maxBag=prOut[iclass];
- classOut=cm.getClass(iclass);
+ classOut=nameVector[iclass];
+ // classOut=cm.getClass(iclass);
//test
- assert(iclass==cm.getClassIndex(cm.getClass(iclass)));
+ // assert(iclass==cm.getClassIndex(cm.getClass(iclass)));
}
// normBag+=prOut[iclass];
}
//look for class name
- if(verbose_opt[0]>1)
- std::cout << "->" << classOut << std::endl;
+ if(verbose_opt[0]>1){
+ if(classValueMap.size())
+ std::cout << "->" << classValueMap[classOut] << std::endl;
+ else
+ std::cout << "->" << classOut << std::endl;
+ }
//normalize prOut and convert to percentage
// for(int iclass=0;iclass<nreclass;++iclass){
// float prv=prOut[iclass];
@@ -1082,7 +1102,10 @@ int main(int argc, char *argv[])
// prOut[iclass]=static_cast<short>(prv+0.5);
// }
if(output_opt.size()){
- poDstFeature->SetField("class",classOut.c_str());
+ if(classValueMap.size())
+ poDstFeature->SetField("class",classValueMap[classOut]);
+ else
+ poDstFeature->SetField("class",classOut.c_str());
poDstFeature->SetFID( poFeature->GetFID() );
}
int labelIndex=poFeature->GetFieldIndex(label_opt[0].c_str());
@@ -1091,7 +1114,14 @@ int main(int argc, char *argv[])
// //test
// std::cout << classRef << "->" << type2string<int>(classRef) << std::endl;
// std::cout << classOut << "->" << type2string<int>(classOut) << std::endl;
- cm.incrementResult(classRef,classOut,1);
+ //todo: implement a validation option instead
+ //todo: what if classValueMap.size() ?
+ if(classRef!="0"){
+ if(classValueMap.size())
+ cm.incrementResult(type2string<short>(classValueMap[classRef]),type2string<short>(classValueMap[classOut]),1);
+ else
+ cm.incrementResult(classRef,classOut,1);
+ }
}
CPLErrorReset();
if(output_opt.size()){
diff --git a/src/apps/pkopt_svm.cc b/src/apps/pkopt_svm.cc
index 5b30995..2d36358 100644
--- a/src/apps/pkopt_svm.cc
+++ b/src/apps/pkopt_svm.cc
@@ -54,8 +54,8 @@ Optionpk<short> verbose_opt("v", "verbose", "set to: 0 (results only), 1 (confus
double objFunction(const std::vector<double> &x, std::vector<double> &grad, void *my_func_data){
assert(grad.empty());
vector<Vector2d<float> > *tf=reinterpret_cast<vector<Vector2d<float> >*> (my_func_data);
- float gamma=x[0];
- float ccost=x[1];
+ float ccost=x[0];
+ float gamma=x[1];
double error=1.0/epsilon_tol_opt[0];
double kappa=1.0;
double oa=1.0;
@@ -85,7 +85,7 @@ double objFunction(const std::vector<double> &x, std::vector<double> &grad, void
struct svm_model* svm;
struct svm_problem prob;
struct svm_node* x_space;
- prob.l=ntraining;
+ prob.l=ntraining;
prob.y = Malloc(double,prob.l);
prob.x = Malloc(struct svm_node *,prob.l);
x_space = Malloc(struct svm_node,(nFeatures+1)*ntraining);
@@ -162,7 +162,7 @@ int main(int argc, char *argv[])
Optionpk<float> gamma_opt("g", "gamma", "min max boundaries for gamma in kernel function (optional: initial value)",0);
Optionpk<float> ccost_opt("cc", "ccost", "min and max boundaries the parameter C of C-SVC, epsilon-SVR, and nu-SVR (optional: initial value)",1);
Optionpk<unsigned int> maxit_opt("maxit","maxit","maximum number of iterations",500);
- Optionpk<string> algorithm_opt("a", "algorithm", "optimization algorithm (see http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms)","LN_COBYLA");
+ Optionpk<string> algorithm_opt("a", "algorithm", "GRID, or any optimization algorithm from http://ab-initio.mit.edu/wiki/index.php/NLopt_Algorithms","GRID");
Optionpk<double> tolerance_opt("tol","tolerance","relative tolerance for stopping criterion",0.0001);
bool doProcess;//stop process when program was invoked with help option (-h --help)
@@ -474,36 +474,71 @@ int main(int argc, char *argv[])
gamma_opt.push_back(0);//will be translated to 1.0/nFeatures
assert(ccost_opt.size()==3);//min, init, max
assert(gamma_opt.size()==3);//min, init, max
- nlopt::opt optimizer=OptFactory::getOptimizer(algorithm_opt[0],2);
- if(verbose_opt[0]>1)
- std::cout << "optimization algorithm: " << optimizer.get_algorithm_name() << "..." << std::endl;
- std::vector<double> lb(2);
- std::vector<double> init(2);
- std::vector<double> ub(2);
- lb[0]=ccost_opt[0];
- lb[1]=(gamma_opt[0]>0)? gamma_opt[0] : 1.0/trainingFeatures[0][0].size();
- init[0]=ccost_opt[2];
- init[1]=(gamma_opt[2]>0)? gamma_opt[1] : 1.0/trainingFeatures[0][0].size();
- ub[0]=ccost_opt[1];
- ub[1]=(gamma_opt[1]>0)? gamma_opt[1] : 1.0/trainingFeatures[0][0].size();
- optimizer.set_min_objective(objFunction, &trainingFeatures);
- optimizer.set_lower_bounds(lb);
- optimizer.set_upper_bounds(ub);
-
- if(verbose_opt[0]>1)
- std::cout << "set stopping criteria" << std::endl;
- //set stopping criteria
- if(maxit_opt[0])
- optimizer.set_maxeval(maxit_opt[0]);
- else
- optimizer.set_xtol_rel(tolerance_opt[0]);
- double minf=0;
- std::vector<double> x=init;
- optimizer.optimize(x, minf);
- double ccost=x[0];
- double gamma=x[1];
- if(verbose_opt[0])
- std::cout << "optimized with " << optimizer.get_algorithm_name() << "..." << std::endl;
+ std::vector<double> x(2);
+ if(algorithm_opt[0]=="GRID"){
+ double minError=1000;
+ double minCost=0;
+ double minGamma=0;
+ const char* pszMessage;
+ void* pProgressArg=NULL;
+ GDALProgressFunc pfnProgress=GDALTermProgress;
+ double progress=0;
+ pfnProgress(progress,pszMessage,pProgressArg);
+ double ncost=log(ccost_opt[1])/log(10)-log(ccost_opt[0])/log(10);
+ double ngamma=log(gamma_opt[1])/log(10)-log(gamma_opt[0])/log(10);
+ for(double ccost=ccost_opt[0];ccost<=ccost_opt[1];ccost*=10){
+ for(double gamma=gamma_opt[0];gamma<=gamma_opt[1];gamma*=10){
+ x[0]=ccost;
+ x[1]=gamma;
+ std::vector<double> theGrad;
+ double error=objFunction(x,theGrad,&trainingFeatures);
+ if(error<minError){
+ minError=error;
+ minCost=ccost;
+ minGamma=gamma;
+ if(verbose_opt[0])
+ std::cout << ccost << " " << gamma << error<< std::endl;
+ }
+ progress+=1.0/ncost/ngamma;
+ pfnProgress(progress,pszMessage,pProgressArg);
+ }
+ }
+ progress=1.0;
+ pfnProgress(progress,pszMessage,pProgressArg);
+ x[0]=minCost;
+ x[1]=minGamma;
+ }
+ else{
+ nlopt::opt optimizer=OptFactory::getOptimizer(algorithm_opt[0],2);
+ if(verbose_opt[0]>1)
+ std::cout << "optimization algorithm: " << optimizer.get_algorithm_name() << "..." << std::endl;
+ std::vector<double> lb(2);
+ std::vector<double> init(2);
+ std::vector<double> ub(2);
+ lb[0]=ccost_opt[0];
+ lb[1]=(gamma_opt[0]>0)? gamma_opt[0] : 1.0/trainingFeatures[0][0].size();
+ init[0]=ccost_opt[2];
+ init[1]=(gamma_opt[2]>0)? gamma_opt[1] : 1.0/trainingFeatures[0][0].size();
+ ub[0]=ccost_opt[1];
+ ub[1]=(gamma_opt[1]>0)? gamma_opt[1] : 1.0/trainingFeatures[0][0].size();
+ optimizer.set_min_objective(objFunction, &trainingFeatures);
+ optimizer.set_lower_bounds(lb);
+ optimizer.set_upper_bounds(ub);
+ if(verbose_opt[0]>1)
+ std::cout << "set stopping criteria" << std::endl;
+ //set stopping criteria
+ if(maxit_opt[0])
+ optimizer.set_maxeval(maxit_opt[0]);
+ else
+ optimizer.set_xtol_rel(tolerance_opt[0]);
+ double minf=0;
+ x=init;
+ optimizer.optimize(x, minf);
+ double ccost=x[0];
+ double gamma=x[1];
+ if(verbose_opt[0])
+ std::cout << "optimized with " << optimizer.get_algorithm_name() << "..." << std::endl;
+ }
std::cout << " --ccost " << x[0];
std::cout << " --gamma " << x[1];
std::cout << std::endl;
diff --git a/src/base/Makefile.in b/src/base/Makefile.in
index a0ddf10..11bb775 100644
--- a/src/base/Makefile.in
+++ b/src/base/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -99,6 +99,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(libbase_adir)"
HEADERS = $(libbase_a_HEADERS) $(noinst_HEADERS)
ETAGS = etags
@@ -278,14 +284,14 @@ $(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libbase.a: $(libbase_a_OBJECTS) $(libbase_a_DEPENDENCIES)
+libbase.a: $(libbase_a_OBJECTS) $(libbase_a_DEPENDENCIES) $(EXTRA_libbase_a_DEPENDENCIES)
-rm -f libbase.a
$(libbase_a_AR) libbase.a $(libbase_a_OBJECTS) $(libbase_a_LIBADD)
$(RANLIB) libbase.a
clean-noinstPROGRAMS:
-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
-pktestOption$(EXEEXT): $(pktestOption_OBJECTS) $(pktestOption_DEPENDENCIES)
+pktestOption$(EXEEXT): $(pktestOption_OBJECTS) $(pktestOption_DEPENDENCIES) $(EXTRA_pktestOption_DEPENDENCIES)
@rm -f pktestOption$(EXEEXT)
$(CXXLINK) $(pktestOption_OBJECTS) $(pktestOption_LDADD) $(LIBS)
@@ -328,9 +334,7 @@ uninstall-libbase_aHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(libbase_a_HEADERS)'; test -n "$(libbase_adir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(libbase_adir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(libbase_adir)" && rm -f $$files
+ dir='$(DESTDIR)$(libbase_adir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -431,10 +435,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/src/fileclasses/Makefile.in b/src/fileclasses/Makefile.in
index 5144752..72f63ab 100644
--- a/src/fileclasses/Makefile.in
+++ b/src/fileclasses/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -93,6 +93,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(libfileClasses_adir)"
HEADERS = $(libfileClasses_a_HEADERS)
ETAGS = etags
@@ -258,7 +264,7 @@ $(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libfileClasses.a: $(libfileClasses_a_OBJECTS) $(libfileClasses_a_DEPENDENCIES)
+libfileClasses.a: $(libfileClasses_a_OBJECTS) $(libfileClasses_a_DEPENDENCIES) $(EXTRA_libfileClasses_a_DEPENDENCIES)
-rm -f libfileClasses.a
$(libfileClasses_a_AR) libfileClasses.a $(libfileClasses_a_OBJECTS) $(libfileClasses_a_LIBADD)
$(RANLIB) libfileClasses.a
@@ -301,9 +307,7 @@ uninstall-libfileClasses_aHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(libfileClasses_a_HEADERS)'; test -n "$(libfileClasses_adir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(libfileClasses_adir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(libfileClasses_adir)" && rm -f $$files
+ dir='$(DESTDIR)$(libfileClasses_adir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -404,10 +408,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
diff --git a/src/imageclasses/Makefile.in b/src/imageclasses/Makefile.in
index 89169bc..2f7593a 100644
--- a/src/imageclasses/Makefile.in
+++ b/src/imageclasses/Makefile.in
@@ -1,9 +1,9 @@
-# Makefile.in generated by automake 1.11.1 from Makefile.am.
+# Makefile.in generated by automake 1.11.3 from Makefile.am.
# @configure_input@
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software
+# Foundation, Inc.
# This Makefile.in is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
@@ -91,6 +91,12 @@ am__nobase_list = $(am__nobase_strip_setup); \
am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+am__uninstall_files_from_dir = { \
+ test -z "$$files" \
+ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \
+ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \
+ $(am__cd) "$$dir" && rm -f $$files; }; \
+ }
am__installdirs = "$(DESTDIR)$(libimageClasses_adir)"
HEADERS = $(libimageClasses_a_HEADERS)
ETAGS = etags
@@ -259,7 +265,7 @@ $(am__aclocal_m4_deps):
clean-noinstLIBRARIES:
-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
-libimageClasses.a: $(libimageClasses_a_OBJECTS) $(libimageClasses_a_DEPENDENCIES)
+libimageClasses.a: $(libimageClasses_a_OBJECTS) $(libimageClasses_a_DEPENDENCIES) $(EXTRA_libimageClasses_a_DEPENDENCIES)
-rm -f libimageClasses.a
$(libimageClasses_a_AR) libimageClasses.a $(libimageClasses_a_OBJECTS) $(libimageClasses_a_LIBADD)
$(RANLIB) libimageClasses.a
@@ -305,9 +311,7 @@ uninstall-libimageClasses_aHEADERS:
@$(NORMAL_UNINSTALL)
@list='$(libimageClasses_a_HEADERS)'; test -n "$(libimageClasses_adir)" || list=; \
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
- test -n "$$files" || exit 0; \
- echo " ( cd '$(DESTDIR)$(libimageClasses_adir)' && rm -f" $$files ")"; \
- cd "$(DESTDIR)$(libimageClasses_adir)" && rm -f $$files
+ dir='$(DESTDIR)$(libimageClasses_adir)'; $(am__uninstall_files_from_dir)
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -408,10 +412,15 @@ install-am: all-am
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/pktools.git
More information about the Pkg-grass-devel
mailing list