summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjofret2007-03-30 13:57:56 +0000
committerjofret2007-03-30 13:57:56 +0000
commite05e38f3eb10509d4fd4d812f97ce53c4dcb81cf (patch)
tree565cacaa0c4cbaeb009204e11cb6a2e5b8a29131
parente3ecaa06d8fc5c5a7a7636b6f2610bc633220a78 (diff)
downloadscilab2c-e05e38f3eb10509d4fd4d812f97ce53c4dcb81cf.tar.gz
scilab2c-e05e38f3eb10509d4fd4d812f97ce53c4dcb81cf.tar.bz2
scilab2c-e05e38f3eb10509d4fd4d812f97ce53c4dcb81cf.zip
Autotools new compilation process
-rw-r--r--src/Makefile.am5
-rw-r--r--src/Makefile.in20
-rwxr-xr-xsrc/config/compile142
-rw-r--r--src/configure.ac6
-rw-r--r--src/type/Makefile.in11
5 files changed, 162 insertions, 22 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index b3d5129c..a4c753e1 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -5,7 +5,7 @@
## Made by Bruno JOFRET <bruno.jofret@inria.fr>
##
## Started on Thu Mar 22 16:39:30 2007 jofret
-## Last update Fri Mar 23 09:02:03 2007 jofret
+## Last update Mon Mar 26 11:03:57 2007 jofret
##
## Copyright INRIA 2007
##
@@ -13,6 +13,7 @@
AUTOMAKE_OPTIONS = 1.9 dist-zip dist-bzip2
SUBDIRS= elementaryFunctions \
- type
+ type \
+ test
ACLOCAL_AMFLAGS = -I m4/ \ No newline at end of file
diff --git a/src/Makefile.in b/src/Makefile.in
index e2865cc2..a49f54d8 100644
--- a/src/Makefile.in
+++ b/src/Makefile.in
@@ -37,9 +37,9 @@ build_triplet = @build@
host_triplet = @host@
DIST_COMMON = $(am__configure_deps) $(srcdir)/Makefile.am \
$(srcdir)/Makefile.in $(top_srcdir)/configure \
- $(top_srcdir)/includes/machine.h.in config/config.guess \
- config/config.sub config/depcomp config/install-sh \
- config/missing
+ $(top_srcdir)/includes/machine.h.in TODO config/compile \
+ config/config.guess config/config.sub config/depcomp \
+ config/install-sh config/missing
subdir = .
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
am__aclocal_m4_deps = $(top_srcdir)/m4/fortran.m4 \
@@ -99,12 +99,12 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
-GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
+LIBMATH = @LIBMATH@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LN_S = @LN_S@
@@ -129,6 +129,8 @@ VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -145,37 +147,31 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
-htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
-localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
-psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@
target_alias = @target_alias@
AUTOMAKE_OPTIONS = 1.9 dist-zip dist-bzip2
SUBDIRS = elementaryFunctions \
- type
+ type \
+ test
ACLOCAL_AMFLAGS = -I m4/
all: all-recursive
diff --git a/src/config/compile b/src/config/compile
new file mode 100755
index 00000000..1b1d2321
--- /dev/null
+++ b/src/config/compile
@@ -0,0 +1,142 @@
+#! /bin/sh
+# Wrapper for compilers which do not understand `-c -o'.
+
+scriptversion=2005-05-14.22
+
+# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey@cygnus.com>.
+#
+# 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 to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+case $1 in
+ '')
+ echo "$0: No command. Try \`$0 --help' for more information." 1>&2
+ exit 1;
+ ;;
+ -h | --h*)
+ cat <<\EOF
+Usage: compile [--help] [--version] PROGRAM [ARGS]
+
+Wrapper for compilers which do not understand `-c -o'.
+Remove `-o dest.o' from ARGS, run PROGRAM with the remaining
+arguments, and rename the output as expected.
+
+If you are trying to build a whole package this is not the
+right script to run: please start by reading the file `INSTALL'.
+
+Report bugs to <bug-automake@gnu.org>.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "compile $scriptversion"
+ exit $?
+ ;;
+esac
+
+ofile=
+cfile=
+eat=
+
+for arg
+do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ # So we strip `-o arg' only if arg is an object.
+ eat=1
+ case $2 in
+ *.o | *.obj)
+ ofile=$2
+ ;;
+ *)
+ set x "$@" -o "$2"
+ shift
+ ;;
+ esac
+ ;;
+ *.c)
+ cfile=$1
+ set x "$@" "$1"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+ # If no `-o' option was seen then we might have been invoked from a
+ # pattern rule where we don't need one. That is ok -- this is a
+ # normal compilation that the losing compiler can handle. If no
+ # `.c' file was seen then we are probably linking. That is also
+ # ok.
+ exec "$@"
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file. Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+while true; do
+ if mkdir "$lockdir" >/dev/null 2>&1; then
+ break
+ fi
+ sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir '$lockdir'; exit 1" 1 2 15
+
+# Run the compile.
+"$@"
+ret=$?
+
+if test -f "$cofile"; then
+ mv "$cofile" "$ofile"
+elif test -f "${cofile}bj"; then
+ mv "${cofile}bj" "$ofile"
+fi
+
+rmdir "$lockdir"
+exit $ret
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "scriptversion="
+# time-stamp-format: "%:y-%02m-%02d.%02H"
+# time-stamp-end: "$"
+# End:
diff --git a/src/configure.ac b/src/configure.ac
index 3f137a1a..457999f3 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -37,6 +37,11 @@ AC_PROG_CXX
AC_PROG_CC_C_O
AC_PROG_F77_C_O
+### Need to check for math lib and symbols
+AC_SEARCH_LIBS(atan, m, LIBMATH="-lm")
+AC_SUBST(LIBMATH)
+
+
#################################
## all the --with-* argument help
#################################
@@ -242,6 +247,7 @@ echo " DEFS = $DEFS"
echo " LD = $LD"
echo " LDFLAGS = $LDFLAGS"
echo " LIBS = $LIBS"
+echo " LIBMATH = $LIBMATH"
echo " CXX = $CXX"
echo " CXXFLAGS = $CXXFLAGS"
echo " F77 = $F77"
diff --git a/src/type/Makefile.in b/src/type/Makefile.in
index 992b5ef2..502d84f7 100644
--- a/src/type/Makefile.in
+++ b/src/type/Makefile.in
@@ -116,12 +116,12 @@ EGREP = @EGREP@
EXEEXT = @EXEEXT@
F77 = @F77@
FFLAGS = @FFLAGS@
-GREP = @GREP@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
LDFLAGS = @LDFLAGS@
+LIBMATH = @LIBMATH@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LN_S = @LN_S@
@@ -146,6 +146,8 @@ VERSION = @VERSION@
ac_ct_CC = @ac_ct_CC@
ac_ct_CXX = @ac_ct_CXX@
ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
@@ -162,30 +164,23 @@ build_cpu = @build_cpu@
build_os = @build_os@
build_vendor = @build_vendor@
datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
exec_prefix = @exec_prefix@
host = @host@
host_alias = @host_alias@
host_cpu = @host_cpu@
host_os = @host_os@
host_vendor = @host_vendor@
-htmldir = @htmldir@
includedir = @includedir@
infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
-localedir = @localedir@
localstatedir = @localstatedir@
mandir = @mandir@
mkdir_p = @mkdir_p@
oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
prefix = @prefix@
program_transform_name = @program_transform_name@
-psdir = @psdir@
sbindir = @sbindir@
sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@