/[classpath]/inetlib/aclocal.m4
ViewVC logotype

Diff of /inetlib/aclocal.m4

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14 by dog, Fri Nov 12 19:55:36 2004 UTC revision 1.15 by dog, Wed Jan 19 19:16:57 2005 UTC
# Line 1  Line 1 
1  # aclocal.m4 generated automatically by aclocal 1.6.3 -*- Autoconf -*-  # generated automatically by aclocal 1.9.3 -*- Autoconf -*-
2    
3  # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002  # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
4  # Free Software Foundation, Inc.  # Free Software Foundation, Inc.
5  # This file is free software; the Free Software Foundation  # This file is free software; the Free Software Foundation
6  # gives unlimited permission to copy and/or distribute it,  # gives unlimited permission to copy and/or distribute it,
# Line 11  Line 11 
11  # even the implied warranty of MERCHANTABILITY or FITNESS FOR A  # even the implied warranty of MERCHANTABILITY or FITNESS FOR A
12  # PARTICULAR PURPOSE.  # PARTICULAR PURPOSE.
13    
14  dnl  #                                                        -*- Autoconf -*-
15  dnl @synopsis AC_CHECK_CLASS  # Copyright (C) 2002, 2003  Free Software Foundation, Inc.
16  dnl  # Generated from amversion.in; do not edit by hand.
 dnl AC_CHECK_CLASS tests the existence of a given Java class, either in  
 dnl a jar or in a '.class' file.  
 dnl  
 dnl *Warning*: its success or failure can depend on a proper setting of the  
 dnl CLASSPATH env. variable.  
 dnl  
 dnl Note: This is part of the set of autoconf M4 macros for Java programs.  
 dnl It is VERY IMPORTANT that you download the whole set, some  
 dnl macros depend on other. Unfortunately, the autoconf archive does not  
 dnl support the concept of set of macros, so I had to break it for  
 dnl submission.  
 dnl The general documentation, as well as the sample configure.in, is  
 dnl included in the AC_PROG_JAVA macro.  
 dnl  
 dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>  
 dnl @version $Id$  
 dnl  
 AC_DEFUN(AC_CHECK_CLASS,[  
 AC_REQUIRE([AC_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 class $1])  
 AC_CACHE_VAL(ac_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$EXEEXT Test.uue; then  
                         :  
                 else  
                         echo "configure: __oline__: uudecode had trouble decoding base 64 file 'Test.uue'" >&AC_FD_CC  
                         echo "configure: failed file was:" >&AC_FD_CC  
                         cat Test.uue >&AC_FD_CC  
                         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  
         AC_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)  
 ])  
 dnl @synopsis AC_CHECK_CLASSPATH  
 dnl  
 dnl AC_CHECK_CLASSPATH just displays the CLASSPATH, for the edification  
 dnl of the user.  
 dnl  
 dnl Note: This is part of the set of autoconf M4 macros for Java programs.  
 dnl It is VERY IMPORTANT that you download the whole set, some  
 dnl macros depend on other. Unfortunately, the autoconf archive does not  
 dnl support the concept of set of macros, so I had to break it for  
 dnl submission.  
 dnl The general documentation, as well as the sample configure.in, is  
 dnl included in the AC_PROG_JAVA macro.  
 dnl  
 dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>  
 dnl @version $Id$  
 dnl  
 AC_DEFUN(AC_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  
 ])  
