file missing
Sylvestre Ledru [Mon, 25 Sep 2006 13:28:19 +0000 (13:28 +0000)]
13 files changed:
scilab/config/missing [new symlink]
scilab/m4/argz.m4 [new file with mode: 0644]
scilab/m4/check_compiler.m4 [new file with mode: 0644]
scilab/m4/fortran.m4 [new file with mode: 0644]
scilab/m4/gtk-2.0.m4 [new file with mode: 0644]
scilab/m4/java.old.m4 [new file with mode: 0644]
scilab/m4/libs_by_debian.m4 [new file with mode: 0644]
scilab/m4/ltoptions.m4 [new file with mode: 0644]
scilab/m4/ltsugar.m4 [new file with mode: 0644]
scilab/m4/ltversion.m4 [new file with mode: 0644]
scilab/m4/lt~obsolete.m4 [new file with mode: 0644]
scilab/m4/ocaml.m4 [new file with mode: 0644]
scilab/m4/pvm.m4 [new file with mode: 0644]

diff --git a/scilab/config/missing b/scilab/config/missing
new file mode 120000 (symlink)
index 0000000..0ba95d1
--- /dev/null
@@ -0,0 +1 @@
+/usr/share/automake-1.9/missing
\ No newline at end of file
diff --git a/scilab/m4/argz.m4 b/scilab/m4/argz.m4
new file mode 100644 (file)
index 0000000..40e836b
--- /dev/null
@@ -0,0 +1,34 @@
+# Portability macros for glibc argz.                    -*- Autoconf -*-
+# Written by Gary V. Vaughan <gary@gnu.org>
+
+# Copyright (C) 2004, 2005, 2006 Free Software Foundation, Inc.
+
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 4 argz.m4
+
+AC_DEFUN([gl_FUNC_ARGZ],
+[gl_PREREQ_ARGZ
+
+AC_CHECK_HEADERS([argz.h], [], [], [AC_INCLUDES_DEFAULT])
+
+AC_CHECK_TYPES([error_t],
+  [],
+  [AC_DEFINE([error_t], [int],
+   [Define to a type to use for `error_t' if it is not otherwise available.])
+   AC_DEFINE([__error_t_defined], [1], [Define so that glibc/gnulib argp.h
+    does not typedef error_t.])],
+  [#if defined(HAVE_ARGZ_H)
+#  include <argz.h>
+#endif])
+
+ARGZ_H=
+AC_CHECK_FUNCS([argz_append argz_create_sep argz_insert argz_next \
+       argz_stringify], [], [ARGZ_H=argz.h; AC_LIBOBJ([argz])])
+AC_SUBST([ARGZ_H])
+])
+
+# Prerequisites of lib/argz.c.
+AC_DEFUN([gl_PREREQ_ARGZ], [:])
diff --git a/scilab/m4/check_compiler.m4 b/scilab/m4/check_compiler.m4
new file mode 100644 (file)
index 0000000..0c266cc
--- /dev/null
@@ -0,0 +1,68 @@
+dnl Macros which process ./configure arguments
+dnl Copyright INRIA
+dnl Sylvestre Ledru - June 2006
+
+
+AC_DEFUN([AC_CHECK_PROG_GCC],[
+
+       # Look for GCC
+       AC_CHECK_PROGS(GCC,gcc,no)
+       if test "$GCC" = no; then
+               AC_MSG_ERROR([Unable to configure: gcc compiler not found])
+       fi
+])
+
+AC_DEFUN([AC_CHECK_PROG_G77],[
+       # Look for G77
+       STOP=$1
+       AC_PROG_FC(g77)
+       if test "$STOP" = ""; then
+               if test "$FC" != "g77"; then
+                       AC_MSG_ERROR([Unable to configure: g77 compiler not found])
+               fi
+       fi
+
+])
+
+AC_DEFUN([AC_CHECK_PROG_GFORTRAN],[
+       # Look for GFortran
+       STOP=$1
+       AC_PROG_FC(gfortran)
+       if test "$STOP" = ""; then
+               if test "$FC" != "gfortran"; then
+                       AC_MSG_ERROR([Unable to configure: gfortran compiler not found])
+               fi
+       fi
+])
+
+AC_DEFUN([AC_CHECK_PROG_GNU],[
+       # GNU C and Fortran compilers required
+       AC_CHECK_PROG_GCC()
+       AC_CHECK_PROG_GFORTRAN(no)
+       if test "$WITH_GFORTRAN" = no; then
+               AC_CHECK_PROG_G77(no)
+               if test "$WITH_G77" = no; then
+                       AC_MSG_ERROR([Unable to configure: g77 or gfortran compiler not found])
+               fi
+       fi
+])
+
+AC_DEFUN([AC_CHECK_PROG_INTEL],[
+       # Look for Intel Compiler
+       case "$host" in
+       i*86-*-linux-gnu | *-pc-linux-gnu | x86_64-*-linux-gnu | ia64-*-linux-gnu) 
+               AC_CHECK_PROGS(ICC,icc ecc,no)
+               if test "$ICC" = no; then
+                       AC_MSG_ERROR([Unable to configure: icc nor ecc compiler found])
+               fi
+               AC_CHECK_PROGS(IFC,ifort ifc efc,no)
+               AC_PROG_FC(ifort ifc efc)
+               if test -z "$FC" ; then
+                       AC_MSG_ERROR([Unable to configure: ifort, ifc nor efc compiler found])
+               fi
+               ;;
+       *) 
+               AC_MSG_ERROR([Intel compiler not supported for the architecture $host])
+               ;;
+       esac
+])
\ No newline at end of file
diff --git a/scilab/m4/fortran.m4 b/scilab/m4/fortran.m4
new file mode 100644 (file)
index 0000000..8cd19e6
--- /dev/null
@@ -0,0 +1,91 @@
+dnl Macros which process ./configure arguments
+dnl Fortran Macros
+dnl Copyright INRIA
+dnl Sylvestre Ledru - June 2006
+
+dnl Look for trailing or leading underscores
+AC_DEFUN([AC_CHECK_UNDERSCORE_FORTRAN],[
+AC_MSG_CHECKING([for leading underscores with Fortran])
+cat << EOF > pipof.f
+       subroutine pipof
+       end
+EOF
+
+dnl expand possible $SCIDIR in $FC (wizard command...)
+eval "FC1=\"$FC\""
+eval "$FC1 -c pipof.f > /dev/null 2>&1"
+
+FC_LEADING_UNDERSCORE=no
+FC_TRAILING_UNDERSCORE=no
+
+output=`nm $NMOPT pipof.o|grep _pipof 2>&1`
+if test ! -z "$output"; then
+  FC_LEADING_UNDERSCORE=yes
+  FC_TRAILING_UNDERSCORE=no
+fi
+
+output=`nm $NMOPT pipof.o|grep pipof_ 2>&1`
+if test ! -z "$output"; then
+  FC_LEADING_UNDERSCORE=no
+  FC_TRAILING_UNDERSCORE=yes
+fi
+
+output=`nm $NMOPT pipof.o|grep _pipof_ 2>&1`
+if test ! -z "$output"; then
+  FC_LEADING_UNDERSCORE=yes
+  FC_TRAILING_UNDERSCORE=yes
+fi
+
+if test "$FC_LEADING_UNDERSCORE" = yes; then
+  AC_DEFINE([WLU],,[If leading underscores])
+fi
+if test "$FC_TRAILING_UNDERSCORE" = yes; then
+  AC_DEFINE([WTU],,[If trailing underscores])
+fi
+
+$RM pipof.f pipof.o
+
+AC_MSG_RESULT([$FC_LEADING_UNDERSCORE])
+AC_MSG_CHECKING([for trailing underscores with Fortran])
+AC_MSG_RESULT([$FC_TRAILING_UNDERSCORE])
+
+#####################
+## test for sharpsign
+#####################
+
+AC_MSG_CHECKING([use of the sharpsign in CPP])
+
+AC_COMPILE_IFELSE(
+       [ 
+               AC_LANG_PROGRAM(
+                       [[#define C2F(name) name##_]], 
+                       [[C2F(toto)()]]
+               )
+       ],
+       [AC_MSG_RESULT(yes)
+       AC_DEFINE([CNAME(name1,name2)], [name1##name2],[Cname])
+       USE_SHARP_SIGN=yes]
+       ,
+       [AC_MSG_RESULT(no)
+       AC_DEFINE([CNAME(name1,name2)], [name1/**/name2],[Cname])
+       USE_SHARP_SIGN=no]
+)
+
+## Define  C2F and F2C entry point conversion ##
+if test "$FC_TRAILING_UNDERSCORE" = yes; then
+       if test "$USE_SHARP_SIGN" = yes; then
+       echo "Define C2F with Trailing Underscore and Sharp Sign"
+               AC_DEFINE([C2F(name)], [name##_],[Define C2F with Trailing Underscore and Sharp Sign])
+               AC_DEFINE([F2C(name)], [name##_],[Define F2C with Trailing Underscore and Sharp Sign])
+       else
+       echo "Define C2F with Trailing Underscore and without Sharp Sign"
+               AC_DEFINE([C2F(name)], [name/**/_],[Define C2F with Trailing Underscore and without Sharp Sign])
+               AC_DEFINE([F2C(name)], [name/**/_],[Define F2C with Trailing Underscore and without Sharp Sign])
+       fi
+else
+               echo "Define C2F without Trailing Underscore"
+       AC_DEFINE([C2F(name)], [name],[Define C2F without Trailing Underscore])
+       AC_DEFINE([F2C(name)], [name],[Define C2F without Trailing Underscore])
+fi
+
+])
\ No newline at end of file
diff --git a/scilab/m4/gtk-2.0.m4 b/scilab/m4/gtk-2.0.m4
new file mode 100644 (file)
index 0000000..36a1f9f
--- /dev/null
@@ -0,0 +1,196 @@
+# Configure paths for GTK+
+# Owen Taylor     1997-2001
+
+dnl AM_PATH_GTK_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]])
+dnl Test for GTK+, and define GTK_CFLAGS and GTK_LIBS, if gthread is specified in MODULES, 
+dnl pass to pkg-config
+dnl
+AC_DEFUN([AM_PATH_GTK_2_0],
+[dnl 
+dnl Get the cflags and libraries from pkg-config
+dnl
+AC_ARG_ENABLE(gtktest, [  --disable-gtktest       do not try to compile and run a test GTK+ program],
+                   , enable_gtktest=yes)
+
+  pkg_config_args=gtk+-2.0
+  for module in . $4
+  do
+      case "$module" in
+         gthread) 
+             pkg_config_args="$pkg_config_args gthread-2.0"
+         ;;
+      esac
+  done
+
+  no_gtk=""
+
+  AC_PATH_PROG(PKG_CONFIG, pkg-config, no)
+
+  if test x$PKG_CONFIG != xno ; then
+    if pkg-config --atleast-pkgconfig-version 0.7 ; then
+      :
+    else
+      echo *** pkg-config too old; version 0.7 or better required.
+      no_gtk=yes
+      PKG_CONFIG=no
+    fi
+  else
+    no_gtk=yes
+  fi
+
+  min_gtk_version=ifelse([$1], ,2.0.0,$1)
+  AC_MSG_CHECKING(for GTK+ - version >= $min_gtk_version)
+
+  if test x$PKG_CONFIG != xno ; then
+    ## don't try to run the test against uninstalled libtool libs
+    if $PKG_CONFIG --uninstalled $pkg_config_args; then
+         echo "Will use uninstalled version of GTK+ found in PKG_CONFIG_PATH"
+         enable_gtktest=no
+    fi
+
+    if $PKG_CONFIG --atleast-version $min_gtk_version $pkg_config_args; then
+         :
+    else
+         no_gtk=yes
+    fi
+  fi
+
+  if test x"$no_gtk" = x ; then
+    GTK_CFLAGS=`$PKG_CONFIG $pkg_config_args --cflags`
+    GTK_LIBS=`$PKG_CONFIG $pkg_config_args --libs`
+    gtk_config_major_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'`
+    gtk_config_minor_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'`
+    gtk_config_micro_version=`$PKG_CONFIG --modversion gtk+-2.0 | \
+           sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'`
+    if test "x$enable_gtktest" = "xyes" ; then
+      ac_save_CFLAGS="$CFLAGS"
+      ac_save_LIBS="$LIBS"
+      CFLAGS="$CFLAGS $GTK_CFLAGS"
+      LIBS="$GTK_LIBS $LIBS"
+dnl
+dnl Now check if the installed GTK+ is sufficiently new. (Also sanity
+dnl checks the results of pkg-config to some extent)
+dnl
+      rm -f conf.gtktest
+      AC_TRY_RUN([
+#include <gtk/gtk.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+int 
+main ()
+{
+  int major, minor, micro;
+  char *tmp_version;
+
+  system ("touch conf.gtktest");
+
+  /* HP/UX 9 (%@#!) writes to sscanf strings */
+  tmp_version = g_strdup("$min_gtk_version");
+  if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, &micro) != 3) {
+     printf("%s, bad version string\n", "$min_gtk_version");
+     exit(1);
+   }
+
+  if ((gtk_major_version != $gtk_config_major_version) ||
+      (gtk_minor_version != $gtk_config_minor_version) ||
+      (gtk_micro_version != $gtk_config_micro_version))
+    {
+      printf("\n*** 'pkg-config --modversion gtk+-2.0' returned %d.%d.%d, but GTK+ (%d.%d.%d)\n", 
+             $gtk_config_major_version, $gtk_config_minor_version, $gtk_config_micro_version,
+             gtk_major_version, gtk_minor_version, gtk_micro_version);
+      printf ("*** was found! If pkg-config was correct, then it is best\n");
+      printf ("*** to remove the old version of GTK+. You may also be able to fix the error\n");
+      printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n");
+      printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n");
+      printf("*** required on your system.\n");
+      printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n");
+      printf("*** to point to the correct configuration files\n");
+    } 
+  else if ((gtk_major_version != GTK_MAJOR_VERSION) ||
+          (gtk_minor_version != GTK_MINOR_VERSION) ||
+           (gtk_micro_version != GTK_MICRO_VERSION))
+    {
+      printf("*** GTK+ header files (version %d.%d.%d) do not match\n",
+            GTK_MAJOR_VERSION, GTK_MINOR_VERSION, GTK_MICRO_VERSION);
+      printf("*** library (version %d.%d.%d)\n",
+            gtk_major_version, gtk_minor_version, gtk_micro_version);
+    }
+  else
+    {
+      if ((gtk_major_version > major) ||
+        ((gtk_major_version == major) && (gtk_minor_version > minor)) ||
+        ((gtk_major_version == major) && (gtk_minor_version == minor) && (gtk_micro_version >= micro)))
+      {
+        return 0;
+       }
+     else
+      {
+        printf("\n*** An old version of GTK+ (%d.%d.%d) was found.\n",
+               gtk_major_version, gtk_minor_version, gtk_micro_version);
+        printf("*** You need a version of GTK+ newer than %d.%d.%d. The latest version of\n",
+              major, minor, micro);
+        printf("*** GTK+ is always available from ftp://ftp.gtk.org.\n");
+        printf("***\n");
+        printf("*** If you have already installed a sufficiently new version, this error\n");
+        printf("*** probably means that the wrong copy of the pkg-config shell script is\n");
+        printf("*** being found. The easiest way to fix this is to remove the old version\n");
+        printf("*** of GTK+, but you can also set the PKG_CONFIG environment to point to the\n");
+        printf("*** correct copy of pkg-config. (In this case, you will have to\n");
+        printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n");
+        printf("*** so that the correct libraries are found at run-time))\n");
+      }
+    }
+  return 1;
+}
+],, no_gtk=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"])
+       CFLAGS="$ac_save_CFLAGS"
+       LIBS="$ac_save_LIBS"
+     fi
+  fi
+  if test "x$no_gtk" = x ; then
+     AC_MSG_RESULT(yes (version $gtk_config_major_version.$gtk_config_minor_version.$gtk_config_micro_version))
+     ifelse([$2], , :, [$2])     
+  else
+     AC_MSG_RESULT(no)
+     if test "$PKG_CONFIG" = "no" ; then
+       echo "*** A new enough version of pkg-config was not found."
+       echo "*** See http://pkgconfig.sourceforge.net"
+     else
+       if test -f conf.gtktest ; then
+        :
+       else
+          echo "*** Could not run GTK+ test program, checking why..."
+         ac_save_CFLAGS="$CFLAGS"
+         ac_save_LIBS="$LIBS"
+          CFLAGS="$CFLAGS $GTK_CFLAGS"
+          LIBS="$LIBS $GTK_LIBS"
+          AC_TRY_LINK([
+#include <gtk/gtk.h>
+#include <stdio.h>
+],      [ return ((gtk_major_version) || (gtk_minor_version) || (gtk_micro_version)); ],
+        [ echo "*** The test program compiled, but did not run. This usually means"
+          echo "*** that the run-time linker is not finding GTK+ or finding the wrong"
+          echo "*** version of GTK+. If it is not finding GTK+, you'll need to set your"
+          echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point"
+          echo "*** to the installed location  Also, make sure you have run ldconfig if that"
+          echo "*** is required on your system"
+         echo "***"
+          echo "*** If you have an old version installed, it is best to remove it, although"
+          echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ],
+        [ echo "*** The test program failed to compile or link. See the file config.log for the"
+          echo "*** exact error that occured. This usually means GTK+ is incorrectly installed."])
+          CFLAGS="$ac_save_CFLAGS"
+          LIBS="$ac_save_LIBS"
+       fi
+     fi
+     GTK_CFLAGS=""
+     GTK_LIBS=""
+     ifelse([$3], , :, [$3])
+  fi
+  AC_SUBST(GTK_CFLAGS)
+  AC_SUBST(GTK_LIBS)
+  rm -f conf.gtktest
+])
diff --git a/scilab/m4/java.old.m4 b/scilab/m4/java.old.m4
new file mode 100644 (file)
index 0000000..1ca9651
--- /dev/null
@@ -0,0 +1,96 @@
+dnl ===============================================================
+dnl Available from the GNU Autoconf Macro Archive at:
+dnl http://www.gnu.org/software/ac-archive/htmldoc/ac_jni_include_dirs.html
+dnl 
+dnl Some other macros about java environment detection can be found at :
+dnl http://tcljava.sourceforge.net/docs/website/index.html
+dnl ===============================================================
+
+AC_DEFUN([AC_JNI_INCLUDE_DIR],[
+
+       JNI_INCLUDE_DIRS=""
+       test "x$JAVAC" = x && AC_MSG_ERROR(['$JAVAC' undefined])
+       AC_PATH_PROG(_ACJNI_JAVAC, $JAVAC, no)
+       test "x$_ACJNI_JAVAC" = xno && AC_MSG_ERROR([$JAVAC could not be found in path])
+       
+       _ACJNI_FOLLOW_SYMLINKS("$_ACJNI_JAVAC")
+       
+       AC_MSG_CHECKING([for java headers])
+       
+       _JTOPDIR=`echo "$_ACJNI_FOLLOWED" | sed -e 's://*:/:g' -e 's:/[[^/]]*$::'`
+       case "$host_os" in
+               darwin*)
+                       _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+                       _JINC="$_JTOPDIR/Headers";;
+               *)
+                       _JINC="$_JTOPDIR/include";;
+       esac
+       
+       if test -f "$_JINC/jni.h"; then
+               JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JINC"
+       else
+               _JTOPDIR=`echo "$_JTOPDIR" | sed -e 's:/[[^/]]*$::'`
+               if test -f "$_JTOPDIR/include/jni.h"; then
+                       JNI_INCLUDE_DIRS="$JNI_INCLUDE_DIRS $_JTOPDIR/include"
+               else
+                       JAVASCITARGET=javasci-bidon
+                       AC_MSG_WARN([jni.h not found: I will not build the java interface])
+               fi
+       fi
+       
+       if test "$JAVASCITARGET" = scilex-lib; then
+       
+               # get the likely subdirectories for system specific java includes
+               case "$host_os" in
+               bsdi*)
+                       _JNI_INC_SUBDIRS="bsdos";;
+               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
+               
+               AC_MSG_RESULT($JNI_INCLUDE_DIRS)
+       fi
+])
+
+dnl ===============================================================
+dnl _ACJNI_FOLLOW_SYMLINKS <path>
+dnl Follows symbolic links on <path>,
+dnl finally setting variable _ACJNI_FOLLOWED
+dnl ===============================================================
+
+AC_DEFUN([_ACJNI_FOLLOW_SYMLINKS],[
+       
+       dnl 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
\ No newline at end of file
diff --git a/scilab/m4/libs_by_debian.m4 b/scilab/m4/libs_by_debian.m4
new file mode 100644 (file)
index 0000000..2964b27
--- /dev/null
@@ -0,0 +1,503 @@
+# This file is part of Autoconf.                       -*- Autoconf -*-
+# Checking for libraries.
+# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
+# 2002, 2003, 2004, 2005, 2006 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., 51 Franklin Street, Fifth Floor, Boston, MA
+# 02110-1301, USA.
+
+# As a special exception, the Free Software Foundation gives unlimited
+# permission to copy, distribute and modify the configure scripts that
+# are the output of Autoconf.  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 Autoconf appear in them.  The GNU
+# General Public License (GPL) does govern all other use of the material
+# that constitutes the Autoconf program.
+#
+# Certain portions of the Autoconf source text are designed to be copied
+# (in certain cases, depending on the input) into the output of
+# Autoconf.  We call these the "data" portions.  The rest of the Autoconf
+# source text consists of comments plus executable code that decides which
+# of the data portions to output in any given case.  We call these
+# comments and executable code the "non-data" portions.  Autoconf never
+# copies any of the non-data portions into its output.
+#
+# This special exception to the GPL applies to versions of Autoconf
+# released by the Free Software Foundation.  When you make and
+# distribute a modified version of Autoconf, you may extend this special
+# exception to the GPL to apply to your modified version as well, *unless*
+# your modified version has the potential to copy into its output some
+# of the text that was the non-data portion of the version that you started
+# with.  (In other words, unless your change moves or copies text from
+# the non-data portions to the data portions.)  If your modification has
+# such potential, you must delete any notice of this special exception
+# to the GPL from your modified version.
+#
+# Written by David MacKenzie, with help from
+# Franc,ois Pinard, Karl Berry, Richard Pixley, Ian Lance Taylor,
+# Roland McGrath, Noah Friedman, david d zuhn, and many others.
+
+# Table of contents
+#
+# 1. Generic tests for libraries
+# 2. Tests for specific libraries
+
+
+## --------------------------------- ##
+## 1. Generic tests for libraries.## ##
+## --------------------------------- ##
+
+
+
+# AC_SEARCH_LIBS(FUNCTION, SEARCH-LIBS,
+#                [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+#                [OTHER-LIBRARIES])
+# --------------------------------------------------------
+# Search for a library defining FUNC, if it's not already available.
+AC_DEFUN([AC_SEARCH_LIBS],
+[AS_VAR_PUSHDEF([ac_Search], [ac_cv_search_$1])dnl
+AC_CACHE_CHECK([for library containing $1], ac_Search,
+[ac_func_search_save_LIBS=$LIBS
+AC_LANG_CONFTEST([AC_LANG_CALL([], [$1])])
+for ac_lib in '' $2; do
+  if test -z "$ac_lib"; then
+    ac_res="none required"
+  else
+    ac_res=-l$ac_lib
+    LIBS="-l$ac_lib $5 $ac_func_search_save_LIBS"
+  fi
+  AC_LINK_IFELSE([], [AS_VAR_SET(ac_Search, [$ac_res])])
+  AS_VAR_SET_IF(ac_Search, [break])dnl
+done
+AS_VAR_SET_IF(ac_Search, , [AS_VAR_SET(ac_Search, [no])])dnl
+rm conftest.$ac_ext
+LIBS=$ac_func_search_save_LIBS])
+ac_res=AS_VAR_GET(ac_Search)
+AS_IF([test "$ac_res" != no],
+  [test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
+  $3],
+      [$4])dnl
+AS_VAR_POPDEF([ac_Search])dnl
+])
+
+
+
+# AC_CHECK_LIB(LIBRARY, FUNCTION,
+#              [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+#              [OTHER-LIBRARIES])
+# ------------------------------------------------------
+#
+# Use a cache variable name containing both the library and function name,
+# because the test really is for library $1 defining function $2, not
+# just for library $1.  Separate tests with the same $1 and different $2s
+# may have different results.
+#
+# Note that using directly AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])
+# is asking for troubles, since AC_CHECK_LIB($lib, fun) would give
+# ac_cv_lib_$lib_fun, which is definitely not what was meant.  Hence
+# the AS_LITERAL_IF indirection.
+#
+# FIXME: This macro is extremely suspicious.  It DEFINEs unconditionally,
+# whatever the FUNCTION, in addition to not being a *S macro.  Note
+# that the cache does depend upon the function we are looking for.
+#
+# It is on purpose we used `ac_check_lib_save_LIBS' and not just
+# `ac_save_LIBS': there are many macros which don't want to see `LIBS'
+# changed but still want to use AC_CHECK_LIB, so they save `LIBS'.
+# And ``ac_save_LIBS' is too tempting a name, so let's leave them some
+# freedom.
+AC_DEFUN([AC_CHECK_LIB],
+[m4_ifval([$3], , [AH_CHECK_LIB([$1])])dnl
+AS_LITERAL_IF([$1],
+             [AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1_$2])],
+             [AS_VAR_PUSHDEF([ac_Lib], [ac_cv_lib_$1''_$2])])dnl
+AC_CACHE_CHECK([for $2 in -l$1], ac_Lib,
+[ac_check_lib_save_LIBS=$LIBS
+LIBS="-l$1 $5 $LIBS"
+AC_LINK_IFELSE([AC_LANG_CALL([], [$2])],
+              [AS_VAR_SET(ac_Lib, yes)],
+              [AS_VAR_SET(ac_Lib, no)])
+LIBS=$ac_check_lib_save_LIBS])
+AS_IF([test AS_VAR_GET(ac_Lib) = yes],
+      [m4_default([$3], [AC_DEFINE_UNQUOTED(AS_TR_CPP(HAVE_LIB$1))
+  LIBS="-l$1 $LIBS"
+])],
+      [$4])dnl
+AS_VAR_POPDEF([ac_Lib])dnl
+])# AC_CHECK_LIB
+
+
+# AH_CHECK_LIB(LIBNAME)
+# ---------------------
+m4_define([AH_CHECK_LIB],
+[AH_TEMPLATE(AS_TR_CPP(HAVE_LIB$1),
+            [Define to 1 if you have the `]$1[' library (-l]$1[).])])
+
+
+# AC_HAVE_LIBRARY(LIBRARY,
+#                 [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND],
+#                 [OTHER-LIBRARIES])
+# ---------------------------------------------------------
+#
+# This macro is equivalent to calling `AC_CHECK_LIB' with a FUNCTION
+# argument of `main'.  In addition, LIBRARY can be written as any of
+# `foo', `-lfoo', or `libfoo.a'.  In all of those cases, the compiler
+# is passed `-lfoo'.  However, LIBRARY cannot be a shell variable;
+# it must be a literal name.
+AU_DEFUN([AC_HAVE_LIBRARY],
+[m4_pushdef([AC_Lib_Name],
+           m4_bpatsubst(m4_bpatsubst([[$1]],
+                                   [lib\([^\.]*\)\.a], [\1]),
+                       [-l], []))dnl
+AC_CHECK_LIB(AC_Lib_Name, main, [$2], [$3], [$4])dnl
+ac_cv_lib_[]AC_Lib_Name()=ac_cv_lib_[]AC_Lib_Name()_main
+m4_popdef([AC_Lib_Name])dnl
+])
+
+
+
+
+## --------------------------------- ##
+## 2. Tests for specific libraries.  ##
+## --------------------------------- ##
+
+
+
+# --------------------- #
+# Checks for X window.  #
+# --------------------- #
+
+
+# _AC_PATH_X_XMKMF
+# ----------------
+# Internal subroutine of _AC_PATH_X.
+# Set ac_x_includes and/or ac_x_libraries.
+m4_define([_AC_PATH_X_XMKMF],
+[AC_ARG_VAR(XMKMF, [Path to xmkmf, Makefile generator for X Window System])dnl
+rm -f -r conftest.dir
+if mkdir conftest.dir; then
+  cd conftest.dir
+  cat >Imakefile <<'_ACEOF'
+incroot:
+       @echo incroot='${INCROOT}'
+usrlibdir:
+       @echo usrlibdir='${USRLIBDIR}'
+libdir:
+       @echo libdir='${LIBDIR}'
+_ACEOF
+  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
+    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+    for ac_var in incroot usrlibdir libdir; do
+      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
+    done
+    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
+    for ac_extension in a so sl; do
+      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
+        test -f "$ac_im_libdir/libX11.$ac_extension"; then
+       ac_im_usrlibdir=$ac_im_libdir; break
+      fi
+    done
+    # Screen out bogus values from the imake configuration.  They are
+    # bogus both because they are the default anyway, and because
+    # using them would break gcc on systems where it needs fixed includes.
+    case $ac_im_incroot in
+       /usr/include) ac_x_includes= ;;
+       *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
+    esac
+    case $ac_im_usrlibdir in
+       /usr/lib | /lib) ;;
+       *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
+    esac
+  fi
+  cd ..
+  rm -f -r conftest.dir
+fi
+])# _AC_PATH_X_XMKMF
+
+
+# _AC_PATH_X_DIRECT
+# -----------------
+# Internal subroutine of _AC_PATH_X.
+# Set ac_x_includes and/or ac_x_libraries.
+m4_define([_AC_PATH_X_DIRECT],
+[# Standard set of common directories for X headers.
+# Check X11 before X11Rn because it is often a symlink to the current release.
+ac_x_header_dirs='
+/usr/X11/include
+/usr/X11R6/include
+/usr/X11R5/include
+/usr/X11R4/include
+
+/usr/include/X11
+/usr/include/X11R6
+/usr/include/X11R5
+/usr/include/X11R4
+
+/usr/local/X11/include
+/usr/local/X11R6/include
+/usr/local/X11R5/include
+/usr/local/X11R4/include
+
+/usr/local/include/X11
+/usr/local/include/X11R6
+/usr/local/include/X11R5
+/usr/local/include/X11R4
+
+/usr/X386/include
+/usr/x386/include
+/usr/XFree86/include/X11
+
+/usr/include
+/usr/local/include
+/usr/unsupported/include
+/usr/athena/include
+/usr/local/x11r5/include
+/usr/lpp/Xamples/include
+
+/usr/openwin/include
+/usr/openwin/share/include'
+
+if test "$ac_x_includes" = no; then
+  # Guess where to find include files, by looking for Xlib.h.
+  # First, try using that file with no special directory specified.
+  AC_PREPROC_IFELSE([AC_LANG_SOURCE([@%:@include <X11/Xlib.h>])],
+[# We can compile using X headers with no special include directory.
+ac_x_includes=],
+[for ac_dir in $ac_x_header_dirs; do
+  if test -r "$ac_dir/X11/Xlib.h"; then
+    ac_x_includes=$ac_dir
+    break
+  fi
+done])
+fi # $ac_x_includes = no
+
+if test "$ac_x_libraries" = no; then
+  # Check for the libraries.
+  # See if we find them without any special options.
+  # Don't add to $LIBS permanently.
+  ac_save_LIBS=$LIBS
+  LIBS="-lXt $LIBS"
+  AC_LINK_IFELSE([AC_LANG_PROGRAM([@%:@include <X11/Xlib.h>],
+                                 [XrmInitialize ()])],
+                [LIBS=$ac_save_LIBS
+# We can link X programs with no special library path.
+ac_x_libraries=],
+                [LIBS=$ac_save_LIBS
+for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
+do
+  # Don't even attempt the hair of trying to link an X program!
+  for ac_extension in a so sl; do
+    if test -r "$ac_dir/libXt.$ac_extension"; then
+      ac_x_libraries=$ac_dir
+      break 2
+    fi
+  done
+done])
+fi # $ac_x_libraries = no
+])# _AC_PATH_X_DIRECT
+
+
+# _AC_PATH_X
+# ----------
+# Compute ac_cv_have_x.
+AC_DEFUN([_AC_PATH_X],
+[AC_CACHE_VAL(ac_cv_have_x,
+[# One or both of the vars are not set, and there is no cached value.
+ac_x_includes=no ac_x_libraries=no
+_AC_PATH_X_XMKMF
+_AC_PATH_X_DIRECT
+case $ac_x_includes,$ac_x_libraries in #(
+  no,* | *,no | *\'*)
+    # Didn't find X, or a directory has "'" in its name.
+    ac_cv_have_x="have_x=no";; #(
+  *)
+    # Record where we found X for the cache.
+    ac_cv_have_x="have_x=yes\
+       ac_x_includes='$ac_x_includes'\
+       ac_x_libraries='$ac_x_libraries'"
+esac])dnl
+])
+
+
+# AC_PATH_X
+# ---------
+# If we find X, set shell vars x_includes and x_libraries to the
+# paths, otherwise set no_x=yes.
+# Uses ac_ vars as temps to allow command line to override cache and checks.
+# --without-x overrides everything else, but does not touch the cache.
+AN_HEADER([X11/Xlib.h],  [AC_PATH_X])
+AC_DEFUN([AC_PATH_X],
+[dnl Document the X abnormal options inherited from history.
+m4_divert_once([HELP_BEGIN], [
+X features:
+  --x-includes=DIR    X include files are in DIR
+  --x-libraries=DIR   X library files are in DIR])dnl
+AC_MSG_CHECKING([for X])
+
+AC_ARG_WITH(x, [  --with-x                use the X Window System])
+# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
+if test "x$with_x" = xno; then
+  # The user explicitly disabled X.
+  have_x=disabled
+else
+  case $x_includes,$x_libraries in #(
+    *\'*) AC_MSG_ERROR([Cannot use X directory names containing ']);; #(
+    *,NONE | NONE,*) _AC_PATH_X;; #(
+    *) have_x=yes;;
+  esac
+  eval "$ac_cv_have_x"
+fi # $with_x != no
+
+if test "$have_x" != yes; then
+  AC_MSG_RESULT([$have_x])
+  no_x=yes
+else
+  # If each of the values was on the command line, it overrides each guess.
+  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
+  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
+  # Update the cache value to reflect the command line values.
+  ac_cv_have_x="have_x=yes\
+       ac_x_includes='$x_includes'\
+       ac_x_libraries='$x_libraries'"
+  AC_MSG_RESULT([libraries $x_libraries, headers $x_includes])
+fi
+])# AC_PATH_X
+
+
+
+# AC_PATH_XTRA
+# ------------
+# Find additional X libraries, magic flags, etc.
+AC_DEFUN([AC_PATH_XTRA],
+[AC_REQUIRE([AC_PATH_X])dnl
+if test "$no_x" = yes; then
+  # Not all programs may use this symbol, but it does not hurt to define it.
+  AC_DEFINE([X_DISPLAY_MISSING], 1,
+           [Define to 1 if the X Window System is missing or not being used.])
+  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
+else
+  if test -n "$x_includes"; then
+    X_CFLAGS="$X_CFLAGS -I$x_includes"
+  fi
+
+  # It would also be nice to do this for all -L options, not just this one.
+  if test -n "$x_libraries"; then
+    X_LIBS="$X_LIBS -L$x_libraries"
+dnl FIXME: banish uname from this macro!
+    # For Solaris; some versions of Sun CC require a space after -R and
+    # others require no space.  Words are not sufficient . . . .
+    case `(uname -sr) 2>/dev/null` in
+    "SunOS 5"*)
+      AC_MSG_CHECKING([whether -R must be followed by a space])
+      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
+      AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_R_nospace=yes, ac_R_nospace=no)
+      if test $ac_R_nospace = yes; then
+       AC_MSG_RESULT([no])
+       X_LIBS="$X_LIBS -R$x_libraries"
+      else
+       LIBS="$ac_xsave_LIBS -R $x_libraries"
+       AC_LINK_IFELSE([AC_LANG_PROGRAM()], ac_R_space=yes, ac_R_space=no)
+       if test $ac_R_space = yes; then
+         AC_MSG_RESULT([yes])
+         X_LIBS="$X_LIBS -R $x_libraries"
+       else
+         AC_MSG_RESULT([neither works])
+       fi
+      fi
+      LIBS=$ac_xsave_LIBS
+    esac
+  fi
+
+  # Check for system-dependent libraries X programs must link with.
+  # Do this before checking for the system-independent R6 libraries
+  # (-lICE), since we may need -lsocket or whatever for X linking.
+
+  if test "$ISC" = yes; then
+    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
+  else
+    # Martyn Johnson says this is needed for Ultrix, if the X
+    # libraries were built with DECnet support.  And Karl Berry says
+    # the Alpha needs dnet_stub (dnet does not exist).
+    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
+    AC_LINK_IFELSE([AC_LANG_CALL([], [XOpenDisplay])],
+                  [],
+    [AC_CHECK_LIB(dnet, dnet_ntoa, [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"])
+    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
+      AC_CHECK_LIB(dnet_stub, dnet_ntoa,
+       [X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"])
+    fi])
+    LIBS="$ac_xsave_LIBS"
+
+    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
+    # to get the SysV transport functions.
+    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
+    # needs -lnsl.
+    # The nsl library prevents programs from opening the X display
+    # on Irix 5.2, according to T.E. Dickey.
+    # The functions gethostbyname, getservbyname, and inet_addr are
+    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
+    AC_CHECK_FUNC(gethostbyname)
+    if test $ac_cv_func_gethostbyname = no; then
+      AC_CHECK_LIB(nsl, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl")
+      if test $ac_cv_lib_nsl_gethostbyname = no; then
+       AC_CHECK_LIB(bsd, gethostbyname, X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd")
+      fi
+    fi
+
+    # lieder@skyler.mavd.honeywell.com says without -lsocket,
+    # socket/setsockopt and other routines are undefined under SCO ODT
+    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
+    # on later versions), says Simon Leinen: it contains gethostby*
+    # variants that don't use the name server (or something).  -lsocket
+    # must be given before -lnsl if both are needed.  We assume that
+    # if connect needs -lnsl, so does gethostbyname.
+    AC_CHECK_FUNC(connect)
+    if test $ac_cv_func_connect = no; then
+      AC_CHECK_LIB(socket, connect, X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS", ,
+       $X_EXTRA_LIBS)
+    fi
+
+    # Guillermo Gomez says -lposix is necessary on A/UX.
+    AC_CHECK_FUNC(remove)
+    if test $ac_cv_func_remove = no; then
+      AC_CHECK_LIB(posix, remove, X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix")
+    fi
+
+    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
+    AC_CHECK_FUNC(shmat)
+    if test $ac_cv_func_shmat = no; then
+      AC_CHECK_LIB(ipc, shmat, X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc")
+    fi
+  fi
+
+  # Check for libraries that X11R6 Xt/Xaw programs need.
+  ac_save_LDFLAGS=$LDFLAGS
+  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
+  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
+  # check for ICE first), but we must link in the order -lSM -lICE or
+  # we get undefined symbols.  So assume we have SM if we have ICE.
+  # These have to be linked with before -lX11, unlike the other
+  # libraries we check for below, so use a different variable.
+  # John Interrante, Karl Berry
+  AC_CHECK_LIB(ICE, IceConnectionNumber,
+    [X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"], , $X_EXTRA_LIBS)
+  LDFLAGS=$ac_save_LDFLAGS
+
+fi
+AC_SUBST(X_CFLAGS)dnl
+AC_SUBST(X_PRE_LIBS)dnl
+AC_SUBST(X_LIBS)dnl
+AC_SUBST(X_EXTRA_LIBS)dnl
+])# AC_PATH_XTRA
diff --git a/scilab/m4/ltoptions.m4 b/scilab/m4/ltoptions.m4
new file mode 100644 (file)
index 0000000..da035ab
--- /dev/null
@@ -0,0 +1,380 @@
+# Helper functions for option handling.                    -*- Autoconf -*-
+
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan <gary@gnu.org>
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 3 ltoptions.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])])
+
+
+# _LT_MANGLE_OPTION(NAME)
+# -----------------------
+m4_define([_LT_MANGLE_OPTION],
+[[_LT_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+
+# _LT_SET_OPTION(NAME)
+# --------------------
+# Set option NAME, and if there is a matching handler defined,
+# dispatch to it.  Other NAMEs are saved as a flag.
+m4_define([_LT_SET_OPTION],
+[m4_define(_LT_MANGLE_OPTION([$1]))dnl
+m4_ifdef(_LT_MANGLE_DEFUN([$1]),
+        _LT_MANGLE_DEFUN([$1]),
+    [m4_warning([Unknown Libtool option `$1'])])[]dnl
+])
+
+
+# _LT_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+m4_define([_LT_IF_OPTION],
+[m4_ifdef(_LT_MANGLE_OPTION([$1]), [$2], [$3])])
+
+
+# _LT_UNLESS_OPTIONS(OPTIONS, IF-NOT-SET)
+# ---------------------------------------
+# Execute IF-NOT-SET if all OPTIONS are not set.
+m4_define([_LT_UNLESS_OPTIONS],
+[m4_foreach([_LT_Option], m4_split(m4_normalize([$1])),
+           [m4_ifdef(_LT_MANGLE_OPTION(_LT_Option),
+                     [m4_define([$0_found])])])[]dnl
+m4_ifdef([$0_found], [m4_undefine([$0_found])], [$2
+])[]dnl
+])
+
+
+# _LT_SET_OPTIONS(OPTIONS)
+# ------------------------
+# OPTIONS is a space-separated list of Libtool options.
+# If any OPTION has a handler macro declared with LT_OPTION_DEFINE,
+# dispatch to that macro; otherwise complain about the unknown option
+# and exit.
+m4_defun([_LT_SET_OPTIONS],
+[# Set options
+m4_foreach([_LT_Option], m4_split(m4_normalize([$1])),
+    [_LT_SET_OPTION(_LT_Option)])
+dnl
+dnl Simply set some default values (i.e off) if boolean options were not
+dnl specified:
+_LT_UNLESS_OPTIONS([dlopen], [enable_dlopen=no
+])
+_LT_UNLESS_OPTIONS([win32-dll], [enable_win32_dll=no
+])
+dnl
+dnl If no reference was made to various pairs of opposing options, then
+dnl we run the default mode handler for the pair.  For example, if neither
+dnl `shared' nor `disable-shared' was passed, we enable building of shared
+dnl archives by default:
+_LT_UNLESS_OPTIONS([shared disable-shared], [_LT_ENABLE_SHARED])
+_LT_UNLESS_OPTIONS([static disable-static], [_LT_ENABLE_STATIC])
+_LT_UNLESS_OPTIONS([pic-only no-pic], [_LT_WITH_PIC])
+_LT_UNLESS_OPTIONS([fast-install disable-fast-install],
+                  [_LT_ENABLE_FAST_INSTALL])
+])# _LT_SET_OPTIONS
+
+
+## --------------------------------- ##
+## Macros to handle LT_INIT options. ##
+## --------------------------------- ##
+
+m4_define([_LT_MANGLE_DEFUN],
+[[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1]), [[^A-Z0-9_]], [_])])
+
+
+# LT_OPTION_DEFINE(NAME, CODE)
+# ----------------------------
+m4_define([LT_OPTION_DEFINE],
+[m4_define(_LT_MANGLE_DEFUN([$1]), [$2])[]dnl
+])# LT_OPTION_DEFINE
+
+
+# dlopen
+# ------
+LT_OPTION_DEFINE([dlopen], [enable_dlopen=yes
+])
+
+AU_DEFUN([AC_LIBTOOL_DLOPEN],
+[_LT_SET_OPTION([dlopen])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `dlopen' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], [])
+
+
+# win32-dll
+# ---------
+# Declare package support for building win32 dll's.
+LT_OPTION_DEFINE([win32-dll],
+[enable_win32_dll=yes
+
+case $host in
+*-*-cygwin* | *-*-mingw* | *-*-pw32*)
+  AC_CHECK_TOOL(AS, as, false)
+  AC_CHECK_TOOL(DLLTOOL, dlltool, false)
+  AC_CHECK_TOOL(OBJDUMP, objdump, false)
+  ;;
+esac
+
+test -z "$AS" && AS=as
+_LT_DECL([], [AS],      [0], [Assembler program])dnl
+
+test -z "$DLLTOOL" && DLLTOOL=dlltool
+_LT_DECL([], [DLLTOOL], [0], [DLL creation program])dnl
+
+test -z "$OBJDUMP" && OBJDUMP=objdump
+_LT_DECL([], [OBJDUMP], [0], [Object dumper program])dnl
+])# win32-dll
+
+AU_DEFUN([AC_LIBTOOL_WIN32_DLL],
+[_LT_SET_OPTION([win32-dll])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `win32-dll' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [])
+
+
+# _LT_ENABLE_SHARED([DEFAULT])
+# ----------------------------
+# implement the --enable-shared flag, and supports the `shared' and
+# `disable-shared' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_SHARED],
+[m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([shared],
+    [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@],
+       [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_shared=yes ;;
+    no) enable_shared=no ;;
+    *)
+      enable_shared=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_shared=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_shared=]_LT_ENABLE_SHARED_DEFAULT)
+
+    _LT_DECL([build_libtool_libs], [enable_shared], [0],
+       [Whether or not to build shared libraries])
+])# _LT_ENABLE_SHARED
+
+LT_OPTION_DEFINE([shared], [_LT_ENABLE_SHARED([yes])])
+LT_OPTION_DEFINE([disable-shared], [_LT_ENABLE_SHARED([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_SHARED],
+[_LT_SET_OPTION([shared])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `shared' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AM_ENABLE_SHARED],
+[_LT_SET_OPTION([shared])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `shared' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_SHARED],
+[_LT_SET_OPTION([disable-shared])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-shared' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AM_DISABLE_SHARED],
+[_LT_SET_OPTION([disable-shared])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-shared' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_SHARED], [])
+dnl AC_DEFUN([AM_ENABLE_SHARED], [])
+dnl AC_DEFUN([AC_DISABLE_SHARED], [])
+dnl AC_DEFUN([AM_DISABLE_SHARED], [])
+
+
+
+# _LT_ENABLE_STATIC([DEFAULT])
+# ----------------------------
+# implement the --enable-static flag, and support the `static' and
+# `disable-static' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_STATIC],
+[m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([static],
+    [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@],
+       [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_static=yes ;;
+    no) enable_static=no ;;
+    *)
+     enable_static=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_static=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_static=]_LT_ENABLE_STATIC_DEFAULT)
+
+    _LT_DECL([build_old_libs], [enable_static], [0],
+       [Whether or not to build static libraries])
+])# _LT_ENABLE_STATIC
+
+LT_OPTION_DEFINE([static], [_LT_ENABLE_STATIC([yes])])
+LT_OPTION_DEFINE([disable-static], [_LT_ENABLE_STATIC([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_STATIC],
+[_LT_SET_OPTION([static])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `static' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AM_ENABLE_STATIC],
+[_LT_SET_OPTION([static])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `static' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_STATIC],
+[_LT_SET_OPTION([disable-static])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-static' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AM_DISABLE_STATIC],
+[_LT_SET_OPTION([disable-static])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-static' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_STATIC], [])
+dnl AC_DEFUN([AM_ENABLE_STATIC], [])
+dnl AC_DEFUN([AC_DISABLE_STATIC], [])
+dnl AC_DEFUN([AM_DISABLE_STATIC], [])
+
+
+
+# _LT_ENABLE_FAST_INSTALL([DEFAULT])
+# ----------------------------------
+# implement the --enable-fast-install flag, and support the `fast-install'
+# and `disable-fast-install' LT_INIT options.
+# DEFAULT is either `yes' or `no'.  If omitted, it defaults to `yes'.
+m4_define([_LT_ENABLE_FAST_INSTALL],
+[m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl
+AC_ARG_ENABLE([fast-install],
+    [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@],
+    [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])],
+    [p=${PACKAGE-default}
+    case $enableval in
+    yes) enable_fast_install=yes ;;
+    no) enable_fast_install=no ;;
+    *)
+      enable_fast_install=no
+      # Look at the argument we got.  We use all the common list separators.
+      lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR,"
+      for pkg in $enableval; do
+       IFS="$lt_save_ifs"
+       if test "X$pkg" = "X$p"; then
+         enable_fast_install=yes
+       fi
+      done
+      IFS="$lt_save_ifs"
+      ;;
+    esac],
+    [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT)
+
+_LT_DECL([fast_install], [enable_fast_install], [0],
+        [Whether or not to optimize for fast installation])dnl
+])# _LT_ENABLE_FAST_INSTALL
+
+LT_OPTION_DEFINE([fast-install], [_LT_ENABLE_FAST_INSTALL([yes])])
+LT_OPTION_DEFINE([disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])])
+
+# Old names:
+AU_DEFUN([AC_ENABLE_FAST_INSTALL],
+[_LT_SET_OPTION([fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `fast-install' option into LT_INIT's first parameter.])
+])
+
+AU_DEFUN([AC_DISABLE_FAST_INSTALL],
+[_LT_SET_OPTION([disable-fast-install])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you put
+the `disable-fast-install' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], [])
+dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], [])
+
+
+# _LT_WITH_PIC([MODE])
+# --------------------
+# implement the --with-pic flag, and support the `pic-only' and `no-pic'
+# LT_INIT options.
+# MODE is either `yes' or `no'.  If omitted, it defaults to `both'.
+m4_define([_LT_WITH_PIC],
+[AC_ARG_WITH([pic],
+    [AS_HELP_STRING([--with-pic],
+       [try to use only PIC/non-PIC objects @<:@default=use both@:>@])],
+    [pic_mode="$withval"],
+    [pic_mode=default])
+
+test -z "$pic_mode" && pic_mode=m4_default([$1], [default])
+
+_LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl
+])# _LT_WITH_PIC
+
+LT_OPTION_DEFINE([pic-only], [_LT_WITH_PIC([yes])])
+LT_OPTION_DEFINE([no-pic], [_LT_WITH_PIC([no])])
+
+# Old name:
+AU_DEFUN([AC_LIBTOOL_PICMODE],
+[_LT_SET_OPTION([pic-only])
+AC_DIAGNOSE([obsolete],
+[$0: Remove this warning and the call to _LT_SET_OPTION when you
+put the `pic-only' option into LT_INIT's first parameter.])
+])
+
+dnl aclocal-1.4 backwards compatibility:
+dnl AC_DEFUN([AC_LIBTOOL_PICMODE], [])
diff --git a/scilab/m4/ltsugar.m4 b/scilab/m4/ltsugar.m4
new file mode 100644 (file)
index 0000000..fc51dc7
--- /dev/null
@@ -0,0 +1,111 @@
+# ltsugar.m4 -- libtool m4 base layer.                         -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Written by Gary V. Vaughan.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 3 ltsugar.m4
+
+# This is to help aclocal find these macros, as it can't see m4_define.
+AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])])
+
+
+# lt_join(SEP, ARG1, [ARG2...])
+# -----------------------------
+# Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their
+# associated separator.
+m4_define([lt_join],
+[m4_case([$#],
+        [0], [m4_fatal([$0: too few arguments: $#])],
+        [1], [],
+        [2], [[$2]],
+        [m4_ifval([$2],
+                  [[$2][]m4_foreach(_lt_Arg, lt_car([m4_shiftn(2, $@)]),
+                          [_$0([$1], _lt_Arg)])],
+                  [$0([$1], m4_shiftn(2, $@))])])[]dnl
+])
+m4_define([_lt_join],
+[m4_ifval([$2],[$1][$2])[]dnl
+])
+
+
+# lt_car(LIST)
+# lt_cdr(LIST)
+# ------------
+# Manipulate m4 lists.
+# These macros are necessary as long as will still need to support
+# Autoconf-2.59 which quotes differently.
+m4_define([lt_car], [[$1]])
+m4_define([lt_cdr],
+[m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])],
+       [$#], 1, [],
+       [m4_dquote(m4_shift($@))])])
+m4_define([lt_unquote], $1)
+
+
+# lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...])
+# ----------------------------------------------------------
+# Produce a SEP delimited list of all paired combinations of elements of
+# PREFIX-LIST with SUFFIX1 through SUFFIXn.  Each element of the list
+# has the form PREFIXmINFIXSUFFIXn.
+m4_define([lt_combine],
+[m4_if([$2], [], [],
+  [m4_if([$4], [], [],
+    [lt_join(m4_quote(m4_default([$1], [[, ]])),
+      lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_prefix, [$2],
+                          [m4_foreach(_Lt_suffix, lt_car([m4_shiftn(3, $@)]),
+                              [_Lt_prefix[]$3[]_Lt_suffix ])])))))])])dnl
+])
+
+
+# lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ])
+# -----------------------------------------------------------------------
+# Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited
+# by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ.
+m4_define([lt_if_append_uniq],
+[m4_ifdef([$1],
+       [m4_bmatch($3[]m4_defn([$1])$3, $3[]m4_re_escape([$2])$3,
+               [$5],
+           [m4_append([$1], [$2], [$3])$4])],
+    [m4_append([$1], [$2], [$3])$4])])
+
+
+# lt_dict_add(DICT, KEY, VALUE)
+# -----------------------------
+m4_define([lt_dict_add],
+[m4_define([$1($2)], [$4])])
+
+
+# lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE)
+# --------------------------------------------
+m4_define([lt_dict_add_subkey],
+[m4_define([$1($2:$3)], [$4])])
+
+
+# lt_dict_fetch(DICT, KEY, [SUBKEY])
+# ----------------------------------
+m4_define([lt_dict_fetch],
+[m4_ifval([$3],
+       m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]),
+    m4_ifdef([$1($2)], [m4_defn([$1($2)])]))])
+
+
+# lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE])
+# -----------------------------------------------------------------
+m4_define([lt_if_dict_fetch],
+[m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4],
+       [$5],
+    [$6])])
+
+
+# lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...])
+# --------------------------------------------------------------
+m4_define([lt_dict_filter],
+[m4_if([$5], [], [],
+  [lt_join(m4_quote(m4_default([$4], [[, ]])),
+           lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]),
+                     [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl
+])
diff --git a/scilab/m4/ltversion.m4 b/scilab/m4/ltversion.m4
new file mode 100644 (file)
index 0000000..a4baa85
--- /dev/null
@@ -0,0 +1,23 @@
+# ltversion.m4 -- version numbers                      -*- Autoconf -*-
+#
+# Copyright (C) 2004 Free Software Foundation, Inc.
+# Written by Scott James Remnant.
+#
+## This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# Generated from ltversion.in; do not edit by hand
+
+# serial 2316 ltversion.m4
+# This file is part of GNU Libtool
+
+m4_define([LT_PACKAGE_VERSION], [2.1a])
+m4_define([LT_PACKAGE_REVISION], [1.2316])
+
+AC_DEFUN([LTVERSION_VERSION],
+[macro_version='2.1a'
+macro_revision='1.2316'
+_LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?])
+_LT_DECL(, macro_revision, 0)
+])
diff --git a/scilab/m4/lt~obsolete.m4 b/scilab/m4/lt~obsolete.m4
new file mode 100644 (file)
index 0000000..74f5746
--- /dev/null
@@ -0,0 +1,89 @@
+# lt~obsolete.m4 -- aclocal satisfying obsolete definitions.    -*-Autoconf-*-
+#
+# Copyright (C) 2004, 2005 Free Software Foundation, Inc.
+# Written by Scott James Remnant.
+#
+# This file is free software; the Free Software Foundation gives
+# unlimited permission to copy and/or distribute it, with or without
+# modifications, as long as this notice is preserved.
+
+# serial 2
+
+# These exist entirely to fool aclocal when bootstrapping libtool.
+#
+# In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN)
+# which have later been changed to m4_define as they aren't part of the
+# exported API, or moved to Autoconf or Automake where they belong.
+#
+# The trouble is, aclocal is a bit thick.  It'll see the old AC_DEFUN
+# in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us
+# using a macro with the same name in our local m4/libtool.m4 it'll
+# pull the old libtool.m4 in (it doesn't see our shiny new m4_define
+# and doesn't know about Autoconf macros at all.)
+#
+# So we provide this file, which has a silly filename so it's always
+# included after everything else.  This provides aclocal with the
+# AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything
+# because those macros already exist, or will be overwritten later.
+# We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. 
+#
+# Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here.
+# Yes, that means every name once taken will need to remain here until
+# we give up compatibility with versions before 1.7, at which point
+# we need to keep only those names which we still refer to.
+
+m4_ifndef([AC_LIBTOOL_LINKER_OPTION],  [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])])
+m4_ifndef([AC_PROG_EGREP],             [AC_DEFUN([AC_PROG_EGREP])])
+m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH],        [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])])
+m4_ifndef([_LT_AC_SHELL_INIT],         [AC_DEFUN([_LT_AC_SHELL_INIT])])
+m4_ifndef([_LT_AC_SYS_LIBPATH_AIX],    [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])])
+m4_ifndef([_LT_PROG_LTMAIN],           [AC_DEFUN([_LT_PROG_LTMAIN])])
+m4_ifndef([_LT_AC_TAGVAR],             [AC_DEFUN([_LT_AC_TAGVAR])])
+m4_ifndef([AC_LTDL_ENABLE_INSTALL],    [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])])
+m4_ifndef([AC_LTDL_PREOPEN],           [AC_DEFUN([AC_LTDL_PREOPEN])])
+m4_ifndef([_LT_AC_SYS_COMPILER],       [AC_DEFUN([_LT_AC_SYS_COMPILER])])
+m4_ifndef([_LT_AC_LOCK],               [AC_DEFUN([_LT_AC_LOCK])])
+m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE],        [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])])
+m4_ifndef([_LT_AC_TRY_DLOPEN_SELF],    [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])])
+m4_ifndef([AC_LIBTOOL_PROG_CC_C_O],    [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])])
+m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])])
+m4_ifndef([AC_LIBTOOL_OBJDIR],         [AC_DEFUN([AC_LIBTOOL_OBJDIR])])
+m4_ifndef([AC_LTDL_OBJDIR],            [AC_DEFUN([AC_LTDL_OBJDIR])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])])
+m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP],  [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])])
+m4_ifndef([AC_PATH_MAGIC],             [AC_DEFUN([AC_PATH_MAGIC])])
+m4_ifndef([AC_PROG_LD_GNU],            [AC_DEFUN([AC_PROG_LD_GNU])])
+m4_ifndef([AC_PROG_LD_RELOAD_FLAG],    [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])])
+m4_ifndef([AC_DEPLIBS_CHECK_METHOD],   [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])])
+m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])])
+m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])])
+m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])])
+m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])])
+m4_ifndef([LT_AC_PROG_EGREP],          [AC_DEFUN([LT_AC_PROG_EGREP])])
+m4_ifndef([LT_AC_PROG_SED],            [AC_DEFUN([LT_AC_PROG_SED])])
+m4_ifndef([_LT_CC_BASENAME],           [AC_DEFUN([_LT_CC_BASENAME])])
+m4_ifndef([_LT_COMPILER_BOILERPLATE],  [AC_DEFUN([_LT_COMPILER_BOILERPLATE])])
+m4_ifndef([_LT_LINKER_BOILERPLATE],    [AC_DEFUN([_LT_LINKER_BOILERPLATE])])
+m4_ifndef([_AC_PROG_LIBTOOL],          [AC_DEFUN([_AC_PROG_LIBTOOL])])
+m4_ifndef([AC_LIBTOOL_SETUP],          [AC_DEFUN([AC_LIBTOOL_SETUP])])
+m4_ifndef([_LT_AC_CHECK_DLFCN],                [AC_DEFUN([_LT_AC_CHECK_DLFCN])])
+m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER],     [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])])
+m4_ifndef([_LT_AC_TAGCONFIG],          [AC_DEFUN([_LT_AC_TAGCONFIG])])
+m4_ifndef([AC_DISABLE_FAST_INSTALL],   [AC_DEFUN([AC_DISABLE_FAST_INSTALL])])
+m4_ifndef([_LT_AC_LANG_CXX],           [AC_DEFUN([_LT_AC_LANG_CXX])])
+m4_ifndef([_LT_AC_LANG_F77],           [AC_DEFUN([_LT_AC_LANG_F77])])
+m4_ifndef([_LT_AC_LANG_GCJ],           [AC_DEFUN([_LT_AC_LANG_GCJ])])
+m4_ifndef([AC_LIBTOOL_RC],             [AC_DEFUN([AC_LIBTOOL_RC])])
+m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG],  [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])])
+m4_ifndef([_LT_AC_LANG_C_CONFIG],      [AC_DEFUN([_LT_AC_LANG_C_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG],        [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])])
+m4_ifndef([_LT_AC_LANG_CXX_CONFIG],    [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG],        [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])])
+m4_ifndef([_LT_AC_LANG_F77_CONFIG],    [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG],        [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])])
+m4_ifndef([_LT_AC_LANG_GCJ_CONFIG],    [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])])
+m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])])
+m4_ifndef([_LT_AC_LANG_RC_CONFIG],     [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])])
+m4_ifndef([AC_LIBTOOL_CONFIG],         [AC_DEFUN([AC_LIBTOOL_CONFIG])])
+m4_ifndef([_LT_AC_FILE_LTDLL_C],       [AC_DEFUN([_LT_AC_FILE_LTDLL_C])])
diff --git a/scilab/m4/ocaml.m4 b/scilab/m4/ocaml.m4
new file mode 100644 (file)
index 0000000..be930a9
--- /dev/null
@@ -0,0 +1,35 @@
+dnl Macros which process ./configure arguments
+dnl Ocam Macros
+dnl Copyright INRIA
+dnl Sylvestre Ledru - June 2006
+
+dnl Check if Ocaml is available on the system
+AC_DEFUN([AC_CHECK_PROG_OCAML],[
+# checking for ocamlc
+       OCAMLTARGET=ocaml_disabled
+       OCAMLTARGET_DISTCLEAN=ocaml_disabled
+       AC_CHECK_PROG(OCAMLC,ocamlc,ocamlc,no)
+       if test "$OCAMLC" = no; then
+               AC_MSG_WARN([ocamlc not found: I will not build Modelica compiler])
+       else
+
+               AC_CHECK_PROG(OCAMLOPT,ocamlopt,ocamlopt,no)
+               if test "$OCAMLOPT" = no; then
+                       AC_MSG_WARN([ocamlopt not found: I will not build Modelica compiler])
+               else
+                       AC_CHECK_PROG(OCAMLDEP,ocamldep,ocamldep,no)
+                       if test "$OCAMLDEP" = no; then
+                               AC_MSG_WARN([ocamldep not found: I will not build Modelica compiler])
+                       else
+                               AC_DEFINE([WITH_OCAML],[],[With OCAML])
+                               OCAMLTARGET=scilex-lib
+                               OCAMLTARGET_DISTCLEAN=distclean
+                       fi
+               fi
+       fi
+       AC_SUBST(OCAMLTARGET)
+       AC_SUBST(OCAMLTARGET_DISTCLEAN)
+       AC_SUBST(WITH_OCAML)
+
+]
+)
\ No newline at end of file
diff --git a/scilab/m4/pvm.m4 b/scilab/m4/pvm.m4
new file mode 100644 (file)
index 0000000..c7dc808
--- /dev/null
@@ -0,0 +1,195 @@
+#  Check if PVM is usable
+# INPUTS :
+#  Nothing
+#
+# OUTPUTS
+#  PVM_OK : 1 if it is possible to use it
+#  
+AC_DEFUN([AC_PVM], [
+
+   AC_MSG_CHECKING([for PVM])
+    if test "x$PVM_ROOT" == "x"; then
+               echo "PVM_ROOT not set"
+       fi
+       
+       # check for a PVM provided by the distrubtion in the PATH
+       AC_CHECK_PROG(PVMGETARCH,pvmgetarch,pvmgetarch,no)
+    if test "$PVMGETARCH" = no; then
+          if test -x $PVM_ROOT/lib/pvmgetarch; then  
+               # check for a PVM provided by the distrubtion in the PATH
+                 PVMGETARCH=$PVM_ROOT/lib/pvmgetarch
+          else
+             AC_MSG_ERROR([Unable to find pvmgetarch in PATH or PVM_ROOT. (Scilab no longer provides an embedded PVM)])
+          fi
+    fi
+
+       AC_CACHE_CHECK([for PVM architecture],PVMARCH, [
+       PVMARCH=`$PVMGETARCH`
+       ])
+       if test "$PVMARCH" = UNKNOWN; then
+               AC_MSG_ERROR([PVM is unable to recognise the architecture])
+       fi
+
+       PVMTARGET=scilex-lib
+       PVMTARGET_DISTCLEAN=distclean
+       PVMROOT="$SCIDIR/pvm3"
+       PVMROOTR='$SCI/pvm3'
+       
+       AC_ARG_WITH(pvm-include,
+               [  --with-pvm-include=DIR  PVM include files are in DIR ],
+               [  USER_PVMINCLUDE=$withval
+       ])
+
+       AC_PVM_INCLUDE($USER_PVMINCLUDE)
+
+       AC_DEFINE([WITH_PVM],[],[With PVM])
+               
+       case "$host" in
+       *-*-mingw32*)
+               PVMARCH=MINGW
+               PVMHOSTERFILES="pvmwinrexec.o pvmwinrsh.o"
+               PVMHOSTER=h
+               ;;
+       esac
+               
+       PVMLIBDIR=$PVMROOT/lib/$PVMARCH
+       AC_ARG_WITH(pvm-library,
+               [  --with-pvm-library=DIR  PVM library files are in DIR ],
+               [  USER_PVMLIBDIR=$withval
+       ])
+       AC_PVM_LIBRARY($USER_PVMLIBDIR)
+
+       case "$host" in
+       *-*-mingw32*)
+               # add src to PVMINCLUDE 
+               PVMINCLUDE="$PVMINCLUDE -I$SCIDIR/pvm3/src"
+               #     to have path with SCIDIR 
+               # PVMROOT=`echo $PVMROOT | sed -e "s+$SCIDIR+\\$(SCIDIR)+g" `
+               
+               PVMLIB=`echo $PVMLIB | sed -e "s+$SCIDIR/pvm3+\\$(PVMROOT)+g" `
+               PVMGLIB=`echo $PVMGLIB | sed -e "s+$SCIDIR/pvm3+\\$(PVMROOT)+g" `
+               PVMINCLUDE=`echo $PVMINCLUDE | sed -e "s+$SCIDIR/pvm3+\\$(PVMROOT)+g" ` 
+               ;;
+       esac
+
+if test ! -z "$PVM_INCLUDE" -a ! -z "$PVM_LIB"; then
+       PVM_OK=1
+fi 
+AC_SUBST(PVMARCH)
+AC_SUBST(PVM_LIB)
+AC_SUBST(PVM_INCLUDE)
+])
+
+
+
+# INPUTS :
+#  $1 : Path of PVM provided by the user (/usr/include/pvm)
+#
+# OUTPUTS
+#  PVM_INCLUDE : Flag to include files
+#  Check the version of tcl associated to header file tcl.h 
+AC_DEFUN([AC_PVM_INCLUDE], [
+       AC_MSG_CHECKING([PVM header files])
+       USER_PVMINCLUDE=$1
+       F=$USER_PVMINCLUDE/pvm3.h
+    if test -f "$F" ; then ## A voir ce que l'on fait quand le param USER_PVMINCLUDE=$1 est fournit mais n'existe pas ...
+         PVM_INCLUDE="-I`dirname $F`"
+       else
+               if test ! -z "$USER_PVMINCLUDE"; then ## 
+                       AC_MSG_WARN([Cannot find PVM sources in the specified directory ($F). Looking for PVM sources elsewhere.])
+               fi 
+               incpath="$PVMROOT/include $PVM_ROOT/include /usr/include /usr/share /usr/share/include /usr/array/PVM /usr/local /usr/local/include /usr/local/src"
+               for INC_PATH in $incpath; do
+                   F="$INC_PATH/pvm3.h"
+                       if test -f "$F"; then
+                        PVM_INCLUDE="-I`dirname $F`"
+                                break 1;
+                       fi
+               done
+               if test -z $PVM_INCLUDE; then
+                    AC_MSG_ERROR([Could not locate PVM include file])
+               fi
+       fi
+       echo "PVM sources found in $PVM_INCLUDE"
+
+    ac_save_CPPFLAGS=$CPPFLAGS
+    ac_save_CFLAGS=$CFLAGS
+
+    CPPFLAGS="$PVM_INCLUDE $CPPFLAGS"
+    CFLAGS="$PVM_INCLUDE $CFLAGS"
+
+    AC_CHECK_HEADER([pvm3.h],,
+                    [
+                    if test "$pvm" = yes; then
+                      AC_MSG_ERROR([check for PVM library failed])
+                    else
+                      pvm=no
+                    fi
+                    ])
+
+    CPPFLAGS=$ac_save_CPPFLAGS
+    CFLAGS=$ac_save_CFLAGS
+       
+])
+
+
+# INPUTS :
+#  $1 : Path of PVM lib provided by the user (/usr/lib/pvm)
+# OUPUTS :
+#  PVM_LIB_OK : 1 if link is OK; 0 otherwise
+#  PVM_LIB : flag to link against pvm lib
+
+AC_DEFUN([AC_PVM_LIBRARY], [
+USER_PVMLIBDIR=$1
+  AC_MSG_CHECKING([for PVM3 library])
+dirs="$USER_PVMLIBDIR /lib /usr/lib /usr/lib/pvm3 /shlib /shlib/pvm3 /usr/shlib /usr/shlib/pvm3 /usr/local/lib /usr/local/lib/pvm3 /usr/local/shlib /usr/local/pvm3 /usr/pvm3 /usr/local/pvm3/lib /sw/lib/ ."
+libexts="so so.1.0 sl dylib"
+libnames="pvm pvm3"
+
+for EXT_LIB_PVM in $libexts; do
+       for PATH_LIB_PVM in $dirs; do
+               for NAME_LIB_PVM in $libnames; do
+                       m="$PATH_LIB_PVM/lib$NAME_LIB_PVM.$EXT_LIB_PVM"
+                       if test -r $m; then
+                               AC_MSG_RESULT([found $m using -L$PATH_LIB_PVM -l$NAME_LIB_PVM])
+
+                               saved_cflags="$CFLAGS"
+                               saved_ldflags="$LDFLAGS"
+                               saved_cppflags="$CPPFLAGS"
+                               CFLAGS="$CFLAGS $PVM_INC_PATH"
+                               CPPFLAGS="$CPPFLAGS $PVM_INC_PATH"
+                               LDFLAGS="$LDFLAGS -L$PATH_LIB_PVM"
+
+
+                       AC_CHECK_LIB([$NAME_LIB_PVM], pvm_spawn,
+                       [
+                           LDFLAGS="-lpvm3 $LDFLAGS"
+                               AC_CHECK_LIB(pvm3, pvm_barrier,
+                               [PVMLIBS="-lpvm3"; PVM_LIB_OK=1],
+                                       [
+                                       AC_CHECK_LIB(gpvm3, pvm_barrier,
+                                               [PVMLIBS="-lgpvm3 -lpvm3"; 
+                                                       PVM_LIB_OK=1])
+                                       ])
+                       ])
+
+
+
+                               AC_CHECK_LIB([$NAME_LIB_PVM], pvm_spawn, PVM_LIB_OK=1,PVM_LIB_OK=0)
+
+                               CFLAGS="$saved_cflags"
+                               CPPFLAGS="$saved_cppflags"
+                               LDFLAGS="$saved_ldflags"
+
+                               if test $PVM_LIB_OK = 1; then 
+                                       PVM_LIB=" -L$PATH_LIB_PVM $PVMLIBS"
+                                       break 3;
+                               fi
+                       fi
+               done
+       done
+done
+if test -z "$PVM_LIB"; then
+       AC_MSG_ERROR([check for PVM library failed])
+fi
+])
\ No newline at end of file