[lttng-dev] [PATCH lttng-ust] Move m4 scripts to m4 dir

Mathieu Desnoyers mathieu.desnoyers at efficios.com
Tue May 9 18:53:22 UTC 2017


Merged into master and stable-2.10, thanks!

Mathieu

----- On May 9, 2017, at 2:46 PM, Michael Jeanson mjeanson at efficios.com wrote:

> Harmonize build system configuration across our projects.
> 
> Signed-off-by: Michael Jeanson <mjeanson at efficios.com>
> ---
> .gitignore                    |  22 ++-
> Makefile.am                   |   2 +-
> config/ax_check_class.m4      | 144 ------------------
> config/ax_check_classpath.m4  |  60 --------
> config/ax_check_rqrd_class.m4 |  62 --------
> config/ax_java_options.m4     |  48 ------
> config/ax_jni_include_dir.m4  | 126 ----------------
> config/ax_prog_jar.m4         |  49 ------
> config/ax_prog_java.m4        | 115 --------------
> config/ax_prog_java_works.m4  | 134 -----------------
> config/ax_prog_javac.m4       |  79 ----------
> config/ax_prog_javac_works.m4 |  72 ---------
> config/ax_prog_javah.m4       |  47 ------
> config/ax_sys_weak_alias.m4   | 337 ------------------------------------------
> config/ax_try_compile_java.m4 |  55 -------
> config/ax_try_run_java.m4     |  56 -------
> configure.ac                  |   7 +-
> m4/ax_check_class.m4          | 144 ++++++++++++++++++
> m4/ax_check_classpath.m4      |  60 ++++++++
> m4/ax_check_rqrd_class.m4     |  62 ++++++++
> m4/ax_java_options.m4         |  48 ++++++
> m4/ax_jni_include_dir.m4      | 126 ++++++++++++++++
> m4/ax_prog_jar.m4             |  49 ++++++
> m4/ax_prog_java.m4            | 115 ++++++++++++++
> m4/ax_prog_java_works.m4      | 134 +++++++++++++++++
> m4/ax_prog_javac.m4           |  79 ++++++++++
> m4/ax_prog_javac_works.m4     |  72 +++++++++
> m4/ax_prog_javah.m4           |  47 ++++++
> m4/ax_sys_weak_alias.m4       | 337 ++++++++++++++++++++++++++++++++++++++++++
> m4/ax_try_compile_java.m4     |  55 +++++++
> m4/ax_try_run_java.m4         |  56 +++++++
> 31 files changed, 1407 insertions(+), 1392 deletions(-)
> delete mode 100644 config/ax_check_class.m4
> delete mode 100644 config/ax_check_classpath.m4
> delete mode 100644 config/ax_check_rqrd_class.m4
> delete mode 100644 config/ax_java_options.m4
> delete mode 100644 config/ax_jni_include_dir.m4
> delete mode 100644 config/ax_prog_jar.m4
> delete mode 100644 config/ax_prog_java.m4
> delete mode 100644 config/ax_prog_java_works.m4
> delete mode 100644 config/ax_prog_javac.m4
> delete mode 100644 config/ax_prog_javac_works.m4
> delete mode 100644 config/ax_prog_javah.m4
> delete mode 100644 config/ax_sys_weak_alias.m4
> delete mode 100644 config/ax_try_compile_java.m4
> delete mode 100644 config/ax_try_run_java.m4
> create mode 100644 m4/ax_check_class.m4
> create mode 100644 m4/ax_check_classpath.m4
> create mode 100644 m4/ax_check_rqrd_class.m4
> create mode 100644 m4/ax_java_options.m4
> create mode 100644 m4/ax_jni_include_dir.m4
> create mode 100644 m4/ax_prog_jar.m4
> create mode 100644 m4/ax_prog_java.m4
> create mode 100644 m4/ax_prog_java_works.m4
> create mode 100644 m4/ax_prog_javac.m4
> create mode 100644 m4/ax_prog_javac_works.m4
> create mode 100644 m4/ax_prog_javah.m4
> create mode 100644 m4/ax_sys_weak_alias.m4
> create mode 100644 m4/ax_try_compile_java.m4
> create mode 100644 m4/ax_try_run_java.m4
> 
> diff --git a/.gitignore b/.gitignore
> index e35e5d5..11cf334 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -16,7 +16,7 @@ Makefile.in
> *.info
> cscope.*
> configure
> -aclocal.m4
> +/aclocal.m4
> autom4te.cache/
> /config.h
> /include/lttng/config.h
> @@ -24,11 +24,25 @@ autom4te.cache/
> /include/lttng/ust-version.h
> /include/lttng/ust-config.h
> /config.h.in
> -config/
> +/config/compile
> +/config/config.guess
> +/config/config.sub
> +/config/config.sub
> +/config/depcomp
> +/config/depcomp
> +/config/install-sh
> +/config/ltmain.sh
> +/config/missing
> +/config/test-driver
> +/m4/libtool.m4
> +/m4/lt~obsolete.m4
> +/m4/ltoptions.m4
> +/m4/ltsugar.m4
> +/m4/ltversion.m4
> config.log
> config.status
> -stamp-h1
> -libtool
> +/stamp-h1
> +/libtool
> lttng-ust.pc
> 
> ustctl/ustctl
> diff --git a/Makefile.am b/Makefile.am
> index 232acd1..810761c 100644
> --- a/Makefile.am
> +++ b/Makefile.am
> @@ -1,4 +1,4 @@
> -ACLOCAL_AMFLAGS = -I config
> +ACLOCAL_AMFLAGS = -I m4
> 
> SUBDIRS = . include snprintf libringbuffer liblttng-ust-comm \
> 		liblttng-ust \
> diff --git a/config/ax_check_class.m4 b/config/ax_check_class.m4
> deleted file mode 100644
> index 42b51d7..0000000
> --- a/config/ax_check_class.m4
> +++ /dev/null
> @@ -1,144 +0,0 @@
> -# ===========================================================================
> -#      http://www.gnu.org/software/autoconf-archive/ax_check_class.html
> -# ===========================================================================
> -#
> -# SYNOPSIS
> -#
> -#   AX_CHECK_CLASS
> -#
> -# DESCRIPTION
> -#
> -#   AX_CHECK_CLASS tests the existence of a given Java class, either in a
> -#   jar or in a '.class' file.
> -#
> -#   *Warning*: its success or failure can depend on a proper setting of the
> -#   CLASSPATH env. variable.
> -#
> -#   Note: This is part of the set of autoconf M4 macros for Java programs.
> -#   It is VERY IMPORTANT that you download the whole set, some macros depend
> -#   on other. Unfortunately, the autoconf archive does not support the
> -#   concept of set of macros, so I had to break it for submission. The
> -#   general documentation, as well as the sample configure.in, is included
> -#   in the AX_PROG_JAVA macro.
> -#
> -# LICENSE
> -#
> -#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer at pasteur.fr>
> -#
> -#   This program is free software; you can redistribute it and/or modify it
> -#   under the terms of the GNU General Public License as published by the
> -#   Free Software Foundation; either version 2 of the License, or (at your
> -#   option) any later version.
> -#
> -#   This program is distributed in the hope that it will be useful, but
> -#   WITHOUT ANY WARRANTY; without even the implied warranty of
> -#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
> -#   Public License for more details.
> -#
> -#   You should have received a copy of the GNU General Public License along
> -#   with this program. If not, see <http://www.gnu.org/licenses/>.
> -#
> -#   As a special exception, the respective Autoconf Macro's copyright owner
> -#   gives unlimited permission to copy, distribute and modify the configure
> -#   scripts that are the output of Autoconf when processing the Macro. You
> -#   need not follow the terms of the GNU General Public License when using
> -#   or distributing such scripts, even though portions of the text of the
> -#   Macro appear in them. The GNU General Public License (GPL) does govern
> -#   all other use of the material that constitutes the Autoconf Macro.
> -#
> -#   This special exception to the GPL applies to versions of the Autoconf
> -#   Macro released by the Autoconf Archive. When you make and distribute a
> -#   modified version of the Autoconf Macro, you may extend this special
> -#   exception to the GPL to apply to your modified version as well.
> -
> -#serial 7
> -
> -AU_ALIAS([AC_CHECK_CLASS], [AX_CHECK_CLASS])
> -AC_DEFUN([AX_CHECK_CLASS],[
> -AC_REQUIRE([AX_PROG_JAVA])
> -ac_var_name=`echo $1 | sed 's/\./_/g'`
> -dnl Normaly I'd use a AC_CACHE_CHECK here but since the variable name is
> -dnl dynamic I need an extra level of extraction
> -AC_MSG_CHECKING([for $1 class])
> -AC_CACHE_VAL(ax_cv_class_$ac_var_name, [
> -if test x$ac_cv_prog_uudecode_base64 = xyes; then
> -dnl /**
> -dnl  * Test.java: used to test dynamicaly if a class exists.
> -dnl  */
> -dnl public class Test
> -dnl {
> -dnl
> -dnl public static void
> -dnl main( String[] argv )
> -dnl {
> -dnl     Class lib;
> -dnl     if (argv.length < 1)
> -dnl      {
> -dnl             System.err.println ("Missing argument");
> -dnl             System.exit (77);
> -dnl      }
> -dnl     try
> -dnl      {
> -dnl             lib = Class.forName (argv[0]);
> -dnl      }
> -dnl     catch (ClassNotFoundException e)
> -dnl      {
> -dnl             System.exit (1);
> -dnl      }
> -dnl     lib = null;
> -dnl     System.exit (0);
> -dnl }
> -dnl
> -dnl }
> -cat << \EOF > Test.uue
> -begin-base64 644 Test.class
> -yv66vgADAC0AKQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE
> -bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51
> -bWJlclRhYmxlDAAKAAsBAANlcnIBABVMamF2YS9pby9QcmludFN0cmVhbTsJ
> -AA0ACQcADgEAEGphdmEvbGFuZy9TeXN0ZW0IABABABBNaXNzaW5nIGFyZ3Vt
> -ZW50DAASABMBAAdwcmludGxuAQAVKExqYXZhL2xhbmcvU3RyaW5nOylWCgAV
> -ABEHABYBABNqYXZhL2lvL1ByaW50U3RyZWFtDAAYABkBAARleGl0AQAEKEkp
> -VgoADQAXDAAcAB0BAAdmb3JOYW1lAQAlKExqYXZhL2xhbmcvU3RyaW5nOylM
> -amF2YS9sYW5nL0NsYXNzOwoAHwAbBwAgAQAPamF2YS9sYW5nL0NsYXNzBwAi
> -AQAgamF2YS9sYW5nL0NsYXNzTm90Rm91bmRFeGNlcHRpb24BAAY8aW5pdD4B
> -AAMoKVYMACMAJAoAAwAlAQAKU291cmNlRmlsZQEACVRlc3QuamF2YQAhAAEA
> -AwAAAAAAAgAJAAUABgABAAcAAABtAAMAAwAAACkqvgSiABCyAAwSD7YAFBBN
> -uAAaKgMyuAAeTKcACE0EuAAaAUwDuAAasQABABMAGgAdACEAAQAIAAAAKgAK
> -AAAACgAAAAsABgANAA4ADgATABAAEwASAB4AFgAiABgAJAAZACgAGgABACMA
> -JAABAAcAAAAhAAEAAQAAAAUqtwAmsQAAAAEACAAAAAoAAgAAAAQABAAEAAEA
> -JwAAAAIAKA==
> -====
> -EOF
> -                if $UUDECODE Test.uue; then
> -                        :
> -                else
> -                        echo "configure: __oline__: uudecode had trouble
> decoding base 64 file 'Test.uue'" >&AS_MESSAGE_LOG_FD
> -                        echo "configure: failed file was:" >&AS_MESSAGE_LOG_FD
> -                        cat Test.uue >&AS_MESSAGE_LOG_FD
> -                        ac_cv_prog_uudecode_base64=no
> -                fi
> -        rm -f Test.uue
> -        if AC_TRY_COMMAND($JAVA -classpath ".:$CLASSPATH" $JAVAFLAGS Test $1)
> >/dev/null 2>&1; then
> -                eval "ac_cv_class_$ac_var_name=yes"
> -        else
> -                eval "ac_cv_class_$ac_var_name=no"
> -        fi
> -        rm -f Test.class
> -else
> -        AX_TRY_COMPILE_JAVA([$1], , [eval "ac_cv_class_$ac_var_name=yes"],
> -                [eval "ac_cv_class_$ac_var_name=no"])
> -fi
> -eval "ac_var_val=$`eval echo ac_cv_class_$ac_var_name`"
> -eval "HAVE_$ac_var_name=$`echo ac_cv_class_$ac_var_val`"
> -HAVE_LAST_CLASS=$ac_var_val
> -if test x$ac_var_val = xyes; then
> -        ifelse([$2], , :, [$2])
> -else
> -        ifelse([$3], , :, [$3])
> -fi
> -])
> -dnl for some reason the above statment didn't fall though here?
> -dnl do scripts have variable scoping?
> -eval "ac_var_val=$`eval echo ac_cv_class_$ac_var_name`"
> -AC_MSG_RESULT($ac_var_val)
> -])
> diff --git a/config/ax_check_classpath.m4 b/config/ax_check_classpath.m4
> deleted file mode 100644
> index 3c9081a..0000000
> --- a/config/ax_check_classpath.m4
> +++ /dev/null
> @@ -1,60 +0,0 @@
> -# ===========================================================================
> -#    http://www.gnu.org/software/autoconf-archive/ax_check_classpath.html
> -# ===========================================================================
> -#
> -# SYNOPSIS
> -#
> -#   AX_CHECK_CLASSPATH
> -#
> -# DESCRIPTION
> -#
> -#   AX_CHECK_CLASSPATH just displays the CLASSPATH, for the edification of
> -#   the user.
> -#
> -#   Note: This is part of the set of autoconf M4 macros for Java programs.
> -#   It is VERY IMPORTANT that you download the whole set, some macros depend
> -#   on other. Unfortunately, the autoconf archive does not support the
> -#   concept of set of macros, so I had to break it for submission. The
> -#   general documentation, as well as the sample configure.in, is included
> -#   in the AX_PROG_JAVA macro.
> -#
> -# LICENSE
> -#
> -#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer at pasteur.fr>
> -#
> -#   This program is free software; you can redistribute it and/or modify it
> -#   under the terms of the GNU General Public License as published by the
> -#   Free Software Foundation; either version 2 of the License, or (at your
> -#   option) any later version.
> -#
> -#   This program is distributed in the hope that it will be useful, but
> -#   WITHOUT ANY WARRANTY; without even the implied warranty of
> -#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
> -#   Public License for more details.
> -#
> -#   You should have received a copy of the GNU General Public License along
> -#   with this program. If not, see <http://www.gnu.org/licenses/>.
> -#
> -#   As a special exception, the respective Autoconf Macro's copyright owner
> -#   gives unlimited permission to copy, distribute and modify the configure
> -#   scripts that are the output of Autoconf when processing the Macro. You
> -#   need not follow the terms of the GNU General Public License when using
> -#   or distributing such scripts, even though portions of the text of the
> -#   Macro appear in them. The GNU General Public License (GPL) does govern
> -#   all other use of the material that constitutes the Autoconf Macro.
> -#
> -#   This special exception to the GPL applies to versions of the Autoconf
> -#   Macro released by the Autoconf Archive. When you make and distribute a
> -#   modified version of the Autoconf Macro, you may extend this special
> -#   exception to the GPL to apply to your modified version as well.
> -
> -#serial 5
> -
> -AU_ALIAS([AC_CHECK_CLASSPATH], [AX_CHECK_CLASSPATH])
> -AC_DEFUN([AX_CHECK_CLASSPATH],[
> -if test "x$CLASSPATH" = x; then
> -        echo "You have no CLASSPATH, I hope it is good"
> -else
> -        echo "You have CLASSPATH $CLASSPATH, hope it is correct"
> -fi
> -])
> diff --git a/config/ax_check_rqrd_class.m4 b/config/ax_check_rqrd_class.m4
> deleted file mode 100644
> index 8f14241..0000000
> --- a/config/ax_check_rqrd_class.m4
> +++ /dev/null
> @@ -1,62 +0,0 @@
> -# ===========================================================================
> -#    http://www.gnu.org/software/autoconf-archive/ax_check_rqrd_class.html
> -# ===========================================================================
> -#
> -# SYNOPSIS
> -#
> -#   AX_CHECK_RQRD_CLASS
> -#
> -# DESCRIPTION
> -#
> -#   AX_CHECK_RQRD_CLASS tests the existence of a given Java class, either in
> -#   a jar or in a '.class' file and fails if it doesn't exist. Its success
> -#   or failure can depend on a proper setting of the CLASSPATH env.
> -#   variable.
> -#
> -#   Note: This is part of the set of autoconf M4 macros for Java programs.
> -#   It is VERY IMPORTANT that you download the whole set, some macros depend
> -#   on other. Unfortunately, the autoconf archive does not support the
> -#   concept of set of macros, so I had to break it for submission. The
> -#   general documentation, as well as the sample configure.in, is included
> -#   in the AX_PROG_JAVA macro.
> -#
> -# LICENSE
> -#
> -#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer at pasteur.fr>
> -#
> -#   This program is free software; you can redistribute it and/or modify it
> -#   under the terms of the GNU General Public License as published by the
> -#   Free Software Foundation; either version 2 of the License, or (at your
> -#   option) any later version.
> -#
> -#   This program is distributed in the hope that it will be useful, but
> -#   WITHOUT ANY WARRANTY; without even the implied warranty of
> -#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
> -#   Public License for more details.
> -#
> -#   You should have received a copy of the GNU General Public License along
> -#   with this program. If not, see <http://www.gnu.org/licenses/>.
> -#
> -#   As a special exception, the respective Autoconf Macro's copyright owner
> -#   gives unlimited permission to copy, distribute and modify the configure
> -#   scripts that are the output of Autoconf when processing the Macro. You
> -#   need not follow the terms of the GNU General Public License when using
> -#   or distributing such scripts, even though portions of the text of the
> -#   Macro appear in them. The GNU General Public License (GPL) does govern
> -#   all other use of the material that constitutes the Autoconf Macro.
> -#
> -#   This special exception to the GPL applies to versions of the Autoconf
> -#   Macro released by the Autoconf Archive. When you make and distribute a
> -#   modified version of the Autoconf Macro, you may extend this special
> -#   exception to the GPL to apply to your modified version as well.
> -
> -#serial 5
> -
> -AU_ALIAS([AC_CHECK_RQRD_CLASS], [AX_CHECK_RQRD_CLASS])
> -AC_DEFUN([AX_CHECK_RQRD_CLASS],[
> -CLASS=`echo $1|sed 's/\./_/g'`
> -AC_CHECK_CLASS($1)
> -if test "$HAVE_LAST_CLASS" = "no"; then
> -        AC_MSG_ERROR([Required class $1 missing, exiting.])
> -fi
> -])
> diff --git a/config/ax_java_options.m4 b/config/ax_java_options.m4
> deleted file mode 100644
> index 36c10d9..0000000
> --- a/config/ax_java_options.m4
> +++ /dev/null
> @@ -1,48 +0,0 @@
> -# ===========================================================================
> -#      http://www.gnu.org/software/autoconf-archive/ax_java_options.html
> -# ===========================================================================
> -#
> -# SYNOPSIS
> -#
> -#   AX_JAVA_OPTIONS
> -#
> -# DESCRIPTION
> -#
> -#   AX_JAVA_OPTIONS adds configure command line options used for Java m4
> -#   macros. This Macro is optional.
> -#
> -#   Note: This is part of the set of autoconf M4 macros for Java programs.
> -#   It is VERY IMPORTANT that you download the whole set, some macros depend
> -#   on other. Unfortunately, the autoconf archive does not support the
> -#   concept of set of macros, so I had to break it for submission. The
> -#   general documentation, as well as the sample configure.in, is included
> -#   in the AX_PROG_JAVA macro.
> -#
> -# LICENSE
> -#
> -#   Copyright (c) 2008 Devin Weaver <ktohg at tritarget.com>
> -#
> -#   Copying and distribution of this file, with or without modification, are
> -#   permitted in any medium without royalty provided the copyright notice
> -#   and this notice are preserved. This file is offered as-is, without any
> -#   warranty.
> -
> -#serial 6
> -
> -AU_ALIAS([AC_JAVA_OPTIONS], [AX_JAVA_OPTIONS])
> -AC_DEFUN([AX_JAVA_OPTIONS],[
> -AC_ARG_WITH(java-prefix,
> -                        [  --with-java-prefix=PFX  prefix where Java runtime is
> installed (optional)])
> -AC_ARG_WITH(javac-flags,
> -                        [  --with-javac-flags=FLAGS flags to pass to the Java
> compiler (optional)])
> -AC_ARG_WITH(java-flags,
> -                        [  --with-java-flags=FLAGS flags to pass to the Java VM
> (optional)])
> -JAVAPREFIX=$with_java_prefix
> -JAVACFLAGS=$with_javac_flags
> -JAVAFLAGS=$with_java_flags
> -AC_SUBST(JAVAPREFIX)dnl
> -AC_SUBST(JAVACFLAGS)dnl
> -AC_SUBST(JAVAFLAGS)dnl
> -AC_SUBST(JAVA)dnl
> -AC_SUBST(JAVAC)dnl
> -])
> diff --git a/config/ax_jni_include_dir.m4 b/config/ax_jni_include_dir.m4
> deleted file mode 100644
> index b664d80..0000000
> --- a/config/ax_jni_include_dir.m4
> +++ /dev/null
> @@ -1,126 +0,0 @@
> -# ===========================================================================
> -#    http://www.gnu.org/software/autoconf-archive/ax_jni_include_dir.html
> -# ===========================================================================
> -#
> -# SYNOPSIS
> -#
> -#   AX_JNI_INCLUDE_DIR
> -#
> -# DESCRIPTION
> -#
> -#   AX_JNI_INCLUDE_DIR finds include directories needed for compiling
> -#   programs using the JNI interface.
> -#
> -#   JNI include directories are usually in the Java distribution. This is
> -#   deduced from the value of $JAVA_HOME, $JAVAC, or the path to "javac", in
> -#   that order. When this macro completes, a list of directories is left in
> -#   the variable JNI_INCLUDE_DIRS.
> -#
> -#   Example usage follows:
> -#
> -#     AX_JNI_INCLUDE_DIR
> -#
> -#     for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
> -#     do
> -#             CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
> -#     done
> -#
> -#   If you want to force a specific compiler:
> -#
> -#   - at the configure.in level, set JAVAC=yourcompiler before calling
> -#   AX_JNI_INCLUDE_DIR
> -#
> -#   - at the configure level, setenv JAVAC
> -#
> -#   Note: This macro can work with the autoconf M4 macros for Java programs.
> -#   This particular macro is not part of the original set of macros.
> -#
> -# LICENSE
> -#
> -#   Copyright (c) 2008 Don Anderson <dda at sleepycat.com>
> -#
> -#   Copying and distribution of this file, with or without modification, are
> -#   permitted in any medium without royalty provided the copyright notice
> -#   and this notice are preserved. This file is offered as-is, without any
> -#   warranty.
> -
> -#serial 10
> -
> -AU_ALIAS([AC_JNI_INCLUDE_DIR], [AX_JNI_INCLUDE_DIR])
> -AC_DEFUN([AX_JNI_INCLUDE_DIR],[
> -
> -JNI_INCLUDE_DIRS=""
> -
> -if test "x$JAVA_HOME" != x; then
> -	_JTOPDIR="$JAVA_HOME"
> -else
> -	if test "x$JAVAC" = x; then
> -		JAVAC=javac
> -	fi
> -	AC_PATH_PROG([_ACJNI_JAVAC], [$JAVAC], [no])
> -	if test "x$_ACJNI_JAVAC" = xno; then
> -		AC_MSG_ERROR([cannot find JDK; try setting \$JAVAC or \$JAVA_HOME])
> -	fi
> -	_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
> -	_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
> -fi
> -
> -case "$host_os" in
> -        darwin*)        _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
> -                        _JINC="$_JTOPDIR/Headers";;
> -        *)              _JINC="$_JTOPDIR/include";;
> -esac
> -_AS_ECHO_LOG([_JTOPDIR=$_JTOPDIR])
> -_AS_ECHO_LOG([_JINC=$_JINC])
> -
> -# On Mac OS X 10.6.4, jni.h is a symlink:
> -# /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h
> -# -> ../../CurrentJDK/Headers/jni.h.
> -AC_CHECK_FILE([$_JINC/jni.h],
> -	[JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"],
> -	[_JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
> -	 AC_CHECK_FILE([$_JTOPDIR/include/jni.h],
> -		[JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include"],
> -                AC_MSG_ERROR([cannot find JDK header files]))
> -	])
> -
> -# get the likely subdirectories for system specific java includes
> -case "$host_os" in
> -bsdi*)          _JNI_INC_SUBDIRS="bsdos";;
> -freebsd*)       _JNI_INC_SUBDIRS="freebsd";;
> -linux*)         _JNI_INC_SUBDIRS="linux genunix";;
> -osf*)           _JNI_INC_SUBDIRS="alpha";;
> -solaris*)       _JNI_INC_SUBDIRS="solaris";;
> -mingw*)		_JNI_INC_SUBDIRS="win32";;
> -cygwin*)	_JNI_INC_SUBDIRS="win32";;
> -*)              _JNI_INC_SUBDIRS="genunix";;
> -esac
> -
> -# add any subdirectories that are present
> -for JINCSUBDIR in $_JNI_INC_SUBDIRS
> -do
> -    if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then
> -         JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR"
> -    fi
> -done
> -])
> -
> -# _ACJNI_FOLLOW_SYMLINKS <path>
> -# Follows symbolic links on <path>,
> -# finally setting variable _ACJNI_FOLLOWED
> -# ----------------------------------------
> -AC_DEFUN([_ACJNI_FOLLOW_SYMLINKS],[
> -# find the include directory relative to the javac executable
> -_cur="$1"
> -while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do
> -        AC_MSG_CHECKING([symlink for $_cur])
> -        _slink=`ls -ld "$_cur" | sed 's/.* -> //'`
> -        case "$_slink" in
> -        /*) _cur="$_slink";;
> -        # 'X' avoids triggering unwanted echo options.
> -        *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$_slink";;
> -        esac
> -        AC_MSG_RESULT([$_cur])
> -done
> -_ACJNI_FOLLOWED="$_cur"
> -])# _ACJNI
> diff --git a/config/ax_prog_jar.m4 b/config/ax_prog_jar.m4
> deleted file mode 100644
> index 3c60fca..0000000
> --- a/config/ax_prog_jar.m4
> +++ /dev/null
> @@ -1,49 +0,0 @@
> -# ===========================================================================
> -#        http://www.gnu.org/software/autoconf-archive/ax_prog_jar.html
> -# ===========================================================================
> -#
> -# SYNOPSIS
> -#
> -#   AX_PROG_JAR
> -#
> -# DESCRIPTION
> -#
> -#   AX_PROG_JAR tests for an existing jar program. It uses the environment
> -#   variable JAR then tests in sequence various common jar programs.
> -#
> -#   If you want to force a specific compiler:
> -#
> -#   - at the configure.in level, set JAR=yourcompiler before calling
> -#   AX_PROG_JAR
> -#
> -#   - at the configure level, setenv JAR
> -#
> -#   You can use the JAR variable in your Makefile.in, with @JAR at .
> -#
> -#   Note: This macro depends on the autoconf M4 macros for Java programs. It
> -#   is VERY IMPORTANT that you download that whole set, some macros depend
> -#   on other. Unfortunately, the autoconf archive does not support the
> -#   concept of set of macros, so I had to break it for submission.
> -#
> -#   The general documentation of those macros, as well as the sample
> -#   configure.in, is included in the AX_PROG_JAVA macro.
> -#
> -# LICENSE
> -#
> -#   Copyright (c) 2008 Egon Willighagen <e.willighagen at science.ru.nl>
> -#
> -#   Copying and distribution of this file, with or without modification, are
> -#   permitted in any medium without royalty provided the copyright notice
> -#   and this notice are preserved. This file is offered as-is, without any
> -#   warranty.
> -
> -#serial 7
> -
> -AU_ALIAS([AC_PROG_JAR], [AX_PROG_JAR])
> -AC_DEFUN([AX_PROG_JAR],[
> -AS_IF([test "x$JAVAPREFIX" = x],
> -      [test "x$JAR" = x && AC_CHECK_PROGS([JAR], [jar])],
> -      [test "x$JAR" = x && AC_CHECK_PROGS([JAR], [jar], [],
> [$JAVAPREFIX/bin])])
> -test "x$JAR" = x && AC_MSG_ERROR([no acceptable jar program found in \$PATH])
> -AC_PROVIDE([$0])dnl
> -])
> diff --git a/config/ax_prog_java.m4 b/config/ax_prog_java.m4
> deleted file mode 100644
> index 03961db..0000000
> --- a/config/ax_prog_java.m4
> +++ /dev/null
> @@ -1,115 +0,0 @@
> -# ===========================================================================
> -#       http://www.gnu.org/software/autoconf-archive/ax_prog_java.html
> -# ===========================================================================
> -#
> -# SYNOPSIS
> -#
> -#   AX_PROG_JAVA
> -#
> -# DESCRIPTION
> -#
> -#   Here is a summary of the main macros:
> -#
> -#   AX_PROG_JAVAC: finds a Java compiler.
> -#
> -#   AX_PROG_JAVA: finds a Java virtual machine.
> -#
> -#   AX_CHECK_CLASS: finds if we have the given class (beware of CLASSPATH!).
> -#
> -#   AX_CHECK_RQRD_CLASS: finds if we have the given class and stops
> -#   otherwise.
> -#
> -#   AX_TRY_COMPILE_JAVA: attempt to compile user given source.
> -#
> -#   AX_TRY_RUN_JAVA: attempt to compile and run user given source.
> -#
> -#   AX_JAVA_OPTIONS: adds Java configure options.
> -#
> -#   AX_PROG_JAVA tests an existing Java virtual machine. It uses the
> -#   environment variable JAVA then tests in sequence various common Java
> -#   virtual machines. For political reasons, it starts with the free ones.
> -#   You *must* call [AX_PROG_JAVAC] before.
> -#
> -#   If you want to force a specific VM:
> -#
> -#   - at the configure.in level, set JAVA=yourvm before calling AX_PROG_JAVA
> -#
> -#     (but after AC_INIT)
> -#
> -#   - at the configure level, setenv JAVA
> -#
> -#   You can use the JAVA variable in your Makefile.in, with @JAVA at .
> -#
> -#   *Warning*: its success or failure can depend on a proper setting of the
> -#   CLASSPATH env. variable.
> -#
> -#   TODO: allow to exclude virtual machines (rationale: most Java programs
> -#   cannot run with some VM like kaffe).
> -#
> -#   Note: This is part of the set of autoconf M4 macros for Java programs.
> -#   It is VERY IMPORTANT that you download the whole set, some macros depend
> -#   on other. Unfortunately, the autoconf archive does not support the
> -#   concept of set of macros, so I had to break it for submission.
> -#
> -#   A Web page, with a link to the latest CVS snapshot is at
> -#   <http://www.internatif.org/bortzmeyer/autoconf-Java/>.
> -#
> -#   This is a sample configure.in Process this file with autoconf to produce
> -#   a configure script.
> -#
> -#     AC_INIT(UnTag.java)
> -#
> -#     dnl Checks for programs.
> -#     AC_CHECK_CLASSPATH
> -#     AX_PROG_JAVAC
> -#     AX_PROG_JAVA
> -#
> -#     dnl Checks for classes
> -#     AX_CHECK_RQRD_CLASS(org.xml.sax.Parser)
> -#     AX_CHECK_RQRD_CLASS(com.jclark.xml.sax.Driver)
> -#
> -#     AC_OUTPUT(Makefile)
> -#
> -# LICENSE
> -#
> -#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer at pasteur.fr>
> -#
> -#   This program is free software; you can redistribute it and/or modify it
> -#   under the terms of the GNU General Public License as published by the
> -#   Free Software Foundation; either version 2 of the License, or (at your
> -#   option) any later version.
> -#
> -#   This program is distributed in the hope that it will be useful, but
> -#   WITHOUT ANY WARRANTY; without even the implied warranty of
> -#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
> -#   Public License for more details.
> -#
> -#   You should have received a copy of the GNU General Public License along
> -#   with this program. If not, see <http://www.gnu.org/licenses/>.
> -#
> -#   As a special exception, the respective Autoconf Macro's copyright owner
> -#   gives unlimited permission to copy, distribute and modify the configure
> -#   scripts that are the output of Autoconf when processing the Macro. You
> -#   need not follow the terms of the GNU General Public License when using
> -#   or distributing such scripts, even though portions of the text of the
> -#   Macro appear in them. The GNU General Public License (GPL) does govern
> -#   all other use of the material that constitutes the Autoconf Macro.
> -#
> -#   This special exception to the GPL applies to versions of the Autoconf
> -#   Macro released by the Autoconf Archive. When you make and distribute a
> -#   modified version of the Autoconf Macro, you may extend this special
> -#   exception to the GPL to apply to your modified version as well.
> -
> -#serial 9
> -
> -AU_ALIAS([AC_PROG_JAVA], [AX_PROG_JAVA])
> -AC_DEFUN([AX_PROG_JAVA],[
> -m4_define([m4_ax_prog_java_list], [kaffe java])dnl
> -AS_IF([test "x$JAVAPREFIX" = x],
> -      [test x$JAVA = x && AC_CHECK_PROGS([JAVA], [m4_ax_prog_java_list])],
> -      [test x$JAVA = x && AC_CHECK_PROGS([JAVA], [m4_ax_prog_java_list], [],
> [$JAVAPREFIX/bin])])
> -test x$JAVA = x && AC_MSG_ERROR([no acceptable Java virtual machine found in
> \$PATH])
> -m4_undefine([m4_ax_prog_java_list])dnl
> -AX_PROG_JAVA_WORKS
> -AC_PROVIDE([$0])dnl
> -])
> diff --git a/config/ax_prog_java_works.m4 b/config/ax_prog_java_works.m4
> deleted file mode 100644
> index 54e132a..0000000
> --- a/config/ax_prog_java_works.m4
> +++ /dev/null
> @@ -1,134 +0,0 @@
> -# ===========================================================================
> -#    http://www.gnu.org/software/autoconf-archive/ax_prog_java_works.html
> -# ===========================================================================
> -#
> -# SYNOPSIS
> -#
> -#   AX_PROG_JAVA_WORKS
> -#
> -# DESCRIPTION
> -#
> -#   Internal use ONLY.
> -#
> -#   Note: This is part of the set of autoconf M4 macros for Java programs.
> -#   It is VERY IMPORTANT that you download the whole set, some macros depend
> -#   on other. Unfortunately, the autoconf archive does not support the
> -#   concept of set of macros, so I had to break it for submission. The
> -#   general documentation, as well as the sample configure.in, is included
> -#   in the AX_PROG_JAVA macro.
> -#
> -# LICENSE
> -#
> -#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer at pasteur.fr>
> -#
> -#   This program is free software; you can redistribute it and/or modify it
> -#   under the terms of the GNU General Public License as published by the
> -#   Free Software Foundation; either version 2 of the License, or (at your
> -#   option) any later version.
> -#
> -#   This program is distributed in the hope that it will be useful, but
> -#   WITHOUT ANY WARRANTY; without even the implied warranty of
> -#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
> -#   Public License for more details.
> -#
> -#   You should have received a copy of the GNU General Public License along
> -#   with this program. If not, see <http://www.gnu.org/licenses/>.
> -#
> -#   As a special exception, the respective Autoconf Macro's copyright owner
> -#   gives unlimited permission to copy, distribute and modify the configure
> -#   scripts that are the output of Autoconf when processing the Macro. You
> -#   need not follow the terms of the GNU General Public License when using
> -#   or distributing such scripts, even though portions of the text of the
> -#   Macro appear in them. The GNU General Public License (GPL) does govern
> -#   all other use of the material that constitutes the Autoconf Macro.
> -#
> -#   This special exception to the GPL applies to versions of the Autoconf
> -#   Macro released by the Autoconf Archive. When you make and distribute a
> -#   modified version of the Autoconf Macro, you may extend this special
> -#   exception to the GPL to apply to your modified version as well.
> -
> -#serial 9
> -
> -AU_ALIAS([AC_PROG_JAVA_WORKS], [AX_PROG_JAVA_WORKS])
> -AC_DEFUN([AX_PROG_JAVA_WORKS], [
> -AC_PATH_PROG(UUDECODE, uudecode, [no])
> -if test x$UUDECODE != xno; then
> -AC_CACHE_CHECK([if uudecode can decode base 64 file],
> ac_cv_prog_uudecode_base64, [
> -dnl /**
> -dnl  * Test.java: used to test if java compiler works.
> -dnl  */
> -dnl public class Test
> -dnl {
> -dnl
> -dnl public static void
> -dnl main( String[] argv )
> -dnl {
> -dnl     System.exit (0);
> -dnl }
> -dnl
> -dnl }
> -cat << \EOF > Test.uue
> -begin-base64 644 Test.class
> -yv66vgADAC0AFQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE
> -bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51
> -bWJlclRhYmxlDAAKAAsBAARleGl0AQAEKEkpVgoADQAJBwAOAQAQamF2YS9s
> -YW5nL1N5c3RlbQEABjxpbml0PgEAAygpVgwADwAQCgADABEBAApTb3VyY2VG
> -aWxlAQAJVGVzdC5qYXZhACEAAQADAAAAAAACAAkABQAGAAEABwAAACEAAQAB
> -AAAABQO4AAyxAAAAAQAIAAAACgACAAAACgAEAAsAAQAPABAAAQAHAAAAIQAB
> -AAEAAAAFKrcAErEAAAABAAgAAAAKAAIAAAAEAAQABAABABMAAAACABQ=
> -====
> -EOF
> -if $UUDECODE Test.uue; then
> -        ac_cv_prog_uudecode_base64=yes
> -else
> -        echo "configure: __oline__: uudecode had trouble decoding base 64 file
> 'Test.uue'" >&AS_MESSAGE_LOG_FD
> -        echo "configure: failed file was:" >&AS_MESSAGE_LOG_FD
> -        cat Test.uue >&AS_MESSAGE_LOG_FD
> -        ac_cv_prog_uudecode_base64=no
> -fi
> -rm -f Test.uue])
> -fi
> -if test x$ac_cv_prog_uudecode_base64 != xyes; then
> -        rm -f Test.class
> -        AC_MSG_WARN([I have to compile Test.class from scratch])
> -        if test x$ac_cv_prog_javac_works = xno; then
> -                AC_MSG_ERROR([Cannot compile java source. $JAVAC does not work
> properly])
> -        fi
> -        if test x$ac_cv_prog_javac_works = x; then
> -                AX_PROG_JAVAC
> -        fi
> -fi
> -AC_CACHE_CHECK(if $JAVA works, ac_cv_prog_java_works, [
> -JAVA_TEST=Test.java
> -CLASS_TEST=Test.class
> -TEST=Test
> -changequote(, )dnl
> -cat << \EOF > $JAVA_TEST
> -/* [#]line __oline__ "configure" */
> -public class Test {
> -public static void main (String args[]) {
> -        System.exit (0);
> -} }
> -EOF
> -changequote([, ])dnl
> -if test x$ac_cv_prog_uudecode_base64 != xyes; then
> -        if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) && test -s
> $CLASS_TEST; then
> -                :
> -        else
> -          echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
> -          cat $JAVA_TEST >&AS_MESSAGE_LOG_FD
> -          AC_MSG_ERROR(The Java compiler $JAVAC failed (see config.log, check
> the CLASSPATH?))
> -        fi
> -fi
> -if AC_TRY_COMMAND($JAVA -classpath . $JAVAFLAGS $TEST) >/dev/null 2>&1; then
> -  ac_cv_prog_java_works=yes
> -else
> -  echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
> -  cat $JAVA_TEST >&AS_MESSAGE_LOG_FD
> -  AC_MSG_ERROR(The Java VM $JAVA failed (see config.log, check the CLASSPATH?))
> -fi
> -rm -fr $JAVA_TEST $CLASS_TEST Test.uue
> -])
> -AC_PROVIDE([$0])dnl
> -]
> -)
> diff --git a/config/ax_prog_javac.m4 b/config/ax_prog_javac.m4
> deleted file mode 100644
> index d061243..0000000
> --- a/config/ax_prog_javac.m4
> +++ /dev/null
> @@ -1,79 +0,0 @@
> -# ===========================================================================
> -#       http://www.gnu.org/software/autoconf-archive/ax_prog_javac.html
> -# ===========================================================================
> -#
> -# SYNOPSIS
> -#
> -#   AX_PROG_JAVAC
> -#
> -# DESCRIPTION
> -#
> -#   AX_PROG_JAVAC tests an existing Java compiler. It uses the environment
> -#   variable JAVAC then tests in sequence various common Java compilers. For
> -#   political reasons, it starts with the free ones.
> -#
> -#   If you want to force a specific compiler:
> -#
> -#   - at the configure.in level, set JAVAC=yourcompiler before calling
> -#   AX_PROG_JAVAC
> -#
> -#   - at the configure level, setenv JAVAC
> -#
> -#   You can use the JAVAC variable in your Makefile.in, with @JAVAC at .
> -#
> -#   *Warning*: its success or failure can depend on a proper setting of the
> -#   CLASSPATH env. variable.
> -#
> -#   TODO: allow to exclude compilers (rationale: most Java programs cannot
> -#   compile with some compilers like guavac).
> -#
> -#   Note: This is part of the set of autoconf M4 macros for Java programs.
> -#   It is VERY IMPORTANT that you download the whole set, some macros depend
> -#   on other. Unfortunately, the autoconf archive does not support the
> -#   concept of set of macros, so I had to break it for submission. The
> -#   general documentation, as well as the sample configure.in, is included
> -#   in the AX_PROG_JAVA macro.
> -#
> -# LICENSE
> -#
> -#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer at pasteur.fr>
> -#
> -#   This program is free software; you can redistribute it and/or modify it
> -#   under the terms of the GNU General Public License as published by the
> -#   Free Software Foundation; either version 2 of the License, or (at your
> -#   option) any later version.
> -#
> -#   This program is distributed in the hope that it will be useful, but
> -#   WITHOUT ANY WARRANTY; without even the implied warranty of
> -#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
> -#   Public License for more details.
> -#
> -#   You should have received a copy of the GNU General Public License along
> -#   with this program. If not, see <http://www.gnu.org/licenses/>.
> -#
> -#   As a special exception, the respective Autoconf Macro's copyright owner
> -#   gives unlimited permission to copy, distribute and modify the configure
> -#   scripts that are the output of Autoconf when processing the Macro. You
> -#   need not follow the terms of the GNU General Public License when using
> -#   or distributing such scripts, even though portions of the text of the
> -#   Macro appear in them. The GNU General Public License (GPL) does govern
> -#   all other use of the material that constitutes the Autoconf Macro.
> -#
> -#   This special exception to the GPL applies to versions of the Autoconf
> -#   Macro released by the Autoconf Archive. When you make and distribute a
> -#   modified version of the Autoconf Macro, you may extend this special
> -#   exception to the GPL to apply to your modified version as well.
> -
> -#serial 7
> -
> -AU_ALIAS([AC_PROG_JAVAC], [AX_PROG_JAVAC])
> -AC_DEFUN([AX_PROG_JAVAC],[
> -m4_define([m4_ax_prog_javac_list],["gcj -C" guavac jikes javac])dnl
> -AS_IF([test "x$JAVAPREFIX" = x],
> -      [test "x$JAVAC" = x && AC_CHECK_PROGS([JAVAC], [m4_ax_prog_javac_list])],
> -      [test "x$JAVAC" = x && AC_CHECK_PROGS([JAVAC], [m4_ax_prog_javac_list],
> [], [$JAVAPREFIX/bin])])
> -m4_undefine([m4_ax_prog_javac_list])dnl
> -test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in
> \$PATH])
> -AX_PROG_JAVAC_WORKS
> -AC_PROVIDE([$0])dnl
> -])
> diff --git a/config/ax_prog_javac_works.m4 b/config/ax_prog_javac_works.m4
> deleted file mode 100644
> index 7dfa1e3..0000000
> --- a/config/ax_prog_javac_works.m4
> +++ /dev/null
> @@ -1,72 +0,0 @@
> -# ===========================================================================
> -#    http://www.gnu.org/software/autoconf-archive/ax_prog_javac_works.html
> -# ===========================================================================
> -#
> -# SYNOPSIS
> -#
> -#   AX_PROG_JAVAC_WORKS
> -#
> -# DESCRIPTION
> -#
> -#   Internal use ONLY.
> -#
> -#   Note: This is part of the set of autoconf M4 macros for Java programs.
> -#   It is VERY IMPORTANT that you download the whole set, some macros depend
> -#   on other. Unfortunately, the autoconf archive does not support the
> -#   concept of set of macros, so I had to break it for submission. The
> -#   general documentation, as well as the sample configure.in, is included
> -#   in the AX_PROG_JAVA macro.
> -#
> -# LICENSE
> -#
> -#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer at pasteur.fr>
> -#
> -#   This program is free software; you can redistribute it and/or modify it
> -#   under the terms of the GNU General Public License as published by the
> -#   Free Software Foundation; either version 2 of the License, or (at your
> -#   option) any later version.
> -#
> -#   This program is distributed in the hope that it will be useful, but
> -#   WITHOUT ANY WARRANTY; without even the implied warranty of
> -#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
> -#   Public License for more details.
> -#
> -#   You should have received a copy of the GNU General Public License along
> -#   with this program. If not, see <http://www.gnu.org/licenses/>.
> -#
> -#   As a special exception, the respective Autoconf Macro's copyright owner
> -#   gives unlimited permission to copy, distribute and modify the configure
> -#   scripts that are the output of Autoconf when processing the Macro. You
> -#   need not follow the terms of the GNU General Public License when using
> -#   or distributing such scripts, even though portions of the text of the
> -#   Macro appear in them. The GNU General Public License (GPL) does govern
> -#   all other use of the material that constitutes the Autoconf Macro.
> -#
> -#   This special exception to the GPL applies to versions of the Autoconf
> -#   Macro released by the Autoconf Archive. When you make and distribute a
> -#   modified version of the Autoconf Macro, you may extend this special
> -#   exception to the GPL to apply to your modified version as well.
> -
> -#serial 6
> -
> -AU_ALIAS([AC_PROG_JAVAC_WORKS], [AX_PROG_JAVAC_WORKS])
> -AC_DEFUN([AX_PROG_JAVAC_WORKS],[
> -AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [
> -JAVA_TEST=Test.java
> -CLASS_TEST=Test.class
> -cat << \EOF > $JAVA_TEST
> -/* [#]line __oline__ "configure" */
> -public class Test {
> -}
> -EOF
> -if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) >/dev/null 2>&1; then
> -  ac_cv_prog_javac_works=yes
> -else
> -  AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the
> CLASSPATH?)])
> -  echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
> -  cat $JAVA_TEST >&AS_MESSAGE_LOG_FD
> -fi
> -rm -f $JAVA_TEST $CLASS_TEST
> -])
> -AC_PROVIDE([$0])dnl
> -])
> diff --git a/config/ax_prog_javah.m4 b/config/ax_prog_javah.m4
> deleted file mode 100644
> index 2809f29..0000000
> --- a/config/ax_prog_javah.m4
> +++ /dev/null
> @@ -1,47 +0,0 @@
> -# ===========================================================================
> -#       http://www.gnu.org/software/autoconf-archive/ax_prog_javah.html
> -# ===========================================================================
> -#
> -# SYNOPSIS
> -#
> -#   AX_PROG_JAVAH
> -#
> -# DESCRIPTION
> -#
> -#   AX_PROG_JAVAH tests the availability of the javah header generator and
> -#   looks for the jni.h header file. If available, JAVAH is set to the full
> -#   path of javah and CPPFLAGS is updated accordingly.
> -#
> -# LICENSE
> -#
> -#   Copyright (c) 2008 Luc Maisonobe <luc at spaceroots.org>
> -#
> -#   Copying and distribution of this file, with or without modification, are
> -#   permitted in any medium without royalty provided the copyright notice
> -#   and this notice are preserved. This file is offered as-is, without any
> -#   warranty.
> -
> -#serial 7
> -
> -AU_ALIAS([AC_PROG_JAVAH], [AX_PROG_JAVAH])
> -AC_DEFUN([AX_PROG_JAVAH],[
> -AC_REQUIRE([AC_CANONICAL_BUILD])dnl
> -AC_REQUIRE([AC_PROG_CPP])dnl
> -AC_PATH_PROG(JAVAH,javah)
> -AS_IF([test -n "$ac_cv_path_JAVAH"],
> -      [
> -        AC_TRY_CPP([#include <jni.h>],,[
> -        ac_save_CPPFLAGS="$CPPFLAGS"
> -        ax_prog_javah_bin_dir=`AS_DIRNAME([$ac_cv_path_JAVAH])`
> -        ac_dir="`AS_DIRNAME([$ax_prog_javah_bin])`/include"
> -        AS_CASE([$build_os],
> -                [cygwin*],
> -                [ac_machdep=win32],
> -                [ac_machdep=`AS_ECHO($build_os) | sed 's,[[-0-9]].*,,'`])
> -        CPPFLAGS="$ac_save_CPPFLAGS -I$ac_dir -I$ac_dir/$ac_machdep"
> -        AC_TRY_CPP([#include <jni.h>],
> -                   ac_save_CPPFLAGS="$CPPFLAGS",
> -                   AC_MSG_WARN([unable to include <jni.h>]))
> -        CPPFLAGS="$ac_save_CPPFLAGS"])
> -      ])
> -])
> diff --git a/config/ax_sys_weak_alias.m4 b/config/ax_sys_weak_alias.m4
> deleted file mode 100644
> index e1bfd33..0000000
> --- a/config/ax_sys_weak_alias.m4
> +++ /dev/null
> @@ -1,337 +0,0 @@
> -# ===========================================================================
> -#     http://www.gnu.org/software/autoconf-archive/ax_sys_weak_alias.html
> -# ===========================================================================
> -#
> -# SYNOPSIS
> -#
> -#   AX_SYS_WEAK_ALIAS
> -#
> -# DESCRIPTION
> -#
> -#   Determines whether weak aliases are supported on the system, and if so,
> -#   what scheme is used to declare them. Also checks to see if aliases can
> -#   cross object file boundaries, as some systems don't permit them to.
> -#
> -#   Most systems permit something called a "weak alias" or "weak symbol."
> -#   These aliases permit a library to provide a stub form of a routine
> -#   defined in another library, thus allowing the first library to operate
> -#   even if the other library is not linked. This macro will check for
> -#   support of weak aliases, figure out what schemes are available, and
> -#   determine some characteristics of the weak alias support -- primarily,
> -#   whether a weak alias declared in one object file may be referenced from
> -#   another object file.
> -#
> -#   There are four known schemes of declaring weak symbols; each scheme is
> -#   checked in turn, and the first one found is prefered. Note that only one
> -#   of the mentioned preprocessor macros will be defined!
> -#
> -#   1. Function attributes
> -#
> -#   This scheme was first introduced by the GNU C compiler, and attaches
> -#   attributes to particular functions. It is among the easiest to use, and
> -#   so is the first one checked. If this scheme is detected, the
> -#   preprocessor macro HAVE_SYS_WEAK_ALIAS_ATTRIBUTE will be defined to 1.
> -#   This scheme is used as in the following code fragment:
> -#
> -#     void __weakf(int c)
> -#     {
> -#       /* Function definition... */
> -#     }
> -#
> -#     void weakf(int c) __attribute__((weak, alias("__weakf")));
> -#
> -#   2. #pragma weak
> -#
> -#   This scheme is in use by many compilers other than the GNU C compiler.
> -#   It is also particularly easy to use, and fairly portable -- well, as
> -#   portable as these things get. If this scheme is detected first, the
> -#   preprocessor macro HAVE_SYS_WEAK_ALIAS_PRAGMA will be defined to 1. This
> -#   scheme is used as in the following code fragment:
> -#
> -#     extern void weakf(int c);
> -#     #pragma weak weakf = __weakf
> -#     void __weakf(int c)
> -#     {
> -#       /* Function definition... */
> -#     }
> -#
> -#   3. #pragma _HP_SECONDARY_DEF
> -#
> -#   This scheme appears to be in use by the HP compiler. As it is rather
> -#   specialized, this is one of the last schemes checked. If it is the first
> -#   one detected, the preprocessor macro HAVE_SYS_WEAK_ALIAS_HPSECONDARY
> -#   will be defined to 1. This scheme is used as in the following code
> -#   fragment:
> -#
> -#     extern void weakf(int c);
> -#     #pragma _HP_SECONDARY_DEF __weakf weakf
> -#     void __weakf(int c)
> -#     {
> -#       /* Function definition... */
> -#     }
> -#
> -#   4. #pragma _CRI duplicate
> -#
> -#   This scheme appears to be in use by the Cray compiler. As it is rather
> -#   specialized, it too is one of the last schemes checked. If it is the
> -#   first one detected, the preprocessor macro
> -#   HAVE_SYS_WEAK_ALIAS_CRIDUPLICATE will be defined to 1. This scheme is
> -#   used as in the following code fragment:
> -#
> -#     extern void weakf(int c);
> -#     #pragma _CRI duplicate weakf as __weakf
> -#     void __weakf(int c)
> -#     {
> -#       /* Function definition... */
> -#     }
> -#
> -#   In addition to the preprocessor macros listed above, if any scheme is
> -#   found, the preprocessor macro HAVE_SYS_WEAK_ALIAS will also be defined
> -#   to 1.
> -#
> -#   Once a weak aliasing scheme has been found, a check will be performed to
> -#   see if weak aliases are honored across object file boundaries. If they
> -#   are, the HAVE_SYS_WEAK_ALIAS_CROSSFILE preprocessor macro is defined to
> -#   1.
> -#
> -#   This Autoconf macro also makes two substitutions. The first, WEAK_ALIAS,
> -#   contains the name of the scheme found (one of "attribute", "pragma",
> -#   "hpsecondary", or "criduplicate"), or "no" if no weak aliasing scheme
> -#   was found. The second, WEAK_ALIAS_CROSSFILE, is set to "yes" or "no"
> -#   depending on whether or not weak aliases may cross object file
> -#   boundaries.
> -#
> -# LICENSE
> -#
> -#   Copyright (c) 2008 Kevin L. Mitchell <klmitch at mit.edu>
> -#
> -#   Copying and distribution of this file, with or without modification, are
> -#   permitted in any medium without royalty provided the copyright notice
> -#   and this notice are preserved. This file is offered as-is, without any
> -#   warranty.
> -
> -#serial 6
> -
> -AU_ALIAS([KLM_SYS_WEAK_ALIAS], [AX_SYS_WEAK_ALIAS])
> -AC_DEFUN([AX_SYS_WEAK_ALIAS], [
> -  # starting point: no aliasing scheme yet...
> -  ax_sys_weak_alias=no
> -
> -  # Figure out what kind of aliasing may be supported...
> -  _AX_SYS_WEAK_ALIAS_ATTRIBUTE
> -  _AX_SYS_WEAK_ALIAS_PRAGMA
> -  _AX_SYS_WEAK_ALIAS_HPSECONDARY
> -  _AX_SYS_WEAK_ALIAS_CRIDUPLICATE
> -
> -  # Do we actually support aliasing?
> -  AC_CACHE_CHECK([how to create weak aliases with $CC],
> -                 [ax_cv_sys_weak_alias],
> -                 [ax_cv_sys_weak_alias=$ax_sys_weak_alias])
> -
> -  # OK, set a #define
> -  AS_IF([test $ax_cv_sys_weak_alias != no], [
> -    AC_DEFINE([HAVE_SYS_WEAK_ALIAS], 1,
> -              [Define this if your system can create weak aliases])
> -  ])
> -
> -  # Can aliases cross object file boundaries?
> -  _AX_SYS_WEAK_ALIAS_CROSSFILE
> -
> -  # OK, remember the results
> -  AC_SUBST([WEAK_ALIAS], [$ax_cv_sys_weak_alias])
> -  AC_SUBST([WEAK_ALIAS_CROSSFILE], [$ax_cv_sys_weak_alias_crossfile])
> -])
> -
> -AC_DEFUN([_AX_SYS_WEAK_ALIAS_ATTRIBUTE],
> -[ # Test whether compiler accepts __attribute__ form of weak aliasing
> -  AC_CACHE_CHECK([whether $CC accepts function __attribute__((weak,alias()))],
> -  [ax_cv_sys_weak_alias_attribute], [
> -    # We add -Werror if it's gcc to force an error exit if the weak attribute
> -    # isn't understood
> -    AS_IF([test $GCC = yes], [
> -      save_CFLAGS=$CFLAGS
> -      CFLAGS=-Werror])
> -
> -    # Try linking with a weak alias...
> -    AC_LINK_IFELSE([
> -      AC_LANG_PROGRAM([
> -void __weakf(int c) {}
> -void weakf(int c) __attribute__((weak, alias("__weakf")));],
> -        [weakf(0)])],
> -      [ax_cv_sys_weak_alias_attribute=yes],
> -      [ax_cv_sys_weak_alias_attribute=no])
> -
> -    # Restore original CFLAGS
> -    AS_IF([test $GCC = yes], [
> -      CFLAGS=$save_CFLAGS])
> -  ])
> -
> -  # What was the result of the test?
> -  AS_IF([test $ax_sys_weak_alias = no &&
> -         test $ax_cv_sys_weak_alias_attribute = yes], [
> -    ax_sys_weak_alias=attribute
> -    AC_DEFINE([HAVE_SYS_WEAK_ALIAS_ATTRIBUTE], 1,
> -              [Define this if weak aliases may be created with __attribute__])
> -  ])
> -])
> -
> -AC_DEFUN([_AX_SYS_WEAK_ALIAS_PRAGMA],
> -[ # Test whether compiler accepts #pragma form of weak aliasing
> -  AC_CACHE_CHECK([whether $CC supports @%:@pragma weak],
> -  [ax_cv_sys_weak_alias_pragma], [
> -
> -    # Try linking with a weak alias...
> -    AC_LINK_IFELSE([
> -      AC_LANG_PROGRAM([
> -extern void weakf(int c);
> -@%:@pragma weak weakf = __weakf
> -void __weakf(int c) {}],
> -        [weakf(0)])],
> -      [ax_cv_sys_weak_alias_pragma=yes],
> -      [ax_cv_sys_weak_alias_pragma=no])
> -  ])
> -
> -  # What was the result of the test?
> -  AS_IF([test $ax_sys_weak_alias = no &&
> -         test $ax_cv_sys_weak_alias_pragma = yes], [
> -    ax_sys_weak_alias=pragma
> -    AC_DEFINE([HAVE_SYS_WEAK_ALIAS_PRAGMA], 1,
> -              [Define this if weak aliases may be created with @%:@pragma
> weak])
> -  ])
> -])
> -
> -AC_DEFUN([_AX_SYS_WEAK_ALIAS_HPSECONDARY],
> -[ # Test whether compiler accepts _HP_SECONDARY_DEF pragma from HP...
> -  AC_CACHE_CHECK([whether $CC supports @%:@pragma _HP_SECONDARY_DEF],
> -  [ax_cv_sys_weak_alias_hpsecondary], [
> -
> -    # Try linking with a weak alias...
> -    AC_LINK_IFELSE([
> -      AC_LANG_PROGRAM([
> -extern void weakf(int c);
> -@%:@pragma _HP_SECONDARY_DEF __weakf weakf
> -void __weakf(int c) {}],
> -        [weakf(0)])],
> -      [ax_cv_sys_weak_alias_hpsecondary=yes],
> -      [ax_cv_sys_weak_alias_hpsecondary=no])
> -  ])
> -
> -  # What was the result of the test?
> -  AS_IF([test $ax_sys_weak_alias = no &&
> -         test $ax_cv_sys_weak_alias_hpsecondary = yes], [
> -    ax_sys_weak_alias=hpsecondary
> -    AC_DEFINE([HAVE_SYS_WEAK_ALIAS_HPSECONDARY], 1,
> -              [Define this if weak aliases may be created with @%:@pragma
> _HP_SECONDARY_DEF])
> -  ])
> -])
> -
> -AC_DEFUN([_AX_SYS_WEAK_ALIAS_CRIDUPLICATE],
> -[ # Test whether compiler accepts "_CRI duplicate" pragma from Cray
> -  AC_CACHE_CHECK([whether $CC supports @%:@pragma _CRI duplicate],
> -  [ax_cv_sys_weak_alias_criduplicate], [
> -
> -    # Try linking with a weak alias...
> -    AC_LINK_IFELSE([
> -      AC_LANG_PROGRAM([
> -extern void weakf(int c);
> -@%:@pragma _CRI duplicate weakf as __weakf
> -void __weakf(int c) {}],
> -        [weakf(0)])],
> -      [ax_cv_sys_weak_alias_criduplicate=yes],
> -      [ax_cv_sys_weak_alias_criduplicate=no])
> -  ])
> -
> -  # What was the result of the test?
> -  AS_IF([test $ax_sys_weak_alias = no &&
> -         test $ax_cv_sys_weak_alias_criduplicate = yes], [
> -    ax_sys_weak_alias=criduplicate
> -    AC_DEFINE([HAVE_SYS_WEAK_ALIAS_CRIDUPLICATE], 1,
> -              [Define this if weak aliases may be created with @%:@pragma _CRI
> duplicate])
> -  ])
> -])
> -
> -dnl Note: This macro is modeled closely on AC_LINK_IFELSE, and in fact
> -dnl depends on some implementation details of that macro, particularly
> -dnl its use of _AC_MSG_LOG_CONFTEST to log the failed test program and
> -dnl its use of ac_link for running the linker.
> -AC_DEFUN([_AX_SYS_WEAK_ALIAS_CROSSFILE],
> -[ # Check to see if weak aliases can cross object file boundaries
> -  AC_CACHE_CHECK([whether $CC supports weak aliases across object file
> boundaries],
> -  [ax_cv_sys_weak_alias_crossfile], [
> -    AS_IF([test $ax_cv_sys_weak_alias = no],
> -          [ax_cv_sys_weak_alias_crossfile=no], [
> -dnl Must build our own test files...
> -      # conftest1 contains our weak alias definition...
> -      cat >conftest1.$ac_ext <<_ACEOF
> -/* confdefs.h.  */
> -_ACEOF
> -      cat confdefs.h >>conftest1.$ac_ext
> -      cat >>conftest1.$ac_ext <<_ACEOF
> -/* end confdefs.h.  */
> -
> -@%:@ifndef HAVE_SYS_WEAK_ALIAS_ATTRIBUTE
> -extern void weakf(int c);
> -@%:@endif
> -@%:@if defined(HAVE_SYS_WEAK_ALIAS_PRAGMA)
> -@%:@pragma weak weakf = __weakf
> -@%:@elif defined(HAVE_SYS_WEAK_ALIAS_HPSECONDARY)
> -@%:@pragma _HP_SECONDARY_DEF __weakf weakf
> -@%:@elif defined(HAVE_SYS_WEAK_ALIAS_CRIDUPLICATE)
> -@%:@pragma _CRI duplicate weakf as __weakf
> -@%:@endif
> -void __weakf(int c) {}
> -@%:@ifdef HAVE_SYS_WEAK_ALIAS_ATTRIBUTE
> -void weakf(int c) __attribute((weak, alias("__weakf")));
> -@%:@endif
> -_ACEOF
> -      # And conftest2 contains our main routine that calls it
> -      cat >conftest2.$ac_ext <<_ACEOF
> -/* confdefs.h.  */
> -_ACEOF
> -      cat confdefs.h >> conftest2.$ac_ext
> -      cat >>conftest2.$ac_ext <<_ACEOF
> -/* end confdefs.h.  */
> -
> -extern void weakf(int c);
> -int
> -main ()
> -{
> -  weakf(0);
> -  return 0;
> -}
> -_ACEOF
> -      # We must remove the object files (if any) ourselves...
> -      rm -f conftest2.$ac_objext conftest$ac_exeext
> -
> -      # Change ac_link to compile *2* files together
> -      save_aclink=$ac_link
> -      ac_link=`echo "$ac_link" | \
> -               sed -e 's/conftest\(\.\$ac_ext\)/conftest1\1 conftest2\1/'`
> -dnl Substitute our own routine for logging the conftest
> -m4_pushdef([_AC_MSG_LOG_CONFTEST],
> -[echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
> -echo ">>> conftest1.$ac_ext" >&AS_MESSAGE_LOG_FD
> -sed "s/^/| /" conftest1.$ac_ext >&AS_MESSAGE_LOG_FD
> -echo ">>> conftest2.$ac_ext" >&AS_MESSAGE_LOG_FD
> -sed "s/^/| /" conftest2.$ac_ext >&AS_MESSAGE_LOG_FD
> -])dnl
> -      # Since we created the files ourselves, don't use SOURCE argument
> -      AC_LINK_IFELSE(, [ax_cv_sys_weak_alias_crossfile=yes],
> -                     [ax_cv_sys_weak_alias_crossfile=no])
> -dnl Restore _AC_MSG_LOG_CONFTEST
> -m4_popdef([_AC_MSG_LOG_CONFTEST])dnl
> -      # Restore ac_link
> -      ac_link=$save_aclink
> -
> -      # We must remove the object files (if any) and C files ourselves...
> -      rm -f conftest1.$ac_ext conftest2.$ac_ext \
> -            conftest1.$ac_objext conftest2.$ac_objext
> -    ])
> -  ])
> -
> -  # What were the results of the test?
> -  AS_IF([test $ax_cv_sys_weak_alias_crossfile = yes], [
> -    AC_DEFINE([HAVE_SYS_WEAK_ALIAS_CROSSFILE], 1,
> -              [Define this if weak aliases in other files are honored])
> -  ])
> -])
> diff --git a/config/ax_try_compile_java.m4 b/config/ax_try_compile_java.m4
> deleted file mode 100644
> index a8ed6b2..0000000
> --- a/config/ax_try_compile_java.m4
> +++ /dev/null
> @@ -1,55 +0,0 @@
> -# ===========================================================================
> -#    http://www.gnu.org/software/autoconf-archive/ax_try_compile_java.html
> -# ===========================================================================
> -#
> -# SYNOPSIS
> -#
> -#   AX_TRY_COMPILE_JAVA
> -#
> -# DESCRIPTION
> -#
> -#   AX_TRY_COMPILE_JAVA attempt to compile user given source.
> -#
> -#   *Warning*: its success or failure can depend on a proper setting of the
> -#   CLASSPATH env. variable.
> -#
> -#   Note: This is part of the set of autoconf M4 macros for Java programs.
> -#   It is VERY IMPORTANT that you download the whole set, some macros depend
> -#   on other. Unfortunately, the autoconf archive does not support the
> -#   concept of set of macros, so I had to break it for submission. The
> -#   general documentation, as well as the sample configure.in, is included
> -#   in the AX_PROG_JAVA macro.
> -#
> -# LICENSE
> -#
> -#   Copyright (c) 2008 Devin Weaver <ktohg at tritarget.com>
> -#
> -#   Copying and distribution of this file, with or without modification, are
> -#   permitted in any medium without royalty provided the copyright notice
> -#   and this notice are preserved. This file is offered as-is, without any
> -#   warranty.
> -
> -#serial 8
> -
> -AU_ALIAS([AC_TRY_COMPILE_JAVA], [AX_TRY_COMPILE_JAVA])
> -AC_DEFUN([AX_TRY_COMPILE_JAVA],[
> -AC_REQUIRE([AX_PROG_JAVAC])dnl
> -cat << \EOF > Test.java
> -/* [#]line __oline__ "configure" */
> -ifelse([$1], , , [import $1;])
> -public class Test {
> -[$2]
> -}
> -EOF
> -if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class
> -then
> -dnl Don't remove the temporary files here, so they can be examined.
> -  ifelse([$3], , :, [$3])
> -else
> -  echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
> -  cat Test.java >&AS_MESSAGE_LOG_FD
> -ifelse([$4], , , [  rm -fr Test.java Test.class
> -  $4
> -])dnl
> -fi
> -rm -fr Test.java Test.class])
> diff --git a/config/ax_try_run_java.m4 b/config/ax_try_run_java.m4
> deleted file mode 100644
> index c680f03..0000000
> --- a/config/ax_try_run_java.m4
> +++ /dev/null
> @@ -1,56 +0,0 @@
> -# ===========================================================================
> -#      http://www.gnu.org/software/autoconf-archive/ax_try_run_java.html
> -# ===========================================================================
> -#
> -# SYNOPSIS
> -#
> -#   AX_TRY_RUN_JAVA
> -#
> -# DESCRIPTION
> -#
> -#   AX_TRY_RUN_JAVA attempt to compile and run user given source.
> -#
> -#   *Warning*: its success or failure can depend on a proper setting of the
> -#   CLASSPATH env. variable.
> -#
> -#   Note: This is part of the set of autoconf M4 macros for Java programs.
> -#   It is VERY IMPORTANT that you download the whole set, some macros depend
> -#   on other. Unfortunately, the autoconf archive does not support the
> -#   concept of set of macros, so I had to break it for submission. The
> -#   general documentation, as well as the sample configure.in, is included
> -#   in the AX_PROG_JAVA macro.
> -#
> -# LICENSE
> -#
> -#   Copyright (c) 2008 Devin Weaver <ktohg at tritarget.com>
> -#
> -#   Copying and distribution of this file, with or without modification, are
> -#   permitted in any medium without royalty provided the copyright notice
> -#   and this notice are preserved. This file is offered as-is, without any
> -#   warranty.
> -
> -#serial 2
> -
> -AU_ALIAS([AC_TRY_RUN_JAVA], [AX_TRY_RUN_JAVA])
> -AC_DEFUN([AX_TRY_RUN_JAVA],[
> -AC_REQUIRE([AX_PROG_JAVAC])dnl
> -AC_REQUIRE([AX_PROG_JAVA])dnl
> -cat << \EOF > Test.java
> -/* [#]line __oline__ "configure" */
> -ifelse([$1], , , [include $1;])
> -public class Test {
> -[$2]
> -}
> -EOF
> -if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class && ($JAVA
> $JAVAFLAGS Test; exit) 2>/dev/null
> -then
> -dnl Don't remove the temporary files here, so they can be examined.
> -  ifelse([$3], , :, [$3])
> -else
> -  echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
> -  cat Test.java >&AS_MESSAGE_LOG_FD
> -ifelse([$4], , , [  rm -fr Test.java Test.class
> -  $4
> -])dnl
> -fi
> -rm -fr Test.java Test.class])
> diff --git a/configure.ac b/configure.ac
> index 6f7c6f1..4fb8bce 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -11,7 +11,8 @@ m4_ifdef([V_EXTRA], [m4_append([V_STRING], [-V_EXTRA])])
> m4_define([V_NAME], [[KeKriek]])
> m4_define([V_DESC], [[From Brasserie Dunham, a sour mashed golden wheat ale
> fermented with local sour cherries from Tougas orchards. Fresh sweet cherry
> notes with some tartness, lively carbonation with a dry finish.]])
> 
> -AC_INIT([lttng-ust], V_STRING, [mathieu dot desnoyers at efficios dot com])
> +AC_PREREQ(2.59)
> +AC_INIT([lttng-ust], V_STRING, [mathieu dot desnoyers at efficios dot com], [],
> [https://lttng.org])
> 
> # Following the numbering scheme proposed by libtool for the library version
> #
> http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
> @@ -27,7 +28,7 @@ AC_SUBST([LTTNG_UST_CTL_LIBRARY_VERSION], [3:0:1])
> AC_CONFIG_AUX_DIR([config])
> AC_CANONICAL_TARGET
> AC_CANONICAL_HOST
> -AC_CONFIG_MACRO_DIR([config])
> +AC_CONFIG_MACRO_DIR([m4])
> AM_INIT_AUTOMAKE([1.9 foreign dist-bzip2 no-dist-gzip tar-ustar])
> AM_MAINTAINER_MODE([enable])
> m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
> @@ -61,7 +62,7 @@ AC_ARG_ENABLE([libtool-linkdep-fixup], [
> ])
> 
> AS_IF([test "x$libtool_fixup" = "xyes"], [
> -	libtool_m4="$srcdir/config/libtool.m4"
> +	libtool_m4="$srcdir/m4/libtool.m4"
> 	libtool_flag_pattern=".*link_all_deplibs\s*,\s*\$1\s*)"
> 	AC_MSG_CHECKING([for occurence(s) of link_all_deplibs = no in $libtool_m4])
> 	libtool_flag_pattern_count=$(grep -c "$libtool_flag_pattern\s*=\s*no"
> 	$libtool_m4)
> diff --git a/m4/ax_check_class.m4 b/m4/ax_check_class.m4
> new file mode 100644
> index 0000000..42b51d7
> --- /dev/null
> +++ b/m4/ax_check_class.m4
> @@ -0,0 +1,144 @@
> +# ===========================================================================
> +#      http://www.gnu.org/software/autoconf-archive/ax_check_class.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   AX_CHECK_CLASS
> +#
> +# DESCRIPTION
> +#
> +#   AX_CHECK_CLASS tests the existence of a given Java class, either in a
> +#   jar or in a '.class' file.
> +#
> +#   *Warning*: its success or failure can depend on a proper setting of the
> +#   CLASSPATH env. variable.
> +#
> +#   Note: This is part of the set of autoconf M4 macros for Java programs.
> +#   It is VERY IMPORTANT that you download the whole set, some macros depend
> +#   on other. Unfortunately, the autoconf archive does not support the
> +#   concept of set of macros, so I had to break it for submission. The
> +#   general documentation, as well as the sample configure.in, is included
> +#   in the AX_PROG_JAVA macro.
> +#
> +# LICENSE
> +#
> +#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer at pasteur.fr>
> +#
> +#   This program is free software; you can redistribute it and/or modify it
> +#   under the terms of the GNU General Public License as published by the
> +#   Free Software Foundation; either version 2 of the License, or (at your
> +#   option) any later version.
> +#
> +#   This program is distributed in the hope that it will be useful, but
> +#   WITHOUT ANY WARRANTY; without even the implied warranty of
> +#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
> +#   Public License for more details.
> +#
> +#   You should have received a copy of the GNU General Public License along
> +#   with this program. If not, see <http://www.gnu.org/licenses/>.
> +#
> +#   As a special exception, the respective Autoconf Macro's copyright owner
> +#   gives unlimited permission to copy, distribute and modify the configure
> +#   scripts that are the output of Autoconf when processing the Macro. You
> +#   need not follow the terms of the GNU General Public License when using
> +#   or distributing such scripts, even though portions of the text of the
> +#   Macro appear in them. The GNU General Public License (GPL) does govern
> +#   all other use of the material that constitutes the Autoconf Macro.
> +#
> +#   This special exception to the GPL applies to versions of the Autoconf
> +#   Macro released by the Autoconf Archive. When you make and distribute a
> +#   modified version of the Autoconf Macro, you may extend this special
> +#   exception to the GPL to apply to your modified version as well.
> +
> +#serial 7
> +
> +AU_ALIAS([AC_CHECK_CLASS], [AX_CHECK_CLASS])
> +AC_DEFUN([AX_CHECK_CLASS],[
> +AC_REQUIRE([AX_PROG_JAVA])
> +ac_var_name=`echo $1 | sed 's/\./_/g'`
> +dnl Normaly I'd use a AC_CACHE_CHECK here but since the variable name is
> +dnl dynamic I need an extra level of extraction
> +AC_MSG_CHECKING([for $1 class])
> +AC_CACHE_VAL(ax_cv_class_$ac_var_name, [
> +if test x$ac_cv_prog_uudecode_base64 = xyes; then
> +dnl /**
> +dnl  * Test.java: used to test dynamicaly if a class exists.
> +dnl  */
> +dnl public class Test
> +dnl {
> +dnl
> +dnl public static void
> +dnl main( String[] argv )
> +dnl {
> +dnl     Class lib;
> +dnl     if (argv.length < 1)
> +dnl      {
> +dnl             System.err.println ("Missing argument");
> +dnl             System.exit (77);
> +dnl      }
> +dnl     try
> +dnl      {
> +dnl             lib = Class.forName (argv[0]);
> +dnl      }
> +dnl     catch (ClassNotFoundException e)
> +dnl      {
> +dnl             System.exit (1);
> +dnl      }
> +dnl     lib = null;
> +dnl     System.exit (0);
> +dnl }
> +dnl
> +dnl }
> +cat << \EOF > Test.uue
> +begin-base64 644 Test.class
> +yv66vgADAC0AKQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE
> +bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51
> +bWJlclRhYmxlDAAKAAsBAANlcnIBABVMamF2YS9pby9QcmludFN0cmVhbTsJ
> +AA0ACQcADgEAEGphdmEvbGFuZy9TeXN0ZW0IABABABBNaXNzaW5nIGFyZ3Vt
> +ZW50DAASABMBAAdwcmludGxuAQAVKExqYXZhL2xhbmcvU3RyaW5nOylWCgAV
> +ABEHABYBABNqYXZhL2lvL1ByaW50U3RyZWFtDAAYABkBAARleGl0AQAEKEkp
> +VgoADQAXDAAcAB0BAAdmb3JOYW1lAQAlKExqYXZhL2xhbmcvU3RyaW5nOylM
> +amF2YS9sYW5nL0NsYXNzOwoAHwAbBwAgAQAPamF2YS9sYW5nL0NsYXNzBwAi
> +AQAgamF2YS9sYW5nL0NsYXNzTm90Rm91bmRFeGNlcHRpb24BAAY8aW5pdD4B
> +AAMoKVYMACMAJAoAAwAlAQAKU291cmNlRmlsZQEACVRlc3QuamF2YQAhAAEA
> +AwAAAAAAAgAJAAUABgABAAcAAABtAAMAAwAAACkqvgSiABCyAAwSD7YAFBBN
> +uAAaKgMyuAAeTKcACE0EuAAaAUwDuAAasQABABMAGgAdACEAAQAIAAAAKgAK
> +AAAACgAAAAsABgANAA4ADgATABAAEwASAB4AFgAiABgAJAAZACgAGgABACMA
> +JAABAAcAAAAhAAEAAQAAAAUqtwAmsQAAAAEACAAAAAoAAgAAAAQABAAEAAEA
> +JwAAAAIAKA==
> +====
> +EOF
> +                if $UUDECODE Test.uue; then
> +                        :
> +                else
> +                        echo "configure: __oline__: uudecode had trouble
> decoding base 64 file 'Test.uue'" >&AS_MESSAGE_LOG_FD
> +                        echo "configure: failed file was:" >&AS_MESSAGE_LOG_FD
> +                        cat Test.uue >&AS_MESSAGE_LOG_FD
> +                        ac_cv_prog_uudecode_base64=no
> +                fi
> +        rm -f Test.uue
> +        if AC_TRY_COMMAND($JAVA -classpath ".:$CLASSPATH" $JAVAFLAGS Test $1)
> >/dev/null 2>&1; then
> +                eval "ac_cv_class_$ac_var_name=yes"
> +        else
> +                eval "ac_cv_class_$ac_var_name=no"
> +        fi
> +        rm -f Test.class
> +else
> +        AX_TRY_COMPILE_JAVA([$1], , [eval "ac_cv_class_$ac_var_name=yes"],
> +                [eval "ac_cv_class_$ac_var_name=no"])
> +fi
> +eval "ac_var_val=$`eval echo ac_cv_class_$ac_var_name`"
> +eval "HAVE_$ac_var_name=$`echo ac_cv_class_$ac_var_val`"
> +HAVE_LAST_CLASS=$ac_var_val
> +if test x$ac_var_val = xyes; then
> +        ifelse([$2], , :, [$2])
> +else
> +        ifelse([$3], , :, [$3])
> +fi
> +])
> +dnl for some reason the above statment didn't fall though here?
> +dnl do scripts have variable scoping?
> +eval "ac_var_val=$`eval echo ac_cv_class_$ac_var_name`"
> +AC_MSG_RESULT($ac_var_val)
> +])
> diff --git a/m4/ax_check_classpath.m4 b/m4/ax_check_classpath.m4
> new file mode 100644
> index 0000000..3c9081a
> --- /dev/null
> +++ b/m4/ax_check_classpath.m4
> @@ -0,0 +1,60 @@
> +# ===========================================================================
> +#    http://www.gnu.org/software/autoconf-archive/ax_check_classpath.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   AX_CHECK_CLASSPATH
> +#
> +# DESCRIPTION
> +#
> +#   AX_CHECK_CLASSPATH just displays the CLASSPATH, for the edification of
> +#   the user.
> +#
> +#   Note: This is part of the set of autoconf M4 macros for Java programs.
> +#   It is VERY IMPORTANT that you download the whole set, some macros depend
> +#   on other. Unfortunately, the autoconf archive does not support the
> +#   concept of set of macros, so I had to break it for submission. The
> +#   general documentation, as well as the sample configure.in, is included
> +#   in the AX_PROG_JAVA macro.
> +#
> +# LICENSE
> +#
> +#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer at pasteur.fr>
> +#
> +#   This program is free software; you can redistribute it and/or modify it
> +#   under the terms of the GNU General Public License as published by the
> +#   Free Software Foundation; either version 2 of the License, or (at your
> +#   option) any later version.
> +#
> +#   This program is distributed in the hope that it will be useful, but
> +#   WITHOUT ANY WARRANTY; without even the implied warranty of
> +#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
> +#   Public License for more details.
> +#
> +#   You should have received a copy of the GNU General Public License along
> +#   with this program. If not, see <http://www.gnu.org/licenses/>.
> +#
> +#   As a special exception, the respective Autoconf Macro's copyright owner
> +#   gives unlimited permission to copy, distribute and modify the configure
> +#   scripts that are the output of Autoconf when processing the Macro. You
> +#   need not follow the terms of the GNU General Public License when using
> +#   or distributing such scripts, even though portions of the text of the
> +#   Macro appear in them. The GNU General Public License (GPL) does govern
> +#   all other use of the material that constitutes the Autoconf Macro.
> +#
> +#   This special exception to the GPL applies to versions of the Autoconf
> +#   Macro released by the Autoconf Archive. When you make and distribute a
> +#   modified version of the Autoconf Macro, you may extend this special
> +#   exception to the GPL to apply to your modified version as well.
> +
> +#serial 5
> +
> +AU_ALIAS([AC_CHECK_CLASSPATH], [AX_CHECK_CLASSPATH])
> +AC_DEFUN([AX_CHECK_CLASSPATH],[
> +if test "x$CLASSPATH" = x; then
> +        echo "You have no CLASSPATH, I hope it is good"
> +else
> +        echo "You have CLASSPATH $CLASSPATH, hope it is correct"
> +fi
> +])
> diff --git a/m4/ax_check_rqrd_class.m4 b/m4/ax_check_rqrd_class.m4
> new file mode 100644
> index 0000000..8f14241
> --- /dev/null
> +++ b/m4/ax_check_rqrd_class.m4
> @@ -0,0 +1,62 @@
> +# ===========================================================================
> +#    http://www.gnu.org/software/autoconf-archive/ax_check_rqrd_class.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   AX_CHECK_RQRD_CLASS
> +#
> +# DESCRIPTION
> +#
> +#   AX_CHECK_RQRD_CLASS tests the existence of a given Java class, either in
> +#   a jar or in a '.class' file and fails if it doesn't exist. Its success
> +#   or failure can depend on a proper setting of the CLASSPATH env.
> +#   variable.
> +#
> +#   Note: This is part of the set of autoconf M4 macros for Java programs.
> +#   It is VERY IMPORTANT that you download the whole set, some macros depend
> +#   on other. Unfortunately, the autoconf archive does not support the
> +#   concept of set of macros, so I had to break it for submission. The
> +#   general documentation, as well as the sample configure.in, is included
> +#   in the AX_PROG_JAVA macro.
> +#
> +# LICENSE
> +#
> +#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer at pasteur.fr>
> +#
> +#   This program is free software; you can redistribute it and/or modify it
> +#   under the terms of the GNU General Public License as published by the
> +#   Free Software Foundation; either version 2 of the License, or (at your
> +#   option) any later version.
> +#
> +#   This program is distributed in the hope that it will be useful, but
> +#   WITHOUT ANY WARRANTY; without even the implied warranty of
> +#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
> +#   Public License for more details.
> +#
> +#   You should have received a copy of the GNU General Public License along
> +#   with this program. If not, see <http://www.gnu.org/licenses/>.
> +#
> +#   As a special exception, the respective Autoconf Macro's copyright owner
> +#   gives unlimited permission to copy, distribute and modify the configure
> +#   scripts that are the output of Autoconf when processing the Macro. You
> +#   need not follow the terms of the GNU General Public License when using
> +#   or distributing such scripts, even though portions of the text of the
> +#   Macro appear in them. The GNU General Public License (GPL) does govern
> +#   all other use of the material that constitutes the Autoconf Macro.
> +#
> +#   This special exception to the GPL applies to versions of the Autoconf
> +#   Macro released by the Autoconf Archive. When you make and distribute a
> +#   modified version of the Autoconf Macro, you may extend this special
> +#   exception to the GPL to apply to your modified version as well.
> +
> +#serial 5
> +
> +AU_ALIAS([AC_CHECK_RQRD_CLASS], [AX_CHECK_RQRD_CLASS])
> +AC_DEFUN([AX_CHECK_RQRD_CLASS],[
> +CLASS=`echo $1|sed 's/\./_/g'`
> +AC_CHECK_CLASS($1)
> +if test "$HAVE_LAST_CLASS" = "no"; then
> +        AC_MSG_ERROR([Required class $1 missing, exiting.])
> +fi
> +])
> diff --git a/m4/ax_java_options.m4 b/m4/ax_java_options.m4
> new file mode 100644
> index 0000000..36c10d9
> --- /dev/null
> +++ b/m4/ax_java_options.m4
> @@ -0,0 +1,48 @@
> +# ===========================================================================
> +#      http://www.gnu.org/software/autoconf-archive/ax_java_options.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   AX_JAVA_OPTIONS
> +#
> +# DESCRIPTION
> +#
> +#   AX_JAVA_OPTIONS adds configure command line options used for Java m4
> +#   macros. This Macro is optional.
> +#
> +#   Note: This is part of the set of autoconf M4 macros for Java programs.
> +#   It is VERY IMPORTANT that you download the whole set, some macros depend
> +#   on other. Unfortunately, the autoconf archive does not support the
> +#   concept of set of macros, so I had to break it for submission. The
> +#   general documentation, as well as the sample configure.in, is included
> +#   in the AX_PROG_JAVA macro.
> +#
> +# LICENSE
> +#
> +#   Copyright (c) 2008 Devin Weaver <ktohg at tritarget.com>
> +#
> +#   Copying and distribution of this file, with or without modification, are
> +#   permitted in any medium without royalty provided the copyright notice
> +#   and this notice are preserved. This file is offered as-is, without any
> +#   warranty.
> +
> +#serial 6
> +
> +AU_ALIAS([AC_JAVA_OPTIONS], [AX_JAVA_OPTIONS])
> +AC_DEFUN([AX_JAVA_OPTIONS],[
> +AC_ARG_WITH(java-prefix,
> +                        [  --with-java-prefix=PFX  prefix where Java runtime is
> installed (optional)])
> +AC_ARG_WITH(javac-flags,
> +                        [  --with-javac-flags=FLAGS flags to pass to the Java
> compiler (optional)])
> +AC_ARG_WITH(java-flags,
> +                        [  --with-java-flags=FLAGS flags to pass to the Java VM
> (optional)])
> +JAVAPREFIX=$with_java_prefix
> +JAVACFLAGS=$with_javac_flags
> +JAVAFLAGS=$with_java_flags
> +AC_SUBST(JAVAPREFIX)dnl
> +AC_SUBST(JAVACFLAGS)dnl
> +AC_SUBST(JAVAFLAGS)dnl
> +AC_SUBST(JAVA)dnl
> +AC_SUBST(JAVAC)dnl
> +])
> diff --git a/m4/ax_jni_include_dir.m4 b/m4/ax_jni_include_dir.m4
> new file mode 100644
> index 0000000..b664d80
> --- /dev/null
> +++ b/m4/ax_jni_include_dir.m4
> @@ -0,0 +1,126 @@
> +# ===========================================================================
> +#    http://www.gnu.org/software/autoconf-archive/ax_jni_include_dir.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   AX_JNI_INCLUDE_DIR
> +#
> +# DESCRIPTION
> +#
> +#   AX_JNI_INCLUDE_DIR finds include directories needed for compiling
> +#   programs using the JNI interface.
> +#
> +#   JNI include directories are usually in the Java distribution. This is
> +#   deduced from the value of $JAVA_HOME, $JAVAC, or the path to "javac", in
> +#   that order. When this macro completes, a list of directories is left in
> +#   the variable JNI_INCLUDE_DIRS.
> +#
> +#   Example usage follows:
> +#
> +#     AX_JNI_INCLUDE_DIR
> +#
> +#     for JNI_INCLUDE_DIR in $JNI_INCLUDE_DIRS
> +#     do
> +#             CPPFLAGS="$CPPFLAGS -I$JNI_INCLUDE_DIR"
> +#     done
> +#
> +#   If you want to force a specific compiler:
> +#
> +#   - at the configure.in level, set JAVAC=yourcompiler before calling
> +#   AX_JNI_INCLUDE_DIR
> +#
> +#   - at the configure level, setenv JAVAC
> +#
> +#   Note: This macro can work with the autoconf M4 macros for Java programs.
> +#   This particular macro is not part of the original set of macros.
> +#
> +# LICENSE
> +#
> +#   Copyright (c) 2008 Don Anderson <dda at sleepycat.com>
> +#
> +#   Copying and distribution of this file, with or without modification, are
> +#   permitted in any medium without royalty provided the copyright notice
> +#   and this notice are preserved. This file is offered as-is, without any
> +#   warranty.
> +
> +#serial 10
> +
> +AU_ALIAS([AC_JNI_INCLUDE_DIR], [AX_JNI_INCLUDE_DIR])
> +AC_DEFUN([AX_JNI_INCLUDE_DIR],[
> +
> +JNI_INCLUDE_DIRS=""
> +
> +if test "x$JAVA_HOME" != x; then
> +	_JTOPDIR="$JAVA_HOME"
> +else
> +	if test "x$JAVAC" = x; then
> +		JAVAC=javac
> +	fi
> +	AC_PATH_PROG([_ACJNI_JAVAC], [$JAVAC], [no])
> +	if test "x$_ACJNI_JAVAC" = xno; then
> +		AC_MSG_ERROR([cannot find JDK; try setting \$JAVAC or \$JAVA_HOME])
> +	fi
> +	_ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
> +	_JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
> +fi
> +
> +case "$host_os" in
> +        darwin*)        _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
> +                        _JINC="$_JTOPDIR/Headers";;
> +        *)              _JINC="$_JTOPDIR/include";;
> +esac
> +_AS_ECHO_LOG([_JTOPDIR=$_JTOPDIR])
> +_AS_ECHO_LOG([_JINC=$_JINC])
> +
> +# On Mac OS X 10.6.4, jni.h is a symlink:
> +# /System/Library/Frameworks/JavaVM.framework/Versions/Current/Headers/jni.h
> +# -> ../../CurrentJDK/Headers/jni.h.
> +AC_CHECK_FILE([$_JINC/jni.h],
> +	[JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"],
> +	[_JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
> +	 AC_CHECK_FILE([$_JTOPDIR/include/jni.h],
> +		[JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include"],
> +                AC_MSG_ERROR([cannot find JDK header files]))
> +	])
> +
> +# get the likely subdirectories for system specific java includes
> +case "$host_os" in
> +bsdi*)          _JNI_INC_SUBDIRS="bsdos";;
> +freebsd*)       _JNI_INC_SUBDIRS="freebsd";;
> +linux*)         _JNI_INC_SUBDIRS="linux genunix";;
> +osf*)           _JNI_INC_SUBDIRS="alpha";;
> +solaris*)       _JNI_INC_SUBDIRS="solaris";;
> +mingw*)		_JNI_INC_SUBDIRS="win32";;
> +cygwin*)	_JNI_INC_SUBDIRS="win32";;
> +*)              _JNI_INC_SUBDIRS="genunix";;
> +esac
> +
> +# add any subdirectories that are present
> +for JINCSUBDIR in $_JNI_INC_SUBDIRS
> +do
> +    if test -d "$_JTOPDIR/include/$JINCSUBDIR"; then
> +         JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include/$JINCSUBDIR"
> +    fi
> +done
> +])
> +
> +# _ACJNI_FOLLOW_SYMLINKS <path>
> +# Follows symbolic links on <path>,
> +# finally setting variable _ACJNI_FOLLOWED
> +# ----------------------------------------
> +AC_DEFUN([_ACJNI_FOLLOW_SYMLINKS],[
> +# find the include directory relative to the javac executable
> +_cur="$1"
> +while ls -ld "$_cur" 2>/dev/null | grep " -> " >/dev/null; do
> +        AC_MSG_CHECKING([symlink for $_cur])
> +        _slink=`ls -ld "$_cur" | sed 's/.* -> //'`
> +        case "$_slink" in
> +        /*) _cur="$_slink";;
> +        # 'X' avoids triggering unwanted echo options.
> +        *) _cur=`echo "X$_cur" | sed -e 's/^X//' -e 's:[[^/]]*$::'`"$_slink";;
> +        esac
> +        AC_MSG_RESULT([$_cur])
> +done
> +_ACJNI_FOLLOWED="$_cur"
> +])# _ACJNI
> diff --git a/m4/ax_prog_jar.m4 b/m4/ax_prog_jar.m4
> new file mode 100644
> index 0000000..3c60fca
> --- /dev/null
> +++ b/m4/ax_prog_jar.m4
> @@ -0,0 +1,49 @@
> +# ===========================================================================
> +#        http://www.gnu.org/software/autoconf-archive/ax_prog_jar.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   AX_PROG_JAR
> +#
> +# DESCRIPTION
> +#
> +#   AX_PROG_JAR tests for an existing jar program. It uses the environment
> +#   variable JAR then tests in sequence various common jar programs.
> +#
> +#   If you want to force a specific compiler:
> +#
> +#   - at the configure.in level, set JAR=yourcompiler before calling
> +#   AX_PROG_JAR
> +#
> +#   - at the configure level, setenv JAR
> +#
> +#   You can use the JAR variable in your Makefile.in, with @JAR at .
> +#
> +#   Note: This macro depends on the autoconf M4 macros for Java programs. It
> +#   is VERY IMPORTANT that you download that whole set, some macros depend
> +#   on other. Unfortunately, the autoconf archive does not support the
> +#   concept of set of macros, so I had to break it for submission.
> +#
> +#   The general documentation of those macros, as well as the sample
> +#   configure.in, is included in the AX_PROG_JAVA macro.
> +#
> +# LICENSE
> +#
> +#   Copyright (c) 2008 Egon Willighagen <e.willighagen at science.ru.nl>
> +#
> +#   Copying and distribution of this file, with or without modification, are
> +#   permitted in any medium without royalty provided the copyright notice
> +#   and this notice are preserved. This file is offered as-is, without any
> +#   warranty.
> +
> +#serial 7
> +
> +AU_ALIAS([AC_PROG_JAR], [AX_PROG_JAR])
> +AC_DEFUN([AX_PROG_JAR],[
> +AS_IF([test "x$JAVAPREFIX" = x],
> +      [test "x$JAR" = x && AC_CHECK_PROGS([JAR], [jar])],
> +      [test "x$JAR" = x && AC_CHECK_PROGS([JAR], [jar], [],
> [$JAVAPREFIX/bin])])
> +test "x$JAR" = x && AC_MSG_ERROR([no acceptable jar program found in \$PATH])
> +AC_PROVIDE([$0])dnl
> +])
> diff --git a/m4/ax_prog_java.m4 b/m4/ax_prog_java.m4
> new file mode 100644
> index 0000000..03961db
> --- /dev/null
> +++ b/m4/ax_prog_java.m4
> @@ -0,0 +1,115 @@
> +# ===========================================================================
> +#       http://www.gnu.org/software/autoconf-archive/ax_prog_java.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   AX_PROG_JAVA
> +#
> +# DESCRIPTION
> +#
> +#   Here is a summary of the main macros:
> +#
> +#   AX_PROG_JAVAC: finds a Java compiler.
> +#
> +#   AX_PROG_JAVA: finds a Java virtual machine.
> +#
> +#   AX_CHECK_CLASS: finds if we have the given class (beware of CLASSPATH!).
> +#
> +#   AX_CHECK_RQRD_CLASS: finds if we have the given class and stops
> +#   otherwise.
> +#
> +#   AX_TRY_COMPILE_JAVA: attempt to compile user given source.
> +#
> +#   AX_TRY_RUN_JAVA: attempt to compile and run user given source.
> +#
> +#   AX_JAVA_OPTIONS: adds Java configure options.
> +#
> +#   AX_PROG_JAVA tests an existing Java virtual machine. It uses the
> +#   environment variable JAVA then tests in sequence various common Java
> +#   virtual machines. For political reasons, it starts with the free ones.
> +#   You *must* call [AX_PROG_JAVAC] before.
> +#
> +#   If you want to force a specific VM:
> +#
> +#   - at the configure.in level, set JAVA=yourvm before calling AX_PROG_JAVA
> +#
> +#     (but after AC_INIT)
> +#
> +#   - at the configure level, setenv JAVA
> +#
> +#   You can use the JAVA variable in your Makefile.in, with @JAVA at .
> +#
> +#   *Warning*: its success or failure can depend on a proper setting of the
> +#   CLASSPATH env. variable.
> +#
> +#   TODO: allow to exclude virtual machines (rationale: most Java programs
> +#   cannot run with some VM like kaffe).
> +#
> +#   Note: This is part of the set of autoconf M4 macros for Java programs.
> +#   It is VERY IMPORTANT that you download the whole set, some macros depend
> +#   on other. Unfortunately, the autoconf archive does not support the
> +#   concept of set of macros, so I had to break it for submission.
> +#
> +#   A Web page, with a link to the latest CVS snapshot is at
> +#   <http://www.internatif.org/bortzmeyer/autoconf-Java/>.
> +#
> +#   This is a sample configure.in Process this file with autoconf to produce
> +#   a configure script.
> +#
> +#     AC_INIT(UnTag.java)
> +#
> +#     dnl Checks for programs.
> +#     AC_CHECK_CLASSPATH
> +#     AX_PROG_JAVAC
> +#     AX_PROG_JAVA
> +#
> +#     dnl Checks for classes
> +#     AX_CHECK_RQRD_CLASS(org.xml.sax.Parser)
> +#     AX_CHECK_RQRD_CLASS(com.jclark.xml.sax.Driver)
> +#
> +#     AC_OUTPUT(Makefile)
> +#
> +# LICENSE
> +#
> +#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer at pasteur.fr>
> +#
> +#   This program is free software; you can redistribute it and/or modify it
> +#   under the terms of the GNU General Public License as published by the
> +#   Free Software Foundation; either version 2 of the License, or (at your
> +#   option) any later version.
> +#
> +#   This program is distributed in the hope that it will be useful, but
> +#   WITHOUT ANY WARRANTY; without even the implied warranty of
> +#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
> +#   Public License for more details.
> +#
> +#   You should have received a copy of the GNU General Public License along
> +#   with this program. If not, see <http://www.gnu.org/licenses/>.
> +#
> +#   As a special exception, the respective Autoconf Macro's copyright owner
> +#   gives unlimited permission to copy, distribute and modify the configure
> +#   scripts that are the output of Autoconf when processing the Macro. You
> +#   need not follow the terms of the GNU General Public License when using
> +#   or distributing such scripts, even though portions of the text of the
> +#   Macro appear in them. The GNU General Public License (GPL) does govern
> +#   all other use of the material that constitutes the Autoconf Macro.
> +#
> +#   This special exception to the GPL applies to versions of the Autoconf
> +#   Macro released by the Autoconf Archive. When you make and distribute a
> +#   modified version of the Autoconf Macro, you may extend this special
> +#   exception to the GPL to apply to your modified version as well.
> +
> +#serial 9
> +
> +AU_ALIAS([AC_PROG_JAVA], [AX_PROG_JAVA])
> +AC_DEFUN([AX_PROG_JAVA],[
> +m4_define([m4_ax_prog_java_list], [kaffe java])dnl
> +AS_IF([test "x$JAVAPREFIX" = x],
> +      [test x$JAVA = x && AC_CHECK_PROGS([JAVA], [m4_ax_prog_java_list])],
> +      [test x$JAVA = x && AC_CHECK_PROGS([JAVA], [m4_ax_prog_java_list], [],
> [$JAVAPREFIX/bin])])
> +test x$JAVA = x && AC_MSG_ERROR([no acceptable Java virtual machine found in
> \$PATH])
> +m4_undefine([m4_ax_prog_java_list])dnl
> +AX_PROG_JAVA_WORKS
> +AC_PROVIDE([$0])dnl
> +])
> diff --git a/m4/ax_prog_java_works.m4 b/m4/ax_prog_java_works.m4
> new file mode 100644
> index 0000000..54e132a
> --- /dev/null
> +++ b/m4/ax_prog_java_works.m4
> @@ -0,0 +1,134 @@
> +# ===========================================================================
> +#    http://www.gnu.org/software/autoconf-archive/ax_prog_java_works.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   AX_PROG_JAVA_WORKS
> +#
> +# DESCRIPTION
> +#
> +#   Internal use ONLY.
> +#
> +#   Note: This is part of the set of autoconf M4 macros for Java programs.
> +#   It is VERY IMPORTANT that you download the whole set, some macros depend
> +#   on other. Unfortunately, the autoconf archive does not support the
> +#   concept of set of macros, so I had to break it for submission. The
> +#   general documentation, as well as the sample configure.in, is included
> +#   in the AX_PROG_JAVA macro.
> +#
> +# LICENSE
> +#
> +#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer at pasteur.fr>
> +#
> +#   This program is free software; you can redistribute it and/or modify it
> +#   under the terms of the GNU General Public License as published by the
> +#   Free Software Foundation; either version 2 of the License, or (at your
> +#   option) any later version.
> +#
> +#   This program is distributed in the hope that it will be useful, but
> +#   WITHOUT ANY WARRANTY; without even the implied warranty of
> +#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
> +#   Public License for more details.
> +#
> +#   You should have received a copy of the GNU General Public License along
> +#   with this program. If not, see <http://www.gnu.org/licenses/>.
> +#
> +#   As a special exception, the respective Autoconf Macro's copyright owner
> +#   gives unlimited permission to copy, distribute and modify the configure
> +#   scripts that are the output of Autoconf when processing the Macro. You
> +#   need not follow the terms of the GNU General Public License when using
> +#   or distributing such scripts, even though portions of the text of the
> +#   Macro appear in them. The GNU General Public License (GPL) does govern
> +#   all other use of the material that constitutes the Autoconf Macro.
> +#
> +#   This special exception to the GPL applies to versions of the Autoconf
> +#   Macro released by the Autoconf Archive. When you make and distribute a
> +#   modified version of the Autoconf Macro, you may extend this special
> +#   exception to the GPL to apply to your modified version as well.
> +
> +#serial 9
> +
> +AU_ALIAS([AC_PROG_JAVA_WORKS], [AX_PROG_JAVA_WORKS])
> +AC_DEFUN([AX_PROG_JAVA_WORKS], [
> +AC_PATH_PROG(UUDECODE, uudecode, [no])
> +if test x$UUDECODE != xno; then
> +AC_CACHE_CHECK([if uudecode can decode base 64 file],
> ac_cv_prog_uudecode_base64, [
> +dnl /**
> +dnl  * Test.java: used to test if java compiler works.
> +dnl  */
> +dnl public class Test
> +dnl {
> +dnl
> +dnl public static void
> +dnl main( String[] argv )
> +dnl {
> +dnl     System.exit (0);
> +dnl }
> +dnl
> +dnl }
> +cat << \EOF > Test.uue
> +begin-base64 644 Test.class
> +yv66vgADAC0AFQcAAgEABFRlc3QHAAQBABBqYXZhL2xhbmcvT2JqZWN0AQAE
> +bWFpbgEAFihbTGphdmEvbGFuZy9TdHJpbmc7KVYBAARDb2RlAQAPTGluZU51
> +bWJlclRhYmxlDAAKAAsBAARleGl0AQAEKEkpVgoADQAJBwAOAQAQamF2YS9s
> +YW5nL1N5c3RlbQEABjxpbml0PgEAAygpVgwADwAQCgADABEBAApTb3VyY2VG
> +aWxlAQAJVGVzdC5qYXZhACEAAQADAAAAAAACAAkABQAGAAEABwAAACEAAQAB
> +AAAABQO4AAyxAAAAAQAIAAAACgACAAAACgAEAAsAAQAPABAAAQAHAAAAIQAB
> +AAEAAAAFKrcAErEAAAABAAgAAAAKAAIAAAAEAAQABAABABMAAAACABQ=
> +====
> +EOF
> +if $UUDECODE Test.uue; then
> +        ac_cv_prog_uudecode_base64=yes
> +else
> +        echo "configure: __oline__: uudecode had trouble decoding base 64 file
> 'Test.uue'" >&AS_MESSAGE_LOG_FD
> +        echo "configure: failed file was:" >&AS_MESSAGE_LOG_FD
> +        cat Test.uue >&AS_MESSAGE_LOG_FD
> +        ac_cv_prog_uudecode_base64=no
> +fi
> +rm -f Test.uue])
> +fi
> +if test x$ac_cv_prog_uudecode_base64 != xyes; then
> +        rm -f Test.class
> +        AC_MSG_WARN([I have to compile Test.class from scratch])
> +        if test x$ac_cv_prog_javac_works = xno; then
> +                AC_MSG_ERROR([Cannot compile java source. $JAVAC does not work
> properly])
> +        fi
> +        if test x$ac_cv_prog_javac_works = x; then
> +                AX_PROG_JAVAC
> +        fi
> +fi
> +AC_CACHE_CHECK(if $JAVA works, ac_cv_prog_java_works, [
> +JAVA_TEST=Test.java
> +CLASS_TEST=Test.class
> +TEST=Test
> +changequote(, )dnl
> +cat << \EOF > $JAVA_TEST
> +/* [#]line __oline__ "configure" */
> +public class Test {
> +public static void main (String args[]) {
> +        System.exit (0);
> +} }
> +EOF
> +changequote([, ])dnl
> +if test x$ac_cv_prog_uudecode_base64 != xyes; then
> +        if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) && test -s
> $CLASS_TEST; then
> +                :
> +        else
> +          echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
> +          cat $JAVA_TEST >&AS_MESSAGE_LOG_FD
> +          AC_MSG_ERROR(The Java compiler $JAVAC failed (see config.log, check
> the CLASSPATH?))
> +        fi
> +fi
> +if AC_TRY_COMMAND($JAVA -classpath . $JAVAFLAGS $TEST) >/dev/null 2>&1; then
> +  ac_cv_prog_java_works=yes
> +else
> +  echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
> +  cat $JAVA_TEST >&AS_MESSAGE_LOG_FD
> +  AC_MSG_ERROR(The Java VM $JAVA failed (see config.log, check the CLASSPATH?))
> +fi
> +rm -fr $JAVA_TEST $CLASS_TEST Test.uue
> +])
> +AC_PROVIDE([$0])dnl
> +]
> +)
> diff --git a/m4/ax_prog_javac.m4 b/m4/ax_prog_javac.m4
> new file mode 100644
> index 0000000..d061243
> --- /dev/null
> +++ b/m4/ax_prog_javac.m4
> @@ -0,0 +1,79 @@
> +# ===========================================================================
> +#       http://www.gnu.org/software/autoconf-archive/ax_prog_javac.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   AX_PROG_JAVAC
> +#
> +# DESCRIPTION
> +#
> +#   AX_PROG_JAVAC tests an existing Java compiler. It uses the environment
> +#   variable JAVAC then tests in sequence various common Java compilers. For
> +#   political reasons, it starts with the free ones.
> +#
> +#   If you want to force a specific compiler:
> +#
> +#   - at the configure.in level, set JAVAC=yourcompiler before calling
> +#   AX_PROG_JAVAC
> +#
> +#   - at the configure level, setenv JAVAC
> +#
> +#   You can use the JAVAC variable in your Makefile.in, with @JAVAC at .
> +#
> +#   *Warning*: its success or failure can depend on a proper setting of the
> +#   CLASSPATH env. variable.
> +#
> +#   TODO: allow to exclude compilers (rationale: most Java programs cannot
> +#   compile with some compilers like guavac).
> +#
> +#   Note: This is part of the set of autoconf M4 macros for Java programs.
> +#   It is VERY IMPORTANT that you download the whole set, some macros depend
> +#   on other. Unfortunately, the autoconf archive does not support the
> +#   concept of set of macros, so I had to break it for submission. The
> +#   general documentation, as well as the sample configure.in, is included
> +#   in the AX_PROG_JAVA macro.
> +#
> +# LICENSE
> +#
> +#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer at pasteur.fr>
> +#
> +#   This program is free software; you can redistribute it and/or modify it
> +#   under the terms of the GNU General Public License as published by the
> +#   Free Software Foundation; either version 2 of the License, or (at your
> +#   option) any later version.
> +#
> +#   This program is distributed in the hope that it will be useful, but
> +#   WITHOUT ANY WARRANTY; without even the implied warranty of
> +#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
> +#   Public License for more details.
> +#
> +#   You should have received a copy of the GNU General Public License along
> +#   with this program. If not, see <http://www.gnu.org/licenses/>.
> +#
> +#   As a special exception, the respective Autoconf Macro's copyright owner
> +#   gives unlimited permission to copy, distribute and modify the configure
> +#   scripts that are the output of Autoconf when processing the Macro. You
> +#   need not follow the terms of the GNU General Public License when using
> +#   or distributing such scripts, even though portions of the text of the
> +#   Macro appear in them. The GNU General Public License (GPL) does govern
> +#   all other use of the material that constitutes the Autoconf Macro.
> +#
> +#   This special exception to the GPL applies to versions of the Autoconf
> +#   Macro released by the Autoconf Archive. When you make and distribute a
> +#   modified version of the Autoconf Macro, you may extend this special
> +#   exception to the GPL to apply to your modified version as well.
> +
> +#serial 7
> +
> +AU_ALIAS([AC_PROG_JAVAC], [AX_PROG_JAVAC])
> +AC_DEFUN([AX_PROG_JAVAC],[
> +m4_define([m4_ax_prog_javac_list],["gcj -C" guavac jikes javac])dnl
> +AS_IF([test "x$JAVAPREFIX" = x],
> +      [test "x$JAVAC" = x && AC_CHECK_PROGS([JAVAC], [m4_ax_prog_javac_list])],
> +      [test "x$JAVAC" = x && AC_CHECK_PROGS([JAVAC], [m4_ax_prog_javac_list],
> [], [$JAVAPREFIX/bin])])
> +m4_undefine([m4_ax_prog_javac_list])dnl
> +test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in
> \$PATH])
> +AX_PROG_JAVAC_WORKS
> +AC_PROVIDE([$0])dnl
> +])
> diff --git a/m4/ax_prog_javac_works.m4 b/m4/ax_prog_javac_works.m4
> new file mode 100644
> index 0000000..7dfa1e3
> --- /dev/null
> +++ b/m4/ax_prog_javac_works.m4
> @@ -0,0 +1,72 @@
> +# ===========================================================================
> +#    http://www.gnu.org/software/autoconf-archive/ax_prog_javac_works.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   AX_PROG_JAVAC_WORKS
> +#
> +# DESCRIPTION
> +#
> +#   Internal use ONLY.
> +#
> +#   Note: This is part of the set of autoconf M4 macros for Java programs.
> +#   It is VERY IMPORTANT that you download the whole set, some macros depend
> +#   on other. Unfortunately, the autoconf archive does not support the
> +#   concept of set of macros, so I had to break it for submission. The
> +#   general documentation, as well as the sample configure.in, is included
> +#   in the AX_PROG_JAVA macro.
> +#
> +# LICENSE
> +#
> +#   Copyright (c) 2008 Stephane Bortzmeyer <bortzmeyer at pasteur.fr>
> +#
> +#   This program is free software; you can redistribute it and/or modify it
> +#   under the terms of the GNU General Public License as published by the
> +#   Free Software Foundation; either version 2 of the License, or (at your
> +#   option) any later version.
> +#
> +#   This program is distributed in the hope that it will be useful, but
> +#   WITHOUT ANY WARRANTY; without even the implied warranty of
> +#   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
> +#   Public License for more details.
> +#
> +#   You should have received a copy of the GNU General Public License along
> +#   with this program. If not, see <http://www.gnu.org/licenses/>.
> +#
> +#   As a special exception, the respective Autoconf Macro's copyright owner
> +#   gives unlimited permission to copy, distribute and modify the configure
> +#   scripts that are the output of Autoconf when processing the Macro. You
> +#   need not follow the terms of the GNU General Public License when using
> +#   or distributing such scripts, even though portions of the text of the
> +#   Macro appear in them. The GNU General Public License (GPL) does govern
> +#   all other use of the material that constitutes the Autoconf Macro.
> +#
> +#   This special exception to the GPL applies to versions of the Autoconf
> +#   Macro released by the Autoconf Archive. When you make and distribute a
> +#   modified version of the Autoconf Macro, you may extend this special
> +#   exception to the GPL to apply to your modified version as well.
> +
> +#serial 6
> +
> +AU_ALIAS([AC_PROG_JAVAC_WORKS], [AX_PROG_JAVAC_WORKS])
> +AC_DEFUN([AX_PROG_JAVAC_WORKS],[
> +AC_CACHE_CHECK([if $JAVAC works], ac_cv_prog_javac_works, [
> +JAVA_TEST=Test.java
> +CLASS_TEST=Test.class
> +cat << \EOF > $JAVA_TEST
> +/* [#]line __oline__ "configure" */
> +public class Test {
> +}
> +EOF
> +if AC_TRY_COMMAND($JAVAC $JAVACFLAGS $JAVA_TEST) >/dev/null 2>&1; then
> +  ac_cv_prog_javac_works=yes
> +else
> +  AC_MSG_ERROR([The Java compiler $JAVAC failed (see config.log, check the
> CLASSPATH?)])
> +  echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
> +  cat $JAVA_TEST >&AS_MESSAGE_LOG_FD
> +fi
> +rm -f $JAVA_TEST $CLASS_TEST
> +])
> +AC_PROVIDE([$0])dnl
> +])
> diff --git a/m4/ax_prog_javah.m4 b/m4/ax_prog_javah.m4
> new file mode 100644
> index 0000000..2809f29
> --- /dev/null
> +++ b/m4/ax_prog_javah.m4
> @@ -0,0 +1,47 @@
> +# ===========================================================================
> +#       http://www.gnu.org/software/autoconf-archive/ax_prog_javah.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   AX_PROG_JAVAH
> +#
> +# DESCRIPTION
> +#
> +#   AX_PROG_JAVAH tests the availability of the javah header generator and
> +#   looks for the jni.h header file. If available, JAVAH is set to the full
> +#   path of javah and CPPFLAGS is updated accordingly.
> +#
> +# LICENSE
> +#
> +#   Copyright (c) 2008 Luc Maisonobe <luc at spaceroots.org>
> +#
> +#   Copying and distribution of this file, with or without modification, are
> +#   permitted in any medium without royalty provided the copyright notice
> +#   and this notice are preserved. This file is offered as-is, without any
> +#   warranty.
> +
> +#serial 7
> +
> +AU_ALIAS([AC_PROG_JAVAH], [AX_PROG_JAVAH])
> +AC_DEFUN([AX_PROG_JAVAH],[
> +AC_REQUIRE([AC_CANONICAL_BUILD])dnl
> +AC_REQUIRE([AC_PROG_CPP])dnl
> +AC_PATH_PROG(JAVAH,javah)
> +AS_IF([test -n "$ac_cv_path_JAVAH"],
> +      [
> +        AC_TRY_CPP([#include <jni.h>],,[
> +        ac_save_CPPFLAGS="$CPPFLAGS"
> +        ax_prog_javah_bin_dir=`AS_DIRNAME([$ac_cv_path_JAVAH])`
> +        ac_dir="`AS_DIRNAME([$ax_prog_javah_bin])`/include"
> +        AS_CASE([$build_os],
> +                [cygwin*],
> +                [ac_machdep=win32],
> +                [ac_machdep=`AS_ECHO($build_os) | sed 's,[[-0-9]].*,,'`])
> +        CPPFLAGS="$ac_save_CPPFLAGS -I$ac_dir -I$ac_dir/$ac_machdep"
> +        AC_TRY_CPP([#include <jni.h>],
> +                   ac_save_CPPFLAGS="$CPPFLAGS",
> +                   AC_MSG_WARN([unable to include <jni.h>]))
> +        CPPFLAGS="$ac_save_CPPFLAGS"])
> +      ])
> +])
> diff --git a/m4/ax_sys_weak_alias.m4 b/m4/ax_sys_weak_alias.m4
> new file mode 100644
> index 0000000..e1bfd33
> --- /dev/null
> +++ b/m4/ax_sys_weak_alias.m4
> @@ -0,0 +1,337 @@
> +# ===========================================================================
> +#     http://www.gnu.org/software/autoconf-archive/ax_sys_weak_alias.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   AX_SYS_WEAK_ALIAS
> +#
> +# DESCRIPTION
> +#
> +#   Determines whether weak aliases are supported on the system, and if so,
> +#   what scheme is used to declare them. Also checks to see if aliases can
> +#   cross object file boundaries, as some systems don't permit them to.
> +#
> +#   Most systems permit something called a "weak alias" or "weak symbol."
> +#   These aliases permit a library to provide a stub form of a routine
> +#   defined in another library, thus allowing the first library to operate
> +#   even if the other library is not linked. This macro will check for
> +#   support of weak aliases, figure out what schemes are available, and
> +#   determine some characteristics of the weak alias support -- primarily,
> +#   whether a weak alias declared in one object file may be referenced from
> +#   another object file.
> +#
> +#   There are four known schemes of declaring weak symbols; each scheme is
> +#   checked in turn, and the first one found is prefered. Note that only one
> +#   of the mentioned preprocessor macros will be defined!
> +#
> +#   1. Function attributes
> +#
> +#   This scheme was first introduced by the GNU C compiler, and attaches
> +#   attributes to particular functions. It is among the easiest to use, and
> +#   so is the first one checked. If this scheme is detected, the
> +#   preprocessor macro HAVE_SYS_WEAK_ALIAS_ATTRIBUTE will be defined to 1.
> +#   This scheme is used as in the following code fragment:
> +#
> +#     void __weakf(int c)
> +#     {
> +#       /* Function definition... */
> +#     }
> +#
> +#     void weakf(int c) __attribute__((weak, alias("__weakf")));
> +#
> +#   2. #pragma weak
> +#
> +#   This scheme is in use by many compilers other than the GNU C compiler.
> +#   It is also particularly easy to use, and fairly portable -- well, as
> +#   portable as these things get. If this scheme is detected first, the
> +#   preprocessor macro HAVE_SYS_WEAK_ALIAS_PRAGMA will be defined to 1. This
> +#   scheme is used as in the following code fragment:
> +#
> +#     extern void weakf(int c);
> +#     #pragma weak weakf = __weakf
> +#     void __weakf(int c)
> +#     {
> +#       /* Function definition... */
> +#     }
> +#
> +#   3. #pragma _HP_SECONDARY_DEF
> +#
> +#   This scheme appears to be in use by the HP compiler. As it is rather
> +#   specialized, this is one of the last schemes checked. If it is the first
> +#   one detected, the preprocessor macro HAVE_SYS_WEAK_ALIAS_HPSECONDARY
> +#   will be defined to 1. This scheme is used as in the following code
> +#   fragment:
> +#
> +#     extern void weakf(int c);
> +#     #pragma _HP_SECONDARY_DEF __weakf weakf
> +#     void __weakf(int c)
> +#     {
> +#       /* Function definition... */
> +#     }
> +#
> +#   4. #pragma _CRI duplicate
> +#
> +#   This scheme appears to be in use by the Cray compiler. As it is rather
> +#   specialized, it too is one of the last schemes checked. If it is the
> +#   first one detected, the preprocessor macro
> +#   HAVE_SYS_WEAK_ALIAS_CRIDUPLICATE will be defined to 1. This scheme is
> +#   used as in the following code fragment:
> +#
> +#     extern void weakf(int c);
> +#     #pragma _CRI duplicate weakf as __weakf
> +#     void __weakf(int c)
> +#     {
> +#       /* Function definition... */
> +#     }
> +#
> +#   In addition to the preprocessor macros listed above, if any scheme is
> +#   found, the preprocessor macro HAVE_SYS_WEAK_ALIAS will also be defined
> +#   to 1.
> +#
> +#   Once a weak aliasing scheme has been found, a check will be performed to
> +#   see if weak aliases are honored across object file boundaries. If they
> +#   are, the HAVE_SYS_WEAK_ALIAS_CROSSFILE preprocessor macro is defined to
> +#   1.
> +#
> +#   This Autoconf macro also makes two substitutions. The first, WEAK_ALIAS,
> +#   contains the name of the scheme found (one of "attribute", "pragma",
> +#   "hpsecondary", or "criduplicate"), or "no" if no weak aliasing scheme
> +#   was found. The second, WEAK_ALIAS_CROSSFILE, is set to "yes" or "no"
> +#   depending on whether or not weak aliases may cross object file
> +#   boundaries.
> +#
> +# LICENSE
> +#
> +#   Copyright (c) 2008 Kevin L. Mitchell <klmitch at mit.edu>
> +#
> +#   Copying and distribution of this file, with or without modification, are
> +#   permitted in any medium without royalty provided the copyright notice
> +#   and this notice are preserved. This file is offered as-is, without any
> +#   warranty.
> +
> +#serial 6
> +
> +AU_ALIAS([KLM_SYS_WEAK_ALIAS], [AX_SYS_WEAK_ALIAS])
> +AC_DEFUN([AX_SYS_WEAK_ALIAS], [
> +  # starting point: no aliasing scheme yet...
> +  ax_sys_weak_alias=no
> +
> +  # Figure out what kind of aliasing may be supported...
> +  _AX_SYS_WEAK_ALIAS_ATTRIBUTE
> +  _AX_SYS_WEAK_ALIAS_PRAGMA
> +  _AX_SYS_WEAK_ALIAS_HPSECONDARY
> +  _AX_SYS_WEAK_ALIAS_CRIDUPLICATE
> +
> +  # Do we actually support aliasing?
> +  AC_CACHE_CHECK([how to create weak aliases with $CC],
> +                 [ax_cv_sys_weak_alias],
> +                 [ax_cv_sys_weak_alias=$ax_sys_weak_alias])
> +
> +  # OK, set a #define
> +  AS_IF([test $ax_cv_sys_weak_alias != no], [
> +    AC_DEFINE([HAVE_SYS_WEAK_ALIAS], 1,
> +              [Define this if your system can create weak aliases])
> +  ])
> +
> +  # Can aliases cross object file boundaries?
> +  _AX_SYS_WEAK_ALIAS_CROSSFILE
> +
> +  # OK, remember the results
> +  AC_SUBST([WEAK_ALIAS], [$ax_cv_sys_weak_alias])
> +  AC_SUBST([WEAK_ALIAS_CROSSFILE], [$ax_cv_sys_weak_alias_crossfile])
> +])
> +
> +AC_DEFUN([_AX_SYS_WEAK_ALIAS_ATTRIBUTE],
> +[ # Test whether compiler accepts __attribute__ form of weak aliasing
> +  AC_CACHE_CHECK([whether $CC accepts function __attribute__((weak,alias()))],
> +  [ax_cv_sys_weak_alias_attribute], [
> +    # We add -Werror if it's gcc to force an error exit if the weak attribute
> +    # isn't understood
> +    AS_IF([test $GCC = yes], [
> +      save_CFLAGS=$CFLAGS
> +      CFLAGS=-Werror])
> +
> +    # Try linking with a weak alias...
> +    AC_LINK_IFELSE([
> +      AC_LANG_PROGRAM([
> +void __weakf(int c) {}
> +void weakf(int c) __attribute__((weak, alias("__weakf")));],
> +        [weakf(0)])],
> +      [ax_cv_sys_weak_alias_attribute=yes],
> +      [ax_cv_sys_weak_alias_attribute=no])
> +
> +    # Restore original CFLAGS
> +    AS_IF([test $GCC = yes], [
> +      CFLAGS=$save_CFLAGS])
> +  ])
> +
> +  # What was the result of the test?
> +  AS_IF([test $ax_sys_weak_alias = no &&
> +         test $ax_cv_sys_weak_alias_attribute = yes], [
> +    ax_sys_weak_alias=attribute
> +    AC_DEFINE([HAVE_SYS_WEAK_ALIAS_ATTRIBUTE], 1,
> +              [Define this if weak aliases may be created with __attribute__])
> +  ])
> +])
> +
> +AC_DEFUN([_AX_SYS_WEAK_ALIAS_PRAGMA],
> +[ # Test whether compiler accepts #pragma form of weak aliasing
> +  AC_CACHE_CHECK([whether $CC supports @%:@pragma weak],
> +  [ax_cv_sys_weak_alias_pragma], [
> +
> +    # Try linking with a weak alias...
> +    AC_LINK_IFELSE([
> +      AC_LANG_PROGRAM([
> +extern void weakf(int c);
> +@%:@pragma weak weakf = __weakf
> +void __weakf(int c) {}],
> +        [weakf(0)])],
> +      [ax_cv_sys_weak_alias_pragma=yes],
> +      [ax_cv_sys_weak_alias_pragma=no])
> +  ])
> +
> +  # What was the result of the test?
> +  AS_IF([test $ax_sys_weak_alias = no &&
> +         test $ax_cv_sys_weak_alias_pragma = yes], [
> +    ax_sys_weak_alias=pragma
> +    AC_DEFINE([HAVE_SYS_WEAK_ALIAS_PRAGMA], 1,
> +              [Define this if weak aliases may be created with @%:@pragma
> weak])
> +  ])
> +])
> +
> +AC_DEFUN([_AX_SYS_WEAK_ALIAS_HPSECONDARY],
> +[ # Test whether compiler accepts _HP_SECONDARY_DEF pragma from HP...
> +  AC_CACHE_CHECK([whether $CC supports @%:@pragma _HP_SECONDARY_DEF],
> +  [ax_cv_sys_weak_alias_hpsecondary], [
> +
> +    # Try linking with a weak alias...
> +    AC_LINK_IFELSE([
> +      AC_LANG_PROGRAM([
> +extern void weakf(int c);
> +@%:@pragma _HP_SECONDARY_DEF __weakf weakf
> +void __weakf(int c) {}],
> +        [weakf(0)])],
> +      [ax_cv_sys_weak_alias_hpsecondary=yes],
> +      [ax_cv_sys_weak_alias_hpsecondary=no])
> +  ])
> +
> +  # What was the result of the test?
> +  AS_IF([test $ax_sys_weak_alias = no &&
> +         test $ax_cv_sys_weak_alias_hpsecondary = yes], [
> +    ax_sys_weak_alias=hpsecondary
> +    AC_DEFINE([HAVE_SYS_WEAK_ALIAS_HPSECONDARY], 1,
> +              [Define this if weak aliases may be created with @%:@pragma
> _HP_SECONDARY_DEF])
> +  ])
> +])
> +
> +AC_DEFUN([_AX_SYS_WEAK_ALIAS_CRIDUPLICATE],
> +[ # Test whether compiler accepts "_CRI duplicate" pragma from Cray
> +  AC_CACHE_CHECK([whether $CC supports @%:@pragma _CRI duplicate],
> +  [ax_cv_sys_weak_alias_criduplicate], [
> +
> +    # Try linking with a weak alias...
> +    AC_LINK_IFELSE([
> +      AC_LANG_PROGRAM([
> +extern void weakf(int c);
> +@%:@pragma _CRI duplicate weakf as __weakf
> +void __weakf(int c) {}],
> +        [weakf(0)])],
> +      [ax_cv_sys_weak_alias_criduplicate=yes],
> +      [ax_cv_sys_weak_alias_criduplicate=no])
> +  ])
> +
> +  # What was the result of the test?
> +  AS_IF([test $ax_sys_weak_alias = no &&
> +         test $ax_cv_sys_weak_alias_criduplicate = yes], [
> +    ax_sys_weak_alias=criduplicate
> +    AC_DEFINE([HAVE_SYS_WEAK_ALIAS_CRIDUPLICATE], 1,
> +              [Define this if weak aliases may be created with @%:@pragma _CRI
> duplicate])
> +  ])
> +])
> +
> +dnl Note: This macro is modeled closely on AC_LINK_IFELSE, and in fact
> +dnl depends on some implementation details of that macro, particularly
> +dnl its use of _AC_MSG_LOG_CONFTEST to log the failed test program and
> +dnl its use of ac_link for running the linker.
> +AC_DEFUN([_AX_SYS_WEAK_ALIAS_CROSSFILE],
> +[ # Check to see if weak aliases can cross object file boundaries
> +  AC_CACHE_CHECK([whether $CC supports weak aliases across object file
> boundaries],
> +  [ax_cv_sys_weak_alias_crossfile], [
> +    AS_IF([test $ax_cv_sys_weak_alias = no],
> +          [ax_cv_sys_weak_alias_crossfile=no], [
> +dnl Must build our own test files...
> +      # conftest1 contains our weak alias definition...
> +      cat >conftest1.$ac_ext <<_ACEOF
> +/* confdefs.h.  */
> +_ACEOF
> +      cat confdefs.h >>conftest1.$ac_ext
> +      cat >>conftest1.$ac_ext <<_ACEOF
> +/* end confdefs.h.  */
> +
> +@%:@ifndef HAVE_SYS_WEAK_ALIAS_ATTRIBUTE
> +extern void weakf(int c);
> +@%:@endif
> +@%:@if defined(HAVE_SYS_WEAK_ALIAS_PRAGMA)
> +@%:@pragma weak weakf = __weakf
> +@%:@elif defined(HAVE_SYS_WEAK_ALIAS_HPSECONDARY)
> +@%:@pragma _HP_SECONDARY_DEF __weakf weakf
> +@%:@elif defined(HAVE_SYS_WEAK_ALIAS_CRIDUPLICATE)
> +@%:@pragma _CRI duplicate weakf as __weakf
> +@%:@endif
> +void __weakf(int c) {}
> +@%:@ifdef HAVE_SYS_WEAK_ALIAS_ATTRIBUTE
> +void weakf(int c) __attribute((weak, alias("__weakf")));
> +@%:@endif
> +_ACEOF
> +      # And conftest2 contains our main routine that calls it
> +      cat >conftest2.$ac_ext <<_ACEOF
> +/* confdefs.h.  */
> +_ACEOF
> +      cat confdefs.h >> conftest2.$ac_ext
> +      cat >>conftest2.$ac_ext <<_ACEOF
> +/* end confdefs.h.  */
> +
> +extern void weakf(int c);
> +int
> +main ()
> +{
> +  weakf(0);
> +  return 0;
> +}
> +_ACEOF
> +      # We must remove the object files (if any) ourselves...
> +      rm -f conftest2.$ac_objext conftest$ac_exeext
> +
> +      # Change ac_link to compile *2* files together
> +      save_aclink=$ac_link
> +      ac_link=`echo "$ac_link" | \
> +               sed -e 's/conftest\(\.\$ac_ext\)/conftest1\1 conftest2\1/'`
> +dnl Substitute our own routine for logging the conftest
> +m4_pushdef([_AC_MSG_LOG_CONFTEST],
> +[echo "$as_me: failed program was:" >&AS_MESSAGE_LOG_FD
> +echo ">>> conftest1.$ac_ext" >&AS_MESSAGE_LOG_FD
> +sed "s/^/| /" conftest1.$ac_ext >&AS_MESSAGE_LOG_FD
> +echo ">>> conftest2.$ac_ext" >&AS_MESSAGE_LOG_FD
> +sed "s/^/| /" conftest2.$ac_ext >&AS_MESSAGE_LOG_FD
> +])dnl
> +      # Since we created the files ourselves, don't use SOURCE argument
> +      AC_LINK_IFELSE(, [ax_cv_sys_weak_alias_crossfile=yes],
> +                     [ax_cv_sys_weak_alias_crossfile=no])
> +dnl Restore _AC_MSG_LOG_CONFTEST
> +m4_popdef([_AC_MSG_LOG_CONFTEST])dnl
> +      # Restore ac_link
> +      ac_link=$save_aclink
> +
> +      # We must remove the object files (if any) and C files ourselves...
> +      rm -f conftest1.$ac_ext conftest2.$ac_ext \
> +            conftest1.$ac_objext conftest2.$ac_objext
> +    ])
> +  ])
> +
> +  # What were the results of the test?
> +  AS_IF([test $ax_cv_sys_weak_alias_crossfile = yes], [
> +    AC_DEFINE([HAVE_SYS_WEAK_ALIAS_CROSSFILE], 1,
> +              [Define this if weak aliases in other files are honored])
> +  ])
> +])
> diff --git a/m4/ax_try_compile_java.m4 b/m4/ax_try_compile_java.m4
> new file mode 100644
> index 0000000..a8ed6b2
> --- /dev/null
> +++ b/m4/ax_try_compile_java.m4
> @@ -0,0 +1,55 @@
> +# ===========================================================================
> +#    http://www.gnu.org/software/autoconf-archive/ax_try_compile_java.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   AX_TRY_COMPILE_JAVA
> +#
> +# DESCRIPTION
> +#
> +#   AX_TRY_COMPILE_JAVA attempt to compile user given source.
> +#
> +#   *Warning*: its success or failure can depend on a proper setting of the
> +#   CLASSPATH env. variable.
> +#
> +#   Note: This is part of the set of autoconf M4 macros for Java programs.
> +#   It is VERY IMPORTANT that you download the whole set, some macros depend
> +#   on other. Unfortunately, the autoconf archive does not support the
> +#   concept of set of macros, so I had to break it for submission. The
> +#   general documentation, as well as the sample configure.in, is included
> +#   in the AX_PROG_JAVA macro.
> +#
> +# LICENSE
> +#
> +#   Copyright (c) 2008 Devin Weaver <ktohg at tritarget.com>
> +#
> +#   Copying and distribution of this file, with or without modification, are
> +#   permitted in any medium without royalty provided the copyright notice
> +#   and this notice are preserved. This file is offered as-is, without any
> +#   warranty.
> +
> +#serial 8
> +
> +AU_ALIAS([AC_TRY_COMPILE_JAVA], [AX_TRY_COMPILE_JAVA])
> +AC_DEFUN([AX_TRY_COMPILE_JAVA],[
> +AC_REQUIRE([AX_PROG_JAVAC])dnl
> +cat << \EOF > Test.java
> +/* [#]line __oline__ "configure" */
> +ifelse([$1], , , [import $1;])
> +public class Test {
> +[$2]
> +}
> +EOF
> +if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class
> +then
> +dnl Don't remove the temporary files here, so they can be examined.
> +  ifelse([$3], , :, [$3])
> +else
> +  echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
> +  cat Test.java >&AS_MESSAGE_LOG_FD
> +ifelse([$4], , , [  rm -fr Test.java Test.class
> +  $4
> +])dnl
> +fi
> +rm -fr Test.java Test.class])
> diff --git a/m4/ax_try_run_java.m4 b/m4/ax_try_run_java.m4
> new file mode 100644
> index 0000000..c680f03
> --- /dev/null
> +++ b/m4/ax_try_run_java.m4
> @@ -0,0 +1,56 @@
> +# ===========================================================================
> +#      http://www.gnu.org/software/autoconf-archive/ax_try_run_java.html
> +# ===========================================================================
> +#
> +# SYNOPSIS
> +#
> +#   AX_TRY_RUN_JAVA
> +#
> +# DESCRIPTION
> +#
> +#   AX_TRY_RUN_JAVA attempt to compile and run user given source.
> +#
> +#   *Warning*: its success or failure can depend on a proper setting of the
> +#   CLASSPATH env. variable.
> +#
> +#   Note: This is part of the set of autoconf M4 macros for Java programs.
> +#   It is VERY IMPORTANT that you download the whole set, some macros depend
> +#   on other. Unfortunately, the autoconf archive does not support the
> +#   concept of set of macros, so I had to break it for submission. The
> +#   general documentation, as well as the sample configure.in, is included
> +#   in the AX_PROG_JAVA macro.
> +#
> +# LICENSE
> +#
> +#   Copyright (c) 2008 Devin Weaver <ktohg at tritarget.com>
> +#
> +#   Copying and distribution of this file, with or without modification, are
> +#   permitted in any medium without royalty provided the copyright notice
> +#   and this notice are preserved. This file is offered as-is, without any
> +#   warranty.
> +
> +#serial 2
> +
> +AU_ALIAS([AC_TRY_RUN_JAVA], [AX_TRY_RUN_JAVA])
> +AC_DEFUN([AX_TRY_RUN_JAVA],[
> +AC_REQUIRE([AX_PROG_JAVAC])dnl
> +AC_REQUIRE([AX_PROG_JAVA])dnl
> +cat << \EOF > Test.java
> +/* [#]line __oline__ "configure" */
> +ifelse([$1], , , [include $1;])
> +public class Test {
> +[$2]
> +}
> +EOF
> +if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class && ($JAVA
> $JAVAFLAGS Test; exit) 2>/dev/null
> +then
> +dnl Don't remove the temporary files here, so they can be examined.
> +  ifelse([$3], , :, [$3])
> +else
> +  echo "configure: failed program was:" >&AS_MESSAGE_LOG_FD
> +  cat Test.java >&AS_MESSAGE_LOG_FD
> +ifelse([$4], , , [  rm -fr Test.java Test.class
> +  $4
> +])dnl
> +fi
> +rm -fr Test.java Test.class])
> --
> 2.7.4

-- 
Mathieu Desnoyers
EfficiOS Inc.
http://www.efficios.com


More information about the lttng-dev mailing list