17    
18    # This program is free software; you can redistribute it and/or modify
19    # it under the terms of the GNU General Public License as published by
20    # the Free Software Foundation; either version 2, or (at your option)
21    # any later version.
22    
23    # This program is distributed in the hope that it will be useful,
24    # but WITHOUT ANY WARRANTY; without even the implied warranty of
25    # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
26    # GNU General Public License for more details.
27    
28  dnl @synopsis AC_CHECK_JUNIT  # You should have received a copy of the GNU General Public License
29  dnl  # along with this program; if not, write to the Free Software
30  dnl AC_CHECK_JUNIT tests the availability of the Junit testing  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 dnl framework, and set some variables for conditional compilation  
 dnl of the test suite by automake.  
 dnl  
 dnl If available, JUNIT is set to a command launching the text  
 dnl based user interface of Junit, @JAVA_JUNIT@ is set to $JAVA_JUNIT  
 dnl and @TESTS_JUNIT@ is set to $TESTS_JUNIT, otherwise they are set  
 dnl to empty values.  
 dnl  
 dnl You can use these variables in your Makefile.am file like this :  
 dnl  
 dnl  # Some of the following classes are built only if junit is available  
 dnl  JAVA_JUNIT  = Class1Test.java Class2Test.java AllJunitTests.java  
 dnl  
 dnl  noinst_JAVA = Example1.java Example2.java @JAVA_JUNIT@  
 dnl  
 dnl  EXTRA_JAVA  = $(JAVA_JUNIT)  
 dnl  
 dnl  TESTS_JUNIT = AllJunitTests  
 dnl  
 dnl  TESTS       = StandaloneTest1 StandaloneTest2 @TESTS_JUNIT@  
 dnl  
 dnl  EXTRA_TESTS = $(TESTS_JUNIT)  
 dnl  
 dnl  AllJunitTests :  
 dnl     echo "#! /bin/sh" > $@  
 dnl     echo "exec @JUNIT@ my.package.name.AllJunitTests" >> $@  
 dnl     chmod +x $@  
 dnl  
 dnl @author Luc Maisonobe  
 dnl @version $Id$  
 dnl  
 AC_DEFUN([AC_CHECK_JUNIT],[  
 AC_CACHE_VAL(ac_cv_prog_JUNIT,[  
 AC_CHECK_CLASS(junit.textui.TestRunner)  
 if test x"`eval 'echo $ac_cv_class_junit_textui_TestRunner'`" != xno ; then  
   ac_cv_prog_JUNIT='$(CLASSPATH_ENV) $(JAVA) $(JAVAFLAGS) junit.textui.TestRunner'  
 fi])  
 AC_MSG_CHECKING([for junit])  
 if test x"`eval 'echo $ac_cv_prog_JUNIT'`" != x ; then  
   JUNIT="$ac_cv_prog_JUNIT"  
   JAVA_JUNIT='$(JAVA_JUNIT)'  
   TESTS_JUNIT='$(TESTS_JUNIT)'  
 else  
   JUNIT=  
   JAVA_JUNIT=  
   TESTS_JUNIT=  
 fi  
 AC_MSG_RESULT($JAVA_JUNIT)  
 AC_SUBST(JUNIT)  
 AC_SUBST(JAVA_JUNIT)  
 AC_SUBST(TESTS_JUNIT)])  
 dnl @synopsis AC_CHECK_RQRD_CLASS  
 dnl  
 dnl AC_CHECK_RQRD_CLASS tests the existence of a given Java class, either in  
 dnl a jar or in a '.class' file and fails if it doesn't exist.  
 dnl Its success or failure can depend on a proper setting of the  
 dnl CLASSPATH env. variable.  
 dnl  
 dnl Note: This is part of the set of autoconf M4 macros for Java programs.  
 dnl It is VERY IMPORTANT that you download the whole set, some  
 dnl macros depend on other. Unfortunately, the autoconf archive does not  
 dnl support the concept of set of macros, so I had to break it for  
 dnl submission.  
 dnl The general documentation, as well as the sample configure.in, is  
 dnl included in the AC_PROG_JAVA macro.  
 dnl  
 dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>  
 dnl @version $Id$  
 dnl  
   
 AC_DEFUN(AC_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  
 ])  
 dnl @synopsis AC_JAVA_OPTIONS  
 dnl  
 dnl AC_JAVA_OPTIONS adds configure command line options used for Java m4  
 dnl macros. This Macro is optional.  
 dnl  
 dnl Note: This is part of the set of autoconf M4 macros for Java programs.  
 dnl It is VERY IMPORTANT that you download the whole set, some  
 dnl macros depend on other. Unfortunately, the autoconf archive does not  
 dnl support the concept of set of macros, so I had to break it for  
 dnl submission.  
 dnl The general documentation, as well as the sample configure.in, is  
 dnl included in the AC_PROG_JAVA macro.  
 dnl  
 dnl @author Devin Weaver <ktohg@tritarget.com>  
 dnl @version $Id$  
 dnl  
 AC_DEFUN(AC_JAVA_OPTIONS,[  
 AC_ARG_WITH(java-prefix,  
                         [  --with-java-prefix=PREFIX  prefix where Java runtime is installed (optional)],  
                         JAVAPREFIX="$withval")  
 AC_ARG_WITH(javac-flags,  
                         [  --with-javac-flags=FLAGS flags to pass to the Java compiler (optional)],  
                         JAVACFLAGS="$withval")  
 AC_ARG_WITH(java-flags,  
                         [  --with-java-flags=FLAGS flags to pass to the Java VM (optional)],  
                         JAVAFLAGS="$withval")  
 AC_ARG_WITH(javac,  
                         [  --with-javac=Java compiler to use (optional)],  
                         JAVAC="$withval")  
 AC_SUBST(JAVAPREFIX)dnl  
 AC_SUBST(JAVACFLAGS)dnl  
 AC_SUBST(JAVAFLAGS)dnl  
 AC_SUBST(JAVA)dnl  
 AC_SUBST(JAVAC)dnl  
 ])  
 dnl @synopsis AC_PROG_JAR  
 dnl  
 dnl AC_PROG_JAR tests for an existing jar program. It uses the environment  
 dnl variable JAR then tests in sequence various common jar programs.  
 dnl  
 dnl If you want to force a specific compiler:  
 dnl  
 dnl - at the configure.in level, set JAR=yourcompiler before calling  
 dnl AC_PROG_JAR  
 dnl  
 dnl - at the configure level, setenv JAR  
 dnl  
 dnl You can use the JAR variable in your Makefile.in, with @JAR@.  
 dnl  
 dnl Note: This macro depends on the autoconf M4 macros for Java programs.  
 dnl It is VERY IMPORTANT that you download that whole set, some  
 dnl macros depend on other. Unfortunately, the autoconf archive does not  
 dnl support the concept of set of macros, so I had to break it for  
 dnl submission.  
 dnl  
 dnl The general documentation of those macros, as well as the sample  
 dnl configure.in, is included in the AC_PROG_JAVA macro.  
 dnl  
 dnl @author Egon Willighagen <egonw@sci.kun.nl>  
 dnl @version $Id$  
 dnl  
 AC_DEFUN([AC_PROG_JAR],[  
 AC_REQUIRE([AC_EXEEXT])dnl  
 if test "x$JAVAPREFIX" = x; then  
         test "x$JAR" = x && AC_CHECK_PROGS(JAR, jar$EXEEXT)  
 else  
         test "x$JAR" = x && AC_CHECK_PROGS(JAR, jar, $JAVAPREFIX)  
 fi  
 test "x$JAR" = x && AC_MSG_ERROR([no acceptable jar program found in \$PATH])  
 AC_PROVIDE([$0])dnl  
 ])  
 dnl @synopsis AC_PROG_JAVA  
 dnl  
 dnl Here is a summary of the main macros:  
 dnl  
 dnl AC_PROG_JAVAC: finds a Java compiler.  
 dnl  
 dnl AC_PROG_JAVA: finds a Java virtual machine.  
 dnl  
 dnl AC_CHECK_CLASS: finds if we have the given class (beware of CLASSPATH!).  
 dnl  
 dnl AC_CHECK_RQRD_CLASS: finds if we have the given class and stops otherwise.  
 dnl  
 dnl AC_TRY_COMPILE_JAVA: attempt to compile user given source.  
 dnl  
 dnl AC_TRY_RUN_JAVA: attempt to compile and run user given source.  
 dnl  
 dnl AC_JAVA_OPTIONS: adds Java configure options.  
 dnl  
 dnl AC_PROG_JAVA tests an existing Java virtual machine. It uses the  
 dnl environment variable JAVA then tests in sequence various common Java  
 dnl virtual machines. For political reasons, it starts with the free ones.  
 dnl You *must* call [AC_PROG_JAVAC] before.  
 dnl  
 dnl If you want to force a specific VM:  
 dnl  
 dnl - at the configure.in level, set JAVA=yourvm before calling AC_PROG_JAVA  
 dnl   (but after AC_INIT)  
 dnl  
 dnl - at the configure level, setenv JAVA  
 dnl  
 dnl You can use the JAVA variable in your Makefile.in, with @JAVA@.  
 dnl  
 dnl *Warning*: its success or failure can depend on a proper setting of the  
 dnl CLASSPATH env. variable.  
 dnl  
 dnl TODO: allow to exclude virtual machines (rationale: most Java programs  
 dnl cannot run with some VM like kaffe).  
 dnl  
 dnl Note: This is part of the set of autoconf M4 macros for Java programs.  
 dnl It is VERY IMPORTANT that you download the whole set, some  
 dnl macros depend on other. Unfortunately, the autoconf archive does not  
 dnl support the concept of set of macros, so I had to break it for  
 dnl submission.  
 dnl  
 dnl A Web page, with a link to the latest CVS snapshot is at  
 dnl <http://www.internatif.org/bortzmeyer/autoconf-Java/>.  
 dnl  
 dnl This is a sample configure.in  
 dnl Process this file with autoconf to produce a configure script.  
 dnl  
 dnl    AC_INIT(UnTag.java)  
 dnl  
 dnl    dnl Checks for programs.  
 dnl    AC_CHECK_CLASSPATH  
 dnl    AC_PROG_JAVAC  
 dnl    AC_PROG_JAVA  
 dnl  
 dnl    dnl Checks for classes  
 dnl    AC_CHECK_RQRD_CLASS(org.xml.sax.Parser)  
 dnl    AC_CHECK_RQRD_CLASS(com.jclark.xml.sax.Driver)  
 dnl  
 dnl    AC_OUTPUT(Makefile)  
 dnl  
 dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>  
 dnl @version $Id$  
 dnl  
 AC_DEFUN(AC_PROG_JAVA,[  
 AC_REQUIRE([AC_EXEEXT])dnl  
 if test x$JAVAPREFIX = x; then  
         test x$JAVA = x && AC_CHECK_PROGS(JAVA, java$EXEEXT kaffe$EXEEXT)  
 else  
         test x$JAVA = x && AC_CHECK_PROGS(JAVA, java$EXEEXT kaffe$EXEEXT, $JAVAPREFIX)  
 fi  
 test x$JAVA = x && AC_MSG_ERROR([no acceptable Java virtual machine found in \$PATH])  
 AC_PROG_JAVA_WORKS  
 AC_PROVIDE([$0])dnl  
 ])  
 dnl @synopsis AC_PROG_JAVA_WORKS  
 dnl  
 dnl Internal use ONLY.  
 dnl  
 dnl Note: This is part of the set of autoconf M4 macros for Java programs.  
 dnl It is VERY IMPORTANT that you download the whole set, some  
 dnl macros depend on other. Unfortunately, the autoconf archive does not  
 dnl support the concept of set of macros, so I had to break it for  
 dnl submission.  
 dnl The general documentation, as well as the sample configure.in, is  
 dnl included in the AC_PROG_JAVA macro.  
 dnl  
 dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>  
 dnl @version $Id$  
 dnl  
 AC_DEFUN(AC_PROG_JAVA_WORKS, [  
 AC_CHECK_PROG(uudecode, uudecode$EXEEXT, yes)  
 if test x$uudecode = xyes; 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$EXEEXT Test.uue; then  
         ac_cv_prog_uudecode_base64=yes  
 else  
         echo "configure: __oline__: uudecode had trouble decoding base 64 file 'Test.uue'" >&AC_FD_CC  
         echo "configure: failed file was:" >&AC_FD_CC  
         cat Test.uue >&AC_FD_CC  
         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  
                 AC_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:" >&AC_FD_CC  
           cat $JAVA_TEST >&AC_FD_CC  
           AC_MSG_ERROR(The Java compiler $JAVAC failed (see config.log, check the CLASSPATH?))  
         fi  
 fi  
 if AC_TRY_COMMAND($JAVA $JAVAFLAGS -classpath ".:$CLASSPATH" $TEST) >/dev/null 2>&1; then  
   ac_cv_prog_java_works=yes  
 else  
   echo "configure: failed program was:" >&AC_FD_CC  
   cat $JAVA_TEST >&AC_FD_CC  
   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  
 ]  
 )  
 dnl @synopsis AC_PROG_JAVAC  
 dnl  
 dnl AC_PROG_JAVAC tests an existing Java compiler. It uses the environment  
 dnl variable JAVAC then tests in sequence various common Java compilers. For  
 dnl political reasons, it starts with the free ones.  
 dnl  
 dnl If you want to force a specific compiler:  
 dnl  
 dnl - at the configure.in level, set JAVAC=yourcompiler before calling  
 dnl AC_PROG_JAVAC  
 dnl  
 dnl - at the configure level, setenv JAVAC  
 dnl  
 dnl You can use the JAVAC variable in your Makefile.in, with @JAVAC@.  
 dnl  
 dnl *Warning*: its success or failure can depend on a proper setting of the  
 dnl CLASSPATH env. variable.  
 dnl  
 dnl TODO: allow to exclude compilers (rationale: most Java programs cannot compile  
 dnl with some compilers like guavac).  
 dnl  
 dnl Note: This is part of the set of autoconf M4 macros for Java programs.  
 dnl It is VERY IMPORTANT that you download the whole set, some  
 dnl macros depend on other. Unfortunately, the autoconf archive does not  
 dnl support the concept of set of macros, so I had to break it for  
 dnl submission.  
 dnl The general documentation, as well as the sample configure.in, is  
 dnl included in the AC_PROG_JAVA macro.  
 dnl  
 dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>  
 dnl @version $Id$  
 dnl  
 AC_DEFUN(AC_PROG_JAVAC,[  
 AC_REQUIRE([AC_EXEEXT])dnl  
 if test "x$JAVAPREFIX" = x; then  
         test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT)  
 else  
         test "x$JAVAC" = x && AC_CHECK_PROGS(JAVAC, "gcj$EXEEXT -C" guavac$EXEEXT jikes$EXEEXT javac$EXEEXT, $JAVAPREFIX)  
 fi  
 test "x$JAVAC" = x && AC_MSG_ERROR([no acceptable Java compiler found in \$PATH])  
 AC_PROG_JAVAC_WORKS  
 AC_PROVIDE([$0])dnl  
 ])  
 dnl @synopsis AC_PROG_JAVAC_WORKS  
 dnl  
 dnl Internal use ONLY.  
 dnl  
 dnl Note: This is part of the set of autoconf M4 macros for Java programs.  
 dnl It is VERY IMPORTANT that you download the whole set, some  
 dnl macros depend on other. Unfortunately, the autoconf archive does not  
 dnl support the concept of set of macros, so I had to break it for  
 dnl submission.  
 dnl The general documentation, as well as the sample configure.in, is  
 dnl included in the AC_PROG_JAVA macro.  
 dnl  
 dnl @author Stephane Bortzmeyer <bortzmeyer@pasteur.fr>  
 dnl @version $Id$  
 dnl  
 AC_DEFUN(AC_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:" >&AC_FD_CC  
   cat $JAVA_TEST >&AC_FD_CC  
 fi  
 rm -f $JAVA_TEST $CLASS_TEST  
 ])  
 AC_PROVIDE([$0])dnl  
 ])  
 dnl @synopsis AC_PROG_JAVADOC  
 dnl  
 dnl AC_PROG_JAVADOC tests for an existing javadoc generator. It uses the environment  
 dnl variable JAVADOC then tests in sequence various common javadoc generator.  
 dnl  
 dnl If you want to force a specific compiler:  
 dnl  
 dnl - at the configure.in level, set JAVADOC=yourgenerator before calling  
 dnl AC_PROG_JAVADOC  
 dnl  
 dnl - at the configure level, setenv JAVADOC  
 dnl  
 dnl You can use the JAVADOC variable in your Makefile.in, with @JAVADOC@.  
 dnl  
 dnl Note: This macro depends on the autoconf M4 macros for Java programs.  
 dnl It is VERY IMPORTANT that you download that whole set, some  
 dnl macros depend on other. Unfortunately, the autoconf archive does not  
 dnl support the concept of set of macros, so I had to break it for  
 dnl submission.  
 dnl  
 dnl The general documentation of those macros, as well as the sample  
 dnl configure.in, is included in the AC_PROG_JAVA macro.  
 dnl  
 dnl @author Egon Willighagen <egonw@sci.kun.nl>  
 dnl @version $Id$  
 dnl  
 AC_DEFUN([AC_PROG_JAVADOC],[  
 AC_REQUIRE([AC_EXEEXT])dnl  
 if test "x$JAVAPREFIX" = x; then  
         test "x$JAVADOC" = x && AC_CHECK_PROGS(JAVADOC, javadoc$EXEEXT)  
 else  
         test "x$JAVADOC" = x && AC_CHECK_PROGS(JAVADOC, javadoc, $JAVAPREFIX)  
 fi  
 test "x$JAVADOC" = x && AC_MSG_ERROR([no acceptable javadoc generator found in \$PATH])  
 AC_PROVIDE([$0])dnl  
 ])  
