diff options
-rwxr-xr-x | src/configure | 74 | ||||
-rw-r--r-- | src/configure.ac | 38 | ||||
-rw-r--r-- | src/includes/lapack.h | 66 |
3 files changed, 143 insertions, 35 deletions
diff --git a/src/configure b/src/configure index faa86275..34875de5 100755 --- a/src/configure +++ b/src/configure @@ -1478,6 +1478,10 @@ Optional Features: --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors --disable-libtool-lock avoid locking (might break parallel builds) + --enable-debug Use verbose messages through compilation process + --enable-stop-on-warning + Stop the compilation on the first warning found in + the C/C++ code Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -4458,7 +4462,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 4461 "configure"' > conftest.$ac_ext + echo '#line 4465 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -7195,11 +7199,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7198: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7202: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7202: \$? = $ac_status" >&5 + echo "$as_me:7206: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7485,11 +7489,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7488: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7492: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:7492: \$? = $ac_status" >&5 + echo "$as_me:7496: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -7589,11 +7593,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:7592: $lt_compile\"" >&5) + (eval echo "\"\$as_me:7596: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:7596: \$? = $ac_status" >&5 + echo "$as_me:7600: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -9951,7 +9955,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 9954 "configure" +#line 9958 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -10051,7 +10055,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<EOF -#line 10054 "configure" +#line 10058 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -12471,11 +12475,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12474: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12478: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:12478: \$? = $ac_status" >&5 + echo "$as_me:12482: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -12575,11 +12579,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:12578: $lt_compile\"" >&5) + (eval echo "\"\$as_me:12582: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:12582: \$? = $ac_status" >&5 + echo "$as_me:12586: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -14152,11 +14156,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14155: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14159: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:14159: \$? = $ac_status" >&5 + echo "$as_me:14163: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -14256,11 +14260,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:14259: $lt_compile\"" >&5) + (eval echo "\"\$as_me:14263: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:14263: \$? = $ac_status" >&5 + echo "$as_me:14267: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -16456,11 +16460,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16459: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16463: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16463: \$? = $ac_status" >&5 + echo "$as_me:16467: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16746,11 +16750,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16749: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16753: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16753: \$? = $ac_status" >&5 + echo "$as_me:16757: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -16850,11 +16854,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16853: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16857: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:16857: \$? = $ac_status" >&5 + echo "$as_me:16861: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -21462,6 +21466,26 @@ done CFLAGS="$CFLAGS -std=c99" fi +# Check whether --enable-debug was given. +if test "${enable_debug+set}" = set; then + enableval=$enable_debug; +fi + +if test "$enable_debug" = yes; then + CFLAGS="$CFLAGS -Wall -Wextra -pedantic -Wconversion -Wformat -Wshadow \ + -Wpointer-arith -Wcast-align -Wmissing-prototypes \ + -Wmissing-declarations" +fi + +# Check whether --enable-stopOnWarning was given. +if test "${enable_stopOnWarning+set}" = set; then + enableval=$enable_stopOnWarning; +fi + +if test "$enable_stop_on_warning" = yes; then + CFLAGS="$CFLAGS -Werror" +fi + ########### FORTRAN FLAGS ###################### ###################### @@ -21478,12 +21502,12 @@ fi ######## With GCC ... ###################### if test "$CC" = "gcc"; then - CFLAGS="$CFLAGS -pedantic -Werror -Wformat -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -g -Wall " + CFLAGS="$CFLAGS" # used to be -O # -D_FORTIFY_SOURCE=2 else ## CC compiler (not GCC) - CFLAGS="$CFLAGS -g" + CFLAGS="-g" fi diff --git a/src/configure.ac b/src/configure.ac index d68557b4..e978714c 100644 --- a/src/configure.ac +++ b/src/configure.ac @@ -1,10 +1,14 @@ -########## -### Bruno JOFRET -### INRIA - Scilab 2007 -########## - -## Copyright INRIA 2007 - +## +## Scilab ( http://www.scilab.org/ ) - This file is part of Scilab +## Copyright (C) 2007-2008 - INRIA - Bruno JOFRET +## +## This file must be used under the terms of the CeCILL. +## This source file is licensed as described in the file COPYING, which +## you should have received as part of this distribution. The terms +## are also available at +## http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt +## +## AC_INIT([sci2c],[1.0],[]) AC_CONFIG_AUX_DIR(config) @@ -48,12 +52,26 @@ AC_SUBST(LIBMATH) ## all the --with-* argument help ################################# AC_ARG_WITH(stdc99, - [ --with-stdc99 Enable standard C99 (Used in complex implementation)]) + AC_HELP_STRING([--with-stdc99],[Enable standard C99 (Used in complex implementation)])) if test "$with_stdc99" = yes; then AC_CHECK_HEADERS([complex.h]) CFLAGS="$CFLAGS -std=c99" fi +AC_ARG_ENABLE(debug, + AC_HELP_STRING([--enable-debug],[Use verbose messages through compilation process])) +if test "$enable_debug" = yes; then + CFLAGS="$CFLAGS -Wall -Wextra -pedantic -Wconversion -Wformat -Wshadow \ + -Wpointer-arith -Wcast-align -Wmissing-prototypes \ + -Wmissing-declarations" +fi + +AC_ARG_ENABLE(stopOnWarning, + AC_HELP_STRING([--enable-stop-on-warning],[Stop the compilation on the first warning found in the C/C++ code])) +if test "$enable_stop_on_warning" = yes; then + CFLAGS="$CFLAGS -Werror" +fi + ########### FORTRAN FLAGS ###################### ###################### @@ -70,12 +88,12 @@ fi ######## With GCC ... ###################### if test "$CC" = "gcc"; then - CFLAGS="$CFLAGS -pedantic -Werror -Wformat -Wshadow -Wpointer-arith -Wcast-align -Wmissing-prototypes -Wmissing-declarations -g -Wall " + CFLAGS="$CFLAGS" # used to be -O # -D_FORTIFY_SOURCE=2 else ## CC compiler (not GCC) - CFLAGS="$CFLAGS -g" + CFLAGS="-g" fi diff --git a/src/includes/lapack.h b/src/includes/lapack.h new file mode 100644 index 00000000..a094ecc9 --- /dev/null +++ b/src/includes/lapack.h @@ -0,0 +1,66 @@ +/* + * Scilab ( http://www.scilab.org/ ) - This file is part of Scilab + * Copyright (C) 2007-2008 - INRIA - Bruno JOFRET + * + * This file must be used under the terms of the CeCILL. + * This source file is licensed as described in the file COPYING, which + * you should have received as part of this distribution. The terms + * are also available at + * http://www.cecill.info/licences/Licence_CeCILL_V2-en.txt + * + */ + +#ifndef __LAPACK_H__ +#define __LAPACK_H__ + + +#define getRelativeMachinePrecision() dlamch_("e", 1L) +#define getOverflowThreshold() dlamch_("o", 1L) +#define getUnderflowThreshold() dlamch_("u", 1L) + +/** + * -- LAPACK auxiliary routine (version 3.0) -- + * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., + * Courant Institute, Argonne National Lab, and Rice University + * October 31, 1992 + * + * Purpose + * ======= + * + * DLAMCH determines double precision machine parameters. + * + * Arguments + * ========= + * + * CMACH (input) CHARACTER*1 + * Specifies the value to be returned by DLAMCH: + * = 'E' or 'e', DLAMCH := eps + * = 'S' or 's , DLAMCH := sfmin + * = 'B' or 'b', DLAMCH := base + * = 'P' or 'p', DLAMCH := eps*base + * = 'N' or 'n', DLAMCH := t + * = 'R' or 'r', DLAMCH := rnd + * = 'M' or 'm', DLAMCH := emin + * = 'U' or 'u', DLAMCH := rmin + * = 'L' or 'l', DLAMCH := emax + * = 'O' or 'o', DLAMCH := rmax + * + * where + * + * eps = relative machine precision + * sfmin = safe minimum, such that 1/sfmin does not overflow + * base = base of the machine + * prec = eps*base + * t = number of (base) digits in the mantissa + * rnd = 1.0 when rounding occurs in addition, 0.0 otherwise + * emin = minimum exponent before (gradual) underflow + * rmin = underflow threshold - base**(emin-1) + * emax = largest exponent before overflow + * rmax = overflow threshold - (base**emax)*(1-eps) + * + * ===================================================================== + **/ +extern double dlamch_ (char *CMACH, unsigned long int i); + + +#endif /* !__LAPACK_H__ */ |