--- scilab-4.0/configure 2006-02-01 15:47:53.000000000 -0500 +++ scilab-4.0-new/configure 2006-09-16 11:13:29.000000000 -0400 @@ -4878,7 +4878,7 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 + for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 gfortran do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -4920,7 +4920,7 @@ fi if test -z "$F77"; then ac_ct_F77=$F77 - for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 + for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 gfortran do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -20127,10 +20127,11 @@ DLD_SUBDIR=dld MAKEFILE_TARGET=Makefile.linux ;; -# Linux gnu: x86_64 distributions added by cdh 2004-09-29 - x86_64-*-linux-gnu) - LIEEELIB= - echo "$as_me:$LINENO: checking for main in -lieee" >&5 + +# Linux gnu: x86_64 distributions added by cdh 2004-09-29 ( modified 2006-06-01 to find gfortran if needed ) +x86_64-*-linux-gnu) + LIEEELIB= + echo "$as_me:$LINENO: checking for main in -lieee" >&5 echo $ECHO_N "checking for main in -lieee... $ECHO_C" >&6 if test "${ac_cv_lib_ieee_main+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 @@ -20138,7 +20139,6 @@ ac_check_lib_save_LIBS=$LIBS LIBS="-lieee $LIBS" cat >conftest.$ac_ext <<_ACEOF -#line $LINENO "configure" /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext @@ -20156,11 +20156,21 @@ _ACEOF rm -f conftest.$ac_objext conftest$ac_exeext if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 - (eval $ac_link) 2>&5 + (eval $ac_link) 2>conftest.er1 ac_status=$? + grep -v '^ *+' conftest.er1 >conftest.err + rm -f conftest.er1 + cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && - { ac_try='test -s conftest$ac_exeext' + { ac_try='test -z "$ac_c_werror_flag" + || test ! -s conftest.err' + { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 + (eval $ac_try) 2>&5 + ac_status=$? + echo "$as_me:$LINENO: \$? = $ac_status" >&5 + (exit $ac_status); }; } && + { ac_try='test -s conftest$ac_exeext' { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -20173,7 +20183,8 @@ ac_cv_lib_ieee_main=no fi -rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext +rm -f conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi echo "$as_me:$LINENO: result: $ac_cv_lib_ieee_main" >&5 @@ -20182,40 +20193,67 @@ LIEEELIB=-lieee fi - MALLOC=malloc.o - if test "$with_intelcompilers" = yes; then - GCC=no - CC=$ICC - FC=$IFC - CC_OPTIONS='-O -DNDEBUG -Dlinux -DNARROWPROTO -mp' - CC_PICFLAGS="-fPIC" -# -cm remove comments displays, -w90 -w95 remove warnings abort f90 f95 non standard - FC_OPTIONS="-O -cm -w90 -w95 -mp " - FC_OPTIONS_O0="-cm -w90 -w95 -mp " - if test "$enable_debug" = yes; then - CC_OPTIONS='-g -Wall -Dlinux -DNARROWPROTO -mp ' - FC_OPTIONS="-g -cm -w90 -w95 -mp " - fi - CC_LDFLAGS="$LIEEELIB -Wl,-relax" - FC_LDFLAGS="$LIEEELIB -ldl -lPEPCF90 -Wl,-relax " - LD=xild - LD_LDFLAGS="$LIEEELIB -lPEPCF90 -Wl,-relax " - else - GCC=yes - CC=gcc - # CC_PLAT_OPTIONS is optional, and is used to add CPU specific code generation tuning for Athlon64 presumably Opteron could benefit too but these are not optimized for the Opteron - CC_PLAT_OPTIONS='-march=athlon64 -mfpmath=sse -msse2 -m3dnow -m64 ' - CC_OPTIONS="-O2 -DNDEBUG -Dlinux -DNARROWPROTO $CC_PLAT_OPTIONS" - CC_LDFLAGS=$LIEEELIB - CC_PICFLAGS=-fPIC - # find Fortran compiler - # g77 already asked and found: good - if test "$WITH_G77" = yes; then - FC=g77 - FC_PICFLAGS=-fPIC - # option with-f2c - elif test "$with_f2c" = yes; then - # Extract the first word of "f2c", so it can be a program name with args. + MALLOC=malloc.o + if test "$with_intelcompilers" = yes; then + GCC=no + CC=$ICC + FC=$IFC + CC_OPTIONS='-O -DNDEBUG -Dlinux -DNARROWPROTO -mp' + CC_PICFLAGS="-fPIC" + # -cm remove comments displays, -w90 -w95 remove warnings abort f90 f95 non standard + FC_OPTIONS="-O -cm -w90 -w95 -mp " + FC_OPTIONS_O0="-cm -w90 -w95 -mp " + if test "$enable_debug" = yes; then + CC_OPTIONS='-g -Wall -Dlinux -DNARROWPROTO -mp ' + FC_OPTIONS="-g -cm -w90 -w95 -mp " + fi + CC_LDFLAGS="$LIEEELIB -Wl,-relax" + FC_LDFLAGS="$LIEEELIB -ldl -lPEPCF90 -Wl,-relax " + LD=xild + LD_LDFLAGS="$LIEEELIB -lPEPCF90 -Wl,-relax " + else + GCC=yes + CC=gcc + # CC_PLAT_OPTIONS is optional, and is used to add CPU specific code generation tuning for Athlon64 presumably Opteron could benefit too but these are not optimized for the Opteron + CC_PLAT_OPTIONS='-march=athlon64 -mfpmath=sse -msse2 -m3dnow -m64' + + CC_PICFLAGS='-fPIC' + FC_PICFLAGS='-fPIC' + + CC_OPTIONS="-O2 -DNDEBUG -Dlinux -DNARROWPROTO $CC_PLAT_OPTIONS $CC_PICFLAGS " + CC_LDFLAGS=$LIEEELIB + + if test "$enable_debug" = yes; then + CC_OPTIONS="-g -Wall -Dlinux -DNARROWPROTO $CC_PLAT_OPTIONS $CC_PICFLAGS " + fi + # find Fortran compiler + # g77 already asked and found: good + if test "$WITH_G77" = yes; then + FC=g77 + FC_PICFLAGS=-fPIC + if test "$enable_debug" = yes; then + FC_OPTIONS="-g $CC_PLAT_OPTIONS $FC_PICFLAGS" + FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS" + else + FC_OPTIONS="-O $CC_PLAT_OPTIONS $FC_PICFLAGS" + FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS" + fi + elif test "$WITH_GFORTRAN" = yes;then + FC=gfortran + if test "$enable_debug" = yes; then + FC_OPTIONS="-g -ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS" + FC_OPTIONS_O0="-ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS" + else + FC_OPTIONS="-O -ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS" + FC_OPTIONS_O0="-ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS" + fi + cat >>confdefs.h <<\_ACEOF +#define G95_FORTRAN 1 +_ACEOF + + # option with-f2c + elif test "$with_f2c" = yes; then + # Extract the first word of "f2c", so it can be a program name with args. set dummy f2c; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 @@ -20251,16 +20289,23 @@ echo "${ECHO_T}no" >&6 fi - if test "$F2C" = no; then - { { echo "$as_me:$LINENO: error: Unable to configure: f2c compiler not found" >&5 + if test "$F2C" = no; then + { { echo "$as_me:$LINENO: error: Unable to configure: f2c compiler not found" >&5 echo "$as_me: error: Unable to configure: f2c compiler not found" >&2;} { (exit 1); exit 1; }; } - fi - # script shell f77 have bugs, get ours - FC='${SCIDIR}/bin/f77-linux' - else - # first find g77 - # Extract the first word of "g77", so it can be a program name with args. + fi + # script shell f77 have bugs, get ours + FC='${SCIDIR}/bin/f77-linux' + if test "$enable_debug" = yes; then + FC_OPTIONS="-g $CC_PLAT_OPTIONS $FC_PICFLAGS" + FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS" + else + FC_OPTIONS="-O $CC_PLAT_OPTIONS $FC_PICFLAGS" + FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS" + fi + else + # first find g77 + # Extract the first word of "g77", so it can be a program name with args. set dummy g77; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 @@ -20296,12 +20341,121 @@ echo "${ECHO_T}no" >&6 fi - if test "$WITH_G77" = yes; then - FC=g77 - FC_PICFLAGS=-fPIC - else - # otherwise find f2c - # Extract the first word of "f2c", so it can be a program name with args. + if test "$WITH_G77" = yes; then + FC=g77 + FC_PICFLAGS=-fPIC + if test "$enable_debug" = yes; then + FC_OPTIONS="-g $CC_PLAT_OPTIONS" + FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS" + else + FC_OPTIONS="-O $CC_PLAT_OPTIONS" + FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS" + fi + else + # Extract the first word of "gfortran", so it can be a program name with args. +set dummy gfortran; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_WITH_GFORTRAN+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$WITH_GFORTRAN"; then + ac_cv_prog_WITH_GFORTRAN="$WITH_GFORTRAN" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_WITH_GFORTRAN="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_WITH_GFORTRAN" && ac_cv_prog_WITH_GFORTRAN="no" +fi +fi +WITH_GFORTRAN=$ac_cv_prog_WITH_GFORTRAN +if test -n "$WITH_GFORTRAN"; then + echo "$as_me:$LINENO: result: $WITH_GFORTRAN" >&5 +echo "${ECHO_T}$WITH_GFORTRAN" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + if test "$WITH_GFORTRAN" = yes; then + FC=gfortran + FC_PICFLAGS=-fPIC + cat >>confdefs.h <<\_ACEOF +#define G95_FORTRAN 1 +_ACEOF + + if test "$enable_debug" = yes; then + FC_OPTIONS="-g -ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS" + FC_OPTIONS_O0="-ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS" + else + FC_OPTIONS="-O -ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS" + FC_OPTIONS_O0="-ff2c $CC_PLAT_OPTIONS $FC_PICFLAGS" + fi + else + # Extract the first word of "f95", so it can be a program name with args. +set dummy f95; ac_word=$2 +echo "$as_me:$LINENO: checking for $ac_word" >&5 +echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 +if test "${ac_cv_prog_WITH_F95+set}" = set; then + echo $ECHO_N "(cached) $ECHO_C" >&6 +else + if test -n "$WITH_F95"; then + ac_cv_prog_WITH_F95="$WITH_F95" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_WITH_F95="yes" + echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done +done + + test -z "$ac_cv_prog_WITH_F95" && ac_cv_prog_WITH_F95="no" +fi +fi +WITH_F95=$ac_cv_prog_WITH_F95 +if test -n "$WITH_F95"; then + echo "$as_me:$LINENO: result: $WITH_F95" >&5 +echo "${ECHO_T}$WITH_F95" >&6 +else + echo "$as_me:$LINENO: result: no" >&5 +echo "${ECHO_T}no" >&6 +fi + + if test "$WITH_F95" = yes; then + FC=f95 + FC_PICFLAGS=-fPIC + cat >>confdefs.h <<\_ACEOF +#define F95_FORTRAN 1 +_ACEOF + + if test "$enable_debug" = yes; then + FC_OPTIONS="-g $CC_PLAT_OPTIONS $FC_PICFLAGS" + FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS" + else + FC_OPTIONS="-O $CC_PLAT_OPTIONS $FC_PICFLAGS" + FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS " + fi + else + # otherwise find f2c + # Extract the first word of "f2c", so it can be a program name with args. set dummy f2c; ac_word=$2 echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6 @@ -20337,30 +20491,32 @@ echo "${ECHO_T}no" >&6 fi - if test "$F2C" = yes; then - # script shell f77 have bugs, get ours - FC='${SCIDIR}/bin/f77-linux' - else - { { echo "$as_me:$LINENO: error: Unable to configure: no Fortran compiler found" >&5 + if test "$F2C" = yes; then + # script shell f77 have bugs, get ours + FC='${SCIDIR}/bin/f77-linux' + if test "$enable_debug" = yes; then + FC_OPTIONS="-g $CC_PLAT_OPTIONS $FC_PICFLAGS" + FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS" + else + FC_OPTIONS="-O $CC_PLAT_OPTIONS $FC_PICFLAGS" + FC_OPTIONS_O0="$CC_PLAT_OPTIONS $FC_PICFLAGS" + fi + else + { { echo "$as_me:$LINENO: error: Unable to configure: no Fortran compiler found" >&5 echo "$as_me: error: Unable to configure: no Fortran compiler found" >&2;} { (exit 1); exit 1; }; } - fi - fi - fi - FC_OPTIONS="-O $CC_PLAT_OPTIONS" - FC_OPTIONS_O0= - FC_LDFLAGS="$LIEEELIB -ldl -rdynamic -Wl,-relax " - LD=ld - LD_LDFLAGS="$LIEEELIB -Wl,-relax " - if test "$enable_debug" = yes; then - # CC_PLAT_OPTIONS is optional, and is used to add CPU specific code generation tuning for Athlon64 presumably Opteron could benefit too but these are not optimized for the Opteron - CC_PLAT_OPTIONS='-march=athlon64 -mfpmath=sse -msse2 -m3dnow -m64 ' - CC_OPTIONS="-g -Wall -Dlinux -DNARROWPROTO $CC_PLAT_OPTIONS" - FC_OPTIONS="-g $CC_PLAT_OPTIONS" - fi - fi - MAKEFILE_TARGET=Makefile.linux - ;; + fi + fi + fi + fi + fi + FC_LDFLAGS="$LIEEELIB -ldl -rdynamic -Wl,-relax " + LD=ld + LD_LDFLAGS="$LIEEELIB -Wl,-relax " + fi + MAKEFILE_TARGET=Makefile.linux + ;; + # Linux ELF: all standard distributions i*86-*-linux-gnu | *-pc-linux-gnu ) LIEEELIB= @@ -22909,7 +23065,7 @@ ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then - for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 + for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 gfortran do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 @@ -22951,7 +23107,7 @@ fi if test -z "$F77"; then ac_ct_F77=$F77 - for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 + for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95 gfortran do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2