31    
32  dnl @synopsis AC_PROG_JAVAH  # AM_AUTOMAKE_VERSION(VERSION)
33  dnl  # ----------------------------
34  dnl AC_PROG_JAVAH tests the availability of the javah header generator  # Automake X.Y traces this macro to ensure aclocal.m4 has been
35  dnl and looks for the jni.h header file. If available, JAVAH is set to  # generated from the m4 files accompanying Automake X.Y.
36  dnl the full path of javah and CPPFLAGS is updated accordingly.  AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.9"])
37  dnl  
38  dnl @author Luc Maisonobe  # AM_SET_CURRENT_AUTOMAKE_VERSION
39  dnl @version $Id$  # -------------------------------
40  dnl  # Call AM_AUTOMAKE_VERSION so it can be traced.
41  AC_DEFUN([AC_PROG_JAVAH],[  # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
42  AC_REQUIRE([AC_CANONICAL_SYSTEM])dnl  AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
43  AC_REQUIRE([AC_PROG_CPP])dnl           [AM_AUTOMAKE_VERSION([1.9.3])])
44  AC_PATH_PROG(JAVAH,javah)  
45  if test x"`eval 'echo $ac_cv_path_JAVAH'`" != x ; then  # AM_AUX_DIR_EXPAND
46    AC_TRY_CPP([#include <jni.h>],,[  
47      ac_save_CPPFLAGS="$CPPFLAGS"  # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
48  changequote(, )dnl  
49      ac_dir=`echo $ac_cv_path_JAVAH | sed 's,\(.*\)/[^/]*/[^/]*$,\1/include,'`  # This program is free software; you can redistribute it and/or modify
50      ac_machdep=`echo $build_os | sed 's,[-0-9].*,,'`  # it under the terms of the GNU General Public License as published by
51  changequote([, ])dnl  # the Free Software Foundation; either version 2, or (at your option)
52      CPPFLAGS="$ac_save_CPPFLAGS -I$ac_dir -I$ac_dir/$ac_machdep"  # any later version.
53      AC_TRY_CPP([#include <jni.h>],  
54                 ac_save_CPPFLAGS="$CPPFLAGS",  # This program is distributed in the hope that it will be useful,
55                 AC_MSG_WARN([unable to include <jni.h>]))  # but WITHOUT ANY WARRANTY; without even the implied warranty of
56      CPPFLAGS="$ac_save_CPPFLAGS"])  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
57  fi])  # GNU General Public License for more details.
58  dnl @synopsis AC_TRY_COMPILE_JAVA  
59  dnl  # You should have received a copy of the GNU General Public License
60  dnl AC_TRY_COMPILE_JAVA attempt to compile user given source.  # along with this program; if not, write to the Free Software
61  dnl  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
62  dnl *Warning*: its success or failure can depend on a proper setting of the  # 02111-1307, USA.
63  dnl CLASSPATH env. variable.  
64  dnl  # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
65  dnl Note: This is part of the set of autoconf M4 macros for Java programs.  # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
66  dnl It is VERY IMPORTANT that you download the whole set, some  # `$srcdir', `$srcdir/..', or `$srcdir/../..'.
67  dnl macros depend on other. Unfortunately, the autoconf archive does not  #
68  dnl support the concept of set of macros, so I had to break it for  # Of course, Automake must honor this variable whenever it calls a
69  dnl submission.  # tool from the auxiliary directory.  The problem is that $srcdir (and
70  dnl The general documentation, as well as the sample configure.in, is  # therefore $ac_aux_dir as well) can be either absolute or relative,
71  dnl included in the AC_PROG_JAVA macro.  # depending on how configure is run.  This is pretty annoying, since
72  dnl  # it makes $ac_aux_dir quite unusable in subdirectories: in the top
73  dnl @author Devin Weaver <ktohg@tritarget.com>  # source directory, any form will work fine, but in subdirectories a
74  dnl @version $Id$  # relative path needs to be adjusted first.
75  dnl  #
76  AC_DEFUN(AC_TRY_COMPILE_JAVA,[  # $ac_aux_dir/missing
77  AC_REQUIRE([AC_PROG_JAVAC])dnl  #    fails when called from a subdirectory if $ac_aux_dir is relative
78  cat << \EOF > Test.java  # $top_srcdir/$ac_aux_dir/missing
79  /* [#]line __oline__ "configure" */  #    fails if $ac_aux_dir is absolute,
80  ifelse([$1], , , [import $1;])  #    fails when called from a subdirectory in a VPATH build with
81  public class Test {  #          a relative $ac_aux_dir
82  [$2]  #
83  }  # The reason of the latter failure is that $top_srcdir and $ac_aux_dir
84  EOF  # are both prefixed by $srcdir.  In an in-source build this is usually
85  if AC_TRY_COMMAND($JAVAC $JAVACFLAGS Test.java) && test -s Test.class  # harmless because $srcdir is `.', but things will broke when you
86  then  # start a VPATH build or use an absolute $srcdir.
87  dnl Don't remove the temporary files here, so they can be examined.  #
88    ifelse([$3], , :, [$3])  # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
89  else  # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
90    echo "configure: failed program was:" >&AC_FD_CC  #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
91    cat Test.java >&AC_FD_CC  # and then we would define $MISSING as
92  ifelse([$4], , , [  rm -fr Test*  #   MISSING="\${SHELL} $am_aux_dir/missing"
93    $4  # This will work as long as MISSING is not called from configure, because
94  ])dnl  # unfortunately $(top_srcdir) has no meaning in configure.
95  fi  # However there are other variables, like CC, which are often used in
96  rm -fr Test*])  # configure, and could therefore not use this "fixed" $ac_aux_dir.
97  dnl @synopsis AC_TRY_RUN_JAVA  #
98  dnl  # Another solution, used here, is to always expand $ac_aux_dir to an
99  dnl AC_TRY_RUN_JAVA attempt to compile and run user given source.  # absolute PATH.  The drawback is that using absolute paths prevent a
100  dnl  # configured tree to be moved without reconfiguration.
101  dnl *Warning*: its success or failure can depend on a proper setting of the  
102  dnl CLASSPATH env. variable.  AC_DEFUN([AM_AUX_DIR_EXPAND],
103  dnl  [dnl Rely on autoconf to set up CDPATH properly.
104  dnl Note: This is part of the set of autoconf M4 macros for Java programs.  AC_PREREQ([2.50])dnl
105  dnl It is VERY IMPORTANT that you download the whole set, some  # expand $ac_aux_dir to an absolute path
106  dnl macros depend on other. Unfortunately, the autoconf archive does not  am_aux_dir=`cd $ac_aux_dir && pwd`
 dnl support the concept of set of macros, so I had to break it for  
 dnl submission.  
 dnl The general documentation, as well as the sample configure.in, is  
 dnl included in the AC_PROG_JAVA macro.  
 dnl  
 dnl @author Devin Weaver <ktohg@tritarget.com>  
 dnl @version $Id$  
 dnl  
 AC_DEFUN(AC_TRY_RUN_JAVA,[  
 AC_REQUIRE([AC_PROG_JAVAC])dnl  
 AC_REQUIRE([AC_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 -classpath ".:$CLASSPATH" 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:" >&AC_FD_CC  
   cat Test.java >&AC_FD_CC  
 ifelse([$4], , , [  rm -fr Test*  
   $4  
 ])dnl  
 fi  
 rm -fr Test*])  
 dnl @synopsis AC_TRY_RUN_JAVA  
 dnl  
 dnl AC_TRY_RUN_JAVA attempt to compile and run user given source.  
 dnl  
 dnl *Warning*: its success or failure can depend on a proper setting of the  
 dnl CLASSPATH env. variable.  
 dnl  
 dnl Note: This is part of the set of autoconf M4 macros for Java programs.  
 dnl It is VERY IMPORTANT that you download the whole set, some  
 dnl macros depend on other. Unfortunately, the autoconf archive does not  
 dnl support the concept of set of macros, so I had to break it for  
 dnl submission.  
 dnl The general documentation, as well as the sample configure.in, is  
 dnl included in the AC_PROG_JAVA macro.  
 dnl  
 dnl @author Devin Weaver <ktohg@tritarget.com>  
 dnl @version $Id$  
 dnl  
 AC_DEFUN([AC_TRY_RUN_JAVA],[  
 AC_REQUIRE([AC_PROG_JAVAC])dnl  
 AC_REQUIRE([AC_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 -classpath ".:$CLASSPATH" 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:" >&AC_FD_CC  
   cat Test.java >&AC_FD_CC  
 ifelse([$4], , , [  rm -fr Test*  
   $4  
 ])dnl  
 fi  
 rm -fr Test*])  
 dnl @synopsis INETLIB_WITH_JSSE_JAR  
 dnl  
 AC_DEFUN([INETLIB_WITH_JSSE_JAR],[  
 AC_ARG_WITH([jsse_jar],  
         AC_HELP_STRING([--with-jsse-jar=DIR],  
                 [path to JSSE library (jsse.jar or javax-net.jar). If unspecified, /usr/share/java and /usr/local/share/java are searched, in that order.]),  
         [if test "x${withval}" != x ; then  
                 AC_MSG_CHECKING([for JSSE])  
                 if test -r ${withval}/jsse.jar ; then  
                         AC_MSG_RESULT(yes)  
                         JSSE_JAR=${withval}/jsse.jar  
                         found_jsse_jar=true  
                 elif test -r ${withval}/javax-net.jar ; then  
                         AC_MSG_RESULT(yes)  
                         JSSE_JAR=${withval}/javax-net.jar  
                         found_jsse_jar=true  
                 else  
                         AC_MSG_ERROR([can't find JSSE jar in specified path])  
                 fi  
         fi],  
         [found_jsse_jar=false])  
 if test "x${JSSE_JAR}" = x ; then  
         dnl AC_MSG_NOTICE([no value supplied, searching default locations])  
         _INETLIB_FIND_JSSE_JAR([/usr/share/java /usr/local/share/java])  
         if test "x${JSSE_JAR}" = x; then  
                 AC_MSG_ERROR([can't find JSSE jar; use --with-jsse-jar])  
         fi  
 fi  
 AC_SUBST(JSSE_JAR)  
107  ])  ])
108  dnl @synopsis _INETLIB_FIND_JSSE_JAR  
109  dnl  # AM_CONDITIONAL                                              -*- Autoconf -*-
110  AC_DEFUN([_INETLIB_FIND_JSSE_JAR],[  
111  AC_MSG_CHECKING([for jsse.jar])  # Copyright (C) 1997, 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
112  for _F in $1 ;do  
113          if test -r ${_F}/jsse.jar ; then  # This program is free software; you can redistribute it and/or modify
114                  JSSE_JAR=${_F}/jsse.jar  # it under the terms of the GNU General Public License as published by
115                  break  # the Free Software Foundation; either version 2, or (at your option)
116          elif test -r ${_F}/javax-net.jar ; then  # any later version.
117                  JSSE_JAR=${_F}/javax-net.jar  
118                  break  # This program is distributed in the hope that it will be useful,
119          fi  # but WITHOUT ANY WARRANTY; without even the implied warranty of
120  done  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
121  if test x${JSSE_JAR} = x ; then  # GNU General Public License for more details.
122          AC_MSG_RESULT([not found])  
123    # You should have received a copy of the GNU General Public License
124    # along with this program; if not, write to the Free Software
125    # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
126    # 02111-1307, USA.
127    
128    # serial 6
129    
130    # AM_CONDITIONAL(NAME, SHELL-CONDITION)
131    # -------------------------------------
132    # Define a conditional.
133    AC_DEFUN([AM_CONDITIONAL],
134    [AC_PREREQ(2.52)dnl
135     ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
136            [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
137    AC_SUBST([$1_TRUE])
138    AC_SUBST([$1_FALSE])
139    if $2; then
140      $1_TRUE=
141      $1_FALSE='#'
142  else  else
143          AC_MSG_RESULT([${JSSE_JAR}])    $1_TRUE='#'
144  fi])    $1_FALSE=
 dnl @synopsis INETLIB_WITH_JAVAX_SECURITY_JAR  
 dnl  
 AC_DEFUN([INETLIB_WITH_JAVAX_SECURITY_JAR],[  
 AC_ARG_WITH([javax-security_jar],  
         AC_HELP_STRING([--with-javax-security-jar=DIR],  
                 [path to GNU-Crypto javax.security library (javax-security.jar). If unspecified, /usr/share/java and /usr/local/share/java are searched, in that order.]),  
         [if test "x${withval}" != x ; then  
                 AC_MSG_CHECKING([for ${withval}/javax-security.jar])  
                 if test -r ${withval}/javax-security.jar ; then  
                         AC_MSG_RESULT(yes)  
                         JAVAX_SECURITY_JAR=${withval}/javax-security.jar  
                         found_javax_security_jar=true  
                 else  
                         AC_MSG_ERROR([can't find javax-security.jar in specified path])  
                 fi  
         fi],  
         [found_javax_security_jar=false])  
 if test "x${JAVAX_SECURITY_JAR}" = x ; then  
         dnl AC_MSG_NOTICE([no value supplied, searching default locations])  
         _INETLIB_FIND_JAVAX_SECURITY_JAR([/usr/share/java /usr/local/share/java])  
         if test "x${JAVAX_SECURITY_JAR}" = x; then  
                 AC_MSG_ERROR([can't find javax-security.jar; use --with-javax-security-jar])  
         fi  
145  fi  fi
146  AC_SUBST(JAVAX_SECURITY_JAR)  AC_CONFIG_COMMANDS_PRE(
147  ])  [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
148  dnl @synopsis _INETLIB_FIND_JAVAX_SECURITY_JAR    AC_MSG_ERROR([[conditional "$1" was never defined.
149  dnl  Usually this means the macro was only invoked conditionally.]])
150  AC_DEFUN([_INETLIB_FIND_JAVAX_SECURITY_JAR],[  fi])])
 AC_MSG_CHECKING([for javax-security.jar])  
 for _F in $1 ;do  
         if test -r ${_F}/javax-security.jar ; then  
                 JAVAX_SECURITY_JAR=${_F}/javax-security.jar  
                 break  
         fi  
 done  
 if test x${JAVAX_SECURITY_JAR} = x ; then  
         AC_MSG_RESULT([not found])  
 else  
         AC_MSG_RESULT([${JAVAX_SECURITY_JAR}])  
 fi])  
151    
152  # Do all the work for Automake.                            -*- Autoconf -*-  # Do all the work for Automake.                            -*- Autoconf -*-
153    
154  # This macro actually does too much some checks are only needed if  # This macro actually does too much some checks are only needed if
155  # your package does certain things.  But this isn't really a big deal.  # your package does certain things.  But this isn't really a big deal.
156    
157  # Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002  # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
158  # Free Software Foundation, Inc.  # Free Software Foundation, Inc.
159    
160  # This program is free software; you can redistribute it and/or modify  # This program is free software; you can redistribute it and/or modify
# Line 843  fi]) Line 172  fi])
172  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
173  # 02111-1307, USA.  # 02111-1307, USA.
174    
175  # serial 8  # serial 11
   
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be  
 # written in clear, in which case automake, when reading aclocal.m4,  
 # will think it sees a *use*, and therefore will trigger all it's  
 # C support machinery.  Also note that it means that autoscan, seeing  
 # CC etc. in the Makefile, will ask for an AC_PROG_CC use...  
   
   
 AC_PREREQ([2.52])  
   
 # Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow  
 # the ones we care about.  
 m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl  
176    
177  # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])  # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
178  # AM_INIT_AUTOMAKE([OPTIONS])  # AM_INIT_AUTOMAKE([OPTIONS])
# Line 870  m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl Line 186  m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
186  # arguments mandatory, and then we can depend on a new Autoconf  # arguments mandatory, and then we can depend on a new Autoconf
187  # release and drop the old call support.  # release and drop the old call support.
188  AC_DEFUN([AM_INIT_AUTOMAKE],  AC_DEFUN([AM_INIT_AUTOMAKE],
189  [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl  [AC_PREREQ([2.58])dnl
190   AC_REQUIRE([AC_PROG_INSTALL])dnl  dnl Autoconf wants to disallow AM_ names.  We explicitly allow
191    dnl the ones we care about.
192    m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
193    AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
194    AC_REQUIRE([AC_PROG_INSTALL])dnl
195  # test to see if srcdir already configured  # test to see if srcdir already configured
196  if test "`cd $srcdir && pwd`" != "`pwd`" &&  if test "`cd $srcdir && pwd`" != "`pwd`" &&
197     test -f $srcdir/config.status; then     test -f $srcdir/config.status; then
198    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])    AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
199  fi  fi
200    
201    # test whether we have cygpath
202    if test -z "$CYGPATH_W"; then
203      if (cygpath --version) >/dev/null 2>/dev/null; then
204        CYGPATH_W='cygpath -w'
205      else
206        CYGPATH_W=echo
207      fi
208    fi
209    AC_SUBST([CYGPATH_W])
210    
211  # Define the identity of the package.  # Define the identity of the package.
212  dnl Distinguish between old-style and new-style calls.  dnl Distinguish between old-style and new-style calls.
213  m4_ifval([$2],  m4_ifval([$2],
# Line 885  m4_ifval([$2], Line 215  m4_ifval([$2],
215   AC_SUBST([PACKAGE], [$1])dnl   AC_SUBST([PACKAGE], [$1])dnl
216   AC_SUBST([VERSION], [$2])],   AC_SUBST([VERSION], [$2])],
217  [_AM_SET_OPTIONS([$1])dnl  [_AM_SET_OPTIONS([$1])dnl
218   AC_SUBST([PACKAGE], [AC_PACKAGE_TARNAME])dnl   AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
219   AC_SUBST([VERSION], [AC_PACKAGE_VERSION])])dnl   AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
220    
221  _AM_IF_OPTION([no-define],,  _AM_IF_OPTION([no-define],,
222  [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])  [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
# Line 900  AM_MISSING_PROG(AUTOCONF, autoconf) Line 230  AM_MISSING_PROG(AUTOCONF, autoconf)
230  AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})  AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
231  AM_MISSING_PROG(AUTOHEADER, autoheader)  AM_MISSING_PROG(AUTOHEADER, autoheader)
232  AM_MISSING_PROG(MAKEINFO, makeinfo)  AM_MISSING_PROG(MAKEINFO, makeinfo)
 AM_MISSING_PROG(AMTAR, tar)  
233  AM_PROG_INSTALL_SH  AM_PROG_INSTALL_SH
234  AM_PROG_INSTALL_STRIP  AM_PROG_INSTALL_STRIP
235    AC_REQUIRE([AM_PROG_MKDIR_P])dnl
236  # We need awk for the "check" target.  The system "awk" is bad on  # We need awk for the "check" target.  The system "awk" is bad on
237  # some platforms.  # some platforms.
238  AC_REQUIRE([AC_PROG_AWK])dnl  AC_REQUIRE([AC_PROG_AWK])dnl
239  AC_REQUIRE([AC_PROG_MAKE_SET])dnl  AC_REQUIRE([AC_PROG_MAKE_SET])dnl
240    AC_REQUIRE([AM_SET_LEADING_DOT])dnl
241    _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])],
242                  [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])],
243                                 [_AM_PROG_TAR([v7])])])
244  _AM_IF_OPTION([no-dependencies],,  _AM_IF_OPTION([no-dependencies],,
245  [AC_PROVIDE_IFELSE([AC_PROG_][CC],  [AC_PROVIDE_IFELSE([AC_PROG_CC],
246                    [_AM_DEPENDENCIES(CC)],                    [_AM_DEPENDENCIES(CC)],
247                    [define([AC_PROG_][CC],                    [define([AC_PROG_CC],
248                            defn([AC_PROG_][CC])[_AM_DEPENDENCIES(CC)])])dnl                            defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
249  AC_PROVIDE_IFELSE([AC_PROG_][CXX],  AC_PROVIDE_IFELSE([AC_PROG_CXX],
250                    [_AM_DEPENDENCIES(CXX)],                    [_AM_DEPENDENCIES(CXX)],
251                    [define([AC_PROG_][CXX],                    [define([AC_PROG_CXX],
252                            defn([AC_PROG_][CXX])[_AM_DEPENDENCIES(CXX)])])dnl                            defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
253  ])  ])
254  ])  ])
255    
 # Copyright 2002  Free Software Foundation, Inc.  
   
 # This program is free software; you can redistribute it and/or modify  
 # it under the terms of the GNU General Public License as published by  
 # the Free Software Foundation; either version 2, or (at your option)  
 # any later version.  
   
 # This program is distributed in the hope that it will be useful,  
 # but WITHOUT ANY WARRANTY; without even the implied warranty of  
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
 # GNU General Public License for more details.  
   
 # You should have received a copy of the GNU General Public License  
 # along with this program; if not, write to the Free Software  
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  
256    
257  # AM_AUTOMAKE_VERSION(VERSION)  # When config.status generates a header, we must update the stamp-h file.
258  # ----------------------------  # This file resides in the same directory as the config header
259  # Automake X.Y traces this macro to ensure aclocal.m4 has been  # that is generated.  The stamp files are numbered to have different names.
260  # generated from the m4 files accompanying Automake X.Y.  
261  AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.6"])  # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
262    # loop where config.status creates the headers, so we can generate
263  # AM_SET_CURRENT_AUTOMAKE_VERSION  # our stamp files there.
264  # -------------------------------  AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
265  # Call AM_AUTOMAKE_VERSION so it can be traced.  [# Compute $1's index in $config_headers.
266  # This function is AC_REQUIREd by AC_INIT_AUTOMAKE.  _am_stamp_count=1
267  AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],  for _am_header in $config_headers :; do
268           [AM_AUTOMAKE_VERSION([1.6.3])])    case $_am_header in
269        $1 | $1:* )
270          break ;;
271        * )
272          _am_stamp_count=`expr $_am_stamp_count + 1` ;;
273      esac
274    done
275    echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
276    
277  # Helper functions for option handling.                    -*- Autoconf -*-  # AM_PROG_INSTALL_SH
278    # ------------------
279    # Define $install_sh.
280    
281  # Copyright 2001, 2002  Free Software Foundation, Inc.  # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
282    
283  # This program is free software; you can redistribute it and/or modify  # This program is free software; you can redistribute it and/or modify
284  # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
# Line 968  AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSIO Line 295  AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSIO
295  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
296  # 02111-1307, USA.  # 02111-1307, USA.
297    
298  # serial 2  AC_DEFUN([AM_PROG_INSTALL_SH],
299    [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
300  # _AM_MANGLE_OPTION(NAME)  install_sh=${install_sh-"$am_aux_dir/install-sh"}
301  # -----------------------  AC_SUBST(install_sh)])
 AC_DEFUN([_AM_MANGLE_OPTION],  
 [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])  
   
 # _AM_SET_OPTION(NAME)  
 # ------------------------------  
 # Set option NAME.  Presently that only means defining a flag for this option.  
 AC_DEFUN([_AM_SET_OPTION],  
 [m4_define(_AM_MANGLE_OPTION([$1]), 1)])  
   
 # _AM_SET_OPTIONS(OPTIONS)  
 # ----------------------------------  
 # OPTIONS is a space-separated list of Automake options.  
 AC_DEFUN([_AM_SET_OPTIONS],  
 [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])  
   
 # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])  
 # -------------------------------------------  
 # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.  
 AC_DEFUN([_AM_IF_OPTION],  
 [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])  
   
 #  
 # Check to make sure that the build environment is sane.  
 #  
302    
303  # Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.  #                                                          -*- Autoconf -*-
304    # Copyright (C) 2003  Free Software Foundation, Inc.
305    
306  # This program is free software; you can redistribute it and/or modify  # This program is free software; you can redistribute it and/or modify
307  # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
# Line 1014  AC_DEFUN([_AM_IF_OPTION], Line 318  AC_DEFUN([_AM_IF_OPTION],
318  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
319  # 02111-1307, USA.  # 02111-1307, USA.
320    
321  # serial 3  # serial 1
   
 # AM_SANITY_CHECK  
 # ---------------  
 AC_DEFUN([AM_SANITY_CHECK],  
 [AC_MSG_CHECKING([whether build environment is sane])  
 # Just in case  
 sleep 1  
 echo timestamp > conftest.file  
 # Do `set' in a subshell so we don't clobber the current shell's  
 # arguments.  Must try -L first in case configure is actually a  
 # symlink; some systems play weird games with the mod time of symlinks  
 # (eg FreeBSD returns the mod time of the symlink's containing  
 # directory).  
 if (  
    set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`  
    if test "$[*]" = "X"; then  
       # -L didn't work.  
       set X `ls -t $srcdir/configure conftest.file`  
    fi  
    rm -f conftest.file  
    if test "$[*]" != "X $srcdir/configure conftest.file" \  
       && test "$[*]" != "X conftest.file $srcdir/configure"; then  
   
       # If neither matched, then we have a broken ls.  This can happen  
       # if, for instance, CONFIG_SHELL is bash and it inherits a  
       # broken ls alias from the environment.  This has actually  
       # happened.  Such a system could not be considered "sane".  
       AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken  
 alias in your environment])  
    fi  
322    
323     test "$[2]" = conftest.file  # Check whether the underlying file-system supports filenames
324     )  # with a leading dot.  For instance MS-DOS doesn't.
325  then  AC_DEFUN([AM_SET_LEADING_DOT],
326     # Ok.  [rm -rf .tst 2>/dev/null
327     :  mkdir .tst 2>/dev/null
328    if test -d .tst; then
329      am__leading_dot=.
330  else  else
331     AC_MSG_ERROR([newly created file is older than distributed files!    am__leading_dot=_
 Check your system clock])  
332  fi  fi
333  AC_MSG_RESULT(yes)])  rmdir .tst 2>/dev/null
334    AC_SUBST([am__leading_dot])])
335    
336  #  -*- Autoconf -*-  #  -*- Autoconf -*-
337    
338    
339  # Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.  # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc.
340    
341  # This program is free software; you can redistribute it and/or modify  # This program is free software; you can redistribute it and/or modify
342  # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
# Line 1103  else Line 379  else
379  fi  fi
380  ])  ])
381    
382  # AM_AUX_DIR_EXPAND  # AM_PROG_MKDIR_P
383    # ---------------
384    # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise.
385    
386  # Copyright 2001 Free Software Foundation, Inc.  # Copyright (C) 2003, 2004 Free Software Foundation, Inc.
387    
388  # This program is free software; you can redistribute it and/or modify  # This program is free software; you can redistribute it and/or modify
389  # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
# Line 1122  fi Line 400  fi
400  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
401  # 02111-1307, USA.  # 02111-1307, USA.
402    
403  # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets  # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories
404  # $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to  # created by `make install' are always world readable, even if the
405  # `$srcdir', `$srcdir/..', or `$srcdir/../..'.  # installer happens to have an overly restrictive umask (e.g. 077).
406    # This was a mistake.  There are at least two reasons why we must not
407    # use `-m 0755':
408    #   - it causes special bits like SGID to be ignored,
409    #   - it may be too restrictive (some setups expect 775 directories).
410  #  #
411  # Of course, Automake must honor this variable whenever it calls a  # Do not use -m 0755 and let people choose whatever they expect by
412  # tool from the auxiliary directory.  The problem is that $srcdir (and  # setting umask.
 # therefore $ac_aux_dir as well) can be either absolute or relative,  
 # depending on how configure is run.  This is pretty annoying, since  
 # it makes $ac_aux_dir quite unusable in subdirectories: in the top  
 # source directory, any form will work fine, but in subdirectories a  
 # relative path needs to be adjusted first.  
413  #  #
414  # $ac_aux_dir/missing  # We cannot accept any implementation of `mkdir' that recognizes `-p'.
415  #    fails when called from a subdirectory if $ac_aux_dir is relative  # Some implementations (such as Solaris 8's) are not thread-safe: if a
416  # $top_srcdir/$ac_aux_dir/missing  # parallel make tries to run `mkdir -p a/b' and `mkdir -p a/c'
417  #    fails if $ac_aux_dir is absolute,  # concurrently, both version can detect that a/ is missing, but only
418  #    fails when called from a subdirectory in a VPATH build with  # one can create it and the other will error out.  Consequently we
419  #          a relative $ac_aux_dir  # restrict ourselves to GNU make (using the --version option ensures
420  #  # this.)
421  # The reason of the latter failure is that $top_srcdir and $ac_aux_dir  AC_DEFUN([AM_PROG_MKDIR_P],
422  # are both prefixed by $srcdir.  In an in-source build this is usually  [if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
423  # harmless because $srcdir is `.', but things will broke when you    # We used to keeping the `.' as first argument, in order to
424  # start a VPATH build or use an absolute $srcdir.    # allow $(mkdir_p) to be used without argument.  As in
425  #    #   $(mkdir_p) $(somedir)
426  # So we could use something similar to $top_srcdir/$ac_aux_dir/missing,    # where $(somedir) is conditionally defined.  However this is wrong
427  # iff we strip the leading $srcdir from $ac_aux_dir.  That would be:    # for two reasons:
428  #   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`    #  1. if the package is installed by a user who cannot write `.'
429  # and then we would define $MISSING as    #     make install will fail,
430  #   MISSING="\${SHELL} $am_aux_dir/missing"    #  2. the above comment should most certainly read
431  # This will work as long as MISSING is not called from configure, because    #     $(mkdir_p) $(DESTDIR)$(somedir)
432  # unfortunately $(top_srcdir) has no meaning in configure.    #     so it does not work when $(somedir) is undefined and
433  # However there are other variables, like CC, which are often used in    #     $(DESTDIR) is not.
434  # configure, and could therefore not use this "fixed" $ac_aux_dir.    #  To support the latter case, we have to write
435  #    #     test -z "$(somedir)" || $(mkdir_p) $(DESTDIR)$(somedir),
436  # Another solution, used here, is to always expand $ac_aux_dir to an    #  so the `.' trick is pointless.
437  # absolute PATH.  The drawback is that using absolute paths prevent a    mkdir_p='mkdir -p --'
438  # configured tree to be moved without reconfiguration.  else
439      # On NextStep and OpenStep, the `mkdir' command does not
440  # Rely on autoconf to set up CDPATH properly.    # recognize any option.  It will interpret all options as
441  AC_PREREQ([2.50])    # directories to create, and then abort because `.' already
442      # exists.
443  AC_DEFUN([AM_AUX_DIR_EXPAND], [    for d in ./-p ./--version;
444  # expand $ac_aux_dir to an absolute path    do
445  am_aux_dir=`cd $ac_aux_dir && pwd`      test -d $d && rmdir $d
446  ])    done
447      # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists.
448      if test -f "$ac_aux_dir/mkinstalldirs"; then
449        mkdir_p='$(mkinstalldirs)'
450      else
451        mkdir_p='$(install_sh) -d'
452      fi
453    fi
454    AC_SUBST([mkdir_p])])
455    
456  # AM_PROG_INSTALL_SH  # Helper functions for option handling.                    -*- Autoconf -*-
 # ------------------  
 # Define $install_sh.  
457    
458  # Copyright 2001 Free Software Foundation, Inc.  # Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
459    
460  # This program is free software; you can redistribute it and/or modify  # This program is free software; you can redistribute it and/or modify
461  # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
# Line 1189  am_aux_dir=`cd $ac_aux_dir && pwd` Line 472  am_aux_dir=`cd $ac_aux_dir && pwd`
472  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
473  # 02111-1307, USA.  # 02111-1307, USA.
474    
475  AC_DEFUN([AM_PROG_INSTALL_SH],  # serial 2
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl  
 install_sh=${install_sh-"$am_aux_dir/install-sh"}  
 AC_SUBST(install_sh)])  
   
 # AM_PROG_INSTALL_STRIP  
   
 # Copyright 2001 Free Software Foundation, Inc.  
476    
477  # This program is free software; you can redistribute it and/or modify  # _AM_MANGLE_OPTION(NAME)
478  # it under the terms of the GNU General Public License as published by  # -----------------------
479  # the Free Software Foundation; either version 2, or (at your option)  AC_DEFUN([_AM_MANGLE_OPTION],
480  # any later version.  [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
481    
482  # This program is distributed in the hope that it will be useful,  # _AM_SET_OPTION(NAME)
483  # but WITHOUT ANY WARRANTY; without even the implied warranty of  # ------------------------------
484  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  # Set option NAME.  Presently that only means defining a flag for this option.
485  # GNU General Public License for more details.  AC_DEFUN([_AM_SET_OPTION],
486    [m4_define(_AM_MANGLE_OPTION([$1]), 1)])
487    
488  # You should have received a copy of the GNU General Public License  # _AM_SET_OPTIONS(OPTIONS)
489  # along with this program; if not, write to the Free Software  # ----------------------------------
490  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  # OPTIONS is a space-separated list of Automake options.
491  # 02111-1307, USA.  AC_DEFUN([_AM_SET_OPTIONS],
492    [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
493    
494  # One issue with vendor `install' (even GNU) is that you can't  # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
495  # specify the program used to strip binaries.  This is especially  # -------------------------------------------
496  # annoying in cross-compiling environments, where the build's strip  # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
497  # is unlikely to handle the host's binaries.  AC_DEFUN([_AM_IF_OPTION],
498  # Fortunately install-sh will honor a STRIPPROG variable, so we  [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
 # always use install-sh in `make install-strip', and initialize  
 # STRIPPROG with the value of the STRIP variable (set by the user).  
 AC_DEFUN([AM_PROG_INSTALL_STRIP],  
 [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl  
 # Installed binaries are usually stripped using `strip' when the user  
 # run `make install-strip'.  However `strip' might not be the right  
 # tool to use in cross-compilation environments, therefore Automake  
 # will honor the `STRIP' environment variable to overrule this program.  
 dnl Don't test for $cross_compiling = yes, because it might be `maybe'.  
 if test "$cross_compiling" != no; then  
   AC_CHECK_TOOL([STRIP], [strip], :)  
 fi  
 INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"  
 AC_SUBST([INSTALL_STRIP_PROGRAM])])  
499    
500  # serial 4                                              -*- Autoconf -*-  #
501    # Check to make sure that the build environment is sane.
502    #
503    
504  # Copyright 1999, 2000, 2001 Free Software Foundation, Inc.  # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc.
505    
506  # This program is free software; you can redistribute it and/or modify  # This program is free software; you can redistribute it and/or modify
507  # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
# Line 1252  AC_SUBST([INSTALL_STRIP_PROGRAM])]) Line 518  AC_SUBST([INSTALL_STRIP_PROGRAM])])
518  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
519  # 02111-1307, USA.  # 02111-1307, USA.
520    
521    # serial 3
522    
523  # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be  # AM_SANITY_CHECK
524  # written in clear, in which case automake, when reading aclocal.m4,  # ---------------
525  # will think it sees a *use*, and therefore will trigger all it's  AC_DEFUN([AM_SANITY_CHECK],
526  # C support machinery.  Also note that it means that autoscan, seeing  [AC_MSG_CHECKING([whether build environment is sane])
527  # CC etc. in the Makefile, will ask for an AC_PROG_CC use...  # Just in case
528    sleep 1
529    echo timestamp > conftest.file
530    # Do `set' in a subshell so we don't clobber the current shell's
531  # _AM_DEPENDENCIES(NAME)  # arguments.  Must try -L first in case configure is actually a
532  # ----------------------  # symlink; some systems play weird games with the mod time of symlinks
533  # See how the compiler implements dependency checking.  # (eg FreeBSD returns the mod time of the symlink's containing
534  # NAME is "CC", "CXX", "GCJ", or "OBJC".  # directory).
535  # We try a few techniques and use that to set a single cache variable.  if (
536  #     set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
537  # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was     if test "$[*]" = "X"; then
538  # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular        # -L didn't work.
539  # dependency, and given that the user is not expected to run this macro,        set X `ls -t $srcdir/configure conftest.file`
540  # just rely on AC_PROG_CC.     fi
541  AC_DEFUN([_AM_DEPENDENCIES],     rm -f conftest.file
542  [AC_REQUIRE([AM_SET_DEPDIR])dnl     if test "$[*]" != "X $srcdir/configure conftest.file" \
543  AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl        && test "$[*]" != "X conftest.file $srcdir/configure"; then
 AC_REQUIRE([AM_MAKE_INCLUDE])dnl  
 AC_REQUIRE([AM_DEP_TRACK])dnl  
   
 ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],  
        [$1], CXX,  [depcc="$CXX"  am_compiler_list=],  
        [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],  
        [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],  
                    [depcc="$$1"   am_compiler_list=])  
   
 AC_CACHE_CHECK([dependency style of $depcc],  
                [am_cv_$1_dependencies_compiler_type],  
 [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then  
   # We make a subdir and do the tests there.  Otherwise we can end up  
   # making bogus files that we don't know about and never remove.  For  
   # instance it was reported that on HP-UX the gcc test will end up  
   # making a dummy file named `D' -- because `-MD' means `put the output  
   # in D'.  
   mkdir conftest.dir  
   # Copy depcomp to subdir because otherwise we won't find it if we're  
   # using a relative directory.  
   cp "$am_depcomp" conftest.dir  
   cd conftest.dir  
   
   am_cv_$1_dependencies_compiler_type=none  
   if test "$am_compiler_list" = ""; then  
      am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`  
   fi  
   for depmode in $am_compiler_list; do  
     # We need to recreate these files for each test, as the compiler may  
     # overwrite some of them when testing with obscure command lines.  
     # This happens at least with the AIX C compiler.  
     echo '#include "conftest.h"' > conftest.c  
     echo 'int i;' > conftest.h  
     echo "${am__include} ${am__quote}conftest.Po${am__quote}" > confmf  
   
     case $depmode in  
     nosideeffect)  
       # after this tag, mechanisms are not by side-effect, so they'll  
       # only be used when explicitly requested  
       if test "x$enable_dependency_tracking" = xyes; then  
         continue  
       else  
         break  
       fi  
       ;;  
     none) break ;;  
     esac  
     # We check with `-c' and `-o' for the sake of the "dashmstdout"  
     # mode.  It turns out that the SunPro C++ compiler does not properly  
     # handle `-M -o', and we need to detect this.  
     if depmode=$depmode \  
        source=conftest.c object=conftest.o \  
        depfile=conftest.Po tmpdepfile=conftest.TPo \  
        $SHELL ./depcomp $depcc -c conftest.c -o conftest.o >/dev/null 2>&1 &&  
        grep conftest.h conftest.Po > /dev/null 2>&1 &&  
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then  
       am_cv_$1_dependencies_compiler_type=$depmode  
       break  
     fi  
   done  
   
   cd ..  
   rm -rf conftest.dir  
 else  
   am_cv_$1_dependencies_compiler_type=none  
 fi  
 ])  
 AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])  
 ])  
544    
545          # If neither matched, then we have a broken ls.  This can happen
546          # if, for instance, CONFIG_SHELL is bash and it inherits a
547          # broken ls alias from the environment.  This has actually
548          # happened.  Such a system could not be considered "sane".
549          AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
550    alias in your environment])
551       fi
552    
553  # AM_SET_DEPDIR     test "$[2]" = conftest.file
554  # -------------     )
555  # Choose a directory name for dependency files.  then
556  # This macro is AC_REQUIREd in _AM_DEPENDENCIES     # Ok.
557  AC_DEFUN([AM_SET_DEPDIR],     :
 [rm -f .deps 2>/dev/null  
 mkdir .deps 2>/dev/null  
 if test -d .deps; then  
   DEPDIR=.deps  
558  else  else
559    # MS-DOS does not allow filenames that begin with a dot.     AC_MSG_ERROR([newly created file is older than distributed files!
560    DEPDIR=_deps  Check your system clock])
 fi  
 rmdir .deps 2>/dev/null  
 AC_SUBST([DEPDIR])  
 ])  
   
   
 # AM_DEP_TRACK  
 # ------------  
 AC_DEFUN([AM_DEP_TRACK],  
 [AC_ARG_ENABLE(dependency-tracking,  
 [  --disable-dependency-tracking Speeds up one-time builds  
   --enable-dependency-tracking  Do not reject slow dependency extractors])  
 if test "x$enable_dependency_tracking" != xno; then  
   am_depcomp="$ac_aux_dir/depcomp"  
   AMDEPBACKSLASH='\'  
561  fi  fi
562  AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])  AC_MSG_RESULT(yes)])
 AC_SUBST([AMDEPBACKSLASH])  
 ])  
563    
564  # Generate code to set up dependency tracking.   -*- Autoconf -*-  # AM_PROG_INSTALL_STRIP
565    
566  # Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.  # Copyright (C) 2001, 2003 Free Software Foundation, Inc.
567    
568  # This program is free software; you can redistribute it and/or modify  # This program is free software; you can redistribute it and/or modify
569  # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
# Line 1396  AC_SUBST([AMDEPBACKSLASH]) Line 580  AC_SUBST([AMDEPBACKSLASH])
580  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
581  # 02111-1307, USA.  # 02111-1307, USA.
582    
583  #serial 2  # One issue with vendor `install' (even GNU) is that you can't
584    # specify the program used to strip binaries.  This is especially
585  # _AM_OUTPUT_DEPENDENCY_COMMANDS  # annoying in cross-compiling environments, where the build's strip
586  # ------------------------------  # is unlikely to handle the host's binaries.
587  AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],  # Fortunately install-sh will honor a STRIPPROG variable, so we
588  [for mf in $CONFIG_FILES; do  # always use install-sh in `make install-strip', and initialize
589    # Strip MF so we end up with the name of the file.  # STRIPPROG with the value of the STRIP variable (set by the user).
590    mf=`echo "$mf" | sed -e 's/:.*$//'`  AC_DEFUN([AM_PROG_INSTALL_STRIP],
591    # Check whether this is an Automake generated Makefile or not.  [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
592    # We used to match only the files named `Makefile.in', but  # Installed binaries are usually stripped using `strip' when the user
593    # some people rename them; so instead we look at the file content.  # run `make install-strip'.  However `strip' might not be the right
594    # Grep'ing the first line is not enough: some people post-process  # tool to use in cross-compilation environments, therefore Automake
595    # each Makefile.in and add a new line on top of each file to say so.  # will honor the `STRIP' environment variable to overrule this program.
596    # So let's grep whole file.  dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
597    if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then  if test "$cross_compiling" != no; then
598      dirpart=`AS_DIRNAME("$mf")`    AC_CHECK_TOOL([STRIP], [strip], :)
599    else  fi
600      continue  INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
601    fi  AC_SUBST([INSTALL_STRIP_PROGRAM])])
   grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue  
   # Extract the definition of DEP_FILES from the Makefile without  
   # running `make'.  
   DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`  
   test -z "$DEPDIR" && continue  
   # When using ansi2knr, U may be empty or an underscore; expand it  
   U=`sed -n -e '/^U = / s///p' < "$mf"`  
   test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"  
   # We invoke sed twice because it is the simplest approach to  
   # changing $(DEPDIR) to its actual value in the expansion.  
   for file in `sed -n -e '  
     /^DEP_FILES = .*\\\\$/ {  
       s/^DEP_FILES = //  
       :loop  
         s/\\\\$//  
         p  
         n  
         /\\\\$/ b loop  
       p  
     }  
     /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \  
        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do  
     # Make sure the directory exists.  
     test -f "$dirpart/$file" && continue  
     fdir=`AS_DIRNAME(["$file"])`  
     AS_MKDIR_P([$dirpart/$fdir])  
     # echo "creating $dirpart/$file"  
     echo '# dummy' > "$dirpart/$file"  
   done  
 done  
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS  
   
602    
603  # AM_OUTPUT_DEPENDENCY_COMMANDS  # Check how to create a tarball.                            -*- Autoconf -*-
 # -----------------------------  
 # This macro should only be invoked once -- use via AC_REQUIRE.  
 #  
 # This code is only required when automatic dependency tracking  
 # is enabled.  FIXME.  This creates each `.P' file that we will  
 # need in order to bootstrap the dependency handling code.  
 AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],  
 [AC_CONFIG_COMMANDS([depfiles],  
      [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],  
      [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])  
 ])  
604    
605  # Copyright 2001 Free Software Foundation, Inc.             -*- Autoconf -*-  # Copyright (C) 2004  Free Software Foundation, Inc.
606    
607  # This program is free software; you can redistribute it and/or modify  # This program is free software; you can redistribute it and/or modify
608  # it under the terms of the GNU General Public License as published by  # it under the terms of the GNU General Public License as published by
# Line 1478  AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS] Line 619  AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS]
619  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
620  # 02111-1307, USA.  # 02111-1307, USA.
621    
622  # serial 2  # serial 1
   
 # AM_MAKE_INCLUDE()  
 # -----------------  
 # Check to see how make treats includes.  
 AC_DEFUN([AM_MAKE_INCLUDE],  
 [am_make=${MAKE-make}  
 cat > confinc << 'END'  
 doit:  
         @echo done  
 END  
 # If we don't find an include directive, just comment out the code.  
 AC_MSG_CHECKING([for style of include used by $am_make])  
 am__include="#"  
 am__quote=  
 _am_result=none  
 # First try GNU make style include.  
 echo "include confinc" > confmf  
 # We grep out `Entering directory' and `Leaving directory'  
 # messages which can occur if `w' ends up in MAKEFLAGS.  
 # In particular we don't look at `^make:' because GNU make might  
 # be invoked under some other name (usually "gmake"), in which  
 # case it prints its new name instead of `make'.  
 if test "`$am_make -s -f confmf 2> /dev/null | fgrep -v 'ing directory'`" = "done"; then  
    am__include=include  
    am__quote=  
    _am_result=GNU  
 fi  
 # Now try BSD make style include.  
 if test "$am__include" = "#"; then  
    echo '.include "confinc"' > confmf  
    if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then  
       am__include=.include  
       am__quote="\""  
       _am_result=BSD  
    fi  
 fi  
 AC_SUBST(am__include)  
 AC_SUBST(am__quote)  
 AC_MSG_RESULT($_am_result)  
 rm -f confinc confmf  
 ])  
   
 # AM_CONDITIONAL                                              -*- Autoconf -*-  
   
 # Copyright 1997, 2000, 2001 Free Software Foundation, Inc.  
   
 # This program is free software; you can redistribute it and/or modify  
 # it under the terms of the GNU General Public License as published by  
 # the Free Software Foundation; either version 2, or (at your option)  
 # any later version.  
   
 # This program is distributed in the hope that it will be useful,  
 # but WITHOUT ANY WARRANTY; without even the implied warranty of  
 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
 # GNU General Public License for more details.  
623    
 # You should have received a copy of the GNU General Public License  
 # along with this program; if not, write to the Free Software  
 # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  
 # 02111-1307, USA.  
624    
625  # serial 5  # _AM_PROG_TAR(FORMAT)
626    # --------------------
627    # Check how to create a tarball in format FORMAT.
628    # FORMAT should be one of `v7', `ustar', or `pax'.
629    #
630    # Substitute a variable $(am__tar) that is a command
631    # writing to stdout a FORMAT-tarball containing the directory
632    # $tardir.
633    #     tardir=directory && $(am__tar) > result.tar
634    #
635    # Substitute a variable $(am__untar) that extract such
636    # a tarball read from stdin.
637    #     $(am__untar) < result.tar
638    AC_DEFUN([_AM_PROG_TAR],
639    [# Always define AMTAR for backward compatibility.
640    AM_MISSING_PROG([AMTAR], [tar])
641    m4_if([$1], [v7],
642         [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'],
643         [m4_case([$1], [ustar],, [pax],,
644                  [m4_fatal([Unknown tar format])])
645    AC_MSG_CHECKING([how to create a $1 tar archive])
646    # Loop over all known methods to create a tar archive until one works.
647    _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none'
648    _am_tools=${am_cv_prog_tar_$1-$_am_tools}
649    # Do not fold the above two line into one, because Tru64 sh and
650    # Solaris sh will not grok spaces in the rhs of `-'.
651    for _am_tool in $_am_tools
652    do
653      case $_am_tool in
654      gnutar)
655        for _am_tar in tar gnutar gtar;
656        do
657          AM_RUN_LOG([$_am_tar --version]) && break
658        done
659        am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"'
660        am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"'
661        am__untar="$_am_tar -xf -"
662        ;;
663      plaintar)
664        # Must skip GNU tar: if it does not support --format= it doesn't create
665        # ustar tarball either.
666        (tar --version) >/dev/null 2>&1 && continue
667        am__tar='tar chf - "$$tardir"'
668        am__tar_='tar chf - "$tardir"'
669        am__untar='tar xf -'
670        ;;
671      pax)
672        am__tar='pax -L -x $1 -w "$$tardir"'
673        am__tar_='pax -L -x $1 -w "$tardir"'
674        am__untar='pax -r'
675        ;;
676      cpio)
677        am__tar='find "$$tardir" -print | cpio -o -H $1 -L'
678        am__tar_='find "$tardir" -print | cpio -o -H $1 -L'
679        am__untar='cpio -i -H $1 -d'
680        ;;
681      none)
682        am__tar=false
683        am__tar_=false
684        am__untar=false
685        ;;
686      esac
687    
688      # If the value was cached, stop now.  We just wanted to have am__tar
689      # and am__untar set.
690      test -n "${am_cv_prog_tar_$1}" && break
691    
692  AC_PREREQ(2.52)    # tar/untar a dummy directory, and stop if the command works
693      rm -rf conftest.dir
694      mkdir conftest.dir
695      echo GrepMe > conftest.dir/file
696      AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar])
697      rm -rf conftest.dir
698      if test -s conftest.tar; then
699        AM_RUN_LOG([$am__untar <conftest.tar])
700        grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
701      fi
702    done
703    rm -rf conftest.dir
704    
705  # AM_CONDITIONAL(NAME, SHELL-CONDITION)  AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool])
706  # -------------------------------------  AC_MSG_RESULT([$am_cv_prog_tar_$1])])
707  # Define a conditional.  AC_SUBST([am__tar])
708  AC_DEFUN([AM_CONDITIONAL],  AC_SUBST([am__untar])
709  [ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],  ]) # _AM_PROG_TAR
         [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl  
 AC_SUBST([$1_TRUE])  
 AC_SUBST([$1_FALSE])  
 if $2; then  
   $1_TRUE=  
   $1_FALSE='#'  
 else  
   $1_TRUE='#'  
   $1_FALSE=  
 fi  
 AC_CONFIG_COMMANDS_PRE(  
 [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then  
   AC_MSG_ERROR([conditional \"$1\" was never defined.  
 Usually this means the macro was only invoked conditionally.])  
 fi])])  
710    
711    m4_include([acinclude.m4])

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26